@import url('glassmorphism.css');
/* Teen Focus — Muted Slate Design System */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Brand Colors — Indigo (mature, school-appropriate) */
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --primary-subtle: #c7d2fe;

    --secondary: #64748b;
    --secondary-hover: #475569;

    /* Semantic Colors */
    --success: #059669;
    --success-bg: #d1fae5;
    --warning: #d97706;
    --warning-bg: #fef3c7;
    --danger: #dc2626;
    --danger-bg: #fee2e2;

    /* Neutrals — slightly warm-slate */
    --text-main: #1e1b4b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --bg-app: #f8fafc;
    --bg-surface: #ffffff;
    --border: #e2e8f0;
    --border-subtle: #f1f5f9;

    /* Sidebar — Muted Slate */
    --sidebar-bg: #f8fafc;
    --sidebar-border: #e2e8f0;
    --sidebar-text: #475569;
    --sidebar-text-active: #0f172a;
    --sidebar-active-bg: #e2e8f0;
    --sidebar-hover-bg: #f1f5f9;
    --sidebar-accent: #4f46e5;

    /* UI Values — slightly tighter radii for a more refined look */
    --radius-sm: 0.375rem;
    --radius-md: 0.625rem;
    --radius-lg: 0.875rem;

    /* Shadows — lighter, more refined */
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.06);
    --shadow-md: 0 2px 8px -1px rgb(0 0 0 / 0.08), 0 1px 3px -1px rgb(0 0 0 / 0.06);
    --shadow-lg: 0 8px 20px -3px rgb(0 0 0 / 0.08), 0 3px 8px -3px rgb(0 0 0 / 0.05);

    /* Gradients */
    --primary-gradient: linear-gradient(135deg, var(--primary), var(--primary-hover));
    --success-gradient: linear-gradient(135deg, var(--success), #047857);
    --warning-gradient: linear-gradient(135deg, var(--warning), #b45309);
    --danger-gradient: linear-gradient(135deg, var(--danger), #b91c1c);
}

/* Safe Area Insets — Global (iPhone X+, Android notch) */
@supports (padding: env(safe-area-inset-top)) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-right: env(safe-area-inset-right);
        padding-left: env(safe-area-inset-left);
    }

    /* Bottom-pinned elements need bottom safe area */
    .bottom-nav,
    .install-banner,
    .offline-indicator {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

body {
    font-family: 'Rubik', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-app);
    color: var(--text-main);
    line-height: 1.55;
    direction: rtl;
    text-align: right;
    min-height: 100dvh; /* dvh = dynamic viewport height — fixes iOS Safari bottom bar */
    -webkit-font-smoothing: antialiased;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    /* Account for safe areas on notched devices */
    padding-right: max(2rem, env(safe-area-inset-right));
    padding-left: max(2rem, env(safe-area-inset-left));
}

/* Header */
.header {
    background: var(--bg-surface);
    padding: 1.5rem 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border);
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-grow: 1;
    /* Allow content to take available space */
}

/* Ensure actions are visible on mobile */
.header-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        text-align: center;
    }

    .header-content {
        flex-direction: column;
        width: 100%;
        justify-content: center;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
    }

    .header-actions .btn {
        flex: 1;
        /* Make buttons full width/equal width on mobile */
        min-width: unset;
        font-size: 0.9rem;
        padding: 0.75rem;
    }
}

.logo {
    height: 48px;
    width: auto;
}

/* Cards */
.card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-subtle);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--bg-app);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background-color: var(--bg-surface);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Buttons - WCAG 2.5.5 (AA) Compliant: 48×48px minimum */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
    text-decoration: none;
    gap: 0.5rem;
    font-family: 'Rubik', sans-serif;
    letter-spacing: -0.01em;
}

/* Primary — Tonal (soft indigo background, dark indigo text) */
.btn-primary {
    background-color: var(--primary-light);
    color: var(--primary-hover);
    border: 1px solid var(--primary-subtle);
    letter-spacing: -0.01em;
}

