/* modern typography and styling tokens */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --hqs-primary: #0f52ba;
    --hqs-primary-rgb: 15, 82, 186;
    --hqs-secondary: #ffffff;
    --hqs-accent: #0d9488;
    --hqs-success: #10b981;
    --hqs-warning: #f59e0b;
    --hqs-danger: #ef4444;
    --hqs-bg: #f8fafc;
    --hqs-card-bg: #ffffff;
    --hqs-text: #0f172a;
    --hqs-text-muted: #64748b;
    --hqs-border: #e2e8f0;
    --font-heading: 'Outfit', sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-bs-theme="dark"] {
    --hqs-bg: #0b0f19;
    --hqs-card-bg: #151f32;
    --hqs-text: #f8fafc;
    --hqs-text-muted: #94a3b8;
    --hqs-border: #1e293b;
    --hqs-secondary: #0f172a;
}

/* Bootstrap's named color utilities (text-dark, text-secondary, bg-white,
   bg-light) are fixed literal colors — Bootstrap's own [data-bs-theme=dark]
   only redefines the semantic body/secondary-color tokens behind classes
   like .text-muted and .text-body, not these. Views across the app use the
   named ones directly for headings/cards, so without this remap dark mode
   just dims the page shell while leaving that dark text/white boxes exactly
   as dark/white as before — reading as "text fading into the background"
   rather than inverting like the rest of the UI. */
[data-bs-theme="dark"] .text-dark,
[data-bs-theme="dark"] .text-secondary {
    color: var(--hqs-text) !important;
}

/* :not(.bg-opacity-*) guards translucent white badges on colored gradient
   cards (e.g. the login page's icon circle) — those rely on .bg-white's
   literal white blended via --bs-bg-opacity, not a solid surface color. */
[data-bs-theme="dark"] .bg-white:not(.bg-opacity-10):not(.bg-opacity-25):not(.bg-opacity-50):not(.bg-opacity-75) {
    background-color: var(--hqs-card-bg) !important;
}

[data-bs-theme="dark"] .bg-light {
    background-color: var(--hqs-bg) !important;
}

/* .table-light (used for DataTable header rows across every admin list
   page) hardcodes --bs-table-color:#000 and --bs-table-bg:#f8f9fa — same
   fixed-literal problem as above, so table headers stayed a light-gray bar
   with near-invisible text once the surrounding card went dark. */
[data-bs-theme="dark"] .table-light {
    --bs-table-color: var(--hqs-text);
    --bs-table-bg: var(--hqs-bg);
    --bs-table-border-color: var(--hqs-border);
}

body {
    font-family: var(--font-heading);
    background-color: var(--hqs-bg);
    color: var(--hqs-text);
    transition: var(--transition-smooth);
}

/* Premium Layout Elements */
.hqs-navbar {
    background-color: rgba(var(--hqs-primary-rgb), 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--hqs-border);
}

.hqs-navbar .nav-link {
    position: relative;
    font-weight: 500;
}

.hqs-navbar .nav-link.active {
    color: #fff;
    font-weight: 700;
}

.hqs-navbar .nav-link.active::after {
    content: "";
    position: absolute;
    left: 0.5rem;
    right: 0.5rem;
    bottom: -2px;
    height: 3px;
    border-radius: 3px;
    background-color: var(--hqs-accent);
}

.card {
    background-color: var(--hqs-card-bg);
    border: 1px solid var(--hqs-border);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    transition: var(--transition-smooth);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.btn-primary {
    background-color: var(--hqs-primary);
    border-color: var(--hqs-primary);
    border-radius: 12px;
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.btn-primary:hover {
    background-color: var(--hqs-accent);
    border-color: var(--hqs-accent);
}

.btn-outline-primary {
    border-color: var(--hqs-primary);
    color: var(--hqs-primary);
    border-radius: 12px;
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    transition: var(--transition-smooth);
}

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

/* Dashboards and Sidebars */
.hqs-sidebar {
    background-color: var(--hqs-card-bg);
    border-right: 1px solid var(--hqs-border);
    width: 100%;
    z-index: 1000;
    position: sticky;
    top: var(--hqs-navbar-height, 56px);
    height: calc(100vh - var(--hqs-navbar-height, 56px));
    overflow-y: auto;
}

.hqs-sidebar .nav-link {
    color: var(--hqs-text-muted);
    border-radius: 8px;
    margin: 0.2rem 1rem;
    padding: 0.75rem 1rem;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.hqs-sidebar .nav-link:hover,
.hqs-sidebar .nav-link.active {
    background-color: rgba(var(--hqs-primary-rgb), 0.1);
    color: var(--hqs-primary);
}

.hqs-sidebar-signout {
    position: sticky;
    bottom: 0;
    background-color: var(--hqs-card-bg);
    z-index: 1;
}

.queue-card-lg {
    font-size: 4rem;
    font-weight: 700;
    color: var(--hqs-primary);
    line-height: 1;
}

.live-badge {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Modal and skeleton loaders */
.skeleton {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Show/Hide password toggle */
.password-toggle-wrapper,
.password-toggle-group {
    position: relative;
}

.password-toggle-wrapper .form-control,
.password-toggle-group .form-control {
    padding-right: 2.75rem;
}

.password-toggle-btn {
    color: #6c757d;
    cursor: pointer;
    line-height: 1;
}

.password-toggle-wrapper .password-toggle-btn,
.password-toggle-group .password-toggle-btn {
    position: absolute;
    top: 50%;
    right: 0.85rem;
    transform: translateY(-50%);
    z-index: 5;
    border: none;
    background: none;
    padding: 0;
}

/* .password-toggle-btn:hover {
    color: #f5f6f7;
} */

.password-toggle-btn:focus {
    outline: none;
    box-shadow: none;
}