/*
 * Brand and compatibility layer on top of Spark Admin (spark.css) and Bootstrap 5.3.
 * New project = new colours: change the tokens in section 1 (and the logo's in public/assets/brand), nothing else.
 *
 * 1. Brand tokens mapped onto Spark/Bootstrap variables (default: the Spark palette, forest green + lime)
 * 2. Shell: sidebar, navbar, footer, guest/login
 * 3. Bootstrap components in Spark style (cards, buttons, forms, tables, ...)
 * 4. Sneat-compatible helpers (bg-label-*, btn-icon, btn-text-*, avatar, input-group-merge)
 * 5. Additions (gradients, small helpers)
 *
 * Load order: bootstrap.min.css -> spark.css -> app/app.css -> brand.css
 */

/* ---------------------------------------------------------------------
   1. Brand tokens
--------------------------------------------------------------------- */
:root {
    /* Project palette */
    --app-dark: #1F454E;
    --app-primary: #3E7B8A;
    --app-bright: #4E93A4;
    --app-accent: #A9D5DE;
    --app-purple: #315E6D;
    --app-soft: #E8F1F3;

    /* Spark variable names (spark.css reads these): dark = sidebar, medium = primary, lime = accent */
    --brand-forest-dark: #1F454E;
    --brand-forest-medium: #3E7B8A;
    --brand-forest-light: #2F6370;
    --brand-lime: #A9D5DE;
    --brand-lime-hover: #BFE2E9;
    --brand-lime-translucent: rgba(62, 123, 138, 0.15);
    --brand-sage: #E8F1F3;
    --surface-muted: #F6FAFB;
    --surface-hover: #EEF5F7;
    --border-input: rgba(11, 19, 15, 0.12);
    --focus-ring: 0 0 0 3px rgba(62, 123, 138, 0.18);
    --text-main: #26343A;
    --text-muted-green: #6A6A6B;
    --text-sidebar-muted: #A9C3C9;
    --border-light: #E3E8EA;
    --border-dark-green: rgba(255, 255, 255, 0.12);
    --bs-body-bg: #F3F5F6;

    --bs-font-sans-serif: 'Nexa', 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --bs-body-font-family: var(--bs-font-sans-serif);
    --bs-body-color: #26343A;
    --bs-body-color-rgb: 38, 52, 58;
    --bs-emphasis-color: #26343A;
    --bs-emphasis-color-rgb: 38, 52, 58;
    --bs-secondary-color: #6A6A6B;
    --bs-secondary-color-rgb: 106, 106, 107;
    --bs-tertiary-color: #8C9A9F;
    --bs-heading-color: #26343A;
    --bs-border-color: #E3E8EA;
    --bs-border-color-translucent: rgba(31, 69, 78, 0.10);
    --bs-border-radius: 10px;
    --bs-border-radius-sm: 6px;
    --bs-border-radius-lg: 14px;
    --bs-border-radius-xl: 18px;
    --bs-border-radius-xxl: 24px;

    --bs-primary: #3E7B8A;
    --bs-primary-rgb: 62, 123, 138;
    --bs-primary-text-emphasis: #1F454E;
    --bs-primary-bg-subtle: #E8F1F3;
    --bs-primary-border-subtle: #C9DFE4;
    --bs-secondary: #6A6A6B;
    --bs-secondary-rgb: 106, 106, 107;
    --bs-success: #16A34A;
    --bs-success-rgb: 22, 163, 74;
    --bs-danger: #EF4444;
    --bs-danger-rgb: 239, 68, 68;
    --bs-warning: #F59E0B;
    --bs-warning-rgb: 245, 158, 11;
    --bs-info: #0EA5E9;
    --bs-info-rgb: 14, 165, 233;
    --bs-dark: #26343A;
    --bs-dark-rgb: 38, 52, 58;
    --bs-light: #F3F5F6;
    --bs-light-rgb: 243, 245, 246;

    --bs-link-color: #3E7B8A;
    --bs-link-color-rgb: 62, 123, 138;
    --bs-link-hover-color: #315E6D;
    --bs-link-hover-color-rgb: 49, 94, 109;
    --bs-focus-ring-color: rgba(62, 123, 138, 0.18);
}

body {
    font-size: 0.9rem;
}

/* Spark sets --bs-body-bg to the grey canvas; Bootstrap 5.3 reuses that variable as the
   surface of many components, which must stay white. */
