/* =====================================================================
   Deevolt member dashboard · compact, mobile first
   Sidebar = slide-in drawer below 1024px, fixed on the left above.
   ===================================================================== */

/* Self-hosted fonts (no Google Fonts needed) */
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/outfit-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/outfit-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/outfit-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 100 1000; font-display: swap; src: url('../fonts/dm-sans-latin-wght-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 100 1000; font-display: swap; src: url('../fonts/dm-sans-latin-ext-wght-normal.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Caveat'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/caveat-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  --g: #2E7D32; --gd: #1B5E20; --gl: #E8F3E6; --g2: #74C27A; --g3: #CFE5CC;
  --cream: #FCF1E6; --cream2: #F3E6D6; --bg: #F6F3EE; --card: #FFFFFF;
  --line: #EAE4DA; --ink: #1E1B18; --muted: #6B645C; --soft: #FAF7F2; --track: #F1ECE4;
  --or: #E8621A; --ort: #B4470F; --orl: #FDEBDD;
  --amber: #F2C94C; --amberl: #FFF4D6; --ambert: #7A5A00;
  --red: #B42318; --redl: #FDECEA; --blue: #1E4B86; --bluel: #E4ECF8;
  --radius: 12px;
  --sidebar: 236px;
  --appbar: 52px;
  --tabbar: 58px;
  --font: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --head: 'Outfit', 'DM Sans', system-ui, sans-serif;
  --script: 'Caveat', cursive;
  --shadow: 0 1px 2px rgba(30, 27, 24, .04);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 13.5px; line-height: 1.45; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: var(--g); text-decoration: none; }
