.app-body[data-role="business"] .app-nav,
.app-body[data-role="business"] .app-footer {
    display: none;
}

.app-body[data-role="business"] {
    height: 100vh;
    overflow: hidden;
    background: #f4f0e7;
}

.app-body[data-role="general_user"] .app-nav,
.app-body[data-role="general_user"] .app-footer {
    display: none;
}

.app-body[data-role="general_user"] {
    height: 100vh;
    overflow: hidden;
    background: #f4f0e7;
}

.app-body[data-role="general_user"] .app-main {
    padding-top: 0;
}

.app-body[data-role="general_user"] .app-container {
    width: 100%;
    max-width: none;
    padding: 0;
}

.usr-shell {
    --usr-sidebar-w: 272px;
    display: grid;
    grid-template-columns: var(--usr-sidebar-w) 1fr;
    height: 100vh;
    background: radial-gradient(circle at top right, #f9f4ea 0%, #f3eddc 40%, #efe6d4 100%);
    overflow: hidden;
}

.usr-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 1rem 0.9rem;
    border-right: 1px solid rgba(74, 103, 65, 0.18);
    background: linear-gradient(175deg, #f1efe6 0%, #eceadf 40%, #e7e3d3 100%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
}

.usr-brand-mark {
    color: #243222;
    border: 1px solid rgba(74, 103, 65, 0.16);
    background: rgba(255, 255, 255, 0.45);
}

.usr-brand-mark:hover {
    text-decoration: none;
    background: rgba(255, 255, 255, 0.62);
}

.usr-nav-group { display: flex; flex-direction: column; gap: 0.3rem; }

.usr-nav-item,
.usr-logout-btn {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    border: 0;
    width: 100%;
    text-align: left;
    background: transparent;
    color: #374b35;
    border-radius: 11px;
    padding: 0.62rem 0.7rem;
    font-weight: 600;
    transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.usr-nav-item:hover,
.usr-logout-btn:hover {
    background: rgba(74, 103, 65, 0.10);
    color: #263522;
    box-shadow: inset 0 0 0 1px rgba(74, 103, 65, 0.14);
    text-decoration: none;
}

.usr-nav-item.is-active {
    background: linear-gradient(90deg, #d7e5cf 0%, #eaf3e4 100%);
    color: #1d2b1a;
    box-shadow: inset 3px 0 0 #4a6741, inset 0 0 0 1px rgba(74, 103, 65, 0.18);
}

.usr-nav-item__icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.usr-sidebar__foot {
    margin-top: auto;
    border-top: 1px solid rgba(51, 65, 45, 0.12);
    padding-top: 0.9rem;
}

.usr-user-mini { display: flex; align-items: center; gap: 0.65rem; margin-bottom: 0.6rem; }
.usr-user-mini__avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: #d8e4f1; color: #2a3f5a; font-weight: 700;
    display: grid; place-items: center;
}
.usr-user-mini span { display: block; font-size: 0.76rem; color: #667b91; }

.usr-workspace {
    padding: 0.5rem 1.15rem 1.8rem;
    min-width: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.usr-topbar { display:flex; align-items:flex-start; justify-content:space-between; gap:0.8rem; margin-bottom:1rem; }
.usr-topbar h1 { margin:0 0 .25rem; font-size:1.35rem; color:#243247; }
.usr-topbar p { margin:0; color:#6f7f95; font-size:.9rem; }
.usr-topbar__actions { display:flex; gap:.55rem; }
.usr-content { display:flex; flex-direction:column; gap:1rem; min-width:0; }

.usr-sidebar-toggle {
    display: none;
    border: 1px solid #ced8e3;
    border-radius: 9px;
    background: #fff;
    width: 38px;
    height: 36px;
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
}
.usr-sidebar-toggle span { width:16px; height:2px; background:#466180; border-radius:999px; }
.usr-shell-backdrop { display:none; }

.app-body[data-role="general_user"] a:hover { text-decoration:none; }
.app-body[data-role="general_user"] .card { background: linear-gradient(180deg, #fffefb 0%, #faf7f1 100%); border-color:#e7e1d6; }
.app-body[data-role="general_user"] .card-header { background: linear-gradient(180deg, #f8f5ee 0%, #f5f1e9 100%); }

@media (max-width: 1024px) {
    .usr-shell { grid-template-columns: 1fr; }
    .usr-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-105%);
        transition: transform 220ms ease;
        z-index: 80;
    }
    .usr-shell.is-open .usr-sidebar { transform: translateX(0); }
    .usr-sidebar-toggle { display: inline-flex; }
    .usr-shell-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(22, 26, 21, 0.4);
        display: none;
        z-index: 70;
    }
    .usr-shell.is-open .usr-shell-backdrop { display: block; }
}

@media (max-width: 640px) {
    .usr-topbar { flex-wrap: wrap; }
    .usr-topbar__actions { width: 100%; }
    .usr-topbar__actions .btn { flex: 1; justify-content: center; }
}

/* Align general_user welcome panel to the warmer sidebar palette */
.app-body[data-role="general_user"] .dash-welcome--user {
    background: linear-gradient(135deg, var(--olive-deep) 0%, var(--olive) 62%, #6a8f5a 100%);
}

.app-body[data-role="charity"] .app-nav,
.app-body[data-role="charity"] .app-footer {
    display: none;
}

.app-body[data-role="charity"] {
    height: 100vh;
    overflow: hidden;
    background: #f4f0e7;
}

.app-body[data-role="charity"] .app-main {
    padding-top: 0 !important;
}

.app-body[data-role="charity"] .app-container {
    width: 100%;
    max-width: none;
    padding: 0;
}

.app-body[data-role="admin"] .app-nav,
.app-body[data-role="admin"] .app-footer {
    display: none;
}

.app-body[data-role="admin"] {
    height: 100vh;
    overflow: hidden;
    background: #f4f0e7;
}

.app-body[data-role="admin"] .app-main {
    padding-top: 0 !important;
}

.app-body[data-role="admin"] .app-container {
    width: 100%;
    max-width: none;
    padding: 0;
}

.app-body[data-role="admin"] .card {
    background: linear-gradient(180deg, rgba(255,255,255,0.78) 0%, rgba(248,244,234,0.62) 100%);
    border-color: rgba(196,145,62,0.26);
    box-shadow: var(--shadow-md);
}

.app-body[data-role="admin"] .card-header {
    background: linear-gradient(180deg, rgba(196,145,62,0.18) 0%, rgba(196,145,62,0.06) 100%);
    border-bottom-color: rgba(196,145,62,0.25);
}

.app-body[data-role="admin"] .table th {
    background: rgba(255,255,255,0.62);
    border-bottom-color: rgba(196,145,62,0.38);
    color: var(--olive-deep);
}

.app-body[data-role="admin"] .table tbody tr:hover {
    background: rgba(196,145,62,0.08);
}

.admin-shell {
    --admin-sidebar-w: 292px;
    --admin-sidebar-w-collapsed: 84px;
    display: grid;
    grid-template-columns: var(--admin-sidebar-w) 1fr;
    height: 100vh;
    overflow: hidden;
    background: radial-gradient(circle at top right, #f2efe7 0%, #efe9df 40%, #ece5d8 100%);
}

.admin-shell.is-collapsed {
    grid-template-columns: var(--admin-sidebar-w-collapsed) 1fr;
}

.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 1rem 0.95rem;
    overflow-y: auto;
    overflow-x: hidden;
    background: linear-gradient(180deg, #1b2320 0%, #131a17 65%, #0f1412 100%);
    color: rgba(255,255,255,0.92);
    border-right: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-brand-mark,
.biz-brand-mark,
.usr-brand-mark,
.char-brand-mark {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.65rem;
    text-decoration: none;
    padding: 0.55rem 0.65rem;
    min-height: 0;
    border-radius: 12px;
    line-height: 1.25;
}

.admin-brand-mark {
    color: rgba(255,255,255,0.92);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
}

.admin-brand-mark:hover {
    text-decoration: none;
    background: rgba(255,255,255,0.09);
}

.admin-shell.is-collapsed .admin-brand-mark {
    justify-content: center;
    padding: 0.55rem 0.35rem;
    gap: 0;
}

.admin-shell.is-collapsed .shell-brand-text {
    display: none;
}

.admin-shell.is-collapsed .shell-brand-logo .site-logo--sidebar {
    height: 30px;
    max-width: 44px;
}

.admin-nav-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.admin-nav-item,
.admin-logout-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    color: rgba(255,255,255,0.78);
    border-radius: 12px;
    padding: 0.64rem 0.7rem;
    font-weight: 700;
    transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.admin-nav-item:hover,
.admin-logout-btn:hover {
    background: rgba(196,145,62,0.12);
    color: rgba(255,255,255,0.92);
    box-shadow: inset 0 0 0 1px rgba(196,145,62,0.18);
    transform: translateY(-1px);
    text-decoration: none;
}

.admin-nav-item.is-active {
    background: linear-gradient(90deg, rgba(196,145,62,0.18) 0%, rgba(196,145,62,0.06) 100%);
    color: rgba(255,255,255,0.96);
    box-shadow: inset 4px 0 0 rgba(196,145,62,0.9);
}

.admin-nav-item__icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.admin-sidebar__foot {
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.admin-shell.is-collapsed .admin-nav-item,
.admin-shell.is-collapsed .admin-logout-btn {
    justify-content: center;
    padding-inline: 0;
}

.admin-shell.is-collapsed .admin-nav-item > span:last-child,
.admin-shell.is-collapsed .admin-logout-btn > span:last-child {
    display: none;
}

.admin-shell.is-collapsed .admin-user-mini {
    justify-content: center;
}

.admin-shell.is-collapsed .admin-user-mini > div:last-child {
    display: none;
}

.admin-user-mini {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.7rem;
}

.admin-user-mini__avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 900;
    background: rgba(196,145,62,0.16);
    border: 1px solid rgba(196,145,62,0.28);
    color: rgba(255,255,255,0.92);
}

.admin-user-mini strong {
    display: block;
    font-weight: 900;
}

.admin-user-mini span {
    display: block;
    font-size: 0.76rem;
    color: rgba(255,255,255,0.68);
}

.admin-workspace {
    padding: 0 1.15rem 1.8rem;
    min-width: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.admin-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.9rem;
    margin-bottom: 1.05rem;
}

.admin-topbar__head h1 {
    margin: 0 0 0.25rem;
    font-size: 1.45rem;
    letter-spacing: -0.02em;
    color: #1f2a1e;
}

.admin-topbar__head p {
    margin: 0;
    font-size: 0.92rem;
    color: #4d5a4a;
    max-width: 520px;
}

.admin-topbar__actions {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.admin-content {
    display: flex;
    flex-direction: column;
    gap: 1.05rem;
    min-width: 0;
    max-width: 100%;
    overflow-x: visible;
}

/* Team members page: never push admin workspace wider than viewport */
.tm-page,
.tm-layout {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* Admin detail pages (view user, view listing, etc.) */
.admin-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
    gap: 1.25rem;
    align-items: start;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.admin-detail-layout > * {
    min-width: 0;
    max-width: 100%;
}

.app-body[data-role="admin"] .page-head {
    min-width: 0;
    max-width: 100%;
}

.app-body[data-role="admin"] .page-head h1 {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.app-body[data-role="admin"] .breadcrumb {
    flex-wrap: wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
}

.app-body[data-role="admin"] .admin-detail-layout .listing-meta-list dd,
.app-body[data-role="admin"] .admin-detail-layout .card-body {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.app-body[data-role="admin"] .admin-detail-layout form[style*="display:flex"] {
    flex-wrap: wrap !important;
    max-width: 100%;
}

.app-body[data-role="admin"] .admin-detail-layout form .form-control {
    max-width: 100%;
    min-width: 0;
}

@media (max-width: 900px) {
    .admin-detail-layout {
        grid-template-columns: 1fr;
    }

    .admin-detail-layout .table-wrapper {
        margin-left: 0;
        margin-right: 0;
    }
}

.admin-shell-backdrop {
    display: none;
}

@media (max-width: 1024px) {
    .admin-shell.is-collapsed {
        grid-template-columns: 1fr;
    }

    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-110%);
        transition: transform 220ms ease;
        z-index: 120;
        width: 292px;
    }

    .admin-shell.is-open .admin-sidebar {
        transform: translateX(0);
    }

    .admin-sidebar-toggle {
        display: inline-flex;
    }

    .admin-shell-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(12, 18, 15, 0.52);
        display: none;
        z-index: 110;
    }

    .admin-shell.is-open .admin-shell-backdrop {
        display: block;
    }
}

.admin-sidebar-toggle {
    display: none;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 10px;
    background: rgba(255,255,255,0.08);
    width: 44px;
    height: 38px;
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
}

.admin-sidebar-toggle span {
    width: 18px;
    height: 2px;
    background: rgba(196,145,62,0.9);
    border-radius: 999px;
}

.app-body[data-role="admin"] a:hover {
    text-decoration: none;
}

.char-shell {
    --char-sidebar-w: 272px;
    display: grid;
    grid-template-columns: var(--char-sidebar-w) 1fr;
    height: 100vh;
    background: radial-gradient(circle at top right, #fbf5ea 0%, #f1ead9 40%, #e7dcc7 100%);
    overflow: hidden;
}

.char-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 1rem 0.9rem;
    border-right: 1px solid rgba(74, 103, 65, 0.18);
    background: linear-gradient(175deg, #f3efe6 0%, #efe6d8 45%, #eadfd0 100%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    overflow-x: hidden;
}

.char-brand-mark {
    color: #2b201a;
    border: 1px solid rgba(181, 96, 74, 0.18);
    background: rgba(255, 255, 255, 0.45);
}

.char-brand-mark:hover {
    text-decoration: none;
    background: rgba(255, 255, 255, 0.62);
}

.char-nav-group { display: flex; flex-direction: column; gap: 0.3rem; }

.char-nav-item,
.char-logout-btn {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    border: 0;
    width: 100%;
    text-align: left;
    background: transparent;
    color: #3a2a23;
    border-radius: 11px;
    padding: 0.62rem 0.7rem;
    font-weight: 600;
    transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.char-nav-item:hover,
.char-logout-btn:hover {
    background: rgba(181, 96, 74, 0.11);
    color: #2b201a;
    box-shadow: inset 0 0 0 1px rgba(181, 96, 74, 0.14);
    text-decoration: none;
}

.char-nav-item.is-active {
    background: linear-gradient(90deg, #f6e8d8 0%, #efe7dc 100%);
    color: #2b201a;
    box-shadow: inset 3px 0 0 #c4913e, inset 0 0 0 1px rgba(196, 145, 62, 0.2);
}

.char-nav-item__icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.char-sidebar__foot {
    margin-top: auto;
    border-top: 1px solid rgba(51, 65, 45, 0.12);
    padding-top: 0.9rem;
}

.char-user-mini { display: flex; align-items: center; gap: 0.65rem; margin-bottom: 0.6rem; }
.char-user-mini__avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #ead0c1;
    color: #2b201a;
    font-weight: 700;
    display: grid;
    place-items: center;
}
.char-user-mini span { display:block; font-size:0.76rem; color:#7a5a4a; }

.char-workspace {
    padding: 2.1rem 1.55rem 1.9rem;
    min-width: 0;
    margin-top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.char-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.char-topbar h1 { margin: 0 0 .25rem; font-size: 1.35rem; color: #2b201a; }
.char-topbar p { margin: 0; color: #7a5a4a; font-size: .9rem; }
.char-topbar__actions {
    display: flex;
    gap: 0.55rem;
    padding-top: 0.15rem;
    padding-right: 0.1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.char-content { display:flex; flex-direction:column; gap:1rem; min-width:0; }

.char-sidebar-toggle {
    display: none;
    border: 1px solid rgba(181, 96, 74, 0.24);
    border-radius: 9px;
    background: #fff;
    width: 38px;
    height: 36px;
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
}

.char-sidebar-toggle span {
    width: 16px;
    height: 2px;
    background: #c4913e;
    border-radius: 999px;
}

.char-shell-backdrop { display: none; }

.app-body[data-role="charity"] a:hover { text-decoration: none; }
.app-body[data-role="charity"] .card { background: linear-gradient(180deg, #fffefb 0%, #faf7f1 100%); border-color: #e7e1d6; }
.app-body[data-role="charity"] .dash-welcome--charity {
    /* Lighter, warmer charity palette (cream + muted sage + soft amber) */
    background: linear-gradient(
        135deg,
        rgba(74, 103, 65, 0.82) 0%,
        rgba(122, 154, 106, 0.86) 55%,
        rgba(196, 145, 62, 0.82) 100%
    );
}

@media (max-width: 1024px) {
    /* Layout: switch from side-by-side grid to stacked block */
    .char-shell {
        grid-template-columns: 1fr;
        height: auto !important;
        overflow: visible !important;
        min-height: 100vh;
    }

    /* Sidebar: off-canvas drawer */
    .char-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        height: 100vh !important;
        transform: translateX(-105%);
        transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 500 !important;
    }

    .char-shell.is-open .char-sidebar { transform: translateX(0); }
    .char-sidebar-toggle { display: inline-flex; }

    /* Backdrop */
    .char-shell-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(22, 26, 21, 0.5);
        display: none;
        z-index: 490 !important;
    }
    .char-shell.is-open .char-shell-backdrop { display: block; }

    /* CRITICAL: workspace must scroll normally, not be a fixed-height container */
    .char-workspace {
        height: auto !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
        min-height: 100vh;
        padding: 0 !important;
    }

    /* Topbar: sticky to viewport (works because workspace is no longer overflow:auto) */
    .char-topbar {
        position: sticky !important;
        top: 0 !important;
        z-index: 200 !important;
        background: linear-gradient(135deg, #f3efe6 0%, #efe6d8 100%) !important;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid rgba(181, 96, 74, 0.15);
        padding: 0.85rem 1rem !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.75rem !important;
        flex-wrap: nowrap !important;
    }

    .char-topbar h1 { font-size: 1.1rem !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .char-topbar p { display: none; }

    /* Actual content gets padding instead */
    .char-content {
        padding: 1.25rem 1rem !important;
    }
}


@media (max-width: 640px) {
    .char-workspace { padding-top: 1.2rem; }
    .char-topbar { flex-wrap: wrap; }
    .char-topbar__actions { width: 100%; }
    .char-topbar__actions .btn { flex: 1; justify-content: center; }
}

.app-body[data-role="business"] .app-main {
    padding-top: 0;
}

.app-body[data-role="business"] .app-container {
    width: 100%;
    max-width: none;
    padding: 0;
}

.biz-shell {
    --biz-sidebar-w: 272px;
    display: grid;
    grid-template-columns: var(--biz-sidebar-w) 1fr;
    height: 100vh;
    background: radial-gradient(circle at top right, #f7f3ec 0%, #f2ede2 45%, #efe9dd 100%);
    overflow: hidden;
}

.biz-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 1rem 0.9rem;
    border-right: 1px solid rgba(51, 65, 45, 0.15);
    background: linear-gradient(175deg, #eef3ea 0%, #e7edde 40%, #e4e8dc 100%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    overflow-x: hidden;
}

.biz-brand-mark {
    color: #263522;
    border: 1px solid rgba(74, 103, 65, 0.14);
    background: rgba(255, 255, 255, 0.45);
}

.biz-brand-mark:hover {
    text-decoration: none;
    background: rgba(255, 255, 255, 0.62);
}

.biz-nav-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.biz-nav-item,
.biz-logout-btn {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    border: 0;
    width: 100%;
    text-align: left;
    background: transparent;
    color: #3a4934;
    border-radius: 11px;
    padding: 0.62rem 0.7rem;
    font-weight: 600;
    transition: background 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.biz-nav-item:hover,
.biz-logout-btn:hover {
    background: rgba(74, 103, 65, 0.12);
    color: #22301e;
    box-shadow: inset 0 0 0 1px rgba(74, 103, 65, 0.15);
    text-decoration: none;
}

.biz-nav-item.is-active {
    background: linear-gradient(90deg, #d7e5cf 0%, #e7efe1 100%);
    color: #1d2b1a;
    box-shadow: inset 3px 0 0 #4d7141, inset 0 0 0 1px rgba(74, 103, 65, 0.15);
}

.biz-nav-item__icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.biz-sidebar__foot {
    margin-top: auto;
    border-top: 1px solid rgba(51, 65, 45, 0.12);
    padding-top: 0.9rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(250, 252, 248, 0.7) 100%);
}

.biz-user-mini {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.6rem;
}

.biz-user-mini__avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #d9e4d1;
    color: #2d3d28;
    font-weight: 700;
    display: grid;
    place-items: center;
}

.biz-user-mini span {
    display: block;
    font-size: 0.76rem;
    color: #6a7564;
}

.biz-workspace {
    padding: 1.15rem 1.15rem 1.8rem;
    min-width: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.biz-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.biz-topbar h1 {
    margin: 0 0 0.25rem;
    font-size: 1.35rem;
    color: #263322;
}

.biz-topbar p {
    margin: 0;
    color: #6f786b;
    font-size: 0.9rem;
}

.biz-topbar__actions {
    display: flex;
    gap: 0.55rem;
}

.biz-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.biz-snapshot {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 0.8rem;
}

.biz-snapshot article {
    background: #fff;
    border: 1px solid #e3dfd5;
    border-radius: 14px;
    padding: 1rem;
}

.biz-snapshot__lead {
    background: linear-gradient(160deg, #33482c 0%, #425f38 100%) !important;
    color: #f2f6ef;
}

.biz-snapshot__lead h2 {
    margin: 0.4rem 0;
    font-size: 1.15rem;
}

.biz-kicker {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.7rem;
    opacity: 0.8;
}

.biz-snapshot__metric span {
    display: block;
    color: #697264;
    font-size: 0.78rem;
}

.biz-snapshot__metric strong {
    font-size: 1.35rem;
    color: #283522;
}

.biz-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 0.9rem;
}

.biz-panel .card-header h3 {
    margin: 0;
}

.biz-panel {
    min-width: 0;
    border-radius: 14px;
    overflow: hidden;
}

.app-body[data-role="business"] .card,
.app-body[data-role="business"] .table-wrapper {
    min-width: 0;
    max-width: 100%;
}

.app-body[data-role="business"] .table-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
}

/* Admin: every table scrolls horizontally inside its card — nothing clipped */
.app-body[data-role="admin"] .card {
    overflow: visible;
    min-width: 0;
    max-width: 100%;
}

.app-body[data-role="admin"] .table-wrapper {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(74, 103, 65, 0.55) rgba(30, 50, 20, 0.08);
}

.app-body[data-role="admin"] .table-wrapper::-webkit-scrollbar {
    height: 10px;
}

.app-body[data-role="admin"] .table-wrapper::-webkit-scrollbar-track {
    background: rgba(30, 50, 20, 0.06);
    border-radius: 999px;
}

.app-body[data-role="admin"] .table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(74, 103, 65, 0.5);
    border-radius: 999px;
}

.app-body[data-role="admin"] .table-wrapper > .table {
    width: max-content;
    min-width: 100%;
}

.app-body[data-role="admin"] .table-wrapper > .table.table--users {
    min-width: 960px;
}

.app-body[data-role="admin"] .table-wrapper > .table.table--wide {
    min-width: 820px;
}

.app-body[data-role="admin"] .table-wrapper > .table.table--logs {
    min-width: 1040px;
}

.app-body[data-role="business"] .table-wrapper::-webkit-scrollbar,
.app-body[data-role="general_user"] .table-wrapper::-webkit-scrollbar,
.app-body[data-role="charity"] .table-wrapper::-webkit-scrollbar,
.biz-workspace::-webkit-scrollbar,
.biz-sidebar::-webkit-scrollbar,
.usr-workspace::-webkit-scrollbar,
.usr-sidebar::-webkit-scrollbar,
.char-workspace::-webkit-scrollbar,
.char-sidebar::-webkit-scrollbar,
.admin-workspace::-webkit-scrollbar,
.admin-sidebar::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.app-body[data-role="business"] .table-wrapper,
.biz-workspace,
.biz-sidebar,
.usr-workspace,
.usr-sidebar,
.char-workspace,
.char-sidebar,
.admin-workspace,
.admin-sidebar {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.app-body[data-role="business"] .card {
    background: linear-gradient(180deg, #fffdf9 0%, #faf7f1 100%);
    border-color: #e7e1d6;
}

.app-body[data-role="business"] .card-header {
    background: linear-gradient(180deg, #f8f5ee 0%, #f5f1e9 100%);
}

.biz-panel .card-header {
    padding: 0.95rem 1.15rem;
    background: #f8f6f1;
}

.biz-panel .card-body {
    padding: 1rem 1.15rem;
}

.biz-list {
    display: flex;
    flex-direction: column;
    padding: 0.15rem 0.4rem 0.65rem;
}

.biz-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1.1rem;
    border-top: 1px solid #ece7de;
}

.biz-row:first-child {
    border-top: 0;
}

.biz-row__title {
    color: #2f3d2a;
    font-weight: 700;
    text-decoration: none;
}

.biz-row__title:hover {
    color: #3f5f35;
    text-decoration: none;
}

.biz-row p {
    margin: 0.2rem 0 0;
    font-size: 0.8rem;
    color: #778074;
}

.biz-row__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.biz-side-stack {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.biz-actions {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.biz-action-link {
    text-decoration: none;
    border: 1px solid #e7e2d9;
    border-radius: 10px;
    padding: 0.6rem 0.7rem;
    color: #394735;
    font-weight: 600;
    font-size: 0.88rem;
}

.biz-action-link:hover {
    border-color: rgba(74, 103, 65, 0.35);
    background: rgba(74, 103, 65, 0.05);
    text-decoration: none;
}

.biz-impact-mini {
    display: grid;
    gap: 0.7rem;
}

.biz-impact-mini div {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed #e5dfd4;
    padding-bottom: 0.5rem;
}

.biz-impact-mini div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.biz-impact-mini span {
    color: #717b6d;
    font-size: 0.83rem;
}

.biz-impact-mini strong {
    color: #263423;
}

.biz-sidebar-toggle {
    display: none;
    border: 1px solid #d8d2c6;
    border-radius: 9px;
    background: #fff;
    width: 38px;
    height: 36px;
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
}

.biz-sidebar-toggle span {
    width: 16px;
    height: 2px;
    background: #455740;
    border-radius: 999px;
}

.biz-shell-backdrop {
    display: none;
}

.app-body[data-role="business"] a:hover {
    text-decoration: none;
}

.biz-report-layout {
    display: grid;
    grid-template-columns: minmax(290px, 1fr) minmax(0, 1.35fr);
    gap: 1rem;
    align-items: start;
}

.biz-report-layout > .card:first-child {
    position: sticky;
    top: 0.75rem;
}

.biz-report-layout .report-feed {
    gap: 0.8rem;
}

.biz-report-layout .report-item {
    background: linear-gradient(180deg, #fffefb 0%, #faf6ef 100%);
    border: 1px solid #e4ddd0;
    border-left-width: 5px;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(38, 51, 34, 0.06);
    overflow: hidden;
}

.biz-report-layout .tab-nav {
    padding: 0.3rem;
    background: #f3efe6;
    border-radius: 999px;
    border: 1px solid #e2dccf;
}

.biz-report-layout .tab-nav__item {
    border-radius: 999px;
}

.biz-report-layout .report-item__id {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    color: #6a765f;
    margin: 0;
}

.biz-report-layout .report-item__id .status-badge {
    border-radius: 999px;
    padding: 0.18rem 0.58rem;
    font-size: 0.61rem;
    letter-spacing: 0.09em;
    font-weight: 900;
}

.biz-report-layout .report-item__reason {
    font-size: 1.14rem;
    line-height: 1.3;
    margin-bottom: 0.8rem;
    color: #243320;
}

.biz-report-layout .report-item__links {
    margin-bottom: 0.45rem;
    font-size: 0.9rem;
    color: #4f5d4a;
}

.biz-report-layout .report-item__links strong {
    color: #33462d;
}

.biz-report-layout .report-item__details {
    font-size: 0.9rem;
    color: #2e3d2a;
    line-height: 1.72;
    background: rgba(245, 241, 231, 0.65);
    border: 1px solid #ece5d9;
    border-radius: 10px;
    padding: 0.85rem 0.9rem;
    margin: 0.62rem 0 0;
}

.biz-report-layout .report-item__admin-note {
    margin: 0;
    padding: 0.85rem 1rem;
    background: linear-gradient(180deg, #edf3e8 0%, #e7eee2 100%);
    border: 1px solid #d5e2c9;
    border-left: 4px solid #6f955f;
    border-radius: 10px;
    color: #2f422a;
}

.biz-report-layout .report-item__note-label {
    color: #35542d;
    letter-spacing: 0.14em;
    margin-bottom: 0.35rem;
}

.biz-report-layout .report-item--open {
    background: linear-gradient(180deg, #fffdfb 0%, #fbf3ef 100%);
}

.biz-report-layout .report-item--under_review {
    background: linear-gradient(180deg, #fffef9 0%, #fcf7ec 100%);
}

.biz-report-layout .report-item--resolved {
    background: linear-gradient(180deg, #fcfefb 0%, #f4f9f2 100%);
}

.biz-report-layout .report-item--dismissed {
    background: linear-gradient(180deg, #fcfcfa 0%, #f4f4f2 100%);
}

.biz-report-layout .report-item__head {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #ebe3d7;
    background: rgba(247, 243, 234, 0.6);
}

.biz-report-layout .report-item__body {
    padding: 1rem;
}

.biz-report-layout .report-item__foot {
    padding: 0 1rem 1rem;
}

@media (max-width: 1200px) {
    .biz-snapshot {
        grid-template-columns: 1fr 1fr;
    }

    .biz-snapshot__lead {
        grid-column: 1 / -1;
    }
}

@media (max-width: 1024px) {
    .biz-shell {
        grid-template-columns: 1fr;
    }

    .biz-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-105%);
        transition: transform 220ms ease;
        z-index: 80;
    }

    .biz-shell.is-open .biz-sidebar {
        transform: translateX(0);
    }

    .biz-sidebar-toggle {
        display: inline-flex;
    }

    .biz-shell-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(22, 26, 21, 0.4);
        display: none;
        z-index: 70;
    }

    .biz-shell.is-open .biz-shell-backdrop {
        display: block;
    }
}

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

    .biz-report-layout {
        grid-template-columns: 1fr;
    }

    .biz-report-layout > .card:first-child {
        position: static;
    }
}

@media (max-width: 640px) {
    .biz-topbar {
        flex-wrap: wrap;
    }

    .biz-topbar__actions {
        width: 100%;
    }

    .biz-topbar__actions .btn {
        flex: 1;
        justify-content: center;
    }

    .biz-snapshot {
        grid-template-columns: 1fr;
    }
}
/* ================================================================
   ResQFood — Application Design System
   All authenticated pages, forms, dashboards, and modules.
   Warm-earthy premium design consistent with the landing page.
   ================================================================ */

/* ── 1. Design Tokens ────────────────────────────────────────── */
:root {
    /* Brand colours */
    --olive:        #4a6741;
    --olive-mid:    #5a7d50;
    --olive-deep:   #2d3f28;
    --olive-light:  rgba(74,103,65,0.1);
    --sage:         #7a9a6a;
    --sage-light:   #a8c098;
    --amber:        #c4913e;
    --terra:        #b5604a;
    --terra-light:  rgba(181,96,74,0.1);
    --gold:         #c9a84c;

    /* Surface palette */
    --cream:        #f8f4ea;
    --sand:         #f0e8d4;
    --sand-deep:    #e6dcc4;
    --bg:           #f5f1e8;
    --bg-panel:     #ffffff;
    --bg-overlay:   rgba(248,244,234,0.97);

    /* Text */
    --text:         #1a2518;
    --text-mid:     #3a4f36;
    --text-muted:   #6b7c65;
    --text-light:   #9aaa94;

    /* Borders */
    --line:         rgba(74,103,65,0.14);
    --line-strong:  rgba(74,103,65,0.26);
    --line-subtle:  rgba(74,103,65,0.08);

    /* Radius */
    --r-xs:   4px;
    --r-sm:   6px;
    --r-md:   10px;
    --r-lg:   14px;
    --r-xl:   20px;
    --r-2xl:  28px;
    --r-pill: 999px;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(30,50,20,0.06);
    --shadow-sm: 0 1px 4px rgba(30,50,20,0.08), 0 1px 2px rgba(30,50,20,0.05);
    --shadow-md: 0 4px 16px rgba(30,50,20,0.10), 0 2px 6px rgba(30,50,20,0.06);
    --shadow-lg: 0 8px 32px rgba(30,50,20,0.13), 0 4px 12px rgba(30,50,20,0.07);
    --shadow-xl: 0 16px 48px rgba(30,50,20,0.15), 0 6px 18px rgba(30,50,20,0.08);

    /* Layout */
    --nav-h:        64px;
    --sidebar-w:    260px;
    --container:    1200px;

    /* Typography */
    --f-sans:    'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
    --f-display: Georgia, 'Palatino Linotype', 'Book Antiqua', serif;
    --f-mono:    'Courier New', 'Consolas', monospace;

    /* Motion */
    --ease:      cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
    --dur-fast:  120ms;
    --dur-base:  180ms;
    --dur-slow:  300ms;

    /* Z-index */
    --z-base:    1;
    --z-sticky:  10;
    --z-drawer:  80;
    --z-backdrop:90;
    --z-nav:     100;
    --z-modal:   200;
    --z-toast:   300;
}

/* ── 2. Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}
body {
    font-family: var(--f-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a {
    color: var(--olive);
    text-decoration: none;
}
a:hover { text-decoration: underline; }
img, svg {
    max-width: 100%;
    height: auto;
    display: block;
}
ul, ol { list-style: none; }
button, input, select, textarea {
    font-family: var(--f-sans);
}
/* Accessible focus ring */
:focus-visible {
    outline: 2px solid var(--olive);
    outline-offset: 2px;
    border-radius: var(--r-sm);
}
/* Screen-reader only */
.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;
}

/* ── 3. App Shell ────────────────────────────────────────────── */
.app-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.app-main {
    flex: 1;
    padding-top: calc(var(--nav-h) + 2.25rem);
    padding-bottom: 4rem;
}
.app-container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 2rem);
}

/* ── 4. Navigation ───────────────────────────────────────────── */
.app-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    background: var(--bg-overlay);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: var(--z-nav);
}
.app-nav__inner {
    height: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 2rem);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.app-nav__brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    line-height: 0;
}
.app-nav__brand:hover { text-decoration: none; opacity: 0.92; }

/* Logo-only branding (site name is inside the image) */
.site-logo {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    object-position: left center;
}
.site-logo--nav {
    height: 52px;
    max-width: min(260px, 44vw);
}
.app-body[data-role="admin"] .site-logo--nav {
    height: 48px;
    max-width: min(240px, 40vw);
}
.site-logo--sidebar {
    height: 36px;
    width: auto;
    max-width: 40px;
    object-position: left center;
    margin-inline: 0;
}

.shell-brand-logo {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.shell-brand-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}

.shell-brand-name {
    display: block;
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shell-brand-role {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-brand-mark .shell-brand-name {
    color: rgba(255, 255, 255, 0.96);
}

.admin-brand-mark .shell-brand-role {
    color: rgba(255, 255, 255, 0.62);
}

.biz-brand-mark .shell-brand-name,
.usr-brand-mark .shell-brand-name {
    color: #243222;
}

.biz-brand-mark .shell-brand-role,
.usr-brand-mark .shell-brand-role {
    color: #6f7a69;
}

.char-brand-mark .shell-brand-name {
    color: #2b201a;
}

.char-brand-mark .shell-brand-role {
    color: #6f786b;
}
.site-logo--footer {
    height: 64px;
    max-width: 280px;
    object-position: left center;
}
.site-logo--footer-app {
    height: 50px;
    max-width: 240px;
}
.site-logo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--olive, #4a6741);
    line-height: 0;
}
.site-logo-fallback--nav svg { width: 48px; height: 48px; }
.site-logo-fallback--sidebar svg { width: 32px; height: 32px; }
.site-logo-fallback--footer svg,
.site-logo-fallback--footer-app svg { width: 52px; height: 52px; }
.app-body[data-role="admin"] .site-logo-fallback--nav svg { width: 44px; height: 44px; }

.app-footer__brand-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
    color: rgba(200, 225, 190, 0.75);
}
.app-footer__brand-link {
    display: inline-flex;
    align-items: center;
    line-height: 0;
    text-decoration: none;
    flex-shrink: 0;
}
.app-footer__brand-link:hover { opacity: 0.9; }
.app-footer__copyright {
    font-size: 0.85rem;
    color: rgba(200, 225, 190, 0.85);
}

.app-nav__links {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    flex: 1;
}
.app-nav__links a {
    padding: 0.38rem 0.8rem;
    border-radius: var(--r-md);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-mid);
    text-decoration: none;
    transition: background var(--dur-fast), color var(--dur-fast);
    white-space: nowrap;
}
.app-nav__links a:hover { background: var(--olive-light); color: var(--olive); text-decoration: none; }
.app-nav__links a.active {
    background: var(--olive-light);
    color: var(--olive);
}

.app-nav__user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}
.app-nav__username {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-mid);
    text-decoration: none;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.btn-nav-logout {
    display: inline-flex;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--terra);
    padding: 0.28rem 0.75rem;
    border: 1.5px solid rgba(181,96,74,0.3);
    border-radius: var(--r-pill);
    background: transparent;
    cursor: pointer;
    transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
    white-space: nowrap;
}
.btn-nav-logout:hover {
    background: var(--terra);
    color: #fff;
    border-color: var(--terra);
}

/* Hamburger button */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 34px;
    height: 34px;
    padding: 5px;
    cursor: pointer;
    background: none;
    border: none;
    border-radius: var(--r-sm);
    flex-shrink: 0;
    transition: background var(--dur-fast);
}
.nav-hamburger:hover { background: var(--olive-light); }
.nav-hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-mid);
    border-radius: 2px;
    transform-origin: center;
    transition: transform var(--dur-slow) var(--ease-out), opacity var(--dur-base);
}
.nav-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.nav-drawer {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg-overlay);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: var(--z-drawer);
    padding: 1rem clamp(1rem, 4vw, 2rem) 1.5rem;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition:
        visibility 0s var(--dur-base),
        opacity var(--dur-base) var(--ease),
        transform var(--dur-base) var(--ease);
}
.nav-drawer.is-open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    transition:
        visibility 0s,
        opacity var(--dur-base) var(--ease),
        transform var(--dur-base) var(--ease);
}
.nav-drawer__links {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}
.nav-drawer__links a {
    display: block;
    padding: 0.6rem 0.85rem;
    border-radius: var(--r-md);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-mid);
    text-decoration: none;
    transition: background var(--dur-fast), color var(--dur-fast);
}
.nav-drawer__links a:hover,
.nav-drawer__links a.active {
    background: var(--olive-light);
    color: var(--olive);
}
.nav-drawer__user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Nav backdrop */
.nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(26,37,24,0.4);
    z-index: calc(var(--z-drawer) - 1);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur-base), visibility 0s var(--dur-base);
}
.nav-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity var(--dur-base), visibility 0s;
}

/* ── 5. Page Header ──────────────────────────────────────────── */
.page-head {
    margin-bottom: 2rem;
}
.page-head h1 {
    font-family: var(--f-display);
    font-size: clamp(1.55rem, 3vw, 2.1rem);
    font-weight: 700;
    color: var(--olive-deep);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 0.35rem;
}
.page-head p {
    font-size: 0.92rem;
    color: var(--text-muted);
}
.page-head__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.4rem;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}
.breadcrumb a {
    color: var(--olive);
    text-decoration: none;
    font-weight: 500;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: var(--text-muted); }
.breadcrumb::after { content: none; }
/* Separator auto-inserted via CSS between breadcrumb items */
.breadcrumb > * + *::before {
    content: '/';
    margin-right: 0.3rem;
    opacity: 0.4;
}

/* ── 6. Buttons ──────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1.3rem;
    border-radius: var(--r-pill);
    font-family: var(--f-sans);
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    text-decoration: none;
    white-space: nowrap;
    transition:
        background var(--dur-base),
        color var(--dur-base),
        border-color var(--dur-base),
        box-shadow var(--dur-base),
        transform var(--dur-fast);
    position: relative;
    overflow: hidden;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn:disabled,
.btn[disabled] {
    opacity: 0.45;
    pointer-events: none;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--olive);
    color: #fff;
    box-shadow: 0 2px 8px rgba(74,103,65,0.28);
}
.btn-primary:hover {
    background: var(--olive-mid);
    box-shadow: 0 4px 16px rgba(74,103,65,0.32);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--olive);
    border: 1.5px solid var(--line-strong);
}
.btn-outline:hover {
    background: var(--olive-light);
    border-color: var(--olive);
    color: var(--olive);
}

.btn-ghost {
    background: transparent;
    color: var(--text-mid);
    border: none;
}
.btn-ghost:hover {
    background: rgba(0,0,0,0.05);
    color: var(--text);
}

.btn-danger {
    background: var(--terra);
    color: #fff;
    box-shadow: 0 2px 8px rgba(181,96,74,0.25);
}
.btn-danger:hover {
    background: #9e4e3a;
    color: #fff;
}

.btn-amber {
    background: var(--amber);
    color: #fff;
}
.btn-amber:hover { background: #b07a2a; color: #fff; }

/* Sizes */
.btn-xs  { padding: 0.25rem 0.65rem; font-size: 0.74rem; }
.btn-sm  { padding: 0.35rem 0.9rem;  font-size: 0.8rem;  }
.btn-lg  { padding: 0.72rem 1.8rem;  font-size: 0.95rem; }
.btn-xl  { padding: 0.9rem  2.25rem; font-size: 1rem; letter-spacing: 0.01em; }

/* Layout helpers */
.btn-block { width: 100%; }
.mt-1 + .btn-block { margin-top: 0.5rem; }

/* Icon-only round button */
.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── 7. Forms ────────────────────────────────────────────────── */
.form-group  { margin-bottom: 1.2rem; }
.form-group:last-child { margin-bottom: 0; }

.form-label {
    display: block;
    margin-bottom: 0.38rem;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-mid);
    letter-spacing: 0.01em;
}
.form-label .required {
    color: var(--terra);
    margin-left: 2px;
    font-weight: 800;
}

.form-control {
    width: 100%;
    padding: 0.62rem 0.9rem;
    border: 1.5px solid var(--line-strong);
    border-radius: var(--r-md);
    background: var(--bg-panel);
    font-family: var(--f-sans);
    font-size: 0.9rem;
    color: var(--text);
    transition:
        border-color var(--dur-base),
        box-shadow var(--dur-base),
        background var(--dur-base);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}
.form-control::placeholder { color: var(--text-light); }
.form-control:hover:not(:focus) { border-color: var(--olive); }
.form-control:focus {
    border-color: var(--olive);
    box-shadow: 0 0 0 3px rgba(74,103,65,0.14);
    background: #fff;
}
.form-control.is-invalid {
    border-color: var(--terra);
    background: rgba(181,96,74,0.02);
}
.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(181,96,74,0.13);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}
/* Custom select arrow */
select.form-control {
    cursor: pointer;
    padding-right: 2.4rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b7c65' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    background-size: 10px 6px;
}
/* File input */
input[type='file'].form-control {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 0.85rem;
}
input[type='file'].form-control::file-selector-button {
    font-family: var(--f-sans);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--olive);
    background: var(--olive-light);
    border: none;
    border-radius: var(--r-sm);
    padding: 0.28rem 0.7rem;
    margin-right: 0.75rem;
    cursor: pointer;
    transition: background var(--dur-fast);
}
input[type='file'].form-control::file-selector-button:hover {
    background: rgba(74,103,65,0.18);
}

.form-error {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.3rem;
    font-size: 0.78rem;
    color: var(--terra);
    font-weight: 600;
}
.form-error::before {
    content: '!';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    background: var(--terra);
    color: #fff;
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 900;
    flex-shrink: 0;
}
.form-hint {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.form-section-title {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--line);
}

/* Checkbox & radio */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    cursor: pointer;
}
.form-check input {
    width: 17px;
    height: 17px;
    margin-top: 2px;
    accent-color: var(--olive);
    flex-shrink: 0;
    cursor: pointer;
}
.form-check-label {
    font-size: 0.875rem;
    color: var(--text-mid);
    line-height: 1.5;
}

/* ── 8. Cards ────────────────────────────────────────────────── */
.card {
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.card--elevated {
    box-shadow: var(--shadow-md);
}
.card--highlight {
    border-color: rgba(181,96,74,0.35);
    box-shadow: 0 0 0 2px rgba(181,96,74,0.08), var(--shadow-sm);
}
.card--olive {
    border-color: rgba(74,103,65,0.25);
    background: rgba(74,103,65,0.03);
}

.card-header {
    padding: 0.95rem 1.5rem;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: rgba(248,244,234,0.55);
}
.card-header h2,
.card-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-mid);
    margin: 0;
    letter-spacing: -0.01em;
}
.card-body { padding: 1.5rem; }
.card-body--compact { padding: 1rem 1.25rem; }
.card-footer {
    padding: 0.9rem 1.5rem;
    border-top: 1px solid var(--line);
    background: rgba(248,244,234,0.45);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ── 9. Stat Cards ───────────────────────────────────────────── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: 1.35rem 1.4rem 1.25rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: box-shadow var(--dur-base), transform var(--dur-base);
}
.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--olive), var(--sage));
    border-radius: 0;
}
.stat-card--amber::before { background: linear-gradient(90deg, var(--amber), #dab96e); }
.stat-card--terra::before { background: linear-gradient(90deg, var(--terra), #d17e65); }
.stat-card--sage::before  { background: linear-gradient(90deg, var(--sage),  #9ecb8a); }

/* Unified value/label — supports both naming conventions */
.stat-card__value, .stat-value {
    font-family: var(--f-display);
    font-size: 2.1rem;
    font-weight: 700;
    color: var(--olive-deep);
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 0.3rem;
}
.stat-card__label, .stat-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.stat-card__sub {
    font-size: 0.72rem;
    margin-top: 0.3rem;
    color: var(--text-muted);
}
.stat-card__sub a {
    color: var(--olive);
    font-weight: 600;
    text-decoration: none;
}
.stat-card__sub a:hover { text-decoration: underline; }

/* ── 10. Tables ──────────────────────────────────────────────── */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Fade edge indicator on small screens */
    background:
        linear-gradient(to right, var(--bg-panel) 0px, transparent 20px),
        linear-gradient(to left, var(--bg-panel) 0px, transparent 20px);
    background-attachment: local, local;
}
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    white-space: nowrap;
}
.table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text-muted);
    border-bottom: 2px solid var(--line);
    white-space: nowrap;
    background: rgba(248,244,234,0.55);
}
.table td {
    padding: 0.72rem 1rem;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
    color: var(--text);
    white-space: normal;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr {
    transition: background var(--dur-fast);
}
.table tbody tr:hover { background: rgba(248,244,234,0.65); }
/* Allow text wrapping for description cells */
.table td.wrap { white-space: normal; }

/* ── 11. Badges ──────────────────────────────────────────────── */
.role-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.2rem 0.65rem;
    border-radius: var(--r-pill);
    border: 1px solid;
    white-space: nowrap;
}
.role-badge--olive   { color: var(--olive);  background: rgba(74,103,65,0.1);   border-color: rgba(74,103,65,0.25); }
.role-badge--sage    { color: #4e7a46;       background: rgba(122,154,106,0.12); border-color: rgba(122,154,106,0.3); }
.role-badge--terra   { color: var(--terra);  background: rgba(181,96,74,0.1);   border-color: rgba(181,96,74,0.25); }
.role-badge--amber   { color: #9a6e1e;       background: rgba(196,145,62,0.1);  border-color: rgba(196,145,62,0.25); }
.role-badge--default { color: var(--text-muted); background: rgba(0,0,0,0.05); border-color: var(--line); }

.status-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 0.2rem 0.65rem;
    border-radius: var(--r-pill);
    white-space: nowrap;
}
.status-badge--green   { background: rgba(74,103,65,0.12);  color: var(--olive); }
.status-badge--amber   { background: rgba(196,145,62,0.14); color: #8a5e10; }
.status-badge--red     { background: rgba(181,96,74,0.12);  color: var(--terra); }
.status-badge--default { background: rgba(0,0,0,0.06);      color: var(--text-muted); }

/* ── 12. Flash Messages ──────────────────────────────────────── */
.flash-container {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}
.flash-container--toast {
    position: fixed;
    top: 0.9rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1200;
    width: min(94vw, 520px);
    margin: 0;
    padding: 0;
    pointer-events: none;
}
.flash {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.9rem 1.1rem;
    border-radius: var(--r-lg);
    border: 1px solid;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5;
    animation: flashIn 0.22s var(--ease-out);
    position: relative;
}
.flash-container--toast .flash {
    box-shadow: 0 12px 34px rgba(22, 26, 21, 0.16);
    backdrop-filter: blur(4px);
    pointer-events: auto;
}
.flash svg { flex-shrink: 0; margin-top: 1px; }
.flash--success { background: rgba(74,103,65,0.08);  border-color: rgba(74,103,65,0.28);  color: var(--olive-deep); }
.flash--error   { background: rgba(181,96,74,0.08);  border-color: rgba(181,96,74,0.28);  color: var(--terra); }
.flash--warning { background: rgba(196,145,62,0.09); border-color: rgba(196,145,62,0.3);  color: #7a5210; }
.flash--info    { background: rgba(122,154,106,0.09);border-color: rgba(122,154,106,0.3); color: #3a6035; }
@keyframes flashIn {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0);    }
}
/* Dismissible flash */
.flash__close {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    opacity: 0.5;
    padding: 2px;
    border-radius: var(--r-sm);
    font-size: 1rem;
    line-height: 1;
    transition: opacity var(--dur-fast);
}
.flash__close:hover { opacity: 1; }

@media (max-width: 640px) {
    .flash-container--toast {
        top: 0.65rem;
        width: calc(100vw - 1rem);
    }
}

/* ── 13. Notice / Alert Banners ──────────────────────────────── */
.notice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.2rem;
    border-radius: var(--r-lg);
    border: 1px solid;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}
.notice svg { flex-shrink: 0; margin-top: 2px; }
.notice__body { flex: 1; }
.notice__body strong { display: block; font-weight: 700; margin-bottom: 0.12rem; }
.notice a { font-weight: 700; }
.notice--warning { background: rgba(196,145,62,0.07); border-color: rgba(196,145,62,0.32); color: #7a5210; }
.notice--info    { background: rgba(74,103,65,0.06);  border-color: rgba(74,103,65,0.28);  color: var(--olive-deep); }
.notice--danger  { background: rgba(181,96,74,0.07);  border-color: rgba(181,96,74,0.28);  color: var(--terra); }
.notice--success { background: rgba(74,103,65,0.07);  border-color: rgba(74,103,65,0.28);  color: var(--olive-deep); }

/* ── 14. Tab Navigation ──────────────────────────────────────── */
.tab-nav {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    border-bottom: 2px solid var(--line);
    margin-bottom: 1.5rem;
}
.tab-nav__item {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.1rem;
    font-size: 0.83rem;
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    text-decoration: none;
    transition: color var(--dur-fast), border-color var(--dur-fast);
    white-space: nowrap;
    cursor: pointer;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    gap: 0.35rem;
}
.tab-nav__item:hover { color: var(--olive); text-decoration: none; }
.tab-nav__item.active {
    color: var(--olive);
    border-bottom-color: var(--olive);
}
.tab-nav__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 800;
    background: rgba(74,103,65,0.1);
    color: var(--olive);
    border-radius: var(--r-pill);
    padding: 0 0.45rem;
    min-width: 18px;
    height: 18px;
}

/* ── 15. Filter Bar ──────────────────────────────────────────── */
.filter-bar {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: 1.2rem 1.4rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}
.filter-bar .form-group { margin-bottom: 0; flex: 1; min-width: 150px; }
.filter-bar .btn { flex-shrink: 0; align-self: flex-end; }

/* ── 16. Auth Layout (Split-screen) ──────────────────────────── */
.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
}
.auth-brand-panel {
    background:
        linear-gradient(155deg, var(--olive-deep) 0%, var(--olive) 55%, var(--sage) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2.5rem, 5vw, 4.5rem);
    position: relative;
    overflow: hidden;
}
/* Organic background blobs */
.auth-brand-panel::before {
    content: '';
    position: absolute;
    top: -25%;
    right: -15%;
    width: 60%;
    aspect-ratio: 1;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
}
.auth-brand-panel::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 50%;
    aspect-ratio: 1;
    background: rgba(0,0,0,0.08);
    border-radius: 50%;
}
.auth-brand-panel__inner { position: relative; z-index: 1; }

.auth-brand-logo,
.auth-mobile-brand {
    display: inline-flex;
    align-items: center;
    line-height: 0;
    text-decoration: none;
    margin-bottom: 2.5rem;
}
.auth-brand-logo:hover,
.auth-mobile-brand:hover { opacity: 0.92; text-decoration: none; }

.site-logo--auth {
    height: 52px;
    max-width: min(240px, 85vw);
    object-fit: contain;
    object-position: left center;
}
.auth-mobile-brand .site-logo--auth {
    height: 48px;
    max-width: min(220px, 80vw);
}
.site-logo-fallback--auth svg { width: 48px; height: 48px; }
.auth-mobile-brand { display: none; }

.auth-brand-panel h2 {
    font-family: var(--f-display);
    font-size: clamp(1.75rem, 3vw, 2.4rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}
.auth-brand-panel p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.75);
    line-height: 1.65;
    max-width: 320px;
    margin-bottom: 2.5rem;
}
.auth-brand-illustration {
    margin-bottom: 2.5rem;
    opacity: 0.85;
}
.auth-brand-highlights {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.auth-brand-highlight {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255,255,255,0.85);
    font-size: 0.88rem;
    font-weight: 500;
}
.auth-brand-highlight__icon {
    width: 32px;
    height: 32px;
    border-radius: var(--r-md);
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: rgba(255,255,255,0.9);
}

/* Right panel: form */
.auth-form-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--cream);
    padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3rem);
    overflow-y: auto;
}
.auth-form-panel__inner {
    width: 100%;
    max-width: 400px;
}
@media (max-width: 900px) {
    .auth-mobile-brand {
        display: inline-flex;
        margin-bottom: 2rem;
    }
    .auth-brand-logo { display: none; }
}
.auth-form-title {
    font-family: var(--f-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--olive-deep);
    letter-spacing: -0.02em;
    margin-bottom: 0.3rem;
}
.auth-form-subtitle {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.5;
}
.auth-form-footer {
    margin-top: 1.75rem;
    text-align: center;
    font-size: 0.84rem;
    color: var(--text-muted);
}
.auth-form-footer a { color: var(--olive); font-weight: 700; }