.list-group { --bs-list-group-bg: #fff; }
.dropdown-menu { --bs-dropdown-bg: #fff; }
.modal { --bs-modal-bg: #fff; }
.popover { --bs-popover-bg: #fff; }
.offcanvas, .offcanvas-lg, .offcanvas-md, .offcanvas-sm, .offcanvas-xl { --bs-offcanvas-bg: #fff; }
.accordion { --bs-accordion-bg: #fff; }
.pagination { --bs-pagination-bg: #fff; --bs-pagination-disabled-bg: #fff; }
.toast { --bs-toast-bg: rgba(255, 255, 255, 0.96); }
.form-check-input { --bs-form-check-bg: #fff; }
.nav-tabs { --bs-nav-tabs-link-active-bg: transparent; }

::selection {
    background: var(--brand-lime);
    color: var(--brand-forest-dark);
}

/* Spark turns links lime on hover, which is unreadable on white. */
a {
    color: var(--bs-link-color);
    font-weight: 600;
}
a:hover {
    color: var(--bs-link-hover-color);
}
a:not([class]):hover,
a.small:hover {
    text-decoration: underline;
    text-decoration-color: var(--brand-lime);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

h1, h2, h3, h4, h5, h6 { color: var(--bs-heading-color); }
.text-muted { color: var(--bs-secondary-color) !important; }
.small-muted, .empty-state { color: var(--bs-secondary-color); }
.text-lime { color: var(--brand-lime) !important; }
.bg-lime, .bg-cyan { background-color: var(--brand-lime) !important; color: var(--brand-forest-dark) !important; }
.bg-purple { background-color: var(--app-purple) !important; color: #fff !important; }
.bg-forest { background-color: var(--brand-forest-medium) !important; color: #fff !important; }
hr { border-color: var(--bs-border-color); opacity: 1; }
code { color: #7F5AF3; }

/* ---------------------------------------------------------------------
   2. Shell
--------------------------------------------------------------------- */

/* Sidebar ---------------------------------------------------------- */
.sidebar-wrapper {
    padding: 1.5rem 1.25rem 1.25rem;
}
.sidebar-brand {
    height: 40px;
    margin-bottom: 1.75rem;
    padding-left: 0.5rem;
}
.sidebar-brand-logo { height: 34px; width: auto; display: block; }
.sidebar-brand-mark { height: 36px; width: 36px; display: none; }

/* The scroll area spans the full sidebar width so the active indicator (left: -1.25rem) is not clipped. */
.sidebar-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0 -1.25rem;
    padding: 0 1.25rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); }
.sidebar-nav::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.22); }

.sidebar-menu-section { margin-bottom: 1.25rem; }
.sidebar-menu-title { margin-bottom: 0.4rem; }
.sidebar-menu-item { margin-bottom: 0.15rem; }
.sidebar-menu-link {
    padding: 0.55rem 0.8rem;
    font-size: 0.875rem;
    gap: 0.75rem;
}
.sidebar-menu-link span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-menu-link i { font-size: 1.05rem; flex-shrink: 0; }
.sidebar-menu-link.active::before { left: -1.25rem; }
.sidebar-menu-link:focus-visible {
    outline: 2px solid var(--brand-lime);
    outline-offset: -2px;
}

.sidebar-profile {
    margin-top: 1rem;
    text-decoration: none;
    font-weight: 500;
}
.sidebar-profile:hover { color: #fff; background-color: rgba(255, 255, 255, 0.06); }
.sidebar-profile-initial {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--app-accent), var(--app-bright));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
}
.sidebar-profile-name, .sidebar-profile-email { display: block; }

body.sidebar-minimized .sidebar-wrapper { padding: 1.5rem 0.75rem 1.25rem; }
body.sidebar-minimized .sidebar-brand-logo { display: none; }
body.sidebar-minimized .sidebar-brand-mark { display: block; }
body.sidebar-minimized .sidebar-nav { margin: 0 -0.75rem; padding: 0 0.75rem; width: calc(100% + 1.5rem); }
body.sidebar-minimized .sidebar-menu-section { margin-bottom: 0.75rem; }
body.sidebar-minimized .sidebar-menu-section + .sidebar-menu-section { border-top: 1px solid var(--border-dark-green); padding-top: 0.75rem; }
body.sidebar-minimized .sidebar-menu-link { padding: 0.6rem; }
body.sidebar-minimized .sidebar-menu-link i { font-size: 1.2rem; }

/* Below xl the sidebar is an off-canvas drawer and always shows its full width. */
@media (max-width: 1200px) {
    body.sidebar-minimized { --sidebar-width: 280px; }
    body.sidebar-minimized .sidebar-wrapper { padding: 1.5rem 1.25rem 1.25rem; align-items: stretch; }
    body.sidebar-minimized .sidebar-brand-logo { display: block; }
    body.sidebar-minimized .sidebar-brand-mark { display: none; }
    body.sidebar-minimized .sidebar-brand { justify-content: flex-start; padding-left: 0.5rem; }
    body.sidebar-minimized .sidebar-nav { margin: 0 -1.25rem; padding: 0 1.25rem; width: auto; }
    body.sidebar-minimized .sidebar-menu-title,
    body.sidebar-minimized .sidebar-menu-link span,
    body.sidebar-minimized .sidebar-profile-info { display: block !important; }
    body.sidebar-minimized .sidebar-menu-link { justify-content: flex-start; padding: 0.55rem 0.8rem; }
    body.sidebar-minimized .sidebar-menu-section + .sidebar-menu-section { border-top: 0; padding-top: 0; }
    body.sidebar-minimized .sidebar-profile { padding: 0.85rem; justify-content: flex-start; border: 1px solid var(--border-dark-green); background-color: rgba(255, 255, 255, 0.03); }
}

/* Main area -------------------------------------------------------- */
.main-wrapper { min-width: 0; padding-left: 2rem; padding-right: 2rem; }
.navbar-custom { margin-left: -2rem; margin-right: -2rem; padding-left: 2rem; padding-right: 2rem; }
@media (max-width: 1200px) {
    .main-wrapper { padding-left: 1rem; padding-right: 1rem; }
    .navbar-custom { margin-left: -1rem; margin-right: -1rem; padding-left: 1rem; padding-right: 1rem; }
}
.main-content { flex: 1 0 auto; min-width: 0; }

/* Testmodusbalk (issue #1) ------------------------------------------
   De balk staat vóór de navbar in de DOM en neemt diens plek bovenaan over: dezelfde negatieve
   marges, zodat hij tot de rand doorloopt en de navbar er daarna normaal onder valt. Niet sticky en
   een lage z-index, want de sidebar (1030), de overlay (1025) en de navbar (1000) horen er altijd
   overheen te liggen -- eerder lag hij op 1030 en dekte hij op mobiel het uitgeklapte menu af. */
.testmode-banner { position: relative; z-index: 1; margin-top: -2rem; margin-left: -2rem; margin-right: -2rem; }
.testmode-banner + .navbar-custom { margin-top: 0; }
@media (max-width: 1200px) {
    .testmode-banner { margin-top: -1.5rem; margin-left: -1rem; margin-right: -1rem; }
}

/* Navbar ----------------------------------------------------------- */
.navbar-custom {
    padding-top: 1rem;
    padding-bottom: 1rem;
    margin-bottom: 1.75rem;
    grid-template-columns: 1fr minmax(260px, 480px) 1fr !important;
}
a.btn-quick-action { text-decoration: none; }
.btn-quick-action i { color: var(--brand-lime); }
.btn-quick-action:hover i { color: var(--brand-lime-hover); }
.btn-quick-action:focus-visible,
.btn-desktop-toggle:focus-visible,
.sidebar-toggle-btn:focus-visible,
.navbar-profile-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--brand-lime-translucent), 0 0 0 1px var(--brand-forest-medium);
}
.navbar-search-btn { pointer-events: none; }
.navbar-search-input::placeholder { color: var(--bs-secondary-color); opacity: 0.8; }
.navbar-search-input:focus { box-shadow: 0 0 0 3px var(--brand-lime-translucent); border-color: rgba(62, 123, 138, 0.35); }
.navbar-search-results {
    top: calc(100% + 0.4rem);
    left: 0;
    right: 0;
    max-height: 60vh;
    overflow-y: auto;
}
.navbar-profile-btn { padding: 0.25rem 0.5rem 0.25rem 0.25rem; }
.navbar-profile-initial {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--app-primary), var(--app-purple));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}
.dropdown-menu-profile { width: 220px; }
.dropdown-menu-profile form { margin: 0; }
.dropdown-menu-profile .dropdown-item.text-danger,
.dropdown-menu-profile .dropdown-item.text-danger i { color: var(--sys-red) !important; }
.dropdown-menu-profile .dropdown-item.text-danger:hover { background-color: var(--sys-red-bg); }

@media (max-width: 1200px) {
    .navbar-custom { margin-bottom: 1.5rem; }
    .navbar-left { flex: 1 1 auto; }
}

/* Footer ----------------------------------------------------------- */
.footer-custom { margin-top: 2.5rem; }
.footer-logo-mark { width: 18px; height: 18px; }
.footer-link { font-weight: 600; }

/* Guest / login ---------------------------------------------------- */
.login-card { max-width: 440px; }
.login-card:hover { transform: none; }
.login-brand { margin-bottom: 1.75rem; }
.login-brand-logo { height: 42px; width: auto; }
.login-card h4 { font-weight: 800; letter-spacing: -0.02em; }
.login-card .btn-primary { padding-top: 0.75rem; padding-bottom: 0.75rem; font-size: 0.95rem; font-weight: 700; }
.login-card pre { max-width: 100%; overflow: auto; }

/* ---------------------------------------------------------------------
   3. Bootstrap components, Spark style
--------------------------------------------------------------------- */

/* Cards: Spark look, Bootstrap structure (header/body/footer carry the padding). */
.card {
    --bs-card-spacer-x: 1.5rem;
    --bs-card-spacer-y: 1.5rem;
    --bs-card-cap-padding-x: 1.5rem;
    --bs-card-cap-padding-y: 1.25rem;
    --bs-card-border-width: 0;
    --bs-card-border-radius: var(--radius-xxl);
    --bs-card-inner-border-radius: var(--radius-xxl);
    --bs-card-bg: var(--card-background);
    padding: 0;
    margin-bottom: 0;
    overflow: visible;
    border: 0;
    box-shadow: var(--shadow-md);
}
.card-header {
    display: block;
    padding: 1.25rem 1.5rem 1rem !important;
    margin-bottom: 0;
    border-bottom: 0 !important;
}
.card-header.d-flex { display: flex; }
.card-header h5, .card-header .h5, .card-header .card-title { font-size: 1.05rem; font-weight: 700; }
.card-header + .card-body { padding-top: 0.5rem; }
.card-body.border-bottom { border-bottom-color: var(--bs-border-color) !important; }
.card-footer {
    background: transparent;
    border-top: 1px solid var(--bs-border-color);
    padding: 1rem 1.5rem;
}
.card-footer:last-child { border-radius: 0 0 var(--radius-xxl) var(--radius-xxl); }
.card-header-tabs { margin-bottom: -1rem; }
h3.card-title { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; }
a.card { color: inherit; font-weight: inherit; transition: transform 0.2s ease, box-shadow 0.2s ease; }
a.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: inherit; }
.card > .table-responsive:first-child,
.card > .table:first-child { border-top-left-radius: inherit; border-top-right-radius: inherit; }
.card > .table-responsive:last-child,
.card > .table:last-child { border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; }
.card > .list-group:last-child { border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; }
.card.border, .card[class*="border-"] { border-width: 1px !important; }
.card.shadow-none { box-shadow: none; }

/* Buttons ---------------------------------------------------------- */
.btn {
    --bs-btn-padding-x: 1.1rem;
    --bs-btn-padding-y: 0.55rem;
    --bs-btn-font-size: 0.875rem;
    --bs-btn-font-weight: 600;
    --bs-btn-border-radius: var(--radius-lg);
    --bs-btn-focus-box-shadow: 0 0 0 3px var(--brand-lime-translucent), 0 0 0 1px rgba(62, 123, 138, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}
.btn:active { transform: scale(0.98); }
.btn.d-grid, .btn.d-block { display: block; }
.btn-sm, .btn-group-sm > .btn {
    --bs-btn-padding-x: 0.75rem;
    --bs-btn-padding-y: 0.35rem;
    --bs-btn-font-size: 0.8rem;
    --bs-btn-border-radius: var(--radius-md);
}
.btn-lg, .btn-group-lg > .btn {
    --bs-btn-padding-x: 1.6rem;
    --bs-btn-padding-y: 0.75rem;
    --bs-btn-font-size: 1rem;
    --bs-btn-border-radius: var(--radius-xl);
}
.btn-xs {
    --bs-btn-padding-x: 0.5rem;
    --bs-btn-padding-y: 0.2rem;
    --bs-btn-font-size: 0.75rem;
    --bs-btn-border-radius: var(--radius-sm);
}
.btn i.bx, .btn i.bi { font-size: 1.05em; line-height: 1; }

.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--brand-forest-medium);
    --bs-btn-border-color: var(--brand-forest-medium);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--brand-forest-dark);
    --bs-btn-hover-border-color: var(--brand-forest-dark);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--brand-forest-dark);
    --bs-btn-active-border-color: var(--brand-forest-dark);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--brand-forest-light);
    --bs-btn-disabled-border-color: var(--brand-forest-light);
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover { box-shadow: 0 4px 12px var(--brand-lime-translucent); }
.btn-outline-primary {
    --bs-btn-color: var(--brand-forest-medium);
    --bs-btn-border-color: rgba(62, 123, 138, 0.35);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--brand-forest-medium);
    --bs-btn-hover-border-color: var(--brand-forest-medium);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--brand-forest-dark);
    --bs-btn-active-border-color: var(--brand-forest-dark);
    --bs-btn-disabled-color: var(--brand-forest-light);
    --bs-btn-disabled-border-color: rgba(62, 123, 138, 0.2);
}
/* Lime accent button (Spark "secondary" call to action). */
.btn-lime, .btn-accent {
    --bs-btn-color: var(--brand-forest-dark);
    --bs-btn-bg: var(--brand-lime);
    --bs-btn-border-color: var(--brand-lime);
    --bs-btn-hover-color: var(--brand-forest-dark);
    --bs-btn-hover-bg: var(--brand-lime-hover);
    --bs-btn-hover-border-color: var(--brand-lime-hover);
    --bs-btn-active-color: var(--brand-forest-dark);
    --bs-btn-active-bg: #0FA9C2;
    --bs-btn-active-border-color: #0FA9C2;
}
.btn-secondary, .btn-light {
    --bs-btn-color: var(--brand-forest-dark);
    --bs-btn-bg: var(--surface-muted);
    --bs-btn-border-color: rgba(11, 19, 15, 0.08);
    --bs-btn-hover-color: var(--brand-forest-dark);
    --bs-btn-hover-bg: var(--surface-hover);
    --bs-btn-hover-border-color: rgba(11, 19, 15, 0.14);
    --bs-btn-active-color: var(--brand-forest-dark);
    --bs-btn-active-bg: #DDEBE3;
    --bs-btn-active-border-color: rgba(11, 19, 15, 0.16);
    --bs-btn-disabled-color: var(--bs-secondary-color);
    --bs-btn-disabled-bg: var(--surface-muted);
    --bs-btn-disabled-border-color: rgba(11, 19, 15, 0.06);
}
.btn-outline-secondary {
    --bs-btn-color: var(--bs-body-color);
    --bs-btn-bg: #fff;
    --bs-btn-border-color: var(--border-input);
    --bs-btn-hover-color: var(--brand-forest-dark);
    --bs-btn-hover-bg: var(--surface-hover);
    --bs-btn-hover-border-color: rgba(11, 19, 15, 0.18);
    --bs-btn-active-color: var(--brand-forest-dark);
    --bs-btn-active-bg: #DDEBE3;
    --bs-btn-active-border-color: rgba(11, 19, 15, 0.2);
    --bs-btn-disabled-color: var(--bs-secondary-color);
    --bs-btn-disabled-bg: #fff;
    --bs-btn-disabled-border-color: rgba(11, 19, 15, 0.08);
}
.btn-check:checked + .btn-outline-secondary,
.btn-check:checked + .btn-outline-primary {
    background-color: var(--brand-forest-medium);
    border-color: var(--brand-forest-medium);
    color: #fff;
}
.btn-success {
    --bs-btn-color: #fff; --bs-btn-bg: #16A34A; --bs-btn-border-color: #16A34A;
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #15803D; --bs-btn-hover-border-color: #15803D;
    --bs-btn-active-bg: #166534; --bs-btn-active-border-color: #166534;
    --bs-btn-disabled-bg: #16A34A; --bs-btn-disabled-border-color: #16A34A;
}
.btn-outline-success {
    --bs-btn-color: #15803D; --bs-btn-border-color: rgba(22, 163, 74, 0.45);
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #16A34A; --bs-btn-hover-border-color: #16A34A;
    --bs-btn-active-color: #fff; --bs-btn-active-bg: #15803D; --bs-btn-active-border-color: #15803D;
}
.btn-danger {
    --bs-btn-color: #fff; --bs-btn-bg: #EF4444; --bs-btn-border-color: #EF4444;
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #DC2626; --bs-btn-hover-border-color: #DC2626;
    --bs-btn-active-bg: #B91C1C; --bs-btn-active-border-color: #B91C1C;
    --bs-btn-disabled-bg: #EF4444; --bs-btn-disabled-border-color: #EF4444;
}
.btn-outline-danger {
    --bs-btn-color: #DC2626; --bs-btn-border-color: rgba(239, 68, 68, 0.45);
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #EF4444; --bs-btn-hover-border-color: #EF4444;
    --bs-btn-active-color: #fff; --bs-btn-active-bg: #DC2626; --bs-btn-active-border-color: #DC2626;
}
.btn-warning {
    --bs-btn-color: #fff; --bs-btn-bg: #F59E0B; --bs-btn-border-color: #F59E0B;
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #D97706; --bs-btn-hover-border-color: #D97706;
    --bs-btn-active-color: #fff; --bs-btn-active-bg: #B45309; --bs-btn-active-border-color: #B45309;
}
.btn-outline-warning {
    --bs-btn-color: #B45309; --bs-btn-border-color: rgba(245, 158, 11, 0.5);
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #F59E0B; --bs-btn-hover-border-color: #F59E0B;
    --bs-btn-active-color: #fff; --bs-btn-active-bg: #D97706; --bs-btn-active-border-color: #D97706;
}
.btn-info {
    --bs-btn-color: #fff; --bs-btn-bg: #0EA5E9; --bs-btn-border-color: #0EA5E9;
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #0284C7; --bs-btn-hover-border-color: #0284C7;
}
.btn-outline-info {
    --bs-btn-color: #0369A1; --bs-btn-border-color: rgba(14, 165, 233, 0.45);
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #0EA5E9; --bs-btn-hover-border-color: #0EA5E9;
}
.btn-link { --bs-btn-color: var(--brand-forest-medium); --bs-btn-hover-color: var(--brand-forest-dark); font-weight: 600; }
.btn-close:focus { box-shadow: 0 0 0 3px var(--brand-lime-translucent); }

