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

:root {
    /* Theme Light (Default) */
    --bg-app: #f4f6fa;
    --bg-sidebar: rgba(255, 255, 255, 0.75);
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-modal: rgba(255, 255, 255, 0.85);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --primary: #4f46e5;
    --primary-glow: rgba(79, 70, 229, 0.15);
    --primary-hover: #4338ca;
    --accent: #06b6d4;
    --accent-glow: rgba(6, 182, 212, 0.15);
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.15);
    --warning: #f59e0b;
    --danger: #ef4444;
    --border-color: rgba(226, 232, 240, 0.8);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 20px -2px rgba(148, 163, 184, 0.12), 0 2px 8px -1px rgba(148, 163, 184, 0.08);
    --shadow-lg: 0 20px 25px -5px rgba(148, 163, 184, 0.15), 0 10px 10px -5px rgba(148, 163, 184, 0.1);
    --glass-blur: 16px;
    --glass-border: rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] {
    /* Theme Dark */
    --bg-app: #0b0f19;
    --bg-sidebar: rgba(15, 23, 42, 0.75);
    --bg-card: rgba(15, 23, 42, 0.65);
    --bg-modal: rgba(15, 23, 42, 0.85);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.25);
    --primary-hover: #818cf8;
    --accent: #22d3ee;
    --accent-glow: rgba(34, 211, 238, 0.25);
    --success: #34d399;
    --success-glow: rgba(52, 211, 153, 0.25);
    --warning: #fbbf24;
    --danger: #f87171;
    --border-color: rgba(51, 65, 85, 0.5);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
    --glass-border: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

body {
    background: var(--bg-app);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Gradients */
.bg-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(150px);
    z-index: -1;
    opacity: 0.15;
    pointer-events: none;
}
.glow-primary {
    top: -200px;
    left: -200px;
    background: var(--primary);
}
.glow-accent {
    bottom: -200px;
    right: -200px;
    background: var(--accent);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Sidebar Layout */
.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    backdrop-filter: blur(var(--glass-blur));
    border-right: 1px solid var(--glass-border);
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s, width 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}
.brand-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}
.brand-name {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-user {
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-glow);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border: 1px solid var(--border-color);
}
.user-info {
    flex: 1;
    min-width: 0;
}
.user-name {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-role {
    font-size: 11px;
    color: var(--text-muted);
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s ease;
}
.nav-item a:hover {
    color: var(--text-main);
    background: var(--bg-card);
    transform: translateX(4px);
}
.nav-item.active a {
    background: var(--primary-glow);
    color: var(--primary);
    border: 1px solid var(--glass-border);
}
.nav-item.active a svg {
    stroke: var(--primary);
}

.sidebar-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    font-size: 14px;
    cursor: pointer;
}
.toggle-track {
    width: 44px;
    height: 24px;
    background: var(--border-color);
    border-radius: 12px;
    position: relative;
    transition: background-color 0.2s ease;
}
.toggle-thumb {
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 3px;
    left: 3px;
    transition: transform 0.2s ease;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}
[data-theme="dark"] .toggle-track {
    background: var(--primary);
}
[data-theme="dark"] .toggle-thumb {
    transform: translateX(20px);
    background: #0f172a;
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}
.btn-logout:hover {
    background: var(--danger);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 40px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 32px;
    min-width: 0;
}

/* Header styling */
.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-width: 0;
    gap: 16px;
}
.header-title h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}
.header-title p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Mobiles and Hamburgers */
.mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 90;
    backdrop-filter: blur(var(--glass-blur));
}
.menu-btn {
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 12px;
    transition: all 0.2s ease;
}
.menu-btn:hover {
    background: var(--primary-glow);
    color: var(--primary);
}

/* Glassmorphism Cards */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    min-width: 0;
    width: 100%;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}
.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
}
.stat-card::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    top: -20px;
    right: -20px;
    opacity: 0.05;
}
.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}
.stat-info {
    display: flex;
    flex-direction: column;
}
.stat-value {
    font-size: 24px;
    font-weight: 700;
}
.stat-label {
    font-size: 14px;
    color: var(--text-muted);
}

