/* =========================================================
   Radar 2.0 Customer / Training Theme - Bootstrap 5
   File: /css/radar_customer_bs5.css
   ========================================================= */

:root {
    --radar-customer-primary: #1f4e79;
    --radar-customer-primary-dark: #173b5c;
    --radar-customer-primary-soft: #e7f0f8;

    --radar-customer-bg: #f3f7fb;
    --radar-customer-card-bg: #ffffff;
    --radar-customer-border: #cfddea;

    --radar-customer-text: #243044;
    --radar-customer-muted: #66758a;

    --radar-customer-success: #2f6f4e;
    --radar-customer-warning: #9a6a13;
    --radar-customer-danger: #9f2d2d;

    --radar-radius-lg: 16px;
    --radar-radius-md: 10px;
    --radar-shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.08);
}
/* Page basics */

body.radar-customer-body {
    background: var(--radar-customer-bg);
    color: var(--radar-customer-text);
    min-height: 100vh;
}

/* Login / access page */

.radar-customer-login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.radar-customer-login-card {
    width: 100%;
    max-width: 460px;
    background: var(--radar-customer-card-bg);
    border: 1px solid var(--radar-customer-border);
    border-radius: var(--radar-radius-lg);
    box-shadow: var(--radar-shadow-soft);
    padding: 2rem;
}

.radar-customer-brand {
    color: var(--radar-customer-primary);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.radar-customer-subtitle {
    color: var(--radar-customer-muted);
    font-size: 0.95rem;
}

.radar-customer-login-card .form-label {
    font-weight: 600;
    color: var(--radar-customer-text);
}

.radar-customer-login-card .form-control {
    border-color: var(--radar-customer-border);
    border-radius: var(--radar-radius-md);
}

.radar-customer-login-card .form-control:focus {
    border-color: var(--radar-customer-primary);
    box-shadow: 0 0 0 0.2rem rgba(31, 78, 121, 0.18);
}

.btn-radar-customer {
    background: var(--radar-customer-primary);
    border-color: var(--radar-customer-primary);
    color: #ffffff;
    font-weight: 700;
    border-radius: var(--radar-radius-md);
}

.btn-radar-customer:hover,
.btn-radar-customer:focus {
    background: var(--radar-customer-primary-dark);
    border-color: var(--radar-customer-primary-dark);
    color: #ffffff;
}

.radar-customer-help-text {
    color: var(--radar-customer-muted);
    font-size: 0.85rem;
}

/* Shared customer portal structure */

.radar-customer-shell {
    min-height: 100vh;
    background: var(--radar-customer-bg);
}

.radar-customer-header {
    background: #ffffff;
    border-bottom: 1px solid var(--radar-customer-border);
}

.radar-customer-page-title {
    color: var(--radar-customer-primary);
    font-weight: 700;
}

.radar-customer-card {
    background: var(--radar-customer-card-bg);
    border: 1px solid var(--radar-customer-border);
    border-radius: var(--radar-radius-lg);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.radar-customer-card-title {
    color: var(--radar-customer-primary);
    font-weight: 700;
}

.radar-customer-muted {
    color: var(--radar-customer-muted);
}

/* Facility cards / L2 listing */

.radar-facility-card {
    transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.radar-facility-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--radar-shadow-soft);
}

.radar-facility-cmaid {
    color: var(--radar-customer-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

/* Alerts */

.alert-radar-customer {
    background: var(--radar-customer-primary-soft);
    border-color: var(--radar-customer-border);
    color: var(--radar-customer-text);
}
/* =========================================================
   CUSTOMER LOGIN PAGE - RADAR BLUE THEME
   ========================================================= */

html,
body {
    height: 100%;
    overflow-x: hidden;
}

body.radar-customer.customer-login {
    min-height: 100vh;
    background: linear-gradient(
        135deg,
        #1f4e79,
        #123656
    );
    color: #ffffff;
    overflow: hidden;
    position: relative;
}

/* Show radar background only on customer login page */
body.radar-customer.customer-login .radar-bg {
    display: block;
}

body:not(.customer-login) .radar-bg {
    display: none;
}

/* Main login page layout */
.customer-login .customer-login-stage {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.customer-login .customer-login-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.customer-login .customer-login-panel {
    text-align: center;
    max-width: 760px;
    width: 100%;
}

.customer-login .login-badge-wrap {
    display: inline-block;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(6px);
    margin-bottom: 1.25rem;
}

.customer-login img.login-badge {
    border: 0;
    padding: 0;
    border-radius: 0;
    width: auto;
    max-width: 220px;
    height: auto;
}

.customer-login .customer-login-title {
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.28);
    margin-bottom: 0.25rem;
}

.customer-login .customer-login-subtitle {
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.customer-login .customer-login-form {
    max-width: 430px;
    margin: 0 auto;
}

.customer-login .customer-login-form input[type="text"],
.customer-login .customer-login-form input[type="password"] {
    width: 100%;
    font-size: 1.8rem;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.94);
    color: #111827;
    text-align: center;
    margin-bottom: 0.75rem;
}

.customer-login .customer-login-form input[type="text"]:focus,
.customer-login .customer-login-form input[type="password"]:focus {
    outline: none;
    border-color: #8ed1ff;
    box-shadow: 0 0 0 0.22rem rgba(142, 209, 255, 0.28);
}

.customer-login .btn-customer-login {
    font-size: 1.75rem;
    font-weight: 800;
    padding: 0.45rem 2rem;
    border-radius: 10px;
    background: #2f80c4;
    border-color: #8ed1ff;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.customer-login .btn-customer-login:hover,
.customer-login .btn-customer-login:focus {
    background: #1f6faa;
    border-color: #b9e3ff;
    color: #ffffff;
}

.customer-login .customer-login-error {
    max-width: 620px;
    margin: 1rem auto;
    font-weight: 700;
}

.customer-login #caps-warning {
    margin-top: 0.75rem;
    padding: 0.5rem;
    border-radius: 8px;
    font-weight: 800;
}

.customer-login .customer-login-footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 18px 10px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.82);
}

.customer-login .customer-login-footer a {
    color: rgba(185, 227, 255, 0.95);
    text-decoration: none;
}

.customer-login .customer-login-footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* =========================================================
   CUSTOMER RADAR BACKGROUND SYSTEM - BLUE VARIANT
   ========================================================= */

.customer-login .radar-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;

    --grid: rgba(255, 255, 255, 0.065);
    --ring: rgba(185, 227, 255, 0.105);
    --sweep: rgba(96, 190, 255, 0.18);
    --sweep-edge: rgba(185, 227, 255, 0.48);
    --cycle: 4.8s;
}