/* Badges ----------------------------------------------------------- */
.badge {
    --bs-badge-padding-x: 0.65em;
    --bs-badge-padding-y: 0.38em;
    --bs-badge-font-size: 0.74rem;
    --bs-badge-font-weight: 700;
    --bs-badge-border-radius: 50rem;
    letter-spacing: 0;
}

/* Forms ------------------------------------------------------------ */
.form-label, .col-form-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--bs-body-color);
    margin-bottom: 0.4rem;
}
.form-text { color: var(--bs-secondary-color); font-size: 0.78rem; }
.form-control, .form-select {
    padding: 0.55rem 0.95rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--bs-body-color);
    background-color: #fff;
    border: 1px solid var(--border-input);
    border-radius: var(--radius-lg);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-select {
    padding-right: 2.25rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23125DD1' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-position: right 0.9rem center;
    background-size: 12px 10px;
}
.form-control:focus, .form-select:focus {
    color: var(--bs-body-color);
    background-color: #fff;
    border-color: var(--brand-forest-medium);
    box-shadow: var(--focus-ring);
}
.form-control::placeholder { color: var(--bs-secondary-color); opacity: 0.6; }
.form-control:disabled, .form-control[readonly]:not([type="date"]):not(.qe-inline), .form-select:disabled {
    background-color: var(--surface-muted);
    border-color: rgba(11, 19, 15, 0.06);
    color: var(--bs-secondary-color);
}
.form-control-sm, .form-select-sm {
    padding: 0.32rem 0.7rem;
    font-size: 0.8rem;
    border-radius: var(--radius-md);
    min-height: calc(1.5em + 0.64rem + 2px);
}
.form-select-sm { padding-right: 2rem; background-position: right 0.65rem center; }
.form-control-lg, .form-select-lg { padding: 0.75rem 1.2rem; font-size: 1rem; border-radius: var(--radius-xl); }
.form-control.is-invalid, .form-select.is-invalid { border-color: var(--sys-red); }
.form-control.is-invalid:focus, .form-select.is-invalid:focus { box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12); }
.invalid-feedback { font-weight: 600; font-size: 0.78rem; }

