@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ─────────────────────────────────────────────────────────────
   DARK THEME (default)
───────────────────────────────────────────────────────────── */
:root, [data-theme="dark"] {
    --bg-page: #0e1c34;
    --bg-sidebar: rgba(7, 14, 28, 0.98);
    --bg-topbar: rgba(9, 18, 38, 0.92);
    --bg-surface: rgba(14, 34, 65, 0.7);
    --bg-surface2: rgba(10, 24, 50, 0.6);
    --bg-input: rgba(10, 22, 46, 0.8);
    --bg-input-focus: rgba(16, 38, 80, 0.9);
    --bg-hover: rgba(42, 91, 201, 0.12);
    --bg-active-nav: linear-gradient(135deg, rgba(42, 91, 201, 0.3), rgba(61, 122, 238, 0.18));
    --bg-modal: #0d1f42;
    --bg-overlay: rgba(0, 0, 0, 0.6);

    --cobalt: #2a5bc9;
    --sky: #3d7aee;
    --ice: #5f96f8;
    --pale: #c2d8ff;
    --accent: #1ac9e6;

    --text-primary: #eef5ff;
    --text-secondary: rgba(178, 208, 255, 0.82);
    --text-muted: rgba(160, 196, 255, 0.5);

    --border: rgba(61, 122, 238, 0.18);
    --border-focus: rgba(95, 150, 248, 0.55);

    --success: #4ade80;
    --warning: #fbbf24;
    --danger: #f87171;
    --gold: #e8c46a;
    --purple: #a78bfa;

    --sidebar-w: 256px;
    --topbar-h: 62px;

    --bg-gradient: radial-gradient(ellipse at 15% 10%, rgba(42, 91, 201, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 90%, rgba(14, 30, 68, 0.35) 0%, transparent 55%),
    linear-gradient(160deg, #0a1628 0%, #0e1c34 55%, #091422 100%);
}

/* ─────────────────────────────────────────────────────────────
   LIGHT THEME
───────────────────────────────────────────────────────────── */
[data-theme="light"] {
    --bg-page: #f0f5ff;
    --bg-sidebar: rgba(255, 255, 255, 0.98);
    --bg-topbar: rgba(255, 255, 255, 0.94);
    --bg-surface: rgba(255, 255, 255, 0.9);
    --bg-surface2: rgba(235, 243, 255, 0.75);
    --bg-input: rgba(240, 246, 255, 0.95);
    --bg-input-focus: #ffffff;
    --bg-hover: rgba(42, 91, 201, 0.07);
    --bg-active-nav: linear-gradient(135deg, rgba(42, 91, 201, 0.1), rgba(61, 122, 238, 0.07));
    --bg-modal: #ffffff;
    --bg-overlay: rgba(14, 28, 60, 0.45);

    --cobalt: #2a5bc9;
    --sky: #3670e0;
    --ice: #4a82e8;
    --pale: #dce9ff;
    --accent: #0ab5d0;

    --text-primary: #0e1c34;
    --text-secondary: rgba(22, 52, 110, 0.8);
    --text-muted: rgba(42, 91, 160, 0.52);

    --border: rgba(61, 122, 238, 0.16);
    --border-focus: rgba(42, 91, 201, 0.45);

    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --gold: #b45309;
    --purple: #7c3aed;

    --bg-gradient: radial-gradient(ellipse at 15% 10%, rgba(42, 91, 201, 0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 90%, rgba(61, 122, 238, 0.05) 0%, transparent 55%),
    linear-gradient(160deg, #e8f0ff 0%, #f0f5ff 55%, #eaf2ff 100%);
}

/* ─────────────────────────────────────────────────────────────
   RESET & BASE
───────────────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg-gradient), var(--bg-page);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.4s, color 0.35s;
}

a {
    text-decoration: none;
    color: inherit;
}

::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-focus);
    border-radius: 3px;
}

/* ─────────────────────────────────────────────────────────────
   TYPOGRAPHY
───────────────────────────────────────────────────────────── */
.font-display {
    font-family: 'Playfair Display', serif;
}

.accent {
    color: var(--accent);
}

/* ─────────────────────────────────────────────────────────────
   BRAND
───────────────────────────────────────────────────────────── */
.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: #fff;
    box-shadow: 0 4px 16px rgba(42, 91, 201, 0.4);
    flex-shrink: 0;
}

.brand-icon.lg {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    font-size: 26px;
    box-shadow: 0 8px 32px rgba(42, 91, 201, 0.5);
}

.brand-name {
    font-family: 'Playfair Display', serif;
    color: var(--text-primary);
    transition: color 0.35s;
}

.brand-logo {
    width: 100%;
    height: 100%;
    padding: 4px 4px;
}

/* ─────────────────────────────────────────────────────────────
   THEME TOGGLE BUTTON
───────────────────────────────────────────────────────────── */
.theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 15px;
    transition: all 0.25s;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: var(--bg-hover);
    color: var(--sky);
    border-color: var(--border-focus);
}

[data-theme="dark"] .icon-light {
    display: none;
}

[data-theme="light"] .icon-dark {
    display: none;
}

/* ─────────────────────────────────────────────────────────────
   USER AVATAR
───────────────────────────────────────────────────────────── */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--cobalt), var(--sky));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
    border: 2px solid rgba(95, 150, 248, 0.3);
}

