﻿html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Always respect hidden attribute (also protects your modal) */
[hidden] {
    display: none !important;
}

/* Background shell */
.tw-shell {
    min-height: 100vh;
    position: relative;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 45%, #ffffff 100%);
    overflow-x: hidden;
}

/* Background blobs layer */
.tw-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

    /* Two soft “blobs” */
    .tw-bg::before,
    .tw-bg::after {
        content: "";
        position: absolute;
        width: 560px;
        height: 560px;
        border-radius: 9999px;
        filter: blur(80px);
        opacity: 0.22;
    }

    /* Emerald blob (top-left) */
    .tw-bg::before {
        left: -160px;
        top: -200px;
        background: radial-gradient(circle at 30% 30%, #34d399 0%, rgba(52, 211, 153, 0) 70%);
    }

    /* Rose blob (top-right) */
    .tw-bg::after {
        right: -190px;
        top: -240px;
        background: radial-gradient(circle at 70% 30%, #fb7185 0%, rgba(251, 113, 133, 0) 70%);
    }

/* Keep real content above the background */
header, .tw-container, footer {
    position: relative;
    z-index: 1;
}

/* Navbar “glass” look */
.tw-nav {
    background: rgba(255, 255, 255, 0.78) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Brand color (still no bold) */
.tw-brand {
    font-weight: 500;
    color: #065f46 !important;
    letter-spacing: -0.01em;
}

/* Footer light glass */
.tw-footer {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Guarantee: hidden ALWAYS hides, even if other CSS says display:grid */
[hidden] {
    display: none !important;
}

.tw-page {
    max-width: 980px;
    margin: 28px auto;
    padding: 0 16px 40px;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: #111827; /* gray-900 */
}

.tw-hero {
    padding: 18px 12px 8px;
    margin-bottom: 16px;
}

.tw-title {
    margin: 0;
    font-size: 1.75rem;
    line-height: 2.1rem;
    font-weight: 500; /* not bold */
    letter-spacing: -0.01em;
}

.tw-subtitle {
    margin-top: 6px;
    color: #4b5563; /* gray-600 */
    font-size: 0.98rem;
    font-weight: 400;
}

/* Cards */
.tw-card {
    margin: 14px 0;
    padding: 18px 18px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #e5e7eb; /* gray-200 */
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.tw-card__header {
    margin-bottom: 12px;
}

.tw-card__title {
    margin: 0 0 6px 0;
    font-size: 1.15rem;
    line-height: 1.55rem;
    font-weight: 500; /* not bold */
    color: #065f46; /* emerald-800 */
}

.tw-card__desc {
    margin: 0;
    color: #374151; /* gray-700 */
    font-weight: 400;
}

.tw-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.92em;
    padding: 0.14rem 0.4rem;
    border-radius: 0.6rem;
    border: 1px solid #e5e7eb;
    background: #f9fafb; /* gray-50 */
    color: #111827;
}

.tw-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.tw-muted {
    font-size: 0.9rem;
    color: #6b7280; /* gray-500 */
    margin-left: 6px;
}

/* Buttons (outline -> solid hover) */
.tw-btn {
    appearance: none;
    background: transparent;
    border: 1px solid;
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500; /* not bold */
    transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease, transform 60ms ease, box-shadow 120ms ease;
    user-select: none;
}

    .tw-btn:active {
        transform: translateY(1px);
    }

    .tw-btn:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25); /* emerald ring */
    }

.tw-btn-success {
    color: #047857; /* emerald-700 */
    border-color: #34d399; /* emerald-400 */
}

    .tw-btn-success:hover {
        background: #047857;
        color: #ffffff;
        border-color: #047857;
    }

.tw-btn-danger {
    color: #b91c1c; /* red-700 */
    border-color: #fca5a5; /* red-300 */
}

    .tw-btn-danger:hover {
        background: #b91c1c;
        color: #ffffff;
        border-color: #b91c1c;
    }

    .tw-btn-danger:focus {
        box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25); /* red ring */
    }

.tw-btn-neutral {
    color: #374151; /* gray-700 */
    border-color: #d1d5db; /* gray-300 */
}

    .tw-btn-neutral:hover {
        background: #f3f4f6; /* gray-100 */
        color: #111827;
        border-color: #d1d5db;
    }

.tw-hidden {
    display: none !important;
}

/* Alerts */
.tw-alert {
    margin-top: 14px;
    padding: 12px 12px;
    border-radius: 12px;
    border: 1px solid;
    font-weight: 400;
}

.tw-alert-success {
    background: #ecfdf5; /* emerald-50 */
    border-color: #a7f3d0; /* emerald-200 */
    color: #065f46; /* emerald-800 */
}

.tw-alert-danger {
    background: #fef2f2; /* red-50 */
    border-color: #fecaca; /* red-200 */
    color: #7f1d1d; /* red-900 */
}

/* Results */
.tw-results {
    margin-top: 14px;
    padding: 14px 14px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #f9fafb; /* gray-50 */
}

.tw-results__title {
    margin: 0 0 10px 0;
    font-size: 1rem;
    font-weight: 500;
    color: #065f46;
}

.tw-result-item {
    padding: 6px 0;
    color: #111827;
}

.tw-k {
    font-weight: 500; /* mild emphasis, not bold */
    color: #374151;
}

.tw-panel {
    margin-top: 12px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid;
}

.tw-panel__title {
    font-weight: 500;
    margin-bottom: 8px;
}

.tw-panel-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #7f1d1d;
}

.tw-panel-success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.tw-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.tw-li {
    padding: 5px 0;
    color: inherit;
    font-size: 0.95rem;
}

/* Modal - Using Bootstrap 5 defaults with minor customizations */
.modal-header {
    border-bottom: 1px solid #e5e7eb;
}

.modal-footer {
    border-top: 1px solid #e5e7eb;
}

.modal-xl {
    max-width: 900px;
}

@media (max-width: 768px) {
    .modal-xl {
        max-width: 95%;
    }
}

