:root {
  --ink: #041426;
  --surface: rgba(11, 35, 64, .72);
  --surface-hi: rgba(22, 54, 94, .72);
  --line: rgba(242, 238, 230, .08);
  --line-2: rgba(242, 238, 230, .14);
  --text: #F2EEE6;
  --muted: #9FB0C3;
  --faint: #7F90A4;
  --accent: #C9A84C;
  --accent-soft: rgba(201, 168, 76, .13);
  --accent-ink: #1A1405;
  --ok: #5FB88C;
  --danger: #E58A80;
  --sky: radial-gradient(120% 60% at 15% -10%, #173F72 0%, rgba(23,63,114,0) 60%), radial-gradient(80% 40% at 100% 0%, rgba(201,168,76,.10) 0%, rgba(201,168,76,0) 60%), #041426;
  --display: 'Fraunces', Georgia, serif;
  --body: 'Manrope', system-ui, sans-serif;
}
[data-brand="tb"] {
  --ink: #16112B;
  --surface: rgba(38, 30, 66, .75);
  --surface-hi: rgba(56, 44, 96, .75);
  --accent: #B9A4E8;
  --accent-soft: rgba(185, 164, 232, .14);
  --accent-ink: #16112B;
  --sky: radial-gradient(120% 60% at 15% -10%, #3E2F6E 0%, rgba(62,47,110,0) 60%), #16112B;
}
* { box-sizing: border-box; }
html, body { margin: 0; color: var(--text); font-family: var(--body); background: var(--ink); }
body { min-height: 100dvh; background: var(--sky); background-attachment: fixed; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 20px; height: 20px; flex-shrink: 0; }
.muted { color: var(--muted); }
.loading { color: var(--muted); padding: 40px 0; text-align: center; }

/* Estructura */
.shell { min-height: 100dvh; }
.side, .aside { display: none; }
.main { max-width: 560px; margin: 0 auto; padding: 22px 20px calc(env(safe-area-inset-bottom) + 112px); display: flex; flex-direction: column; gap: 28px; }

/* Barra superior fija (celular) */
.sbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(env(safe-area-inset-top) + 10px) 20px 10px; background: rgba(4, 20, 38, .8);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); }
[data-brand="tb"] .sbar { background: rgba(22, 17, 43, .8); }
.sbar .logo { height: 18px; width: auto; }
.sbar .where { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; min-width: 0; }
.sbar .where span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 13px; flex-shrink: 0; }

/* Encabezado */
.hero { display: flex; flex-direction: column; gap: 10px; }
.greet { color: var(--muted); font-size: 15px; }
.place h1, .place select { font-family: var(--display); font-weight: 500; font-size: 40px; line-height: 1.05; margin: 0; letter-spacing: -0.01em; }
.place select { background: transparent; border: 0; padding: 0 30px 0 0; appearance: none; max-width: 100%;
  background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%);
  background-position: right 12px center, right 5px center; background-size: 7px 7px; background-repeat: no-repeat; }
