/**
 * SDMIS Admin Panel Stylesheet
 * 21st-Century Enterprise-Grade Design System
 */

:root {
    /* Core Brand Colors */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-active: #1e40af;
    --primary-light: #eff6ff;
    --primary-rgb: 37, 99, 235;

    /* Secondary & Dark Neutrals */
    --secondary-color: #0f172a;
    --secondary-hover: #1e293b;
    --secondary-light: #334155;
    
    /* Semantic Colors */
    --accent-color: #f43f5e;
    --success-color: #10b981;
    --success-light: #ecfdf5;
    --warning-color: #f59e0b;
    --warning-light: #fffbeb;
    --danger-color: #ef4444;
    --danger-light: #fef2f2;
    --info-color: #0ea5e9;
    --info-light: #f0f9ff;
    --purple-color: #8b5cf6;
    --purple-light: #f5f3ff;

    /* Light Theme Neutrals */
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-subtle: #94a3b8;
    --border-color: #e2e8f0;
    --border-color-light: #f1f5f9;

    /* Layout Dimensions */
    --sidebar-width: 275px;
    --sidebar-collapsed-width: 80px;
    --topbar-height: 70px;

    /* Border Radius */
    --border-radius-xs: 4px;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    --border-radius-pill: 9999px;

    /* Shadows & Elevation */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 4px 0 rgba(15, 23, 42, 0.05), 0 1px 2px 0 rgba(15, 23, 42, 0.03);
    --shadow-md: 0 6px 16px -2px rgba(15, 23, 42, 0.07), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 14px 28px -4px rgba(15, 23, 42, 0.09), 0 6px 12px -2px rgba(15, 23, 42, 0.05);
    --shadow-xl: 0 24px 48px -8px rgba(15, 23, 42, 0.12), 0 12px 24px -4px rgba(15, 23, 42, 0.07);
    --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.18);

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset & Typography */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
    color: var(--secondary-color);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

h1 { font-size: 1.85rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 0.95rem; }
h6 { font-size: 0.85rem; }

p {
    margin-bottom: 0.75rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
}

/* Focus Accessibility */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ==========================================================================
   Admin Sidebar Navigation
   ========================================================================== */
.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: #f8fafc;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    transition: transform var(--transition-smooth), width var(--transition-smooth);
    border-right: 1px solid rgba(255, 255, 255, 0.07);
}

.admin-sidebar__brand {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    gap: 12px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
}

.admin-sidebar__logo {
    width: 38px;
    height: 38px;
    border-radius: var(--border-radius-sm);
    object-fit: contain;
    background: #ffffff;
    padding: 4px;
    box-shadow: var(--shadow-sm);
}

.admin-sidebar__title-box {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.admin-sidebar__title {
    font-weight: 800;
    font-size: 1.05rem;
    margin: 0;
    color: #ffffff;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.admin-sidebar__badge {
    font-size: 0.68rem;
    font-weight: 600;
    color: #93c5fd;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.admin-sidebar__nav {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 0.75rem 2rem;
}

.admin-sidebar__menu-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
    padding: 0 0.85rem;
    margin-bottom: 0.5rem;
    margin-top: 1.35rem;
}

.admin-sidebar__menu-title:first-child {
    margin-top: 0;
}

.admin-sidebar__link {
    display: flex;
    align-items: center;
    padding: 0.65rem 0.85rem;
    color: #94a3b8;
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
    gap: 12px;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 2px;
    position: relative;
}

.admin-sidebar__link i {
    width: 22px;
    font-size: 1.05rem;
    text-align: center;
    color: #64748b;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.admin-sidebar__link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.07);
}

.admin-sidebar__link:hover i {
    color: #60a5fa;
    transform: scale(1.1);
}

.admin-sidebar__link.active {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.9) 0%, rgba(37, 99, 235, 0.7) 100%);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
    font-weight: 600;
}

.admin-sidebar__link.active i {
    color: #ffffff;
}

.admin-sidebar__link .badge {
    margin-left: auto;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-pill);
}

.admin-sidebar__footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ==========================================================================
   Admin Topbar
   ========================================================================== */
.admin-topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    height: var(--topbar-height);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1030;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-xs);
    transition: left var(--transition-smooth);
}

.admin-topbar__btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: var(--text-muted);
    font-size: 1.05rem;
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.admin-topbar__btn:hover {
    background: #e2e8f0;
    color: var(--primary-color);
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.admin-topbar__btn:active {
    transform: translateY(0);
}

.school-brand-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.4rem 0.85rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius-pill);
}

.school-brand-pill .pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* ==========================================================================
   Main Content Layout
   ========================================================================== */
.admin-main {
    margin-top: var(--topbar-height);
    margin-left: var(--sidebar-width);
    padding: 2.25rem;
    min-height: calc(100vh - var(--topbar-height));
    transition: margin-left var(--transition-smooth);
    background-color: var(--bg-light);
}