.stat-blue { background: linear-gradient(135deg, #3b82f6, #06b6d4); }
.stat-purple { background: linear-gradient(135deg, #8b5cf6, #d946ef); }
.stat-emerald { background: linear-gradient(135deg, #10b981, #34d399); }
.stat-orange { background: linear-gradient(135deg, #f59e0b, #ec4899); }

/* Dashboard Content Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
}

/* Table Design */
.table-container {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    margin-top: 16px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
}
.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.custom-table th {
    padding: 14px 16px;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.75px;
    background: rgba(0, 0, 0, 0.015);
}
[data-theme="dark"] .custom-table th {
    background: rgba(255, 255, 255, 0.01);
}
.custom-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    vertical-align: middle;
    color: var(--text-main);
}
.custom-table th:last-child,
.custom-table td:last-child {
    white-space: nowrap;
    text-align: right;
}
.custom-table tbody tr {
    transition: background-color 0.2s ease;
}
.custom-table tbody tr:last-child td {
    border-bottom: none;
}
.custom-table tbody tr:hover {
    background: rgba(79, 70, 229, 0.03);
}
[data-theme="dark"] .custom-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

/* File type icon badge system */
.file-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    margin-right: 12px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
.file-icon-wrapper svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
}
.file-icon-wrapper.pdf { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.file-icon-wrapper.word { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.file-icon-wrapper.excel { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.file-icon-wrapper.powerpoint { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.file-icon-wrapper.image { background: rgba(6, 182, 212, 0.1); color: var(--accent); }
.file-icon-wrapper.archive { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.file-icon-wrapper.default { background: rgba(148, 163, 184, 0.1); color: var(--text-muted); }

/* Badge System */
.badge {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
    border: 1px solid transparent;
}
.badge-primary { background: rgba(79, 70, 229, 0.08); color: var(--primary); border-color: rgba(79, 70, 229, 0.15); }
.badge-accent { background: rgba(6, 182, 212, 0.08); color: var(--accent); border-color: rgba(6, 182, 212, 0.15); }
.badge-success { background: rgba(16, 185, 129, 0.08); color: var(--success); border-color: rgba(16, 185, 129, 0.15); }
.badge-danger { background: rgba(239, 68, 68, 0.08); color: var(--danger); border-color: rgba(239, 68, 68, 0.15); }
.badge-warning { background: rgba(245, 158, 11, 0.08); color: var(--warning); border-color: rgba(245, 158, 11, 0.15); }

/* Buttons & Inputs */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.2s ease;
}
.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 14px var(--primary-glow);
    transform: translateY(-1px);
}
.btn-secondary {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}
.btn-secondary:hover {
    background: var(--border-color);
}
.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover {
    background: #dc2626;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.2);
}
.btn-icon-only {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-muted);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}
.btn-icon-only svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    transition: transform 0.2s ease;
}
.btn-icon-only:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-glow);
    transform: translateY(-1.5px);
    box-shadow: 0 4px 12px var(--primary-glow);
}
.btn-icon-only:hover svg {
    transform: scale(1.1);
}
.btn-icon-only.btn-danger {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}
.btn-icon-only.btn-danger:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}
.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-app);
    color: var(--text-main);
    outline: none;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-control::placeholder {
    color: var(--text-muted);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.modal-box {
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--bg-modal);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 32px;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-overlay.active .modal-box {
    transform: translateY(0);
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.modal-title {
    font-size: 20px;
    font-weight: 700;
}
.close-modal {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
}

/* Filters & Actions bar */
.actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.search-wrapper {
    position: relative;
    width: 300px;
}
.search-wrapper input {
    padding-left: 40px;
}
.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}
.filters-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Login Layout */
.login-container {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    position: relative;
    overflow: hidden;
}
.login-showcase {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(79, 70, 229, 0.45));
    backdrop-filter: blur(12px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 80px;
    color: white;
    position: relative;
}
[data-theme="light"] .login-showcase {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.98), rgba(6, 182, 212, 0.75));
}
.showcase-content {
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
}
.showcase-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 32px;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.3));
}
.showcase-title {
    font-size: 46px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #ffffff, #f1f5f9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.showcase-desc {
    color: rgba(241, 245, 249, 0.85);
    font-size: 16.5px;
    line-height: 1.7;
    margin-bottom: 44px;
}
.feature-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    list-style: none;
    width: 100%;
}
.feature-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.feature-icon-wrapper {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(6px);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.feature-icon-wrapper svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
}
.feature-text {
    flex: 1;
}
.feature-text h4 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #ffffff;
}
.feature-text p {
    font-size: 14.5px;
    color: rgba(241, 245, 249, 0.75);
    line-height: 1.5;
}

