/* NBC - Digital Approval System (DAS) - Custom Styles */

:root {
    --nbc-primary: #1a5632;
    --nbc-primary-dark: #0e3a20;
    --nbc-primary-light: #2a7a4a;
    --nbc-gold: #c8a951;
    --nbc-gold-dark: #a88b3a;
    --nbc-secondary: #6c757d;
    --nbc-success: #198754;
    --nbc-warning: #ffc107;
    --nbc-danger: #dc3545;
    --nbc-header-bg: #0e3a20;
    --nbc-navbar-bg: #1a5632;
}

/* Official Header */
.official-header {
    background: linear-gradient(135deg, var(--nbc-header-bg) 0%, var(--nbc-primary) 100%);
    color: #fff;
    padding: 0.75rem 0;
    border-bottom: 3px solid var(--nbc-gold);
}

.official-logo {
    height: 52px;
    width: auto;
}

.nih-logo {
    height: 60px;
    width: auto;
}

.header-text .header-title {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    line-height: 1.3;
}

.header-text .header-subtitle {
    font-size: 0.8rem;
    opacity: 0.85;
    letter-spacing: 0.2px;
}

/* Navigation Bar */
.nbc-navbar {
    background-color: var(--nbc-navbar-bg) !important;
    padding: 0.35rem 0;
    font-size: 0.92rem;
}

.nbc-navbar .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    padding: 0.5rem 0.9rem;
    transition: color 0.15s ease, background-color 0.15s ease;
    border-radius: 4px;
}

.nbc-navbar .nav-link:hover,
.nbc-navbar .nav-link:focus {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.1);
}

.nbc-navbar .navbar-brand {
    color: #fff !important;
}

/* Override Bootstrap primary with our green */
.btn-primary {
    background-color: var(--nbc-primary);
    border-color: var(--nbc-primary);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--nbc-primary-dark);
    border-color: var(--nbc-primary-dark);
}

.btn-outline-primary {
    color: var(--nbc-primary);
    border-color: var(--nbc-primary);
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
    background-color: var(--nbc-primary);
    border-color: var(--nbc-primary);
    color: #fff;
}

.text-primary {
    color: var(--nbc-primary) !important;
}

.bg-primary {
    background-color: var(--nbc-primary) !important;
}

/* Login/Register card styling */
.auth-card {
    border: none;
    border-top: 4px solid var(--nbc-gold);
}

/* ==================================================================
   Public pages (landing / login / register), implementing the approved
   Claude Design mockups (NBC Liquid Glass, turn 2, green): a deep-green
   scene fading to parchment with a gold glow, a floating glass pill
   header instead of the solid chrome, frosted cards, and a dark contact
   panel. Scoped to .pub-page; the app keeps its own chrome elsewhere.
   ================================================================== */