.user-avatar.lg {
    width: 82px;
    height: 82px;
    border-radius: 20px;
    font-size: 30px;
    box-shadow: 0 8px 32px rgba(42, 91, 201, 0.4);
}

/* ─────────────────────────────────────────────────────────────
   SURFACE / CARDS
───────────────────────────────────────────────────────────── */
.surface-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 15px;
    transition: background 0.35s, border-color 0.35s;
    margin-bottom: 20px;
}

[data-theme="light"] .surface-card {
    box-shadow: 0 2px 16px rgba(42, 91, 201, 0.07);
}

.surface-card:hover {
    border-color: var(--border-focus);
}

.section-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-surface2);
    flex-wrap: wrap;
    gap: 10px;
    border-radius: 15px 15px 0 0;
    transition: background 0.35s;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 0.97rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 9px;
}

.section-title i {
    color: var(--sky);
    font-size: 13px;
}

.section-body {
    padding: 20px;
}

/* ─────────────────────────────────────────────────────────────
   BUTTONS
───────────────────────────────────────────────────────────── */
.btn-icon {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.18s;
    flex-shrink: 0;
}

.btn-icon.view {
    background: rgba(26, 201, 230, 0.12);
    color: var(--accent);
}

.btn-icon.view:hover {
    background: rgba(26, 201, 230, 0.24);
}

.btn-icon.edit {
    background: rgba(95, 150, 248, 0.13);
    color: var(--ice);
}

.btn-icon.edit:hover {
    background: rgba(95, 150, 248, 0.26);
}

.btn-icon.dl {
    background: rgba(74, 222, 128, 0.12);
    color: var(--success);
}

.btn-icon.dl:hover {
    background: rgba(74, 222, 128, 0.24);
}

.btn-icon.del {
    background: rgba(248, 113, 113, 0.11);
    color: var(--danger);
}

.btn-icon.del:hover {
    background: rgba(248, 113, 113, 0.24);
}

[data-theme="light"] .btn-icon.edit {
    background: rgba(42, 91, 201, 0.1);
    color: var(--cobalt);
}
.form-select:disabled,
.form-control:disabled {
    background-color: transparent;
}

/* ─────────────────────────────────────────────────────────────
   BADGES
───────────────────────────────────────────────────────────── */
.badge-c {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 0.69rem;
    font-weight: 600;
}

.badge-active {
    background: rgba(74, 222, 128, 0.15);
    color: var(--success);
}

.badge-inactive {
    background: rgba(248, 113, 113, 0.14);
    color: var(--danger);
}

.badge-pending {
    background: rgba(251, 191, 36, 0.14);
    color: var(--warning);
}