.form-check-input {
    width: 1.1em;
    height: 1.1em;
    border: 1px solid rgba(11, 19, 15, 0.22);
    cursor: pointer;
}
.form-check-input[type="checkbox"] { border-radius: 5px; }
.form-check-input:focus { border-color: var(--brand-lime-hover); box-shadow: 0 0 0 3px var(--brand-lime-translucent); }
.form-check-input:checked { background-color: var(--brand-forest-medium); border-color: var(--brand-forest-medium); }
.form-check-input:checked[type="checkbox"] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23051C12' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}
.form-check-input:checked[type="radio"] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23ffffff'/%3e%3c/svg%3e");
}
.form-check-input[type="checkbox"]:indeterminate {
    background-color: var(--brand-forest-medium);
    border-color: var(--brand-forest-medium);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23051C12' stroke-linecap='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e");
}
.form-switch .form-check-input { width: 2.2em; height: 1.2em; border-radius: 2em; background-color: rgba(11, 19, 15, 0.1); border-color: rgba(11, 19, 15, 0.08); }
.form-switch .form-check-input:focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}
.form-switch .form-check-input:checked {
    background-color: var(--brand-forest-medium);
    border-color: var(--brand-forest-medium);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23ffffff'/%3e%3c/svg%3e");
}
.form-switch .form-check-input:not(:checked) {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}
.form-check-label { cursor: pointer; }
.form-range::-webkit-slider-thumb { background-color: var(--brand-forest-medium); }
.form-range::-moz-range-thumb { background-color: var(--brand-forest-medium); }