/* Right Form Side */
.login-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    z-index: 1;
}
.login-form-side::before {
    content: '';
    position: absolute;
    width: 320px;
    height: 320px;
    background: var(--primary);
    filter: blur(130px);
    opacity: 0.12;
    z-index: -1;
    pointer-events: none;
}
.login-card {
    width: 100%;
    max-width: 440px;
    padding: 56px 48px;
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.login-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 30px 60px -15px rgba(0,0,0,0.12);
    border-color: rgba(79, 70, 229, 0.25);
}
[data-theme="dark"] .login-card:hover {
    box-shadow: 0 30px 60px -15px rgba(0,0,0,0.4);
    border-color: rgba(99, 102, 241, 0.3);
}
.login-header {
    text-align: center;
}
.login-header h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
    letter-spacing: -0.5px;
}
.login-header p {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 36px;
}
.login-card .form-group {
    text-align: left;
    margin-bottom: 24px;
}
.login-card .form-group label {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 10px;
}
.login-card .form-control {
    font-size: 16px;
    padding: 15px 18px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
    transition: all 0.25s ease;
}
[data-theme="dark"] .login-card .form-control {
    background: rgba(255, 255, 255, 0.02);
}
.login-card .form-control:focus {
    background: var(--bg-app);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    transform: translateY(-1px);
}
.btn-login {
    width: 100%;
    justify-content: center;
    padding: 16px;
    font-size: 17px;
    font-weight: 700;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    border: none;
    box-shadow: 0 4px 12px var(--primary-glow);
    transition: all 0.25s ease;
}
.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--primary-glow);
    background: linear-gradient(135deg, var(--primary-hover), var(--primary));
}
.btn-login:active {
    transform: translateY(0);
}
.login-alert {
    padding: 14px 18px;
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 16px;
    font-size: 15px;
    margin-bottom: 24px;
    text-align: left;
}

/* Alert system */
.alert {
    padding: 16px;
    border-radius: 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}
.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--success);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}
.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}
.page-link:hover, .page-link.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Sidebar Backdrop Overlay */
.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 99; /* Below sidebar which has z-index 100 */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    display: none;
}

/* Close Sidebar Button inside Sidebar Brand */
.close-sidebar-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 12px;
    transition: all 0.2s ease;
}
.close-sidebar-btn:hover {
    color: var(--text-main);
    background: var(--bg-card);
}

/* Responsive queries */
@media (max-width: 992px) {
    .app-container {
        flex-direction: column;
    }
    .sidebar-backdrop {
        display: block;
    }
    .sidebar-backdrop.active {
        opacity: 1;
        pointer-events: auto;
    }
    .close-sidebar-btn {
        display: flex;
    }
    .sidebar {
        transform: translateX(-100%);
        visibility: hidden;
        width: 280px;
        max-width: 85%;
        box-shadow: none;
    }
    .sidebar.active {
        transform: translateX(0);
        visibility: visible;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.25);
    }
    .main-content {
        margin-left: 0;
        padding: 24px;
    }
    .main-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .main-header .btn {
        width: 100%;
        justify-content: center;
    }
    .btn-icon-only {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }
    .btn-icon-only svg {
        width: 14px;
        height: 14px;
    }
    .custom-table td:last-child div {
        gap: 6px !important;
    }
    .mobile-header {
        display: flex;
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .login-container {
        grid-template-columns: 1fr;
    }
    .login-showcase {
        display: none;
    }
    .login-form-side {
        min-height: 100vh;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding: 16px;
        gap: 20px;
    }
    .actions-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .search-wrapper {
        width: 100%;
    }
    .filters-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
}
