/* FlightOps — one stylesheet for company sites and the provider console. No JavaScript, no inline styles (CSP). */

:root {
  /* The FlightOps look (from the Daily Briefing and Flight Manifest mockups). */
  --paper: #eef0ec;           /* page background */
  --surface: #ffffff;
  --ink: #1b2430;
  --ink-soft: #4a5565;
  --band: #14202e;            /* header */
  --band-ink: #ffffff;
  --band-soft: #b9c4d0;
  --line: #d5dae0;
  --field: #b8c0ca;           /* form field borders */
  --accent: #f2c200;          /* taxiway yellow: active navigation only */
  --link: #1f4e79;
  --primary: #1f4e79;
  --primary-dk: #163e66;
  --go: #1e6b42;
  --go-dk: #17553a;
  --focus: #1f4e79;
  --danger: #b42318;
  --danger-bg: #fbe4e1;
  --ok: #17553a;
  --ok-bg: #ddf0e4;
  --warn: #6b4b00;
  --warn-bg: #fff4d6;
  --info-bg: #e3ecf5;
  --radius: 8px;
  --radius-lg: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 var(--font);
}

h1, h2, h3 { line-height: 1.25; margin: 0 0 .75rem; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; margin-top: 1.75rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 1rem; }

a { color: var(--link); }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: .5rem; top: .5rem; z-index: 10; background: var(--surface); padding: .5rem .75rem; border-radius: var(--radius); }

/* ---------- Test-site marker (config environment_label) ---------- */

.env-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20; height: 1.75rem;
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(135deg, #f2c200 0 14px, #18242e 14px 28px);
  color: #18242e; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.env-banner span { background: #f2c200; padding: .1rem .75rem; border-radius: 2px; white-space: nowrap; }
body.has-env { padding-top: 1.75rem; }

/* ---------- Header band ---------- */

.band { background: var(--band); color: var(--band-ink); }
.band a { color: var(--band-ink); }

.band-row {
  max-width: 72rem; margin: 0 auto; padding: .75rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}

.brand { display: flex; flex-direction: column; text-decoration: none; }
.brand-company { font-weight: 700; font-size: 1.1rem; }
.brand-product { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--band-soft); }

.account-menu { display: flex; align-items: center; gap: 1rem; font-size: .9rem; }
.account-menu form { margin: 0; }

.page .link-button { color: var(--link); }
.link-button {
  background: none; border: 0; padding: 0; font: inherit; color: inherit;
  text-decoration: underline; cursor: pointer;
}

.nav { padding-top: 0; padding-bottom: 0; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.nav a {
  display: inline-block; padding: .55rem 0 .45rem; text-decoration: none;
  border-bottom: 3px solid transparent; color: var(--band-soft);
}
.nav a:hover { color: var(--band-ink); }
.nav a[aria-current="page"] { color: var(--band-ink); border-bottom-color: var(--accent); }
.nav-admin { font-size: .9rem; }

.console .band { background: #2a2f36; }

/* ---------- Page ---------- */

.page { max-width: 72rem; margin: 0 auto; padding: 1.75rem 1.25rem 3rem; }

.lede { font-size: 1.1rem; color: var(--ink-soft); max-width: 44rem; }
.muted-text, .hint { color: var(--ink-soft); }
.hint { font-size: .875rem; margin: .25rem 0 0; }
.aside { color: var(--ink-soft); font-size: .9rem; }
.empty { padding: 1.5rem; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); color: var(--ink-soft); }
.count { color: var(--ink-soft); font-size: .9rem; }

.heading-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.heading-row h1 { margin: 0; }
.heading-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; margin-bottom: 1.25rem;
}
.panel > h2:first-child { margin-top: 0; }

/* ---------- Notices and state tags ---------- */

.notice { padding: .75rem 1rem; border-radius: var(--radius); border-left: 4px solid; margin: 0 0 1rem; }
.notice-ok { background: var(--ok-bg); border-color: var(--ok); }
.notice-error { background: var(--danger-bg); border-color: var(--danger); }
.notice-info { background: var(--info-bg); border-color: var(--link); }