.input-group-text {
    background-color: var(--surface-muted);
    border: 1px solid var(--border-input);
    color: var(--bs-secondary-color);
    font-size: 0.875rem;
    border-radius: var(--radius-lg);
}
.input-group-sm > .input-group-text { border-radius: var(--radius-md); font-size: 0.8rem; }
.input-group > .form-control:focus, .input-group > .form-select:focus { z-index: 5; }

/* Buttons inside input groups keep the input's height and border colour. */
.input-group > .btn-outline-secondary { border-color: var(--border-input); }

/* Tables ----------------------------------------------------------- */
.table {
    --bs-table-color: var(--bs-body-color);
    --bs-table-bg: transparent;
    --bs-table-border-color: rgba(11, 19, 15, 0.06);
    --bs-table-striped-bg: rgba(11, 19, 15, 0.02);
    --bs-table-hover-bg: rgba(169, 213, 222, 0.07);
    --bs-table-hover-color: var(--bs-body-color);
    --bs-table-active-bg: rgba(169, 213, 222, 0.12);
    font-size: 0.875rem;
}
.table > :not(caption) > * > * { padding: 0.75rem 1rem; }
.table-sm > :not(caption) > * > * { padding: 0.45rem 0.7rem; }
.table > :not(caption) > tr > :first-child { padding-left: 1.25rem; }
.table > :not(caption) > tr > :last-child { padding-right: 1.25rem; }
/* The quote editor's line table is dense by design. */
body .qe-lines > :not(caption) > * > * { padding: 0.5rem 0.55rem; }
body .qe-lines > :not(caption) > tr > :first-child { padding-left: 1rem; }
body .qe-lines > :not(caption) > tr > :last-child { padding-right: 1rem; }
body .qe-lines .qe-child > td:first-child { padding-left: 2.5rem; }
.table > thead th,
.table > thead td {
    background-color: var(--surface-muted);
    color: var(--bs-secondary-color);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(11, 19, 15, 0.08);
    white-space: nowrap;
}
.table > thead.table-light th { background-color: var(--surface-muted); }
.table > :not(:first-child) { border-top: 0; }
.table-bordered > :not(caption) > * > * { border-color: rgba(11, 19, 15, 0.08); }
.card > .table-responsive:last-child > .table > tbody > tr:last-child > *,
.card > .table:last-child > tbody > tr:last-child > * { border-bottom-width: 0; }
.card > .table-responsive > .table,
.card > .table { margin-bottom: 0; }
.table tfoot td, .table tfoot th { font-weight: 700; }
.table a:not(.btn):not(.dropdown-item) { font-weight: 700; }