.badge-type {
    background: rgba(42, 91, 201, 0.15);
    color: var(--pale);
}

[data-theme="light"] .badge-active {
    background: rgba(22, 163, 74, 0.1);
    color: var(--success);
}

[data-theme="light"] .badge-inactive {
    background: rgba(220, 38, 38, 0.08);
    color: var(--danger);
}

[data-theme="light"] .badge-pending {
    background: rgba(217, 119, 6, 0.1);
    color: var(--warning);
}

[data-theme="light"] .badge-type {
    background: rgba(42, 91, 201, 0.1);
    color: var(--cobalt);
}

/* ─────────────────────────────────────────────────────────────
   MODALS
───────────────────────────────────────────────────────────── */
.modal-c .modal-content {
    background: var(--bg-modal);
    border: 1px solid var(--border);
    border-radius: 18px;
    color: var(--text-primary);
    transition: background 0.35s;
}

[data-theme="light"] .modal-c .modal-content {
    box-shadow: 0 20px 60px rgba(14, 28, 60, 0.15);
}

.modal-c .modal-header {
    background: var(--bg-surface2);
    border-bottom: 1px solid var(--border);
    border-radius: 18px 18px 0 0;
    padding: 18px 22px;
}

.modal-c .modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.modal-c .modal-footer {
    border-top: 1px solid var(--border);
    padding: 14px 22px;
}

.modal-c .btn-close {
    filter: invert(1) opacity(0.5);
}

[data-theme="light"] .modal-c .btn-close {
    filter: none;
    opacity: 0.5;
}

