/* LaniServices Admin — design system */
:root{
  --bg:#0a0a0b;
  --surface:#121214;
  --surface-2:#18181b;
  --surface-3:#202024;
  --border:#232327;
  --border-strong:#2e2e33;
  --text:#f5f5f7;
  --text-2:#a1a1aa;
  --text-3:#71717a;
  --accent:#e9e4ff;
  --wa:#25d366;
  --wa-ink:#04210f;
  --red:#ff5f57;
  --red-bg:rgba(255,95,87,.12);
  --orange:#ff9f40;
  --orange-bg:rgba(255,159,64,.12);
  --green:#3ccf7e;
  --green-bg:rgba(60,207,126,.12);
  --neutral-bg:rgba(255,255,255,.06);
  --radius:12px;
  --radius-sm:8px;
  --shadow:0 10px 40px rgba(0,0,0,.45);
  --ease:cubic-bezier(.2,.8,.2,1);
  --safe-b:env(safe-area-inset-bottom,0px);
  --safe-t:env(safe-area-inset-top,0px);
  --font:-apple-system,BlinkMacSystemFont,"SF Pro Text","Inter","Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  color-scheme:dark;
}
*{box-sizing:border-box}
html,body{margin:0;background:var(--bg);color:var(--text);font-family:var(--font);font-size:15px;line-height:1.45;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer;background:none;border:0;padding:0}
a{color:inherit;text-decoration:none}
svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.hidden{display:none!important}
.muted{color:var(--text-2)}
.faint{color:var(--text-3)}
.small{font-size:13px}
.tnum{font-variant-numeric:tabular-nums}
h1,h2,h3{margin:0;font-weight:650;letter-spacing:-.01em}