.btn-primary:hover {
    background-color: #e0e7ff;
    border-color: var(--primary);
    color: var(--primary-hover);
    transform: translateY(-1px);
}

/* Secondary — subtle gray */
.btn-secondary {
    background-color: var(--bg-surface);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background-color: var(--bg-app);
    color: var(--text-main);
    border-color: #cbd5e1;
}

/* Solid — for high-emphasis actions only (e.g. submit a form) */
.btn-solid, .btn-primary.btn-solid {
    background-color: var(--primary);
    color: white;
    border: none;
}

.btn-solid:hover, .btn-primary.btn-solid:hover {
    background-color: var(--primary-hover);
}

/* Stats Grid - Fixed Layout */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
    border: 1px solid var(--border);
}

/* Pastel color variants — Stitch design */
.stat-card.stat-indigo {
    background: #eef2ff;
    border-color: #c7d2fe;
}
.stat-card.stat-blue {
    background: #dbeafe;
    border-color: #bfdbfe;
}
.stat-card.stat-amber {
    background: #fef3c7;
    border-color: #fde68a;
}
.stat-card.stat-green {
    background: #d1fae5;
    border-color: #a7f3d0;
}
.stat-card.stat-indigo .stat-number,
.stat-card.stat-blue .stat-number,
.stat-card.stat-amber .stat-number,
.stat-card.stat-green .stat-number {
    color: var(--text-main);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-subtle);
}

.stat-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    flex-shrink: 0;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Dashboard Grid (Bento/Modern) */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Mobile: 2-column bento grid */
@media (max-width: 600px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.85rem;
    }
}

.dashboard-card {
    background: var(--bg-surface);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    text-align: center;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    /* Enforce minimum touch target on mobile */
    min-width: 44px;
}

.dashboard-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.dashboard-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: var(--primary-light);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--primary);
}

.dashboard-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.dashboard-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Tables - Soft UI */
.table-container {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow-x: auto;
    /* Allow horizontal scroll */
    box-shadow: var(--shadow-sm);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    white-space: nowrap;
    /* Prevent wrapping causing tall rows, let user scroll */
}

th {
    background: #f9fafb;
    /* Soft gray header */
    padding: 1rem 0.75rem;
    /* Reduced padding */
    text-align: right;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 1rem 0.75rem;
    /* Reduced padding */
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
    font-size: 0.95rem;
}



tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background: #f8fafc;
}

.action-btn {
    min-height: 48px;
    /* WCAG 2.5.5 */
    min-width: 48px;
    padding: 0.875rem 1.25rem;
    /* Increased from 0.4rem 1rem */
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: white;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    /* Increased from 0.9rem */
}

.action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

/* Status Badges */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

.badge-new {
    background-color: var(--primary-light);
    color: var(--primary);
}

.badge-progress {
    background-color: var(--warning-bg);
    color: var(--warning);
}

.badge-resolved {
    background-color: var(--success-bg);
    color: var(--success);
}

/* Admin Sidebar Layout — Muted Slate */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg-app);
}

.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    border-left: 1px solid var(--sidebar-border);
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-brand {
    font-family: 'Rubik', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--sidebar-border);
    padding-bottom: 1.25rem;
}

.nav-link {
    font-family: 'Rubik', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.65rem 1.5rem;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: 0;
    margin-bottom: 0;
    transition: background 0.15s, color 0.15s;
    font-weight: 400;
    font-size: 0.95rem;
    position: relative;
}

.nav-link:hover {
    background-color: var(--sidebar-hover-bg);
    color: var(--sidebar-text-active);
}

.nav-link.active {
    background-color: var(--sidebar-active-bg);
    color: var(--sidebar-text-active);
    font-weight: 600;
    border-right: 3px solid var(--sidebar-accent);
}

.main-content {
    flex: 1;
    padding: 1.5rem 2rem;
    background: var(--bg-app);
    max-width: 100%;
    overflow-x: hidden;
}

/* Section Header - Responsive Flex Layout */
.section-header {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 1rem !important;
    align-items: center !important;
    justify-content: space-between !important;
}