/* Grid, rings, and vignette */
.customer-login .radar-bg::before {
    content: "";
    position: absolute;
    inset: -15%;
    background:
        radial-gradient(circle at 50% 50%,
            transparent 0 9%,
            var(--ring) 9% 9.3%,
            transparent 9.3% 18%,
            var(--ring) 18% 18.3%,
            transparent 18.3% 28%,
            var(--ring) 28% 28.3%,
            transparent 28.3% 40%,
            var(--ring) 40% 40.3%,
            transparent 40.3% 55%,
            var(--ring) 55% 55.3%,
            transparent 55.3% 100%),

        linear-gradient(var(--grid), var(--grid)) 50% 0 / 1px 100% no-repeat,
        linear-gradient(var(--grid), var(--grid)) 0 50% / 100% 1px no-repeat,

        radial-gradient(circle at 50% 50%,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0.26) 65%,
            rgba(0, 0, 0, 0.46) 100%);
}

/* Sweeper bar */
.customer-login .radar-bg::after {
    content: "";
    position: absolute;
    inset: -80vmax;
    transform-origin: 50% 50%;
    animation: customerRadarSweep var(--cycle) linear infinite;

    background: conic-gradient(from 0deg at 50% 50%,
        transparent 0deg 338deg,

        rgba(96, 190, 255, 0.00) 338deg,
        rgba(96, 190, 255, 0.06) 344deg,
        rgba(96, 190, 255, 0.12) 348deg,
        rgba(96, 190, 255, 0.18) 351deg,

        rgba(185, 227, 255, 0.58) 352deg,
        rgba(185, 227, 255, 0.00) 353deg,

        transparent 360deg
    );

    mix-blend-mode: screen;
}

@keyframes customerRadarSweep {
    to {
        transform: rotate(360deg);
    }
}

/* Bogies */
.customer-login .bogey {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 105, 105, 0.9);
    box-shadow: 0 0 10px rgba(255, 105, 105, 0.38);
    opacity: 0.45;
    animation: customerBogeyBlip var(--cycle) linear infinite;
}

.customer-login .b1 { left: 22%; top: 38%; animation-delay: -0.2s; }
.customer-login .b2 { left: 64%; top: 30%; animation-delay: -3.3s; }
.customer-login .b3 { left: 55%; top: 62%; animation-delay: -2.6s; }
.customer-login .b4 { left: 33%; top: 70%; animation-delay: -3.7s; }

@keyframes customerBogeyBlip {
    0%, 85% {
        opacity: 0.55;
        transform: scale(1);
    }

    92% {
        opacity: 1;
        transform: scale(1.7);
        box-shadow: 0 0 28px rgba(255, 105, 105, 0.72);
    }

    100% {
        opacity: 0.55;
        transform: scale(1);
    }
}

