/*html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
    margin-bottom: 60px;
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background-color: #f8f9fa;
    padding: 1rem;
    border-right: 1px solid #dee2e6;
}

.sidebar .nav-link {
    color: #000;
}

.sidebar .nav-link.active {
    font-weight: bold;
}
.container {
    flex-grow: 1;*/ /* Ensures the main content takes the remaining space */
    /*padding: 5px;
}*/

body {
    margin: 0;
    padding: 0;
}

.trackc-login-page {
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    background: #fff;
    color: #172437;
}

.trackc-login-shell {
    display: grid;
    place-items: center;
    padding: 36px 24px;
}

.trackc-login-column {
    width: min(800px, 100%);
    display: grid;
    justify-items: center;
    gap: 28px;
}

.trackc-login-company {
    width: min(780px, 100%);
    aspect-ratio: 932 / 295;
    position: relative;
    overflow: hidden;
}

.trackc-login-company img {
    display: block;
    width: 107.3%;
    height: auto;
    max-width: none;
    transform: translate(-3.4%, -9.8%);
}

.trackc-login-card {
    width: min(440px, 100%);
    border-color: #dce5ee;
    border-radius: 14px;
}

.recovery-code-input {
    text-align: center;
    font-size: 1.5rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: .45rem;
    padding-left: calc(.75rem + .45rem);
}

.trackc-login-brand {
    margin: 0 0 28px;
    text-align: center;
    line-height: 1;
}

.trackc-login-brand img {
    display: block;
    width: min(255px, 100%);
    height: auto;
    margin: 0 auto;
}

.trackc-login-footer {
    display: grid;
    justify-items: center;
    gap: 4px;
    padding: 0 24px 18px;
    color: #1f5fbf;
    font-size: .9rem;
    text-align: center;
}

.trackc-login-footer a {
    color: inherit;
}

@media (max-width: 575.98px) {
    .trackc-login-shell {
        padding: 20px 14px;
    }

    .trackc-login-column {
        gap: 16px;
    }

    .trackc-login-card .card-body {
        padding: 1.5rem !important;
    }

    .trackc-login-brand {
        margin-bottom: 20px;
    }

    .trackc-login-brand img {
        width: min(220px, 88%);
    }

    .trackc-login-footer {
        padding: 0 14px 14px;
        font-size: .8rem;
    }
}

@media (max-height: 700px) {
    .trackc-login-shell {
        align-items: start;
        padding-top: 16px;
        padding-bottom: 16px;
    }
}

.trackc-brand-splash {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: #fff;
    pointer-events: none;
    animation: trackc-brand-fade 2.35s ease-in-out forwards;
}

.trackc-brand-splash img {
    width: min(760px, 88vw);
    height: auto;
}