/* Navs ------------------------------------------------------------- */
.nav-tabs {
    --bs-nav-tabs-border-color: var(--bs-border-color);
    --bs-nav-tabs-border-width: 1px;
}
.nav-tabs .nav-link {
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    margin-bottom: -1px;
    padding: 0.65rem 0.8rem;
    color: var(--bs-secondary-color);
    font-weight: 600;
    font-size: 0.875rem;
    background: transparent;
}
.nav-tabs .nav-link:hover { color: var(--brand-forest-medium); border-bottom-color: rgba(62, 123, 138, 0.2); }
.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
    color: var(--brand-forest-dark);
    background: transparent;
    border-bottom: 2px solid var(--brand-forest-medium);
}
.nav-tabs .nav-link .badge { margin-left: 0.25rem; }
.nav-pills { gap: 0.35rem; }
.nav-pills .nav-link {
    color: var(--bs-secondary-color);
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 50rem;
    padding: 0.45rem 1rem;
    background: #fff;
    border: 1px solid var(--bs-border-color);
}
.nav-pills .nav-link:hover { color: var(--brand-forest-medium); background: var(--surface-hover); }
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    background-color: var(--brand-forest-medium);
    border-color: var(--brand-forest-medium);
    color: #fff;
}
.nav-pills .nav-link.active .badge { background: var(--brand-lime) !important; color: var(--brand-forest-dark) !important; }

/* Dropdowns -------------------------------------------------------- */
.dropdown-menu {
    --bs-dropdown-border-width: 0;
    --bs-dropdown-border-radius: var(--radius-lg);
    --bs-dropdown-box-shadow: var(--shadow-lg);
    --bs-dropdown-padding-y: 0.4rem;
    --bs-dropdown-font-size: 0.85rem;
    --bs-dropdown-link-color: var(--bs-body-color);
    --bs-dropdown-link-hover-color: var(--brand-forest-medium);
    --bs-dropdown-link-hover-bg: var(--bs-body-bg);
    --bs-dropdown-link-active-color: var(--brand-forest-dark);
    --bs-dropdown-link-active-bg: rgba(169, 213, 222, 0.22);
    --bs-dropdown-item-padding-x: 1.1rem;
    --bs-dropdown-item-padding-y: 0.5rem;
    --bs-dropdown-header-color: var(--bs-secondary-color);
    --bs-dropdown-divider-bg: var(--bs-border-color);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(11, 19, 15, 0.04);
}
.dropdown-item { font-weight: 600; }
.dropdown-item i { color: var(--bs-secondary-color); }
.dropdown-item:hover i { color: var(--brand-forest-medium); }
.dropdown-header { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }

