/* Gibson Energy Services BMS - Custom Styles */

:root {
    --bs-primary: #CC2229;
    --bs-primary-rgb: 204, 34, 41;
    --bs-secondary: #1B2A5B;
    --bs-accent: #3D8B37;
    --bs-navy: #1B2A5B;
    --bms-sidebar-width: 260px;
    --bms-sidebar-mini-width: 84px;
    --bs-body-font-family: 'Lato', sans-serif;
}

body {
    font-family: 'Lato', sans-serif;
}

/* Override Bootstrap primary color */
.btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #B01D23;
    border-color: #B01D23;
}

.btn-primary:active {
    background-color: #961820;
    border-color: #961820;
}

.link-primary {
    color: var(--bs-primary) !important;
}

.link-primary:hover {
    color: #B01D23 !important;
}

.form-check-input:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.form-control:focus,
.form-check-input:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

/* =====================================================================
   LOGIN PAGE — Full-page immersive design
   ===================================================================== */

/* Utility needed without Bootstrap */
.d-none { display: none !important; }

/* ── Page base ──────────────────────────────────────────────────── */
.login-page {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #06101f;
    background: linear-gradient(-45deg, #06101f, #0e1d3a, #1a0608, #0b1828);
    background-size: 400% 400%;
    animation: bgShift 22s ease infinite;
    font-family: 'Lato', sans-serif;
}

@keyframes bgShift {
    0%   { background-position: 0%   50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0%   50%; }
}

/* ── Full-screen background layer ───────────────────────────────── */
.login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

/* ── Drifting colour orbs ────────────────────────────────────────── */
.lbg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    animation: orbDrift ease-in-out infinite;
    will-change: transform;
}

.lbg-orb-1 {
    width: 700px; height: 700px;
    background: radial-gradient(circle, rgba(204,34,41,0.45) 0%, transparent 65%);
    top: -250px; left: -220px;
    animation-duration: 22s;
}
.lbg-orb-2 {
    width: 580px; height: 580px;
    background: radial-gradient(circle, rgba(27,42,91,0.85) 0%, rgba(13,23,60,0.9) 55%, transparent 70%);
    bottom: -180px; right: -160px;
    animation-duration: 28s;
    animation-direction: reverse;
}
.lbg-orb-3 {
    width: 380px; height: 380px;
    background: radial-gradient(circle, rgba(61,139,55,0.18) 0%, transparent 70%);
    top: 38%; left: 25%;
    animation-duration: 36s;
}
.lbg-orb-4 {
    width: 460px; height: 460px;
    background: radial-gradient(circle, rgba(176,29,35,0.25) 0%, transparent 65%);
    bottom: 10%; left: -100px;
    animation-duration: 18s;
    animation-direction: reverse;
    animation-delay: -8s;
}

@keyframes orbDrift {
    0%, 100% { transform: translate(0,    0)    scale(1);    }
    33%       { transform: translate(50px, -40px) scale(1.07); }
    66%       { transform: translate(-30px, 45px) scale(0.92); }
}

/* ── Dot-grid overlay ────────────────────────────────────────────── */
.lbg-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.065) 1px, transparent 1px);
    background-size: 32px 32px;
}

/* ── Concentric pulse rings (top-right corner) ───────────────────── */
.lbg-rings {
    position: absolute;
    top: -180px;
    right: -180px;
}

.lbg-ring {
    position: absolute;
    border-radius: 50%;
    top: 0; right: 0;
}
.lbg-ring-1 { width: 360px; height: 360px; border: 1px solid rgba(204,34,41,0.12);  animation: ringPulse  9s ease-in-out infinite; }
.lbg-ring-2 { width: 580px; height: 580px; border: 1px solid rgba(255,255,255,0.05); animation: ringPulse 14s ease-in-out infinite reverse; }
.lbg-ring-3 { width: 800px; height: 800px; border: 1px solid rgba(27,42,91,0.14);   animation: ringPulse 20s ease-in-out infinite; }

@keyframes ringPulse {
    0%, 100% { transform: scale(1);    opacity: 0.5; }
    50%       { transform: scale(1.06); opacity: 1;   }
}

/* ── Rising particles ────────────────────────────────────────────── */
.lbg-particles span {
    position: absolute;
    bottom: -12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.14);
    animation: particleRise linear infinite;
}

.lbg-particles span:nth-child(1)  { width:4px; height:4px; left:5%;   animation-duration:10s; animation-delay:0s;   }
.lbg-particles span:nth-child(2)  { width:3px; height:3px; left:12%;  animation-duration:14s; animation-delay:2.5s; }
.lbg-particles span:nth-child(3)  { width:6px; height:6px; left:20%;  animation-duration:11s; animation-delay:4s;   background:rgba(204,34,41,0.4); }
.lbg-particles span:nth-child(4)  { width:3px; height:3px; left:28%;  animation-duration:16s; animation-delay:1s;   }
.lbg-particles span:nth-child(5)  { width:5px; height:5px; left:36%;  animation-duration:10s; animation-delay:3.5s; background:rgba(204,34,41,0.3); }
.lbg-particles span:nth-child(6)  { width:4px; height:4px; left:44%;  animation-duration:15s; animation-delay:0.5s; }
.lbg-particles span:nth-child(7)  { width:7px; height:7px; left:52%;  animation-duration:13s; animation-delay:5s;   background:rgba(255,255,255,0.08); }
.lbg-particles span:nth-child(8)  { width:3px; height:3px; left:60%;  animation-duration:17s; animation-delay:2s;   }
.lbg-particles span:nth-child(9)  { width:5px; height:5px; left:68%;  animation-duration:10s; animation-delay:1.5s; background:rgba(204,34,41,0.35); }
.lbg-particles span:nth-child(10) { width:4px; height:4px; left:75%;  animation-duration:14s; animation-delay:4.5s; }
.lbg-particles span:nth-child(11) { width:3px; height:3px; left:82%;  animation-duration:12s; animation-delay:0s;   }
.lbg-particles span:nth-child(12) { width:6px; height:6px; left:88%;  animation-duration:16s; animation-delay:3s;   background:rgba(204,34,41,0.28); }
.lbg-particles span:nth-child(13) { width:3px; height:3px; left:93%;  animation-duration:11s; animation-delay:2s;   }
.lbg-particles span:nth-child(14) { width:4px; height:4px; left:15%;  animation-duration:18s; animation-delay:6.5s; }
.lbg-particles span:nth-child(15) { width:5px; height:5px; left:55%;  animation-duration:9s;  animation-delay:1s;   background:rgba(204,34,41,0.3); }

