:root {
    /* iOS System Colors */
    --bg-app: #F2F2F7;
    --bg-card: #FFFFFF;
    --text-primary: #1C1C1E;
    --text-secondary: #8E8E93;
    --accent-blue: #007AFF;
    --accent-green: #34C759;
    --accent-orange: #FF9500;
    --accent-red: #FF3B30;
    --separator: #C6C6C8;

    /* Metrics */
    --radius-l: 16px;
    --radius-m: 12px;
    --radius-s: 8px;
    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 8px 16px rgba(0, 0, 0, 0.08);

    /* Font */
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Dark Mode Theme */
[data-theme="dark"] {
    --bg-app: #1C1C1E;
    --bg-card: #2C2C2E;
    --text-primary: #FFFFFF;
    --text-secondary: #8E8E93;
    --separator: #48484A;
    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 16px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .sidebar {
    background: rgba(44, 44, 46, 0.95);
    border-right-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .header {
    background: rgba(28, 28, 30, 0.9);
}

[data-theme="dark"] .nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .modal {
    background: var(--bg-card);
}

[data-theme="dark"] .form-input {
    background: #3A3A3C;
    border-color: #48484A;
    color: white;
}

[data-theme="dark"] .form-input:focus {
    border-color: var(--accent-blue);
}

[data-theme="dark"] .list-item:hover {
    background: #3A3A3C;
}

[data-theme="dark"] .data-table thead {
    background-color: #2C2C2E;
}

[data-theme="dark"] .data-table td {
    border-bottom-color: #48484A;
    color: white;
}

[data-theme="dark"] .tabs {
    background: #3A3A3C;
}

[data-theme="dark"] .tab-btn.active {
    background: #48484A;
    color: white;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-stack);
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-app);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    font-size: 16px;
}

/* Layout */
#app {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Glassmorphism Sidebar */
.sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    padding: 24px;
    z-index: 10;
}

.sidebar-header {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

.brand-logo {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-s);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 8px;
    border: none;
    background: transparent;
    border-radius: var(--radius-m);
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-size: 15px;
}

.nav-item:hover {
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-blue);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 122, 255, 0.2);
}

.user-profile {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--separator);
}

.avatar {
    width: 40px;
    height: 40px;
    background: var(--separator);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
}

.info {
    display: flex;
    flex-direction: column;
}

.info .name {
    font-weight: 600;
    font-size: 14px;
}

.info .role {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.header {
    height: 80px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(242, 242, 247, 0.8);
    /* Match app bg but translucent */
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 5;
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
}

.content-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 20px 32px 40px 32px;
}

/* Cards & Widgets */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 24px;
    margin-bottom: 32px;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius-l);
    padding: 24px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.stat-card h3 {
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-card .value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
}

.alert-card {
    border-left: 4px solid var(--accent-orange);
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.08), rgba(255, 149, 0, 0.02));
    border-radius: var(--radius-m);
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(255, 149, 0, 0.1);
}

.alert-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(255, 149, 0, 0.15);
}

.alert-card h4 {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
}

.alert-card p {
    color: var(--accent-orange);
    font-weight: 500;
}

/* Registration List */
.list-group {
    background: var(--bg-card);
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--separator);
    cursor: pointer;
    transition: background 0.15s;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item:hover {
    background: #F9F9F9;
}

.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge.pending {
    background: #FFEDD5;
    color: #9A3412;
}

.badge.progress {
    background: #DBEAFE;
    color: #1E40AF;
}

.badge.completed {
    background: #DCFCE7;
    color: #166534;
}

/* Stepper For Registration Flow */
.stepper-container {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.step-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--radius-m);
    box-shadow: var(--shadow-soft);
    opacity: 0.6;
}

.step-item.active {
    opacity: 1;
    border: 1px solid var(--accent-blue);
}

.step-item.completed {
    opacity: 1;
    border-left: 4px solid var(--accent-green);
}

.step-number {
    width: 32px;
    height: 32px;
    background: #E5E5EA;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 16px;
}

.step-item.active .step-number {
    background: var(--accent-blue);
    color: white;
}

.step-item.completed .step-number {
    background: var(--accent-green);
    color: white;
}

.btn {
    padding: 10px 20px;
    border-radius: var(--radius-s);
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
}

