:root {
    --bg: #120e08;
    --bg-2: #1c150c;
    --panel: rgba(22, 17, 10, 0.94);
    --ink: #f8f1de;
    --muted: #c4b48a;
    --line: rgba(212, 175, 55, .32);
    --accent: #d4af37;
    --accent-2: #f8e7a8;
    --accent-soft: rgba(212, 175, 55, .22);
    --ok: #34d399;
    --err: #fb7185;
    --pink: #ec4899;
    --cyan: #22d3ee;
    --lime: #84cc16;
    --orange: #fb923c;
    --gold: #fbbf24;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    --radius: 18px;
    --glow: radial-gradient(900px 520px at 8% -12%, rgba(212,175,55,.34), transparent 58%),
            radial-gradient(720px 420px at 100% 0%, rgba(180,120,40,.22), transparent 52%),
            radial-gradient(500px 280px at 50% 110%, rgba(120,80,20,.18), transparent 50%);
}

/* Gold studio theme — used on every admin and member page */
.theme-dashboard {
    --bg: #120e08;
    --bg-2: #1c150c;
    --accent: #d4af37;
    --accent-2: #f8e7a8;
    --accent-soft: rgba(212, 175, 55, .22);
    --line: rgba(212, 175, 55, .32);
    --glow: radial-gradient(900px 520px at 8% -12%, rgba(212,175,55,.34), transparent 58%),
            radial-gradient(720px 420px at 100% 0%, rgba(180,120,40,.22), transparent 52%),
            radial-gradient(500px 280px at 50% 110%, rgba(120,80,20,.18), transparent 50%);
}
.theme-dashboard,
.auth.theme-dashboard {
    background:
        var(--glow),
        linear-gradient(165deg, #120e08 0%, #1a140a 42%, #0c0906 100%);
}
.theme-dashboard .sidebar {
    background: linear-gradient(180deg, #1a1208 0%, #100c07 100%);
    border-right-color: rgba(212, 175, 55, .28);
}
.theme-dashboard nav.side-nav a.is-active,
.theme-dashboard nav.side-nav a.is-active:hover {
    background: linear-gradient(90deg, #b8860b, #d4af37 55%, #f1d27a);
    color: #1a1208;
    box-shadow: 0 8px 22px rgba(212, 175, 55, .35);
}
.theme-dashboard nav.side-nav a:hover {
    background: rgba(212, 175, 55, .16);
    color: #f8e7a8;
    border-color: rgba(212, 175, 55, .35);
}
.theme-dashboard .avatar {
    color: #1a1208;
    box-shadow: 0 0 16px rgba(212, 175, 55, .45);
}
.theme-dashboard .gem {
    background: linear-gradient(135deg, #fff3c4, #d4af37 45%, #8a6a1a);
}
.theme-dashboard button,
.theme-dashboard .btn {
    background: linear-gradient(90deg, #b8860b, #e4c36a);
    color: #1a1208;
    box-shadow: 0 10px 28px rgba(212, 175, 55, .35);
}
.theme-dashboard .btn.ghost {
    background: transparent;
    color: var(--accent-2);
    border: 1px solid var(--accent);
    box-shadow: none;
}
.theme-dashboard .btn-glow { box-shadow: 0 0 22px rgba(212,175,55,.5); }
.theme-dashboard .ticker {
    background: linear-gradient(90deg, #3d2a08, #7a5410);
    color: #fde68a;
    border-color: rgba(251,191,36,.4);
}
.theme-dashboard .promo-card {
    border-color: rgba(212, 175, 55, .45);
    background:
        linear-gradient(180deg, rgba(212,175,55,.16), transparent 55%),
        linear-gradient(180deg, #1c140a, #120e08);
}
.theme-dashboard .promo-progress > span {
    background: linear-gradient(90deg, #d4af37, #f8e7a8);
}
.theme-dashboard .dash-hero-main {
    background:
        linear-gradient(135deg, rgba(248,231,168,.12), transparent 42%),
        linear-gradient(160deg, color-mix(in srgb, var(--accent) 28%, #1a140a), #100c07 74%);
    box-shadow: var(--shadow), 0 0 0 1px rgba(212,175,55,.18);
}
.theme-dashboard .card,
.theme-dashboard .table-wrap,
.theme-dashboard form.panel {
    border-color: rgba(212, 175, 55, .22);
    background:
        linear-gradient(180deg, rgba(212,175,55,.07), transparent 42%),
        #16110a;
}
.theme-dashboard .mobile-header,
.theme-dashboard .mobile-footer {
    background: rgba(18, 14, 8, .96);
    border-color: rgba(212, 175, 55, .28);
}
.theme-dashboard .action-tile.tile-green { background: linear-gradient(160deg, #6b5a12, #3d320c); }
.theme-dashboard .action-tile.tile-blue { background: linear-gradient(160deg, #8a6a1f, #4a3a10); }
.theme-dashboard .action-tile.tile-purple { background: linear-gradient(160deg, #c9a227, #7a5c12); }
.theme-dashboard .action-tile.tile-pink { background: linear-gradient(160deg, #d4af37, #8a6414); }
.theme-dashboard .action-tile.tile-orange { background: linear-gradient(160deg, #e0b84e, #8a4b0e); }
.theme-dashboard .action-tile.tile-gold { background: linear-gradient(160deg, #f1d27a, #9a720f); }
.theme-dashboard .action-tile.tile-cyan { background: linear-gradient(160deg, #b8943a, #5c4510); }
.theme-dashboard .action-tile.tile-lime { background: linear-gradient(160deg, #c4b05a, #5a4a12); }

.panel-admin .sidebar,
.panel-member .sidebar {
    background: linear-gradient(180deg, #1a1208 0%, #100c07 100%);
    border-right-color: rgba(212, 175, 55, .28);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
    font-family: Manrope, system-ui, sans-serif;
    background:
        var(--glow),
        linear-gradient(160deg, var(--bg) 0%, var(--bg-2) 55%, #0c0906 100%);
    color: var(--ink);
}
h1, h2, .brand strong, .brand-lg, .card .v, .promo-card .v, .action-tile, .party-tile-body strong, .party-tile-count {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-weight: 700;
    letter-spacing: .02em;
}
a { color: var(--accent-2); text-decoration: none; }
.muted { color: var(--muted); }

.app { display: grid; grid-template-columns: 268px 1fr; min-height: 100vh; }
.sidebar {
    padding: 22px 16px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    border-right: 1px solid var(--line);
    position: sticky;
    top: 0;
    height: 100vh;
}
.brand, .brand-lg { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 48px; height: 48px; object-fit: contain; border-radius: 12px; background: transparent; box-shadow: none; }
.mobile-logo { width: 40px; height: 40px; object-fit: contain; border-radius: 10px; }
.auth-logo { width: 150px; max-width: 70%; height: auto; display: block; margin: 0 auto 4px; background: transparent; }
.bill-logo { width: min(280px, 100%); height: auto; display: block; background: transparent; border-radius: 0; padding: 0; }
.brand small { display: block; color: var(--muted); font-size: 12px; font-family: Manrope, sans-serif; letter-spacing: .04em; }
.brand strong { font-size: 15px; line-height: 1.15; display: block; max-width: 168px; }
.gem {
    width: 18px; height: 18px;
    background: linear-gradient(135deg, #f5d0fe, var(--accent) 45%, #db2777);
    transform: rotate(45deg);
    border-radius: 2px;
    box-shadow: 0 0 12px var(--accent-soft);
}
nav.side-nav { display: flex; flex-direction: column; gap: 6px; overflow: auto; padding-right: 2px; }
.menu-ico {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    display: block;
}
.nav-section {
    border: 1px solid transparent;
    border-radius: 14px;
    padding: 2px;
}
.nav-section.is-open {
    border-color: rgba(255,255,255,.06);
    background: rgba(255,255,255,.03);
}
.nav-heading {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #e2e8f7;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
}
.nav-heading-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.nav-heading-label .menu-ico { width: 15px; height: 15px; opacity: .85; }
.nav-heading:hover { color: var(--accent-2); }
.nav-chevron {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    opacity: .7;
    transition: transform .2s ease;
}
.nav-section.is-open .nav-chevron { transform: rotate(180deg); }
.nav-sub {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 4px 6px;
}
.nav-sub[hidden] { display: none !important; }
nav.side-nav a {
    color: var(--muted);
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 500;
    border: 1px solid transparent;
    transition: .18s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}
nav.side-nav a.is-active {
    background: linear-gradient(90deg, #7c3aed, #db2777);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 22px rgba(168, 85, 247, .35);
}
nav.side-nav a:hover {
    background: rgba(168, 85, 247, .16);
    color: #f5d0fe;
    border-color: rgba(168, 85, 247, .28);
}
nav.side-nav a.is-active:hover {
    background: linear-gradient(90deg, #7c3aed, #db2777);
    color: #fff;
}
.side-foot { margin-top: auto; font-size: 13px; display: grid; gap: 12px; }
.side-user { display: flex; align-items: center; gap: 10px; }
.avatar {
    width: 36px; height: 36px; border-radius: 50%;
    display: grid; place-items: center;
    background: linear-gradient(145deg, var(--accent-2), var(--accent));
    color: #1a1208; font-weight: 700; box-shadow: 0 0 16px rgba(212,175,55,.45);
}
.logout, .desktop-logout {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 9px 12px; border-radius: 999px;
    border: 1px solid var(--line); color: var(--accent-2);
}
.desktop-logout { display: none; }
.mobile-header,
.mobile-footer { display: none; }
.main { padding: 28px 34px 56px; min-width: 0; }
.topbar {
    display: flex; justify-content: space-between; align-items: flex-end;
    gap: 16px; margin-bottom: 24px;
}
.eyebrow {
    margin: 0 0 4px;
    color: var(--accent-2);
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: 11px;
    font-weight: 700;
}
.topbar h1 { margin: 0; font-size: clamp(30px, 4vw, 42px); }
.topbar-actions { display: flex; gap: 10px; align-items: center; }
.wallet-pills { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; }
.wallet-pill {
    border: 1px solid var(--accent);
    color: var(--accent-2);
    background: var(--accent-soft);
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.wallet-pill .wallet-label { display: block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.wallet-pill.pill-cb { border-color: rgba(132,204,22,.45); color: #d9f99d; background: rgba(132,204,22,.12); }
.wallet-pill.pill-ref { border-color: rgba(236,72,153,.45); color: #fbcfe8; background: rgba(236,72,153,.12); }
.wallet-pill.pill-lv { border-color: rgba(212,175,55,.45); color: #f8e7a8; background: rgba(212,175,55,.12); }
.wallet-split { margin: 0 0 16px; }

.grid { display: grid; gap: 16px; }
.cards { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.card, .table-wrap, form.panel {
    background:
        linear-gradient(180deg, rgba(255,255,255,.04), transparent 40%),
        #12182a;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
}
.card.stat {
    position: relative;
    overflow: hidden;
}
.card.stat::before {
    content: "";
    position: absolute; inset: auto -20% -40% auto;
    width: 120px; height: 120px; border-radius: 50%;
    background: var(--accent-soft);
}
.card .k { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; position: relative; }
.card .v { font-size: 28px; margin-top: 10px; position: relative; color: var(--accent-2); }
.card.tone-gold { --accent: #fbbf24; --accent-2: #fde68a; --accent-soft: rgba(251,191,36,.22); border-color: rgba(251,191,36,.4); }
.card.tone-teal { --accent: #22d3ee; --accent-2: #a5f3fc; --accent-soft: rgba(34,211,238,.2); border-color: rgba(34,211,238,.35); }
.card.tone-blue { --accent: #3b82f6; --accent-2: #bfdbfe; --accent-soft: rgba(59,130,246,.22); border-color: rgba(59,130,246,.4); }
.card.tone-rose { --accent: #ec4899; --accent-2: #fbcfe8; --accent-soft: rgba(236,72,153,.22); border-color: rgba(236,72,153,.4); }
.card.tone-violet { --accent: #a855f7; --accent-2: #e9d5ff; --accent-soft: rgba(168,85,247,.22); border-color: rgba(168,85,247,.4); }
.card.tone-emerald { --accent: #84cc16; --accent-2: #d9f99d; --accent-soft: rgba(132,204,22,.22); border-color: rgba(132,204,22,.4); }
.card.tone-slate { --accent: #94a3b8; --accent-2: #e2e8f0; --accent-soft: rgba(148,163,184,.18); border-color: rgba(148,163,184,.35); }
.card.tone-ruby { --accent: #be123c; --accent-2: #fecdd3; --accent-soft: rgba(190,18,60,.18); border-color: rgba(190,18,60,.35); }

.dash-hero {
    display: grid;
    grid-template-columns: 1.4fr .9fr;
    gap: 16px;
    margin-bottom: 18px;
}
.dash-hero-main {
    padding: 26px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background:
        linear-gradient(135deg, rgba(255,255,255,.06), transparent 40%),
        linear-gradient(160deg, color-mix(in srgb, var(--accent) 32%, #1a140a), #100c07 72%);
    box-shadow: var(--shadow), 0 0 0 1px rgba(212,175,55,.18);
}
.dash-hero-main h2 { margin: 8px 0 10px; font-size: 34px; }
.dash-hero-main p { margin: 0; color: #e6d7a8; max-width: 52ch; line-height: 1.55; }
.dash-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.dash-side {
    display: grid;
    gap: 12px;
}

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px 8px; border-bottom: 1px solid rgba(255,255,255,.06); }
th { color: var(--muted); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }

label { display: grid; gap: 6px; margin-bottom: 12px; color: var(--muted); font-size: 13px; }
input, select, textarea {
    width: 100%;
    background: rgba(12, 9, 6, 0.86);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 11px 12px;
    font: inherit;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
input[type="date"],
input[type="datetime-local"],
input[type="time"],
input[type="month"] {
    color-scheme: dark;
    min-height: 44px;
    padding-right: 42px;
    overflow: visible;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator {
    opacity: 1 !important;
    cursor: pointer;
    width: 22px;
    height: 22px;
    padding: 3px;
    margin: 0 2px 0 8px;
    border-radius: 6px;
    filter: none !important;
    background-color: rgba(255, 255, 255, 0.16);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Crect x='3' y='5' width='18' height='16' rx='2.2' stroke='%23f8fafc' stroke-width='2'/%3E%3Cpath d='M8 3v4M16 3v4M3 10h18' stroke='%23f8fafc' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='8.5' cy='14.5' r='1.2' fill='%23f8fafc'/%3E%3Ccircle cx='12' cy='14.5' r='1.2' fill='%23f8fafc'/%3E%3Ccircle cx='15.5' cy='14.5' r='1.2' fill='%23f8fafc'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px 16px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28);
}
textarea { min-height: 80px; resize: vertical; }
button, .btn {
    display: inline-block;
    background: linear-gradient(90deg, #7c3aed, #db2777);
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(168, 85, 247, .38);
}
.btn.ghost {
    background: transparent;
    color: var(--accent-2);
    border: 1px solid var(--accent);
    box-shadow: none;
}
button.nav-heading {
    background: transparent;
    color: #e2e8f7;
    box-shadow: none;
    border-radius: 12px;
    padding: 10px 12px;
    width: 100%;
    justify-content: space-between;
}
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.pending { background: rgba(232,213,163,.15); color: #e8d5a3; }
.badge.approved, .badge.paid, .badge.active { background: rgba(125,186,122,.15); color: #b6e0b3; }
.badge.rejected, .badge.void, .badge.blocked, .badge.inactive { background: rgba(217,120,106,.15); color: #f0b4ab; }

.alert { padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; border: 1px solid transparent; }
.alert.ok { background: rgba(31,51,36,.85); color: #cdeccd; border-color: rgba(125,186,122,.35); }
.alert.err { background: rgba(58,32,28,.9); color: #f0b4ab; border-color: rgba(217,120,106,.35); }

.split { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; }
.pkg { display: grid; gap: 8px; }
.pkg h3 { margin: 0; font-size: 24px; }
.price { color: var(--accent-2); font-size: 22px; }

.tree-card { padding: 12px; }
.tree-scroll {
    overflow: auto;
    max-width: 100%;
    padding: 8px 4px 16px;
    -webkit-overflow-scrolling: touch;
}
.tree {
    display: inline-block;
    min-width: 100%;
    padding: 8px 28px 20px;
    vertical-align: top;
}
.tree ul {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 0;
    margin: 0 auto;
    padding: 0;
    list-style: none;
    position: relative;
    width: max-content;
}
.tree li {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    list-style: none;
    padding: 28px 12px 0;
    margin: 0;
    flex: 0 0 auto;
    width: max-content;
}
.tree li::before,
.tree li::after {
    content: "";
    position: absolute;
    top: 0;
    width: 50%;
    height: 28px;
    box-sizing: border-box;
}
.tree li::before {
    right: 50%;
    border-top: 2px solid var(--accent);
}
.tree li::after {
    left: 50%;
    border-top: 2px solid var(--accent);
    border-left: 2px solid var(--accent);
}
.tree li:first-child::before { border-top: 0; }
.tree li:last-child::after { border-top: 0; }
.tree li:last-child::before {
    border-right: 2px solid var(--accent);
    border-radius: 0 8px 0 0;
}
.tree li:first-child::after { border-radius: 8px 0 0 0; }
.tree li:only-child::before,
.tree li:only-child::after {
    display: none;
}
.tree li:only-child {
    padding-top: 28px;
}
.tree > ul > li.tree-root-node {
    padding-top: 0;
}
.tree > ul > li.tree-root-node::before,
.tree > ul > li.tree-root-node::after {
    display: none;
}
.tree li.has-kids > .node::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -28px;
    height: 28px;
    border-left: 2px solid var(--accent);
}
.node {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 156px;
    min-height: 88px;
    padding: 10px 8px;
    border: 1px solid var(--accent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--accent) 12%, #10182a);
    position: relative;
    z-index: 1;
    text-align: center;
}
.node.is-root {
    border-width: 2px;
    box-shadow: 0 0 18px var(--accent-soft);
}
.node strong {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.25;
    max-width: 100%;
    word-break: break-word;
}
.node small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.tree-id {
    display: block;
    margin: 4px 0 2px;
    color: var(--accent-2);
    font-weight: 700;
    letter-spacing: .03em;
    text-decoration: none;
    font-size: 12px;
}
a.tree-id:hover { text-decoration: underline; color: #fff; }
.tree-id.current { color: var(--accent-2); }
.tree-more { color: #f4c6e0 !important; font-size: 10px; }

.auth {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px 16px;
    background:
        radial-gradient(700px 360px at 20% 0%, rgba(212,175,55,.28), transparent 55%),
        radial-gradient(500px 280px at 90% 10%, rgba(180,120,40,.18), transparent 50%),
        #120e08;
}
.auth-card {
    width: min(380px, 100%);
    max-width: 380px;
    min-width: 0;
    box-sizing: border-box;
    background: rgba(22, 17, 10, .96);
    border: 1px solid rgba(212,175,55,.28);
    border-radius: 16px;
    padding: 16px 20px 14px;
    box-shadow: var(--shadow);
}
.auth-card .brand-lg {
    display: block;
    margin: 0 auto 2px;
    text-align: center;
}
.auth-card .auth-logo {
    width: 132px;
    max-width: 160px;
}
.auth-card .lede {
    margin: 0 0 10px;
    font-size: 13px;
    text-align: center;
}
.auth-card .portal-switch { margin: 0 0 10px; }
.auth-card .portal-switch-btn {
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
}
.auth-card label {
    margin-bottom: 8px;
    font-size: 12px;
}
.auth-card input {
    min-height: 38px;
    height: 38px;
    padding: 8px 10px;
}
.auth-card .agree-check {
    margin: 2px 0 10px;
    font-size: 12px;
}
.auth-card button { width: 100%; }
.auth-card .hint { margin: 10px 0 0; text-align: center; }
.brand-lg { font-size: 28px; margin-bottom: 6px; }
.lede { color: var(--muted); margin-top: 0; }
.hint { color: var(--muted); font-size: 12px; }
.agree-check {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    margin: 4px 0 16px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
    cursor: pointer;
}
.agree-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    margin-top: 2px;
    accent-color: var(--accent, #d4af37);
    cursor: pointer;
    flex: 0 0 auto;
}
.agree-check span { display: block; }
.agree-check a {
    color: var(--accent-2, #f0dfb0);
    text-decoration: underline;
}
.portal-switch {
    position: relative;
    margin: 0 0 18px;
    z-index: 5;
}
.portal-switch-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(198,161,91,.35);
    background: rgba(255,255,255,.04);
    color: #f4ebe0;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.portal-switch-btn span { flex: 1; text-align: left; }
.portal-switch-btn .portal-ico:last-child {
    width: 16px;
    height: 16px;
    opacity: .8;
    transition: transform .18s ease;
}
.portal-switch.is-open .portal-switch-btn .portal-ico:last-child {
    transform: rotate(180deg);
}
.portal-ico {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    color: var(--accent-2, #f0dfb0);
}
.portal-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    display: grid;
    gap: 4px;
    padding: 8px;
    border-radius: 14px;
    border: 1px solid rgba(198,161,91,.28);
    background: #1a1612;
    box-shadow: 0 16px 40px rgba(0,0,0,.45);
}
.portal-menu[hidden] { display: none !important; }
.portal-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    color: #f4ebe0;
    text-decoration: none;
}
.portal-option:hover,
.portal-option.is-active {
    background: rgba(198,161,91,.14);
}
.portal-option strong {
    display: block;
    font-size: 14px;
}
.portal-option small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
}
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.two > *,
.fields-4 > * { min-width: 0; max-width: 100%; }
.fields-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.hide-mobile { }
.show-mobile-only { display: none !important; }
.bills-mobile { display: none; }
.bills-desktop { display: block; }
.bill-card {
    display: grid;
    gap: 4px;
    padding: 10px;
    margin-bottom: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255,255,255,.03);
    color: inherit;
}
.bill-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.bill-card-total { color: var(--accent-2); font-weight: 700; }
.bill-card-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}
.bill-card-meta span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    width: 100%;
}

.billing-layout { align-items: start; }
.grand-view {
    font-weight: 700;
    color: var(--accent-2) !important;
    border-color: var(--accent) !important;
}
.ornament-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 14px 0 10px;
}
.ornament-lines { display: grid; gap: 8px; }
.ornament-line {
    padding: 0 !important;
    overflow: hidden;
}
.ornament-summary {
    width: 100%;
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr) auto 14px;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.ornament-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.ornament-summary-text {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.ornament-summary-text strong { font-size: 14px; }
.summary-name,
.summary-meta {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}
.summary-total {
    color: var(--accent-2);
    font-weight: 700;
    white-space: nowrap;
}
.summary-chevron {
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg);
    transition: transform .18s ease;
    margin-bottom: 3px;
}
.ornament-line.is-open .summary-chevron {
    transform: rotate(225deg);
    margin-bottom: 0;
    margin-top: 3px;
}
.ornament-details {
    padding: 0 14px 14px;
    border-top: 1px solid rgba(255,255,255,.06);
}
.ornament-details[hidden] { display: none !important; }
.ornament-line-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0 8px;
}
.bill-sheet .bill-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}
.bill-meta { text-align: right; }
.bill-sheet table td:last-child,
.bill-sheet table th:last-child { text-align: right; }

.section-title {
    display: flex; justify-content: space-between; align-items: end;
    gap: 12px; margin: 8px 0 14px;
}
.section-title h2 { margin: 0; font-size: 28px; }

.nav-toggle {
    display: grid;
    place-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(20, 16, 12, 0.92);
    box-shadow: none;
    cursor: pointer;
    padding: 0;
    flex: 0 0 auto;
}
.nav-toggle span {
    display: block;
    width: 16px;
    height: 2px;
    margin: 3px auto;
    background: var(--accent-2);
    border-radius: 2px;
    transition: .2s ease;
}
.nav-backdrop {
    display: none !important;
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(0,0,0,.55);
}
body.nav-open .nav-backdrop {
    display: block !important;
}
.nav-backdrop:not([hidden]) {
    display: block !important;
}
.nav-backdrop[hidden] {
    display: none !important;
}

@media (min-width: 981px) {
    .desktop-logout { display: inline-flex; }
    .mobile-header,
    .mobile-footer { display: none !important; }
    .bills-mobile { display: none !important; }
    .bills-desktop { display: block !important; }
}

@media (max-width: 980px) {
    .app {
        display: block;
        min-height: 100dvh;
        width: 100%;
        max-width: 100%;
        overflow-x: clip;
    }
    .main,
    .split,
    .billing-layout,
    .table-wrap,
    form.panel,
    .card,
    .ornament-line,
    .two,
    .fields-4 {
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
    .tree-card, .tree-scroll {
        max-width: 100%;
        overflow-x: auto;
    }
    .main {
        overflow-x: hidden;
    }
    .bills-mobile { display: grid; gap: 8px; }
    .bills-desktop { display: none !important; }
    .table-wrap h2 { font-size: 18px; margin: 0 0 8px; }
    .table-scroll {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
        width: 100%;
        overscroll-behavior-x: contain;
    }
    .table-scroll table {
        min-width: 520px;
        width: max-content;
    }
    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 55;
        height: calc(50px + env(safe-area-inset-top, 0px));
        padding: 4px 8px;
        padding-top: max(4px, env(safe-area-inset-top, 0px));
        background: rgba(8, 12, 24, 0.98);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 8px 24px rgba(0,0,0,.28);
    }
    .nav-toggle {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }
    .mobile-brand {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
        color: var(--accent-2);
        font-weight: 700;
        font-size: 14px;
        flex: 1 1 auto;
        overflow: hidden;
    }
    .mobile-brand span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .mobile-logo {
        width: 30px;
        height: 30px;
        border-radius: 8px;
        object-fit: contain;
        background: #fff;
        flex: 0 0 auto;
    }
    .mobile-logout {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0;
        width: 36px;
        height: 36px;
        padding: 0;
        border-radius: 10px;
        border: 1px solid var(--line);
        color: var(--accent-2);
        background: rgba(255,255,255,.04);
        font-size: 0;
        font-weight: 700;
        flex: 0 0 auto;
    }
    .mobile-logout span { display: none; }
    .mobile-logout .menu-ico { width: 18px; height: 18px; }
    .mobile-footer {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 55;
        min-height: 54px;
        height: calc(54px + env(safe-area-inset-bottom, 0px));
        padding: 2px 2px calc(2px + env(safe-area-inset-bottom, 0px));
        background: rgba(8, 12, 24, 0.98);
        border-top: 1px solid var(--line);
        box-shadow: 0 -10px 30px rgba(0,0,0,.28);
    }
    .mobile-footer a,
    .mobile-footer-more {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1px;
        min-width: 0;
        border: 0;
        background: transparent;
        color: var(--muted);
        font: inherit;
        font-size: 11px;
        font-weight: 600;
        text-decoration: none;
        padding: 4px 1px;
        border-radius: 10px;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    .mobile-footer .menu-ico { width: 18px; height: 18px; }
    .mobile-footer a.is-active { color: var(--accent-2); }
    .mobile-footer a.is-active .menu-ico {
        background: var(--accent-soft);
        border-radius: 999px;
        padding: 5px;
        box-sizing: content-box;
        color: var(--accent-2);
    }
    .mobile-footer a:hover,
    .mobile-footer-more:hover { color: var(--accent-2); }
    .mobile-footer span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 100%;
        line-height: 1.1;
    }
    .nav-backdrop { display: block; }
    .sidebar {
        position: fixed;
        top: calc(50px + env(safe-area-inset-top, 0px));
        left: 0;
        z-index: 50;
        width: min(300px, 88vw);
        height: calc(100vh - 50px - env(safe-area-inset-top, 0px));
        height: calc(100dvh - 50px - env(safe-area-inset-top, 0px));
        transform: translateX(-105%);
        transition: transform .24s ease;
        flex-direction: column;
        flex-wrap: nowrap;
        overflow: auto;
        padding: 12px 10px 16px;
        box-shadow: 20px 0 50px rgba(0,0,0,.35);
    }
    body.nav-open .sidebar { transform: translateX(0); }
    body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
    body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
    body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
    .main {
        padding:
            calc(56px + env(safe-area-inset-top, 0px))
            10px
            calc(70px + env(safe-area-inset-bottom, 0px));
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        margin-bottom: 10px;
    }
    .topbar .eyebrow { margin-bottom: 0; font-size: 9px; }
    .topbar h1 {
        font-size: 20px;
        line-height: 1.15;
        padding-right: 0;
        word-break: break-word;
    }
    .topbar-actions { width: 100%; }
    .wallet-pills { width: 100%; }
    .wallet-pill {
        flex: 1 1 calc(50% - 8px);
        text-align: center;
        padding: 7px 10px;
        font-size: 12px;
    }
    .desktop-logout { display: none !important; }
    .side-foot { width: 100%; margin-top: auto; }
    .grid { gap: 12px; }
    .dash-hero, .split, .billing-layout { grid-template-columns: 1fr; gap: 10px; }
    .two { grid-template-columns: 1fr 1fr; gap: 6px; }
    .fields-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }
    .cards { grid-template-columns: 1fr; gap: 8px; }
    .hide-mobile { display: none !important; }
    .show-mobile-only { display: grid !important; }
    .topbar > div:first-child { display: none; }
    .topbar {
        margin-bottom: 8px;
        gap: 0;
    }
    .topbar-actions { width: 100%; }
    .wallet-pill {
        width: 100%;
        text-align: center;
        padding: 7px 10px;
        font-size: 13px;
        border-radius: 10px;
    }
    .compact-form > h2 {
        font-size: 18px !important;
        margin: 0 0 8px !important;
    }
    .compact-form .totals-row { margin-top: 8px; }
    nav.side-nav { flex-direction: column; width: 100%; }
    .bill-meta { text-align: left; }
    .bill-sheet .bill-head { flex-direction: column; }
    .ornament-toolbar {
        flex-wrap: nowrap;
        align-items: center;
        margin: 8px 0 6px;
        gap: 8px;
    }
    .ornament-toolbar h3,
    .ornament-toolbar strong { font-size: 15px; margin: 0; }
    .ornament-toolbar .btn {
        width: auto;
        padding: 7px 12px;
        font-size: 13px;
        white-space: nowrap;
    }
    .ornament-lines { gap: 8px; }
    .ornament-line { padding: 0 !important; border-radius: 12px; }
    .ornament-summary { padding: 12px; }
    .ornament-details { padding: 0 12px 12px; }
    .ornament-line-head {
        margin: 10px 0 8px;
        font-size: 13px;
    }
    .ornament-line-head .btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    .section-title {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        margin: 2px 0 8px;
    }
    .section-title h2 { font-size: 18px; }
    .dash-actions { width: 100%; gap: 6px; }
    .dash-actions .btn, .dash-actions .btn.ghost { flex: 1 1 auto; text-align: center; }
    .table-wrap, .card, form.panel {
        padding: 10px;
        border-radius: 12px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .table-wrap > table {
        min-width: 480px;
        width: max-content;
        max-width: none;
        font-size: 13px;
    }
    .card .k { font-size: 12px; }
    .card .v { font-size: 20px; margin-top: 4px; }
    .card p { margin: 4px 0; font-size: 13px; line-height: 1.35; }
    .card .btn, .card button { margin-top: 6px; }
    .bill-card { font-size: 14px; padding: 12px; }
    .bill-card-meta { font-size: 13px; }
    label {
        gap: 4px;
        font-size: 13px;
        margin-bottom: 8px;
        line-height: 1.25;
        max-width: 100%;
        min-width: 0;
    }
    input, select, textarea {
        width: 100%;
        max-width: 100%;
        min-width: 0 !important;
        box-sizing: border-box;
        font-size: 16px;
        padding: 8px 10px;
        border-radius: 8px;
        min-height: 40px;
        height: 40px;
        line-height: 1.2;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    input[type="date"],
    input[type="datetime-local"],
    input[type="month"],
    input[type="time"] {
        overflow: visible;
        padding-right: 40px;
    }
        -moz-appearance: textfield;
        appearance: textfield;
    }
    input[type="number"]::-webkit-outer-spin-button,
    input[type="number"]::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }
    textarea { min-height: 64px; height: auto; }
    select { padding-right: 24px; }
    button, .btn {
        padding: 10px 14px;
        font-size: 14px;
        box-shadow: 0 4px 12px var(--accent-soft);
        max-width: 100%;
        box-sizing: border-box;
    }
    .muted { font-size: 12px; line-height: 1.35; }
    form.panel h2 { font-size: 18px; margin: 0 0 6px; }
    form.panel > p.muted { margin: 0 0 8px; }
    .pkg { gap: 4px; }
    .pkg h3 { font-size: 18px; }
    .price { font-size: 17px; }
    .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    th, td { padding: 8px 6px; }
    .auth { padding: 12px; }
    .auth-card { width: min(380px, 100%); max-width: 380px; padding: 14px 16px; }
    .alert { padding: 10px 12px; margin-bottom: 10px; font-size: 13px; }
    .billing-layout .panel,
    .billing-layout .card,
    .billing-layout > * { min-width: 0; max-width: 100%; }
    .grid { gap: 8px; }
    nav.side-nav a { font-size: 14px; }
    .nav-heading { font-size: 12px; }
}

@media (max-width: 640px) {
    .main {
        padding:
            calc(52px + env(safe-area-inset-top, 0px))
            8px
            calc(66px + env(safe-area-inset-bottom, 0px));
    }
    .topbar { margin-bottom: 8px; }
    .wallet-pill { padding: 7px 10px; font-size: 13px; }
    .card .v { font-size: 18px; }
    .dash-hero-main { padding: 12px; }
    .dash-hero-main h2 { font-size: 22px; }
    button, .btn { width: 100%; text-align: center; }
    .dash-actions .btn, .dash-actions .btn.ghost,
    .topbar-actions .btn, .section-title .btn,
    .ornament-toolbar .btn,
    .ornament-line-head .btn { width: auto; }
    form.panel button[type="submit"] { width: 100%; }
    .table-wrap, .card, form.panel { padding: 10px; }
    .mobile-brand span { max-width: 130px; }
    label { margin-bottom: 7px; font-size: 13px; }
    input, select, textarea {
        padding: 8px 10px;
        min-height: 40px;
        height: 40px;
        font-size: 16px;
        border-radius: 8px;
    }
    textarea { height: auto; min-height: 64px; }
    .two, .fields-4 { gap: 8px; }
    .mobile-header {
        height: calc(50px + env(safe-area-inset-top, 0px));
        padding: 4px 8px;
        padding-top: max(4px, env(safe-area-inset-top, 0px));
    }
    .nav-toggle,
    .mobile-logout { width: 38px; height: 38px; border-radius: 10px; }
    .mobile-logo { width: 28px; height: 28px; }
    .mobile-footer {
        min-height: 56px;
        height: calc(56px + env(safe-area-inset-bottom, 0px));
    }
    .mobile-footer a,
    .mobile-footer-more { font-size: 11px; padding: 4px 1px; }
    .mobile-footer .menu-ico { width: 18px; height: 18px; }
    .sidebar {
        top: calc(50px + env(safe-area-inset-top, 0px));
        height: calc(100dvh - 50px - env(safe-area-inset-top, 0px));
        padding: 10px;
    }
    .compact-form > h2,
    form.panel h2 { font-size: 17px !important; }
}

@media (max-width: 380px) {
    .mobile-brand span { max-width: 96px; }
    .fields-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mobile-footer a,
    .mobile-footer-more { font-size: 10px; }
}

.report-filter-actions {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding-bottom: 2px;
}
.report-filter-actions button { margin: 0; }
.report-export { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.report-export a { margin: 0; }
.report-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}
.pager-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.pager-disabled { opacity: .45; pointer-events: none; }
th.sortable a {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
th.sortable a:hover { color: #f4c6e0; }
th.sortable .sort-ico {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 6px solid rgba(255,255,255,.35);
    opacity: .55;
}
th.sortable.is-asc .sort-ico { opacity: 1; border-bottom-color: #f4c6e0; }
th.sortable.is-desc .sort-ico {
    opacity: 1;
    border-bottom: 0;
    border-top: 6px solid #f4c6e0;
}
.gold-report .table-scroll { overflow-x: auto; }
.gold-report table { width: 100%; }
.gold-report .inner-lines {
    width: 100%;
    margin: 4px 0 2px;
    background: rgba(0,0,0,.18);
    border-radius: 10px;
}
.gold-report tr.report-lines td {
    background: rgba(255,255,255,.03);
    padding-top: 6px;
    padding-bottom: 12px;
}
.gold-report .inner-lines th,
.gold-report .inner-lines td {
    font-size: 12px;
}
.gold-report tfoot th { text-align: left; }
.report-links { display: flex; flex-wrap: wrap; gap: 6px; }
.gold-report .muted { font-size: 12px; }
.cashback-view-btn {
    padding: 6px 12px;
    font-size: 12px;
    white-space: nowrap;
    width: auto !important;
}
tr.cashback-bill-details[hidden] { display: none; }

.party-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 16px;
}
.party-split-home {
    margin-top: 8px;
    gap: 18px;
}
.party-split-home .party-tile {
    min-height: 140px;
    padding: 28px 24px;
}
.party-tile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(255,255,255,.05), transparent 50%),
        #12182a;
    box-shadow: var(--shadow);
    color: inherit;
    text-decoration: none;
    transition: transform .15s ease, border-color .15s ease;
}
.party-tile:hover { transform: translateY(-2px); border-color: var(--accent); }
.party-tile-ico {
    width: 54px; height: 54px; border-radius: 16px;
    display: grid; place-items: center;
    background: var(--accent-soft);
}
.party-tile-ico .portal-ico { width: 28px; height: 28px; color: var(--accent-2); }
.party-tile.is-shop { --accent: #2a9d8f; --accent-2: #9fe7dc; --accent-soft: rgba(42,157,143,.2); --line: rgba(42,157,143,.35); }
.party-tile.is-customer { --accent: #0ea5e9; --accent-2: #bae6fd; --accent-soft: rgba(14,165,233,.2); --line: rgba(14,165,233,.35); }
.party-tile-body { flex: 1; min-width: 0; }
.party-tile-body strong { display: block; font-family: "Cormorant Garamond", Georgia, serif; font-size: 28px; }
.party-tile-body small { color: var(--muted); }
.party-tile-count {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 36px; color: var(--accent-2); font-weight: 700;
}

.party-card-grid { display: grid; gap: 10px; }
.party-card {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(0,0,0,.18);
    color: inherit; text-decoration: none;
    transition: border-color .15s ease, background .15s ease;
}
.party-card:hover { border-color: var(--accent); background: rgba(255,255,255,.04); }
.party-card-lg { padding: 16px; }
.party-card-logo {
    width: 44px; height: 44px; border-radius: 14px;
    display: grid; place-items: center; flex-shrink: 0;
    background: var(--accent-soft);
}
.party-card-logo .portal-ico { width: 22px; height: 22px; color: var(--accent-2); }
.party-card-logo.is-shop { --accent: #2a9d8f; --accent-2: #9fe7dc; --accent-soft: rgba(42,157,143,.22); }
.party-card-logo.is-customer { --accent: #0ea5e9; --accent-2: #bae6fd; --accent-soft: rgba(14,165,233,.22); }
.party-card-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.party-card-main strong { font-size: 16px; }
.party-card-main small { color: var(--muted); font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.party-card-meta { text-align: right; display: grid; gap: 4px; justify-items: end; font-size: 12px; color: var(--muted); }
.party-card-meta strong { color: var(--accent-2); font-size: 15px; }

.party-hero {
    display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
    padding: 18px; border-radius: var(--radius);
    border: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(255,255,255,.05), transparent 45%),
        #12182a;
}
.party-hero .dash-actions { margin-left: auto; }
.party-logo {
    width: 72px; height: 72px; border-radius: 20px;
    display: grid; place-items: center;
    background: var(--accent-soft);
}
.party-logo .portal-ico { width: 36px; height: 36px; color: var(--accent-2); }
.party-logo.is-shop { --accent: #2a9d8f; --accent-2: #9fe7dc; --accent-soft: rgba(42,157,143,.25); }
.party-logo.is-customer { --accent: #0ea5e9; --accent-2: #bae6fd; --accent-soft: rgba(14,165,233,.25); }
.party-hero-main h2 { margin: 4px 0 6px; font-size: 32px; }

.side-welcome {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 16px;
    border: 1px solid rgba(212,175,55,.28);
    background: linear-gradient(180deg, rgba(212,175,55,.16), rgba(16,12,7,.4));
}
.side-welcome .avatar { width: 42px; height: 42px; }
.side-welcome small { display: block; color: var(--muted); font-size: 11px; }
.side-welcome strong { display: block; font-size: 14px; }
.chip-id {
    display: inline-block; margin-top: 4px;
    padding: 2px 8px; border-radius: 999px;
    background: rgba(251,191,36,.15); color: #fde68a;
    font-size: 10px; font-weight: 700; letter-spacing: .06em;
}
.hello-meta { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.topbar h1 .wave { font-size: .72em; }
.btn-glow { box-shadow: 0 0 22px rgba(212,175,55,.55); }

.ticker {
    margin: -8px 0 16px;
    padding: 10px 16px;
    border-radius: 12px;
    background: linear-gradient(90deg, #422006, #713f12);
    color: #fde68a;
    font-size: 13px; font-weight: 600;
    border: 1px solid rgba(251,191,36,.35);
}

.promo-card {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 18px;
    margin-bottom: 16px;
    border-radius: 18px;
    border: 1px solid rgba(251,191,36,.4);
    background: linear-gradient(180deg, rgba(251,191,36,.08), #10182a);
}
.promo-card .k { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #fde68a; }
.promo-card .v { font-size: 22px; font-weight: 700; margin-top: 6px; }
.promo-progress { grid-column: 1 / -1; height: 8px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.promo-progress > span { display: block; height: 100%; background: linear-gradient(90deg, #84cc16, #22d3ee); }

.action-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 18px;
}
.action-tile {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 10px; min-height: 118px; padding: 14px 8px;
    border-radius: 18px; text-align: center; color: #fff; font-weight: 700; font-size: 13px;
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 10px 28px rgba(0,0,0,.28);
    transition: transform .15s ease, box-shadow .15s ease;
}
.action-tile:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(0,0,0,.4); color: #fff; }
.action-tile .ico {
    width: 44px; height: 44px; border-radius: 14px;
    display: grid; place-items: center; font-size: 22px;
    background: rgba(255,255,255,.12);
}
.action-tile.tile-green { background: linear-gradient(160deg, #166534, #14532d); }
.action-tile.tile-blue { background: linear-gradient(160deg, #1d4ed8, #1e3a8a); }
.action-tile.tile-purple { background: linear-gradient(160deg, #7c3aed, #4c1d95); }
.action-tile.tile-pink { background: linear-gradient(160deg, #db2777, #9d174d); }
.action-tile.tile-orange { background: linear-gradient(160deg, #ea580c, #9a3412); }
.action-tile.tile-gold { background: linear-gradient(160deg, #ca8a04, #854d0e); }
.action-tile.tile-cyan { background: linear-gradient(160deg, #0891b2, #155e75); }
.action-tile.tile-lime { background: linear-gradient(160deg, #65a30d, #3f6212); }

@media (max-width: 1100px) {
    .action-grid { grid-template-columns: repeat(3, 1fr); }
    .promo-card { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .action-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .party-split { grid-template-columns: 1fr; }
    .party-lists { grid-template-columns: 1fr; }
}

@media print {
    .sidebar, .mobile-header, .mobile-footer, .topbar, .nav-backdrop,
    .report-filter, .report-links, .report-pager, .alert, .side-foot { display: none !important; }
    .app { display: block; }
    .main { padding: 0 !important; margin: 0; }
    body { background: #fff; color: #111; }
    .card, .table-wrap { box-shadow: none; border-color: #ccc; }
}
