/* ================================================================
   pxt.css — PXT components & Bootstrap 5.3 overrides
   ----------------------------------------------------------------
   Load order:
     1. bootstrap.min.css
     2. palette.css          ← all color/semantic tokens
     3. pxt.css              ← this file
   ----------------------------------------------------------------
   Sections
    0.  Fonts (@import)
    1.  Design Tokens (sizing, spacing, typography)
    2.  Base & Reset
        2a. HTML & Body
        2b. Preloader
        2c. Scrollbars
    3.  Layout
        3a. Wrapper & Body
        3b. Sidebar
        3c. Header
        3d. Footer
        3e. Impersonation banner
    4.  Grid & Containers
    5.  Bootstrap Overrides
        5a. Buttons
        5b. Forms
        5c. Colors (bg-*, text-*)
        5d. Avatars & badges
        5e. Progress bars
        5f. Dropdowns & modals
        5g. Tables & list groups
        5h. Nav links
        5i. Dark-mode fixes
    6.  Icons & Material Symbols
    7.  Typography (font families & sizes)
    8.  Components
        8a. Card (pxt-card)
        8b. Forms (pxt-input, pxt-select, custom select, password)
        8c. Tabs (line + pill)
        8d. Table (pxt-table, toolbar, pagination, cell utilities)
        8e. Dropdown (pxt-dropdown)
        8f. Tooltip
        8g. Flash Toast
        8h. Wizard
    9.  Utilities
    10. Pages
        10a. Login
    11. Vendor Overrides
        11a. Flatpickr
        11b. SimpleBar
    12. Compliance Utilities
   ================================================================ */
/* ================================================================
   0. FONTS
   ================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Lato:wght@300;400;700&family=Roboto:wght@300;400;500;700&family=Open+Sans:wght@300;400;500;600;700&family=Montserrat:wght@300;400;500;600;700&family=Poppins:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700&family=Raleway:wght@300;400;500;600;700&family=Nunito:wght@300;400;500;600;700&family=Lexend:wght@300;400;500;600;700&family=Orbitron:wght@400;700;900&display=swap');

/* ================================================================
   1. DESIGN TOKENS (sizing, spacing, typography)
   ================================================================ */
:root {
    --pxt-bg-opacity:          0.95;
    --pxt-root-font-size:      0.875rem;
    --pxt-border-radius:       0.375rem;

    /* Form sizing */
    --pxt-form-label-size:     0.8125rem;
    --pxt-form-label-weight:   500;
    --pxt-form-label-gap:      0.375rem;
    --pxt-form-input-size:     0.875rem;
    --pxt-form-input-padding-y: 0.5rem;
    --pxt-form-input-padding-x: 0.75rem;
    --pxt-form-input-radius:   0.375rem;
    --pxt-form-help-size:      0.75rem;
    --pxt-form-check-size:     0.875rem;
    --pxt-form-btn-size:       0.875rem;
    --pxt-form-section-size:   0.9375rem;
    --pxt-form-section-weight: 600;

    /* Tooltip sizing */
    --pxt-tooltip-px:          0.65rem;
    --pxt-tooltip-py:          0.4rem;
    --pxt-tooltip-font-size:   0.75rem;
    --pxt-tooltip-radius:      0.5rem;
    --pxt-tooltip-weight:      500;
}

/* ================================================================
   2. BASE & RESET
   ================================================================ */

/* ── 2a. HTML & Body ─────────────────────────────────────────── */
html { font-size: var(--pxt-root-font-size); overflow: hidden; height: 100%; }
body {
    overflow: hidden;
    height: 100%;
    font-family: 'Poppins', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: transparent !important;
    color: var(--pxt-text);
}

/* ── 2b. Preloader ───────────────────────────────────────────── */
/* Page preloader — hides content until background image is ready */
.pxt-preloader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a0f;
    transition: opacity .4s ease;
}
html:not([data-bs-theme="dark"]) .pxt-preloader,
[data-bs-theme="light"] .pxt-preloader { background: #f5f5fa; }
.pxt-preloader.fade-out { opacity: 0; pointer-events: none; }
.pxt-preloader-spinner {
    width: 96px;
    height: 96px;
    border: 15px solid rgba(139,92,246,.2);
    border: 15px solid rgba(var(--pxt-accent, 139,92,246), .2);
    border-top-color: #8B5CF6;
    border-top-color: var(--pxt-accent-hex, #8B5CF6);
    border-radius: 50%;
    animation: pxt-spin .7s linear infinite;
}
@keyframes pxt-spin { to { transform: rotate(360deg); } }

/* ── 2c. Scrollbars ──────────────────────────────────────────── */
/* Scrollbar – light mode */
::-webkit-scrollbar              { width: 6px; height: 6px; }
::-webkit-scrollbar-track        { background: var(--pxt-body-bg); }
::-webkit-scrollbar-thumb        { background: var(--pxt-border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover  { background: var(--pxt-text-muted); }
* { scrollbar-width: thin; scrollbar-color: var(--pxt-border) var(--pxt-body-bg); }

/* Scrollbar – dark mode */
[data-bs-theme="dark"] ::-webkit-scrollbar-track       { background: #1D222B; }
[data-bs-theme="dark"] ::-webkit-scrollbar-thumb       { background: #323a49; }
[data-bs-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: var(--color-gray-400); }
[data-bs-theme="dark"] *                               { scrollbar-color: #323a49 #1D222B; }

/* ================================================================
   3. LAYOUT
   ================================================================ */

/* ── 3a. Wrapper & Body ──────────────────────────────────────── */
.wrapper {
    display: flex;
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    background: rgba(var(--pxt-body-bg-rgb), var(--pxt-bg-opacity));
}
.body { flex: 1 0 auto; }  /* grow to fill, never shrink — lets .wrapper overflow-y:auto scroll */
@media (max-width: 991.98px) {
    .body { padding-bottom: 4rem; }
}
@media (min-width: 992px) {
    .wrapper {
        padding-left: 16rem;
        transition: padding-left .2s ease;
    }
    .sidebar.sidebar-narrow ~ .wrapper {
        padding-left: 4rem;
    }
}

/* ── 3b. Sidebar ─────────────────────────────────────────────── */

/* — Structure — */
.sidebar {
    position: relative;
    display: flex;
    flex: 0 0 16rem;
    flex-direction: column;
    order: -1;
    width: 16rem;
    transition: width .2s ease, transform .3s ease;
    background: var(--pxt-sidebar-bg, var(--pxt-chrome-bg)) !important;
    color: var(--pxt-chrome-text);
}
.sidebar-fixed {
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: 1030;
}
@media (min-width: 992px) {
    .sidebar-narrow {
        flex: 0 0 4rem;
        width: 4rem;
        overflow: visible;
    }
}

/* — Brand / Logo — */
.pxt-sidebar-header {
    height: 4.7rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.pxt-sidebar-close {
    padding: 0 0.5rem 0 0;
    line-height: 1;
    background: none;
    border: none;
    color: var(--pxt-chrome-icon);
}
.pxt-sidebar-close .material-symbols-outlined {
    font-variation-settings: 'wght' 600;
}
.pxt-sidebar-close:hover {
    opacity: 1;
}
.pxt-sidebar-brand {
    width: 100%;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pxt-sidebar-brand-full,
.pxt-sidebar-brand-narrow {
    margin-inline: auto;
    max-height: 32px;
    width: auto;
    object-fit: contain;
}
@media (max-width: 991.98px) {
    .pxt-sidebar-brand-full,
    .pxt-sidebar-brand-narrow {
        height: 28px;
        width: auto;
    }
    .sidebar-nav .nav-link,
    .sidebar-nav .nav-title {
        font-size: 1.05rem;
    }
}
.pxt-sidebar-brand .pxt-sidebar-brand-narrow {
    display: none;
}
.sidebar-narrow .pxt-sidebar-brand-full,
.sidebar-narrow-unfoldable:not(:hover) .pxt-sidebar-brand-full {
    display: none;
}
.sidebar-narrow .pxt-sidebar-brand-narrow,
.sidebar-narrow-unfoldable:not(:hover) .pxt-sidebar-brand-narrow {
    display: block;
}

/* Logo — light: show brand-on-light, dark: show brand-on-dark */
#sidebar .brand-on-dark  { display: none !important; }
[data-bs-theme="dark"] #sidebar .brand-on-light { display: none !important; }
[data-bs-theme="dark"] #sidebar .pxt-sidebar-brand-full.brand-on-dark { display: block !important; }
[data-bs-theme="dark"] #sidebar .pxt-sidebar-brand-narrow.brand-on-dark { display: none !important; }
[data-bs-theme="dark"] #sidebar.sidebar-narrow .pxt-sidebar-brand-full.brand-on-dark { display: none !important; }
[data-bs-theme="dark"] #sidebar.sidebar-narrow .pxt-sidebar-brand-narrow.brand-on-dark { display: block !important; }

/* — Navigation — */
.sidebar-nav { display: flex; flex: 1; flex-direction: column; padding: 2rem 0 0; margin-bottom: 0; overflow-x: hidden; overflow-y: auto; list-style: none; }
.sidebar-nav .nav-link { display: flex; align-items: center; white-space: nowrap; }
.sidebar-nav .nav-title { padding: 0.75rem 1rem; font-size: 0.8rem; font-weight: 400; text-transform: uppercase; }
.sidebar-nav .nav-divider { height: 0; margin: 0.5rem 0; overflow: hidden; border-top: none; }

/* Collapsible section titles */
.nav-title-collapsible {
    cursor:          pointer;
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    user-select:     none;
    transition:      color .15s;
}
.nav-title-collapsible:hover { color: var(--pxt-text) !important; }
.nav-title-chevron {
    font-size:   1.125rem;
    transition:  transform .2s ease;
    flex-shrink: 0;
}
.nav-title-collapsible.collapsed .nav-title-chevron {
    transform: rotate(-90deg);
}

/* Collapsible group wrapper */
.nav-group > ul {
    overflow:       hidden;
    max-height:     500px;
    transition:     max-height .25s ease;
}
.nav-group-collapsed > ul {
    max-height: 0 !important;
}

/* In narrow sidebar: hide chevrons, expand all groups */
.sidebar-narrow .nav-title-chevron,
.sidebar-narrow-unfoldable:not(:hover) .nav-title-chevron {
    display: none;
}
.sidebar-narrow .nav-group > ul,
.sidebar-narrow-unfoldable:not(:hover) .nav-group > ul {
    max-height: none !important;
    overflow: visible;
}

/* Active/hover — light sidebar */
#sidebar:not(.sidebar-dark) .sidebar-nav .nav-link.active {
    background: rgba(var(--pxt-accent), 0.25);
}
#sidebar:not(.sidebar-dark) .sidebar-nav .nav-link:hover {
    background: rgba(var(--pxt-accent), 0.12);
}
/* Active/hover — dark sidebar */
#sidebar.sidebar-dark .sidebar-nav .nav-link.active {
    background: rgba(var(--pxt-accent), 0.40);
}
#sidebar.sidebar-dark .sidebar-nav .nav-link:hover {
    background: rgba(var(--pxt-accent), 0.20);
}

/* Sidebar nav-icon container size */
#sidebar .sidebar-nav .nav-icon,
#sidebar .sidebar-nav .pxt-nav-icon {
    width:     24px;
    height:    24px;
    font-size: 24px;
    font-variation-settings: 'FILL' 0, 'wght' 200, 'GRAD' 0, 'opsz' 24;
}

/* Font sizes & chrome colours */
.sidebar-nav .nav-title { font-size: 0.95rem; color: var(--pxt-chrome-text-muted); }
.sidebar-nav .nav-link  { font-size: 0.95rem; color: var(--pxt-chrome-text); padding: 0.5rem 1rem; }
.sidebar-nav .pxt-nav-icon { color: var(--pxt-chrome-icon); }
.sidebar-footer { color: var(--pxt-chrome-text-muted); }

/* Version label */
.sidebar-version { font-size: .65rem; color: var(--pxt-chrome-text-muted); white-space: nowrap; overflow: hidden; }
.sidebar-narrow .sidebar-version { display: none; }

/* — Narrow mode & tooltips — */
@media (min-width: 992px) {
    .sidebar-narrow .sidebar-nav .d-narrow-none,
    .sidebar-narrow-unfoldable:not(:hover) .sidebar-nav .d-narrow-none {
        display: none !important;
    }
    .sidebar-narrow .sidebar-nav .nav-link,
    .sidebar-narrow-unfoldable:not(:hover) .sidebar-nav .nav-link {
        justify-content: center;
    }
    .sidebar-narrow .pxt-nav-icon,
    .sidebar-narrow-unfoldable:not(:hover) .pxt-nav-icon {
        margin-right: 0;
    }
}

/* Mobile sidebar show/hide */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform .3s ease;
    }
    .sidebar.sidebar-show {
        transform: translateX(0);
    }
}

/* CSS tooltips for sidebar narrow mode */
@media (min-width: 992px) {
    /* Allow sidebar tooltips to escape SimpleBar's overflow clipping */
    .sidebar-narrow [data-simplebar],
    .sidebar-narrow .simplebar-wrapper,
    .sidebar-narrow .simplebar-mask,
    .sidebar-narrow .simplebar-offset,
    .sidebar-narrow .simplebar-content-wrapper,
    .sidebar-narrow .simplebar-content {
        overflow: visible !important;
    }
    .sidebar-narrow .sidebar-nav .nav-link[data-sidebar-tooltip] {
        position: relative;
    }
    .sidebar-narrow .sidebar-nav .nav-link[data-sidebar-tooltip]::after {
        content: attr(data-sidebar-tooltip);
        position: absolute;
        left: 100%;
        top: 50%;
        transform: translateY(-50%);
        margin-left: 0.75rem;
        padding: var(--pxt-tooltip-py) var(--pxt-tooltip-px);
        background: var(--pxt-tooltip-bg);
        color: var(--pxt-tooltip-color);
        border: 1px solid var(--pxt-tooltip-border);
        border-radius: var(--pxt-tooltip-radius);
        font-size: var(--pxt-tooltip-font-size);
        font-weight: var(--pxt-tooltip-weight, 500);
        white-space: nowrap;
        z-index: 1100;
        pointer-events: none;
        opacity: 0;
        transition: opacity .15s;
        filter: drop-shadow(var(--pxt-tooltip-shadow));
    }
    .sidebar-narrow .sidebar-nav .nav-link[data-sidebar-tooltip]:hover::after {
        opacity: 1;
    }
}

/* Keep nav-title (section headers) visible in narrow mode */
.sidebar-narrow .sidebar-nav .nav-title,
.sidebar-narrow-unfoldable:not(:hover) .sidebar-nav .nav-title {
    height: auto !important;
    padding: 0.4rem 0 !important;
    margin: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 0 !important;
    overflow: hidden;
}

/* — Footer & toggler — */
.sidebar-footer {
    min-height: calc(3rem + 1px);
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    background: var(--pxt-sidebar-bg, var(--pxt-chrome-bg));
}
.sidebar-narrow .sidebar-footer {
    justify-content: center;
    padding: 0;
}

/* Sidebar toggler — remove background */
#sidebar-narrow-toggler,
#sidebar-narrow-toggler:hover,
#sidebar-narrow-toggler:focus,
#sidebar-narrow-toggler:active {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}
#sidebar-narrow-toggler::before {
    background-image: var(--pxt-sidebar-toggler-indicator, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2398a2b3' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3E%3C/svg%3E")) !important;
}

/* Sidebar narrow toggler — Material Symbol arrow icons */
.pxt-sidebar-narrow-toggler {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    padding: 0;
}
.pxt-sidebar-narrow-toggler::before {
    display: none;
}
.pxt-sidebar-narrow-toggler .material-symbols-outlined {
    font-size: 1.5rem;
    color: var(--pxt-chrome-text-muted);
    transition: color 0.15s;
}
.pxt-sidebar-narrow-toggler:hover .material-symbols-outlined {
    color: var(--pxt-chrome-text);
}
.sidebar-dark .pxt-sidebar-narrow-toggler .material-symbols-outlined {
    color: rgba(255, 255, 255, 0.6);
}
.sidebar-dark .pxt-sidebar-narrow-toggler:hover .material-symbols-outlined {
    color: rgba(255, 255, 255, 0.87);
}

/* ── 3c. Header ──────────────────────────────────────────────── */

/* — Structure — */
.header {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    height: 4.7rem;
    border-bottom: 1px solid var(--pxt-border) !important;
    background: var(--pxt-header-bg, var(--pxt-chrome-bg));
    color: var(--pxt-chrome-text);
}
.header-sticky {
    position: sticky;
    top: 0;
    z-index: 1020;
}
.header > .pxt-container-fluid,
.header > .pxt-container-xxl,
.header > .pxt-container-xl,
.header > .pxt-container-lg,
.header > .pxt-container-md,
.header > .pxt-container-sm,
.header > .pxt-container {
    display: flex;
    flex-wrap: inherit;
    align-items: center;
    justify-content: space-between;
    min-height: 4.7rem;
}
.header > .pxt-container-fluid,
.header > .container-fluid {
    align-items: stretch !important;
}
.header .container-fluid.border-bottom {
    display: flex;
    align-items: center;
    min-height: 56px;
}

/* — Navigation & dropdowns — */
.header .header-nav {
    display: flex;
    align-items: stretch;
    list-style: none;
    margin: 0;
    padding: 0;
}
.header .header-toggler,
.header .header-nav .nav-link,
.header .header-nav .btn.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    color: var(--pxt-chrome-text);
}
.header .header-nav .nav-item {
    display: flex;
    align-items: center;
}
.header .header-nav .nav-item.dropdown {
    position: relative;
}
.header .pxt-icon,
.header .pxt-icon-lg {
    color: var(--pxt-chrome-icon);
}
.header .pxt-icon-menu {
    color: var(--pxt-chrome-icon-menu);
}
.header .vr {
    background-color: var(--pxt-chrome-text-muted);
}
.header .dropdown-menu {
    z-index: 1031;
}
.header .dropdown-menu .dropdown-header {
    font-size: 0.8rem;
    font-weight: 700 !important;
    text-transform: uppercase;
    color: var(--pxt-text-muted);
}
.header .dropdown-menu .dropdown-item {
    font-size: 0.8rem;
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
}
.header .dropdown-menu .dropdown-item + .dropdown-item {
    margin-top: 0.25rem;
}
.header .material-symbols-outlined.icon,
.header .dropdown-menu .material-symbols-outlined.icon,
.header .dropdown-menu .material-symbols-outlined.nav-icon {
    font-size: 24px !important;
}
.header .dropdown-menu .nav-icon { color: var(--pxt-text-muted); }

/* Hide Bootstrap dropdown caret on avatar toggle */
.header .dropdown-toggle::after { display: none; }

/* — Toggle, backdrop, actions — */
.header-toggler {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background-color: transparent;
    border: 0;
    cursor: pointer;
}

/* Header sidebar toggle button */
.header-sidebar-toggle { margin-inline-start: -14px; align-self: center; }

/* Header dropdown backdrop overlay */
.header-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1029;
    background: rgba(0,0,0,.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}
.header-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

/* Action icon buttons (save, help, etc.) */
.pxt-action-icon {
    font-size: 1.4rem;
}

/* ── 3d. Footer ──────────────────────────────────────────────── */
.footer { font-size: 0.8rem; background: var(--pxt-footer-bg, var(--pxt-chrome-bg)); color: var(--pxt-chrome-text); min-height: calc(3rem + 1px); display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--pxt-border); position: sticky; bottom: 0; z-index: 1019; }
.footer a { color: var(--pxt-chrome-text-muted); }
.footer a:hover { color: var(--pxt-chrome-text); }