/* ─────────────────────────────────────────────────────────────
   TOAST
───────────────────────────────────────────────────────────── */
.toast-stack {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast-item {
    background: var(--bg-modal);
    border: 1px solid var(--border);
    border-left: 3px solid var(--sky);
    border-radius: 11px;
    padding: 12px 16px;
    min-width: 240px;
    max-width: 90vw;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
    color: var(--text-primary);
    font-size: 0.86rem;
    display: flex;
    align-items: center;
    gap: 9px;
    animation: toastIn 0.32s ease;
}

.toast-item.success {
    border-left-color: var(--success);
}

.toast-item.err {
    border-left-color: var(--danger);
}

.toast-item.warn {
    border-left-color: var(--warning);
}

@keyframes toastIn {
    from {
        transform: translateX(50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ─────────────────────────────────────────────────────────────
   NOTIFICATION PANEL
───────────────────────────────────────────────────────────── */
.notif-panel {
    position: fixed;
    z-index: 600;
    width: 340px;
    max-width: calc(100vw - 20px);
    background: var(--bg-modal);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(20px);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: notifIn 0.22s cubic-bezier(0.34, 1.26, 0.64, 1);
    transform-origin: top right;
}

.notif-panel.open {
    display: flex;
}

[data-theme="light"] .notif-panel {
    box-shadow: 0 12px 40px rgba(42, 91, 201, 0.13);
}

@keyframes notifIn {
    from {
        opacity: 0;
        transform: scale(0.88) translateY(-8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.notif-header {
    padding: 14px 18px 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-surface2);
}

.notif-header-title {
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.notif-unread-count {
    background: var(--sky);
    color: #fff;
    font-size: 0.63rem;
    padding: 1px 7px;
    border-radius: 20px;
    font-weight: 700;
}

.notif-mark-all {
    font-size: 0.75rem;
    color: var(--sky);
    cursor: pointer;
    background: none;
    border: none;
    font-family: 'DM Sans', sans-serif;
    transition: color 0.2s;
}

.notif-mark-all:hover {
    color: var(--accent);
}

.notif-list {
    overflow-y: auto;
    max-height: 360px;
}

.notif-item {
    display: flex;
    gap: 12px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    transition: background 0.18s;
    cursor: pointer;
    position: relative;
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-item:hover {
    background: var(--bg-hover);
}

.notif-item.unread {
    background: rgba(42, 91, 201, 0.06);
}

.notif-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--sky);
    border-radius: 0 2px 2px 0;
}

.notif-dot-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 2px;
}

.notif-body {
    flex: 1;
    min-width: 0;
}

.notif-text {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.notif-text strong {
    color: var(--text-primary);
}

.notif-time {
    font-size: 0.71rem;
    color: var(--text-muted);
    margin-top: 3px;
}

.notif-dot-unread {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--sky);
    flex-shrink: 0;
    margin-top: 6px;
}

.notif-footer {
    padding: 11px 16px;
    border-top: 1px solid var(--border);
    text-align: center;
    background: var(--bg-surface2);
}

.notif-footer a {
    font-size: 0.8rem;
    color: var(--sky);
    text-decoration: none;
}

.notif-footer a:hover {
    color: var(--accent);
}

/* ─────────────────────────────────────────────────────────────
   SIDEBAR LAYOUT (used by admin + client)
───────────────────────────────────────────────────────────── */
.has-sidebar {
    display: flex;
}

.sidebar {
    width: var(--sidebar-w);
    min-height: 100vh;
    background: var(--bg-sidebar);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
    transform: translateX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.35s, border-color 0.35s;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Desktop collapse */
.sidebar.desktop-collapsed {
    transform: translateX(calc(-1 * var(--sidebar-w)));
}

/* Mobile hidden by default, shown with .mobile-open */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 199;
    background: var(--bg-overlay);
    backdrop-filter: blur(2px);
}

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

.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-content.expanded {
    margin-left: 0;
}

/* Sidebar internals */
.sidebar-logo {
    padding: 20px 18px 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.sidebar-logo .logo-sub {
    font-size: 0.64rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 2px;
    padding-left: 50px;
}

.sidebar-user {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.sidebar-user .name {
    font-size: 0.90rem;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-user .role {
    font-size: 0.65rem;
    color: var(--accent);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.nav-section {
    padding: 13px 10px 4px;
}

.nav-section-label {
    font-size: 0.62rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0 10px;
    margin-bottom: 5px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 2px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.22s;
    position: relative;
    user-select: none;
}

.nav-item .nav-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all 0.22s;
    flex-shrink: 0;
    pointer-events: none;
}

.nav-item:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.nav-item:hover .nav-icon {
    background: rgba(42, 91, 201, 0.2);
    color: var(--ice);
}

.nav-item.active {
    color: var(--text-primary);
    background: var(--bg-active-nav);
}

.nav-item.active .nav-icon {
    background: linear-gradient(135deg, var(--cobalt), var(--sky));
    color: #fff;
    box-shadow: 0 4px 12px rgba(42, 91, 201, 0.35);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 22%;
    bottom: 22%;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--sky);
}

.nav-badge {
    margin-left: auto;
    background: rgba(42, 91, 201, 0.35);
    color: var(--pale);
    font-size: 0.66rem;
    padding: 2px 7px;
    border-radius: 20px;
    font-weight: 600;
    pointer-events: none;
}

[data-theme="light"] .nav-badge {
    background: rgba(42, 91, 201, 0.12);
    color: var(--cobalt);
}

.sidebar-footer {
    margin-top: auto;
    padding: 13px 10px 16px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.sidebar-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 18px;
}

/* ─────────────────────────────────────────────────────────────
   TOPBAR
───────────────────────────────────────────────────────────── */
.topbar {
    height: var(--topbar-h);
    background: var(--bg-topbar);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 22px;
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 12px;
    transition: background 0.35s, border-color 0.35s;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 9px;
}

.topbar-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.hamburger {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 15px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.hamburger:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-focus);
}

.topbar-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    flex-shrink: 0;
}

.topbar-icon-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-focus);
}

.notif-dot {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg-page);
}

/* Page content wrapper */
.page-content {
    flex: 1;
    padding: 22px;
}

/*!* ─────────────────────────────────────────────────────────────*/
/*   PAGE TRANSITIONS*/
/*───────────────────────────────────────────────────────────── *!*/
/*.page {*/
/*    display: none;*/
/*}*/

/*.page.active {*/
/*    display: block;*/
/*    animation: pgIn 0.28s ease;*/
/*}*/

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

/* ─────────────────────────────────────────────────────────────
   STAT CARDS
───────────────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 18px;
    position: relative;
    overflow: hidden;
    transition: transform 0.22s, box-shadow 0.22s, background 0.35s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 70px;
    height: 70px;
    border-radius: 0 15px 0 70px;
    opacity: 0.07;
}

.stat-card.c1::after {
    background: var(--sky);
}

.stat-card.c2::after {
    background: var(--accent);
}

.stat-card.c3::after {
    background: var(--gold);
}

.stat-card.c4::after {
    background: var(--purple);
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    margin-bottom: 12px;
}

.stat-card.c1 .stat-icon {
    background: rgba(61, 122, 238, 0.18);
    color: var(--sky);
}

.stat-card.c2 .stat-icon {
    background: rgba(26, 201, 230, 0.14);
    color: var(--accent);
}

.stat-card.c3 .stat-icon {
    background: rgba(232, 196, 106, 0.14);
    color: var(--gold);
}

.stat-card.c4 .stat-icon {
    background: rgba(167, 139, 250, 0.14);
    color: var(--purple);
}

.stat-value {
    font-family: serif;
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 3px;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: bolder;
}

.stat-change {
    font-size: 0.72rem;
    margin-top: 7px;
}

.stat-change.up {
    color: var(--success);
}

.stat-change.down {
    color: var(--danger);
}

/* ─────────────────────────────────────────────────────────────
   ACTIVITY FEED
───────────────────────────────────────────────────────────── */
.activity-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-dot {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.activity-text {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.activity-text strong {
    color: var(--text-primary);
}

.activity-time {
    font-size: 0.73rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ─────────────────────────────────────────────────────────────
   PROFILE
───────────────────────────────────────────────────────────── */
.profile-detail-row {
    display: flex;
    gap: 11px;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
}

.profile-detail-row:last-child {
    border-bottom: none;
}

.profile-detail-row i {
    color: var(--sky);
    width: 16px;
    text-align: center;
    flex-shrink: 0;
    font-size: 13px;
}

.profile-detail-row span {
    font-size: 0.84rem;
    color: var(--text-secondary);
}

/* ─────────────────────────────────────────────────────────────
   DOC DETAIL MODAL ROWS
───────────────────────────────────────────────────────────── */
.detail-row {
    display: flex;
    gap: 14px;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    width: 120px;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-top: 1px;
}

.detail-val {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
    flex: 1;
}

/* ─────────────────────────────────────────────────────────────
   CLIENT PORTAL — DOC CARDS
───────────────────────────────────────────────────────────── */
.year-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.year-tab {
    padding: 7px 15px;
    border-radius: 20px;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-muted);
    font-size: 0.83rem;
    font-weight: 500;
    transition: all 0.22s;
    font-family: 'DM Sans', sans-serif;
}

.year-tab:hover {
    border-color: var(--border-focus);
    color: var(--text-primary);
}

.year-tab.active {
    background: linear-gradient(135deg, var(--cobalt), var(--sky));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 16px rgba(42, 91, 201, 0.3);
}

.view-toggle {
    display: flex;
    gap: 3px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 3px;
    flex-shrink: 0;
}

.view-btn {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.18s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.view-btn.active {
    background: rgba(42, 91, 201, 0.25);
    color: var(--text-primary);
}

.cat-section {
    margin-bottom: 24px;
}

.cat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    cursor: pointer;
    padding: 4px 0;
    user-select: none;
}

.cat-icon-wrap {
    width: 35px;
    height: 35px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.cat-title {
    font-family: 'Playfair Display', serif;
    font-size: 0.96rem;
    color: var(--text-primary);
}

.cat-count {
    margin-left: auto;
    font-size: 0.73rem;
    color: var(--text-muted);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    padding: 2px 9px;
    border-radius: 20px;
}

.cat-chevron {
    color: var(--text-muted);
    font-size: 11px;
    transition: transform 0.22s;
    flex-shrink: 0;
}

.cat-header.collapsed .cat-chevron {
    transform: rotate(-90deg);
}

.doc-grid {
    display: grid;
    grid-template-columns:repeat(auto-fill, minmax(185px, 1fr));
    gap: 12px;
}

.doc-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 13px;
    overflow: hidden;
    transition: all 0.28s;
    cursor: pointer;
}

.doc-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-focus);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.14);
}

.doc-card-top {
    padding: 18px 15px 12px;
    text-align: center;
    background: var(--bg-surface2);
    border-bottom: 1px solid var(--border);
    transition: background 0.35s;
}

.doc-file-icon {
    font-size: 34px;
    margin-bottom: 8px;
}

.doc-file-name {
    font-size: 0.79rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
    min-height: 32px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.doc-card-bottom {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.doc-meta-text {
    font-size: 0.69rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.doc-actions {
    display: flex;
    gap: 4px;
}

.doc-action-btn {
    width: 27px;
    height: 27px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: all 0.18s;
}

.doc-action-btn.view {
    background: rgba(26, 201, 230, 0.12);
    color: var(--accent);
}

.doc-action-btn.view:hover {
    background: rgba(26, 201, 230, 0.24);
}

.doc-action-btn.dl {
    background: rgba(74, 222, 128, 0.12);
    color: var(--success);
}

.doc-action-btn.dl:hover {
    background: rgba(74, 222, 128, 0.24);
}

.doc-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.doc-list-item {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 11px;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 13px;
    transition: all 0.22s;
    cursor: pointer;
}

.doc-list-item:hover {
    background: var(--bg-hover);
    border-color: var(--border-focus);
    transform: translateX(3px);
}

.doc-list-icon {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    background: var(--bg-surface2);
}

.doc-list-name {
    font-size: 0.87rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.doc-list-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.doc-list-actions {
    margin-left: auto;
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

.empty-state {
    text-align: center;
    padding: 44px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 44px;
    margin-bottom: 12px;
    opacity: 0.35;
    display: block;
}

.empty-state p {
    font-size: 0.88rem;
}

/* Settings toggles */
.toggle-sw {
    position: relative;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
    display: inline-block;
}

.toggle-sw input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-track {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background: var(--bg-surface2);
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.toggle-sw input:checked + .toggle-track {
    background: var(--cobalt);
    border-color: var(--sky);
}

.toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: all 0.3s;
    pointer-events: none;
}

.toggle-sw input:checked ~ .toggle-thumb {
    transform: translateX(18px);
    background: #fff;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
    gap: 16px;
}

.settings-row:last-child {
    border-bottom: none;
}

.settings-label {
    font-size: 0.86rem;
    color: var(--text-primary);
    font-weight: 500;
}

.settings-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Support */
.support-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 20px;
    text-align: center;
    transition: all 0.25s;
    cursor: pointer;
}

.support-card:hover {
    border-color: var(--border-focus);
    transform: translateY(-2px);
}

.support-card .sc-icon {
    font-size: 26px;
    margin-bottom: 9px;
    display: block;
}

.support-card .sc-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.support-card .sc-desc {
    font-size: 0.74rem;
    color: var(--text-muted);
}

/* FAQ */
.faq-item {
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 8px;
    overflow: hidden;
}

.faq-q {
    padding: 13px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    background: var(--bg-surface);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: background 0.2s;
    gap: 12px;
}

.faq-q:hover {
    background: var(--bg-hover);
}

.faq-chevron-icon {
    color: var(--text-muted);
    font-size: 11px;
    transition: transform 0.25s;
    flex-shrink: 0;
}

.faq-item.open .faq-chevron-icon {
    transform: rotate(180deg);
}

.faq-a {
    padding: 0 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    font-size: 0.83rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

.faq-item.open .faq-a {
    max-height: 200px;
    padding: 0 16px 13px;
}

/* ─────────────────────────────────────────────────────────────
   LOGIN PAGE SPECIFICS
───────────────────────────────────────────────────────────── */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    min-height: 100vh;
}

.login-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    animation: oDrift 12s ease-in-out infinite;
}

[data-theme="dark"] .login-orb {
    opacity: 0.38;
}

[data-theme="light"] .login-orb {
    opacity: 0.12;
}

.login-orb.o1 {
    width: 460px;
    height: 460px;
    background: radial-gradient(circle, var(--cobalt), transparent);
    top: -130px;
    left: -80px;
    animation-delay: 0s;
}

.login-orb.o2 {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, #1a3060, transparent);
    bottom: -90px;
    right: -70px;
    animation-delay: -4s;
}

.login-orb.o3 {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, var(--accent), transparent);
    top: 50%;
    left: 50%;
    animation-delay: -8s;
    opacity: .12;
}

@keyframes oDrift {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(20px, -14px) scale(1.1);
    }
}

.login-orb.o3 {
    animation-name: oDrift3;
}

@keyframes oDrift3 {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.login-particle {
    position: fixed;
    border-radius: 50%;
    z-index: 1;
    animation: pFloat linear infinite;
}

[data-theme="dark"] .login-particle {
    background: rgba(95, 150, 248, 0.4);
}

[data-theme="light"] .login-particle {
    background: rgba(42, 91, 201, 0.12);
}

@keyframes pFloat {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0
    }
    10% {
        opacity: 1
    }
    90% {
        opacity: 1
    }
    100% {
        transform: translateY(-10vh) scale(1);
        opacity: 0
    }
}

.login-theme-btn {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 50;
}

.login-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 468px;
}

.login-brand {
    text-align: center;
    margin-bottom: 24px;
    animation: ldSlideDown 0.65s ease both;
}

.login-card {
    background: var(--bg-surface);
    backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 32px;
    box-shadow: 0 28px 72px rgba(0, 0, 0, 0.22);
    animation: ldSlideUp 0.65s ease 0.12s both;
    transition: background 0.35s, border-color 0.35s;
}

[data-theme="light"] .login-card {
    box-shadow: 0 16px 48px rgba(42, 91, 201, 0.1);
}

.login-card-label {
    font-size: 0.72rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 5px;
    font-weight: 500;
}

.login-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 22px;
}

