:root {
    --cbt-navy: #14243b;
    --cbt-navy-deep: #0c1728;
    --cbt-blue: #2563eb;
    --cbt-gold: #f5be32;
    --cbt-content-bg: #f3f6fb;
    --cbt-text: #172b46;
    --cbt-border: #e2e9f2;
    --cbt-sidebar-width: 254px;
    --cbt-sidebar-mini: 75px;
}

html {
    font-size: 14px;
    min-height: 100%;
    position: relative;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--cbt-text);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 .1rem white, 0 0 0 .25rem #258cfb;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Application frame */
.cbt-app {
    background: var(--cbt-content-bg);
}

.cbt-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--cbt-sidebar-width);
    background: linear-gradient(175deg, var(--cbt-navy), var(--cbt-navy-deep));
    color: #eaf1fa;
    display: flex;
    flex-direction: column;
    z-index: 1040;
    transition: width .2s ease, transform .2s ease;
    box-shadow: 6px 0 26px rgba(12,23,40,.08);
}

.cbt-brand {
    min-height: 88px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 16px 18px;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

    .cbt-brand:hover {
        color: #fff;
    }

.cbt-brand-symbol {
    flex: 0 0 39px;
    display: grid;
    place-items: center;
    height: 43px;
    border-radius: 12px;
    background: var(--cbt-gold);
    color: #14243b;
    font-size: 24px;
}

.cbt-brand-words {
    display: flex;
    flex-direction: column;
    min-width: 0;
    white-space: nowrap;
}

.cbt-brand-name {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .05em;
}

    .cbt-brand-name span {
        color: var(--cbt-gold);
    }

.cbt-brand-caption {
    color: #c6d0df;
    font-size: 10px;
    letter-spacing: .2em;
}

.cbt-brand-v {
    color: var(--cbt-gold);
    font-weight: 700;
    letter-spacing: 0;
}

.cbt-sidebar-scroll {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    padding: 14px 11px 20px;
    scrollbar-width: thin;
}

.cbt-nav-heading {
    color: #8ea3be;
    font-size: 10px;
    letter-spacing: .13em;
    font-weight: 800;
    margin: 20px 12px 9px;
    white-space: nowrap;
}

.cbt-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cbt-nav-link {
    display: flex;
    align-items: center;
    min-height: 44px;
    gap: 13px;
    padding: 9px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: #d1dced;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: background .15s, color .15s;
}

    .cbt-nav-link:hover, .cbt-nav-link:focus-visible {
        background: rgba(255,255,255,.09);
        color: #fff;
    }

    .cbt-nav-link.active {
        background: rgba(245,190,50,.16);
        color: #fff;
        box-shadow: inset 3px 0 var(--cbt-gold);
    }

        .cbt-nav-link.active .cbt-nav-icon {
            color: var(--cbt-gold);
        }

.cbt-nav-icon {
    width: 25px;
    flex: 0 0 25px;
    display: inline-grid;
    place-items: center;
    color: #a8bcda;
    font-size: 20px;
    line-height: 1;
    font-weight: 700;
}

.cbt-emergency-link {
    color: #ffb8b9;
}

    .cbt-emergency-link .cbt-nav-icon {
        border: 2px solid #ff9494;
        border-radius: 50%;
        width: 22px;
        height: 22px;
        flex-basis: 22px;
        margin: 0 1.5px;
        color: #ff9a9a;
        font-size: 14px;
    }

.cbt-sidebar-foot {
    border-top: 1px solid rgba(255,255,255,.1);
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 14px 20px;
    font-size: 11px;
    color: #b7c5d9;
    white-space: nowrap;
}

.cbt-online-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    border-radius: 50%;
    background: #33cf92;
}

.cbt-app-shell {
    min-height: 100vh;
    margin-left: var(--cbt-sidebar-width);
    display: flex;
    flex-direction: column;
    transition: margin-left .2s ease;
    min-width: 0;
}

.cbt-topbar {
    min-height: 75px;
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(255,255,255,.98);
    border-bottom: 1px solid var(--cbt-border);
    padding: 10px 26px;
}

