:root {
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --warning: #f59e0b;
    --info: #06b6d4;
    --bg-dark: #0b1426;
    --bg-card: #131b2e;
    --bg-input: #1e293b;
    --text-white: #f8fafc;
    --text-muted: #94a3b8;
    --border: #1e293b;
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    --blue-gradient: linear-gradient(90deg, #2563eb, #7c3aed);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: var(--bg-dark);
    color: var(--text-white);
    min-height: 100vh;
}

input,
select,
textarea {
    background: #0b1426 !important;
    color: white !important;
    border: 1px solid #1e293b !important;
    border-radius: 8px;
    font-family: inherit;
}

input::placeholder {
    color: #475569 !important;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-8px);
    }

    40% {
        transform: translateX(8px);
    }

    60% {
        transform: translateX(-6px);
    }

    80% {
        transform: translateX(6px);
    }
}

@keyframes floatUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Split-Screen Login (Image 1) ── */
.login-screen {
    display: flex;
    height: 100vh;
    width: 100vw;
    position: fixed;
    inset: 0;
    z-index: 10000;
}

.login-left {
    flex: 1.1;
    background: #004d9c;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: white;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-brand-icon {
    width: 32px;
    height: 32px;
    background: #3b82f6;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.login-brand-text {
    font-size: 24px;
    font-weight: 800;
}

.login-left-main {
    max-width: 500px;
}

.login-left-main .accent-line {
    width: 40px;
    height: 4px;
    background: white;
    margin-bottom: 30px;
    border-radius: 2px;
}

.login-left-main h2 {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 40px;
}

.login-user-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 16px;
    border-radius: 50px;
    width: fit-content;
}

.pill-avatar {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
}

.login-right {
    flex: 1;
    background: #0b1426;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-form-container {
    width: 100%;
    max-width: 400px;
}

.login-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
}

.login-subtitle {
    color: #94a3b8;
    margin-bottom: 48px;
    font-size: 16px;
}

.form-group label {
    display: block;
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 12px;
}

.form-input {
    width: 100%;
    padding: 16px;
    background: #0b1426 !important;
    border: 1px solid #1e293b !important;
    border-radius: 8px;
    color: white !important;
    font-size: 16px;
    outline: none;
    transition: all 0.2s;
}

.form-input:focus {
    border-color: var(--primary);
}

.login-btn {
    width: 100%;
    padding: 16px;
    background: #1d4ed8;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
}

/* Login Screen Redesign - Matching Image */
.login-screen {
    display: flex;
    min-height: 100vh;
    background: #0f0101;
    font-family: 'Inter', sans-serif;
}

.login-left {
    flex: 1;
    background: #0056b3;
    background: linear-gradient(135deg, #004d9c 0%, #0069d9 100%);
    padding: 80px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: white;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -10%;
    width: 500px;
    height: 500px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.login-left::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 600px;
    height: 600px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 10;
}

.login-brand img {
    height: 40px;
}

.login-brand-text {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -1px;
}

.login-left-content {
    position: relative;
    z-index: 10;
}

.login-line {
    width: 40px;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    margin-bottom: 24px;
    border-radius: 2px;
}

.login-left-title {
    font-size: 44px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 32px;
    max-width: 450px;
}

.login-user-profile {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 20px;
    border-radius: 100px;
    width: fit-content;
}

.login-user-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.login-user-info div:first-child {
    font-weight: 700;
    font-size: 14px;
}

.login-user-info div:last-child {
    font-size: 12px;
    opacity: 0.7;
}

.login-right {
    flex: 1;
    background: #0b1426;
    padding: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.login-form-card {
    width: 100%;
    max-width: 400px;
}

.login-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
}

.login-subtitle {
    color: #94a3b8;
    margin-bottom: 40px;
    font-size: 15px;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #94a3b8;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #0069d9;
    font-size: 18px;
}

.form-input:focus {
    border-color: #2563eb !important;
    background: #0f172a !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    outline: none;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    cursor: pointer;
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #475569;
    cursor: pointer;
}

.login-remember input {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.login-forgot {
    font-size: 14px;
    font-weight: 600;
    color: #0069d9;
    text-decoration: none;
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: #0062cc;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-google {
    background: white;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
    padding: 14px;
    border-radius: 12px;
    width: 100%;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    transition: all 0.2s;
}

.btn-google img {
    width: 20px;
    height: 20px;
}

.btn-google:active {
    transform: scale(0.98);
    background: #f9fafb;
}

/* Dashboard Layout */
.dashboard {
    display: none;
    min-height: 100vh;
}

.dashboard.active {
    display: flex;
}

.sidebar {
    width: 260px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.sidebar-logo-text {
    font-size: 18px;
    font-weight: 700;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-content: flex-start;
}

/* Custom Scrollbar for Sidebar */
.sidebar-nav::-webkit-scrollbar {
    width: 5px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.nav-group {
    margin-bottom: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 4px;
    transition: all 0.2s;
    color: var(--text-muted);
}

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

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

.nav-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.nav-label {
    font-size: 14px;
    font-weight: 600;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-input);
    border-radius: 12px;
}

.admin-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
}

.admin-info {
    flex: 1;
}

.admin-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.admin-role {
    font-size: 12px;
    color: var(--text-muted);
}

.logout-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    transform: scale(1.1);
}

/* Main Content */
.main-content {
    margin-left: 260px;
    flex: 1;
    min-height: 100vh;
    background: var(--bg-dark);
}

.top-bar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 20px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
}

