﻿/* ============================================================
   ZIMAURIC MULTIPOS — Settings Page Styles
   Design: Refined Utilitarian — clean dark sidebar, crisp tables,
   confident typography, subtle depth
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Mono:wght@400;500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@300;400;500;600;700&display=swap');

:root {
    /* Core palette */
    --color-bg: linear-gradient(135deg, #f5f7fa 0%, #e4e9f2 100%);
    --color-surface: #FFFFFF;
    --color-surface-2: #F9FAFB;
    --color-border: #E2E5EA;
    --color-border-light: #EEF0F3;
    /* Sidebar */
    --sidebar-bg: #1A1D23;
    --sidebar-active-bg: #252930;
    --sidebar-hover-bg: #20242B;
    --sidebar-text: #8A8F9C;
    --sidebar-text-active: #FFFFFF;
    --sidebar-accent: #3B82F6;
    /* Text */
    --text-primary: #111318;
    --text-secondary: #5A6172;
    --text-muted: #9299A8;
    /* Brand */
    --accent: #3B82F6;
    --accent-dark: #2563EB;
    --accent-light: #EFF6FF;
    --accent-glow: rgba(59, 130, 246, 0.15);
    /* Settings page aliases (indigo brand color used by Settings.razor.css gradients) */
    --primary: #4F46E5;
    --card-bg: var(--color-surface);
    --text-dark: var(--text-primary);
    --text-medium: var(--text-secondary);
    --text-light: var(--text-muted);
    /* Status */
    --status-active-bg: #DCFCE7;
    --status-active-text: #15803D;
    --status-inactive-bg: #F3F4F6;
    --status-inactive-text: #6B7280;
    /* Danger */
    --danger: #EF4444;
    --danger-light: #FEF2F2;
    --danger-border: #FECACA;
    /* Success */
    --success: #22C55E;
    --success-light: #F0FDF4;
    /* Spacing */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.06);
    --shadow-modal: 0 24px 64px rgba(0,0,0,0.2), 0 8px 16px rgba(0,0,0,0.1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    font-family: 'DM Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e9f2 100%);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    max-width: 100%;
}

/* ─── Main Content ─────────────────────────────────────────── */

/* ─── Header ───────────────────────────────────────────────── */

.header-section {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 28px 36px 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .header-section h1 {
        font-size: 22px;
        font-weight: 700;
        color: var(--text-primary);
        letter-spacing: -0.4px;
        display: flex;
        align-items: center;
        gap: 10px;
    }

        .header-section h1 i {
            color: var(--accent);
            font-size: 20px;
        }

    .header-section p {
        font-size: 13.5px;
        color: var(--text-secondary);
        font-weight: 400;
        margin-left: 0;
    }

/* ─── Settings Layout ──────────────────────────────────────── */

.settings-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: calc(100vh - 85px);
}

/* ─── Sidebar ──────────────────────────────────────────────── */

.settings-sidebar {
    background: var(--sidebar-bg);
    padding: 20px 0;
    position: sticky;
    top: 0;
    height: calc(100vh - 85px);
    overflow-y: auto;
    border-right: 1px solid rgba(255,255,255,0.04);
    scrollbar-width: thin;
    scrollbar-color: #2E333D transparent;
}

    .settings-sidebar::-webkit-scrollbar {
        width: 4px;
    }

    .settings-sidebar::-webkit-scrollbar-thumb {
        background: #2E333D;
        border-radius: 4px;
    }

.settings-nav {
    list-style: none;
    padding: 0 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--sidebar-text);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    letter-spacing: 0.1px;
}

    .settings-nav-item i {
        font-size: 15px;
        width: 18px;
        flex-shrink: 0;
        transition: color 0.15s;
    }

    .settings-nav-item:hover {
        background: var(--sidebar-hover-bg);
        color: #C8CBD4;
    }

    .settings-nav-item.active {
        background: var(--sidebar-active-bg);
        color: var(--sidebar-text-active);
        position: relative;
    }

        .settings-nav-item.active i {
            color: var(--sidebar-accent);
        }

        .settings-nav-item.active::before {
            content: '';
            position: absolute;
            left: 0;
            top: 6px;
            bottom: 6px;
            width: 3px;
            background: var(--sidebar-accent);
            border-radius: 0 3px 3px 0;
        }

/* ─── Settings Content ─────────────────────────────────────── */

