/* =====================================================================================
   INEC Cooperative - design system
   All colours are tokens below. Re-theming = editing this block only.
   Themes: green (default), blue, gold  ×  light / dark   (set on <html data-theme data-mode>)
   ===================================================================================== */

:root {
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --radius: 14px;
    --radius-sm: 9px;
    --sidebar-w: 268px;
    --topbar-h: 66px;
    --bottom-nav-h: 64px;

    /* status colours (shared) */
    --c-success: #15803d;  --c-success-soft: #dcfce7;
    --c-warning: #b45309;  --c-warning-soft: #fef3c7;
    --c-danger:  #b91c1c;  --c-danger-soft:  #fee2e2;
    --c-info:    #0369a1;  --c-info-soft:    #e0f2fe;
    --c-secondary: #475569; --c-secondary-soft: #e2e8f0;

    /* neutrals (light) */
    --c-bg: #f3f6f4;
    --c-surface: #ffffff;
    --c-surface-2: #f8faf9;
    --c-border: #e1e8e4;
    --c-text: #14211b;
    --c-muted: #5b6b62;
    --shadow-sm: 0 1px 2px rgba(16, 40, 28, .06), 0 1px 3px rgba(16, 40, 28, .06);
    --shadow-md: 0 8px 24px rgba(16, 40, 28, .10);
    --overlay: rgba(10, 20, 15, .55);
}

/* ---- Theme: Savannah Green (default) ---- */
:root, [data-theme="green"] {
    --c-primary: #0b6b3a;
    --c-primary-dark: #064d28;
    --c-primary-soft: #e3f3ea;
    --c-on-primary: #ffffff;
    --c-accent: #c9a227;
    --c-accent-soft: #fbf3d6;
    --sidebar-bg: #08331f;
    --sidebar-text: #bcd8c8;
    --sidebar-active: rgba(255, 255, 255, .11);
    --gradient: linear-gradient(135deg, #0b6b3a 0%, #064d28 60%, #08331f 100%);
}
[data-theme="blue"] {
    --c-primary: #1d4ed8;
    --c-primary-dark: #1e3a8a;
    --c-primary-soft: #e6edfd;
    --c-on-primary: #ffffff;
    --c-accent: #0891b2;
    --c-accent-soft: #d9f3f9;
    --sidebar-bg: #0e1c46;
    --sidebar-text: #bccaf0;
    --sidebar-active: rgba(255, 255, 255, .12);
    --gradient: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 60%, #0e1c46 100%);
}
[data-theme="gold"] {
    --c-primary: #a16207;
    --c-primary-dark: #713f12;
    --c-primary-soft: #fcf1d6;
    --c-on-primary: #ffffff;
    --c-accent: #1f2937;
    --c-accent-soft: #e5e7eb;
    --sidebar-bg: #231f15;
    --sidebar-text: #d8cfb8;
    --sidebar-active: rgba(255, 255, 255, .10);
    --gradient: linear-gradient(135deg, #a16207 0%, #713f12 60%, #231f15 100%);
}

/* ---- Dark mode ---- */
[data-mode="dark"] {
    --c-bg: #0d1411;
    --c-surface: #151e19;
    --c-surface-2: #1b2620;
    --c-border: #263329;
    --c-text: #e7efe9;
    --c-muted: #9bb0a3;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 10px 28px rgba(0, 0, 0, .5);
    --c-success: #4ade80;  --c-success-soft: rgba(74, 222, 128, .14);
    --c-warning: #fbbf24;  --c-warning-soft: rgba(251, 191, 36, .14);
    --c-danger:  #f87171;  --c-danger-soft:  rgba(248, 113, 113, .15);
    --c-info:    #38bdf8;  --c-info-soft:    rgba(56, 189, 248, .14);
    --c-secondary: #a3b2aa; --c-secondary-soft: rgba(163, 178, 170, .16);
}
[data-mode="dark"][data-theme="green"], [data-mode="dark"]:not([data-theme]) {
    --c-primary: #2fae6d; --c-primary-dark: #1f8a53; --c-primary-soft: rgba(47, 174, 109, .16); --c-on-primary: #04170d;
    --c-accent: #e3bf4a; --c-accent-soft: rgba(227, 191, 74, .15); --sidebar-bg: #0a1510;
}
[data-mode="dark"][data-theme="blue"] {
    --c-primary: #6b95ff; --c-primary-dark: #4d78e6; --c-primary-soft: rgba(107, 149, 255, .16); --c-on-primary: #061030;
    --c-accent: #38bdf8; --c-accent-soft: rgba(56, 189, 248, .15); --sidebar-bg: #0a1126;
}
[data-mode="dark"][data-theme="gold"] {
    --c-primary: #e0a526; --c-primary-dark: #c28a14; --c-primary-soft: rgba(224, 165, 38, .16); --c-on-primary: #1d1405;
    --c-accent: #cbd5e1; --c-accent-soft: rgba(203, 213, 225, .14); --sidebar-bg: #14120c;
}

/* ===================================================================================== base */
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--c-bg);
    color: var(--c-text);
    font-size: .94rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-primary-dark); }
h1, h2, h3, h4, h5, h6 { color: var(--c-text); font-weight: 650; letter-spacing: -.01em; }
.text-muted, .form-text { color: var(--c-muted) !important; }
.text-primary { color: var(--c-primary) !important; }
.fw-600 { font-weight: 600; }
.min-w-0 { min-width: 0; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
code { color: var(--c-primary-dark); background: var(--c-primary-soft); padding: .1em .4em; border-radius: 5px; font-size: .85em; }
[data-mode="dark"] code { color: var(--c-primary); }
hr { border-color: var(--c-border); opacity: 1; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--c-primary) 45%, transparent); outline-offset: 2px; }