a:hover { color: var(--gd); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.ic { flex-shrink: 0; }
.min0 { min-width: 0; }
.between { justify-content: space-between; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
:focus-visible { outline: 2px solid var(--g); outline-offset: 2px; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 999px; }
.skip-link:focus { left: 8px; color: #fff; }
.stack { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

/* ---------------------------------------------------------- layout */
.app { min-height: 100vh; }
.shell { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.main { flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 0 calc(var(--tabbar) + 16px + env(safe-area-inset-bottom)); }

/* ---------------------------------------------------------- app bar */
.appbar { position: sticky; top: 0; z-index: 30; height: calc(var(--appbar) + env(safe-area-inset-top)); display: flex; align-items: center; gap: 2px; padding: env(safe-area-inset-top) 6px 0; background: #fff; border-bottom: 1px solid var(--line); }
.appbar-logo { flex: 1; min-width: 0; display: flex; align-items: center; padding-left: 2px; }
.appbar-logo img { height: 23px; width: auto; }
.appbar-title { flex: 1; min-width: 0; font-family: var(--head); font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar-title-desktop { display: none; }
.appbar-actions { display: flex; align-items: center; flex-shrink: 0; }
.appbar-avatar { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }
.icon-btn { position: relative; flex-shrink: 0; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; background: transparent; color: var(--ink); padding: 0; }
.icon-btn:hover { background: var(--soft); color: var(--ink); }
.icon-btn .dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 999px; background: #E53935; border: 2px solid #fff; }
.icon-btn-line { border: 1px solid var(--line); background: #fff; }

/* ---------------------------------------------------------- top marquee */
.ticker { overflow: hidden; background: var(--g); color: #fff; height: calc(28px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); display: flex; align-items: center; }
.ticker-track { display: flex; width: max-content; animation: ticker 32s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-set { display: flex; align-items: center; flex-shrink: 0; }
.ticker-item { font-family: var(--head); font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.ticker-dot { margin: 0 14px; opacity: .6; font-size: 10px; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

/* ---------------------------------------------------------- sidebar / drawer */
.sidebar { position: fixed; z-index: 50; top: 0; bottom: 0; left: 0; width: min(272px, 82vw); display: flex; flex-direction: column; background: #fff; border-radius: 0 20px 20px 0; box-shadow: 8px 0 32px rgba(24, 21, 18, .18); transform: translateX(-105%); transition: transform .25s ease; visibility: hidden; }
.sidebar.is-open { transform: none; visibility: visible; }
.drawer-scrim { position: fixed; inset: 0; z-index: 45; background: rgba(24, 21, 18, .5); }
body.drawer-open { overflow: hidden; }
.sidebar-top { height: 56px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 6px 0 16px; border-bottom: 1px solid var(--line); }
.sidebar-logo img { height: 25px; width: auto; }
.sidebar-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 10px 10px 10px; }
.sidebar-user { background: var(--cream); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.sidebar-user-row { display: flex; align-items: center; gap: 10px; }
.sidebar-user-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-id { font-size: 12px; color: var(--muted); }
.sidebar-user-bal { font-family: var(--head); font-weight: 700; font-size: 14px; color: var(--gd); }
.sidebar-bottom { flex-shrink: 0; padding: 6px 10px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }

.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-link { width: 100%; min-height: 40px; display: flex; align-items: center; gap: 10px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font-size: 14px; font-weight: 500; text-align: left; }
.nav-link .ic { color: var(--muted); }
.nav-link:hover { background: var(--soft); color: var(--ink); }
.nav-link.is-active { background: var(--gl); color: var(--gd); font-weight: 700; }
.nav-link.is-active .ic { color: var(--g); }
.nav-label { flex: 1; min-width: 0; }
.nav-caret { transition: transform .2s; }
.nav-group.is-open > .nav-toggle { font-weight: 700; }
.nav-group.is-open > .nav-toggle .nav-caret { transform: rotate(180deg); }
.nav-sub { margin: 1px 0 4px 10px; padding: 3px 0; border-radius: 10px; background: var(--soft); display: flex; flex-direction: column; }
.nav-sublink { min-height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 10px 0 16px; border-radius: 8px; color: var(--ink); font-size: 13px; font-weight: 500; }
.nav-sublink > span:nth-child(2) { flex: 1; }
.nav-sublink:hover { color: var(--gd); background: #F3EEE6; }
.nav-sublink.is-active { color: var(--gd); font-weight: 700; background: var(--gl); }
.nav-dot { width: 5px; height: 5px; border-radius: 999px; background: #C9C0B4; flex-shrink: 0; margin-right: 4px; }
.nav-sublink.is-active .nav-dot { background: var(--g); }
.nav-logout, .nav-logout .ic { color: var(--red) !important; font-weight: 600; }

/* ---------------------------------------------------------- bottom tab bar (phones) */
.tabbar { position: fixed; z-index: 35; left: 0; right: 0; bottom: 0; height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding: 0 6px env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(24, 21, 18, .05); }
.tab { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 600; min-width: 0; }
.tab:hover { color: var(--gd); }
.tab.is-active { color: var(--g); }
.tab-label { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tab-main .tab-ic { width: 46px; height: 46px; margin-top: -24px; border-radius: 16px; background: var(--g); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 14px rgba(46, 125, 50, .35); border: 3px solid #fff; }
.tab-main { color: var(--gd); }

/* ---------------------------------------------------------- hero band */
.hero { position: relative; overflow: hidden; background: var(--cream); padding: 12px 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.hero-top { display: flex; flex-direction: column; gap: 12px; }
.hero > * { position: relative; }
.hero-ring { position: absolute !important; right: -56px; top: -56px; width: 130px; height: 130px; border-radius: 999px; border: 18px solid var(--cream2); pointer-events: none; }
.hero-text { display: flex; flex-direction: column; gap: 4px; }
.hero-title { font-family: var(--head); font-size: 19px; line-height: 1.2; font-weight: 700; }
.hero-sub { font-size: 12px; color: var(--muted); }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; }
.hero > .pill, .hero > .credits { align-self: flex-start; }

.eyebrow { display: flex; align-items: center; gap: 6px; font-family: var(--script); font-size: 17px; font-weight: 700; line-height: 1; color: var(--g); }
.eyebrow-line { display: inline-block; width: 18px; height: 1.5px; background: currentColor; }
.eyebrow-white { color: #fff; font-size: 16px; }
.eyebrow-white .eyebrow-line { width: 14px; opacity: .8; }

.section { padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.section-label { padding-top: 4px; }
.dash-grid, .two-col { display: flex; flex-direction: column; gap: 10px; }
.dash-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

/* ---------------------------------------------------------- cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card-tight { gap: 4px; padding-bottom: 4px; }
.card-cream { background: var(--cream); border-color: transparent; box-shadow: none; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.card-head-text { min-width: 0; flex: 1; }
.card-head h2 { font-family: var(--head); font-size: 14px; font-weight: 600; line-height: 1.3; }
.card-head p { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.card-head-action { flex-shrink: 0; display: flex; align-items: center; gap: 6px; }
.more-link { display: inline-flex; align-items: center; gap: 1px; min-height: 28px; font-size: 13px; font-weight: 600; white-space: nowrap; }

/* ---------------------------------------------------------- green feature card */
.feature { position: relative; overflow: hidden; border-radius: 14px; background: var(--g); color: #fff; padding: 12px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 8px 20px rgba(46, 125, 50, .22); }
.feature > * { position: relative; }
.feature-ring { position: absolute !important; right: -34px; top: -50px; width: 140px; height: 140px; border-radius: 999px; border: 18px solid rgba(255, 255, 255, .07); pointer-events: none; }
.feature-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.feature-amount { font-family: var(--head); font-size: 25px; line-height: 1; font-weight: 700; margin-top: 6px; overflow-wrap: anywhere; }
.feature-sub { font-size: 11.5px; opacity: .92; margin-top: 3px; }
.feature-stats, .feature-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.feature-stat { border-radius: 8px; background: rgba(255, 255, 255, .12); padding: 6px 9px; min-width: 0; }
.feature-stat span { display: block; font-size: 11px; opacity: .9; }
.feature-stat strong { display: block; font-family: var(--head); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.bars { display: flex; gap: 6px; align-items: flex-end; }
.bar-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bar-area { height: 58px; width: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.bar { width: 100%; max-width: 18px; border-radius: 6px 6px 2px 2px; background: rgba(255, 255, 255, .28); }
.bar-col.is-now .bar { background: #fff; }
.bar-tag { font-size: 10px; font-weight: 700; color: var(--gd); background: #fff; border-radius: 999px; padding: 1px 6px; white-space: nowrap; }
.bar-label { font-size: 10px; opacity: .85; }
.bar-col.is-now .bar-label { font-weight: 700; opacity: 1; }

/* ---------------------------------------------------------- buttons */
.btn { min-height: 38px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 999px; border: 1px solid transparent; font-size: 13px; font-weight: 700; line-height: 1.1; text-align: center; white-space: nowrap; }
.btn-primary { background: var(--g); color: #fff; }
.btn-primary:hover { background: var(--gd); color: #fff; }
.btn-outline { background: #fff; color: var(--g); border-color: var(--g); }
.btn-outline:hover { background: var(--gl); color: var(--gd); }
.btn-soft { background: var(--gl); color: var(--gd); }
.btn-white { background: #fff; color: var(--gd); }
.btn-white:hover { color: var(--gd); background: #F2F8F1; }
.btn-ghost-white { background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, .7); }
.btn-ghost-white:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.btn-block { width: 100%; }
.btn-sm { min-height: 30px; padding: 0 11px; font-size: 12px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.btn-row > .btn { min-width: 0; padding: 0 10px; }

/* ---------------------------------------------------------- quick actions */
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.quick a { min-width: 0; min-height: 60px; padding: 6px 2px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; color: var(--ink); font-size: 11.5px; font-weight: 600; text-align: center; line-height: 1.15; }
.quick a:hover { border-color: var(--g2); }
.tile { width: 28px; height: 28px; border-radius: 999px; display: flex; align-items: center; justify-content: center; background: var(--gl); color: var(--g); flex-shrink: 0; }
.tile-solid { background: var(--g); color: #fff; }
.tile-sq { border-radius: 9px; width: 32px; height: 32px; }
.tile-or { background: var(--orl); color: var(--ort); }
.tile-grey { background: #EFEBE5; color: var(--ink); }
.tile-amber { background: var(--amberl); color: var(--ambert); }

/* ---------------------------------------------------------- pills & chips */
.pill { display: inline-flex; align-items: center; height: 21px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; flex-shrink: 0; }
.pill-green { background: var(--gl); color: var(--gd); }
.pill-amber { background: var(--amberl); color: var(--ambert); }
.pill-grey { background: #EFEBE5; color: #4A443D; }
.pill-red { background: var(--redl); color: var(--red); }
.pill-left { background: var(--gl); color: var(--gd); height: 19px; padding: 0 7px; font-size: 10.5px; }
.pill-right { background: var(--orl); color: var(--ort); height: 19px; padding: 0 7px; font-size: 10.5px; }
.rank-chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--amberl); color: var(--ambert); font-size: 11px; font-weight: 700; white-space: nowrap; }
.id-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 11px; font-weight: 700; white-space: nowrap; }
.live { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--g); white-space: nowrap; }
.live::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.live.off { color: var(--muted); }

.seg { display: flex; gap: 3px; padding: 3px; border-radius: 999px; background: var(--track); }
.seg button, .seg a { flex: 1 1 0; min-width: 0; min-height: 34px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; padding: 0 6px; white-space: nowrap; }
.seg .is-active { background: #fff; color: var(--gd); font-weight: 700; box-shadow: 0 1px 3px rgba(30, 27, 24, .12); }

/* ---------------------------------------------------------- avatars */
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; flex-shrink: 0; font-family: var(--head); font-weight: 700; }
.avatar-sm { width: 30px; height: 30px; font-size: 11.5px; }
.avatar-md { width: 32px; height: 32px; font-size: 12px; }
.avatar-lg { width: 44px; height: 44px; font-size: 15px; }
.avatar-xl { width: 52px; height: 52px; font-size: 18px; }
.avatar-soft { background: var(--gl); color: var(--gd); }
.avatar-solid { background: var(--g); color: #fff; }
.avatar-right { background: var(--orl); color: var(--ort); }
.avatar-grey { background: #EFEBE5; color: var(--muted); }

/* ---------------------------------------------------------- lists */
.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 10px; padding: 8px 0; min-width: 0; color: var(--ink); }
.row + .row { border-top: 1px solid var(--line); }
a.row:hover { color: var(--ink); background: linear-gradient(90deg, transparent, var(--soft), transparent); }
.row-main { flex: 1; min-width: 0; }
.row-title { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; font-weight: 600; }
.row-title > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { font-size: 11.5px; color: var(--muted); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-wrap .row-title > span:first-child, .row-wrap .row-sub { white-space: normal; }
.row-end { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }
.amount { font-family: var(--head); font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.amount.plus { color: var(--g); }
.day-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--muted); padding: 8px 0 0; text-transform: uppercase; }
.list-note { font-size: 12px; color: var(--muted); padding: 6px 0 8px; }

/* record cards: one per statement row, key/values in a small grid */
.rec { border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; display: flex; flex-direction: column; gap: 6px; background: #fff; }
.rec-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.rec-top b { font-size: 13.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 8px; }
.rec-kv div { min-width: 0; }
.rec-kv span { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; color: var(--muted); text-transform: uppercase; }
.rec-kv strong { display: block; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.rec-text { font-size: 13px; color: var(--ink); }
.rec-reply { font-size: 12.5px; padding: 8px 10px; border-radius: 8px; background: var(--gl); color: var(--gd); }

.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 9px 10px; border-radius: 10px; background: var(--soft); margin: 0; }
.kv-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kv dt, .kv .k { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; color: var(--muted); text-transform: uppercase; }
.kv dd, .kv .v { margin: 1px 0 0; font-size: 12.5px; font-weight: 700; overflow-wrap: anywhere; }
.kv > div { min-width: 0; }
.kv .full { grid-column: 1 / -1; }

/* bank detail lines with copy buttons */
.lines { display: flex; flex-direction: column; }
.line { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; padding: 4px 0; }
.line + .line { border-top: 1px dashed var(--line); }
.line span { font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--muted); text-transform: uppercase; flex-shrink: 0; }
.line b { font-size: 13.5px; text-align: right; overflow-wrap: anywhere; min-width: 0; }
.line-end { display: flex; align-items: center; gap: 6px; min-width: 0; justify-content: flex-end; }

/* ---------------------------------------------------------- binary block */
.you-node { display: flex; flex-direction: column; align-items: center; }
.you-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--cream); font-size: 12px; font-weight: 700; }
.you-lines { width: 100%; height: 26px; }
.legs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.leg { min-width: 0; border-radius: 10px; border: 1.5px solid var(--g); padding: 8px 9px; display: flex; flex-direction: column; gap: 6px; }
.leg-right { border-color: var(--or); }
.leg-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; color: var(--gd); }
.leg-right .leg-head { color: var(--ort); }
.leg-badge { width: 20px; height: 20px; border-radius: 6px; background: var(--gl); display: flex; align-items: center; justify-content: center; font-family: var(--head); font-size: 11px; }
.leg-right .leg-badge { background: var(--orl); }
.leg-count { font-family: var(--head); font-size: 19px; font-weight: 700; line-height: 1; }
.leg-count small { font-family: var(--font); font-size: 11px; font-weight: 400; color: var(--muted); margin-left: 3px; }
.leg-stat { display: flex; justify-content: space-between; gap: 4px; font-size: 11.5px; }
.leg-stat span { color: var(--muted); white-space: nowrap; }
.leg-stat b { white-space: nowrap; }
.split-labels { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; font-weight: 600; }
.split { display: flex; gap: 3px; height: 8px; }
.split > div { border-radius: 999px; }
.tip { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: 9px; background: #FFF8EC; font-size: 12px; line-height: 1.45; }
.tip .ic { color: var(--ort); margin-top: 1px; }
.tip-green { background: var(--gl); }
.tip-green .ic { color: var(--g); }
.tip-blue { background: var(--bluel); }
.tip-blue .ic { color: var(--blue); }
.tip-red { background: var(--redl); color: var(--red); }
.tip-red .ic { color: var(--red); }

.ring-row { display: flex; align-items: center; gap: 14px; }
.ring { width: 72px; height: 72px; flex-shrink: 0; }
.ring-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.status-big { font-family: var(--head); font-size: 20px; font-weight: 700; letter-spacing: .02em; }
.status-big.ok { color: var(--g); }
.status-big.wait { color: #C77700; }
.dots { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.dots span { display: inline-flex; align-items: center; gap: 5px; }
.dots i { width: 8px; height: 8px; border-radius: 999px; background: var(--g); }
.dots i.r { background: var(--or); }

.donut-wrap { display: flex; align-items: center; gap: 14px; }
.donut { width: 96px; height: 96px; flex-shrink: 0; }
.legend { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.legend-row { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--ink); }
.legend-sw { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.legend-row span { flex: 1; min-width: 0; font-size: 12.5px; }
.legend-row b { font-family: var(--head); font-size: 14px; white-space: nowrap; }

.ladder { position: relative; display: flex; justify-content: space-between; padding: 6px 0 0; }
.ladder-track, .ladder-fill { position: absolute; top: 17px; left: 26px; height: 3px; border-radius: 3px; }
.ladder-track { right: 26px; background: #EFE9E0; }
.ladder-fill { background: var(--g); }
.ladder-step { position: relative; width: 52px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); text-align: center; }
.ladder-dot { width: 24px; height: 24px; border-radius: 999px; display: flex; align-items: center; justify-content: center; }
.ladder-step.done .ladder-dot { background: var(--g); color: #fff; }
.ladder-step.done, .ladder-step.now { color: var(--ink); }
.ladder-step.now { font-weight: 700; }
.ladder-step.now .ladder-dot { width: 30px; height: 30px; margin: -3px 0; background: var(--amber); color: #5C4400; box-shadow: 0 0 0 3px var(--amberl); }
.ladder-step.todo .ladder-dot { background: #fff; border: 2px dashed #C9C0B4; }

.progress { display: flex; flex-direction: column; gap: 5px; }
.progress-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.progress-top span:first-child { font-weight: 600; }
.progress-top span:last-child { color: var(--muted); white-space: nowrap; }
.progress-top b { color: var(--ink); }
.track { height: 7px; border-radius: 999px; background: var(--track); overflow: hidden; }
.track > div { height: 100%; border-radius: 999px; background: var(--g); }
.track-or > div { background: var(--or); }

.link-box { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 3px 4px 3px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); min-width: 0; }
.link-box .ic { color: var(--muted); }
.link-text { flex: 1; min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-btn { width: 34px; height: 34px; border-radius: 999px; border: 0; background: var(--gl); color: var(--gd); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.copy-btn-sm { width: 28px; height: 28px; border-radius: 8px; }
.share-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }

/* ---------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -12px; padding: 0 12px 8px; }
.table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 12.5px; }
.table th { text-align: left; padding: 8px 10px; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: var(--soft); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th:first-child { border-radius: 8px 0 0 8px; }
.table th:last-child { border-radius: 0 8px 8px 0; }
.table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table .t-subj { font-weight: 600; min-width: 110px; }
.table .t-text { min-width: 170px; max-width: 260px; color: var(--ink); }

/* ---------------------------------------------------------- stat tiles */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stats-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 7px 9px; }
.stat span { display: block; font-size: 11px; color: var(--muted); }
.stat strong { display: block; font-family: var(--head); font-size: 14px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat small { display: block; font-size: 11px; color: var(--muted); }
.stat-green { background: var(--gl); border-color: transparent; }
.stat-green span, .stat-green strong { color: var(--gd); }
.stat-or { background: var(--orl); border-color: transparent; }
.stat-or span, .stat-or strong { color: var(--ort); }

/* team leg summary (tree view) */
.leg-sum { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.leg-box { min-width: 0; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--g); border-radius: 10px; padding: 8px 9px; display: flex; flex-direction: column; gap: 4px; }
.leg-box.r { border-left-color: var(--or); }
.leg-box > span { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; color: var(--muted); text-transform: uppercase; }
.leg-box > strong { font-family: var(--head); font-size: 17px; line-height: 1.1; }
.leg-box > strong small { font-family: var(--font); font-size: 11px; font-weight: 500; color: var(--muted); }
.leg-box .ai { display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: 11px; font-weight: 600; }
.leg-box .ai .a { color: var(--g); }
.leg-box .ai .i { color: var(--red); }
.leg-box .bv { font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 5px; margin-top: 2px; }
.leg-box .bv b { color: var(--ink); font-family: var(--head); }

/* ---------------------------------------------------------- search box */
.searchbar { display: flex; gap: 6px; }
.search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); }
.search:focus-within { border-color: var(--g); box-shadow: 0 0 0 3px rgba(46, 125, 50, .12); }
.search .ic { color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 16px; min-height: 36px; }

/* ---------------------------------------------------------- tree */
.tree-card { padding: 12px 0 14px; }
.tree-card > .tree-bar, .tree-card > .tree-legend { padding: 0 12px; }
.tree-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.tree-bar-info { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); min-width: 0; }
.tree-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tree { position: relative; min-width: 320px; height: 382px; margin: 0 auto; max-width: 500px; }
.tree-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.tree-lines path { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.tree-side { position: absolute; top: 96px; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.node { position: absolute; width: 25%; max-width: 100px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 3px 2px 5px; border: 0; border-radius: 12px; background: transparent; text-align: center; color: var(--ink); }
.node:hover { background: var(--soft); color: var(--ink); }
.node.is-selected { background: var(--cream); box-shadow: 0 0 0 2px var(--g); }
.node-av { width: 42px; height: 42px; border-radius: 999px; background: var(--gl); color: var(--gd); border: 2px solid var(--g); display: flex; align-items: center; justify-content: center; font-family: var(--head); font-weight: 700; font-size: 13px; margin-bottom: 2px; }
.node.is-you .node-av { background: var(--g); color: #fff; border-color: var(--amber); }
.node.is-off .node-av { background: #EFEBE5; color: var(--muted); border-color: #C9C0B4; }
.node.is-empty .node-av { background: #fff; border: 2px dashed #B9AFA2; color: var(--muted); }
.node-name { max-width: 100%; font-size: 11px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.node-id, .node-count { font-size: 10px; color: var(--muted); white-space: nowrap; }
.node-count b:first-child { color: var(--gd); }
.node-count b:last-child { color: var(--ort); }
.node-more { position: absolute; transform: translateX(-50%); width: 28px; height: 28px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--muted); display: flex; align-items: center; justify-content: center; padding: 0; }
.tree-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 12px; font-size: 11px; color: var(--muted); }
.tree-legend span { display: inline-flex; align-items: center; gap: 5px; }
.lg { width: 10px; height: 10px; border-radius: 999px; }
.lg-on { background: var(--gl); border: 2px solid var(--g); }
.lg-off { background: #EFEBE5; border: 2px solid #C9C0B4; }
.lg-empty { border: 2px dashed #B9AFA2; }

/* grid view level header */
.level-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--soft); border-left: 4px solid var(--g); font-size: 12.5px; }
.level-bar b { font-family: var(--head); font-size: 13px; letter-spacing: .03em; }

/* ---------------------------------------------------------- forms */
.form { display: flex; flex-direction: column; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field label, .field .label { font-size: 12.5px; font-weight: 700; }
.field label small, .field .label small { font-weight: 500; color: var(--muted); }
.input, .select, .textarea { width: 100%; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); font-size: 16px; color: var(--ink); outline: none; }
.textarea { min-height: 90px; padding: 10px 12px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B645C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--g); background: #fff; box-shadow: 0 0 0 3px rgba(46, 125, 50, .12); }
.input[readonly] { background: #F3F0EB; color: var(--muted); }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 46px; }
.input-wrap .icon-btn { position: absolute; right: 1px; top: 1px; color: var(--muted); }
.input-prefix { display: flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.input-prefix:focus-within { border-color: var(--g); background: #fff; box-shadow: 0 0 0 3px rgba(46, 125, 50, .12); }
.input-prefix input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 16px; min-height: 40px; }
.input-prefix .pre { font-family: var(--head); font-weight: 700; color: var(--muted); }
.hint { font-size: 11.5px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.form-sub { display: flex; align-items: center; gap: 6px; font-family: var(--head); font-size: 13px; font-weight: 600; color: var(--gd); letter-spacing: .03em; padding-top: 4px; border-top: 1px solid var(--line); margin-top: 2px; padding-top: 12px; }
.amount-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.amount-chips button { min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 12.5px; font-weight: 600; }
.amount-chips button:hover { border-color: var(--g); color: var(--gd); }
.upload { position: relative; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 10px; border: 1.5px dashed #C9C0B4; border-radius: 12px; background: var(--soft); cursor: pointer; min-width: 0; }
.upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload:hover { border-color: var(--g); }
.upload-text { flex: 1; min-width: 0; }
.upload-text b { display: block; font-size: 13px; }
.upload-text span { display: block; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; line-height: 1.45; }
.check input { width: 18px; height: 18px; margin: 0; flex-shrink: 0; accent-color: var(--g); }
.net-box { display: flex; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--soft); font-size: 12.5px; }
.net-box b { font-family: var(--head); font-size: 15px; color: var(--gd); }
.net-lines { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 10px; background: var(--soft); font-size: 12.5px; }
.net-lines div { display: flex; justify-content: space-between; gap: 8px; }
.net-lines .tot { border-top: 1px solid var(--line); padding-top: 5px; margin-top: 2px; font-weight: 700; }
.net-lines .tot b { font-family: var(--head); font-size: 15px; color: var(--gd); }

/* ---------------------------------------------------------- product */
.product-media { background: var(--cream); border-radius: 12px; display: flex; align-items: center; justify-content: center; padding: 10px; }
.product-media img { width: 100%; max-width: 180px; height: auto; }
.spec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.spec { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px; border-radius: 10px; background: var(--soft); font-size: 12px; font-weight: 600; }
.spec .ic { color: var(--g); }
.price-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.price { font-family: var(--head); font-size: 19px; font-weight: 700; }
.credits { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-size: 12px; font-weight: 600; }
.credits b { font-family: var(--head); font-size: 14px; color: var(--gd); }

.qr-box { width: 140px; height: 140px; margin: 0 auto; border-radius: 12px; border: 2px solid var(--ink); background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 11.5px; text-align: center; padding: 10px; }
.qr-box img { width: 100%; height: 100%; object-fit: contain; }

/* steps */
.steps { display: flex; flex-direction: column; }
.step { display: flex; gap: 12px; }
.step-rail { display: flex; flex-direction: column; align-items: center; }
.step-dot { width: 26px; height: 26px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-family: var(--head); font-weight: 700; font-size: 12px; background: var(--g); color: #fff; flex-shrink: 0; }
.step-line { width: 2px; flex: 1; min-height: 14px; margin: 3px 0; background: var(--g3); }
.step-body { padding: 3px 0 12px; min-width: 0; }
.step-body b { display: block; font-size: 13.5px; }
.step-body span { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }

.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.contact { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 6px; border-radius: 12px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-size: 12px; font-weight: 600; text-align: center; }
.contact:hover { border-color: var(--g2); color: var(--ink); }

.empty { text-align: center; padding: 22px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty .tile { width: 54px; height: 54px; }
.empty h2 { font-family: var(--head); font-size: 19px; }
.empty p { color: var(--muted); font-size: 13px; max-width: 300px; }

.profile-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.profile-head .min0 { flex: 1; }
.profile-name { font-family: var(--head); font-size: 16px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.profile-sub { font-size: 12px; color: var(--muted); margin-top: 2px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.avatar-edit { position: relative; flex-shrink: 0; }
.avatar-edit .cam { position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--gd); display: flex; align-items: center; justify-content: center; }

.tagline { margin: 4px 0 12px; text-align: center; font-family: var(--script); font-size: 17px; font-weight: 700; color: var(--g); }

.toast { position: fixed; z-index: 80; left: 50%; bottom: calc(var(--tabbar) + 14px + env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }

/* ---------------------------------------------------------- login */
.auth { min-height: 100vh; display: flex; flex-direction: column; background: var(--cream); }
.auth-top { position: relative; overflow: hidden; padding: 22px 18px 58px; }
.auth-top .hero-ring { right: -50px; top: -50px; }
.auth-top img { height: 28px; width: auto; position: relative; }
.auth-top .eyebrow { margin-top: 28px; }
.auth-title { font-family: var(--head); font-size: 26px; font-weight: 700; line-height: 1.15; margin-top: 8px; position: relative; }
.auth-sub { font-size: 13px; color: var(--muted); margin-top: 5px; position: relative; }
.auth-card { flex: 1; margin-top: -36px; background: #fff; border-radius: 24px 24px 0 0; padding: 22px 18px 26px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 -8px 24px rgba(30, 27, 24, .06); }
.auth-foot { font-size: 12.5px; color: var(--muted); text-align: center; }

/* =====================================================================
   Small phones (≤ 360px)
   ===================================================================== */
@media (max-width: 360px) {
  .hero-title { font-size: 20px; }
  .feature-amount { font-size: 27px; }
  .quick { gap: 6px; }
  .quick a { font-size: 10.5px; }
  .stat { padding: 8px; }
  .stat strong { font-size: 14px; }
  .donut-wrap { flex-direction: column; align-items: stretch; }
  .donut { margin: 0 auto; }
  .ladder-step { width: 46px; font-size: 10px; }
  .kv-3, .rec-kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec-grid { grid-template-columns: minmax(0, 1fr); }
}

/* =====================================================================
   Tablet
   ===================================================================== */
@media (min-width: 640px) {
  .section { padding: 12px 16px; gap: 12px; }
  .hero { padding: 14px 16px; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid .full { grid-column: 1 / -1; }
  .rec-kv { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* =====================================================================
   Desktop: sidebar always visible, no bottom tab bar
   ===================================================================== */
@media (min-width: 1024px) {
  .sidebar { transform: none; visibility: visible; width: var(--sidebar); border-radius: 0; box-shadow: none; border-right: 1px solid var(--line); transition: none; }
  .sidebar-close, .appbar-menu, .drawer-scrim, .tabbar { display: none !important; }
  .shell { margin-left: var(--sidebar); }
  .appbar { padding: 0 20px; }
  .appbar-logo { display: none; }
  .appbar-title-desktop { display: block; }
  body.drawer-open { overflow: auto; }
  .main { padding: 0 6px 24px; }
  .hero { margin: 14px 16px 0; border-radius: 14px; padding: 16px 18px; }
  .hero-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: center; }
  .section { padding: 14px 16px; }
  .dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
  .two-col { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 12px; align-items: start; }
  .two-col > * { min-width: 0; }
  .toast { bottom: 24px; }
  .auth { flex-direction: row; }
  .auth-top { flex: 1; padding: 44px; display: flex; flex-direction: column; justify-content: center; }
  .auth-top .hero-ring { width: 380px; height: 380px; right: -110px; top: -110px; border-width: 44px; }
  .auth-title { font-size: 40px; }
  .auth-card { flex: 0 0 440px; margin: 0; border-radius: 0; justify-content: center; padding: 44px; }
}

/* =====================================================================
   Live panel additions (messages, photos, busy buttons, small bits)
   ===================================================================== */
.flash { display: flex; align-items: flex-start; gap: 8px; margin: 10px 12px 0; padding: 10px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; line-height: 1.45; }
.flash-green { background: var(--gl); color: var(--gd); }
.flash-red { background: var(--redl); color: var(--red); }
.flash-amber { background: var(--amberl); color: var(--ambert); }
.flash .ic { margin-top: 1px; }
.auth-card .flash { margin: 10px 0 0; }
@media (min-width: 1024px) { .flash { margin: 14px 20px 0; } }
.avatar-photo { overflow: hidden; background: var(--gl); }
.avatar-photo img { width: 100%; height: 100%; object-fit: cover; }
.btn.is-busy { opacity: .6; pointer-events: none; }
.field .hint, .form-hint { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.locked-note { display: flex; gap: 6px; align-items: center; font-size: 11.5px; color: var(--muted); }
.locked-note .ic { color: var(--muted); }
.news-item { padding: 10px 0; }
.news-item + .news-item { border-top: 1px dashed var(--line); }
.news-item p { font-size: 13.5px; overflow-wrap: anywhere; }
.news-item span { font-size: 11.5px; color: var(--muted); }
.amount-in { color: var(--g); }
.amount-out { color: var(--red); }
.pager-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px 12px; font-size: 12px; color: var(--muted); }

/* Franchise panel: signature box */
.sign-box { position: relative; }
.sign-box canvas { display: block; width: 100%; height: 180px; background: #fff; border: 2px dashed var(--g3); border-radius: 12px; touch-action: none; cursor: crosshair; }
.sign-clear { position: absolute; top: 8px; right: 8px; }