@media (max-width: 576px) {
    .customer-login .customer-login-title {
        font-size: 1.8rem;
    }

    .customer-login .customer-login-form input[type="text"],
    .customer-login .customer-login-form input[type="password"],
    .customer-login .btn-customer-login {
        font-size: 1.35rem;
    }

    .customer-login img.login-badge {
        max-width: 170px;
    }
}

/* Safety Talks dashboard dropdowns */
.safety-talk-dropdown {
    max-height: 320px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.safety-talk-dropdown .dropdown-item {
    white-space: normal;
    line-height: 1.25;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

.toolbox-card,
.toolbox-card .card-body,
.safety-talk-stack,
.safety-talk-panel,
.safety-talk-panel .dropdown {
    overflow: visible;
}



/* Customer dashboard system message card */
.system-messages-card {
    height: 100%;
}

.system-message-scroll {
    max-height: 260px;
    overflow-y: auto;
    padding-right: 0.35rem;
	scrollbar-gutter: stable;
}

.system-message-item {
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.system-message-item:last-child {
    border-bottom: none;
}

/* =========================================================
   CUSTOMER NAV / SHELL
   ========================================================= */

.radar-customer {
    background:
        radial-gradient(circle at 30% 0%,
            rgba(96, 190, 255, 0.12),
            rgba(0, 0, 0, 0) 45%),
        linear-gradient(180deg, #10283d 0%, #0b1b2a 100%);
    color: rgba(255, 255, 255, 0.88);
    min-height: 100vh;
}

.radar-customer main.container,
.radar-customer main.container-fluid {
    padding-top: 1.25rem;
}

.radar-customer-navbar {
    background: linear-gradient(180deg, #153a5c 0%, #0d253b 100%);
    border-bottom: 1px solid rgba(142, 209, 255, 0.32);
    padding-top: 4px;
    padding-bottom: 4px;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 22px rgba(96, 190, 255, 0.20),
        0 8px 20px rgba(0, 0, 0, 0.45);
}

.radar-customer-navbar .navbar-brand {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.radar-customer-navbar .navbar-brand .brand-accent {
    color: #8ed1ff;
}

.radar-customer-navbar .nav-link {
    color: rgba(255, 255, 255, 0.82);
    font-weight: 600;
    letter-spacing: 0.02em;
    padding-top: 6px;
    padding-bottom: 6px;
    line-height: 1.1;
}

.radar-customer-navbar .nav-link:hover {
    color: #8ed1ff;
    text-shadow: 0 0 4px rgba(142, 209, 255, 0.35);
}

.radar-customer-navbar .nav-link.active {
    color: #8ed1ff !important;
    position: relative;
}

.radar-customer-navbar .nav-link.active::after {
    content: '';
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 0;
    height: 3px;
    background: linear-gradient(
        90deg,
        rgba(142, 209, 255, 0.18),
        #8ed1ff,
        rgba(142, 209, 255, 0.18)
    );
    box-shadow:
        0 0 6px rgba(142, 209, 255, 0.45),
        0 0 14px rgba(142, 209, 255, 0.18);
    border-radius: 999px;
}

.radar-customer-navbar .customer-nav-subtext {
    color: rgba(255, 255, 255, 0.62);
}

.radar-customer .radar-customer-card,
.radar-customer .card {
    background: #f3f7fb;
    color: #0f1720;
    border: 1px solid rgba(142, 209, 255, 0.22);
    border-radius: 16px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
}

.radar-customer .card-header {
    background: transparent;
    border-bottom: 1px solid rgba(15, 23, 32, 0.12);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.radar-customer .page-header {
    margin: 8px 0 10px;
    padding: 0 4px;
}

.radar-customer .page-header .page-context {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(142, 209, 255, 0.86);
    margin-bottom: 6px;
}

.radar-customer .page-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0 0 10px;
    color: rgba(255, 255, 255, 0.94);
}

.radar-customer .page-header .page-divider {
    height: 1px;
    background: linear-gradient(
        90deg,
        rgba(142, 209, 255, 0.55),
        rgba(142, 209, 255, 0.15),
        rgba(142, 209, 255, 0)
    );
}

.radar-customer .customer-footer {
    border-top-color: rgba(142, 209, 255, 0.20) !important;
}

.radar-customer .customer-footer a {
    color: rgba(185, 227, 255, 0.82);
    text-decoration: none;
}

.radar-customer .customer-footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* =========================================================
   CUSTOMER NAV - COMPACT INSTRUMENT RAIL
   ========================================================= */

.cust-instrument-nav {
    min-height: 44px;
    padding-top: 2px;
    padding-bottom: 2px;
    background:
        linear-gradient(180deg, rgba(23, 70, 108, 0.98), rgba(10, 30, 48, 0.98)),
        radial-gradient(circle at 12% 50%, rgba(142, 209, 255, 0.16), transparent 30%);
    border-bottom: 1px solid rgba(142, 209, 255, 0.28);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 18px rgba(96, 190, 255, 0.18),
        0 6px 16px rgba(0, 0, 0, 0.42);
}

.cust-instrument-nav .container-fluid {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
}

.cust-instrument-nav .cust-brand {
    font-size: 0.98rem;
    font-weight: 800;
    letter-spacing: 0.075em;
    padding-top: 4px;
    padding-bottom: 4px;
    color: rgba(255, 255, 255, 0.94);
}

.cust-instrument-nav .cust-brand span {
    color: #8ed1ff;
}

.cust-instrument-nav .navbar-nav .nav-link {
    position: relative;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.035em;
    text-transform: uppercase;
    padding: 8px 10px;
    color: rgba(255, 255, 255, 0.78);
}

.cust-instrument-nav .navbar-nav .nav-link:hover,
.cust-instrument-nav .navbar-nav .nav-link:focus {
    color: #b9e3ff;
    text-shadow: 0 0 5px rgba(142, 209, 255, 0.42);
}

.cust-instrument-nav .navbar-nav .nav-link.active {
    color: #ffffff !important;
}

.cust-instrument-nav .navbar-nav .nav-link.active::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 2px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        rgba(142, 209, 255, 0.15),
        #8ed1ff,
        rgba(142, 209, 255, 0.15)
    );
    box-shadow:
        0 0 6px rgba(142, 209, 255, 0.55),
        0 0 14px rgba(142, 209, 255, 0.24);
}

.cust-instrument-nav .dropdown-menu {
    background: #0b1b2a;
    border: 1px solid rgba(142, 209, 255, 0.28);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    padding: 0.45rem;
}

.cust-instrument-nav .dropdown-item {
    color: rgba(255, 255, 255, 0.84);
    border-radius: 8px;
    font-size: 0.9rem;
    padding: 0.42rem 0.65rem;
}

.cust-instrument-nav .dropdown-item:hover,
.cust-instrument-nav .dropdown-item:focus {
    background: rgba(142, 209, 255, 0.16);
    color: #b9e3ff;
}

.cust-instrument-nav .dropdown-divider {
    border-color: rgba(142, 209, 255, 0.18);
}

.cust-nav-readout {
    margin-left: 0.5rem;
}

.cust-nav-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 340px;
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(2, 12, 22, 0.42);
    border: 1px solid rgba(142, 209, 255, 0.22);
    color: rgba(255, 255, 255, 0.88);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 0 10px rgba(96, 190, 255, 0.08);
    font-size: 0.78rem;
    white-space: nowrap;
}

.cust-nav-chip .chip-label {
    color: rgba(142, 209, 255, 0.84);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-size: 0.66rem;
}

.cust-nav-chip .chip-value {
    overflow: hidden;
    text-overflow: ellipsis;
}

.cust-nav-chip-link {
    text-decoration: none;
    color: #b9e3ff;
    font-weight: 800;
}

.cust-nav-chip-link:hover {
    color: #ffffff;
    border-color: rgba(185, 227, 255, 0.48);
    box-shadow:
        0 0 12px rgba(142, 209, 255, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}


/* =========================================================
   CUSTOMER DASHBOARD - L1 COMMAND CENTER
   ========================================================= */

.customer-dashboard-wrap {
    max-width: 1600px;
}

.customer-dashboard-subtitle {
    color: rgba(185, 227, 255, 0.84);
    font-size: 0.95rem;
}

.customer-dashboard-subtitle a {
    color: #b9e3ff;
    text-decoration: none;
    font-weight: 700;
}

.customer-dashboard-subtitle a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.customer-dashboard-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(2, 12, 22, 0.38);
    border: 1px solid rgba(142, 209, 255, 0.24);
    color: rgba(255, 255, 255, 0.86);
    font-weight: 700;
    font-size: 0.82rem;
}

.customer-dashboard-status-pill .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6ee7b7;
    box-shadow: 0 0 10px rgba(110, 231, 183, 0.7);
}

/* Shared dashboard card details */

.dashboard-card-kicker {
    color: rgba(31, 78, 121, 0.78);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.dashboard-card-title {
    color: #123656;
    font-size: 1.35rem;
    font-weight: 800;
}

.dashboard-card-subtitle {
    color: #66758a;
    font-size: 0.92rem;
}

.customer-feature-card {
    overflow: hidden;
}

.customer-card-note {
    color: #66758a;
    font-size: 0.82rem;
}

/* Radar Scope Card */

.radar-scope-card {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(12, 34, 54, 0.98), rgba(7, 22, 36, 0.98)) !important;
    color: #ffffff !important;
    border-color: rgba(142, 209, 255, 0.28) !important;
}

.radar-scope-card .dashboard-card-kicker {
    color: rgba(142, 209, 255, 0.86);
}

.radar-scope-card .dashboard-card-title {
    color: #ffffff;
}

.radar-scope-card .dashboard-card-subtitle {
    color: rgba(255, 255, 255, 0.66);
}

.radar-scope-bg {
    position: absolute;
    inset: -35%;
    pointer-events: none;
    opacity: 0.68;
}

.radar-scope-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 50%,
            transparent 0 12%,
            rgba(142, 209, 255, 0.17) 12% 12.5%,
            transparent 12.5% 25%,
            rgba(142, 209, 255, 0.14) 25% 25.5%,
            transparent 25.5% 39%,
            rgba(142, 209, 255, 0.11) 39% 39.5%,
            transparent 39.5% 56%,
            rgba(142, 209, 255, 0.09) 56% 56.5%,
            transparent 56.5% 100%),
        linear-gradient(rgba(142, 209, 255, 0.11), rgba(142, 209, 255, 0.11)) 50% 0 / 1px 100% no-repeat,
        linear-gradient(90deg, rgba(142, 209, 255, 0.11), rgba(142, 209, 255, 0.11)) 0 50% / 100% 1px no-repeat;
}

