/* SMP — Modern Design System */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,500&display=swap');

:root {
    --font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-xs: 0.8125rem;
    --font-sm: 0.875rem;
    --font-base: 0.9375rem;
    --font-md: 1rem;
    --font-lg: 1.125rem;
    --font-xl: 1.3125rem;
    --font-2xl: 1.5rem;
    --leading-tight: 1.25;
    --leading-normal: 1.55;
    --leading-relaxed: 1.65;
    --navy: #0c1829;
    --navy-dark: #060e18;
    --navy-mid: #132337;
    --navy-hover: #1a3048;
    --navy-glow: rgba(56, 189, 248, .08);
    --amber: #f59e0b;
    --amber-dark: #d97706;
    --amber-light: #fef3c7;
    --amber-glow: rgba(245, 158, 11, .35);
    --accent: #38bdf8;
    --accent-soft: #e0f2fe;
    --sidebar-text: #8ba3b8;
    --sidebar-border: rgba(255, 255, 255, .06);
    --bg: #f1f5f9;
    --bg-mesh: radial-gradient(ellipse 80% 60% at 10% 0%, rgba(56, 189, 248, .07) 0%, transparent 55%),
               radial-gradient(ellipse 60% 50% at 90% 10%, rgba(245, 158, 11, .06) 0%, transparent 50%),
               var(--bg);
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --text: #0f172a;
    --text-muted: #64748b;
    --text-soft: #94a3b8;
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, .04);
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, .06);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, .08);
    --shadow-lg: 0 16px 48px rgba(15, 23, 42, .12);
    --shadow-glow: 0 8px 32px var(--amber-glow);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 22px;
    --transition: .22s cubic-bezier(.4, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--font-family);
    font-size: var(--font-base);
    line-height: var(--leading-normal);
    font-weight: 500;
    background: var(--bg-mesh);
    color: var(--text);
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Global typography */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-family);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: var(--leading-tight);
    color: var(--text);
}

h5, .h5 { font-size: var(--font-lg); }
h6, .h6 { font-size: var(--font-md); }

p, li, label, .form-label {
    font-family: var(--font-family);
    line-height: var(--leading-normal);
}

.form-label {
    font-size: var(--font-sm);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.4rem;
}

.form-control,
.form-select,
.form-check-label {
    font-family: var(--font-family);
    font-size: var(--font-base);
    font-weight: 500;
    line-height: var(--leading-normal);
}

.form-control::placeholder {
    color: var(--text-soft);
    font-weight: 500;
}

.form-text, small.text-muted, .text-muted {
    font-size: var(--font-sm);
}

.alert {
    font-size: var(--font-base);
    font-weight: 500;
    line-height: var(--leading-normal);
}

.badge {
    font-family: var(--font-family);
    font-weight: 700;
    font-size: var(--font-xs);
}

.pagination {
    font-family: var(--font-family);
    font-size: var(--font-sm);
    font-weight: 600;
}

/* ─── Sidebar ─── */
.smp-sidebar {
    width: 260px;
    height: 100vh;
    max-height: 100vh;
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 300;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--sidebar-border);
    box-shadow: 4px 0 24px rgba(0, 0, 0, .18);
    transition: transform .3s ease;
    overflow: hidden;
}

.sidebar-brand {
    padding: 1.25rem 1.35rem;
    border-bottom: 1px solid var(--sidebar-border);
    display: flex;
    align-items: center;
    gap: .85rem;
    flex-shrink: 0;
    background: rgba(255, 255, 255, .02);
}

.sidebar-brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--amber) 0%, #fbbf24 50%, #f59e0b 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.05rem;
    flex-shrink: 0;
    box-shadow: 0 4px 14px var(--amber-glow);
}

.sidebar-brand-name {
    font-weight: 800;
    color: #fff;
    font-size: var(--font-md);
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.sidebar-brand-sub {
    font-size: var(--font-xs);
    color: var(--sidebar-text);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.sidebar-nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: .65rem .85rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.15) transparent;
}

.sidebar-nav::-webkit-scrollbar { width: 5px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 4px; }

.sidebar-search {
    flex-shrink: 0;
    padding: .65rem .85rem .5rem;
    border-bottom: 1px solid var(--sidebar-border);
    background: rgba(0, 0, 0, .12);
}