.cbt-topbar-left, .cbt-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.cbt-topbar-right {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.cbt-icon-button {
    display: inline-grid;
    place-items: center;
    width: 39px;
    height: 39px;
    border: 1px solid var(--cbt-border);
    border-radius: 10px;
    background: #fff;
    color: #344a67;
    font-size: 20px;
}

    .cbt-icon-button:hover {
        background: #edf3fa;
    }

.cbt-page-heading {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cbt-topbar-eyebrow {
    color: #8292ab;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .09em;
}

.cbt-topbar-title {
    font-size: 20px;
    font-weight: 750;
    line-height: 1.25;
    color: var(--cbt-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cbt-topbar-action {
    background: var(--cbt-blue);
    color: #fff;
    border-color: var(--cbt-blue);
}

    .cbt-topbar-action:hover {
        background: #1d4ed8;
        color: #fff;
    }

.cbt-login-container {
    display: flex;
    align-items: center;
}

    .cbt-login-container .navbar-nav, .cbt-guest-header .navbar-nav {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 7px;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .cbt-login-container .nav-link, .cbt-guest-header .nav-link {
        color: #415372 !important;
        font-size: .83rem;
        padding: 7px 9px;
    }

.cbt-content {
    flex: 1;
    min-width: 0;
    width: 100%;
    padding: 21px 22px 30px;
}

    .cbt-content > .container, .cbt-content > .container-fluid {
        max-width: none;
        padding-left: 0;
        padding-right: 0;
    }

    .cbt-content .card {
        border: 1px solid var(--cbt-border);
        border-radius: 12px;
    }

    .cbt-content .card-header {
        border-bottom-color: var(--cbt-border);
    }

.cbt-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 26px;
    background: #fff;
    color: #8492a6;
    border-top: 1px solid var(--cbt-border);
    font-size: 12px;
}

.cbt-sidebar-overlay {
    display: none;
}

/* Compact desktop navigation */
@media (min-width: 992px) {
    .cbt-sidebar-collapsed .cbt-sidebar {
        width: var(--cbt-sidebar-mini);
    }

    .cbt-sidebar-collapsed .cbt-app-shell {
        margin-left: var(--cbt-sidebar-mini);
    }

    .cbt-sidebar-collapsed .cbt-brand {
        justify-content: center;
        padding-left: 7px;
        padding-right: 7px;
    }

    .cbt-sidebar-collapsed .cbt-brand-words, .cbt-sidebar-collapsed .cbt-nav-label, .cbt-sidebar-collapsed .cbt-nav-heading, .cbt-sidebar-collapsed .cbt-sidebar-foot-text {
        display: none;
    }

    .cbt-sidebar-collapsed .cbt-nav-link {
        justify-content: center;
        padding: 11px 8px;
    }

    .cbt-sidebar-collapsed .cbt-sidebar-foot {
        justify-content: center;
    }
}
/* Mobile slide-out navigation */
@media (max-width: 991.98px) {
    .cbt-sidebar {
        transform: translateX(-100%);
        width: min(280px, 85vw);
    }

    .cbt-app-shell {
        margin-left: 0;
    }

    .cbt-mobile-open .cbt-sidebar {
        transform: translateX(0);
    }

    .cbt-mobile-open .cbt-sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(11,22,36,.56);
        z-index: 1030;
    }

    .cbt-mobile-open {
        overflow: hidden;
    }

    .cbt-topbar {
        padding: 10px 15px;
    }

    .cbt-content {
        padding: 14px 13px 22px;
    }

    .cbt-topbar-title {
        font-size: 17px;
    }

    .cbt-footer {
        padding: 14px;
    }
}

@media (max-width: 640px) {
    .cbt-action-desktop {
        display: none;
    }

    .cbt-topbar-eyebrow {
        display: none;
    }

    .cbt-topbar {
        align-items: flex-start;
    }

    .cbt-topbar-left {
        flex: 1;
        padding-top: 2px;
    }

    .cbt-topbar-right .nav-link {
        font-size: .77rem;
        padding: 5px;
    }
}

/* Pages used when signed out / Identity */
.cbt-guest {
    background: #f3f6fb;
}

.cbt-guest-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: #fff;
    padding: 16px max(22px, calc((100vw - 1150px) / 2));
    border-bottom: 1px solid var(--cbt-border);
}

.cbt-guest-brand {
    color: var(--cbt-navy);
    font-weight: 800;
    text-decoration: none;
    letter-spacing: .02em;
}

    .cbt-guest-brand small {
        color: #6b7f97;
        font-size: .7em;
    }

.cbt-guest-content {
    min-height: calc(100vh - 145px);
}

.cbt-guest-footer {
    padding: 15px;
    text-align: center;
    color: #7c8ba1;
    font-size: 12px;
}

/* ==========================================
   CBT ELECTRICAL - CALENDAR JOB INDICATORS
   ========================================== */
.cbt-job-type-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin-top: 5px;
    margin-bottom: 5px;
}

    .cbt-job-type-badges .badge {
        font-size: .65rem;
        font-weight: 700;
        letter-spacing: .2px;
        white-space: normal;
        text-align: left;
    }

.cbt-original-job-label {
    font-size: .7rem;
    color: #6c757d;
    overflow-wrap: anywhere;
}

.cbt-calendar-job .cbt-job-type-badges, .cbt-appointment .cbt-job-type-badges {
    max-width: 100%;
}

.cbt-job-type-badges .bg-danger {
    background-color: #dc3545 !important;
    color: #fff !important;
}

.cbt-job-type-badges .bg-info {
    background-color: #0dcaf0 !important;
    color: #212529 !important;
}