@keyframes particleRise {
    0%   { transform: translateY(0)      scale(1);   opacity: 0;   }
    8%   { opacity: 0.7; }
    88%  { opacity: 0.25; }
    100% { transform: translateY(-102vh) scale(0.4); opacity: 0;   }
}

/* ══════════════════════════════════════════════════════════════════
   LOGIN CARD WRAPPER
   ══════════════════════════════════════════════════════════════════ */

.login-wrap {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
}

/* ── The card ────────────────────────────────────────────────────── */
.login-card {
    width: 100%;
    max-width: 460px;
    background: #ffffff;
    border-radius: 26px;
    padding: 2.75rem 2.5rem 2.25rem;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 50px 120px rgba(0,0,0,0.55),
        0 20px 40px  rgba(0,0,0,0.35),
        0 0 0 1px    rgba(255,255,255,0.08),
        0 0 80px     rgba(204,34,41,0.06);
    animation: cardEntrance 0.75s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cardEntrance {
    from { opacity: 0; transform: translateY(36px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* Animated shimmer bar across the top of the card */
.login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1B2A5B 0%, #CC2229 40%, #e8444b 60%, #1B2A5B 100%);
    background-size: 300% 100%;
    animation: topShimmer 5s ease infinite;
}

@keyframes topShimmer {
    0%   { background-position: 100% 0%; }
    100% { background-position: -100% 0%; }
}

/* Very subtle inner glow at bottom of card */
.login-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 120px;
    background: linear-gradient(to top, rgba(204,34,41,0.025), transparent);
    pointer-events: none;
}

/* ── GEMS App logo ────────────────────────────────────────────────── */
.lc-app-logo {
    text-align: center;
    margin-bottom: 1.5rem;
    animation: logoIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.lc-app-logo img {
    width: 360px;
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 6px 24px rgba(204,34,41,0.22));
}

@keyframes logoIn {
    from { opacity: 0; transform: scale(0.82) translateY(-10px); }
    to   { opacity: 1; transform: scale(1)    translateY(0); }
}

/* ── Headings ─────────────────────────────────────────────────────── */
.lc-title {
    font-size: 1.6rem;
    font-weight: 900;
    color: #0b1529;
    text-align: center;
    margin-bottom: 0.3rem;
    letter-spacing: -0.3px;
    animation: fadeUp 0.5s ease-out 0.25s both;
}

.lc-subtitle {
    text-align: center;
    color: #8c92a8;
    font-size: 0.88rem;
    margin-bottom: 1.85rem;
    animation: fadeUp 0.5s ease-out 0.32s both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Form ─────────────────────────────────────────────────────────── */
.lc-form {
    animation: fadeUp 0.5s ease-out 0.38s both;
}

.lc-field {
    margin-bottom: 1.2rem;
}

.lc-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: #3a4060;
    margin-bottom: 0.4rem;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

.lc-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.lc-input-icon {
    position: absolute;
    left: 1rem;
    color: #b4bcd0;
    font-size: 1rem;
    pointer-events: none;
    z-index: 1;
    transition: color 0.2s ease;
}

.lc-input {
    width: 100%;
    padding: 0.88rem 1rem 0.88rem 2.85rem;
    border: 2px solid #e6e9f4;
    border-radius: 12px;
    font-size: 0.92rem;
    font-family: inherit;
    background: #f8f9fc;
    color: #1a1f36;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.lc-input::placeholder { color: #c2c8da; }

.lc-input:focus {
    border-color: #1B2A5B;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(27,42,91,0.08);
}

.lc-input-wrap:focus-within .lc-input-icon {
    color: #1B2A5B;
}

.lc-input-pw {
    padding-right: 3rem;
}

/* Password toggle */
.lc-pw-toggle {
    position: absolute;
    right: 0.8rem;
    background: none;
    border: none;
    color: #b4bcd0;
    padding: 0.3rem;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    z-index: 1;
    transition: color 0.2s ease;
}
.lc-pw-toggle:hover { color: #1B2A5B; }

/* Remember + forgot row */
.lc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.6rem;
}

.lc-check-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.84rem;
    color: #5a6280;
    cursor: pointer;
    user-select: none;
}

.lc-check-input {
    width: 16px;
    height: 16px;
    accent-color: #CC2229;
    cursor: pointer;
    flex-shrink: 0;
}

.lc-forgot {
    font-size: 0.84rem;
    color: #CC2229;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s;
}
.lc-forgot:hover { color: #a01c22; }

/* ── Submit button ────────────────────────────────────────────────── */
.lc-btn {
    width: 100%;
    padding: 0.95rem 1.5rem;
    background: linear-gradient(135deg, #b01d23 0%, #CC2229 50%, #de3d43 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow:
        0 4px 20px rgba(204,34,41,0.42),
        0 1px 0 rgba(255,255,255,0.14) inset;
}

.lc-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow:
        0 10px 32px rgba(204,34,41,0.5),
        0 1px 0 rgba(255,255,255,0.14) inset;
}

.lc-btn:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(204,34,41,0.3);
}

.lc-btn:disabled {
    opacity: 0.72;
    cursor: not-allowed;
}

.lc-btn-arrow {
    transition: transform 0.25s ease;
}
.lc-btn:hover:not(:disabled) .lc-btn-arrow {
    transform: translateX(4px);
}

/* Shine sweep */
.lc-btn-shine {
    position: absolute;
    top: 0;
    left: -120%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transform: skewX(-18deg);
    pointer-events: none;
}
.lc-btn:hover:not(:disabled) .lc-btn-shine {
    left: 170%;
    transition: left 0.7s ease;
}

/* ── Divider ─────────────────────────────────────────────────────── */
.lc-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.75rem 0 1.2rem;
    color: #c5cad8;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    animation: fadeUp 0.5s ease-out 0.44s both;
}
.lc-divider::before,
.lc-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, #e6e9f4, transparent);
}
.lc-divider::before { background: linear-gradient(to right, transparent, #e6e9f4); }
.lc-divider::after  { background: linear-gradient(to left, transparent, #e6e9f4); }

/* ── Company logo ────────────────────────────────────────────────── */
.lc-company-logo {
    text-align: center;
    animation: fadeUp 0.5s ease-out 0.48s both;
}

.lc-company-logo img {
    width: 140px;
    height: auto;
    opacity: 0.65;
    transition: opacity 0.3s ease;
}
.lc-company-logo img:hover {
    opacity: 0.9;
}

/* ── Copyright beneath card ──────────────────────────────────────── */
.lc-copyright {
    color: rgba(255,255,255,0.22);
    font-size: 0.75rem;
    margin-top: 1.5rem;
    text-align: center;
    animation: fadeUp 0.5s ease-out 0.55s both;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 575.98px) {
    .login-card {
        border-radius: 20px;
        padding: 2.25rem 1.5rem 2rem;
    }
    .lc-app-logo img { width: 280px; }
    .lc-title        { font-size: 1.4rem; }
    .login-wrap      { padding: 1.5rem 1rem; justify-content: flex-start; padding-top: 3rem; }
}

@media (max-height: 700px) {
    .login-wrap { justify-content: flex-start; padding-top: 1.5rem; }
    .lc-app-logo img { width: 260px; }
    .login-card { padding: 2rem 2rem 1.75rem; }
}

/* =====================================================================
   LAYOUT — Sidebar + Navbar + Main Content
   ===================================================================== */

.bms-navbar {
    background-color: #ffffff;
    height: 56px;
    z-index: 1040;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Sidebar */
.bms-sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    width: var(--bms-sidebar-width);
    height: calc(100vh - 56px);
    background-color: #1B2A5B;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1030;
    transition: width 0.25s ease, transform 0.3s ease, box-shadow 0.25s ease;
    scrollbar-width: thin;
    scrollbar-color: #2d4080 #1B2A5B;
}

.bms-sidebar::-webkit-scrollbar { width: 4px; }
.bms-sidebar::-webkit-scrollbar-track { background: #1B2A5B; }
.bms-sidebar::-webkit-scrollbar-thumb { background: #2d4080; border-radius: 2px; }

.sidebar-desktop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1rem 0.65rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-toolbar-title {
    color: rgba(255,255,255,0.78);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-pin-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.55rem;
    color: rgba(255,255,255,0.78);
    text-decoration: none;
    border-radius: 999px;
}

.sidebar-pin-toggle:hover,
.sidebar-pin-toggle:focus {
    color: #ffffff;
    background-color: rgba(255,255,255,0.08);
}

.sidebar-pin-toggle i {
    font-size: 0.95rem;
}

.sidebar-pin-label {
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Sidebar nav links */
.bms-sidebar .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 0.8rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border-left: 3px solid transparent;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
    font-size: 0.875rem;
    white-space: nowrap;
    min-height: 52px;
    width: 100%;
    position: relative;
}

.bms-sidebar .nav-link i {
    font-size: 1.1rem;
    width: 1.2rem;
    text-align: center;
    flex-shrink: 0;
}

.bms-sidebar .nav-link:hover {
    color: #ffffff;
    background-color: rgba(255,255,255,0.07);
    border-left-color: #CC2229;
}

.bms-sidebar .nav-link.active {
    color: #ffffff;
    background-color: rgba(204,34,41,0.22);
    border-left-color: #CC2229;
    font-weight: 600;
}

/* Sidebar overlay (mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    z-index: 1025;
}

.sidebar-overlay.active { display: block; }

/* Main content */
.bms-main-content {
    margin-left: var(--bms-sidebar-width);
    min-height: calc(100vh - 56px);
    background-color: #f4f5f7;
    transition: margin-left 0.25s ease;
}

@media (min-width: 992px) {
    body.desktop-sidebar-collapsed .bms-sidebar {
        width: var(--bms-sidebar-mini-width);
    }

    body.desktop-sidebar-collapsed .bms-main-content {
        margin-left: var(--bms-sidebar-mini-width);
    }

    body.desktop-sidebar-collapsed.desktop-sidebar-hover .bms-sidebar {
        width: var(--bms-sidebar-width);
        box-shadow: 14px 0 28px rgba(0,0,0,0.18);
    }

    body.desktop-sidebar-collapsed:not(.desktop-sidebar-hover) .bms-sidebar .nav-link {
        justify-content: center;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        border-left-color: transparent !important;
    }

    body.desktop-sidebar-collapsed:not(.desktop-sidebar-hover) .sidebar-desktop-toolbar {
        justify-content: center;
        padding: 0.8rem 0.5rem 0.6rem;
    }

    body.desktop-sidebar-collapsed:not(.desktop-sidebar-hover) .sidebar-pin-toggle {
        width: 44px;
        height: 44px;
        padding: 0;
        justify-content: center;
        border-radius: 14px;
    }

    body.desktop-sidebar-collapsed:not(.desktop-sidebar-hover) .bms-sidebar .nav-link > i:first-child,
    body.desktop-sidebar-collapsed:not(.desktop-sidebar-hover) .sidebar-pin-toggle i {
        width: 1.5rem;
        min-width: 1.5rem;
        margin: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    body.desktop-sidebar-collapsed:not(.desktop-sidebar-hover) .bms-sidebar .sidebar-chevron {
        display: none !important;
    }

    body.desktop-sidebar-collapsed:not(.desktop-sidebar-hover) .bms-sidebar .nav-link.active::before {
        content: '';
        position: absolute;
        left: 0;
        top: 10px;
        bottom: 10px;
        width: 3px;
        border-radius: 0 999px 999px 0;
        background-color: #CC2229;
    }

    body.desktop-sidebar-collapsed:not(.desktop-sidebar-hover) .bms-sidebar .nav-link span,
    body.desktop-sidebar-collapsed:not(.desktop-sidebar-hover) .sidebar-toolbar-title,
    body.desktop-sidebar-collapsed:not(.desktop-sidebar-hover) .sidebar-pin-label,
    body.desktop-sidebar-collapsed:not(.desktop-sidebar-hover) .sidebar-chevron {
        opacity: 0;
        visibility: hidden;
        width: 0;
        overflow: hidden;
        pointer-events: none;
    }

    body.desktop-sidebar-collapsed:not(.desktop-sidebar-hover) .bms-sidebar .collapse,
    body.desktop-sidebar-collapsed:not(.desktop-sidebar-hover) .bms-sidebar .collapsing {
        display: none !important;
    }
}

@media (max-width: 991.98px) {
    .sidebar-desktop-toolbar {
        display: none;
    }
}

/* Mobile: collapse sidebar off-screen */
@media (max-width: 991.98px) {
    .bms-sidebar {
        transform: translateX(-100%);
    }
    .bms-sidebar.open {
        transform: translateX(0);
        z-index: 1035;
    }
    .bms-main-content {
        margin-left: 0;
    }
}

/* =====================================================================
   STATS CARDS
   ===================================================================== */

.stats-card {
    border: none;
    border-left: 4px solid #dee2e6;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stats-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.stats-card.border-red    { border-left-color: #CC2229; }
.stats-card.border-orange { border-left-color: #fd7e14; }
.stats-card.border-green  { border-left-color: #198754; }
.stats-card.border-blue   { border-left-color: #0d6efd; }

.stats-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stats-number {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
}

/* =====================================================================
   DASHBOARD HERO SECTION
   ===================================================================== */

.dash-hero {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    padding: 2.2rem 2rem;
    color: #fff;
    min-height: 160px;
}

.dash-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1B2A5B 0%, #CC2229 50%, #B01D23 100%);
    z-index: 0;
}

.dash-hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 80%, rgba(255,255,255,0.08) 0%, transparent 50%),
        radial-gradient(circle at 85% 20%, rgba(255,255,255,0.12) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(0,0,0,0.15) 0%, transparent 80%);
    z-index: 1;
}

.dash-hero-bg::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 60%);
    border-radius: 50%;
    animation: dashPulse 6s ease-in-out infinite;
}

@keyframes dashPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 1; }
}

.dash-hero-content {
    position: relative;
    z-index: 2;
}

.dash-hero-title {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    margin-bottom: 0.3rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.dash-hero-subtitle {
    font-size: 0.95rem;
    opacity: 0.85;
    margin-bottom: 0;
    font-weight: 400;
}

.dash-hero-divider {
    display: inline-block;
    margin: 0 0.6rem;
    opacity: 0.4;
}

.dash-hero-alert {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    animation: alertSlide 0.5s ease-out;
}

@keyframes alertSlide {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Completion Ring */
.dash-hero-summary {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    justify-content: flex-end;
}

.dash-hero-ring {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.dash-ring-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.dash-ring-bg {
    fill: none;
    stroke: rgba(255,255,255,0.15);
    stroke-width: 3;
}

.dash-ring-fill {
    fill: none;
    stroke: #fff;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 1.5s ease-out;
}

.dash-ring-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dash-ring-pct {
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1;
}

.dash-ring-sub {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.75;
}

.dash-hero-meta {
    text-align: right;
    font-size: 0.9rem;
    line-height: 1.8;
    opacity: 0.9;
}

.dash-hero-meta strong {
    font-size: 1.1rem;
    margin-right: 4px;
}

/* =====================================================================
   DASHBOARD STAT CARDS (new style)
   ===================================================================== */

.dash-stat-card {
    border: none;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    position: relative;
    background: #fff;
}

.dash-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}

.dash-stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.dash-stat-card:hover .dash-stat-icon {
    transform: scale(1.1) rotate(-5deg);
}

.dash-stat-icon.grad-red    { background: linear-gradient(135deg, #CC2229, #e8444b); }
.dash-stat-icon.grad-orange { background: linear-gradient(135deg, #fd7e14, #ffa502); }
.dash-stat-icon.grad-green  { background: linear-gradient(135deg, #198754, #2ed573); }
.dash-stat-icon.grad-blue   { background: linear-gradient(135deg, #0d6efd, #70a1ff); }
.dash-stat-icon.grad-purple { background: linear-gradient(135deg, #7209b7, #b983ff); }
.dash-stat-icon.grad-teal   { background: linear-gradient(135deg, #0d9488, #5eead4); }

.dash-stat-number {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    color: #1d1d1b;
}

.dash-stat-label {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.dash-stat-arrow {
    color: #dee2e6;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.dash-stat-card:hover .dash-stat-arrow {
    color: #CC2229;
    transform: translateX(3px);
}

.dash-stat-bar {
    height: 4px;
    width: 0;
    transition: width 1s ease-out 0.3s;
}

.dash-stat-card:hover .dash-stat-bar,
.dash-stat-card .dash-stat-bar {
    width: 100%;
}

.dash-stat-bar.grad-red    { background: linear-gradient(90deg, #CC2229, #e8444b); }
.dash-stat-bar.grad-orange { background: linear-gradient(90deg, #fd7e14, #ffa502); }
.dash-stat-bar.grad-green  { background: linear-gradient(90deg, #198754, #2ed573); }
.dash-stat-bar.grad-blue   { background: linear-gradient(90deg, #0d6efd, #70a1ff); }

/* =====================================================================
   QUICK ACTION TILES
   ===================================================================== */

.dash-action-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1.2rem 0.5rem;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #f0f0f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none;
    color: #1d1d1b;
    width: 100%;
    cursor: pointer;
}

button.dash-action-tile {
    border: 1px solid #f0f0f0;
}

.dash-action-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    border-color: transparent;
    color: #1d1d1b;
}

.dash-action-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    transition: transform 0.3s ease;
}

.dash-action-tile:hover .dash-action-icon {
    transform: scale(1.15) rotate(5deg);
}

.dash-action-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

/* =====================================================================
   SCROLL ANIMATIONS
   ===================================================================== */

.animate-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    transition-delay: calc(var(--delay, 0) * 0.06s);
}

.animate-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Table row animations */
tr.animate-in {
    transform: translateX(-16px);
}

tr.animate-in.visible {
    transform: translateX(0);
}

/* =====================================================================
   PROGRESS BAR ENHANCEMENTS
   ===================================================================== */

.progress {
    background-color: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    border-radius: 10px;
    transition: width 1s ease-out;
}

/* =====================================================================
   RESPONSIVE HERO
   ===================================================================== */

@media (max-width: 767.98px) {
    .dash-hero {
        padding: 1.5rem;
    }
    .dash-hero-title {
        font-size: 1.3rem;
    }
    .dash-hero-summary {
        justify-content: flex-start;
        margin-top: 1rem;
    }
    .dash-hero-ring {
        width: 70px;
        height: 70px;
    }
    .dash-ring-pct {
        font-size: 1.1rem;
    }
}

/* =====================================================================
   CARDS + TABLES
   ===================================================================== */

.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}

.table-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    overflow: hidden;
}

/* Customers page: keep the table section tall and allow action menus to escape card bounds. */
.customers-table-card {
    min-height: calc(100dvh - 170px);
    overflow: visible;
}

.customers-table-card .table-responsive {
    overflow: visible;
}

.table-card .card-header {
    background-color: #fff;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 600;
}

.table th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    border-top: none;
}

.action-btn {
    padding: 0.2rem 0.5rem;
    font-size: 0.78rem;
}

/* =====================================================================
   STATUS BADGES
   ===================================================================== */

/* Jobs */
.badge-assigned    { background-color: #0d6efd !important; color: #fff; }
.badge-in_progress { background-color: #ffc107 !important; color: #000; }
.badge-completed   { background-color: #198754 !important; color: #fff; }
.badge-invoiced    { background-color: #6c757d !important; color: #fff; }
.badge-on_hold     { background-color: #6f42c1 !important; color: #fff; }
.badge-aborted     { background-color: #7a1f24 !important; color: #fff; }
.badge-cancelled   { background-color: #dc3545 !important; color: #fff; }
.badge-pending     { background-color: #fd7e14 !important; color: #000; }
.badge-open        { background-color: #0dcaf0 !important; color: #000; }
.badge-awaiting_allocation { background-color: #20c997 !important; color: #003a2c; }

/* Quotes */
.badge-draft     { background-color: #6c757d !important; color: #fff; }
.badge-sent      { background-color: #0dcaf0 !important; color: #000; }
.badge-approved  { background-color: #198754 !important; color: #fff; }
.badge-rejected  { background-color: #dc3545 !important; color: #fff; }
.badge-converted { background-color: #6f42c1 !important; color: #fff; }

/* Contracts */
.badge-active        { background-color: #198754 !important; color: #fff; }
.badge-expired       { background-color: #dc3545 !important; color: #fff; }
.badge-expiring_soon { background-color: #ffc107 !important; color: #000; }
.badge-pending       { background-color: #fd7e14 !important; color: #fff; }

/* Invoices */
.badge-issued  { background-color: #0d6efd !important; color: #fff; }
.badge-paid    { background-color: #198754 !important; color: #fff; }
.badge-overdue { background-color: #dc3545 !important; color: #fff; }

/* Priority / Risk */
.badge-low    { background-color: #198754 !important; color: #fff; }
.badge-medium { background-color: #ffc107 !important; color: #000; }
.badge-high   { background-color: #dc3545 !important; color: #fff; }
.badge-urgent { background-color: #7209b7 !important; color: #fff; }

/* Training */
.badge-valid         { background-color: #198754 !important; color: #fff; }
.badge-expiring_soon { background-color: #ffc107 !important; color: #000; }

/* RA */
.badge-archived { background-color: #adb5bd !important; color: #000; }

/* =====================================================================
   DATATABLES OVERRIDES
   ===================================================================== */

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border: 1px solid #ced4da;
    border-radius: 6px;
    padding: 0.3rem 0.6rem;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #CC2229;
    outline: none;
    box-shadow: 0 0 0 0.15rem rgba(204,34,41,0.2);
}

/* =====================================================================
   MISC
   ===================================================================== */

.modal-content {
    border: none;
    border-radius: 12px;
}

.modal-header {
    border-bottom: 1px solid #f0f0f0;
}

.modal-footer {
    border-top: 1px solid #f0f0f0;
}

.form-label {
    font-size: 0.875rem;
}


/* =====================================================================
   CUSTOMER TYPE BADGES
   ===================================================================== */

.badge-ctype-apartments         { background-color: #0d6efd !important; color: #fff; }
.badge-ctype-commercial         { background-color: #6f42c1 !important; color: #fff; }
.badge-ctype-residential_domestic { background-color: #20c997 !important; color: #fff; }
.badge-ctype-government         { background-color: #0dcaf0 !important; color: #000; }
.badge-ctype-industrial         { background-color: #fd7e14 !important; color: #fff; }
.badge-ctype-landlord           { background-color: #6c757d !important; color: #fff; }
.badge-ctype-retail             { background-color: #e83e8c !important; color: #fff; }
.badge-ctype-school             { background-color: #198754 !important; color: #fff; }

/* =====================================================================
   CUSTOMER PAGE – HERO HEADER
   ===================================================================== */

.customer-hero {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    min-height: 140px;
}

.customer-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1B2A5B 0%, #CC2229 60%, #B01D23 100%);
    z-index: 0;
}

.customer-hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.07) 0%, transparent 50%),
        radial-gradient(circle at 80% 10%, rgba(255,255,255,0.1) 0%, transparent 40%);
}

.customer-hero-bg::after {
    content: '';
    position: absolute;
    top: -60%;
    right: -15%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 60%);
    border-radius: 50%;
}

.customer-hero-map {
    position: absolute;
    top: -20%;
    right: -15%;
    width: 70%;
    height: 140%;
    z-index: 1;
    pointer-events: none;
    mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.5) 30%, rgba(0,0,0,0.45) 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.5) 30%, rgba(0,0,0,0.45) 100%);
    opacity: 0.6;
}
.customer-hero-map #heroMap {
    width: 100%;
    height: 100%;
    filter: grayscale(0.3) brightness(1.1) contrast(1.05);
    pointer-events: none;
}

.customer-hero-content {
    position: relative;
    z-index: 2;
    padding: 1.5rem 1.75rem;
}

.customer-logo-box {
    width: 80px;
    height: 80px;
    border-radius: 14px;
    background: #fff;
    border: 2px solid rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transition: opacity 0.2s;
}
.customer-logo-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}
.customer-logo-box.customer-logo-empty {
    background: rgba(255,255,255,0.1);
    border: 2px dashed rgba(255,255,255,0.3);
    cursor: pointer;
}
.customer-logo-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    cursor: pointer;
    gap: 0;
}
.customer-logo-upload:hover { background: rgba(255,255,255,0.15); border-radius: 12px; }
.customer-logo-actions {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: rgba(0,0,0,0.55);
    opacity: 0;
    transition: opacity 0.2s;
    border-radius: 12px;
}
.customer-logo-box:hover .customer-logo-actions { opacity: 1; }
.btn-logo-action {
    width: 30px;
    height: 30px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.8rem;
}

.btn-hero-back {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 10px;
    padding: 0.4rem 0.6rem;
    transition: all 0.2s ease;
}
.btn-hero-back:hover { background: rgba(255,255,255,0.25); color: #fff; }

.btn-hero-action {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    border-radius: 10px;
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
}
.btn-hero-action:hover { background: rgba(255,255,255,0.3); color: #fff; transform: translateY(-1px); }

.badge-hero-active   { background: rgba(25,135,84,0.3); border: 1px solid rgba(25,135,84,0.5); color: #d1fae5; }
.badge-hero-inactive { background: rgba(108,117,125,0.3); border: 1px solid rgba(108,117,125,0.5); color: #e2e6ea; }

/* =====================================================================
   CUSTOMER PAGE – NAV DOCK (icon cluster)
   ===================================================================== */

.nav-bar {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 60px;
}

/* ── Each item: icon + hidden label ── */
.nav-bar-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 50px;
    transition: all 0.35s cubic-bezier(.4,0,.2,1);
    white-space: nowrap;
    background: transparent;
}

/* ── Icon circle ── */
.nav-bar-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
    background: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.85);
    transition: all 0.35s cubic-bezier(.4,0,.2,1);
}

/* ── Label: collapsed by default ── */
.nav-bar-label {
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    transition: max-width 0.35s cubic-bezier(.4,0,.2,1),
                opacity 0.25s ease,
                padding 0.35s ease;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* ── Count badge ── */
.nav-bar-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    font-size: 0.68rem;
    font-weight: 700;
    background: rgba(255,255,255,0.25);
    color: #fff;
    line-height: 1;
}

/* ── Hover: grow icon, reveal label ── */
.nav-bar-item:hover {
    background: rgba(255,255,255,0.1);
}

.nav-bar-item:hover .nav-bar-icon {
    transform: scale(1.15);
    background: rgba(255,255,255,0.22);
    color: #fff;
}

.nav-bar-item:hover .nav-bar-label {
    max-width: 130px;
    opacity: 1;
    padding: 0 0.6rem 0 0.45rem;
}

/* ── Active state: expanded with filled icon ── */
.nav-bar-item.active {
    background: rgba(255,255,255,0.15);
    padding-right: 0.2rem;
}

.nav-bar-item.active .nav-bar-icon {
    background: #fff;
    color: #CC2229;
    box-shadow: 0 3px 12px rgba(0,0,0,0.15);
    transform: scale(1.1);
}

.nav-bar-item.active .nav-bar-label {
    max-width: 130px;
    opacity: 1;
    padding: 0 0.6rem 0 0.45rem;
}

/* ── Responsive: smaller icons on mobile ── */
@media (max-width: 575.98px) {
    .nav-bar { gap: 0.25rem; padding: 0.4rem 0.5rem; }
    .nav-bar-icon { width: 34px; height: 34px; font-size: 0.9rem; }
    .nav-bar-item:hover .nav-bar-label,
    .nav-bar-item.active .nav-bar-label { max-width: 100px; font-size: 0.7rem; }
}

/* =====================================================================
   CUSTOMER PAGE – GLASS CARDS
   ===================================================================== */

.glass-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 2px 16px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.glass-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.08);
}

.glass-card-header {
    padding: 1rem 1.25rem;
    font-weight: 700;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    color: #343a40;
    display: flex;
    align-items: center;
}

.glass-card-body {
    padding: 1.25rem;
}

/* Detail rows inside glass-card */
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 1rem;
}

.detail-label {
    font-size: 0.8rem;
    color: #6c757d;
    flex-shrink: 0;
    min-width: 110px;
}

.detail-value {
    font-size: 0.88rem;
    color: #1d1d1b;
    text-align: right;
}

/* Quick stats list */
.quick-stat {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.88rem;
}

.quick-stat-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Activity feed */
.activity-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid #f8f9fa;
}

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* =====================================================================
   CUSTOMER PAGE – CONTACT CARDS
   ===================================================================== */

.contact-card {
    transition: all 0.3s ease;
}
.contact-card:hover {
    transform: translateY(-3px);
}

.contact-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0d6efd, #6ea8fe);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 1px;
}

/* =====================================================================
   CUSTOMER PAGE – SITE CARDS
   ===================================================================== */

.site-card {
    position: relative;
    transition: all 0.3s ease;
}

.site-card:hover {
    transform: translateY(-3px);
}

.site-card-accent {
    height: 3px;
    background: linear-gradient(90deg, #198754, #2ed573);
}

.btn-view-site {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(25,135,84,0.1);
    color: #198754;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
    border: none;
}
.btn-view-site:hover {
    background: #198754;
    color: #fff;
    transform: translateX(2px);
}

/* =====================================================================
   CUSTOMER PAGE – MODERN TABLES
   ===================================================================== */

.table-modern {
    font-size: 0.85rem;
}

.table-modern thead th {
    background: #f8f9fa;
    font-weight: 700;
    font-size: 0.73rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    padding: 0.85rem 1rem;
    border-bottom: 2px solid #e9ecef;
    white-space: nowrap;
}

.table-modern tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
}

.table-modern tbody tr {
    transition: background 0.15s ease;
}

.table-modern tbody tr:hover {
    background: rgba(204,34,41,0.03);
}

/* =====================================================================
   CUSTOMER PAGE – PILL BADGES
   ===================================================================== */

.badge-pill {
    display: inline-block;
    padding: 0.3em 0.7em;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-pill-primary   { background: rgba(13,110,253,0.12); color: #0d6efd; }
.badge-pill-success   { background: rgba(25,135,84,0.12); color: #198754; }
.badge-pill-warning   { background: rgba(255,193,7,0.15); color: #b58900; }
.badge-pill-danger    { background: rgba(204,34,41,0.12); color: #CC2229; }
.badge-pill-info      { background: rgba(13,202,240,0.12); color: #0aa2c0; }
.badge-pill-secondary { background: rgba(108,117,125,0.12); color: #6c757d; }
.badge-pill-dark      { background: rgba(52,58,64,0.12); color: #343a40; }

/* =====================================================================
   CUSTOMER PAGE – GRADIENT BUTTONS
   ===================================================================== */

.btn-gradient-purple {
    background: linear-gradient(135deg, #6f42c1, #b983ff);
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.45rem 1rem;
    transition: all 0.2s ease;
}
.btn-gradient-purple:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(111,66,193,0.35); color: #fff; }

.btn-gradient-orange {
    background: linear-gradient(135deg, #fd7e14, #ffa502);
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.45rem 1rem;
    transition: all 0.2s ease;
}
.btn-gradient-orange:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(253,126,20,0.35); color: #fff; }

.btn-icon-delete {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(220,53,69,0.08);
    color: #dc3545;
    border: none;
    transition: all 0.2s ease;
}
.btn-icon-delete:hover {
    background: #dc3545;
    color: #fff;
    transform: scale(1.1);
}

/* =====================================================================
   CUSTOMER PAGE – EMPTY STATES
   ===================================================================== */

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.8rem;
    color: #adb5bd;
}

/* =====================================================================
   CUSTOMER PAGE – RESPONSIVE
   ===================================================================== */

@media (max-width: 767.98px) {
    .customer-hero-content { padding: 1rem; }
    .customer-logo-box { width: 56px; height: 56px; border-radius: 10px; }
    .customer-hero-map { display: none; }
    .customer-hero h3 { font-size: 1.15rem; }
}

/* Tab transitions */
.tab-pane {
    animation: tabFadeIn 0.3s ease-out;
}

@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =====================================================================
   SIDEBAR SUBMENU
   ===================================================================== */

.sidebar-submenu {
    padding: 0;
    background-color: rgba(0,0,0,0.15);
}

.sidebar-submenu .nav-link {
    padding: 0.55rem 1.25rem 0.55rem 2.8rem !important;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.6);
    border-left: 3px solid transparent;
}

.sidebar-submenu .nav-link:hover {
    color: #ffffff;
    background-color: rgba(255,255,255,0.05);
    border-left-color: rgba(204,34,41,0.5);
}

.sidebar-submenu .nav-link.active {
    color: #ffffff;
    background-color: rgba(204,34,41,0.18);
    border-left-color: #CC2229;
    font-weight: 600;
}

.sidebar-submenu .nav-link i {
    font-size: 0.85rem;
    width: 1rem;
}

/* Sidebar chevron rotation */
.sidebar-chevron {
    font-size: 0.7rem;
    transition: transform 0.25s ease;
}

.bms-sidebar .nav-link span,
.sidebar-toolbar-title,
.sidebar-pin-label,
.sidebar-chevron {
    transition: opacity 0.18s ease, visibility 0.18s ease, width 0.18s ease;
}

.nav-link[aria-expanded="true"] .sidebar-chevron {
    transform: rotate(180deg);
}

.nav-link[aria-expanded="false"] .sidebar-chevron {
    transform: rotate(0deg);
}

/* =====================================================================
   SEARCH / FILTER PANEL
   ===================================================================== */

.search-filter-card {
    border: 1px solid #e2e6ea;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.search-filter-card .card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
    font-size: 0.9rem;
}

.search-filter-card .form-label {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
    color: #495057;
}

.search-filter-card .form-control-sm,
.search-filter-card .form-select {
    font-size: 0.82rem;
}

.search-filter-card .form-text {
    font-size: 0.72rem;
}

.search-filter-card .form-check-label {
    font-size: 0.82rem;
}

/* =====================================================================
   SELECT2 OVERRIDES (Bootstrap 5 theme tweaks)
   ===================================================================== */

.select2-container--bootstrap-5 .select2-selection {
    border-color: #dee2e6;
    min-height: 38px;
    font-size: 0.875rem;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
    background-color: #CC2229;
    border-color: #CC2229;
    color: #fff;
    font-size: 0.78rem;
    padding: 2px 8px;
    border-radius: 4px;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove {
    color: rgba(255,255,255,0.7);
    margin-right: 4px;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #fff;
}

.select2-container--bootstrap-5 .select2-dropdown {
    border-color: #dee2e6;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    font-size: 0.85rem;
}

.select2-container--bootstrap-5 .select2-results__option--selected {
    background-color: rgba(204,34,41,0.1);
}

.select2-container--bootstrap-5 .select2-results__option--highlighted {
    background-color: #CC2229;
    color: #fff;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Compact select2 inside filter card */
.search-filter-card .select2-container--bootstrap-5 .select2-selection {
    min-height: 32px;
    font-size: 0.82rem;
}

.search-filter-card .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
    font-size: 0.72rem;
    padding: 1px 6px;
}

/* Job detail edit modal: keep selected engineer chips neutral (not brand-red pills). */
#editJobModal .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
    background-color: #e9ecef;
    border-color: #ced4da;
    color: #212529;
}

#editJobModal .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove {
    color: #6c757d;
}

#editJobModal .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #212529;
}

/* ═══════════════════════════════════════════════════════════════
   Job Wizard — Step Indicator
   ═══════════════════════════════════════════════════════════════ */

.wizard-header {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 1.5rem 1rem 1.25rem;
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
}

.wizard-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    text-align: center;
    min-width: 0;
}

.wizard-step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 19px;
    left: calc(50% + 22px);
    right: calc(-50% + 22px);
    height: 2px;
    background: #dee2e6;
    z-index: 0;
    transition: background 0.3s;
}

.wizard-step-item.completed:not(:last-child)::after {
    background: var(--bs-primary);
}

.wizard-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    background: #fff;
    color: #adb5bd;
    position: relative;
    z-index: 1;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.wizard-step-item.active .wizard-step-number {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff;
}

.wizard-step-item.completed .wizard-step-number {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff;
}

.wizard-step-label {
    font-size: 0.75rem;
    margin-top: 0.5rem;
    color: #adb5bd;
    font-weight: 400;
    white-space: nowrap;
    transition: color 0.2s;
}

.wizard-step-item.active .wizard-step-label {
    color: var(--bs-primary);
    font-weight: 600;
}

.wizard-step-item.completed .wizard-step-label {
    color: #495057;
    font-weight: 500;
}

/* Wizard panels — only active one is visible */
.wizard-panel {
    display: none;
}

.wizard-panel.active {
    display: block;
    animation: wizardFadeIn 0.2s ease-in-out;
}

@keyframes wizardFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0);   }
}

/* Priority badge colours */
.priority-badge-1 { background-color: #198754; color: #fff; }
.priority-badge-2 { background-color: #0d6efd; color: #fff; }
.priority-badge-3 { background-color: #fd7e14; color: #fff; }
.priority-badge-4 { background-color: #dc3545; color: #fff; }

/* ═══════════════════════════════════════════════════════════════
   ENGINEER PLANNER — FullCalendar Resource Timeline
   ═══════════════════════════════════════════════════════════════ */

/* --- FullCalendar chrome overrides -------------------------------- */

/* Remove default FC border */
#plannerCalendar .fc {
    font-family: 'Lato', sans-serif;
    font-size: 0.82rem;
}

/* Header toolbar (prev/next/title/view buttons) */
#plannerCalendar .fc-toolbar {
    padding: 0.75rem 1rem 0.5rem;
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0 !important;
}

#plannerCalendar .fc-toolbar-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1B2A5B;
    letter-spacing: 0.01em;
}

/* Nav & view buttons */
#plannerCalendar .fc-button {
    background: #f4f5f7;
    border: 1px solid #dee2e6;
    color: #343a40;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
    text-transform: none;
    box-shadow: none !important;
}

#plannerCalendar .fc-button:hover,
#plannerCalendar .fc-button:focus {
    background: #e2e6ea;
    color: #1B2A5B;
    border-color: #ced4da;
}

#plannerCalendar .fc-button-primary:not(.fc-button-active):not(:disabled):hover {
    background: #e2e6ea;
    border-color: #ced4da;
    color: #1B2A5B;
}

#plannerCalendar .fc-button-active,
#plannerCalendar .fc-button-primary.fc-button-active {
    background: #CC2229 !important;
    border-color: #CC2229 !important;
    color: #fff !important;
}

#plannerCalendar .fc-today-button {
    background: #1B2A5B;
    border-color: #1B2A5B;
    color: #fff;
}

#plannerCalendar .fc-today-button:hover {
    background: #152248;
    border-color: #152248;
    color: #fff;
}

/* Column header rows */
#plannerCalendar .fc-col-header-cell {
    background: #f8f9fa;
    border-color: #dee2e6 !important;
}

#plannerCalendar .fc-col-header-cell-cushion {
    color: #495057;
    font-weight: 700;
    font-size: 0.76rem;
    padding: 4px 3px;
    line-height: 1.3;
    text-decoration: none !important;
}

/* Today column highlight */
#plannerCalendar .fc-day-today {
    background: rgba(204, 34, 41, 0.055) !important;
}

#plannerCalendar .fc-day-today .fc-col-header-cell-cushion {
    color: #CC2229;
}

/* Resource (engineer) area */
#plannerCalendar .fc-datagrid-header .fc-datagrid-cell-cushion {
    font-weight: 700;
    font-size: 0.78rem;
    color: #1B2A5B;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

#plannerCalendar .fc-datagrid-cell-cushion {
    font-size: 0.82rem;
    font-weight: 600;
    color: #343a40;
    padding: 6px 10px;
}

/* Resource group row */
#plannerCalendar .fc-resource-group .fc-datagrid-cell-cushion {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #fff;
    background: #1B2A5B;
    padding: 4px 10px;
}

#plannerCalendar .fc-resource-group td {
    background: #1B2A5B;
    border-color: #152248 !important;
}

/* Timeline slot cells */
#plannerCalendar .fc-timeline-slot {
    border-color: #e9ecef !important;
}

#plannerCalendar .fc-timeline-lane {
    border-color: #e9ecef !important;
}

/* Alternating row tint */
#plannerCalendar .fc-resource:nth-child(even) .fc-datagrid-cell,
#plannerCalendar .fc-resource:nth-child(even) .fc-timeline-lane {
    background: #fafbfc;
}

/* Events */
#plannerCalendar .fc-event {
    border-radius: 4px;
    border: none;
    font-size: 0.73rem;
    font-weight: 600;
    padding: 2px 5px;
    cursor: pointer;
}

#plannerCalendar .fc-event:hover {
    filter: brightness(0.9);
}

/* Scrollable area */
#plannerCalendar .fc-scroller {
    overflow-x: auto !important;
}

/* Thin scrollbar */
#plannerCalendar .fc-scroller::-webkit-scrollbar { height: 5px; width: 5px; }
#plannerCalendar .fc-scroller::-webkit-scrollbar-track { background: #f1f3f5; }
#plannerCalendar .fc-scroller::-webkit-scrollbar-thumb { background: #ced4da; border-radius: 3px; }

/* ── Planner colour swatches ── */
.planner-color-swatch {
    display:       inline-block;
    width:         28px;
    height:        28px;
    border-radius: 50%;
    cursor:        pointer;
    border:        3px solid transparent;
    transition:    border-color 0.15s;
}
.planner-color-swatch.selected,
.planner-color-swatch:has(input:checked) {
    border-color: #212529;
    box-shadow:   0 0 0 2px #fff inset;
}