/* Divider with label */
.form-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0;
    font-size: 0.78rem;
    color: var(--text-muted);
}
.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--line);
}

/* Fallback card for auth pages without split-screen */
.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: var(--sand);
    padding: 2rem 1rem;
}
.auth-card {
    width: 100%;
    max-width: 460px;
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: var(--r-2xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}
.auth-card__brand {
    padding: 2rem 2rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(135deg, rgba(74,103,65,0.05), rgba(168,192,152,0.08));
}
.auth-card__brand .brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--olive-deep);
    text-decoration: none;
    margin-bottom: 0.3rem;
}
.auth-card__brand p { font-size: 0.82rem; color: var(--text-muted); }
.auth-card__body { padding: 2rem; }
.auth-card__footer {
    padding: 1.2rem 2rem;
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: 0.84rem;
    color: var(--text-muted);
    background: rgba(248,244,234,0.55);
}
.auth-card__footer a { color: var(--olive); font-weight: 700; }

/* ── 17. Dashboard Components ────────────────────────────────── */
/* Progress bar */
.progress-bar {
    width: 100%;
    height: 7px;
    background: var(--line);
    border-radius: var(--r-pill);
    overflow: hidden;
}
.progress-bar__fill {
    height: 100%;
    border-radius: var(--r-pill);
    transition: width 0.55s var(--ease-out);
}

