:root {
    --ink: #1a1814;
    --muted: #6d655c;
    --line: #e6dfd4;
    --paper: #fffdfb;
    --canvas: #f6f3ee;
    --navy: #1c2430;
    --gold: #a6843d;
    --gold-soft: #f4ead4;
    --leaf: #1d6b45;
    --danger: #9c3419;
    --shadow: 0 1px 0 rgba(28, 36, 48, 0.04);
    --radius: 16px;
    --display: "Montserrat", "Segoe UI", sans-serif;
    --sans: "Nunito Sans", "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--canvas);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.5;
    font-variant-numeric: tabular-nums lining-nums;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--canvas); }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: var(--ink); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.shell, .side, .mobile-bar, .gate, table, .btn, button, .stat, .place-card, .row-card, .list-card, .step-grid, .tag, .status, .eyebrow, .list-title, .scope {
    font-family: var(--display);
}
.page-head p, .hero p, .hint, .help, .lead, .gate-panel .field span { font-family: var(--sans); }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.shell { width: min(1040px, calc(100% - 28px)); margin: 0 auto; padding: 22px 0 40px; }
.muted, .help { color: var(--muted); }

.app { min-height: 100vh; }
.main {
    min-height: 100vh;
    background:
        radial-gradient(720px 240px at 100% -80px, rgba(166, 132, 61, 0.16), transparent 58%),
        var(--canvas);
}
.side {
    position: fixed; inset: 0 auto 0 0; z-index: 40; width: min(280px, 86vw);
    display: flex; flex-direction: column; gap: 8px; padding: 18px 14px 14px;
    background: var(--navy); color: #f6f3ee;
    transform: translateX(-105%); transition: transform 0.2s ease;
}
.side.open { transform: none; }
.side-backdrop { position: fixed; inset: 0; z-index: 35; background: rgba(28, 36, 48, 0.45); }
.side-backdrop[hidden] { display: none; }
.side .brand { display: flex; gap: 10px; align-items: center; text-decoration: none; min-width: 0; padding: 0 6px 8px; }
.side .logo, .mobile-bar .logo { height: 42px; width: auto; display: block; background: transparent; }
.side .brand-name, .mobile-bar .brand-name { display: grid; line-height: 1; min-width: 0; }
.side .brand-name strong { font-family: var(--display); font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; color: #fff; }
.side .brand-name span { margin-top: 4px; color: #e4d2a4; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.side-nav { display: grid; align-content: start; gap: 2px; overflow: auto; flex: 1; padding-right: 2px; }
.side-label { margin: 14px 10px 4px; color: rgba(246, 243, 238, 0.45); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.side-nav a, .side-foot button {
    display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
    min-height: 42px; padding: 8px 10px; border: 0; border-radius: 12px;
    background: transparent; color: rgba(246, 243, 238, 0.78); text-decoration: none;
    font-weight: 600; cursor: pointer;
}
.side-nav a svg, .side-foot button svg {
    width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor;
    stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.side-nav a:hover, .side-foot button:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.side-nav a.active { background: rgba(166, 132, 61, 0.28); color: #f4ead4; }
.side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.side-foot .who { margin: 0 10px 6px; }
.side-foot .who strong { display: block; color: #fff; }
.side-foot .who small { display: block; color: rgba(246, 243, 238, 0.55); font-weight: 600; }
.mobile-bar {
    position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px;
    padding: 10px 14px; background: rgba(246, 243, 238, 0.94); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}
.mobile-bar .brand { display: flex; gap: 8px; align-items: center; text-decoration: none; min-width: 0; }
.mobile-bar .brand-name strong { font-family: var(--display); font-size: 1.02rem; font-weight: 700; letter-spacing: -0.02em; }
.mobile-bar .brand-name span { margin-top: 2px; color: var(--muted); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.nav-toggle {
    width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper);
    display: grid; place-items: center; cursor: pointer; color: var(--navy);
}
.nav-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.panel, .stat, .shop-card, .row-card, .sheet {
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 24px rgba(28, 36, 48, 0.05);
}
.tone-sales { --tone: #2563eb; --wash: #e8f1ff; --ink-tone: #1e3a8a; }
.tone-spend { --tone: #ea580c; --wash: #fff1e6; --ink-tone: #9a3412; }
.tone-bank { --tone: #0284c7; --wash: #e7f5fc; --ink-tone: #0c4a6e; }
.tone-hala { --tone: #7c3aed; --wash: #f3e8ff; --ink-tone: #5b21b6; }
.tone-shop { --tone: #059669; --wash: #e8f7ef; --ink-tone: #065f46; }
.tone-users { --tone: #334155; --wash: #eef2f7; --ink-tone: #1e293b; }
.tone-home { --tone: #b45309; --wash: #fbf3e4; --ink-tone: #7a5a22; }
.sheet {
    margin-top: 6px; padding: 0; overflow: visible; border-top: 0;
    border-color: color-mix(in srgb, var(--tone, #a6843d) 24%, white);
    background: linear-gradient(165deg, var(--wash, #f8f1e3) 0%, #fffdfb 62%);
    box-shadow: 0 14px 30px color-mix(in srgb, var(--tone, #a6843d) 14%, transparent);
}
.sheet > header { display: flex; align-items: center; gap: 12px; padding: 16px 18px 2px; }
.sheet > header h2 { margin: 0; font-size: 1.05rem; color: var(--ink-tone, var(--ink)); }
.sheet > header p { margin: 3px 0 0; color: var(--muted); font-family: var(--sans); font-size: 0.92rem; }
.sheet > form { padding: 8px 18px 18px; }
.sheet .field input, .sheet .field select, .sheet .field textarea { background: #fff; }
[class*="tone-"] .title-ico { background: var(--tone); color: #fff; box-shadow: 0 8px 16px color-mix(in srgb, var(--tone) 30%, transparent); }
.list-card[class*="tone-"] .list-head {
    background: linear-gradient(90deg, var(--wash), #fff 78%);
    padding: 12px 14px;
    border-bottom: 1px solid color-mix(in srgb, var(--tone) 18%, white);
}
.list-card[class*="tone-"] .list-head h2 { color: var(--ink-tone); }
.list-card[class*="tone-"] th { background: color-mix(in srgb, var(--wash) 70%, #fff); color: var(--ink-tone); }
.hero .filter-field { flex: 0 1 11rem; max-width: 200px; }
.hero .filters .btn, .hero .filters input { min-height: 40px; border-radius: 10px; }
.add-drawer > .hint { margin: 0; padding: 0 18px 8px; }
.hero { padding: 4px 0 0; margin: 0 0 18px; }
.hero h1 { margin: 2px 0 8px; font-size: clamp(2.15rem, 5vw, 3.15rem); }
.hero p { margin: 0; max-width: 62ch; color: var(--muted); }
.hero p.scope { margin-top: 8px; color: var(--ink); font-weight: 650; }
.eyebrow { color: var(--gold); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.page-head { margin: 4px 0 16px; }
.page-head h1, .hero h1 { display: flex; align-items: center; gap: 12px; }
.page-head h1 { margin: 0 0 8px; font-size: clamp(1.7rem, 3.4vw, 2.15rem); }
.title-ico {
    flex: none; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
    background: var(--gold-soft); color: #6d5016;
}
.title-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hero h1 .title-ico { width: 48px; height: 48px; }
.list-filters .filter-field:first-child input:not([type="date"]) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%236d655c' stroke-width='1.8' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cpath d='m16 16 4 4'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: 10px center; background-size: 16px; padding-left: 34px;
}
.add-drawer > summary::before {
    content: ""; width: 28px; height: 28px; border-radius: 9px; flex: none;
    background: var(--gold-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%236d5016' stroke-width='1.8' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.page-head p { margin: 0; max-width: 62ch; color: var(--muted); }
.hint { display: block; color: var(--muted); font-size: 0.8rem; font-weight: 500; line-height: 1.4; }
.step-grid { display: grid; gap: 8px; margin-top: 10px; }
.step-grid a {
    display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink);
    background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; min-height: 52px;
}
.step-grid a:hover { border-color: #ddd4c6; background: #fff; }
.step-grid .mark {
    flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
    background: var(--wash, #eff6ff); color: var(--go, #1d4ed8);
}
.step-grid a.sales { --go: #1d4ed8; --wash: #eff6ff; }
.step-grid a.spend { --go: #c2410c; --wash: #fff7ed; }
.step-grid a.bank { --go: #0369a1; --wash: #f0f9ff; }
.step-grid a.hala { --go: #6d28d9; --wash: #f5f3ff; }
.step-grid .mark svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.step-grid strong { font-size: 0.95rem; font-weight: 650; letter-spacing: -0.02em; color: var(--ink); }
.list-title { margin: 26px 0 8px; font-size: 1.45rem; }
.panel > .list-title, .page-head .section-title { margin-top: 0; }
.page-head .section-title { align-items: center; }
.page-head .section-title h1 { margin: 0; }
.filter-field { display: grid; gap: 4px; flex: 1 1 11rem; min-width: 0; }
.filter-field span { font-size: 0.75rem; font-weight: 700; color: var(--muted); }
.filter-field input, .filter-field select { width: 100%; flex: none; }
.figure { text-align: right; flex: none; }
.figure span { display: block; color: var(--muted); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.figure strong { display: block; white-space: nowrap; }
.empty { color: var(--muted); }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-top: 16px; }
.filters input, .filters select, .field input, .field select, .field textarea {
    border: 1px solid var(--line); background: #fff; color: var(--ink); color-scheme: light;
    border-radius: 12px; padding: 12px 14px; min-height: 48px;
}
.filters input:focus, .filters select:focus, .field input:focus, .field select:focus, .field textarea:focus {
    outline: 2px solid #e4d2a4; border-color: var(--gold);
}
.filters input, .filters select { flex: 1 1 9.5rem; width: auto; min-width: 0; }
.field { display: grid; gap: 6px; margin-bottom: 12px; align-content: start; }
.field[hidden] { display: none !important; }
.field span { font-size: 0.78rem; font-weight: 650; color: var(--muted); letter-spacing: 0.01em; }
.field input, .field select, .field textarea { width: 100%; }
.form-grid { display: grid; }
.form-grid > .btn { width: 100%; align-self: start; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.check input { width: 18px; height: 18px; }
.assign-grid { display: grid; gap: 8px; }

.grid { display: grid; gap: 12px; }
.stats { grid-template-columns: 1fr 1fr; }
.stats.colorful { gap: 12px; background: transparent; border: 0; overflow: visible; border-radius: 0; }
.stats.colorful > .stat {
    border: 0; border-radius: 18px; color: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}
.stats.colorful > .stat:nth-child(1) { background: linear-gradient(160deg, #3b82f6, #1d4ed8); }
.stats.colorful > .stat:nth-child(2) { background: linear-gradient(160deg, #fb923c, #ea580c); }
.stats.colorful > .stat:nth-child(3) { background: linear-gradient(160deg, #34d399, #047857); }
.stats.colorful > .stat:nth-child(4) { background: linear-gradient(160deg, #a78bfa, #6d28d9); }
.stats.colorful > .stat:nth-child(5) { background: linear-gradient(160deg, #38bdf8, #0369a1); }
.stats.colorful > .stat span, .stats.colorful > .stat em { color: rgba(255, 255, 255, 0.88); }
.stats.colorful > .stat strong, .stats.colorful .stat.result strong { color: #fff; }
.stats.colorful > .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
.ledger { gap: 0; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--paper); }
.ledger > .stat, .ledger > .shop-card { border: 0; border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--line); }
.ledger > :last-child { border-bottom: 0; }
.stats.ledger > .stat:nth-child(odd) { border-right: 1px solid var(--line); }
.stats.ledger > .stat:last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0; }
.stat { padding: 16px 18px 18px; }
.stat span, .shop-card span { display: block; color: var(--muted); font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; }
.stat strong, .shop-card strong, .row-card strong, .num { font-family: var(--display); font-variant-numeric: tabular-nums lining-nums; }
.stat strong { display: block; margin-top: 8px; font-size: clamp(1.15rem, 1.6vw, 1.45rem); font-weight: 650; letter-spacing: -0.02em; white-space: nowrap; }
.stat em { display: block; margin-top: 6px; font-style: normal; color: var(--muted); font-size: 0.78rem; font-weight: 500; letter-spacing: 0; text-transform: none; line-height: 1.35; }
.stat.result { background: #fbf6ec; }
.stat.result strong { color: #7a5a22; }

.section-title { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin: 28px 0 12px; }
.section-title h2 { margin: 0; font-size: clamp(1.35rem, 2.4vw, 1.7rem); }
.section-title a { font-weight: 650; text-decoration: none; border-bottom: 1px solid var(--gold); padding-bottom: 1px; }
.stack { display: grid; gap: 10px; }
.shop-card, .row-card, .panel { padding: 16px 18px; }
.shop-card header, .split { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.shop-card header > div, .split > div { min-width: 0; flex: 1; }
.row-card strong, .row-card .muted, .row-card .mono, .row-card .num { display: block; }
.shop-card header strong { font-size: 1.02rem; font-weight: 650; }
.shop-card header strong:last-child { white-space: nowrap; font-size: 1.05rem; }
.row-card strong { font-size: 1.2rem; font-weight: 650; letter-spacing: -0.03em; }
.bar { height: 3px; border-radius: 99px; background: #efe8dc; overflow: hidden; display: flex; margin: 14px 0 10px; }
.bar i { display: block; height: 100%; flex: none; }
.bar .sales { background: var(--navy); }
.bar .spend { background: var(--gold); }

.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn, button.btn {
    border: 0; border-radius: 12px; min-height: 46px; padding: 11px 18px; background: var(--navy); color: #f8f4ec;
    text-decoration: none; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-weight: 650;
}
.btn.ghost, .pager .btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid #f0d2cb; min-height: 40px; padding: 8px 12px; }
.hero .btn { width: auto; }
.btn[aria-disabled="true"] { opacity: 0.45; }

.flash { padding: 12px 14px; border-radius: 12px; margin: 12px 0; }
.flash.ok { background: #e8f5ee; color: var(--leaf); }
.flash.bad, .error { background: #fdecec; color: var(--danger); }
.error { display: block; margin-top: 4px; padding: 0; background: transparent; }

.page-head .scope { margin-top: 8px; color: var(--ink); font-weight: 650; }
.add-drawer { padding: 0; margin: 8px 0 4px; }
.add-drawer > summary {
    list-style: none; cursor: pointer; min-height: 52px; padding: 12px 16px;
    font-weight: 700; display: flex; align-items: center; justify-content: flex-start; gap: 10px;
}
.add-drawer > summary::after { margin-left: auto; }
.add-drawer > summary::-webkit-details-marker { display: none; }
.add-drawer > summary::after { content: "Open"; color: #6d5016; font-weight: 650; font-size: 0.92rem; }
.add-drawer[open] > summary::after { content: "Close"; }
.add-drawer > form { padding: 0 18px 18px; }
.tag {
    display: inline-block; margin: 2px 4px 2px 0; padding: 2px 8px; border-radius: 999px;
    background: #f3f6fb; font-size: 0.78rem; font-weight: 600; line-height: 1.4;
}
.status { display: inline-flex; align-items: center; min-height: 26px; padding: 0 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; }
.status.on { background: #e7f6ee; color: #047857; }
.status.off { background: #f3f1ec; color: var(--muted); }
.table-wrap tr[hidden] { display: none !important; }
.edit-row td { background: #faf8f5; }
.edit-toggle { min-height: 36px; padding: 6px 12px; }

.list-card {
    margin-top: 16px; padding: 0; overflow: hidden;
    background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 10px 24px rgba(28, 36, 48, 0.05);
}
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 0; }
.list-head h2 { margin: 0; font-size: 1.02rem; letter-spacing: -0.03em; }
.list-head a { font-size: 0.88rem; font-weight: 650; text-decoration: none; color: #6d5016; }
.list-filters { margin: 0; padding: 10px 14px 12px; gap: 8px; border-bottom: 1px solid var(--line); }
.list-card .filter-field { flex: 0 1 200px; max-width: 220px; }
.list-card .filter-field span { font-size: 0.72rem; font-weight: 650; }
.list-card .list-filters input, .list-card .list-filters select { min-height: 38px; padding: 7px 10px; border-radius: 10px; }
.list-card .list-filters .filter-field:first-child input:not([type="date"]) { padding-left: 34px; }
.list-card .list-filters > .btn { min-height: 38px; padding: 7px 14px; border-radius: 10px; flex: none; }
.list-card th, .list-card td { padding: 7px 12px; vertical-align: middle; }
.list-card td.num { white-space: nowrap; }
.list-card th { letter-spacing: 0.06em; background: #faf8f5; white-space: nowrap; }
.list-card tbody tr:not(.edit-row) td[data-label=""]:last-child { width: 1%; text-align: right; white-space: nowrap; }
.list-card tbody tr:last-child td { border-bottom: 0; }
.list-card tbody tr:not(.edit-row):hover td { background: #fcfbf9; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.list-card .tag { margin: 0; padding: 1px 7px; font-size: 0.74rem; white-space: nowrap; }
.list-card .status { min-height: 22px; padding: 0 7px; font-size: 0.72rem; }
.list-card .edit-toggle { min-height: 32px; padding: 4px 10px; border-radius: 9px; font-size: 0.85rem; }
.list-card .edit-row td { width: auto; padding: 12px 14px 6px; text-align: left; white-space: normal; background: #faf8f5; }
.list-card td[data-label="Phone"], .list-card td[data-label="Role"], .list-card td[data-label="Number"] { white-space: nowrap; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.num, td.num, th.num { font-variant-numeric: tabular-nums lining-nums; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.pos { color: var(--leaf); font-weight: 650; }
.neg { color: var(--danger); font-weight: 650; }
.total td { text-align: right; font-variant-numeric: tabular-nums lining-nums; font-weight: 650; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 16px 0; }


.gate-body { background: #f7f1e6; }
.gate { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; }
.gate-stage { position: relative; overflow: hidden; padding: 36px 22px 4px; }
.gate-glow {
    position: absolute; width: 320px; height: 320px; right: -90px; top: -110px; pointer-events: none;
    background: radial-gradient(circle, rgba(232, 196, 106, 0.95) 0%, rgba(232, 196, 106, 0) 68%);
}
.gate-brand { position: relative; display: flex; align-items: center; gap: 14px; margin: 0 0 26px; }
.auth-logo {
    height: 68px; width: auto; display: block; margin: 0; background: transparent;
    filter: drop-shadow(0 10px 16px rgba(166, 132, 61, 0.25));
}
.gate-name { display: grid; line-height: 1; }
.gate-name strong { font-family: var(--display); font-size: 1.55rem; font-weight: 700; letter-spacing: -0.02em; }
.gate-name span { margin-top: 6px; color: var(--gold); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; }
.gate-stage h1 {
    position: relative; font-family: var(--display); font-weight: 700; letter-spacing: -0.03em;
    font-size: clamp(2.5rem, 11vw, 3.6rem); line-height: 0.95; margin: 0 0 12px; max-width: 9ch;
}
.gate-stage .lead { position: relative; display: flex; gap: 10px; align-items: flex-start; margin: 0 0 8px; max-width: 36ch; }
.gate-stage .lead svg, .with-icon svg, .gate-float svg, .gate-panel .btn svg {
    fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.gate-stage .lead svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--gold); }
.gate-float { display: none; }
.gate-panel {
    background: var(--paper); border-radius: 28px 28px 0 0; padding: 26px 22px calc(28px + env(safe-area-inset-bottom));
    box-shadow: 0 -18px 40px rgba(28, 36, 48, 0.05);
}
.with-icon { position: relative; display: block; }
.with-icon svg {
    position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%);
    color: var(--gold); pointer-events: none;
}
.with-icon input { padding-left: 46px; }
.gate-panel .btn { width: 100%; gap: 8px; }
.gate-panel .btn svg { width: 18px; height: 18px; }
.dev-code { font-family: var(--display); font-weight: 700; font-size: 1.8rem; letter-spacing: 0.28em; margin-top: 6px; color: var(--ink); }

.report-head { display: flex; justify-content: space-between; gap: 12px; align-items: end; flex-wrap: wrap; }
.report-head h1, .report-head h2 { font-family: var(--display); font-weight: 700; }
.card-grid { display: grid; gap: 12px; }
.place-card {
    background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 16px 16px 14px;
    border-top: 4px solid #2563eb; box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}
.place-card.bank { border-top-color: #0284c7; }
.place-card.bank header { align-items: center; }
.place-card.bank header > div:first-of-type { flex: 1; }
.place-card.bank .shop-mark { background: #f0f9ff; color: #0369a1; }
.place-card.down { border-top-color: #e11d48; }
.place-card.up { border-top-color: #059669; }
.place-card.shop {
    border-top-width: 1px; border-top-color: var(--line); padding: 0; overflow: hidden; background: #fff;
    box-shadow: 0 10px 24px rgba(28, 36, 48, 0.05);
}
.place-card.shop header { align-items: center; padding: 14px 16px 12px; }
.shop-mark {
    flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
    background: var(--gold-soft); color: #6d5016;
}
.shop-mark svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.place-card.shop .figure strong {
    display: inline-block; margin-top: 4px; padding: 4px 10px; border-radius: 999px;
    background: #e7f6ee; color: #047857; font-size: 0.95rem;
}
.place-card.shop.down .figure strong { background: #fde8e8; color: #be123c; }
.place-card.shop.flat .figure strong { background: #f3f1ec; color: var(--muted); }
.shop-stats {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0;
    padding: 10px 16px 12px; background: #faf8f5; border-top: 1px solid var(--line);
}
.shop-stats div { min-width: 0; }
.shop-stats dt { margin: 0; color: var(--muted); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.shop-stats dd { margin: 2px 0 0; font-size: 0.9rem; font-weight: 650; letter-spacing: -0.03em; }
.place-card.shop.flat .shop-stats dd { color: #a39c93; font-weight: 550; }
.place-card header { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.place-card header > div { min-width: 0; }
.place-card header strong { display: block; font-size: 1.02rem; }
.mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.mini.one { grid-template-columns: 1fr; }
.mini p { margin: 0; background: #f3f6fb; border-radius: 12px; padding: 8px 10px; }
.mini span { display: block; color: var(--muted); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.mini strong { display: block; margin-top: 4px; font-size: 0.86rem; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.user-card details summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.model-drawer { margin-top: 12px; }
.model-drawer summary { cursor: pointer; font-weight: 650; min-height: 44px; display: flex; align-items: center; }
.model-list { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; }
.model-list li { display: flex; align-items: center; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.model-list .model-name { font-weight: 650; min-width: 0; }
.model-list .num { margin-left: auto; white-space: nowrap; }
.model-list .model-edit { min-height: 36px; padding: 6px 12px; flex: none; }
.model-pick { position: relative; }
.sheet:has(.model-menu:not([hidden])) { position: relative; z-index: 8; }
.model-trigger {
    width: 100%; text-align: left; cursor: pointer; font-weight: 600;
    border: 1px solid var(--line); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 12px center / 16px no-repeat;
    border-radius: 12px; min-height: 48px; padding: 12px 36px 12px 14px;
}
.model-trigger.is-empty { color: var(--muted); font-weight: 500; }
.model-trigger:focus, .model-menu input:focus { outline: 2px solid #e4d2a4; border-color: var(--gold); }
.model-menu {
    position: absolute; z-index: 40; top: calc(100% - 4px); left: 0; right: 0;
    display: grid; gap: 6px; padding: 8px;
    background: #fff; border: 1px solid #e4dccf; border-radius: 14px;
    box-shadow: 0 18px 40px rgba(28, 36, 48, 0.18);
}
.model-menu[hidden], .model-empty[hidden], #model-error[hidden] { display: none !important; }
.model-menu ul { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow: auto; display: grid; gap: 2px; }
.model-menu li[hidden] { display: none !important; }
.model-menu li button {
    width: 100%; text-align: left; background: transparent; border: 0; border-radius: 10px;
    min-height: 40px; padding: 8px 10px; cursor: pointer; font-weight: 600;
}
.model-menu li button:hover, .model-menu li button[aria-selected="true"] { background: var(--wash, #f3e8ff); color: var(--ink-tone, #5b21b6); }
.model-empty { margin: 0; padding: 4px 10px 2px; color: var(--muted); font-size: 0.88rem; }
.model-add {
    border: 0; background: #f3e8ff; color: #5b21b6; font-weight: 700; cursor: pointer;
    min-height: 42px; border-radius: 10px; text-align: left; padding: 8px 12px;
}
.model-add::before { content: "+  "; }
.model-dialog { border: 0; border-radius: 18px; padding: 0; width: min(420px, calc(100% - 28px)); box-shadow: 0 24px 60px rgba(28, 36, 48, 0.22); }
.model-dialog::backdrop { background: rgba(28, 36, 48, 0.45); }
.model-dialog form { padding: 18px 18px 16px; }
.model-dialog h2 { margin: 0 0 4px; color: #5b21b6; font-size: 1.15rem; }
.model-dialog .actions { justify-content: flex-end; margin-top: 4px; }
.model-dialog .error { margin: 0 0 8px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.form-grid.two > .dialog-head, .form-grid.two > .dialog-actions, .form-grid.two > .assignments, .form-grid.two > .check { grid-column: 1 / -1; }
.page-head .section-title .add-btn { min-height: 42px; padding: 9px 16px; gap: 8px; background: var(--tone, var(--navy)); box-shadow: 0 8px 18px color-mix(in srgb, var(--tone, #1c2430) 28%, transparent); }
.add-btn::before { content: "+"; font-size: 1.15rem; line-height: 1; }

/* Dashboard */
.dash-head { display: grid; gap: 12px; margin: 2px 0 14px; }
.dash-head h1 { display: flex; align-items: center; gap: 12px; margin: 2px 0 0; font-size: clamp(1.8rem, 3.6vw, 2.3rem); }
.dash-head .eyebrow { margin: 0; }
.dash-head .title-ico { background: linear-gradient(140deg, #f59e0b, #b45309); color: #fff; box-shadow: 0 8px 18px rgba(180, 83, 9, 0.28); }
.dash-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; padding: 10px 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 20px rgba(28, 36, 48, 0.05); }
.dash-filters .filter-field { flex: 1 1 150px; }
.dash-filters .view-field { flex: 2 1 260px; }
.dash-filters input { min-height: 40px; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); background: #fff; width: 100%; }
.dash-filters .btn { min-height: 40px; padding: 7px 16px; border-radius: 10px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.quick a {
    display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px; border-radius: 999px;
    background: #fff; border: 1px solid var(--line); text-decoration: none; font-weight: 650; font-size: 0.88rem; color: var(--ink);
}
.quick a .ico { width: 26px; height: 26px; padding: 5px; border-radius: 999px; background: var(--q, #2563eb); color: #fff; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.quick a:hover { border-color: var(--q); color: var(--q); }
.quick .q-sales { --q: #2563eb; } .quick .q-spend { --q: #ea580c; } .quick .q-bank { --q: #0284c7; } .quick .q-hala { --q: #7c3aed; } .quick .q-users { --q: #334155; }
.dash-block { margin: 0 0 26px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.block-head h2 { margin: 0; font-size: 1.25rem; }
.block-head > a { font-weight: 650; font-size: 0.9rem; text-decoration: none; color: #6d5016; border-bottom: 1px solid var(--gold); }
.block-head .account-field { flex: 0 1 260px; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kpi {
    position: relative; overflow: hidden; padding: 14px 16px 16px; border-radius: 18px; color: #fff;
    background: linear-gradient(150deg, var(--k1), var(--k2)); box-shadow: 0 12px 26px color-mix(in srgb, var(--k2) 32%, transparent);
}
.kpi::after { content: ""; position: absolute; width: 120px; height: 120px; right: -36px; top: -46px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); }
.kpi span { display: block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.86); }
.kpi strong { display: block; margin-top: 8px; font-size: clamp(1.1rem, 2vw, 1.5rem); font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.kpi em { display: block; margin-top: 4px; font-style: normal; font-size: 0.76rem; font-weight: 600; color: rgba(255, 255, 255, 0.82); }
.k-blue { --k1: #60a5fa; --k2: #1d4ed8; } .k-orange { --k1: #fdba74; --k2: #ea580c; } .k-green { --k1: #34d399; --k2: #047857; }
.k-red { --k1: #fb7185; --k2: #be123c; } .k-purple { --k1: #c4b5fd; --k2: #6d28d9; } .k-pink { --k1: #f9a8d4; --k2: #be185d; }
.k-indigo { --k1: #a5b4fc; --k2: #4338ca; } .k-teal { --k1: #5eead4; --k2: #0f766e; } .k-sky { --k1: #7dd3fc; --k2: #0369a1; }
.k-amber { --k1: #fcd34d; --k2: #d97706; }
.charts { display: grid; gap: 12px; margin-top: 12px; }
.chart-card { margin: 0; padding: 14px 16px 12px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 10px 24px rgba(28, 36, 48, 0.05); min-width: 0; }
.chart-card figcaption { font-family: var(--display); font-weight: 700; font-size: 0.95rem; margin: 0 0 8px; }
.chart-box { position: relative; height: 250px; }
.chart-box.tall { height: max(220px, calc(var(--rows, 4) * 46px + 50px)); }
.chart-box.is-empty { display: grid; place-items: center; height: 180px; border-radius: 14px; background: repeating-linear-gradient(135deg, #faf8f5 0 10px, #f6f3ee 10px 20px); }
.chart-box.is-empty p { margin: 0; color: var(--muted); font-weight: 600; font-size: 0.9rem; }
.dash-table { margin-top: 0; align-self: start; }
.dash-filters.is-live > .btn { display: none; }
.dash-zone { position: relative; transition: opacity 0.2s ease; }
.dash-zone.is-loading { opacity: 0.45; pointer-events: none; }
.dash-zone.is-loading::after {
    content: ""; position: absolute; left: 50%; top: 80px; width: 34px; height: 34px; margin-left: -17px; border-radius: 50%;
    border: 3px solid rgba(166, 132, 61, 0.25); border-top-color: var(--gold); animation: spin 0.7s linear infinite;
}
#dash-main, #dash-banks { scroll-margin-top: 80px; }
@keyframes spin { to { transform: rotate(360deg); } }
.row-link { font-weight: 700; color: var(--ink); text-decoration: none; border-bottom: 1px dashed #c9b88f; }
.row-link:hover { color: #6d5016; }

/* Pop-up windows */
.app-dialog { border: 0; border-radius: 20px; padding: 0; width: min(460px, calc(100% - 24px)); max-height: calc(100vh - 32px); box-shadow: 0 24px 60px rgba(28, 36, 48, 0.24); background: var(--paper); color: var(--ink); }
.app-dialog.wide { width: min(720px, calc(100% - 24px)); }
.app-dialog::backdrop { background: rgba(28, 36, 48, 0.5); backdrop-filter: blur(2px); }
.app-dialog > form { padding: 0 20px 18px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 -20px 14px; padding: 16px 20px 12px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, var(--gold-soft), var(--paper) 70%); position: sticky; top: 0; z-index: 2; }
.dialog-head h2 { margin: 0; font-size: 1.12rem; }
.dialog-x { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 1.3rem; line-height: 1; cursor: pointer; color: var(--muted); }
.dialog-actions { justify-content: flex-end; margin-top: 6px; }
.dialog-actions .btn { min-height: 42px; }
.dialog-actions .delete-btn, .dialog-actions .delete-note { margin-right: auto; }
.dialog-actions .delete-btn { min-height: 42px; padding: 9px 16px; }
.delete-dialog > form { padding: 0 20px 18px; }
.delete-dialog .dialog-head { background: linear-gradient(90deg, #fdecec, var(--paper) 75%); }
.delete-dialog .dialog-head h2 { color: #9f1239; }
.delete-dialog .danger-ico { background: #e11d48; color: #fff; box-shadow: 0 8px 16px rgba(225, 29, 72, 0.25); }
.impact-lead { margin: 4px 0 6px; font-weight: 700; font-size: 0.85rem; color: var(--ink); }
.impact-list { list-style: none; margin: 0 0 12px; padding: 4px 12px; border: 1px solid #f3d9d2; border-radius: 14px; background: #fff8f7; }
.impact-list li { display: flex; align-items: baseline; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f6e3de; }
.impact-list li:last-child { border-bottom: 0; }
.impact-list li span { flex: 1; min-width: 0; font-size: 0.9rem; }
.impact-list li strong { font-family: var(--display); font-size: 0.95rem; color: #9f1239; }
.impact-list li em { font-style: normal; font-family: var(--display); font-weight: 650; font-size: 0.85rem; color: var(--muted); white-space: nowrap; }
.impact-list.kept { border-color: var(--line); background: #faf8f5; }
.impact-list.kept li { border-bottom-color: #efe9e0; }
.impact-list.kept li span { color: var(--muted); }
.confirm-check { margin: 2px 0 4px; font-weight: 650; font-size: 0.9rem; }
.confirm-check input { accent-color: #e11d48; }
.btn.btn-delete { background: #e11d48; color: #fff; box-shadow: 0 8px 18px rgba(225, 29, 72, 0.25); }
.btn.btn-delete:hover { background: #be123c; }
.row-actions { display: inline-flex; gap: 6px; align-items: center; justify-content: flex-end; }
.list-card .row-actions .btn { min-height: 32px; padding: 4px 10px; border-radius: 9px; font-size: 0.85rem; }
.row-actions .row-delete:disabled { opacity: 0.4; cursor: not-allowed; }
.delete-note { align-self: center; max-width: 52%; color: var(--muted); font-family: var(--sans); font-size: 0.8rem; line-height: 1.3; }
@media (prefers-reduced-motion: no-preference) {
    .app-dialog[open], .model-dialog[open] { animation: pop 0.18s ease both; }
}
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }

/* Searchable dropdowns */
.ts-wrapper { width: 100%; }
.ts-wrapper.single .ts-control, .ts-wrapper.single.input-active .ts-control {
    min-height: 48px; padding: 11px 36px 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
    box-shadow: none; font-family: var(--display); font-weight: 600; font-size: 0.95rem; color: var(--ink); cursor: pointer; display: flex; align-items: center;
}
.ts-wrapper.single .ts-control::after {
    content: ""; position: absolute; right: 13px; top: 50%; width: 16px; height: 16px; margin: -8px 0 0; border: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / 16px no-repeat;
    transition: transform 0.15s ease;
}
.ts-wrapper.single.dropdown-active .ts-control::after { transform: rotate(180deg); margin-top: -8px; border: 0; }
.ts-wrapper.single .ts-control > .item { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-wrapper.focus .ts-control { outline: 2px solid #e4d2a4; border-color: var(--gold); box-shadow: none; }
.ts-wrapper .ts-control > input { font-family: var(--display); }
.ts-dropdown {
    z-index: 80; margin-top: 6px; padding: 6px; border: 1px solid #e4dccf; border-radius: 14px; background: #fff;
    box-shadow: 0 18px 40px rgba(28, 36, 48, 0.18); font-family: var(--display); font-size: 0.92rem; color: var(--ink);
}
.ts-dropdown .dropdown-input-wrap { padding: 0 0 6px; }
.ts-dropdown .dropdown-input {
    border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px 9px 34px; width: 100%; font-family: var(--display);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%236d655c' stroke-width='1.8' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cpath d='m16 16 4 4'/%3E%3C/svg%3E") 10px center / 16px no-repeat;
}
.ts-dropdown .dropdown-input:focus { outline: 2px solid #e4d2a4; border-color: var(--gold); }
.ts-dropdown .ts-dropdown-content { max-height: 260px; }
.ts-dropdown .option { padding: 9px 10px; border-radius: 9px; font-weight: 600; }
.ts-dropdown .option.active { background: var(--gold-soft); color: #5c4310; }
.ts-dropdown .option.selected { color: #6d5016; }
.ts-dropdown .option.selected::after { content: "✓"; float: right; color: var(--gold); }
.ts-dropdown .optgroup-header { padding: 8px 10px 4px; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); background: transparent; }
.ts-dropdown .optgroup:before { display: none; }
.ts-dropdown .no-results { padding: 10px; color: var(--muted); font-weight: 600; }
.list-filters .ts-wrapper.single .ts-control, .dash-filters .ts-wrapper.single .ts-control, .block-head .ts-wrapper.single .ts-control { min-height: 40px; padding: 7px 34px 7px 12px; border-radius: 10px; font-size: 0.9rem; }

/* Tables */
.list-card .dt-container { font-family: var(--display); }
.list-card .dt-container .dt-layout-row { margin: 0; }
.list-card .dt-container > .dt-layout-row:first-child:not(.dt-layout-table) { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px; padding: 10px 14px 12px; border-bottom: 1px solid var(--line); }
.list-card .dt-container > .dt-layout-row:last-child:not(.dt-layout-table) { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); background: #fcfbf9; }
.list-card .dt-layout-row:not(.dt-layout-table) > .dt-layout-cell { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 0 !important; }
.list-card .table-wrap { overflow: visible; }
.list-card .dt-layout-table > .dt-layout-cell { display: block; padding: 0 !important; overflow-x: auto; }
.list-card .dt-layout-start { flex: 1 1 auto; min-width: 0; }
.list-card .dt-layout-start .list-filters { padding: 0; border: 0; margin: 0; flex: 1 1 auto; background: transparent; }
.list-card .dt-search { position: relative; }
.list-card .dt-search input.dt-input {
    width: 240px; max-width: 100%; min-height: 40px; margin: 0; padding: 8px 12px 8px 36px; border: 1px solid var(--line); border-radius: 10px; font-family: var(--display); font-size: 0.9rem;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%236d655c' stroke-width='1.8' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cpath d='m16 16 4 4'/%3E%3C/svg%3E") 11px center / 16px no-repeat;
}
.list-card .dt-search input.dt-input:focus { outline: 2px solid #e4d2a4; border-color: var(--gold); }
.list-card .dt-length { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.list-card .dt-length select.dt-input { min-height: 34px; padding: 4px 26px 4px 10px; border: 1px solid var(--line); border-radius: 9px; background-color: #fff; font-family: var(--display); font-weight: 600; margin: 0; }
.list-card .dt-info { font-size: 0.85rem; color: var(--muted); font-weight: 600; padding: 0 !important; }
.list-card .dt-paging nav { display: flex; gap: 4px; flex-wrap: wrap; }
.list-card .dt-container .dt-paging .dt-paging-button {
    min-width: 34px; height: 34px; margin: 0; padding: 0 10px; border: 1px solid var(--line) !important; border-radius: 9px;
    background: #fff !important; color: var(--ink) !important; font-family: var(--display); font-weight: 650; font-size: 0.86rem; box-shadow: none;
}
.list-card .dt-container .dt-paging .dt-paging-button:hover:not(.disabled) { background: var(--wash, var(--gold-soft)) !important; border-color: color-mix(in srgb, var(--tone, #a6843d) 40%, white) !important; color: var(--ink-tone, var(--ink)) !important; }
.list-card .dt-container .dt-paging .dt-paging-button.current, .list-card .dt-container .dt-paging .dt-paging-button.current:hover {
    background: var(--tone, var(--navy)) !important; border-color: var(--tone, var(--navy)) !important; color: #fff !important;
}
.list-card .dt-container .dt-paging .dt-paging-button.disabled { opacity: 0.4; }
.list-card table.dataTable { margin: 0 !important; border-collapse: collapse; width: 100% !important; }
.list-card table.dataTable > thead > tr > th, .list-card table.dataTable > thead > tr > td { padding: 9px 12px; border-bottom: 1px solid color-mix(in srgb, var(--tone, #a6843d) 18%, white); font-size: 0.68rem; }
.list-card table.dataTable > thead > tr > th.dt-orderable-asc, .list-card table.dataTable > thead > tr > th.dt-orderable-desc { padding-right: 12px; }
.list-card table.dataTable thead .dt-column-header { gap: 6px; }
.list-card table.dataTable thead .dt-column-order { position: relative; flex: none; width: 10px; right: auto; }
.list-card table.dataTable > thead > tr > th.dt-orderable-asc:hover, .list-card table.dataTable > thead > tr > th.dt-orderable-desc:hover { outline: 0; background: color-mix(in srgb, var(--wash, #faf8f5) 100%, #fff); }
.list-card table.dataTable > tbody > tr > td { padding: 9px 10px; border-top: 0; border-bottom: 1px solid #efe9e0; }
.list-card table.dataTable > thead > tr > th { padding-left: 10px; padding-right: 10px; white-space: normal; line-height: 1.3; }
.list-card table.dataTable td .chips .tag { border-radius: 8px; }
.list-card table.dataTable > tbody > tr:nth-child(even) > td { background: #fdfcfa; }
.list-card table.dataTable > tbody > tr:hover > td { background: color-mix(in srgb, var(--wash, #faf8f5) 55%, #fff); }
.list-card table.dataTable > tbody > tr:last-child > td { border-bottom: 0; }
.list-card table.dataTable td.dt-empty { padding: 28px 12px; text-align: center; color: var(--muted); font-weight: 600; }
.list-card table.dataTable th.dt-type-numeric, .list-card table.dataTable td.dt-type-numeric, .list-card table.dataTable th.num, .list-card table.dataTable td.num { text-align: right; }
.list-card table.dataTable th.dt-type-date, .list-card table.dataTable td.dt-type-date { text-align: left; }
.list-card table.dataTable th.dt-type-date .dt-column-header { flex-direction: row; }
.list-card table.dataTable td.dt-type-date, .list-card table.dataTable td[data-label="Model"] strong { white-space: nowrap; }
.model-trigger { font-family: var(--display); font-size: 0.95rem; }
.list-card table.dataTable tfoot td { padding: 10px 12px; border-top: 1px solid var(--line); background: #faf8f5; text-align: right; }
.list-card table.dataTable thead .dt-column-order::before, .list-card table.dataTable thead .dt-column-order::after { opacity: 0.35; }
.list-card table.dataTable thead th.dt-ordering-asc .dt-column-order::before, .list-card table.dataTable thead th.dt-ordering-desc .dt-column-order::after { opacity: 1; color: var(--tone, var(--gold)); }
.tag.type-deposit, .tag.type-transfer_in { background: #e7f6ee; color: #047857; }
.tag.type-withdrawal { background: #fff1e6; color: #c2410c; }
.tag.type-charge { background: #fde8e8; color: #be123c; }
.tag.type-transfer_out { background: #f3e8ff; color: #6d28d9; }
.tag.role-super_admin { background: #1c2430; color: #f4ead4; }
.tag.role-accountant { background: #e8f1ff; color: #1e40af; }
.tag.role-manager { background: #e8f7ef; color: #065f46; }
.tag.role-cashier { background: #fff1e6; color: #9a3412; }
.dash-table table.dataTable > tbody > tr > td { padding: 8px 12px; }
.list-card table.dataTable td .chips { min-width: 140px; max-width: 280px; }
.list-card table.dataTable td .chips .tag { white-space: normal; }
.list-card table.dataTable td[data-label="Name"] strong { white-space: nowrap; }

.dash-table td.num { white-space: nowrap; }
@media (min-width: 800px) {
    .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .charts { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
    .charts.stacked { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 1240px) {
    .charts.stacked { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 760px) {
    .dash-filters { width: 100%; }
    .dash-filters .filter-field { flex: 1 1 calc(50% - 5px); min-width: 0; }
    .dash-filters input[type="date"] { min-width: 0; padding: 7px 8px; font-size: 0.88rem; }
    .quick { flex-wrap: nowrap; overflow-x: auto; margin-right: -14px; padding: 2px 14px 6px 0; scrollbar-width: none; }
    .quick::-webkit-scrollbar { display: none; }
    .quick a { flex: none; }
    .dash-filters .view-field { flex-basis: 100%; }
    .dash-filters .btn { flex: 1 1 100%; }
    .block-head { flex-wrap: wrap; }
    .block-head .account-field { flex: 1 1 100%; }
    .list-card .dt-container > .dt-layout-row:first-child:not(.dt-layout-table) { background: var(--paper); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 14px 14px; margin-bottom: 10px; }
    .list-card .dt-container > .dt-layout-row:last-child:not(.dt-layout-table) { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; margin-top: 2px; justify-content: center; }
    .list-card .dt-layout-row:not(.dt-layout-table) > .dt-layout-cell { width: 100%; justify-content: space-between; text-align: left !important; gap: 10px; }
    .list-card .dt-container > .dt-layout-row:first-child:not(.dt-layout-table) { gap: 10px; }
    .list-card .dt-layout-table > .dt-layout-cell { overflow: visible; }
    .list-card .dt-search, .list-card .dt-search input.dt-input { width: 100%; }
    .list-card .dt-layout-start .list-filters { width: 100%; }
    .list-card table.dataTable > tbody > tr > td, .list-card table.dataTable > tbody > tr:nth-child(even) > td { background: transparent; padding: 3px 0; border: 0; }
    .list-card table.dataTable > tbody > tr { background: var(--paper); }
    .list-card table.dataTable tfoot { display: block; }
    .list-card table.dataTable tfoot tr { display: block; border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; background: #faf8f5; }
    .list-card table.dataTable tfoot td { display: block; border: 0; padding: 0; background: transparent; }
    .list-card table.dataTable td.dt-empty { display: block; text-align: center; }
    .list-card table.dataTable td.dt-empty::before { content: none; }
    .list-card .dt-paging-button { min-width: 38px; height: 38px; }
}

@media (max-width: 760px) {
    .stat { padding: 14px 14px 16px; }
    .stat strong { font-size: 1.12rem; }
    .table-wrap { overflow: visible; }
    .table-wrap table, .table-wrap tbody { display: block; }
    .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .table-wrap tr { display: block; border: 1px solid var(--line); border-radius: 16px; padding: 8px 12px; margin-bottom: 10px; background: var(--paper); }
    .table-wrap td { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 12px; border: 0; padding: 6px 0; white-space: normal; text-align: right; }
    .table-wrap td::before { content: attr(data-label); color: var(--muted); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; text-align: left; }
    .table-wrap td[data-label=""] { display: block; text-align: left; }
    .table-wrap td[data-label=""]::before { content: none; }
    .total td { text-align: right; }
    .list-card { background: transparent; border: 0; box-shadow: none; overflow: visible; }
    .list-card .list-head { background: var(--paper); border: 1px solid var(--line); border-bottom: 0; border-radius: 14px 14px 0 0; padding: 10px 12px 0; }
    .list-card .list-filters { background: var(--paper); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 14px 14px; margin-bottom: 10px; }
    .list-card .filter-field { flex: 1 1 8.5rem; max-width: none; }
    .list-card .filter-field:first-child { flex-basis: 100%; }
    .list-card .table-wrap tr { padding: 2px 12px 6px; margin-bottom: 8px; border-radius: 14px; }
    .list-card .table-wrap td { padding: 3px 0; gap: 4px 10px; }
    .table-wrap td .chips { margin-left: auto; justify-content: flex-end; max-width: 68%; }
    .table-wrap td .chips .tag { white-space: normal; max-width: 100%; }
    .list-card .table-wrap td[data-label=""]:last-child { text-align: left; width: auto; }
}

@media (min-width: 800px) {
    .form-grid.two { grid-template-columns: 1fr 1fr; gap: 0 12px; }
    .form-grid > .btn { width: auto; justify-self: start; }
    .assign-grid { grid-template-columns: 1fr 1fr; }
    .step-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .step-grid.setup-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .stats.colorful { grid-template-columns: repeat(3, 1fr); }
    .stats.colorful > .stat:last-child:nth-child(odd) { grid-column: auto; }
    .card-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 800px) {
    .gate { grid-template-columns: 1.15fr 0.85fr; grid-template-rows: none; }
    .gate-stage { display: flex; flex-direction: column; justify-content: center; min-height: 100vh; padding: 72px 8vw; }
    .gate-glow { width: 560px; height: 560px; left: -120px; right: auto; top: auto; bottom: -180px; }
    .auth-logo { height: 84px; }
    .gate-name strong { font-size: 1.9rem; }
    .gate-float { display: block; }
    .gate-float span {
        position: absolute; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
        background: rgba(255, 253, 251, 0.78); border: 1px solid #ead9b0; color: var(--gold);
        box-shadow: 0 10px 24px rgba(166, 132, 61, 0.12);
    }
    .gate-float svg { width: 22px; height: 22px; }
    .gate-float span:first-child { right: 9%; top: 16%; }
    .gate-float span:last-child { right: 18%; bottom: 14%; }
    .gate-stage h1 { font-size: 4.4rem; }
    .gate-panel {
        border-radius: 0; margin: 0; box-shadow: none; border-left: 1px solid var(--line);
        display: grid; align-content: center; padding: 72px 64px;
    }
    .gate-panel form, .gate-panel .flash { width: min(420px, 100%); }
}

@media (min-width: 960px) {
    .side { transform: none; width: 248px; }
    .side-backdrop { display: none; }
    .main { margin-left: 248px; }
    .mobile-bar { display: none; }
    .shell { padding-top: 28px; }
}

@media (prefers-reduced-motion: no-preference) {
    .shell > * { animation: rise 0.4s ease both; }
    .shell > *:nth-child(2) { animation-delay: 0.04s; }
    .shell > *:nth-child(3) { animation-delay: 0.08s; }
    .shell > *:nth-child(4) { animation-delay: 0.12s; }
    .shell > *:nth-child(5) { animation-delay: 0.16s; }
    .shell > *:nth-child(6) { animation-delay: 0.2s; }
    .stats .stat, .card-grid > *, .stack > * { animation: rise 0.45s ease both; }
    .stats .stat:nth-child(2), .card-grid > *:nth-child(2) { animation-delay: 0.05s; }
    .stats .stat:nth-child(3), .card-grid > *:nth-child(3) { animation-delay: 0.1s; }
    .stats .stat:nth-child(4), .card-grid > *:nth-child(4) { animation-delay: 0.15s; }
    .stats .stat:nth-child(5), .card-grid > *:nth-child(5) { animation-delay: 0.2s; }
    .btn, .step-grid a, .place-card, .row-card, .side-nav a, .panel, .add-drawer, .list-card tbody td {
        transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    }
    .step-grid a:hover, .place-card:hover, .row-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 22px rgba(28, 36, 48, 0.08);
    }
    .btn:hover { transform: translateY(-1px); }
    .btn:active { transform: translateY(0) scale(0.98); }
    .side-nav a:hover svg { transform: translateX(2px); }
    .side-nav a svg { transition: transform 0.18s ease; }
    .flash { animation: rise 0.3s ease both; }
    .gate-float span { animation: floaty 5.5s ease-in-out infinite; }
    .gate-float span:last-child { animation-delay: -2.2s; }
    .gate-panel { animation: rise 0.5s ease both; }
}
@keyframes rise {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}
@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Record pages: list first, form in a pop-up */
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.head-actions .btn.ghost { min-height: 42px; padding: 9px 14px; background: #fff; }
.dialog-head .title-ico { width: 34px; height: 34px; border-radius: 11px; }
.dialog-head .title-ico svg { width: 18px; height: 18px; }
.dialog-head h2 { flex: 1; }
.app-dialog[class*="tone-"] .dialog-head { background: linear-gradient(90deg, var(--wash), var(--paper) 75%); }
.app-dialog[class*="tone-"] .dialog-head h2 { color: var(--ink-tone); }
.dialog-errors { display: grid; gap: 2px; padding: 8px 12px; margin: 0 0 10px; border-radius: 12px; background: #fdecec; }
.form-grid.two > .dialog-errors { grid-column: 1 / -1; }
.dialog-chips { margin: 0 0 12px; }
.app-dialog > .detail-sheet { padding: 0 20px 18px; }
.detail-amount { margin: 0 0 10px; font-family: var(--display); font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.detail-amount.pos { color: var(--leaf); }
.detail-amount.neg { color: var(--danger); }
.detail-list { display: grid; margin: 0 0 4px; }
.detail-list > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 0; border-bottom: 1px solid #f0eae1; }
.detail-list > div:last-child { border-bottom: 0; }
.detail-list dt { flex: none; color: var(--muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.detail-list dd { margin: 0; min-width: 0; text-align: right; font-family: var(--display); font-weight: 600; overflow-wrap: anywhere; }
.detail-list dd .tag { margin: 0; }
.detail-dialog .dialog-actions form { display: contents; }
.detail-dialog .dialog-actions .btn.danger { min-height: 46px; padding: 11px 18px; }
.fab { display: none; }
@media (min-width: 761px) {
    .app-list > tbody > tr > td:empty:not(.c-act)::after { content: "—"; color: #b5ada3; }
}

@media (max-width: 760px) {
    .app-head { margin-bottom: 12px; }
    .app-head > p { display: none; }
    .app-head .section-title { margin: 0; flex-wrap: nowrap; }
    .app-head h1 { font-size: 1.55rem; }
    .app-head .add-btn { display: none; }
    .app-head .head-actions .btn.ghost { min-height: 36px; padding: 6px 12px; font-size: 0.85rem; border-radius: 10px; }
    .shell:has(.fab) { padding-bottom: 104px; }

    .fab {
        display: grid; place-items: center; position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 30;
        width: 58px; height: 58px; padding: 0; border: 0; border-radius: 19px; cursor: pointer;
        background: linear-gradient(150deg, color-mix(in srgb, var(--tone) 78%, white), var(--tone)); color: #fff;
        font-family: var(--display); font-size: 2rem; font-weight: 500; line-height: 1;
        box-shadow: 0 14px 28px color-mix(in srgb, var(--tone) 42%, transparent);
    }
    .fab:active { transform: scale(0.94); }

    .app-dialog, .app-dialog.wide {
        width: 100%; max-width: 100%; margin: auto 0 0; max-height: 92dvh; border-radius: 22px 22px 0 0;
    }
    .app-dialog > form { padding-bottom: 0; }
    .app-dialog .dialog-head { position: sticky; padding-top: 20px; }
    .app-dialog .dialog-head::before {
        content: ""; position: absolute; top: 7px; left: 50%; width: 42px; height: 4px; margin-left: -21px; border-radius: 4px; background: rgba(28, 36, 48, 0.18);
    }
    .app-dialog .dialog-actions {
        position: sticky; bottom: 0; z-index: 2; margin: 6px -20px 0; padding: 10px 20px calc(14px + env(safe-area-inset-bottom));
        background: var(--paper); border-top: 1px solid var(--line); flex-wrap: nowrap;
    }
    .app-dialog .dialog-actions .btn { flex: 1 1 auto; white-space: nowrap; }
    .app-dialog .dialog-actions .btn.ghost { flex: 0 0 auto; padding: 11px 18px; }
    .app-dialog[open] { animation: sheet-up 0.26s cubic-bezier(0.2, 0.8, 0.2, 1) both; }

    .list-card.app-card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: 0 10px 24px rgba(28, 36, 48, 0.05); }
    .app-card .list-head { border: 0; border-radius: 0; padding: 11px 14px; }
    .app-card .list-head h2 { font-size: 0.95rem; }
    .app-card .dt-container > .dt-layout-row:first-child:not(.dt-layout-table) {
        flex-wrap: nowrap; gap: 8px; margin: 0; padding: 8px 10px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: #fcfbf9;
    }
    .app-card .dt-container > .dt-layout-row:first-child:not(.dt-layout-table) > .dt-layout-cell { flex: 1 1 0; width: auto !important; min-width: 0; }
    .app-card .list-filters .filter-field > span { display: none; }
    .app-card .list-filters .filter-field { flex: 1 1 auto; }
    .app-card .dt-search input.dt-input { width: 100%; min-height: 38px; font-size: 0.88rem; }
    .app-card .ts-wrapper.single .ts-control { min-height: 38px; font-size: 0.86rem; }
    .app-card .dt-container > .dt-layout-row:last-child:not(.dt-layout-table) {
        flex-wrap: nowrap; justify-content: space-between; margin: 0; padding: 8px 10px; border: 0; border-top: 1px solid var(--line); border-radius: 0;
    }
    .app-card .dt-container > .dt-layout-row:last-child:not(.dt-layout-table) > .dt-layout-cell { width: auto !important; }
    .app-card .dt-length { display: none; }
    .app-card .dt-info { font-size: 0.78rem; }
    .app-card .dt-paging .dt-paging-button.first, .app-card .dt-paging .dt-paging-button.last { display: none; }

    .list-card table.app-list > tbody > tr {
        position: relative; display: flex; flex-wrap: wrap; align-items: center; column-gap: 6px; row-gap: 3px;
        margin: 0; padding: 11px 12px 11px 62px; min-height: 64px; border: 0; border-bottom: 1px solid #f0eae1; border-radius: 0; background: transparent;
    }
    .list-card table.app-list > tbody > tr:last-child { border-bottom: 0; }
    .list-card table.app-list > tbody > tr { cursor: pointer; -webkit-tap-highlight-color: transparent; }
    .list-card table.app-list > tbody > tr:active { background: color-mix(in srgb, var(--wash) 55%, #fff); }
    .list-card table.app-list > tbody > tr::before {
        content: ""; position: absolute; left: 12px; top: 50%; width: 38px; height: 38px; margin-top: -19px; border-radius: 12px;
        background: var(--wash) var(--row-icon) center / 19px no-repeat;
    }
    .list-card table.app-list > tbody > tr::after { content: ""; order: 2; flex-basis: 100%; height: 0; }
    .list-card table.app-list > tbody > tr:has(> td.dt-empty) { padding-left: 12px; min-height: 0; }
    .list-card table.app-list > tbody > tr:has(> td.dt-empty)::before { display: none; }
    .list-card table.app-list > tbody > tr > td, .list-card table.app-list > tbody > tr:nth-child(even) > td {
        display: block; padding: 0; border: 0; background: transparent; text-align: left; white-space: nowrap;
    }
    .list-card table.app-list > tbody > tr > td::before { content: none; }
    .list-card table.app-list td.c-title {
        order: 1; flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis;
        font-family: var(--display); font-size: 0.95rem; font-weight: 700; color: var(--ink);
    }
    .list-card table.app-list td.c-title strong { font-weight: 700; }
    .list-card table.app-list td.c-title .tag { margin: 0; padding: 0; background: none; border-radius: 0; font-size: inherit; font-weight: 700; color: inherit; white-space: nowrap; }
    .list-card table.app-list td.c-amount { order: 1; flex: none; padding-left: 8px; font-size: 0.95rem; font-weight: 700; text-align: right; }
    .list-card table.app-list td.c-s1, .list-card table.app-list td.c-s2, .list-card table.app-list td.c-s3 {
        order: 3; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-family: var(--sans); font-size: 0.8rem; font-weight: 600; color: var(--muted);
    }
    .list-card table.app-list td.c-s1 { flex: none; }
    .list-card table.app-list td.c-s2 { flex: 0 1 auto; max-width: 52%; }
    .list-card table.app-list td.c-s3 { flex: 1 1 0; }
    .list-card table.app-list td.c-s2:not(:empty)::before, .list-card table.app-list td.c-s3:not(:empty)::before { content: "·"; margin: 0 5px 0 0; color: #c4bbb0; }
    .list-card table.app-list td.c-s2 .tag { margin: 0; padding: 0 6px; font-size: 0.7rem; line-height: 1.5; }
    .list-card table.app-list td.c-act { position: absolute; right: 10px; top: 50%; width: auto !important; transform: translateY(-50%); }
    .list-card table.app-list > tbody > tr:has(> td.c-act form) { padding-right: 50px; }
    .list-card table.app-list td.c-act:empty { display: none; }
    .list-card table.app-list td.c-act form { display: block; }
    .list-card table.app-list td.c-act .btn.danger {
        width: 30px; height: 30px; min-height: 30px; padding: 0; border-radius: 10px; font-size: 0; color: transparent; border-color: #f3d9d2;
        background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23be123c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 7h15M10 11v6M14 11v6M6.5 7l1 12a1.5 1.5 0 0 0 1.5 1.4h6a1.5 1.5 0 0 0 1.5-1.4l1-12M9.5 7V4.8a.8.8 0 0 1 .8-.8h3.4a.8.8 0 0 1 .8.8V7'/%3E%3C/svg%3E") center / 15px no-repeat;
    }
    .list-card table.app-list td.dt-empty { flex: 1 1 100%; order: 1; padding: 22px 6px; text-align: center; white-space: normal; font-family: var(--sans); color: var(--muted); }

    .app-list.l-sales { --row-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3.5h10V21l-2.2-1.3L12.5 21 10.3 19.7 8 21l-1-1.5z'/%3E%3Cpath d='M9.5 8h5M9.5 12h5M9.5 16h3'/%3E%3C/svg%3E"); }
    .app-list.l-spend { --row-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ea580c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5h17v9a1 1 0 0 1-1 1h-15a1 1 0 0 1-1-1z'/%3E%3Cpath d='M3.5 8.5 6 5h12l2.5 3.5M3.5 12h17'/%3E%3C/svg%3E"); }
    .app-list.l-hala { --row-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c3aed' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='3' width='8' height='18' rx='2'/%3E%3Cpath d='M11 18h2'/%3E%3C/svg%3E"); }
    .list-card table.app-list.l-bank > tbody > tr.is-in::before {
        background: #e7f6ee url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23047857' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 7 7 17M7 9v8h8'/%3E%3C/svg%3E") center / 18px no-repeat;
    }
    .list-card table.app-list.l-bank > tbody > tr.is-out::before {
        background: #fde8e8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23be123c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M9 7h8v8'/%3E%3C/svg%3E") center / 18px no-repeat;
    }
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }

@media print {
    .side, .side-backdrop, .mobile-bar, .no-print, .filters, .dt-layout-row:not(.dt-layout-table) { display: none !important; }
    .main { margin: 0; }
    body, .shell { background: white; }
    .shell { width: auto; padding: 0; }
    .panel, .stat, .shop-card { box-shadow: none; }
}
