/* National Aquatic Services: bright, friendly, blue and white (from the logo) with a sunny yellow accent. */

:root {
    --na-navy: #0b3557;
    --na-blue-dark: #05629f;
    --na-blue: #0a7bc4;
    --na-blue-mid: #1b9ad8;
    --na-aqua: #22b3e6;
    --na-sky: #dff2fb;
    --na-mist: #f2f9fd;
    --na-sun: #ffc845;
    --na-sun-dark: #f0ac00;
    --na-sand: #f6eedf;
    --na-leaf: #4caf6e;
    --ink: #17324a;
    --muted: #4c6478;
    --line: #d5e6f1;
    --white: #ffffff;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 6px 20px rgba(11, 53, 87, .08);
    --shadow-lift: 0 12px 28px rgba(11, 53, 87, .14);
    --font-head: "Nunito", "Trebuchet MS", sans-serif;
    --font-body: "Nunito Sans", "Segoe UI", Arial, sans-serif;
}

html { font-size: 17px; }
@media (min-width: 768px) { html { font-size: 18px; } }

body {
    margin: 0;
    background: var(--white);
    color: var(--ink);
    font-family: var(--font-body);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main { flex: 1 0 auto; }

h1, h2, h3, h4 {
    font-family: var(--font-head);
    font-weight: 800;
    color: var(--na-navy);
    line-height: 1.2;
    letter-spacing: -.01em;
}

a { color: var(--na-blue); }
a:hover { color: var(--na-blue-dark); }

:focus-visible { outline: 3px solid var(--na-sun); outline-offset: 2px; }

/* ---------- Buttons & forms ---------- */

.btn {
    font-family: var(--font-head);
    font-weight: 800;
    border-radius: 999px;
    padding: .6rem 1.4rem;
    border-width: 2px;
}
.btn-lg { padding: .8rem 1.8rem; font-size: 1.08rem; }
.btn-sm { padding: .3rem .9rem; font-size: .85rem; }
.btn-primary { background: var(--na-blue); border-color: var(--na-blue); color: #fff; }
.btn-primary:hover, .btn-primary:focus { background: var(--na-blue-dark); border-color: var(--na-blue-dark); color: #fff; }
.btn-sun { background: var(--na-sun); border-color: var(--na-sun); color: var(--na-navy); }
.btn-sun:hover, .btn-sun:focus { background: var(--na-sun-dark); border-color: var(--na-sun-dark); color: var(--na-navy); }
.btn-outline { background: #fff; border-color: var(--na-blue); color: var(--na-blue); }
.btn-outline:hover { background: var(--na-sky); color: var(--na-blue-dark); border-color: var(--na-blue-dark); }
.btn-white { background: #fff; border-color: #fff; color: var(--na-blue-dark); }
.btn-white:hover { background: var(--na-sky); border-color: var(--na-sky); color: var(--na-navy); }
.btn-secondary { background: var(--na-mist); border-color: var(--line); color: var(--na-navy); }
.btn-secondary:hover { background: var(--na-sky); border-color: var(--na-blue-mid); color: var(--na-navy); }
.btn-link { border-radius: 6px; }
.btn svg { vertical-align: -4px; margin-right: .35rem; }

.form-control, .form-select {
    border-radius: var(--radius-sm);
    border: 2px solid var(--line);
    padding: .65rem .9rem;
    font-size: 1rem;
    color: var(--ink);
}
.form-control:focus, .form-select:focus { border-color: var(--na-blue-mid); box-shadow: 0 0 0 .2rem rgba(34, 179, 230, .2); }
.form-label { font-weight: 700; color: var(--na-navy); margin-bottom: .3rem; }
.form-text { color: var(--muted); }
.form-check-input:checked { background-color: var(--na-blue); border-color: var(--na-blue); }
.form-floating > .form-control { height: calc(3.6rem + 4px); }
.form-floating { margin-bottom: 1rem; }

.alert { border-radius: var(--radius-sm); border-width: 2px; }

/* ---------- Header ---------- */

.topbar {
    background: var(--na-blue);
    color: #fff;
    font-size: .9rem;
}
.topbar .container { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; justify-content: space-between; align-items: center; padding-top: .4rem; padding-bottom: .4rem; }
.topbar a { color: #fff; font-weight: 700; text-decoration: none; }
.topbar a:hover { text-decoration: underline; color: #fff; }
.topbar svg { vertical-align: -3px; margin-right: .35rem; }

.site-nav {
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: .6rem 0;
    position: sticky;
    top: 0;
    z-index: 1020;
}
.site-nav .navbar-brand img { height: 44px; width: auto; display: block; }
@media (min-width: 992px) { .site-nav .navbar-brand img { height: 52px; } }
.site-nav .nav-link {
    font-family: var(--font-head);
    font-weight: 800;
    color: var(--na-navy);
    padding: .5rem .85rem !important;
    border-radius: 999px;
}
.site-nav .nav-link:hover, .site-nav .nav-link:focus { color: var(--na-blue); background: var(--na-mist); }
.site-nav .nav-link.active { color: var(--na-blue); }
.site-nav .navbar-toggler { border: 2px solid var(--line); border-radius: var(--radius-sm); padding: .4rem .6rem; }
.site-nav .nav-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
@media (max-width: 991.98px) {
    .site-nav .navbar-collapse { padding: .75rem 0 .25rem; }
    .site-nav .nav-actions { margin-top: .5rem; }
}
.site-nav .dropdown-menu { border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); }

/* ---------- Shared page pieces ---------- */

.section { padding: 4rem 0; }
.section-sm { padding: 2.5rem 0; }
.section-mist { background: var(--na-mist); }
.section-head { max-width: 680px; margin: 0 auto 2.5rem; text-align: center; }
.section-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); margin-bottom: .6rem; }
.section-head p { color: var(--muted); font-size: 1.1rem; margin: 0; }

.eyebrow {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: .85rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--na-blue);
    background: var(--na-sky);
    border-radius: 999px;
    padding: .25rem .85rem;
    margin-bottom: 1rem;
}

.wave-divider { display: block; width: 100%; height: 48px; }

.icon-bubble {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--na-sky);
    color: var(--na-blue);
    flex-shrink: 0;
}
.icon-bubble.is-sun { background: #fff3cf; color: #b77e00; }

/* ---------- Home: hero ---------- */

.hero {
    background: linear-gradient(180deg, #e9f6fd 0%, #f7fcff 70%, #fff 100%);
    padding: 3.5rem 0 1rem;
    overflow: hidden;
}
.hero h1 { font-size: clamp(2.3rem, 5.5vw, 3.6rem); margin-bottom: 1rem; }
.hero h1 .accent { color: var(--na-blue); }
.hero-lead { font-size: 1.2rem; color: var(--muted); max-width: 34rem; margin-bottom: 1.75rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.5rem; }
.hero-notes { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; color: var(--na-navy); font-weight: 700; font-size: .95rem; padding: 0; margin: 0; list-style: none; }
.hero-notes li { display: flex; align-items: center; gap: .4rem; }
.hero-notes svg { color: var(--na-leaf); }
.hero-art { width: 100%; height: auto; max-width: 560px; display: block; margin: 0 auto; }

/* ---------- Service cards ---------- */

.service-card {
    height: 100%;
    background: #fff;
    border: 2px solid var(--line);
    border-radius: var(--radius);
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    text-decoration: none;
    color: var(--ink);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.service-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--na-aqua); color: var(--ink); }
.service-card h3 { font-size: 1.25rem; margin: .25rem 0 0; }
.service-card p { margin: 0; color: var(--muted); }
.service-card .more { margin-top: auto; font-family: var(--font-head); font-weight: 800; color: var(--na-blue); }

/* ---------- Steps ---------- */

.steps { counter-reset: step; }
.step {
    text-align: center;
    padding: 1rem 1.25rem;
}
.step-num {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--na-blue);
    color: #fff;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    box-shadow: 0 0 0 8px var(--na-sky);
}
.step h3 { font-size: 1.25rem; }
.step p { color: var(--muted); margin: 0; }

/* ---------- Promise list ---------- */

.promise {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: #fff;
    border-radius: var(--radius);
    padding: 1.4rem;
    height: 100%;
    box-shadow: var(--shadow);
}
.promise h3 { font-size: 1.15rem; margin: 0 0 .3rem; }
.promise p { margin: 0; color: var(--muted); }

/* ---------- Call-to-action band ---------- */

.cta-band {
    background: var(--na-blue);
    background-image: radial-gradient(circle at 85% 20%, rgba(34, 179, 230, .55), transparent 55%);
    color: #fff;
    border-radius: 24px;
    padding: 2.75rem 2rem;
    text-align: center;
}
.cta-band h2 { color: #fff; font-size: clamp(1.7rem, 3.5vw, 2.3rem); }
.cta-band p { font-size: 1.15rem; margin-bottom: 1.5rem; color: #e8f6fd; }
.cta-band .btns { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }

/* ---------- Inner page header ---------- */

.page-hero {
    background: linear-gradient(180deg, #e9f6fd 0%, #f7fcff 100%);
    padding: 3rem 0 2.5rem;
    text-align: center;
}
.page-hero h1 { font-size: clamp(2rem, 4.5vw, 2.9rem); margin-bottom: .6rem; }
.page-hero p { color: var(--muted); font-size: 1.15rem; max-width: 640px; margin: 0 auto; }

/* ---------- Services page ---------- */

.service-detail {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 2.25rem 0;
    border-bottom: 2px dashed var(--line);
    scroll-margin-top: 90px;
}
.service-detail:last-child { border-bottom: 0; }
@media (min-width: 768px) { .service-detail { grid-template-columns: 96px 1fr 1fr; gap: 2rem; } }
.service-detail .icon-bubble { width: 80px; height: 80px; border-radius: 24px; }
.service-detail h2 { font-size: 1.7rem; margin-bottom: .35rem; }
.service-detail .tagline { font-weight: 700; color: var(--na-blue); margin-bottom: .75rem; }
.check-list { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.check-list li { padding: .35rem 0 .35rem 2rem; position: relative; font-weight: 600; }
.check-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .6rem;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    background: var(--na-sky) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a7bc4' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 70% no-repeat;
}

/* ---------- About ---------- */

.about-logo { width: 100%; max-width: 420px; height: auto; display: block; margin: 0 auto; }
.lead-text { font-size: 1.15rem; }

/* ---------- Contact ---------- */

.contact-card {
    background: #fff;
    border: 2px solid var(--line);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow);
}
.contact-line { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.25rem; }
.contact-line:last-child { margin-bottom: 0; }
.contact-line strong { display: block; font-family: var(--font-head); color: var(--na-navy); }
.contact-line a { font-size: 1.2rem; font-weight: 700; text-decoration: none; }
.contact-phone-big { font-size: 1.6rem !important; }
.thanks-card { text-align: center; padding: 2.5rem 1.5rem; }
.visually-hidden-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */

.site-footer {
    background: var(--na-navy);
    color: #d7e8f4;
    margin-top: 3rem;
    position: relative;
}
.site-footer .footer-wave { display: block; width: 100%; height: 40px; background: #fff; }
.site-footer .footer-body { padding: 2.5rem 0 1.5rem; }
.site-footer h4 { color: #fff; font-size: 1.05rem; margin-bottom: .9rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .4rem; }
.site-footer .footer-logo { height: 46px; width: auto; margin-bottom: .9rem; }
.site-footer .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .15);
    padding: 1rem 0;
    font-size: .88rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .5rem;
}

/* ---------- Portal ---------- */

.portal { background: var(--na-mist); padding: 2rem 0 1rem; }
.portal-head {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.75rem;
}
.portal-head h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin: 0 0 .3rem; }
.portal-head p { color: var(--muted); margin: 0; }
.portal-head .actions { display: flex; flex-wrap: wrap; gap: .5rem; }

.role-chip {
    display: inline-block;
    background: #fff;
    border: 2px solid var(--line);
    color: var(--na-navy);
    font-weight: 700;
    font-size: .8rem;
    border-radius: 999px;
    padding: .1rem .7rem;
    margin: .25rem .25rem 0 0;
}
.role-chip.is-admin { background: #fff3cf; border-color: #ffe08a; }
.role-chip.is-office { background: var(--na-sky); border-color: #b5e2f6; }
.role-chip.is-crew { background: #e3f5e9; border-color: #b9e3c7; }
.role-chip.is-customer { background: #f1ecfb; border-color: #d9cdf3; }
.role-chip.is-other { background: #eef1f4; color: var(--muted); }

.portal-section { margin-bottom: 2.25rem; }
.portal-section h2 { font-size: 1.35rem; margin-bottom: .2rem; }
.portal-section .intro { color: var(--muted); margin-bottom: 1rem; }

.tile-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.tile {
    position: relative;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: #fff;
    border: 2px solid transparent;
    border-radius: var(--radius);
    padding: 1.25rem;
    text-decoration: none;
    color: var(--ink);
    box-shadow: var(--shadow);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: var(--na-aqua); color: var(--ink); }
.tile strong { display: block; font-family: var(--font-head); font-size: 1.1rem; color: var(--na-navy); margin-bottom: .15rem; }
.tile span.summary { display: block; color: var(--muted); font-size: .93rem; line-height: 1.45; }
.tile .icon-bubble { width: 48px; height: 48px; border-radius: 14px; }
.tile.is-ready { border-color: #ffe08a; }
.tile.is-ready .icon-bubble { background: #fff3cf; color: #b77e00; }
.tile-badge {
    position: absolute;
    top: .7rem;
    right: .7rem;
    font-size: .7rem;
    font-weight: 800;
    font-family: var(--font-head);
    text-transform: uppercase;
    letter-spacing: .04em;
    border-radius: 999px;
    padding: .1rem .55rem;
    background: #eef1f4;
    color: var(--muted);
}
.tile-badge.is-ready { background: #e3f5e9; color: #23753f; }
.tile:has(.tile-badge) > div:last-child { padding-right: 4.5rem; }

.panel {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
}
.panel h2 { font-size: 1.3rem; }

.coming-soon-hero { display: flex; gap: 1.25rem; align-items: center; margin-bottom: 1.25rem; }
.coming-soon-hero .icon-bubble { width: 72px; height: 72px; border-radius: 22px; }
.coming-soon-hero h1 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.2rem); }
.soon-pill {
    display: inline-block;
    background: #fff3cf;
    color: #8a5f00;
    font-weight: 800;
    font-family: var(--font-head);
    font-size: .8rem;
    border-radius: 999px;
    padding: .15rem .7rem;
    margin-top: .3rem;
}

/* ---------- Users ---------- */

.data-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.data-table th {
    text-align: left;
    font-family: var(--font-head);
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
    padding: .6rem .75rem;
    border-bottom: 2px solid var(--line);
}
.data-table td { padding: .75rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: var(--na-mist); }
.data-table .email { font-weight: 700; }
.table-wrap { overflow-x: auto; }
.status-dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .35rem; background: var(--na-leaf); }
.status-dot.is-off { background: #c0392b; }
.status-dot.is-pending { background: var(--na-sun-dark); }
.filter-bar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: 1rem; }
.filter-bar .form-control { max-width: 320px; }
.seg { display: inline-flex; background: var(--na-mist); border: 2px solid var(--line); border-radius: 999px; padding: 3px; }
.seg a { padding: .3rem .9rem; border-radius: 999px; text-decoration: none; font-weight: 700; color: var(--muted); font-size: .9rem; }
.seg a.active { background: #fff; color: var(--na-navy); box-shadow: 0 1px 4px rgba(11, 53, 87, .12); }

.role-options { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.role-option {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    padding: .85rem 1rem;
    cursor: pointer;
    margin: 0;
}
.role-option:has(input:checked) { border-color: var(--na-blue-mid); background: var(--na-mist); }
.role-option input { margin-top: .3rem; flex-shrink: 0; }
.role-option strong { display: block; color: var(--na-navy); }
.role-option span { color: var(--muted); font-size: .9rem; }

/* ---------- Login & account pages (Identity) ---------- */

.auth {
    background: linear-gradient(180deg, #e9f6fd 0%, #fff 100%);
    padding: 3rem 1rem;
    display: flex;
    justify-content: center;
}
.auth-card {
    width: 100%;
    max-width: 460px;
    background: #fff;
    border-radius: 22px;
    box-shadow: var(--shadow-lift);
    padding: 2.25rem 2rem;
    border-top: 6px solid var(--na-aqua);
}
.auth-card h1 { font-size: 1.9rem; margin-bottom: .4rem; }
.auth-sub { color: var(--muted); margin-bottom: 1.5rem; }
.auth-links { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: .95rem; }
.auth-links p { margin-bottom: .5rem; }
.auth-status {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #e3f5e9;
    color: #23753f;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}
.auth-status.is-error { background: #fdecea; color: #c0392b; }
.pw-toggle { position: absolute; right: .6rem; top: .95rem; z-index: 5; }

/* Identity "Manage account" pages render inside the portal body. */
.portal-body > h1 { font-size: 1.9rem; }
.nav-pills .nav-link { border-radius: 999px; color: var(--na-navy); font-weight: 700; }
.nav-pills .nav-link.active { background: var(--na-blue); }

.error-page { text-align: center; padding: 4rem 1rem; }

/* ---------- Business pages (customers, projects, calendar, materials, reports) ---------- */

.sample-note {
    display: flex;
    gap: .6rem;
    align-items: flex-start;
    background: #fff8e1;
    border: 2px dashed #ffd666;
    color: #6b4c00;
    border-radius: var(--radius-sm);
    padding: .7rem 1rem;
    margin-bottom: 1.25rem;
    font-size: .93rem;
}
.sample-note svg { flex-shrink: 0; margin-top: .2rem; color: #b77e00; }

.row-link { color: var(--na-navy); text-decoration: none; }
.row-link:hover { color: var(--na-blue); text-decoration: underline; }
.text-warn { color: #a3610a; font-weight: 700; }
.keep-lines { white-space: pre-line; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.panel-head h2 { margin: 0; }
.panel-head .money { font-family: var(--font-head); font-size: 1.4rem; color: var(--na-navy); }
.note-panel { background: #fffdf3; }

.facts { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; margin: 0; }
.facts dt { font-weight: 700; color: var(--muted); font-size: .9rem; }
.facts dd { margin: 0; }
.facts-row { grid-template-columns: auto 1fr auto 1fr; }
@media (max-width: 575.98px) { .facts-row { grid-template-columns: auto 1fr; } }

.chip {
    display: inline-block;
    border-radius: 999px;
    padding: .1rem .7rem;
    font-size: .8rem;
    font-weight: 700;
    background: #eef1f4;
    color: var(--na-navy);
    border: 2px solid transparent;
    white-space: nowrap;
}
.chip.is-plan { background: var(--na-sky); color: var(--na-blue-dark); }
.chip.is-low { background: #fff3cf; color: #8a5f00; }
.chip.is-out { background: #fdecea; color: #a93226; }

/* Job stages: one colour per stage, used for chips, dots and the stage track. */
.stage-lead { background: #eef1f4; color: #4c6478; }
.stage-estimate-sent { background: #f1ecfb; color: #5b3fa8; }
.stage-sold { background: #e3f5e9; color: #23753f; }
.stage-permitting { background: #fff3cf; color: #8a5f00; }
.stage-in-progress { background: var(--na-sky); color: var(--na-blue-dark); }
.stage-finishing { background: #dcf3f6; color: #0d6b78; }
.stage-done { background: var(--na-navy); color: #fff; }
.stage-on-hold { background: #f6eedf; color: #7a5a1c; }
.stage-lost { background: #fdecea; color: #a93226; }
.dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin-right: .4rem; vertical-align: 0; }
.dot.stage-lead { background: #9fb0bf; } .dot.stage-estimate-sent { background: #8f73d6; } .dot.stage-sold { background: var(--na-leaf); }
.dot.stage-permitting { background: var(--na-sun-dark); } .dot.stage-in-progress { background: var(--na-blue); } .dot.stage-finishing { background: #22a5b8; }
.dot.stage-done { background: var(--na-navy); } .dot.stage-on-hold { background: #c49a4a; } .dot.stage-lost { background: #c0392b; }

.stage-strip { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.stage-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: #fff;
    border: 2px solid var(--line);
    border-radius: 999px;
    padding: .25rem .5rem .25rem .8rem;
    font-weight: 700;
    font-size: .9rem;
    color: var(--na-navy);
    text-decoration: none;
}
.stage-pill b { background: var(--na-mist); border-radius: 999px; padding: 0 .5rem; font-size: .8rem; }
.stage-pill:hover { border-color: var(--na-aqua); color: var(--na-navy); }
.stage-pill.active { border-color: var(--na-blue); background: var(--na-sky); }

.stage-panel { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; padding: 1.1rem 1.5rem; }
.stage-track { display: flex; flex-wrap: wrap; gap: .25rem; list-style: none; padding: 0; margin: 0; counter-reset: stage; }
.stage-track li { display: flex; align-items: center; font-size: .85rem; font-weight: 700; color: var(--muted); }
.stage-track li::before {
    counter-increment: stage;
    content: counter(stage);
    width: 1.6rem; height: 1.6rem; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: #eef1f4; margin-right: .4rem; font-size: .75rem;
}
.stage-track li:not(:last-child)::after { content: ""; width: 1.2rem; height: 2px; background: var(--line); margin: 0 .35rem; }
.stage-track li.is-done { color: var(--na-navy); }
.stage-track li.is-done::before { background: var(--na-leaf); color: #fff; content: "\2713"; }
.stage-track li.is-current { color: var(--na-blue-dark); }
.stage-track li.is-current::before { background: var(--na-blue); color: #fff; box-shadow: 0 0 0 4px var(--na-sky); }
.stage-move { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.stage-move .form-select { width: auto; border-radius: 999px; }

.inline-form { display: flex; flex-wrap: wrap; gap: .5rem; }
.inline-form .form-control { flex: 1 1 200px; }
.inline-form .qty { flex: 0 0 90px; }
.inline-form .price { flex: 0 0 130px; }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 110px 1fr; gap: .75rem; padding: .5rem 0; border-bottom: 1px dashed var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline .when { font-weight: 700; color: var(--na-navy); font-size: .9rem; }
.timeline .when .form-text { display: block; font-weight: 400; font-size: .8rem; }

.money-panel { border-top: 6px solid var(--na-sun); }
.money-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-bottom: .75rem; }
.money-grid div { background: var(--na-mist); border-radius: var(--radius-sm); padding: .6rem .8rem; }
.money-grid span { display: block; font-size: .8rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.money-grid strong { font-family: var(--font-head); font-size: 1.25rem; color: var(--na-navy); }
.money-grid .is-due { background: #fff3cf; }
.money-grid .is-due strong { color: #8a5f00; }
.progress-bar-na { height: 10px; background: var(--na-mist); border-radius: 999px; overflow: hidden; }
.progress-bar-na span { display: block; height: 100%; background: var(--na-leaf); border-radius: 999px; }

.event-list { list-style: none; padding: 0; margin: 0; }
.event-list li { padding: .45rem 0; border-bottom: 1px dashed var(--line); }
.event-list li:last-child { border-bottom: 0; }
.event-list .form-text { display: block; font-size: .85rem; }
.plain-list { list-style: none; padding: 0; margin: 0; }
.plain-list li { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; align-items: center; padding: .4rem 0; border-bottom: 1px dashed var(--line); }
.plain-list li:last-child { border-bottom: 0; }
.plain-list .form-text { flex: 1 1 100%; font-size: .85rem; }
.stat-inline { font-size: 1.05rem; }
.stat-inline strong { font-family: var(--font-head); font-size: 1.6rem; color: var(--na-blue); }

/* Stat tiles */
.stat-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 1.25rem; }
.stat {
    display: block;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: var(--ink);
    border: 2px solid transparent;
}
a.stat:hover { border-color: var(--na-aqua); color: var(--ink); }
.stat.active { border-color: var(--na-blue); }
.stat span { display: block; font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.stat strong { display: block; font-family: var(--font-head); font-size: 1.8rem; color: var(--na-navy); line-height: 1.2; }
.stat small { color: var(--muted); }
.stat small.up { color: #23753f; font-weight: 700; }
.stat small.down { color: #a93226; font-weight: 700; }
.stat.is-warn strong { color: #a3610a; }

/* Calendar: event colours by kind */
.cal-ev {
    display: block;
    font-size: .78rem;
    line-height: 1.3;
    font-weight: 600;
    border-radius: 6px;
    padding: .15rem .45rem;
    margin-bottom: .2rem;
    text-decoration: none;
    color: var(--na-navy);
    background: #eef1f4;
    border-left: 4px solid #9fb0bf;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cal-ev:hover { filter: brightness(.95); color: var(--na-navy); }
.cal-ev b { font-weight: 800; margin-right: .3rem; opacity: .8; }
.cal-ev.is-past { opacity: .65; }
.kind-job { background: var(--na-sky); border-left-color: var(--na-blue); }
.kind-service-visit { background: #e3f5e9; border-left-color: var(--na-leaf); }
.kind-estimate { background: #f1ecfb; border-left-color: #8f73d6; }
.kind-inspection { background: #fff3cf; border-left-color: var(--na-sun-dark); }
.kind-repair { background: #fde8d7; border-left-color: #e07b2a; }
.kind-time-off { background: #f3f3f3; border-left-color: #8d8d8d; color: #555; }
.kind-other { background: #dcf3f6; border-left-color: #22a5b8; }
.kind-chip { border-left: 0; display: inline-block; margin-left: .4rem; vertical-align: middle; }
.cal-legend { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.cal-legend .cal-ev { margin: 0; }

.cal-panel { padding: 1.25rem; }
.cal-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.cal-nav { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.cal-nav h2 { margin: 0 0 0 .5rem; font-size: 1.3rem; }
.team-filter { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.team-chip {
    display: inline-flex; align-items: center; gap: .4rem;
    border: 2px solid var(--line); border-radius: 999px; padding: .2rem .7rem .2rem .25rem;
    font-size: .88rem; font-weight: 700; color: var(--na-navy); text-decoration: none; background: #fff;
}
.team-chip:hover { border-color: var(--na-aqua); color: var(--na-navy); }
.team-chip.active { border-color: var(--na-blue); background: var(--na-sky); }
.team-chip:first-child { padding-left: .7rem; }

.swatch {
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.7rem; height: 1.7rem; border-radius: 50%;
    font-size: .7rem; font-weight: 800; color: #fff; font-family: var(--font-head);
    flex-shrink: 0; margin-right: .35rem;
}
.sw-0 { background: #9fb0bf; }
.sw-1 { background: var(--na-blue); }
.sw-2 { background: #1b8a5a; }
.sw-3 { background: #d9822b; }
.sw-4 { background: #7b5cd6; }
.sw-5 { background: #c2185b; }
.sw-6 { background: #0d6b78; }
.sw-7 { background: #8a5f00; }
.sw-8 { background: #455a64; }

.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; background: var(--line); border: 3px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.cal-dow { background: var(--na-mist); text-align: center; font-family: var(--font-head); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: .35rem 0; }
.cal-cell { background: #fff; min-height: 112px; padding: .3rem .35rem; }
.cal-cell.is-other { background: #fafcfe; }
.cal-cell.is-other .cal-daynum { color: #a9b8c4; }
.cal-cell.is-weekend:not(.is-other) { background: #fdfdfa; }
.cal-cell.is-today { background: #fffbe9; }
.cal-cell.is-today .cal-daynum { background: var(--na-blue); color: #fff; }
.cal-cell-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .2rem; }
.cal-daynum { font-weight: 800; font-family: var(--font-head); font-size: .85rem; color: var(--na-navy); text-decoration: none; border-radius: 999px; padding: 0 .4rem; min-width: 1.5rem; text-align: center; }
.cal-daynum:hover { background: var(--na-sky); }
.cal-add { color: #b7c6d2; text-decoration: none; font-weight: 800; font-size: 1rem; line-height: 1; padding: 0 .3rem; border-radius: 6px; opacity: 0; }
.cal-cell:hover .cal-add, .cal-week td:hover .cal-add, .cal-add:focus { opacity: 1; }
.cal-add:hover { background: var(--na-sky); color: var(--na-blue); }
.cal-more { display: block; font-size: .75rem; font-weight: 700; color: var(--na-blue); text-decoration: none; padding-left: .3rem; }
@media (max-width: 767.98px) {
    .cal-cell { min-height: 64px; padding: .2rem; }
    .cal-ev { font-size: .62rem; padding: .05rem .25rem; border-left-width: 3px; }
    .cal-ev b { display: none; }
    .cal-add { display: none; }
}

.cal-week { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; min-width: 860px; }
.cal-week th, .cal-week td { border-bottom: 1px solid var(--line); vertical-align: top; padding: .4rem .35rem; }
.cal-week thead th { text-align: center; background: var(--na-mist); border-bottom: 2px solid var(--line); }
.cal-week thead th a { text-decoration: none; color: var(--na-navy); display: block; }
.cal-week thead th span { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.cal-week thead th b { font-family: var(--font-head); font-size: 1.1rem; }
.cal-week thead th.is-today b { background: var(--na-blue); color: #fff; border-radius: 999px; padding: 0 .5rem; }
.cal-week td.is-today { background: #fffbe9; }
.cal-week .who-col { width: 170px; text-align: left; }
.cal-week tbody th { display: flex; align-items: center; font-weight: 700; color: var(--na-navy); }
.cal-week .who-name { line-height: 1.2; }
.cal-week .who-name small { display: block; font-weight: 400; color: var(--muted); font-size: .75rem; }
.cal-week td .cal-add { display: inline-block; }
.cal-week tr.unassigned td { background: #fff8f2; }

.day-list { list-style: none; padding: 0; margin: 0; }
.day-list li { display: grid; grid-template-columns: 130px 1fr; gap: 1rem; padding: .8rem .5rem; border-bottom: 1px solid var(--line); border-left: 5px solid #9fb0bf; margin-bottom: .4rem; border-radius: 6px; background: #fff; }
.day-list li.kind-job { border-left-color: var(--na-blue); } .day-list li.kind-service-visit { border-left-color: var(--na-leaf); }
.day-list li.kind-estimate { border-left-color: #8f73d6; } .day-list li.kind-inspection { border-left-color: var(--na-sun-dark); }
.day-list li.kind-repair { border-left-color: #e07b2a; } .day-list li.kind-time-off { border-left-color: #8d8d8d; } .day-list li.kind-other { border-left-color: #22a5b8; }
.day-time { font-weight: 800; font-family: var(--font-head); color: var(--na-navy); }
.day-title { font-weight: 800; font-family: var(--font-head); font-size: 1.05rem; color: var(--na-navy); text-decoration: none; }
.day-title:hover { color: var(--na-blue); }
@media (max-width: 575.98px) { .day-list li { grid-template-columns: 1fr; gap: .25rem; } }

.team-picker { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.team-option { display: flex; align-items: center; gap: .5rem; border: 2px solid var(--line); border-radius: var(--radius-sm); padding: .55rem .75rem; cursor: pointer; margin: 0; }
.team-option:has(input:checked) { border-color: var(--na-blue-mid); background: var(--na-mist); }
.team-option input { flex-shrink: 0; margin: 0; }
.team-option strong { display: block; color: var(--na-navy); line-height: 1.2; }
.team-option small { color: var(--muted); }

/* Materials */
.materials-table tr.is-low td { background: #fffbe9; }
.materials-table tr.is-out td { background: #fff3f1; }
.materials-table .adjust { display: inline-flex; align-items: center; gap: .4rem; }
.materials-table .adjust .btn-sm { padding: 0 .55rem; line-height: 1.5; }
.materials-table .chip { margin-left: .35rem; }
.store-check { color: var(--na-blue); }
.store-option { max-width: 640px; }

/* Reports: single-hue bars, labels in text colour */
.columns { display: flex; align-items: flex-end; gap: .5rem; height: 220px; padding-top: 1.5rem; border-bottom: 2px solid var(--line); }
.column { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; }
.column .bar { width: 100%; max-width: 44px; background: var(--na-blue); border-radius: 4px 4px 0 0; transition: filter .15s; }
.column:hover .bar { filter: brightness(1.15); }
.column .value { font-size: .72rem; font-weight: 700; color: var(--muted); margin-bottom: .2rem; }
.column .label { position: absolute; top: 100%; margin-top: .3rem; font-size: .75rem; font-weight: 700; color: var(--muted); }
.columns + details { margin-top: 1.75rem; }
.bars { list-style: none; padding: 0; margin: 0; }
.bars li { display: grid; grid-template-columns: 130px 1fr 70px; align-items: center; gap: .6rem; padding: .35rem 0; }
.bars .label { font-weight: 700; font-size: .9rem; color: var(--na-navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; }
.bars .track { height: 12px; background: var(--na-mist); border-radius: 999px; overflow: hidden; }
.bars .fill { display: block; height: 100%; background: var(--na-blue); border-radius: 999px; min-width: 3px; }
.bars .value { text-align: right; font-weight: 700; font-size: .9rem; }
@media print {
    .site-nav, .topbar, .site-footer, .portal-head .actions, .sample-note { display: none; }
    .panel { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
}

/* Careers */
.job-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: .9rem;
    background: #fff;
    border: 2px solid var(--line);
    border-radius: var(--radius);
    padding: 1.6rem;
    scroll-margin-top: 90px;
}
.job-head { display: flex; gap: 1rem; align-items: center; }
.job-head h3 { font-size: 1.3rem; margin: 0; }
.job-meta { color: var(--na-blue); font-weight: 700; font-size: .9rem; }
.job-card h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: .4rem; }
.job-card p { margin: 0; color: var(--muted); }
.small-list li { font-size: .92rem; font-weight: 500; padding: .2rem 0 .2rem 1.8rem; }
.small-list li::before { top: .45rem; width: 1.05rem; height: 1.05rem; }
.hiring-pill { display: inline-block; background: var(--na-sun); color: var(--na-navy); font-size: .7rem; font-weight: 800; border-radius: 999px; padding: 0 .5rem; margin-left: .3rem; vertical-align: 1px; }

/* Company documents */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-weight: 700; font-size: .95rem; margin-top: .4rem; }
.crumbs a { display: inline-flex; align-items: center; gap: .3rem; color: var(--na-blue); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span { color: var(--muted); }
.doc-search { display: flex; gap: .5rem; }
.doc-search .form-control { min-width: 240px; }
.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.5rem; align-items: start; }
.doc-side { display: grid; gap: 1.5rem; }
.doc-side .panel h2 { font-size: 1.1rem; margin-bottom: .5rem; }
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 80px 120px auto; align-items: center; gap: .9rem; padding: .7rem .5rem; border-bottom: 1px solid var(--line); }
.doc-row:last-child { border-bottom: 0; }
.doc-row:hover { background: var(--na-mist); }
.doc-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: var(--na-mist); color: var(--na-blue); }
.doc-icon.is-folder { background: var(--na-sky); color: var(--na-blue-dark); }
.doc-icon.is-pdf { background: #fdecea; color: #a93226; }
.doc-icon.is-doc { background: #e7f0fb; color: #1f4e9c; }
.doc-icon.is-sheet { background: #e6f4ea; color: #1e7b3a; }
.doc-icon.is-image { background: #fff3cf; color: #8a5f00; }
.doc-name { min-width: 0; display: flex; flex-direction: column; }
.doc-name a { font-weight: 700; color: var(--na-navy); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-name a:hover { color: var(--na-blue); text-decoration: underline; }
.doc-name small { color: var(--muted); font-size: .8rem; }
.doc-meta { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.doc-actions { display: flex; align-items: center; gap: .25rem; justify-content: flex-end; white-space: nowrap; }
@media (max-width: 900px) {
    .doc-layout { grid-template-columns: 1fr; }
    .doc-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
    .doc-row .doc-meta { display: none; }
    .doc-search .form-control { min-width: 0; }
}