/* Completion strip */
.completion-strip {
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: 1rem 1.4rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
}
.completion-strip__label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-mid);
    white-space: nowrap;
}
.completion-strip__bar { flex: 1; min-width: 100px; }
.completion-strip__pct {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--olive);
    white-space: nowrap;
}

/* Quick action cards */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.action-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 1.2rem;
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow-sm);
    transition:
        box-shadow var(--dur-base),
        border-color var(--dur-base),
        transform var(--dur-fast);
}
.action-card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(74,103,65,0.3);
    transform: translateY(-2px);
    text-decoration: none;
    color: var(--text);
}
.action-card__icon {
    width: 40px;
    height: 40px;
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.action-card__icon--olive  { background: rgba(74,103,65,0.1);   color: var(--olive); }
.action-card__icon--amber  { background: rgba(196,145,62,0.1);  color: var(--amber); }
.action-card__icon--terra  { background: rgba(181,96,74,0.1);   color: var(--terra); }
.action-card__icon--sage   { background: rgba(122,154,106,0.12);color: #4e7a46; }
.action-card__label {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-mid);
    line-height: 1.3;
}
.action-card__desc {
    font-size: 0.77rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Profile page layout */
.profile-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1.5rem;
    align-items: start;
}
.profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.profile-sidebar__avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--olive), var(--sage));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.4rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}
.profile-sidebar__name  { font-size: 0.95rem; font-weight: 800; color: var(--text); }
.profile-sidebar__email { font-size: 0.78rem; color: var(--text-muted); word-break: break-all; }
.profile-sidebar__joined{ font-size: 0.73rem; color: var(--text-muted); margin-top: 0.2rem; }
.profile-tabs { display: flex; flex-direction: column; gap: 0.1rem; }
.profile-tab {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.58rem 0.85rem;
    border-radius: var(--r-md);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-mid);
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    text-decoration: none;
    transition: background var(--dur-fast), color var(--dur-fast);
}
.profile-tab:hover,
.profile-tab.active {
    background: rgba(74,103,65,0.09);
    color: var(--olive);
    text-decoration: none;
}
.profile-tab svg { flex-shrink: 0; opacity: 0.65; }
.profile-section { display: none; }
.profile-section.active { display: block; }