@media (max-width: 1024px) {
    .section-header {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .tabs {
        width: 100% !important;
    }
}

/* Utilities */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

/* Popover for Inline Editing */
.popover {
    position: absolute;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    width: 280px;
    padding: 1rem;
    animation: fadeIn 0.15s ease-out;
}

.popover-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.popover-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.popover-close {
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    color: var(--text-muted);
}

.popover-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Filter Input */
.filter-input {
    width: 100%;
    padding: 0.4rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* WhatsApp Link - WCAG 2.5.5 Compliant */
.wa-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    /* Increased from 24px */
    height: 48px;
    /* Increased from 24px */
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    margin-right: 0.5rem;
    text-decoration: none;
    font-size: 1.5rem;
    /* Increased from 0.9rem for larger emoji */
    transition: transform 0.2s;
}

.wa-link:hover {
    transform: scale(1.1);
}

.teacher-info {
    position: relative;
    cursor: help;
    border-bottom: 1px dashed var(--text-muted);
}

/* PWA Install Banner */
.install-banner {
    position: fixed;
    top: -100px;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary), #0ea5e9);
    color: white;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transition: top 0.3s ease-out;
}

.install-banner.show {
    top: 0;
}

.install-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: space-between;
}

.install-banner-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.install-banner-text {
    flex: 1;
}

.install-banner-text strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.install-banner-text p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

.install-banner .btn {
    background: white;
    color: var(--primary);
    border: none;
    min-height: 44px;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
}

.install-banner .btn:hover {
    background: #f8fafc;
    transform: translateY(-1px);
}