/* Bootstrap bridge: make built-in components follow the tokens */
.btn { border-radius: var(--radius-sm); font-weight: 550; padding: .55rem 1.05rem; min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
.btn-sm { min-height: 34px; padding: .3rem .75rem; font-size: .85rem; }
.btn-lg { min-height: 50px; padding: .7rem 1.4rem; font-size: 1rem; }
.btn-primary { --bs-btn-bg: var(--c-primary); --bs-btn-border-color: var(--c-primary); --bs-btn-color: var(--c-on-primary);
    --bs-btn-hover-bg: var(--c-primary-dark); --bs-btn-hover-border-color: var(--c-primary-dark); --bs-btn-hover-color: var(--c-on-primary);
    --bs-btn-active-bg: var(--c-primary-dark); --bs-btn-active-border-color: var(--c-primary-dark); --bs-btn-active-color: var(--c-on-primary);
    --bs-btn-disabled-bg: var(--c-primary); --bs-btn-disabled-border-color: var(--c-primary); --bs-btn-disabled-color: var(--c-on-primary); }
.btn-outline-primary { --bs-btn-color: var(--c-primary); --bs-btn-border-color: var(--c-primary); --bs-btn-hover-bg: var(--c-primary); --bs-btn-hover-border-color: var(--c-primary);
    --bs-btn-hover-color: var(--c-on-primary); --bs-btn-active-bg: var(--c-primary); --bs-btn-active-border-color: var(--c-primary); --bs-btn-active-color: var(--c-on-primary); }
.btn-outline-secondary { --bs-btn-color: var(--c-muted); --bs-btn-border-color: var(--c-border); --bs-btn-hover-bg: var(--c-surface-2); --bs-btn-hover-border-color: var(--c-border);
    --bs-btn-hover-color: var(--c-text); --bs-btn-active-bg: var(--c-surface-2); --bs-btn-active-color: var(--c-text); --bs-btn-active-border-color: var(--c-border); }
.btn-soft { background: var(--c-primary-soft); color: var(--c-primary); border: 0; }
.btn-soft:hover { background: var(--c-primary); color: var(--c-on-primary); }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: 50%; }

.form-control, .form-select {
    border-radius: var(--radius-sm); border-color: var(--c-border); background-color: var(--c-surface); color: var(--c-text);
    min-height: 44px; padding: .55rem .85rem;
}
.form-control:focus, .form-select:focus { border-color: var(--c-primary); box-shadow: 0 0 0 .22rem color-mix(in srgb, var(--c-primary) 18%, transparent); background-color: var(--c-surface); color: var(--c-text); }
.form-control::placeholder { color: color-mix(in srgb, var(--c-muted) 70%, transparent); }
.form-control:disabled, .form-select:disabled, .form-control[readonly] { background-color: var(--c-surface-2); }
textarea.form-control { min-height: 90px; }
.form-label { font-weight: 550; font-size: .86rem; margin-bottom: .35rem; color: var(--c-text); }
.form-check-input:checked { background-color: var(--c-primary); border-color: var(--c-primary); }
.form-check-input { width: 1.15em; height: 1.15em; }
.form-switch .form-check-input { width: 2.2em; height: 1.2em; }
.invalid-feedback { font-size: .8rem; }
.is-invalid { border-color: var(--c-danger) !important; }
.input-group-text { background: var(--c-surface-2); border-color: var(--c-border); color: var(--c-muted); border-radius: var(--radius-sm); }

.card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); box-shadow: var(--shadow-sm); color: var(--c-text); }
.card-header { background: transparent; border-bottom: 1px solid var(--c-border); padding: 1rem 1.25rem; font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.card-body { padding: 1.25rem; }
.card-footer { background: var(--c-surface-2); border-top: 1px solid var(--c-border); }

.modal-content { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); color: var(--c-text); }
.modal-header, .modal-footer { border-color: var(--c-border); }
.dropdown-menu { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 12px; box-shadow: var(--shadow-md); padding: .4rem; }
.dropdown-item { border-radius: 8px; padding: .5rem .75rem; color: var(--c-text); display: flex; align-items: center; gap: .6rem; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--c-primary-soft); color: var(--c-primary); }
.dropdown-divider { border-color: var(--c-border); }
.alert { border-radius: var(--radius-sm); border: 0; }
.alert-danger { background: var(--c-danger-soft); color: var(--c-danger); }
.alert-success { background: var(--c-success-soft); color: var(--c-success); }
.alert-warning { background: var(--c-warning-soft); color: var(--c-warning); }
.alert-info { background: var(--c-info-soft); color: var(--c-info); }
.progress { background: var(--c-secondary-soft); border-radius: 99px; height: .6rem; }
.progress-bar { background: var(--c-primary); border-radius: 99px; }
.nav-tabs { border-bottom: 1px solid var(--c-border); gap: .25rem; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.nav-tabs::-webkit-scrollbar { display: none; }
.nav-tabs .nav-link { color: var(--c-muted); border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: .75rem 1rem; font-weight: 550; white-space: nowrap; }
.nav-tabs .nav-link:hover { color: var(--c-text); border-color: var(--c-border); }
.nav-tabs .nav-link.active { color: var(--c-primary); background: transparent; border-color: var(--c-primary); }
.nav-pills .nav-link { color: var(--c-muted); border-radius: 99px; font-weight: 550; }
.nav-pills .nav-link.active { background: var(--c-primary); color: var(--c-on-primary); }
.breadcrumb { margin-bottom: .25rem; font-size: .82rem; }
.breadcrumb-item a { color: var(--c-muted); }
.pagination { gap: .25rem; margin: 0; flex-wrap: wrap; }
.page-link { border-radius: 8px !important; border: 1px solid var(--c-border); color: var(--c-text); background: var(--c-surface); min-width: 38px; text-align: center; }
.page-item.active .page-link { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-on-primary); }
.page-item.disabled .page-link { background: var(--c-surface-2); color: var(--c-muted); }
.list-group-item { background: var(--c-surface); border-color: var(--c-border); color: var(--c-text); }
.toast { border-radius: 12px; border: 0; box-shadow: var(--shadow-md); }