/* ── 18. Listing Components ──────────────────────────────────── */
.listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.listing-card {
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--dur-slow), transform var(--dur-base);
    text-decoration: none;
    color: var(--text);
}
.listing-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    text-decoration: none;
    color: var(--text);
}
.listing-card__image {
    width: 100%;
    height: 170px;
    overflow: hidden;
    background: var(--sand);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.listing-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--dur-slow);
}
.listing-card:hover .listing-card__image img { transform: scale(1.05); }
.listing-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--sand), #ede5d0);
}
.listing-card__cat {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    font-size: 0.67rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.22rem 0.65rem;
    border-radius: var(--r-pill);
    background: rgba(248,244,234,0.93);
    color: var(--olive);
    backdrop-filter: blur(6px);
}
.listing-card__body {
    padding: 1.1rem 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.listing-card__biz {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}
.listing-card__title {
    font-size: 0.97rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.35;
}
.listing-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    font-size: 0.77rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}
.listing-card__meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.listing-card__footer {
    padding: 0.8rem 1.2rem;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(248,244,234,0.45);
}
.listing-card__time {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Listing detail */
.listing-detail {
    display: grid;
    grid-template-columns: 1fr 330px;
    gap: 1.5rem;
    align-items: start;
}
.listing-detail__image {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--r-xl);
    overflow: hidden;
    background: var(--sand);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}
.listing-detail__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.listing-meta-list {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 0.55rem 1rem;
    font-size: 0.88rem;
}
.listing-meta-list dt { font-weight: 700; color: var(--text-muted); }
.listing-meta-list dd { color: var(--text); }

/* Pickup code */
.pickup-code {
    display: inline-block;
    font-family: var(--f-mono);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 0.2em;
    color: var(--olive);
    background: rgba(74,103,65,0.08);
    border: 2px dashed rgba(74,103,65,0.3);
    border-radius: var(--r-lg);
    padding: 0.65rem 1.4rem;
    text-align: center;
}
.pickup-code-section {
    background: rgba(74,103,65,0.05);
    border: 1.5px solid rgba(74,103,65,0.2);
    border-radius: var(--r-xl);
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1rem;
}
.pickup-code-section p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.65rem;
    line-height: 1.5;
}

/* ── 19. Reservation Components ──────────────────────────────── */
.res-card {
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    overflow: hidden;
}
.res-card__head {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(248,244,234,0.5);
}
.res-card__head h3 {
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-mid);
}
.res-card__body  { padding: 1.25rem; }
.res-card__field { margin-bottom: 0.85rem; }
.res-card__field:last-child { margin-bottom: 0; }
.res-card__label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}
.res-card__value { font-size: 0.9rem; color: var(--text); font-weight: 500; }

/* ── 20. Empty State ─────────────────────────────────────────── */
.empty-state {
    padding: 4rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}
.empty-state__icon {
    width: 64px;
    height: 64px;
    border-radius: var(--r-xl);
    background: rgba(74,103,65,0.07);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--olive);
    opacity: 0.6;
}
.empty-state svg { margin: 0 auto 1.25rem; opacity: 0.22; }
.empty-state h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-mid);
    margin-bottom: 0.4rem;
}
.empty-state p {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 1.5rem;
    max-width: 340px;
    line-height: 1.6;
}

