/* ==========================================================================
   Texel Air Dashboards - colour system, status colours and dark mode.
   Loaded last. Light values follow the brand (navy / cyan); status and data
   colours are added on top so a value's meaning is visible at a glance:
     good = green, warn = amber, crit = red, info = brand blue, muted = grey
     XLR = blue, TNZ = orange; AD/SB = violet, scheduled MX = lavender;
     work orders: for planning -> planned -> in work = light -> dark blue.
   Dark mode follows the device setting (prefers-color-scheme) unless the
   viewer chose Light or Dark with the top-bar switch. It re-points
   the brand neutral tokens, so every existing rule picks it up; the few
   elements that must stay on the dark brand navy (top bar, clocks, active
   chips, badges) restore the light-mode values locally.
   ========================================================================== */
:root {
  color-scheme: light;
  --c-good: #13914a;  --c-good-ink: #0c6b35; --c-good-bg: #e2f4e9;
  --c-warn: #e7a008;  --c-warn-ink: #8a5a00; --c-warn-bg: #fdf1d6;
  --c-crit: #d23b3b;  --c-crit-ink: #b02a2a; --c-crit-bg: #fbe4e4;
  --c-info: #1f6fc4;  --c-info-ink: #174f8c; --c-info-bg: #e1eefb;
  --c-muted: #8a96a4; --c-muted-bg: #edf1f5;
  --c-xlr: #2a78d6;   --c-tnz: #eb6834;
  --c-adsb: #5a45c8;  --c-sched: #a79cf0;
  --c-wo1: #9cc4f2;   --c-wo2: #3a86dc;   --c-wo3: #123f7c;
  --c-accent: #1b9bd8;
  --c-bar: var(--ta-navy);
  --banner-bg: #fff4dc; --banner-ink: #6b4700; --banner-line: #f1d38c;
  --card-shadow: 0 1px 2px rgba(10,28,51,.06), 0 2px 8px rgba(10,28,51,.05);
  --brand-solid: #143055;
}