/* ---------- Buttons ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:40px;padding:0 16px;border-radius:10px;font-weight:600;font-size:14px;white-space:nowrap;transition:background .15s,transform .1s,opacity .15s;border:1px solid transparent}
.btn:active{transform:scale(.98)}
.btn svg{width:17px;height:17px}
.btn-primary{background:var(--text);color:#0a0a0b}
.btn-primary:hover{background:#fff}
.btn-secondary{background:var(--surface-2);border-color:var(--border-strong);color:var(--text)}
.btn-secondary:hover{background:var(--surface-3)}
.btn-ghost{color:var(--text-2)}
.btn-ghost:hover{color:var(--text);background:var(--surface-2)}
.btn-danger{background:var(--red-bg);color:var(--red)}
.btn-wa{background:var(--wa);color:var(--wa-ink);height:44px;font-weight:700}
.btn-wa:hover{filter:brightness(1.06)}
.btn-block{width:100%}
.btn-sm{height:32px;padding:0 12px;font-size:13px;border-radius:8px}
.btn[disabled]{opacity:.55;pointer-events:none}
.btn-wa[disabled]{background:var(--surface-3);color:var(--text-3);opacity:1}
.icon-btn{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:10px;color:var(--text-2);background:var(--surface-2);border:1px solid var(--border-strong);transition:background .15s,color .15s}
.icon-btn:hover{color:var(--text);background:var(--surface-3)}
.icon-btn.plain{background:none;border-color:transparent}
.link-btn{color:var(--text-2);font-size:13px;margin-top:16px;text-decoration:underline;text-underline-offset:3px}
.link-btn:hover{color:var(--text)}
.text-btn{color:var(--text);font-weight:600;font-size:13px;display:inline-flex;align-items:center;gap:4px}
.text-btn:hover{text-decoration:underline;text-underline-offset:3px}
.text-btn.danger{color:var(--red)}
.text-btn svg{width:14px;height:14px}
.foot-actions{display:inline-flex;gap:16px;align-items:center}
.menu-list .menu-row{gap:12px;padding:14px 16px}
.menu-row .row-title{font-weight:550}
.menu-icon{width:32px;height:32px;border-radius:8px;background:var(--surface-3);display:inline-flex;align-items:center;justify-content:center;color:var(--text-2);flex-shrink:0}
.menu-row.danger .row-title,.menu-row.danger .menu-icon{color:var(--red)}
.menu-row.danger .menu-icon{background:var(--red-bg)}

/* ---------- Forms ---------- */
.field{display:block;margin-bottom:14px}
.field>span,.field-label{display:block;font-size:12.5px;color:var(--text-2);margin-bottom:6px;font-weight:500}
input,select,textarea{width:100%;height:44px;background:var(--bg);border:1px solid var(--border-strong);border-radius:10px;padding:0 12px;outline:none;font-size:16px;transition:border-color .15s,box-shadow .15s;appearance:none;-webkit-appearance:none}
textarea{height:auto;min-height:150px;padding:12px;resize:vertical;line-height:1.5}
select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;padding-right:34px}
input:focus,select:focus,textarea:focus{border-color:#55555c;box-shadow:0 0 0 3px rgba(255,255,255,.06)}
input[type=date]{min-height:44px}
input[type=checkbox]{width:20px;height:20px;padding:0;border-radius:6px;flex-shrink:0;cursor:pointer;position:relative}
input[type=checkbox]:checked{background:var(--text);border-color:var(--text)}
input[type=checkbox]:checked::after{content:"";position:absolute;left:6px;top:2px;width:5px;height:10px;border:solid #0a0a0b;border-width:0 2px 2px 0;transform:rotate(45deg)}
.check{display:flex;gap:10px;align-items:center;font-size:14px;margin:4px 0 14px;cursor:pointer}
.grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 12px}
.form-error{color:var(--red);font-size:13px;min-height:1px;margin:10px 0 0}
.form-note{color:var(--text-2);font-size:13px;margin:10px 0 0}
.hint{font-size:12px;color:var(--text-3);margin-top:6px}
.computed{display:flex;align-items:center;justify-content:space-between;height:44px;padding:0 12px;border-radius:10px;background:var(--surface-2);border:1px dashed var(--border-strong);font-size:14px}
.segmented{display:flex;background:var(--bg);border:1px solid var(--border-strong);border-radius:10px;padding:3px;gap:3px}
.segmented button{flex:1;height:36px;border-radius:7px;font-size:13.5px;font-weight:550;color:var(--text-2);transition:background .15s,color .15s}
.segmented button.on{background:var(--surface-3);color:var(--text);box-shadow:0 1px 0 rgba(255,255,255,.04) inset}
.segmented button[data-v=paid].on{background:var(--green-bg);color:var(--green)}
.segmented button[data-v=pending].on{background:var(--orange-bg);color:var(--orange)}
.disclosure{margin:6px 0 14px}
.disclosure summary{cursor:pointer;color:var(--text-2);font-size:13.5px;font-weight:550;list-style:none;display:flex;align-items:center;gap:6px}
.disclosure summary::-webkit-details-marker{display:none}
.disclosure summary svg{width:14px;height:14px;transition:transform .2s}
.disclosure[open] summary svg{transform:rotate(90deg)}
.disclosure .disclosure-body{padding-top:14px}
.inline-warn{background:var(--orange-bg);color:var(--orange);border-radius:10px;padding:10px 12px;font-size:13px;margin:-4px 0 14px}
.inline-warn button{color:var(--text);font-weight:600;text-decoration:underline;text-underline-offset:3px}

/* ---------- Auth ---------- */
.auth{min-height:100vh;min-height:100dvh;display:flex;align-items:center;justify-content:center;padding:24px}
.auth-card{width:100%;max-width:380px;animation:rise .4s var(--ease)}
.auth-card h1{font-size:26px;margin:36px 0 6px}
.auth-card .muted{margin:0 0 26px}
.wordmark{font-size:19px;font-weight:750;letter-spacing:-.02em}
.wordmark span{color:var(--text-3);font-weight:600}
.boot-dot{width:8px;height:8px;border-radius:50%;background:var(--text-3);animation:pulse 1s ease-in-out infinite}

/* ---------- Layout ---------- */
.sidebar{position:fixed;inset:0 auto 0 0;width:240px;padding:24px 14px 18px;border-right:1px solid var(--border);display:flex;flex-direction:column;background:var(--bg);z-index:20}
.sidebar-mark{padding:2px 10px 28px}
.nav{display:flex;flex-direction:column;gap:2px}
.nav a{display:flex;align-items:center;gap:12px;height:40px;padding:0 10px;border-radius:9px;color:var(--text-2);font-weight:550;font-size:14px;transition:background .15s,color .15s}
.nav a:hover{color:var(--text);background:var(--surface)}
.nav a.on{color:var(--text);background:var(--surface-2)}
.nav a .count{margin-left:auto;font-size:11.5px;font-weight:700;background:var(--red);color:#1a0302;border-radius:20px;padding:1px 7px;min-width:20px;text-align:center}
.sidebar-add{margin:22px 0 0}
.sidebar-foot{margin-top:auto;border-top:1px solid var(--border);padding-top:14px}
.sidebar-user{font-size:12.5px;color:var(--text-3);padding:0 10px 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nav-foot-btn{display:flex;align-items:center;gap:12px;height:38px;padding:0 10px;border-radius:9px;color:var(--text-2);font-size:14px;width:100%}
.nav-foot-btn:hover{color:var(--text);background:var(--surface)}
.main{margin-left:240px;padding:36px 40px 80px;max-width:1240px;outline:none;min-height:100vh}
.fab{display:none}

.page.enter{animation:fade .25s var(--ease)}
.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:24px}
.page-head h1{font-size:28px;letter-spacing:-.02em}
.page-head p{margin:4px 0 0;color:var(--text-2);font-size:14px}
.page-head .head-actions{display:flex;gap:8px}
.back-link{display:inline-flex;align-items:center;gap:4px;color:var(--text-2);font-size:14px;margin-bottom:14px}
.back-link:hover{color:var(--text)}
.section{margin-top:32px}
.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.section-head h2{font-size:13px;text-transform:uppercase;letter-spacing:.08em;color:var(--text-2);font-weight:650}
.section-head .count-pill{font-size:12px;color:var(--text-3);font-weight:600;white-space:nowrap}

/* ---------- Summary stats ---------- */
.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
@media (min-width:1500px){.stats{grid-template-columns:repeat(6,minmax(0,1fr))}}
.stat-value{white-space:nowrap}
.stats.stats-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.rev-bar{height:6px;border-radius:3px;background:var(--surface-3);margin:7px 0 6px;overflow:hidden;max-width:420px}
.rev-bar span{display:block;height:100%;background:var(--green);border-radius:3px}
.rev-total{background:var(--surface-2)}
.rev-total .row-amount{font-size:16px}
a.stat:hover{border-color:var(--border-strong)}
.stat{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:16px;text-align:left;transition:border-color .15s,background .15s;position:relative}
button.stat:hover{border-color:var(--border-strong)}
.stat.on{border-color:#4a4a50;background:var(--surface-2)}
.stat-label{display:flex;align-items:center;gap:7px;font-size:12.5px;color:var(--text-2);font-weight:550}
.stat-value{font-size:28px;font-weight:700;margin-top:8px;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.stat-sub{font-size:12px;color:var(--text-3);margin-top:2px}
.l-short{display:none}
.dot{width:7px;height:7px;border-radius:50%;background:var(--text-3);flex-shrink:0}
.dot.red{background:var(--red)}.dot.orange{background:var(--orange)}.dot.green{background:var(--green)}.dot.neutral{background:#8e8e96}

/* ---------- Chips ---------- */
.chips{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}
.chips::-webkit-scrollbar{display:none}
.chip{height:32px;padding:0 12px;border-radius:20px;border:1px solid var(--border-strong);color:var(--text-2);font-size:13px;font-weight:550;white-space:nowrap;display:inline-flex;align-items:center;gap:6px;transition:all .15s}
.chip:hover{color:var(--text)}
.chip.on{background:var(--text);color:#0a0a0b;border-color:var(--text)}
.chip .n{font-size:11.5px;opacity:.7}

/* ---------- Attention cards ---------- */
.attn-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:12px}
.attn{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:16px;display:flex;flex-direction:column;gap:12px;position:relative;overflow:hidden}
.page.enter .attn{animation:rise .3s var(--ease) both}
.attn::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--stripe,transparent)}
.attn.u-overdue,.attn.u-today{--stripe:var(--red)}
.attn.u-soon{--stripe:var(--orange)}
.attn.u-upcoming{--stripe:#55555c}
.attn.u-paid{--stripe:var(--green)}
.attn-top{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.attn-name{font-weight:650;font-size:16px;line-height:1.25}
.attn-name:hover{text-decoration:underline;text-underline-offset:3px}
.attn-service{color:var(--text-2);font-size:13.5px;margin-top:2px}
.attn-price{font-weight:700;font-size:16px;font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap}
.attn-meta{display:flex;flex-wrap:wrap;gap:6px 14px;align-items:center;font-size:13px;color:var(--text-2)}
.attn-meta .m{display:inline-flex;align-items:center;gap:6px}
.attn-meta svg{width:14px;height:14px;color:var(--text-3)}
.attn-actions{display:flex;gap:8px}
.attn-actions .btn-wa{flex:1}
.attn-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12.5px;color:var(--text-3);border-top:1px solid var(--border);padding-top:10px;margin-top:-2px}
.attn-foot .ok{color:var(--green);display:inline-flex;align-items:center;gap:5px}
.attn-foot .ok svg{width:14px;height:14px}

/* ---------- Badges ---------- */
.badge{display:inline-flex;align-items:center;gap:5px;height:22px;padding:0 8px;border-radius:6px;font-size:11.5px;font-weight:650;white-space:nowrap;background:var(--neutral-bg);color:var(--text-2)}
.badge.red{background:var(--red-bg);color:var(--red)}
.badge.orange{background:var(--orange-bg);color:var(--orange)}
.badge.green{background:var(--green-bg);color:var(--green)}
.badge.neutral{background:var(--neutral-bg);color:#c4c4cc}

/* ---------- Lists / tables ---------- */
.toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:14px}
.search{position:relative;flex:1;min-width:220px;max-width:420px}
.search svg{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:var(--text-3)}
.search input{padding-left:38px}
.list{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}
.row{display:flex;align-items:center;gap:14px;padding:13px 16px;border-bottom:1px solid var(--border);transition:background .12s;width:100%;text-align:left}
.row:last-child{border-bottom:0}
a.row:hover,button.row:hover{background:var(--surface-2)}
.row-main{flex:1;min-width:0}
.row-title{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.row-sub{font-size:13px;color:var(--text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:1px}
.row-end{display:flex;align-items:center;gap:10px;flex-shrink:0;text-align:right}
.row-amount{font-weight:650;font-variant-numeric:tabular-nums}
.row .chev{color:var(--text-3)}
.avatar{width:38px;height:38px;border-radius:50%;background:var(--surface-3);display:flex;align-items:center;justify-content:center;font-weight:650;font-size:13.5px;color:#d4d4d8;flex-shrink:0;letter-spacing:.02em}
.avatar{position:relative}
.status-dot{position:absolute;right:-1px;bottom:-1px;width:12px;height:12px;border-radius:50%;border:2px solid var(--surface);background:#55555c}
.status-dot.green{background:var(--green)}.status-dot.orange{background:var(--orange)}.status-dot.red{background:var(--red)}
a.row:hover .status-dot{border-color:var(--surface-2)}
.cust-sub{display:flex;align-items:center;gap:6px;min-width:0}
.cust-sub .ph{display:inline-flex;align-items:center;gap:4px;flex-shrink:0}
.cust-sub .ph svg{width:13px;height:13px}
.cust-sub .ph.ok svg{color:var(--green)}
.cust-sub .ph.none{color:var(--orange)}
.cust-sub .sep{color:var(--text-3)}
.cust-sub .svc{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.cust-row.is-inactive .row-title{color:var(--text-2)}
.cust-svc{font-size:12.5px;color:var(--text-3);margin-top:2px}
.due-line{font-size:11.5px;color:var(--text-3);margin-top:3px;white-space:nowrap}
.due-line.red{color:var(--red)}.due-line.orange{color:var(--orange)}.due-line.green{color:var(--green)}
.avatar.lg{width:56px;height:56px;font-size:19px}
.table-wrap{overflow-x:auto}
table{width:100%;border-collapse:collapse;font-size:13.5px}
th{font-size:11.5px;text-transform:uppercase;letter-spacing:.06em;color:var(--text-3);font-weight:650;text-align:left;padding:12px 16px;border-bottom:1px solid var(--border);white-space:nowrap}
td{padding:13px 16px;border-bottom:1px solid var(--border);vertical-align:middle;white-space:nowrap}
tr:last-child td{border-bottom:0}
tbody tr{transition:background .12s}
tbody tr:hover{background:var(--surface-2)}
td .sub{display:block;font-size:12.5px;color:var(--text-3);margin-top:1px}
td.num{text-align:right;font-variant-numeric:tabular-nums;font-weight:600}
.row-actions{display:flex;gap:4px;justify-content:flex-end}
.empty{padding:44px 20px;text-align:center;color:var(--text-2)}
.empty h3{font-size:16px;color:var(--text);margin-bottom:4px}
.empty p{margin:0 0 16px;font-size:14px}
.empty .empty-icon{width:44px;height:44px;border-radius:12px;background:var(--surface-2);display:inline-flex;align-items:center;justify-content:center;margin-bottom:12px;color:var(--text-2)}
.empty .empty-icon svg{width:20px;height:20px}
.banner{background:var(--red-bg);color:var(--red);border-radius:10px;padding:12px 14px;font-size:13.5px;margin-bottom:16px;display:flex;justify-content:space-between;gap:12px;align-items:center}
.skeleton{height:132px;border-radius:var(--radius);background:linear-gradient(90deg,var(--surface) 0%,var(--surface-2) 50%,var(--surface) 100%);background-size:200% 100%;animation:shimmer 1.2s linear infinite;border:1px solid var(--border)}

/* ---------- Customer detail ---------- */
.profile{display:flex;gap:16px;align-items:center;margin-bottom:20px}
.profile h1{font-size:26px}
.profile .muted{margin-top:2px}
.profile-actions{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:8px}
.info-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1px;background:var(--border);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}
.info{background:var(--surface);padding:12px 16px}
.info .k{font-size:12px;color:var(--text-3);font-weight:550}
.info .v{margin-top:2px;word-break:break-word}
.sub-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:16px;margin-bottom:10px}
.sub-card-top{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:10px}
.sub-card .attn-actions{margin-top:12px}
.timeline .row{padding:11px 16px}

/* ---------- Settings ---------- */
.settings-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:20px;margin-bottom:14px}
.settings-card h2{font-size:16px;margin-bottom:4px;display:flex;align-items:center;gap:8px}
.settings-card h2 svg{color:var(--text-2)}
.settings-card>p{margin:0 0 16px;color:var(--text-2);font-size:13.5px}
.status-line{font-size:13px;color:var(--text-2);margin-top:12px}
.tpl-row,.price-row{display:flex;align-items:center;gap:12px;padding:12px 0;border-top:1px solid var(--border)}
.tpl-row:first-of-type,.price-row:first-of-type{border-top:0}
.price-row input{width:110px;height:38px;text-align:right}
.rule-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 12px;margin-bottom:6px}
.winback-head{display:flex;justify-content:space-between;align-items:center;gap:10px 16px;flex-wrap:wrap;margin-bottom:12px}
.preview{white-space:pre-wrap;background:var(--bg);border:1px solid var(--border);border-radius:10px;padding:14px;font-size:14px;line-height:1.55;color:#dcdce0}
.placeholders{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 14px}
.placeholders button{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;padding:4px 8px;border-radius:6px;background:var(--surface-2);border:1px solid var(--border-strong);color:var(--text-2)}
.placeholders button:hover{color:var(--text)}

/* ---------- Sheet ---------- */
.sheet-layer{position:fixed;inset:0;z-index:100;display:flex;align-items:center;justify-content:center}
.sheet-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.6);backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);animation:fade .2s ease}
.sheet{position:relative;width:min(560px,calc(100vw - 32px));max-height:min(88vh,860px);background:var(--surface);border:1px solid var(--border-strong);border-radius:16px;box-shadow:var(--shadow);display:flex;flex-direction:column;animation:pop .25s var(--ease)}
.sheet-grip{display:none}
.sheet-head{display:flex;align-items:center;justify-content:space-between;padding:16px 16px 12px 20px}
.sheet-head h2{font-size:18px}
.sheet-body{padding:4px 20px 20px;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
.sheet-actions{display:flex;gap:10px;margin-top:8px;position:sticky;bottom:-20px;background:var(--surface);padding:14px 0 calc(4px + var(--safe-b));margin-bottom:-4px}
.sheet-actions{flex-wrap:wrap}
.sheet-actions .btn{flex:1;height:46px;min-width:0}
.sheet-actions .btn-wa{flex-basis:100%;order:-1}
.sheet-summary{background:var(--surface-2);border-radius:10px;padding:12px 14px;margin-bottom:14px;font-size:14px}
.sheet-summary b{display:block;font-size:15px}
body.sheet-open{overflow:hidden}

/* ---------- Toasts ---------- */
.toasts{position:fixed;left:50%;transform:translateX(-50%);bottom:24px;z-index:200;display:flex;flex-direction:column;gap:8px;align-items:center;pointer-events:none;width:max-content;max-width:calc(100vw - 32px)}
.toast{background:#f5f5f7;color:#0a0a0b;font-weight:600;font-size:14px;padding:11px 16px;border-radius:12px;box-shadow:var(--shadow);display:flex;gap:12px;align-items:center;animation:rise .25s var(--ease);pointer-events:auto}
.toast.err{background:#3a1414;color:#ffb4b0}
.toast button{font-weight:700;text-decoration:underline;text-underline-offset:3px}

/* ---------- Animations ---------- */
@keyframes fade{from{opacity:0}to{opacity:1}}
@keyframes rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes pop{from{opacity:0;transform:scale(.97) translateY(6px)}to{opacity:1;transform:none}}
@keyframes up{from{transform:translateY(100%)}to{transform:none}}
@keyframes pulse{50%{opacity:.3}}
@keyframes shimmer{to{background-position:-200% 0}}
@media (prefers-reduced-motion:reduce){*,*::before{animation:none!important;transition:none!important}}

/* ---------- Responsive ---------- */
@media (max-width:1100px){
  .main{padding:30px 28px 80px}
  .attn-list{grid-template-columns:1fr}
}
@media (max-width:1100px){
  .stats{grid-template-columns:repeat(6,minmax(0,1fr))}
  .stat{grid-column:span 2}
  .stat.stat-wide{grid-column:span 3}
  .stat.stat-full{grid-column:1/-1}
  .stats.stats-4{grid-template-columns:repeat(4,minmax(0,1fr))}
  .stats.stats-4 .stat{grid-column:auto}
}
@media (max-width:760px){
  html,body{font-size:15px}
  .sidebar{inset:auto 0 0 0;width:auto;height:auto;padding:0 6px calc(6px + var(--safe-b));border-right:0;border-top:1px solid var(--border);background:rgba(10,10,11,.92);backdrop-filter:saturate(1.4) blur(18px);-webkit-backdrop-filter:saturate(1.4) blur(18px);flex-direction:row}
  .sidebar-mark,.sidebar-add,.sidebar-foot{display:none}
  .nav{flex-direction:row;width:100%;justify-content:space-around;gap:0}
  .nav a{flex-direction:column;gap:3px;height:56px;padding:6px 0 0;font-size:10.5px;font-weight:600;flex:1;justify-content:center;border-radius:0;background:none!important;position:relative}
  .nav a svg{width:22px;height:22px}
  .nav a.on{color:var(--text)}
  .nav a .count{position:absolute;top:4px;left:calc(50% + 6px);font-size:10px;padding:0 5px;min-width:16px;line-height:16px}
  .main{margin:0;padding:calc(18px + var(--safe-t)) 16px calc(96px + var(--safe-b))}
  .page-head{margin-bottom:18px;align-items:center}
  .page-head .head-actions .btn.icon-only-m span{display:none}
  .page-head .head-actions .btn.icon-only-m{width:40px;padding:0}
  .page-head .head-actions .btn-primary{height:40px;padding:0 14px}
  .stats{gap:6px}
  .section-head{flex-wrap:wrap}
  .section-head .chips{width:100%}
  .stats.stats-4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .stats.stats-4 .stat-value{font-size:20px}
  .stat{padding:10px 9px;border-radius:10px}
  .stat-value{font-size:21px;margin-top:4px}
  .stat-value.money{font-size:21px}
  .stat.stat-wide{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:11px 12px}
  .stat.stat-wide .stat-value{margin-top:0;font-size:19px;white-space:nowrap}
  .stat.stat-wide .stat-label{min-width:0}
  .stat.stat-wide .stat-sub,.stat.stat-wide .stat-sub-keep{display:none}
  .stat-label{font-size:11.5px;gap:5px}
  .stat-label .dot{width:6px;height:6px}
  .stat-sub,.l-long{display:none}
  .l-short{display:inline}
  .page-head h1{font-size:22px;white-space:nowrap}
  .page-head>div:first-child{min-width:0}
  .page-head .head-actions{flex-shrink:0}
  .page-head p{font-size:13px}
  .section{margin-top:24px}
  .search{max-width:none}
  .attn{padding:14px}
  .grid-2{grid-template-columns:1fr 1fr}
  .rule-grid{grid-template-columns:1fr}
  .sheet-layer{align-items:flex-end}
  .sheet{width:100%;max-height:calc(100dvh - 40px - var(--safe-t));border-radius:18px 18px 0 0;border-bottom:0;animation:up .3s var(--ease)}
  .sheet-grip{display:block;width:38px;height:5px;border-radius:3px;background:var(--border-strong);margin:8px auto 0}
  .sheet-head{padding:10px 12px 8px 18px}
  .sheet-body{padding:4px 18px 18px}
  .toasts{bottom:calc(80px + var(--safe-b))}
  .hide-mobile{display:none!important}
  .profile h1{font-size:23px}
}
@media (min-width:761px){.show-mobile{display:none!important}}