/* ===================================================================================== badges */
.badge-soft { font-weight: 600; padding: .38em .7em; border-radius: 99px; font-size: .74rem; letter-spacing: .01em; }
.badge-success { background: var(--c-success-soft); color: var(--c-success); }
.badge-warning { background: var(--c-warning-soft); color: var(--c-warning); }
.badge-danger { background: var(--c-danger-soft); color: var(--c-danger); }
.badge-info { background: var(--c-info-soft); color: var(--c-info); }
.badge-primary { background: var(--c-primary-soft); color: var(--c-primary); }
.badge-secondary { background: var(--c-secondary-soft); color: var(--c-secondary); }

/* ===================================================================================== app shell */
.app-shell { min-height: 100vh; }
.sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: var(--sidebar-bg); color: var(--sidebar-text);
    display: flex; flex-direction: column; z-index: 1040; transition: transform .28s ease;
}
.sidebar-brand { display: flex; align-items: center; gap: .75rem; padding: 1.1rem 1.25rem; border-bottom: 1px solid rgba(255, 255, 255, .08); color: #fff; min-height: var(--topbar-h); }
.sidebar-brand:hover { color: #fff; }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; background: var(--c-accent); color: #14211b; display: grid; place-items: center; font-size: 1.3rem; flex: none; overflow: hidden; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.brand-text { line-height: 1.2; min-width: 0; }
.brand-text strong { display: block; font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { color: var(--sidebar-text); opacity: .8; font-size: .72rem; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: .75rem .75rem 1rem; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .2) transparent; }
.nav-group-title { text-transform: uppercase; font-size: .66rem; letter-spacing: .09em; color: var(--sidebar-text); opacity: .65; padding: 1rem .75rem .4rem; font-weight: 650; }
.sidebar-link {
    display: flex; align-items: center; gap: .75rem; padding: .62rem .8rem; border-radius: 10px; color: var(--sidebar-text);
    font-weight: 500; font-size: .9rem; margin-bottom: 2px; min-height: 44px; position: relative;
}
.sidebar-link i { font-size: 1.1rem; width: 1.25rem; text-align: center; flex: none; }
.sidebar-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.sidebar-link.active { background: var(--sidebar-active); color: #fff; font-weight: 600; }
.sidebar-link.active::before { content: ''; position: absolute; left: -.75rem; top: 20%; bottom: 20%; width: 4px; border-radius: 0 4px 4px 0; background: var(--c-accent); }
.sidebar-link .count { margin-left: auto; background: var(--c-accent); color: #14211b; font-size: .68rem; font-weight: 700; border-radius: 99px; padding: .1rem .5rem; }
.sidebar-user { border-top: 1px solid rgba(255, 255, 255, .08); padding: .85rem 1rem; display: flex; align-items: center; gap: .7rem; }
.sidebar-user .meta { min-width: 0; flex: 1; line-height: 1.25; }
.sidebar-user .meta strong { display: block; color: #fff; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .meta small { opacity: .75; font-size: .72rem; }
.sidebar-user .btn-logout { color: var(--sidebar-text); background: rgba(255, 255, 255, .08); border: 0; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; }
.sidebar-user .btn-logout:hover { background: var(--c-danger); color: #fff; }
.sidebar-backdrop { position: fixed; inset: 0; background: var(--overlay); z-index: 1035; opacity: 0; visibility: hidden; transition: opacity .25s; }

.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--c-primary-soft); color: var(--c-primary); display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 84px; height: 84px; font-size: 1.6rem; }
.avatar-xl { width: 120px; height: 120px; font-size: 2.2rem; border-radius: 22px; }
.sidebar .avatar { background: rgba(255, 255, 255, .14); color: #fff; }

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
    position: sticky; top: 0; z-index: 1020; height: var(--topbar-h); background: color-mix(in srgb, var(--c-surface) 92%, transparent);
    backdrop-filter: blur(10px); border-bottom: 1px solid var(--c-border); display: flex; align-items: center; gap: .75rem; padding: 0 1.5rem;
}
.topbar-title { font-size: 1.12rem; font-weight: 650; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.topbar .btn-icon { background: transparent; border: 1px solid transparent; color: var(--c-muted); position: relative; }
.topbar .btn-icon:hover { background: var(--c-primary-soft); color: var(--c-primary); }
.topbar .badge-dot { position: absolute; top: 5px; right: 4px; min-width: 18px; height: 18px; border-radius: 99px; background: var(--c-danger); color: #fff; font-size: .65rem; font-weight: 700; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--c-surface); }
.clock { font-size: .82rem; color: var(--c-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.menu-toggle { display: none; }
.content { padding: 1.5rem; flex: 1; max-width: 1500px; width: 100%; margin: 0 auto; }
.app-footer { padding: 1rem 1.5rem; color: var(--c-muted); font-size: .8rem; text-align: center; border-top: 1px solid var(--c-border); }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head h2 { font-size: 1.35rem; margin: 0; }
.page-head p { margin: .15rem 0 0; color: var(--c-muted); }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* theme picker */
.theme-picker { min-width: 250px; padding: .9rem; }
.theme-picker h6 { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--c-muted); margin: 0 0 .55rem; }
.theme-dots { display: flex; gap: .5rem; margin-bottom: .9rem; }
.theme-dot { flex: 1; border: 2px solid var(--c-border); border-radius: 12px; padding: .5rem .25rem; background: var(--c-surface); cursor: pointer; text-align: center; font-size: .72rem; font-weight: 600; color: var(--c-text); }
.theme-dot .sw { display: block; height: 22px; border-radius: 7px; margin-bottom: .35rem; background: linear-gradient(135deg, var(--sw1) 55%, var(--sw2) 55%); }
.theme-dot.active { border-color: var(--c-primary); background: var(--c-primary-soft); }
.mode-toggle { display: flex; background: var(--c-surface-2); border-radius: 10px; padding: 3px; border: 1px solid var(--c-border); }
.mode-toggle button { flex: 1; border: 0; background: transparent; border-radius: 8px; padding: .4rem; font-size: .82rem; font-weight: 600; color: var(--c-muted); display: flex; gap: .4rem; align-items: center; justify-content: center; }
.mode-toggle button.active { background: var(--c-surface); color: var(--c-primary); box-shadow: var(--shadow-sm); }

/* ===================================================================================== stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1rem 1.15rem 1.05rem; box-shadow: var(--shadow-sm); display: block; position: relative; overflow: hidden; min-width: 0; }
.stat-icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 1.25rem; flex: none; background: var(--c-primary-soft); color: var(--c-primary); }
.stat-card > .stat-icon { position: absolute; top: .85rem; right: .9rem; }
.stat-card .stat-label { display: block; padding-right: 3.2rem; min-height: 2.5em; line-height: 1.25; }
.stat-icon.accent { background: var(--c-accent-soft); color: var(--c-accent); }
[data-theme="gold"]:not([data-mode="dark"]) .stat-icon.accent { color: #374151; }
.stat-icon.success { background: var(--c-success-soft); color: var(--c-success); }
.stat-icon.warning { background: var(--c-warning-soft); color: var(--c-warning); }
.stat-icon.danger { background: var(--c-danger-soft); color: var(--c-danger); }
.stat-icon.info { background: var(--c-info-soft); color: var(--c-info); }
.stat-body { min-width: 0; }
.stat-label { color: var(--c-muted); font-size: .78rem; font-weight: 550; text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-size: clamp(1.12rem, .95rem + .55vw, 1.42rem); font-weight: 700; line-height: 1.25; font-variant-numeric: tabular-nums; letter-spacing: -.02em; margin-top: .1rem; white-space: nowrap; }
.stat-sub { color: var(--c-muted); font-size: .78rem; }
a.stat-card { color: inherit; transition: transform .15s, box-shadow .15s; }
a.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: inherit; }

/* member wallet cards */
.wallet-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.wallet-card { border-radius: var(--radius); padding: 1.25rem; color: #fff; background: var(--gradient); position: relative; overflow: hidden; box-shadow: var(--shadow-md); }
.wallet-card::after { content: ''; position: absolute; width: 150px; height: 150px; border-radius: 50%; background: rgba(255, 255, 255, .08); right: -40px; top: -50px; z-index: 0; pointer-events: none; }
.wallet-card > * { position: relative; z-index: 1; }
.wallet-card .label { font-size: .78rem; opacity: .85; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.wallet-card .value { font-size: 1.65rem; font-weight: 700; letter-spacing: -.02em; margin: .25rem 0 .1rem; font-variant-numeric: tabular-nums; }
.wallet-card .sub { font-size: .8rem; opacity: .85; }
.wallet-card.alt { background: var(--c-surface); color: var(--c-text); border: 1px solid var(--c-border); box-shadow: var(--shadow-sm); }
.wallet-card.alt::after { background: var(--c-primary-soft); }
.wallet-card.alt .label, .wallet-card.alt .sub { color: var(--c-muted); opacity: 1; }
.wallet-card.alt .value { color: var(--c-primary); }

/* ===================================================================================== tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { --bs-table-bg: transparent; --bs-table-color: var(--c-text); --bs-table-border-color: var(--c-border); --bs-table-hover-bg: var(--c-surface-2); --bs-table-striped-bg: var(--c-surface-2); margin: 0; }
.table-modern > thead th { background: var(--c-surface-2); color: var(--c-muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 650; border-bottom: 1px solid var(--c-border); padding: .8rem 1rem; white-space: nowrap; }
.table-modern > tbody td { padding: .8rem 1rem; vertical-align: middle; border-color: var(--c-border); }
.table-modern > tbody tr:hover { background: var(--c-surface-2); }
.table-modern tfoot td, .table-modern tfoot th { padding: .8rem 1rem; font-weight: 700; border-top: 2px solid var(--c-border); background: var(--c-surface-2); }
.table .text-end, .table th.text-end { font-variant-numeric: tabular-nums; }
.row-actions { display: flex; gap: .35rem; justify-content: flex-end; white-space: nowrap; }
.filter-bar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: end; padding: 1rem 1.25rem; border-bottom: 1px solid var(--c-border); }
.filter-bar .form-control, .filter-bar .form-select { min-height: 40px; font-size: .88rem; }
.filter-bar .search-box { position: relative; flex: 1 1 240px; min-width: 200px; }
.filter-bar .search-box i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--c-muted); }
.filter-bar .search-box input { padding-left: 2.4rem; }
.filter-bar .filter-item { flex: 0 1 170px; min-width: 130px; }
.filter-bar label { font-size: .7rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--c-muted); margin-bottom: .2rem; }
.grid-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .9rem 1.25rem; border-top: 1px solid var(--c-border); font-size: .85rem; color: var(--c-muted); }

.empty-state { text-align: center; padding: 3rem 1.5rem; color: var(--c-muted); }
.empty-state i { font-size: 2.6rem; color: color-mix(in srgb, var(--c-primary) 55%, var(--c-border)); display: block; margin-bottom: .6rem; }
.empty-state h5 { color: var(--c-text); font-size: 1.05rem; margin-bottom: .25rem; }

/* key/value lists */
.kv { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: .55rem 1rem; margin: 0; }
.kv dt { color: var(--c-muted); font-weight: 500; font-size: .85rem; }
.kv dd { margin: 0; font-weight: 550; overflow-wrap: anywhere; }

/* timeline / steps */
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.1rem; border-left: 2px solid var(--c-border); }
.timeline li { position: relative; padding: 0 0 1.1rem 1rem; }
.timeline li::before { content: ''; position: absolute; left: -1.62rem; top: .3rem; width: 12px; height: 12px; border-radius: 50%; background: var(--c-primary); border: 3px solid var(--c-surface); box-shadow: 0 0 0 2px var(--c-primary); }
.timeline li small { color: var(--c-muted); }
.stage-track { display: flex; gap: .4rem; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.stage-track li { display: flex; align-items: center; gap: .45rem; font-size: .8rem; font-weight: 600; padding: .4rem .8rem; border-radius: 99px; background: var(--c-surface-2); color: var(--c-muted); border: 1px solid var(--c-border); }
.stage-track li.done { background: var(--c-success-soft); color: var(--c-success); border-color: transparent; }
.stage-track li.current { background: var(--c-primary-soft); color: var(--c-primary); border-color: var(--c-primary); }
.stage-track li.bad { background: var(--c-danger-soft); color: var(--c-danger); border-color: transparent; }

/* ===================================================================================== forms: password + dropzone */
.password-wrap { position: relative; }
.password-wrap .form-control { padding-right: 3rem; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: transparent; color: var(--c-muted); border-radius: 8px; display: grid; place-items: center; font-size: 1.1rem; }
.pw-toggle:hover { color: var(--c-primary); background: var(--c-primary-soft); }
.pw-meter { height: 5px; background: var(--c-secondary-soft); border-radius: 99px; margin-top: .45rem; overflow: hidden; }
.pw-meter span { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--c-danger); transition: width .25s, background .25s; }

.dropzone { position: relative; border: 2px dashed color-mix(in srgb, var(--c-primary) 40%, var(--c-border)); border-radius: var(--radius); background: var(--c-surface-2); transition: all .18s; cursor: pointer; }
.dropzone:hover, .dropzone.dragover { border-color: var(--c-primary); background: var(--c-primary-soft); }
.dropzone.has-file { border-style: solid; border-color: var(--c-primary); background: var(--c-primary-soft); }
.dropzone.invalid { border-color: var(--c-danger); background: var(--c-danger-soft); }
.dropzone-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 2; }
.dropzone-body { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; }
.dropzone-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--c-surface); color: var(--c-primary); display: grid; place-items: center; font-size: 1.6rem; box-shadow: var(--shadow-sm); flex: none; }
.dropzone-thumb { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; flex: none; border: 1px solid var(--c-border); }
.dropzone-text { font-size: .9rem; color: var(--c-muted); line-height: 1.35; }
.dropzone-text strong { color: var(--c-primary); }
.dropzone-text small { display: block; font-size: .76rem; margin-top: .1rem; }
.dropzone-file { display: flex; align-items: center; gap: .6rem; padding: .85rem 1.25rem; position: relative; z-index: 3; color: var(--c-primary); font-weight: 550; }
.dropzone-file.d-none { display: none !important; }
.dropzone-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--c-text); }
.dropzone-clear { border: 0; background: var(--c-surface); color: var(--c-danger); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.dropzone.has-file .dropzone-body { display: none; }
.dropzone-preview { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }

.theme-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; }
.theme-choice { position: relative; border: 2px solid var(--c-border); border-radius: var(--radius); padding: .8rem; cursor: pointer; display: block; background: var(--c-surface); }
.theme-choice input { position: absolute; opacity: 0; }
.theme-choice:has(input:checked) { border-color: var(--c-primary); background: var(--c-primary-soft); }
.theme-swatch { display: flex; height: 38px; border-radius: 9px; overflow: hidden; margin-bottom: .55rem; }
.theme-swatch i { flex: 1; }
.theme-swatch i:first-child { background: var(--sw1); flex: 2; }
.theme-swatch i:last-child { background: var(--sw2); }
.theme-name { font-weight: 600; font-size: .88rem; }

/* amount quick figures in forms */
.calc-box { background: var(--c-primary-soft); border-radius: var(--radius); padding: 1rem 1.2rem; }
.calc-box .big { font-size: 1.7rem; font-weight: 700; color: var(--c-primary); font-variant-numeric: tabular-nums; }
.calc-line { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; font-size: .9rem; }
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { display: flex; gap: .6rem; align-items: flex-start; padding: .5rem 0; border-bottom: 1px dashed var(--c-border); }
.check-list li:last-child { border-bottom: 0; }
.check-list .ok { color: var(--c-success); }
.check-list .bad { color: var(--c-danger); }
.check-list .warn { color: var(--c-warning); }

/* commodity shop */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.product-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.product-photo { aspect-ratio: 4 / 3; background: var(--c-primary-soft); display: grid; place-items: center; color: var(--c-primary); font-size: 2.6rem; overflow: hidden; position: relative; }
.product-photo img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: .95rem 1rem 1.05rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.product-name { font-weight: 650; line-height: 1.25; }
.product-price { font-size: 1.15rem; font-weight: 700; color: var(--c-primary); font-variant-numeric: tabular-nums; }
.product-body .btn { margin-top: auto; }
.cart-fab { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1030; }

/* loan application wizard */
.wizard-dots { display: flex; list-style: none; padding: 0; margin: 0 0 1.25rem; gap: .5rem; }
.wizard-dots li { flex: 1; text-align: center; font-size: .78rem; font-weight: 600; color: var(--c-muted); position: relative; padding-top: 2.1rem; }
.wizard-dots li::before { content: attr(data-n); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 30px; height: 30px; border-radius: 50%; background: var(--c-surface); border: 2px solid var(--c-border); display: grid; place-items: center; font-size: .85rem; z-index: 1; }
.wizard-dots li::after { content: ''; position: absolute; top: 14px; left: -50%; width: 100%; height: 2px; background: var(--c-border); }
.wizard-dots li:first-child::after { display: none; }
.wizard-dots li.done::before { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-on-primary); content: '✓'; }
.wizard-dots li.done::after, .wizard-dots li.active::after { background: var(--c-primary); }
.wizard-dots li.active { color: var(--c-text); } .wizard-dots li.active::before { border-color: var(--c-primary); color: var(--c-primary); }
.product-option { display: block; cursor: pointer; border: 2px solid var(--c-border); border-radius: var(--radius); padding: 1.1rem 1.2rem; background: var(--c-surface); transition: all .15s; position: relative; height: 100%; }
.product-option:hover { border-color: color-mix(in srgb, var(--c-primary) 55%, var(--c-border)); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.product-option input { position: absolute; opacity: 0; }
.product-option.selected { border-color: var(--c-primary); background: var(--c-primary-soft); }
.product-option.selected::after { content: '\F26A'; font-family: 'bootstrap-icons'; position: absolute; top: .8rem; right: .9rem; color: var(--c-primary); font-size: 1.3rem; }
.product-option h5 { font-size: 1.02rem; margin: 0 0 .15rem; }
.product-option dl { margin: .6rem 0 0; display: grid; grid-template-columns: auto 1fr; gap: .15rem .7rem; font-size: .82rem; }
.product-option dt { color: var(--c-muted); font-weight: 500; } .product-option dd { margin: 0; font-weight: 600; text-align: right; }
.zero-badge { display: inline-flex; align-items: center; gap: .35rem; background: var(--c-success-soft); color: var(--c-success); font-weight: 700; font-size: .75rem; padding: .25rem .65rem; border-radius: 99px; }

/* settings navigation */
.settings-nav .list-group-item { border: 0; border-left: 3px solid transparent; padding: .8rem 1rem; color: var(--c-text); background: transparent; }
.settings-nav .list-group-item i { color: var(--c-muted); width: 1.2rem; }
.settings-nav .list-group-item:hover { background: var(--c-surface-2); }
.settings-nav .active-setting { border-left-color: var(--c-primary); background: var(--c-primary-soft); color: var(--c-primary); font-weight: 600; }
.settings-nav .active-setting i { color: var(--c-primary); }

/* member picker */
.picker-results { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); margin-top: 4px; max-height: 280px; overflow-y: auto; display: none; }
.picker-results.show { display: block; }
.picker-item { display: flex; flex-direction: column; width: 100%; text-align: left; border: 0; background: transparent; padding: .6rem .85rem; color: var(--c-text); border-bottom: 1px solid var(--c-border); min-height: 44px; }
.picker-item:last-child { border-bottom: 0; }
.picker-item:hover, .picker-item:focus { background: var(--c-primary-soft); }
.picker-item small, .picker-empty { color: var(--c-muted); font-size: .78rem; }
.picker-empty { padding: .8rem; }
.picker-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .4rem; }
.picker-chip { display: inline-flex; align-items: center; gap: .55rem; background: var(--c-primary-soft); color: var(--c-text); border-radius: 99px; padding: .3rem .4rem .3rem .35rem; }
.picker-chip .chip-text { display: flex; flex-direction: column; line-height: 1.15; }
.picker-chip small { color: var(--c-muted); font-size: .7rem; }
.picker-chip button { border: 0; background: var(--c-surface); color: var(--c-danger); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; }

/* signature pad */
.sig-pad { border: 2px dashed var(--c-border); border-radius: var(--radius-sm); background: #fff; touch-action: none; width: 100%; height: 160px; display: block; cursor: crosshair; }

/* membership card (print) */
.id-card { width: 86mm; height: 54mm; border-radius: 12px; background: var(--gradient); color: #fff; padding: 12px 14px; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; box-shadow: var(--shadow-md); }
.id-card .id-head { display: flex; align-items: center; gap: 8px; font-size: 9px; font-weight: 700; line-height: 1.2; text-transform: uppercase; letter-spacing: .03em; }
.id-card .id-head .brand-mark { width: 26px; height: 26px; border-radius: 7px; font-size: .9rem; }
.id-card .id-body { display: flex; gap: 10px; align-items: center; }
.id-card .id-photo { width: 62px; height: 74px; border-radius: 8px; background: rgba(255, 255, 255, .2); object-fit: cover; border: 2px solid rgba(255, 255, 255, .8); flex: none; }
.id-card .id-name { font-size: 12px; font-weight: 700; line-height: 1.2; }
.id-card .id-meta { font-size: 9px; opacity: .9; line-height: 1.5; }
.id-card .id-qr { background: #fff; padding: 3px; border-radius: 6px; margin-left: auto; flex: none; }
.id-card .id-qr svg, .id-card .id-qr img { width: 62px; height: 62px; display: block; }
.id-card .id-foot { font-size: 8px; opacity: .85; display: flex; justify-content: space-between; }

/* ===================================================================================== auth (guest) */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--c-bg); }
.auth-brand { background: var(--gradient); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-brand::before, .auth-brand::after { content: ''; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .06); }
.auth-brand::before { width: 420px; height: 420px; right: -160px; top: -120px; }
.auth-brand::after { width: 300px; height: 300px; left: -120px; bottom: -100px; }
.auth-brand > * { position: relative; z-index: 1; }
.auth-brand .brand-mark { width: 56px; height: 56px; font-size: 1.8rem; border-radius: 16px; }
.auth-brand h1 { color: #fff; font-size: 2rem; line-height: 1.2; margin: 1.5rem 0 .5rem; }
.auth-brand p { color: rgba(255, 255, 255, .8); max-width: 34rem; }
.auth-points { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: .9rem; }
.auth-points li { display: flex; gap: .8rem; align-items: flex-start; color: rgba(255, 255, 255, .92); }
.auth-points i { width: 36px; height: 36px; border-radius: 10px; background: rgba(255, 255, 255, .14); display: grid; place-items: center; flex: none; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; position: relative; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card.wide { max-width: 760px; }
.auth-card h2 { font-size: 1.6rem; margin-bottom: .25rem; }
.auth-tools { position: absolute; top: 1rem; right: 1rem; display: flex; gap: .5rem; }
.auth-mobile-brand { display: none; }

/* installer */
.install-body { background: var(--c-bg); }
.install-shell { max-width: 780px; margin: 0 auto; padding: 2rem 1rem 3rem; }
.install-brand { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.install-brand h1 { font-size: 1.35rem; margin: 0; }
.install-brand p { margin: 0; color: var(--c-muted); font-size: .86rem; }
.install-brand .brand-mark { width: 52px; height: 52px; font-size: 1.6rem; background: var(--c-primary); color: var(--c-on-primary); }
.install-steps { display: flex; justify-content: space-between; list-style: none; padding: 0; margin: 0 0 1.25rem; counter-reset: s; gap: .25rem; }
.install-steps li { flex: 1; text-align: center; color: var(--c-muted); font-size: .76rem; font-weight: 600; position: relative; }
.install-steps li span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto .35rem; background: var(--c-surface); border: 2px solid var(--c-border); position: relative; z-index: 1; }
.install-steps li::before { content: ''; position: absolute; top: 16px; left: -50%; width: 100%; height: 2px; background: var(--c-border); }
.install-steps li:first-child::before { display: none; }
.install-steps li.done span { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-on-primary); }
.install-steps li.done::before, .install-steps li.active::before { background: var(--c-primary); }
.install-steps li.active span { border-color: var(--c-primary); color: var(--c-primary); }
.install-steps li.active, .install-steps li.done { color: var(--c-text); }
.install-card { box-shadow: var(--shadow-md); }
.req-list { list-style: none; padding: 0; margin: 0; }
.req-list li { display: flex; align-items: center; gap: .7rem; padding: .6rem 0; border-bottom: 1px solid var(--c-border); flex-wrap: wrap; }
.req-list li:last-child { border-bottom: 0; }
.req-list .req-label { font-weight: 550; }
.req-list .req-note { margin-left: auto; color: var(--c-muted); font-size: .82rem; }
.req-list .ok i { color: var(--c-success); } .req-list .fail i { color: var(--c-danger); } .req-list .warn i { color: var(--c-warning); }
.install-summary { display: grid; grid-template-columns: 130px 1fr; gap: .4rem 1rem; background: var(--c-surface-2); padding: 1rem 1.2rem; border-radius: var(--radius-sm); margin-bottom: 1.25rem; }
.install-summary dt { color: var(--c-muted); font-weight: 500; } .install-summary dd { margin: 0; font-weight: 550; }
.install-done { width: 76px; height: 76px; border-radius: 50%; background: var(--c-success-soft); color: var(--c-success); display: inline-grid; place-items: center; font-size: 2.4rem; }
.install-done.info { background: var(--c-info-soft); color: var(--c-info); }

/* ===================================================================================== mobile bottom nav (members) */
.bottom-nav { display: none; position: fixed; left: 0; right: 0; bottom: 0; height: var(--bottom-nav-h); background: var(--c-surface); border-top: 1px solid var(--c-border); z-index: 1030; box-shadow: 0 -6px 20px rgba(0, 0, 0, .07); padding-bottom: env(safe-area-inset-bottom); }
.bottom-nav a, .bottom-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--c-muted); font-size: .68rem; font-weight: 600; border: 0; background: transparent; min-height: 44px; }
.bottom-nav i { font-size: 1.35rem; line-height: 1; }
.bottom-nav .active { color: var(--c-primary); }
.bottom-nav .active i { transform: translateY(-1px); }

.install-banner { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 1060; max-width: 460px; margin: 0 auto; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: .9rem 1rem; display: none; gap: .8rem; align-items: center; }
.install-banner.show { display: flex; }

.toast-stack { position: fixed; top: 1rem; right: 1rem; z-index: 2000; display: flex; flex-direction: column; gap: .6rem; width: min(380px, calc(100vw - 2rem)); }
.toast-item { background: var(--c-surface); color: var(--c-text); border-radius: 12px; border: 1px solid var(--c-border); box-shadow: var(--shadow-md); padding: .85rem 1rem; display: flex; gap: .75rem; align-items: flex-start; border-left: 4px solid var(--c-primary); animation: toast-in .28s ease; }
.toast-item.success { border-left-color: var(--c-success); } .toast-item.danger { border-left-color: var(--c-danger); }
.toast-item.warning { border-left-color: var(--c-warning); } .toast-item.info { border-left-color: var(--c-info); }
.toast-item > i { font-size: 1.2rem; margin-top: .05rem; }
.toast-item.success > i { color: var(--c-success); } .toast-item.danger > i { color: var(--c-danger); } .toast-item.warning > i { color: var(--c-warning); } .toast-item.info > i { color: var(--c-info); }
.toast-item .btn-close { margin-left: auto; font-size: .7rem; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.btn-loading { pointer-events: none; opacity: .85; }
.spinner-inline { width: 1em; height: 1em; border: .15em solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.page-loader { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--c-accent); z-index: 3000; transition: width .4s ease, opacity .3s; }

/* ===================================================================================== responsive */
@media (max-width: 1199.98px) {
    .content { padding: 1.25rem; }
}
@media (max-width: 1023.98px) {
    .sidebar { transform: translateX(-100%); box-shadow: none; }
    body.sidebar-open .sidebar { transform: none; box-shadow: var(--shadow-md); }
    body.sidebar-open .sidebar-backdrop { opacity: 1; visibility: visible; }
    body.sidebar-open { overflow: hidden; }
    .main { margin-left: 0; }
    .menu-toggle { display: inline-grid; }
    .topbar { padding: 0 1rem; }
    .clock { display: none; }
}
@media (max-width: 767.98px) {
    body { font-size: .92rem; }
    .content { padding: 1rem .9rem; }
    .topbar-title { font-size: 1rem; }
    .page-head h2 { font-size: 1.2rem; }
    .page-actions { width: 100%; }
    .page-actions .btn { flex: 1; }
    .stat-grid { grid-template-columns: 1fr 1fr; gap: .7rem; }
    .stat-card { padding: .8rem .85rem; }
    .stat-value { font-size: 1.02rem; }
    .stat-card > .stat-icon { width: 34px; height: 34px; font-size: 1rem; top: .65rem; right: .65rem; }
    .stat-card .stat-label { padding-right: 2.4rem; font-size: .7rem; }
    .wallet-grid { grid-template-columns: 1fr 1fr; gap: .7rem; }
    .wallet-card { padding: 1rem; } .wallet-card .value { font-size: 1.2rem; }
    .kv { grid-template-columns: 1fr; gap: .1rem; } .kv dd { margin-bottom: .6rem; }
    .filter-bar { padding: .9rem; } .filter-bar .filter-item { flex: 1 1 45%; }
    .bottom-nav { display: flex; }
    body.has-bottom-nav .main { padding-bottom: calc(var(--bottom-nav-h) + 8px); }
    body.has-bottom-nav .toast-stack { top: 4.5rem; }
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
    .auth-mobile-brand { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.5rem; }
    .auth-mobile-brand .brand-mark { background: var(--c-primary); color: var(--c-on-primary); }
    .auth-panel { align-items: flex-start; padding-top: 4.5rem; }
    .install-steps li em { display: none; }
    .req-list .req-note { margin-left: 0; width: 100%; padding-left: 1.7rem; }
    .card-body { padding: 1rem; }
    .btn-stack-sm { width: 100%; }
    /* tables become stacked cards when marked .table-stack */
    .table-stack thead { display: none; }
    .table-stack tr { display: block; border-bottom: 1px solid var(--c-border); padding: .6rem .25rem; }
    .table-stack td { display: flex; justify-content: space-between; gap: 1rem; border: 0 !important; padding: .28rem .75rem !important; text-align: right; white-space: normal !important; }
    .table-stack td::before { content: attr(data-label); color: var(--c-muted); font-weight: 600; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; text-align: left; flex: none; }
    .table-stack td.row-actions-cell { justify-content: flex-end; }
    .table-stack td.row-actions-cell::before { display: none; }
}
@media (min-width: 768px) and (max-width: 1023.98px) {
    .content { padding: 1.1rem; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===================================================================================== print */
@media print {
    .sidebar, .topbar, .bottom-nav, .app-footer, .page-actions, .filter-bar, .grid-foot .pagination, .no-print, .toast-stack,
    .sidebar-backdrop, .install-banner, .cart-fab, .btn, .row-actions { display: none !important; }
    body { background: #fff !important; color: #000 !important; }
    .main { margin: 0 !important; padding: 0 !important; }
    .content { padding: 0 !important; max-width: none; }
    .card { box-shadow: none !important; border: 1px solid #ccc !important; break-inside: avoid; }
    .table-modern > thead th { background: #f0f0f0 !important; color: #000 !important; }
    .wallet-card, .id-card { -webkit-print-color-adjust: exact; print-color-adjust: exact; box-shadow: none; }
    a { color: #000 !important; text-decoration: none; }
    .table-wrap { overflow: visible !important; }
}
.print-only { display: none; }
@media print { .print-only { display: block; } }
.print-sheet { background: #fff; color: #000; max-width: 820px; margin: 0 auto; padding: 2rem; }
.print-header { display: flex; align-items: center; gap: 1rem; border-bottom: 3px solid var(--c-primary); padding-bottom: .9rem; margin-bottom: 1.2rem; }
.print-header img { height: 64px; width: 64px; object-fit: contain; }
.print-header h1 { font-size: 1.15rem; margin: 0; color: #000; }
.print-header p { margin: 0; color: #444; font-size: .82rem; }