.radar-scope-bg::after {
    content: "";
    position: absolute;
    inset: -50%;
    transform-origin: 50% 50%;
    animation: customerScopeSweep 9s linear infinite;
    background: conic-gradient(from 0deg at 50% 50%,
        transparent 0deg 340deg,
        rgba(96, 190, 255, 0.00) 340deg,
        rgba(96, 190, 255, 0.10) 346deg,
        rgba(96, 190, 255, 0.22) 350deg,
        rgba(185, 227, 255, 0.52) 352deg,
        rgba(185, 227, 255, 0.00) 354deg,
        transparent 360deg
    );
    mix-blend-mode: screen;
}

@keyframes customerScopeSweep {
    to {
        transform: rotate(360deg);
    }
}

.radar-scope-mini {
    border: 1px solid rgba(142, 209, 255, 0.32);
    background: rgba(2, 12, 22, 0.42);
    color: #b9e3ff;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    padding: 0.3rem 0.45rem;
    border-radius: 999px;
}

.radar-scope-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.radar-scope-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 48px;
    padding: 0.7rem 0.85rem;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.075);
    border: 1px solid rgba(142, 209, 255, 0.16);
    color: rgba(255, 255, 255, 0.91);
    text-decoration: none;
    backdrop-filter: blur(2px);
    transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.radar-scope-row:hover {
    transform: translateY(-1px);
    background: rgba(142, 209, 255, 0.13);
    border-color: rgba(185, 227, 255, 0.38);
    box-shadow: 0 0 18px rgba(96, 190, 255, 0.12);
    color: #ffffff;
}

