/* ══════════════════════════════════════════════════
   GateSM Owner Dashboard — Premium Dark UI v3
   ══════════════════════════════════════════════════ */

/* ─── Design Tokens ─── */
:root {
    --bg-main: #06080d;
    --bg-surface: rgba(12, 16, 27, 0.72);
    --bg-elevated: rgba(22, 30, 48, 0.45);
    --bg-hover: rgba(59, 130, 246, 0.08);

    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-glow: rgba(99, 102, 241, 0.25);
    --accent: #f472b6;
    --accent-glow: rgba(244, 114, 182, 0.18);

    --text-primary: #eef2ff;
    --text-secondary: #a5b4cf;
    --text-tertiary: #5e6e8a;

    --success: #34d399;
    --success-soft: rgba(52, 211, 153, 0.12);
    --warning: #fbbf24;
    --warning-soft: rgba(251, 191, 36, 0.12);
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, 0.12);

    --border: rgba(255, 255, 255, 0.06);
    --border-active: rgba(255, 255, 255, 0.14);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --transition: all 0.2s var(--ease);
    --transition-slow: all 0.35s var(--ease);

    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    --gradient-surface: linear-gradient(145deg, rgba(15, 20, 35, 0.8) 0%, rgba(8, 12, 22, 0.9) 100%);
    --sidebar-w: 272px;
}

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

body {
    background: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-main);
    overflow: hidden;
    height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─── Ambient Background ─── */
@keyframes drift {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.35; }
    25% { transform: translate(-40px, 30px) scale(1.1); opacity: 0.5; }
    50% { transform: translate(20px, -20px) scale(1.05); opacity: 0.4; }
    75% { transform: translate(30px, 40px) scale(1.15); opacity: 0.55; }
}

@keyframes drift-reverse {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.3; }
    33% { transform: translate(30px, -40px) scale(1.12); opacity: 0.45; }
    66% { transform: translate(-20px, 20px) scale(1.08); opacity: 0.35; }
}

body::before {
    content: '';
    position: fixed;
    top: -20%;
    right: -15%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, transparent 70%);
    z-index: -1;
    filter: blur(120px);
    animation: drift 20s ease-in-out infinite;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    bottom: -20%;
    left: -15%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(244, 114, 182, 0.12) 0%, transparent 70%);
    z-index: -1;
    filter: blur(120px);
    animation: drift-reverse 24s ease-in-out infinite;
    pointer-events: none;
}

/* ─── App Shell ─── */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    position: relative;
    background-image:
        radial-gradient(rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 32px 32px;
}

/* ═══════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════ */
.sidebar {
    width: var(--sidebar-w);
    background: var(--gradient-surface);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 1.75rem 1.25rem;
    z-index: 100;
    height: 100vh;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

/* Sidebar top highlight line */
.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.4), transparent);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 0.5rem 2rem;
    flex-shrink: 0;
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--primary);
    filter: drop-shadow(0 0 10px var(--primary-glow));
}

.logo-text {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #e0e7ff, var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── Navigation ─── */
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
}

.nav-menu::-webkit-scrollbar { width: 3px; }
.nav-menu::-webkit-scrollbar-track { background: transparent; }
.nav-menu::-webkit-scrollbar-thumb { background: rgba(99, 102, 241, 0.2); border-radius: 10px; }
.nav-menu::-webkit-scrollbar-thumb:hover { background: var(--primary); }

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid transparent;
    position: relative;
}

.nav-item i {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: var(--transition);
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.06);
    transform: translateX(4px);
}

.nav-item:hover i {
    color: var(--primary-light);
}

.nav-item.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(168, 85, 247, 0.08) 100%);
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.1),
                inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
}

.nav-item.active i {
    color: var(--primary-light);
    filter: drop-shadow(0 0 6px var(--primary-glow));
}

.nav-badge {
    margin-left: auto;
    background: var(--gradient-primary);
    color: white;
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════════════
   MAIN CONTENT AREA
   ═══════════════════════════════════════════════ */
.main-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2rem 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    min-width: 0;
}

.main-content::-webkit-scrollbar { width: 5px; }
.main-content::-webkit-scrollbar-track { background: transparent; }
.main-content::-webkit-scrollbar-thumb { background: rgba(99, 102, 241, 0.12); border-radius: 10px; }
.main-content::-webkit-scrollbar-thumb:hover { background: rgba(99, 102, 241, 0.3); }

/* ─── Top Header ─── */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

#page-title {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#page-subtitle {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    margin-top: 0.15rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
    padding: 0.45rem 1rem;
    border-radius: 100px;
    border: 1px solid var(--border);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.status-dot {
    width: 7px;
    height: 7px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success), 0 0 16px rgba(52, 211, 153, 0.3);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 8px var(--success), 0 0 16px rgba(52, 211, 153, 0.3); }
    50% { box-shadow: 0 0 12px var(--success), 0 0 24px rgba(52, 211, 153, 0.5); }
}

