﻿/* =========================================================================
   Citizens Information Center - Columbia County Emergency Management
   Site stylesheet (loaded after Bootstrap 3.4.1 and jQuery UI; page <style>
   blocks load after this file)

   Direction
   - Colours come from the county's spring country: the deep green of the
     Ichetucknee and Santa Fe spring runs, their pale aqua water, limestone.
   - Safety orange (hurricane-warning flags) is reserved for live emergency
     information: the active event bar. Nothing else uses it.
   - One typeface, Atkinson Hyperlegible Next (Braille Institute), chosen for
     legibility by call-takers reading under pressure on long shifts.
   - Flat sheets with hairline borders, no shadows, large targets.
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. Typeface (self-hosted, SIL Open Font License; see lib/fonts)
   ------------------------------------------------------------------------- */
@font-face {
    font-family: "Atkinson Hyperlegible Next";
    src: url("../../fonts/atkinson-hyperlegible-next/AtkinsonHyperlegibleNext-Variable.woff2") format("woff2");
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Atkinson Hyperlegible Next";
    src: url("../../fonts/atkinson-hyperlegible-next/AtkinsonHyperlegibleNext-Italic-Variable.woff2") format("woff2");
    font-weight: 200 800;
    font-style: italic;
    font-display: swap;
}

/* -------------------------------------------------------------------------
   2. Tokens
   ------------------------------------------------------------------------- */
:root {
    /* Spring country */
    --spring-deeper: #082c2a;
    --spring-deep: #0b3d3a;
    --spring: #0e6e66;
    --spring-hover: #0a5952;
    --aqua: #7ed8c9;
    --aqua-wash: #e3f4f0;

    /* Neutrals */
    --ink: #16252a;
    --muted: #57686a;
    --limestone: #eef2f0;
    --paper: #ffffff;
    --wash: #f5f8f7;
    --line: #d3dcd9;
    --line-strong: #7d8f8c;

    /* Live emergency information only */
    --signal: #b8460d;
    --signal-bright: #f26a1b;

    /* Meaning */
    --danger: #b3261e;
    --danger-wash: #fbeaea;
    --success: #2f7d4f;
    --success-wash: #e6f2ea;
    --warning: #8a5a00;
    --warning-wash: #fff3d6;
    --info: #2b5c8a;
    --info-wash: #e8eff7;

    --font: "Atkinson Hyperlegible Next", "Segoe UI", Roboto, Arial, sans-serif;
    --radius: 6px;
    --radius-sm: 4px;

    /* Type scale, major third from 16px */
    --step--1: 13px;
    --step-0: 16px;
    --step-1: 20px;
    --step-2: 25px;
    --step-3: 31px;
    --step-4: 39px;

    /* Names used by older page styles, mapped onto the new palette */
    --cic-navy: var(--spring-deep);
    --cic-navy-dark: var(--spring-deeper);
    --cic-navy-light: var(--spring);
    --cic-gold: var(--aqua);
    --cic-gold-dark: var(--spring);
    --cic-gold-light: var(--aqua-wash);
    --cic-green: var(--success);
    --cic-red: var(--danger);
    --cic-bg: var(--limestone);
    --cic-card-bg: var(--paper);
    --cic-text: var(--ink);
    --cic-text-muted: var(--muted);
    --cic-border: var(--line);
    --cic-radius: var(--radius);
    --cic-radius-sm: var(--radius-sm);
    --cic-font: var(--font);
    --cic-shadow: none;
    --cic-shadow-sm: none;
}

/* -------------------------------------------------------------------------
   3. Base
   ------------------------------------------------------------------------- */
html {
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html, body {
    height: auto;
    min-height: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: var(--step-0);
    line-height: 1.5;
    color: var(--ink);
    background-color: var(--limestone);
}

body > form {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font);
    color: var(--ink);
    letter-spacing: -0.01em;
    line-height: 1.2;
}

h1, .h1 { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 12px; }
h2, .h2 { font-size: var(--step-2); font-weight: 700; margin: 32px 0 12px; padding: 0; border: 0; }
h3, .h3 { font-size: var(--step-1); font-weight: 700; margin: 24px 0 8px; }
h4, .h4 { font-size: var(--step-0); font-weight: 700; margin: 16px 0 8px; }
h5, .h5, h6, .h6 { font-size: var(--step-0); font-weight: 600; }

p { margin: 0 0 12px; }