.radar-scope-row .scope-label {
    font-weight: 800;
}

.radar-scope-row .scope-right {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    white-space: nowrap;
}

.radar-scope-row .scope-count {
    font-size: 1.25rem;
    font-weight: 900;
}

.radar-scope-row .scope-open-text {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.78rem;
}

.radar-scope-row .scope-chevron {
    color: #8ed1ff;
    font-size: 1.4rem;
    line-height: 1;
}

.radar-scope-row.has-open-items .scope-count {
    color: #ffd166;
}

.radar-scope-row.no-open-items .scope-count {
    color: #6ee7b7;
}

/* Heat Stress */

.heat-stress-card {
    border-left-width: 8px !important;
    border-left-style: solid !important;
}

.heat-stress-card.heat-stress-gray {
    border-left-color: #adb5bd !important;
}

.heat-stress-card.heat-stress-green {
    border-left-color: #198754 !important;
}

.heat-stress-card.heat-stress-yellow {
    border-left-color: #ffc107 !important;
}

.heat-stress-card.heat-stress-orange {
    border-left-color: #fd7e14 !important;
}

.heat-stress-card.heat-stress-red {
    border-left-color: #dc3545 !important;
}

.heat-stress-card.heat-stress-purple {
    border-left-color: #6f42c1 !important;
}

.heat-level-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
}

.heat-level-badge.heat-stress-gray {
    background: rgba(173, 181, 189, 0.22);
    border: 1px solid rgba(108, 117, 125, 0.40);
    color: #495057;
}

.heat-level-badge.heat-stress-green {
    background: #198754;
    border: 1px solid #198754;
    color: #ffffff;
}

