/* Modern Design System - LimraSoft */
/*@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700&display=swap');*/

:root {
    /* Color Palette */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --secondary: #64748b;
    --secondary-hover: #475569;
    --success: #10b981;
    --success-hover: #059669;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --warning: #f59e0b;
    /* Backgrounds */
    --background: #f1f5f9;
    /* Slate 100 */
    --surface: #ffffff;
    --sidebar-bg: #141414;
    /* Black */
    /* Text */
    --text-main: #0f172a;
    /* Slate 900 */
    --text-muted: #64748b;
    /* Slate 500 */
    --text-on-dark: #f8fafc;
    /* Borders */
    --border-color: #e2e8f0;
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    /* Spacing */
    --header-height: 64px;
    --sidebar-width: 260px;
}

[data-theme="dark"] {
    /* Color Palette - Unchanged or adjusted for dark contrast if needed */
    /* Backgrounds */
    --background: #000000;
    /* Darker background for dark mode */
    --surface: #1e1e1e;
    /* Dark surface */
    --sidebar-bg: #141414;
    /* Keep it black as requested */
    /* Text */
    --text-main: #f8fafc;
    /* Light text */
    --text-muted: #94a3b8;
    /* Lighter muted text */
    /* Borders */
    --border-color: #334155;
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(255 255 255 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(255 255 255 / 0.1), 0 2px 4px -2px rgb(255 255 255 / 0.1);
}

html,
body {
    font-family: 'Cairo', sans-serif;
    color: var(--text-main);
    background-color: var(--background);
    margin: 0;
    padding: 0;
    font-size: 15px;
    /* Slight bump for readability */
}

/* Common Components */
a,
.btn-link {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover,
.btn-link:hover {
    color: var(--primary-hover);
}

/* Button Overrides */
.btn {
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.25rem var(--primary-light);
    border-color: var(--primary);
}

/* Typography Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    color: var(--text-main);
}

/* Cards */
.card {
    background-color: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}



/* Validation */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--success);
}

.invalid {
    outline: 1px solid var(--danger);
}

.validation-message {
    color: var(--danger);
    font-size: 0.875rem;
}

/* Darker checkbox border */
.darker-border-checkbox.form-check-input {
    border-color: var(--secondary);
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}



/* =========================================
   QUICKGRID + BOOTSTRAP TABLE FIX (FINAL)
========================================= */

/* TABLE ROOT */
[data-theme="dark"] table.quickgrid {
    background-color: #020617 !important;
    color: #e5e7eb !important;
    border-color: #334155 !important;
}

    /* ====== HEADER (THE IMPORTANT FIX) ====== */
    [data-theme="dark"] table.quickgrid thead,
    [data-theme="dark"] table.quickgrid thead tr,
    [data-theme="dark"] table.quickgrid thead th,
    [data-theme="dark"] table.quickgrid.table-striped thead th,
    [data-theme="dark"] table.quickgrid.table-hover thead th {
        background-color: #0f172a !important;
        color: #e5e7eb !important;
        border-color: #334155 !important;
    }

        /* Header buttons & text */
        [data-theme="dark"] table.quickgrid thead th .col-title-text,
        [data-theme="dark"] table.quickgrid thead th .col-title,
        [data-theme="dark"] table.quickgrid thead th button {
            color: #e5e7eb !important;
            background-color: transparent !important;
        }

        /* Remove bootstrap shadow/gradient */
        [data-theme="dark"] table.quickgrid thead th::after,
        [data-theme="dark"] table.quickgrid thead th::before {
            display: none !important;
        }

    /* ====== BODY ====== */
    [data-theme="dark"] table.quickgrid tbody tr {
        background-color: #020617 !important;
        color: #e5e7eb !important;
        border-color: #334155 !important;
    }

    /* Zebra rows */
    [data-theme="dark"] table.quickgrid.table-striped tbody tr:nth-of-type(even) {
        background-color: #020617 !important;
    }

    /* Hover */
    [data-theme="dark"] table.quickgrid.table-hover tbody tr:hover {
        background-color: #1e293b !important;
    }

    /* Cells */
    [data-theme="dark"] table.quickgrid td {
        color: #e5e7eb !important;
        border-color: #334155 !important;
    }

    /* ====== SORT ICON ====== */
    [data-theme="dark"] table.quickgrid .sort-indicator {
        filter: brightness(1.2);
    }

    /* ====== ACTION BUTTON FIX ====== */
    [data-theme="dark"] table.quickgrid .action-btn {
        border-radius: 8px;
    }

[data-theme="dark"] select{
    color: #333030
}


/*===================================================================*/
.status-badge {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: transform .2s ease, box-shadow .2s ease;
}

    .status-badge:hover {
        transform: scale(1.05);
        box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    }