.role-selector {
    display: flex;
    gap: 9px;
    margin-bottom: 18px;
}

.role-btn {
    flex: 1;
    padding: 9px 8px;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-muted);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.81rem;
    text-align: center;
    transition: all 0.28s;
    font-weight: 500;
}

.role-btn:hover {
    border-color: var(--border-focus);
}

.role-btn.active {
    background: var(--bg-hover);
    border-color: var(--sky);
    color: var(--text-primary);
    box-shadow: 0 0 14px rgba(42, 91, 201, 0.18);
}

.role-btn i {
    display: block;
    font-size: 17px;
    margin-bottom: 4px;
    color: var(--sky);
}

.input-wrap {
    position: relative;
    margin-bottom: 14px;
}

.input-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    z-index: 2;
    pointer-events: none;
    transition: color 0.28s;
}

.input-wrap:focus-within .input-icon {
    color: var(--sky);
}

.fc-login {
    width: 100%;
    padding: 12px 16px 12px 38px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 11px;
    color: var(--text-primary);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    transition: all 0.28s;
    outline: none;
}

.fc-login::placeholder {
    color: var(--text-muted);
}

.fc-login:focus {
    border-color: var(--border-focus);
    background: var(--bg-input-focus);
    box-shadow: 0 0 0 3px rgba(61, 122, 238, 0.1);
}

