/* Dobinsons ME CRM — demo styles
   Brand: Dobinsons red + charcoal. Clean B2B look, no frameworks.
*/

:root {
    /* Dobinsons brand: black, purple #9D3995, yellow #FFF200 */
    --brand:        #9D3995;   /* Dobinsons purple */
    --brand-dark:   #7C2D77;
    --brand-soft:   #F5E6F3;
    --accent:       #FFF200;   /* Dobinsons yellow */
    --accent-dark:  #E6D900;
    --adonis:       #00A878;   /* Adonis green (diamond) */
    --ink:          #1A1A1A;
    --ink-2:        #374151;
    --muted:        #6B7280;
    --muted-2:      #9CA3AF;
    --bg:           #F4F5F7;
    --card:         #FFFFFF;
    --border:       #E5E7EB;
    --success:      #10B981;
    --success-soft: #D1FAE5;
    --warn:         #F59E0B;
    --warn-soft:    #FEF3C7;
    --danger:       #EF4444;
    --danger-soft:  #FEE2E2;
    --info:         #3B82F6;
    --info-soft:    #DBEAFE;
    color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", system-ui, sans-serif;
    color: var(--ink);
    background: var(--bg);
    font-size: 14px;
    line-height: 1.5;
}

a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Login screen ───────────────────────────────────────────────── */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1A1A1A 0%, #2A2A2A 100%);
    padding: 24px;
}
.login-card {
    background: var(--card);
    border-radius: 12px;
    width: 100%;
    max-width: 380px;
    padding: 36px 32px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.30);
}
.login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}
.login-brand img.dobinsons-mark {
    max-width: 220px;
    height: auto;
    display: block;
}
.login-brand .sub  {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 600;
}
.login-card h1 { margin: 0 0 4px; font-size: 22px; }
.login-card p.sub { margin: 0 0 24px; color: var(--muted); font-size: 13px; }
.login-card label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.login-card input[type=password], .login-card input[type=text] {
    width: 100%; padding: 11px 12px; border: 1px solid var(--border);
    border-radius: 8px; font-size: 14px; margin-bottom: 14px;
    background: #fafafa;
}
.login-card input:focus { outline: none; border-color: var(--brand); background: white; }
.login-card button {
    width: 100%; padding: 12px; background: var(--brand); color: white;
    border: 0; border-radius: 8px; font-weight: 600; font-size: 14px;
    cursor: pointer;
}
.login-card button:hover { background: var(--brand-dark); }
.login-card .error {
    background: var(--danger-soft); color: var(--danger);
    padding: 10px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 14px;
}
.login-foot {
    margin-top: 22px;
    text-align: center;
    font-size: 11px;
    color: var(--muted-2);
}
.adonis-attribution {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    margin-top: 18px; padding-top: 18px;
    border-top: 1px solid var(--border);
    font-size: 10px; color: var(--muted-2);
    text-transform: uppercase; letter-spacing: 1.2px;
}
.adonis-attribution img { width: 18px; height: auto; opacity: 0.8; }
.adonis-attribution strong { color: var(--ink-2); font-weight: 700; }

/* ── App shell ──────────────────────────────────────────────────── */
.app { display: flex; min-height: 100vh; }