.settings-content {
    padding: 32px 36px;
    overflow-y: auto;
}

.settings-section {
    max-width: none;
    animation: fadeSlideIn 0.2s ease;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border-light);
}

    .section-header h2 {
        font-size: 18px;
        font-weight: 700;
        color: var(--text-primary);
        letter-spacing: -0.3px;
        display: flex;
        align-items: center;
        gap: 9px;
        margin-bottom: 4px;
    }

        .section-header h2 i {
            color: var(--accent);
            font-size: 17px;
        }

    .section-header p {
        font-size: 13px;
        color: var(--text-muted);
        margin-left: 0;
    }

/* ─── Toolbar ──────────────────────────────────────────────── */

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ─── Search Box ───────────────────────────────────────────── */

.search-box {
    height: 38px;
    padding: 0 12px 0 36px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239299A8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") no-repeat 11px center;
    font-family: inherit;
    font-size: 13.5px;
    color: var(--text-primary);
    min-width: 220px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

    .search-box:focus {
        outline: none;
        border-color: var(--accent);
        box-shadow: 0 0 0 3px var(--accent-glow);
    }

    .search-box::placeholder {
        color: var(--text-muted);
    }

/* ─── Buttons ──────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    height: 38px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    border: 1.5px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    text-decoration: none;
    letter-spacing: 0.1px;
}

    .btn i {
        font-size: 14px;
    }

.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 1px 3px rgba(59,130,246,0.3);
}

    .btn-primary:hover {
        background: var(--accent-dark);
        border-color: var(--accent-dark);
        box-shadow: 0 2px 8px rgba(59,130,246,0.4);
        transform: translateY(-1px);
    }

    .btn-primary:active {
        transform: translateY(0);
        box-shadow: none;
    }

.btn-outline {
    background: var(--color-surface);
    color: var(--text-primary);
    border-color: #9CA3AF;
}

    .btn-outline:hover {
        border-color: #6B7280;
        color: var(--text-primary);
        background: var(--color-surface-2);
    }

.btn-danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

    .btn-danger:hover {
        background: #DC2626;
        color: #fff;
        border-color: #DC2626;
        transform: translateY(-1px);
    }

    .btn-danger:active {
        transform: translateY(0);
    }

.btn-success {
    background: #16A34A;
    color: #fff;
    border-color: #16A34A;
}

    .btn-success:hover {
        background: #15803D;
        color: #fff;
        border-color: #15803D;
        transform: translateY(-1px);
    }

.btn-warning {
    background: #D97706;
    color: #fff;
    border-color: #D97706;
}

    .btn-warning:hover {
        background: #B45309;
        color: #fff;
        border-color: #B45309;
        transform: translateY(-1px);
    }

.btn-info {
    background: #0284C7;
    color: #fff;
    border-color: #0284C7;
}

    .btn-info:hover {
        background: #0369A1;
        color: #fff;
        border-color: #0369A1;
        transform: translateY(-1px);
    }

.btn-secondary {
    background: #4B5563;
    color: #fff;
    border-color: #4B5563;
}

    .btn-secondary:hover {
        background: #374151;
        color: #fff;
        border-color: #374151;
        transform: translateY(-1px);
    }

.btn-sm {
    height: 30px;
    padding: 0 11px;
    font-size: 12.5px;
    border-radius: 5px;
}

    .btn-sm i {
        font-size: 12px;
    }

/* ─── Action Buttons ───────────────────────────────────────── */

.action-buttons {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* ─── Table ────────────────────────────────────────────────── */

.table-container {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

    .data-table thead {
        background: var(--color-surface-2);
        border-bottom: 1px solid var(--color-border);
    }

    .data-table th {
        padding: 11px 16px;
        text-align: left;
        font-weight: 600;
        font-size: 12px;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.6px;
        white-space: nowrap;
    }

    .data-table tbody tr {
        border-bottom: 1px solid var(--color-border-light);
        transition: background 0.1s;
    }

        .data-table tbody tr:last-child {
            border-bottom: none;
        }

        .data-table tbody tr:hover {
            background: #FAFBFF;
        }

    .data-table td {
        padding: 12px 16px;
        color: var(--text-primary);
        vertical-align: middle;
    }

/* ─── Table Responsive Wrapper ────────────────────────────── */

.table-responsive {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

    .table-responsive::-webkit-scrollbar {
        height: 8px;
    }

    .table-responsive::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }

    .table-responsive::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 4px;
    }

    .table-responsive::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
    }

/* ─── Card Components ──────────────────────────────────────── */

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-body {
    padding: 20px;
    overflow-x: auto;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface-2);
    font-weight: 600;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px 36px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 24px;
}

    .page-header h1 {
        font-size: 24px;
        font-weight: 700;
        color: var(--text-primary);
        margin: 0 0 8px 0;
    }

    .page-header p {
        color: var(--text-secondary);
        margin: 0;
        font-size: 14px;
    }