.admin-page-header {
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.admin-page-header__title {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--secondary-color);
    margin: 0;
    letter-spacing: -0.02em;
}

.admin-page-header__subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0.25rem 0 0;
}

/* ==========================================================================
   Modern Cards & Panels
   ========================================================================== */
.admin-card {
    background: var(--bg-white);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 1.75rem;
    transition: box-shadow var(--transition-normal), transform var(--transition-normal);
    overflow: hidden;
}

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

.admin-card--hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.admin-card__header {
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
}

.admin-card__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-card__subtitle {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.admin-card__body {
    padding: 1.75rem;
}

.admin-card__footer {
    padding: 1rem 1.75rem;
    background: #f8fafc;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

/* Stat & KPI Cards */
.stat-card {
    position: relative;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    overflow: hidden;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.stat-card__icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
}

.stat-card__value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--secondary-color);
    line-height: 1.2;
    margin-bottom: 0.25rem;
    letter-spacing: -0.03em;
}

.stat-card__label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-card--primary .stat-card__icon-wrap { background: #eff6ff; color: var(--primary-color); }
.stat-card--success .stat-card__icon-wrap { background: #ecfdf5; color: var(--success-color); }
.stat-card--warning .stat-card__icon-wrap { background: #fffbeb; color: var(--warning-color); }
.stat-card--danger .stat-card__icon-wrap { background: #fef2f2; color: var(--danger-color); }
.stat-card--purple .stat-card__icon-wrap { background: #f5f3ff; color: var(--purple-color); }

/* Quick Action Tiles */
.action-tile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    color: var(--secondary-color);
    text-decoration: none;
    transition: all var(--transition-normal);
    font-weight: 600;
    box-shadow: var(--shadow-xs);
}

.action-tile:hover {
    background: #f8fafc;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.action-tile i {
    font-size: 1.25rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
    background: #eff6ff;
    color: var(--primary-color);
    transition: all var(--transition-fast);
}

.action-tile:hover i {
    background: var(--primary-color);
    color: #ffffff;
}

/* ==========================================================================
   Modern Forms & Controls
   ========================================================================== */
.form-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.45rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-label i {
    color: var(--text-muted);
}

.form-control, .form-select {
    padding: 0.7rem 1rem;
    font-size: 0.92rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-main);
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control::placeholder {
    color: var(--text-subtle);
}

.form-control:focus, .form-select:focus {
    background-color: #ffffff;
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-control:disabled, .form-control[readonly] {
    background-color: #f1f5f9;
    opacity: 0.8;
    cursor: not-allowed;
}

.input-group-text {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    border-radius: var(--border-radius-sm);
}

/* File Upload Drop Area */
.file-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: var(--border-radius-md);
    padding: 2rem;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.file-dropzone:hover, .file-dropzone.dragover {
    border-color: var(--primary-color);
    background: #eff6ff;
}

.file-dropzone__icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

/* ==========================================================================
   Buttons & Toolbars
   ========================================================================== */
.btn {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.65rem 1.25rem;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1.4;
    cursor: pointer;
}

.btn-sm {
    font-size: 0.82rem;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
}

.btn-lg {
    font-size: 1rem;
    padding: 0.85rem 1.75rem;
    border-radius: var(--border-radius-md);
}

.btn-primary {
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover, .btn-primary:focus {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

.btn-primary:active {
    background: var(--primary-active);
    transform: translateY(0);
}

.btn-success {
    background: var(--success-color);
    border-color: var(--success-color);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.btn-success:hover, .btn-success:focus {
    background: #059669;
    border-color: #059669;
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger-color);
    border-color: var(--danger-color);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover, .btn-danger:focus {
    background: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #e2e8f0;
    border-color: #e2e8f0;
    color: var(--secondary-color);
}

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

.btn-outline-primary {
    border-color: #bfdbfe;
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: #eff6ff;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-danger {
    border-color: #fecaca;
    color: var(--danger-color);
    background: transparent;
}

.btn-outline-danger:hover {
    background: #fef2f2;
    border-color: var(--danger-color);
    color: var(--danger-color);
}

/* Button Loading State */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 1.1rem;
    height: 1.1rem;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ==========================================================================
   Modern Enterprise Tables
   ========================================================================== */
.table-responsive {
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    background: #ffffff;
    overflow-x: auto;
}

.table {
    margin-bottom: 0;
    width: 100%;
    vertical-align: middle;
    border-color: var(--border-color);
}

.table thead th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.95rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.table tbody td {
    padding: 0.95rem 1.25rem;
    color: var(--text-main);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color-light);
}

.table-hover tbody tr:hover td {
    background-color: #f8fafc;
}

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

/* Marks Entry Grid Special Styling */
.marks-entry-table {
    border-collapse: separate;
    border-spacing: 0;
}

.marks-entry-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #0f172a;
    color: #ffffff;
    border-bottom: 2px solid #334155;
}

.marks-entry-input {
    width: 75px;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.4rem 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    transition: all var(--transition-fast);
}

.marks-entry-input:focus {
    border-color: var(--primary-color);
    background-color: #eff6ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
    outline: none;
}

/* ==========================================================================
   Status Badges & Chips
   ========================================================================== */
.badge-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: var(--border-radius-pill);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.02em;
}

.badge-status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.badge-status--success {
    background: #ecfdf5;
    color: #065f46;
}
.badge-status--success::before { background: #10b981; }

.badge-status--warning {
    background: #fffbeb;
    color: #92400e;
}
.badge-status--warning::before { background: #f59e0b; }

.badge-status--danger {
    background: #fef2f2;
    color: #991b1b;
}
.badge-status--danger::before { background: #ef4444; }

.badge-status--info {
    background: #f0f9ff;
    color: #075985;
}
.badge-status--info::before { background: #0ea5e9; }

.badge-status--neutral {
    background: #f1f5f9;
    color: #475569;
}
.badge-status--neutral::before { background: #94a3b8; }

/* ==========================================================================
   Alerts & Notifications
   ========================================================================== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius-md);
    border: 1px solid transparent;
    font-size: 0.92rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-xs);
}

.alert-success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.alert-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.alert-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.alert-info {
    background: #f0f9ff;
    border-color: #bae6fd;
    color: #075985;
}

/* Toast System */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1090;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
    width: 100%;
}

.modern-toast {
    background: #ffffff;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    animation: slideInRight 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.modern-toast.success { border-left-color: var(--success-color); }
.modern-toast.error { border-left-color: var(--danger-color); }
.modern-toast.warning { border-left-color: var(--warning-color); }

.toast-body {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1rem 1.25rem;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.92rem;
}

.toast-icon {
    font-size: 1.35rem;
}

.modern-toast.success .toast-icon { color: var(--success-color); }
.modern-toast.error .toast-icon { color: var(--danger-color); }
.modern-toast.warning .toast-icon { color: var(--warning-color); }

@keyframes slideInRight {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Online Status Pill */
.network-status-pill {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.3rem 0.65rem;
    border-radius: var(--border-radius-pill);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
}

.network-status-pill.online {
    background: #ecfdf5;
    color: #065f46;
}

.network-status-pill.offline {
    background: #fef2f2;
    color: #991b1b;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ==========================================================================
   Modals & Dialogues
   ========================================================================== */
.modal-content {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.modal-header {
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.75rem;
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.modal-body {
    padding: 1.75rem;
}

.modal-footer {
    background: #f8fafc;
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.75rem;
}

/* Delete Prompt Card */
.delete-hazard-card {
    border-top: 4px solid var(--danger-color);
    background: #ffffff;
}

.delete-hazard-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fef2f2;
    color: var(--danger-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 1.25rem;
}

/* ==========================================================================
   Authentication & Sign In Pages
   ========================================================================== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    padding: 2rem 1rem;
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: -30%;
    left: -20%;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.18) 0%, rgba(37, 99, 235, 0) 70%);
    pointer-events: none;
}

.auth-page::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -20%;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, rgba(16, 185, 129, 0) 70%);
    pointer-events: none;
}

.auth-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--border-radius-xl);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 100%;
    max-width: 460px;
    overflow: hidden;
    position: relative;
    z-index: 10;
}

.auth-card__header {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    padding: 2.5rem 2rem 2rem;
    text-align: center;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-card__logo {
    width: 72px;
    height: 72px;
    background: #ffffff;
    padding: 10px;
    border-radius: 18px;
    margin: 0 auto 1.25rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    object-fit: contain;
}

.auth-card__body {
    padding: 2.25rem;
}

/* ==========================================================================
   Responsive Utilities & Mobile Sidebar Drawer
   ========================================================================== */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1035;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

@media (max-width: 991.98px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.show {
        transform: translateX(0);
    }

    .admin-topbar {
        left: 0;
        padding: 0 1.25rem;
    }

    .admin-main {
        margin-left: 0;
        padding: 1.5rem 1rem;
    }

    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }
}

@media (max-width: 575.98px) {
    .admin-page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-card__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

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

/* ==========================================================================
   Print Optimization
   ========================================================================== */
@media print {
    .admin-sidebar, .admin-topbar, .admin-card__footer, .btn, .sidebar-overlay, .toast-container {
        display: none !important;
    }

    .admin-main {
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
    }

    .admin-card {
        border: 1px solid #000000 !important;
        box-shadow: none !important;
    }

    table {
        width: 100% !important;
        border-collapse: collapse !important;
    }

    th, td {
        border: 1px solid #000000 !important;
        padding: 6px 8px !important;
    }
}