.top-actions {
    display: flex;
    gap: 12px;
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-white);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-view-all {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-view-all:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-view-all::after {
    content: '→';
    font-size: 14px;
}

.content-area {
    padding: 32px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.stat-card-total {
    background: var(--blue-gradient);
    grid-column: span 3;
    height: 220px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
}

.stat-card-total::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: rgba(255, 255, 255, 0.1);
    mask-image: linear-gradient(to top, black, transparent);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-icon.blue {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.stat-icon.green {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.stat-icon.yellow {
    background: rgba(251, 191, 36, 0.1);
    color: var(--warning);
}

.stat-icon.cyan {
    background: rgba(6, 182, 212, 0.1);
    color: var(--info);
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 4px;
}

.stat-change {
    font-size: 13px;
    color: var(--success);
}

/* Data Table */
.table-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 24px;
}

.table-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-title {
    font-size: 18px;
    font-weight: 700;
}

.search-box {
    position: relative;
}

.search-input {
    padding: 8px 16px 8px 36px;
    border-radius: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-white);
    font-size: 14px;
    width: 250px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--bg-input);
}

.data-table th {
    padding: 14px 24px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    font-size: 14px;
}

.data-table tbody tr {
    transition: background 0.2s;
}

.data-table tbody tr:hover {
    background: var(--bg-input);
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-badge.failed {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.status-badge.online {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-badge.offline {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.status-badge.suspended {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.btn-icon:hover {
    background: var(--border);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10001;
    pointer-events: auto !important;
}

.modal-close:hover {
    background: var(--danger);
    color: white;
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    display: none;
    align-items: center;
    gap: 12px;
    z-index: 2000;
    min-width: 300px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.toast.active {
    display: flex;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.toast.success .toast-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.toast.error .toast-icon {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.toast-message {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

/* Screen Management */
.screen {
    display: none;
    animation: fadeIn 0.3s ease;
}

.screen.active {
    display: flex;
    flex-direction: column;
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 16px;
    margin-bottom: 8px;
}

.empty-state-subtext {
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

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

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

    .search-input {
        width: 200px;
    }
}

/* Notifications */
.notification-toast {
    position: fixed;
    top: -100px;
    right: 20px;
    width: 350px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: var(--text-white);
}

.notification-toast.active {
    top: 20px;
}

.notification-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-msg {
    font-size: 13px;
    line-height: 1.4;
}

.nav-group .submenu {
    transition: all 0.3s ease;
}

.nav-item {
    transition: background-color 0.2s, transform 0.1s;
}

.stat-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* ── Mobile Header & Responsiveness ── */
.mobile-header {
    display: none;
    height: 60px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0 20px;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9997;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

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

@media (max-width: 1024px) {
    .mobile-header { display: flex; }
    
    .sidebar {
        position: fixed;
        left: 0;
        transform: translateX(-100%);
        top: 0;
        bottom: 0;
        width: 280px;
        z-index: 9999;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-right: 1px solid var(--border);
        background: var(--bg-card);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .sidebar.active {
        transform: translateX(0) !important;
        left: 0 !important;
        visibility: visible !important;
        display: flex !important;
        z-index: 10001 !important;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding-top: 60px; /* Space for sticky mobile header */
    }

    .top-bar {
        display: none;
    }

    .content-area {
        padding: 16px;
    }

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

    div[style*="grid-template-columns:repeat(4,1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .overview-grid {
        grid-template-columns: 1fr !important;
    }

    .modal-content {
        width: 95%;
        margin: 20px auto;
        padding: 10px;
    }
}

@media (max-width: 640px) {
    div[style*="grid-template-columns:repeat(2,1fr)"],
    div[style*="grid-template-columns:repeat(4,1fr)"] {
        grid-template-columns: 1fr !important;
    }

    .stat-card {
        padding: 16px !important;
    }

    .data-table thead {
        display: none;
    }

    .data-table tr {
        display: block;
        margin-bottom: 12px;
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 8px;
    }

    .data-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 12px !important;
        border: none !important;
        text-align: right;
        font-size: 13px;
    }

    .data-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--primary);
        text-align: left;
        font-size: 11px;
        text-transform: uppercase;
    }
}

/* ── Responsive Grid Utilities ── */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

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

.grid-split {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 24px;
}

@media (max-width: 1024px) {
    .grid-4, .grid-3, .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid-split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .grid-4, .grid-3, .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .login-screen {
        flex-direction: column;
        position: relative;
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
    }
    
    .login-left {
        display: none; 
    }
    
    .login-right {
        padding: 40px 20px;
        flex: 1;
        width: 100%;
        min-height: 100vh;
    }
    
    .login-title {
        font-size: 32px;
    }
    
    .login-subtitle {
        margin-bottom: 30px;
    }
}

/* Session Expiry Overlay */
.session-expiry-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 15, 28, 0.85);
    backdrop-filter: blur(12px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.session-expiry-overlay.active {
    display: flex;
    opacity: 1;
}

.session-expiry-card {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 24px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    transform: scale(0.8) translateY(20px);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.session-expiry-overlay.active .session-expiry-card {
    transform: scale(1) translateY(0);
}

.session-expiry-icon {
    font-size: 64px;
    margin-bottom: 24px;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(239, 68, 68, 0.7)); }
    70% { transform: scale(1.05); filter: drop-shadow(0 0 15px rgba(239, 68, 68, 0)); }
    100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(239, 68, 68, 0)); }
}

.session-expiry-title {
    font-size: 24px;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 12px;
}

.session-expiry-text {
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 32px;
}

.session-expiry-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-size: 16px;
}

.session-expiry-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}