/* ── 21. Pagination ──────────────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border-radius: var(--r-md);
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-mid);
    border: 1px solid var(--line);
    transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast);
}
.pagination a:hover {
    background: rgba(74,103,65,0.08);
    border-color: var(--olive);
    color: var(--olive);
    text-decoration: none;
}
.pagination .current {
    background: var(--olive);
    color: #fff;
    border-color: var(--olive);
}
.pagination .disabled {
    opacity: 0.35;
    pointer-events: none;
}

/* ── 22. Loading / Skeleton ──────────────────────────────────── */
@keyframes shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}
.skeleton {
    background: linear-gradient(90deg, var(--sand) 25%, #ede7d6 50%, var(--sand) 75%);
    background-size: 800px 100%;
    animation: shimmer 1.4s infinite ease-in-out;
    border-radius: var(--r-md);
    display: block;
}
.skeleton-text  { height: 14px; margin-bottom: 8px; border-radius: var(--r-sm); }
.skeleton-title { height: 22px; width: 60%; margin-bottom: 12px; }
.skeleton-box   { height: 80px; }

/* ── 23. Image Utilities ─────────────────────────────────────── */
.img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.img-contain {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.aspect-16-9  { aspect-ratio: 16/9;  overflow: hidden; }
.aspect-4-3   { aspect-ratio: 4/3;   overflow: hidden; }
.aspect-1-1   { aspect-ratio: 1/1;   overflow: hidden; }
.aspect-3-2   { aspect-ratio: 3/2;   overflow: hidden; }
.img-rounded  { border-radius: var(--r-xl); overflow: hidden; }
.img-overlay  { position: relative; }
.img-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(26,37,24,0.4) 0%, transparent 60%);
    pointer-events: none;
}
/* Avatar placeholder */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--olive), var(--sage));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 800;
    flex-shrink: 0;
}
.avatar-lg {
    width: 56px;
    height: 56px;
    font-size: 1.15rem;
}

/* ── 24. Admin / Impact ──────────────────────────────────────── */
.form-control--sm { padding: 0.35rem 0.65rem; font-size: 0.83rem; }
.impact-bar-track {
    height: 8px;
    background: var(--sand);
    border-radius: var(--r-pill);
    overflow: hidden;
}
.impact-bar-fill {
    height: 100%;
    border-radius: var(--r-pill);
    background: linear-gradient(90deg, var(--olive), var(--sage));
    transition: width 700ms var(--ease-out);
}

/* ── 25. Footer ──────────────────────────────────────────────── */
.app-footer {
    background: var(--olive-deep);
    padding: 1.25rem 0;
    color: rgba(200,225,190,0.65);
    font-size: 0.8rem;
}
.app-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 2rem);
}
.app-footer__links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.app-footer__links a {
    color: rgba(200,225,190,0.6);
    text-decoration: none;
    transition: color var(--dur-fast);
}
.app-footer__links a:hover { color: rgba(200,225,190,0.95); }

/* ── 26. Utilities ───────────────────────────────────────────── */
/* Spacing */
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mx-auto { margin-inline: auto; }

/* Display */
.d-none  { display: none !important; }
.d-block { display: block; }
.d-flex  { display: flex; }
.d-grid  { display: grid; }

/* Flex helpers */
.flex-center    { display: flex; align-items: center; justify-content: center; }
.flex-between   { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap      { flex-wrap: wrap; }
.gap-05 { gap: 0.5rem; }
.gap-1  { gap: 0.75rem; }
.gap-2  { gap: 1.25rem; }

/* Text */
.text-muted   { color: var(--text-muted) !important; }
.text-olive   { color: var(--olive) !important; }
.text-terra   { color: var(--terra) !important; }
.text-amber   { color: var(--amber) !important; }
.text-success { color: var(--olive) !important; }
.text-danger  { color: var(--terra) !important; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-sm      { font-size: 0.82rem; }
.text-xs      { font-size: 0.73rem; }
.font-bold    { font-weight: 700; }
.font-800     { font-weight: 800; }
.truncate     { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Width */
.w-100  { width: 100%; }
.w-auto { width: auto; }
.max-w-sm { max-width: 480px; }
.max-w-md { max-width: 640px; }

/* Dividers */
.divider {
    height: 1px;
    background: var(--line);
    margin: 1.5rem 0;
    border: none;
}

/* ── 27. Responsive ──────────────────────────────────────────── */
@media (max-width: 1100px) {
    .stat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
    .listing-detail { grid-template-columns: 1fr; }
    .profile-layout { grid-template-columns: 1fr; }
    .auth-brand-panel { display: none; }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-mobile-brand { display: inline-flex; }
}
@media (max-width: 768px) {
    .app-nav__links    { display: none; }
    .app-nav__username { display: none; }
    .nav-hamburger     { display: flex; }

    .form-row { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .quick-actions { grid-template-columns: repeat(2, 1fr); }

    .page-head__top { flex-direction: column; align-items: flex-start; }
    .app-footer__inner { flex-direction: column; text-align: center; }
    .app-footer__links { justify-content: center; }
    .auth-card__body { padding: 1.5rem; }
    .auth-form-panel { padding: 2rem 1.25rem; }
}
@media (max-width: 600px) {
    .listing-grid { grid-template-columns: 1fr; }
    .filter-bar { flex-direction: column; }
    .filter-bar .form-group { min-width: 100%; }
    .table th, .table td { padding: 0.6rem 0.7rem; }
}
@media (max-width: 480px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .quick-actions { grid-template-columns: 1fr 1fr; }
    .auth-card__brand { padding: 1.5rem 1.25rem 1.25rem; }
}
@media (max-width: 380px) {
    .stat-grid { grid-template-columns: 1fr; }
}

/* ── 28. Password Toggle ─────────────────────────────────────── */
.input-with-btn {
    position: relative;
}
.input-with-btn .form-control {
    padding-right: 2.8rem;
}
.btn-input-action {
    position: absolute;
    right: 0.55rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 5px;
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--dur-fast), background var(--dur-fast);
}
.btn-input-action:hover { color: var(--olive); background: var(--olive-light); }
.btn-input-action .icon-eye-off { display: none; }
.btn-input-action.is-visible .icon-eye     { display: none; }
.btn-input-action.is-visible .icon-eye-off { display: block; }

/* ── 29. Dashboard Welcome Banner ────────────────────────────── */
.dash-welcome {
    border-radius: var(--r-2xl);
    padding: 1.75rem clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 1.75rem;
    position: relative;
    overflow: hidden;
}
.dash-welcome--business  { background: linear-gradient(135deg, var(--olive-deep) 0%, var(--olive) 65%, #6a8f5a 100%); }
.dash-welcome--user,
.dash-welcome--general_user { background: linear-gradient(135deg, #36513a, #4a6741, #5a7d50); }
.dash-welcome--charity   { background: linear-gradient(135deg, #2e3d2c, #44633f, var(--sage)); }
.dash-welcome--admin     { background: linear-gradient(135deg, #1a2518, #2d3f28, #3a5535); }
/* Decorative blobs */
.dash-welcome::before {
    content: '';
    position: absolute;
    top: -40%; right: -5%;
    width: 42%; aspect-ratio: 1;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
    pointer-events: none;
}
.dash-welcome::after {
    content: '';
    position: absolute;
    bottom: -50%; left: 55%;
    width: 28%; aspect-ratio: 1;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
    pointer-events: none;
}
.dash-welcome__inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.dash-welcome__eyebrow {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}
.dash-welcome__date {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.55);
}
.dash-welcome__greeting {
    font-family: var(--f-display);
    font-size: clamp(1.35rem, 3vw, 1.9rem);
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 0.35rem;
}
.dash-welcome__sub {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.62);
    max-width: 480px;
    line-height: 1.5;
}
.dash-welcome__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 1.4rem;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.28);
    border-radius: var(--r-pill);
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--dur-base), border-color var(--dur-base);
    backdrop-filter: blur(8px);
}
.dash-welcome__cta:hover {
    background: rgba(255,255,255,0.22);
    border-color: rgba(255,255,255,0.4);
    color: #fff;
    text-decoration: none;
}
/* Role badge inside the banner */
.role-badge--light {
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.25);
}

/* ── 30. Browse CTA Band ─────────────────────────────────────── */
.dash-cta-band {
    border-radius: var(--r-xl);
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.75rem;
    background: linear-gradient(135deg, rgba(74,103,65,0.07), rgba(122,154,106,0.1));
    border: 1px solid rgba(74,103,65,0.18);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.dash-cta-band__icon {
    width: 52px;
    height: 52px;
    border-radius: var(--r-lg);
    background: rgba(74,103,65,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--olive);
    flex-shrink: 0;
}
.dash-cta-band__body { flex: 1; }
.dash-cta-band__body h3 {
    font-family: var(--f-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--olive-deep);
    margin-bottom: 0.2rem;
    letter-spacing: -0.01em;
}
.dash-cta-band__body p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ── 31. Dashboard Layout Helpers ────────────────────────────── */
.dash-cols {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.5rem;
    align-items: start;
    margin-bottom: 1.75rem;
}
.dash-cols--wide-right {
    grid-template-columns: 1fr 340px;
}

/* ── 32. Profile Hero ────────────────────────────────────────── */
.profile-hero {
    border-radius: var(--r-2xl);
    background: linear-gradient(135deg, var(--olive-deep) 0%, var(--olive) 65%, var(--sage) 100%);
    padding: 2rem clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 1.75rem;
    position: relative;
    overflow: hidden;
}
.profile-hero::before {
    content: '';
    position: absolute;
    top: -45%; right: -5%;
    width: 44%; aspect-ratio: 1;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
    pointer-events: none;
}
.profile-hero__inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.profile-hero__avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    border: 2px solid rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}
.profile-hero__info { flex: 1; }
.profile-hero__info h1 {
    font-family: var(--f-display);
    font-size: clamp(1.2rem, 2.5vw, 1.55rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.3rem;
    letter-spacing: -0.01em;
}
.profile-hero__info p {
    font-size: 0.84rem;
    color: rgba(255,255,255,0.62);
}
.profile-hero__actions { flex-shrink: 0; }

/* ── 33. Stat Card Icon Variant ──────────────────────────────── */
.stat-card__icon-box {
    width: 36px;
    height: 36px;
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.85rem;
    flex-shrink: 0;
}
.stat-card--olive .stat-card__icon-box { background: rgba(74,103,65,0.1);   color: var(--olive); }
.stat-card--amber .stat-card__icon-box { background: rgba(196,145,62,0.1);  color: var(--amber); }
.stat-card--terra .stat-card__icon-box { background: rgba(181,96,74,0.1);   color: var(--terra); }
.stat-card--sage  .stat-card__icon-box { background: rgba(122,154,106,0.12);color: #4e7a46; }

/* ── 34. Impact Mini Preview ─────────────────────────────────── */
.impact-preview {
    background: linear-gradient(135deg, rgba(74,103,65,0.06), rgba(122,154,106,0.08));
    border: 1px solid rgba(74,103,65,0.18);
    border-radius: var(--r-xl);
    padding: 1.2rem 1.35rem;
}
.impact-preview__title {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.impact-preview__title a {
    font-size: 0.72rem;
    color: var(--olive);
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}
.impact-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--line);
    gap: 0.5rem;
}
.impact-row:last-child { border-bottom: none; padding-bottom: 0; }
.impact-row__label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.84rem;
    color: var(--text-muted);
}
.impact-row__label svg { flex-shrink: 0; color: var(--olive); opacity: 0.65; }
.impact-row__value {
    font-weight: 800;
    font-size: 1rem;
    color: var(--olive-deep);
    white-space: nowrap;
}

/* ── 35. Side Quick Actions ──────────────────────────────────── */
.side-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.side-action {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.75rem 0.9rem;
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    text-decoration: none;
    color: var(--text-mid);
    font-size: 0.875rem;
    font-weight: 600;
    transition: background var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast);
}
.side-action:hover {
    background: rgba(74,103,65,0.05);
    border-color: rgba(74,103,65,0.25);
    color: var(--olive);
    text-decoration: none;
    transform: translateX(2px);
}
.side-action__icon {
    width: 32px;
    height: 32px;
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ── Responsive dashboard helpers ────────────────────────────── */
@media (max-width: 900px) {
    .dash-cols { grid-template-columns: 1fr; }
    .dash-cols--wide-right { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .dash-welcome { padding: 1.4rem 1.25rem; }
    .dash-welcome__greeting { font-size: 1.35rem; }
    .dash-cta-band { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .dash-cta-band__icon { display: none; }
    .profile-hero { padding: 1.5rem 1.25rem; }
    .profile-hero__avatar { width: 56px; height: 56px; font-size: 1.35rem; }
}

/* ── 36. Print ───────────────────────────────────────────────── */
@media print {
    .app-nav, .app-footer, .btn, .nav-drawer, .nav-backdrop { display: none !important; }
    .app-main { padding-top: 0; }
    .card { box-shadow: none; border: 1px solid #ccc; }
    a { color: inherit; }
}

/* ════════════════════════════════════════════════════════════
   37. Listing Form Layout
════════════════════════════════════════════════════════════ */
.listing-form-grid {
    display: grid;
    grid-template-columns: 1fr 330px;
    gap: 1.5rem;
    align-items: start;
}
.form-section-label {
    display: flex;
    align-items: center;
    gap: .65rem;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--olive);
}
.form-section-label__num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(74,103,65,.12);
    color: var(--olive);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    font-weight: 900;
    flex-shrink: 0;
}
.qty-row {
    display: grid;
    grid-template-columns: 1fr 140px;
    gap: .65rem;
}

/* ── Image Upload Zone ───────────────────────────────────────── */
.upload-zone {
    border: 2px dashed rgba(74,103,65,.3);
    border-radius: var(--r-xl);
    padding: 2rem 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 180ms, background 180ms;
    background: rgba(248,244,234,.5);
    position: relative;
    overflow: hidden;
}
.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--olive);
    background: rgba(74,103,65,.04);
}
.upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    font-size: 0;
}
.upload-zone__icon { margin: 0 auto .65rem; color: var(--olive); opacity: .45; display: block; }
.upload-zone__label { font-size: .87rem; font-weight: 600; color: var(--text-mid); }
.upload-zone__hint  { font-size: .75rem; color: var(--text-light); margin-top: .3rem; }
.upload-zone__preview {
    display: none;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--r-lg);
    object-fit: cover;
    margin-bottom: .75rem;
}
.upload-zone.has-preview .upload-zone__preview { display: block; }
.upload-zone.has-preview .upload-zone__placeholder { display: none; }
.upload-zone__change-btn {
    margin-top: .5rem;
    font-size: .78rem;
    color: var(--olive);
    font-weight: 600;
}

/* ════════════════════════════════════════════════════════════
   38. Listing Detail Page
════════════════════════════════════════════════════════════ */
.listing-hero {
    width: 100%;
    aspect-ratio: 16/7;
    border-radius: var(--r-2xl);
    overflow: hidden;
    margin-bottom: 1.75rem;
    position: relative;
    background: var(--sand);
    box-shadow: var(--shadow-sm);
}
.listing-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}
.listing-hero:hover img { transform: scale(1.015); }
.listing-hero__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--sand) 0%, #ede5d0 100%);
}
.listing-hero__cat {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    font-size: .7rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .1em;
    padding: .28rem .85rem;
    border-radius: var(--r-pill);
    background: rgba(248,244,234,.93);
    color: var(--olive);
    backdrop-filter: blur(8px);
}
.listing-hero__status {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
}