.eye-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
    z-index: 2;
    font-size: 14px;
    transition: color 0.25s;
    border: none;
    background: none;
}

.eye-btn:hover {
    color: var(--sky);
}

.remember-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 8px;
}

.check-c {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
}

.check-c input {
    accent-color: var(--sky);
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.check-c span {
    color: var(--text-secondary);
    font-size: 0.81rem;
}

.forgot-link {
    color: var(--ice);
    font-size: 0.81rem;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: var(--accent);
}

.btn-login {
    width: 100%;
    padding: 13px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--cobalt) 0%, var(--sky) 100%);
    color: #fff;
    border: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.93rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.28s;
    box-shadow: 0 8px 24px rgba(42, 91, 201, 0.35);
}

.btn-login::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(42, 91, 201, 0.45);
}

.btn-login:hover::before {
    transform: translateX(100%);
}

.btn-login:active {
    transform: translateY(0);
}

.login-note {
    text-align: center;
    margin-top: 14px;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.security-badges {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 16px;
    flex-wrap: wrap;
    animation: ldFadeIn 1s 0.4s both;
}

.sec-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-muted);
    font-size: 0.7rem;
}

.alert-box {
    padding: 10px 14px;
    border-radius: 9px;
    margin-bottom: 14px;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.25);
    color: var(--danger);
    font-size: 0.84rem;
    display: none;
}