@keyframes trackc-brand-fade {
    0%, 52% { opacity: 1; }
    100% { opacity: 0; visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
    .trackc-brand-splash { animation-duration: .25s; }
}

.layout-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

.sidebar {
    width: 250px;
    min-width: 250px;
    background-color: #f8f9fa;
    padding: 0;
    border-right: 1px solid #dee2e6;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    position: sticky;
    top: 0;
    overflow: hidden;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-height: 92px;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--tc-border, #dee2e6);
}

.sidebar-header .navbar-brand {
    display: block;
    min-width: 0;
    margin: 0;
}

.sidebar-header .navbar-brand img {
    display: block;
    width: 100%;
    max-width: 190px;
    height: auto;
}

.sidebar-close {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    margin-left: auto;
    border: 1px solid var(--tc-border, #d7dee7);
    border-radius: .6rem;
    background: transparent;
    color: var(--tc-text, #172437);
}

.sidebar-navigation {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: .5rem .75rem 1rem;
    scrollbar-gutter: stable;
}

.sidebar .nav-link,
.sidebar-nav-group > summary {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-height: 42px;
    margin: .12rem 0;
    padding: .55rem .7rem;
    border-radius: .55rem;
    color: var(--tc-text, #212529);
    text-decoration: none;
}

.sidebar .nav-link:hover,
.sidebar .nav-link:focus,
.sidebar .nav-link.active,
.sidebar-nav-group > summary:hover,
.sidebar-nav-group > summary:focus-visible {
    background: var(--tc-panel-soft, #eef3fb);
    color: var(--tc-primary, #2554d8);
}

.sidebar .nav-link.active { font-weight: 750; }
.sidebar .nav-link > i,
.sidebar-nav-group > summary span > i { width: 1.15rem; text-align: center; }

.sidebar-nav-group > summary {
    justify-content: space-between;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.sidebar-nav-group > summary::-webkit-details-marker { display: none; }
.sidebar-nav-group > summary > span { display: flex; align-items: center; gap: .65rem; }
.sidebar-group-chevron { font-size: .8rem; transition: transform .18s ease; }
.sidebar-nav-group[open] > summary .sidebar-group-chevron { transform: rotate(90deg); }
.sidebar-nav-children { padding: 0 0 .35rem 1.25rem; }
.sidebar-nav-children .nav-link { min-height: 36px; padding-top: .38rem; padding-bottom: .38rem; font-size: .91rem; }
.sidebar-subsection { margin: .5rem .7rem .2rem; color: var(--tc-muted, #6c757d); font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.sidebar-nav-section-group { margin-bottom: .35rem; }
.sidebar-divider { margin: .65rem .7rem; border-top: 1px solid var(--tc-border, #dee2e6); }

.sidebar-footer {
    flex: 0 0 auto;
    border-top: 1px solid var(--tc-border, #dee2e6);
    padding: .55rem .75rem max(.7rem, env(safe-area-inset-bottom));
}

.sidebar-footer .sidebar-logout { color: #a8222f; }

.trackc-erp-link {
    display: flex;
    align-items: center;
    gap: .55rem;
}

.trackc-erp-link img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.sidebar-version {
    padding: .25rem .75rem 0;
    color: #6c757d;
    font-size: .78rem;
    text-align: center;
    white-space: nowrap;
}

.app-content { min-width: 0; }
.mobile-app-bar { display: none; }

.sidebar-section {
    margin: .6rem .75rem .2rem;
    color: var(--tc-muted, #6c757d);
    font-size: .68rem;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
}

    .sidebar .nav-link {
        color: #212529;
    }

        .sidebar .nav-link.active {
            font-weight: bold;
        }
/* Hide sidebar on small screens */
@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        height: 100dvh;
        z-index: 1040;
        transform: translateX(-100%);
        box-shadow: 12px 0 30px rgba(0,0,0,.18);
    }

        .sidebar.show {
            transform: translateX(0);
        }

    .sidebar-backdrop {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.3);
        z-index: 1039;
    }

        .sidebar-backdrop.show {
            display: block;
        }

    .sidebar-toggle {
        display: flex;
    }

    .layout-wrapper {
        flex-direction: column;
    }

    body.sidebar-open { overflow: hidden; }
    .mobile-app-bar {
        position: sticky;
        top: 0;
        z-index: 1030;
        align-items: center;
        gap: .8rem;
        min-height: 58px;
        padding: .45rem .8rem;
        border-bottom: 1px solid var(--tc-border, #d7dee7);
        background: color-mix(in srgb, var(--tc-panel, #fff) 94%, transparent);
        backdrop-filter: blur(12px);
        color: var(--tc-text, #172437);
        font-weight: 800;
    }

    .mobile-menu-button {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 1px solid var(--tc-border, #d7dee7);
        border-radius: .65rem;
        background: transparent;
        color: currentColor;
        font-size: 1.65rem;
    }

    .app-content-inner { padding: 1rem !important; }
}
/* Hide toggle on large screens */
@media (min-width: 992px) {
    .sidebar-toggle {
        display: none;
    }

    .sidebar-backdrop {
        display: none !important;
    }
}

/* Add a hidden checkmark symbol before every dropdown item */
.select2-results__option::before {
    content: "✓ ";
    opacity: 0; /* Hide by default */
    margin-right: 5px;
    font-weight: bold;
}

/* Instantly show the checkmark only when the item is selected */
.select2-results__option[aria-selected=true]::before {
    opacity: 1; /* Show when selected */
    color: #000; /* Ensure high contrast for color blindness */
}
.driver-location-tracker {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin: auto .8rem .6rem;
    padding: .55rem .65rem;
    border: 1px solid #d8e2ef;
    border-radius: .55rem;
    background: #f8fafc;
    color: #526274;
    font-size: .72rem;
    font-weight: 650;
}

.driver-location-tracker[data-location-state="sharing"] {
    border-color: #b8dfca;
    background: #edf9f2;
    color: #16794a;
}

.driver-location-tracker[data-location-state="error"] {
    border-color: #f2c6c2;
    background: #fff3f2;
    color: #b42318;
}

/* Shared TrackC / TrackC ERP theme catalog. */
:root { --tc-bg:#f4f6fb;--tc-panel:#fff;--tc-panel-soft:#eef3fb;--tc-text:#1c2433;--tc-muted:#61708c;--tc-border:#d9dfeb;--tc-primary:#2554d8;--tc-primary-strong:#173eaa;--tc-accent:#dbe7ff;--tc-shadow:0 16px 40px rgba(25,39,71,.10); }
body.theme-dark { --tc-bg:#111624;--tc-panel:#172033;--tc-panel-soft:#202b43;--tc-text:#eef2ff;--tc-muted:#b8c3de;--tc-border:#2b3752;--tc-primary:#6ea0ff;--tc-primary-strong:#4b85ff;--tc-accent:#1f2b45;--tc-shadow:0 18px 44px rgba(0,0,0,.25); }
body.theme-harbor { --tc-bg:#eef5f8;--tc-panel:#fff;--tc-panel-soft:#e0eef2;--tc-text:#16323f;--tc-muted:#50707d;--tc-border:#c8dde4;--tc-primary:#1f738b;--tc-primary-strong:#17596c;--tc-accent:#d9eef5; }
body.theme-sage { --tc-bg:#f3f7f2;--tc-panel:#fff;--tc-panel-soft:#e5efe3;--tc-text:#223222;--tc-muted:#647563;--tc-border:#d6e1d4;--tc-primary:#567b4f;--tc-primary-strong:#45663f;--tc-accent:#e8f2e5; }
body.theme-sunset { --tc-bg:#fff6f1;--tc-panel:#fff;--tc-panel-soft:#fde8dd;--tc-text:#45261f;--tc-muted:#8f655c;--tc-border:#f0d2c3;--tc-primary:#d2603d;--tc-primary-strong:#b34d2d;--tc-accent:#ffe3d4; }
body.theme-sunrise { --tc-bg:#fff8ea;--tc-panel:#fff;--tc-panel-soft:#fff0cc;--tc-text:#4d3b14;--tc-muted:#90734a;--tc-border:#eadcb7;--tc-primary:#c79100;--tc-primary-strong:#9f7500;--tc-accent:#fff1b8; }
body[class*="theme-"]:not(.trackc-login-page) { background:var(--tc-bg);color:var(--tc-text); }
body[class*="theme-"] .sidebar,body[class*="theme-"] .card,body[class*="theme-"] .sales-widget,body[class*="theme-"] .admin-card { background:var(--tc-panel)!important;color:var(--tc-text);border-color:var(--tc-border)!important; }
body[class*="theme-"] .sidebar .nav-link,body[class*="theme-"] .dropdown-item,body[class*="theme-"] h1,body[class*="theme-"] h2,body[class*="theme-"] h3 { color:var(--tc-text); }
body[class*="theme-"] .sidebar .nav-link:hover,body[class*="theme-"] .dropdown-item:hover { background:var(--tc-panel-soft);color:var(--tc-primary); }
body[class*="theme-"] .dropdown-menu,body[class*="theme-"] .form-control,body[class*="theme-"] .form-select,body[class*="theme-"] table { background:var(--tc-panel);color:var(--tc-text);border-color:var(--tc-border); }
body[class*="theme-"] .text-muted,body[class*="theme-"] .admin-subtitle,body[class*="theme-"] .admin-card-hint { color:var(--tc-muted)!important; }
body[class*="theme-"] .btn-primary { background:var(--tc-primary);border-color:var(--tc-primary); }
.theme-preview-grid { display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:1rem; }
.theme-preview { display:grid;gap:.55rem;padding:1rem;border:2px solid var(--tc-border);border-radius:.8rem;cursor:pointer;background:var(--tc-panel-soft); }
.theme-preview:has(input:checked) { border-color:var(--tc-primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--tc-primary) 18%,transparent); }
.theme-preview-swatch { display:grid;grid-template-columns:1fr 1fr 1fr;height:38px;overflow:hidden;border-radius:.45rem;border:1px solid rgba(0,0,0,.08); }
.theme-preview-swatch i:nth-child(1){background:var(--preview-bg,#f4f6fb)}.theme-preview-swatch i:nth-child(2){background:var(--preview-panel,#fff)}.theme-preview-swatch i:nth-child(3){background:var(--preview-primary,#2554d8)}
.theme-preview--dark{--preview-bg:#111624;--preview-panel:#172033;--preview-primary:#6ea0ff}.theme-preview--harbor{--preview-bg:#eef5f8;--preview-panel:#fff;--preview-primary:#1f738b}.theme-preview--sage{--preview-bg:#f3f7f2;--preview-panel:#fff;--preview-primary:#567b4f}.theme-preview--sunset{--preview-bg:#fff6f1;--preview-panel:#fff;--preview-primary:#d2603d}.theme-preview--sunrise{--preview-bg:#fff8ea;--preview-panel:#fff;--preview-primary:#c79100}

.customer-hub-search-count{color:var(--tc-muted,#61708c);font-size:.9rem}.customer-hub-search-count strong{color:var(--tc-text,#1c2433);font-size:1.05rem}
.customer-hub-row--hold>*,.customer-hub-row--hold:hover>*{background:#fff2b8!important}.customer-hub-row--hold>td:first-child{box-shadow:inset 5px 0 #d59c00}
.customer-hub-row--inactive>*,.customer-hub-row--inactive:hover>*{background:#f8d7df!important}.customer-hub-row--inactive>td:first-child{box-shadow:inset 5px 0 #b4233a}
.customer-status-badge{display:inline-flex;margin-left:.55rem;padding:.2rem .5rem;border-radius:999px;font-size:.65rem;font-weight:800;line-height:1;text-transform:uppercase;letter-spacing:.035em;vertical-align:.08rem}.customer-status-badge--credit{background:#c9362b;color:#fff}.customer-status-badge--past-due{background:#f59e0b;color:#3f2a00}.customer-status-badge--activity{background:#dce8ff;color:#214f99}.customer-status-badge--cash{background:#dff3e9;color:#145f42}.customer-status-badge--manual{background:#e9e2f5;color:#5d388f}.customer-status-badge--good{background:#dff3e9;color:#145f42}.customer-status-badge--inactive{background:#b4233a;color:#fff}