.install-banner .btn-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.install-banner .btn-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    .install-banner-content {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .install-banner-text {
        flex: 1 1 100%;
        text-align: center;
    }

    .install-banner .btn {
        font-weight: 600;
        z-index: 9997;
        display: none;
        animation: pulse 2s infinite;
    }

    @keyframes pulse {

        0%,
        100% {
            opacity: 1;
        }

        50% {
            opacity: 0.7;
        }
    }

    /* Network Status Badge */
    .network-status {
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background: var(--success);
        box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
        z-index: 9996;
        transition: all 0.3s;
    }

    .network-status.offline {
        background: var(--danger);
        box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3);
        animation: blink 1s infinite;
    }

    @keyframes blink {

        0%,
        100% {
            opacity: 1;
        }

        50% {
            opacity: 0.5;
        }
    }

    /* Safe area handled globally at top of file — see @supports block */


    /* Responsive */
    /* Responsive & Mobile Adaptation */
    @media (max-width: 768px) {

        /* Admin Sidebar - Hide on mobile by default */
        .sidebar {
            position: fixed !important;
            top: 0;
            right: -280px !important;
            /* Hidden off-screen */
            height: 100vh;
            width: 280px;
            z-index: 1000;
            transition: right 0.3s ease;
            box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
            transform: translateX(0) !important;
        }

        .sidebar.open {
            right: 0 !important;
            /* Slide in */
        }

        /* Hamburger Menu Button */
        .menu-toggle {
            position: fixed;
            top: 1rem;
            right: 1rem;
            z-index: 1001;
            background: var(--primary);
            color: white;
            border: none;
            padding: 0.75rem;
            border-radius: var(--radius-md);
            cursor: pointer;
            font-size: 1.5rem;
            box-shadow: var(--shadow-md);
            display: block;
        }



        /* Overlay for sidebar */
        .sidebar-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 999;
        }


        .sidebar-overlay.active {
            display: block;
        }

        /* Admin main content adjustments */
        .admin-main {
            width: 100%;
            padding: 1rem;
        }

        .container {
            padding: 1rem;
        }

        .dashboard-grid {
            grid-template-columns: 1fr;
        }

        .header {
            flex-direction: column;
            text-align: center;
            gap: 1rem;
        }

        .header-actions {
            width: 100%;
            display: flex;
            justify-content: center;
            gap: 0.5rem;
        }

        /* Admin Layout Mobile */
        .admin-layout {
            flex-direction: column;
            padding-bottom: 70px;
            /* Space for bottom nav */
        }

        .sidebar {
            display: none;
            /* Hide Desktop Sidebar */
        }

        .main-content {
            padding: 1rem;
        }

        /* Mobile Bottom Navigation - Glassmorphism */
        .mobile-nav {
            display: flex;
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: rgba(255, 255, 255, 0.85); /* Semi-transparent */
            backdrop-filter: blur(12px); /* Glass effect */
            -webkit-backdrop-filter: blur(12px); /* Safari support */
            border-top: 1px solid rgba(0, 0, 0, 0.05); /* Softer border */
            justify-content: space-around;
            padding: 0.5rem;
            z-index: 1000;
            box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
        }

        .mobile-nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-decoration: none;
            color: #94a3b8; /* text-muted softer */
            font-size: 0.75rem;
            gap: 2px;
            height: 100%;
            /* WCAG 2.5.5 + thumb zone */
            padding: 4px 0;
            border-radius: var(--radius-sm);
            flex: 1;
            min-height: auto;
            transition: color 0.2s;
        }

        .mobile-nav-item.active {
            color: var(--primary);
            font-weight: 600;
        }

        .mobile-nav-icon {
            font-size: 2.2rem;
            line-height: 1;
            display: block;
            margin-bottom: 4px;
        }

        /* Card View for Tables */
        table,
        thead,
        tbody,
        th,
        td,
        tr {
            display: block;
        }

        thead tr {
            position: absolute;
            top: -9999px;
            left: -9999px;
        }

        tr {
            border: 1px solid var(--border);
            margin-bottom: 1rem;
            border-radius: var(--radius-md);
            background: white;
            padding: 1rem;
            box-shadow: var(--shadow-sm);
        }

        td {
            /* Behave  like a "row" */
            border: none;
            border-bottom: 1px solid #eee;
            position: relative;
            padding-right: 50%;
            padding-left: 0;
            text-align: left;
            /* Content aligns left */
            min-height: 2.5rem;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            white-space: normal;
            /* Allow text wrapping */
        }

        td:before {
            /* Now like a table header */
            position: absolute;
            right: 0;
            /* Label aligns right */
            width: 45%;
            padding-right: 0;
            white-space: nowrap;
            font-weight: 600;
            color: var(--text-muted);
            text-align: right;
            content: attr(data-label);
        }

        td:last-child {
            border-bottom: 0;
            justify-content: center;
            padding-right: 0;
        }

        td:last-child:before {
            display: none;
        }

        /* Forms - Enhanced for Mobile */
        .form-control {
            font-size: 16px;
            /* Prevent zoom on iOS */
            min-height: 48px;
            /* Larger touch target */
            padding: 0.75rem;
        }

        /* Buttons - Mobile Optimized */
        .btn,
        .action-btn {
            width: 100%;
            min-height: 44px !important;
            /* Standard touch target */
            padding: 0.75rem 1rem !important;
            /* Adjusted padding */
            font-size: 1rem !important;
        }

        /* Tabs - Scrollable on mobile */
        .tabs {
            width: 100%;
            overflow-x: auto;
            white-space: nowrap;
            -webkit-overflow-scrolling: touch;
            justify-content: start;
        }

        .tab {
            flex: 0 0 auto;
            min-height: 52px;
            /* Mobile-friendly */
        }
    }

    /* My Requests Page Specifics */
    .request-card {
        border-right: 5px solid var(--border);
        transition: all 0.3s ease;
    }

    .request-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
    }

    .request-card.IT_Tickets {
        border-right-color: #667eea;
    }

    .request-card.Maintenance {
        border-right-color: #f5576c;
    }

    .request-card.Transport {
        border-right-color: #fa709a;
    }

    .request-card.Supplies {
        border-right-color: #00d4aa;
    }

    .badge-IT_Tickets {
        background: #667eea;
        color: white;
    }

    .badge-Maintenance {
        background: #f5576c;
        color: white;
    }

    .badge-Transport {
        background: #fa709a;
        color: white;
    }

    .badge-Supplies {
        background: #00d4aa;
        color: white;
    }

    /* Transportation Status Badges */
    .badge-התקבל {
        background: #3b82f6;
        color: white;
    }

    .badge-הוזמן {
        background: #eab308;
        color: white;
    }

    .badge-בוצע {
        background: #22c55e;
        color: white;
    }

    .badge-בוטל {
        background: #ef4444;
        color: white;
    }

    /* Tabs - Segmented Control Style */
    .tabs {
        display: flex;
        flex-wrap: wrap;
        background: #f1f5f9;
        /* Slate 100 */
        padding: 0.35rem;
        border-radius: var(--radius-lg);
        gap: 0.25rem;
        margin-bottom: 2rem;
        border: 1px solid var(--border);
    }

    .tab {
        min-height: 48px;
        /* WCAG 2.5.5 */
        padding: 0.875rem 1.5rem;
        /* Increased from 0.65rem 1.25rem */
        border: none;
        background: transparent;
        border-radius: var(--radius-md);
        font-weight: 500;
        color: var(--text-muted);
        cursor: pointer;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 1rem;
        /* Increased from 0.95rem */
    }

    .tab:hover {
        color: var(--text-main);
        background: rgba(255, 255, 255, 0.5);
    }

    .tab.active {
        background: white;
        color: var(--primary);
        box-shadow: var(--shadow-sm);
        font-weight: 600;
    }

    /* Filter Buttons Container - Responsive Grid */
    .filter-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    /* Status Filter Buttons - Larger and Better Styled */
    .filter-btn {
        padding: 0.75rem 1.5rem;
        border: 2px solid var(--border);
        border-radius: var(--radius-lg);
        background: white;
        color: var(--text-main);
        cursor: pointer;
        transition: all 0.2s ease;
        font-size: 1rem;
        font-weight: 600;
        min-height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-shadow: var(--shadow-sm);
    }

    .filter-btn:hover {
        background: var(--primary-light);
        border-color: var(--primary);
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

    .filter-btn.active {
        background: var(--primary);
        color: white;
        border-color: var(--primary);
        box-shadow: var(--shadow-md);
    }

    /* Type Filter Buttons - Larger with Icons */
    .type-filter-btn {
        padding: 0.875rem 1.25rem;
        border: 2px solid var(--border);
        border-radius: var(--radius-lg);
        background: linear-gradient(to bottom, white, #fafbfc);
        color: var(--text-main);
        cursor: pointer;
        transition: all 0.25s ease;
        font-size: 1rem;
        font-weight: 600;
        min-height: 52px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        box-shadow: var(--shadow-sm);
        white-space: nowrap;
    }

    .type-filter-btn:hover {
        background: linear-gradient(to bottom, var(--primary-light), #dbeafe);
        border-color: var(--primary);
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
        color: var(--primary);
    }

    .type-filter-btn.active {
        background: var(--primary-gradient);
        color: white;
        border-color: var(--primary-hover);
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
        transform: translateY(-1px);
    }

    /* Mobile Optimization */
    @media (max-width: 768px) {
        .filter-buttons {
            gap: 0.5rem;
        }

        .filter-btn {
            padding: 0.625rem 1rem;
            font-size: 0.9rem;
            min-height: 44px;
            flex: 1 1 auto;
            min-width: 80px;
        }

        .type-filter-btn {
            padding: 0.75rem 1rem;
            font-size: 0.875rem;
            min-height: 48px;
            flex: 1 1 calc(50% - 0.25rem);
            max-width: calc(50% - 0.25rem);
        }

        /* "All" button takes full width on mobile */
        .type-filter-btn[data-type="all"] {
            flex: 1 1 100%;
            max-width: 100%;
        }
    }

    /* Extra small screens */
    @media (max-width: 480px) {
        .type-filter-btn {
            font-size: 0.8rem;
            padding: 0.625rem 0.75rem;
        }
    }

    .empty-state {
        text-align: center;
        padding: 3rem;
        color: var(--text-light);
    }

    .empty-state-icon {
        font-size: 4rem;
        margin-bottom: 1rem;
    }


    /* Form Sections */
    .form-section-title {
        font-size: 1.1rem;
        color: var(--primary);
        border-bottom: 2px solid var(--primary-light);
        padding-bottom: 0.5rem;
        margin-bottom: 1rem;
        margin-top: 1.5rem;
        font-weight: 600;
    }

    /* Skeleton Loaders */
    .skeleton-loading {
        pointer-events: none;
    }

    .skeleton-text,
    .skeleton-icon {
        background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
        background-size: 200% 100%;
        animation: shimmer 1.5s infinite;
        border-radius: 4px;
    }

    .skeleton-icon {
        width: 40px;
        height: 40px;
        border-radius: 50%;
    }

    @keyframes shimmer {
        0% {
            background-position: 200% 0;
        }

        100% {
            background-position: -200% 0;
        }
    }

}


/* Hide Mobile Nav on Desktop */
@media (min-width: 769px) {
    .mobile-nav {
        display: none;
    }
}

/* Phase 3: Audio Recording & Photo Upload Enhancements */

/* Audio Preview */
.audio-preview-container {
    margin-top: 1rem;
}

.audio-preview {
    background: var(--bg-app);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.audio-player {
    flex: 1;
    min-width: 200px;
}

.audio-player audio {
    width: 100%;
    height: 40px;
}

.btn-delete-audio,
.btn-delete-photo,
.btn-retake {
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-delete-audio:hover,
.btn-delete-photo:hover {
    background: var(--danger-bg);
    border-color: var(--danger);
    color: var(--danger);
    transform: translateY(-1px);
}

.btn-retake:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.btn-voice-audio,
.btn-voice-text {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    margin-left: 0.5rem;
}

.btn-voice-audio.recording,
.btn-voice-text.recording {
    background: var(--danger-bg);
    border-color: var(--danger);
    color: var(--danger);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Photo Upload Enhancements */
.photo-preview-container {
    margin-top: 1rem;
}

.image-preview-wrapper {
    position: relative;
    display: inline-block;
}

.preview-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    display: block;
}

.preview-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    justify-content: center;
}

/* Request Thumbnails */
.request-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid var(--border);
}

.request-thumbnail:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

/* Image Lightbox Modal */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s;
}

.modal-backdrop {
    background: rgba(0, 0, 0, 0.95);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 2rem;
}

.image-modal img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.image-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.image-modal-close:hover {
    background: var(--danger);
    color: white;
    transform: rotate(90deg);
}

.voice-options {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

/* Audio/Photo indicators in request table */
.attachment-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.attachment-indicator svg {
    width: 16px;
    height: 16px;
}

/* ============================================
   SORTABLE HEADERS & FILTERING 
   ============================================ */

/* Sortable Table Headers */
.sortable-header {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.sortable-header:hover {
    background-color: #f3f4f6 !important;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.sort-arrows {
    display: inline-flex;
    flex-direction: column;
    gap: 0;
    font-size: 0.7rem;
    opacity: 0.3;
    transition: opacity 0.2s;
}

.sortable-header:hover .sort-arrows {
    opacity: 0.6;
}

.sort-arrows .active {
    opacity: 1;
    color: var(--primary);
    font-weight: bold;
}

/* Clickable Statistics Cards */
.stat-card.active {
    border: 2px solid var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
    transform: translateY(-2px);
}

.stat-card:active {
    transform: translateY(0);
}

/* WhatsApp Column Styles - Modern Design */
.whatsapp-cell {
    width: 60px;
    text-align: center;
    padding: 0.75rem 0.5rem !important;
}

.wa-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #25D366 0%, #1EBE5A 100%);
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

.wa-icon-link:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.5);
}

.wa-icon {
    color: white;
}

/* Modern Edit Icons - Pencil Style */
.edit-icon {
    opacity: 0.6;
    margin-right: 0.35rem;
    transition: all 0.2s ease;
}

.status-badge,
.urgency-badge,
.team-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.status-badge:hover .edit-icon,
.urgency-badge:hover .edit-icon,
.team-badge:hover .edit-icon {
    opacity: 1;
    transform: rotate(15deg);
}

/* Status Badge Styles */
.status-open {
    background: #FEF3C7 !important;
    color: #D97706 !important;
}

.status-progress {
    background: #DBEAFE !important;
    color: #2563EB !important;
}

.status-resolved {
    background: #DCFCE7 !important;
    color: #16A34A !important;
}

/* Urgency Badge */
.urgency-badge {
    font-weight: 600;
}

/* Team Badge */
.team-badge {
    color: #4B5563;
}

/* ============================================
   WAITING TIME BADGES & ROW COLORS
   ============================================ */

/* Waiting Time Cell */
.waiting-time-cell {
    text-align: center;
    padding: 0.75rem !important;
}

/* Waiting Time Badges */
.waiting-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.waiting-green {
    background: #DCFCE7;
    color: #16A34A;
    border: 1px solid #86EFAC;
}

.waiting-yellow {
    background: #FEF3C7;
    color: #D97706;
    border: 1px solid #FDE68A;
}

.waiting-orange {
    background: #FFEDD5;
    color: #EA580C;
    border: 1px solid #FED7AA;
    font-weight: 800;
}

.waiting-red {
    background: #FEE2E2;
    color: #DC2626;
    border: 1px solid #FCA5A5;
    font-weight: 800;
    animation: pulse-danger 2s ease-in-out infinite;
}

.waiting-completed {
    background: #F3F4F6;
    color: #6B7280;
    border: 1px solid #E5E7EB;
}

@keyframes pulse-danger {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.85;
        transform: scale(1.02);
    }
}