.btn-icon {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Utilities */
.hidden {
    display: none !important;
}

.mt-4 {
    margin-top: 16px;
}

.text-danger {
    color: var(--accent-red);
}

/* Directory Search Styles */
.search-container {
    background: #F2F2F7;
    padding: 24px;
    border-radius: var(--radius-l);
    margin-bottom: 24px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.search-inputs {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.search-field {
    flex: 1;
    background: white;
    border: 1px solid #E5E5EA;
    border-radius: var(--radius-s);
    padding: 12px 16px;
    font-size: 14px;
}

.search-actions {
    display: flex;
    gap: 12px;
}

.btn-search {
    background: var(--accent-blue);
    color: white;
    padding: 10px 24px;
    border-radius: var(--radius-s);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.btn-reset {
    background: var(--accent-blue);
    color: white;
    padding: 10px 24px;
    border-radius: var(--radius-s);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
}

/* Detailed Card Styles */
.directory-card {
    background: #F9F9F9;
    border-radius: var(--radius-l);
    padding: 24px;
    margin-bottom: 16px;
    border: none;
}

.directory-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1C1C1E;
    margin-bottom: 12px;
}

.directory-info {
    color: #48484A;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 8px;
}

.directory-meta {
    display: flex;
    gap: 32px;
    margin-top: 16px;
    color: #636366;
    font-size: 14px;
}

.results-count {
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

/* Modal Styles */
/* Fix Layering: Vehicle Edit Modal must be higher than Management Modal */
#vehicle-modal {
    z-index: 1100 !important;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal {
    background: white;
    width: 100%;
    max-width: 600px;
    border-radius: var(--radius-l);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    padding: 32px;
    transform: scale(0.95);
    transition: transform 0.2s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 700;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #E5E5EA;
    border-radius: var(--radius-s);
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-input:focus {
    border-color: var(--accent-blue);
    outline: none;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

/* TABS / SEGMENTED CONTROL DESIGN */
.tabs {
    display: flex;
    background: #E5E5EA;
    /* iOS Segmented Control Bg */
    padding: 4px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.tab-btn:hover {
    color: black;
}

.tab-btn.active {
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    /* Subtle lift */
    color: black;
}

/* Auth Page Styles */
body.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #F2F2F7;
}

.auth-card {
    background: white;
    padding: 32px;
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Admin Only Elements */
body:not(.is-admin) .admin-only {
    display: none !important;
}

/* Profile Menu Popover */
.user-profile {
    position: relative;
    cursor: pointer;
}

.profile-menu {
    position: absolute;
    bottom: 100%;
    /* Above the profile section */
    left: 0;
    width: 100%;
    margin-bottom: 12px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 8px;
    z-index: 100;
    animation: slideUp 0.2s ease-out;
}

.profile-menu.hidden {
    display: none;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-primary);
    transition: background 0.2s;
}

.menu-item:hover {
    background: #F2F2F7;
}

.menu-item i {
    width: 16px;
    height: 16px;
}

.menu-item.text-red {
    color: var(--accent-red);
}

.menu-item.text-red:hover {
    background: rgba(255, 59, 48, 0.1);
}

.menu-divider {
    height: 1px;
    background: #E5E5EA;
    margin: 4px 0;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    /* Allow clicking through container */
}

.toast {
    background: white;
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    font-size: 14px;
    font-weight: 500;
    animation: slideInRight 0.3s ease-out forwards;
    pointer-events: auto;
    /* Re-enable clicks on toast */
    border-left: 4px solid var(--accent-blue);
}

.toast.success {
    border-left-color: var(--accent-green);
}

.toast.error {
    border-left-color: var(--accent-red);
}

.toast.info {
    border-left-color: var(--accent-blue);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(20px);
    }
}

/* Printing Styles */
@media print {
    @page {
        margin: 0;
        size: auto;
    }

    body {
        margin: 1cm;
    }

    .sidebar,
    .header,
    .btn,
    .badge,
    .toast,
    .admin-only,
    .profile-menu {
        display: none !important;
    }

    body,
    #app {
        height: auto;
        overflow: visible;
        background: white;
    }

    .main-content {
        overflow: visible;
        height: auto;
    }

    .content-scroll {
        overflow: visible;
        height: auto;
        padding: 0;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }

    .step-item {
        page-break-inside: avoid;
        border: 1px solid #eee;
        opacity: 1;
    }

    h2,
    h3 {
        color: black;
    }

    /* Header for Report */
    .print-header {
        display: block !important;
        text-align: center;
        margin-bottom: 20px;
        border-bottom: 2px solid black;
        padding-bottom: 10px;
    }

    .print-header h1 {
        font-size: 24px;
        font-weight: bold;
        margin: 0;
    }

    .print-header p {
        font-size: 12px;
        color: #666;
        margin: 5px 0 0;
    }
}

/* Hide print header on screen */
.print-header {
    display: none;
}

/* Data Table Styles */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 10px;
    background: white;
    border-radius: 8px;
    /* Rounded corners for outer table */
    overflow: hidden;
    /* Clip corners */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    /* Subtle shadow */
    font-size: 14px;
}

.data-table thead {
    background-color: #F2F2F7;
    /* iOS Light Gray */
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #636366;
    /* iOS Gray Text */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #E5E5EA;
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #E5E5EA;
    color: #1c1c1e;
    vertical-align: middle;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover {
    background-color: #f9f9f9;
}

/* Alignment Helpers */
.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.text-gray {
    color: #8e8e93;
}

.font-mono {
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    font-size: 13px;
}

/* Form Validation Styles */
.form-input.input-error {
    border-color: var(--accent-red) !important;
    background-color: rgba(255, 59, 48, 0.05);
}

.form-input.input-error:focus {
    border-color: var(--accent-red);
    box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.1);
}

.field-error-message {
    color: var(--accent-red);
    font-size: 12px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.field-error-message::before {
    content: "⚠";
    font-size: 11px;
}

/* Reminder Badge & Panel */
.reminder-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--accent-red);
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

#reminder-btn {
    position: relative;
}

.reminder-panel {
    position: fixed;
    top: 80px;
    right: 24px;
    width: 320px;
    max-height: 400px;
    background: var(--bg-card);
    border-radius: var(--radius-l);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    overflow: hidden;
}

.reminder-panel.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.reminder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--separator);
}