/* Dark: follows the device unless the viewer picked Light or Dark in the top bar
   (<html data-theme="light|dark">, cookie __Host-texeldash-theme). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    /* brand neutrals re-pointed for dark surfaces */
    --ta-white: #151c26;       /* cards */
    --ta-paper: #0c1118;       /* page */
    --ta-mist: #1d2632;        /* sunk surfaces, table heads, grid lines */
    --ta-line: #29343f;
    --ta-line-strong: #3b4755;
    --ta-slate-500: #93a0af;   /* muted text */
    --ta-slate-700: #c9d2dc;   /* body text */
    --ta-navy: #e9eff6;        /* "strong" text (headings, key figures) */
    --ta-blue: #7cc3f0;
    --ta-cyan: #2fb3f0;
    --ta-cyan-100: #13324a;    /* quiet fills / hover */
    --ta-cyan-300: #7fd0f5;
    --co2-100: #22301a;

    --c-good: #2fbf6a;  --c-good-ink: #5fd68f; --c-good-bg: #123322;
    --c-warn: #f2b53a;  --c-warn-ink: #f5c867; --c-warn-bg: #3a2c0c;
    --c-crit: #ef5c5c;  --c-crit-ink: #ff8a8a; --c-crit-bg: #3d1719;
    --c-info: #5aa6ee;  --c-info-ink: #8cc3f5; --c-info-bg: #132c47;
    --c-muted: #7f8b99; --c-muted-bg: #222c38;
    --c-xlr: #4a94ec;   --c-tnz: #f07a47;
    --c-adsb: #9585f0;  --c-sched: #5b4dc2;
    --c-wo1: #1d4f8f;   --c-wo2: #3f8ee4;   --c-wo3: #a6ccf6;
    --c-accent: #3fb6ee;
    --c-bar: #5aa6ee;
    --banner-bg: #2b2310; --banner-ink: #f3cf7a; --banner-line: #5a4618;
    --card-shadow: none;
    --brand-solid: #1c4272;
    --rule-two-tone: linear-gradient(90deg, #1c4272 0%, #1c4272 45%, #2fb3f0 45%, #2fb3f0 100%);
  }
  :root:not([data-theme="light"]) .app-header, :root:not([data-theme="light"]) .clock:not(.is-utc), :root:not([data-theme="light"]) .chip.is-on, :root:not([data-theme="light"]) .xp-groupby a.is-current, :root:not([data-theme="light"]) .badge-edto, :root:not([data-theme="light"]) .cell.group-duty, :root:not([data-theme="light"]) .cell.group-sim, :root:not([data-theme="light"]) button, :root:not([data-theme="light"]) .button, :root:not([data-theme="light"]) .xp-chip:hover { --ta-white: #ffffff; --ta-navy: #143055; --ta-cyan: #009ee5; --ta-blue: #00457c; }
  :root:not([data-theme="light"]) .app-header select { --ta-white: #ffffff; --ta-navy: #143055; }
  :root:not([data-theme="light"]) .app-header, :root:not([data-theme="light"]) .clock:not(.is-utc) { color: #ffffff; --text-inverse: #ffffff; --text-strong: #ffffff; --text-muted: rgba(255,255,255,.72); }
  :root:not([data-theme="light"]) .clock:not(.is-utc) { background: #10233d; }
  :root:not([data-theme="light"]) .chip.is-on, :root:not([data-theme="light"]) .xp-groupby a.is-current { background: var(--brand-solid); border-color: var(--brand-solid); }
  :root:not([data-theme="light"]) img.brand-logo { filter: none; }
  :root:not([data-theme="light"]) .q.hi { background: var(--c-good-bg); color: var(--c-good-ink); }
  :root:not([data-theme="light"]) .q.mid { background: var(--c-info-bg); color: var(--c-info-ink); }
  :root:not([data-theme="light"]) .q.lo { background: var(--c-warn-bg); color: var(--c-warn-ink); }
  :root:not([data-theme="light"]) .chart-base { stroke: var(--ta-line-strong); }
  :root:not([data-theme="light"]) tbody tr:hover td, :root:not([data-theme="light"]) tbody tr:hover th { background: var(--ta-cyan-100); }
  :root:not([data-theme="light"]) .co2-card, :root:not([data-theme="light"]) .tile, :root:not([data-theme="light"]) .finding, :root:not([data-theme="light"]) details.fold, :root:not([data-theme="light"]) details.day-fold { box-shadow: none; }
  :root:not([data-theme="light"]) input[type=date] { background: var(--ta-white); color: var(--ta-navy); }
}
:root[data-theme="dark"] {
    color-scheme: dark;
    /* brand neutrals re-pointed for dark surfaces */
    --ta-white: #151c26;       /* cards */
    --ta-paper: #0c1118;       /* page */
    --ta-mist: #1d2632;        /* sunk surfaces, table heads, grid lines */
    --ta-line: #29343f;
    --ta-line-strong: #3b4755;
    --ta-slate-500: #93a0af;   /* muted text */
    --ta-slate-700: #c9d2dc;   /* body text */
    --ta-navy: #e9eff6;        /* "strong" text (headings, key figures) */
    --ta-blue: #7cc3f0;
    --ta-cyan: #2fb3f0;
    --ta-cyan-100: #13324a;    /* quiet fills / hover */
    --ta-cyan-300: #7fd0f5;
    --co2-100: #22301a;

    --c-good: #2fbf6a;  --c-good-ink: #5fd68f; --c-good-bg: #123322;
    --c-warn: #f2b53a;  --c-warn-ink: #f5c867; --c-warn-bg: #3a2c0c;
    --c-crit: #ef5c5c;  --c-crit-ink: #ff8a8a; --c-crit-bg: #3d1719;
    --c-info: #5aa6ee;  --c-info-ink: #8cc3f5; --c-info-bg: #132c47;
    --c-muted: #7f8b99; --c-muted-bg: #222c38;
    --c-xlr: #4a94ec;   --c-tnz: #f07a47;
    --c-adsb: #9585f0;  --c-sched: #5b4dc2;
    --c-wo1: #1d4f8f;   --c-wo2: #3f8ee4;   --c-wo3: #a6ccf6;
    --c-accent: #3fb6ee;
    --c-bar: #5aa6ee;
    --banner-bg: #2b2310; --banner-ink: #f3cf7a; --banner-line: #5a4618;
    --card-shadow: none;
    --brand-solid: #1c4272;
    --rule-two-tone: linear-gradient(90deg, #1c4272 0%, #1c4272 45%, #2fb3f0 45%, #2fb3f0 100%);
  }
  :root[data-theme="dark"] .app-header, :root[data-theme="dark"] .clock:not(.is-utc), :root[data-theme="dark"] .chip.is-on, :root[data-theme="dark"] .xp-groupby a.is-current, :root[data-theme="dark"] .badge-edto, :root[data-theme="dark"] .cell.group-duty, :root[data-theme="dark"] .cell.group-sim, :root[data-theme="dark"] button, :root[data-theme="dark"] .button, :root[data-theme="dark"] .xp-chip:hover { --ta-white: #ffffff; --ta-navy: #143055; --ta-cyan: #009ee5; --ta-blue: #00457c; }
  :root[data-theme="dark"] .app-header select { --ta-white: #ffffff; --ta-navy: #143055; }
  :root[data-theme="dark"] .app-header, :root[data-theme="dark"] .clock:not(.is-utc) { color: #ffffff; --text-inverse: #ffffff; --text-strong: #ffffff; --text-muted: rgba(255,255,255,.72); }
  :root[data-theme="dark"] .clock:not(.is-utc) { background: #10233d; }
  :root[data-theme="dark"] .chip.is-on, :root[data-theme="dark"] .xp-groupby a.is-current { background: var(--brand-solid); border-color: var(--brand-solid); }
  :root[data-theme="dark"] img.brand-logo { filter: none; }
  :root[data-theme="dark"] .q.hi { background: var(--c-good-bg); color: var(--c-good-ink); }
  :root[data-theme="dark"] .q.mid { background: var(--c-info-bg); color: var(--c-info-ink); }
  :root[data-theme="dark"] .q.lo { background: var(--c-warn-bg); color: var(--c-warn-ink); }
  :root[data-theme="dark"] .chart-base { stroke: var(--ta-line-strong); }
  :root[data-theme="dark"] tbody tr:hover td, :root[data-theme="dark"] tbody tr:hover th { background: var(--ta-cyan-100); }
  :root[data-theme="dark"] .co2-card, :root[data-theme="dark"] .tile, :root[data-theme="dark"] .finding, :root[data-theme="dark"] details.fold, :root[data-theme="dark"] details.day-fold { box-shadow: none; }
  :root[data-theme="dark"] input[type=date] { background: var(--ta-white); color: var(--ta-navy); }


/* ---- bars follow the data colour, not the navy text colour */
.bar { fill: var(--c-bar); }
.legend-item.legend-solid::before { border-top-color: var(--c-bar); }

/* ---- informative tiles: label, value, what it counts, status line */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--sp-3); margin: 0 0 var(--sp-5); }
.tile { display: flex; flex-direction: column; gap: 6px; background: var(--ta-white); border: 1px solid var(--border-subtle); border-radius: 10px;
        padding: var(--sp-4); box-shadow: var(--card-shadow); text-decoration: none; color: inherit; position: relative; }
a.tile:hover { border-color: var(--ta-cyan); }
.tile-label { font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted); }
.tile-value { font-size: 30px; font-weight: var(--fw-bold); line-height: 1.1; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.tile-value small { font-size: 15px; font-weight: var(--fw-semibold); color: var(--text-muted); margin-left: 3px; }
.tile-sub { font-size: var(--fs-xs); color: var(--text-muted); }
.tile-go { margin-top: auto; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--text-link); }
.tile.tile-good { border-top: 4px solid var(--c-good); } .tile.tile-warn { border-top: 4px solid var(--c-warn); }
.tile.tile-crit { border-top: 4px solid var(--c-crit); } .tile.tile-info { border-top: 4px solid var(--c-info); }

.pill { display: inline-flex; align-items: center; gap: 6px; width: fit-content; max-width: 100%; font-size: 12px; font-weight: var(--fw-semibold);
        padding: 3px 9px; border-radius: 999px; background: var(--c-muted-bg); color: var(--text-body); line-height: 1.3; }
.pill i { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--c-muted); }
.pill-good { background: var(--c-good-bg); color: var(--c-good-ink); } .pill-good i { background: var(--c-good); }
.pill-warn { background: var(--c-warn-bg); color: var(--c-warn-ink); } .pill-warn i { background: var(--c-warn); }
.pill-crit { background: var(--c-crit-bg); color: var(--c-crit-ink); } .pill-crit i { background: var(--c-crit); }
.pill-info { background: var(--c-info-bg); color: var(--c-info-ink); } .pill-info i { background: var(--c-info); }
.val-crit { color: var(--c-crit-ink); font-weight: var(--fw-bold); }
.val-warn { color: var(--c-warn-ink); font-weight: var(--fw-semibold); }
.val-good { color: var(--c-good-ink); font-weight: var(--fw-semibold); }

/* ---- key findings */
.findings { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: var(--sp-3); }
.finding { background: var(--ta-white); border: 1px solid var(--border-subtle); border-left: 4px solid var(--c-muted); border-radius: 8px; padding: var(--sp-3) var(--sp-4); }
.finding h3 { margin: 0 0 4px; color: var(--text-strong); text-transform: none; letter-spacing: 0; font-size: var(--fs-sm); }
.finding p { margin: 0; font-size: var(--fs-sm); color: var(--text-body); }
.finding-crit { border-left-color: var(--c-crit); } .finding-warn { border-left-color: var(--c-warn); }
.finding-info { border-left-color: var(--c-info); } .finding-good { border-left-color: var(--c-good); }

/* ---- banner, page lede, section header */
.banner { background: var(--banner-bg); color: var(--banner-ink); border: 1px solid var(--banner-line); border-radius: 8px; padding: var(--sp-3) var(--sp-4); font-size: var(--fs-sm); margin: 0 0 var(--sp-4); }
.page-lede { color: var(--text-muted); max-width: 90ch; margin: calc(-1 * var(--sp-3)) 0 var(--sp-4); font-size: var(--fs-sm); }
.sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--sp-2) var(--sp-4); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: var(--sp-4); }
.grid2 > * { min-width: 0; }
td.wrap { white-space: normal; min-width: 220px; }
.mono { font-family: var(--font-mono); }
.fleet-table td, .fleet-table th { white-space: nowrap; }
.fleet-table thead th { white-space: normal; vertical-align: bottom; }
ul.plain { margin: 0; padding-left: 18px; font-size: var(--fs-sm); }
ul.plain li { margin-bottom: 4px; }

/* ---- data colours */
.seg-xlr { fill: var(--c-xlr); background: var(--c-xlr); } .seg-tnz { fill: var(--c-tnz); background: var(--c-tnz); }
.seg-adsb { fill: var(--c-adsb); } .seg-sched { fill: var(--c-sched); }
.seg-wo1 { fill: var(--c-wo1); } .seg-wo2 { fill: var(--c-wo2); } .seg-wo3 { fill: var(--c-wo3); }
.seg-accent { fill: var(--c-accent); }
a .seg:hover, .seg:hover { opacity: .8; }
.chart-h { max-width: 600px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
.base-tag { display: inline-flex; align-items: center; font-family: var(--font-mono); font-size: 12px; }
.legend-item.legend-xlr::before { border-top: 10px solid var(--c-xlr); } .legend-item.legend-tnz::before { border-top: 10px solid var(--c-tnz); }
.legend-item.legend-adsb::before { border-top: 10px solid var(--c-adsb); } .legend-item.legend-sched::before { border-top: 10px solid var(--c-sched); }
.legend-item.legend-wo1::before { border-top: 10px solid var(--c-wo1); } .legend-item.legend-wo2::before { border-top: 10px solid var(--c-wo2); }
.legend-item.legend-wo3::before { border-top: 10px solid var(--c-wo3); }
.tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 4px; background: var(--c-muted-bg); color: var(--text-body); }
.tag-forplanning { background: var(--c-info-bg); color: var(--c-info-ink); } .tag-planned { background: var(--c-info-bg); color: var(--c-info-ink); }
.tag-inwork { background: var(--c-warn-bg); color: var(--c-warn-ink); }
.chips-list { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---- collapsible panels and lists (closed by default; open/closed remembered per browser) */
details.fold { border: 1px solid var(--border-subtle); border-radius: var(--radius-md); margin: var(--sp-3) 0 0; background: var(--ta-white); }
details.fold > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); padding: var(--sp-3) var(--sp-4); }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--ta-cyan); border-bottom: 2px solid var(--ta-cyan); transform: rotate(-45deg); transition: transform var(--dur-fast) var(--ease-standard); flex: none; }
details.fold[open] > summary::before { transform: rotate(45deg); }
details.fold > summary h2, details.fold > summary h3 { margin: 0; }
details.fold > summary:hover { background: var(--ta-cyan-100); }
details.fold[open] > summary { border-bottom: 1px solid var(--border-subtle); }
details.fold > :not(summary) { margin-left: var(--sp-4); margin-right: var(--sp-4); }
details.fold > :last-child { margin-bottom: var(--sp-3); }
details.fold[open] .fold-hint { display: none; }
details.fold .fold-hint { margin-left: auto; color: var(--ta-cyan); font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
/* a whole panel that folds */
details.panel.fold { padding: 0; }
details.panel.fold > summary { padding: var(--sp-4) var(--sp-5); }
details.panel.fold > :not(summary) { margin-left: var(--sp-5); margin-right: var(--sp-5); }
details.panel.fold > :last-child { margin-bottom: var(--sp-5); }
details.panel.fold > summary + * { margin-top: var(--sp-4); }

/* ---- theme switch (Auto / Light / Dark) in the top bar */
.theme-switch { display: inline-flex; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; overflow: hidden; }
.theme-switch a { color: rgba(255,255,255,.8); text-decoration: none; font-size: var(--fs-xs); font-weight: var(--fw-semibold); padding: 3px 10px; display: inline-flex; align-items: center; gap: 4px; }
.theme-switch a:hover { color: #fff; background: rgba(255,255,255,.12); }
.theme-switch a.is-on { background: #fff; color: #143055; }
.theme-switch svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* ---- staging site banner (dev.dashboards.texelair.com) */
.staging-bar { background: repeating-linear-gradient(135deg, #f2b53a 0 14px, #f7c65c 14px 28px); color: #3a2a00; font-size: var(--fs-sm); padding: 5px var(--sp-6); text-align: center; }
.staging-bar strong { letter-spacing: .12em; }
.staging-bar a { color: #3a2a00; font-weight: var(--fw-bold); text-decoration: underline; }

/* ---- staging "view as" (bundle 2) */
.viewas-bar { background: #5b3fb5; color: #fff; font-size: var(--fs-sm); padding: 6px var(--sp-6); display: flex; gap: var(--sp-3); align-items: center; justify-content: center; flex-wrap: wrap; }
.viewas-bar strong { letter-spacing: .06em; }
.viewas-bar a { color: #fff; text-decoration: underline; }
.viewas-bar form { display: inline; margin: 0; }
.viewas-bar button { background: #fff; color: #5b3fb5; border: 0; border-radius: 4px; padding: 2px 12px; font-weight: var(--fw-bold); cursor: pointer; }
.va-form { display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: flex-end; }
.va-form label { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-sm); }
.va-pick { margin: 0; }
.va-now { border-left: 4px solid #5b3fb5; }
/* People page: result shown on the row it belongs to, and the row the page jumps back to */
.ros-row-flash td { background: var(--surface-2, rgba(127,127,127,.08)); font-size: var(--fs-sm); padding: 6px 10px; }
.ros-people tr:target td { box-shadow: inset 0 2px 0 #5b3fb5, inset 0 -2px 0 #5b3fb5; }
.ros-people select.ros-qual { min-width: 5.5em; }
.va-check span:last-child { display: flex; align-items: center; gap: 6px; min-height: 34px; }

/* ---- Leon data quality score (management) */
.dq-score { padding: 1px 8px; border-radius: 6px; color: #fff; white-space: nowrap; }
.dq-score.dq-good { background: var(--c-good, #1f8a4c); } .dq-score.dq-warn { background: #e8701c; } .dq-score.dq-crit { background: var(--c-crit, #c62828); } .dq-score.dq-info { background: var(--c-info, #0a8fd6); }
.dq-meter { display: inline-block; width: 110px; height: 8px; border-radius: 99px; background: var(--ta-mist); overflow: hidden; vertical-align: middle; margin: 0 8px; }
.dq-meter .dq-fill { display: block; height: 100%; width: 0; border-radius: 99px; }
.dq-meter.dq-good .dq-fill { background: var(--c-good, #1f8a4c); } .dq-meter.dq-warn .dq-fill { background: #e8701c; } .dq-meter.dq-crit .dq-fill { background: var(--c-crit, #c62828); }
.dq-scores { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 4px 0 6px; }
.dq-owner { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 1px 7px; border-radius: 99px; border: 1px solid currentColor; white-space: nowrap; }
.dq-owner-occ { color: #0a8fd6; } .dq-owner-aw { color: #7b4fd0; } .dq-owner-both { color: #e8701c; }
.dq-owners { margin-left: 8px; white-space: normal; }
.dq-owners .dq-owner { white-space: nowrap; }
.dq-verify { margin: 14px 0 8px; padding: 12px 14px; border: 1px solid var(--border-subtle); border-radius: 10px; }
.dq-verify h3 { margin-top: 0; }
.dq-v { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; }
.dq-v-flown { background: rgba(31,138,76,.14); color: #1f8a4c; } .dq-v-not { background: rgba(198,40,40,.12); color: #c62828; } .dq-v-otp { background: rgba(10,143,214,.12); color: #0a8fd6; }
.dq-test { font-size: 9.5px; font-weight: 700; letter-spacing: .06em; padding: 0 4px; border-radius: 3px; background: #f2b53a; color: #3a2a00; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dq-v-flown { color: #5fd08e; } :root:not([data-theme="light"]) .dq-v-not { color: #ff7a7a; } :root:not([data-theme="light"]) .dq-v-otp { color: #5cc5f2; } }
:root[data-theme="dark"] .dq-v-flown { color: #5fd08e; } :root[data-theme="dark"] .dq-v-not { color: #ff7a7a; } :root[data-theme="dark"] .dq-v-otp { color: #5cc5f2; }

/* ---- delay codes (senior: delayed flights + delay causes) */
.dc { display: inline-block; position: relative; margin: 1px 3px 1px 0; }
.dc > summary { list-style: none; cursor: pointer; font: 600 12px/1.6 ui-monospace, Consolas, monospace; padding: 0 7px; border-radius: 5px; border: 1px solid currentColor; white-space: nowrap; }
.dc > summary::-webkit-details-marker { display: none; }
.dc > summary b { font-weight: 400; opacity: .8; }
.dc-texel > summary { color: #c62828; } .dc-other > summary { color: #5b7085; } .dc-review > summary { color: #c25a12; } .dc-unknown > summary { color: #7b4fd0; }
.dc[open] > summary { background: currentColor; } .dc[open] > summary, .dc[open] > summary b { color: #fff; }
.dc-texel[open] > summary { background: #c62828; border-color: #c62828; } .dc-other[open] > summary { background: #5b7085; border-color: #5b7085; }
.dc-review[open] > summary { background: #c25a12; border-color: #c25a12; } .dc-unknown[open] > summary { background: #7b4fd0; border-color: #7b4fd0; }
.dc[open] { display: block; }
.dc-pop { margin: 4px 0 6px; width: 320px; max-width: 70vw; background: var(--ta-white); border: 1px solid var(--border-subtle); border-left: 3px solid currentColor;
  border-radius: 6px; padding: 8px 10px; font-size: 12.5px; white-space: normal; color: var(--text-strong); }
.dc-texel .dc-pop { border-left-color: #c62828; } .dc-other .dc-pop { border-left-color: #5b7085; } .dc-review .dc-pop { border-left-color: #c25a12; } .dc-unknown .dc-pop { border-left-color: #7b4fd0; }
.dc-pop p { margin: 6px 0; color: var(--text-muted); }
.dc-pop dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 6px 0 0; }
.dc-pop dt { color: var(--text-muted); } .dc-pop dd { margin: 0; }
.dc-none { font-size: 12px; color: #c25a12; font-style: italic; }
.dc-cell { min-width: 120px; } .dc-impcell { min-width: 260px; }
.dc-imp { font-size: 12px; font-weight: 600; } .dc-imp-late { color: #c62828; } .dc-imp-ok { color: #1f8a4c; }
.dc-causes { margin-top: 14px; }
.dc-code { margin: 6px 0 6px 14px; } .dc-code > summary { cursor: pointer; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dc-texel > summary, :root:not([data-theme="light"]) .dc-imp-late { color: #ff7a7a; } :root:not([data-theme="light"]) .dc-other > summary { color: #9db0c4; } :root:not([data-theme="light"]) .dc-imp-ok { color: #5fd08e; } }
:root[data-theme="dark"] .dc-texel > summary, :root[data-theme="dark"] .dc-imp-late { color: #ff7a7a; } :root[data-theme="dark"] .dc-other > summary { color: #9db0c4; } :root[data-theme="dark"] .dc-imp-ok { color: #5fd08e; }
.oc-flag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; white-space: nowrap; }
.oc-yes { background: rgba(198,40,40,.12); color: #c62828; } .oc-no { background: rgba(91,112,133,.14); color: #5b7085; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .oc-yes { color: #ff7a7a; } :root:not([data-theme="light"]) .oc-no { color: #9db0c4; } }
:root[data-theme="dark"] .oc-yes { color: #ff7a7a; } :root[data-theme="dark"] .oc-no { color: #9db0c4; }

/* Block-time comparison (Management, _block_times.php) */
.bt-table td, .bt-table th { white-space: nowrap; text-align: center; }
.bt-table td:nth-child(-n+3), .bt-table th:nth-child(-n+3) { text-align: left; }
.bt-table td.bt-d { background: color-mix(in srgb, var(--status-warning, #e8a21c) 22%, transparent); font-weight: 700; color: var(--text-strong); }
.bt-table td.bt-d small { display: block; font-size: 10.5px; font-weight: 700; color: var(--status-danger, #c0392b); }
.bt-table td.bt-ref { color: var(--text-strong); }
.bt-table td.bt-na { color: var(--text-muted); }
.bt-imp { display: inline-block; border-radius: 10px; padding: 1px 8px; margin: 1px 0; font-size: 11.5px; border: 1px solid var(--border-subtle); }
.bt-imp-block { border-color: var(--status-warning, #e8a21c); }
.bt-imp-otp { border-color: var(--status-danger, #c0392b); color: var(--status-danger, #c0392b); }
.bt-imp-flight { border-color: var(--ta-cyan, #009ee5); }
.bt-wk { white-space: nowrap; margin-right: 8px; }
.bt-table td:last-child { white-space: normal; min-width: 280px; text-align: left; }
.tl-legend { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-4); }  /* build 30: tech-log corrections legend */
/* build 32: People & HR */
.seg-pe-in { fill: #2e9d4f; } .seg-pe-out { fill: #d6455d; }
.legend-item.legend-pe-in::before { border-top: 10px solid #2e9d4f; } .legend-item.legend-pe-out::before { border-top: 10px solid #d6455d; }
.seg-pe-annual { fill: #3c8fd6; } .seg-pe-sick { fill: #d6455d; } .seg-pe-business { fill: #2e9d8f; } .seg-pe-unpaid { fill: #9a7b3c; } .seg-pe-other { fill: #8b5cf6; }
.legend-item.legend-pe-annual::before { border-top: 10px solid #3c8fd6; } .legend-item.legend-pe-sick::before { border-top: 10px solid #d6455d; }
.legend-item.legend-pe-business::before { border-top: 10px solid #2e9d8f; } .legend-item.legend-pe-unpaid::before { border-top: 10px solid #9a7b3c; }
.legend-item.legend-pe-other::before { border-top: 10px solid #8b5cf6; }
.pe-findings { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-2); }
.pe-findings li { display: flex; gap: var(--sp-2); align-items: baseline; }
.pe-findings .pill { flex: none; min-width: 5.5em; }
.pe-tiles .tile-value small { font-size: .55em; font-weight: var(--fw-regular); }
.pe-dept tfoot th { border-top: 2px solid var(--border, rgba(127,127,127,.4)); }
.grid3.pe-profile { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--sp-4); }
.chart-legend { flex-wrap: wrap; }
.pe-split { max-width: 760px; } .pe-split th[scope="row"] { font-weight: var(--fw-regular); }   /* build 33 */
/* build 37: crew deployment */
.seg-cd-fly { fill: #1f5c91; } .seg-cd-sby { fill: #3c8fd6; } .seg-cd-trn { fill: #2e9d8f; } .seg-cd-idle { fill: #e8a33a; }
.seg-cd-al { fill: #8b5cf6; } .seg-cd-sick { fill: #d6455d; } .seg-cd-off { fill: #b8c2cc; }
.legend-item.legend-cd-fly::before { border-top: 10px solid #1f5c91; } .legend-item.legend-cd-sby::before { border-top: 10px solid #3c8fd6; }
.legend-item.legend-cd-trn::before { border-top: 10px solid #2e9d8f; } .legend-item.legend-cd-idle::before { border-top: 10px solid #e8a33a; }
.legend-item.legend-cd-al::before { border-top: 10px solid #8b5cf6; } .legend-item.legend-cd-sick::before { border-top: 10px solid #d6455d; }
.legend-item.legend-cd-off::before { border-top: 10px solid #b8c2cc; }
.seg-cd-oth { fill: #c4a7f5; } .legend-item.legend-cd-oth::before { border-top: 10px solid #c4a7f5; }
.cd-base + .cd-base { margin-top: var(--sp-5); border-top: 1px solid var(--border, rgba(127,127,127,.25)); padding-top: var(--sp-4); }

/* build 39: crew deployment non-revenue legs / on board, parameter chips */
.seg-cd-nrv { fill: #7fb3e0; } .legend-item.legend-cd-nrv::before { border-top: 10px solid #7fb3e0; }
.cd-params { display: grid; gap: .35rem; margin: .25rem 0 .75rem; } .cd-params .chips { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }

/* build 41: crew productivity */
.seg-cp-rev, .seg.cp-rev { fill: #1f5c91; } .seg-cp-nec, .seg.cp-oper { fill: #7fb3e0; } .seg-cp-att, .seg.cp-legal { fill: #8b5cf6; }
.seg-cp-spa, .seg.cp-red { fill: #e8a33a; } .seg.cp-pool { fill: #b8c2cc; }
.legend-item.legend-cp-rev::before { border-top: 10px solid #1f5c91; } .legend-item.legend-cp-nec::before { border-top: 10px solid #7fb3e0; }
.legend-item.legend-cp-att::before { border-top: 10px solid #8b5cf6; } .legend-item.legend-cp-spa::before { border-top: 10px solid #e8a33a; }
.cp-swatch { display: inline-block; width: .8em; height: .8em; border-radius: 2px; margin-right: .4em; vertical-align: -.05em; }
.cp-swatch.cp-rev { background: #1f5c91; } .cp-swatch.cp-nec { background: #7fb3e0; } .cp-swatch.cp-att { background: #8b5cf6; } .cp-swatch.cp-spa { background: #e8a33a; }
.cp-table { width: 100%; } .cp-table td.l, .cp-table th.l { text-align: left; }
.cp-tier-row th, .cp-tier-row td { border-top: 2px solid var(--border, rgba(127,127,127,.4)); padding-top: .5rem; }
.cp-grp > summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: .25rem 1rem; justify-content: space-between; padding: .2rem 0 .2rem 1.2rem; }
.cp-grp .cp-gname { font-weight: var(--fw-semibold, 600); } .cp-grp .cp-gnums { font-variant-numeric: tabular-nums; }
.cp-codes { width: 100%; margin: .25rem 0 .5rem; font-size: .92em; } .cp-codes td { padding: .2rem .4rem; }
.cp-codes td.l:first-child { padding-left: 1.6rem; }
.cp-wf { max-width: 760px; }
.tile-value small { font-size: .55em; font-weight: var(--fw-regular, 400); }
.warn-text { color: var(--warn-ink, #8a5a00); } :root[data-theme="dark"] .warn-text { color: #f0c26b; } @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .warn-text { color: #f0c26b; } }
/* build 41: duty-hours breakdown */
.seg-dm-blk { fill: #1f5c91; } .seg-dm-rep { fill: #2e9d8f; } .seg-dm-rel { fill: #6cc3b8; } .seg-dm-gnd { fill: #e8a33a; } .seg-dm-pos { fill: #7fb3e0; }
.seg-dm-sby { fill: #3c8fd6; } .seg-dm-sim { fill: #8b5cf6; } .seg-dm-trn { fill: #c4a7f5; } .seg-dm-off { fill: #b8c2cc; } .seg-dm-oth { fill: #d6455d; } .seg-dm-mis { fill: #8a96a3; }
.legend-item.legend-dm-blk::before { border-top: 10px solid #1f5c91; } .legend-item.legend-dm-rep::before { border-top: 10px solid #2e9d8f; } .legend-item.legend-dm-rel::before { border-top: 10px solid #6cc3b8; }
.legend-item.legend-dm-gnd::before { border-top: 10px solid #e8a33a; } .legend-item.legend-dm-pos::before { border-top: 10px solid #7fb3e0; } .legend-item.legend-dm-sby::before { border-top: 10px solid #3c8fd6; }
.legend-item.legend-dm-sim::before { border-top: 10px solid #8b5cf6; } .legend-item.legend-dm-trn::before { border-top: 10px solid #c4a7f5; } .legend-item.legend-dm-off::before { border-top: 10px solid #b8c2cc; }
.legend-item.legend-dm-oth::before { border-top: 10px solid #d6455d; } .legend-item.legend-dm-mis::before { border-top: 10px solid #8a96a3; }
.dm-table td.l, .dm-table th.l { text-align: left; } .fold-inner > summary { cursor: pointer; margin: .5rem 0; }

/* build 50: light / dark toggle and Sign out as on Texel Travel - round icon buttons in the navy bar */
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%;
                border: 1px solid rgba(255,255,255,.45); color: #fff; text-decoration: none; transition: background .15s; }
.theme-toggle:hover { background: rgba(255,255,255,.14); }
.theme-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .tt-sun { display: none; }                         /* light now: show the moon (go dark) */
.theme-toggle.is-dark .tt-sun { display: block; } .theme-toggle.is-dark .tt-moon { display: none; }
@media (prefers-color-scheme: dark) { .theme-toggle.is-auto .tt-sun { display: block; } .theme-toggle.is-auto .tt-moon { display: none; } }
.app-user .signout-btn { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 12px 4px 10px; font-size: var(--fs-xs, 12px); }
.app-user .signout-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 860px) { .app-user .signout-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .app-user .signout-btn { padding: 6px; border-radius: 50%; } }

/* build 59: Workspaces fold-out in dark mode (Hayo 2026-10-11 - empty white panel, text only on hover).
   The dark header re-points --ta-white / --text-strong to white for its own text, and the panel sits inside the header,
   so it drew white text on a white card. Give the panel the dark card tokens back. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .app-header .nav-panel { --ta-white: #151c26; --ta-navy: #e9eff6; --text-strong: #e9eff6; --text-muted: #93a0af; color: #e9eff6; }
}
:root[data-theme="dark"] .app-header .nav-panel { --ta-white: #151c26; --ta-navy: #e9eff6; --text-strong: #e9eff6; --text-muted: #93a0af; color: #e9eff6; }
/* build 72 (item 27): FW - TL offset monitor */
.bt-off { font-size: 12.5px; }
.bt-off th, .bt-off td { padding: 3px 8px; }
.bt-off td.bt-off-hi { background: color-mix(in srgb, var(--status-warning, #e8a21c) 22%, transparent); font-weight: 700; }

/* build 86 (#108): Columns menu for big tables (cols.js) */
.col-off { display: none !important; }
.cols-menu { margin: 0 0 8px; font-size: 13px; }
.cols-menu > summary { cursor: pointer; display: inline-block; padding: 4px 10px; border: 1px solid var(--c-line, #d0d7e2); border-radius: 6px; list-style: none; }
.cols-menu > summary::-webkit-details-marker { display: none; }
.cols-menu[open] > summary { background: var(--c-muted-bg, #eef2f7); }
.cols-box { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 8px 10px; margin-top: 6px; border: 1px solid var(--c-line, #d0d7e2); border-radius: 6px; max-width: 900px; }
.cols-box label { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.cols-box .btn-link { background: none; border: 0; padding: 0; color: var(--c-accent, #00205b); text-decoration: underline; cursor: pointer; font: inherit; }

/* build 86: Leon crew hotel status badge */
.hb { display: inline-block; padding: 0 5px; border-radius: 3px; font-size: 11px; font-weight: 700; }
.hb-confirmed { background: color-mix(in srgb, var(--c-good, #1e7d45) 16%, transparent); color: var(--c-good, #1e7d45); }
.hb-requested, .hb-pending, .hb-to_be_requested { background: color-mix(in srgb, var(--c-warn, #b26a00) 16%, transparent); color: var(--c-warn, #b26a00); }
.hb-untouched, .hb-none { background: color-mix(in srgb, var(--c-crit, #b3261e) 14%, transparent); color: var(--c-crit, #b3261e); }