/* ── Listing detail 2-col grid ─────────────────────────────── */
.listing-view-grid {
    display: grid;
    grid-template-columns: 1fr 310px;
    gap: 1.75rem;
    align-items: start;
}
.listing-view-grid .listing-sidebar-sticky {
    position: sticky;
    top: calc(var(--nav-h, 64px) + 1.25rem);
}

/* ── Meta list in detail ────────────────────────────────────── */
.listing-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: .85rem;
    margin-bottom: 1.25rem;
}
.listing-meta-item {
    background: rgba(248,244,234,.65);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: .8rem 1rem;
}
.listing-meta-item__label {
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-light);
    margin-bottom: .25rem;
}
.listing-meta-item__value {
    font-size: .93rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
}
.listing-meta-item__value--accent { color: var(--olive); }

/* ── Reserve panel ──────────────────────────────────────────── */
.reserve-panel {
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.reserve-panel__strip {
    background: linear-gradient(135deg, rgba(74,103,65,.07), rgba(122,154,106,.1));
    border-bottom: 1px solid rgba(74,103,65,.12);
    padding: .9rem 1.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.reserve-panel__free {
    font-family: var(--f-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--olive);
}
.reserve-panel__qty-label { font-size: .8rem; color: var(--text-muted); }
.reserve-panel__body { padding: 1.4rem; }

/* ── Pickup code banner ─────────────────────────────────────── */
.pickup-banner {
    background: linear-gradient(135deg, rgba(74,103,65,.06), rgba(122,154,106,.1));
    border: 1.5px solid rgba(74,103,65,.2);
    border-radius: var(--r-xl);
    padding: 1.4rem;
    text-align: center;
    margin-bottom: .85rem;
}
.pickup-banner__label {
    font-size: .65rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--olive);
    margin-bottom: .55rem;
}
.pickup-banner__code {
    font-family: var(--f-mono, 'Courier New', monospace);
    font-size: 1.85rem;
    font-weight: 900;
    letter-spacing: .25em;
    color: var(--olive-deep);
    margin-bottom: .4rem;
    cursor: pointer;
    user-select: all;
    transition: color .15s;
}
.pickup-banner__code:hover { color: var(--olive); }
.pickup-banner__hint {
    font-size: .76rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ════════════════════════════════════════════════════════════
   39. Browse Page
════════════════════════════════════════════════════════════ */
.browse-hero {
    border-radius: var(--r-2xl);
    background: linear-gradient(135deg, var(--olive-deep) 0%, var(--olive) 65%, #6a8f5a 100%);
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}
.browse-hero::before {
    content: '';
    position: absolute;
    top: -60%; right: -8%;
    width: 42%; aspect-ratio: 1;
    background: rgba(255,255,255,.06);
    border-radius: 50%;
    pointer-events: none;
}
.browse-hero::after {
    content: '';
    position: absolute;
    bottom: -40%; left: 30%;
    width: 28%; aspect-ratio: 1;
    background: rgba(255,255,255,.04);
    border-radius: 50%;
    pointer-events: none;
}
.browse-hero__inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.browse-hero h1 {
    font-family: var(--f-display);
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    color: #fff;
    font-weight: 700;
    margin-bottom: .2rem;
    letter-spacing: -.01em;
}
.browse-hero p { font-size: .87rem; color: rgba(255,255,255,.65); }
.btn--hero-outline {
    border: 1.5px solid rgba(255,255,255,.3);
    color: rgba(255,255,255,.9);
    background: rgba(255,255,255,.1);
    backdrop-filter: blur(6px);
    border-radius: var(--r-pill);
    padding: .55rem 1.1rem;
    font-size: .83rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .18s, color .18s;
    white-space: nowrap;
}
.btn--hero-outline:hover { background: rgba(255,255,255,.18); color: #fff; }

/* ── Filter bar ─────────────────────────────────────────────── */
.filter-strip {
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: flex-end;
    gap: .85rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.filter-strip .form-group { margin-bottom: 0; flex: 1; min-width: 140px; }
.filter-strip .form-label { font-size: .72rem; }
.filter-strip .form-control { font-size: .85rem; padding: .5rem .85rem; }
.filter-strip__actions { display: flex; gap: .5rem; align-items: center; padding-top: 1.35rem; }

/* ── Active filter chips ────────────────────────────────────── */
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-bottom: 1rem;
}
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .28rem .75rem;
    border-radius: var(--r-pill);
    background: rgba(74,103,65,.09);
    color: var(--olive);
    font-size: .76rem;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid rgba(74,103,65,.18);
    transition: background .15s;
}
.filter-chip:hover { background: rgba(74,103,65,.14); }
.filter-chip svg { opacity: .65; }

/* ── Listing grid ───────────────────────────────────────────── */
.listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}
.listing-card {
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, transform .2s, border-color .2s;
}
.listing-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
    border-color: rgba(74,103,65,.2);
}
.listing-card__image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: linear-gradient(135deg, var(--sand) 0%, #ede5d0 100%);
}
.listing-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.listing-card:hover .listing-card__image img { transform: scale(1.04); }
.listing-card__image .listing-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.listing-card__cat {
    position: absolute;
    top: .75rem;
    left: .75rem;
    font-size: .67rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .1em;
    padding: .22rem .72rem;
    border-radius: var(--r-pill);
    background: rgba(248,244,234,.93);
    color: var(--olive);
    backdrop-filter: blur(6px);
}
.listing-card__body {
    padding: 1rem 1.1rem .65rem;
    flex: 1;
}
.listing-card__biz {
    font-size: .72rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .3rem;
}
.listing-card__title {
    font-size: .97rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.35;
    margin-bottom: .5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.listing-card__meta {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    font-size: .77rem;
    color: var(--text-muted);
}
.listing-card__meta span { display: flex; align-items: center; gap: .28rem; }
.listing-card__footer {
    padding: .7rem 1.1rem;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.listing-card__time {
    font-size: .76rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ════════════════════════════════════════════════════════════
   40. Manage Listings
════════════════════════════════════════════════════════════ */
.listings-stat-bar {
    display: flex;
    gap: .65rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .42rem .9rem;
    border-radius: var(--r-pill);
    font-size: .8rem;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid;
    text-decoration: none;
    transition: opacity .15s;
}
.stat-pill:hover { opacity: .8; }
.stat-pill__dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.stat-pill--available { background: rgba(74,103,65,.08);   color: var(--olive);     border-color: rgba(74,103,65,.2); }
.stat-pill--available .stat-pill__dot  { background: var(--olive); }
.stat-pill--reserved  { background: rgba(196,145,62,.09);  color: #8a5c0e;          border-color: rgba(196,145,62,.25); }
.stat-pill--reserved  .stat-pill__dot  { background: #c4913e; }
.stat-pill--collected { background: rgba(74,103,65,.06);   color: #3d6b34;          border-color: rgba(122,154,106,.25); }
.stat-pill--collected .stat-pill__dot  { background: #6a9459; }
.stat-pill--expired   { background: rgba(0,0,0,.04);       color: var(--text-muted); border-color: var(--line); }
.stat-pill--expired   .stat-pill__dot  { background: var(--text-muted); }
.stat-pill--cancelled { background: rgba(181,96,74,.07);   color: var(--terra);     border-color: rgba(181,96,74,.2); }
.stat-pill--cancelled .stat-pill__dot  { background: var(--terra); }
.stat-pill--all       { background: rgba(74,103,65,.05);   color: var(--text-mid);  border-color: var(--line); }
.stat-pill--all       .stat-pill__dot  { background: var(--text-mid); }

/* ── Listing thumb ──────────────────────────────────────────── */
.listing-thumb {
    width: 44px;
    height: 44px;
    border-radius: var(--r-md);
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--sand), #ede5d0);
    display: flex;
    align-items: center;
    justify-content: center;
}
.listing-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Manage table title cell ────────────────────────────────── */
.listing-row-title {
    display: flex;
    align-items: center;
    gap: .8rem;
}
.listing-row-title__name {
    font-weight: 700;
    color: var(--olive);
    text-decoration: none;
    display: block;
    line-height: 1.3;
}
.listing-row-title__name:hover { text-decoration: underline; }
.listing-row-title__sub { font-size: .76rem; color: var(--text-muted); margin-top: .1rem; }

/* ════════════════════════════════════════════════════════════
   41. My Reservations
════════════════════════════════════════════════════════════ */
.res-feed { display: flex; flex-direction: column; gap: 1rem; }

.res-item {
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    overflow: hidden;
    transition: box-shadow .2s;
}
.res-item:hover { box-shadow: var(--shadow-md); }
.res-item--active  { border-color: rgba(74,103,65,.3); box-shadow: 0 0 0 2px rgba(74,103,65,.06); }
.res-item--collected { border-color: rgba(74,103,65,.15); }
.res-item--cancelled,
.res-item--expired,
.res-item--no_show  { opacity: .7; }

.res-item__body {
    padding: 1.2rem 1.4rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.25rem;
    align-items: start;
}
.res-item__meta {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: .4rem;
}
.res-item__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--olive);
    text-decoration: none;
    display: block;
    margin-bottom: .18rem;
}
.res-item__title:hover { text-decoration: underline; }
.res-item__biz {
    font-size: .79rem;
    color: var(--text-muted);
    margin-bottom: .55rem;
}
.res-item__facts {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem 1.1rem;
    font-size: .79rem;
    color: var(--text-muted);
}
.res-item__facts strong { color: var(--text-mid); }
.res-item__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .65rem;
    flex-shrink: 0;
    min-width: 130px;
}
.res-item__address {
    padding: .58rem 1.4rem;
    border-top: 1px solid var(--line);
    background: rgba(248,244,234,.5);
    font-size: .78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: .35rem;
}

/* ── Pickup code (card-size) ────────────────────────────────── */
.pickup-code-card {
    background: linear-gradient(135deg, rgba(74,103,65,.06), rgba(122,154,106,.1));
    border: 1.5px solid rgba(74,103,65,.2);
    border-radius: var(--r-lg);
    padding: .75rem 1rem;
    text-align: center;
    min-width: 120px;
}
.pickup-code-card__label {
    font-size: .6rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--olive);
    margin-bottom: .35rem;
}
.pickup-code-card__code {
    font-family: var(--f-mono, 'Courier New', monospace);
    font-size: 1.45rem;
    font-weight: 900;
    letter-spacing: .2em;
    color: var(--olive-deep);
    cursor: pointer;
    user-select: all;
    line-height: 1;
}
.pickup-code-card__hint {
    font-size: .68rem;
    color: var(--text-muted);
    margin-top: .3rem;
}

/* ── Section heading with divider ───────────────────────────── */
.section-heading {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1rem;
}
.section-heading__label {
    font-family: var(--f-display);
    font-size: .9rem;
    font-weight: 700;
    color: var(--text-dark);
    white-space: nowrap;
}
.section-heading__line {
    flex: 1;
    height: 1px;
    background: var(--line);
}

/* ── Pickup confirm screen ──────────────────────────────────── */
.confirm-screen {
    max-width: 520px;
    margin: 0 auto;
}
.confirm-card {
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: var(--r-2xl);
    overflow: hidden;
}
.confirm-card__band {
    background: linear-gradient(135deg, rgba(74,103,65,.07), rgba(122,154,106,.11));
    border-bottom: 1px solid rgba(74,103,65,.12);
    padding: 2rem 2rem 1.5rem;
    text-align: center;
}
.confirm-card__icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(74,103,65,.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.1rem;
    color: var(--olive);
}
.confirm-card__title {
    font-family: var(--f-display);
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--olive-deep);
    margin-bottom: .3rem;
}
.confirm-card__sub { font-size: .88rem; color: var(--text-muted); }
.confirm-card__body { padding: 1.5rem 1.75rem; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
    .listing-form-grid { grid-template-columns: 1fr; }
    .listing-view-grid { grid-template-columns: 1fr; }
    .listing-view-grid .listing-sidebar-sticky { position: static; }
}
@media (max-width: 640px) {
    .browse-hero { padding: 1.25rem 1.1rem; }
    .filter-strip { padding: .85rem 1rem; gap: .65rem; }
    .filter-strip .form-group { min-width: 100%; }
    .filter-strip__actions { padding-top: 0; width: 100%; }
    .listing-hero { aspect-ratio: 4/3; }
    .listing-meta-grid { grid-template-columns: 1fr 1fr; }
    .res-item__body { grid-template-columns: 1fr; }
    .res-item__right { align-items: flex-start; flex-direction: row; flex-wrap: wrap; gap: .5rem; }
    .listings-stat-bar { gap: .45rem; }
}

/* ════════════════════════════════════════════════════════════
   42. Admin Panel Styles
════════════════════════════════════════════════════════════ */

/* ── Admin hero banner ──────────────────────────────────────── */
.admin-hero {
    background: linear-gradient(135deg, #1a2518 0%, #2c3e28 50%, var(--olive-deep) 100%);
    border-radius: var(--r-2xl);
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}
.admin-hero::before {
    content: '';
    position: absolute;
    top: -50%; right: -5%;
    width: 38%; aspect-ratio: 1;
    background: rgba(255,255,255,.04);
    border-radius: 50%;
    pointer-events: none;
}
.admin-hero__inner {
    position: relative; z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.admin-hero__eyebrow {
    font-size: .68rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: rgba(255,255,255,.45);
    margin-bottom: .3rem;
}
.admin-hero__title {
    font-family: var(--f-display);
    font-size: clamp(1.2rem, 2.5vw, 1.55rem);
    font-weight: 700;
    color: #fff;
    letter-spacing: -.015em;
    margin-bottom: .2rem;
}
.admin-hero__sub { font-size: .84rem; color: rgba(255,255,255,.55); }
.admin-hero__actions { display: flex; gap: .55rem; flex-wrap: wrap; align-items: center; }
.admin-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .32rem .85rem;
    border-radius: var(--r-pill);
    font-size: .78rem;
    font-weight: 700;
    background: rgba(255,255,255,.12);
    color: rgba(255,255,255,.9);
    border: 1px solid rgba(255,255,255,.18);
    text-decoration: none;
    transition: background .18s;
}
.admin-hero__badge:hover { background: rgba(255,255,255,.2); color: #fff; }
.admin-hero__badge--urgent {
    background: rgba(181,96,74,.35);
    border-color: rgba(181,96,74,.5);
    color: #ffd4c8;
}
.admin-hero__badge--urgent .badge-dot {
    width: 7px; height: 7px;
    background: var(--terra);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(181,96,74,.25);
    animation: pulse 1.4s infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(181,96,74,.25); }
    50% { box-shadow: 0 0 0 6px rgba(181,96,74,.08); }
}

/* ── Admin stat group label ─────────────────────────────────── */
.admin-section-label {
    font-size: .7rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--text-light);
    margin-bottom: .6rem;
    display: flex;
    align-items: center;
    gap: .6rem;
}
.admin-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--line);
}