.state {
  display: inline-block; padding: .05rem .5rem; border-radius: 999px;
  font-size: .8rem; font-weight: 600; white-space: nowrap;
}
.state-ok { background: var(--ok-bg); color: var(--ok); }
.state-warn { background: var(--warn-bg); color: var(--warn); }
.state-bad { background: var(--danger-bg); color: var(--danger); }

/* ---------- Forms ---------- */

.form { max-width: 44rem; }
.form.narrow { max-width: 26rem; }
.form fieldset { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 1rem 1.25rem 1.25rem; margin: 0 0 1.25rem; }
.form legend { font-weight: 700; padding: 0 .35rem; }
.form label { display: block; font-weight: 600; margin: 1rem 0 .3rem; }
.form fieldset > label:first-of-type, .form > label:first-child { margin-top: .25rem; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="time"], input[type="url"], input[type="search"],
input:not([type]), select, textarea {
  width: 100%; max-width: 100%; padding: .5rem .6rem; font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid #aebbc4; border-radius: var(--radius);
}
textarea { min-height: 6rem; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--focus); outline: 3px solid rgba(47, 125, 209, .3); outline-offset: 0; }
[aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .875rem; font-weight: 600; margin: .3rem 0 0; }

.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.field-pair > div > label { margin-top: 1rem; }

.affix { display: flex; align-items: stretch; }
.affix input { border-top-right-radius: 0; border-bottom-right-radius: 0; min-width: 0; }
.affix span {
  display: flex; align-items: center; padding: 0 .6rem; white-space: nowrap;
  background: var(--paper); border: 1px solid #aebbc4; border-left: 0;
  border-radius: 0 var(--radius) var(--radius) 0; color: var(--ink-soft);
}

.tail-input, .tail { font-family: var(--mono); text-transform: uppercase; letter-spacing: .03em; }
.tail-input { max-width: 12rem; }
.field-label { display: block; font-weight: 600; margin: 1rem 0 .3rem; }
.ink-line { margin-top: 2.5rem; }
.call-sign { font-weight: 400; color: var(--ink-soft); font-size: .9em; }

.form label.check, label.check {
  display: flex; align-items: flex-start; gap: .5rem; font-weight: 400; margin: .6rem 0 0;
}
.check input { margin-top: .3rem; flex: none; width: auto; }
.checks { display: grid; gap: .1rem; }

.roles { display: grid; gap: .25rem; }
.roles select { max-width: 20rem; }

.actions { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-top: 1.25rem; }
.secondary-action { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }

.inline-form { display: inline; margin: 0; }
.inline-form.form { max-width: none; }