/* ═══════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════ */
.card {
    background: var(--bg-surface);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    transition: var(--transition-slow);
    position: relative;
    min-width: 0;
}

/* Subtle top-edge highlight */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.2), transparent);
    border-radius: 1px;
}

.card:hover {
    border-color: rgba(99, 102, 241, 0.18);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25),
                0 0 0 1px rgba(99, 102, 241, 0.05);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.card-header h2 {
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-primary);
}

.card-header h2 i {
    width: 18px;
    height: 18px;
    color: var(--primary-light);
    opacity: 0.8;
}

/* ═══════════════════════════════════════════════
   STAT CARDS
   ═══════════════════════════════════════════════ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.5rem !important;
}

.stat-label {
    color: var(--text-tertiary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.stat-value {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #fff 30%, var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-trend {
    font-size: 0.78rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.15rem;
}

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

/* ═══════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════ */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    background: rgba(6, 8, 15, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.table-container::-webkit-scrollbar { height: 4px; }
.table-container::-webkit-scrollbar-track { background: transparent; }
.table-container::-webkit-scrollbar-thumb { background: rgba(99, 102, 241, 0.15); border-radius: 10px; }

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    padding: 0.85rem 1rem;
    text-align: left;
    color: var(--text-tertiary);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.015);
    white-space: nowrap;
}

td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: var(--transition);
    vertical-align: middle;
}

tr:hover td {
    background: rgba(99, 102, 241, 0.04);
    color: var(--text-primary);
}

tr:last-child td {
    border-bottom: none;
}

/* Fixed table variant */
.table-fixed {
    table-layout: fixed;
    width: 100%;
}

.table-fixed td {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ═══════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    font-family: inherit;
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.97);
}

.btn i {
    width: 16px;
    height: 16px;
}

/* Primary Button */
.btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -70%;
    width: 40%;
    height: 200%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(25deg);
    transition: left 0.6s ease;
    opacity: 0;
    pointer-events: none;
}

.btn-primary:hover::after {
    left: 130%;
    opacity: 1;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.35),
                0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* Outline Button */
.btn-outline {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    backdrop-filter: blur(8px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
}

/* Small variant */
.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.78rem;
}

/* Secondary variant */
.btn-secondary {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.2);
    color: var(--text-primary);
}

/* Danger variant */
.btn-danger {
    background: var(--danger-soft);
    border: 1px solid rgba(248, 113, 113, 0.2);
    color: var(--danger);
}

.btn-danger:hover {
    background: rgba(248, 113, 113, 0.15);
    border-color: rgba(248, 113, 113, 0.35);
}

/* Icon Button */
.btn-icon {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}

.btn-icon:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.2);
    color: var(--text-primary);
}

.btn-icon.text-danger:hover {
    background: var(--danger-soft);
    color: var(--danger);
    border-color: rgba(248, 113, 113, 0.2);
}

.actions-cell {
    display: flex;
    gap: 0.4rem;
    justify-content: flex-end;
    align-items: center;
}

/* ═══════════════════════════════════════════════
   TABS
   ═══════════════════════════════════════════════ */
.tab-group {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: 3px;
    border-radius: var(--radius-md);
    display: inline-flex;
    gap: 2px;
}

.tab-btn {
    padding: 0.5rem 1.15rem;
    border-radius: 9px;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* ═══════════════════════════════════════════════
   STATUS BADGES
   ═══════════════════════════════════════════════ */
.status-badge {
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-pending {
    background: var(--warning-soft);
    color: var(--warning);
    border: 1px solid rgba(251, 191, 36, 0.15);
}
.badge-completed {
    background: var(--success-soft);
    color: var(--success);
    border: 1px solid rgba(52, 211, 153, 0.15);
}
.badge-rejected {
    background: var(--danger-soft);
    color: var(--danger);
    border: 1px solid rgba(248, 113, 113, 0.15);
}

/* ═══════════════════════════════════════════════
   MODAL SYSTEM
   ═══════════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease);
    padding: 1.5rem;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background: rgba(12, 16, 27, 0.92);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 500px;
    padding: 2rem;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6),
                0 0 0 1px rgba(99, 102, 241, 0.05),
                inset 0 1px 0 0 rgba(255, 255, 255, 0.04);
    transform: scale(0.96) translateY(8px);
    transition: transform 0.3s var(--ease);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

/* ═══════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════ */
.form-group {
    margin-bottom: 1.15rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
}

input, select, textarea {
    width: 100%;
    background: rgba(6, 8, 13, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-md);
    padding: 0.7rem 0.9rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.875rem;
    transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(6, 8, 13, 0.7);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15),
                0 0 16px rgba(99, 102, 241, 0.08);
}

input::placeholder, textarea::placeholder {
    color: var(--text-tertiary);
}

select option {
    background-color: #0c101b;
    color: var(--text-primary);
    padding: 8px;
}

textarea {
    resize: vertical;
    min-height: 60px;
}

/* ─── File Upload ─── */
.file-upload-container {
    border: 2px dashed rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.01);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-tertiary);
    margin-bottom: 0.5rem;
}