/* Alerts ----------------------------------------------------------- */
.alert {
    --bs-alert-border-radius: var(--radius-lg);
    --bs-alert-padding-x: 1.1rem;
    --bs-alert-padding-y: 0.85rem;
    font-size: 0.875rem;
    font-weight: 500;
}
.alert i.bi { font-size: 1.1rem; }
.alert-primary { --bs-alert-bg: rgba(62, 123, 138, 0.05); --bs-alert-border-color: rgba(62, 123, 138, 0.1); --bs-alert-color: var(--brand-forest-dark); --bs-alert-link-color: var(--brand-forest-dark); }
.alert-secondary { --bs-alert-bg: var(--surface-muted); --bs-alert-border-color: var(--bs-border-color); --bs-alert-color: #4B5A75; --bs-alert-link-color: #2F3A55; }
.alert-success { --bs-alert-bg: #F0FDF4; --bs-alert-border-color: #BBF7D0; --bs-alert-color: #166534; --bs-alert-link-color: #14532D; }
.alert-danger { --bs-alert-bg: #FEF2F2; --bs-alert-border-color: #FECACA; --bs-alert-color: #991B1B; --bs-alert-link-color: #7F1D1D; }
.alert-warning { --bs-alert-bg: #FFFBEB; --bs-alert-border-color: #FDE68A; --bs-alert-color: #92400E; --bs-alert-link-color: #78350F; }
.alert-info { --bs-alert-bg: #F0F9FF; --bs-alert-border-color: #BAE6FD; --bs-alert-color: #075985; --bs-alert-link-color: #0C4A6E; }
.alert-light { --bs-alert-bg: #fff; --bs-alert-border-color: var(--bs-border-color); --bs-alert-color: var(--bs-body-color); }

/* List groups ------------------------------------------------------ */
.list-group {
    --bs-list-group-border-color: var(--bs-border-color);
    --bs-list-group-border-radius: var(--radius-lg);
    --bs-list-group-item-padding-x: 1.25rem;
    --bs-list-group-item-padding-y: 0.75rem;
    --bs-list-group-action-hover-bg: var(--bs-body-bg);
    --bs-list-group-action-hover-color: var(--bs-body-color);
    --bs-list-group-action-active-bg: var(--surface-hover);
    --bs-list-group-active-bg: var(--brand-forest-medium);
    --bs-list-group-active-border-color: var(--brand-forest-medium);
    --bs-list-group-active-color: #fff;
}
.list-group-flush > .list-group-item { padding-left: 1.5rem; padding-right: 1.5rem; }
.list-group-item-action { font-weight: 500; }

/* Modals, toasts, popovers ----------------------------------------- */
.modal {
    --bs-modal-border-width: 0;
    --bs-modal-border-radius: var(--radius-xxl);
    --bs-modal-inner-border-radius: var(--radius-xxl);
    --bs-modal-box-shadow: var(--shadow-lg);
    --bs-modal-header-padding: 1.25rem 1.5rem;
    --bs-modal-padding: 1.5rem;
    --bs-modal-header-border-color: var(--bs-border-color);
    --bs-modal-footer-border-color: var(--bs-border-color);
}
.modal-content { box-shadow: var(--shadow-lg); }
.modal-title { font-weight: 700; font-size: 1.1rem; }
.modal-backdrop { --bs-backdrop-bg: #1F454E; --bs-backdrop-opacity: 0.45; }
.toast, .bs-toast {
    --bs-toast-border-radius: var(--radius-lg);
    --bs-toast-border-width: 0;
    --bs-toast-box-shadow: var(--shadow-lg);
    box-shadow: var(--shadow-lg);
    font-weight: 600;
}
.bs-toast.bg-success { background-color: var(--brand-forest-medium) !important; }
.bs-toast.bg-success .toast-body::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 0.6rem;
    border-radius: 50%;
    background: var(--brand-lime);
    flex-shrink: 0;
}
.tooltip { --bs-tooltip-bg: var(--brand-forest-dark); --bs-tooltip-font-size: 0.78rem; --bs-tooltip-border-radius: var(--radius-sm); }
.popover { --bs-popover-border-color: var(--bs-border-color); --bs-popover-border-radius: var(--radius-lg); --bs-popover-box-shadow: var(--shadow-lg); }

/* Misc ------------------------------------------------------------- */
.breadcrumb {
    --bs-breadcrumb-font-size: 0.82rem;
    --bs-breadcrumb-divider-color: #B6C2D8;
    --bs-breadcrumb-item-active-color: var(--bs-body-color);
    font-weight: 600;
}
.breadcrumb-item a { color: var(--bs-secondary-color); font-weight: 600; }
.breadcrumb-item a:hover { color: var(--brand-forest-medium); }
.pagination {
    --bs-pagination-color: var(--brand-forest-dark);
    --bs-pagination-border-color: var(--bs-border-color);
    --bs-pagination-hover-color: var(--brand-forest-medium);
    --bs-pagination-hover-bg: var(--surface-muted);
    --bs-pagination-hover-border-color: var(--bs-border-color);
    --bs-pagination-focus-box-shadow: 0 0 0 3px var(--brand-lime-translucent);
    --bs-pagination-active-bg: var(--brand-forest-medium);
    --bs-pagination-active-border-color: var(--brand-forest-medium);
    --bs-pagination-border-radius: var(--radius-md);
    --bs-pagination-font-size: 0.85rem;
    font-weight: 600;
}
.progress, .progress-stacked { --bs-progress-bar-bg: var(--brand-forest-medium); --bs-progress-bg: var(--bs-body-bg); }
.progress-bar.bg-primary { background-color: var(--brand-forest-medium) !important; }
.spinner-border.text-primary, .spinner-grow.text-primary { color: var(--brand-forest-medium) !important; }
.bg-light { background-color: var(--surface-muted) !important; }
.border, .border-top, .border-bottom, .border-start, .border-end { border-color: var(--bs-border-color); }
.rounded { border-radius: var(--radius-md) !important; }
.shadow { box-shadow: var(--shadow-lg) !important; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.sticky-actions { background: rgba(244, 246, 245, 0.92); backdrop-filter: blur(8px); border-top-color: var(--bs-border-color); }

/* ---------------------------------------------------------------------
   4. Sneat compatibility
--------------------------------------------------------------------- */

/* Soft "label" colours used for status badges and icon tiles. */
.bg-label-primary { background-color: #E3F1EA !important; color: var(--brand-forest-medium) !important; }
.bg-label-secondary { background-color: #EDF4F0 !important; color: #6C7E75 !important; }
.bg-label-success { background-color: #DCFCE7 !important; color: #15803D !important; }
.bg-label-danger { background-color: #FEE2E2 !important; color: #B91C1C !important; }
.bg-label-warning { background-color: #FEF3C7 !important; color: #B45309 !important; }
.bg-label-info { background-color: #E0F2FE !important; color: #0369A1 !important; }
.bg-label-dark, .badge.bg-label-dark { background-color: rgba(11, 19, 15, 0.1) !important; color: #26343A !important; }
.bg-label-light { background-color: #F6F9F7 !important; color: #6C7E75 !important; }
.bg-label-lime, .bg-label-cyan { background-color: rgba(169, 213, 222, 0.22) !important; color: #1F454E !important; }
.bg-label-purple { background-color: rgba(127, 90, 243, 0.14) !important; color: #5B3BD1 !important; }
.btn.bg-label-primary:hover { background-color: #E8F1F3 !important; }

/* Square icon buttons. */
.btn-icon {
    --bs-btn-padding-x: 0;
    --bs-btn-padding-y: 0;
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
}
.btn-icon.btn-sm, .btn-group-sm > .btn-icon { width: 2rem; height: 2rem; }
.btn-icon.btn-xs { width: 1.6rem; height: 1.6rem; }
.btn-icon i { font-size: 1.1rem; }
.btn-icon.btn-sm i, .btn-icon.btn-xs i { font-size: 0.95rem; }

/* Text-only buttons with a soft hover tint. */
.btn-text-primary, .btn-text-secondary, .btn-text-success, .btn-text-danger, .btn-text-warning, .btn-text-info {
    --bs-btn-bg: transparent;
    --bs-btn-border-color: transparent;
    --bs-btn-hover-border-color: transparent;
    --bs-btn-active-border-color: transparent;
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: transparent;
}
.btn-text-primary { --bs-btn-color: var(--brand-forest-medium); --bs-btn-hover-color: var(--brand-forest-dark); --bs-btn-hover-bg: #E3F1EA; --bs-btn-active-bg: #E8F1F3; }
.btn-text-secondary { --bs-btn-color: #6C7E75; --bs-btn-hover-color: var(--bs-body-color); --bs-btn-hover-bg: var(--surface-hover); --bs-btn-active-bg: #DDEBE3; }
.btn-text-success { --bs-btn-color: #15803D; --bs-btn-hover-color: #15803D; --bs-btn-hover-bg: #DCFCE7; --bs-btn-active-bg: #BBF7D0; }
.btn-text-danger { --bs-btn-color: #DC2626; --bs-btn-hover-color: #B91C1C; --bs-btn-hover-bg: #FEE2E2; --bs-btn-active-bg: #FECACA; }
.btn-text-warning { --bs-btn-color: #B45309; --bs-btn-hover-color: #92400E; --bs-btn-hover-bg: #FEF3C7; --bs-btn-active-bg: #FDE68A; }
.btn-text-info { --bs-btn-color: #0369A1; --bs-btn-hover-color: #075985; --bs-btn-hover-bg: #E0F2FE; --bs-btn-active-bg: #BAE6FD; }

/* Avatars. */
.avatar { position: relative; display: inline-block; width: 2.5rem; height: 2.5rem; flex-shrink: 0; }
.avatar-sm { width: 2rem; height: 2rem; }
.avatar-lg { width: 3.5rem; height: 3.5rem; }
.avatar .avatar-initial {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    text-transform: uppercase;
    background-color: var(--brand-forest-medium);
    color: #fff;
}
.avatar .avatar-initial.rounded { border-radius: var(--radius-lg) !important; }
.avatar .avatar-initial i { font-size: 1.3rem; }
.avatar-sm .avatar-initial { font-size: 0.8rem; }
.avatar-sm .avatar-initial i { font-size: 1rem; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar-online::after {
    content: '';
    position: absolute;
    right: 1px;
    bottom: 1px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--sys-green);
    box-shadow: 0 0 0 2px #fff;
}

/* Input groups where the addon visually merges into the input. */
.input-group-merge .input-group-text { background-color: #fff; color: var(--bs-secondary-color); }
.input-group-merge > .input-group-text:first-child { border-right: 0; padding-right: 0.25rem; }
.input-group-merge > .input-group-text:first-child + .form-control { border-left: 0; padding-left: 0.5rem; }
.input-group-merge > .form-control:not(:last-child) { border-right: 0; }
.input-group-merge > .form-control:not(:last-child) + .input-group-text { border-left: 0; }
.input-group-merge { border-radius: var(--radius-lg); transition: box-shadow 0.2s ease; }
.input-group-merge:focus-within { box-shadow: var(--focus-ring); }
.input-group-merge:focus-within > .input-group-text,
.input-group-merge:focus-within > .form-control { border-color: var(--brand-forest-medium); }
.input-group-merge > .form-control:focus { box-shadow: none; }
.form-password-toggle .input-group-text { cursor: pointer; }


/* ---------------------------------------------------------------------
   5. Additions
--------------------------------------------------------------------- */
.sidebar-wrapper { background: linear-gradient(180deg, var(--app-dark) 0%, #072F1F 60%, #0A3A27 100%); }
.sidebar-brand-logo { height: 32px; }
.sidebar-brand-mark { height: 34px; width: 34px; }
.sidebar-menu-title { color: rgba(213, 237, 192, 0.6); }
.sidebar-menu-link { color: #D7E3DC; }
.sidebar-menu-link:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }
.sidebar-menu-link.active { color: #fff; background: rgba(169, 213, 222, 0.16); }
.sidebar-menu-link.active i { color: var(--app-accent); }
.sidebar-profile-email, .sidebar-profile-name { color: #fff; }
.sidebar-profile-email { color: rgba(215, 227, 220, 0.75); }

.login-wrapper { background: radial-gradient(1200px 600px at 10% -10%, rgba(169, 213, 222, 0.35), transparent 60%), radial-gradient(900px 500px at 100% 110%, rgba(127, 90, 243, 0.45), transparent 60%), linear-gradient(160deg, #1F454E 0%, #0A3A27 55%, #3E7B8A 100%); }
.login-bg-shape-1 { background: rgba(169, 213, 222, 0.25); }
.login-bg-shape-2 { background: rgba(127, 90, 243, 0.3); }
.login-brand-logo { height: 54px; }
.login-card { max-width: 460px; }
.text-gradient { background: linear-gradient(90deg, var(--app-primary), var(--app-accent) 55%, var(--app-purple)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bg-gradient-brand { background: linear-gradient(135deg, var(--app-dark), var(--app-primary) 60%, var(--app-purple)); color: #fff; }
.bg-gradient-brand .text-muted { color: rgba(255, 255, 255, 0.75) !important; }
.stat-tile .stat-icon { width: 44px; height: 44px; border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.stat-tile .stat-value { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }

/* Quick action in the navbar stays on one line. */
.btn-quick-action { white-space: nowrap; }
