/* Sys POS Licencias — mismo lenguaje visual que Sys POS: rojo premium con degradados, superficies cálidas. */
@font-face { font-family: 'Figtree'; src: url('fonts/figtree.woff2') format('woff2'); font-weight: 300 900; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('fonts/figtree-ext.woff2') format('woff2'); font-weight: 300 900; font-display: swap; unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: 'Bricolage'; src: url('fonts/bricolage.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }

:root {
  --bg: #F7F1F0; --surface: #FFFFFF; --surface-2: #FBF6F5; --surface-3: #F1E7E6; --line: #F0E5E4; --line-strong: #E0CFCD;
  --ink: #2A1A1C; --ink-2: #4A3537; --muted: #7E6A6B;
  --brand: #D0202E; --brand-soft: #FDEBEC; --ember: #F5A800;
  --ok: #1F7F47; --ok-soft: #DFF2E6; --warn: #946000; --warn-soft: #FFF0CC; --danger: #B3122A; --danger-soft: #FBE4E7; --info: #255F9E; --info-soft: #E3ECF7;
  --grad-brand: linear-gradient(135deg, #EC3B47 0%, #D0202E 48%, #A3121F 100%);
  --grad-rail: linear-gradient(190deg, #B81622 0%, #8E0F1B 42%, #5C0911 100%);
  --grad-wine: linear-gradient(135deg, #5A1018 0%, #3B0A10 100%);
  --glow: 0 10px 24px -10px rgba(190, 24, 36, .55), 0 2px 6px -2px rgba(190, 24, 36, .3);
  --shadow-card: 0 1px 2px rgba(70, 20, 24, .04), 0 10px 28px -20px rgba(110, 20, 28, .28);
  --shadow-float: 0 30px 70px -28px rgba(110, 20, 28, .42), 0 4px 14px rgba(70, 20, 24, .08);
  --r: 16px; --r-lg: 22px;
  --ui: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Bricolage', 'Figtree', system-ui, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --ease: cubic-bezier(.23, 1, .32, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 15px/1.45 var(--ui); color: var(--ink); -webkit-font-smoothing: antialiased;
  background: radial-gradient(1100px 560px at 108% -12%, rgba(236, 59, 71, .10), transparent 62%), radial-gradient(900px 520px at -14% 112%, rgba(245, 168, 0, .07), transparent 58%), var(--bg);
  background-attachment: fixed;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
.muted { color: var(--muted); } .small { font-size: 13.5px; } .xs { font-size: 12px; }
.mono { font-family: var(--mono); } .num { font-variant-numeric: tabular-nums; }
.grow { flex: 1; } .min0 { min-width: 0; }
.ellipsis { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col { display: flex; flex-direction: column; gap: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px 14px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 12px 14px; }
.row-gap { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row-end { display: flex; justify-content: flex-end; margin-top: 18px; }
.sel { user-select: all; }
.divider { height: 1px; background: var(--line); }

/* Botones */
.btn {
  --h: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--h); padding: 0 18px; border: 0; border-radius: 12px;
  background: var(--grad-brand); color: #fff; font-weight: 650; font-size: 14.5px; white-space: nowrap; text-decoration: none; box-shadow: var(--glow);
  transition: transform 160ms var(--ease), filter 150ms ease, box-shadow 150ms ease;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.sm { --h: 36px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; }
.btn.sm svg { width: 16px; height: 16px; }
.btn.lg { --h: 52px; font-size: 16px; border-radius: 14px; }
.btn.secondary { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn.ghost { background: transparent; color: var(--ink-2); box-shadow: none; }
@media (hover: hover) { .btn:hover:not(:disabled) { filter: brightness(1.06); } .btn.secondary:hover:not(:disabled), .btn.ghost:hover:not(:disabled) { filter: none; background: var(--surface-2); } }
.file-btn { position: relative; overflow: hidden; align-self: flex-start; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 0; background: transparent; display: grid; place-items: center; color: var(--muted); flex: none; }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn.wa { color: #1E9E55; background: #E6F6EC; }
.link { border: 0; background: none; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; font-size: 13.5px; font-weight: 600; padding: 4px 0; }
.link svg { width: 15px; height: 15px; color: var(--muted); }
.link:hover { color: var(--brand); }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Formularios */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.f-label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.f-hint { font-size: 12.5px; color: var(--muted); }
.f-err { font-size: 13px; color: var(--danger); font-weight: 600; }
input:not([type=checkbox]):not([type=file]), select, textarea {
  width: 100%; background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: 12px; padding: 11px 13px; outline: none; transition: border-color 120ms ease, box-shadow 120ms ease;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(208, 32, 46, .14); }
textarea { resize: vertical; }
textarea.mono { font-size: 13px; word-break: break-all; }
.check { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-3); border-radius: 12px; max-width: 100%; overflow-x: auto; align-self: flex-start; }
.seg button { border: 0; background: transparent; padding: 8px 14px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap; transition: background-color 150ms ease, color 150ms ease; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(70, 20, 24, .12); }
.alert { display: flex; gap: 10px; align-items: center; padding: 11px 14px; border-radius: 12px; font-weight: 600; font-size: 14px; }
.alert svg { width: 18px; height: 18px; flex: none; }
.alert.danger { background: var(--danger-soft); color: var(--danger); }
.alert.info { background: var(--info-soft); color: var(--info); margin-bottom: 14px; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.badge svg { width: 13px; height: 13px; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.neutral { background: var(--surface-3); color: var(--ink-2); }
.ok-t { color: var(--ok); } .warn-t { color: var(--warn); }

/* Acceso */
.auth { min-height: 100%; display: grid; place-items: center; align-content: center; gap: 18px; padding: 24px 16px; position: relative; overflow: hidden; }
.auth-glow { position: fixed; inset: -20% -10% auto auto; width: 760px; height: 760px; background: radial-gradient(circle, rgba(208, 32, 46, .22), transparent 62%); pointer-events: none; }
.auth-card { width: min(460px, 100%); background: var(--surface); border-radius: 26px; padding: 30px 28px; box-shadow: var(--shadow-float); display: flex; flex-direction: column; gap: 14px; position: relative; animation: rise 420ms var(--ease); }
.auth-card h1 { font: 700 30px/1.05 var(--display); letter-spacing: -0.03em; margin-top: 10px; }
.auth-card > p { margin: -6px 0 6px; }
.auth-foot { font-size: 12.5px; color: var(--muted); position: relative; }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.brand { display: flex; align-items: center; gap: 12px; }
.brand b { display: block; font: 700 17px/1.1 var(--display); letter-spacing: -0.01em; }
.brand span { font-size: 12.5px; color: var(--muted); }
.b-mark { width: 44px; height: 44px; border-radius: 14px; background: var(--grad-brand); color: #fff; display: grid; place-items: center; box-shadow: var(--glow); flex: none; }
.b-mark svg { width: 22px; height: 22px; }
.brand .b-mark { color: #fff; }
.boot { height: 100%; display: grid; place-items: center; color: var(--brand); }

/* Estructura */
.shell { display: flex; min-height: 100%; }
.side { width: 240px; flex: none; background: var(--grad-rail); color: rgba(255, 236, 236, .78); padding: 18px 14px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; }
.side .brand b { color: #fff; } .side .brand span { color: rgba(255, 236, 236, .7); }
.side .b-mark { background: rgba(255, 255, 255, .16); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2); }
.side nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.side nav button, .logout { border: 0; background: transparent; color: inherit; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; font-weight: 600; text-align: left; transition: background-color 150ms ease, color 150ms ease; }
.side nav button svg, .logout svg { width: 20px; height: 20px; }
.side nav button:hover, .logout:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.side nav button.on { background: rgba(255, 255, 255, .16); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18); }
.side nav button.on svg { color: #FFD15C; }
.side-foot { display: flex; flex-direction: column; gap: 6px; }
.lock-state { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 99px; background: rgba(0, 0, 0, .18); align-self: flex-start; }
.lock-state svg { width: 13px; height: 13px; }
.lock-state.ok svg { color: #7BE3A1; }
.content { flex: 1; min-width: 0; }
.page { max-width: 1240px; padding: 28px 30px 60px; animation: fade 260ms ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }
.head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.head h1, .client-hero h1 { font: 700 32px/1.05 var(--display); letter-spacing: -0.03em; }
.head p { color: var(--muted); margin: 6px 0 0; text-transform: none; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bottom { display: none; }
.loading { padding: 60px; display: grid; place-items: center; color: var(--brand); }

/* Tarjetas */
.card { background: var(--surface); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-card); }
.c-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.c-head h3 { font-size: 16.5px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 16px; align-items: start; }
.kpis { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.k-l { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.k-l svg { width: 16px; height: 16px; }
.k-v { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-f { font-size: 12.5px; color: var(--muted); }
.kpi.hero { background: var(--grad-brand); color: #fff; box-shadow: var(--glow); position: relative; overflow: hidden; }
.kpi.hero::after { content: ''; position: absolute; inset: 0; background: radial-gradient(360px 140px at 90% -20%, rgba(255, 255, 255, .25), transparent 70%); }
.kpi.hero .k-l, .kpi.hero .k-f { color: rgba(255, 255, 255, .82); }
.kpi.warn .k-v { color: var(--warn); } .kpi.danger .k-v { color: var(--danger); }

.rows { display: flex; flex-direction: column; }
.row-item { display: flex; align-items: center; gap: 12px; padding: 12px 4px; min-width: 0; }
.row-item + .row-item { box-shadow: inset 0 1px 0 var(--line); }
.row-item b { font-size: 15px; }
.row-item .muted { display: block; }
.rows.compact .row-item { padding: 10px 2px; }
.row-actions { display: flex; gap: 8px; align-items: center; }
.av { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; background: var(--surface-3); color: var(--ink-2); }
.av.lg { width: 48px; height: 48px; border-radius: 14px; font-size: 16px; }
.av.xl { width: 72px; height: 72px; border-radius: 22px; font-size: 24px; }
.av.tone-active, .av.tone-perpetual { background: var(--grad-brand); color: #fff; }
.av.tone-expiring { background: linear-gradient(135deg, #FFD15C, #F5A800); color: #3A2700; }
.av.tone-grace, .av.tone-expired { background: var(--grad-wine); color: #FFD6D9; }
.bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; height: 170px; align-items: end; }
.bar { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar i { width: 100%; max-width: 30px; border-radius: 8px 8px 4px 4px; background: var(--grad-brand); transition: height 600ms var(--ease); }
.bar i.zero { background: var(--surface-3); }
.bar span { font-size: 11.5px; color: var(--muted); }
.empty { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 36px 16px; }
.empty .e-ic { width: 54px; height: 54px; border-radius: 16px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 6px; }
.empty .e-ic svg { width: 26px; height: 26px; }
.empty b { font-size: 17px; }
.empty .btn { margin-top: 10px; }

/* Clientes */
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.search { flex: 1; min-width: 240px; position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 13px; width: 18px; height: 18px; color: var(--muted); }
.search input { padding-left: 40px !important; }
.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 12px; }
.client-card { border: 0; text-align: left; background: var(--surface); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 14px; transition: transform 160ms var(--ease), box-shadow 160ms ease; }
.client-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card), 0 0 0 2px rgba(208, 32, 46, .18); }
.client-card:active { transform: scale(.98); }
.cc-top { display: flex; gap: 12px; align-items: center; min-width: 0; }
.cc-top b { font-size: 16px; }
.cc-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.back { border: 0; background: none; display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-weight: 600; margin-bottom: 12px; padding: 0; }
.back svg { width: 17px; height: 17px; }
.client-hero { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; background: var(--surface); border-radius: 24px; padding: 20px 22px; box-shadow: var(--shadow-card); margin-bottom: 16px; position: relative; overflow: hidden; }
.client-hero::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad-brand); }
.facts { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; color: var(--muted); font-size: 14px; }
.facts span, .facts a { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
.facts a:hover { color: #1E9E55; }
.facts svg { width: 15px; height: 15px; }
.hero-money { display: flex; flex-direction: column; align-items: flex-end; padding: 0 8px; }
.hero-money span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.hero-money b { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.hero-money em { font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--warn); }
.notes { background: var(--warn-soft); border-radius: 14px; padding: 12px 16px; margin-bottom: 16px; white-space: pre-wrap; font-size: 14px; }
.inst-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: 14px; }
.inst { background: var(--surface); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 14px; }
.inst.old { opacity: .72; }
.inst-head { display: flex; gap: 12px; align-items: center; }
.inst-ic { width: 42px; height: 42px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.inst-ic svg { width: 21px; height: 21px; }
.inst-head b { display: block; font-size: 16px; }
.code { border: 0; background: var(--surface-2); border-radius: 8px; padding: 3px 8px; font: 600 13px var(--mono); letter-spacing: .04em; display: inline-flex; gap: 6px; align-items: center; margin-top: 4px; color: var(--ink-2); }
.code svg { width: 13px; height: 13px; color: var(--muted); }
.code:hover { background: var(--surface-3); }
.lic { background: var(--surface-2); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.lic.none { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.lic-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 14px; }
.lic-facts span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.lic-facts b { font-size: 14.5px; }
.lic-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.inst-foot { display: flex; gap: 18px; flex-wrap: wrap; }
details.timeline summary, details.history summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--muted); }
details.history { margin-top: 18px; }
details.history .inst-list { margin-top: 12px; }
.t-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 14px; }
.t-row + .t-row { box-shadow: inset 0 1px 0 var(--line); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); flex: none; }
.dot.current { background: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* Licencias: formulario */
.lic-form { display: flex; flex-direction: column; gap: 16px; }
.plan-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.plan-pick button { border: 0; text-align: left; background: var(--surface-2); border-radius: 14px; padding: 14px; display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; transition: box-shadow 150ms ease, background-color 150ms ease; }
.plan-pick button svg { grid-row: span 2; width: 24px; height: 24px; color: var(--muted); }
.plan-pick button span { font-size: 12.5px; color: var(--muted); }
.plan-pick button.on { background: var(--brand-soft); box-shadow: inset 0 0 0 2px var(--brand); }
.plan-pick button.on svg { color: var(--brand); }
.quick { display: flex; gap: 6px; flex-wrap: wrap; }
.quick button { border: 0; background: var(--surface-3); border-radius: 99px; padding: 4px 10px; font-size: 12.5px; font-weight: 600; }
.quick button:hover { background: var(--brand-soft); color: var(--brand); }
.pay-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.key-box { background: linear-gradient(135deg, #FFF6F6, #FDEBEC); border-radius: 14px; padding: 14px; margin-bottom: 14px; box-shadow: inset 0 0 0 1px #F6D4D7; }
.key-box code { display: block; font-size: 12.5px; line-height: 1.55; word-break: break-all; user-select: all; }

/* Tabla */
.table-wrap { padding: 6px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 10px 12px; }
td { padding: 12px; box-shadow: inset 0 1px 0 var(--line); vertical-align: middle; }
tbody tr { cursor: pointer; transition: background-color 120ms ease; }
tbody tr:hover { background: var(--surface-2); }
.r { text-align: right; }

/* Ajustes */
.audit { display: flex; flex-direction: column; font-size: 13.5px; max-height: 360px; overflow-y: auto; }
.audit > div { display: grid; grid-template-columns: 130px 1fr auto; gap: 10px; padding: 8px 0; box-shadow: inset 0 -1px 0 var(--line); }
.totp { display: grid; grid-template-columns: 160px 1fr; gap: 18px; align-items: start; }
.qr { background: #fff; border-radius: 12px; padding: 6px; box-shadow: inset 0 0 0 1px var(--line); }
.qr svg { width: 100%; height: auto; display: block; }
code.mono { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }

/* Modal y avisos */
.backdrop { position: fixed; inset: 0; background: rgba(40, 8, 12, .42); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; z-index: 50; animation: fadeIn 180ms ease-out; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); background: var(--surface); border-radius: 24px; box-shadow: var(--shadow-float); display: flex; flex-direction: column; animation: pop 260ms var(--ease); }
.modal.wide { width: min(720px, 100%); }
.m-head { display: flex; gap: 12px; align-items: flex-start; padding: 20px 22px 12px; }
.m-head h2 { font: 700 21px/1.15 var(--display); letter-spacing: -0.02em; }
.m-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.m-body { padding: 6px 22px 18px; overflow-y: auto; }
.m-body > p { margin: 10px 0 0; }
.m-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; background: var(--surface-2); border-radius: 0 0 24px 24px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: var(--grad-wine); color: #FFF3F3; border-radius: 14px; padding: 12px 16px; display: flex; gap: 10px; align-items: center; font-weight: 600; box-shadow: 0 16px 34px -14px rgba(60, 6, 12, .6); animation: pop 240ms var(--ease); max-width: 380px; }
.toast svg { width: 19px; height: 19px; flex: none; color: #7BE3A1; }
.toast.error { background: var(--grad-brand); }
.toast.error svg { color: #fff; }

@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, 1fr); } .kpi.hero { grid-column: span 2; } }
@media (max-width: 820px) {
  .side { display: none; }
  .page { padding: 20px 16px 96px; }
  .bottom { display: flex; position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); box-shadow: 0 -6px 20px -12px rgba(70, 20, 24, .25); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); z-index: 40; }
  .bottom button { flex: 1; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 6px 0; }
  .bottom button svg { width: 22px; height: 22px; }
  .bottom button.on { color: var(--brand); }
  .lic-facts { grid-template-columns: repeat(2, 1fr); }
  .hero-money { align-items: flex-start; padding: 0; }
  .totp { grid-template-columns: 1fr; }
  .qr { max-width: 200px; }
  .toasts { left: 16px; right: 16px; bottom: 80px; }
  .head h1, .client-hero h1 { font-size: 27px; }
  .row-item { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; } }