.page-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ─── Status Badges ────────────────────────────────────────── */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

    .status-badge::before {
        content: '';
        width: 6px;
        height: 6px;
        border-radius: 50%;
    }

.status-active {
    background: var(--status-active-bg);
    color: var(--status-active-text);
}

    .status-active::before {
        background: var(--status-active-text);
    }

.status-inactive {
    background: var(--status-inactive-bg);
    color: var(--status-inactive-text);
}

    .status-inactive::before {
        background: var(--status-inactive-text);
    }

/* ─── Color Badge ──────────────────────────────────────────── */

.color-badge {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    border: 2px solid rgba(0,0,0,0.08);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
    display: inline-block;
}

/* ─── Forms ────────────────────────────────────────────────── */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-bottom: 18px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-bottom: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .form-group label {
        font-size: 12.5px;
        font-weight: 600;
        color: var(--text-secondary);
        letter-spacing: 0.2px;
    }

.form-control {
    height: 40px;
    padding: 0 12px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13.5px;
    color: var(--text-primary);
    background: var(--color-surface);
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
    -webkit-appearance: none;
}

    .form-control:focus {
        outline: none;
        border-color: var(--accent);
        box-shadow: 0 0 0 3px var(--accent-glow);
    }

    .form-control::placeholder {
        color: var(--text-muted);
    }

textarea.form-control {
    height: auto;
    padding: 10px 12px;
    resize: vertical;
    line-height: 1.6;
}

select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239299A8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 34px;
    cursor: pointer;
}

/* ─── Toggle Switch ────────────────────────────────────────── */

.toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 40px;
}

    .toggle-container span {
        font-size: 13.5px;
        color: var(--text-secondary);
    }

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}

    .toggle-switch input {
        opacity: 0;
        width: 0;
        height: 0;
        position: absolute;
    }

.toggle-slider {
    position: absolute;
    inset: 0;
    background: #D1D5DB;
    border-radius: 24px;
    transition: background 0.2s;
}

    .toggle-slider::before {
        content: '';
        position: absolute;
        width: 18px;
        height: 18px;
        background: white;
        border-radius: 50%;
        top: 3px;
        left: 3px;
        transition: transform 0.2s;
        box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    }

.toggle-switch input:checked + .toggle-slider {
    background: var(--accent);
}

    .toggle-switch input:checked + .toggle-slider::before {
        transform: translateX(18px);
    }

/* ─── Color Picker ─────────────────────────────────────────── */

.color-picker {
    width: 52px;
    height: 40px;
    padding: 3px 4px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: var(--color-surface);
    transition: border-color 0.15s;
}

    .color-picker:focus,
    .color-picker:hover {
        outline: none;
        border-color: var(--accent);
    }

/* ─── Alerts ───────────────────────────────────────────────── */

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.alert-danger {
    background: var(--danger-light);
    color: #B91C1C;
    border: 1px solid var(--danger-border);
}

.alert-success {
    background: var(--success-light);
    color: #15803D;
    border: 1px solid #BBF7D0;
}

/* ─── Modals ───────────────────────────────────────────────── */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(10, 12, 16, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: modalFadeIn 0.18s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-modal);
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px;
    animation: modalSlideUp 0.2s ease;
    border: 1px solid var(--color-border);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-content::-webkit-scrollbar {
    width: 5px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border-light);
}

.modal-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.close-modal {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-muted);
    line-height: 1;
    transition: all 0.15s;
}

    .close-modal:hover {
        background: var(--danger-light);
        border-color: var(--danger-border);
        color: var(--danger);
    }

/* Modal Overlay - Used by various pages */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 12, 16, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    animation: modalFadeIn 0.18s ease;
    overflow-y: auto;
}

.modal-large {
    max-width: 900px !important;
}