.sidebar-search-input {
    width: 100%;
    padding: 0.55rem 0.75rem 0.55rem 2.15rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
    font-family: var(--font-family);
    font-size: var(--font-sm);
    font-weight: 500;
    outline: none;
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.sidebar-search-input::placeholder { color: rgba(139, 163, 184, .7); }

.sidebar-search-input:focus {
    border-color: rgba(56, 189, 248, .45);
    background: rgba(255, 255, 255, .09);
}

.sidebar-search-wrap {
    position: relative;
}

.sidebar-search-wrap i {
    position: absolute;
    left: .7rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(139, 163, 184, .65);
    font-size: .75rem;
    pointer-events: none;
}

.sidebar-link.nav-hidden,
.nav-section.nav-hidden,
.sidebar-link[hidden],
.nav-section[hidden] {
    display: none !important;
}

.sidebar-nav-empty {
    padding: 1rem 0.75rem;
    font-size: var(--font-sm);
    color: rgba(139, 163, 184, 0.85);
    text-align: center;
    font-weight: 500;
    line-height: var(--leading-normal);
}

.sidebar-nav-empty[hidden] {
    display: none !important;
}

.col-sno {
    width: 52px;
    min-width: 52px;
    text-align: center;
    color: var(--text-muted);
    font-size: .82rem;
    font-weight: 600;
}

.table thead th.col-sno {
    text-align: center;
    font-size: .72rem;
    letter-spacing: .03em;
}

.nav-section {
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(139, 163, 184, 0.6);
    padding: 1rem 0.65rem 0.35rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.62rem 0.85rem;
    margin-bottom: 3px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-family: var(--font-family);
    font-size: var(--font-sm);
    font-weight: 600;
    line-height: 1.35;
    border-radius: var(--radius-sm);
    border-left: none;
    position: relative;
    transition: all var(--transition);
}

.sidebar-link i {
    font-size: .9rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: rgba(255, 255, 255, .04);
    flex-shrink: 0;
    transition: all var(--transition);
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, .06);
    color: #e2e8f0;
    transform: translateX(2px);
}

.sidebar-link:hover i {
    background: rgba(245, 158, 11, .15);
    color: var(--amber);
}

.sidebar-link.active {
    background: linear-gradient(135deg, rgba(245,158,11,.18) 0%, rgba(245,158,11,.08) 100%);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, .2);
}

.sidebar-link.active i {
    background: linear-gradient(135deg, var(--amber), #fbbf24);
    color: #fff;
    box-shadow: 0 3px 10px var(--amber-glow);
}

.sidebar-badge {
    margin-left: auto;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    font-size: .62rem;
    font-weight: 800;
    padding: .2rem .5rem;
    border-radius: 999px;
    min-width: 1.3rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(239, 68, 68, .4);
}

.sidebar-badge-pulse { animation: smpPulse 1.5s ease-in-out infinite; }

@keyframes smpPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .6); }
    50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--sidebar-border);
    flex-shrink: 0;
    background: rgba(0, 0, 0, .15);
}

.sidebar-user { display: flex; align-items: center; gap: .7rem; }

.user-av {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--amber), #fbbf24);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: .82rem;
    flex-shrink: 0;
    box-shadow: 0 3px 12px var(--amber-glow);
}

.user-name { font-size: .82rem; font-weight: 700; color: #fff; letter-spacing: -.01em; }
.user-role { font-size: .68rem; color: var(--sidebar-text); font-weight: 500; }

/* ─── Main layout ─── */
.smp-main {
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left .3s ease;
}

.smp-topbar {
    background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
    padding: .9rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: var(--shadow-xs);
}

.topbar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: .45rem .7rem;
    transition: all var(--transition);
    flex-shrink: 0;
    line-height: 1;
}

.topbar-toggle:hover {
    background: var(--border-light);
    color: var(--text);
    border-color: #cbd5e1;
}

.topbar-toggle.active {
    background: linear-gradient(135deg, rgba(245,158,11,.15), rgba(245,158,11,.08));
    border-color: rgba(245, 158, 11, .35);
    color: var(--amber-dark);
}

.topbar-title {
    font-size: var(--font-lg);
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.03em;
    line-height: var(--leading-tight);
}

.topbar-right { display: flex; align-items: center; gap: .6rem; }