.heat-level-badge.heat-stress-yellow {
    background: #ffc107;
    border: 1px solid #ffc107;
    color: #1f2937;
}

.heat-level-badge.heat-stress-orange {
    background: #fd7e14;
    border: 1px solid #fd7e14;
    color: #ffffff;
}

.heat-level-badge.heat-stress-red {
    background: #dc3545;
    border: 1px solid #dc3545;
    color: #ffffff;
}

.heat-level-badge.heat-stress-purple {
    background: #6f42c1;
    border: 1px solid #6f42c1;
    color: #ffffff;
}

/* Messages */

.customer-count-pill {
    min-width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #1f4e79;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.82rem;
}

.system-message-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.system-message-item {
    padding: 0.85rem;
    border-radius: 12px;
    background: rgba(31, 78, 121, 0.07);
    border: 1px solid rgba(31, 78, 121, 0.13);
}

.system-message-title {
    color: #123656;
    font-weight: 900;
    margin-bottom: 0.2rem;
}

.system-message-body {
    color: #334155;
    font-size: 0.92rem;
}

.empty-state {
    color: #66758a;
    padding: 1rem;
    border-radius: 12px;
    border: 1px dashed rgba(31, 78, 121, 0.22);
    background: rgba(31, 78, 121, 0.04);
}

/* QR / Toolbox / Quick Actions */

.qr-placeholder {
    width: 86px;
    height: 86px;
    border-radius: 14px;
    border: 2px dashed rgba(31, 78, 121, 0.32);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(31, 78, 121, 0.72);
    font-weight: 900;
    letter-spacing: 0.12em;
    background:
        linear-gradient(45deg, rgba(31, 78, 121, 0.08) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(31, 78, 121, 0.08) 25%, transparent 25%),
        #ffffff;
    background-size: 12px 12px;
}

.toolbox-feature {
    padding: 0.85rem;
    border-radius: 12px;
    background: rgba(31, 78, 121, 0.07);
    border: 1px solid rgba(31, 78, 121, 0.13);
}

.toolbox-feature-label {
    color: #66758a;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.toolbox-feature-title {
    color: #123656;
    font-weight: 900;
}

.quick-action-card {
    display: block;
    height: 100%;
    padding: 1rem;
    border-radius: 14px;
    background: rgba(31, 78, 121, 0.06);
    border: 1px solid rgba(31, 78, 121, 0.14);
    text-decoration: none;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.quick-action-card:hover {
    transform: translateY(-2px);
    border-color: rgba(31, 78, 121, 0.32);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.09);
}

.quick-action-title {
    display: block;
    color: #123656;
    font-weight: 900;
    margin-bottom: 0.25rem;
}

.quick-action-text {
    display: block;
    color: #66758a;
    font-size: 0.9rem;
}

/* =========================================================
   CUSTOMER OPEN ITEMS DRILL-DOWN
   ========================================================= */

.open-items-summary-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.85rem;
    border-radius: 999px;
    background: rgba(31, 78, 121, 0.08);
    border: 1px solid rgba(31, 78, 121, 0.16);
}

.open-items-summary-pill .summary-number {
    color: #123656;
    font-size: 1.45rem;
    font-weight: 900;
    line-height: 1;
}