.modal-small {
    max-width: 450px !important;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.close-btn:hover {
    color: #000;
    background: var(--color-surface-2);
    border-radius: 4px;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 16px 24px;
    border-top: 1px solid var(--color-border-light);
    margin-top: 20px;
}

/* ─── Mobile Cards ─────────────────────────────────────────── */

.cards-container {
    display: none;
    flex-direction: column;
    gap: 12px;
}

.data-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--color-border-light);
    gap: 12px;
}

    .card-row:last-child {
        border-bottom: none;
    }

.card-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    flex-shrink: 0;
}

.card-value {
    font-size: 13.5px;
    color: var(--text-primary);
    text-align: right;
}

.card-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border-light);
}

    .card-actions .btn {
        flex: 1;
        justify-content: center;
    }

/* ─── Mobile Menu Toggle ───────────────────────────────────── */

.mobile-menu-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 36px;
    background: var(--color-surface);
    border: none;
    border-bottom: 1px solid var(--color-border);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: background 0.15s;
}

    .mobile-menu-toggle:hover {
        background: var(--accent-light);
    }

/* ─── Validation ───────────────────────────────────────────── */

.validation-errors,
.validation-summary-errors {
    background: var(--danger-light);
    border: 1px solid var(--danger-border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #B91C1C;
}

    .validation-errors ul,
    .validation-summary-errors ul {
        margin: 0;
        padding-left: 18px;
    }

.validation-message {
    color: var(--danger);
    font-size: 12px;
    margin-top: 3px;
    font-weight: 500;
}

.valid.modified:not([type=checkbox]) {
    border-color: var(--success) !important;
}

.invalid {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* ─── Blazor Error ─────────────────────────────────────────── */

#blazor-error-ui {
    background: #FFFBEB;
    border-top: 2px solid #F59E0B;
    bottom: 0;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
    display: none;
    left: 0;
    padding: 12px 20px;
    position: fixed;
    width: 100%;
    z-index: 1000;
    font-size: 13.5px;
    color: #92400E;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 16px;
        top: 10px;
        font-size: 18px;
        color: #92400E;
        opacity: 0.6;
        transition: opacity 0.15s;
    }

        #blazor-error-ui .dismiss:hover {
            opacity: 1;
        }

.blazor-error-boundary {
    padding: 16px 16px 16px 56px;
    background: #FEF2F2 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23EF4444' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E") no-repeat 20px center;
    border: 1px solid var(--danger-border);
    border-radius: var(--radius-md);
    color: #991B1B;
    font-size: 13.5px;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* ─── Responsive ───────────────────────────────────────────── */

@media (max-width: 900px) {
    .settings-layout {
        grid-template-columns: 1fr;
    }

    .settings-sidebar {
        position: static;
        height: auto;
        display: none;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.06);
        padding: 12px;
    }

        .settings-sidebar.active {
            display: block;
        }

    .settings-nav {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 0;
        gap: 6px;
    }

    .settings-nav-item {
        flex: 1;
        min-width: 120px;
        justify-content: center;
        text-align: center;
        padding: 10px;
        font-size: 12.5px;
    }

        .settings-nav-item.active::before {
            display: none;
        }

    .mobile-menu-toggle {
        display: flex;
    }

    .header-section {
        padding: 20px 20px 16px;
    }

    .settings-content {
        padding: 20px;
    }

    .form-grid,
    .form-row {
        grid-template-columns: 1fr;
    }

    .table-container {
        display: none;
    }

    .cards-container {
        display: flex;
    }
}

@media (max-width: 480px) {
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-left,
    .toolbar-right {
        width: 100%;
    }

        .toolbar-right .btn {
            width: 100%;
            justify-content: center;
        }

    .search-box {
        width: 100%;
        min-width: 0;
    }

    .modal-content {
        padding: 20px;
        border-radius: var(--radius-md);
    }
}

/* ─── Focus-visible accessibility ─────────────────────────── */

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

a:focus-visible {
    border-radius: 3px;
}

.btn:focus-visible {
    outline-offset: 3px;
}

/* ─── Pagination Styles ─────────────────────────────────── */

.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    margin-top: 0;
}

.pagination-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 14px;
}

.pagination-info select {
    padding: 6px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pagination-controls .btn {
    padding: 6px 12px;
    font-size: 13px;
}

.pagination-controls .page-indicator {
    padding: 6px 16px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}