.filters { display: flex; align-items: flex-end; gap: .5rem 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filters label { font-weight: 600; font-size: .9rem; }
.filters select, .filters input { width: auto; min-width: 10rem; }

/* ---------- Buttons ---------- */

.button {
  display: inline-block; padding: .55rem 1rem; font: inherit; font-weight: 600; line-height: 1.2;
  color: #fff; background: var(--band); border: 1px solid var(--band); border-radius: var(--radius);
  text-decoration: none; cursor: pointer;
}
.button:hover { background: #16304a; }
.button-quiet { background: var(--surface); color: var(--band); border-color: #aebbc4; }
.button-quiet:hover { background: var(--paper); }
button.button[name="danger"], .button.danger { background: var(--danger); border-color: var(--danger); }

code.secret { font: 1.35rem/1.3 var(--mono); letter-spacing: .06em; background: var(--paper); padding: .15rem .4rem; border-radius: var(--radius); }

/* ---------- Tables ---------- */

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1rem; }
.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
.data th, .data td { padding: .55rem .75rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.data thead th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); background: var(--paper); }
.data tbody tr:last-child td { border-bottom: 0; }
.data tbody tr:hover { background: #f9fbfc; }
.data tr.muted td { color: var(--ink-soft); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.data th.num, .data td.num { text-align: right; }
.nowrap { white-space: nowrap; }
.muted { color: var(--ink-soft); }

.details summary { cursor: pointer; color: var(--link); }
.details pre { margin: .5rem 0 0; font: .8rem/1.4 var(--mono); white-space: pre-wrap; word-break: break-word; max-width: 32rem; }

.pager { display: flex; gap: 1rem; align-items: center; margin-top: 1rem; }

/* ---------- Definition lists ---------- */

.facts { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.5rem; margin: 0 0 1rem; }
.facts dt { font-weight: 600; color: var(--ink-soft); }
.facts dd { margin: 0; font-variant-numeric: tabular-nums; }

/* ---------- Dashboard ---------- */

.modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1rem; margin: 1.25rem 0; }
.module { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--band); border-radius: var(--radius); padding: 1rem 1.25rem; }
.module h2 { margin-top: 0; }
.module-locked { border-top-color: var(--line); color: var(--ink-soft); }
.module-role { font-size: .875rem; color: var(--ink-soft); margin: 0; }
.fleet-line { color: var(--ink-soft); }

/* ---------- Sign-in pages ---------- */

.guest { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 8vh 1rem 2rem; }
.guest-panel {
  width: 100%; max-width: 26rem; background: var(--surface); border: 1px solid var(--line);
  border-top: 6px solid var(--band); border-radius: var(--radius); padding: 1.75rem;
}
.guest.console .guest-panel { border-top-color: #2a2f36; }
.guest-company { font-weight: 700; font-size: 1.25rem; margin: 0; }
.guest-product { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 1.5rem; }
.guest-panel .form { max-width: none; }

/* ---------- Error pages ---------- */

.debug { background: #10181f; color: #dfe7ec; padding: 1rem; border-radius: var(--radius); overflow-x: auto; font: .8rem/1.45 var(--mono); white-space: pre-wrap; }

/* ---------- The FlightOps look, app-wide ---------- */

h1 { font-size: 1.6rem; font-weight: 700; letter-spacing: -.01em; }
.page { max-width: 80rem; }
.band { box-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.brand-company { font-size: 1.15rem; }

.panel, .form fieldset, .table-wrap, .module, .empty, .guest-panel, .bf-card {
  border-radius: var(--radius-lg); border-color: var(--line);
}
.panel { padding: 1.15rem 1.25rem; }
.module { border-top: 1px solid var(--line); padding: 1.1rem 1.25rem; }
.module h2 a { text-decoration: none; }
.module h2 a:hover { text-decoration: underline; }
.module-locked { background: #f7f8f6; }
.empty { background: var(--surface); border-style: solid; }
.guest-panel { border-top: 1px solid var(--line); box-shadow: 0 1px 2px rgba(20, 32, 46, .06); }
.guest-company { font-size: 1.35rem; }

.form label, .field-label, .filters label { font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }
.form label { margin-top: 1.15rem; }
.form fieldset > label:first-of-type, .form > label:first-child { margin-top: .25rem; }
.field-pair > div > label { margin-top: 1.15rem; }
.form label.check, label.check { font-size: .95rem; letter-spacing: 0; text-transform: none; color: var(--ink); font-weight: 400; }
.form legend { font-size: 1rem; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="time"], input[type="url"], input[type="search"],
input:not([type]), select, textarea {
  min-height: 2.5rem; border: 1px solid var(--field); border-radius: var(--radius);
}
textarea { line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); outline: 2px solid var(--primary); outline-offset: 0; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--primary); }
.affix input { border-radius: var(--radius) 0 0 var(--radius); }
.affix span { border-color: var(--field); border-radius: 0 var(--radius) var(--radius) 0; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 2.5rem; padding: 0 .95rem; border-radius: var(--radius); font-size: .92rem; font-weight: 700;
  background: var(--primary); border-color: var(--primary);
}
.button:hover { background: var(--primary-dk); }
.button-quiet { background: var(--surface); color: var(--ink); border-color: var(--field); }
.button-quiet:hover { background: #f3f5f7; }
.button-go { background: var(--go); border-color: var(--go); color: #fff; }
.button-go:hover { background: var(--go-dk); }
button.button[name="danger"], .button.danger { background: var(--surface); border-color: var(--danger); color: #8a1c12; }
button.button[name="danger"]:hover, .button.danger:hover { background: var(--danger-bg); }

.data thead th { background: #f6f7f5; font-size: .72rem; font-weight: 700; letter-spacing: .05em; color: var(--ink-soft); }
.data th, .data td { border-bottom-color: #e2e6ea; }
.data tbody tr:hover { background: #fafbf9; }
.table-wrap { box-shadow: 0 1px 2px rgba(20, 32, 46, .04); }

.state { border-radius: 4px; font-size: .75rem; font-weight: 700; padding: .15rem .45rem; }
.notice { border-radius: var(--radius); border-left-width: 4px; }
.notice-info { background: var(--info-bg); border-color: var(--primary); }

.heading-row { align-items: flex-end; }
.lede { color: var(--ink-soft); }

/* Pills and chips for any module (same as the Daily Briefing's). */
.pill { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.3rem; padding: 0 .95rem; border: 1px solid var(--field); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: .85rem; font-weight: 700; text-decoration: none; }
.pill:hover { background: #f3f5f7; }
.pill[aria-current="page"], .pill.on { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Briefing pages share these now; keep their wider canvas. */
.page:has(> .bf) { max-width: 90rem; }

/* ---------- Daily Briefing ---------- */

.bf-status { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.bf-sub { color: var(--ink-soft); margin: .25rem 0 0; }
.bf-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; min-width: 0; }
.bf-card > h2:first-child, .bf-card > h3:first-child { margin-top: 0; }
.bf-card h2 { font-size: 1.05rem; margin: 0 0 .5rem; }
.bf-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); display: block; margin: 0 0 .3rem; }
.bf-stack { display: grid; gap: 1rem; margin-bottom: 1rem; }
.bf-top { display: grid; grid-template-columns: minmax(14rem, 1fr) minmax(0, 2fr); gap: 1rem; margin-bottom: 1rem; }
.bf-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, 19rem); gap: 1rem; align-items: start; margin-bottom: 1rem; }
.bf-perf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.bf-side { display: grid; gap: 1rem; }
.bf-weather { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.bf-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.bf-pre { font: .9rem/1.45 var(--mono); white-space: pre-wrap; word-break: break-word; margin: 0; }
textarea.bf-mono, input.bf-mono { font-family: var(--mono); font-size: .9rem; }
textarea.bf-short { min-height: 3.2rem; }
.bf-big { font: 600 1.45rem/1.2 var(--mono); }
.bf-figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; align-items: end; }
.bf-figures input { max-width: 7rem; }
.bf-sun { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; text-align: center; }
.bf-nogo { color: var(--danger); }
.bf-note { font-size: .85rem; border-radius: var(--radius); padding: .35rem .55rem; margin: .25rem 0 .4rem; background: var(--paper); color: var(--ink-soft); }
.bf-note.warn { background: var(--warn-bg); color: var(--warn); }
.bf-perf { width: 100%; border-collapse: collapse; margin-top: .5rem; }
.bf-perf th, .bf-perf td { text-align: left; padding: .4rem .35rem; border-top: 1px solid var(--line); vertical-align: top; }
.bf-perf thead th { border-top: 0; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.bf-perf td.num { font: 600 1.05rem/1.3 var(--mono); }
.bf-assigned { display: block; font-size: .8rem; color: var(--link); font-weight: 400; }
.bf-prio { list-style: none; margin: 0; padding: 0; }
.bf-prio li { display: flex; gap: .6rem; padding: .25rem 0; font-family: var(--mono); }
.bf-prio-group + .bf-prio-group { border-top: 1px solid var(--line); margin-top: .6rem; padding-top: .6rem; }
.bf-prio-slots { display: grid; grid-template-columns: 1.5rem 1fr; gap: .35rem .5rem; align-items: center; }

.bf-risk { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; border: 0; padding: 0; margin: 0; }
.bf-risk legend { padding: 0; }
.bf-risk label { position: relative; margin: 0; cursor: pointer; }
.bf-risk input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bf-risk span { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 3.4rem; border: 2px solid #c6cfd6; border-radius: var(--radius); background: var(--surface); font-weight: 700; text-align: center; line-height: 1.2; }
.bf-risk span small { font-weight: 600; font-size: .75rem; }
.bf-risk input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.bf-risk input:checked + span.green, .bf-risk-badge.green { background: #1e6b42; border-color: #1e6b42; color: #fff; }
.bf-risk input:checked + span.yellow, .bf-risk-badge.yellow { background: #f2c94c; border-color: #b8901a; color: #18242e; }
.bf-risk input:checked + span.orange, .bf-risk-badge.orange { background: #c2410c; border-color: #c2410c; color: #fff; }
.bf-risk input:checked + span.red, .bf-risk-badge.red { background: #b42318; border-color: #b42318; color: #fff; }
.bf-risk-badge { display: inline-block; padding: .3rem .7rem; border-radius: var(--radius); border: 2px solid; font-weight: 700; }
.bf-nofly { background: #b42318; color: #fff; font-weight: 700; font-size: 1.1rem; padding: .8rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; }

.bf-assign td, .bf-assign th { vertical-align: middle; }
.bf-assign select { min-width: 9rem; }
.bf-assign .bf-name select { min-width: 12rem; }
.bf-assign input[type="checkbox"] { width: 1.15rem; height: 1.15rem; }
.bf-duties { display: flex; flex-wrap: wrap; gap: .2rem .8rem; }
.bf-duties label { display: inline-flex; align-items: center; gap: .3rem; font-weight: 400; margin: 0; white-space: nowrap; }
.bf-duties input { width: auto; }
.bf-tag { display: inline-block; font-size: .75rem; font-weight: 700; padding: .05rem .4rem; border-radius: 3px; background: var(--info-bg); color: var(--link); }
.bf-tag.wb { background: var(--warn-bg); color: var(--warn); }

.bf-areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; margin: 1rem 0; }
.bf-area { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--band); border-radius: var(--radius); padding: 1rem 1.2rem; }
.bf-area h2 { margin-top: 0; }

.bf-ack-list { list-style: none; margin: 0; padding: 0; }
.bf-ack-list li { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; padding: .5rem 0; border-top: 1px solid var(--line); }
.bf-ack-list li:first-child { border-top: 0; }
.bf-ack-list form { margin: 0; }
.bf-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.bf-sticky { position: sticky; bottom: 0; background: var(--paper); border-top: 1px solid var(--line); padding: .75rem 0; margin-top: 1rem; z-index: 2; }
.bf-footer { font-size: .85rem; color: var(--ink-soft); }
.bf-footer p { margin: 0 0 .3rem; }
.bf-matrix td, .bf-matrix th { white-space: nowrap; }
.bf-flush { margin: 0; }
.bf-tight { margin-top: -.35rem; margin-bottom: .6rem; }
.bf-note-cell { border-top: 0 !important; padding-top: 0 !important; }
.bf-station { margin-top: .6rem; color: var(--link); }
.bf-winds { grid-template-columns: 9rem minmax(0, 1fr); margin-top: .75rem; }
.bf-block { display: block; margin: 0; }
.bf-slot-label { margin: 0; font-family: var(--mono); font-weight: 600; }
.bf-review td select { min-width: 9rem; }
.bf-review td:last-child select { min-width: 12rem; }
.bf-plain { font-family: var(--font); font-size: 1rem; }

.bf-print { font-size: 10.5pt; }
.bf-print h1 { font-size: 1.3rem; margin-bottom: .25rem; }
.bf-print .bf-card { padding: .6rem .75rem; }

@media (max-width: 56rem) {
  .bf-main, .bf-top { grid-template-columns: 1fr; }
}
@media (max-width: 40rem) {
  .bf-perf-grid, .bf-weather, .bf-three { grid-template-columns: 1fr; }
  .bf-risk { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media print {
  .bf-print .bf-main { grid-template-columns: minmax(0, 1fr) 14rem; }
  .bf-print .bf-top { grid-template-columns: 1fr 2fr; }
  .bf-print .bf-perf-grid, .bf-print .bf-weather { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bf-print .bf-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bf-card { break-inside: avoid; border: 1px solid #999 !important; }
  .bf-risk-badge, .bf-nofly { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Daily Briefing: the mockup's look (scoped to .bf) ---------- */

.bf { --bf-ink: #1b2430; --bf-soft: #4a5565; --bf-line: #d5dae0; --bf-field: #b8c0ca; --bf-blue: #1f4e79; --bf-blue-dk: #163e66; --bf-go: #1e6b42; --bf-go-dk: #17553a; color: var(--bf-ink); }
.bf h1 { font-size: 1.6rem; font-weight: 700; letter-spacing: -.01em; margin: 0; }
.bf .heading-row { margin-bottom: 1.1rem; align-items: flex-end; }
.bf .bf-sub { color: var(--bf-soft); font-size: .95rem; margin-top: .3rem; }

.bf-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; background: #fff; border: 1px solid var(--bf-line); border-radius: 12px; padding: .6rem .75rem; margin: 0 0 1.25rem; }
.bf-pill { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.3rem; padding: 0 .95rem; border: 1px solid var(--bf-field); border-radius: 999px; background: #fff; color: var(--bf-ink); font-size: .85rem; font-weight: 700; text-decoration: none; }
.bf-pill:hover { background: #f3f5f7; }
.bf-pill.on { background: var(--bf-blue); border-color: var(--bf-blue); color: #fff; }
.bf-pill-tag { font-size: .65rem; letter-spacing: .06em; opacity: .85; }
.bf-tabs-sep { width: 1px; height: 1.5rem; background: var(--bf-line); margin: 0 .25rem; }

.bf .bf-card, .bf .panel, .bf .bf-area { background: #fff; border: 1px solid var(--bf-line); border-radius: 12px; padding: 1.1rem 1.15rem; }
.bf .bf-area { border-top: 1px solid var(--bf-line); }
.bf .bf-card h2, .bf .panel h2, .bf .bf-area h2 { font-size: 1.1rem; font-weight: 700; }
.bf h2 { font-size: 1.15rem; }
.bf .bf-label, .bf .data thead th { font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--bf-soft); }
.bf .data thead th { background: transparent; }
.bf .table-wrap { border-radius: 12px; border-color: var(--bf-line); }
.bf .bf-card .table-wrap { border: 0; border-radius: 0; margin: 0; }
.bf .data td, .bf .data th { border-bottom-color: #e2e6ea; }
.bf .data tbody tr:hover { background: transparent; }

.bf input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .bf select, .bf textarea {
  min-height: 2.5rem; border: 1px solid var(--bf-field); border-radius: 8px; background: #fff; color: var(--bf-ink); }
.bf textarea { padding: .5rem .65rem; line-height: 1.45; }
.bf input:focus, .bf select:focus, .bf textarea:focus { outline: 2px solid var(--bf-blue); outline-offset: 0; border-color: var(--bf-blue); }
.bf .bf-assign input[type="checkbox"] { width: 1.4rem; height: 1.4rem; accent-color: var(--bf-blue); }

.bf .button { border-radius: 8px; min-height: 2.5rem; padding: 0 .9rem; display: inline-flex; align-items: center; font-size: .9rem; background: var(--bf-blue); border-color: var(--bf-blue); }
.bf .button:hover { background: var(--bf-blue-dk); }
.bf .button-quiet { background: #fff; color: var(--bf-ink); border-color: var(--bf-field); }
.bf .button-quiet:hover { background: #f3f5f7; }
.bf .button-go { background: var(--bf-go); border-color: var(--bf-go); color: #fff; }
.bf .button-go:hover { background: var(--bf-go-dk); }

.bf .state { border-radius: 4px; font-size: .75rem; font-weight: 700; padding: .15rem .45rem; }
.bf .state-warn { background: #fff4d6; color: #6b4b00; }
.bf .state-ok { background: #ddf0e4; color: #17553a; }

.bf .bf-risk span { min-height: 3.6rem; border-radius: 8px; font-size: 1.1rem; border-color: #c9d0d8; }
.bf .bf-risk span small { font-size: .75rem; }

.bf-chip { position: relative; display: inline-flex; margin: 0; cursor: pointer; }
.bf-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bf-chip span { display: inline-flex; align-items: center; min-height: 1.9rem; padding: 0 .7rem; border: 1px solid #c9d0d8; border-radius: 999px; background: #fff; color: var(--bf-soft); font-size: .78rem; font-weight: 700; white-space: nowrap; }
.bf-chip input:checked + span { background: #e3ecf5; border-color: var(--bf-blue); color: var(--bf-blue-dk); }
.bf-chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.bf-chip-x span { width: 2.2rem; min-height: 2.2rem; justify-content: center; padding: 0; border-radius: 8px; border-color: var(--bf-field); color: var(--bf-ink); font-size: .95rem; }
.bf-chip-x input:checked + span { background: #fbe4e1; border-color: #b42318; color: #8a1c12; }
.bf .bf-duties { gap: .35rem; }
.bf-chip-on { display: inline-flex; align-items: center; min-height: 1.6rem; padding: 0 .6rem; border-radius: 999px; background: #e3ecf5; color: var(--bf-blue-dk); font-size: .75rem; font-weight: 700; }

.bf .bf-big { font-size: 1.5rem; }
.bf textarea.bf-forecast { min-height: 4.5rem; font-size: .9rem; }
.bf .bf-forecast-text { font-size: .92rem; margin: 0 0 .5rem; }
.bf .bf-sticky { background: #eef0ec; }
.bf .notice { border-radius: 8px; }

/* ---------- Small screens ---------- */

@media (max-width: 40rem) {
  .field-pair { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; gap: .1rem; }
  .facts dd { margin-bottom: .6rem; }
  .page { padding-top: 1.25rem; }
  h1 { font-size: 1.35rem; }
}

@media print {
  .band, .skip, .actions, .filters, .pager, .no-print, .env-banner, .flash, .notice-info { display: none !important; }
  body.has-env { padding-top: 0; }
  .print-sheet { font-size: 11pt; }
  body { background: #fff; }
  .table-wrap, .panel { border: 0; }
}

/* ---------- Demo companies (docs/DEMO.md) ---------- */

.demo-bar { background: #fff4d6; border-bottom: 2px solid #e0a500; color: #3b2a00; font-size: .9rem; }
.demo-bar-row { max-width: 72rem; margin: 0 auto; padding: .45rem 1.25rem; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.1rem; }
.demo-tag { background: #e0a500; color: #1e1500; padding: .1rem .55rem; border-radius: 3px; text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; }
.demo-form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0; }
.demo-form select { width: auto; max-width: 22rem; padding: .2rem .4rem; }
.demo-form .button { padding: .2rem .7rem; }
.demo-reset summary { cursor: pointer; text-decoration: underline; }
.demo-reset[open] { flex-basis: 100%; }
.demo-guest-note { background: #fff4d6; border: 1px solid #e0a500; padding: .35rem .6rem; border-radius: 4px; font-size: .9rem; }
.demo-mail { white-space: pre-wrap; font-family: inherit; background: #f6f7f9; padding: .75rem; border-radius: 4px; margin: .5rem 0 0; }
.demo-inbox { display: grid; gap: .5rem; }
.demo-skip { border-color: #e0a500 !important; }
@media print { .demo-bar { display: none !important; } }