.file-upload-container:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.04);
    color: var(--primary-light);
}

.file-upload-container i {
    width: 36px;
    height: 36px;
    opacity: 0.5;
}

.file-upload-container:hover i {
    opacity: 1;
}

#proof-preview {
    max-height: 250px;
    object-fit: contain;
    background: #000;
}

/* ═══════════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════════ */
.pagination-container .btn {
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    font-size: 0.8rem;
}

/* ═══════════════════════════════════════════════
   PAGES & ANIMATIONS
   ═══════════════════════════════════════════════ */
.page { display: none; }
.page.active {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: pageIn 0.35s var(--ease);
}

.contact-tab-content { display: none; }
.contact-tab-content.active { display: grid; animation: pageIn 0.25s var(--ease); }
#tab-view-contacts.active { display: block; }

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

/* ═══════════════════════════════════════════════
   SCROLLBAR (Global)
   ═══════════════════════════════════════════════ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(99, 102, 241, 0.12); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(99, 102, 241, 0.3); }

/* ═══════════════════════════════════════════════
   SIDEBAR OVERLAY (Mobile)
   ═══════════════════════════════════════════════ */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease);
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ═══════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════ */
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-danger { color: var(--danger); }
.w-full { width: 100%; }
.empty-state {
    text-align: center;
    color: var(--text-tertiary);
    padding: 2.5rem 1rem !important;
    font-size: 0.85rem;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — TABLET (< 1024px)
   ═══════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .sidebar {
        width: 72px;
        padding: 1.5rem 0.5rem;
        align-items: center;
    }

    .logo-text,
    .nav-item span,
    #user-fullname,
    #user-coopname {
        display: none !important;
    }

    .logo {
        justify-content: center;
        padding: 0 0 1.5rem;
    }

    .nav-menu {
        width: 100%;
        align-items: center;
    }

    .nav-item {
        width: 46px;
        height: 46px;
        padding: 0;
        justify-content: center;
        margin: 0 auto;
        border-radius: var(--radius-md);
    }

    .nav-item:hover {
        transform: none;
    }

    .nav-badge {
        display: none;
    }

    .sidebar-footer {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .sidebar-footer > div {
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.5rem !important;
    }

    .main-content {
        padding: 1.5rem 1.25rem;
        gap: 1.25rem;
    }

    /* Stack grids on tablet */
    .grid, .grid-2, .grid-3, .contact-tab-content, .stats-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — MOBILE (< 768px)
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {
    .sidebar {
        position: fixed !important;
        top: 0;
        left: 0;
        height: 100vh !important;
        width: 280px !important;
        transform: translateX(-100%);
        transition: transform 0.3s var(--ease);
        z-index: 1000;
        background: rgba(8, 10, 18, 0.98) !important;
        backdrop-filter: blur(40px) !important;
        box-shadow: 16px 0 48px rgba(0, 0, 0, 0.7);
        padding: 1.75rem 1.25rem !important;
        align-items: stretch !important;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    /* Override tablet collapsed styles when drawer is open */
    .sidebar.active .logo-text,
    .sidebar.active .nav-item span,
    .sidebar.active #user-fullname,
    .sidebar.active #user-coopname {
        display: block !important;
    }

    .sidebar.active .logo {
        justify-content: flex-start !important;
        padding: 0 0.5rem 2rem !important;
    }

    .sidebar.active .nav-menu {
        align-items: stretch !important;
    }

    .sidebar.active .nav-item {
        width: 100% !important;
        height: auto !important;
        padding: 0.7rem 0.85rem !important;
        justify-content: flex-start !important;
    }

    .sidebar.active .nav-badge {
        display: inline-flex !important;
    }

    .sidebar.active .sidebar-footer {
        width: 100% !important;
        display: block !important;
    }

    .sidebar.active .sidebar-footer > div {
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.75rem !important;
    }

    #sidebar-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .main-content {
        padding: 1.25rem 1rem;
    }

    .top-header {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 0.75rem;
    }

    #page-title {
        font-size: 1.25rem;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .card-header > div {
        width: 100%;
    }

    .modal {
        margin: 1rem;
        padding: 1.5rem;
        max-height: 90vh;
        overflow-y: auto;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
    }

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

    .tab-group {
        flex-wrap: wrap;
    }
}

/* ═══════════════════════════════════════════════
   TOAST NOTIFICATION (inline style override)
   ═══════════════════════════════════════════════ */
@keyframes slideUp {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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