.open-items-summary-pill .summary-label {
    color: #66758a;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.open-item-discipline-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.open-item-discipline-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    background: rgba(31, 78, 121, 0.045);
    border: 1px solid rgba(31, 78, 121, 0.10);
    color: #123656;
    text-decoration: none;
    font-weight: 800;
    transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.open-item-discipline-link:hover {
    transform: translateY(-1px);
    background: rgba(31, 78, 121, 0.08);
    border-color: rgba(31, 78, 121, 0.24);
    color: #123656;
}

.open-item-discipline-link.active {
    background: rgba(31, 78, 121, 0.13);
    border-color: rgba(31, 78, 121, 0.30);
    box-shadow: inset 4px 0 0 #1f4e79;
}

.open-item-discipline-link .discipline-count {
    min-width: 26px;
    height: 26px;
    border-radius: 999px;
    background: #1f4e79;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 900;
}

.open-items-empty {
    padding: 2rem;
}

.empty-state-title {
    color: #123656;
    font-weight: 900;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.empty-state-body {
    color: #66758a;
}

.open-items-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.open-item-card {
    padding: 1rem;
    border-radius: 14px;
    background: rgba(31, 78, 121, 0.045);
    border: 1px solid rgba(31, 78, 121, 0.13);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.045);
}

.open-item-number {
    color: #66758a;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    margin-bottom: 0.15rem;
}

.open-item-title {
    color: #123656;
    font-size: 1.05rem;
    font-weight: 900;
    margin: 0;
}

.open-item-badges {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.open-item-priority,
.open-item-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.open-item-priority {
    background: rgba(100, 116, 139, 0.12);
    color: #334155;
    border: 1px solid rgba(100, 116, 139, 0.18);
}

.open-item-priority.priority-low {
    background: rgba(47, 158, 68, 0.12);
    color: #1f6b35;
    border-color: rgba(47, 158, 68, 0.22);
}

.open-item-priority.priority-medium {
    background: rgba(240, 173, 0, 0.16);
    color: #7a4f00;
    border-color: rgba(240, 173, 0, 0.32);
}

.open-item-priority.priority-high {
    background: rgba(249, 115, 22, 0.14);
    color: #9a3412;
    border-color: rgba(249, 115, 22, 0.28);
}

.open-item-priority.priority-extreme {
    background: rgba(220, 38, 38, 0.12);
    color: #991b1b;
    border-color: rgba(220, 38, 38, 0.28);
}

.open-item-status {
    background: rgba(31, 78, 121, 0.10);
    color: #1f4e79;
    border: 1px solid rgba(31, 78, 121, 0.18);
}

.open-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-top: 0.75rem;
    color: #475569;
    font-size: 0.88rem;
}

.open-item-next-step {
    margin-top: 0.75rem;
    color: #334155;
    font-size: 0.92rem;
    line-height: 1.45;
}

@media (max-width: 991.98px) {
    .cust-instrument-nav {
        min-height: 48px;
    }

    .cust-nav-readout {
        align-items: flex-start !important;
        margin-top: 0.65rem;
        margin-left: 0;
        flex-wrap: wrap;
    }

    .cust-nav-chip {
        max-width: 100%;
    }

    .cust-instrument-nav .navbar-nav .nav-link {
        padding-left: 0;
    }

    .cust-instrument-nav .navbar-nav .nav-link.active::after {
        left: 0;
        right: auto;
        width: 80px;
    }
}

.system-message-meta {
    color: #66758a;
    font-size: 0.78rem;
    font-weight: 700;
    margin-top: 0.15rem;
}

.system-message-global-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 0.45rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: rgba(31, 78, 121, 0.10);
    color: #1f4e79;
    border: 1px solid rgba(31, 78, 121, 0.16);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* =========================================================
   CUSTOMER MESSAGES PAGE
   ========================================================= */

.customer-message-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.customer-message-card {
    border-left: 5px solid rgba(31, 78, 121, 0.45);
}

.customer-message-card.needs-ack {
    border-left-color: #1f4e79;
}

.customer-message-card.acknowledged {
    opacity: 0.88;
    border-left-color: #64748b;
}

.acknowledged-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: rgba(47, 158, 68, 0.12);
    color: #1f6b35;
    border: 1px solid rgba(47, 158, 68, 0.22);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.acknowledged-meta {
    color: #66758a;
    font-size: 0.82rem;
    font-weight: 700;
    border-top: 1px solid rgba(31, 78, 121, 0.10);
    padding-top: 0.7rem;
}


/* =========================================================
   CUSTOMER REQUEST SERVICE
   ========================================================= */

.request-service-info-box {
    padding: 0.9rem;
    border-radius: 14px;
    background: rgba(31, 78, 121, 0.07);
    border: 1px solid rgba(31, 78, 121, 0.13);
    color: #123656;
}

.service-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 0.65rem;
}