.sidebar {
    width: 230px; flex-shrink: 0;
    background: var(--ink); color: white;
    padding: 20px 0;
    position: sticky; top: 0; height: 100vh;
    overflow-y: auto;
}
.sidebar .brand {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 6px 20px 22px;
    border-bottom: 1px solid #2A2A2A;
}
.sidebar .brand img.dobinsons-mark {
    max-width: 170px;
    height: auto;
}
.sidebar .brand .sub {
    font-size: 9px; color: var(--muted-2);
    text-transform: uppercase; letter-spacing: 1.4px; font-weight: 600;
}
.sidebar nav { padding: 16px 12px; }
.sidebar .nav-section {
    font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px;
    color: var(--muted-2); padding: 10px 12px 6px;
}
.sidebar a.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: 6px;
    color: #D1D5DB; text-decoration: none; font-size: 13px;
    margin-bottom: 2px;
    border-left: 3px solid transparent;
}
.sidebar a.nav-item:hover { background: #2A2A2A; color: white; }
.sidebar a.nav-item.active {
    background: var(--brand);
    color: white;
    border-left-color: var(--accent);
}
.sidebar a.nav-item .ico {
    width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.sidebar a.nav-item .ico svg {
    width: 18px; height: 18px;
    fill: currentColor;
}
.sidebar a.nav-item .ico svg path { fill: currentColor; }
.sidebar .logout {
    margin: 14px 12px 0;
    padding: 9px 12px; border-radius: 6px; display: block;
    color: var(--muted-2); font-size: 12px; text-align: center;
    border: 1px solid #2A2A2A;
}
.sidebar .logout:hover { color: var(--accent); border-color: var(--accent); }
.sidebar .powered-by {
    position: absolute; bottom: 16px; left: 0; right: 0;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 14px 20px 0;
    border-top: 1px solid #2A2A2A;
    margin: 0 16px;
}
.sidebar .powered-by .lbl {
    font-size: 9px; color: var(--muted-2);
    text-transform: uppercase; letter-spacing: 1.4px;
}
.sidebar .powered-by img { width: 22px; height: auto; opacity: 0.9; }
.sidebar .powered-by strong { color: #E5E7EB; font-size: 11px; font-weight: 700; letter-spacing: 0.5px; }
.sidebar { position: relative; padding-bottom: 90px; }

/* SVG icon helper for any context */
.svg-icon { width: 16px; height: 16px; display: inline-block; vertical-align: middle; }
.svg-icon path { fill: currentColor; }

.main { flex: 1; padding: 26px 32px 60px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.topbar h1 { margin: 0; font-size: 22px; font-weight: 700; }
.topbar .crumbs { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.topbar .right { display: flex; align-items: center; gap: 10px; }
.topbar .badge {
    background: var(--brand-soft); color: var(--brand-dark);
    padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 600;
}

/* ── Cards / grids ──────────────────────────────────────────────── */
.card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: 10px; padding: 18px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.card-head .sub { font-size: 12px; color: var(--muted); }

.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1100px) {
    .grid-4, .grid-6 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: 1fr; }
}

/* ── KPI tiles ──────────────────────────────────────────────────── */
.kpi { padding: 16px 18px; }
.kpi .k-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); }
.kpi .k-value { font-size: 24px; font-weight: 700; margin-top: 4px; }
.kpi .k-delta { font-size: 12px; margin-top: 6px; }
.kpi .k-delta.up { color: var(--success); }
.kpi .k-delta.down { color: var(--danger); }
.kpi .k-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ── Pills / chips ──────────────────────────────────────────────── */
.pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600;
    background: #F3F4F6; color: var(--ink-2);
}
.pill.green { background: var(--success-soft); color: #047857; }
.pill.amber { background: var(--warn-soft); color: #B45309; }
.pill.red   { background: var(--danger-soft); color: #B91C1C; }
.pill.blue  { background: var(--info-soft); color: #1D4ED8; }
.pill.orange{ background: #FFEDD5; color: #9A3412; }
.pill.gray  { background: #F3F4F6; color: var(--ink-2); }
.pill.dot::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; display: inline-block; }

/* ── Tables ─────────────────────────────────────────────────────── */
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th, table.tbl td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
table.tbl th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); font-weight: 600; background: #FAFAFB; }
table.tbl tr:hover td { background: #FAFAFB; }
table.tbl a { color: var(--ink); font-weight: 500; }
table.tbl a:hover { color: var(--brand); text-decoration: none; }

/* ── Pipeline kanban ────────────────────────────────────────────── */
.kanban { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
@media (max-width: 1100px) { .kanban { grid-template-columns: repeat(3, 1fr); } }
.kan-col { background: #FAFAFB; border: 1px solid var(--border); border-radius: 10px; padding: 10px; min-height: 360px; }
.kan-col h4 { margin: 0 0 10px; font-size: 12px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; padding: 0 4px; }
.kan-col h4 .count { font-size: 11px; color: var(--muted); font-weight: 600; }
.kan-col h4 .sum   { font-size: 10px; color: var(--muted); display: block; margin-top: 2px; }
.kan-card { background: white; border: 1px solid var(--border); border-radius: 8px; padding: 11px 12px; margin-bottom: 8px; }
.kan-card .name { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.kan-card .cust { font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.kan-card .meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-2); }
.kan-card .value { font-weight: 700; color: var(--ink); }

/* ── Channel cards ──────────────────────────────────────────────── */
.chan { padding: 14px; border-radius: 10px; background: var(--card); border: 1px solid var(--border); }
.chan-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.chan-icon { width: 36px; height: 36px; border-radius: 8px; color: white; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; letter-spacing: 0.5px; }
.chan-name { font-weight: 700; font-size: 13px; }
.chan-sub  { font-size: 11px; color: var(--muted); }
.chan-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chan-stat { background: #FAFAFB; border-radius: 6px; padding: 8px 10px; }
.chan-stat .v { font-weight: 700; font-size: 16px; }
.chan-stat .l { font-size: 10px; text-transform: uppercase; color: var(--muted); letter-spacing: 0.5px; }

/* ── Bars ───────────────────────────────────────────────────────── */
.bar-row { display: grid; grid-template-columns: 110px 1fr 70px; align-items: center; gap: 10px; padding: 6px 0; }
.bar-label { font-size: 12px; color: var(--ink-2); }
.bar-track { background: #F3F4F6; height: 10px; border-radius: 5px; overflow: hidden; }
.bar-fill  { height: 100%; background: var(--brand); border-radius: 5px; }
.bar-value { text-align: right; font-size: 12px; font-weight: 600; }

/* ── Buttons / forms ────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; border: 1px solid var(--border); background: white; color: var(--ink); text-decoration: none; }
.btn:hover { background: var(--bg); }
.btn.primary { background: var(--brand); color: white; border-color: var(--brand); }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.ghost { background: transparent; color: var(--muted); border-color: transparent; }
.btn.ghost:hover { background: #F3F4F6; color: var(--ink); }
.btn.sm { padding: 4px 9px; font-size: 11px; }

.input, select.input {
    padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px;
    background: white; font-size: 13px;
}
.input:focus { outline: none; border-color: var(--brand); }

/* ── Detail layout ──────────────────────────────────────────────── */
.detail-grid { display: grid; grid-template-columns: 320px 1fr; gap: 18px; }
@media (max-width: 1000px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-meta dt { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 12px; }
.detail-meta dd { margin: 2px 0 0; font-size: 13px; }
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); margin: 0 0 10px; }
.timeline-item { padding: 10px 0; border-bottom: 1px solid var(--border); }
.timeline-item:last-child { border-bottom: 0; }
.timeline-item .when { font-size: 11px; color: var(--muted); }

/* ── Followup queue ─────────────────────────────────────────────── */
.fu-rules { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
@media (max-width: 1000px) { .fu-rules { grid-template-columns: repeat(2, 1fr); } }
.fu-rule { background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--brand); border-radius: 8px; padding: 12px 14px; }
.fu-rule h4 { margin: 0 0 4px; font-size: 13px; }
.fu-rule p  { margin: 0; font-size: 11px; color: var(--muted); }
.fu-rule.day_1     { border-left-color: var(--success); }
.fu-rule.day_3     { border-left-color: var(--warn); }
.fu-rule.day_7     { border-left-color: #F97316; }
.fu-rule.escalated { border-left-color: var(--danger); background: var(--danger-soft); }

/* ── Inventory ──────────────────────────────────────────────────── */
.stock-low  { color: var(--warn); font-weight: 600; }
.stock-out  { color: var(--danger); font-weight: 700; }
.stock-ok   { color: var(--success); font-weight: 600; }

/* ── Misc ───────────────────────────────────────────────────────── */
.muted { color: var(--muted); }
.right { text-align: right; }
.flex  { display: flex; align-items: center; gap: 10px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* ── Main footer (Powered by Adonis) ────────────────────────────── */
.main-foot {
    margin-top: 36px;
    padding: 18px 0 0;
    border-top: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    font-size: 11px; color: var(--muted);
    flex-wrap: wrap; gap: 12px;
}
.main-foot-left { display: flex; align-items: center; gap: 10px; }
.main-foot-left img.dobinsons-foot { height: 22px; width: auto; }
.main-foot-left .sep { color: var(--muted-2); }
.main-foot-right {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 999px; background: #FAFAFB; border: 1px solid var(--border);
}
.main-foot-right .lbl { font-size: 10px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); }
.main-foot-right img { width: 18px; height: auto; }
.main-foot-right strong { font-size: 12px; color: var(--ink); font-weight: 700; }

/* ════════════════════════════════════════════════════════════════
   MOBILE — feels like a native iOS app
   ──────────────────────────────────────────────────────────────── */

/* Hidden on desktop by default */
.mobile-topbar,
.mobile-tabbar,
.more-sheet,
.more-overlay,
.more-toggle-input { display: none; }

/* No iOS gray tap highlight; smoother scrolling */
html, body { -webkit-tap-highlight-color: transparent; -webkit-overflow-scrolling: touch; }
button, a, label, input { -webkit-tap-highlight-color: transparent; }

/* Inputs at 16px to prevent iOS auto-zoom on focus */
@media (max-width: 768px) {
    .input, select.input, input[type=text], input[type=password], input[type=email], input[type=search] {
        font-size: 16px !important;
    }
}

@media (max-width: 900px) {
    /* Hide desktop sidebar, show mobile top + bottom bars */
    .sidebar { display: none; }
    .mobile-topbar { display: flex; }
    .mobile-tabbar { display: grid; }

    .app { flex-direction: column; }
    .main {
        padding: calc(56px + env(safe-area-inset-top) + 12px) 16px calc(72px + env(safe-area-inset-bottom) + 12px);
    }

    /* Hide the desktop footer attribution on mobile (sheet has it) */
    .main-foot { display: none; }

    /* Topbar within content becomes more compact */
    .topbar { margin-bottom: 14px; }
    .topbar h1 { font-size: 18px; }
    .topbar .crumbs { font-size: 11px; }
    .topbar .right { gap: 6px; flex-wrap: wrap; }

    /* Cards have a touch more padding-ratio */
    .card { padding: 14px; border-radius: 14px; }
    .card-head { margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }

    /* KPI grid → 2 columns on mobile, 1 on very narrow */
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: 1fr; }
    .grid-6 { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
    .kpi .k-value { font-size: 20px; }

    /* Pipeline: horizontal scroll instead of squishing */
    .kanban {
        grid-template-columns: repeat(6, 78vw);
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 10px;
        margin: 0 -16px;
        padding: 0 16px 6px;
        -webkit-overflow-scrolling: touch;
    }
    .kan-col {
        scroll-snap-align: start;
        min-height: 320px;
    }

    /* Tables: keep readable but cram less */
    table.tbl { font-size: 12px; min-width: max-content; }
    table.tbl th, table.tbl td { padding: 9px 8px; white-space: nowrap; }
    table.tbl td:nth-child(1) { white-space: normal; } /* first column can wrap */

    /* Any card containing a table allows horizontal scroll */
    .card { overflow-x: auto; -webkit-overflow-scrolling: touch; }

    /* Wrap any table in a scroll container — applies if author adds .tbl-scroll */
    .tbl-scroll { overflow-x: auto; margin: 0 -14px; padding: 0 14px; -webkit-overflow-scrolling: touch; }

    /* Customer detail: stack the meta column above content */
    .detail-grid { grid-template-columns: 1fr; gap: 12px; }

    /* Login screen — tighter padding, full-width card */
    .login-wrap { padding: 16px; }
    .login-card { padding: 28px 22px; border-radius: 16px; }
    .login-brand img.dobinsons-mark { max-width: 180px; }

    /* Channel cards full-width */
    .grid > .card { border-radius: 14px; }

    /* Followup rules: 2-up */
    .fu-rules { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .grid-4, .grid-6 { grid-template-columns: 1fr; }
    .fu-rules { grid-template-columns: 1fr; }
    .topbar h1 { font-size: 17px; }
    .kpi .k-value { font-size: 22px; }
    .kanban { grid-template-columns: repeat(6, 86vw); }
    .main { padding-left: 14px; padding-right: 14px; }
}

/* ── Mobile top app bar ─────────────────────────────────────────── */
.mobile-topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 50;
    display: none;
    align-items: center; gap: 10px;
    padding: env(safe-area-inset-top) 12px 0;
    height: calc(56px + env(safe-area-inset-top));
    background: var(--ink);
    color: white;
    box-shadow: 0 1px 0 rgba(255,255,255,0.04);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.mtopbar-brand {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 8px;
    flex-shrink: 0;
}
.mtopbar-brand img { width: 28px; height: 28px; border-radius: 7px; display: block; }
.mtopbar-title {
    flex: 1; text-align: center;
    font-size: 15px; font-weight: 700; letter-spacing: 0.2px;
    color: white;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mtopbar-action {
    width: 36px; height: 36px; border-radius: 18px;
    display: inline-flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.85); font-size: 18px;
    text-decoration: none;
}
.mtopbar-action:hover { background: rgba(255,255,255,0.08); color: white; }

/* ── Mobile bottom tab bar ──────────────────────────────────────── */
.mobile-tabbar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
    display: none;
    grid-template-columns: repeat(5, 1fr);
    padding: 6px 4px calc(env(safe-area-inset-bottom) + 4px);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid var(--border);
}
.tab-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 6px 4px;
    text-decoration: none;
    color: var(--muted);
    font-size: 10px; font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    -webkit-user-select: none; user-select: none;
    transition: color 120ms ease;
    min-height: 52px;
}
.tab-item:active { background: rgba(157,57,149,0.06); }
.tab-item.active { color: var(--brand); }
.tab-item .tab-ico {
    width: 24px; height: 24px;
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 2px;
    color: currentColor;
}
.tab-item .tab-ico svg { width: 22px; height: 22px; fill: currentColor; }
.tab-item .tab-ico svg path,
.tab-item .tab-ico svg circle { fill: currentColor; }
.tab-item .tab-lbl { letter-spacing: 0.2px; }

/* ── "More" slide-up sheet (iOS action-sheet) ───────────────────── */
.more-overlay {
    position: fixed; inset: 0; z-index: 60;
    background: rgba(0,0,0,0); pointer-events: none;
    transition: background 220ms ease;
}
.more-sheet {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    transform: translateY(110%);
    transition: transform 280ms cubic-bezier(0.4, 0.0, 0.2, 1);
    background: white;
    border-radius: 20px 20px 0 0;
    padding: 8px 16px calc(env(safe-area-inset-bottom) + 16px);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.25);
    max-height: 80vh;
    overflow-y: auto;
}
.more-toggle-input:checked ~ .more-overlay {
    background: rgba(0,0,0,0.45);
    pointer-events: auto;
}
.more-toggle-input:checked ~ .more-sheet {
    transform: translateY(0);
    display: block;
}
.more-handle {
    width: 38px; height: 5px; border-radius: 3px;
    background: #D1D5DB;
    margin: 6px auto 12px;
}
.more-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 4px 8px;
}
.more-head h3 { margin: 0; font-size: 18px; font-weight: 700; }
.more-close {
    font-size: 14px; color: var(--brand); font-weight: 600;
    padding: 6px 8px; border-radius: 6px; cursor: pointer;
}
.more-close:active { background: var(--brand-soft); }
.more-item {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 8px;
    color: var(--ink);
    text-decoration: none;
    border-radius: 10px;
    font-size: 15px; font-weight: 500;
    border-bottom: 1px solid var(--border);
}
.more-item:last-of-type { border-bottom: 0; }
.more-item:active { background: var(--brand-soft); }
.more-item.active { color: var(--brand); }
.more-item.active .more-ico { color: var(--brand); }
.more-ico {
    width: 28px; height: 28px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--muted);
    flex-shrink: 0;
}
.more-ico svg { width: 24px; height: 24px; fill: currentColor; }
.more-ico svg path, .more-ico svg circle { fill: currentColor; }
.more-divider { height: 8px; }
.more-signout { color: var(--danger); }
.more-signout .more-ico { color: var(--danger); }
.more-powered {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-top: 18px; padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 11px; color: var(--muted);
    text-transform: uppercase; letter-spacing: 1.2px;
}
.more-powered img { width: 18px; height: auto; opacity: 0.85; }
.more-powered strong { color: var(--ink-2); font-size: 12px; font-weight: 700; letter-spacing: 0.4px; }
.more-powered .lbl { font-size: 9px; }

/* On desktop, ensure these are fully out of the layout */
@media (min-width: 901px) {
    .mobile-topbar, .mobile-tabbar { display: none !important; }
    .more-overlay, .more-sheet { display: none !important; }
}
