/* ===== Tokens ===== */
:root {
  --bg: #f6f7fb; --surface: #ffffff; --surface-2: #f0f2f9; --text: #0f1222; --muted: #5d647d;
  --border: #e2e5f0; --brand: #6d4aff; --brand-2: #18b5d5; --brand-soft: rgba(109, 74, 255, .10);
  --ok: #12a150; --ok-soft: rgba(18, 161, 80, .12); --warn: #d97706; --danger: #dc2626; --danger-soft: rgba(220, 38, 38, .10);
  --shadow: 0 10px 30px rgba(24, 28, 70, .08); --shadow-lg: 0 30px 80px rgba(24, 28, 70, .16);
  --radius: 16px; --radius-sm: 10px; --ring: 0 0 0 3px rgba(109, 74, 255, .28);
  --grad: linear-gradient(135deg, #7c5cff 0%, #18b5d5 100%);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}
:root[data-theme="dark"] {
  --bg: #0a0c16; --surface: #121528; --surface-2: #191d36; --text: #eef0ff; --muted: #9ba2c4;
  --border: #252a4a; --brand: #8b73ff; --brand-soft: rgba(139, 115, 255, .16);
  --ok: #34d17a; --ok-soft: rgba(52, 209, 122, .14); --danger: #ff6b6b; --danger-soft: rgba(255, 107, 107, .12);
  --shadow: 0 10px 40px rgba(0, 0, 0, .45); --shadow-lg: 0 30px 90px rgba(0, 0, 0, .6);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0c16; --surface: #121528; --surface-2: #191d36; --text: #eef0ff; --muted: #9ba2c4;
    --border: #252a4a; --brand: #8b73ff; --brand-soft: rgba(139, 115, 255, .16);
    --ok: #34d17a; --ok-soft: rgba(52, 209, 122, .14); --danger: #ff6b6b; --danger-soft: rgba(255, 107, 107, .12);
    --shadow: 0 10px 40px rgba(0, 0, 0, .45); --shadow-lg: 0 30px 90px rgba(0, 0, 0, .6);
  }
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.55; font-size: 16px; -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
img, svg { max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }
.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.hidden { display: none !important; }
.block { display: block; }
.inline { display: inline; }
.muted { color: var(--muted); }
.center-t { text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.ico { width: 18px; height: 18px; flex: none; }
.h1s { font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.15; letter-spacing: -.02em; font-weight: 800; }
.h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.2; letter-spacing: -.015em; font-weight: 750; }
.h3 { font-size: 1.1rem; font-weight: 700; letter-spacing: -.01em; }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: 6px; }
.row { display: flex; align-items: center; } .gap { gap: 10px; } .end { justify-content: flex-end; } .center { justify-content: center; } .wrap-row { flex-wrap: wrap; }
.grid { display: grid; gap: 18px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ===== Cabecera ===== */
.topbar { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--border); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.logo-mark { width: 32px; height: 32px; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav-link { color: var(--muted); font-weight: 600; font-size: .92rem; padding: 8px 12px; border-radius: 10px; }
.nav-link:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }
.i-sun { display: none; } :root[data-theme="dark"] .i-sun { display: block; } :root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .i-sun { display: block; } :root:not([data-theme="light"]) .i-moon { display: none; } }

/* ===== Botones ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 12px; border: 1px solid transparent; font-weight: 650; font-size: .95rem; cursor: pointer; transition: transform .12s, box-shadow .15s, background .15s, border-color .15s; text-decoration: none !important; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 7px 14px; font-size: .88rem; border-radius: 10px; } .btn-lg { padding: 14px 24px; font-size: 1rem; border-radius: 14px; } .block.btn, .btn.block { width: 100%; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 22px rgba(109, 74, 255, .32); }
.btn-primary:hover { box-shadow: 0 12px 28px rgba(109, 74, 255, .42); filter: brightness(1.05); }
.btn-soft { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-soft:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--muted); } .btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-accent { background: var(--ok); color: #fff; box-shadow: 0 8px 22px rgba(18, 161, 80, .28); } :root[data-theme="dark"] .btn-accent { color: #04210f; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-soft { background: var(--danger-soft); color: var(--danger); } .btn-danger-soft:hover { background: color-mix(in srgb, var(--danger) 22%, transparent); }
.btn-light { background: #fff; color: #3b2bb5; } .btn-light:hover { box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* ===== Formularios ===== */
.form { display: flex; flex-direction: column; gap: 16px; margin-top: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; }
.field > span { font-weight: 650; }
.field em { font-weight: 400; font-style: normal; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=search], input[type=datetime-local], textarea, select {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; min-height: 90px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.hint { color: var(--muted); font-size: .8rem; }
.hint.bad { color: var(--danger); font-weight: 600; }
.pw { position: relative; } .pw input { padding-right: 46px; } .pw .icon-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; }
.meter { height: 5px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.meter::after { content: ""; display: block; height: 100%; width: 0; border-radius: 99px; background: var(--danger); transition: width .25s, background .25s; }
.meter[data-s="1"]::after { width: 25%; } .meter[data-s="2"]::after { width: 50%; background: var(--warn); } .meter[data-s="3"]::after { width: 75%; background: #84cc16; } .meter[data-s="4"]::after { width: 100%; background: var(--ok); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.more { border: 1px dashed var(--border); border-radius: 12px; padding: 10px 14px; }
.more summary { cursor: pointer; font-weight: 650; font-size: .9rem; color: var(--muted); }
.more[open] summary { margin-bottom: 12px; color: var(--text); }
.link { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; }

/* ===== Flash ===== */
.flashes { padding-top: 16px; display: grid; gap: 8px; }
.flash { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: 12px; font-size: .92rem; font-weight: 550; border: 1px solid transparent; transition: opacity .35s; }
.flash.fade { opacity: 0; }
.flash-success { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.flash-error { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, transparent); margin-top: 14px; }
.flash-info { background: var(--brand-soft); color: var(--brand); border-color: color-mix(in srgb, var(--brand) 30%, transparent); }
.flash-x { background: none; border: 0; color: inherit; cursor: pointer; display: inline-flex; padding: 2px; opacity: .7; } .flash-x:hover { opacity: 1; }

/* ===== Tarjetas / páginas ===== */
.page { padding: 30px 20px 60px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: .9rem; margin-bottom: 14px; }
.back:hover { color: var(--text); text-decoration: none; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad-lg { padding: 30px; }
.cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.event-card { display: block; padding: 22px; color: var(--text); transition: transform .18s, box-shadow .18s, border-color .18s; }
.event-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); text-decoration: none; }
.event-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.event-foot { display: flex; justify-content: space-between; font-size: .88rem; margin-top: 10px; }
.meta { list-style: none; margin: 6px 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: .88rem; }
.meta li { display: inline-flex; align-items: center; gap: 6px; }
.pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 99px; background: var(--surface-2); color: var(--muted); font-size: .76rem; font-weight: 650; white-space: nowrap; border: 1px solid var(--border); }
.pill-ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.progress { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--grad); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.progress-lg { height: 12px; }
.empty-card { text-align: center; max-width: 520px; margin: 40px auto; padding: 40px 28px; background: var(--surface); border: 1px dashed var(--border); border-radius: 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty-ico { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); } .empty-ico .ico { width: 28px; height: 28px; }
.center-page { min-height: 60vh; display: grid; place-items: center; }

/* ===== Auth ===== */
.auth-wrap { min-height: calc(100vh - 150px); display: grid; place-items: center; padding-top: 30px; padding-bottom: 30px; }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 34px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 6px; }
.auth-card .form { margin-bottom: 8px; }
.auth-body { background: radial-gradient(900px 500px at 80% -10%, var(--brand-soft), transparent 60%), radial-gradient(700px 420px at 0% 110%, rgba(24, 181, 213, .10), transparent 60%), var(--bg); }