/* Row Background Colors Based on Waiting Time */
.row-waiting-yellow {
    background-color: #FFFCF5 !important;
}

.row-waiting-yellow:hover {
    background-color: #FEF9E7 !important;
}

.row-waiting-orange {
    background-color: #FFF8F1 !important;
}

.row-waiting-orange:hover {
    background-color: #FFF3E8 !important;
}

.row-waiting-red {
    background-color: #FEF5F5 !important;
    border-right: 3px solid #DC2626 !important;
}

.row-waiting-red:hover {
    background-color: #FEE !important;
}

/* Subtle glow effect for urgent items */
.row-waiting-red td {
    position: relative;
}

/* ============================================
   MODAL STYLES
   ============================================ */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-out;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.modal-close {
    font-size: 2rem;
    font-weight: 300;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    background: var(--danger-bg);
    color: var(--danger);
    transform: rotate(90deg);
}

/* Modal Form Styles */
.modal form .form-group {
    margin-bottom: 1.5rem;
}

.modal form .form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-main);
}

.modal form .form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.2s;
}

.modal form .form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.modal form select.form-control {
    cursor: pointer;
}

/* Mobile Modal Adjustments */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: 1.5rem;
        max-height: 85vh;
    }

    .modal-header h2 {
        font-size: 1.25rem;
    }
}