.smp-content {
    padding: 1.75rem;
    flex: 1;
    animation: contentFade .4s ease;
}

@keyframes contentFade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── Page headers (used across views) ─── */
.smp-content > .d-flex h5,
.smp-content h5.fw-bold {
    font-size: var(--font-xl) !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em;
    line-height: var(--leading-tight);
    color: var(--text);
}

/* ─── Cards ─── */
.card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    background: var(--surface);
    margin-bottom: 1.35rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition);
    overflow: hidden;
}

.card:hover { box-shadow: var(--shadow-md); }

.card-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border-light);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    padding: 1rem 1.35rem;
    font-weight: 700;
    font-size: var(--font-base);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
    letter-spacing: -0.01em;
}

.card-body { padding: 1.35rem; }

/* ─── Stat cards ─── */
.stat-card {
    border-radius: var(--radius-lg);
    padding: 1.35rem;
    border: 1px solid var(--border-light);
    background: var(--surface);
    transition: all var(--transition);
    text-decoration: none;
    display: block;
    color: inherit;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--amber), var(--accent));
    opacity: 0;
    transition: opacity var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    color: inherit;
    border-color: rgba(245, 158, 11, .2);
}

.stat-card:hover::before { opacity: 1; }

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: transform var(--transition);
}

.stat-card:hover .stat-icon { transform: scale(1.08); }