/* ── User avatar initial ────────────────────────────────────── */
.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--olive-deep), var(--olive));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .82rem;
    font-weight: 800;
    flex-shrink: 0;
    text-transform: uppercase;
}
.user-avatar--charity {
    background: linear-gradient(135deg, #7a4a35, var(--amber));
}
.user-avatar--general_user {
    background: linear-gradient(135deg, #3a5a6a, #5a8a9a);
}
.user-avatar--admin {
    background: linear-gradient(135deg, #2c3e28, #4a6741);
}
.user-cell {
    display: flex;
    align-items: center;
    gap: .7rem;
}
.user-cell__name {
    font-weight: 700;
    color: var(--olive);
    text-decoration: none;
    display: block;
    line-height: 1.2;
}
.user-cell__name:hover { text-decoration: underline; }
.user-cell__email {
    font-size: .74rem;
    color: var(--text-muted);
}

/* ── Report cards ───────────────────────────────────────────── */
.report-feed { display: flex; flex-direction: column; gap: 1rem; }
.report-item {
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-left: 3.5px solid var(--line);
    border-radius: var(--r-xl);
    overflow: hidden;
    transition: box-shadow .2s;
}
.report-item:hover { box-shadow: var(--shadow-md); }
.report-item--open         { border-left-color: var(--terra); }
.report-item--under_review { border-left-color: #c4913e; }
.report-item--resolved     { border-left-color: var(--olive); }
.report-item--dismissed    { border-left-color: var(--text-light); opacity: .8; }

.report-item__grid {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 1.25rem;
    padding: 1.25rem 1.4rem;
}
.report-item__id {
    font-size: .68rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-light);
    margin-bottom: .5rem;
}
.report-item__reason {
    font-size: .97rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: .4rem;
    line-height: 1.3;
}
.report-item__details {
    font-size: .84rem;
    color: var(--text-mid);
    line-height: 1.65;
    margin-bottom: .75rem;
}
.report-item__links {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .9rem;
    font-size: .79rem;
    color: var(--text-muted);
}
.report-item__links strong { color: var(--text-mid); }
.report-item__links a { color: var(--olive); text-decoration: none; }
.report-item__links a:hover { text-decoration: underline; }
.report-item__admin-note {
    margin-top: .75rem;
    padding: .65rem .9rem;
    background: rgba(74,103,65,.07);
    border-radius: var(--r-md);
    border-left: 2px solid rgba(74,103,65,.25);
    font-size: .81rem;
    color: var(--text-mid);
    line-height: 1.6;
}
.report-item__note-label {
    font-size: .65rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--olive);
    margin-bottom: .2rem;
}
.report-action { display: flex; flex-direction: column; gap: .65rem; }
.report-action .form-label { font-size: .7rem; margin-bottom: .25rem; }

/* ════════════════════════════════════════════════════════════
   43. Impact Dashboard
════════════════════════════════════════════════════════════ */
.impact-hero-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}
.impact-metric {
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: 1.6rem 1.25rem 1.25rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
}
.impact-metric:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.impact-metric::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--olive-deep), var(--olive));
    border-radius: var(--r-xl) var(--r-xl) 0 0;
}
.impact-metric__icon {
    width: 44px;
    height: 44px;
    border-radius: var(--r-lg);
    background: rgba(74,103,65,.1);
    color: var(--olive);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto .85rem;
}
.impact-metric__number {
    font-family: var(--f-display);
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--olive-deep);
    line-height: 1;
    margin-bottom: .35rem;
    letter-spacing: -.02em;
}
.impact-metric__number span { font-size: 1.3rem; font-weight: 700; }
.impact-metric__label {
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-muted);
    margin-bottom: .25rem;
}
.impact-metric__approx {
    font-size: .72rem;
    color: var(--text-light);
    font-style: italic;
}