.place select option { background: #0B2340; font-family: var(--body); font-size: 16px; }
.rule { height: 1px; background: linear-gradient(90deg, var(--accent), transparent); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; border: 0; background: rgba(159, 176, 195, .12); color: var(--muted); font-size: 13px; font-weight: 600; }
.pill.online { background: rgba(95, 184, 140, .12); color: #BFE6D0; }
.pill.silent { background: rgba(229, 138, 128, .12); color: #F2C2BC; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex-shrink: 0; }
.online .dot, .dot.online { background: var(--ok); box-shadow: 0 0 0 4px rgba(95, 184, 140, .18); }
.silent .dot, .dot.silent { background: var(--danger); }

/* Secciones */
h2 { font-family: var(--display); font-weight: 500; font-size: 22px; margin: 0; }
.section { display: flex; flex-direction: column; gap: 12px; }
.shead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.link { border: 0; background: none; color: var(--accent); font-weight: 600; font-size: 13px; padding: 6px 0; }
.empty { border: 1px dashed var(--line-2); border-radius: 16px; padding: 18px; color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0; }

/* Modos */
.modes { display: flex; gap: 8px; overflow-x: auto; margin: 0 -20px; padding: 0 20px 4px; scroll-snap-type: x mandatory; scroll-padding: 0 20px; scrollbar-width: none; }
.modes::-webkit-scrollbar { display: none; }
.modes .mode { flex: 0 0 118px; scroll-snap-align: start; }
.modes.all { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; overflow: visible; }
.modes.all .mode { flex: none; }
.mode { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 14px 12px; min-height: 104px;
  border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-align: left; }
.mode b { font-size: 13px; font-weight: 600; line-height: 1.25; }
.modes.all .mode { min-height: 116px; padding: 16px; }
.modes.all .mode b { font-size: 15px; }
.mode.sending { border-color: rgba(201, 168, 76, .6); }
.mode.ok { border-color: rgba(95, 184, 140, .5); }

/* Tarjetas */
.chip { width: 38px; height: 38px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mode .chip { width: 34px; height: 34px; border-radius: 11px; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-items: start; }
.tile { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 18px;
  background: linear-gradient(180deg, var(--surface-hi), var(--surface)); border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(242, 238, 230, .06) inset, 0 14px 30px rgba(1, 8, 18, .45); transition: border-color .2s; }
.tile.ok { border-color: rgba(95, 184, 140, .5); }
.tile.sending { border-color: rgba(201, 168, 76, .6); }
.tile.warn { border-color: rgba(229, 138, 128, .5); }
.thead { display: flex; gap: 12px; align-items: center; }
.tinfo { flex: 1; min-width: 0; }
.tname { font-size: 15px; font-weight: 600; line-height: 1.25; margin: 0; }
.tsub { font-size: 12px; color: var(--muted); margin: 2px 0 0; }
.star { width: 44px; height: 44px; margin: -8px -8px -8px 0; border: 0; background: none; color: var(--faint); display: flex; align-items: center; justify-content: center; }
.star[aria-pressed="true"] { color: var(--accent); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.badge.ok { color: #8FD3AF; } .badge.sending { color: #E2C878; } .badge.warn { color: #F2C2BC; }
.bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: linear-gradient(90deg, transparent, var(--accent)); transform-origin: left; }
.seg { display: flex; border-radius: 12px; border: 1px solid var(--line-2); overflow: hidden; background: rgba(4, 20, 38, .55); }
.seg button { flex: 1; min-height: 42px; border: 0; background: none; font-size: 13px; font-weight: 600; color: #DCE3EA; }
.seg button + button { border-left: 1px solid rgba(242, 238, 230, .10); }
.seg button:active, .seg button.hot { background: var(--accent); color: var(--accent-ink); }
.seg button.prog { color: var(--accent); }
.hold { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.note { font-size: 12px; color: var(--faint); line-height: 1.5; margin: 0; }

button.tinfo { background: none; border: 0; padding: 0; text-align: left; color: inherit; }
.tinfo .tname, .tinfo .tsub { display: block; }
.tbadge { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: var(--accent-soft); color: #E2C878; font-size: 13px; }
.tbadge span { flex: 1; } .tbadge b { font-variant-numeric: tabular-nums; }
.qgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.qgrid button { min-height: 46px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(4, 20, 38, .55); font-weight: 700; }
.qgrid button:active { background: var(--accent); color: var(--accent-ink); }
.modewrap { position: relative; }
.modewrap .mode { width: 100%; }
.medit { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border-radius: 12px; border: 0; background: rgba(4, 20, 38, .5); color: var(--muted); display: flex; align-items: center; justify-content: center; }
.mlist { display: flex; flex-direction: column; }
.mrow { display: flex; align-items: center; gap: 10px; min-height: 60px; border-bottom: 1px solid var(--line); }
.seg.mini { flex-shrink: 0; }
.seg.mini button { min-height: 38px; padding: 0 10px; font-size: 12px; }
.checks { display: flex; flex-direction: column; max-height: 50dvh; overflow-y: auto; }
.check { display: flex; align-items: center; gap: 12px; min-height: 56px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; }
.check b { display: block; font-size: 15px; } .check small { color: var(--muted); font-size: 12px; }
.check .box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--accent-ink); }
.check[aria-pressed="true"] .box { background: var(--accent); }
.link .ic { vertical-align: -3px; }

.backup { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border-radius: 16px; background: rgba(224, 168, 79, .12); border: 1px solid rgba(224, 168, 79, .35); color: #F1D7A6; font-size: 13px; line-height: 1.5; }
.backup .ic { margin-top: 1px; color: #E0A84F; }

.wsteps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.wsteps span { height: 4px; border-radius: 2px; background: var(--line-2); }
.wsteps span.on { background: var(--accent); }
.wlist { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 12px; font-size: 15px; line-height: 1.5; color: #DCE3EA; }
.wlist b { color: var(--text); }
.wphoto { align-self: center; width: min(220px, 60%); border-radius: 20px; overflow: hidden; background: #fff; box-shadow: 0 14px 30px rgba(1, 8, 18, .45); }
.wphoto img { display: block; width: 100%; height: auto; }

.plainb { border: 1px solid var(--line-2); border-radius: 14px; padding: 12px 14px; }
.plainb summary { cursor: pointer; font-weight: 600; color: var(--muted); min-height: 32px; display: flex; align-items: center; }
.plainb[open] { display: flex; flex-direction: column; gap: 10px; }
.urlbox { display: block; word-break: break-all; padding: 10px 12px; border-radius: 10px; background: rgba(4, 20, 38, .7); font-size: 13px; color: #DCE3EA; -webkit-user-select: all; user-select: all; }

.tabs.five { grid-template-columns: repeat(5, 1fr); }
.camgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.camtile { display: flex; flex-direction: column; padding: 0; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); text-align: left; }
.camimg { aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; background: #020B16; color: var(--faint); }
.camimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.caminfo { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; }
.caminfo b { font-size: 15px; } .caminfo small { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.player { position: fixed; inset: 0; z-index: 80; background: #020B16; display: flex; flex-direction: column; gap: 14px; padding: calc(env(safe-area-inset-top) + 10px) 16px calc(env(safe-area-inset-bottom) + 18px); overflow-y: auto; }
.pbar { display: flex; justify-content: space-between; align-items: center; }
.pbar b { font-family: var(--display); font-weight: 500; font-size: 22px; }
.pq { min-width: 52px; height: 44px; border-radius: 22px; border: 1px solid var(--line-2); background: none; color: var(--muted); font-weight: 700; font-size: 13px; }
.pq[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pclose { width: 44px; height: 44px; border-radius: 22px; border: 0; background: rgba(242, 238, 230, .1); color: var(--text); display: flex; align-items: center; justify-content: center; }
.pstage { position: relative; border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.pstage video { width: 100%; height: 100%; display: block; background: #000; }
.pmsg { position: absolute; inset: auto 0 0 0; margin: 0; padding: 12px 14px; background: linear-gradient(transparent, rgba(0, 0, 0, .8)); font-size: 14px; color: #F2EEE6; }
.pmode { flex-shrink: 0; }
.prec { display: flex; flex-direction: column; gap: 12px; }
.prec[hidden], .ptz[hidden] { display: none; }
.prow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.prow label { display: flex; flex-direction: column; gap: 6px; }
.prow .field { color-scheme: dark; }
.pevents { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.evlist { display: flex; flex-direction: column; gap: 8px; }
.ev { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); text-align: left; }
.ev img, .evph { width: 96px; aspect-ratio: 16 / 9; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: #020B16; display: flex; align-items: center; justify-content: center; color: var(--faint); }
.ev b { display: block; font-size: 15px; } .ev small { color: var(--muted); font-size: 12px; }
.ptz { align-self: center; display: grid; grid-template-columns: repeat(3, 60px); grid-template-rows: repeat(3, 60px); gap: 6px; margin-top: 6px; }
.ptz button { border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); display: flex; align-items: center; justify-content: center; }
.ptz button:active { background: var(--accent); color: var(--accent-ink); }
.ptz button:disabled { opacity: .5; }
.ptz [data-p="up"] { grid-column: 2; grid-row: 1; } .ptz [data-p="left"] { grid-column: 1; grid-row: 2; }
.ptz [data-p="right"] { grid-column: 3; grid-row: 2; } .ptz [data-p="down"] { grid-column: 2; grid-row: 3; }
@media (min-width: 900px) {
  .camgrid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
  .player { padding: 30px 40px; align-items: center; }
  .player > * { width: min(960px, 100%); }
  .player .ptz { width: auto; }
}

.tile.lit { border-color: rgba(201, 168, 82, .45); box-shadow: 0 0 0 1px rgba(201, 168, 82, .15), 0 10px 30px rgba(201, 168, 82, .08); }
.tile.lit .chip { color: var(--accent); }
.slrow { display: flex; align-items: center; gap: 10px; }
.slrow .seg { flex: 1; }
.slch { width: 22px; text-align: center; font-weight: 700; color: var(--muted); font-size: 13px; }
.tile .dot { flex-shrink: 0; align-self: flex-start; margin-top: 6px; }

.ilist { display: flex; flex-direction: column; gap: 10px; }
.icard { gap: 8px; }
.ipill { flex-shrink: 0; align-self: flex-start; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--muted); border: 1px solid var(--line-2); }
.ipill.on { color: #8FD3AF; border-color: rgba(95, 184, 140, .45); background: rgba(95, 184, 140, .1); }

.medit.inline { position: static; width: 36px; height: 36px; }
.mactions { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.mactions .link { font-size: 14px; }
.danger-link { color: #E58C7F !important; }

.search { position: relative; display: flex; align-items: center; gap: 10px; padding: 0 14px; min-height: 50px; border-radius: 16px; border: 1px solid var(--line-2); background: rgba(4, 20, 38, .55); color: var(--muted); }
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; min-width: 0; border: 0; background: none; color: var(--text); font: inherit; font-size: 16px; outline: none; padding: 12px 0; }
.search input::-webkit-search-cancel-button { display: none; }
.qclear { border: 0; background: none; color: var(--muted); width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; }
#ptr { position: fixed; top: calc(env(safe-area-inset-top) + 64px); left: 50%; transform: translate(-50%, 0); z-index: 45; width: 40px; height: 40px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line-2); color: var(--muted); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .15s; box-shadow: 0 8px 20px rgba(1, 8, 18, .4); }
#ptr.ready { color: var(--accent); border-color: var(--accent); }
#ptr.spin .ic { animation: ptrspin .8s linear infinite; }
@keyframes ptrspin { to { transform: rotate(360deg); } }

.ctls { display: flex; flex-wrap: wrap; gap: 8px; }
.ctl { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.ctl input[type=range] { width: 100%; accent-color: var(--accent); }
.chipbtn { min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(4, 20, 38, .55); color: var(--muted); font-weight: 600; font-size: 13px; }
.chipbtn.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.chipbtn:disabled { opacity: .5; }
.reads { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.reads b { color: var(--text); font-weight: 600; }
.read.alert b { color: #E0A84F; }

.tile.auto.off { opacity: .55; }
.toggle { flex-shrink: 0; align-self: center; width: 50px; height: 30px; border-radius: 15px; border: 0; background: var(--line-2); position: relative; padding: 0; }
.toggle span { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 12px; background: #F2EEE6; transition: left .15s; }
.toggle.on { background: var(--accent); }
.toggle.on span { left: 23px; }
.seg.wrap { flex-wrap: wrap; }
.seg.days button { min-width: 0; flex: 1; }
.aact { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(4, 20, 38, .35); }
.aact > .seg { align-items: center; }
.aact .del { margin-left: auto; }
.field.mini { display: inline-block; width: 70px; min-height: 36px; padding: 4px 8px; margin: 0 4px; }

.hero.compact { gap: 4px; padding-bottom: 4px; }
.hero.compact .hrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hero.compact .place { font-size: 30px; line-height: 1.1; }
.zgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.zcard { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; min-height: 108px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); text-align: left; }
.zcard b { font-size: 15px; line-height: 1.25; }
.zcard small { color: var(--muted); font-size: 12px; }
.zcard .lit { color: var(--accent); }
.zcard:active { transform: scale(.98); }
.chip.sm { width: 34px; height: 34px; border-radius: 11px; flex-shrink: 0; }
.banner { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 16px; border: 1px dashed var(--line-2); background: none; text-align: left; color: var(--muted); }
.banner span { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.banner b { color: var(--text); font-size: 14px; } .banner small { font-size: 12px; }
.minis { display: flex; flex-direction: column; gap: 8px; }
.mini { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.mini .tinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mini .tname { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .tsub { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .seg.mini { flex-shrink: 0; }
.mini .seg.mini button { min-height: 36px; padding: 0 10px; font-size: 12px; }
.mini .seg.mini button.icon { min-width: 40px; padding: 0 8px; font-size: 13px; }
.mini { flex-wrap: wrap; }
.mini .prow1 { flex: 1 0 100%; }
.mini.lit { border-color: rgba(201, 168, 82, .45); }
.mini.lit .chip { color: var(--accent); }
@media (min-width: 900px) { .zgrid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } .minis { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); } }

textarea.field { font-family: inherit; color: var(--text); background: rgba(4, 20, 38, .55); resize: vertical; min-height: 84px; padding-top: 12px; }
textarea.field::placeholder, input.field::placeholder { color: var(--faint); }

.acard { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); }
.acard .name { margin: 0; font-family: var(--display); font-size: 22px; line-height: 1.2; }
.acard .muted { margin: 2px 0 0; font-size: 13px; }
.ainfo { flex: 1; min-width: 0; }
.avatar.big { width: 54px; height: 54px; border-radius: 27px; font-size: 18px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.hubcard { justify-content: space-between; }
.hubid { margin: 2px 0 0; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.hubid .link { font-size: 13px; }
.agroup { display: flex; flex-direction: column; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.arow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 62px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; color: var(--muted); }
.arow:last-child { border-bottom: 0; }
.arow:active { background: rgba(242, 238, 230, .04); }
.atext { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.atext b { color: var(--text); font-size: 15px; } .atext small { font-size: 12px; }

.tbat { text-align: right; flex-shrink: 0; }
.tbat b { display: block; font-size: 24px; font-variant-numeric: tabular-nums; }
.tbat small { color: var(--muted); font-size: 12px; }
.batbar { position: relative; height: 8px; border-radius: 4px; background: var(--line-2); overflow: visible; }
.batbar span { display: block; height: 100%; border-radius: 4px; background: #8FD3AF; }
.batbar span.charging { background: linear-gradient(90deg, #8FD3AF, #C9A852); }
.batbar span.low { background: #E58C7F; }
.batbar i { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--muted); }
a.link { text-decoration: none; }

.tctl { display: flex; flex-direction: column; gap: 8px; }
.tlabel { width: 52px; flex-shrink: 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.field.mono { font-family: ui-monospace, Menlo, monospace; font-size: 11px; word-break: break-all; }

.camst { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); flex-shrink: 0; }

.prec .agroup, .evlist { border-radius: 16px; }
.arow.rec.on { background: var(--accent-soft); }
.arow.rec { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.evlist { display: flex; flex-direction: column; gap: 8px; }

.recst { color: var(--accent) !important; }
.toast { z-index: 90 !important; }

.banner.net { border-style: solid; border-color: rgba(224, 168, 79, .45); }
.banner.net.ok { border-color: var(--line); }

.ezbox { width: 100%; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.ezbox iframe { width: 100%; height: 100%; border: 0; display: block; }

.pdbg { margin: -6px 0 0; font: 11px/1.45 ui-monospace, Menlo, monospace; color: var(--faint); white-space: pre-line; min-height: 16px; }

.rolebar { margin: 8px 0 0; padding: 8px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-size: 12.5px; font-weight: 600; }

.ibtns { display: flex; gap: 8px; flex-wrap: wrap; }
.ibtns .secondary, .ibtns .wa { flex: 1 1 140px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border-radius: 14px; font-weight: 700; font-size: 14px; text-decoration: none; }
.ibtns .secondary { border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.ibtns .wa { background: #25D366; color: #06290F; border: 0; }
.newinv { border-color: var(--accent); }
.invcard { width: 100%; max-width: 380px; padding: 16px; border-radius: 18px; border: 1px solid var(--accent); background: var(--accent-soft); display: flex; flex-direction: column; gap: 12px; }
.invcard p { margin: 0; line-height: 1.5; }

.limits { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(4, 20, 38, .4); }
.limitsbox { display: flex; flex-direction: column; gap: 10px; }

.step { border: 1px solid var(--line); border-radius: 16px; padding: 12px; background: var(--surface); }
.stephead { display: flex; align-items: center; gap: 10px; }
.stephead b { flex: 1; font-size: 15px; }
.stepn { width: 26px; height: 26px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 13px; flex-shrink: 0; }
.stepbtns { display: flex; gap: 6px; }
.stepbtns button { min-width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-weight: 700; }
.stepbtns button:disabled { opacity: .35; }
.waitstep { background: rgba(4, 20, 38, .35); border-style: dashed; }
.waitstep .prow { grid-template-columns: 1fr 1.6fr; align-items: center; }
.waitstep .seg { flex-direction: row; flex-wrap: nowrap; }
.waitstep .seg button { flex: 1; }

.arunrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.runbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 14px; }
.runbtn:disabled { opacity: .5; }
.arunst { font-size: 13px; color: var(--accent); font-weight: 600; }
.arunst.ok { color: #8FD3AF; }
.tile.auto.running { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }

.solobtn { display: inline-block; margin-top: 12px; padding: 12px 18px; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none; }
.pmsg { pointer-events: auto; }

.pdbgbtn { align-self: flex-start; font-size: 12px; text-decoration: none; }

.arow select.field { width: auto; min-width: 150px; max-width: 58%; flex-shrink: 0; min-height: 42px; }

.planbadge { display: inline-block; margin-top: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid var(--line); color: var(--muted); }
.planbadge.prem { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.ipill.prem { border-color: var(--accent); color: var(--accent); }
.icard.locked { opacity: .78; }

/* Zonas */
.zones { display: flex; flex-direction: column; }
.zrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 0 2px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; }
.zrow b { font-size: 16px; font-weight: 600; display: block; }
.zrow small { font-size: 12px; color: var(--muted); }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; border: 0; background: none; color: var(--muted); padding: 0; align-self: flex-start; }
.back .ic { transform: rotate(180deg); }

/* Rutinas */
.rt { flex-direction: row; align-items: center; }
.tag { font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 3px 8px; border-radius: 999px; }
.del { width: 44px; height: 44px; border: 0; background: none; color: var(--faint); display: flex; align-items: center; justify-content: center; margin-right: -8px; }
.primary { min-height: 52px; border: 0; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 16px; width: 100%; }
.primary:disabled { opacity: .6; cursor: wait; }
.primary.okbtn { background: #5FB88C; color: #06251A; }
.sheet { touch-action: pan-y; will-change: transform; }
.sheet-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(1, 8, 18, .6); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: min(560px, 100%); max-height: 92dvh; overflow-y: auto; background: #0B2340; border-radius: 26px 26px 0 0; border-top: 1px solid var(--line-2);
  padding: 12px 20px calc(env(safe-area-inset-bottom) + 24px); display: flex; flex-direction: column; gap: 18px; }
[data-brand="tb"] .sheet { background: #241C40; }
.grab { align-self: center; width: 44px; height: 5px; border-radius: 3px; background: #34506F; }
.shead2 { display: flex; justify-content: space-between; align-items: center; }
.shead2 h2 { font-size: 22px; }
.flabel { font-size: 13px; color: var(--muted); margin-bottom: 8px; display: block; }
.field { width: 100%; height: 52px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(4, 20, 38, .55); font-size: 16px; }
.field option, .field optgroup { background: #0B2340; }
.time { font-family: var(--display); font-size: 48px; height: 76px; text-align: center; color-scheme: dark; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.days button { height: 44px; border-radius: 12px; border: 1px solid var(--line-2); background: none; font-weight: 700; font-size: 14px; }
.days button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.err { min-height: 20px; margin: 0; color: var(--danger); font-size: 14px; }

/* Cuenta */
.acct .name { font-family: var(--display); font-size: 28px; }
.danger { min-height: 50px; width: 100%; border-radius: 14px; border: 1px solid var(--danger); background: none; color: var(--danger); font-weight: 600; }

/* Aviso */
.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 96px); transform: translateX(-50%); z-index: 60;
  width: min(480px, calc(100% - 32px)); display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 16px; background: var(--text); color: #041426; }
.toast:empty { display: none; }
.toast i { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.toast.ok i { background: #2E8B57; } .toast.warn i { background: #B7791F; } .toast.error i { background: #B3413A; }
.toast strong { display: block; font-size: 14px; } .toast small { font-size: 13px; color: #3B4A5A; }

/* Barra inferior (celular) */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 8px 10px calc(env(safe-area-inset-bottom) + 10px); background: rgba(4, 20, 38, .92); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-top: 1px solid var(--line); }
[data-brand="tb"] .tabs { background: rgba(22, 17, 43, .92); }
.tabs button { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 52px; justify-content: center; border: 0; background: none; color: var(--faint); font-weight: 600; font-size: 11px; }
.tabs button[aria-current="page"] { color: var(--accent); }
.tabs .ic { width: 22px; height: 22px; }

/* Login */
.login { max-width: 420px; margin: 0 auto; min-height: 100dvh; padding: 40px 24px; display: flex; flex-direction: column; justify-content: center; }
.login .logo { height: 30px; width: auto; align-self: flex-start; }
.login h1 { font-family: var(--display); font-weight: 500; font-size: 34px; line-height: 1.15; margin: 40px 0 28px; }
.login form { display: flex; flex-direction: column; gap: 16px; }
.login label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }

/* Tablet y computadora */
@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); }
  .sbar, .tabs { display: none; }
  .side { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100dvh; overflow-y: auto; padding: 30px 16px; border-right: 1px solid var(--line); }
  .side .logo { height: 20px; width: auto; align-self: flex-start; margin: 0 12px 26px; }
  .side button { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 0; background: none; color: #C4CFDA; font-weight: 600; font-size: 15px; text-align: left; }
  .side button[aria-current="page"] { background: var(--accent-soft); color: var(--text); }
  .side button em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--faint); }
  .side .label { font-size: 13px; color: var(--faint); padding: 22px 12px 6px; }
  .main { max-width: none; margin: 0; padding: 36px 40px 60px; }
  .place h1, .place select { font-size: 52px; }
  .modes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: 0; padding: 0; overflow: visible; }
  .modes .mode { flex: none; }
  .modes.all { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
  .grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
  .zones-home { display: none; }
  .toast { bottom: 28px; }
  .sheet-wrap { align-items: center; }
  .sheet { border-radius: 24px; border: 1px solid var(--line-2); }
}
@media (min-width: 1280px) {
  .shell { grid-template-columns: 260px minmax(0, 1fr) 330px; }
  .aside { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; height: 100dvh; overflow-y: auto; padding: 36px 24px 36px 0; }
  .panel { padding: 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
  .panel h2 { font-size: 18px; margin-bottom: 8px; }
  .act { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
  .act small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
  .act time { color: var(--accent); font-size: 12px; white-space: nowrap; }
}
@media (prefers-reduced-motion: no-preference) {
  .toast:not(:empty) { animation: rise .18s ease-out; }
  .tile.sending .bar, .mode.sending .bar { animation: load 1.2s ease-in-out infinite; }
  @keyframes rise { from { transform: translate(-50%, 8px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
  @keyframes load { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* ---------- Planes: Lite (platino) y Premium (dorado) ---------- */
:root[data-plan="lite"]:not([data-brand="tb"]) {
  --accent: #C3CBD6;
  --accent-soft: rgba(195, 203, 214, .12);
  --accent-ink: #0B1726;
  --sky: radial-gradient(120% 60% at 15% -10%, #173F72 0%, rgba(23,63,114,0) 60%), radial-gradient(80% 40% at 100% 0%, rgba(195,203,214,.07) 0%, rgba(195,203,214,0) 60%), #041426;
}
:root[data-plan="premium"]:not([data-brand="tb"]) {
  --sky: radial-gradient(120% 60% at 15% -10%, #173F72 0%, rgba(23,63,114,0) 60%), radial-gradient(90% 45% at 100% 0%, rgba(201,168,76,.18) 0%, rgba(201,168,76,0) 62%), #041426;
}
:root[data-plan="premium"] .tabs { box-shadow: 0 -1px 0 rgba(201,168,76,.35); }
.logowrap { display: inline-flex; align-items: center; gap: 8px; }
.premseal { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #1A1405; background: linear-gradient(135deg, #E9D08A, #C9A84C 55%, #A8873A); box-shadow: 0 0 0 1px rgba(255,255,255,.15) inset; }
.premseal.big { font-size: 12px; padding: 4px 12px; }
.psumrow { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: -4px 0 4px; }
.psumrow::-webkit-scrollbar { display: none; }
.psum { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; padding: 8px 12px; border-radius: 999px; border: 1px solid rgba(201,168,76,.35); background: var(--accent-soft); color: var(--text); font-size: 13px; font-weight: 600; white-space: nowrap; }
.psum .ic { color: var(--accent); }
.promo { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px 40px 14px 14px; border-radius: 18px; border: 1px solid rgba(201,168,76,.35); background: linear-gradient(135deg, rgba(201,168,76,.12), rgba(11,35,64,.6)); }
.promo .chip .ic { color: #C9A84C; }
.promo.slim { margin-top: 10px; }
.ptext { display: flex; flex-direction: column; gap: 3px; }
.ptext small { color: var(--muted); line-height: 1.45; }
.ptext .link { align-self: flex-start; margin-top: 6px; color: #C9A84C; }
.pkicker { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #C9A84C; }
.pclose { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 16px; border: 0; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.plist { display: flex; flex-direction: column; gap: 10px; }
.pitem { display: flex; gap: 12px; align-items: flex-start; }
.pitem b { display: block; }
.pitem small { color: var(--muted); line-height: 1.45; }
.pitem .chip .ic { color: #C9A84C; }
.pshow { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding: 18px; border-radius: 20px; border: 1px solid rgba(201,168,76,.4); background: radial-gradient(120% 120% at 100% 0%, rgba(201,168,76,.18), rgba(11,35,64,.7) 60%); }
.pshow h3 { margin: 4px 0 0; font: 600 24px/1.2 var(--display); }
.pshow p { margin: 0; line-height: 1.5; }
.okmsg { color: #8FD3AF; font-weight: 600; }
.pwelcome { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(2, 10, 20, .72); backdrop-filter: blur(6px); }
.pwcard { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; padding: 24px; border-radius: 24px; border: 1px solid rgba(201,168,76,.45); background: radial-gradient(120% 90% at 100% 0%, rgba(201,168,76,.22), #0A1E36 60%); box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.pwcard h2 { margin: 0; font: 600 26px/1.2 var(--display); }
.pwcard p { margin: 0; }
.pwcard .primary { width: 100%; background: linear-gradient(135deg, #E9D08A, #C9A84C 55%, #A8873A); color: #1A1405; }
.mactions .secondary, .tile .secondary { min-height: 48px; padding: 0 18px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-weight: 700; }

/* Color de focos y tiras */
.colorctl { width: 100%; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.sw { -webkit-appearance: none; appearance: none; flex: 0 0 34px; width: 34px; height: 34px; min-width: 0; min-height: 0; border-radius: 50%; border: 2px solid rgba(255,255,255,.22); background: var(--c) !important; background-color: var(--c) !important; box-shadow: 0 0 14px -2px var(--c); padding: 0; margin: 0; cursor: pointer; position: relative; overflow: hidden; }
.sw:disabled { opacity: .4; }
.sw.pick { background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red); box-shadow: none; overflow: hidden; display: inline-block; }
.sw.pick { background: conic-gradient(#ff3b30, #ffcc00, #34c759, #00c7be, #007aff, #af52de, #ff2d55, #ff3b30) !important; }
.sw.pick input { -webkit-appearance: none; appearance: none; position: absolute; left: 0; top: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; margin: 0; background: transparent; cursor: pointer; }
.sw.pick input::-webkit-color-swatch-wrapper, .sw.pick input::-webkit-color-swatch { opacity: 0; border: 0; padding: 0; }

.unitfield { position: relative; display: block; }
.unitfield .field { padding-right: 44px; }
.unitfield span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; }

/* Heimer Hogar (Google y Alexa) */
.hrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line, rgba(255,255,255,.08)); }
.hsteps { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 8px; font-size: 14px; line-height: 1.45; opacity: .9; }
.vincular .who { text-align: center; margin: 0 0 4px; }
.vincular .perm { display: grid; gap: 6px; margin: 6px 0 4px; padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,.05); font-size: 14px; line-height: 1.45; }
.vincular .perm li { margin-left: 16px; }
.vincular .row2 { display: grid; gap: 10px; }
.hgroup { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; opacity: .7; margin: 14px 0 4px; }
.hlist { padding: 4px 16px; }
.hlist .hrow:first-child { border-top: 0; }
.hsw { appearance: none; -webkit-appearance: none; border: 1px solid rgba(255,255,255,.18); background: transparent; color: inherit; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; min-width: 78px; cursor: pointer; opacity: .65; }
.hsw.on { background: var(--accent, #c9a84c); border-color: transparent; color: #111; opacity: 1; }

/* Dyson (beta) */
.beta { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 6px; border-radius: 999px; background: rgba(255,255,255,.1); vertical-align: middle; opacity: .8; }
.aqrow { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 4px; }
.aq { font-size: 12px; padding: 4px 9px; border-radius: 999px; background: rgba(255,255,255,.06); white-space: nowrap; }
.aq b { font-weight: 700; margin-right: 2px; }
.aq.good { background: rgba(52,199,89,.18); color: #7be39a; }
.aq.fair { background: rgba(255,204,0,.16); color: #ffd95a; }
.aq.poor { background: rgba(255,149,0,.18); color: #ffb35c; }
.aq.bad { background: rgba(255,69,58,.2); color: #ff8a80; }
.asets { margin-top: 6px; border-top: 1px solid rgba(255,255,255,.08); padding-top: 8px; }
.asets summary { cursor: pointer; font-size: 13px; font-weight: 600; opacity: .85; list-style: none; }
.asets summary::before { content: '+ '; }
.asets[open] summary::before { content: '− '; }
.asets .ctls { margin-top: 8px; display: grid; gap: 10px; }
.seg.dyspeed { display: grid; grid-template-columns: repeat(6, 1fr); }
.dyspeed button { min-width: 0; padding-left: 2px; padding-right: 2px; }

/* Sonos */
.chip.art { background-size: cover; background-position: center; width: 44px; height: 44px; }
.tile.so .sotrans { justify-content: center; }
.tile.so .sotrans button { display: flex; align-items: center; justify-content: center; }
.sovol { display: flex; align-items: center; gap: 10px; }
.sovol button { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line, rgba(255,255,255,.12)); background: transparent; color: inherit; display: flex; align-items: center; justify-content: center; }
.sovol button.hot { background: var(--accent-soft); color: var(--accent); }
.sovol input[type=range] { flex: 1; }
.sovol .vnum { min-width: 2.2em; text-align: right; font-variant-numeric: tabular-nums; opacity: .8; }

/* v0.51 · Dispositivos por concepto */
.cgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ccard { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px 14px; min-height: 118px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); text-align: left; color: var(--text); }
.ccard b { font-size: 16px; line-height: 1.2; }
.ccard small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.ccard:active { transform: scale(.98); }
@media (min-width: 900px) { .cgrid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); } }

/* Escenas */
.scenetabs { margin-top: -10px; }
.scenetabs button { display: flex; align-items: center; justify-content: center; gap: 6px; }
.explain { margin-top: -14px; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.explain b { color: var(--text); }

/* Agrupar bocinas */
.arow.check { width: 100%; }
.arow.check .tick { margin-left: auto; color: var(--accent); width: 22px; display: flex; justify-content: center; }
.arow.check.on b { color: var(--text); }
.arow.check:disabled { opacity: .75; }

/* Mini-reproductor */
.miniplayer { position: fixed; left: 10px; right: 10px; bottom: calc(env(safe-area-inset-bottom) + 82px); z-index: 29; display: flex; align-items: center; gap: 6px;
  padding: 6px 6px 6px 8px; border-radius: 18px; border: 1px solid var(--line-2); background: rgba(10, 30, 52, .94); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
[data-brand="tb"] .miniplayer { background: rgba(30, 24, 56, .94); }
.miniplayer .mpopen { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; color: var(--text); text-align: left; padding: 0; }
.miniplayer .chip.art { width: 40px; height: 40px; border-radius: 10px; }
.miniplayer .mptext { min-width: 0; display: flex; flex-direction: column; }
.miniplayer .mptext b, .miniplayer .mptext small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.miniplayer .mptext b { font-size: 14px; } .miniplayer .mptext small { font-size: 12px; color: var(--muted); }
.miniplayer .mpbtn { width: 44px; height: 44px; border-radius: 14px; border: 0; background: var(--accent); color: #1A1405; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
body:has(.miniplayer) .main { padding-bottom: calc(env(safe-area-inset-bottom) + 176px); }
@media (min-width: 900px) { .miniplayer { left: auto; right: 24px; bottom: 24px; width: 380px; } }

/* Buscador dentro de automatizaciones */
.search.asearch { margin: 0 0 8px; min-height: 42px; }
.search.asearch input { font-size: 15px; }

/* ---------- v0.53 · Lite (platino) vs Premium (dorado), más marcado ---------- */
.liteseal { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #C3CBD6; background: rgba(195,203,214,.08); border: 1px solid rgba(195,203,214,.45); font-family: inherit; line-height: 1.5; }
button.liteseal { cursor: pointer; }
.premseal.shine { position: relative; overflow: hidden; }
.premseal.shine::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.65) 50%, transparent 70%); transform: translateX(-120%); }
@media (prefers-reduced-motion: no-preference) { .premseal.shine::after { animation: sheen 5s ease-in-out 1.2s infinite; } }
@keyframes sheen { 0%, 70% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
.greetprem { color: #D9BC6A; font-weight: 700; letter-spacing: .02em; }

/* Premium: hilos dorados en tarjetas, barra y encabezados */
:root[data-plan="premium"]:not([data-brand="tb"]) .tile,
:root[data-plan="premium"]:not([data-brand="tb"]) .zcard,
:root[data-plan="premium"]:not([data-brand="tb"]) .ccard:not(.locked),
:root[data-plan="premium"]:not([data-brand="tb"]) .mode { border-color: rgba(201,168,76,.22); }
:root[data-plan="premium"]:not([data-brand="tb"]) .ccard:not(.locked) { background: linear-gradient(160deg, rgba(201,168,76,.10), rgba(255,255,255,.02) 55%), var(--surface); }
:root[data-plan="premium"]:not([data-brand="tb"]) .tabs button[aria-current="page"] .ic { filter: drop-shadow(0 0 6px rgba(201,168,76,.55)); }
:root[data-plan="premium"]:not([data-brand="tb"]) .sbar { box-shadow: 0 1px 0 rgba(201,168,76,.28); }
:root[data-plan="premium"]:not([data-brand="tb"]) .side { border-right-color: rgba(201,168,76,.22); }
:root[data-plan="premium"]:not([data-brand="tb"]) .place h1,
:root[data-plan="premium"]:not([data-brand="tb"]) .place select { background: linear-gradient(100deg, #F6EBC8, #D9BC6A 45%, #B8964A); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-plan="premium"]:not([data-brand="tb"]) .place select option { color: #0B1726; }
/* Lite: platino, limpio y sobrio */
:root[data-plan="lite"]:not([data-brand="tb"]) .tile,
:root[data-plan="lite"]:not([data-brand="tb"]) .zcard,
:root[data-plan="lite"]:not([data-brand="tb"]) .ccard { border-color: rgba(195,203,214,.14); }

/* Comparación de planes */
.pcompare { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--surface); }
.pchead, .pcrow { display: grid; grid-template-columns: 1fr 64px 84px; align-items: center; gap: 6px; padding: 10px 14px; }
.pchead { border-bottom: 1px solid var(--line); background: rgba(255,255,255,.03); }
.pchead b { text-align: center; font-size: 13px; color: #C3CBD6; display: flex; flex-direction: column; align-items: center; }
.pchead b.gold { color: #D9BC6A; }
.pchead b small { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.pchead b.mine small { color: var(--text); }
.pcrow { border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.pcrow:last-child { border-bottom: 0; }
.pcrow.prem span:first-child { color: var(--text); }
.pc { display: flex; justify-content: center; }
.pc.yes { color: #8FD3AF; } .pcrow.prem .pc.yes:last-child { color: #D9BC6A; }
.pc.no { color: var(--faint, #6F7E8F); }
.pc.txt { font-size: 11px; font-weight: 700; color: #D9BC6A; text-align: center; }
.primary.gold { background: linear-gradient(135deg, #E9D08A, #C9A84C 55%, #A8873A); color: #1A1405; }

/* Lite: lo que se desbloquea con Premium */
.ccard.locked { border-style: dashed; border-color: rgba(201,168,76,.35); background: linear-gradient(160deg, rgba(201,168,76,.07), transparent 60%); opacity: .9; }
.ccard.locked .chip { background: rgba(201,168,76,.12); }
.ccard.locked .chip .ic { color: #C9A84C; }

/* Tutoriales */
.tuthead { margin: 6px 0 -4px; font: 600 18px/1.2 var(--display); }
.tutgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 900px) { .tutgrid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); } }
.tut { display: flex; flex-direction: column; gap: 8px; padding: 0; border: 0; background: none; text-align: left; color: var(--text); }
.tut b { font-size: 14px; line-height: 1.3; }
.tutthumb { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: radial-gradient(120% 120% at 100% 0%, var(--accent-soft), #071a30 70%); }
.tutthumb video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.tutplay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.tutplay .ic { width: 44px !important; height: 44px !important; padding: 11px; border-radius: 50%; background: rgba(4,16,31,.65); color: #fff; backdrop-filter: blur(6px); }
.tutplayer { position: fixed; inset: 0; z-index: 95; background: #000; display: flex; flex-direction: column; }
.tuptop { display: flex; align-items: center; gap: 12px; padding: calc(env(safe-area-inset-top) + 10px) 14px 10px; color: #fff; }
.tuptop b { flex: 1; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tuptop button { width: 40px; height: 40px; border-radius: 20px; border: 0; background: rgba(255,255,255,.12); color: #fff; display: flex; align-items: center; justify-content: center; }
.tutplayer video { flex: 1; width: 100%; min-height: 0; background: #000; }

/* Prospectos web (admin) */
.lead { background: var(--card, rgba(255,255,255,.04)); border: 1px solid var(--line, rgba(255,255,255,.08)); border-radius: 16px; padding: 14px; margin: 10px 0; display: grid; gap: 8px; }
.lead.st-nuevo { border-color: rgba(201,168,76,.55); box-shadow: 0 0 0 1px rgba(201,168,76,.15) inset; }
.lead.st-ganado { opacity: .85; } .lead.st-perdido { opacity: .55; }
.leadhead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.leadhead small, .leadsrc { opacity: .6; font-size: 12px; }
.leadtags { display: flex; flex-wrap: wrap; gap: 6px; }
.leadtags span { font-size: 12px; padding: 3px 9px; border-radius: 99px; background: rgba(201,168,76,.14); color: #e6cf8a; }
.leadtags span.z { background: rgba(255,255,255,.07); color: inherit; }
.leadmsg { margin: 0; font-size: 14px; line-height: 1.45; white-space: pre-wrap; }
.leadacts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.leadacts .btn { text-decoration: none; padding: 7px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; background: #C9A84C; color: #0D1B2A; }
.leadacts .btn.ghost { background: rgba(255,255,255,.08); color: inherit; }
.leadacts select.field.sm { width: auto; margin: 0 0 0 auto; padding: 6px 10px; }

/* Control remoto de pantallas */
.tvopen { display: flex; align-items: center; gap: 10px; width: 100%; margin: 10px 0 8px; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(201,168,76,.35); background: linear-gradient(135deg, rgba(201,168,76,.14), rgba(201,168,76,.04)); color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.tvopen span { flex: 1; text-align: left; }
.tvr { display: grid; gap: 14px; padding-bottom: 6px; }
.tvrtop { display: flex; align-items: center; gap: 14px; }
.tvpow { width: 54px; height: 54px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255,255,255,.07); color: #ff4d55; cursor: pointer; }
.tvpow.on { background: rgba(255,77,85,.16); box-shadow: 0 0 0 1px rgba(255,77,85,.35); }
.tvrst { opacity: .75; font-size: 14px; }
.tvapps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tvapp { aspect-ratio: 1.25; border-radius: 16px; border: 0; cursor: pointer; background: var(--c); color: #fff; font: 700 12.5px/1.15 var(--body); padding: 6px; display: grid; place-items: center; text-align: center; box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 6px 16px -8px var(--c); transition: transform .12s; }
.tvapp:active, .tvk:active { transform: scale(.94); }
.tvpad { position: relative; height: 270px; border-radius: 26px; background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.07), rgba(255,255,255,.02) 70%); border: 1px solid rgba(255,255,255,.08); touch-action: none; user-select: none; -webkit-user-select: none; overflow: hidden; cursor: pointer; }
.tvpad .pa { position: absolute; opacity: .35; display: grid; place-items: center; }
.tvpad .up { top: 14px; left: 50%; transform: translateX(-50%); } .tvpad .down { bottom: 14px; left: 50%; transform: translateX(-50%) rotate(180deg); }
.tvpad .left { left: 14px; top: 50%; transform: translateY(-50%) rotate(-90deg); } .tvpad .right { right: 14px; top: 50%; transform: translateY(-50%) rotate(90deg); }
.padok { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; letter-spacing: .08em; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); }
.padhint { position: absolute; left: 0; right: 0; bottom: 42px; text-align: center; font-size: 12px; opacity: .45; pointer-events: none; }
.pad123 { position: absolute; top: 12px; right: 12px; border: 0; border-radius: 12px; padding: 8px 12px; background: rgba(255,255,255,.08); color: inherit; font: 700 14px var(--body); cursor: pointer; }
.pad123.on { background: rgba(201,168,76,.25); }
.tvpad .ripple { position: absolute; width: 90px; height: 90px; margin: -45px 0 0 -45px; border-radius: 50%; background: radial-gradient(circle, rgba(201,168,76,.45), transparent 70%); opacity: 0; pointer-events: none; }
.tvpad .ripple.go { animation: tvrip .45s ease-out; }
@keyframes tvrip { from { opacity: 1; transform: scale(.4); } to { opacity: 0; transform: scale(2.2); } }
.tvrow3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tvk { height: 54px; border-radius: 16px; border: 0; background: rgba(255,255,255,.07); color: inherit; display: grid; place-items: center; cursor: pointer; font: 700 22px var(--body); transition: transform .12s, background .2s; }
.tvk.hot { background: rgba(201,168,76,.22); }
.tvrow2 { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; }
.tvrocker { display: grid; grid-template-rows: 54px auto 54px; gap: 4px; justify-items: stretch; text-align: center; font-size: 11px; font-weight: 700; letter-spacing: .14em; opacity: .9; padding: 6px; border-radius: 22px; background: rgba(255,255,255,.04); }
.tvmid { display: grid; gap: 10px; }
.tvmid .tvk { width: 64px; }
.flip { display: inline-grid; transform: rotate(180deg); }
.tvnum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tvnum > button { height: 52px; border-radius: 14px; border: 0; background: rgba(255,255,255,.07); color: inherit; font: 600 20px var(--body); cursor: pointer; }
.tvnumgo { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; } .tvnumgo span { flex: 1; font-size: 22px; font-weight: 700; letter-spacing: .1em; padding-left: 6px; }
.tvnumgo .primary { width: auto; margin: 0; }
/* v0.74 · Cerraduras EZVIZ */
.warnnote { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.ezlock .evmini { display: flex; flex-direction: column; gap: 2px; margin: 4px 0; }
.ezlock .evmini .tsub { margin: 0; font-size: 12.5px; }
.ezlock .primary { margin-top: 6px; }
.zcams { margin-top: 4px; }

/* ---------- Centro de avisos ---------- */
.sbar-r { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.avbell { position: relative; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(4, 20, 38, .55); color: var(--text); display: flex; align-items: center; justify-content: center; }
.avn { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font: 700 11px/18px var(--body); font-style: normal; text-align: center; }
.side button .avn { position: static; margin-left: auto; color: var(--accent-ink); }
.avhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.avhead h2 { margin: 0; }
.ghost { border: 1px solid var(--line-2); background: none; color: var(--text); border-radius: 12px; min-height: 40px; padding: 0 14px; font-weight: 600; }
.ghost.sm { min-height: 36px; width: 40px; padding: 0; display: flex; align-items: center; justify-content: center; }
.avreport { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; border: 1px solid rgba(201,168,76,.35); background: linear-gradient(135deg, rgba(201,168,76,.12), rgba(11,35,64,.6)); flex-wrap: wrap; }
.avreport .avt { flex: 1; min-width: 180px; }
.primary.sm { min-height: 42px; width: auto; padding: 0 16px; font-size: 14px; }
.avt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.avt b { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; } .avt small { color: var(--muted); font-size: 12px; }
.avcats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; margin: -8px 0 -10px; scrollbar-width: none; }
.avcats::-webkit-scrollbar { display: none; }
.avcats button { flex-shrink: 0; min-height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--line-2); background: none; color: var(--muted); font-weight: 600; font-size: 13px; }
.avcats button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.avday { display: flex; flex-direction: column; gap: 6px; }
.avday h3 { margin: 0 0 2px; font-size: 13px; color: var(--muted); font-weight: 600; text-transform: capitalize; }
.avrow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-align: left; width: 100%; font: inherit; }
.avrow time { color: var(--faint); font-size: 12px; flex-shrink: 0; }
.av-acceso { color: #8FD3B0; background: rgba(95,184,140,.14); }
.av-timbre { color: var(--accent); }
.av-seguridad { color: var(--danger); background: rgba(229,138,128,.14); }
.av-sistema, .av-config { color: var(--muted); background: rgba(159,176,195,.12); }
.avnote { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.avnote b { color: var(--text); font-weight: 700; }

/* ---------- Modo Centinela ---------- */
.sent { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; border: 1px solid var(--line-2); background: var(--surface); }
.sent .st { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sent .st b { font-size: 15px; } .sent .st small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.sent.on { border-color: rgba(201,168,76,.55); background: linear-gradient(135deg, rgba(201,168,76,.14), rgba(11,35,64,.7)); }
.sent.on .chip { background: var(--accent); color: var(--accent-ink); animation: sentp 2s ease-out infinite; }
.sent .pulse { position: absolute; top: 12px; left: 12px; width: 38px; height: 38px; border-radius: 12px; animation: sentp 2s ease-out infinite; pointer-events: none; }
.sent.on .pulse { box-shadow: 0 0 0 0 rgba(201,168,76,.55); }
.sent.pend, .sent.alarm { border-color: var(--danger); background: linear-gradient(135deg, rgba(229,138,128,.25), rgba(60,12,12,.6)); }
.sent.pend .chip, .sent.alarm .chip { background: var(--danger); color: #2a0606; }
.sent.alarm { animation: sentflash 1s steps(2) infinite; }
.sent.pend .st small b, .sent.alarm .st b { color: #ffd2cc; }
.sent.pend .primary, .sent.alarm .primary { background: #fff; color: #7a1c14; }
@keyframes sentp { 0% { box-shadow: 0 0 0 0 rgba(201,168,76,.55); } 100% { box-shadow: 0 0 0 18px rgba(201,168,76,0); } }
@keyframes sentflash { 50% { background: linear-gradient(135deg, rgba(229,138,128,.45), rgba(90,16,16,.7)); } }
.banner.sentoff { border-style: solid; border-color: rgba(201,168,76,.35); }
.sentrow { display: flex; align-items: center; gap: 10px; }
.sentrow .check { flex: 1; }
.rolebtn { flex-shrink: 0; min-height: 34px; padding: 0 12px; border-radius: 17px; border: 1px solid var(--line-2); background: none; font: 700 12px var(--body); color: var(--muted); }
.rolebtn.alarm { color: var(--danger); border-color: rgba(229,138,128,.5); }
.rolebtn.attention { color: var(--accent); border-color: rgba(201,168,76,.5); }
.sentscroll { max-height: 260px; overflow-y: auto; }
.ghost.sm.txt { width: auto; padding: 0 14px; }

/* ---------- Guía: instalar en la pantalla de inicio ---------- */
.a2lead { color: var(--muted); font-size: 15px; line-height: 1.5; margin: 0 0 14px; }
.a2wrap { display: flex; gap: 18px; align-items: center; margin-bottom: 16px; }
.a2p { flex: none; width: 128px; height: 252px; border-radius: 26px; padding: 7px; background: linear-gradient(160deg, #2a3a50, #0c1828); box-shadow: 0 18px 40px -16px rgba(0,0,0,.7), inset 0 0 0 1px rgba(255,255,255,.12); }
.a2scr { position: relative; width: 100%; height: 100%; border-radius: 20px; overflow: hidden; background: #071a30; }
.a2web { position: absolute; inset: 0; padding: 30px 12px; display: flex; flex-direction: column; gap: 8px; }
.a2web img { width: 62px; opacity: .9; margin-bottom: 6px; }
.a2web i { display: block; height: 9px; border-radius: 5px; background: rgba(255,255,255,.1); }
.a2web i.s { width: 60%; }
.a2bar { position: absolute; left: 0; right: 0; bottom: 0; height: 34px; display: flex; justify-content: space-around; align-items: center; background: rgba(20,32,48,.95); color: #9fb0c3; font-size: 13px; border-top: 1px solid rgba(255,255,255,.08); }
.a2share { color: var(--accent); }
.a2url { position: absolute; top: 0; left: 0; right: 0; height: 26px; display: flex; justify-content: space-between; align-items: center; padding: 0 8px; background: rgba(20,32,48,.95); color: #9fb0c3; font-size: 10px; z-index: 1; }
.a2dots { color: var(--accent); font-size: 14px; font-weight: 700; }
.a2p.and .a2web { padding-top: 38px; }
.a2menu { position: absolute; left: 6px; right: 6px; bottom: 6px; padding: 6px; border-radius: 14px; background: #1b2a3d; box-shadow: 0 -8px 30px rgba(0,0,0,.5); transform: translateY(120%); animation: a2menu 9s infinite; z-index: 2; }
.a2p.and .a2menu { left: auto; right: 6px; top: 22px; bottom: auto; width: 96px; transform-origin: top right; transform: scale(0); animation-name: a2drop; }
.a2menu p { margin: 0; padding: 6px 8px; font-size: 9.5px; color: #c9d3de; border-radius: 8px; display: flex; justify-content: space-between; }
.a2menu p.hot { animation: a2hot 9s infinite; }
.a2home { position: absolute; inset: 0; padding: 26px 14px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-content: start; background: radial-gradient(120% 80% at 20% 0%, #1d4a7d, #071a30); opacity: 0; animation: a2home 9s infinite; z-index: 3; }
.a2home i, .a2home img { width: 100%; aspect-ratio: 1; border-radius: 22%; }
.a2home i { background: rgba(255,255,255,.12); }
.a2home img { box-shadow: 0 0 0 2px var(--accent), 0 6px 18px rgba(201,168,76,.45); animation: a2pop 9s infinite; }
.a2tap { position: absolute; width: 22px; height: 22px; margin: -11px; border-radius: 50%; background: rgba(255,255,255,.5); box-shadow: 0 0 0 0 rgba(255,255,255,.5); z-index: 4; animation: a2tapIOS 9s infinite; }
.a2p.and .a2tap { animation-name: a2tapAnd; }
@keyframes a2menu { 0%, 30% { transform: translateY(120%); } 36%, 64% { transform: translateY(0); } 70%, 100% { transform: translateY(120%); } }
@keyframes a2drop { 0%, 30% { transform: scale(0); } 36%, 64% { transform: scale(1); } 70%, 100% { transform: scale(0); } }
@keyframes a2hot { 0%, 46% { background: transparent; color: #c9d3de; } 50%, 66% { background: var(--accent); color: var(--accent-ink); } 70%, 100% { background: transparent; } }
@keyframes a2home { 0%, 66% { opacity: 0; } 72%, 96% { opacity: 1; } 100% { opacity: 0; } }
@keyframes a2pop { 0%, 72% { transform: scale(0); } 80% { transform: scale(1.15); } 86%, 100% { transform: scale(1); } }
@keyframes a2tapIOS {
  0% { left: 70%; top: 70%; opacity: 0; } 12% { left: 62%; top: 94%; opacity: 1; box-shadow: 0 0 0 0 rgba(255,255,255,.5); } 20% { box-shadow: 0 0 0 12px rgba(255,255,255,0); } 30% { left: 62%; top: 94%; opacity: 1; }
  40% { left: 50%; top: 72%; opacity: 1; box-shadow: 0 0 0 0 rgba(255,255,255,.5); } 50% { left: 50%; top: 73%; box-shadow: 0 0 0 12px rgba(255,255,255,0); } 62% { left: 50%; top: 73%; opacity: 1; } 68%, 100% { opacity: 0; }
}
@keyframes a2tapAnd {
  0% { left: 60%; top: 40%; opacity: 0; } 12% { left: 90%; top: 6%; opacity: 1; box-shadow: 0 0 0 0 rgba(255,255,255,.5); } 20% { box-shadow: 0 0 0 12px rgba(255,255,255,0); } 30% { left: 90%; top: 6%; opacity: 1; }
  40% { left: 72%; top: 20%; opacity: 1; box-shadow: 0 0 0 0 rgba(255,255,255,.5); } 50% { left: 72%; top: 21%; box-shadow: 0 0 0 12px rgba(255,255,255,0); } 62% { left: 72%; top: 21%; opacity: 1; } 68%, 100% { opacity: 0; }
}
.a2steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.a2steps li { display: flex; gap: 10px; align-items: flex-start; opacity: .45; animation: a2step 9s infinite; animation-delay: calc(var(--i) * 3s); }
.a2steps li > span { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--accent-soft); color: var(--accent); }
.a2steps li p { margin: 0; font-size: 14px; line-height: 1.45; }
.a2k { display: inline-block; padding: 0 5px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
@keyframes a2step { 0%, 33% { opacity: 1; } 36%, 100% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .a2menu, .a2home, .a2home img, .a2tap, .a2steps li, .a2menu p.hot { animation: none; } .a2steps li { opacity: 1; } .a2home { opacity: 1; } }

/* ---------- Contraseña olvidada ---------- */
.login .forgot { display: block; margin: 14px auto 0; }
.forgotbox { margin-top: 16px; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 8px; text-align: left; }
.forgotbox p { margin: 0; font-size: 14.5px; line-height: 1.5; }
.forgotbox form { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.forgotbox .link { align-self: center; }

/* ---------- Horarios de la app anterior ---------- */
.leglist { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; max-height: 46dvh; overflow-y: auto; }
.legrow { display: flex; gap: 12px; align-items: center; text-align: left; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font: inherit; cursor: pointer; }
.legrow.on { border-color: var(--accent); background: var(--accent-soft); }
.legrow b { display: block; font-size: 15px; } .legrow small { color: var(--muted); font-size: 13px; }
.legck { flex: none; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; border: 1.5px solid var(--line-2); font-weight: 800; color: var(--accent-ink); }
.legrow.on .legck { background: var(--accent); border-color: var(--accent); }