.pull-text {
    display: none !important;
}

/* Modern Back Button (Option 5) - Global */
.btn-back {
    padding: 0.875rem 1.75rem;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    border-radius: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
    border: none;
}

.btn-back:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.6);
    color: white;
}

.btn-back svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

/* ============================================
   MODERN REQUEST CARDS - MY REQUESTS PAGE
   ============================================ */

/* Modern Request Card Container */
.request-card-modern {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-right: 4px solid var(--primary);
}

.request-card-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Card Header */
.request-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.request-card-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.request-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ID Badge */
.request-id-badge {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
}

/* Type Badge */
.request-type-badge-modern {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
}

/* Status Badge */
.status-badge-modern {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    white-space: nowrap;
}

/* Status Colors */
.status-badge-modern.status-פתוח,
.status-badge-modern.status-New {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge-modern.status-בטיפול,
.status-badge-modern.status-Operational_Approved {
    background: #fef3c7;
    color: #92400e;
}

.status-badge-modern.status-נפתר,
.status-badge-modern.status-Closed {
    background: #d1fae5;
    color: #065f46;
}

.status-badge-modern.status-Awaiting_Docs {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge-modern.status-פעיל {
    background: #d1fae5;
    color: #065f46;
}

.status-badge-modern.status-נוצל {
    background: #e0e7ff;
    color: #3730a3;
}

.status-badge-modern.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge-modern.status-צפוי {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge-modern.status-arrived {
    background: #d1fae5;
    color: #065f46;
}

.status-badge-modern.status-Rejected,
.status-badge-modern.status-נדחה {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge-modern.status-Approved,
.status-badge-modern.status-אושר {
    background: #d1fae5;
    color: #065f46;
}

.status-badge-modern.status-Pending,
.status-badge-modern.status-ממתין {
    background: #fef3c7;
    color: #92400e;
}

.status-badge-modern.status-Open,
.status-badge-modern.status-In_Progress,
.status-badge-modern.status-בטיפול {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge-modern.status-Completed,
.status-badge-modern.status-הושלם {
    background: #d1fae5;
    color: #065f46;
}

.status-badge-modern.status-Cancelled,
.status-badge-modern.status-בוטל {
    background: #fee2e2;
    color: #991b1b;
}

/* Date Badge */
.date-badge {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

/* Details Section */
.request-card-essential {
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
    margin-top: 0.75rem;
}

.request-card-details {
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
    margin-top: 0.75rem;
}

.images-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.detail-item {
    font-size: 0.9rem;
    line-height: 1.6;
}

.detail-item strong {
    color: #475569;
    font-weight: 600;
}

/* Toggle Button */
.toggle-details-btn {
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    transition: all 0.2s ease;
}

.toggle-details-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* Awaiting Docs Alert */
.awaiting-docs-alert {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 0.5rem;
}

.awaiting-docs-alert p {
    color: #991b1b;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .request-card-modern {
        padding: 0.875rem;
    }

    .request-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .request-card-meta {
        width: 100%;
        justify-content: space-between;
    }

    .details-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .detail-item {
        font-size: 0.85rem;
    }
}

/* --- Trip Management Table (Option 3 - Compact Grid) --- */
.opt3-table {
    width: 100%;
    border-collapse: collapse;
}

.opt3-table th {
    background: #f8fafc;
    padding: 1rem;
    text-align: right;
    border-bottom: 2px solid #e2e8f0;
    font-weight: 600;
    color: var(--text-muted);
}

.opt3-table td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
    color: var(--text-main);
}

.opt3-table tr:hover {
    background-color: #f8fafc;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    width: fit-content;
    min-width: 200px;
}

.status-box {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    text-align: center;
    color: white;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================
   GLOBAL FORM INPUT OVERRIDE
   Beats glassmorphism.css !important rules for all pages.
   Applied to every element using the .clean-input class.
   ============================================================ */
.clean-input,
input.clean-input,
select.clean-input,
textarea.clean-input {
    width: 100% !important;
    background-color: #e5e8ed !important;
    border: 2px solid transparent !important;
    border-radius: 0.75rem !important;
    padding: 0.75rem 1rem !important;
    color: #181c20 !important;
    font-family: inherit !important;
    font-size: 1rem !important;
    transition: background-color 0.2s, border-color 0.2s !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    outline: none !important;
}

.clean-input:focus,
input.clean-input:focus,
select.clean-input:focus,
textarea.clean-input:focus {
    background-color: #ffffff !important;
    border: 2px solid #00488d !important;
    box-shadow: none !important;
    outline: none !important;
}

.clean-input:disabled,
input.clean-input:disabled,
select.clean-input:disabled,
textarea.clean-input:disabled {
    background-color: #f5f6f8 !important;
    border: 2px solid #e5e8ed !important;
    color: #9ea5b1 !important;
    cursor: not-allowed !important;
}