/* ===== Estadísticas ===== */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; }
.stat-n { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.stat-l { color: var(--muted); font-size: .82rem; font-weight: 600; }
.stat-ok .stat-n { color: var(--ok); }
.stat-wide { grid-column: 1 / -1; gap: 10px; }
.stat-top { display: flex; justify-content: space-between; align-items: center; }

/* ===== Barra de herramientas ===== */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; }
.search { flex: 1 1 260px; display: flex; align-items: center; gap: 10px; padding: 0 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; color: var(--muted); }
.search:focus-within { border-color: var(--brand); box-shadow: var(--ring); }
.search input { border: 0; background: transparent; padding: 11px 0; box-shadow: none !important; }
.search-lg { padding: 4px 18px; border-radius: 16px; } .search-lg input { font-size: 1.1rem; padding: 14px 0; }
.chips { display: inline-flex; background: var(--surface-2); border-radius: 12px; padding: 4px; gap: 2px; }
.chip { border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; font-weight: 650; font-size: .86rem; color: var(--muted); cursor: pointer; }
.chip.is-on { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }

/* ===== Tabla de invitados ===== */
.table-card { overflow: hidden; }
.tbl { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tbl th { text-align: left; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 13px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.tbl .num { text-align: center; width: 70px; }
.tbl .actions { white-space: nowrap; text-align: right; width: 96px; } .actions-h { width: 96px; }
.tbl .note { color: var(--warn); font-size: .78rem; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 750; color: #fff; background: var(--grad); }
.avatar-lg { width: 46px; height: 46px; font-size: .95rem; }
.empty-filter { padding: 28px; text-align: center; color: var(--muted); }
.check-btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-weight: 700; font-size: .85rem; cursor: pointer; transition: all .18s; min-width: 120px; justify-content: center; }
.check-btn:hover { border-color: var(--ok); color: var(--ok); }
.check-btn.is-on { background: var(--ok); border-color: var(--ok); color: #fff; box-shadow: 0 6px 18px rgba(18, 161, 80, .3); }
:root[data-theme="dark"] .check-btn.is-on { color: #04210f; }
.check-btn small { opacity: .85; font-weight: 700; }
.check-btn.is-busy { opacity: .6; }
.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 36px; padding: 20px 24px; border: 1px dashed color-mix(in srgb, var(--danger) 40%, var(--border)); border-radius: var(--radius); }

/* ===== Diálogos ===== */
.dlg { border: 1px solid var(--border); border-radius: 20px; padding: 24px; width: min(560px, calc(100vw - 28px)); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); max-height: calc(100vh - 28px); overflow: auto; }
.dlg::backdrop { background: rgba(8, 10, 24, .55); backdrop-filter: blur(3px); }
.dlg-sm { width: min(440px, calc(100vw - 28px)); }
.dlg .form { margin-top: 10px; gap: 14px; }
.dlg-head { display: flex; justify-content: space-between; align-items: center; }

/* ===== Importar ===== */
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 30px 20px; border: 2px dashed var(--border); border-radius: 18px; background: var(--surface-2); color: var(--muted); cursor: pointer; transition: all .2s; }
.dropzone .ico { width: 30px; height: 30px; color: var(--brand); }
.dropzone b { color: var(--text); }
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: var(--brand-soft); }
.dropzone.has-file { border-style: solid; border-color: var(--ok); background: var(--ok-soft); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; padding: 0; }
.or { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: .82rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.sheet { display: flex; gap: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; cursor: pointer; margin-bottom: 10px; background: var(--surface); transition: border-color .15s, background .15s; }
.sheet:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.sheet.is-off { opacity: .55; cursor: not-allowed; }
.sheet input { margin-top: 5px; accent-color: var(--brand); }
.sheet-body { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sheet-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 2px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); font-size: .76rem; font-weight: 650; }