small, .small { font-size: var(--step--1); }

a { color: var(--spring); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover, a:focus { color: var(--spring-hover); text-decoration-thickness: 2px; }
a.btn, .btn { text-decoration: none; }

hr { border-top: 1px solid var(--line); margin: 24px 0; }

::selection { background: var(--aqua); color: var(--ink); }

b, strong { font-weight: 700; }

.text-muted, .help-block { color: var(--muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }

/* Keyboard focus: always visible, never colour-only */
:focus { outline: none; }
:focus-visible,
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
    outline: 3px solid var(--spring-deep);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -100px;
    z-index: 10000;
    padding: 12px 20px;
    background: var(--paper);
    color: var(--ink);
    font-weight: 700;
    border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; }

/* -------------------------------------------------------------------------
   4. Header, navigation, active-event bar
   ------------------------------------------------------------------------- */
.site-header {
    background: var(--spring-deep);
    color: #d3e6e2;
}

.site-header :focus-visible { outline-color: var(--aqua); }

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 14px;
    padding-bottom: 14px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: #fff;
}
.brand:hover, .brand:focus { text-decoration: none; color: #fff; }

.brand__logo {
    flex: none;
    width: 44px;
    height: 44px;
    padding: 2px;
    border-radius: 50%;
    background: #fff;
}

.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__title { font-size: var(--step-1); font-weight: 800; letter-spacing: -0.01em; color: #fff; }
.brand__subtitle { font-size: 14px; color: #9fc9c1; }

.header-account {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 15px;
}
.account-welcome { color: #9fc9c1; }
.account-name { color: #fff; font-weight: 700; }

a.account-link,
.header-account a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-sm);
    color: #fff !important;
    font-weight: 700;
    text-decoration: none;
    background: transparent;
}
a.account-link:hover, a.account-link:focus,
.header-account a:hover, .header-account a:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: #fff;
    text-decoration: none;
}

.header-account a.account-text-link {
    min-height: 36px;
    padding: 6px 2px;
    border: 0;
    background: none;
    color: #9fc9c1 !important;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.header-account a.account-text-link:hover,
.header-account a.account-text-link:focus { color: #fff !important; background: none; }

/* Navigation: task links on the left, reference links on the right */
.site-nav { border-top: 1px solid rgba(255, 255, 255, 0.1); }

.site-nav__inner { display: flex; align-items: stretch; }

.nav-menu {
    display: flex;
    flex: 1;
    align-items: stretch;
    justify-content: space-between;
    gap: 16px;
}

.nav-group {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-group--secondary { justify-content: flex-end; }

.nav-group > li { display: block; }

.nav-menu a.mnu {
    display: block;
    padding: 14px 14px 13px;
    color: #d3e6e2 !important;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: inset 0 -3px 0 transparent;
}
.nav-group--secondary a.mnu { color: #9fc9c1 !important; font-weight: 500; }

.nav-menu a.mnu:hover,
.nav-menu a.mnu:focus-visible {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.06);
}

.nav-menu a.mnu[aria-current="page"] {
    color: #fff !important;
    box-shadow: inset 0 -3px 0 var(--aqua);
}

/* Opens another site: a small out-of-page mark, not a text arrow */
.nav-menu a.mnu--external::after {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-left: 6px;
    vertical-align: 0;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M4 1H1v8h8V6M6 1h3v3M9 1 4.5 5.5' fill='none' stroke='black' stroke-width='1.4'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M4 1H1v8h8V6M6 1h3v3M9 1 4.5 5.5' fill='none' stroke='black' stroke-width='1.4'/%3E%3C/svg%3E") center / contain no-repeat;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    margin: 8px 0;
    padding: 0 14px;
    color: #fff;
    font-weight: 700;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.nav-toggle__bars { display: inline-flex; flex-direction: column; gap: 4px; }
.nav-toggle__bar { display: block; width: 18px; height: 2px; background: #fff; }

/* The active emergency: the one place safety orange appears */
.event-bar {
    background: var(--signal);
    color: #fff;
}
.event-bar__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 16px;
    padding-top: 10px;
    padding-bottom: 10px;
    font-size: 15px;
}
.event-bar__live {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
}
.event-bar__live::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    animation: event-pulse 2.4s ease-out infinite;
}
.event-bar__name { font-size: var(--step-1); font-weight: 800; letter-spacing: -0.01em; }
.event-bar__since { color: #ffe7d8; }

.event-bar--standby { background: var(--spring-deeper); color: #9fc9c1; }
.event-bar--standby .event-bar__live { font-weight: 600; }
.event-bar--standby .event-bar__live::before { background: #6f8f8a; animation: none; }

@keyframes event-pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

@media (max-width: 1199px) {
    .nav-toggle { display: inline-flex; }
    .site-nav__inner { flex-direction: column; align-items: flex-start; }
    .nav-menu { display: none; flex-direction: column; width: 100%; gap: 0; padding-bottom: 12px; }
    .nav-menu.is-open { display: flex; }
    .nav-group { flex-direction: column; width: 100%; }
    .nav-group--secondary { border-top: 1px solid rgba(255, 255, 255, 0.12); margin-top: 8px; padding-top: 8px; }
    .nav-menu a.mnu { padding: 12px 4px; box-shadow: inset 3px 0 0 transparent; padding-left: 14px; }
    .nav-menu a.mnu[aria-current="page"] { box-shadow: inset 3px 0 0 var(--aqua); }
}

@media (max-width: 767px) {
    .site-header__inner { flex-wrap: wrap; }
    .brand__subtitle { display: none; }
    .brand__logo { width: 36px; height: 36px; }
    .account-welcome, .header-account a.account-text-link { display: none; }
    .event-bar__name { font-size: var(--step-0); }
}

@media (prefers-reduced-motion: reduce) {
    .event-bar__live::before { animation: none; }
    * { scroll-behavior: auto !important; transition: none !important; }
}

/* -------------------------------------------------------------------------
   5. Page layout
   ------------------------------------------------------------------------- */
.page-wrap {
    flex: 1 0 auto;
    padding: 32px 0 56px;
}

/* Header, bars, page and footer share Bootstrap's container width so their edges line up */
.content-container { max-width: none; }

/* Bootstrap's clearfix pseudo-elements would become flex items and push content inward */
.site-header__inner::before, .site-header__inner::after,
.site-nav__inner::before, .site-nav__inner::after,
.event-bar__inner::before, .event-bar__inner::after,
.site-footer__inner::before, .site-footer__inner::after { content: none; display: none; }

.content-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 32px 36px 36px;
}
.content-card:focus { outline: none; }

/* A page's first heading is its title, whichever level the page used */
.content-card > h1:first-child,
.content-card > h2:first-child,
.content-card > .panel:first-child,
.content-card > div:first-child > h1:first-child,
.content-card > div:first-child > h2:first-child { margin-top: 0; }

.content-card > h2:first-child,
.content-card > div:first-child > h2:first-child:not(.panel-title) {
    font-size: var(--step-3);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.workspace-heading { max-width: 70ch; margin-bottom: 28px; }
.workspace-heading h1 { margin: 0 0 10px; font-size: var(--step-4); }
.workspace-heading p,
.field-help,
.section-heading p,
.reference-intro p { color: var(--muted); }
.workspace-heading p { font-size: 18px; margin: 0; }

/* Older pages put a small label above the title. It now reads as plain text. */
.eyebrow {
    display: block;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: var(--muted);
}

.site-footer {
    flex: none;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
    padding: 20px 0 28px;
}
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; }
.site-footer__muted { color: var(--muted); }

@media (max-width: 767px) {
    .page-wrap { padding: 16px 0 32px; }
    .content-card { padding: 20px 16px 24px; border-left: 0; border-right: 0; border-radius: 0; }
    .page-wrap > .container { padding-left: 0; padding-right: 0; }
    h1, .h1, .workspace-heading h1 { font-size: var(--step-3); }
}

/* -------------------------------------------------------------------------
   6. Buttons
   ------------------------------------------------------------------------- */
.btn {
    min-height: 44px;
    padding: 10px 18px;
    font-family: var(--font);
    font-size: var(--step-0);
    font-weight: 700;
    line-height: 1.4;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background-image: none;
    box-shadow: none !important;
    text-shadow: none;
}
.btn:active { transform: translateY(1px); }
.btn-lg { min-height: 52px; padding: 13px 26px; font-size: 18px; }
.btn-sm, .btn-xs { min-height: 34px; padding: 5px 12px; font-size: 14px; }

.btn-primary { background-color: var(--spring); border-color: var(--spring); color: #fff; }
.btn-primary:hover, .btn-primary:focus,
.btn-primary:active, .btn-primary.active,
.btn-primary:active:hover, .btn-primary:active:focus,
.open > .dropdown-toggle.btn-primary { background-color: var(--spring-hover) !important; border-color: var(--spring-hover) !important; color: #fff; }

.btn-default { background-color: var(--paper); border-color: var(--line-strong); color: var(--ink); }
.btn-default:hover, .btn-default:focus,
.btn-default:active, .btn-default.active { background-color: var(--wash); border-color: var(--ink); color: var(--ink); }

.btn-success { background-color: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover, .btn-success:focus, .btn-success:active { background-color: #256640 !important; border-color: #256640 !important; color: #fff; }

.btn-danger { background-color: var(--paper); border-color: var(--danger); color: var(--danger); }
.btn-danger:hover, .btn-danger:focus, .btn-danger:active { background-color: var(--danger) !important; border-color: var(--danger) !important; color: #fff; }

.btn-warning { background-color: var(--warning-wash); border-color: var(--warning); color: var(--warning); }
.btn-warning:hover, .btn-warning:focus { background-color: var(--warning); border-color: var(--warning); color: #fff; }

.btn-info { background-color: var(--info); border-color: var(--info); color: #fff; }

.btn-link { color: var(--spring); font-weight: 600; text-decoration: underline; }
.btn-link:hover, .btn-link:focus { color: var(--spring-hover); }

.btn[disabled], .btn.disabled, fieldset[disabled] .btn { opacity: 0.55; }

.btn-group > .btn + .btn { margin-left: 8px; }
.btn-group > .btn { border-radius: var(--radius-sm) !important; }

/* -------------------------------------------------------------------------
   7. Forms
   ------------------------------------------------------------------------- */
label {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
}

.form-control {
    min-height: 44px;
    height: auto;
    padding: 10px 12px;
    font-family: var(--font);
    font-size: var(--step-0);
    color: var(--ink);
    background-color: var(--paper);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    box-shadow: none;
}
.form-control::placeholder { color: #7a8a8c; opacity: 1; }
.form-control:focus {
    border-color: var(--spring);
    outline: 3px solid rgba(14, 110, 102, 0.25);
    outline-offset: 0;
    box-shadow: none;
}
.form-control[readonly], .form-control[disabled], fieldset[disabled] .form-control {
    background-color: var(--wash);
    color: var(--muted);
    border-style: dashed;
}
textarea.form-control { resize: vertical; line-height: 1.5; }
select.form-control { padding-right: 32px; }

input[type="checkbox"], input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0 8px 0 0;
    vertical-align: -3px;
    accent-color: var(--spring);
}

.checkbox label, .radio label, .checks label { font-weight: 400; }
.checks { width: 100%; }
.checks td { padding: 2px 16px 2px 0; vertical-align: top; }
.checks label { display: inline; cursor: pointer; padding: 6px 0; margin: 0; }

.form-group { margin-bottom: 20px; }

fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { font-size: var(--step-1); font-weight: 700; color: var(--ink); border: 0; margin-bottom: 12px; }

/* Validation and inline messages */
.failureNotification,
.field-validation-error {
    display: inline-block;
    margin: 6px 0;
    color: var(--danger);
    font-weight: 700;
}
.failureNotification ul { margin: 0 0 12px; padding-left: 20px; }
span.failureNotification:empty { display: none; }

.search-feedback { display: block; margin: 16px 0; font-weight: 700; }

/* Sign in: the page narrows to the form */
.content-card:has(.auth-panel) { max-width: 520px; margin: 24px auto 0; padding: 36px 40px 40px; }
.auth-panel { max-width: 440px; }
.auth-panel h1 { font-size: var(--step-3); margin-bottom: 8px; }
.auth-panel .auth-intro { color: var(--muted); margin-bottom: 24px; }
.auth-panel .accountInfo .row { margin: 0; }
.auth-panel .accountInfo .col-sm-5 { width: 100%; float: none; padding: 0; margin-bottom: 18px; }
.auth-panel .btn-primary { width: 100%; margin-top: 8px; }
fieldset.login { max-width: none; margin: 0; padding: 0; background: none; border: 0; }
fieldset.login legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* -------------------------------------------------------------------------
   8. Tables
   ------------------------------------------------------------------------- */
.table {
    background: var(--paper);
    margin-bottom: 24px;
    font-variant-numeric: tabular-nums;
}
.table > thead > tr > th,
.table > thead > tr > td {
    padding: 12px 14px;
    background-color: var(--wash);
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
    vertical-align: bottom;
    border-top: 0;
    border-bottom: 1px solid var(--line-strong);
}
.table > thead > tr > td b { font-weight: 700; }
.table > tbody > tr > td,
.table > tbody > tr > th {
    padding: 12px 14px;
    vertical-align: middle;
    border-top: 1px solid var(--line);
}
.table > tbody > tr:hover > td { background-color: var(--aqua-wash); }
.table-striped > tbody > tr:nth-of-type(odd) { background-color: var(--wash); }

.table-bordered,
.table-bordered > thead > tr > th, .table-bordered > thead > tr > td,
.table-bordered > tbody > tr > th, .table-bordered > tbody > tr > td { border-color: var(--line); }
.table-bordered > thead > tr > td, .table-bordered > thead > tr > th { border-bottom: 1px solid var(--line-strong); }

.table-responsive { border: 0; }

/* Row status, used on call lists */
.reviewed, .table > tbody > tr.reviewed > td { background-color: var(--success-wash) !important; }
.adminInfo, .table > tbody > tr.adminInfo > td { background-color: var(--warning-wash) !important; }
.userInfo, .table > tbody > tr.userInfo > td { background-color: var(--info-wash) !important; color: var(--ink) !important; }

/* -------------------------------------------------------------------------
   9. Panels, wells, alerts, labels
   ------------------------------------------------------------------------- */
.panel {
    margin-bottom: 20px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: none;
}
.panel > .panel-heading,
.panel-default > .panel-heading,
.panel-primary > .panel-heading,
.panel-info > .panel-heading,
.panel-success > .panel-heading {
    padding: 12px 16px;
    background: var(--wash);
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    border-radius: var(--radius) var(--radius) 0 0;
    font-weight: 700;
}
.panel-primary { border-color: var(--line); }
.panel-primary > .panel-heading { box-shadow: inset 4px 0 0 var(--spring); }
.panel-heading h1, .panel-heading h2, .panel-heading h3, .panel-heading h4, .panel-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--ink) !important;
}
.panel-body { padding: 16px; }
.panel-footer { background: var(--wash); border-top: 1px solid var(--line); }

.well {
    padding: 20px;
    background: var(--wash);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: none;
}

.alert {
    padding: 14px 16px;
    border: 0;
    border-left: 4px solid;
    border-radius: var(--radius-sm);
    color: var(--ink);
}
.alert-success { background: var(--success-wash); border-left-color: var(--success); }
.alert-info { background: var(--info-wash); border-left-color: var(--info); }
.alert-warning { background: var(--warning-wash); border-left-color: var(--warning); }
.alert-danger { background: var(--danger-wash); border-left-color: var(--danger); }

.label { display: inline-block; padding: 3px 8px; font-size: 13px; font-weight: 700; border-radius: var(--radius-sm); }
.label-default { background: #e4eae8; color: var(--ink); }
.label-primary { background: var(--spring); }
.label-success { background: var(--success-wash); color: var(--success); }
.label-warning { background: var(--warning-wash); color: var(--warning); }
.label-danger { background: var(--danger-wash); color: var(--danger); }
.label-info { background: var(--info-wash); color: var(--info); }

.badge { background: var(--spring); font-weight: 700; }

.nav-tabs { border-bottom: 1px solid var(--line); }
.nav-tabs > li > a { color: var(--muted); font-weight: 600; border: 0; border-radius: 0; margin: 0; }
.nav-tabs > li > a:hover { background: none; color: var(--ink); }
.nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus {
    color: var(--ink); border: 0; box-shadow: inset 0 -3px 0 var(--spring); background: none;
}

/* Modal (Bootstrap) */
.modal-content { border: 0; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(8, 44, 42, 0.3); }
.modal-header { border-bottom: 1px solid var(--line); }
.modal-footer { border-top: 1px solid var(--line); }

/* -------------------------------------------------------------------------
   10. DataTables
   ------------------------------------------------------------------------- */
.dataTables_wrapper { padding-top: 4px; font-size: 15px; }
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    min-height: 40px;
    padding: 6px 10px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--paper);
}
.dataTables_wrapper .dataTables_filter input { margin-left: 8px; }
.dataTables_wrapper .dataTables_info { color: var(--muted); }
.dataTables_wrapper .dataTables_paginate .paginate_button {
    min-width: 36px;
    padding: 6px 12px !important;
    border: 1px solid transparent !important;
    border-radius: var(--radius-sm) !important;
    color: var(--ink) !important;
    background: none !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover { background: var(--wash) !important; border-color: var(--line) !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--spring) !important;
    border-color: var(--spring) !important;
    color: #fff !important;
}
table.dataTable thead th, table.dataTable thead td { border-bottom: 1px solid var(--line-strong); }
table.dataTable.no-footer { border-bottom: 1px solid var(--line); }
table.dataTable tbody tr { background: var(--paper); }
table.dataTable.stripe tbody tr.odd, table.dataTable.display tbody tr.odd { background: var(--wash); }
table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover { background: var(--aqua-wash); }

/* -------------------------------------------------------------------------
   11. jQuery UI and AJAX Control Toolkit widgets
   ------------------------------------------------------------------------- */
.ui-widget, .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: var(--font); }
.ui-widget-content { color: var(--ink); }

.ui-autocomplete, .ui-menu,
.ajax__autocomplete, ul[id$="_completionListElem"] {
    padding: 4px 0;
    background: var(--paper) !important;
    border: 1px solid var(--line-strong) !important;
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 24px rgba(8, 44, 42, 0.16);
    font-family: var(--font) !important;
    font-size: 15px !important;
    z-index: 2000;
}
.ui-menu .ui-menu-item-wrapper, ul[id$="_completionListElem"] li { padding: 8px 12px !important; }
.ui-state-active, .ui-widget-content .ui-state-active, .ui-menu .ui-state-active {
    margin: 0 !important;
    background: var(--aqua-wash) !important;
    border-color: transparent !important;
    color: var(--ink) !important;
}

.ui-datepicker { padding: 8px; border: 1px solid var(--line-strong) !important; border-radius: var(--radius); box-shadow: 0 8px 24px rgba(8, 44, 42, 0.16); }
.ui-datepicker .ui-datepicker-header { background: var(--spring-deep); border: 0; border-radius: var(--radius-sm); color: #fff; }
.ui-datepicker .ui-datepicker-title { font-weight: 700; }
.ui-datepicker .ui-state-default { background: var(--paper); border: 1px solid transparent; text-align: center; }
.ui-datepicker .ui-state-highlight { border-color: var(--spring); background: var(--aqua-wash); color: var(--ink); }
.ui-datepicker .ui-state-active { background: var(--spring) !important; color: #fff !important; }

.ui-dialog { padding: 0; border: 0 !important; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(8, 44, 42, 0.3); }
.ui-dialog .ui-dialog-titlebar { padding: 14px 18px; background: var(--paper); border: 0; border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; font-weight: 800; color: var(--ink); }
.ui-dialog .ui-dialog-content { padding: 18px; }
.ui-dialog .ui-dialog-buttonpane { border-top: 1px solid var(--line); }
.ui-dialog .ui-dialog-buttonpane button { min-height: 40px; padding: 6px 16px; background: var(--spring); border: 0; color: #fff; font-weight: 700; border-radius: var(--radius-sm); }
.ui-widget-overlay { background: var(--spring-deeper); opacity: 0.5; }

/* -------------------------------------------------------------------------
   12. Workspace pages (Start a call, Call screen)
   ------------------------------------------------------------------------- */
/* Primary action on the start page */
.start-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 32px;
    color: #fff;
    background: var(--spring-deep);
    border-radius: var(--radius);
}
.start-card h2 { margin: 0 0 6px; color: #fff; font-size: var(--step-3); font-weight: 800; letter-spacing: -0.02em; }
.start-card p { margin: 0; color: #c4ded9; font-size: 17px; }
.start-card .btn-primary { flex: none; background: var(--aqua); border-color: var(--aqua); color: var(--spring-deeper); }
.start-card .btn-primary:hover, .start-card .btn-primary:focus { background: #a6e6db !important; border-color: #a6e6db !important; color: var(--spring-deeper); }
.start-card :focus-visible { outline-color: var(--aqua); }

/* The three questions every call answers, in order */
.workflow-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 32px;
    margin: 0;
    padding: 18px 2px 28px;
    color: var(--muted);
    font-size: 15px;
    list-style: none;
}
.workflow-strip b,
.section-heading > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 28px;
    height: 28px;
    margin-right: 10px;
    color: var(--spring-deep);
    background: var(--aqua-wash);
    border: 1px solid #b7e2d9;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

/* Quick links: one divided strip, not a grid of cards */
.workspace-tools {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 0 36px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.workspace-tools a {
    display: block;
    padding: 18px 20px 18px 0;
    color: var(--ink);
    text-decoration: none;
}
.workspace-tools a + a { padding-left: 20px; border-left: 1px solid var(--line); }
.workspace-tools a strong { display: block; color: var(--spring); font-size: 17px; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.workspace-tools a span { display: block; margin-top: 4px; color: var(--muted); font-size: 15px; }
.workspace-tools a:hover strong { text-decoration-thickness: 2px; }

.location-search { padding-top: 4px; }
.location-search h2 { margin: 0 0 6px; }
.search-row { display: flex; align-items: flex-start; gap: 12px; margin: 6px 0 10px; }
.search-input { flex: 1; }
.field-help { font-size: 15px; }

/* Call screen */
.call-workspace::after, .call-form::after { content: ""; display: table; clear: both; }
.call-form { padding: 0 28px 24px 0; }
.call-form > [class*="col-lg-"] { margin-bottom: 16px; }
.section-heading {
    clear: both;
    display: flex;
    gap: 4px;
    padding: 28px 15px 14px;
    border-top: 1px solid var(--line);
}
.section-heading:first-child { padding-top: 0; border-top: 0; }
.section-heading > span { margin-top: 1px; }
.section-heading h2 { margin: 0 0 4px; font-size: var(--step-1); }
.section-heading p { margin: 0; font-size: 15px; }

.call-reference {
    padding: 22px;
    background: var(--wash);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.reference-intro h2 { margin: 0 0 6px; font-size: var(--step-1); }
.reference-details {
    clear: both;
    margin: 14px 0;
    padding: 14px 16px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}
.reference-details summary { min-height: 28px; color: var(--ink); font-weight: 700; cursor: pointer; }
.reference-details[open] summary { margin-bottom: 14px; }

.call-form .form-control { background-color: var(--paper) !important; }
.call-form .form-control[readonly] { background-color: var(--wash) !important; }
.call-form .btn-group { display: flex; flex-wrap: wrap; gap: 10px; }
.call-form .btn-group > .btn { float: none; margin-left: 0; }

@media (max-width: 1199px) {
    .call-form { padding-right: 15px; }
    .call-reference { clear: both; }
}

@media (max-width: 767px) {
    .start-card { flex-direction: column; align-items: stretch; padding: 22px 20px; }
    .start-card .btn { width: 100%; }
    .workflow-strip { flex-direction: column; }
    .workspace-tools { grid-template-columns: 1fr; }
    .workspace-tools a, .workspace-tools a + a { padding: 14px 0; border-left: 0; }
    .workspace-tools a + a { border-top: 1px solid var(--line); }
    .search-row { flex-direction: column; align-items: stretch; }
    .search-row .btn { width: 100%; }
    .call-form { padding: 0 0 20px; }
}

/* -------------------------------------------------------------------------
   13. Reports list
   ------------------------------------------------------------------------- */
.report-list { margin: 8px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.report-list li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.report-list .report-name { font-size: 17px; font-weight: 700; }
.report-list .report-note { display: block; color: var(--muted); font-size: 15px; font-weight: 400; }

.report-list .report-name a { color: var(--spring); }
.report-list li > .btn { flex: none; }

/* Call natures on the call screen, grouped under a quiet heading */
.nature-group-title { margin: 0 0 8px; font-size: var(--step-0); font-weight: 700; color: var(--ink); }

/* -------------------------------------------------------------------------
   14. Legacy classes still referenced by older pages
   ------------------------------------------------------------------------- */
.title { font-size: var(--step-3); font-weight: 800; color: var(--ink); }
.header { background-color: var(--spring-deep); }
.mnu { color: #fff; }

/* -------------------------------------------------------------------------
   15. Print: the call record, not the chrome
   ------------------------------------------------------------------------- */
@media print {
    .site-header, .event-bar, .site-footer, .nav-toggle, .btn, .skip-link { display: none !important; }
    body { background: #fff; }
    .page-wrap { padding: 0; }
    .content-card { border: 0; padding: 0; }
    a { color: var(--ink); text-decoration: none; }
}