.service-check-option {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    background: rgba(31, 78, 121, 0.045);
    border: 1px solid rgba(31, 78, 121, 0.13);
    color: #123656;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}

.service-check-option:hover {
    transform: translateY(-1px);
    background: rgba(31, 78, 121, 0.08);
    border-color: rgba(31, 78, 121, 0.26);
}

.service-check-option input {
    width: 18px;
    height: 18px;
}



/* Print helpers */

/* =========================================================
   CUSTOMER WRITTEN PROGRAMS
   ========================================================= */

.written-program-intro {
    border-color: rgba(31, 78, 121, 0.22);
}

.written-program-card {
    border: 1px solid rgba(31, 78, 121, 0.16);
    box-shadow: 0 10px 28px rgba(18, 54, 86, 0.08);
}

.written-program-card .card-header {
    color: #1f4e79;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.written-program-revision {
    color: #334155 !important;
    font-size: 0.76rem;
    letter-spacing: 0.04em;
}

.written-program-control-notice {
    color: #334155;
    border-color: rgba(51, 65, 85, 0.18);
}

.written-program-shell {
    position: relative;
    /*
     * `hidden` makes this element a programmatically scrollable container.
     * Firefox then scrolls the shell itself when an internal section link is
     * followed, leaving the beginning of the document inaccessible because
     * the shell has no visible scrollbar. `clip` preserves the visual crop
     * without creating a nested scroll container.
     */
    overflow: clip;
    border: 1px solid rgba(31, 78, 121, 0.18);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 16px 42px rgba(18, 54, 86, 0.10);
    isolation: isolate;
}

.written-program-content {
    position: relative;
    z-index: 2;
    max-width: 920px;
    margin: 0 auto;
    padding: clamp(1.25rem, 3.5vw, 3.5rem);
    color: #1f2937;
    font-size: 1rem;
    line-height: 1.72;
    user-select: none;
    -webkit-user-select: none;
}

.written-program-content::selection,
.written-program-content *::selection {
    background: transparent;
}

.written-program__header {
    padding-bottom: 1.4rem;
    margin-bottom: 1.75rem;
    border-bottom: 3px solid #1f4e79;
}

.written-program__document-type {
    margin-bottom: 0.3rem;
    color: #1f4e79;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.written-program__header h1 {
    margin-bottom: 0.6rem;
    color: #123656;
    font-size: clamp(1.75rem, 4vw, 2.7rem);
    line-height: 1.15;
}

.written-program__facility {
    margin-bottom: 0;
    color: #475569;
    font-size: 1.05rem;
}

.written-program__section-nav {
    padding: 1.15rem 1.25rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(31, 78, 121, 0.16);
    border-radius: 12px;
    background: rgba(31, 78, 121, 0.055);
}

.written-program__section-nav h2 {
    margin-bottom: 0.7rem;
    color: #123656;
    font-size: 1.1rem;
}

.written-program__section-nav ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem 1.5rem;
    padding-left: 1.2rem;
    margin-bottom: 0;
}

.written-program__section-nav a {
    position: relative;
    z-index: 3;
    color: #1f4e79;
    font-weight: 750;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.written-program__section {
    scroll-margin-top: 1rem;
    padding-top: 0.25rem;
    margin-bottom: 2rem;
}

.written-program__section h2 {
    padding-bottom: 0.45rem;
    margin-bottom: 0.85rem;
    color: #123656;
    font-size: clamp(1.3rem, 3vw, 1.65rem);
    border-bottom: 1px solid rgba(31, 78, 121, 0.18);
}

.written-program__section li + li {
    margin-top: 0.25rem;
}

.written-program__ppe-matrix {
    margin-bottom: 0;
    font-size: 0.78rem;
    line-height: 1.3;
}

.written-program__ppe-matrix--hazards {
    min-width: 2200px;
}

.written-program__ppe-matrix--guidelines {
    min-width: 1700px;
}

.written-program__ppe-matrix th,
.written-program__ppe-matrix td {
    padding: 0.4rem 0.45rem;
    vertical-align: middle;
}

.written-program__ppe-matrix thead th {
    color: #123656;
    background: rgba(31, 78, 121, 0.09);
    text-align: center;
}

.written-program__ppe-matrix th:first-child {
    width: 3rem;
    text-align: center;
}

.written-program__ppe-matrix th:nth-child(2),
.written-program__ppe-matrix td:nth-child(2) {
    min-width: 18rem;
}

.written-program-access-footer {
    padding-top: 1.2rem;
    margin-top: 2.5rem;
    color: #64748b;
    font-size: 0.74rem;
    line-height: 1.5;
    border-top: 1px solid rgba(31, 78, 121, 0.2);
}

.written-program-watermarks {
    position: absolute;
    inset: 0;
    /*
     * Keep the identifying marks above the rendered program. Several program
     * templates contain shaded navigation panels, callouts, forms, and tables;
     * when this layer sat behind the content, those backgrounds could conceal
     * the facility/session watermark entirely. Pointer events remain disabled,
     * so the overlay cannot interfere with links, scrolling, or controls.
     */
    z-index: 3;
    background-position: center 20px;
    background-repeat: repeat;
    background-size: 760px 250px;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
}

.written-program-print-block {
    display: none;
}

@media (max-width: 767.98px) {
    .written-program__section-nav ul {
        grid-template-columns: 1fr;
    }

    .written-program-watermarks {
        background-position: center 10px;
        background-size: 620px 220px;
    }
}

@media print {
    .no-print {
        display: none !important;
    }

    body.radar-customer-body {
        background: #ffffff;
    }

    .radar-customer-card {
        box-shadow: none;
    }

    body.written-program-viewer-page {
        background: #ffffff !important;
    }

    .written-program-viewer-page .written-program-viewer-main > * {
        display: none !important;
    }

    .written-program-viewer-page .written-program-viewer-main > .written-program-print-block {
        display: block !important;
        max-width: 720px;
        margin: 2rem auto;
        padding: 2rem;
        color: #000000;
        border: 4px solid #000000;
    }
}