/* ===== Modo puerta ===== */
section.door { max-width: 760px; }
.door-top { margin-bottom: 14px; }
.door-count { display: grid; gap: 14px; padding: 20px 24px; margin-bottom: 16px; }
.door-n { display: block; font-size: 2.6rem; font-weight: 850; line-height: 1; letter-spacing: -.03em; color: var(--ok); }
.door-n small { font-size: 1.3rem; color: var(--muted); font-weight: 700; }
.door-bar { display: flex; align-items: center; gap: 14px; } .door-bar .progress { flex: 1; }
.door-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.door-list > li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.door-list > li[data-state="checked"] { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 35%, var(--border)); }
.door-name { font-size: 1.05rem; }
.check-lg { padding: 14px 20px; font-size: 1rem; min-width: 150px; }

/* ===== Pie ===== */
.footer { border-top: 1px solid var(--border); padding: 22px 0; margin-top: 30px; color: var(--muted); font-size: .85rem; }
.footer-in { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ===== Landing ===== */
.landing { background: var(--bg); }
.hero { position: relative; overflow: hidden; padding: 70px 0 90px; }
.hero-glow { position: absolute; inset: -200px -100px auto -100px; height: 700px; background: radial-gradient(600px 360px at 78% 30%, rgba(124, 92, 255, .28), transparent 70%), radial-gradient(520px 320px at 15% 20%, rgba(24, 181, 213, .20), transparent 70%); pointer-events: none; }
.hero-in { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 50px; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: .82rem; margin-bottom: 20px; }
.hero-title { font-size: clamp(2.2rem, 5.2vw, 3.8rem); line-height: 1.06; letter-spacing: -.035em; font-weight: 850; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.15rem; color: var(--muted); margin: 20px 0 30px; max-width: 560px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.trust { list-style: none; margin: 30px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; color: var(--muted); font-size: .88rem; font-weight: 600; }
.trust li { display: inline-flex; align-items: center; gap: 8px; } .trust .ico { color: var(--ok); }

.hero-mock { position: relative; padding: 20px; }
.hm-card { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 22px; box-shadow: var(--shadow-lg); transform: perspective(1200px) rotateY(-6deg) rotateX(3deg); animation: floaty 7s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: perspective(1200px) rotateY(-6deg) rotateX(3deg) translateY(0); } 50% { transform: perspective(1200px) rotateY(-6deg) rotateX(3deg) translateY(-10px); } }
.hm-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; } .hm-head small { display: block; color: var(--muted); }
.hm-progress { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-bottom: 16px; }
.hm-progress i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 99px; animation: hmfill 10s ease-in-out infinite; }
@keyframes hmfill { 0% { width: 0; } 12% { width: 0; } 70% { width: 83%; } 92% { width: 83%; } 100% { width: 0; } }
.hm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hm-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.hm-name { flex: 1; font-weight: 600; font-size: .92rem; }
.hm-check { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--border); color: transparent; animation: hmtick 10s infinite; }
.hm-check .ico { width: 15px; height: 15px; stroke-width: 3; }
.hm-row[data-i="0"] .hm-check { animation-delay: 0s; } .hm-row[data-i="1"] .hm-check { animation-delay: 1.4s; } .hm-row[data-i="2"] .hm-check { animation-delay: 2.8s; }
.hm-row[data-i="3"] .hm-check { animation-delay: 4.2s; } .hm-row[data-i="4"] .hm-check { animation-delay: 5.6s; } .hm-row[data-i="5"] .hm-check { animation-delay: 7s; }
@keyframes hmtick { 0%, 4% { background: transparent; border-color: var(--border); color: transparent; transform: scale(1); } 8% { transform: scale(1.25); } 12%, 88% { background: var(--ok); border-color: var(--ok); color: #fff; transform: scale(1); } 96%, 100% { background: transparent; border-color: var(--border); color: transparent; } }
.hm-float { position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); font-size: .85rem; }
.hm-float .ico { color: var(--ok); }
.hm-float-a { left: -14px; bottom: -4px; animation: floaty2 6s ease-in-out infinite; } .hm-float-b { right: -4px; top: 6px; animation: floaty2 7s ease-in-out -2s infinite; }
@keyframes floaty2 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.section { padding: 80px 0; }
.section-alt { background: var(--surface-2); border-block: 1px solid var(--border); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; display: grid; gap: 10px; }

/* ===== Animación de uso ===== */
.demo { display: grid; grid-template-columns: 360px 1fr; gap: 34px; align-items: center; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.step { position: relative; width: 100%; display: flex; gap: 14px; align-items: center; text-align: left; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; overflow: hidden; transition: all .25s; }
.step:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); }
.step.is-on { border-color: var(--brand); box-shadow: 0 10px 30px rgba(109, 74, 255, .16); background: var(--surface); }
.step-n { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--surface-2); color: var(--muted); transition: all .25s; }
.step.is-on .step-n { background: var(--grad); color: #fff; }
.step-t b { display: block; } .step-t small { color: var(--muted); }
.step-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--grad); }
.step.is-on .step-bar { animation: stepfill 8s linear forwards; }
@keyframes stepfill { from { width: 0; } to { width: 100%; } }