.reminder-header h4 {
    margin: 0;
    font-size: 16px;
}

.reminder-list {
    max-height: 320px;
    overflow-y: auto;
    padding: 8px;
}

.reminder-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-s);
    transition: background 0.2s;
}

.reminder-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

.reminder-item i {
    width: 20px;
    height: 20px;
    color: var(--accent-orange);
    flex-shrink: 0;
    margin-top: 2px;
}

.reminder-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.reminder-content strong {
    font-size: 13px;
    color: var(--text-primary);
}

.reminder-content span {
    font-size: 12px;
    color: var(--text-secondary);
}

.reminder-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.reminder-empty i {
    width: 40px;
    height: 40px;
    color: var(--accent-green);
    margin-bottom: 12px;
}

.reminder-empty p {
    font-size: 14px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #app {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: fixed;
        top: 0;
        left: -100%;
        height: 100vh;
        z-index: 100;
        transition: left 0.3s ease;
    }

    .sidebar.open {
        left: 0;
    }

    .main-content {
        width: 100%;
    }

    .header {
        padding: 0 16px;
    }

    .content-scroll {
        padding: 16px;
    }

    .grid-container {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .modal {
        max-width: 95%;
        max-height: 95vh;
        margin: 16px;
        padding: 20px;
    }

    .reminder-panel {
        right: 10px;
        left: 10px;
        width: auto;
    }

    /* Table horizontal scroll */
    .data-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Hamburger menu button */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .hamburger-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.sidebar-overlay.active {
    display: block;
}

/* Chart Grid Styles */
.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background: var(--bg-card);
    border-radius: var(--radius-l);
    padding: 24px;
    box-shadow: var(--shadow-soft);
}

.chart-card h4 {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

.chart-card canvas {
    max-height: 200px;
}

/* Summary Widget Styles */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.summary-widget {
    background: var(--bg-card);
    border-radius: var(--radius-m);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-soft);
}

.summary-widget i {
    width: 40px;
    height: 40px;
    padding: 10px;
    border-radius: var(--radius-s);
    color: white;
}

.summary-widget.blue i {
    background: var(--accent-blue);
}

.summary-widget.green i {
    background: var(--accent-green);
}

.summary-widget.orange i {
    background: var(--accent-orange);
}

.summary-widget.red i {
    background: var(--accent-red);
}

.summary-info h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.summary-info span {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Offline Banner */
.offline-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #FF6B6B, #FF3B30);
    color: white;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    z-index: 2000;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.offline-banner.visible {
    transform: translateY(0);
}

.offline-banner i {
    width: 18px;
    height: 18px;
}

/* Alert Groups */
.alert-groups {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alert-group {
    background: var(--bg-card);
    border-radius: var(--radius-m);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.alert-group-header {
    display: flex;
    align-items: center;
    padding: 16px;
    cursor: pointer;
    transition: background 0.2s;
    border-left: 4px solid var(--accent-orange);
}

.alert-group-header:hover {
    background: rgba(0, 0, 0, 0.02);
}

.alert-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    font-weight: 600;
    color: var(--text-primary);
}

.alert-group-title i {
    width: 20px;
    height: 20px;
    color: var(--accent-orange);
}

.alert-group-badge {
    background: var(--accent-orange);
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    margin-right: 12px;
}

.alert-group-header .chevron {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    transition: transform 0.2s;
}

.alert-group.collapsed .chevron {
    transform: rotate(-90deg);
}

.alert-group-content {
    padding: 0 16px 16px 16px;
    max-height: 300px;
    overflow-y: auto;
}

.alert-group.collapsed .alert-group-content {
    display: none;
}

.alert-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(255, 149, 0, 0.05);
    border-radius: var(--radius-s);
    margin-bottom: 6px;
}

.alert-item:last-child {
    margin-bottom: 0;
}

.alert-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.alert-date {
    font-size: 12px;
    color: var(--accent-orange);
    font-weight: 500;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-tab:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.filter-tab.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
}