.pub-page {
    min-height: 100vh;
    background-color: #eef0e6;
    background-image:
        radial-gradient(46rem 30rem at 90% 4%, rgba(212, 180, 96, 0.5), transparent 70%),
        radial-gradient(40rem 26rem at 8% 4%, rgba(9, 46, 26, 0.55), transparent 72%),
        linear-gradient(180deg, #0d3722 0%, #135030 26%, #48795b 46%, #c6d8c6 64%, #ece9d8 84%, #f0efe5 100%);
    overflow-x: hidden;
}

/* the app chrome is replaced by the pill header on these pages */
.pub-page .official-header,
.pub-page .nbc-navbar,
.pub-page .nbc-footer {
    display: none;
}

/* soft colour drifting behind the glass */
.pub-orbs {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.pub-orbs .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
}

.pub-orbs .orb-1 {
    width: 40rem; height: 40rem; top: -14rem; left: -12rem;
    background: radial-gradient(circle at 40% 40%, #1f6b3e, #0d3722 60%, transparent 78%);
    opacity: 0.5;
    animation: orb-drift 24s ease-in-out infinite alternate;
}

.pub-orbs .orb-2 {
    width: 36rem; height: 36rem; top: -11rem; right: -9rem;
    background: radial-gradient(circle at 40% 40%, #eed48e, #c8a951 58%, transparent 78%);
    opacity: 0.42;
    animation: orb-drift 30s ease-in-out infinite alternate-reverse;
}

.pub-orbs .orb-3 {
    width: 30rem; height: 30rem; top: 34%; left: 30%;
    background: radial-gradient(circle at 45% 45%, #bcd9c2, #5c8a6b 62%, transparent 80%);
    opacity: 0.30;
    animation: orb-drift 27s ease-in-out infinite alternate;
}

.pub-orbs .orb-4,
.pub-orbs .orb-5 {
    display: none;
}

@keyframes orb-drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(2.6rem, 2rem, 0) scale(1.07); }
}

@media (prefers-reduced-motion: reduce) {
    .pub-orbs .orb { animation: none; }
}

/* The design's blue specular shimmer: a thin NIH-blue glint that sweeps the
   border of each glass element every few seconds. Ported verbatim from the
   approved canvas (nihShimmer). The mask limits the gradient to a 1.5px ring. */
@keyframes nihShimmer {
    0%   { background-position: 140% 0; }
    26%  { background-position: -40% 0; }
    100% { background-position: -40% 0; }
}

[data-shimmer] {
    position: relative;
}

[data-shimmer]::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: linear-gradient(115deg,
            transparent 35%, rgba(51, 60, 150, 0) 41%, rgba(70, 90, 220, 0.8) 47%,
            rgba(160, 178, 255, 0.95) 50%, rgba(70, 90, 220, 0.8) 53%,
            rgba(51, 60, 150, 0) 59%, transparent 65%)
        no-repeat 140% 0 / 280% 100%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    animation: nihShimmer 6.5s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
    [data-shimmer]::after { animation: none; opacity: 0; }
}

/* --- floating glass pill header --- */
.pub-header {
    max-width: 1160px;
    margin: 1.1rem auto 0 auto;
    padding: 0.55rem 0.65rem 0.55rem 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 50rem;
    background: linear-gradient(135deg, rgba(22, 66, 40, 0.72), rgba(12, 44, 26, 0.55));
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow:
        0 10px 30px rgba(8, 30, 17, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.pub-header .ph-emblem {
    height: 36px;
    width: auto;
    flex: 0 0 auto;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

.pub-header .ph-name {
    line-height: 1.15;
    margin-right: auto;
}

.pub-header .ph-name .ph-title {
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
}

.pub-header .ph-name .ph-sub {
    color: #bcd0c0;
    font-size: 0.72rem;
}

.pub-header a.ph-link {
    color: #e8efe9;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
}

.pub-header a.ph-link:hover {
    color: #fff;
}

/* --- buttons: the mockup's gold and green pills --- */
.btn-gold {
    background: linear-gradient(135deg, rgba(214, 172, 70, 0.82), rgba(158, 122, 38, 0.68));
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    backdrop-filter: blur(14px) saturate(180%);
    color: #241a04;
    border: 1px solid rgba(244, 208, 122, 0.7);
    border-radius: 50rem;
    font-weight: 700;
    box-shadow:
        0 0 22px rgba(190, 146, 52, 0.55),
        0 6px 18px rgba(20, 40, 25, 0.28),
        inset 0 1px 0 rgba(255, 232, 168, 0.65),
        inset 0 -6px 12px rgba(232, 178, 76, 0.4);
    text-shadow: 0 1px 0 rgba(255, 226, 150, 0.3);
}

.btn-gold:hover,
.btn-gold:focus {
    background: linear-gradient(135deg, rgba(226, 184, 80, 0.9), rgba(172, 134, 44, 0.76));
    color: #1d1503;
    box-shadow:
        0 0 30px rgba(202, 156, 58, 0.68),
        0 8px 22px rgba(20, 40, 25, 0.32),
        inset 0 1px 0 rgba(255, 238, 180, 0.75),
        inset 0 -6px 12px rgba(232, 178, 76, 0.45);
}

.btn-green-glass {
    background: linear-gradient(135deg, rgba(58, 132, 84, 0.62), rgba(24, 78, 46, 0.48));
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    backdrop-filter: blur(14px) saturate(180%);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 50rem;
    font-weight: 600;
    box-shadow:
        0 0 22px rgba(120, 200, 150, 0.35),
        0 6px 18px rgba(10, 34, 19, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        inset 0 -6px 12px rgba(160, 220, 180, 0.18);
}

.btn-green-glass:hover,
.btn-green-glass:focus {
    background: linear-gradient(135deg, rgba(44, 118, 72, 0.92), rgba(24, 80, 46, 0.85));
    color: #fff;
}

/* glossy deep-green submit, as on the mockup's Sign in */
.btn-signin {
    background: linear-gradient(180deg, #2f7c4c, #1a5632 55%, #123f24);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50rem;
    font-weight: 700;
    padding: 0.6rem 1rem;
    box-shadow:
        0 8px 20px rgba(10, 34, 19, 0.35),
        inset 0 1.5px 0 rgba(255, 255, 255, 0.35);
}

.btn-signin:hover,
.btn-signin:focus {
    background: linear-gradient(180deg, #358a55, #1d6339);
    color: #fff;
}

.btn-white-pill {
    background: rgba(255, 255, 255, 0.92);
    color: var(--nbc-primary-dark);
    border: 1px solid rgba(20, 60, 35, 0.12);
    border-radius: 50rem;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(14, 58, 32, 0.12);
}

.btn-white-pill:hover,
.btn-white-pill:focus {
    background: #fff;
    color: var(--nbc-primary-dark);
}

/* --- landing hero (sits on the dark part of the scene) --- */
.pub-hero {
    text-align: center;
    padding: 3rem 1rem 2.4rem 1rem;
}

.pub-hero .hero-emblems {
    display: flex;
    justify-content: center;
    gap: 0.9rem;
    margin-bottom: 1.3rem;
}

.hero-emblem {
    height: 96px;
    width: auto;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.35));
}

.pub-hero .pub-kicker {
    color: #d9bd6e;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}

.pub-hero h1 {
    color: #fff;
    font-weight: 800;
    font-size: 3rem;
    letter-spacing: 0.01em;
    text-shadow: 0 2px 12px rgba(8, 30, 17, 0.35);
}

.pub-hero .pub-hero-lead {
    color: rgba(255, 255, 255, 0.88);
    max-width: 560px;
    margin: 0.6rem auto 1.6rem auto;
    font-size: 1.05rem;
}

/* --- section headings --- */
.pub-section-title {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--nbc-primary-dark);
    margin-bottom: 0.2rem;
}

.pub-section-title.on-dark {
    color: #fff;
    text-shadow: 0 1px 8px rgba(8, 30, 17, 0.3);
}

.pub-section-sub {
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.1rem;
}

/* --- information cards --- */
.info-box {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.34));
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    backdrop-filter: blur(22px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 1.4rem;
    box-shadow:
        0 12px 34px rgba(10, 34, 19, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    padding: 1.3rem 1.35rem 1.05rem 1.35rem;
    height: 100%;
    transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.info-box:hover {
    transform: translateY(-3px);
    box-shadow:
        0 18px 46px rgba(10, 34, 19, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.info-box .info-box-icon {
    width: 46px;
    height: 46px;
    border-radius: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(214, 232, 218, 0.9), rgba(178, 208, 186, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.7);
    color: var(--nbc-primary);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.info-box h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #123f24;
    margin: 0 0 0.3rem 0;
}

.info-box p {
    color: #43524a;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.info-box .info-box-fee {
    border-top: 1px solid rgba(20, 60, 35, 0.14);
    padding-top: 0.6rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--nbc-primary);
}

.info-box .info-box-fee.free {
    color: var(--nbc-gold-dark);
}

/* --- how it works: one frosted strip with separators --- */
.glass-strip {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.38));
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    backdrop-filter: blur(22px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 1.4rem;
    box-shadow:
        0 12px 34px rgba(10, 34, 19, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    padding: 1.6rem 0.6rem 1.3rem 0.6rem;
}

.pub-step {
    text-align: center;
    padding: 0 1.1rem;
}

@media (min-width: 992px) {
    .glass-strip .col-lg-3 + .col-lg-3 .pub-step {
        border-left: 1px solid rgba(20, 60, 35, 0.12);
    }
}

.pub-step .pub-step-no {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.55), rgba(198, 224, 205, 0.35));
    -webkit-backdrop-filter: blur(10px) saturate(170%);
    backdrop-filter: blur(10px) saturate(170%);
    color: var(--nbc-primary-dark);
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.6rem auto;
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow:
        0 0 16px rgba(120, 200, 150, 0.3),
        0 4px 12px rgba(14, 58, 32, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.pub-step h4 {
    font-size: 0.98rem;
    font-weight: 700;
    color: #123f24;
}

.pub-step p {
    font-size: 0.84rem;
    color: #55635b;
    margin-bottom: 0;
}

/* --- contact: a rounded dark panel --- */
.pub-contact {
    color: #fff;
    margin: 2.6rem auto 0 auto;
    padding: 2rem 2.2rem;
    border-radius: 1.5rem;
    background: linear-gradient(150deg, #1a5030, #0e3a20 70%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow:
        0 18px 44px rgba(10, 34, 19, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.pub-contact h2 {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 1.3rem;
}

.pub-contact .contact-item {
    display: flex;
    gap: 0.85rem;
    margin-bottom: 0.6rem;
}

.pub-contact .contact-item i {
    font-size: 1.1rem;
    color: var(--nbc-gold);
    margin-top: 0.1rem;
}

.pub-contact .contact-item strong {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #cfe0d2;
    margin-bottom: 0.2rem;
}

.pub-contact .contact-item div {
    font-size: 0.9rem;
    color: #e2ece4;
}

.pub-contact a {
    color: #ecd287;
    text-decoration: none;
}

.pub-contact a:hover {
    color: #f4e2a6;
}

/* the slim line that replaces the footer on these pages */
.pub-footline {
    text-align: center;
    color: #6f7d72;
    font-size: 0.82rem;
    padding: 1.6rem 1rem 1.4rem 1rem;
}

/* --- the login card: solid deep-green pane + light glass pane --- */
.login-shell {
    max-width: 940px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 1.5rem;
    background: linear-gradient(160deg, rgba(252, 253, 250, 0.78), rgba(244, 248, 242, 0.6));
    -webkit-backdrop-filter: blur(26px) saturate(180%);
    backdrop-filter: blur(26px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow:
        0 24px 60px rgba(8, 30, 17, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.login-brand {
    color: #fff;
    padding: 2.4rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    background: linear-gradient(160deg, #235c39, #14472a 60%, #0f3a22);
}

.login-brand .brand-emblems {
    display: flex;
    gap: 0.7rem;
    margin-bottom: 0.5rem;
}

.login-brand .brand-emblem {
    height: 62px;
    width: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
}

.login-brand h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin: 0.9rem 0 0.2rem 0;
}

.login-brand .login-brand-sub {
    font-size: 0.84rem;
    color: #c4d6c8;
    margin-bottom: 1.2rem;
}

.login-brand ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.login-brand li {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    font-size: 0.9rem;
    color: #e8f0e9;
    margin-bottom: 0.65rem;
}

.login-brand li i {
    color: var(--nbc-gold);
}

.login-form-side {
    padding: 2.4rem 2.3rem;
}

.login-form-side h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #123f24;
    margin-bottom: 0.2rem;
}

.login-form-side .login-form-sub {
    color: #5d6a62;
    font-size: 0.9rem;
    margin-bottom: 1.3rem;
}

.login-form-side label {
    font-weight: 700;
    font-size: 0.84rem;
    color: #123f24;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #75837a;
    font-size: 0.82rem;
    margin: 1.1rem 0;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(20, 60, 35, 0.15);
}

/* form controls on glass */
.pub-page .form-control {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(20, 60, 35, 0.16);
    border-radius: 0.8rem;
    padding: 0.55rem 0.85rem;
}

.pub-page .form-control:focus {
    background: #fff;
    border-color: var(--nbc-primary);
    box-shadow: 0 0 0 0.25rem rgba(26, 86, 50, 0.14);
}

.pub-page .auth-card {
    background: linear-gradient(160deg, rgba(252, 253, 250, 0.8), rgba(244, 248, 242, 0.62));
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-top: 3px solid var(--nbc-gold);
    border-radius: 1.3rem;
    box-shadow: 0 18px 44px rgba(8, 30, 17, 0.3);
}

/* the mock's one-line steps summary, phones only */
.pub-steps-line {
    text-align: center;
    color: #5d6a62;
    font-size: 0.86rem;
    padding: 0.4rem 1rem 0 1rem;
}

/* --- mobile: per the approved iPhone mockups (2c / 2d) --- */
@media (max-width: 767.98px) {
    /* login: no pill header; the brand block is the header (mock 2d) */
    .pub-login .pub-header { display: none; }
    .pub-hero h1 { font-size: 2.1rem; }
    .pub-header { margin: 0.8rem 0.8rem 0 0.8rem; }
    .pub-contact { padding: 1.6rem 1.3rem; }
    .login-brand {
        background: transparent;
        text-align: center;
        align-items: center;
        padding: 1.6rem 1.5rem 0.4rem 1.5rem;
    }
    .login-brand h2 { color: #fff; }
    .login-brand ul { display: none; }
    .login-shell {
        background: transparent;
        border: none;
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
    .login-form-side {
        background: linear-gradient(160deg, rgba(252, 253, 250, 0.85), rgba(244, 248, 242, 0.7));
        -webkit-backdrop-filter: blur(24px) saturate(180%);
        backdrop-filter: blur(24px) saturate(180%);
        border: 1px solid rgba(255, 255, 255, 0.6);
        border-radius: 1.4rem;
        box-shadow: 0 18px 44px rgba(8, 30, 17, 0.3);
        margin: 0 0.4rem;
    }
}

/* phones: compact 2-column application chips (mock 2c) */
@media (max-width: 575.98px) {
    .pub-header { padding: 0.45rem 0.5rem 0.45rem 0.65rem; gap: 0.5rem; }
    .pub-header .ph-emblem { height: 30px; }
    .pub-hero { padding-top: 2rem; }
    .hero-emblem { height: 72px; }
    .pub-section-sub { margin-bottom: 0.8rem; }
    .info-box {
        display: flex;
        align-items: center;
        gap: 0.65rem;
        padding: 0.85rem 0.9rem;
        border-radius: 1.1rem;
    }
    .info-box .info-box-icon {
        width: 38px;
        height: 38px;
        font-size: 1.05rem;
        margin-bottom: 0;
        flex: 0 0 auto;
    }
    .info-box h3 { font-size: 0.9rem; margin: 0; }
    .login-brand h2 { font-size: 1.55rem; }
}

.auth-logo-section {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-logo-section img {
    height: 60px;
    width: auto;
    margin: 0 0.5rem;
}

.auth-logo-section img.auth-emblem {
    height: 90px;
    margin: 0 auto;
}

.auth-logo-section h3 {
    color: var(--nbc-primary);
    font-weight: 700;
    margin-top: 0.75rem;
    font-size: 1.35rem;
}

.auth-logo-section .auth-subtitle {
    color: var(--nbc-secondary);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    overflow-y: auto;
    z-index: 100;
}

.sidebar .nav-link {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    color: #333;
    border-left: 3px solid transparent;
}

.sidebar .nav-link.active {
    background-color: #e9ecef;
    border-left-color: var(--nbc-primary);
    color: var(--nbc-primary);
}

.sidebar .nav-link:hover {
    background-color: #f8f9fa;
}

/* Status badges */
.badge-draft { background-color: #6c757d; }
.badge-submitted { background-color: #0dcaf0; color: #000; }
.badge-under_review { background-color: #ffc107; color: #000; }
.badge-revision_requested { background-color: #fd7e14; color: #000; }
.badge-approved { background-color: #198754; }
.badge-rejected { background-color: #dc3545; }
.badge-withdrawn { background-color: #6c757d; }
.badge-expired { background-color: #495057; }

/* Dashboard cards */
.stat-card {
    border-left: 4px solid var(--nbc-primary);
    transition: transform 0.15s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--nbc-primary);
}

.stat-card.success { border-left-color: var(--nbc-success); }
.stat-card.success .stat-number { color: var(--nbc-success); }
.stat-card.warning { border-left-color: var(--nbc-warning); }
.stat-card.warning .stat-number { color: var(--nbc-warning); }
.stat-card.danger { border-left-color: var(--nbc-danger); }
.stat-card.danger .stat-number { color: var(--nbc-danger); }

/* Wizard form */
.wizard-section {
    min-height: 400px;
}

.wizard-actions {
    border-top: 1px solid #dee2e6;
    padding-top: 1rem;
    margin-top: 2rem;
}

/* Autosave indicator */
#autosave-status {
    font-size: 0.8rem;
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 1050;
    padding: 0.4rem 0.8rem;
    border-radius: 0.375rem;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#autosave-status.saving { color: var(--nbc-warning); }
#autosave-status.saved { color: var(--nbc-success); }
#autosave-status.error { color: var(--nbc-danger); }

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.75rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dee2e6;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.6rem;
    top: 0.25rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--nbc-primary);
    border: 2px solid #fff;
}

.timeline-item.success::before { background: var(--nbc-success); }
.timeline-item.warning::before { background: var(--nbc-warning); }
.timeline-item.danger::before { background: var(--nbc-danger); }

/* Document list */
.document-item {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.document-item:hover {
    background-color: #f8f9fa;
}

/* Certificate PDF styles */
.certificate {
    font-family: 'Times New Roman', serif;
    border: 3px double var(--nbc-primary);
    padding: 2rem;
    margin: 1rem;
}

.certificate-header {
    text-align: center;
    border-bottom: 2px solid var(--nbc-primary);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

/* Table improvements */
.table-hover tbody tr {
    cursor: pointer;
}

/* Form section headers */
.section-header {
    border-bottom: 2px solid var(--nbc-primary);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--nbc-primary);
}

/* Card headers */
.card-header {
    background-color: rgba(26, 86, 50, 0.05);
}

/* Footer */
.nbc-footer {
    background-color: var(--nbc-header-bg);
    color: rgba(255, 255, 255, 0.8);
    padding: 1rem 0;
    font-size: 0.8rem;
    margin-top: 2rem;
}

.nbc-footer a {
    color: var(--nbc-gold);
    text-decoration: none;
}

/* Contact line in the footer */
.nbc-contact {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.78rem;
}

/* Prevent action buttons from wrapping to a second line */
.btn {
    white-space: nowrap;
}

/* Action button bars in page headers and toolbars */
.action-buttons {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    align-items: center;
}

.action-buttons form.d-inline {
    display: inline-flex;
}

/* Print styles */
@media print {
    .navbar, .sidebar, .no-print, .official-header, .nbc-footer {
        display: none !important;
    }
    main {
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* Post review: the NC's comments document as the PI and committee read it */
.pr-doc { background: #fff; border: 1px solid #dee2e6; border-radius: .375rem; padding: .75rem 1rem; overflow-x: auto; }
.pr-doc table { width: 100%; border-collapse: collapse; margin: .5rem 0; }
.pr-doc th, .pr-doc td { border: 1px solid #ced4da; padding: .35rem .5rem; vertical-align: top; }
.pr-doc th { background: #f0f5f1; color: #1a5632; font-weight: 600; }
.pr-doc p:last-child { margin-bottom: 0; }
.pr-round + .pr-round { border-top: 1px dashed #ced4da; padding-top: 1rem; }
.pr-stage { border-left: 4px solid #1a5632; background: #f0f5f1; }
.pr-item-text { white-space: pre-wrap; }
.pr-doc h2, .pr-doc h3 { font-size: 1.1rem; color: #1a5632; font-weight: 600; }
.pr-doc h4 { font-size: 1rem; font-weight: 600; }

/* ===== Review flow (post review, certificate) =====================================
   One idea: show where the application is and the one next step for the person
   looking. Everything else is quiet. Brand tokens from :root. */
.rv-card { border: 1px solid #dfe7e1; border-radius: .75rem; background: #fff; }
.rv-card > .rv-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: .5rem; padding: .9rem 1.1rem .4rem; }
.rv-card > .rv-head h5 { margin: 0; font-size: 1.05rem; font-weight: 600; color: var(--nbc-primary-dark); }
.rv-body { padding: .4rem 1.1rem 1.1rem; }
.rv-muted { color: #66736b; font-size: .875rem; }

/* progress bar */
.rv-track { display: flex; list-style: none; margin: .4rem 0 1rem; padding: 0; counter-reset: rv; }
.rv-track li { flex: 1 1 0; position: relative; text-align: center; font-size: .78rem; color: #8a968f; min-width: 0; }
.rv-track li::before { content: ""; position: absolute; top: 9px; left: -50%; width: 100%; height: 2px; background: #dfe7e1; z-index: 0; }
.rv-track li:first-child::before { display: none; }
.rv-track .rv-dot { position: relative; z-index: 1; display: block; width: 20px; height: 20px; margin: 0 auto .3rem;
    border-radius: 50%; border: 2px solid #c9d5cd; background: #fff; }
.rv-track li.done { color: var(--nbc-primary); }
.rv-track li.done::before, .rv-track li.current::before { background: var(--nbc-primary-light); }
.rv-track li.done .rv-dot { background: var(--nbc-primary); border-color: var(--nbc-primary); }
.rv-track li.done .rv-dot::after { content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px;
    border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.rv-track li.current { color: var(--nbc-primary-dark); font-weight: 600; }
.rv-track li.current .rv-dot { border-color: var(--nbc-primary); box-shadow: 0 0 0 4px rgba(26, 86, 50, .14); }
.rv-track li.current .rv-dot::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--nbc-gold); }
.rv-track li.optional .rv-dot { border-style: dashed; }
.rv-track li.skipped { color: #a3ada7; }
.rv-track li.skipped::before { background: var(--nbc-primary-light); }
.rv-track li.skipped .rv-dot { border-style: dashed; background: #fff; }
.rv-track .rv-step-label { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }

/* the next step for this viewer */
.rv-next { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; padding: .75rem .9rem;
    border-radius: .6rem; background: #f4f8f5; border-left: 4px solid var(--nbc-gold); margin-bottom: 1rem; }
.rv-next .rv-next-text { flex: 1 1 16rem; color: var(--nbc-primary-dark); }
.rv-next .rv-next-text small { display: block; color: #66736b; }
.rv-next .rv-next-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.rv-next.rv-wait { border-left-color: #c9d5cd; background: #f7f9f8; }

/* tabs */
.rv-tabs { border-bottom: 1px solid #dfe7e1; gap: .25rem; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.rv-tabs .nav-link { white-space: nowrap; }
.rv-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; color: #4d5a52; padding: .45rem .7rem; font-size: .92rem; }
.rv-tabs .nav-link.active { color: var(--nbc-primary-dark); border-bottom-color: var(--nbc-primary); background: none; font-weight: 600; }
.rv-tabs .nav-link .badge { font-weight: 500; }
.rv-pane { padding-top: .9rem; }

/* rounds */
.rv-round { border: 1px solid #e6ece8; border-radius: .6rem; margin-bottom: .75rem; }
.rv-round > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
    padding: .6rem .8rem; }
.rv-round > summary::-webkit-details-marker { display: none; }
.rv-round > summary::before { content: ""; width: 7px; height: 7px; border: solid #7d8a82; border-width: 0 2px 2px 0;
    transform: rotate(-45deg); margin-right: .2rem; transition: transform .15s; }
.rv-round[open] > summary::before { transform: rotate(45deg); }
.rv-round .rv-round-body { padding: 0 .9rem .9rem; }
.rv-round h6 { font-size: .85rem; font-weight: 600; color: #4d5a52; margin: .8rem 0 .4rem; }
.rv-pill { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .55rem; border-radius: 999px;
    font-size: .76rem; font-weight: 500; background: #eef3ef; color: #3f4d44; }
.rv-pill.ok { background: #e3f1e7; color: #1d6b3c; }
.rv-pill.wait { background: #fbf3dc; color: #7a5a06; }
.rv-pill.draft { background: #fde8e7; color: #a12b22; }

/* file chips */
.rv-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.rv-chip { display: inline-flex; align-items: center; gap: .35rem; max-width: 100%; padding: .3rem .6rem; border-radius: .5rem;
    border: 1px solid #dfe7e1; background: #fbfcfb; font-size: .85rem; color: #24332a; text-decoration: none; }
.rv-chip:hover { border-color: var(--nbc-primary-light); color: var(--nbc-primary-dark); }
.rv-chip .rv-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 16rem; }
.rv-chip .rv-chip-meta { color: #7d8a82; font-size: .76rem; white-space: nowrap; }
.rv-chip .btn-close { font-size: .55rem; margin-left: .15rem; }

/* messages */
.rv-msg { max-width: 46rem; padding: .55rem .75rem; border-radius: .6rem; background: #f4f6f5; margin-bottom: .5rem; }
.rv-msg.mine { background: #edf5ef; margin-left: auto; }
.rv-msg .rv-msg-meta { font-size: .76rem; color: #6c7a71; margin-bottom: .15rem; }
.rv-msg .rv-msg-text { white-space: pre-wrap; }
.rv-compose { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; margin-top: .6rem; }
.rv-compose textarea { flex: 1 1 18rem; min-height: 2.6rem; }

/* sticky action bar for long forms */
.rv-actions-bar { position: sticky; bottom: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
    padding: .7rem 1rem; margin: 1rem -.25rem 0; background: rgba(255, 255, 255, .96); border-top: 1px solid #dfe7e1;
    box-shadow: 0 -4px 14px rgba(14, 58, 32, .06); }
.rv-actions-bar .rv-actions-status { margin-right: auto; color: #66736b; font-size: .875rem; }

/* page header for the review pages */
.rv-page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .5rem; margin-bottom: 1rem; }
.rv-page-head h3 { margin: 0; font-weight: 600; color: var(--nbc-primary-dark); }
.rv-page-head .rv-sub { color: #66736b; }
.rv-section { border: 1px solid #e3eae5; border-radius: .7rem; background: #fff; padding: 1rem 1.1rem; margin-bottom: 1rem; }
.rv-section h6 { font-weight: 600; color: var(--nbc-primary-dark); margin-bottom: .7rem; }
.rv-section .btn-link, .rv-card .btn-link { color: var(--nbc-primary); }
.rv-queue-ref { color: var(--nbc-primary-dark); }
.rv-section a:not(.btn):not(.rv-chip), .rv-card a:not(.btn):not(.rv-chip) { color: var(--nbc-primary); }
.btn-check:checked + .btn-outline-primary, .btn-check:active + .btn-outline-primary {
    background-color: var(--nbc-primary); border-color: var(--nbc-primary); color: #fff; }
.btn-check:focus-visible + .btn-outline-primary { box-shadow: 0 0 0 .2rem rgba(26, 86, 50, .25); }

/* certificate preview */
.rv-cert-preview { background: #eef1ef; border-radius: .75rem; padding: 1rem; overflow: auto; }
.rv-cert-preview .cert-page { transform-origin: top left; }

@media (prefers-reduced-motion: reduce) {
    .rv-round > summary::before { transition: none; }
}
@media (max-width: 575.98px) {
    /* on a phone only the current step is named; the dots show the rest */
    .rv-track li:not(.current) .rv-step-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .rv-track li.current .rv-step-label { overflow: visible; }
    .rv-track li.current { z-index: 2; }
    .rv-actions-bar { margin-left: -.5rem; margin-right: -.5rem; }
}

/* ===== Complaints (apps/complaints) ===============================================
   Short and plain: one card, few words. The public pages sit on the glass scene;
   inside the portal the same pieces use the review-flow cards. */
.cmp-hero { padding-bottom: 1.8rem; }
.cmp-card { max-width: 720px; margin: 0 auto; padding: 1.6rem 1.8rem; background: #fff;
    border: 1px solid #dfe7e1; border-radius: .9rem; }
.pub-page .cmp-card { background: linear-gradient(160deg, rgba(252, 253, 250, .88), rgba(244, 248, 242, .74));
    -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, .6); border-top: 3px solid var(--nbc-gold); border-radius: 1.3rem;
    box-shadow: 0 18px 44px rgba(8, 30, 17, .3); }
.cmp-q { margin: 0 0 1.25rem; padding: 0; border: 0; }
.cmp-q > label, .cmp-q > legend { display: block; float: none; width: auto; padding: 0; margin-bottom: .4rem;
    font-size: .9rem; font-weight: 700; color: var(--nbc-primary-dark); }
.cmp-opt { margin-left: .25rem; font-size: .8rem; font-weight: 400; color: #7d8a82; }
.cmp-hint { margin-top: .3rem; font-size: .82rem; color: #66736b; }
.cmp-about { display: flex; flex-wrap: wrap; gap: .5rem; }
.cmp-pill { position: relative; display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .95rem;
    border: 1.5px solid #d3ddd6; border-radius: 999px; background: #fff; color: #2b3a31; font-size: .92rem; cursor: pointer; }
.cmp-pill input { position: absolute; opacity: 0; pointer-events: none; }
.cmp-pill i { color: var(--nbc-primary); }
.cmp-pill:has(input:checked) { border-color: var(--nbc-primary); background: #edf5ef; color: var(--nbc-primary-dark); font-weight: 600; }
.cmp-pill:has(input:focus-visible) { outline: 2px solid var(--nbc-gold); outline-offset: 2px; }
.cmp-private { display: flex; align-items: center; gap: .5rem; margin: 1.4rem 0 0; font-size: .88rem; color: #3f5a48; }
.cmp-actions { display: flex; justify-content: flex-end; margin-top: 1.2rem; }
.cmp-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.cmp-alt { margin: 1.1rem 0 0; text-align: center; font-size: .92rem; color: #3c4a41; }
.cmp-alt a { color: var(--nbc-primary-dark); font-weight: 600; }

.cmp-track { max-width: 760px; margin: 0 auto; }
.pub-page .cmp-track { margin-top: 2rem; }
.pub-page .cmp-track .rv-card { border-top: 3px solid var(--nbc-gold); box-shadow: 0 18px 44px rgba(8, 30, 17, .3); }
.cmp-sent { display: flex; gap: .8rem; margin-bottom: 1rem; padding: 1rem 1.1rem; border: 1px solid #cfe3d5;
    border-radius: .75rem; background: #edf5ef; color: #1d4a2e; }
.cmp-sent > i { font-size: 1.4rem; color: var(--nbc-primary); }
.cmp-sent strong { font-size: 1.05rem; }
.cmp-sent .cmp-sent-body { flex: 1 1 auto; min-width: 0; }
.cmp-outcome { margin-bottom: 1rem; padding: .8rem .95rem; border-left: 4px solid var(--nbc-primary);
    border-radius: .6rem; background: #f4f8f5; }
.cmp-outcome h6 { margin: 0 0 .25rem; font-weight: 700; color: var(--nbc-primary-dark); }
.cmp-outcome .cmp-outcome-text { white-space: pre-wrap; }
.cmp-facts { margin: 0; }
.cmp-facts dt { font-size: .78rem; font-weight: 500; color: #66736b; }
.cmp-facts dd { margin-bottom: .6rem; overflow-wrap: anywhere; }
.cmp-track .cmp-card { max-width: none; }
.cmp-list { overflow: hidden; }
.cmp-back { color: var(--nbc-primary); text-decoration: none; }
.cmp-back:hover { text-decoration: underline; }
.cmp-table td, .cmp-table th { vertical-align: middle; }
.cmp-table tr[data-href] { cursor: pointer; }
.cmp-table .cmp-new td:first-child { font-weight: 700; }
.cmp-login-link { display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; color: #3f5a48; text-decoration: none; }
.cmp-login-link:hover { color: var(--nbc-primary-dark); text-decoration: underline; }
@media (max-width: 575.98px) {
    .cmp-card { padding: 1.2rem 1rem; }
    .cmp-actions .btn { width: 100%; }
}

/* ===== SAE reports (apps/sae) =====================================================
   The paper form, made into short sections with button choices. Same cards
   and pills as the review pages. */
.sae-wrap { max-width: 1000px; margin: 0 auto; }
.sae-wrap .rv-sub a { color: var(--nbc-primary); }
.sae-form .rv-card { margin-bottom: 1rem; }
.sae-form .rv-body { padding-top: .6rem; }
.sae-q { margin: 0 0 1.1rem; padding: 0; border: 0; min-width: 0; }
.rv-body > .sae-q:last-child, .rv-body > .sae-grid:last-child > .sae-q { margin-bottom: 0; }
.sae-grid.sae-fill { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.sae-q > label, .sae-q > legend { display: block; float: none; width: auto; padding: 0; margin-bottom: .35rem;
    font-size: .88rem; font-weight: 600; color: var(--nbc-primary-dark); }
.sae-opt { margin-left: .2rem; font-size: .78rem; font-weight: 400; color: #7d8a82; }
.sae-pills { display: flex; flex-wrap: wrap; gap: .4rem; }
.sae-pill { position: relative; display: inline-flex; align-items: center; padding: .35rem .8rem; border: 1.5px solid #d3ddd6;
    border-radius: 999px; background: #fff; color: #2b3a31; font-size: .88rem; cursor: pointer; line-height: 1.3; }
.sae-pill input { position: absolute; opacity: 0; pointer-events: none; }
.sae-pill:has(input:checked) { border-color: var(--nbc-primary); background: #edf5ef; color: var(--nbc-primary-dark); font-weight: 600; }
.sae-pill:has(input:focus-visible) { outline: 2px solid var(--nbc-gold); outline-offset: 2px; }
.sae-q.has-error .sae-pills .sae-pill { border-color: #e2a7a2; }
.sae-err { margin-top: .25rem; font-size: .82rem; color: #b02a20; }
.sae-q.has-error .form-control, .sae-q.has-error .form-select { border-color: #dc3545; }
.sae-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 1rem; }
.sae-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .5rem 1rem;
    margin-bottom: 1.1rem; padding: .75rem .9rem; border-radius: .6rem; background: #f4f8f5; }
.sae-facts div { min-width: 0; }
.sae-facts span { display: block; font-size: .75rem; color: #66736b; }
.sae-facts strong { display: block; font-weight: 500; overflow-wrap: anywhere; }
.sae-facts .wide { grid-column: 1 / -1; }
.sae-products { width: 100%; border-collapse: separate; border-spacing: 0 .35rem; }
.sae-products th { font-size: .78rem; font-weight: 500; color: #66736b; padding: 0 .35rem; }
.sae-products td { padding: 0 .35rem; }
.sae-products td:first-child, .sae-products th:first-child { padding-left: 0; }
.sae-note { margin-bottom: 1rem; padding: .6rem .85rem; border-left: 4px solid var(--nbc-gold); border-radius: .5rem;
    background: #fbf7ea; color: #5c4a12; font-size: .9rem; }
.sae-send { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem 1rem; }
.sae-send .rv-muted { margin-right: auto; }
[data-when][hidden] { display: none !important; }

/* reading a report */
.sae-read h6 { margin: 1.1rem 0 .45rem; font-size: .8rem; font-weight: 600; color: #4d5a52; }
.sae-read h6:first-child { margin-top: 0; }
.sae-read dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .45rem 1rem; margin: 0; }
.sae-read dl div { min-width: 0; }
.sae-read dt { font-size: .75rem; font-weight: 400; color: #66736b; }
.sae-read dd { margin: 0; overflow-wrap: anywhere; }
.sae-read .wide { grid-column: 1 / -1; }
.sae-read .text { white-space: pre-wrap; }
.sae-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.sae-summary > div { padding: .7rem .85rem; border: 1px solid #dfe7e1; border-radius: .6rem; background: #fff; }
.sae-summary span { display: block; font-size: .75rem; color: #66736b; }
.sae-summary strong { font-weight: 600; color: var(--nbc-primary-dark); }
.sae-earlier > summary { cursor: pointer; padding: .7rem 1.1rem; font-weight: 600; color: var(--nbc-primary-dark); list-style: none; }
.sae-earlier > summary::-webkit-details-marker { display: none; }
.sae-earlier > summary::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: .55rem;
    border: solid #7d8a82; border-width: 0 2px 2px 0; transform: rotate(-45deg); transition: transform .15s; vertical-align: .1rem; }
.sae-earlier[open] > summary::before { transform: rotate(45deg); }
@media (prefers-reduced-motion: reduce) { .sae-earlier > summary::before { transition: none; } }
@media (max-width: 575.98px) {
    .sae-products thead { display: none; }
    .sae-products tr { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; margin-bottom: .8rem; }
    .sae-products td { padding: 0; }
    .sae-products td:first-child { grid-column: 1 / -1; }
    .sae-send .btn { width: 100%; }
}
@media print {
    .sae-noprint { display: none !important; }
    .sae-earlier { display: block; }
}

/* ===== Trial search (static/js/trial_search.js) ===================================
   A search box whose list narrows with every key: SAE dashboard and SAE reports. */
.trial-search { position: relative; max-width: 620px; margin-bottom: 1.25rem; }
.trial-search > label { display: block; margin-bottom: .4rem; font-size: .9rem; font-weight: 600; color: var(--nbc-primary-dark); }
.trial-search .box { position: relative; display: flex; align-items: center; }
.trial-search .box > .bi-search { position: absolute; left: 1rem; color: #66736b; pointer-events: none; }
.trial-search input { width: 100%; padding: .6rem 2.6rem; border: 1px solid #cfdad2; border-radius: 99px;
    background: #fff; color: #1d2b22; font-size: .95rem; }
.trial-search input:focus { outline: none; background: #fff; border-color: #1f6b3f; box-shadow: 0 0 0 .2rem rgba(31, 107, 63, .2); }
.trial-search input::-webkit-search-cancel-button { display: none; }
.trial-search .clear { position: absolute; right: .9rem; color: #66736b; font-size: .9rem; }
.trial-search .clear:hover { color: #1d2b22; }
.trial-search .showing { display: block; margin: .45rem 0 0 1rem; font-size: .85rem; color: #66736b; }
.trial-search .showing a { color: #1f6b3f; font-weight: 600; text-decoration: none; }
.trial-search .results { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: .35rem;
    list-style: none; max-height: 340px; overflow-y: auto; background: #fff; border: 1px solid #e1e6e0; border-radius: 14px;
    box-shadow: 0 18px 40px -12px rgba(14, 58, 32, .35); }
.trial-search .results li { display: grid; grid-template-columns: auto 1fr auto; gap: 0 .75rem; align-items: baseline;
    padding: .5rem .7rem; border-radius: 9px; cursor: pointer; color: #1d2b22; }
.trial-search .results li.on, .trial-search .results li:hover { background: #e4eee7; }
.trial-search .results .ref { font-weight: 600; white-space: nowrap; }
.trial-search .results .ttl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; }
.trial-search .results .cnt { font-size: .8rem; color: #66736b; white-space: nowrap; }
.trial-search .results .cnt.has { color: #1d2b22; font-weight: 600; }
.trial-search .results .who { grid-column: 2 / -1; font-size: .78rem; color: #66736b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trial-search .results .none { display: block; color: #66736b; cursor: default; }
.trial-search .results .none:hover { background: none; }
.trial-search mark { padding: 0; background: rgba(201, 157, 44, .28); color: inherit; border-radius: 2px; }
.trial-search .results li.with-report { grid-template-columns: auto 1fr auto auto; }
.trial-search .results li .report { grid-column: 4; grid-row: 1 / span 2; align-self: center; white-space: nowrap; }
.trial-search .report-hint { display: block; margin: 0 0 .4rem 1rem; font-weight: 600; color: var(--nbc-primary-dark); }
.trial-search .report-hint[hidden] { display: none; }
.trial-search[data-mode="report"] input { border-color: #1f6b3f; }
@media (max-width: 575.98px) {
    .trial-search .results li.with-report .cnt, .trial-search .results li.with-report .ttl { display: none; }
    .trial-search .results li.with-report .who { grid-column: 1 / 4; }
}