.stage { position: relative; }
.win { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; }
.win-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.win-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; } .win-bar i:nth-child(2) { background: #febc2e; } .win-bar i:nth-child(3) { background: #28c840; }
.win-url { margin-left: 12px; flex: 1; text-align: center; font-size: .78rem; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 3px 10px; max-width: 280px; }
.win-body { position: relative; height: 410px; padding: 20px; }
.pane { position: absolute; inset: 20px; opacity: 0; transform: translateY(10px) scale(.985); pointer-events: none; transition: opacity .4s, transform .4s; display: flex; flex-direction: column; gap: 12px; }
.pane .progress { background: color-mix(in srgb, var(--muted) 22%, transparent); flex: none; }
.pane.is-on { opacity: 1; transform: none; }
.mini-h { font-weight: 800; font-size: 1.05rem; display: flex; justify-content: space-between; align-items: center; }
.mini-count { font-size: .82rem; font-weight: 650; color: var(--muted); } .mini-count b { color: var(--ok); }
.mini-field small { display: block; color: var(--muted); font-size: .76rem; font-weight: 650; margin-bottom: 4px; }
.mini-input { min-height: 42px; display: flex; align-items: center; padding: 0 14px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); font-size: .93rem; }
.mini-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.caret { display: inline-block; width: 2px; height: 1.1em; background: var(--brand); margin-left: 1px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.mini-btn { align-self: flex-start; padding: 11px 20px; border-radius: 11px; background: var(--grad); color: #fff; font-weight: 700; font-size: .92rem; transition: transform .15s, box-shadow .15s; }
.mini-btn.pressed { transform: scale(.95); box-shadow: 0 0 0 6px rgba(109, 74, 255, .22); }
.mini-toast { position: absolute; right: 0; bottom: 0; display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 12px; background: var(--ok); color: #fff; font-weight: 700; font-size: .88rem; opacity: 0; transform: translateY(14px); transition: all .35s; }
:root[data-theme="dark"] .mini-toast { color: #04210f; }
.mini-toast.show { opacity: 1; transform: none; }
.mini-drop { position: relative; height: 92px; border: 2px dashed var(--border); border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; transition: all .3s; }
.mini-drop.ready { border-color: var(--ok); background: var(--ok-soft); }
.drop-text { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; font-size: .9rem; }
.file-chip { position: absolute; top: 14px; left: 18px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); font-weight: 650; font-size: .85rem; transition: all .7s cubic-bezier(.3, .8, .3, 1); z-index: 2; }
.file-chip.drop { left: calc(50% - 60px); top: 30px; }
.file-chip.gone { opacity: 0; transform: scale(.7); }
.mini-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rowm { display: flex; align-items: center; gap: 11px; padding: 6px 12px; border-radius: 11px; background: var(--surface-2); font-size: .9rem; font-weight: 600; transition: background .3s; }
.rowm > span:nth-child(2) { flex: 1; } .rowm em { font-style: normal; font-size: .75rem; color: var(--muted); }
.rowm .avatar { width: 28px; height: 28px; font-size: .68rem; }
.pane[data-pane="2"] .rowm { opacity: 0; transform: translateX(-16px); transition: all .35s; } .pane[data-pane="2"] .rowm.in { opacity: 1; transform: none; }
.mini-badge { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: .85rem; opacity: 0; transition: opacity .3s; } .mini-badge.show { opacity: 1; }
.mini-switch { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-weight: 700; font-size: .78rem; pointer-events: none; transition: all .25s; }
.rowm.done { background: var(--ok-soft); } .rowm.done .mini-switch { background: var(--ok); border-color: var(--ok); color: #fff; } :root[data-theme="dark"] .rowm.done .mini-switch { color: #04210f; }
.cursor { position: absolute; left: 0; top: 0; width: 26px; height: 26px; z-index: 5; pointer-events: none; transition: transform .75s cubic-bezier(.4, .1, .2, 1); filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .35)); margin: -4px 0 0 -4px; }
.cursor.click svg { animation: press .22s; } @keyframes press { 50% { transform: scale(.8); } }

/* ===== Funciones / seguridad / CTA ===== */
.feats { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.feat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; display: grid; gap: 10px; transition: transform .2s, box-shadow .2s; }
.feat:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feat h3 { font-size: 1.08rem; }
.feat-ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); } .feat-ico .ico { width: 22px; height: 22px; }
.sec-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 50px; align-items: center; }
.sec-grid > div:first-child { display: grid; gap: 12px; }
.sec-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.sec-list li { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.sec-list li > span { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); }
.sec-list small { display: block; color: var(--muted); margin-top: 2px; }
.cta-final { text-align: center; padding: 60px 24px; border-radius: 28px; background: var(--grad); color: #fff; display: grid; gap: 14px; justify-items: center; box-shadow: 0 30px 80px rgba(109, 74, 255, .35); }
.cta-final p { opacity: .92; max-width: 460px; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero-in, .demo, .sec-grid { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 60px; } .hero-mock { max-width: 460px; margin: 0 auto; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .hide-sm { display: none !important; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .two, .mini-two { grid-template-columns: 1fr; }
  .tbl th, .tbl td { padding: 11px 10px; }
  .page { padding: 20px 14px 50px; } .pad-lg { padding: 22px; } .auth-card { padding: 26px; }
  .section { padding: 56px 0; } .win-body { height: 420px; padding: 14px; } .pane { inset: 14px; }
  .door-list > li { flex-wrap: wrap; } .check-lg { width: 100%; }
  .hm-float { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ===== Selector de fecha y hora ===== */
.dtp { position: relative; }
.dtp-field { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); cursor: pointer; text-align: left; transition: border-color .15s, box-shadow .15s; }
.dtp-field:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); }
.dtp-field > .ico:first-child { color: var(--brand); }
.dtp-field > .ico:last-child { margin-left: auto; color: var(--muted); transition: transform .2s; }
.dtp.is-open .dtp-field { border-color: var(--brand); box-shadow: var(--ring); }
.dtp.is-open .dtp-field > .ico:last-child { transform: rotate(180deg); }
.dtp-field [data-dtp-label] { flex: 1; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dtp-field .is-empty { color: color-mix(in srgb, var(--muted) 75%, transparent); font-weight: 400; }
.dtp-pop { position: absolute; z-index: 60; top: calc(100% + 8px); left: 0; width: 340px; max-width: calc(100vw - 28px); padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg); animation: dtpin .18s cubic-bezier(.2, .8, .2, 1); }
.dtp-pop[hidden] { display: none; }
@keyframes dtpin { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.dtp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dtp-title { font-weight: 750; text-transform: capitalize; letter-spacing: -.01em; }
.dtp-nav { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 10px; background: var(--surface-2); color: var(--text); cursor: pointer; transition: background .15s, transform .1s; }
.dtp-nav:hover { background: var(--brand-soft); color: var(--brand); } .dtp-nav:active { transform: scale(.94); }
.dtp-dow, .dtp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.dtp-dow { margin-bottom: 4px; } .dtp-dow span { font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 4px 0; }
.dtp-day { aspect-ratio: 1; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--text); font-size: .9rem; font-weight: 600; cursor: pointer; position: relative; transition: background .12s, color .12s, transform .1s; }
.dtp-day:hover { background: var(--brand-soft); color: var(--brand); }
.dtp-day.is-out { color: color-mix(in srgb, var(--muted) 55%, transparent); font-weight: 500; }
.dtp-day.is-today { box-shadow: inset 0 0 0 1.5px var(--brand); color: var(--brand); }
.dtp-day.is-sel { background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(109, 74, 255, .4); }
.dtp-day:focus-visible { box-shadow: var(--ring); }
.dtp-day.is-sel:focus-visible { box-shadow: 0 6px 16px rgba(109, 74, 255, .4), var(--ring); }
.dtp-time { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); color: var(--muted); }
.dtp-time .ico { color: var(--brand); } .dtp-time b { color: var(--text); }
.dtp-sel { width: auto; padding: 7px 10px; border-radius: 10px; font-weight: 700; background: var(--surface); }
.dtp-seg { margin-left: auto; display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); }
.dtp-seg button { border: 0; background: transparent; padding: 5px 11px; border-radius: 8px; font-weight: 750; font-size: .8rem; color: var(--muted); cursor: pointer; }
.dtp-seg button.is-on { background: var(--grad); color: #fff; }
.dtp-foot { display: flex; align-items: center; gap: 4px; margin-top: 12px; }
.dtp-sp { flex: 1; }
.dtp-link { border: 0; background: transparent; padding: 7px 10px; border-radius: 9px; font-weight: 650; font-size: .86rem; color: var(--muted); cursor: pointer; }
.dtp-link:hover { background: var(--surface-2); color: var(--brand); }
@media (max-width: 720px) {
  .dtp-pop { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-width: none; border-radius: 22px 22px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -20px 60px rgba(0, 0, 0, .45); animation: dtpsheet .25s cubic-bezier(.2, .8, .2, 1); }
  .dtp-day { font-size: 1rem; }
}
@keyframes dtpsheet { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ===== Avisos (toast) y alertas elegantes ===== */
.toasts { position: fixed; z-index: 200; top: 18px; right: 18px; display: grid; gap: 10px; width: min(380px, calc(100vw - 28px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 13px 14px 13px 16px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-left-width: 4px; border-radius: 14px; box-shadow: var(--shadow-lg); font-size: .92rem; font-weight: 550; animation: toastin .28s cubic-bezier(.2, .8, .2, 1); }
.toast.out { opacity: 0; transform: translateX(16px); transition: all .25s; }
.toast .ico { width: 20px; height: 20px; }
.toast-msg { flex: 1; }
.toast-error { border-left-color: var(--danger); } .toast-error > .ico:first-child { color: var(--danger); }
.toast-success { border-left-color: var(--ok); } .toast-success > .ico:first-child { color: var(--ok); }
.toast-info { border-left-color: var(--brand); } .toast-info > .ico:first-child { color: var(--brand); }
.toast-x { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 8px; display: inline-flex; } .toast-x:hover { background: var(--surface-2); color: var(--text); }
.toast-x .ico { width: 16px; height: 16px; }
@keyframes toastin { from { opacity: 0; transform: translateX(24px) scale(.97); } to { opacity: 1; transform: none; } }
.dlg-alert { text-align: center; padding: 28px 24px 22px; }
.dlg-alert[open] { animation: alertin .22s cubic-bezier(.2, .8, .2, 1); }
@keyframes alertin { from { opacity: 0; transform: scale(.94) translateY(8px); } to { opacity: 1; transform: none; } }
.dlg-alert .h3 { margin: 4px 0 6px; font-size: 1.2rem; }
.alert-ico { width: 60px; height: 60px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); box-shadow: 0 0 0 8px color-mix(in srgb, var(--brand) 7%, transparent); }
.alert-ico.is-danger { background: var(--danger-soft); color: var(--danger); box-shadow: 0 0 0 8px color-mix(in srgb, var(--danger) 7%, transparent); }
.alert-ico .ico { width: 28px; height: 28px; }
.alert-steps { text-align: left; margin: 16px 0 0; padding: 14px 16px 14px 34px; border-radius: 14px; background: var(--surface-2); color: var(--text); font-size: .92rem; display: grid; gap: 6px; }
.alert-actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; } .alert-actions .btn { flex: 1; }
@media (max-width: 720px) { .toasts { top: calc(68px + env(safe-area-inset-top)); bottom: auto; right: 12px; left: 12px; width: auto; } }

/* ===== Modo sin conexión ===== */
.net-bar { position: fixed; z-index: 150; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 24px); padding: 10px 16px; border-radius: 99px; background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow-lg); font-size: .86rem; font-weight: 650; animation: toastin .25s cubic-bezier(.2, .8, .2, 1); }
.net-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); }
.net-off .net-dot { background: var(--warn); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 25%, transparent); }
.net-warn .net-dot { background: var(--danger); }
.net-sync .net-dot { background: var(--brand); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.5); opacity: .5; } }
.net-btn { border: 0; background: var(--brand-soft); color: var(--brand); font-weight: 750; border-radius: 99px; padding: 5px 12px; cursor: pointer; }
.sync-badge { color: var(--brand); font-weight: 650; font-size: .74rem; }
.is-pending-row { background: var(--brand-soft); }
.door-list > li.is-pending-row { border-style: dashed; }