/* ── Impact progress bars ───────────────────────────────────── */
.progress-item {
    margin-bottom: .95rem;
}
.progress-item:last-child { margin-bottom: 0; }
.progress-item__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .3rem;
}
.progress-item__name {
    font-size: .84rem;
    font-weight: 600;
    color: var(--text-mid);
}
.progress-item__count {
    font-size: .8rem;
    color: var(--text-muted);
    font-weight: 500;
}
.progress-track {
    height: 7px;
    background: rgba(74,103,65,.08);
    border-radius: var(--r-pill);
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    border-radius: var(--r-pill);
    transition: width .6s cubic-bezier(.4,0,.2,1);
    min-width: 2px;
}
.progress-fill--olive     { background: linear-gradient(90deg, var(--olive-deep), var(--olive)); }
.progress-fill--amber     { background: linear-gradient(90deg, #a0700a, #c4913e); }
.progress-fill--terra     { background: linear-gradient(90deg, #a04540, var(--terra)); }
.progress-fill--muted     { background: var(--text-light); }
.progress-fill--collected { background: linear-gradient(90deg, #3d6b34, #6a9459); }

/* ── Impact disclaimer ──────────────────────────────────────── */
.impact-disclaimer {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .7rem 1rem;
    background: rgba(74,103,65,.05);
    border: 1px solid rgba(74,103,65,.12);
    border-radius: var(--r-lg);
    font-size: .78rem;
    color: var(--text-muted);
    margin-bottom: 1.75rem;
    line-height: 1.5;
}
.impact-disclaimer svg { flex-shrink: 0; color: var(--olive); opacity: .7; }

/* ── Top business leaderboard row ───────────────────────────── */
.biz-row {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .75rem 0;
    border-bottom: 1px solid var(--line);
}
.biz-row:last-child { border-bottom: none; }
.biz-row__rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(74,103,65,.08);
    color: var(--olive);
    font-size: .78rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.biz-row__rank--1 { background: rgba(196,145,62,.15); color: #8a5c0e; }
.biz-row__rank--2 { background: rgba(74,103,65,.12); color: var(--olive-deep); }
.biz-row__rank--3 { background: rgba(181,96,74,.1); color: var(--terra); }
.biz-row__name { font-weight: 700; font-size: .87rem; color: var(--text-dark); }
.biz-row__city { font-size: .75rem; color: var(--text-muted); }
.biz-row__stats { margin-left: auto; text-align: right; font-size: .8rem; }
.biz-row__stats strong { color: var(--olive); font-size: .9rem; }

/* ════════════════════════════════════════════════════════════
   44. Global Polish — Final Pass
════════════════════════════════════════════════════════════ */

/* ── Unified page head (breadcrumb above h1) ────────────────── */
.page-head { margin-bottom: 1.5rem; }
.page-head .breadcrumb { margin-bottom: .5rem; }

/* ── Better tab-nav open badge ──────────────────────────────── */
.tab-nav__item .tab-nav__count--urgent {
    background: var(--terra);
    color: #fff;
}

/* ── Admin filter-bar alias ─────────────────────────────────── */
.admin-filter {
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: .85rem 1.1rem;
    display: flex;
    align-items: flex-end;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}
.admin-filter .form-group { margin-bottom: 0; flex: 1; min-width: 130px; }
.admin-filter .form-label { font-size: .72rem; }
.admin-filter .form-control { font-size: .85rem; padding: .5rem .85rem; }
.admin-filter .btn { flex-shrink: 0; align-self: flex-end; }

/* ── Compact pagination in card footer ─────────────────────── */
.card-pagination {
    padding: .85rem 1.25rem;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Flash messages - final consistent style ────────────────── */
.flash { border-radius: var(--r-lg); }

/* ── Responsive admin grid ──────────────────────────────────── */
.admin-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}
@media (max-width: 768px) {
    .admin-2col { grid-template-columns: 1fr; }
    .impact-hero-grid { grid-template-columns: 1fr 1fr; }
    .admin-hero { padding: 1.35rem 1.25rem; }
    .admin-hero__title { font-size: 1.2rem; }
    .report-item__grid { grid-template-columns: 1fr; }
    .admin-filter { flex-direction: column; }
    .admin-filter .form-group { min-width: 100%; }
}
@media (max-width: 480px) {
    .impact-hero-grid { grid-template-columns: 1fr 1fr; }
    .impact-metric__number { font-size: 1.9rem; }
}

/* ═══════════════════════════════════════════════════════════════════
   PARTIAL QUANTITY — listing & reservation UI
   ═══════════════════════════════════════════════════════════════════ */

/* Badge showing "X% taken" inside quantity meta */
.qty-taken-badge {
    display: inline-block;
    font-size: .68rem;
    font-weight: 800;
    padding: .15rem .5rem;
    border-radius: var(--r-pill);
    background: rgba(181,96,74,.1);
    color: var(--terra);
    margin-left: .4rem;
    vertical-align: middle;
    letter-spacing: .03em;
}

/* Reserve panel quantity input group */
.reserve-qty-group {
    background: rgba(248,244,234,.7);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: .85rem 1rem;
}
.reserve-qty-row {
    display: flex;
    align-items: center;
    gap: .6rem;
}
.reserve-qty-row .form-control {
    flex: 1;
    min-width: 0;
}
.reserve-qty-unit {
    flex-shrink: 0;
    font-size: .95rem;
    font-weight: 700;
    color: var(--olive-deep);
    white-space: nowrap;
    background: rgba(74,103,65,.08);
    padding: .4rem .75rem;
    border-radius: var(--r-md);
    border: 1px solid rgba(74,103,65,.2);
}
.reserve-qty-hint {
    margin-top: .35rem;
    font-size: .73rem;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════
   ADMIN REPORTS — filter panel & summary strip
   ═══════════════════════════════════════════════════════════════════ */

/* Summary strip */
.reports-summary-strip {
    display: flex;
    gap: .75rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.reports-summary-item {
    flex: 1;
    min-width: 100px;
    background: var(--card-bg);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: .85rem 1.1rem;
    text-align: center;
}
.reports-summary-item__val {
    font-size: 1.65rem;
    font-weight: 900;
    font-family: var(--f-display);
    color: var(--text-dark);
    line-height: 1.1;
}
.reports-summary-item__lbl {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-muted);
    margin-top: .25rem;
}
.reports-summary-item--open .reports-summary-item__val { color: var(--terra); }
.reports-summary-item--review .reports-summary-item__val { color: #b07a22; }
.reports-summary-item--resolved .reports-summary-item__val { color: var(--olive); }

/* Filter panel */
.admin-filter-panel {
    background: var(--card-bg);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: 1.1rem 1.25rem;
    margin-bottom: 1.25rem;
}
.admin-filter-row {
    display: flex;
    gap: .85rem;
    align-items: flex-end;
    flex-wrap: wrap;
}
.admin-filter-row .form-group {
    flex: 1;
    min-width: 130px;
    margin-bottom: 0;
}
.admin-filter-actions {
    display: flex;
    gap: .5rem;
    align-items: center;
    padding-bottom: .05rem;
    flex-shrink: 0;
}
.admin-filter-active {
    margin-top: .75rem;
    font-size: .8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: .4rem;
}
.admin-filter-active strong { color: var(--olive-deep); }

/* Quick-action buttons in report items */
.report-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: .75rem;
}
.report-quick-btn {
    font-size: .73rem;
    padding: .2rem .55rem;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .reports-summary-strip { gap: .5rem; }
    .reports-summary-item { min-width: 80px; padding: .7rem .8rem; }
    .reports-summary-item__val { font-size: 1.3rem; }
    .admin-filter-row { flex-direction: column; }
    .admin-filter-row .form-group { min-width: 100%; }
    .admin-filter-actions { width: 100%; }
    .reserve-qty-row { flex-direction: column; align-items: stretch; }
    .reserve-qty-unit { text-align: center; }
}

/* ═══════════════════════════════════════════════════════════════════
   DEFINITIVE MOBILE SHELL FIX  — All 4 panels (Admin / Biz / Usr / Char)

   WHY position:fixed for topbar:
   position:sticky requires NO overflow:hidden/auto/scroll ancestor.
   Every workspace already uses overflow-y:auto as a scroll container.
   Removing overflow breaks the layout. The ONLY reliable solution is
   position:fixed for the topbar + padding-top on the workspace/content
   to push content below the fixed bar.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Topbar height token (change in one place) ── */
:root { --topbar-h: 58px; }

@media (max-width: 1024px) {

    /* ══ SHARED: all shells become block layout ══ */
    .admin-shell,
    .biz-shell,
    .usr-shell,
    .char-shell {
        display: block !important;
        height: auto !important;
        min-height: 100dvh;
        overflow: visible !important;
    }

    /* ══ SHARED: all sidebars → off-canvas drawer ══ */
    .admin-sidebar,
    .biz-sidebar,
    .usr-sidebar,
    .char-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 280px !important;
        height: 100dvh !important;
        z-index: 600 !important;
        transform: translateX(-110%) !important;
        transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }

    /* Open state: JS toggles .is-open on the SHELL */
    .admin-shell.is-open .admin-sidebar,
    .biz-shell.is-open   .biz-sidebar,
    .usr-shell.is-open   .usr-sidebar,
    .char-shell.is-open  .char-sidebar {
        transform: translateX(0) !important;
        box-shadow: 6px 0 40px rgba(0,0,0,0.35) !important;
    }

    /* ══ SHARED: backdrops ══ */
    .admin-shell-backdrop,
    .biz-shell-backdrop,
    .usr-shell-backdrop,
    .char-shell-backdrop {
        display: none !important;
        position: fixed !important;
        inset: 0 !important;
        z-index: 590 !important;
        background: rgba(0,0,0,0.55) !important;
        backdrop-filter: blur(2px) !important;
        -webkit-backdrop-filter: blur(2px) !important;
    }

    .admin-shell.is-open .admin-shell-backdrop,
    .biz-shell.is-open   .biz-shell-backdrop,
    .usr-shell.is-open   .usr-shell-backdrop,
    .char-shell.is-open  .char-shell-backdrop {
        display: block !important;
    }

    /* ══ SHARED: hamburger toggles always visible ══ */
    .admin-sidebar-toggle,
    .biz-sidebar-toggle,
    .usr-sidebar-toggle,
    .char-sidebar-toggle {
        display: inline-flex !important;
        flex-shrink: 0 !important;
    }

    /* ══ SHARED: workspaces reset to normal page flow ══ */
    .admin-workspace,
    .biz-workspace,
    .usr-workspace,
    .char-workspace {
        height: auto !important;
        min-height: 100dvh !important;
        overflow: visible !important;     /* NOT auto — avoids scroll-container trap */
        margin-left: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* ══ SHARED: topbars → position:fixed (the only reliable approach) ══ */
    .admin-topbar,
    .biz-topbar,
    .usr-topbar,
    .char-topbar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: var(--topbar-h) !important;
        z-index: 400 !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.75rem !important;
        padding: 0 1rem !important;
        margin: 0 !important;
        border-radius: 0 !important;
        box-sizing: border-box !important;
        flex-wrap: nowrap !important;
        overflow: hidden !important;
    }

    /* topbar head fills remaining space */
    .admin-topbar__head,
    .biz-topbar__head,
    .usr-topbar__head,
    .char-topbar__head {
        flex: 1 !important;
        min-width: 0 !important;
    }

    .admin-topbar__head h1,
    .biz-topbar h1,
    .usr-topbar h1,
    .char-topbar h1 {
        font-size: 1.05rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        margin: 0 !important;
    }

    /* hide subtitle on mobile — saves space */
    .admin-topbar__head p,
    .biz-topbar > .biz-topbar__head > p,
    .usr-topbar > .usr-topbar__head > p,
    .char-topbar > .char-topbar__head > p {
        display: none !important;
    }

    /* Content areas: push down so content doesn't hide under fixed topbar */
    .admin-content,
    .biz-content,
    .usr-content,
    .char-content {
        padding: calc(var(--topbar-h) + 1rem) 1rem 2rem !important;
        box-sizing: border-box !important;
        width: 100% !important;
        min-width: 0 !important;
        overflow-x: hidden !important;
    }

    /* ── ADMIN-specific topbar styling ── */
    .admin-topbar {
        background: linear-gradient(135deg, rgba(15,23,42,0.98) 0%, rgba(2,6,23,0.99) 100%) !important;
        border-bottom: 1px solid rgba(255,255,255,0.08) !important;
        box-shadow: 0 2px 20px rgba(0,0,0,0.5) !important;
    }
    .admin-topbar__head h1 { color: #ffffff !important; }

    /* ── BIZ-specific topbar styling ── */
    .biz-topbar {
        background: rgba(238,243,234,0.97) !important;
        border-bottom: 1px solid rgba(74,103,65,0.18) !important;
        box-shadow: 0 2px 16px rgba(74,103,65,0.12) !important;
        backdrop-filter: blur(16px) !important;
        -webkit-backdrop-filter: blur(16px) !important;
    }

    /* ── USR-specific topbar styling ── */
    .usr-topbar {
        background: rgba(248,252,248,0.97) !important;
        border-bottom: 1px solid rgba(16,185,129,0.15) !important;
        box-shadow: 0 2px 16px rgba(0,0,0,0.08) !important;
        backdrop-filter: blur(16px) !important;
        -webkit-backdrop-filter: blur(16px) !important;
    }

    /* ── CHAR-specific topbar styling ── */
    .char-topbar {
        background: rgba(243,239,230,0.97) !important;
        border-bottom: 1px solid rgba(181,96,74,0.15) !important;
        box-shadow: 0 2px 16px rgba(181,96,74,0.1) !important;
        backdrop-filter: blur(16px) !important;
        -webkit-backdrop-filter: blur(16px) !important;
    }

    /* ── Tables: scroll horizontally inside wrapper (not clipped by page) ── */
    .table-wrapper,
    .table-wrap {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .app-body[data-role="admin"] .admin-content {
        overflow-x: visible !important;
    }

    .app-body[data-role="admin"] .table-wrapper > .table {
        width: max-content !important;
        min-width: 100% !important;
    }

    .app-body[data-role="admin"] .table-wrapper > .table.table--users {
        min-width: 960px !important;
    }

    .app-body[data-role="admin"] .table-wrapper > .table.table--logs {
        min-width: 1040px !important;
    }

    /* ── Grid adjustments ── */
    .biz-snapshot { grid-template-columns: 1fr 1fr !important; }
    .biz-grid     { grid-template-columns: 1fr !important; }
    .stat-grid    { grid-template-columns: 1fr 1fr !important; gap: 0.85rem !important; }

    /* ── Topbar actions on mobile ── */
    .biz-topbar__actions,
    .usr-topbar__actions,
    .char-topbar__actions,
    .admin-topbar__actions {
        display: flex !important;
        gap: 0.4rem !important;
        flex-shrink: 0 !important;
    }

    .biz-topbar__actions .btn,
    .usr-topbar__actions .btn,
    .char-topbar__actions .btn {
        font-size: 0.78rem !important;
        padding: 0.4rem 0.7rem !important;
    }
}

@media (max-width: 540px) {
    .biz-snapshot { grid-template-columns: 1fr !important; }
    .stat-grid    { grid-template-columns: 1fr !important; }

    .admin-content,
    .biz-content,
    .usr-content,
    .char-content {
        padding: calc(var(--topbar-h) + 0.75rem) 0.85rem 2rem !important;
    }
}


/* ══════════════════════════════════════════════════════════════
   COMPREHENSIVE MOBILE SHELL FIXES — Business, User, Admin
   
   Root cause of all mobile bugs:
   • All workspaces use height:100vh + overflow-y:auto at desktop.
   • On mobile the shell grid → block, but workspace keeps its
     scroll-container behaviour, so position:sticky is relative
     to THAT container, not the viewport → topbar scrolls away.
   • Fix: on mobile, reset workspace to normal flow; let <body>
     handle scrolling; sticky topbar then sticks to the viewport.
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {

    /* ── BUSINESS SHELL ── */
    .biz-shell {
        display: block !important;
        height: auto !important;
        overflow: visible !important;
        min-height: 100vh;
    }

    .biz-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        height: 100vh !important;
        z-index: 500 !important;
        transform: translateX(-105%) !important;
        transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1) !important;
        overflow-y: auto !important;
    }

    .biz-shell.is-open .biz-sidebar {
        transform: translateX(0) !important;
        box-shadow: 4px 0 40px rgba(0,0,0,0.3) !important;
    }

    .biz-sidebar-toggle {
        display: inline-flex !important;
    }

    .biz-shell-backdrop {
        display: none;
        position: fixed !important;
        inset: 0 !important;
        background: rgba(22, 26, 21, 0.5) !important;
        z-index: 490 !important;
    }

    .biz-shell.is-open .biz-shell-backdrop {
        display: block !important;
    }

    /* Workspace: normal page flow, NOT a scroll container */
    .biz-workspace {
        height: auto !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
        min-height: 100vh;
        padding: 0 !important;
    }

    /* Topbar: sticks to viewport top */
    .biz-topbar {
        position: sticky !important;
        top: 0 !important;
        z-index: 200 !important;
        background: linear-gradient(135deg, #eef3ea 0%, #e7edde 100%) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
        border-bottom: 1px solid rgba(74, 103, 65, 0.15) !important;
        padding: 0.85rem 1rem !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.75rem !important;
        flex-wrap: nowrap !important;
    }

    .biz-topbar h1 {
        font-size: 1.1rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .biz-topbar p { display: none !important; }

    .biz-content {
        padding: 1.25rem 1rem !important;
    }


    /* ── USER SHELL ── */
    .usr-shell {
        display: block !important;
        height: auto !important;
        overflow: visible !important;
        min-height: 100vh;
    }

    .usr-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        height: 100vh !important;
        z-index: 500 !important;
        transform: translateX(-105%) !important;
        transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1) !important;
        overflow-y: auto !important;
    }

    .usr-shell.is-open .usr-sidebar {
        transform: translateX(0) !important;
        box-shadow: 4px 0 40px rgba(0,0,0,0.3) !important;
    }

    .usr-sidebar-toggle {
        display: inline-flex !important;
    }

    .usr-shell-backdrop {
        display: none;
        position: fixed !important;
        inset: 0 !important;
        background: rgba(22, 26, 21, 0.5) !important;
        z-index: 490 !important;
    }

    .usr-shell.is-open .usr-shell-backdrop {
        display: block !important;
    }

    .usr-workspace {
        height: auto !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
        min-height: 100vh;
        padding: 0 !important;
    }

    .usr-topbar {
        position: sticky !important;
        top: 0 !important;
        z-index: 200 !important;
        background: rgba(255, 255, 255, 0.92) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
        border-bottom: 1px solid rgba(16, 185, 129, 0.15) !important;
        padding: 0.85rem 1rem !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.75rem !important;
        flex-wrap: nowrap !important;
    }

    .usr-topbar h1 {
        font-size: 1.1rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .usr-topbar p { display: none !important; }

    .usr-content {
        padding: 1.25rem 1rem !important;
    }


    /* ── ADMIN SHELL ── */
    .admin-shell {
        display: block !important;
        height: auto !important;
        overflow: visible !important;
        min-height: 100vh;
    }

    .admin-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        height: 100vh !important;
        z-index: 500 !important;
        transform: translateX(-105%) !important;
        transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1) !important;
        overflow-y: auto !important;
        width: 280px !important;
    }

    .admin-shell.is-open .admin-sidebar {
        transform: translateX(0) !important;
        box-shadow: 4px 0 40px rgba(0,0,0,0.5) !important;
    }

    .admin-sidebar-toggle {
        display: inline-flex !important;
    }

    .admin-shell-backdrop {
        display: none;
        position: fixed !important;
        inset: 0 !important;
        background: rgba(0, 0, 0, 0.6) !important;
        z-index: 490 !important;
    }

    .admin-shell.is-open .admin-shell-backdrop {
        display: block !important;
    }

    .admin-workspace {
        height: auto !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
        min-height: 100vh;
        padding: 0 !important;
        margin-left: 0 !important;
    }

    .admin-topbar {
        position: sticky !important;
        top: 0 !important;
        z-index: 200 !important;
        background: linear-gradient(135deg, rgba(15,23,42,0.98) 0%, rgba(2,6,23,0.99) 100%) !important;
        backdrop-filter: blur(16px) !important;
        -webkit-backdrop-filter: blur(16px) !important;
        border-radius: 0 !important;
        border-bottom: 1px solid rgba(255,255,255,0.08) !important;
        padding: 0.85rem 1rem !important;
        margin: 0 !important;
        box-shadow: 0 2px 20px rgba(0,0,0,0.4) !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.75rem !important;
        flex-wrap: nowrap !important;
    }

    .admin-topbar__head h1 {
        font-size: 1.1rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .admin-topbar__head p { display: none !important; }

    .admin-content {
        padding: 1.25rem 1rem !important;
    }

    /* Tables: all must scroll horizontally */
    .table-wrapper,
    .table-wrap,
    [class*="table-wrap"] {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        display: block !important;
        max-width: 100% !important;
    }

    .table {
        min-width: 520px;
    }

    /* Biz snapshot grid */
    .biz-snapshot {
        grid-template-columns: 1fr 1fr !important;
    }

    .biz-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 540px) {
    /* Single column stats */
    .biz-snapshot {
        grid-template-columns: 1fr !important;
    }

    .biz-topbar__actions,
    .usr-topbar__actions,
    .char-topbar__actions {
        flex-wrap: wrap !important;
        width: 100% !important;
    }

    .biz-topbar__actions .btn,
    .usr-topbar__actions .btn,
    .char-topbar__actions .btn {
        flex: 1 !important;
        justify-content: center !important;
    }
}

.listing-map {
    width: 100%;
    height: 340px;
    border-radius: 14px;
    border: 1px solid rgba(74, 103, 65, 0.22);
    box-shadow: 0 10px 24px rgba(33, 45, 28, 0.12);
    overflow: hidden;
    margin-top: 0.65rem;
}

.listing-map--small {
    height: 260px;
}

.map-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.map-help-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.55rem;
}

.map-help-text.is-error {
    color: #b53f3f;
}

.map-help-text.is-success {
    color: #2f6b33;
}

.food-location-card {
    margin-top: 1.1rem;
    border-top: 1px solid var(--line);
    padding-top: 1.1rem;
}

.food-location-card__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-bottom: 0.45rem;
}

.food-location-card__head h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-dark);
}

.food-location-card__address {
    margin: 0 0 0.25rem;
    color: var(--text-mid);
    font-size: 0.9rem;
}

.food-location-card__label {
    margin: 0 0 0.45rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--olive);
    letter-spacing: 0.02em;
}

.map-unavailable-note {
    margin-top: 0.5rem;
    font-size: 0.84rem;
    color: var(--text-muted);
    background: rgba(74, 103, 65, 0.06);
    border: 1px dashed rgba(74, 103, 65, 0.25);
    border-radius: 10px;
    padding: 0.7rem 0.85rem;
}

.reservation-location-block {
    margin-top: 0.85rem;
    padding: 0.8rem;
    border-top: 1px solid var(--line);
}

.food-map-marker {
    background: transparent;
    border: 0;
}

.food-marker-pin {
    width: 40px;
    height: 40px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    background: linear-gradient(145deg, #e66a3d, #cf3f2f);
    border: 2px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 18px rgba(103, 36, 26, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
}

.food-marker-pin span {
    transform: rotate(45deg);
    font-size: 16px;
    line-height: 1;
}

/* Full-page wait overlay during POST (uploads, saves) */
body.is-page-loading {
    cursor: wait;
}
body.is-page-loading::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(247, 244, 239, 0.72);
    pointer-events: all;
}
body.is-page-loading::before {
    content: 'Saving…';
    position: fixed;
    z-index: 100000;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 700;
    font-size: 1rem;
    color: var(--olive-deep, #4a6741);
    letter-spacing: 0.04em;
}

/* ══════════════════════════════════════════════════════════════
   MOBILE CONSOLE — scroll, topbar layout, no overlap (all roles)
   Desktop layout unchanged above 1024px.
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .app-body[data-role="admin"],
    .app-body[data-role="business"],
    .app-body[data-role="charity"],
    .app-body[data-role="general_user"] {
        height: auto !important;
        min-height: 100dvh !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .app-body[data-role="admin"] .app-main,
    .app-body[data-role="business"] .app-main,
    .app-body[data-role="charity"] .app-main,
    .app-body[data-role="general_user"] .app-main,
    .app-body[data-role="admin"] .app-container,
    .app-body[data-role="business"] .app-container,
    .app-body[data-role="charity"] .app-container,
    .app-body[data-role="general_user"] .app-container {
        height: auto !important;
        overflow: visible !important;
    }

    /* Flat mobile topbar (override custom_dashboard card style) */
    .admin-topbar,
    .biz-topbar,
    .usr-topbar,
    .char-topbar {
        display: grid !important;
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-rows: auto auto;
        align-items: center !important;
        gap: 0.45rem 0.75rem !important;
        height: auto !important;
        min-height: var(--topbar-h) !important;
        max-height: none !important;
        padding: 0.65rem 1rem 0.75rem !important;
        margin: 0 !important;
        border-radius: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: visible !important;
        left: 0 !important;
        right: 0 !important;
    }

    .admin-sidebar-toggle,
    .biz-sidebar-toggle,
    .usr-sidebar-toggle,
    .char-sidebar-toggle {
        grid-column: 1;
        grid-row: 1;
        align-self: center;
    }

    .admin-topbar__head,
    .biz-topbar__head,
    .usr-topbar__head,
    .char-topbar__head {
        grid-column: 2;
        grid-row: 1;
        min-width: 0 !important;
    }

    .admin-topbar__actions,
    .biz-topbar__actions,
    .usr-topbar__actions,
    .char-topbar__actions {
        grid-column: 1 / -1;
        grid-row: 2;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.45rem !important;
        width: 100% !important;
        max-width: 100% !important;
        justify-content: flex-start !important;
        overflow: visible !important;
    }

    .admin-topbar__actions .btn,
    .biz-topbar__actions .btn,
    .usr-topbar__actions .btn,
    .char-topbar__actions .btn {
        flex-shrink: 0;
        max-width: 100%;
        font-size: 0.78rem !important;
        padding: 0.42rem 0.75rem !important;
        white-space: nowrap;
    }

    .admin-topbar__head h1,
    .biz-topbar__head h1,
    .usr-topbar h1,
    .char-topbar h1 {
        font-size: 1rem !important;
        font-weight: 700 !important;
        letter-spacing: normal !important;
        text-shadow: none !important;
        margin-bottom: 0 !important;
        line-height: 1.25 !important;
    }

    .admin-workspace,
    .biz-workspace,
    .usr-workspace,
    .char-workspace {
        overflow: visible !important;
        width: 100% !important;
        max-width: 100vw !important;
    }

    .admin-content,
    .biz-content,
    .usr-content,
    .char-content {
        padding: 1rem 1rem 2rem !important;
        padding-top: 5.25rem !important;
        overflow-y: visible !important;
    }

    .admin-content {
        overflow-x: clip !important;
    }

    .app-body[data-role="admin"] .admin-content .table-wrapper {
        overflow-x: auto !important;
    }

    .biz-content,
    .usr-content,
    .char-content {
        overflow-x: hidden !important;
    }

    .stat-grid {
        grid-template-columns: 1fr !important;
    }

    .admin-section-label {
        margin-top: 0.5rem;
    }
}

@media (max-width: 1024px) {
    .admin-workspace > .admin-topbar,
    .biz-workspace > .biz-topbar,
    .usr-workspace > .usr-topbar,
    .char-workspace > .char-topbar {
        position: sticky !important;
        top: 0 !important;
        z-index: 400 !important;
    }
}