/* ── 3e. Impersonation banner ────────────────────────────────── */
.impersonation-banner { position: fixed; bottom: 0; left: 0; right: 0; z-index: 1050; background: #dc3545; color: #fff; text-align: center; padding: 0.5rem 1rem; font-size: 0.85rem; font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.impersonation-banner .btn-light { color: #dc3545; font-weight: 600; }
@media (min-width: 992px) {
    .impersonation-banner { left: 16rem; }
    body:has(#sidebar.sidebar-narrow) .impersonation-banner { left: 4rem; }
}

/* ================================================================
   4. GRID & CONTAINERS
   ================================================================ */
.pxt-container,
.pxt-container-fluid,
.pxt-container-xxl,
.pxt-container-xl,
.pxt-container-lg,
.pxt-container-md,
.pxt-container-sm {
    width: 100%;
    margin-right: auto;
    margin-left:  auto;
}
@media (min-width: 576px) {
    .pxt-container-sm, .pxt-container { max-width: 540px; }
}
@media (min-width: 768px) {
    .pxt-container-md, .pxt-container-sm, .pxt-container { max-width: 720px; }
}
@media (min-width: 992px) {
    .pxt-container-lg, .pxt-container-md, .pxt-container-sm, .pxt-container { max-width: 960px; }
}
@media (min-width: 1200px) {
    .pxt-container-xl, .pxt-container-lg, .pxt-container-md, .pxt-container-sm, .pxt-container { max-width: 1140px; }
}
@media (min-width: 1400px) {
    .pxt-container-xxl, .pxt-container-xl, .pxt-container-lg, .pxt-container-md, .pxt-container-sm, .pxt-container { max-width: 1380px; }
}

/* Row gutter override — mobile vertical gap */
@media (max-width: 991.98px) {
    .row { --bs-gutter-y: 1.5rem; }
}

/* ================================================================
   5. BOOTSTRAP OVERRIDES
   ================================================================ */

/* ── 5a. Buttons ─────────────────────────────────────────────── */
/* Button: ghost variant (no Bootstrap equivalent) */
.btn-ghost-secondary {
    color: var(--pxt-text-muted);
    background-color: transparent;
    border: none;
}
.btn-ghost-secondary:hover { color: var(--pxt-text); background-color: var(--pxt-tertiary-bg); }

/* Button color overrides to match PXT palette */
.btn-primary { background-color: #5856d6; border-color: #5856d6; }
.btn-primary:hover { background-color: #4b49b6; border-color: #4b49b6; }
.btn-secondary { background-color: #6b7785; border-color: #6b7785; }
.btn-secondary:hover { background-color: #5a6570; border-color: #5a6570; }
.btn-danger { background-color: #e55353; border-color: #e55353; }
.btn-danger:hover { background-color: #c44848; border-color: #c44848; }
.btn-outline-primary { color: #5856d6; border-color: #5856d6; }
.btn-outline-primary:hover { color: #fff; background-color: #5856d6; }
.btn-link { color: var(--pxt-violet); text-decoration: none; }
.btn-link:hover { color: var(--pxt-accent-hex); }

/* ── 5b. Forms ───────────────────────────────────────────────── */
.form-control {
    background-color: var(--pxt-form-input-bg);
    color: var(--pxt-form-input-color);
    border-color: var(--pxt-form-input-border);
}
.form-control:focus { border-color: var(--pxt-input-focus-border); box-shadow: none; }
.form-control::placeholder { color: var(--pxt-input-placeholder); }
.form-select {
    background-color: var(--pxt-form-input-bg);
    color: var(--pxt-text);
    border-color: var(--pxt-form-input-border);
}
.form-select:focus { border-color: var(--pxt-form-input-focus-border); box-shadow: none; }
.form-label { font-weight: 500; }
.form-text { color: var(--pxt-text-muted); }

/* ── 5c. Colors (bg-*, text-*) ───────────────────────────────── */
/* Background color overrides to match PXT palette */
.bg-info    { background-color: var(--pxt-blue) !important; }
.bg-success { background-color: var(--pxt-green) !important; }
.bg-danger  { background-color: #e55353 !important; }
.bg-warning { background-color: var(--pxt-amber) !important; color: #000 !important; }
.bg-success-subtle { background-color: var(--pxt-green-subtle) !important; }
.bg-danger-subtle  { background-color: rgba(229,83,83,.12) !important; }
.bg-info-subtle    { background-color: var(--pxt-blue-subtle) !important; }
.bg-warning-subtle { background-color: var(--pxt-amber-subtle) !important; }
.bg-secondary-subtle { background-color: rgba(107,119,133,.12) !important; }

/* Text color overrides */
.text-body-secondary { color: var(--pxt-text-muted) !important; }
.text-muted     { color: var(--pxt-text-muted) !important; }
.text-success   { color: var(--pxt-green) !important; }
.text-danger    { color: #e55353 !important; }
.text-warning   { color: var(--pxt-amber) !important; }
.text-info      { color: var(--pxt-blue) !important; }

/* ── 5d. Avatars & badges ────────────────────────────────────── */
/* Avatar (no Bootstrap equivalent) */
.avatar {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    border-radius: 50%;
}
.avatar-md { width: 2.5rem; height: 2.5rem; }
.avatar-xl { width: 4rem; height: 4rem; }
.avatar-img { width: 100%; height: auto; border-radius: 50%; }

/* Badge size */
.badge-sm { font-size: 0.65em; padding: 0.25em 0.5em; }

/* ── 5e. Progress bars ───────────────────────────────────────── */
.progress-bar { background-color: var(--pxt-violet); }

/* ── 5f. Dropdowns & modals ──────────────────────────────────── */
/* Dropdown style overrides */
.dropdown-menu {
    background-color: var(--pxt-bg-card);
    border-color: var(--pxt-card-border);
    border-radius: 0.5rem;
}
.dropdown-item:hover,
.dropdown-item:focus { background-color: var(--pxt-tertiary-bg); }
.dropdown-divider { border-top-color: var(--pxt-border); }

/* Modal style overrides */
.modal-content {
    background-color: var(--pxt-bg-card);
    border-color: var(--pxt-card-border);
    border-radius: 0.75rem;
}
.modal-header { border-bottom-color: var(--pxt-border); }
.modal-footer { border-top-color: var(--pxt-border); }

/* ── 5g. Tables & list groups ────────────────────────────────── */
/* Table responsive override */
.table-responsive {
    overflow-y: clip;
}
.table-responsive.pxt-table-scroll {
    max-height: 360px;
    overflow-y: auto;
}
.pxt-table-scroll .pxt-table thead th { top: 0; }

/* Card fill layout */
.pxt-card-fill > .pxt-card-header,
.pxt-card-fill > .pxt-table-footer { flex-shrink: 0; }
.pxt-card-fill > .table-responsive {
    flex: 1 1 0; min-height: 0; overflow-y: auto; overflow-x: auto; max-height: none;
}
.pxt-card-fill > .table-responsive .pxt-table thead th { top: 0; }
.pxt-table-static-head thead th { position: static; }

/* List group overrides */
.list-group-item {
    color: var(--pxt-text);
    background-color: var(--pxt-bg-card);
    border-color: var(--pxt-border);
}

/* ── 5h. Nav links ───────────────────────────────────────────── */
.nav-link { color: var(--pxt-text); }

/* Header nav (base) */
.header-nav { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; }

/* ── 5i. Dark-mode fixes (select options) ────────────────────── */
[data-bs-theme="dark"] select option,
[data-bs-theme="dark"] .form-select option {
    background: var(--pxt-bg-card);
    color: var(--pxt-text);
}

/* Header icon color override for dark mode */
[data-bs-theme="dark"] .header .pxt-icon,
[data-bs-theme="dark"] .header .pxt-icon-lg,
[data-bs-theme="dark"] .header .pxt-icon-menu,
[data-bs-theme="dark"] .header .material-symbols-outlined.pxt-icon,
[data-bs-theme="dark"] .header .material-symbols-outlined.pxt-icon-lg,
[data-bs-theme="dark"] .header .material-symbols-outlined.pxt-icon-menu {
    color: #98a2b3 !important;
}

/* Sidebar icon color override for dark mode */
[data-bs-theme="dark"] .sidebar .pxt-nav-icon,
[data-bs-theme="dark"] .sidebar .sidebar-nav .nav-icon {
    color: #98a2b3 !important;
}

/* All icons in dark mode */
[data-bs-theme="dark"] .material-symbols-outlined,
[data-bs-theme="dark"] .pxt-icon,
[data-bs-theme="dark"] .pxt-icon-lg,
[data-bs-theme="dark"] .pxt-icon-menu,
[data-bs-theme="dark"] .pxt-nav-icon,
[data-bs-theme="dark"] .dropdown-menu .material-symbols-outlined,
[data-bs-theme="dark"] .dropdown-menu .nav-icon {
    color: #98a2b3 !important;
}

/* Button icons in dark mode */
[data-bs-theme="dark"] .btn-icon .material-symbols-outlined {
    color: #98a2b3 !important;
}

/* Footer text color in dark mode */
[data-bs-theme="dark"] .footer {
    color: #98a2b3 !important;
}

/* ================================================================
   6. ICONS & MATERIAL SYMBOLS
   ================================================================ */

/* Font size — pxt-prefixed icon classes */
.material-symbols-outlined.pxt-nav-icon  { font-size: 24px; }
.material-symbols-outlined.pxt-icon      { font-size: 24px; }
.material-symbols-outlined.pxt-icon-lg   { font-size: 24px; }
.material-symbols-outlined.pxt-icon-menu { font-size: 28px; }

/* Container size */
.pxt-nav-icon,
.pxt-icon,
.pxt-icon-lg {
    width:        24px;
    height:       24px;
    color:        var(--pxt-icon-color);
    margin-right: 0.5rem;
}
.pxt-icon-menu {
    width:  28px;
    height: 28px;
    color:  var(--pxt-icon-menu-color);
}

/* Material Symbols base settings */
body[class*="pxt-"] .material-symbols-outlined {
    font-family: 'Material Symbols Outlined' !important;
    font-weight: normal;
    font-style: normal;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-feature-settings: 'liga';
    font-variation-settings: 'FILL' 0, 'wght' 200, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
    line-height: 1;
}

/* Icon container overrides */
.icon:not(.icon-c-s):not(.icon-custom-size)        { width: 20px; height: 20px; }
.icon:not(.icon-c-s):not(.icon-custom-size).icon-lg { width: 24px; height: 24px; }
.icon:not(.icon-c-s):not(.icon-custom-size).icon-sm { width: 18px; height: 18px; }

/* Font size — generic icon classes */
.material-symbols-outlined.nav-icon  { font-size: 24px; }
.material-symbols-outlined.icon      { font-size: 20px; }
.material-symbols-outlined.icon-sm   { font-size: 18px; }
.material-symbols-outlined.icon-lg   { font-size: 24px; }
.material-symbols-outlined.icon-xs   { font-size: 14px; }
.material-symbols-outlined.icon-btn  { font-size: 20px; }
.material-symbols-outlined.icon-2xl  { font-size: 40px; }
.material-symbols-outlined.icon-bold { font-variation-settings: 'FILL' 0, 'wght' 700, 'GRAD' 0, 'opsz' 24; }

/* ================================================================
   7. TYPOGRAPHY (font families & sizes)
   ================================================================ */

/* Latin */
body.pxt-inter,      body.pxt-inter *      { font-family: 'Inter',      sans-serif !important; }
body.pxt-lato,       body.pxt-lato *       { font-family: 'Lato',       sans-serif !important; }
body.pxt-poppins,    body.pxt-poppins *    { font-family: 'Poppins',    sans-serif !important; }
body.pxt-roboto,     body.pxt-roboto *     { font-family: 'Roboto',     sans-serif !important; }
body.pxt-opensans,   body.pxt-opensans *   { font-family: 'Open Sans',  sans-serif !important; }
body.pxt-montserrat, body.pxt-montserrat * { font-family: 'Montserrat', sans-serif !important; }
body.pxt-outfit,     body.pxt-outfit *     { font-family: 'Outfit',     sans-serif !important; }
body.pxt-outfit                           { font-size: 15px; }
body.pxt-raleway,    body.pxt-raleway *   { font-family: 'Raleway',    sans-serif !important; }
body.pxt-nunito,     body.pxt-nunito *    { font-family: 'Nunito',     sans-serif !important; }
body.pxt-lexend,     body.pxt-lexend *    { font-family: 'Lexend',     sans-serif !important; }

/* Font sizes — override --pxt-root-font-size token on html */
html:has(body.pxt-fs-small)              { --pxt-root-font-size: 0.8125rem; }
html:has(body.pxt-fs-normal)             { --pxt-root-font-size: 0.875rem; }
html:has(body.pxt-fs-large)              { --pxt-root-font-size: 1rem; }
html:has(body.pxt-fs-xlarge)             { --pxt-root-font-size: 1.125rem; }

/* Mobile font size override */
@media (max-width: 768px) {
    html:has(body.pxt-fs-mobile-small)   { --pxt-root-font-size: 0.8125rem; }
    html:has(body.pxt-fs-mobile-normal)  { --pxt-root-font-size: 0.875rem; }
    html:has(body.pxt-fs-mobile-large)   { --pxt-root-font-size: 1rem; }
    html:has(body.pxt-fs-mobile-xlarge)  { --pxt-root-font-size: 1.125rem; }
}

/* ================================================================
   8. COMPONENTS
   ================================================================ */

/* ── 8a. Card (pxt-card) ─────────────────────────────────────── */
.pxt-card {
    position:       relative;
    display:        flex;
    flex-direction: column;
    min-width:      0;
    word-wrap:      break-word;
    background:     var(--pxt-bg-card);
    border:         1px solid var(--pxt-card-border);
    border-radius:  0.75rem;
    box-shadow:     var(--pxt-shadow-xs);
}
.pxt-perf-card {
    cursor: pointer;
    transition: box-shadow .15s ease, transform .15s ease;
}
.pxt-perf-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
    transform: translateY(-1px);
}
.pxt-card-header {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    padding:         1rem 1.5rem;
    border-bottom:   1px solid var(--pxt-card-border);
}
.pxt-card-body {
    flex:    1 1 auto;
    padding: 1rem 1.5rem;
}
.pxt-card-title {
    font-size:      0.9375rem;
    font-weight:    400;
    color:          var(--pxt-text);
    margin:         0;
    text-transform: uppercase;
}
.pxt-card-header .btn-link .material-symbols-outlined,
.pxt-card-header > .btn-link .material-symbols-outlined {
    font-size: 2rem;
}

/* All icons in card headers use 2x size */
.pxt-card-header .material-symbols-outlined,
.pxt-card-header .pxt-icon,
.pxt-card-header .pxt-icon-lg {
    font-size: 2rem !important;
}

.pxt-card-subtitle {
    font-size:   0.8125rem;
    font-weight: 400;
    color:       var(--pxt-text-muted);
    margin:      0.125rem 0 0;
}
.pxt-card-desc {
    font-size: 0.8rem;
    color:     var(--pxt-text-muted);
}

/* Nested card (card inside card) — lighter bg, no shadow */
.pxt-card .pxt-card {
    background:    var(--pxt-border-inner);
    border-color:  var(--pxt-border);
    box-shadow:    none;
}

/* ── 8b. Forms (pxt-input, pxt-select, custom select, password) */
.pxt-label {
    display:       block;
    margin-bottom: 0.375rem;
    font-size:     0.875rem;
    font-weight:   500;
    color:         var(--pxt-label-color);
}
.pxt-input,
.pxt-select,
.pxt-textarea {
    width:         100%;
    border-radius: 0.5rem;
    border:        1px solid var(--pxt-input-border);
    background:    transparent;
    padding:       0.625rem 1rem;
    font-size:     0.875rem;
    color:         var(--pxt-text);
    box-shadow:    var(--pxt-shadow-xs);
    transition:    border-color .15s, box-shadow .15s;
}
.pxt-input,
.pxt-select {
    height: 2.75rem;
}
.pxt-input::placeholder,
.pxt-textarea::placeholder {
    color: var(--pxt-input-placeholder);
}
.pxt-input:focus,
.pxt-select:focus,
.pxt-textarea:focus {
    outline:      none;
    border-color: var(--pxt-input-focus-border);
    box-shadow:   var(--pxt-shadow-xs), 0 0 0 3px var(--pxt-input-focus-ring);
}

/* Icon-prefix input (TailAdmin style) */
.pxt-input-icon {
    display:          flex;
    align-items:      stretch;
    width:            100%;
    border:           1px solid var(--pxt-form-input-border);
    border-radius:    0.5rem;
    background:       var(--pxt-form-input-bg);
    box-shadow:       var(--pxt-shadow-xs);
    transition:       border-color .15s, box-shadow .15s;
    overflow:         hidden;
}
.pxt-input-icon:focus-within {
    border-color: var(--pxt-input-focus-border);
    box-shadow:   var(--pxt-shadow-xs), 0 0 0 3px var(--pxt-input-focus-ring);
}
.pxt-input-icon-slot {
    display:        flex;
    align-items:    center;
    padding:        0 0.875rem;
    color:          var(--pxt-text-muted);
    border-right:   1px solid var(--pxt-form-input-border);
    flex-shrink:    0;
    pointer-events: none;
}
.pxt-input-icon > .form-control,
.pxt-input-icon > .pxt-input {
    border:           none !important;
    box-shadow:       none !important;
    background:       transparent !important;
    border-radius:    0 !important;
    flex:             1;
    min-width:        0;
}
.pxt-input-icon > .form-control:focus,
.pxt-input-icon > .pxt-input:focus {
    border:     none !important;
    box-shadow: none !important;
}

/* Custom select */
.pxt-custom-select {
    position: relative;
    width: 100%;
}
.pxt-custom-select .pxt-cs-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    cursor: pointer;
    background-color: var(--pxt-form-input-bg);
    color: var(--pxt-form-input-color);
    border: 1px solid var(--pxt-form-input-border);
    border-radius: var(--pxt-form-input-radius);
    font-size: var(--pxt-form-input-size);
    padding: var(--pxt-form-input-padding-y) var(--pxt-form-input-padding-x);
    line-height: 1.5;
    transition: border-color .15s;
    -webkit-user-select: none;
    user-select: none;
}
.pxt-custom-select .pxt-cs-trigger:hover {
    border-color: var(--pxt-input-focus-border);
}
.pxt-custom-select.open .pxt-cs-trigger {
    border-color: var(--pxt-input-focus-border);
}
.pxt-custom-select .pxt-cs-arrow {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-inline-start: 0.5rem;
    opacity: .5;
    transition: transform .15s;
}
.pxt-custom-select.open .pxt-cs-arrow {
    transform: rotate(180deg);
}
.pxt-custom-select .pxt-cs-dropdown {
    display: none;
    position: absolute;
    z-index: 1050;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 240px;
    overflow-y: auto;
    background: var(--pxt-bg-card);
    border: 1px solid var(--pxt-form-input-border);
    border-radius: var(--pxt-form-input-radius);
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    padding: 4px;
}
.pxt-custom-select.open .pxt-cs-dropdown {
    display: block;
}
.pxt-custom-select .pxt-cs-option {
    padding: 0.4rem 0.65rem;
    font-size: var(--pxt-form-input-size);
    color: var(--pxt-form-input-color);
    border-radius: calc(var(--pxt-form-input-radius) - 2px);
    cursor: pointer;
    transition: background .1s;
}
.pxt-custom-select .pxt-cs-option:hover {
    background: var(--pxt-tertiary-bg);
}
.pxt-custom-select .pxt-cs-option.selected {
    background: rgba(var(--pxt-accent), .15);
    font-weight: 500;
}

/* Standardised form sizing (token-driven, inside pxt-card) */
.pxt-card .form-label {
    font-size: var(--pxt-form-label-size);
    font-weight: var(--pxt-form-label-weight);
    margin-bottom: var(--pxt-form-label-gap);
    color: var(--pxt-form-label-color);
}
.pxt-card .form-control,
.pxt-card .form-select {
    font-size: var(--pxt-form-input-size);
    padding: var(--pxt-form-input-padding-y) var(--pxt-form-input-padding-x);
    background-color: var(--pxt-form-input-bg);
    color: var(--pxt-form-input-color);
    border-color: var(--pxt-form-input-border);
    border-radius: var(--pxt-form-input-radius);
}
.pxt-card .form-control:focus {
    border-color: var(--pxt-form-input-focus-border);
    box-shadow: none;
    outline: 0;
}
.pxt-card .form-select:focus {
    border-color: var(--pxt-form-input-focus-border);
    box-shadow: none;
    outline: 0;
}
.pxt-card .form-text {
    font-size: var(--pxt-form-help-size);
    color: var(--pxt-form-help-color);
}
.pxt-card .form-check-label {
    font-size: var(--pxt-form-check-size);
}
.pxt-card .btn {
    font-size: var(--pxt-form-btn-size);
}
.pxt-card h6.fw-semibold {
    font-size: var(--pxt-form-section-size);
    font-weight: var(--pxt-form-section-weight);
    color: var(--pxt-form-section-color);
}
.pxt-card hr {
    border-color: var(--pxt-form-hr-color);
    opacity: 1;
}

/* Password field wrapper + visibility toggle */
.pxt-pw-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}
.pxt-pw-wrap .form-control {
  padding-right: 2.5rem;
  width: 100%;
}
.pxt-pw-toggle {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 4;
  width: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--pxt-text);
  opacity: .5;
  cursor: pointer;
  padding: 0;
}
.pxt-pw-toggle:hover {
  opacity: .8;
}
.pxt-pw-toggle .material-symbols-outlined {
  font-size: 1.15rem;
}

/* ── 8c. Tabs (line + pill) ──────────────────────────────────── */

/* Line tabs (pxt-tabs-line) — TailAdmin style */
.pxt-tabs-line {
    border-bottom: 1px solid var(--pxt-border);
    gap:           0;
    flex-wrap:     nowrap;
    overflow-x:    auto;
    overflow-y:    hidden;
}
.pxt-tabs-line .nav-link {
    border:        0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    margin-bottom: -1px;
    padding:       .65rem 1.1rem;
    color:         var(--pxt-text-muted);
    font-size:     .9rem;
    font-weight:   500;
    white-space:   nowrap;
    background:    transparent;
    transition:    color .15s, border-color .15s;
}
.pxt-tabs-line .nav-link:hover {
    color:               var(--pxt-text);
    border-bottom-color: rgba(128,128,128,.35);
}
.pxt-tabs-line .nav-link.active {
    color:               var(--pxt-text);
    border-bottom-color: var(--pxt-text);
    font-weight:         600;
}

/* Line tabs (pxt-nav-tabs-line — alias) */
.pxt-nav-tabs-line {
    border-bottom: 1px solid var(--pxt-border);
    gap: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
}
.pxt-nav-tabs-line .nav-link {
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    margin-bottom: -1px;
    padding: .65rem 1.1rem;
    color: var(--pxt-text-muted);
    font-size: .9rem;
    font-weight: 500;
    white-space: nowrap;
    background: transparent;
    transition: color .15s, border-color .15s;
}
.pxt-nav-tabs-line .nav-link:hover {
    color: var(--pxt-text);
    border-bottom-color: rgba(128,128,128,.35);
}
.pxt-nav-tabs-line .nav-link.active {
    color: var(--pxt-text);
    border-bottom-color: var(--pxt-text);
    font-weight: 600;
}

/* Pill tabs (pxt-tabs-pill) — TailAdmin default style */
.pxt-tabs-pill {
    background:    var(--pxt-tertiary-bg);
    border-radius: 0.5rem;
    padding:       0.25rem;
    gap:           2px;
    display:       flex;
    flex-wrap:     nowrap;
    overflow-x:    auto;
    width:         100%;
}
.pxt-tabs-pill .nav-item { flex-shrink: 0; }
.pxt-tabs-pill .nav-link {
    border:        0;
    border-radius: 0.375rem;
    padding:       0.5rem 0.75rem;
    color:         var(--pxt-text-muted);
    font-size:     .875rem;
    font-weight:   500;
    white-space:   nowrap;
    background:    transparent;
    transition:    color .2s ease-in-out, background .2s ease-in-out, box-shadow .2s ease-in-out;
}
.pxt-tabs-pill .nav-link:hover { color: var(--pxt-text); }
.pxt-tabs-pill .nav-link.active {
    background: var(--pxt-card-bg);
    color:      var(--pxt-text);
    box-shadow: var(--pxt-shadow-xs);
}

[data-bs-theme="dark"] .pxt-tabs-pill {
    background: rgba(255, 255, 255, .07);
}
[data-bs-theme="dark"] .pxt-tabs-pill .nav-link.active {
    background: rgba(255, 255, 255, .03);
    color:      #fff;
}

/* Pill tabs (pxt-nav-tabs-pill — alias) */
.pxt-nav-tabs-pill {
    background:    var(--pxt-tertiary-bg);
    border-radius: 0.5rem;
    padding:       0.25rem;
    gap:           2px;
    display:       flex;
    flex-wrap:     nowrap;
    overflow-x:    auto;
    width:         100%;
}
.pxt-nav-tabs-pill .nav-item { flex-shrink: 0; }
.pxt-nav-tabs-pill .nav-link {
    border:        0;
    border-radius: 0.375rem;
    padding:       0.5rem 0.75rem;
    color:         var(--pxt-text-muted);
    font-size:     .875rem;
    font-weight:   500;
    white-space:   nowrap;
    background:    transparent;
    transition:    color .2s ease-in-out, background .2s ease-in-out, box-shadow .2s ease-in-out;
}
.pxt-nav-tabs-pill .nav-link:hover { color: var(--pxt-text); }
.pxt-nav-tabs-pill .nav-link.active {
    background: var(--pxt-card-bg);
    color:      var(--pxt-text);
    box-shadow: var(--pxt-shadow-xs);
}
[data-bs-theme="dark"] .pxt-nav-tabs-pill {
    background: rgba(255,255,255,.07);
}
[data-bs-theme="dark"] .pxt-nav-tabs-pill .nav-link.active {
    background: rgba(255, 255, 255, .03);
    color:      #fff;
}

/* ── 8d. Table (pxt-table, toolbar, pagination, cell utilities) */

/* Wrapper card */
.pxt-table-wrap {
    background:    var(--pxt-bg-card);
    border:        1px solid var(--pxt-card-border);
    border-radius: 0.75rem;
    box-shadow:    var(--pxt-shadow-xs);
    overflow:      hidden;
}

/* Toolbar: show-entries + search */
.pxt-table-toolbar {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    padding:         1rem 1.25rem;
    gap:             1rem;
    flex-wrap:       wrap;
}
.pxt-table-show {
    display:     flex;
    align-items: center;
    gap:         0.5rem;
    font-size:   0.8125rem;
    color:       var(--pxt-text-muted);
    white-space: nowrap;
}
.pxt-table-show select {
    appearance:    none;
    -webkit-appearance: none;
    padding:       0.25rem 1.75rem 0.25rem 0.625rem;
    border:        1px solid var(--pxt-input-border);
    border-radius: 0.375rem;
    background:    var(--pxt-bg-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2398a2b3' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 0.5rem center;
    font-size:     0.8125rem;
    color:         var(--pxt-text);
    cursor:        pointer;
    line-height:   1.5;
}
.pxt-table-show select:focus {
    outline:    none;
    border-color: var(--pxt-input-focus-border);
    box-shadow: 0 0 0 3px var(--pxt-input-focus-ring);
}
.pxt-table-search {
    position:    relative;
    min-width:   220px;
    max-width:   320px;
    flex:        1 1 220px;
}
.pxt-table-search svg {
    position:      absolute;
    left:          0.75rem;
    top:           50%;
    transform:     translateY(-50%);
    color:         var(--pxt-text-muted);
    pointer-events: none;
    width:         16px;
    height:        16px;
}
.pxt-table-search input {
    width:         100%;
    padding:       0.4rem 0.75rem 0.4rem 2.25rem;
    border:        1px solid var(--pxt-input-border);
    border-radius: 0.5rem;
    background:    var(--pxt-bg-card);
    font-size:     0.8125rem;
    color:         var(--pxt-text);
    line-height:   1.5;
}
.pxt-table-search input::placeholder { color: var(--pxt-input-placeholder); }
.pxt-table-search input:focus {
    outline:      none;
    border-color: var(--pxt-input-focus-border);
    box-shadow:   0 0 0 3px var(--pxt-input-focus-ring);
}

/* Table element */
.pxt-table {
    width:           100%;
    border-collapse: collapse;
    table-layout:    auto;
    font-size:       0.9375rem;
}
.pxt-table thead th,
.pxt-table tbody td {
    width: auto;
    white-space: nowrap;
}
.pxt-table thead th:last-child,
.pxt-table tbody td:last-child {
    width: 1%;
}
.pxt-table thead th {
    padding:        0.875rem 1.25rem;
    text-align:     left;
    font-size:      0.8125rem;
    font-weight:    400;
    color:          var(--pxt-table-head-color, #fff);
    text-transform: uppercase;
    white-space:    nowrap;
    background:     var(--pxt-table-head-bg);
    border-bottom:  1px solid var(--pxt-border);
    user-select:    none;
    position:       sticky;
    top:            6.2rem;  /* app header (4.7rem) + header mb-4 (1.5rem) */
    z-index:        1;
}
.pxt-table thead th.sortable { cursor: pointer; }
.pxt-table thead th .pxt-th-inner {
    display:     inline-flex;
    align-items: center;
    gap:         0.35rem;
}

/* Sort icon — up/down chevrons stacked */
.pxt-table thead th .pxt-sort-icon {
    display:        inline-flex;
    flex-direction: column;
    gap:            2px;
    opacity:        0.4;
}
.pxt-table thead th.sort-asc  .pxt-sort-icon,
.pxt-table thead th.sort-desc .pxt-sort-icon { opacity: 1; }
.pxt-table thead th .pxt-sort-icon span {
    display:     block;
    width:       0;
    height:      0;
    border-left:  5px solid transparent;
    border-right: 5px solid transparent;
}
.pxt-table thead th .pxt-sort-icon .pxt-sort-up   { border-bottom: 5px solid var(--pxt-table-sort-icon, rgba(255,255,255,0.4)); }
.pxt-table thead th .pxt-sort-icon .pxt-sort-down { border-top:    5px solid var(--pxt-table-sort-icon, rgba(255,255,255,0.4)); }
.pxt-table thead th.sort-asc  .pxt-sort-icon .pxt-sort-up   { border-bottom-color: var(--pxt-table-sort-icon-on, #fff); }
.pxt-table thead th.sort-desc .pxt-sort-icon .pxt-sort-down { border-top-color:    var(--pxt-table-sort-icon-on, #fff); }

.pxt-table tbody td {
    padding:        1rem 1.25rem;
    color:          var(--pxt-text);
    border-bottom:  1px solid var(--pxt-border);
    vertical-align: middle;
}
.pxt-table tbody tr:last-child td { border-bottom: none; }
.pxt-table tbody tr:hover td { background: rgba(var(--pxt-accent), 0.04); }

/* Bold first data column (name/primary field) */
.pxt-table tbody td:first-child { font-weight: 600; }

/* Action cell */
.pxt-table .pxt-table-actions {
    display:     flex;
    align-items: center;
    gap:         0.5rem;
    justify-content: flex-end;
}
.pxt-table .pxt-table-btn {
    display:          inline-flex;
    align-items:      center;
    justify-content:  center;
    width:            30px;
    height:           30px;
    border:           none;
    background:       transparent;
    border-radius:    0.375rem;
    color:            var(--pxt-text-muted);
    cursor:           pointer;
    transition:       background 0.15s, color 0.15s;
    padding:          0;
}
.pxt-table .pxt-table-btn:hover { background: var(--pxt-tertiary-bg); color: var(--pxt-text); }
.pxt-table .pxt-table-btn.pxt-table-btn-danger:hover { background: rgba(220,38,38,.08); color: #dc2626; }

/* Footer: info + pagination */
.pxt-table-footer {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    padding:         0.875rem 1.25rem;
    border-top:      1px solid var(--pxt-border);
    gap:             1rem;
    flex-wrap:       wrap;
}
.pxt-table-info {
    font-size:  0.8125rem;
    color:      var(--pxt-text-muted);
    white-space: nowrap;
}
.pxt-table-pagination {
    display:  flex;
    gap:      0.25rem;
    flex-wrap: wrap;
}
.pxt-table-pagination .pxt-page-btn {
    display:          inline-flex;
    align-items:      center;
    justify-content:  center;
    min-width:        32px;
    height:           32px;
    padding:          0 0.5rem;
    border:           1px solid var(--pxt-border);
    border-radius:    0.375rem;
    background:       var(--pxt-bg-card);
    font-size:        0.8125rem;
    color:            var(--pxt-text);
    cursor:           pointer;
    transition:       background 0.15s, border-color 0.15s, color 0.15s;
    text-decoration:  none;
    line-height:      1;
}
.pxt-table-pagination .pxt-page-btn:hover:not(:disabled):not(.active):not([aria-disabled="true"]) {
    background:   var(--pxt-tertiary-bg);
    border-color: var(--pxt-border);
}
.pxt-table-pagination .pxt-page-btn.active {
    background:   var(--pxt-accent-hex, #8B5CF6) !important;
    border-color: var(--pxt-accent-hex, #8B5CF6) !important;
    color:        #fff !important;
    font-weight:  600;
}
.pxt-table-pagination .pxt-page-btn:disabled,
.pxt-table-pagination .pxt-page-btn[disabled],
.pxt-table-pagination .pxt-page-btn[aria-disabled="true"] {
    opacity: 0.4;
    cursor:  not-allowed;
    pointer-events: none;
}
.pxt-table-pagination a.pxt-page-btn {
    text-decoration: none;
}
.pxt-page-ellipsis {
    pointer-events: none;
}
.pxt-table-pagination .pxt-page-btn:first-child,
.pxt-table-pagination .pxt-page-btn:last-child {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    padding-bottom: 0.25rem;
}

/* Standalone pagination */
.pxt-pagination {
    display:     flex;
    list-style:  none;
    margin:      0;
    padding:     0;
    gap:         0.25rem;
}
.pxt-pagination li a,
.pxt-pagination li span {
    display:          inline-flex;
    align-items:      center;
    justify-content:  center;
    min-width:        2.25rem;
    height:           2.25rem;
    padding:          0 0.5rem;
    border:           1px solid var(--pxt-border);
    border-radius:    0.5rem;
    background:       var(--pxt-bg-card);
    font-size:        0.875rem;
    color:            var(--pxt-text-muted);
    cursor:           pointer;
    transition:       background 0.15s, border-color 0.15s, color 0.15s;
    text-decoration:  none;
    line-height:      1;
}
.pxt-pagination li a:hover {
    background:   var(--pxt-tertiary-bg);
    color:        var(--pxt-text);
}
.pxt-pagination li.active a {
    background:   var(--pxt-accent-hex);
    border-color: var(--pxt-accent-hex);
    color:        #fff;
    font-weight:  600;
}
.pxt-pagination li.disabled a {
    opacity:        0.35;
    pointer-events: none;
    cursor:         not-allowed;
}
.pxt-pagination li.ellipsis span {
    border:     none;
    background: transparent;
    cursor:     default;
    min-width:  1.5rem;
    color:      var(--pxt-text-muted);
}

/* Table cell utilities */

/* Toolbar "add" button */
.pxt-table-toolbar .pxt-table-add-btn {
    color:      var(--pxt-text-muted);
}
.pxt-table-toolbar .pxt-table-add-btn .material-symbols-outlined {
    font-size:  1.5rem;
}

/* Empty-state row */
.pxt-table .pxt-table-empty {
    text-align: center;
    color:      var(--pxt-text-muted);
    padding:    2rem;
}

/* Clickable name/link inside a cell */
.pxt-table .pxt-table-cell-link {
    text-decoration: none;
    color:           inherit;
    font-weight:     600;
}
.pxt-table .pxt-table-cell-link:hover {
    text-decoration: underline;
}

/* Monospace secondary cell (slugs, codes) */
.pxt-table .pxt-table-cell-mono {
    font-family: monospace;
    font-size:   .85em;
    color:       var(--pxt-text-muted);
}

/* Muted cell (dates, secondary info) */
.pxt-table .pxt-table-cell-muted {
    color: var(--pxt-text-muted);
}

/* "more_vert" menu trigger icon */
.pxt-table-btn .pxt-table-menu-icon {
    font-size: 1.25rem;
}

/* Icons inside dropdown items */
.pxt-dropdown .pxt-dropdown-icon {
    font-size: 1.1rem;
}

/* Inline form inside dropdown (no margin) */
.pxt-dropdown .pxt-dropdown-form {
    margin: 0;
}

/* Cron schedule icon */
.pxt-cron-schedule-icon {
    font-size: 1.1rem;
    color:     var(--pxt-text-muted);
}

/* Log level filter toggle buttons */
.pxt-log-filters {
    display: flex;
    gap: 0.375rem;
}
.pxt-log-filter-btn {
    display:       inline-flex;
    align-items:   center;
    padding:       0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size:     0.8125rem;
    font-weight:   500;
    cursor:        pointer;
    transition:    background 0.15s, color 0.15s, opacity 0.15s;
    border:        1px solid var(--pxt-border);
    background:    var(--pxt-bg-card);
    color:         var(--pxt-text-muted);
    opacity:       0.5;
}
.pxt-log-filter-btn.active {
    opacity: 1;
}
.pxt-log-filter-info.active {
    background:   var(--pxt-badge-info-bg, #e8f4fd);
    color:        var(--pxt-badge-info-text, #1a73e8);
    border-color: var(--pxt-badge-info-text, #1a73e8);
}
.pxt-log-filter-warning.active {
    background:   var(--pxt-badge-warning-bg, #fff8e1);
    color:        var(--pxt-badge-warning-text, #f9a825);
    border-color: var(--pxt-badge-warning-text, #f9a825);
}
.pxt-log-filter-error.active {
    background:   var(--pxt-badge-danger-bg, #fde8e8);
    color:        var(--pxt-badge-danger-text, #e53935);
    border-color: var(--pxt-badge-danger-text, #e53935);
}

/* ── 8e. Dropdown (pxt-dropdown) ─────────────────────────────── */
.pxt-dropdown {
    background: var(--pxt-bg-card);
    border: 1px solid var(--pxt-card-border);
    border-radius: 0.75rem !important;
    overflow: hidden;
    padding: 0.25rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}
.pxt-dropdown .dropdown-item,
.pxt-dropdown button.dropdown-item {
    font-weight: 300 !important;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
}
.pxt-dropdown .dropdown-item .material-symbols-outlined {
    font-size: 1.25rem;
    opacity: 0.7;
}
.pxt-dropdown .dropdown-item:hover,
.pxt-dropdown .dropdown-item:focus {
    background: var(--pxt-tertiary-bg, rgba(0, 0, 0, 0.04));
}
.pxt-dropdown .dropdown-item.active,
.pxt-dropdown .dropdown-item:active {
    background: rgba(var(--pxt-accent), 0.25);
    color: var(--pxt-text);
}
.pxt-dropdown .dropdown-divider {
    margin: 0.25rem 0;
}

/* Header dropdowns — flush with header bottom border */
.header .pxt-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: -1px;
}
.header .pxt-dropdown .dropdown-item,
.header .pxt-dropdown button.dropdown-item {
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
    gap: 0.75rem;
    display: flex;
    align-items: center;
}
.header .pxt-dropdown .dropdown-item .material-symbols-outlined {
    font-size: 24px;
    width: 24px;
    height: 24px;
    opacity: 1;
}

/* ── 8f. Tooltip ─────────────────────────────────────────────── */
[data-tooltip] {
    position: relative;
}
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    padding: var(--pxt-tooltip-py) var(--pxt-tooltip-px);
    background: var(--pxt-tooltip-bg);
    color: var(--pxt-tooltip-color);
    border: 1px solid var(--pxt-tooltip-border);
    border-radius: var(--pxt-tooltip-radius);
    font-size: var(--pxt-tooltip-font-size);
    font-weight: var(--pxt-tooltip-weight, 500);
    letter-spacing: 0.01em;
    line-height: 1.4;
    white-space: nowrap;
    z-index: 1100;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s;
    filter: drop-shadow(var(--pxt-tooltip-shadow));
}
[data-tooltip]:hover::after {
    opacity: 1;
}

/* Tooltips inside card headers point downward */
.pxt-card-header [data-tooltip]::after,
.header [data-tooltip]::after {
    bottom: auto;
    top: calc(100% + 4px);
    transform: translateX(-50%);
}

/* ── 8g. Flash Toast ─────────────────────────────────────────── */
#pxt-ajax-toast-container {
    position: fixed;
    bottom: 4.5rem;
    right: 1.5rem;
    z-index: 1100;
    display: flex;
    flex-direction: column-reverse;
    gap: 0.5rem;
    pointer-events: none;
}

#pxt-ajax-toast-container .pxt-flash {
    position: static;
    bottom: auto;
    right: auto;
    z-index: auto;
    pointer-events: auto;
}

.pxt-flash {
    position: fixed;
    bottom: 4.5rem;
    right: 1.5rem;
    z-index: 1100;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 280px;
    max-width: 420px;
    padding: 0.85rem 1rem;
    background: var(--pxt-bg-card);
    border: 1px solid var(--pxt-border);
    border-radius: 0.75rem;
    box-shadow: 0 8px 32px rgba(0,0,0,.12);
    color: var(--pxt-text);
    font-size: 0.8125rem;
    font-weight: 500;
    transform: translateX(calc(100% + 2rem));
    opacity: 0;
    transition: transform .35s cubic-bezier(.4,0,.2,1), opacity .35s ease;
    pointer-events: none;
}
.pxt-flash.pxt-flash-show {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}
.pxt-flash-icon {
    font-size: 22px;
    flex-shrink: 0;
}
.pxt-flash-msg {
    flex: 1;
    line-height: 1.4;
}
.pxt-flash-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--pxt-text-muted);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    transition: color .15s;
}
.pxt-flash-close:hover { color: var(--pxt-text); }

/* Type colours — left accent border + icon color */
.pxt-flash-success { border-left: 4px solid #22c55e; }
.pxt-flash-success .pxt-flash-icon { color: #22c55e; }
.pxt-flash-danger  { border-left: 4px solid #ef4444; }
.pxt-flash-danger  .pxt-flash-icon { color: #ef4444; }
.pxt-flash-warning { border-left: 4px solid #f59e0b; }
.pxt-flash-warning .pxt-flash-icon { color: #f59e0b; }
.pxt-flash-info    { border-left: 4px solid #3b82f6; }
.pxt-flash-info    .pxt-flash-icon { color: #3b82f6; }

[data-bs-theme="dark"] .pxt-flash {
    box-shadow: 0 8px 32px rgba(0,0,0,.35);
}

@media (max-width: 767.98px) {
    .pxt-flash {
        left: 50%;
        right: auto;
        bottom: 1.5rem;
        min-width: 0;
        width: calc(100% - 2rem);
        max-width: 100%;
        transform: translateX(-50%) translateY(calc(100% + 2rem));
    }
    .pxt-flash.pxt-flash-show {
        transform: translateX(-50%) translateY(0);
    }
}

/* ── 8h. Wizard ──────────────────────────────────────────────── */
/* Wizard steps (no Bootstrap equivalent) */
.pxt-wizard-steps { display: flex; gap: 0; margin-bottom: 1.5rem; }
.pxt-wizard-step { flex: 1; text-align: center; padding: 0.6rem 0.5rem; font-size: .8rem; font-weight: 600; color: var(--pxt-text-muted); border-bottom: 2px solid var(--pxt-border); transition: color .2s, border-color .2s; }
.pxt-wizard-step.active { color: var(--pxt-primary); border-bottom-color: var(--pxt-primary); }
.pxt-wizard-step.done { color: var(--pxt-success, #22c55e); border-bottom-color: var(--pxt-success, #22c55e); }
.pxt-wizard-panel { display: none; }
.pxt-wizard-panel.active { display: block; }

/* ================================================================
   9. UTILITIES
   ================================================================ */

/* ── 9a. Spacing ─────────────────────────────────────────────── */
.pxt-px-2 { padding-right: 1rem;  padding-left:  1rem; }
@media (max-width: 767.98px) {
    .pxt-px-2 { padding-right: 1.1rem; padding-left: 1.1rem; }
}
.pxt-px-3 { padding-right: 1.75rem;  padding-left:  1.75rem; }
@media (max-width: 991.98px) {
    .pxt-px-3 { padding-right: 1rem; padding-left: 1rem; }
}
.pxt-px-4 { padding-right: 1.25rem;  padding-left:  1.25rem; }
.pxt-pb-3 { padding-bottom: 1rem; }
.pxt-py-4 { padding-top: 1.25rem;    padding-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }

/* ── 9b. Borders & shapes ────────────────────────────────────── */
.pxt-border-bottom { border-bottom: 1px solid var(--pxt-border); }
.rounded-md { border-radius: 0.375rem; }

/* ── 9c. Typography helpers ──────────────────────────────────── */
.text-xs     { font-size: 0.75rem; line-height: 1rem; }
.font-medium { font-weight: 500; }

/* Page headers */
.pxt-page-title    { letter-spacing: -.02em; }
.pxt-page-subtitle { color: var(--pxt-text-muted); }

/* ── 9d. Colors (text, bg, dots, borders) ────────────────────── */
/* Text colours */
.text-violet { color: var(--pxt-violet); }
.text-blue   { color: var(--pxt-blue); }
.text-green  { color: var(--pxt-green); }
.text-amber  { color: var(--pxt-amber); }
.text-lime   { color: var(--pxt-lime); }

/* Background subtle */
.bg-violet-subtle { background-color: var(--pxt-violet-subtle); }
.bg-blue-subtle   { background-color: var(--pxt-blue-subtle); }
.bg-green-subtle  { background-color: var(--pxt-green-subtle); }
.bg-amber-subtle  { background-color: var(--pxt-amber-subtle); }

/* Force dark text on subtle bg for contrast in dark mode */
.bg-violet-subtle,
.bg-blue-subtle,
.bg-green-subtle,
.bg-amber-subtle {
    color: #1a1a2e;
}
.bg-violet-subtle .text-body-secondary,
.bg-blue-subtle .text-body-secondary,
.bg-green-subtle .text-body-secondary,
.bg-amber-subtle .text-body-secondary {
    color: rgba(26, 26, 46, 0.6) !important;
}

/* Dot colours */
.dot-violet { background-color: var(--pxt-violet); }
.dot-blue   { background-color: var(--pxt-blue); }
.dot-amber  { background-color: var(--pxt-amber); }
.dot-green  { background-color: var(--pxt-green); }
.dot-fb     { background-color: #1877f2; }
.dot-tw     { background-color: #1da1f2; }
.dot-li     { background-color: #0a66c2; }

/* Subtle backgrounds (hardcoded fallbacks) */
.bg-sky-subtle    { background: rgba(14,165,233,.12); }
.bg-fb-subtle     { background: rgba(59,89,152,.12); }
.bg-tw-subtle     { background: rgba(0,172,237,.12); }
.bg-li-subtle     { background: rgba(72,117,180,.12); }

/* Subtle borders */
.border-blue-subtle   { border: 1px solid rgba(96,199,246,.2); }
.border-violet-subtle { border: 1px solid rgba(139,92,246,.2); }
.border-amber-subtle  { border: 1px solid rgba(245,158,11,.2); }
.border-green-subtle  { border: 1px solid rgba(16,185,129,.2); }

/* Brand text colours */
.text-sky    { color: #0ea5e9; }
.text-fb     { color: #3b5998; }
.text-tw     { color: #00aced; }
.text-li     { color: #4875b4; }

/* Brand solid dots */
.dot-sky    { background: #0ea5e9; }
.dot-fb     { background: #3b5998; }
.dot-tw     { background: #00aced; }
.dot-li     { background: #4875b4; }

/* ── 9e. Badges (pxt-badge) ──────────────────────────────────── */
.pxt-badge {
    display: inline-block;
    padding: .25em .7em;
    font-size: .75rem;
    font-weight: 600;
    line-height: 1;
    border-radius: 999px;
    white-space: nowrap;
    color: var(--pxt-badge-color);
    background-color: var(--pxt-badge-bg);
    border: 1px solid var(--pxt-badge-border);
}
.pxt-badge-danger  { --pxt-badge-color: #ef4444; --pxt-badge-bg: rgba(239,68,68,.12); --pxt-badge-border: rgba(239,68,68,.25); }
.pxt-badge-primary { --pxt-badge-color: #3b82f6; --pxt-badge-bg: rgba(59,130,246,.12); --pxt-badge-border: rgba(59,130,246,.25); }
.pxt-badge-info    { --pxt-badge-color: #06b6d4; --pxt-badge-bg: rgba(6,182,212,.12);  --pxt-badge-border: rgba(6,182,212,.25); }
.pxt-badge-success { --pxt-badge-color: #22c55e; --pxt-badge-bg: rgba(34,197,94,.12);  --pxt-badge-border: rgba(34,197,94,.25); }
.pxt-badge-warning { --pxt-badge-color: #f59e0b; --pxt-badge-bg: rgba(245,158,11,.12); --pxt-badge-border: rgba(245,158,11,.25); }
.pxt-badge-muted   { --pxt-badge-color: #9ca3af; --pxt-badge-bg: rgba(156,163,175,.12); --pxt-badge-border: rgba(156,163,175,.25); }

/* ── 9f. KPI & charts ────────────────────────────────────────── */
.pxt-section-label     { font-size: 1rem; letter-spacing: .05em; }
.pxt-kpi-label         { font-size: .68rem; letter-spacing: .07em; }
.pxt-kpi-icon-badge    { width: 64px; height: 64px; }
.pxt-kpi-icon-badge-md { width: 40px; height: 40px; }
.pxt-kpi-icon-badge-sm { width: 36px; height: 36px; }

/* Chart containers */
.pxt-chart-wrap       { height: 260px; position: relative; }
.pxt-chart-donut-wrap { height: 190px; width: 190px; position: relative; }

/* ── 9g. Progress helpers ────────────────────────────────────── */
/* Progress bar heights */
.progress-h4 { height: 4px; }
.progress-h5 { height: 5px; }
.progress-h6 { height: 6px; }
.progress-h8 { height: 8px; }

.pxt-progress-val    { font-size: .8rem; min-width: 32px; }
.pxt-progress-val-sm { font-size: .8rem; min-width: 30px; }
.pxt-progress-cell   { min-width: 100px; }
.pxt-progress-cell-lg { min-width: 120px; }

/* ── 9h. Table helpers ───────────────────────────────────────── */
.pxt-th-sm     { font-size: .78rem; }
.pxt-th-avatar { width: 56px; }
.pxt-supplier-logo-cell {
  text-align: center;
  vertical-align: middle;
}
.pxt-supplier-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 4px;
  border-radius: 4px;
  background: var(--pxt-bg-body, #f0f0f0);
}
.pxt-supplier-logo {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}
.pxt-avatar-profile {
  width: 8rem;
  height: 8rem;
}
.pxt-td-center   { text-align: center; }
.pxt-td-name     { font-size: .85rem; }
.pxt-td-sub      { font-size: .75rem; }
.pxt-td-xs       { font-size: .7rem; }
.pxt-td-activity { font-size: .72rem; }
.pxt-td-value    { font-size: .82rem; }
.pxt-td-actions  { white-space: nowrap; }

/* ── 9i. Button helpers ──────────────────────────────────────── */
.pxt-btn-group-text { font-size: .72rem; }
.pxt-btn-link-sm    { font-size: .75rem; }

/* ── 9j. Accent utilities ────────────────────────────────────── */
/* Palette-aware accent utilities */
.pxt-text-accent          { color: var(--pxt-accent-hex); }
.pxt-bg-accent-subtle     { background: rgba(var(--pxt-accent), .12); }
.pxt-border-accent-subtle { border: 1px solid rgba(var(--pxt-accent), .2); }
.pxt-dot-accent           { background: var(--pxt-accent-hex); }

/* ── 9k. Misc (overflow, flags, legends, status dots) ────────── */
/* Overflow */
.overflow-x-auto { overflow-x: auto; }

/* Occupancy */
.pxt-occ-pct         { font-size: .9rem; min-width: 36px; text-align: end; }
.pxt-occ-total-badge { background: rgba(var(--pxt-accent),.13); color: var(--pxt-accent-hex); font-size: .9rem; }

/* Flag emoji */
.pxt-flag-emoji { font-size: 1.4rem; line-height: 1; font-family: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", sans-serif; }

/* Legend swatches */
.pxt-legend-color    { width: 9px; height: 9px; flex-shrink: 0; }
.pxt-legend-color-sm { width: 8px; height: 8px; flex-shrink: 0; }

/* Status dot */
.pxt-status-dot { width: 5px; height: 5px; display: inline-block; border-radius: 50%; background: currentColor; }

/* ================================================================
   10. PAGES
   ================================================================ */

/* ── 10a. Login ──────────────────────────────────────────────── */

/* Layout */
.login-wrapper {
    display: flex;
    height: 100vh;
}

/* Left — branding */
.login-left {
    flex: 1;
    background: #0d0818;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.logo-container {
    position: relative;
    z-index: 1;
    text-align: center;
}
.brand-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-decoration: none;
}
.brand-logo-image {
    width: min(520px, 85vw);
    height: auto;
    display: block;
}

/* Right — form */
.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 15, 0.97);
    padding: 40px;
}
.login-box {
    width: 100%;
    max-width: 440px;
}

/* Language switcher */
.language-switcher {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
}
.language-option {
    font-size: 14px;
    font-weight: 600;
    color: #9CA3AF;
    text-decoration: none;
    padding: 4px 8px;
    border: 1px solid rgba(var(--pxt-accent), 0.3);
    border-radius: 6px;
    transition: all 0.3s ease;
}
.language-option:hover { color: #FFFFFF; border-color: #60C7F6; }
.language-option.active {
    color: #FFFFFF;
    border-color: #60C7F6;
    background: rgba(96, 199, 246, 0.12);
}

/* Headings */
.login-heading {
    font-family: 'Orbitron', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 4px;
}
.login-subheading {
    font-size: 15px;
    color: #9CA3AF;
    margin-bottom: 40px;
    line-height: 1.6;
}

/* Form */
.login-form-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.login-form-main .login-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.input-label {
    font-size: 14px;
    font-weight: 500;
    color: #FFFFFF;
}
.input-field {
    width: 100%;
    padding: 14px 16px;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    color: #FFFFFF;
    font-size: 15px;
    transition: all 0.3s ease;
}
.input-field::placeholder { color: #6B7280; }
.input-field:focus {
    outline: none;
    border-color: #60C7F6;
    box-shadow: 0 0 0 3px rgba(96, 199, 246, 0.15);
    background: rgba(30, 41, 59, 0.6);
}

/* Password field wrapper + visibility toggle */
.input-field-wrap {
    position: relative;
}
.input-field-wrap .input-field {
    padding-right: 44px;
}
.pwd-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6B7280;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
}
.pwd-toggle:hover { color: #60C7F6; }
.pwd-toggle .material-symbols-outlined { font-size: 20px; }

/* Keep me logged in + Forgot password row */
.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}
.keep-logged-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #9ca3af;
    cursor: pointer;
}
.keep-logged-cb {
    width: 16px;
    height: 16px;
    accent-color: #8B5CF6;
    cursor: pointer;
}
.forgot-link {
    font-size: 13px;
    color: #60C7F6;
    text-decoration: none;
    transition: color 0.3s ease;
}
.forgot-link:hover { color: #8B5CF6; text-decoration: underline; }

/* Submit button */
.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #8B5CF6, #60C7F6);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}
.btn-submit:hover  { box-shadow: 0 0 30px rgba(139, 92, 246, 0.6); transform: translateY(-2px); }
.btn-submit:active { transform: translateY(0); }

/* Terms & footer */
.terms-text {
    font-size: 13px;
    color: #9CA3AF;
    text-align: center;
    margin-top: -8px;
    line-height: 1.6;
}

/* OAuth divider + provider buttons */
.oauth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0 16px;
    color: #9CA3AF;
    font-size: 13px;
}
.oauth-divider::before,
.oauth-divider::after {
    content: '';
    flex: 1;
    border-top: 1px solid rgba(255,255,255,0.12);
}
.oauth-divider span { padding: 0 12px; }
.oauth-buttons {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-bottom: 8px;
}
.btn-oauth {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(255,255,255,0.15);
    color: #E5E7EB;
    background: rgba(255,255,255,0.06);
}
.btn-oauth:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
    text-decoration: none;
}
.btn-oauth img { flex-shrink: 0; width: 18px; height: 18px; }

.login-footer-text { margin-top: 40px; text-align: center; }
.login-footer-text p {
    font-size: 13px;
    color: #6B7280;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.5px;
}
.login-footer-text .terms-text {
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    margin-top: 0;
    margin-bottom: 6px;
    letter-spacing: 0;
}

/* Theme toggle switch */
#login-theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 100;
}
#login-theme-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
#login-theme-toggle label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
    width: 56px;
    height: 28px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.3);
    background: rgba(255,255,255,.12);
    cursor: pointer;
    position: relative;
    transition: background .2s, border-color .2s;
}
#login-theme-toggle label::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: transform .2s;
    box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
#login-theme-toggle input:checked + label {
    background: var(--pxt-accent-hex);
    border-color: var(--pxt-accent-hex);
}
#login-theme-toggle input:checked + label::after {
    transform: translateX(28px);
}
#login-theme-toggle label .material-symbols-outlined {
    font-size: 13px;
    color: #fff;
    user-select: none;
    z-index: 1;
}
#login-theme-toggle .toggle-icon-dark  { order: 1; }
#login-theme-toggle .toggle-icon-light { order: 2; }

/* Responsive */
@media (max-width: 1024px) {
    .login-wrapper { flex-direction: column; }
    .login-left { flex: 0; min-height: 200px; padding: 40px; }
    .brand-logo-image { width: min(380px, 80vw); }
    .brand-name { font-size: 32px; }
    .login-right { flex: 1; }
}
@media (max-width: 640px) {
    .login-wrapper  { height: auto; min-height: 100vh; overflow: visible; }
    .login-left     { min-height: 110px; padding: 20px; }
    .brand-logo-image { width: min(160px, 48vw); }
    .login-right    { padding: 24px; }
    .login-heading  { font-size: 24px; }
    .login-subheading { font-size: 14px; }
    .input-field    { padding: 12px 14px; }
    .btn-submit     { padding: 14px; }
}
body.pxt-auth { overflow: auto; height: auto; }

/* ── 10b. Login — light mode overrides ───────────────────────── */
html:not([data-bs-theme="dark"]) .login-left  { background: #150a24; }
html:not([data-bs-theme="dark"]) .login-right { background: rgba(245, 245, 250, 0.97); }
html:not([data-bs-theme="dark"]) .login-heading,
html:not([data-bs-theme="dark"]) .login-subheading { color: #1a1a2e; }
html:not([data-bs-theme="dark"]) .input-label { color: #374151; }
html:not([data-bs-theme="dark"]) .input-field {
    background: #fff;
    border-color: #d1d5db;
    color: #111827;
}
html:not([data-bs-theme="dark"]) .input-field::placeholder { color: #9ca3af; }
html:not([data-bs-theme="dark"]) .language-option { color: #6b7280; border-color: rgba(88,86,214,.3); }
html:not([data-bs-theme="dark"]) .language-option:hover,
html:not([data-bs-theme="dark"]) .language-option.active { color: #5856d6; border-color: #5856d6; }
html:not([data-bs-theme="dark"]) .forgot-link { color: #5856d6; }
html:not([data-bs-theme="dark"]) .keep-logged-label { color: #6b7280; }
html:not([data-bs-theme="dark"]) .pwd-toggle { color: #9ca3af; }
html:not([data-bs-theme="dark"]) .terms-text { color: #6b7280; }
html:not([data-bs-theme="dark"]) .oauth-divider span { color: #6b7280; background: #f5f5fa; }
html:not([data-bs-theme="dark"]) .oauth-divider::before,
html:not([data-bs-theme="dark"]) .oauth-divider::after { border-top-color: rgba(0,0,0,0.15); }
html:not([data-bs-theme="dark"]) .btn-oauth {
    background: #fff;
    border-color: #d1d5db;
    color: #374151;
}
html:not([data-bs-theme="dark"]) .btn-oauth:hover { background: #f9fafb; }
html:not([data-bs-theme="dark"]) #login-theme-toggle label {
    background: rgba(0,0,0,.1);
    border-color: rgba(0,0,0,.2);
}
html:not([data-bs-theme="dark"]) #login-theme-toggle label .material-symbols-outlined { color: #374151; }
html:not([data-bs-theme="dark"]) #login-theme-toggle input:checked + label .material-symbols-outlined { color: #fff; }

/* ================================================================
   11. VENDOR OVERRIDES
   ================================================================ */

/* ── 11a. Flatpickr ──────────────────────────────────────────── */
.flatpickr-calendar {
    background: var(--pxt-bg-card) !important;
}
.flatpickr-months,
.flatpickr-months .flatpickr-month,
span.flatpickr-weekday,
.flatpickr-weekdays {
    background: transparent !important;
}
.flatpickr-months {
    display: flex !important;
    align-items: center !important;
}
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    position: static !important;
    display: flex !important;
    align-items: center !important;
    height: auto !important;
    padding: 4px 8px !important;
}
.flatpickr-current-month .flatpickr-monthDropdown-months {
    background: transparent !important;
    color: var(--pxt-form-input-color) !important;
    border: none !important;
    font-size: 1.1rem !important;
    padding: 2px 4px !important;
    -webkit-appearance: none;
    appearance: none;
}
.flatpickr-current-month .flatpickr-monthDropdown-months option {
    background: var(--pxt-bg-card);
    color: var(--pxt-text);
}
.flatpickr-current-month input.cur-year {
    background: transparent !important;
    color: var(--pxt-form-input-color) !important;
    border: none !important;
    font-size: 1.1rem !important;
    padding: 2px 4px !important;
    text-align: center !important;
}
.numInputWrapper:hover {
    background: transparent !important;
}
.numInputWrapper span {
    opacity: 0;
    transition: opacity 0.2s;
}
.numInputWrapper:hover span {
    opacity: 1;
}
.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: var(--pxt-accent-hex, #8B5CF6) !important;
    border-color: var(--pxt-accent-hex, #8B5CF6) !important;
    color: #fff !important;
}
.flatpickr-day:hover {
    background: rgba(var(--pxt-accent, 139,92,246), 0.2) !important;
    border-color: transparent !important;
}
.flatpickr-day.today {
    border-color: var(--pxt-accent-hex, #8B5CF6) !important;
}
.pxt-flatpickr-toggle {
    background: var(--pxt-form-input-bg);
    border-color: var(--pxt-form-input-border);
    color: var(--pxt-text);
    cursor: pointer;
}

/* ================================================================
   12. COMPLIANCE UTILITIES — replacing inline styles
   ================================================================ */

/* ── Header title block ──────────────────────────────────────── */
.pxt-header-title-wrap { flex: 1 1 0; min-width: 0; }
.pxt-header-title      { font-size: 1.275rem; font-weight: 400; line-height: 1.2; }
.pxt-header-subtitle   { line-height: 1.3; }

/* ── User dropdown ───────────────────────────────────────────── */
.pxt-dropdown-user { min-width: 14rem; }

/* ── Flash close icon ────────────────────────────────────────── */
.pxt-flash-close .material-symbols-outlined { font-size: 18px; }

/* ── Impersonation banner overrides ──────────────────────────── */
.impersonation-stop-form { display: inline; margin-left: auto; }
.impersonation-stop-btn  {
    background: none; border: none; color: #fff; cursor: pointer;
    display: inline-flex; align-items: center; gap: 4px;
    font-weight: 600; font-size: .85rem; padding: 4px 8px;
    border-radius: 4px; transition: background .2s;
}
.impersonation-stop-btn:hover { background: rgba(255,255,255,.15); }
.impersonation-stop-btn .material-symbols-outlined { font-size: 1.1rem; }

/* ── Custom select hidden input ──────────────────────────────── */
.pxt-cs-hidden {
    position: absolute; width: 0; height: 0; overflow: hidden;
    border: 0; padding: 0; margin: 0; opacity: 0; pointer-events: none;
}

/* ── Help page layout ────────────────────────────────────────── */
.help-page-layout    { height: calc(100vh - 56px - 40px); overflow: hidden; }
.help-nav-sidebar    { width: 240px; overflow-y: auto; background: var(--pxt-bg-card); }
.help-nav-title      { font-size: 0.78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--pxt-text-muted); }
.help-nav-group      { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--pxt-text-muted); opacity: .6; }
.help-content-inner  { max-width: 780px; }

/* ── Icon size utilities ─────────────────────────────────────── */
.pxt-icon-1x      { font-size: 1.1rem; }
.pxt-icon-1-25x   { font-size: 1.25rem; }
.pxt-icon-1-5x    { font-size: 1.5rem; }
.pxt-icon-1-75x   { font-size: 1.75rem; }
.pxt-icon-2x      { font-size: 2.0rem; }

/* ── Action button muted ─────────────────────────────────────── */
.pxt-btn-muted     { color: var(--pxt-text-muted); }

/* ── Dropdown inline form ────────────────────────────────────── */
.pxt-dropdown-form { margin: 0; }

/* ── Table empty-state row ───────────────────────────────────── */
.pxt-table-empty-state { text-align: center; color: var(--pxt-text-muted); padding: 2rem; }

/* ── Table name link ─────────────────────────────────────────── */
.pxt-table-name-link { text-decoration: none; color: inherit; font-weight: 600; }

/* ── Username sub-text ───────────────────────────────────────── */
.pxt-td-username   { font-size: .75rem; color: var(--pxt-text-muted); }

/* ── Small badge ─────────────────────────────────────────────── */
.pxt-badge-xs      { font-size: .65rem; }

/* ── Avatar crop modal ───────────────────────────────────────── */
.pxt-avatar-crop-wrap { max-height: 400px; overflow: hidden; }
.pxt-avatar-crop-img  { display: block; max-width: 100%; }

/* ── Dashboard chart container ───────────────────────────────── */
.pxt-chart-container { position: relative; height: 260px; }

/* ── Auth pages — back link ──────────────────────────────────── */
.pxt-auth-back-link { text-align: center; margin-top: 12px; }

/* ── Suppliers table column widths ───────────────────────────── */
.pxt-th-logo   { width: 60px; }
.pxt-th-id     { width: 100px; }
.pxt-th-status { width: 90px; }
.pxt-th-date   { width: 120px; }

/* ── Profile text-transform ──────────────────────────────────── */
.pxt-text-uppercase { text-transform: uppercase; }

/* ── Settings page ──────────────────────────────────────────── */
.pxt-valign-text-bottom { vertical-align: text-bottom; }
.pxt-ai-card-header { gap: 0.75rem; }
.pxt-ai-provider-label { font-size: 0.95rem; line-height: 1.2; }
.pxt-text-xs { font-size: 0.75rem; }
.pxt-text-xxs { font-size: 0.7rem; }
.pxt-icon-1-15x { font-size: 1.15rem; }
.pxt-ai-usage-link { color: var(--pxt-text-muted); line-height: 1; flex-shrink: 0; }
.pxt-icon-icecat { font-size: 1.4rem; color: #e84f1c; }
.pxt-th-lang-drag { width: 40px; }
.pxt-th-lang-active { width: 60px; }
.pxt-th-lang-quarter { width: 25%; }
.pxt-cursor-grab { cursor: grab; }
.pxt-icon-drag { font-size: 18px; opacity: .5; vertical-align: middle; }
.pxt-flag-img { border-radius: 2px; vertical-align: middle; }
.pxt-th-info-label { width: 40%; }

/* ── Users page helpers ─────────────────────────────────────── */
.pxt-cursor-pointer { cursor: pointer; }
.pxt-text-095       { font-size: 0.95rem; }
.pxt-icon-16        { font-size: 16px; }
.pxt-icon-24        { font-size: 24px; }
.pxt-th-w40         { width: 40px; }
.pxt-th-w50         { width: 50px; }
.pxt-th-w80         { width: 80px; }

/* ── Verified badge positioning (user form) ─────────────────── */
.pxt-verified-badge-wrap {
    right: .75rem;
    top: 50%;
    transform: translateY(-50%);
    line-height: 1;
}

/* ── Table: fixed layout ────────────────────────────────────── */
.pxt-table-fixed { table-layout: fixed; width: 100%; }

/* ── Table column widths (percentage) ───────────────────────── */
.pxt-col-10 { width: 10%; }
.pxt-col-60 { width: 60%; }

/* ── Log table cell styles ──────────────────────────────────── */
.pxt-td-timestamp { font-weight: 400; color: var(--pxt-text-muted); white-space: nowrap; }
.pxt-td-normal    { font-weight: 400; }
.pxt-td-bold      { font-weight: 600; }
.pxt-td-muted     { font-weight: 400; color: var(--pxt-text-muted); }
.pxt-td-message   { font-weight: 400; word-break: break-all; overflow-wrap: anywhere; white-space: pre-wrap; }

/* ── Modal z-index above default ────────────────────────────── */
.pxt-modal-above { z-index: 1055; }

/* ── Wizard navigation buttons ──────────────────────────────── */
.pxt-wizard-btn-muted   { color: var(--pxt-text-muted); text-decoration: none; font-weight: 600; font-size: .85rem; }
.pxt-wizard-btn-primary { color: var(--pxt-primary); text-decoration: none; font-weight: 600; font-size: .85rem; }

/* ── Inline icon (1rem, vertically centred) ─────────────────── */
.pxt-icon-inline { font-size: 1rem; vertical-align: middle; }

/* ── Card header: subtitle span ─────────────────────────────── */
.pxt-card-title-sub { font-weight: 400; font-size: .8em; color: var(--pxt-text-muted); margin-left: .5rem; }

/* ── Locked / read-only input look ──────────────────────────── */
.pxt-input-locked { background: var(--pxt-input-bg, #f8f9fa); color: var(--pxt-text-muted); cursor: not-allowed; }

/* ── AI provider card accent + badge colours ─────────────────── */
.pxt-ai-card-anthropic { border-top: 3px solid #d97706; }
.pxt-ai-card-openai    { border-top: 3px solid #10a37f; }
.pxt-ai-card-mistral   { border-top: 3px solid #f77f00; }
.pxt-ai-card-deepseek  { border-top: 3px solid #4d6de3; }
.pxt-ai-card-groq      { border-top: 3px solid #f55036; }
.pxt-ai-card-genspark  { border-top: 3px solid #6c5ce7; }
.pxt-ai-card-azure     { border-top: 3px solid #0078d4; }
.pxt-ai-card-aws       { border-top: 3px solid #ff9900; }
.pxt-ai-card-llama     { border-top: 3px solid #0866ff; }
.pxt-ai-card-watson    { border-top: 3px solid #be95ff; }

.pxt-ai-badge-anthropic { background: #d977061a; color: #d97706; border: 1px solid #d9770640; }
.pxt-ai-badge-openai    { background: #10a37f1a; color: #10a37f; border: 1px solid #10a37f40; }
.pxt-ai-badge-mistral   { background: #f77f001a; color: #f77f00; border: 1px solid #f77f0040; }
.pxt-ai-badge-deepseek  { background: #4d6de31a; color: #4d6de3; border: 1px solid #4d6de340; }
.pxt-ai-badge-groq      { background: #f550361a; color: #f55036; border: 1px solid #f5503640; }
.pxt-ai-badge-genspark  { background: #6c5ce71a; color: #6c5ce7; border: 1px solid #6c5ce740; }
.pxt-ai-badge-azure     { background: #0078d41a; color: #0078d4; border: 1px solid #0078d440; }
.pxt-ai-badge-aws       { background: #ff99001a; color: #ff9900; border: 1px solid #ff990040; }
.pxt-ai-badge-llama     { background: #0866ff1a; color: #0866ff; border: 1px solid #0866ff40; }
.pxt-ai-badge-watson    { background: #be95ff1a; color: #be95ff; border: 1px solid #be95ff40; }

/* ── 11b. SimpleBar ──────────────────────────────────────────── */
.simplebar-content {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

/* ================================================================
   12. HELPDESK
   ================================================================ */

/* ── Stat cards (TailAdmin-inspired metric cards) ────────────── */
.hd-stat-card {
    display:        flex;
    align-items:    center;
    gap:            1rem;
    padding:        1.25rem 1.5rem;
    background:     var(--pxt-bg-card);
    border:         1px solid var(--pxt-card-border);
    border-radius:  0.75rem;
    box-shadow:     var(--pxt-shadow-xs);
}
.hd-stat-icon {
    display:         flex;
    align-items:     center;
    justify-content: center;
    width:           3rem;
    height:          3rem;
    border-radius:   0.75rem;
    flex-shrink:     0;
}
.hd-stat-icon .material-symbols-outlined { font-size: 1.5rem; }
.hd-stat-icon-primary { background: rgba(59,130,246,.12); color: #3b82f6; }
.hd-stat-icon-warning { background: rgba(245,158,11,.12); color: #f59e0b; }
.hd-stat-icon-success { background: rgba(34,197,94,.12);  color: #22c55e; }
.hd-stat-icon-danger  { background: rgba(239,68,68,.12);  color: #ef4444; }
.hd-stat-icon-info    { background: rgba(6,182,212,.12);  color: #06b6d4; }
.hd-stat-value {
    font-size:   1.75rem;
    font-weight: 700;
    line-height: 1.1;
    color:       var(--pxt-text);
}
.hd-stat-label {
    font-size:   0.8125rem;
    color:       var(--pxt-text-muted);
    margin-top:  0.125rem;
}

/* ── Filter tabs (TailAdmin-style pill tabs) ─────────────────── */
.hd-filter-tabs {
    display:      flex;
    gap:          0.375rem;
    flex-wrap:    wrap;
}
.hd-filter-tab {
    display:          inline-flex;
    align-items:      center;
    gap:              0.375rem;
    padding:          0.4375rem 1rem;
    font-size:        0.8125rem;
    font-weight:      500;
    border:           1px solid var(--pxt-border);
    border-radius:    999px;
    background:       transparent;
    color:            var(--pxt-text-muted);
    cursor:           pointer;
    transition:       all .15s;
    text-decoration:  none;
}
.hd-filter-tab:hover {
    border-color: var(--pxt-input-focus-border);
    color:        var(--pxt-text);
}
.hd-filter-tab.active {
    background:   var(--pxt-accent-hex, #3b82f6);
    border-color: var(--pxt-accent-hex, #3b82f6);
    color:        #fff;
}
.hd-filter-count {
    display:          inline-flex;
    align-items:      center;
    justify-content:  center;
    min-width:        1.375rem;
    height:           1.375rem;
    padding:          0 0.375rem;
    font-size:        0.6875rem;
    font-weight:      600;
    border-radius:    999px;
    background:       rgba(255,255,255,.2);
    line-height:      1;
}
.hd-filter-tab:not(.active) .hd-filter-count {
    background: var(--pxt-tertiary-bg);
    color:      var(--pxt-text-muted);
}

/* ── Ticket list table tweaks ────────────────────────────────── */
.hd-ticket-subject {
    font-weight:     500;
    color:           var(--pxt-text);
    text-decoration: none;
}
.hd-ticket-subject:hover {
    color:           var(--pxt-accent-hex, #3b82f6);
    text-decoration: underline;
}
.hd-ticket-id {
    font-size:   0.8125rem;
    font-weight: 600;
    color:       var(--pxt-text-muted);
}
.hd-priority-dot {
    display:       inline-block;
    width:         8px;
    height:        8px;
    border-radius: 50%;
    margin-right:  0.375rem;
}
.hd-priority-high     { background: #ef4444; }
.hd-priority-medium   { background: #f59e0b; }
.hd-priority-low      { background: #22c55e; }
.hd-priority-critical { background: #7c3aed; }

/* ── Ticket detail: conversation thread ──────────────────────── */
.hd-thread {
    display:        flex;
    flex-direction: column;
    gap:            1.5rem;
}
.hd-message {
    display:  flex;
    gap:      1rem;
    position: relative;
}
.hd-message-avatar {
    width:         2.5rem;
    height:        2.5rem;
    border-radius: 50%;
    flex-shrink:   0;
    object-fit:    cover;
}
.hd-message-avatar-placeholder {
    display:          flex;
    align-items:      center;
    justify-content:  center;
    width:            2.5rem;
    height:           2.5rem;
    border-radius:    50%;
    flex-shrink:      0;
    font-size:        0.875rem;
    font-weight:      600;
    color:            #fff;
    text-transform:   uppercase;
}
.hd-message-bubble {
    flex:          1;
    min-width:     0;
    padding:       1rem 1.25rem;
    border-radius: 0.75rem;
    border:        1px solid var(--pxt-card-border);
    background:    var(--pxt-bg-card);
}
.hd-message-staff .hd-message-bubble {
    background:   rgba(59,130,246,.04);
    border-color: rgba(59,130,246,.15);
}
.hd-message-header {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    margin-bottom:   0.5rem;
    gap:             0.5rem;
}
.hd-message-author {
    font-weight: 600;
    font-size:   0.875rem;
    color:       var(--pxt-text);
}
.hd-message-role {
    font-size:     0.6875rem;
    font-weight:   500;
    padding:       0.125rem 0.5rem;
    border-radius: 999px;
    margin-left:   0.375rem;
}
.hd-message-role-staff   { background: rgba(59,130,246,.12); color: #3b82f6; }
.hd-message-role-customer { background: rgba(156,163,175,.12); color: #6b7280; }
.hd-message-time {
    font-size: 0.75rem;
    color:     var(--pxt-text-muted);
}
.hd-message-body {
    font-size:   0.875rem;
    line-height: 1.65;
    color:       var(--pxt-text);
}
.hd-message-body p { margin-bottom: 0.5rem; }
.hd-message-body p:last-child { margin-bottom: 0; }

/* ── Ticket detail: sidebar info panel ───────────────────────── */
.hd-detail-row {
    display:         flex;
    justify-content: space-between;
    align-items:     center;
    padding:         0.625rem 0;
    border-bottom:   1px solid var(--pxt-border);
    font-size:       0.8125rem;
}
.hd-detail-row:last-child { border-bottom: none; }
.hd-detail-label {
    color:       var(--pxt-text-muted);
    font-weight: 500;
}
.hd-detail-value {
    font-weight: 600;
    color:       var(--pxt-text);
}

/* ── Reply box ───────────────────────────────────────────────── */
.hd-reply-box {
    border:        1px solid var(--pxt-card-border);
    border-radius: 0.75rem;
    background:    var(--pxt-bg-card);
    overflow:      hidden;
}
.hd-reply-box textarea {
    width:      100%;
    border:     none;
    padding:    1rem 1.25rem;
    font-size:  0.875rem;
    color:      var(--pxt-text);
    background: transparent;
    resize:     vertical;
    min-height: 120px;
}
.hd-reply-box textarea:focus { outline: none; }
.hd-reply-toolbar {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    padding:         0.75rem 1.25rem;
    border-top:      1px solid var(--pxt-border);
    gap:             0.5rem;
}
.hd-reply-actions {
    display:     flex;
    align-items: center;
    gap:         0.5rem;
}

/* ── Agent cards ─────────────────────────────────────────────── */
.hd-agent-card {
    display:        flex;
    flex-direction: column;
    align-items:    center;
    text-align:     center;
    padding:        1.5rem;
    background:     var(--pxt-bg-card);
    border:         1px solid var(--pxt-card-border);
    border-radius:  0.75rem;
    box-shadow:     var(--pxt-shadow-xs);
    transition:     box-shadow .15s, transform .15s;
}
.hd-agent-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
    transform:  translateY(-2px);
}
.hd-agent-avatar {
    width:         4rem;
    height:        4rem;
    border-radius: 50%;
    object-fit:    cover;
    margin-bottom: 0.75rem;
}
.hd-agent-avatar-placeholder {
    display:          flex;
    align-items:      center;
    justify-content:  center;
    width:            4rem;
    height:           4rem;
    border-radius:    50%;
    margin-bottom:    0.75rem;
    font-size:        1.25rem;
    font-weight:      600;
    color:            #fff;
    text-transform:   uppercase;
}
.hd-agent-name {
    font-weight:   600;
    font-size:     0.9375rem;
    color:         var(--pxt-text);
    margin-bottom: 0.125rem;
}
.hd-agent-role {
    font-size:     0.8125rem;
    color:         var(--pxt-text-muted);
    margin-bottom: 1rem;
}
.hd-agent-stats {
    display:         flex;
    gap:             1.5rem;
    margin-top:      auto;
    padding-top:     1rem;
    border-top:      1px solid var(--pxt-border);
    width:           100%;
    justify-content: center;
}
.hd-agent-stat-value {
    font-size:   1.125rem;
    font-weight: 700;
    color:       var(--pxt-text);
    line-height: 1;
}
.hd-agent-stat-label {
    font-size:  0.6875rem;
    color:      var(--pxt-text-muted);
    margin-top: 0.25rem;
}

/* ── Reports: time metric cards ──────────────────────────────── */
.hd-time-card {
    display:        flex;
    flex-direction: column;
    padding:        1.5rem;
    background:     var(--pxt-bg-card);
    border:         1px solid var(--pxt-card-border);
    border-radius:  0.75rem;
    box-shadow:     var(--pxt-shadow-xs);
}
.hd-time-value {
    font-size:   1.5rem;
    font-weight: 700;
    color:       var(--pxt-text);
    line-height: 1.2;
}
.hd-time-label {
    font-size:  0.8125rem;
    color:      var(--pxt-text-muted);
    margin-top: 0.25rem;
}
.hd-time-trend {
    display:     inline-flex;
    align-items: center;
    gap:         0.25rem;
    font-size:   0.75rem;
    font-weight: 600;
    margin-top:  0.75rem;
}
.hd-time-trend-up   { color: #22c55e; }
.hd-time-trend-down { color: #ef4444; }

/* ── Satisfaction meter ──────────────────────────────────────── */
.hd-satisfaction {
    display:     flex;
    align-items: center;
    gap:         0.375rem;
}
.hd-satisfaction-bar {
    flex:          1;
    height:        6px;
    border-radius: 999px;
    background:    var(--pxt-tertiary-bg);
    overflow:      hidden;
}
.hd-satisfaction-fill {
    height:        100%;
    border-radius: 999px;
    background:    #22c55e;
}
.hd-satisfaction-pct {
    font-size:   0.75rem;
    font-weight: 600;
    color:       var(--pxt-text);
    min-width:   2.5rem;
    text-align:  right;
}

/* ================================================================
   13. COLOR PALETTE PAGE
   ================================================================ */

/* Icon-only button */
.btn-icon {
    display:     inline-flex;
    align-items: center;
    justify-content: center;
    width:       2.25rem;
    height:      2.25rem;
    padding:     0;
    line-height: 1;
}
.btn-icon .material-symbols-outlined {
    font-size: 1.25rem;
}

/* Preset buttons */
.palette-preset-btn {
    position:       relative;
    display:        flex;
    flex-direction: column;
    align-items:    center;
    flex:           1 1 0;
    min-width:      0;
    padding:        0;
    border:         2px solid var(--pxt-border);
    border-radius:  0.5rem;
    background:     var(--pxt-bg-card);
    cursor:         pointer;
    overflow:       hidden;
    transition:     border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.palette-preset-btn:hover {
    border-color: var(--bs-primary);
    box-shadow:   0 2px 8px rgba(0,0,0,0.10);
    transform:    translateY(-1px);
}
.palette-preset-btn.active {
    border-color: var(--bs-primary);
    box-shadow:   0 0 0 2px rgba(var(--pxt-accent), 0.35);
}
.palette-preset-gradient {
    display:       block;
    width:         100%;
    height:        3.5rem;
    border-radius: 0.375rem 0.375rem 0 0;
    background:    var(--pxt-bg-card);
    transition:    background 0.2s;
}
.palette-preset-content {
    display:        flex;
    flex-direction: column;
    align-items:    center;
    gap:            0.125rem;
    padding:        0.5rem 0.625rem;
}
.palette-preset-label {
    font-size:   0.8125rem;
    font-weight: 400;
    color:       var(--pxt-text);
    white-space: nowrap;
    transition:  color 0.2s;
}
/* Dark mode overrides for palette preset card */
[data-bs-theme="dark"] .palette-preset-btn {
    background: var(--pxt-bg-card);
    border-color: var(--pxt-border);
}
[data-bs-theme="dark"] .palette-preset-gradient {
    background: var(--pxt-bg-card);
}
[data-bs-theme="dark"] .palette-preset-label {
    color: var(--pxt-text);
}

/* Color picker + hex input row */
/* Pantone-card style: colour square + white info box */
.palette-swatch-card {
    display:       flex;
    align-items:   stretch;
    gap:           0;
    border:        1px solid #e5e7eb;
    border-radius: 0.375rem;
    overflow:      hidden;
}
.palette-swatch-info,
.palette-swatch-codes {
    flex:           1 1 0;
    min-width:      0;
}
.palette-swatch-info {
    display:        flex;
    flex-direction: column;
    justify-content: center;
    gap:            1px;
    padding:        0.375rem 0.5rem;
    background:     #fff;
    border-left:    1px solid #e5e7eb;
}
.palette-color-info {
    font-size:     0.6875rem;
    font-family:   monospace;
    line-height:   1.35;
    text-align:    left;
    white-space:   nowrap;
}
.palette-color-info .palette-info-name {
    color:         #6b7280;
    text-transform: capitalize;
}
.palette-color-info .palette-info-pantone {
    color:         #6b7280;
}
.palette-color-info .palette-info-pantone strong {
    color:         #1f2937;
}

.palette-reset-single {
    color:   #000;
    opacity: 0.35;
}
.palette-reset-single:hover {
    color:   #000;
    opacity: 1;
}
[data-bs-theme="dark"] .palette-reset-single {
    color: #fff;
}
[data-bs-theme="dark"] .palette-reset-single:hover {
    color: #fff;
}
.palette-reset-single {
    width:  2.25rem;
    height: 2.25rem;
}
.palette-reset-single .material-symbols-outlined {
    font-size: 1.25rem;
}
.palette-color-input {
    width:         2.25rem;
    height:        2.25rem;
    padding:       0.125rem;
    border:        1px solid var(--pxt-input-border);
    border-radius: 0.5rem;
    background:    transparent;
    cursor:        pointer;
    flex-shrink:   0;
}
.palette-color-input.palette-swatch {
    width:         3.5rem;
    height:        3.5rem;
    border:        none;
    border-radius: 0;
    padding:       0;
    flex-shrink:   0;
}
.palette-color-input.palette-swatch::-webkit-color-swatch {
    border:        none;
    border-radius: 0;
}
.palette-color-input.palette-swatch::-moz-color-swatch {
    border:        none;
    border-radius: 0;
}
.palette-color-input::-webkit-color-swatch-wrapper { padding: 0; }
.palette-color-input::-webkit-color-swatch { border: none; border-radius: 0.375rem; }
.palette-color-input::-moz-color-swatch { border: none; border-radius: 0.375rem; }
.palette-swatch-codes {
    display:        flex;
    flex-direction: column;
    justify-content: center;
    gap:            1px;
    padding:        0.375rem 0.5rem;
    background:     #fff;
    font-size:      0.6875rem;
    font-family:    monospace;
    line-height:    1.4;
    border-left:    1px solid #e5e7eb;
    white-space:    nowrap;
}
.palette-swatch-codes span {
    color: #6b7280;
}
.palette-swatch-codes strong {
    color:       #1f2937;
    font-weight: 600;
}
.palette-code-label {
    display:      inline-block;
    width:        2.5rem;
}

/* Palette page — fill viewport, no main scrollbar */
.palette-page-body {
    overflow: hidden;
}
.palette-page-body .container-fluid {
    overflow: hidden;
}
.palette-page-form {
    min-height: 0;
}
.palette-row-fill {
    min-height: 0;
}

/* Settings table */
/* Table scroll container */
.palette-table-scroll {
    overflow-y: auto;
    min-height: 0;
    flex:       1 1 0;
}

.palette-table {
    border-color: var(--pxt-border);
    table-layout: fixed;
}
.palette-table td,
.palette-table th {
    border-left:  none !important;
    border-right: none !important;
}
table.palette-table .palette-group-row td + td {
    border-left: 1px solid var(--pxt-border) !important;
}
table.palette-table th,
table.palette-table td {
    vertical-align: middle !important;
    padding: 0.625rem 0.75rem;
}
.palette-table thead th {
    background:     var(--pxt-card-bg, var(--bs-body-bg));
    font-weight:    600;
    font-size:      0.8125rem;
    white-space:    nowrap;
    text-align:     center;
    text-transform: uppercase;
}
.palette-table-label-col {
    width: 6rem;
    white-space: nowrap;
}
.palette-table-label {
    font-weight: 500;
    font-size:   0.95rem;
    white-space: nowrap;
    padding-left: 0.75rem !important;
}
.palette-table-group {
    cursor: pointer;
    user-select: none;
}
.palette-table-group td {
    background:     rgba(var(--pxt-accent), 0.25);
    font-weight:    600;
    font-size:      0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color:          var(--pxt-text);
}
[data-bs-theme="dark"] .palette-table-group td {
    background: rgba(var(--pxt-accent), 0.40);
}
.palette-group-chevron {
    font-size:      1.125rem;
    vertical-align: middle;
    transition:     transform 0.15s ease;
}
.palette-group-row td {
    overflow:   hidden;
    transition: padding 0.25s ease, max-height 0.25s ease, opacity 0.2s ease;
    max-height: 8rem;
    opacity:    1;
}
.palette-group-row.palette-row-collapsed td {
    max-height:     0;
    padding-top:    0 !important;
    padding-bottom: 0 !important;
    opacity:        0;
    border-color:   transparent !important;
    line-height:    0;
}
.palette-group-row.palette-row-collapsed .palette-swatch-card {
    max-height: 0;
    overflow:   hidden;
}

/* Layout preview miniature */
.palette-preview-label {
    font-size:      0.8125rem;
    font-weight:    600;
    color:          var(--pxt-text-muted);
    margin-bottom:  0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.palette-preview-frame {
    display:       flex;
    height:        220px;
    border:        1px solid var(--pxt-border);
    border-radius: 0.5rem;
    overflow:      hidden;
}

/* ── Sidebar ── */
.palette-preview-sidebar {
    width:          60px;
    flex-shrink:    0;
    border-right:   1px solid rgba(128,128,128,.15);
    display:        flex;
    flex-direction: column;
}
.palette-preview-sidebar-header {
    height:      24px;
    flex-shrink: 0;
    display:     flex;
    align-items: center;
    padding:     0 6px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.pp-logo {
    width:         20px;
    height:        8px;
    border-radius: 2px;
    background:    rgba(255,255,255,.25);
}
.palette-preview-sidebar-body {
    flex:       1;
    padding:    6px 5px;
    display:    flex;
    flex-direction: column;
    gap:        3px;
}
.pp-nav-item {
    height:        5px;
    border-radius: 2px;
    background:    rgba(255,255,255,.15);
}
.pp-nav-active {
    background: rgba(255,255,255,.35);
}
.pp-nav-divider {
    height:     0;
    margin:     2px 0;
    border-top: 1px solid rgba(255,255,255,.08);
}
.palette-preview-sidebar-footer {
    height:      18px;
    flex-shrink: 0;
    display:     flex;
    align-items: center;
    padding:     0 6px;
    border-top:  1px solid rgba(255,255,255,.08);
}
.pp-avatar {
    width:         10px;
    height:        10px;
    border-radius: 50%;
    background:    rgba(255,255,255,.2);
}

/* ── Main area ── */
.palette-preview-main {
    flex:           1;
    display:        flex;
    flex-direction: column;
    min-width:      0;
}

/* Header */
.palette-preview-header {
    height:        26px;
    flex-shrink:   0;
    border-bottom: 1px solid rgba(128,128,128,.12);
    display:       flex;
    align-items:   center;
    justify-content: space-between;
    padding:       0 8px;
}
.pp-breadcrumb {
    width:         40px;
    height:        4px;
    border-radius: 2px;
    background:    rgba(128,128,128,.18);
}
.pp-header-icons {
    display: flex;
    gap:     4px;
}
.pp-header-icon {
    width:         6px;
    height:        6px;
    border-radius: 50%;
    background:    rgba(128,128,128,.18);
}

/* Body */
.palette-preview-body {
    flex:      1;
    padding:   6px 8px;
    display:   flex;
    flex-direction: column;
    gap:       5px;
}
.pp-body-cards {
    display: flex;
    gap:     4px;
}
.pp-card {
    flex:           1;
    height:         22px;
    border-radius:  3px;
    background:     rgba(255,255,255,.6);
    border:         1px solid rgba(128,128,128,.1);
}
.pp-table-card {
    flex:           1;
    border-radius:  3px;
    background:     rgba(255,255,255,.6);
    border:         1px solid rgba(128,128,128,.1);
    padding:        3px 4px;
    display:        flex;
    flex-direction: column;
    gap:            2px;
}
.pp-table-row {
    height:        4px;
    border-radius: 1px;
    background:    rgba(128,128,128,.12);
}

/* Footer */
.palette-preview-footer {
    height:      20px;
    flex-shrink: 0;
    border-top:  1px solid rgba(128,128,128,.12);
    display:     flex;
    align-items: center;
    padding:     0 8px;
}
.pp-footer-text {
    width:         30px;
    height:        3px;
    border-radius: 1px;
    background:    rgba(128,128,128,.15);
}