@keyframes ldSlideDown {
    from {
        opacity: 0;
        transform: translateY(-24px)
    }
    to {
        opacity: 1;
        transform: translateY(0)
    }
}

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

@keyframes ldFadeIn {
    from {
        opacity: 0
    }
    to {
        opacity: 1
    }
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────────────────── */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(calc(-1 * var(--sidebar-w)));
    }

    .sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: 8px 0 40px rgba(0, 0, 0, 0.4);
    }

    /* desktop-collapsed class irrelevant on mobile */
    .main-content {
        margin-left: 0 !important;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.filter-strip {
    background: var(--bg-surface);
    border: none !important;
}

/* ─────────────────────────────────────────────────────────────
   CUSTOM TAGS
───────────────────────────────────────────────────────────── */
.label_c {
    text-align: left !important;
    font-size: 11pt;
    margin-left: 5px;
}

.text_c:focus {
    color: var(--text-primary);
    border-color: var(--border-focus);
    background: var(--bg-input-focus);
    box-shadow: 0 0 0 3px rgba(61, 122, 238, 0.12);
}

.text_c {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 9px;
    color: var(--text-primary);
    padding: 9px 13px;
    font-size: 0.875rem;
    transition: all 0.22s;
    outline: none;
    width: 100%;
}

.text_c::placeholder {
    color: var(--text-muted);
}

.text-select {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 9px;
    color: var(--text-primary);
    padding: 9px 30px 9px 13px;
    font-size: 0.875rem;
    transition: all 0.22s;
    outline: none;
    width: 100%;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%235f96f8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

[data-theme="light"] .text-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%232a5bc9' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
}

.text-select:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(61, 122, 238, 0.12);
}

.text-select option {
    background: var(--bg-modal);
    color: var(--text-primary);
}

label.required:after {
    content: "*";
    color: red;
}

::-webkit-input-placeholder {
    font-size: 11pt !important;
}

:-moz-placeholder {
    font-size: 11pt !important;
}

::-moz-placeholder {
    font-size: 11pt !important;
}

.error {
    font-size: 9pt !important;
    color: var(--danger);
    text-align: left;
    display: block;
}

@media (max-width: 767px) {
    .page-content {
        padding: 14px;
    }

    .topbar {
        padding: 4px 14px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .section-header {
        /*flex-direction: column;*/
        align-items: flex-start;
    }

    .section-header > *:last-child {
        /*width: 100%;*/
    }

    .toast-stack {
        right: 10px;
        bottom: 10px;
    }

    .toast-item {
        min-width: 200px;
    }

    .doc-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 9px;
    }
}

@media (max-width: 575px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .section-body {
        padding: 14px;
    }

    .table-c thead th {
        padding: 9px 10px;
        font-size: 0.64rem;
    }

    .table-c tbody td {
        padding: 10px;
        font-size: 0.8rem;
    }

    .login-card {
        padding: 22px 18px;
    }
}

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

    .doc-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .al-right { text-align: right;}
}