.stat-icon--blue   { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #1d4ed8; }
.stat-icon--green  { background: linear-gradient(135deg, #d1fae5, #a7f3d0); color: #059669; }
.stat-icon--amber  { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #d97706; }
.stat-icon--pink   { background: linear-gradient(135deg, #fce7f3, #fbcfe8); color: #db2777; }
.stat-icon--purple { background: linear-gradient(135deg, #ede9fe, #ddd6fe); color: #7c3aed; }
.stat-icon--red    { background: linear-gradient(135deg, #fee2e2, #fecaca); color: #dc2626; }
.stat-icon--cyan   { background: linear-gradient(135deg, #cffafe, #a5f3fc); color: #0891b2; }

.stat-num {
    font-size: var(--font-2xl);
    font-weight: 800;
    color: var(--text);
    line-height: 1;
    margin: 0.6rem 0 0.2rem;
    letter-spacing: -0.04em;
}

.stat-label {
    font-size: var(--font-sm);
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* ─── Buttons ─── */
.btn {
    font-family: var(--font-family);
    font-weight: 700;
    font-size: var(--font-sm);
    letter-spacing: -0.01em;
    transition: all var(--transition);
    border-radius: var(--radius-sm) !important;
    line-height: 1.35;
}

.btn-amber {
    background: linear-gradient(135deg, var(--amber) 0%, #fbbf24 100%);
    color: #fff !important;
    border: none;
    font-weight: 700;
    box-shadow: 0 4px 14px var(--amber-glow);
}

.btn-amber:hover {
    background: linear-gradient(135deg, var(--amber-dark) 0%, var(--amber) 100%);
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--amber-glow);
}

.btn-navy {
    background: linear-gradient(135deg, var(--navy-mid) 0%, var(--navy) 100%);
    color: #fff !important;
    border: none;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(12, 24, 41, .25);
}

.btn-navy:hover {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
    color: #fff !important;
    transform: translateY(-1px);
}

.btn-dark {
    background: linear-gradient(135deg, #334155, #1e293b);
    border: none;
    box-shadow: var(--shadow-sm);
}

.btn-dark:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-outline-secondary {
    border: 1.5px solid var(--border);
    color: var(--text-muted);
    font-weight: 600;
    background: var(--surface);
}

.btn-outline-secondary:hover {
    background: var(--surface-2);
    border-color: #cbd5e1;
    color: var(--text);
}

.btn-light {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-weight: 600;
}

.btn-light:hover { background: var(--border-light); color: var(--text); }

.btn-sm { padding: 0.42rem 0.85rem; font-size: var(--font-sm); }

/* ─── Tables ─── */
.table {
    --bs-table-bg: transparent;
    margin-bottom: 0;
    font-size: var(--font-base);
}

.table th {
    font-family: var(--font-family);
    font-size: var(--font-xs);
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    padding: 0.9rem 1rem;
    white-space: nowrap;
}

.table td {
    font-family: var(--font-family);
    font-size: var(--font-base);
    font-weight: 500;
    line-height: var(--leading-normal);
    vertical-align: middle;
    padding: 0.9rem 1rem;
    border-color: var(--border-light);
    color: var(--text);
}

.table-hover tbody tr {
    transition: background var(--transition);
}

.table-hover tbody tr:hover { background: rgba(56, 189, 248, .04); }

.table-responsive {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.table-bordered { border-color: var(--border-light); }

/* ─── Badges ─── */
.badge-active, .badge-paid, .badge-approved {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border-radius: 999px;
    padding: .3rem .75rem;
    font-size: .72rem;
    font-weight: 700;
    display: inline-block;
    border: 1px solid rgba(5, 150, 105, .15);
}

.badge-inactive, .badge-expired, .badge-rejected {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
    border-radius: 999px;
    padding: .3rem .75rem;
    font-size: .72rem;
    font-weight: 700;
    display: inline-block;
    border: 1px solid rgba(220, 38, 38, .12);
}

.badge-suspended, .badge-pending {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    border-radius: 999px;
    padding: .3rem .75rem;
    font-size: .72rem;
    font-weight: 700;
    display: inline-block;
    border: 1px solid rgba(217, 119, 6, .15);
}

/* ─── Forms ─── */
.form-control, .form-select {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .875rem;
    padding: .6rem .9rem;
    background: var(--surface);
    transition: all var(--transition);
    font-weight: 500;
}

.form-control:hover, .form-select:hover { border-color: #cbd5e1; }

.form-control:focus, .form-select:focus {
    border-color: var(--amber);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, .12);
    background: var(--surface);
}

.form-label {
    font-size: .78rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: .35rem;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.form-text { color: var(--text-soft); font-size: .78rem; }

/* ─── Alerts ─── */
.alert {
    border-radius: var(--radius-md);
    padding: .9rem 1.15rem;
    font-size: .875rem;
    font-weight: 500;
    border: none;
    box-shadow: var(--shadow-xs);
}

.alert-success {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border-left: 4px solid #10b981;
    color: #065f46;
}

.alert-danger {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.alert-warning {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border-left: 4px solid var(--amber);
    color: #92400e;
}

.alert-info {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-left: 4px solid #3b82f6;
    color: #1e40af;
}

.alert-link { font-weight: 700; }

/* ─── Pagination ─── */
.pagination .page-link {
    border-radius: 8px !important;
    margin: 0 2px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-weight: 600;
    font-size: .82rem;
    padding: .35rem .7rem;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--amber), #fbbf24);
    border-color: var(--amber);
    color: #fff;
    box-shadow: 0 2px 8px var(--amber-glow);
}

.pagination .page-link:hover { background: var(--surface-2); color: var(--text); }

/* ─── Misc ─── */
.expiry-ok      { color: #059669; font-weight: 700; }
.expiry-warning { color: #d97706; font-weight: 700; }
.expiry-danger  { color: #dc2626; font-weight: 700; }

.text-muted { color: var(--text-muted) !important; }

.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }

/* Transaction page extras */
.summary-card { transition: all var(--transition); border-radius: var(--radius-lg); overflow: hidden; }
.summary-card .card-body { padding: 1.1rem; }
.summary-total-paid { background: linear-gradient(135deg, #059669 0%, #047857 100%); color: #fff; border: none; }
.summary-total-pending { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); color: #fff; border: none; }
.range-badge { background: var(--surface-2); padding: .4rem .9rem; border-radius: 999px; font-size: .82rem; color: var(--text-muted); font-weight: 600; border: 1px solid var(--border); }
.btn-date-nav { padding: .35rem .85rem; font-size: .82rem; font-weight: 600; border-radius: var(--radius-sm); }

@media print {
    body * { visibility: hidden; }
    #printArea, #printArea * { visibility: visible; }
    #printArea { position: absolute; left: 0; top: 0; width: 100%; }
    .no-print { display: none !important; }
}

/* ─── Bottom nav (mobile) ─── */
.smp-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(12, 24, 41, .95);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--sidebar-border);
    z-index: 400;
    padding: .4rem 0 .5rem;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, .2);
}

.bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--sidebar-text);
    text-decoration: none;
    font-family: var(--font-family);
    font-size: var(--font-xs);
    font-weight: 700;
    padding: 0.35rem 0.5rem;
    flex: 1;
    transition: color var(--transition);
    letter-spacing: .02em;
}

.bottom-nav-link i { font-size: 1.15rem; margin-bottom: 3px; }
.bottom-nav-link.active, .bottom-nav-link:hover { color: var(--amber); }

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(4px);
    z-index: 250;
}

.sidebar-overlay.show { display: block; }

/* ─── Auth pages ─── */
body.auth-page {
    min-height: 100vh;
    background: var(--navy-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

body.auth-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 60% at 20% 20%, rgba(56, 189, 248, .15) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 80% 80%, rgba(245, 158, 11, .12) 0%, transparent 50%),
        linear-gradient(160deg, var(--navy-dark) 0%, var(--navy) 40%, #1a3a5c 100%);
    animation: authMesh 12s ease-in-out infinite alternate;
}

body.auth-page::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245,158,11,.08) 0%, transparent 70%);
    top: -150px;
    right: -100px;
    animation: authFloat 8s ease-in-out infinite;
}

@keyframes authMesh {
    0% { opacity: 1; }
    100% { opacity: .85; }
}

@keyframes authFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-30px, 20px); }
}

.login-card {
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: 2.75rem 2.25rem;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,.1);
    position: relative;
    z-index: 1;
    animation: loginEnter .5s ease;
}

@keyframes loginEnter {
    from { opacity: 0; transform: translateY(20px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--amber), #fbbf24);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.7rem;
    margin: 0 auto 1.35rem;
    box-shadow: 0 8px 24px var(--amber-glow);
}

.login-title {
    font-size: var(--font-2xl);
    font-weight: 800;
    color: var(--text);
    text-align: center;
    margin-bottom: 0.35rem;
    letter-spacing: -0.04em;
    line-height: var(--leading-tight);
}

.login-sub {
    font-size: var(--font-base);
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 500;
    line-height: var(--leading-normal);
}

.auth-page .btn-amber {
    width: 100%;
    padding: .85rem;
    font-size: .95rem;
    border-radius: 12px !important;
    margin-top: .25rem;
}

.input-icon { position: relative; }

.input-icon i {
    position: absolute;
    left: .95rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-soft);
    font-size: .9rem;
    z-index: 2;
}

.input-icon .form-control { padding-left: 2.65rem; }

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: .8rem;
    color: var(--text-soft);
    font-weight: 500;
}

.auth-footer a {
    color: var(--amber-dark);
    font-weight: 700;
    text-decoration: none;
}

.auth-footer a:hover { color: var(--amber); }

/* ─── Responsive ─── */
@media (min-width: 992px) {
    body.sidebar-collapsed .smp-sidebar {
        transform: translateX(-100%);
    }

    body.sidebar-collapsed .smp-main {
        margin-left: 0;
    }
}

@media (max-width: 991px) {
    .smp-sidebar { transform: translateX(-100%); }
    .smp-sidebar.open { transform: translateX(0); }
    .smp-main { margin-left: 0; }
    .smp-bottom-nav { display: flex; }
    .smp-content { padding: 1.15rem; padding-bottom: 5rem; }
}

@media (max-width: 575px) {
    .stat-num { font-size: 1.5rem; }
    .smp-topbar { padding: .75rem 1rem; }
}

/* ─── Secure delete wizard ─── */
.secure-delete-steps {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.secure-delete-step-indicator {
    flex: 1;
    min-width: 4.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.6rem;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    border: 1px solid var(--border);
    font-size: var(--font-xs);
    font-weight: 700;
    color: var(--text-muted);
    transition: all var(--transition);
}

.secure-delete-step-indicator.active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(245, 158, 11, 0.06));
    border-color: rgba(245, 158, 11, 0.45);
    color: var(--amber-dark);
}

.secure-delete-step-indicator.done {
    background: rgba(5, 150, 105, 0.08);
    border-color: rgba(5, 150, 105, 0.35);
    color: #059669;
}

.secure-delete-step-num {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.secure-delete-step-indicator.active .secure-delete-step-num {
    background: var(--amber);
    color: #fff;
}

.secure-delete-step-indicator.done .secure-delete-step-num {
    background: #059669;
    color: #fff;
}

.secure-delete-step-label {
    line-height: 1.2;
}

.secure-delete-panel h6 {
    font-size: var(--font-base);
}