body {
    min-height: 100vh;
    background: linear-gradient( to bottom, #f0f9ff 0%, /* sky-50 (very light blue) */
    #f1f5f9 55%, /* gray-100 */
    #ffffff 100% );
}

.tw-card {
    background: #ffffff;
}

/* Custom multiselect container */
.custom-multiselect {
    position: relative;
    max-width: 400px;
}

/* Tailwind-style input container */
.custom-multiselect-control {
    border: 2px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    min-height: 2.75rem;
    background: white;
    cursor: pointer;
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    align-items: center;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.15s ease-in-out;
}

.custom-multiselect-control:focus-within,
.custom-multiselect-control.active {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Selected items (pills) */
.multiselect-tag {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.multiselect-tag button {
    color: #1e40af;
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.15s ease-in-out;
}

.multiselect-tag button:hover {
    opacity: 1;
}

/* Placeholder */
.multiselect-placeholder {
    color: #9ca3af;
    font-size: 0.875rem;
    pointer-events: none;
}

/* Dropdown */
.custom-multiselect-dropdown {
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 0;
    right: 0;
    border: 2px solid #d1d5db;
    border-radius: 0.5rem;
    background: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.custom-multiselect-dropdown.active {
    display: block;
}

.multiselect-option {
    padding: 0.5rem 0.75rem;
    color: #374151;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.multiselect-option:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.multiselect-option.selected {
    background-color: #eff6ff;
    color: #1e40af;
}

.multiselect-option.hidden {
    display: none;
}

/* Hide the original select */
.custom-multiselect select {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Pending forms modal styles */
.pending-forms-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    background: #ffffff;
}

.pending-forms-table th,
.pending-forms-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
}

.pending-forms-table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
    position: sticky;
    top: 0;
    z-index: 2;
}

.pending-forms-table tbody {
    background: #ffffff;
}

.pending-forms-table tr:hover {
    background-color: #f9fafb;
}

.pending-forms-table tr:hover td {
    background-color: #f9fafb;
}

.pending-forms-table input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    cursor: pointer;
}

/* File input styling to match buttons - outline blue style */
.tw-file-input {
    appearance: none;
    background: transparent;
    border: 2px solid #3b82f6;
    border-radius: 0.625rem;
    padding: 0.625rem 0.875rem;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: #1e40af;
    transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease, transform 60ms ease, box-shadow 120ms ease;
    user-select: none;
    width: 100%;
    max-width: 400px;
}

.tw-file-input:hover {
    background: #eff6ff;
    border-color: #2563eb;
}

.tw-file-input:active {
    transform: translateY(1px);
}

.tw-file-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.tw-file-input::file-selector-button {
    appearance: none;
    background: #3b82f6;
    border: 1px solid #3b82f6;
    border-radius: 0.5rem;
    padding: 0.375rem 0.75rem;
    margin-right: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #ffffff;
    transition: background-color 120ms ease, color 120ms ease;
}

.tw-file-input::file-selector-button:hover {
    background: #2563eb;
    border-color: #2563eb;
}

/* Page-specific utility classes to replace inline styles in Index.cshtml */
.form-row {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.col-grow {
    flex: 1;
    min-width: 0;
}

.mb-1 {
    margin-bottom: 1rem !important;
}

.mb-0-5 {
    margin-bottom: 0.5rem !important;
}

.d-block {
    display: block !important;
}

.hide {
    display: none !important;
}

.stack-right {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1.75rem;
}

.cursor-pointer {
    cursor: pointer;
}

.w-50px {
    width: 50px !important;
}

.label-500 {
    font-weight: 500 !important;
}

.muted-note {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--tw-muted, #6b7280);
}

.table-label {
    cursor: pointer;
}

.trash-skip {
    background-color: #e8f5e9; /* soft green */
    color: #1b5e20;
    font-weight: 600;
}

.trash-delete {
    background-color: #fff8e1; /* your existing yellow */
}

.trash-truncate {
    background-color: #ffe0e0; /* optional: light red */
}

/* =========================================
   Grouped Files Upload Preview
   ========================================= */
.grouped-files-preview {
    margin-top: 1rem;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #f9fafb;
}

.grouped-files-preview .preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.grouped-files-preview .validation-status {
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.grouped-files-preview .validation-status.valid {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.grouped-files-preview .validation-status.invalid {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.grouped-files-preview .validation-status.warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.grouped-files-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.file-group {
    padding: 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background: #ffffff;
}

.file-group.valid {
    border-color: #86efac;
    background: #f0fdf4;
}

.file-group.invalid {
    border-color: #fecaca;
    background: #fef2f2;
}

.file-group.warning {
    border-color: #fcd34d;
    background: #fffbeb;
}

.file-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.file-group-name {
    font-weight: 600;
    color: #111827;
    font-size: 0.95rem;
}

.file-group-status {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
}

.file-group-status.complete {
    background: #dcfce7;
    color: #166534;
}

.file-group-status.html-only {
    background: #dbeafe;
    color: #1e40af;
}

.file-group-status.missing-html {
    background: #fef2f2;
    color: #991b1b;
}

.file-group-status.asset-only {
    background: #fef3c7;
    color: #92400e;
}

.file-group-files {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.file-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 0.375rem;
    font-size: 0.8rem;
    font-weight: 500;
}

.file-tag.html {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.file-tag.css {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.file-tag.js {
    background: #fce7f3;
    color: #9d174d;
    border: 1px solid #f9a8d4;
}

.file-tag.missing {
    background: #f3f4f6;
    color: #9ca3af;
    border: 1px dashed #d1d5db;
    font-style: italic;
}

.file-tag.asset-note {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.file-tag i {
    font-size: 0.7rem;
}

.validation-message {
    margin-top: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.validation-message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.validation-message.warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.validation-message.info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* =========================================
   Upload Mode Toggle (Radio Button Group)
   ========================================= */
.upload-mode-toggle {
    margin-bottom: 1.25rem;
}

.btn-group-toggle {
    display: inline-flex;
    border: 2px solid #3b82f6;
    border-radius: 0.625rem;
    overflow: hidden;
    background: #ffffff;
}

.upload-mode-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: #3b82f6;
    background: transparent;
    border: none;
    margin: 0;
    transition: background-color 150ms ease, color 150ms ease;
    user-select: none;
}

.upload-mode-btn:first-child {
    border-right: 1px solid #3b82f6;
}

.upload-mode-btn input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.upload-mode-radio {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #3b82f6;
    border-radius: 50%;
    background: #ffffff;
    position: relative;
    flex-shrink: 0;
    transition: border-color 150ms ease, background-color 150ms ease;
}

.upload-mode-radio::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #ffffff;
    transition: transform 150ms ease;
}

.upload-mode-btn.active {
    background: #3b82f6;
    color: #ffffff;
}

.upload-mode-btn.active .upload-mode-radio {
    border-color: #ffffff;
    background: #ffffff;
}

.upload-mode-btn.active .upload-mode-radio::after {
    transform: translate(-50%, -50%) scale(1);
    background: #3b82f6;
}

.upload-mode-btn:hover:not(.active) {
    background: #eff6ff;
}

.upload-mode-text {
    white-space: nowrap;
}

/* Outline style for secondary button */
.tw-btn-outline-success {
    color: #047857;
    border-color: #34d399;
    background: transparent;
}

.tw-btn-outline-success:hover {
    background: #ecfdf5;
    border-color: #047857;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .btn-group-toggle {
        flex-direction: column;
        width: 100%;
    }

    .upload-mode-btn {
        justify-content: center;
        width: 100%;
    }

    .upload-mode-btn:first-child {
        border-right: none;
        border-bottom: 1px solid #3b82f6;
    }
}
/* =========================================================
   ELEVITA THEME VARIABLES 
   ========================================================= */
:root {
    /* =====================================================
       Secondary / Teal Accent (used in gradients & highlights)
       ===================================================== */
    --elevita-accent-teal: #2fa4a0;
    --elevita-accent-teal-dark: #1f7a74;
    --elevita-accent-teal-darker: #155e63;
    /* =====================================================
       Status Colors
       ===================================================== */
    --elevita-success: #10b981;
    --elevita-warning: #f59e0b;
    --elevita-warning-text: #fcd34d;
    --elevita-warning-border: #a16207;
    --elevita-danger: #dc3545;
    /* =====================================================
       Focus Rings / Glow Effects
       ===================================================== */
    --elevita-focus-ring-blue: rgba(37, 140, 251, 0.25);
    --elevita-focus-ring-teal: rgba(47, 164, 160, 0.25);
    /* =====================================================
       Shadows
       ===================================================== */
    --elevita-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
    --elevita-shadow-md: 0 6px 16px rgba(0, 0, 0, 0.08);
    --elevita-shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
    --elevita-shadow-xl-dark: 0 30px 60px rgba(0, 0, 0, 0.6);
    /* =====================================================
       Utility Grays (only missing shades)
       ===================================================== */
    --elevita-gray-900: #111827;
    --elevita-gray-800: #1f2937;
    --elevita-gray-700: #374151;
    --elevita-gray-500: #6b7280;
    /* =====================================================
       Dark Mode Surfaces
       ===================================================== */
    --elevita-surface-dark-950: #020617; /* page background */
    --elevita-surface-dark-900: #0f172a; /* primary dark surface */
    --elevita-surface-dark-800: #1e293b; /* borders / chrome */
    --elevita-surface-dark-700: #334155; /* elevated accents */
    /* =====================================================
       Dark Warning Surface
       ===================================================== */
    --elevita-warning-bg-dark: #3b2a13;
    /* =====================================================
    Focus / Accent Blue (base color)
    ===================================================== */
    --elevita-focus-blue: #258cfb;
    /* =====================================================
    Background.
    ===================================================== */
    --elevita-bg-page: #f5f7fb;
    --elevita-body-bg: var(--elevita-bg-page);
    --elevita-brand-text: #427978;
}

    :root[data-bs-theme] {
        --elevita-bg-page: #f5f7fb; /* default */
        --bs-body-bg: var(--elevita-body-bg);
    }

/* ============================================
   Elevita Theme → Bootstrap Variable Bridge
============================================ */

:root {
    --bs-primary: var(--elevita-primary);
    --bs-secondary: var(--elevita-secondary);
    --bs-success: var(--elevita-success);
    --bs-danger: var(--elevita-danger);
    --bs-warning: var(--elevita-warning);
    --bs-info: var(--elevita-info);
    --bs-body-bg: var(--elevita-bg-page);
    --bs-body-color: var(--elevita-text-primary);
    --bs-border-color: var(--elevita-border);
}

.elevita-brand {
    color: var(--elevita-brand-text);
}

    .elevita-brand:hover,
    .elevita-brand:focus,
    .elevita-brand:hover i,
    .elevita-brand:focus i {
        color: var(--elevita-brand-text);
    }

/* Elevita brand color (links + buttons) */
.elevita-brand {
    color: var(--elevita-brand-text);
}

/* Button-based links (Logout) */
button.elevita-brand,
button.elevita-brand.btn-link {
    color: var(--elevita-brand-text);
}

    /* focus consistency */
    .elevita-brand:focus,
    button.elevita-brand:focus {
        color: var(--elevita-brand-text);
        text-decoration: none;
    }

    button.elevita-brand.btn-link {
        text-decoration: none;
    }

.elevita-brand:hover {
    filter: brightness(0.92);
}

/* Logout button (Bootstrap btn-link override) */
.navbar .btn.btn-link.elevita-brand {
    color: var(--elevita-brand-text);
}

/* Navbar brand text + links */
.navbar .nav-link.elevita-brand {
    color: var(--elevita-brand-text);
}

    /* Icons inside brand links */
    .navbar .nav-link.elevita-brand i,
    .navbar .nav-link.elevita-brand span {
        color: var(--elevita-brand-text);
    }


/* =========================================
   Base typography / layout
   ========================================= */

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

/* Theme-aware page background */
body {
    margin-bottom: 0;
    min-height: 100vh;
}

.surface {
    overflow: visible;
}

/* Focus rings */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--elevita-focus-blue) !important;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* =========================================
   Theme variables (light + dark)
   ========================================= */

/* LIGHT */
html[data-bs-theme="light"] {
    --bs-body-bg: var(--elevita-bg-page); /* light page bg */
    --elevita-surface-bg: var(--elevita-surface-bg, #f7f7f7);
    --elevita-surface-border: #e5e7eb;
    --elevita-surface-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.10);
    --elevita-muted-600: #667085;
    --elevita-muted-700: #475467;
    --elevita-hairline: #e5e7eb;
    --elevita-hairline-2: #eceff3;
    --elevita-gray-50: #f8fafc;
    --elevita-permission-bg-on: rgb(110 231 183 / 0.5);
    --elevita-permission-color-on: rgb(71 85 105);
    --elevita-permission-border-on: solid rgb(52 211 153) 1px;
    --elevita-permission-bg-off: rgb(203 213 225);
    --elevita-permission-color-off: rgb(71 85 105);
    --elevita-permission-border-off: solid rgb(148 163 184) 1px;
    --elevita-permission-bg-inherited: rgb(110 183 231 / 0.5);
    --elevita-permission-color-inherited: rgb(71 85 105);
    --elevita-permission-border-inherited: dashed rgb(52 153 211) 2px;
}

/* DARK */
html[data-bs-theme="dark"] {
    color-scheme: dark;
    --bs-body-bg: var(--elevita-surface-dark-950); /* dark page bg */
    --elevita-surface-bg: var(--elevita-surface-bg, #2b2b2b);
    --elevita-surface-border: var(--elevita-gray-800);
    --elevita-surface-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 6px 16px rgba(0, 0, 0, 0.35);
    --elevita-muted-600: #9aa3b2;
    --elevita-muted-700: #cbd5e1;
    --elevita-hairline: var(--elevita-gray-800);
    --elevita-hairline-2: var(--elevita-gray-900);
    --elevita-gray-50: var(--elevita-surface-dark-950);
    --elevita-permission-bg-on: rgb(110 231 183 / 0.5);
    --elevita-permission-border-on: solid rgb(52 211 153) 1px;
    --elevita-permission-color-on: rgb(255 255 255);
    --elevita-permission-bg-off: rgb(203 213 225);
    --elevita-permission-color-off: rgb(71 85 105);
    --elevita-permission-border-off: solid rgb(148 163 184) 1px;
    --elevita-permission-bg-inherited: rgb(110 183 231 / 0.5);
    --elevita-permission-color-inherited: rgb(255 255 255);
    --elevita-permission-border-inherited: dashed rgb(52 153 211) 2px;
}

/* =========================================
   Tailwind-like look & feel on top of BS
   ========================================= */

/* Dot / accent colors */
.bg-emerald-500 {
    background-color: var(--elevita-success);
}
/* green */
.bg-amber-500 {
    background-color: var(--elevita-warning);
}
/* amber */
.bg-indigo-500 {
    background-color: #6366f1;
}
/* indigo */
.bg-rose-500 {
    background-color: #f43f5e;
}
/* rose */
.bg-gray-400 {
    background-color: #9ca3af;
}

/* Core surfaces use theme vars */
.card,
.list-group,
.alert,
.navbar,
.dropdown-menu {
    border-radius: 1rem; /* rounded-2xl-ish */
    box-shadow: var(--elevita-bg-card);
}

/* Section padding */
.card-body {
    padding: 1.25rem 1.25rem;
}

/* Section header labels (CLIENT, ADDRESS…) */
.text-kicker {
    text-transform: uppercase;
    letter-spacing: .09em;
    font-size: .72rem;
    color: var(--elevita-muted-600);
    font-weight: 600;
}

/* List-group edges like Tailwind lists */
.list-group-item {
    border-left: 0;
    border-right: 0;
}

    .list-group-item:first-child {
        border-top-left-radius: 1rem;
        border-top-right-radius: 1rem;
        border-top: 1px solid var(--elevita-hairline);
    }

    .list-group-item:last-child {
        border-bottom-left-radius: 1rem;
        border-bottom-right-radius: 1rem;
        border-bottom: 1px solid var(--elevita-hairline);
    }

/* Soft chips/badges (light theme defaults) */
.badge-soft-warning {
    background: #fff7e6;
    color: #a15c07;
    border: 1px solid #fde4b6;
}

.badge-soft-primary {
    background: var(--elevita-brand-primary-soft);
    color: #3730a3;
    border: 1px solid var(--elevita-brand-primary-border);
}

.badge-soft-neutral {
    background: #ffffff;
    color: #344054;
    border: 1px solid #d0d5dd;
}

/* Active sidebar item feel */
.list-group-item.active {
    background: var(--elevita-brand-primary-soft);
    color: #3730a3;
    border-color: var(--elevita-brand-primary-border);
}

/* Pills instead of tabs */
.nav-pills .nav-link {
    border-radius: 999px;
    padding: .5rem 1rem;
}


/* Tiny dot bullet */
.dot-6 {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    display: inline-block;
    background: #6c757d;
}

/* Rounded helpers */
.rounded-xl {
    border-radius: .75rem !important;
}

.rounded-2xl {
    border-radius: 1rem !important;
}

.rounded-3xl {
    border-radius: 1.5rem !important;
}

/* Shadow helpers */
.shadow-soft {
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.12), 0 1px 3px rgba(16, 24, 40, 0.16) !important;
}

.shadow-soft-lg {
    box-shadow: 0 10px 15px rgba(16, 24, 40, 0.16), 0 4px 6px rgba(16, 24, 40, 0.12) !important;
}

/* Gap helpers */
.gap-1 {
    gap: .25rem !important;
}

.gap-2 {
    gap: .5rem !important;
}

.gap-3 {
    gap: .75rem !important;
}

.gap-4 {
    gap: 1rem !important;
}

.gap-6 {
    gap: 1.5rem !important;
}

.gap-8 {
    gap: 2rem !important;
}

/* Padding helpers */
.px-3p {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

.px-4p {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
}

.py-3p {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

.py-4p {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

/* Subtle text tones */
.text-muted-600 {
    color: var(--elevita-muted-600) !important;
}

.text-muted-700 {
    color: var(--elevita-muted-700) !important;
}

/* Panel bg (light vs dark) */
.bg-panel {
    background: var(--elevita-gray-50) !important;
}

/* Soft container for full-width layouts */
.container-soft {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 992px) {
    .container-soft {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* Font size */
.fs-xs {
    font-size: 0.75rem;
}

/* =========================================
   Shared surfaces & “soft” trays
   ========================================= */

/* Generic surface card */
.surface {
    background: var(--elevita-surface-bg);
    border: 1px solid var(--elevita-hairline);
    border-radius: 1rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.10);
}

/* Breadcrumb bar */
.breadcrumb-wrap {
    border-bottom: 1px solid var(--elevita-hairline-2);
    background: var(--elevita-surface-bg);
}

/* “Soft tray” around To-Do list */
.list-soft {
    background: var(--elevita-gray-50);
    border: 1px solid var(--elevita-hairline);
    border-radius: 1rem;
    padding: .5rem;
}

    .list-soft .list-group {
        border-radius: .875rem;
        overflow: hidden;
        background: var(--elevita-surface-bg);
        border: 1px solid var(--elevita-hairline);
    }

    .list-soft .list-group-item {
        border-color: var(--elevita-hairline-2);
        padding: .9rem 1rem;
    }

        .list-soft .list-group-item:first-child {
            border-top-color: var(--elevita-hairline-2);
        }

        .list-soft .list-group-item:last-child {
            border-bottom-color: var(--elevita-hairline-2);
        }

/* Badges a bit bolder */
.badge {
    font-weight: 600;
    padding: .35em .6em;
}

/* Avatar in summary card */
.avatar-soft {
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.12);
    border-radius: .75rem;
}

/* =========================================
   Sidenav (Tailwind-like)
   ========================================= */

.sidenav {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

    .sidenav .item {
        display: flex;
        align-items: center;
        gap: .5rem;
        padding: .6rem .75rem;
        border-radius: .85rem;
        color: #344054;
        text-decoration: none;
    }

        .sidenav .item:hover {
            background: #f3f4f6;
        }

        .sidenav .item.active {
            background: var(--elevita-brand-primary-soft);
            color: var(--elevita-brand-primary);
            box-shadow: inset 0 0 0 1px #e5e7eb;
        }

    .sidenav .dot {
        width: 8px;
        height: 8px;
        border-radius: 999px;
        background: #9ca3af;
        flex: 0 0 8px;
    }

    .sidenav .item.active .dot {
        background: #8b5cf6;
    }

:root {
    --leftnav-width: 12rem; /* expanded */
    --leftnav-collapsed: 1.75rem; /* collapsed */
}

    /* Dark-mode tweaks for sidenav */
    :root[data-bs-theme="dark"] .sidenav .item {
        color: #e5e7eb;
    }

        :root[data-bs-theme="dark"] .sidenav .item:hover {
            background: var(--elevita-gray-800);
        }

        :root[data-bs-theme="dark"] .sidenav .item.active {
            background: var(--elevita-surface-dark-800);
            color: var(--elevita-brand-primary-border);
            box-shadow: inset 0 0 0 1px var(--elevita-surface-dark-700);
        }

    :root[data-bs-theme="dark"] .sidenav .dot {
        background: #64748b;
    }

    :root[data-bs-theme="dark"] .sidenav .item.active .dot {
        background: #a855f7;
    }

    /* =========================================
   Dark-mode specific component tweaks
   ========================================= */

    /* List group items */
    :root[data-bs-theme="dark"] .list-group-item {
        background-color: transparent;
        border-color: var(--elevita-surface-border);
    }

        /* Active list-group item (non-sidenav) */
        :root[data-bs-theme="dark"] .list-group-item.active {
            background: var(--elevita-surface-dark-800);
            color: var(--elevita-brand-primary-border);
            border-color: var(--elevita-surface-dark-700);
        }

    /* Pills */
    :root[data-bs-theme="dark"] .nav-pills .nav-link {
        color: #e5e7eb;
        background: transparent;
        border: 1px solid transparent;
    }

        :root[data-bs-theme="dark"] .nav-pills .nav-link.active {
            background-color: var(--elevita-brand-primary);
            color: var(--elevita-nav-selected-text);
        }

    /* Chips / badges in dark */
    :root[data-bs-theme="dark"] .badge-soft-warning {
        background: var(--elevita-warning-bg-dark);
        color: var(--elevita-warning-text);
        border: 1px solid var(--elevita-warning-border);
    }

    :root[data-bs-theme="dark"] .badge-soft-primary {
        background: #1e1b4b;
        color: var(--elevita-brand-primary-border);
        border: 1px solidvar(--elevita-brand-primary-hover);
    }

    /* Dropdowns in dark mode – lighter text */
    :root[data-bs-theme="dark"] .dropdown-menu {
        background-color: var(--elevita-surface-dark-950);
        color: #e5e7eb;
        border-color: var(--elevita-gray-800);
    }

    :root[data-bs-theme="dark"] .dropdown-item {
        color: #e5e7eb;
    }

        :root[data-bs-theme="dark"] .dropdown-item:hover,
        :root[data-bs-theme="dark"] .dropdown-item:focus {
            background-color: var(--elevita-gray-800);
            color: #f9fafb;
        }

    :root[data-bs-theme="dark"] .badge-soft-neutral {
        background: #0b1220;
        color: #e5e7eb;
        border: 1px solid var(--elevita-surface-dark-700);
    }

    /* Dot bullets */
    :root[data-bs-theme="dark"] .dot-6 {
        background: #94a3b8;
    }

    /* Alerts */
    :root[data-bs-theme="dark"] .alert-light {
        background: #0b1220;
        border-color: var(--elevita-gray-800);
        color: #cbd5e1;
    }

    /* Breadcrumb links */
    :root[data-bs-theme="dark"] .breadcrumb .breadcrumb-item a {
        color: var(--elevita-brand-primary-border);
    }

    :root[data-bs-theme="dark"] .breadcrumb .breadcrumb-item.active {
        color: #9aa3b2;
    }

    /* === FINAL DARK-MODE OVERRIDES (put at very bottom of site.css) === */

    /* Make the whole page background truly dark */
    :root[data-bs-theme="dark"] html,
    :root[data-bs-theme="dark"] body {
        background-color: var(--elevita-surface-dark-950) !important; /* deep slate */
    }

    /* Make Bootstrap containers transparent so they don't reintroduce light bg */
    :root[data-bs-theme="dark"] .container,
    :root[data-bs-theme="dark"] .container-fluid {
        background-color: transparent !important;
    }

    /* Sidebar column stays dark as well */
    :root[data-bs-theme="dark"] .layout-sidebar {
        background-color: var(--elevita-surface-dark-950) !important;
        border-right-color: var(--elevita-gray-800);
    }

/* === Footer override so it doesn't cover content === */
.footer {
    position: static !important; /* no fixed/absolute footer */
    width: 100%;
    line-height: normal;
}

/* Make sure the outer gutters follow the theme too */
html[data-bs-theme="light"],
html[data-bs-theme="light"] body {
    background-color: var(--bs-body-bg) !important;
}

html[data-bs-theme="dark"],
html[data-bs-theme="dark"] body {
    background-color: var(--bs-body-bg) !important;
}

/* Ensure outer gutters match theme background */
html[data-bs-theme="light"],
html[data-bs-theme="light"] body {
    background-color: var(--elevita-body-bg) !important;
}

html[data-bs-theme="dark"],
html[data-bs-theme="dark"] body {
    background-color: var(--elevita-body-bg) !important;
}

/* Navbar auth links (Login/Logout) */
.navbar .nav-link.btn-link {
    text-decoration: none;
}

/* Dark mode: default navbar link text (non-branded only) */
html[data-bs-theme="dark"] .navbar .nav-link.btn-link:not(.elevita-brand) {
    color: #e5e7eb;
}

html[data-bs-theme="dark"] .navbar .nav-link.btn-link.elevita-brand {
    color: var(--elevita-brand-text) !important;
}

/* =========================================
   GLOBAL DARK-MODE FORM & DROPDOWN FIXES
   ========================================= */

/* Make ALL basic inputs light with dark text in dark mode */
html[data-bs-theme="dark"] input,
html[data-bs-theme="dark"] textarea,
html[data-bs-theme="dark"] select {
    background-color: #e5e7eb !important; /* light slate */
    color: var(--elevita-gray-900) !important; /* dark text */
    border-color: var(--elevita-surface-dark-800) !important;
}

    /* Stronger placeholder in dark mode */
    html[data-bs-theme="dark"] input::placeholder,
    html[data-bs-theme="dark"] textarea::placeholder {
        color: #9ca3af !important; /* slate-400 */
        opacity: 1;
    }

/* Generic popup/dropdown list containers (covers Bootstrap, bootstrap-table,
   bootstrap-select, and many ARIA listbox-style widgets) */
html[data-bs-theme="dark"] .dropdown-menu,
html[data-bs-theme="dark"] [role="listbox"],
html[data-bs-theme="dark"] ul[role="listbox"],
html[data-bs-theme="dark"] .show > ul[role="listbox"] {
    background-color: var(--elevita-surface-dark-900) !important; /* dark background */
    color: #e5e7eb !important;
    border-color: var(--elevita-surface-dark-800) !important;
}

    /* Items inside those lists */
    html[data-bs-theme="dark"] .dropdown-menu li,
    html[data-bs-theme="dark"] .dropdown-menu .dropdown-item,
    html[data-bs-theme="dark"] [role="listbox"] li,
    html[data-bs-theme="dark"] [role="option"] {
        color: #e5e7eb !important;
    }

        /* Hover / active state for list items */
        html[data-bs-theme="dark"] .dropdown-menu li:hover,
        html[data-bs-theme="dark"] .dropdown-menu .dropdown-item:hover,
        html[data-bs-theme="dark"] [role="listbox"] li:hover,
        html[data-bs-theme="dark"] [role="option"].active,
        html[data-bs-theme="dark"] [role="option"]:hover {
            background-color: var(--elevita-surface-dark-800) !important;
            color: #ffffff !important;
        }

/* =========================================
   BOOTSTRAP-TABLE FILTER SELECT FIX
   (These menus should stay LIGHT in dark mode)
   ========================================= */

/* The dropdown list background */
html[data-bs-theme="dark"] .bootstrap-select .dropdown-menu.inner {
    background-color: #ffffff !important; /* pure white */
    color: #000000 !important;
}

    /* Each list item */
    html[data-bs-theme="dark"] .bootstrap-select .dropdown-menu.inner .text {
        color: #000000 !important; /* black text */
    }

    /* Hover / active */
    html[data-bs-theme="dark"] .bootstrap-select .dropdown-menu.inner li:hover .text,
    html[data-bs-theme="dark"] .bootstrap-select .dropdown-menu.inner li.active .text {
        color: #000000 !important;
        background-color: #e5e7eb !important; /* light gray hover */
    }

/* The toggle button (the thing you click to open it) */
html[data-bs-theme="dark"] .bootstrap-select .dropdown-toggle {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #d1d5db !important; /* gray-300 */
}


/* =========================================
   Locations UI
   ========================================= */
.locations {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
}

    .locations > span {
        flex: 0 0 auto;
    }

.location-pill {
    background-color: #eef2f6;
    color: #000;
}

.location-pill-primary {
    background-color: var(--elevita-permission-bg-on);
    color: var(--elevita-permission-color-on) !important;
}

.location-pill,
.location-pill-primary {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 9999px; /* full pill shape */
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
}

.location-select {
    min-width: 320px;
    adjust to taste
}


/* =========================================
   Permissions UI
   ========================================= */
.permission-pill.inactive {
    opacity: .5;
}

.permission-pill-off {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25em;
    width: 9em;
    background-color: var(--elevita-permission-bg-off);
    color: var(--elevita-permission-color-off) !important;
    border: var(--elevita-permission-border-off);
    border-radius: var(--bs-border-radius-xl) !important;
    white-space: nowrap;
    font-weight: 600 !important;
    padding: .25em !important;
    padding-right: .5em !important;
    padding-left: .5em !important;
    border: solid var(--elevita-muted-600) 1px;
}

    .permission-pill-off .permission-dot {
        display: inline-block;
        background-color: rgb(71 85 105);
        border-radius: 9999px;
        width: 1em;
        height: 1em;
    }

.permission-pill-inherited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25em;
    width: 9em;
    background-color: var(--elevita-permission-bg-inherited);
    color: var(--elevita-permission-color-inherited) !important;
    border: var(--elevita-permission-border-inherited);
    border-radius: var(--bs-border-radius-xl) !important;
    white-space: nowrap;
    font-weight: 600 !important;
    padding: .25em !important;
    padding-right: .5em !important;
    padding-left: .5em !important;
}

    .permission-pill-inherited .permission-dot {
        display: inline-block;
        background-color: transparent;
        border-radius: 9999px;
        width: 1em;
        height: 1em;
    }

        .permission-pill-inherited .permission-dot::before {
            content: "\f4cf";
            display: inline-block;
            font-family: bootstrap-icons !important;
            font-style: normal;
            font-weight: normal !important;
            font-variant: normal;
            text-transform: none;
            line-height: 1em;
            vertical-align: .125em;
            -webkit-font-smoothing: antialiased;
        }

.permission-pill-on {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25em;
    width: 9em;
    background-color: var(--elevita-permission-bg-on);
    color: var(--elevita-permission-color-on) !important;
    border: var(--elevita-permission-border-on);
    border-radius: var(--bs-border-radius-xl) !important;
    white-space: nowrap;
    font-weight: 600 !important;
    padding: .25em !important;
    padding-right: .5em !important;
    padding-left: .5em !important;
}

    .permission-pill-on .permission-dot {
        display: inline-block;
        background-color: rgb(255 255 255);
        border-radius: 9999px;
        width: 1em;
        height: 1em;
    }

.permission-status-dot {
    display: inline-block;
    vertical-align: top;
    background-color: rgb(52 211 153);
    width: .5em;
    height: .5em;
    border-radius: 50%;
    margin-top: .17em;
}

.accessGroupCard {
    transition: box-shadow 200ms linear;
}

    .accessGroupCard.selected {
        border: solid rgb(59 130 246) 1px;
        box-shadow: 0 0 7px rgb(59 130 246 / .5);
    }

/* =========================================
   Tailwind-like form controls (Bootstrap + Elevita)
   ========================================= */

/* Theme-aware input tokens */
html[data-bs-theme="light"] {
    --elevita-input-bg: #ffffff;
    --elevita-input-text: var(--elevita-gray-900); /* slate-900 */
    --elevita-input-border: #d1d5db; /* gray-300 */
    --elevita-input-border-hover: #cbd5e1; /* slate-300 */
    --elevita-input-placeholder: #9ca3af; /* slate-400 */
}

html[data-bs-theme="dark"] {
    /* NOTE: your file already forces inputs/selects to be light in dark mode. Keep consistent. */
    --elevita-input-bg: #e5e7eb; /* light slate */
    --elevita-input-text: var(--elevita-gray-900); /* slate-900 */
    --elevita-input-border: var(--elevita-surface-dark-800); /* slate-800 */
    --elevita-input-border-hover: var(--elevita-surface-dark-700); /* slate-700 */
    --elevita-input-placeholder: #64748b; /* slate-500 */
}

/* Inputs + selects: rounded, clean, “Tailwind-y” */
.form-control,
.form-select,
.form-control-sm,
.form-select-sm {
    border-radius: .75rem; /* ~rounded-xl */
    border: 1px solid var(--elevita-input-border);
    background-color: var(--elevita-input-bg);
    color: var(--elevita-input-text);
    padding: .55rem .75rem;
    box-shadow: none;
    transition: border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.form-control-sm,
.form-select-sm {
    padding: .35rem .6rem;
    border-radius: .6rem;
}

.form-control::placeholder {
    color: var(--elevita-input-placeholder);
    opacity: 1;
}

.form-control:hover,
.form-select:hover {
    border-color: var(--elevita-input-border-hover);
}

/* Focus ring: use your existing focus ring idea, but keep it subtle */
.form-control:focus,
.form-select:focus {
    border-color: var(--elevita-focus-blue);
    box-shadow: 0 0 0 0.2rem var(--elevita-focus-ring-blue);
}

/* [2025-01-27 MKO] Match disabled select styling to readonly inputs in view mode */
.form-select:disabled {
    background-color: var(--elevita-input-bg);
    color: var(--elevita-input-text);
    opacity: 1;
}

/* Labels: slightly more “product UI” */
.form-label,
label {
    font-weight: 600;
}

/* Buttons: slightly more Tailwind-ish without fighting Bootstrap */
.btn {
    border-radius: .75rem;
    font-weight: 600;
    box-shadow: none;
}

.btn-sm {
    border-radius: .6rem;
}

/* Signature Pads */

.signaturePad {
    width: 100%;
    max-width: 800px;
    aspect-ratio: 4 / 1;
    display: block;
    touch-action: none;
}

.initialPad {
    width: 100%;
    /*max-width: 400px;*/

    aspect-ratio: 2 / 1;
    display: block;
    touch-action: none;
}

/* =========================================
   Tom Select skin (matches Elevita)
   ========================================= */

/* Wrapper */
.ts-wrapper {
    min-height: 0;
}

/* The visible control (looks like an input) */
.ts-control {
    border-radius: .75rem;
    border: 1px solid var(--elevita-input-border);
    background-color: var(--elevita-input-bg);
    color: var(--elevita-input-text);
    padding: .45rem .65rem;
    box-shadow: none;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

    /* The search input inside Tom Select */
    .ts-control input {
        color: var(--elevita-input-text) !important;
    }

/* Focus state */
.ts-wrapper.focus .ts-control {
    border-color: var(--elevita-focus-blue);
    box-shadow: 0 0 0 0.2rem var(--elevita-focus-ring-blue);
}

/* Dropdown */
.ts-dropdown {
    border-radius: .75rem;
    border: 1px solid var(--elevita-input-border);
    background: var(--elevita-surface-bg);
    box-shadow: var(--elevita-surface-shadow);
    overflow: hidden;
}

    /* Options */
    .ts-dropdown .option {
        padding: .5rem .75rem;
    }

        .ts-dropdown .option.active,
        .ts-dropdown .option:hover {
            background: rgba(79, 70, 229, 0.12); /* indigo tint */
        }

/* Multi-select “chips” */
.ts-wrapper.multi .ts-control > .item {
    border-radius: 999px;
    padding: .2rem .55rem;
    margin: .15rem .25rem .15rem 0;
    border: 1px solid var(--elevita-hairline);
    background: rgba(79, 70, 229, 0.10);
    color: var(--elevita-input-text);
}

    /* Chip remove button */
    .ts-wrapper.multi .ts-control > .item .remove {
        border-left: none;
        margin-left: .35rem;
        opacity: .8;
    }

/* Ensure Tom Select fills the column like a normal .form-select */
.ts-wrapper,
.ts-control {
    width: 100%;
}

    /* Placeholder text tone */
    .ts-control input::placeholder {
        color: var(--elevita-input-placeholder) !important;
        opacity: 1;
    }

    /* Tom Select chips — Tailwind-style */
    .ts-wrapper.multi .ts-control > .item {
        background-color: rgba(37, 99, 235, 0.10); /* blue-600 @ 10% */
        border: 1px solid rgba(37, 99, 235, 0.25);
        color: #1e3a8a; /* blue-900 */
        font-size: 0.75rem;
        line-height: 1.25rem;
    }

        .ts-wrapper.multi .ts-control > .item .remove {
            color: #1e3a8a;
        }

/* Inline admin links */
a.js-manage-picklist {
    font-size: 0.75rem;
    color: #2563eb; /* blue-600 */
    text-decoration: none;
}

    a.js-manage-picklist:hover {
        text-decoration: underline;
    }

/* [2025-01-19 MKO] Picklist drag handle - use CSS to reliably display hamburger icon
   This bypasses font/encoding issues when JS creates new rows dynamically */
.picklist-drag-handle {
    font-size: 0;
    line-height: 0;
    cursor: grab;
}

    .picklist-drag-handle::before {
        content: "\2630"; /* ☰ hamburger icon via Unicode escape */
        font-size: 1rem;
        line-height: normal;
    }

.bg-elevita-gradient {
    background: linear-gradient(160deg, var(--elevita-accent-teal-dark) 0%, var(--elevita-accent-teal) 100%);
}

.logo-tile {
    background: #ffffff;
    border-radius: 1rem;
    padding: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--elevita-shadow-sm), var(--elevita-shadow-md);
}

    .logo-tile img {
        max-width: 120px;
    }

.login-form-panel {
    background-color: #ffffff;
}

.card {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.login-form-panel {
    background-color: #ffffff;
}

:root[data-bs-theme="dark"] .login-form-panel {
    background-color: rgba(30, 41, 59, 0.92); /* slate-800 w/ lift */
    color: #e5e7eb;
    /* Subtle separation from background */
    backdrop-filter: blur(2px);
}

:root[data-bs-theme="dark"] .card {
    box-shadow: var(--elevita-shadow-xl-dark);
}

/* Headings */
:root[data-bs-theme="dark"] h3 {
    color: #f9fafb;
}

/* Muted text */
:root[data-bs-theme="dark"] .text-muted {
    color: #9ca3af !important;
}

:root[data-bs-theme="dark"] .form-control {
    background-color: var(--elevita-surface-dark-800); /* slate-800 */
    border-color: var(--elevita-surface-dark-700); /* slate-700 */
    color: #f9fafb;
}

    :root[data-bs-theme="dark"] .form-control::placeholder {
        color: #94a3b8;
    }

    :root[data-bs-theme="dark"] .form-control:focus {
        background-color: var(--elevita-surface-dark-800);
        border-color: var(--elevita-accent-teal);
        box-shadow: 0 0 0 0.2rem var(--elevita-focus-ring-teal);
        color: #ffffff;
    }

:root[data-bs-theme="dark"] .bg-elevita-gradient {
    background: linear-gradient(160deg, var(--elevita-accent-teal-darker) 0%, var(--elevita-accent-teal-dark) 100%);
}

    /* Optional: soften logo background if PNG has white */
    :root[data-bs-theme="dark"] .bg-elevita-gradient img {
        background-color: rgba(255, 255, 255, 0.96);
        border-radius: 0.75rem;
        padding: 0.75rem;
    }

:root[data-bs-theme="dark"] .login-form-panel {
    background-color: rgb(71 85 105) !important;
}

/* ===============================
   LIGHT MODE (default)
================================ */
.btn-primary-login {
    background-color: #2fa4a0;
    border-color: #2fa4a0;
    color: #ffffff !important;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

    .btn-primary-login:hover {
        background-color: #3fb5b1;
        border-color: #3fb5b1;
    }

    .btn-primary-login:focus,
    .btn-primary-login:active,
    .btn-primary-login:focus-visible {
        background-color: #278f8b;
        border-color: #278f8b;
        color: #ffffff !important;
        box-shadow: none;
    }

/* ===============================
   DARK MODE
================================ */
[data-bs-theme="dark"] .btn-primary-login {
    background-color: #238b88;
    border-color: #238b88;
    color: #ffffff !important;
}

    [data-bs-theme="dark"] .btn-primary-login:hover {
        background-color: #2fa4a0;
        border-color: #2fa4a0;
    }

    [data-bs-theme="dark"] .btn-primary-login:focus,
    [data-bs-theme="dark"] .btn-primary-login:active,
    [data-bs-theme="dark"] .btn-primary-login:focus-visible {
        background-color: #1f7774;
        border-color: #1f7774;
        color: #ffffff !important;
        box-shadow: none;
    }



/* Logo frame (works in light + dark) */
.logo-frame {
    display: inline-flex;
    padding: 7px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 2px rgba(46, 163, 155, 0.45), 0 12px 28px rgba(0, 0, 0, 0.25);
}

.logo-img {
    display: block;
    max-width: 200px;
    height: auto;
    border-radius: 18px;
    background: #ffffff;
}

/* ================================
   LOGIN – Dark mode input fix
   ================================ */

:root[data-bs-theme="dark"] .login-form-panel .form-control {
    background-color: #475771 !important; /* slate-800 */
    color: #f9fafb !important;
    border-color: var(--elevita-surface-dark-700) !important;
}

    :root[data-bs-theme="dark"] .login-form-panel .form-control::placeholder {
        color: #94a3b8 !important;
    }

/* ================================
   LOGIN – Dark mode links
   ================================ */

:root[data-bs-theme="dark"] .login-form-panel a {
    color: #7dd3c7; /* soft teal */
    font-weight: 500;
}

    :root[data-bs-theme="dark"] .login-form-panel a:hover {
        color: #a7f3e8;
        text-decoration: underline;
    }

/* =========================================================
   APP SHELL + LEFT NAV (AUTHORITATIVE)
   ========================================================= */

:root {
    --app-header-height: 48px;
}

/* =========================================================
   App Header — STRUCTURE ONLY (NO COLOR)
   ========================================================= */
.app-auth .app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 60;
}

.app-header,
.navbar {
    height: var(--app-header-height);
}

.app-shell {
    padding-top: var(--app-header-height);
}

/* Shell container */
.app-auth .app-shell {
    display: flex;
    min-height: 100vh;
}

/* Header should align flush with left nav */
.app-auth .app-header {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

    .app-auth .app-header .navbar {
        border-radius: 0 !important;
    }

/* Left navigation */
.app-auth .left-nav {
    position: fixed;
    top: var(--app-header-height);
    left: 0;
    bottom: 0;
    width: var(--leftnav-width);
    background: var(--elevita-sidebar-bg);
    border-right: 1px solid var(--elevita-surface-border);
    z-index: 40;
    transition: width 0.2s ease;
    overflow: hidden;
}

.left-nav.collapsed {
    width: var(--leftnav-collapsed);
}

    .left-nav.collapsed .nav-label {
        display: none;
    }

    .left-nav.collapsed .nav-badge {
        margin-left: auto;
    }

/* Main content */
.app-auth .app-main {
    flex: 1;
    background: var(--elevita-body-bg) !important;
    margin-left: var(--leftnav-width);
    padding: 0;
    transition: margin-left 0.2s ease;
    border-left: 1px solid var(--elevita-hairline);
}

.app-auth .left-nav.collapsed + .app-main {
    margin-left: var(--leftnav-collapsed);
}

/* Nav items */
.nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .6rem .75rem;
    border-radius: .75rem;
    font-size: .875rem;
    font-weight: 500;
    color: var(--elevita-gray-700);
    text-decoration: none;
}

    .nav-item:hover {
        background: #f3f4f6;
    }

/* Dark mode nav */
html[data-bs-theme="dark"] .nav-item {
    color: #e5e7eb;
}

    html[data-bs-theme="dark"] .nav-item:hover {
        background: var(--elevita-gray-800);
    }

    html[data-bs-theme="dark"] .nav-item.active {
        background: var(--elevita-surface-dark-800);
        color: var(--elevita-brand-primary-border);
        border-color: var(--elevita-surface-dark-700);
    }

/* Collapse toggle (larger + easier to hit) */
.collapse-btn {
    position: absolute;
    top: 16px;
    right: 1px;
    height: 24px; /* ↓ from 32px */
    width: 24px; /* ↓ from 32px */
    border-radius: 999px;
    background: var(--elevita-surface-bg);
    border: 1px solid var(--elevita-surface-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 50;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
}

    .collapse-btn:hover {
        background: rgba(37, 99, 235, 0.08);
    }

.collapse-icon {
    font-size: 18px; /* ↑ bigger */
    font-weight: 800; /* bold */
    color: #2563eb; /* blue */
    line-height: 1;
    transition: transform 0.2s ease;
}


.left-nav.collapsed .collapse-icon {
    transform: rotate(180deg);
}


.left-nav.collapsed {
    padding-left: 0;
    padding-right: 0;
}

    .left-nav.collapsed .nav-item {
        justify-content: center;
        padding: .5rem 0;
    }

    .left-nav.collapsed .nav-label,
    .left-nav.collapsed .nav-badge {
        display: none;
    }

    /* HARD collapse: hide ALL sidebar text/content */
    .left-nav.collapsed * {
        opacity: 0;
        pointer-events: none;
    }

    /* Re-enable collapse button */
    .left-nav.collapsed .collapse-btn,
    .left-nav.collapsed .collapse-btn * {
        opacity: 1;
        pointer-events: auto;
    }

.left-nav-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-top: 3rem; /* 16px */
}

/*.nav-pill {
    display: flex;
    padding: 0.5rem 0.75rem;*/ /* px-3 py-2 */
/*border-radius: 0.75rem;*/ /* rounded-xl */
/*font-size: 0.875rem;*/ /* text-sm */
/*text-decoration: none;
}*/

/* KEEP in site.css */
/*.nav-pill {
    color: #374151;*/ /* gray-700 */
/*}*/

/*.nav-pill:hover {
    background-color: #f9fafb;*/ /* gray-50 */
/*}

.nav-pill:hover {
    text-decoration: none;
}

.nav-pill-active {
    display: flex;
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    border-width: 1px;
    border-style: solid;
}

.nav-pill-active {
    background-color: #eef2ff;*/ /* indigo-50 */
/*color: #4338ca;*/ /* indigo-700 */
/*border-color: #e0e7ff;*/ /* indigo-100 */
/*}*/

.badge-primary {
    border-radius: 9999px; /* rounded-full */
    font-size: 0.75rem; /* text-xs */
    padding: 0.125rem 0.5rem; /* px-2 */
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.badge-primary {
    background-color: #4f46e5; /* indigo-600 */
    color: #ffffff;
}

/* ============================= */
/* Tailwind-like utility helpers */
/* ============================= */

.rounded-xl {
    border-radius: 0.75rem;
}

.rounded-2xl {
    border-radius: 1rem;
}

.shadow-sm {
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.bg-gray-50 {
    background-color: #f9fafb;
}

.text-xs {
    font-size: 0.75rem;
}

.text-gray-500 {
    color: var(--elevita-gray-500);
}

.text-gray-600 {
    color: #4b5563;
}


/* ============================= */
/* Tailwind-style grid utilities */
/* ============================= */

.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gap-6 {
    gap: 1.5rem;
}

/* xl breakpoint (matches Tailwind: 1280px) */
@media (min-width: 1280px) {
    .xl\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .xl\:col-span-2 {
        grid-column: span 2 / span 2;
    }
}

/* Status pills */

.bg-amber-50 {
    background-color: #fffbeb;
}

.border-amber-200 {
    border-color: #fde68a;
}

.text-amber-700 {
    color: #b45309;
}

.bg-rose-50 {
    background-color: #fff1f2;
}

.border-rose-200 {
    border-color: #fecdd3;
}

.text-rose-700 {
    color: #be123c;
}

.bg-indigo-50 {
    background-color: var(--elevita-brand-primary-soft);
}

.border-indigo-200 {
    border-color: var(--elevita-brand-primary-border);
}

.text-indigo-700 {
    color: var(--elevita-brand-primary-hover);
}

.bg-emerald-50 {
    background-color: #ecfdf5;
}

.border-emerald-200 {
    border-color: #a7f3d0;
}

.text-emerald-700 {
    color: #047857;
}

.rounded-full {
    border-radius: 9999px;
    line-height: 1;
}

html {
    font-size: 14px;
}

body {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

.card {
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
}

.bg-gray-50 {
    background-color: #f8fafc;
}

.border {
    border-color: #e5e7eb;
}

.text-gray-900 {
    color: var(--elevita-surface-dark-900);
}

.text-gray-500 {
    color: #64748b;
}

.text-gray-600 {
    color: #475569;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    display: inline-block;
}

/* Tighten top app header to match legacy look */
.app-auth .app-header .navbar {
    padding-top: 0;
    padding-bottom: 0;
    min-height: 48px;
}

/* Work queue filter pills */
.workqueue-filter {
    font-weight: 600;
}

/* Rotate when collapsed */
.left-nav.collapsed i {
    transform: rotate(180deg);
}

/* === DARK MODE CANVAS === */
html[data-bs-theme="dark"] body {
    background-color: var(--elevita-surface-dark-950); /* slate-950 */
}

/* Main app canvas */
html[data-bs-theme="dark"] .app-main {
    background-color: var(--elevita-surface-dark-950); /* deep slate */
}

html[data-bs-theme="dark"] .card,
html[data-bs-theme="dark"] .surface {
    background-color: var(--elevita-gray-900); /* slate-900 */
    border-color: var(--elevita-gray-800);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

html[data-bs-theme="dark"] .list-group-item {
    background-color: #0b1220; /* slate-950-ish */
    border-color: var(--elevita-gray-800);
}

/* Dark mode – card surfaces */
html[data-bs-theme="dark"] .card,
html[data-bs-theme="dark"] .surface {
    background-color: var(--elevita-surface-dark-900); /* slate-900 */
    border-color: var(--elevita-surface-dark-800);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
}

/* Dark mode – tables */
html[data-bs-theme="dark"] table {
    background-color: var(--elevita-surface-dark-900);
}

html[data-bs-theme="dark"] thead {
    background-color: var(--elevita-surface-dark-950);
    color: #cbd5e1;
}

html[data-bs-theme="dark"] tbody tr {
    background-color: var(--elevita-surface-dark-900);
    border-color: var(--elevita-gray-800);
}

    html[data-bs-theme="dark"] tbody tr:hover {
        background-color: #162036;
    }

/* Kill hard-coded white backgrounds in dark mode */
html[data-bs-theme="dark"] .bg-white {
    background-color: var(--elevita-surface-bg) !important;
}

html[data-bs-theme="dark"] {
    --elevita-surface-bg: #2b2b2b; /* deep slate */
    --elevita-surface-border: rgba(255, 255, 255, 0.06);
}

    html[data-bs-theme="dark"] .card,
    html[data-bs-theme="dark"] .surface,
    html[data-bs-theme="dark"] .bg-panel {
        background-color: var(--elevita-bg-card) !important;
        border-color: var(--elevita-surface-border) !important;
    }

    html[data-bs-theme="dark"] .border {
        border-color: rgba(255, 255, 255, 0.06) !important;
    }

    /* ===============================
DARK MODE – SURFACE FIX
=============================== */

    html[data-bs-theme="dark"] .card,
    html[data-bs-theme="dark"] .surface,
    html[data-bs-theme="dark"] .bg-white {
        background-color: var(--elevita-surface-dark-900) !important; /* slate-900 */
        border-color: var(--elevita-surface-dark-800) !important; /* slate-800 */
        box-shadow: 0 10px 30px rgba(0,0,0,0.45);
    }

    html[data-bs-theme="dark"] .bg-gray-50,
    html[data-bs-theme="dark"] .list-soft,
    html[data-bs-theme="dark"] .list-group-item,
    html[data-bs-theme="dark"] .workqueue-item {
        background-color: var(--elevita-surface-dark-950) !important; /* slate-950 */
        border-color: var(--elevita-surface-dark-800) !important;
    }

        html[data-bs-theme="dark"] .list-group-item:hover,
        html[data-bs-theme="dark"] .workqueue-item:hover {
            background-color: var(--elevita-surface-dark-950);
        }

    /* ===============================
DARK MODE – TEXT HIERARCHY
=============================== */

    html[data-bs-theme="dark"] .text-gray-900,
    html[data-bs-theme="dark"] h1,
    html[data-bs-theme="dark"] h2,
    html[data-bs-theme="dark"] h3 {
        color: #f8fafc !important;
    }

    html[data-bs-theme="dark"] .text-gray-600,
    html[data-bs-theme="dark"] .text-muted,
    html[data-bs-theme="dark"] .text-muted-600 {
        color: #94a3b8 !important; /* slate-400 */
    }

    html[data-bs-theme="dark"] .text-gray-500,
    html[data-bs-theme="dark"] .fs-xs {
        color: #64748b !important; /* slate-500 */
    }


    html[data-bs-theme="dark"] table {
        background-color: var(--elevita-surface-dark-950);
    }

    html[data-bs-theme="dark"] thead th {
        color: #cbd5e1;
        border-bottom: 1px solid var(--elevita-surface-dark-800);
    }

    html[data-bs-theme="dark"] tbody tr {
        border-bottom: 1px solid var(--elevita-surface-dark-800);
    }

        html[data-bs-theme="dark"] tbody tr:hover {
            background-color: var(--elevita-surface-dark-950);
        }

    html[data-bs-theme="dark"] table {
        background-color: var(--elevita-surface-dark-950);
    }

    html[data-bs-theme="dark"] thead th {
        color: #cbd5e1;
        border-bottom: 1px solid var(--elevita-surface-dark-800);
    }

    html[data-bs-theme="dark"] tbody tr {
        border-bottom: 1px solid var(--elevita-surface-dark-800);
    }

        html[data-bs-theme="dark"] tbody tr:hover {
            background-color: var(--elevita-surface-dark-950);
        }

    /* =========================================
FINAL DARK MODE FOOTER / PAGE BOTTOM FIX
========================================= */

    /* Anything at the very bottom of the page */
    html[data-bs-theme="dark"] body,
    html[data-bs-theme="dark"] body > *,
    html[data-bs-theme="dark"] main,
    html[data-bs-theme="dark"] footer,
    html[data-bs-theme="dark"] .footer,
    html[data-bs-theme="dark"] .container,
    html[data-bs-theme="dark"] .container-fluid,
    html[data-bs-theme="dark"] .row {
        background-color: var(--elevita-surface-dark-950) !important; /* slate-950 */
    }

    /* Footer text */
    html[data-bs-theme="dark"] footer,
    html[data-bs-theme="dark"] .footer {
        color: #94a3b8 !important;
        border-top: 1px solid var(--elevita-surface-dark-800);
    }

    /* ===============================
Anonymous pages – DARK MODE
=============================== */
    html[data-bs-theme="dark"] body.app-anon {
        background: radial-gradient( 1200px 600px at 50% -200px, var(--elevita-gray-800) 0%, var(--elevita-surface-dark-950) 60% );
    }

/* ===============================
   Anonymous pages – LIGHT MODE
   =============================== */
html[data-bs-theme="light"] body.app-anon {
    background: linear-gradient( 180deg, #f8fafc 0%, #eef2f7 100% );
}

/* Tailwind-style tab bar */
.tabbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .25rem;
    padding: .25rem;
    border-radius: .75rem;
    background: var(--elevita-gray-50);
}

    .tabbar .nav-link {
        width: 100%;
        border: 0;
        border-radius: .6rem;
        padding: .375rem .75rem;
        font-weight: 600;
        font-size: .875rem;
        color: var(--elevita-muted-600);
        background: transparent;
        transition: background-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
    }

        .tabbar .nav-link.active,
        .tabbar .show > .nav-link {
            background: var(--elevita-surface-bg);
            color: var(--elevita-muted-700);
            box-shadow: 0 1px 2px rgba(16, 24, 40, 0.12);
        }

        .tabbar .nav-link:hover {
            color: var(--elevita-muted-700);
        }

        .tabbar .nav-link:focus,
        .tabbar .nav-link:active:focus {
            outline: 0;
            box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb !important;
        }

/* Space between action buttons in modals */
.space-y-1 > * + * {
    margin-top: 0.25rem;
}

/* Client Demographics specific spacing */
.client-demographics-section {
    margin-bottom: 1.5rem;
}

    .client-demographics-section:last-child {
        margin-bottom: 0;
    }

/* =========================================
   Portal Sync Banner Styles
   ========================================= */
.portal-sync-banner {
    background-color: var(--elevita-brand-primary-soft);
    border-color: var(--elevita-brand-primary-border);
}

html[data-bs-theme="dark"] .portal-sync-banner {
    background-color: #1e1b4b;
    border-color: var(--elevita-brand-primary-hover);
}

    html[data-bs-theme="dark"] .portal-sync-banner .fw-medium {
        color: var(--elevita-brand-primary-border) !important;
    }

    html[data-bs-theme="dark"] .portal-sync-banner .portal-badge {
        background-color: var(--elevita-surface-dark-900) !important;
        border-color: var(--elevita-brand-primary-hover) !important;
        color: #a5b4fc !important;
    }

    html[data-bs-theme="dark"] .portal-sync-banner .btn {
        background-color: var(--elevita-brand-primary) !important;
    }

/* Portal Mode Toggle */
.portal-mode-toggle .btn {
    font-size: 11px;
}

/* =========================================
   DARK MODE – COUNT / STATUS BADGES FIX
   ========================================= */

html[data-bs-theme="dark"] .badge,
html[data-bs-theme="dark"] .badge.rounded-pill {
    background-color: #6366f1 !important; /* indigo-500 */
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-weight: 600;
}

    /* Smaller numeric badges (work queue counts) */
    html[data-bs-theme="dark"] .badge.fs-xs,
    html[data-bs-theme="dark"] .badge.text-xs {
        background-color: var(--elevita-brand-primary) !important; /* indigo-600 */
        color: #ffffff !important;
    }

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,.25);
}

.user-chip {
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
}

[data-bs-theme="dark"] .user-avatar {
    border-color: rgba(255,255,255,.35);
}

/* =========================================
   User Management Table Fix
   [2025-01-26 MKO] Fix column layout for 6-column user table
   ========================================= */
#Setup_UserManagementTable > .row {
    flex-wrap: nowrap !important;
}

    #Setup_UserManagementTable > .row > .col {
        flex: 1;
        white-space: normal;
        word-wrap: break-word;
    }


/* =========================================
   Dim modal background when loading
   [2026-01-29 KLS] Add grayscale filter for extra visual de-emphasis
   ========================================= */
.modal.modal-dimmed {
    pointer-events: none;
    opacity: 0.35;
    filter: grayscale(0.4);
}

    .modal.modal-dimmed .modal-footer {
        opacity: 0.25;
    }

.bootbox .modal-dialog {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
}

/* Never visually dim when a Bootbox modal is open */
body:has(.bootbox.modal.show) .modal.modal-dimmed {
    filter: none !important;
    pointer-events: none;
}

/* =========================================
   Editable Picklist Icon Button
   [2026-01-30 MKO] Consistent icon for editable picklists
   Displays pencil icon to right of label, opens picklist manager
   ========================================= */
.btn-picklist-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    padding: 0;
    font-size: 0.7rem;
    color: var(--elevita-muted-600, #6c757d);
    background-color: transparent;
    border: 1px solid transparent; /* [2026-01-30 MKO] Invisible border by default, visible on hover */
    border-radius: 0.25rem;
    cursor: pointer;
    transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

    .btn-picklist-edit:hover,
    .btn-picklist-edit:focus {
        color: #4f46e5;
        background-color: rgba(79, 70, 229, 0.08);
        border-color: #4f46e5; /* Border appears on hover */
        outline: none;
    }

    .btn-picklist-edit:active {
        background-color: rgba(79, 70, 229, 0.15);
    }

/* Dark mode adjustments */
html[data-bs-theme="dark"] .btn-picklist-edit {
    color: #94a3b8;
}

    html[data-bs-theme="dark"] .btn-picklist-edit:hover,
    html[data-bs-theme="dark"] .btn-picklist-edit:focus {
        color: #a5b4fc;
        background-color: rgba(99, 102, 241, 0.15);
        border-color: #6366f1; /* Border appears on hover in dark mode */
    }

/* =========================================
   Preview Watermark
   [2025-01-31] Diagonal watermark for form preview mode
   Fixed position, stays visible during scroll, non-interactive
   ========================================= */
.preview-watermark {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 8rem;
    font-weight: 700;
    letter-spacing: 0.5rem;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.08);
    pointer-events: none;
    user-select: none;
    z-index: 9999;
    white-space: nowrap;
}

/* Dark mode watermark */
html[data-bs-theme="dark"] .preview-watermark {
    color: rgba(255, 255, 255, 0.08);
}

/* =========================================
   Profile Breadcrumb Navigation
   [2025-01-30 MKO] Replaced sticky back arrow with breadcrumb
   ========================================= */
.profile-breadcrumb {
    font-size: 0.8125rem;
    font-weight: 500;
}

    .profile-breadcrumb .breadcrumb-item a {
        color: var(--elevita-muted-600);
        text-decoration: none;
        transition: color 150ms ease, text-decoration 150ms ease;
    }

        .profile-breadcrumb .breadcrumb-item a:hover {
            color: var(--elevita-focus-blue);
            text-decoration: underline;
        }

    .profile-breadcrumb .breadcrumb-item.active {
        color: var(--elevita-muted-700);
    }

    .profile-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
        content: ">";
        color: var(--elevita-muted-600);
    }

/* Dark mode adjustments for profile breadcrumb */
html[data-bs-theme="dark"] .profile-breadcrumb .breadcrumb-item a {
    color: #94a3b8;
}

    html[data-bs-theme="dark"] .profile-breadcrumb .breadcrumb-item a:hover {
        color: #a5b4fc;
    }

html[data-bs-theme="dark"] .profile-breadcrumb .breadcrumb-item.active {
    color: #e5e7eb;
}

html[data-bs-theme="dark"] .profile-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: #64748b;
}