/* ===== Ajustes móvil / tablet ===== */
.show-sm { display: none; }
.icon-btn { flex: none; }
.brand { min-width: 0; }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { flex: none; }
.back { min-height: 40px; padding: 8px 0; }
.link { min-height: 40px; }
.dtp-seg button { min-height: 36px; padding: 7px 13px; }
.more summary { padding: 6px 0; }

@media (max-width: 720px) {
  /* Cabecera compacta */
  .topbar-in { height: 60px; gap: 8px; }
  .brand { font-size: .95rem; gap: 8px; flex: 1 1 auto; }
  .nav { gap: 4px; }
  .wrap { padding-left: 16px; padding-right: 16px; }

  /* Barra de herramientas apilada */
  .toolbar { gap: 10px; }
  .toolbar > .btn { width: 100%; }
  .chips { width: 100%; } .chips .chip { flex: 1; padding: 10px 8px; }
  .page-head .row.wrap-row { width: 100%; }
  .page-head .row.wrap-row .btn { flex: 1 1 calc(50% - 10px); }
  .danger-zone { flex-direction: column; align-items: stretch; }
  .danger-zone .row { flex-direction: column; align-items: stretch; }
  .net-bar { bottom: calc(12px + env(safe-area-inset-bottom)); }
  .stats { gap: 10px; } .stat { padding: 14px; } .stat-n { font-size: 1.6rem; }
  .dlg { padding: 20px; }
  .door-list > li { padding: 12px; }
}
@media (max-width: 420px) {
  .brand { font-size: .9rem; } .logo-mark { width: 28px; height: 28px; }
  .hero-title { font-size: 2rem; } .lead { font-size: 1.02rem; }
  .cta-row .btn { width: 100%; }
}
/* Tablet vertical */
@media (min-width: 721px) and (max-width: 1024px) {
  .wrap { padding-left: 24px; padding-right: 24px; }
  .tbl th, .tbl td { padding: 12px 12px; }
  .table-card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tbl { min-width: 0; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
}

/* Tabla de invitados -> tarjetas (móvil y tablet vertical) */
@media (max-width: 900px) {
  .table-card:has(.tbl[data-guest-table]) { overflow: visible; background: transparent; border: 0; box-shadow: none; }
  .tbl[data-guest-table], .tbl[data-guest-table] tbody { display: block; }
  .tbl[data-guest-table] thead { display: none; }
  .tbl[data-guest-table] tr[data-guest-row] { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "who who" "att act"; gap: 10px 8px; align-items: center; padding: 14px; margin-bottom: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
  .tbl[data-guest-table] tr[data-guest-row].hidden { display: none !important; }
  .tbl[data-guest-table] tr[data-guest-row]:hover { background: var(--surface); }
  .tbl[data-guest-table] td { display: block; padding: 0; border: 0; min-width: 0; }
  .tbl[data-guest-table] td:first-child { grid-area: who; }
  .tbl[data-guest-table] td:nth-last-child(2) { grid-area: att; text-align: left; }
  .tbl[data-guest-table] td:last-child { grid-area: act; width: auto; }
  .tbl[data-guest-table] td.num { display: none; }
  .tbl[data-guest-table] td[colspan] { grid-column: 1 / -1; grid-area: who; }
  .show-sm { display: block; }
  .check-btn { min-width: 0; padding: 10px 18px; }
  .tbl[data-guest-table] .actions .icon-btn { width: 42px; height: 42px; }
  .who { align-items: flex-start; }
  .who b { overflow-wrap: anywhere; }

  .tbl[data-guest-table] td.hide-sm { display: none; }
  .tbl[data-guest-table] tr[data-guest-row] { margin-bottom: 0; }
  .tbl[data-guest-table] tbody { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .tbl[data-guest-table] tr:not([data-guest-row]) { display: none; }
}
@media (min-width: 721px) and (max-width: 900px) {
  .tbl[data-guest-table] tbody { grid-template-columns: 1fr 1fr; }
  .tbl[data-guest-table] .actions .icon-btn { width: 40px; height: 40px; }
}
.net-text { white-space: nowrap; }
@media (max-width: 720px) {
  .net-bar { left: 12px; right: 12px; transform: none; justify-content: center; max-width: none; }
}

.have-acct { margin-top: 14px; font-size: .92rem; }
.have-acct a { font-weight: 700; }
@media (max-width: 480px) { .hide-xs { display: none !important; } }
@media (min-width: 481px) { .have-acct { display: none; } }
/* Diálogos: campos cortos (números) siguen en dos columnas en el celular */
@media (max-width: 720px) { .dlg .two:has(input[type=number]) { grid-template-columns: 1fr 1fr; } }

/* ===== Panel de administración ===== */
.admin-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px; margin-bottom: 22px; background: var(--surface-2); border-radius: 14px; width: fit-content; max-width: 100%; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tab { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 10px; color: var(--muted); font-weight: 650; font-size: .9rem; white-space: nowrap; min-height: 40px; }
.admin-tab:hover { color: var(--text); text-decoration: none; }
.admin-tab.is-on { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }
.admin-tab .ico { width: 16px; height: 16px; }
.stats-6 { grid-template-columns: repeat(6, 1fr); }
.stats-6 .stat small { margin-top: 2px; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; align-items: start; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.card-title { padding: 18px 20px 4px; }
.pill-brand { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.pill-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 170px; margin-top: 18px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.bar b { font-size: .72rem; color: var(--muted); height: 14px; }
.bar i { display: block; width: 100%; max-width: 26px; height: 3%; border-radius: 8px 8px 3px 3px; background: var(--grad); transition: height .6s cubic-bezier(.2, .8, .2, 1); }
.bar span { font-size: .7rem; color: var(--muted); }
.plan-bars { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 14px; }
.plan-bars .progress { margin-top: 6px; }
.plain-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; }
.plain-list li { border-bottom: 1px solid var(--border); } .plain-list li:last-child { border-bottom: 0; }
.plain-list a { display: flex; align-items: center; gap: 12px; padding: 11px 0; color: var(--text); min-height: 52px; } .plain-list a:hover { text-decoration: none; background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.log-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; flex-wrap: wrap; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; align-items: center; }
.filters .search { flex: 1 1 260px; } .filters select { width: auto; min-width: 150px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; flex-wrap: wrap; }
.user-head { display: flex; align-items: center; gap: 22px; margin-bottom: 18px; flex-wrap: wrap; }
.avatar-xl { width: 72px; height: 72px; font-size: 1.4rem; }
.kv { display: grid; gap: 10px; margin: 0; } .kv dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; } .kv dd { margin: 0; font-weight: 600; }
.stack { display: grid; gap: 10px; }
.inline-form { margin: 12px 0 18px; }
.usage { display: grid; gap: 8px; } .usage .row-between { font-size: .9rem; }
.progress.mini { height: 6px; min-width: 90px; margin-bottom: 4px; }
.plan-cards { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 18px; }
.plan-card .form { margin-top: 8px; }

/* Tabla que se vuelve lista de tarjetas en pantallas chicas (etiqueta: valor) */
@media (max-width: 900px) {
  .stats-6 { grid-template-columns: repeat(3, 1fr); }
  .admin-grid { grid-template-columns: 1fr; }
  .tbl-stack thead { display: none; }
  .tbl-stack, .tbl-stack tbody { display: block; }
  .tbl-stack tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
  .tbl-stack td { display: block; padding: 0; border: 0; min-width: 0; }
  .tbl-stack td::before { content: attr(data-label); display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin-bottom: 2px; }
  .tbl-stack td:first-child { grid-column: 1 / -1; }
  .tbl-stack td:first-child::before { display: none; }
  .tbl-stack td.num { text-align: left; width: auto; }
  .tbl-stack td[colspan] { grid-column: 1 / -1; } .tbl-stack td[colspan]::before { display: none; }
  .user-head { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) {
  .stats-6 { grid-template-columns: repeat(2, 1fr); }
  .filters select, .filters .btn { width: 100%; }
}
.stack { margin-top: 14px; }

/* ===== Indicador "En vivo" y destello de cambios remotos ===== */
.live { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; font-size: .72rem; font-weight: 750; letter-spacing: .02em; color: var(--ok); text-transform: none; vertical-align: middle; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 50%, transparent); animation: livepulse 1.8s ease-out infinite; }
.live[data-state="sync"] { color: var(--brand); } .live[data-state="sync"] i { background: var(--brand); }
.live[data-state="off"] { color: var(--muted); } .live[data-state="off"] i { background: var(--muted); animation: none; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.live-flash { animation: liveflash 1.6s ease-out; }
@keyframes liveflash { 0% { box-shadow: inset 0 0 0 2px var(--ok), 0 0 0 4px color-mix(in srgb, var(--ok) 25%, transparent); background: var(--ok-soft); } 100% { box-shadow: none; } }
/* La barra de estado nunca debe tapar los botones de la lista: los toques la atraviesan (solo "Sincronizar" responde) */
.net-bar { pointer-events: none; }
.net-bar .net-btn { pointer-events: auto; }

/* Los avisos no capturan toques (solo su botón de cerrar), para no tapar la lista */
.toast { pointer-events: none; }
.toast .toast-x { pointer-events: auto; }

/* ===== Buscador en celular: siempre a la vista y con la lista justo debajo ===== */
.result-count { font-size: .82rem; font-weight: 650; color: var(--muted); white-space: nowrap; }
.search .icon-btn { width: 34px; height: 34px; flex: none; }
@media (max-width: 720px) {
  .is-searching .toolbar, .toolbar:focus-within { position: sticky; top: 60px; z-index: 35; margin-left: -16px; margin-right: -16px; padding: 10px 16px; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
  .toolbar .search { flex: 1 1 100%; }
  .result-count { flex: 1 1 100%; margin: -2px 2px 0; }
  /* Mientras se escribe, se oculta lo que está encima para ver los resultados sin desplazarse */
  .is-searching .door-top, .is-searching .door-count, .is-searching .page-head, .is-searching .stats, .is-searching .back { display: none; }
  .is-searching .page { padding-top: 6px; }
  .is-searching .toolbar { top: 60px; }
  .is-searching .chips, .is-searching .toolbar > .btn { display: none; }
}

/* ===== Mi cuenta · dispositivos con huella ===== */
.passkey-list { display: grid; gap: 10px; margin: 18px 0; }
.passkey-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.passkey-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); flex: none; }
.passkey-empty { padding: 14px 4px; }
.card + .card { margin-top: 18px; }

/* ===== Modo puerta en tablet y computador ===== */
.door-side { display: contents; }
@media (min-width: 721px) and (max-width: 1023px) {
  section.door { max-width: 980px; }
  .door-list { grid-template-columns: 1fr 1fr; }
  .door-list > li { flex-wrap: wrap; } .door-list .check-lg { width: 100%; }
  .door-list > li.hidden { display: none; }
}
@media (min-width: 1024px) {
  section.door { max-width: 1140px; display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 0 28px; align-items: start; }
  .door-top { grid-column: 1 / -1; }
  .door-side { display: block; position: sticky; top: 84px; }
  .door-side .toolbar { flex-direction: column; align-items: stretch; margin-bottom: 0; }
  .door-side .chips .chip { flex: 1; }
  .door-side .search { flex: none; }
  section.door .door-list, section.door .empty-card, section.door .empty-filter { grid-column: 2; }
  .door-list { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
  .door-list > li:hover:not([data-state="checked"]) { border-color: var(--accent, var(--ok)); }
  .door-n { font-size: 3.2rem; }
}
.door-list > li.hidden { display: none; }
