/* ==== themes.css ==== */
/* Themes. Every colour the site uses is a token here; pages and components only use var(--…).
   <html data-theme="light|dark|blue|classic|legacy"> picks one (chosen per user on /profile).
   No data-theme (not chosen yet) = light, or dark when the computer is set to dark mode.

   Tokens: --bg page background · --surface cards/tables · --text · --muted secondary text · --border
           --accent links/buttons · --accent-text text on accent · --danger · --ok · --warn
           --bar/--bar-text/--bar-active top menu · --chipbg chips · --th-bg table headers
           --c-COMM … department colours · --salis/--adb programme badges */

:root, [data-theme="light"] {
  color-scheme: light;
  --bg: #f5f6f8; --surface: #ffffff; --text: #1d2733; --muted: #5d6b7a; --border: #dde2e8;
  --accent: #2563eb; --accent-text: #ffffff; --danger: #c0392b; --ok: #15803d; --warn: #b45309;
  --bar: #1d2733; --bar-text: #e8edf3; --bar-active: #2563eb;
  --chipbg: rgba(100, 116, 139, .12); --th-bg: var(--bg);
  --c-COMM: #7c3aed; --c-OPS: #2563eb; --c-LP: #0e7490; --c-FIN: #a16207; --c-GHS: #047857; --c-TVP: #be185d; --c-RP: #c2410c;
  --salis: #1e3a8a; --adb: #15803d;
  --radius: 10px;
}

/* dark: chosen, or automatic when nothing is chosen and the computer is in dark mode */
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #12161b; --surface: #1a2027; --text: #e3e8ee; --muted: #93a1b0; --border: #2c353f;
  --accent: #4f8cff; --accent-text: #0b0e12; --danger: #ff7b6b; --ok: #4ade80; --warn: #fbbf24;
  --bar: #0b0e12; --bar-text: #e3e8ee; --bar-active: #2f5fc4;
  --chipbg: rgba(148, 163, 184, .14); --th-bg: var(--bg);
  --c-COMM: #a78bfa; --c-OPS: #60a5fa; --c-LP: #22d3ee; --c-FIN: #facc15; --c-GHS: #34d399; --c-TVP: #f472b6; --c-RP: #fb923c;
  /* world map (lib/map): dark sea and land so the map doesn't glare in the dark theme */
  --map-sea: #0f1c2b; --map-land: #232b35; --map-land-hover: #2c3642; --map-border: #4a5565; --map-grid: #1b2a3b;
  --map-hl: #5a4a22; --map-hl-hover: #6b5828; --map-hl2: #24432f; --map-route: #fb923c; --map-route-alt: #94a3b8; --map-route-on: #60a5fa;
  --map-text: #e3e8ee; --map-halo: rgba(11, 14, 18, .85);
  --salis: #3b5bdb; --adb: #16a34a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #12161b; --surface: #1a2027; --text: #e3e8ee; --muted: #93a1b0; --border: #2c353f;
    --accent: #4f8cff; --accent-text: #0b0e12; --danger: #ff7b6b; --ok: #4ade80; --warn: #fbbf24;
    --bar: #0b0e12; --bar-text: #e3e8ee; --bar-active: #2f5fc4;
    --chipbg: rgba(148, 163, 184, .14); --th-bg: var(--bg);
    --c-COMM: #a78bfa; --c-OPS: #60a5fa; --c-LP: #22d3ee; --c-FIN: #facc15; --c-GHS: #34d399; --c-TVP: #f472b6; --c-RP: #fb923c;
  /* world map (lib/map): dark sea and land so the map doesn't glare in the dark theme */
  --map-sea: #0f1c2b; --map-land: #232b35; --map-land-hover: #2c3642; --map-border: #4a5565; --map-grid: #1b2a3b;
  --map-hl: #5a4a22; --map-hl-hover: #6b5828; --map-hl2: #24432f; --map-route: #fb923c; --map-route-alt: #94a3b8; --map-route-on: #60a5fa;
  --map-text: #e3e8ee; --map-halo: rgba(11, 14, 18, .85);
    --salis: #3b5bdb; --adb: #16a34a;
  }
}

/* blue: light, navy menu bar, blue-tinted surfaces */
[data-theme="blue"] {
  color-scheme: light;
  --bg: #e9f0f9; --surface: #ffffff; --text: #12233a; --muted: #4f6179; --border: #c6d5ea;
  --accent: #1d5fd1; --accent-text: #ffffff; --danger: #c0392b; --ok: #15803d; --warn: #b45309;
  --bar: #0b3d91; --bar-text: #eef4fd; --bar-active: #2f72e4;
  --chipbg: rgba(29, 95, 209, .10); --th-bg: #dde8f7;
}
[data-theme="blue"] .card, [data-theme="blue"] .twrap { box-shadow: 0 1px 2px rgba(11, 61, 145, .06); }

/* classic: grey desktop look — Tahoma, square-ish corners, bordered tables */
[data-theme="classic"] {
  color-scheme: light;
  --bg: #e7e7e7; --surface: #ffffff; --text: #111111; --muted: #555555; --border: #b4b4b4;
  --accent: #003399; --accent-text: #ffffff; --danger: #b00020; --ok: #1b6e1b; --warn: #a35200;
  --bar: #2d3e5c; --bar-text: #ffffff; --bar-active: #4a6491;
  --chipbg: rgba(0, 0, 0, .07); --th-bg: #e2e2e2;
  --radius: 3px;
}
[data-theme="classic"] body { font: 13px/1.45 Tahoma, Verdana, "Segoe UI", sans-serif; }
[data-theme="classic"] .card, [data-theme="classic"] .twrap, [data-theme="classic"] .stat, [data-theme="classic"] button,
[data-theme="classic"] input, [data-theme="classic"] select, [data-theme="classic"] textarea { border-radius: 3px !important; }
[data-theme="classic"] .tbl th, [data-theme="classic"] .tbl td { border: 1px solid var(--border); }
[data-theme="classic"] .tbl th { color: var(--text); text-transform: none; letter-spacing: 0; font-size: 12px; }
[data-theme="classic"] button { background: linear-gradient(#fdfdfd, #e3e3e3); }
[data-theme="classic"] button.primary { background: var(--accent); }

/* legacy: the old skydb web site — teal-grey page, boxed menu tabs, bordered tables with teal headers, Verdana, underlined links */
[data-theme="legacy"] {
  color-scheme: light;
  --bg: #d3e2e6; --surface: #e9eeef; --text: #000000; --muted: #45585e; --border: #a9bfc5;
  --accent: #0000ee; --accent-text: #ffffff; --danger: #cc0000; --ok: #007a00; --warn: #b35c00;
  --bar: #d3e2e6; --bar-text: #000000; --bar-active: #c4dbe1;
  --chipbg: rgba(0, 0, 0, .07); --th-bg: #c6dde3;
  --radius: 0;
}
[data-theme="legacy"] body { font: 13px/1.35 Verdana, Geneva, Tahoma, sans-serif; }
[data-theme="legacy"] h1 { font: 700 18px/1.3 Arial, Helvetica, sans-serif; }
[data-theme="legacy"] h2, [data-theme="legacy"] h3 { font-family: Arial, Helvetica, sans-serif; }
[data-theme="legacy"] a, [data-theme="legacy"] .fc a { color: #0000ee; text-decoration: underline; }
[data-theme="legacy"] a:visited { color: #551a8b; }
[data-theme="legacy"] .topbar { height: auto; min-height: 34px; padding: 4px 6px; border-bottom: 1px solid var(--border); }
[data-theme="legacy"] .topbar .brand { color: #e25822; font-family: Verdana, sans-serif; }
[data-theme="legacy"] .topbar a { text-decoration: none; }
[data-theme="legacy"] .menu { gap: 0; }
[data-theme="legacy"] .menu > li > a, [data-theme="legacy"] .menu > li > button {
  border: 1px solid #000; margin-left: -1px; border-radius: 0; background: #e9eeef; color: #000; padding: 1px 12px; font: 700 12px/1.7 Verdana, sans-serif; min-width: 64px; }
[data-theme="legacy"] .menu > li > a:hover, [data-theme="legacy"] .menu > li > button:hover, [data-theme="legacy"] .menu > li.open > button { background: #fff; }
[data-theme="legacy"] .menu > li.active > a, [data-theme="legacy"] .menu > li.active > button { background: var(--th-bg); color: #000; }
[data-theme="legacy"] .menu .sub { border-radius: 0; border-color: #000; box-shadow: 2px 2px 0 rgba(0, 0, 0, .25); }
[data-theme="legacy"] .user, [data-theme="legacy"] .user a { color: #000; }
[data-theme="legacy"] .card, [data-theme="legacy"] .twrap, [data-theme="legacy"] .stat, [data-theme="legacy"] .chip,
[data-theme="legacy"] button, [data-theme="legacy"] input, [data-theme="legacy"] select, [data-theme="legacy"] textarea { border-radius: 0 !important; }
[data-theme="legacy"] .card, [data-theme="legacy"] .twrap { box-shadow: none !important; }
[data-theme="legacy"] .tbl { font-size: 12px; }
[data-theme="legacy"] .tbl th, [data-theme="legacy"] .tbl td { border: 1px solid #b5c9ce; padding: 2px 5px; }
[data-theme="legacy"] .tbl th { background: var(--th-bg); color: #000; font: 700 12px/1.3 Verdana, sans-serif; text-transform: none; letter-spacing: 0; text-align: center; }
[data-theme="legacy"] .tbl td { background: var(--surface); }
[data-theme="legacy"] button { background: #efefef; border: 1px solid #767676; color: #000; padding: 2px 8px; }
[data-theme="legacy"] button.primary { background: #efefef; color: #000; border-color: #767676; }
[data-theme="legacy"] input[type=text], [data-theme="legacy"] input[type=password], [data-theme="legacy"] input[type=search],
[data-theme="legacy"] input[type=date], [data-theme="legacy"] select { background: #fff; border: 1px solid #767676; padding: 2px 4px; }
[data-theme="legacy"] .stat .v { font-family: Arial, Helvetica, sans-serif; }
/* legacy: selected chips / month cells / toggles in the teal header colour instead of a bright link-blue fill */
[data-theme="legacy"] .ychip.on, [data-theme="legacy"] .mcell.on, [data-theme="legacy"] .seg-ctl button.on {
  background: var(--th-bg) !important; color: #000 !important; border-color: #000 !important; }
[data-theme="legacy"] .mcell.on .mc { color: #000; }
[data-theme="legacy"] .ychip, [data-theme="legacy"] .mcell { border-radius: 0 !important; text-decoration: none; }


/* ==== base.css ==== */
/* page shell shared by every page: top bar and menu, buttons, inputs, cards (was lib/layout.js CSS) */
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* el.hidden = true must win over display: grid/flex set by page styles */
html, body { margin: 0; }
/* tablets / phones: no automatic text enlarging in landscape (iOS Safari), so a rotated page re-flows instead of looking zoomed */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--text);
  min-height: 100vh; display: flex; flex-direction: column; }
body.full { height: 100vh; overflow: hidden; }
a { color: var(--accent); }
.topbar { position: sticky; top: 0; z-index: 10; flex: none; display: flex; align-items: center; gap: 16px;
  min-height: 48px; padding: 4px 16px; background: var(--bar); color: var(--bar-text); }
.topbar a { color: inherit; text-decoration: none; }
.brand { font-weight: 700; letter-spacing: .05em; display: inline-flex; align-items: center; gap: 8px; }
.brand img { width: 30px; height: 30px; border-radius: 50%; background: #fff; flex: none; }   /* Antonov Airlines logo (/logo.png) */
.topbar nav { flex: 1; min-width: 0; }
.menu, .menu ul { list-style: none; margin: 0; padding: 0; }
.menu { display: flex; gap: 4px; flex-wrap: wrap; }
.menu li { position: relative; }
.menu > li > a, .menu > li > button { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border: 0;
  border-radius: 6px; background: none; color: inherit; font: inherit; white-space: nowrap; cursor: pointer; }
.menu > li > a:hover, .menu > li > button:hover, .menu > li.open > button { background: rgba(255,255,255,.1); }
.menu > li.active > a, .menu > li.active > button { background: var(--bar-active); color: #fff; }
.menu .caret { font-size: .7em; opacity: .75; }
.menu .sub { display: none; position: absolute; top: 100%; left: 0; z-index: 20; min-width: 200px; padding: 6px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0,0,0,.2); }
.menu .sub .sub { top: -7px; left: 100%; }
.menu li.open > .sub { display: block; }
@media (hover: hover) { .menu li:hover > .sub { display: block; } }
.topbar .sub a, .menu .sub button { display: flex; justify-content: space-between; align-items: center; gap: 16px;
  width: 100%; padding: 7px 10px; border: 0; border-radius: 5px; background: none; color: var(--text);
  font: inherit; text-align: left; white-space: nowrap; cursor: pointer; }
.topbar .sub a:hover, .menu .sub button:hover, .menu .sub li.open > button { background: var(--bg); }
.menu .sub li.active > a, .menu .sub li.active > button { color: var(--accent); font-weight: 600; }
.user { display: flex; gap: 12px; align-items: center; font-size: 14px; white-space: nowrap; }
/* user menu (lib/layout.js userMenu): opens to the left, red (N) = personal notices to review */
.umenu .sub { left: auto; right: 0; } .umenu .sub a { justify-content: flex-start; gap: 4px; }
.umenu .ucount { color: #ff4d4d; font-weight: 700; }
.umenu .sub .ucount { color: var(--danger); }
.umenu .uicon { display: none; }
main.content { flex: 1; width: 100%; max-width: 960px; margin: 0 auto; padding: 24px 16px; }
main.content.wide { max-width: none; }
main.full { flex: 1; min-height: 0; display: flex; }
h1 { margin-top: 0; }
input, button { font: inherit; }
input[type=text], input[type=password] { padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--text); min-width: 0; }
button { padding: 7px 14px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface);
  color: var(--text); cursor: pointer; }
button:hover { border-color: var(--muted); }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
button.danger { color: var(--danger); }
button:disabled { opacity: .5; cursor: default; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius, 10px); padding: 20px; }
.msg { min-height: 1.5em; color: var(--muted); }
.msg.err { color: var(--danger); }
.msg.ok { color: var(--ok); }
@media (max-width: 600px) {
  .umenu .uname { display: none; } .umenu .uicon { display: inline; }
  .topbar { gap: 10px; }
}

/* Phones / narrow windows: the main menu folds behind the ☰ button (.navbtn) into a full-width panel under the bar;
   groups open in place (accordion, any depth). The user menu stays in the bar. JS: MENU_JS in lib/layout.js. */
.navbtn { display: none; }
@media (max-width: 760px) {
  .topbar { justify-content: space-between; }
  .navbtn { display: inline-flex; align-items: center; justify-content: center; order: 3; width: 42px; height: 38px; padding: 0;
    border: 0; border-radius: 6px; background: none; color: inherit; font-size: 22px; line-height: 1; }
  .navbtn:hover, .topbar.navopen .navbtn { background: rgba(255,255,255,.12); }
  .topbar .user { order: 2; margin-left: auto; }
  .topbar nav { display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 30;
    max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain;
    padding: 6px 10px 12px; background: var(--bar); color: var(--bar-text); box-shadow: 0 12px 24px rgba(0,0,0,.25); }
  .topbar.navopen nav { display: block; }
  .topbar nav .menu { display: block; }
  .topbar nav .menu li { position: static; }
  .topbar nav .menu > li > a, .topbar nav .menu > li > button { width: 100%; justify-content: space-between; padding: 11px 12px; font-size: 16px; }
  .topbar nav .menu .sub, .topbar nav .menu .sub .sub { position: static; display: none; min-width: 0; margin: 2px 0 6px 12px; padding: 4px;
    border: 0; border-radius: 6px; box-shadow: none; }
  .topbar nav .menu li.open > .sub { display: block; }
  .topbar nav .menu li:hover > .sub { display: none; }              /* no hover-open inside the panel */
  .topbar nav .menu li.open:hover > .sub { display: block; }
  .topbar nav .sub a, .topbar nav .menu .sub button { padding: 10px 10px; white-space: normal; font-size: 15px; }
  .topbar nav .menu .sub .caret { display: inline; }
  .topbar nav .menu .caret { transition: transform .15s; }
  .topbar nav .menu li.open > button > .caret { transform: rotate(90deg); }
  .topbar nav .menu > li.open > button > .caret { transform: rotate(180deg); }
}

/* small helpers */
.errcard { color: var(--danger); }
.m0 { margin: 0; } .mt0 { margin-top: 0; } .mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; }

/* Standard year + month selector (lib/ym-select.js): ◀ [Year] [Month] ▶ */
.ymsel { display: inline-flex; align-items: stretch; gap: 6px; }
.ymsel select { padding: 6px 28px 6px 10px; border: 1px solid var(--border); border-radius: 6px; background-color: var(--surface); color: var(--text);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums; }
.ymsel select:hover, .ymsel select:focus { border-color: var(--accent); }
.ymsel .ymarrow { display: inline-grid; place-items: center; min-width: 34px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--text); font-size: 12px; text-decoration: none; }
.ymsel a.ymarrow:hover { border-color: var(--accent); color: var(--accent); }
.ymsel .ymarrow.off { opacity: .35; }
.ymsel.busy { opacity: .6; pointer-events: none; }


/* ==== fc-editor.css ==== */
/* FC folder editor (was lib/fc/editor.js EDITOR_CSS) */
.ebtn { font-size: 12.5px; padding: 3px 10px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--accent); cursor: pointer; font-weight: 600; }
.ebtn:hover { border-color: var(--accent); }
.ebtn.danger { color: var(--danger); } .ebtn.danger:hover { border-color: var(--danger); }
.ebtn.small { font-size: 11.5px; padding: 1px 7px; }
dialog.fced { border: 1px solid var(--border); border-radius: 12px; padding: 0; width: min(96vw, 640px); max-height: 90vh; background: var(--surface); color: var(--text);
  box-shadow: 0 24px 60px rgba(0,0,0,.3); }
dialog.fced.wide { width: min(96vw, 1100px); }
dialog.fced::backdrop { background: rgba(15, 23, 42, .45); }
.fced form { display: flex; flex-direction: column; max-height: 90vh; }
.fced header { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.fced header h3 { margin: 0; font-size: 16px; flex: 1; }
.fced .body { padding: 16px 18px; overflow: auto; display: grid; gap: 12px; }
.fced footer { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; gap: 10px; align-items: center; justify-content: flex-end; }
.fced footer .err { flex: 1; color: var(--danger); font-size: 13px; white-space: pre-wrap; }
.fced label.f { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.fced label.f > span.req::after { content: ' *'; color: var(--danger); }
.fced input[type=text], .fced input[type=date], .fced input[type=search], .fced select, .fced textarea {
  font: inherit; font-size: 14px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 6px 9px; width: 100%; min-width: 0; }
.fced textarea { resize: vertical; min-height: 64px; }
.fced textarea.mono, .fced .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.fced .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } @media (max-width: 560px) { .fced .row2 { grid-template-columns: 1fr; } }
.fced .hint { font-size: 12px; color: var(--muted); white-space: pre-line; }
.fced .presets { display: flex; gap: 6px; flex-wrap: wrap; } .fced .presets button { font-size: 11.5px; padding: 1px 8px; }
.fced .check { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--text); }
.fced table.et { width: 100%; border-collapse: collapse; font-size: 13px; }
.fced table.et th, .fced table.et td { padding: 4px 5px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.fced table.et th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.fced table.et tr.sect td { background: var(--bg); font-weight: 600; padding: 6px; }
.fced .tools { display: flex; gap: 4px; } .fced .tools button { padding: 2px 7px; font-size: 12px; }
.fced .count { font-size: 11px; color: var(--muted); text-align: right; }
.fced .paxlist { border: 1px solid var(--border); border-radius: 8px; padding: 10px; display: grid; gap: 8px; }
.fced .progress { font-size: 13px; color: var(--muted); }
.nh .ebtn { margin-left: auto; }
/* section headers: title, then its Edit button, then the grey description */
.sh h2 { order: 0; } .sh .ebtn { order: 1; align-self: center; } .sh > :not(h2):not(.ebtn) { order: 2; }


/* ==== fc-ui.css ==== */
/* FC shared bits: chips, badges, route chain, stats tiles, .tbl tables, toolbar (was lib/fc/ui.js FC_CSS) */
.fc h1 { margin: 0; font-size: 1.6rem; letter-spacing: -.01em; }
.fc .sub { color: var(--muted); font-size: 14px; }
.fc a { text-decoration: none; } .fc a:hover { text-decoration: underline; }
.pre { white-space: pre-wrap; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.chip { display: inline-block; font-size: 11.5px; line-height: 1.6; padding: 0 7px; border-radius: 999px; background: var(--chipbg); color: var(--text); white-space: nowrap; margin: 1px 4px 1px 0; }
.chip.loaded { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); font-weight: 600; }
.chip.ferry { color: var(--muted); }
.chip.cargo { background: color-mix(in srgb, var(--c-LP) 14%, transparent); color: var(--c-LP); }
.chip.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); font-weight: 600; }
.chip.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); font-weight: 600; }
.chip.fail { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); font-weight: 600; }
.dept { display: inline-block; min-width: 42px; text-align: center; font: 700 10.5px/1.7 system-ui, sans-serif; letter-spacing: .04em; padding: 0 6px; border-radius: 4px;
  color: var(--dc); background: color-mix(in srgb, var(--dc) 14%, transparent); }
.d-COMM { --dc: var(--c-COMM); } .d-OPS { --dc: var(--c-OPS); } .d-LP { --dc: var(--c-LP); } .d-FIN { --dc: var(--c-FIN); }
.d-GHS { --dc: var(--c-GHS); } .d-TVP { --dc: var(--c-TVP); } .d-RP { --dc: var(--c-RP); }
.tbadge { font: 700 11px/1.7 system-ui, sans-serif; letter-spacing: .06em; padding: 0 7px; border-radius: 4px; color: #fff; }
.tbadge.salis { background: var(--salis); } .tbadge.adb { background: var(--adb); }
.when { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--chipbg); white-space: nowrap; }
.when.w-soon { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.when.w-active { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.when.w-done { color: var(--muted); }
.si { display: inline-grid; place-items: center; width: 18px; height: 18px; flex: none; border-radius: 50%; font: 700 11px/1 system-ui, sans-serif; color: #fff; }
.si-ok { background: var(--ok); } .si-warn { background: var(--warn); } .si-fail { background: var(--danger); } .si-na { background: var(--border); color: var(--muted); }
.route { display: flex; align-items: center; flex-wrap: wrap; row-gap: 4px; font: 600 12.5px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.route .ap { padding: 1px 5px; border-radius: 4px; background: var(--chipbg); color: var(--text); }
.route a.ap:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); text-decoration: none; }
.route .seg { width: 18px; height: 0; margin: 0 3px; border-top: 2px solid var(--accent); }
.route .seg.ferry { border-top: 2px dashed var(--muted); opacity: .7; }
.route .gap { margin: 0 6px; color: var(--muted); }
.ready { display: flex; align-items: center; gap: 10px; }
.rbar { flex: 1; display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--chipbg); }
.rbar span { display: block; height: 100%; } .r-ok { background: var(--ok); } .r-warn { background: var(--warn); } .r-fail { background: var(--danger); }
.rlabel { font-size: 13px; color: var(--muted); white-space: nowrap; } .rlabel strong { color: var(--text); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 18px 0; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius, 10px); padding: 12px 14px; }
.stat .v { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat .k { font-size: 13px; color: var(--muted); }
.stat.bad .v { color: var(--danger); } .stat.good .v { color: var(--ok); } .stat.warnv .v { color: var(--warn); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th, .tbl td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tbl th { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--th-bg, var(--bg)); white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.bad { background: color-mix(in srgb, var(--danger) 8%, transparent); color: var(--danger); }
.twrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius, 10px); background: var(--surface); }
.seg-ctl { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg-ctl button { border: 0; border-radius: 0; padding: 6px 12px; background: none; }
.seg-ctl button.on { background: var(--accent); color: var(--accent-text); }
.toolbar { display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar input[type=search] { padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; min-width: 220px; flex: 1; max-width: 360px; }
.toolbar label { display: flex; gap: 6px; align-items: center; font-size: 14px; }
.legacy { font-size: 13px; }
.toolbar select { padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }


/* ==== inv-editor.css ==== */
/* invoice editor dialogs (was lib/inv-editor-ui.js EDIT_CSS) */
.ie-back { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 50; display: grid; place-items: start center; overflow-y: auto; padding: 4vh 12px; }
.ie { background: var(--surface); color: var(--text); border-radius: 12px; width: min(860px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.ie header { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.ie header h2 { margin: 0; font-size: 1.1rem; flex: 1; }
.ie .body { padding: 14px 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
@media (max-width: 640px) { .ie .body { grid-template-columns: 1fr; } }
.ie .f { display: grid; gap: 4px; font-size: 13px; color: var(--muted); position: relative; }
.ie .f.full { grid-column: 1 / -1; }
.ie input, .ie select, .ie textarea { width: 100%; box-sizing: border-box; padding: 7px 9px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); font: inherit; font-size: 14px; }
.ie textarea { min-height: 90px; resize: vertical; }
.ie .hint { font-size: 12px; color: var(--muted); } .ie .warnline { font-size: 12.5px; color: var(--warn); }
.ie .pick { position: absolute; top: 100%; left: 0; right: 0; z-index: 5; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; margin-top: 2px;
  max-height: 240px; overflow-y: auto; box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.ie .pick div { padding: 6px 9px; cursor: pointer; font-size: 13.5px; color: var(--text); } .ie .pick div:hover, .ie .pick div.on { background: var(--chipbg); }
.ie .pick small { color: var(--muted); }
.ie footer { display: flex; gap: 10px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--border); }
.ie.wide { width: min(1400px, 100%); }
.ie .lbody { padding: 12px 18px; display: grid; gap: 10px; }
.ie .lbody .twrap { overflow: visible; }
.ie table.et { width: 100%; border-collapse: collapse; font-size: 13px; }
.ie table.et th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); padding: 4px 4px; }
.ie table.et td { padding: 3px 4px; vertical-align: top; border-top: 1px solid var(--border); }
.ie table.et input, .ie table.et select { padding: 5px 6px; font-size: 13px; }
.ie table.et select { max-width: 170px; } .ie table.et .ph { width: 64px; } .ie table.et .nm { width: 96px; text-align: right; }
.ie table.et td.wleg { min-width: 200px; } .ie table.et td.wjob { min-width: 120px; } .ie table.et td.wnote { min-width: 160px; }
.ie table.et td.lid { color: var(--muted); font-size: 12px; padding-top: 9px; white-space: nowrap; }
.ie table.et td.tools { white-space: nowrap; } .ie table.et td.tools button { padding: 4px 7px; }
.ie table.et tr.deleted td { opacity: .45; } .ie table.et tr.deleted td input, .ie table.et tr.deleted td select { text-decoration: line-through; }
.ie .lfoot { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.ie .ltot { font-size: 13.5px; font-weight: 600; } .ie .ltot.off { color: var(--warn); } .ie .ltot.ok { color: var(--ok); }
.ie .legcell { display: flex; gap: 4px; } .ie .legcell .legbox { min-width: 0; flex: 1; background: var(--chipbg); cursor: default; }
.ie-back.mvtback { z-index: 60; } .ie.mvt { width: min(1300px, 100%); }
.ie .mvtwrap { max-height: 60vh; overflow: auto; } .ie table.mvt td { white-space: nowrap; } .ie table.mvt td.nw { font-variant-numeric: tabular-nums; }
.ie table.mvt tr.flt td { border-top: 0; } .ie table.mvt tr.flt input { width: 100%; min-width: 70px; }
.ie table.mvt tr.cur td { background: color-mix(in srgb, var(--accent) 12%, transparent); } .ie table.mvt .num { text-align: right; }
.ie button.danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.ie footer .msg { flex: 1; font-size: 13.5px; } .ie footer .msg.err { color: var(--danger); } .ie footer .msg.ok { color: var(--ok); }


/* ==== map.css ==== */
/* world map SVG (lib/map) — also embedded in standalone .svg files */
.wm{display:block;width:100%;height:auto;background:var(--map-sea,#dbe8f3);border-radius:8px;user-select:none;touch-action:none}
.wm .wm-sea{fill:var(--map-sea,#dbe8f3)}
.wm .wm-c{fill:var(--map-land,#f4f1ea);stroke:var(--map-border,#a9a59b);stroke-width:.6;vector-effect:non-scaling-stroke;fill-rule:evenodd}
.wm .wm-c:hover{fill:var(--map-land-hover,#e9e4d8)}
.wm .wm-c-hl{fill:var(--map-hl,#f6dfae)} .wm .wm-c-hl:hover{fill:var(--map-hl-hover,#f1d18f)}
.wm .wm-c-hl2{fill:var(--map-hl2,#cfe5c4)}
.wm .wm-grid{fill:none;stroke:var(--map-grid,#c3d3e2);stroke-width:.5;vector-effect:non-scaling-stroke}
.wm .wm-route{fill:none;stroke:var(--map-route,#c2410c);stroke-width:2.4;stroke-linejoin:round;stroke-linecap:round;vector-effect:non-scaling-stroke}
.wm .wm-arc{fill:none;stroke:var(--map-route,#c2410c);stroke-width:1.8;stroke-opacity:.7;stroke-linecap:round;vector-effect:non-scaling-stroke;cursor:pointer}
.wm .wm-arc:hover,.wm .wm-arc.on{stroke:var(--map-route-on,#1d4ed8);stroke-opacity:1;stroke-width:3.5}
.wm .wm-route-alt{fill:none;stroke:var(--map-route-alt,#64748b);stroke-width:1.6;stroke-dasharray:5 4;vector-effect:non-scaling-stroke}
.wm .wm-m circle{r:calc(2.2px / var(--wmz,1));fill:var(--map-route,#c2410c);stroke:#fff;stroke-width:calc(.8px / var(--wmz,1))}
.wm .wm-m.apt circle{r:calc(4.5px / var(--wmz,1));fill:#fff;stroke:var(--map-route,#c2410c);stroke-width:calc(2.2px / var(--wmz,1))}
.wm .wm-m.fir circle{r:calc(3.2px / var(--wmz,1));fill:var(--map-fir,#1d4ed8);stroke:#fff}
.wm .wm-m text{font:600 calc(12px / var(--wmz,1)) system-ui,sans-serif;fill:var(--map-text,#1f2937);paint-order:stroke;stroke:var(--map-halo,rgba(255,255,255,.85));stroke-width:calc(3px / var(--wmz,1));stroke-linejoin:round}
.wm .wm-m.pt text,.wm .wm-m.fir text{font-weight:500;font-size:calc(10px / var(--wmz,1))}
.wm .wm-m.pt text{display:none} .wm.zoomed .wm-m.pt text{display:inline}
.wm .wm-m:hover text{display:inline}


/* ==== sql-table.css ==== */
/* SQL result tables (was lib/sql-table.js TABLE_CSS) */
.sqlt-wrap { overflow: auto; max-height: calc(100vh - 230px); border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.sqlt { border-collapse: separate; border-spacing: 0; font-size: 13px; width: max-content; min-width: 100%; }
.sqlt th, .sqlt td { padding: 5px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; text-align: left; }
.sqlt th { position: sticky; top: 0; z-index: 2; background: var(--bg); font-weight: 600; font-size: 12px; color: var(--muted); }
.sqlt th:first-child, .sqlt td:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); border-right: 1px solid var(--border); }
.sqlt th:first-child { z-index: 3; background: var(--bg); }
.sqlt .num { text-align: right; font-variant-numeric: tabular-nums; }
.sqlt tbody tr:hover td { background: var(--bg); }
.sqlt .null { color: var(--muted); opacity: .45; }
.sqlt-wrap.hide-empty .empty-col { display: none; }


/* ==== tempchart.css ==== */
/* temperature chart SVG (lib/wx.js tempChart) */
.tc{display:block;width:100%;height:auto;font:12px system-ui,sans-serif}
.tc .tc-g{stroke:var(--tc-grid,#e5e7eb);stroke-width:1} .tc .tc-g.z{stroke:var(--tc-zero,#94a3b8)} .tc .tc-g.day{stroke:var(--tc-day,#cbd5e1);stroke-dasharray:4 3}
.tc text{fill:var(--tc-text,#64748b)} .tc .tc-y{text-anchor:end} .tc .tc-x{text-anchor:middle} .tc .tc-x.d{font-weight:600;fill:var(--tc-strong,#334155)}
.tc .tc-t{fill:none;stroke:var(--tc-temp,#ea580c);stroke-width:2.2;stroke-linejoin:round;stroke-linecap:round}
.tc .tc-d{fill:none;stroke:var(--tc-dew,#0284c7);stroke-width:1.5;stroke-dasharray:5 3;stroke-linejoin:round}
.tc .tc-p{fill:var(--tc-temp,#ea580c);stroke:var(--tc-bg,#fff);stroke-width:1} .tc .tc-p:hover{r:5}
.tc .tc-p.max{fill:#dc2626} .tc .tc-p.min{fill:#2563eb}
.tc .tc-l{font-weight:700;paint-order:stroke;stroke:var(--tc-bg,#fff);stroke-width:3px} .tc .tc-l.max{fill:#dc2626} .tc .tc-l.min{fill:#2563eb}
.tc .tc-k{font-size:11.5px}


/* ==== pages/acdocs.css ==== */
.pg-acdocs .phead { margin-bottom: 12px; }
.pg-acdocs .tbl.adm { font-size: 13px; }
.pg-acdocs .tbl.adm td, .pg-acdocs .tbl.adm th { white-space: nowrap; vertical-align: middle; padding: 5px 8px; }
.pg-acdocs .tbl.adm a { text-decoration: none; }
.pg-acdocs td.c-green { background: color-mix(in srgb, #22c55e 20%, transparent); }
.pg-acdocs td.c-yellow { background: color-mix(in srgb, #facc15 35%, transparent); }
.pg-acdocs td.c-red { background: color-mix(in srgb, #ef4444 20%, transparent); }
.pg-acdocs .tbl td.c-red { color: inherit; }
.pg-acdocs a.pdf { font: 700 10px system-ui, sans-serif; color: #b91c1c; border: 1px solid currentColor; border-radius: 3px; padding: 0 3px; margin-left: 3px; vertical-align: 1px; }
.pg-acdocs .alinks { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.pg-acdocs .alinks label.arch { margin-left: 12px; font-size: 14px; }
.pg-acdocs .tbl.adl tr.arch td { color: var(--muted); }
.pg-acdocs .adoc { display: grid; grid-template-columns: minmax(280px, 420px) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) {
.pg-acdocs .adoc { grid-template-columns: 1fr; }
 }
.pg-acdocs .tbl.kvt td:first-child { color: var(--muted); width: 110px; }
.pg-acdocs .afile { margin-bottom: 14px; }
.pg-acdocs .afh { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.pg-acdocs .afile iframe { width: 100%; height: 82vh; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.pg-acdocs .afile img { max-width: 100%; border: 1px solid var(--border); border-radius: 6px; }
.pg-acdocs .aup { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; padding: 10px 12px !important; }
.pg-acdocs .ahist summary { cursor: pointer; }
.pg-acdocs .ahist table { font-size: 12.5px; margin-top: 8px; }
.pg-acdocs .aform { display: grid; gap: 12px; max-width: 640px; }
.pg-acdocs .aform > label { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; align-items: center; }
.pg-acdocs .aform > label > span:first-child { color: var(--muted); font-size: 14px; }
.pg-acdocs .aform input[type=text], .pg-acdocs .aform input[type=date], .pg-acdocs .aform select { padding: 6px 9px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; max-width: 100%; }
.pg-acdocs .aform .inl { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; }
.pg-acdocs .aform .vt { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.pg-acdocs .aact { display: flex; gap: 8px; align-items: center; }
.pg-acdocs .tbl.wb td, .pg-acdocs .tbl.wb th { white-space: nowrap; }
.pg-acdocs button.wbv { border: 0; background: none; color: var(--accent); padding: 0; font: inherit; cursor: pointer; text-decoration: underline dotted; }



/* ==== pages/admin-access.css ==== */
.pg-admin-access .acc h2 { font-size: 1.1rem; margin: 28px 0 10px; }
.pg-admin-access .twrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.pg-admin-access .tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.pg-admin-access .tbl th, .pg-admin-access .tbl td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.pg-admin-access .tbl th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--bg); }
.pg-admin-access .tbl tr:last-child td { border-bottom: 0; }
.pg-admin-access .tbl tr.grp td { background: var(--bg); font-weight: 600; }
.pg-admin-access .code { display: inline-block; font: 700 11.5px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 0 7px; border-radius: 5px;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); cursor: help; }
.pg-admin-access .code.unknown { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.pg-admin-access .pub { font-size: 12px; color: var(--ok); font-weight: 600; }
.pg-admin-access .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.pg-admin-access .muted { color: var(--muted); }
.pg-admin-access .small { font-size: 12.5px; }
.pg-admin-access .num { text-align: right; font-variant-numeric: tabular-nums; }
.pg-admin-access .ok { color: var(--ok); }
.pg-admin-access .warn { color: #b45309; font-weight: 600; }
.pg-admin-access .lead { color: var(--muted); margin-top: -6px; max-width: 900px; }
.pg-admin-access .you { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pg-admin-access #q { padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; width: min(100%, 320px); margin-bottom: 10px; }
.pg-admin-access #pq { margin: 0 0 8px; padding: 6px 10px; width: 280px; max-width: 100%; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); }
.pg-admin-access .tbl tr.changed td { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.pg-admin-access .chg { color: var(--accent); font-weight: 600; }
.pg-admin-access .tbl td.acts { white-space: nowrap; text-align: right; }
.pg-admin-access .ebtn { padding: 3px 10px; font-size: 12.5px; }
.pg-admin-access .aedit { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pg-admin-access .aedit .code .x { border: 0; background: none; padding: 0 0 0 2px; color: var(--danger); font-weight: 700; cursor: pointer; line-height: 1; }
.pg-admin-access .aedit .addc { width: 130px; padding: 3px 8px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); color: var(--text); font: 12.5px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }



/* ==== pages/admin-changes.css ==== */
.pg-admin-changes .logsize { margin: -8px 0 16px; font-size: 13px; }
.pg-admin-changes .filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.pg-admin-changes .filters select { font: inherit; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--text); max-width: 100%; }
.pg-admin-changes .count { margin-left: auto; color: var(--muted); font-size: 14px; }
.pg-admin-changes .chg { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; }
.pg-admin-changes .chg summary { display: grid; grid-template-columns: 11.5em 7em 5.5em minmax(0, 1fr) auto auto; gap: 12px; align-items: center;
  padding: 10px 14px; cursor: pointer; list-style: none; font-size: 14px; }
.pg-admin-changes .chg summary::-webkit-details-marker { display: none; }
.pg-admin-changes .chg summary:hover { background: var(--bg); border-radius: 8px; }
.pg-admin-changes .chg[open] summary { border-bottom: 1px solid var(--border); border-radius: 8px 8px 0 0; }
.pg-admin-changes .chg time { color: var(--muted); font-variant-numeric: tabular-nums; }
.pg-admin-changes .who { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.pg-admin-changes .file { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-admin-changes .act { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.pg-admin-changes .act-create { color: var(--ok); }
.pg-admin-changes .act-delete { color: var(--danger); }
.pg-admin-changes .stat { font: 13px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: nowrap; }
.pg-admin-changes .plus { color: var(--ok); }
.pg-admin-changes .minus { color: var(--danger); }
.pg-admin-changes .badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.pg-admin-changes .badge.ok { color: var(--ok); border-color: currentColor; }
.pg-admin-changes .badge.bad { color: var(--danger); border-color: currentColor; }
.pg-admin-changes .body { padding: 10px 14px 14px; }
.pg-admin-changes .meta { font-size: 13px; margin-bottom: 8px; }
.pg-admin-changes .muted { color: var(--muted); }
.pg-admin-changes pre.err { color: var(--danger); background: var(--bg); padding: 8px 10px; border-radius: 6px; font-size: 12px; white-space: pre-wrap; margin: 0 0 8px; }
.pg-admin-changes .diff-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 6px; }
.pg-admin-changes .diff { border-collapse: collapse; width: 100%; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.pg-admin-changes .diff td { padding: 0 8px; white-space: pre; vertical-align: top; }
.pg-admin-changes .diff .ln { width: 1%; text-align: right; color: var(--muted); user-select: none; border-right: 1px solid var(--border); }
.pg-admin-changes .diff .sg { width: 1%; user-select: none; color: var(--muted); }
.pg-admin-changes .diff tr.add { background: rgba(34, 197, 94, .14); }
.pg-admin-changes .diff tr.add .sg { color: var(--ok); }
.pg-admin-changes .diff tr.del { background: rgba(239, 68, 68, .14); }
.pg-admin-changes .diff tr.del .sg { color: var(--danger); }
.pg-admin-changes .diff tr.hh td { background: var(--bg); color: var(--muted); padding: 3px 8px; }
.pg-admin-changes .pager { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.pg-admin-changes .empty { padding: 24px; text-align: center; }
@media (max-width: 760px) {
.pg-admin-changes .chg summary { grid-template-columns: 1fr auto; gap: 4px 12px; }
.pg-admin-changes .chg summary .file { grid-column: 1 / -1; order: -1; }

}



/* ==== pages/admin-dbstruct.css ==== */
.pg-admin-dbstruct .tlist { width: 300px; flex: none; display: flex; flex-direction: column; border-right: 1px solid var(--border); background: var(--surface); }
.pg-admin-dbstruct .tlist-head { padding: 10px 12px; border-bottom: 1px solid var(--border); display: grid; gap: 6px; }
.pg-admin-dbstruct .tlist-head input { width: 100%; }
.pg-admin-dbstruct .tlist-head .count { font-size: 12px; color: var(--muted); }
.pg-admin-dbstruct .tlist ul { list-style: none; margin: 0; padding: 6px; overflow: auto; flex: 1; }
.pg-admin-dbstruct .tlist li button { width: 100%; display: flex; justify-content: space-between; gap: 8px; border: 0; background: none;
  padding: 5px 8px; border-radius: 5px; color: var(--text); text-align: left; font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.pg-admin-dbstruct .tlist li button:hover { background: var(--bg); }
.pg-admin-dbstruct .tlist li button.active { background: var(--accent); color: var(--accent-text); }
.pg-admin-dbstruct .tlist .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-admin-dbstruct .tlist .rc { flex: none; opacity: .6; font-size: 12px; }
.pg-admin-dbstruct .tlist .sch { opacity: .55; }
.pg-admin-dbstruct .view-tag { font: 600 10px system-ui, sans-serif; letter-spacing: .04em; border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; margin-left: 4px; opacity: .8; }
.pg-admin-dbstruct .pane { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pg-admin-dbstruct .pane-head { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface); }
.pg-admin-dbstruct .pane-head h2 { margin: 0; font: 600 16px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.pg-admin-dbstruct .pane-head .meta { color: var(--muted); font-size: 14px; }
.pg-admin-dbstruct .tabs { display: flex; gap: 4px; margin-left: auto; }
.pg-admin-dbstruct .tabs button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.pg-admin-dbstruct .tabbody { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 12px 16px; gap: 8px; }
.pg-admin-dbstruct .tabbody .sqlt-wrap { flex: 1 1 auto; min-height: 0; max-height: none; }
.pg-admin-dbstruct .tabbody .info { display: flex; gap: 16px; align-items: center; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.pg-admin-dbstruct .tabbody .info label { margin-left: auto; display: flex; gap: 6px; align-items: center; color: var(--text); }
.pg-admin-dbstruct .placeholder { margin: auto; color: var(--muted); text-align: center; padding: 24px; }
.pg-admin-dbstruct pre.err { color: var(--danger); white-space: pre-wrap; font-size: 13px; margin: 0; }
.pg-admin-dbstruct .flag { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--border); color: var(--muted); margin-right: 4px; }
.pg-admin-dbstruct .flag.pk { color: var(--accent); border-color: currentColor; }
@media (max-width: 760px) {
.pg-admin-dbstruct main.full { flex-direction: column; }
.pg-admin-dbstruct .tlist { width: auto; max-height: 32vh; border-right: 0; border-bottom: 1px solid var(--border); }
.pg-admin-dbstruct .tabs { margin-left: 0; }

}



/* ==== pages/admin-settings.css ==== */
.pg-admin-settings .lead { color: var(--muted); margin-top: -8px; }
.pg-admin-settings .sgroup { display: grid; gap: 14px; max-width: 640px; margin-bottom: 18px; }
.pg-admin-settings .sgroup h2 { margin: 0; font-size: 1.05rem; }
.pg-admin-settings .srow { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 6px 16px; align-items: center; }
.pg-admin-settings .srow label { color: var(--muted); font-size: 14px; }
.pg-admin-settings .srow input, .pg-admin-settings .srow select { width: 100%; padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; }
.pg-admin-settings .srow .hint { grid-column: 2; font-size: 12px; color: var(--muted); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.pg-admin-settings .pw { display: flex; gap: 6px; }
.pg-admin-settings .pw button { white-space: nowrap; }
.pg-admin-settings .actions { display: flex; gap: 10px; align-items: center; }
@media (max-width: 560px) {
.pg-admin-settings .srow { grid-template-columns: 1fr; }
.pg-admin-settings .srow .hint { grid-column: 1; }
 }
.pg-admin-settings #sms .actions { flex-wrap: wrap; }
.pg-admin-settings #smsf, .pg-admin-settings #smssend { display: grid; gap: 14px; }
.pg-admin-settings .smstest summary { cursor: pointer; color: var(--accent); font-size: 14px; }
.pg-admin-settings .smstest form { margin-top: 12px; }
.pg-admin-settings .smslog { border-collapse: collapse; font-size: 12.5px; width: 100%; }
.pg-admin-settings .smslog th, .pg-admin-settings .smslog td { border-bottom: 1px solid var(--border); padding: 4px 6px; text-align: left; vertical-align: top; }
.pg-admin-settings .smslog th { color: var(--muted); font-weight: 600; }
.pg-admin-settings .dbform .row2 { display: flex; gap: 10px; }
.pg-admin-settings .dbform .port { width: 110px; flex: none; }
.pg-admin-settings .dbform .actions { flex-wrap: wrap; }
.pg-admin-settings .checks { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; }
.pg-admin-settings .srow .checks label { display: flex; gap: 6px; align-items: center; color: var(--text); }
.pg-admin-settings .srow .checks input { width: auto; }
.pg-admin-settings .result:empty { display: none; }
.pg-admin-settings .result table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pg-admin-settings .result th, .pg-admin-settings .result td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.pg-admin-settings .result th { width: 140px; color: var(--muted); font-weight: 600; }
.pg-admin-settings .result td { white-space: pre-wrap; overflow-wrap: anywhere; }
.pg-admin-settings .result pre { margin: 0; white-space: pre-wrap; color: var(--danger); font-size: 13px; }



/* ==== pages/admin-sql.css ==== */
.pg-admin-sql .warn { color: var(--danger); margin-bottom: 12px; }
.pg-admin-sql #sql { display: block; width: 100%; min-height: 180px; padding: 10px; resize: vertical; border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--text); font: 13px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; tab-size: 4; }
.pg-admin-sql .actions { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 10px 0 16px; }
.pg-admin-sql .tr { display: inline-flex; gap: 6px; align-items: center; }
.pg-admin-sql .small { font-size: 13px; }
.pg-admin-sql .muted { color: var(--muted); }
.pg-admin-sql .msg.ok { color: var(--muted); }
.pg-admin-sql pre.err { white-space: pre-wrap; color: var(--danger); font-size: 13px; }
.pg-admin-sql .sqlres h3 { margin: 18px 0 6px; font-size: 15px; }



/* ==== pages/admin-system.css ==== */
.pg-admin-system .kv { width: 100%; border-collapse: collapse; }
.pg-admin-system .kv th, .pg-admin-system .kv td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.pg-admin-system .kv th { width: 34%; color: var(--muted); font-weight: 600; font-size: 14px; }
.pg-admin-system .kv td { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pg-admin-system .kv pre { margin: 0; white-space: pre-wrap; font-size: 12px; }
.pg-admin-system .table-wrap { overflow-x: auto; }
.pg-admin-system .muted { color: var(--muted); }
.pg-admin-system .disk { display: grid; gap: 6px; max-width: 520px; }
.pg-admin-system .disk-bar { height: 12px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); overflow: hidden; }
.pg-admin-system .disk-bar span { display: block; height: 100%; border-radius: 999px; background: var(--ok); }
.pg-admin-system .disk-bar.warn span { background: #d97706; }
.pg-admin-system .disk-bar.bad span { background: var(--danger); }
.pg-admin-system .disk-text { font-size: 14px; }
.pg-admin-system .kv th.num, .pg-admin-system .kv td.num { text-align: right; font-variant-numeric: tabular-nums; }
.pg-admin-system .kv.blist th { width: auto; }
.pg-admin-system .kv.blist th, .pg-admin-system .kv.blist td { white-space: nowrap; overflow-wrap: normal; vertical-align: middle; }
.pg-admin-system .kv.blist td:nth-child(2) { width: 100%; }



/* ==== pages/admin-user.css ==== */
.pg-admin-user .utitle { margin: 0 0 6px; font-size: 1.25rem; }
.pg-admin-user .uwarn { border: 1px solid #d00; background: #fff; color: #000; width: 350px; max-width: 100%; padding: 5px 8px; font-size: 13px; }
.pg-admin-user .urow { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: flex-start; margin: 10px 0; }
.pg-admin-user .uphoto img { width: 100px; display: block; }
.pg-admin-user .nophoto { width: 100px; height: 130px; display: grid; place-items: center; border: 1px dashed var(--border); color: var(--muted); font-size: 12px; }
.pg-admin-user .ubox { max-height: 250px; overflow-y: auto; min-width: 0; }
.pg-admin-user .ubox > b { display: block; margin-bottom: 3px; }
.pg-admin-user table.lt { border-collapse: collapse; font-size: 12.5px; background: var(--surface); }
.pg-admin-user table.lt th, .pg-admin-user table.lt td { border: 1px solid var(--border); padding: 3px 6px; vertical-align: top; text-align: left; }
.pg-admin-user table.lt th { background: var(--th-bg, var(--bg)); font-weight: 700; white-space: nowrap; position: sticky; top: 0; }
.pg-admin-user .udet td:first-child { color: var(--muted); white-space: nowrap; }
.pg-admin-user td.cgreen { background: #ccffcc !important; color: #000; }
.pg-admin-user td.cred { background: #ffcccc !important; color: #000; }
.pg-admin-user td.cyellow { background: #ffff99 !important; color: #000; }
.pg-admin-user b.r { color: #d00; }
.pg-admin-user b.g { color: #080; }
.pg-admin-user td.ua { max-width: 360px; font-size: 11.5px; overflow-wrap: anywhere; }
.pg-admin-user td.url { overflow-wrap: anywhere; }
.pg-admin-user .btnlink { display: inline-block; padding: 2px 9px; margin: 1px 2px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); font-size: 12.5px; text-decoration: none; }
.pg-admin-user .uactions { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.pg-admin-user .uvisits { margin-top: 12px; }
.pg-admin-user .uvisits #vlist { margin-top: 6px; max-height: 60vh; overflow-y: auto; }
.pg-admin-user .nowrap { white-space: nowrap; }
.pg-admin-user .muted { color: var(--muted); }
.pg-admin-user .small { font-size: 12.5px; }
.pg-admin-user .uactions button, .pg-admin-user .uphoto button { padding: 2px 10px; font-size: 12.5px; }
.pg-admin-user .uphoto { display: grid; gap: 6px; justify-items: start; }
.pg-admin-user .nophoto.drop.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.pg-admin-user .nophoto button { margin-top: 6px; }
.pg-admin-user .ucol { display: grid; gap: 12px; align-content: start; }
.pg-admin-user .utotp { border: 1px solid var(--border); padding: 6px 10px; background: var(--surface); max-width: 420px; }
.pg-admin-user .utotp p { margin: 4px 0; }
.pg-admin-user .utotp .secret { font-size: 15px; letter-spacing: .05em; }
.pg-admin-user .okc { color: #080; font-weight: 700; }
.pg-admin-user .failc { color: #d00; font-weight: 700; }
.pg-admin-user .udlg { border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); padding: 14px 18px; }
.pg-admin-user .udlg h3 { margin: 0 0 8px; }
.pg-admin-user .udlg input, .pg-admin-user .udlg textarea, .pg-admin-user .udlg select { width: 260px; max-width: 60vw; font: inherit; padding: 3px 6px; }
.pg-admin-user .dmsg { color: #d00; min-height: 1em; }



/* ==== pages/admin-users.css ==== */
.pg-admin-users .lead { color: var(--muted); margin-top: -8px; }
.pg-admin-users .bar { display: flex; gap: 10px 16px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.pg-admin-users .bar input[type=search] { padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; width: min(100%, 320px); }
.pg-admin-users .bar label { display: flex; gap: 6px; align-items: center; font-size: 14px; }
.pg-admin-users .twrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.pg-admin-users .tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.pg-admin-users .tbl th, .pg-admin-users .tbl td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.pg-admin-users .tbl th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--bg); position: sticky; top: 0; }
.pg-admin-users .tbl tr.dis td { color: var(--muted); }
.pg-admin-users .code { display: inline-block; font: 700 11px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 0 6px; margin: 1px 3px 1px 0; border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.pg-admin-users .code.admin { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.pg-admin-users .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.pg-admin-users .muted { color: var(--muted); }
.pg-admin-users .nowrap { white-space: nowrap; }
.pg-admin-users .me { font-size: 11px; font-weight: 700; color: var(--ok); }



/* ==== pages/airport.css ==== */
.pg-airport .tbox { --tc-grid: var(--border); --tc-text: var(--muted); --tc-strong: var(--text); --tc-bg: var(--surface); --tc-zero: color-mix(in srgb, var(--text) 35%, var(--surface)); --tc-day: color-mix(in srgb, var(--text) 25%, var(--surface)); }
.pg-airport .tsum { display: flex; gap: 8px 22px; flex-wrap: wrap; align-items: baseline; margin-bottom: 6px; font-size: 14px; }
.pg-airport .tsum .tmax { color: #dc2626; }
.pg-airport .tsum .tmin { color: #2563eb; }
.pg-airport .phead { margin-bottom: 14px; }
.pg-airport .sbar { display: flex; gap: 8px; margin-bottom: 14px; max-width: 640px; }
.pg-airport .sbar input { flex: 1; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 15px; }
.pg-airport .tbl tr.closed td { color: var(--muted); }
.pg-airport .strong { font-weight: 700; }
.pg-airport .h2 { font-size: 1.1rem; margin: 26px 0 10px; }
.pg-airport .qchips { display: flex; flex-wrap: wrap; gap: 8px; }
.pg-airport .qchip { padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font-size: 14px; }
.pg-airport .qchip:hover { border-color: var(--accent); text-decoration: none; }
.pg-airport .warnbox { border-color: color-mix(in srgb, var(--warn) 50%, var(--border)); margin-bottom: 12px; }
.pg-airport .atitle { margin: 0 0 10px; font-size: 1.3rem; display: flex; gap: 6px 14px; align-items: baseline; flex-wrap: wrap; scroll-margin-top: 70px; }
.pg-airport .atitle .back { margin-left: auto; font-size: 13px; font-weight: 400; }
.pg-airport .alayout { display: grid; grid-template-columns: max-content minmax(0, 820px); gap: 18px; align-items: start; }
.pg-airport .aside { position: sticky; top: 60px; }
.pg-airport table.facts { border-collapse: collapse; font-size: 12.5px; background: var(--surface); }
.pg-airport table.facts td { border: 1px solid var(--border); padding: 2px 6px; vertical-align: top; }
.pg-airport table.facts td:first-child { color: var(--muted); white-space: nowrap; }
.pg-airport table.facts td:last-child { max-width: 190px; overflow-wrap: anywhere; }
.pg-airport table.facts td.red { color: var(--danger); font-weight: 700; }
.pg-airport table.facts td.warnv { color: var(--warn); font-weight: 600; }
.pg-airport .amain { min-width: 0; }
.pg-airport .abar { color: #fff; border-radius: 4px; padding: 3px 8px; margin: 0 0 4px; font-size: 13.5px; }
.pg-airport .abar.red { background: #e53e3e; }
.pg-airport .abar.orange { background: #ff5722; }
.pg-airport .abar.sky { background: #3b8fd9; }
.pg-airport .abar.blue { background: #2b4fa8; }
.pg-airport .ainfo { font-size: 15px; line-height: 1.45; margin: 4px 0 10px; }
.pg-airport table.sun { border-collapse: collapse; font-size: 12px; margin-bottom: 10px; background: var(--surface); font-variant-numeric: tabular-nums; }
.pg-airport table.sun td { border: 1px solid var(--border); padding: 2px 5px; white-space: nowrap; }
.pg-airport table.sun tr:not(.today):not(.mh) td:not(:first-child) { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.pg-airport table.sun tr.mh td { color: var(--muted); }
.pg-airport table.sun td.cur { background: color-mix(in srgb, var(--accent) 14%, transparent); font-weight: 700; }
.pg-airport .gmapcard { padding: 0 !important; border: 0; background: none; margin-bottom: 4px; }
.pg-airport .gmap { width: 500px; max-width: 100%; height: 400px; border-radius: 4px; overflow: hidden; background: var(--bg); }
.pg-airport table.kvt { border-collapse: collapse; width: 500px; max-width: 100%; font-size: 12.5px; margin: 0 0 8px; background: var(--surface); }
.pg-airport table.kvt th { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); padding: 5px 8px; font-size: 13px; border: 1px solid var(--border); }
.pg-airport table.kvt td { border: 1px solid var(--border); padding: 3px 6px; vertical-align: top; overflow-wrap: anywhere; }
.pg-airport table.kvt td:first-child { width: 80px; color: var(--muted); white-space: nowrap; }
.pg-airport table.kvt tr.appr td:last-child { background: color-mix(in srgb, var(--ok) 16%, transparent); }
.pg-airport table.kvt .okv { color: var(--ok); font-weight: 600; }
.pg-airport table.kvt td.refuel { color: var(--danger); font-weight: 700; text-align: center; background: color-mix(in srgb, #06b6d4 14%, transparent); }
.pg-airport table.kvt.olist td:first-child { width: auto; color: var(--text); }
.pg-airport table.kvt.olist td { white-space: normal; }
.pg-airport table.kvt.olist td:last-child { white-space: nowrap; }
.pg-airport table.kvt.cap { margin-bottom: 0; }
.pg-airport table.kvt.cap + table.kvt { border-top: 0; }
.pg-airport .fsec { margin-top: 14px; scroll-margin-top: 70px; }
.pg-airport #fuel { margin-top: 8px; }
.pg-airport .sh { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.pg-airport .sh h2 { margin: 0; font-size: 1.02rem; }
.pg-airport .sh .muted { font-size: 12.5px; }
.pg-airport .amain .tbl { font-size: 13px; }
.pg-airport .amain .tbl td, .pg-airport .amain .tbl th { padding: 4px 8px; }
.pg-airport .amain .card { padding: 10px 12px; }
.pg-airport .nlist td { vertical-align: top; }
.pg-airport .nlist tr.ng td { border-top: 2px solid var(--border); }
.pg-airport .nlist td.nt { width: 170px; white-space: nowrap; }
.pg-airport .nlist td.nd { width: 80px; white-space: nowrap; text-align: right; }
.pg-airport .ntype { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); }
.pg-airport .nx strong { margin-right: 6px; }
.pg-airport .nbody { font-size: 13px; color: var(--text); }
.pg-airport .nbody.fold { max-height: 3.9em; overflow: hidden; cursor: pointer; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.pg-airport .nbody.fold.open { max-height: none; -webkit-mask-image: none; mask-image: none; }
.pg-airport .small { font-size: 12.5px; }
.pg-airport .empty { text-align: center; color: var(--muted); padding: 20px; }
.pg-airport .ntools { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.pg-airport .ntools input { padding: 3px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; font-size: 12.5px; width: 170px; }
.pg-airport .ebtn { font-size: 12px; padding: 2px 9px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--accent); cursor: pointer; font-weight: 600; }
.pg-airport .notambox { display: grid; gap: 6px; max-height: 55vh; overflow: auto; }
.pg-airport #wx .notambox { max-height: 40vh; }
.pg-airport pre.notam { margin: 0; padding: 6px 9px; border-radius: 6px; background: var(--bg); white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.pg-airport .nerr { color: var(--danger); font-size: 13.5px; }
@media (max-width: 900px) {
.pg-airport .alayout { grid-template-columns: minmax(0, 1fr); }
.pg-airport .aside { position: static; }
 }
.pg-airport .gmap iframe { border: 0; display: block; }
.pg-airport .sipeform { display: flex; gap: 6px; margin-left: auto; }
.pg-airport .sipeform input { width: 70px; padding: 3px 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; }
.pg-airport .sbest { font-size: 14px; margin: 2px 0 6px; }
.pg-airport .sbest:empty { display: none; }
.pg-airport table.sipe { border-collapse: collapse; font-size: 12.5px; background: var(--surface); font-variant-numeric: tabular-nums; margin: 0; }
.pg-airport table.sipe th, .pg-airport table.sipe td { border: 1px solid var(--border); padding: 2px 7px; text-align: center; white-space: nowrap; }
.pg-airport table.sipe th { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); font-weight: 600; }
.pg-airport table.sipe.st { margin: -1px 0 10px; }
.pg-airport table.sipe.st td { min-width: 30px; cursor: help; }
.pg-airport table.sipe.st tr th:first-child { text-align: left; }
.pg-airport table.sipe td.zero { color: var(--danger); }
.pg-airport table.sipe .cur { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); font-weight: 700; }
.pg-airport .rwform { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 14px; max-width: 820px; }
.pg-airport .rwform label { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.pg-airport .rwform label span { color: var(--muted); }
.pg-airport .rwform input { padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; }
.pg-airport .rwform small { font-size: 11.5px; }
.pg-airport .rwbtns { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pg-airport .rwbtns .danger { color: var(--danger); }
.pg-airport table.sipe.rwl td { text-align: left; }



/* ==== pages/calendar.css ==== */
.pg-calendar .calhead { display: flex; align-items: center; gap: 10px 20px; flex-wrap: wrap; margin-bottom: 14px; }
.pg-calendar .calhead h1 { margin: 0; }
.pg-calendar .calyears { display: flex; gap: 6px; flex-wrap: wrap; }
.pg-calendar .calyears a, .pg-calendar .calyears span { padding: 4px 11px; border-radius: 999px; border: 1px solid var(--border); font-weight: 600; font-size: 13.5px; color: var(--text); }
.pg-calendar .calyears a:hover { border-color: var(--accent); text-decoration: none; }
.pg-calendar .calyears .on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.pg-calendar .calimg { display: block; max-width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--border); background: #fff; }



/* ==== pages/cap555.css ==== */
.pg-cap555 .capcols { columns: 6 180px; column-gap: 20px; }
.pg-cap555 .capcols section { break-inside: avoid-column; margin-bottom: 14px; }
.pg-cap555 .capcols h2 { font-size: 15px; margin: 0 0 4px; }
.pg-cap555 .capcols a { display: block; padding: 1px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-cap555 .capcols a.marked { font-weight: 700; }
.pg-cap555 .small { font-size: 13px; }
.pg-cap555 .muted { color: var(--muted); }
.pg-cap555 .red { color: var(--danger); }
.pg-cap555 .num { text-align: right; }
.pg-cap555 table.capinfo, .pg-cap555 table.capfir { margin-bottom: 16px; }
.pg-cap555 table.capinfo td:first-child { color: var(--muted); white-space: nowrap; }
.pg-cap555 .caph { display: flex; gap: 14px; align-items: center; }
.pg-cap555 .caph h2 { margin: 8px 0; }
.pg-cap555 table.capnote { width: 100%; max-width: 640px; margin-bottom: 16px; }
.pg-cap555 table.capnote th { text-align: left; }
.pg-cap555 td.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.pg-cap555 .capfile { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.pg-cap555 .capup { margin-top: 8px; }
.pg-cap555 .capform table { width: 100%; max-width: 760px; }
.pg-cap555 .capform input[type=text], .pg-cap555 .capform select { width: 100%; max-width: 420px; }
.pg-cap555 .capform textarea { width: 100%; min-height: 260px; font: 13px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; }
.pg-cap555 table.lt { border-collapse: collapse; font-size: 13px; background: var(--surface); }
.pg-cap555 table.lt th, .pg-cap555 table.lt td { border: 1px solid var(--border); padding: 3px 8px; vertical-align: top; text-align: left; }
.pg-cap555 table.lt th { background: var(--th-bg, var(--bg)); font-weight: 700; }
.pg-cap555 table.capap td:first-child a { white-space: nowrap; }



/* ==== pages/cfp.css ==== */
.pg-cfp .wmbox { position: relative; padding: 0; overflow: hidden;
  --map-sea: color-mix(in srgb, #3b82f6 17%, var(--surface)); --map-land: color-mix(in srgb, var(--text) 3%, var(--surface)); --map-land-hover: color-mix(in srgb, var(--text) 6%, var(--surface));
  --map-border: color-mix(in srgb, var(--text) 28%, var(--surface)); --map-grid: color-mix(in srgb, var(--accent) 16%, var(--surface));
  --map-hl: color-mix(in srgb, #f59e0b 26%, var(--surface)); --map-hl-hover: color-mix(in srgb, #f59e0b 40%, var(--surface));
  --map-text: var(--text); --map-halo: color-mix(in srgb, var(--surface) 85%, transparent); }
.pg-cfp .wmbox .wm { border-radius: 0; cursor: grab; }
.pg-cfp .wm-tools { position: absolute; top: 10px; right: 10px; display: grid; gap: 4px; z-index: 1; }
.pg-cfp .wm-tools button { width: 30px; height: 30px; padding: 0; font-size: 16px; line-height: 1; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.pg-cfp .sh .grow { flex: 1; }
.pg-cfp .tbl.bnd { font-size: 13px; }
.pg-cfp .tbl.bnd td { padding: 4px 8px; vertical-align: top; }
.pg-cfp .tbl.bnd td.rte { min-width: 260px; white-space: normal; }
.pg-cfp .borders { font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.pg-cfp .borders .bc { font-weight: 700; margin-top: 6px; }
.pg-cfp .borders .bc:first-child { margin-top: 0; }
.pg-cfp .vtab { max-width: 900px; font-size: 13.5px; }
.pg-cfp .vtab td:first-child { width: 230px; color: var(--muted); white-space: nowrap; }
.pg-cfp .vtab ul { margin: 0; padding-left: 18px; }
.pg-cfp .vtab td.vok { background: color-mix(in srgb, var(--ok) 22%, transparent); font-weight: 700; }
.pg-cfp .vtab td.vfail { background: color-mix(in srgb, var(--danger) 20%, transparent); font-weight: 700; }
.pg-cfp .vtab td.vna { font-weight: 700; }
.pg-cfp .mapsplit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; margin-bottom: 18px; }
.pg-cfp .mapsplit .jgrid, .pg-cfp .mapsplit .sec { margin-bottom: 0; }
.pg-cfp .mapsplit .jgrid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.pg-cfp .ssplit .msright.sticky { position: sticky; top: 64px; }
.pg-cfp .ssplit .jwrap { max-height: none; }
.pg-cfp .tbl.cfps tr.on td { background: color-mix(in srgb, var(--accent) 12%, transparent); }
@media (max-width: 1000px) {
.pg-cfp .ssplit .msright.sticky { position: static; }
.pg-cfp .mapsplit { grid-template-columns: minmax(0, 1fr); }
.pg-cfp .mapsplit .msright { order: -1; }
 }
.pg-cfp .phead { margin-bottom: 14px; }
.pg-cfp .jhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 24px; flex-wrap: wrap; }
.pg-cfp .jhead h1 { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pg-cfp .route.big { font-size: 16px; }
.pg-cfp .acts { display: flex; gap: 8px; }
.pg-cfp .btn { display: inline-block; padding: 6px 12px; border: 1px solid var(--border); border-radius: 6px; color: var(--text); background: var(--surface); font-size: 14px; }
.pg-cfp .btn:hover { border-color: var(--accent); text-decoration: none; }
.pg-cfp .crumbs { font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.pg-cfp .sec { margin-bottom: 18px; }
.pg-cfp .sh { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.pg-cfp .sh h2, .pg-cfp .jgrid h2 { margin: 0; font-size: 1.05rem; }
.pg-cfp .jgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-bottom: 18px; align-items: start; }
.pg-cfp .jgrid h2 { margin-bottom: 10px; }
.pg-cfp .kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 5px 14px; margin: 0; font-size: 14px; }
.pg-cfp .kv dt { color: var(--muted); }
.pg-cfp .kv dd { margin: 0; overflow-wrap: anywhere; }
.pg-cfp .tbl.ports td { vertical-align: middle; }
.pg-cfp .tbl.ports td.rte { min-width: 260px; white-space: normal; font-size: 12.5px; }
.pg-cfp .tbl.nav, .pg-cfp .tbl.cfps { font-size: 13px; }
.pg-cfp .tbl.nav td, .pg-cfp .tbl.cfps td { padding: 4px 8px; vertical-align: middle; }
.pg-cfp .tbl.cfps th { position: sticky; top: 0; z-index: 1; }
.pg-cfp pre.fpl, .pg-cfp pre.ptext { margin: 0; font: 12.5px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-x: auto; }
.pg-cfp pre.ptext { max-height: 70vh; overflow: auto; margin-top: 10px; white-space: pre; }
.pg-cfp details.card summary { cursor: pointer; font-weight: 600; }
.pg-cfp details.card .twrap { margin-top: 10px; max-height: 70vh; }
.pg-cfp .msearch { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.pg-cfp .msearch label { display: grid; gap: 3px; font-size: 12px; color: var(--muted); }
.pg-cfp .msearch input { width: 130px; padding: 6px 9px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; font-size: 14px; }
.pg-cfp .msearch input.up { text-transform: uppercase; }
.pg-cfp .msearch input::placeholder { text-transform: none; }
.pg-cfp .msearch a { align-self: center; font-size: 14px; }
.pg-cfp .msearch .idbox { margin-left: auto; }
.pg-cfp .msearch .idbox input { width: 110px; }
.pg-cfp .mnav { display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; margin: 0 0 12px; }
.pg-cfp .mnav h2 { margin: 0; font-size: 1.2rem; }
.pg-cfp .mhead { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 4px 0 10px; }
.pg-cfp .mhead h2 { margin: 0; font-size: 1.2rem; text-align: center; }
.pg-cfp .mhead .arrow:last-child { justify-self: end; }
.pg-cfp .mhead .arrow { font-size: 14px; }
.pg-cfp .stats { margin: 0 0 16px; }
.pg-cfp .jwrap { max-height: 75vh; }
.pg-cfp .nowrap { white-space: nowrap; }
.pg-cfp .small { font-size: 13px; }
.pg-cfp .empty { text-align: center; color: var(--muted); padding: 28px; }



/* ==== pages/contragents.css ==== */
.pg-contragents .ctitle { margin: 0 0 10px; font-size: 1.2rem; }
.pg-contragents .small { font-size: 12.5px; }
.pg-contragents .muted { color: var(--muted); }
.pg-contragents .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.pg-contragents table.lt { border-collapse: collapse; font-size: 12.5px; background: var(--surface); }
.pg-contragents table.lt th, .pg-contragents table.lt td { border: 1px solid var(--border); padding: 3px 6px; vertical-align: top; text-align: left; }
.pg-contragents table.lt th { background: var(--th-bg, var(--bg)); font-weight: 700; white-space: nowrap; }
.pg-contragents table.lt td.pre { white-space: pre-wrap; }
.pg-contragents .btnlink { display: inline-block; padding: 1px 8px; margin: 1px 2px; border: 1px solid var(--border); border-radius: 4px; background: var(--bg); font-size: 12px; text-decoration: none; }
.pg-contragents .csearch { border: 1px solid var(--border); padding: 4px 10px 8px; margin: 0 0 10px; }
.pg-contragents .csearch input { width: 600px; max-width: 100%; padding: 4px 8px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); color: var(--text); font: inherit; }
.pg-contragents #clist tr.fmrow td { background: #00ced1; color: #000; }
.pg-contragents #clist tr.fmrow td a { color: #000; }
.pg-contragents #clist td:nth-child(4) { max-width: 420px; }
.pg-contragents .cwrap { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: flex-start; }
.pg-contragents .cleft { flex: 0 1 620px; min-width: 0; display: grid; gap: 12px; }
.pg-contragents .cdet { width: 100%; }
.pg-contragents .cdet td:first-child { white-space: nowrap; color: var(--muted); }
.pg-contragents .clogo { max-width: 300px; max-height: 120px; display: block; }
.pg-contragents .cbox { border: 1px solid var(--border); padding: 6px 10px 10px; margin: 0; min-width: 0; }
.pg-contragents .cbox legend { font-weight: 700; padding: 0 4px; }
.pg-contragents .cbanks { flex: 0 1 620px; display: grid; gap: 10px; }
.pg-contragents .cbank { border: 1px solid var(--border); padding: 4px 8px 8px; margin: 0; }
.pg-contragents .cbank.off { color: var(--muted); }
.pg-contragents .cinvis { border-collapse: collapse; font-size: 12.5px; }
.pg-contragents .cinvis td { padding: 2px 6px; vertical-align: top; overflow-wrap: anywhere; }
.pg-contragents .cinvis td:nth-child(odd) { color: var(--muted); white-space: nowrap; }
.pg-contragents .cfname { margin: 8px 0 3px; font-size: 13px; }
.pg-contragents .cfimg { display: block; max-width: 100%; width: 600px; }
.pg-contragents .cfpdf { display: block; width: 100%; height: 800px; border: 1px solid var(--border); background: #fff; }
.pg-contragents .vyears td.on { background: var(--accent); }
.pg-contragents .vyears td.on a { color: var(--accent-text); font-weight: 700; }
.pg-contragents .vyears td, .pg-contragents .vyears th { text-align: center; min-width: 44px; }
.pg-contragents .vyear { margin: 6px 0; font-size: 1.05rem; }
.pg-contragents .vlabel { margin: 6px 0 3px; }
.pg-contragents table.lt td.num { text-align: right; font-variant-numeric: tabular-nums; }
.pg-contragents .nowrap { white-space: nowrap; }
.pg-contragents .vsum { margin-bottom: 6px; }
.pg-contragents .vmonths { display: flex; flex-wrap: wrap; gap: 4px; max-width: 820px; }
.pg-contragents .vmonths button { padding: 2px 9px; font-size: 12.5px; }
.pg-contragents .vmonths button.on { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.pg-contragents td.cgreen { background: #ccffcc !important; color: #000; }
.pg-contragents td.cyellow { background: #ffff99 !important; color: #000; }
.pg-contragents td.cred { background: #ffcccc !important; color: #000; }



/* ==== pages/crew-roster.css ==== */
.pg-crew-roster table.lt { border-collapse: collapse; font-size: 13px; background: var(--surface); }
.pg-crew-roster table.lt > tbody > tr > th, .pg-crew-roster table.lt > thead > tr > th, .pg-crew-roster table.lt > tr > th { background: var(--th-bg, var(--bg)); border: 1px solid var(--border); padding: 6px 8px; font-weight: 600; white-space: nowrap; }
.pg-crew-roster table.lt > tbody > tr > td, .pg-crew-roster table.lt > tr > td { border: 1px solid var(--border); padding: 3px 6px; vertical-align: top; }
.pg-crew-roster table.roster td.rcell { min-width: 200px; font-size: 11.5px; }
.pg-crew-roster .rhead { margin-bottom: 4px; white-space: normal; }
.pg-crew-roster table.rmem { border-collapse: collapse; }
.pg-crew-roster table.rmem td { padding: 0 3px; white-space: nowrap; border: 0; }
.pg-crew-roster table.rmem tr:hover { background: var(--bg); }
.pg-crew-roster .rwrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.pg-crew-roster .rwrap h2 { font-size: 16px; margin: 18px 0 6px; }
.pg-crew-roster table.rhead2 td:first-child { color: var(--muted); white-space: nowrap; }
.pg-crew-roster table.rhead2 { max-width: 640px; }
.pg-crew-roster td.num { text-align: right; }
.pg-crew-roster .rred { background: #f8c9c4; color: #000; }
.pg-crew-roster .rorange { background: #fbe7a6; color: #000; }
.pg-crew-roster ul.rcheck { list-style: none; padding: 0; margin: 0; }
.pg-crew-roster ul.rcheck li { padding: 2px 6px; margin-bottom: 2px; }
.pg-crew-roster .rside { max-width: 420px; }
.pg-crew-roster .rlinks { display: flex; flex-wrap: wrap; gap: 6px; }
.pg-crew-roster .small { font-size: 13px; }
.pg-crew-roster .muted { color: var(--muted); }
.pg-crew-roster tr.rctl td { border: 1px solid var(--border); padding: 4px; white-space: nowrap; background: var(--bg); }
.pg-crew-roster .rbtn { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 28px; margin-right: 4px; padding: 0 6px;
  border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; }
.pg-crew-roster .rbtn.rdanger { color: var(--danger); }
.pg-crew-roster .rbtn.armed { background: var(--danger); color: #fff; }
.pg-crew-roster .rnew { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 14px 0 4px; }
.pg-crew-roster .rform table { width: 100%; max-width: 760px; }
.pg-crew-roster .rform input[type=text] { width: calc(100% - 44px); max-width: 520px; }
.pg-crew-roster .rform textarea { width: 100%; max-width: 900px; font: 13px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; }
.pg-crew-roster table.redit td { vertical-align: middle; }
.pg-crew-roster td.mname { position: relative; min-width: 280px; }
.pg-crew-roster td.mname .mtext { width: 100%; }
.pg-crew-roster .mpick { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; max-height: 300px; overflow-y: auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 8px 20px rgba(0,0,0,.18); padding: 4px; }
.pg-crew-roster .mpick button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 5px 8px; border-radius: 4px; white-space: nowrap; }
.pg-crew-roster .mpick button:hover { background: var(--bg); }
.pg-crew-roster button.armed { background: var(--danger); color: #fff; }
.pg-crew-roster table.rdocs td:first-child { white-space: nowrap; }
.pg-crew-roster .rdesk { overflow-x: auto; max-width: 100%; }
.pg-crew-roster .rdesk img { display: block; max-width: none; border: 1px solid var(--border); background: #fff; }
.pg-crew-roster .nwrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.pg-crew-roster .nwrap h2 { font-size: 16px; margin: 18px 0 6px; }
.pg-crew-roster table.nfields td:first-child { color: var(--muted); white-space: nowrap; }
.pg-crew-roster table.nfields { max-width: 640px; }
.pg-crew-roster .nfiles { flex: 1 1 520px; min-width: 0; }
.pg-crew-roster .nfile { margin-bottom: 14px; }
.pg-crew-roster .nfile iframe { width: 100%; max-width: 700px; height: 820px; border: 1px solid var(--border); margin-top: 4px; }
.pg-crew-roster .nfile img { max-width: 100%; max-height: 820px; margin-top: 4px; border: 1px solid var(--border); }
.pg-crew-roster .nup { margin-top: 10px; }
.pg-crew-roster .nowrap { white-space: nowrap; }
.pg-crew-roster .nwrap > div:first-child { flex: 0 1 680px; min-width: 0; }
.pg-crew-roster table.ndocs td:first-child { white-space: nowrap; }
.pg-crew-roster textarea.npob { display: block; width: 100%; max-width: 1000px; margin-top: 12px; font: 13px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre; }
.pg-crew-roster .rlinks .btnlink.on { font-weight: 700; border-color: var(--accent); }
.pg-crew-roster .sdform select { max-width: 100%; }
.pg-crew-roster .sdpeople { margin-top: 10px; }
.pg-crew-roster .sdpeople td { vertical-align: top; }
.pg-crew-roster .sdpeople tr.sdoff td { opacity: .5; }
.pg-crew-roster .sdmail { margin-top: 10px; }
.pg-crew-roster .sdmail td { padding: 3px 6px 3px 0; }
.pg-crew-roster .sdmail input { width: min(420px, 70vw); }



/* ==== pages/crew.css ==== */
.pg-crew .ctitle { margin: 0 0 10px; font-size: 1.2rem; }
.pg-crew .small { font-size: 12.5px; }
.pg-crew .muted { color: var(--muted); }
.pg-crew .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.pg-crew .nowrap { white-space: nowrap; }
.pg-crew .num { text-align: right; font-variant-numeric: tabular-nums; }
.pg-crew .red { color: var(--danger); }
.pg-crew table.lt { border-collapse: collapse; font-size: 12.5px; background: var(--surface); }
.pg-crew table.lt th, .pg-crew table.lt td { border: 1px solid var(--border); padding: 2px 6px; vertical-align: top; text-align: left; }
.pg-crew table.lt th { background: var(--th-bg, var(--bg)); font-weight: 700; text-align: center; white-space: nowrap; }
.pg-crew table.lt td.num { text-align: right; }
.pg-crew table.lt a { white-space: nowrap; }
.pg-crew .ctop { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; margin: 6px 0 12px; }
.pg-crew .cphoto img { display: block; max-width: 200px; border: 1px solid var(--border); }
.pg-crew .nophoto { width: 160px; height: 200px; display: grid; place-items: center; border: 1px dashed var(--border); color: var(--muted); font-size: 13px; }
.pg-crew table.cinfo { width: 300px; }
.pg-crew table.cinfo td { overflow-wrap: anywhere; }
.pg-crew .bday { background: hotpink; color: #000; font-weight: 700; text-align: center; }
.pg-crew .cerror { color: #d8000c; background: #ffbaba; border: 1px solid red; margin: 2px 0 6px; padding: 2px 6px; }
.pg-crew td.vgreen { background: #8fe08f; color: #000; }
.pg-crew td.vyellow { background: #ffef7a; color: #000; }
.pg-crew td.vorange { background: #ffa726; color: #000; }
.pg-crew td.vred { background: #ff9a9a; color: #000; }
.pg-crew table.cdocs { width: 100%; margin-top: 4px; }
.pg-crew table.cdocs td.ccat { background: var(--cc, transparent); color: #000; vertical-align: middle; text-align: center; white-space: nowrap; }
.pg-crew .csearch { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.pg-crew .csearch input { padding: 4px 8px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); color: var(--text); font: inherit; width: 320px; max-width: 100%; }
.pg-crew #clist tr.inactive td { color: var(--muted); }
.pg-crew .dwrap { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.pg-crew table.dinfo td:first-child { white-space: nowrap; color: var(--muted); }
.pg-crew table.dinfo td.vred, .pg-crew table.dinfo td.vorange, .pg-crew table.dinfo td.vyellow { color: #000; }
.pg-crew .dfiles { display: grid; gap: 12px; min-width: 0; }
.pg-crew .dfile img { height: 640px; max-width: 100%; object-fit: contain; border: 1px solid var(--border); margin-top: 4px; }
.pg-crew .dfile iframe { width: 600px; max-width: 90vw; height: 800px; border: 1px solid var(--border); margin-top: 4px; background: #fff; }
.pg-crew .dkill.armed { color: var(--danger); font-weight: 700; }
.pg-crew table.dmail { margin-top: 8px; }
.pg-crew table.cnakaz td.more { text-align: center; }
.pg-crew table.posgrid { margin-bottom: 14px; }
.pg-crew table.posgrid td { line-height: 1.6; padding: 4px 10px; white-space: nowrap; }
.pg-crew table.posgrid th { background: #b3c6ff; color: #000; }
.pg-crew table.posgrid .on { color: var(--accent); }
.pg-crew table.poslist { min-width: 360px; margin-bottom: 8px; }
.pg-crew td.xred, .pg-crew .xkey.xred { background: #FF6347; color: #000; }
.pg-crew td.xgold, .pg-crew .xkey.xgold { background: #FFD700; color: #000; }
.pg-crew td.xyel, .pg-crew .xkey.xyel { background: #FFFF99; color: #000; }
.pg-crew td.xred a, .pg-crew td.xgold a, .pg-crew td.xyel a { color: #000; }
.pg-crew .xkey { padding: 1px 6px; border-radius: 3px; }
.pg-crew .posnav a { display: inline-block; margin: 0 6px 4px 0; }
.pg-crew .posnav a.on { font-weight: 700; text-decoration: underline; }
.pg-crew .xwrap { overflow-x: auto; }
.pg-crew table.xdocs thead th { position: sticky; top: 0; }
.pg-crew table.dv th { min-width: 70px; max-width: 120px; white-space: normal; word-break: break-word; font-size: 11.5px; }
.pg-crew .rolesel { max-width: 100%; width: 360px; padding: 5px 8px; }
.pg-crew .rform input[type=text], .pg-crew .rform select { width: 260px; max-width: 70vw; }
.pg-crew table.kinds td { padding: 1px 6px; }
.pg-crew table.kinds label { cursor: pointer; }
.pg-crew .rform fieldset { border: 0; padding: 0; margin: 0; }
.pg-crew .tpnav .btnlink, .pg-crew .tspecs + p .btnlink { display: inline-block; padding: 2px 10px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); text-decoration: none; }
.pg-crew .tpnav .btnlink.on { font-weight: 700; border-color: var(--accent); }
.pg-crew td.tpwho { min-width: 220px; }
.pg-crew table.tp2 th { white-space: normal; font-size: 11.5px; }
.pg-crew table.tspecs td { padding: 3px 8px; }
.pg-crew .dewrap { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.pg-crew table.deform { max-width: 560px; }
.pg-crew table.deform input[type=text], .pg-crew table.deform select { width: 100%; max-width: 320px; }
.pg-crew table.deform td.deacts { white-space: normal; }
.pg-crew table.deform td.deacts label { display: inline-block; margin: 0 10px 4px 0; white-space: nowrap; }
.pg-crew .decomps { max-height: 560px; overflow-y: auto; flex: 1 1 380px; min-width: 0; }
.pg-crew .decomps input[type=search] { width: 260px; max-width: 100%; }
.pg-crew table.qa th { font-size: 11.5px; vertical-align: bottom; }
.pg-crew table.qa td { text-align: center; }
.pg-crew table.qa td:nth-child(2), .pg-crew table.qa td:nth-child(5) { text-align: left; }
.pg-crew .nrl { display: flex; gap: 16px; align-items: flex-start; }
.pg-crew .nrly { line-height: 1.5; font-size: 13px; }
.pg-crew table.nrlt td { font-size: 12.5px; }
.pg-crew td.okcell { background: #c8f0c8; color: #000; }
.pg-crew fieldset.ecf { max-width: 640px; margin: 0 0 12px; }
.pg-crew table.ecm td { vertical-align: top; }
.pg-crew textarea.ecx { display: block; width: 100%; font: 11px/1.35 ui-monospace, Consolas, monospace; white-space: pre; }
.pg-crew table.tform td { padding: 4px 8px 4px 0; vertical-align: middle; }
.pg-crew table.tform textarea { width: min(420px, 80vw); }
.pg-crew table.eai { margin-top: 8px; }
.pg-crew table.eai td { padding: 2px 4px; }
.pg-crew button.armed { background: var(--danger); color: #fff; }
.pg-crew table.nmt { margin: 0 0 12px; }
.pg-crew table.nmt td { padding: 6px 12px 6px 6px; }
.pg-crew .nmcode { font: 700 1.5rem/1.2 ui-monospace, Consolas, monospace; letter-spacing: .05em; }



/* ==== pages/fc-archive.css ==== */
.pg-fc-archive .phead { margin-bottom: 14px; }
.pg-fc-archive .mnav { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin: 0 0 12px; }
.pg-fc-archive .mnav h2 { margin: 0 0 0 6px; font-size: 1.2rem; }
.pg-fc-archive .nodate { padding: 6px 12px; border: 1px solid var(--border); border-radius: 6px; color: var(--text); background: var(--surface); font-size: 14px; }
.pg-fc-archive .nodate:hover { border-color: var(--accent); text-decoration: none; }
.pg-fc-archive .nodate.on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.pg-fc-archive .mhead { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-bottom: 10px; }
.pg-fc-archive .mhead h2 { margin: 0; font-size: 1.2rem; text-align: center; }
.pg-fc-archive .mhead .arrow:last-child { justify-self: end; }
.pg-fc-archive .mhead .arrow { font-size: 14px; }
.pg-fc-archive .dsrc { font: 600 10.5px system-ui, sans-serif; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-left: 4px; }
.pg-fc-archive .nowrap { white-space: nowrap; }
.pg-fc-archive .empty { text-align: center; color: var(--muted); padding: 28px; }



/* ==== pages/fc-dash.css ==== */
.pg-fc-dash .phead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.pg-fc-dash .pacts { display: flex; gap: 12px; align-items: center; }
.pg-fc-dash .live { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; padding: 5px 12px; border-radius: 999px; background: color-mix(in srgb, var(--ok) 13%, transparent); color: var(--ok); font-weight: 600; }
.pg-fc-dash .live .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 2s infinite; }
.pg-fc-dash .live.off { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.pg-fc-dash .live.off .dot { animation: none; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
.pg-fc-dash .live .dot { animation: none; }
 }
.pg-fc-dash .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 16px; align-items: start; }
.pg-fc-dash .fcard { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; display: grid; gap: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.pg-fc-dash .fcard.soon { border-color: color-mix(in srgb, var(--warn) 55%, var(--border)); }
.pg-fc-dash .fcard header { display: flex; align-items: center; gap: 10px; }
.pg-fc-dash .fcard .name { flex: 1; min-width: 0; font-weight: 700; font-size: 16px; color: var(--text); overflow-wrap: anywhere; }
.pg-fc-dash .fcard .meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); }
.pg-fc-dash .bad-t { color: var(--danger); font-weight: 600; }
.pg-fc-dash .issues { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: 13px; }
.pg-fc-dash .issues li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pg-fc-dash .issues .it { font-weight: 600; white-space: nowrap; }
.pg-fc-dash .issues .id { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pg-fc-dash .issues .more { padding-left: 26px; }
.pg-fc-dash .allgood { margin: 0; color: var(--ok); font-weight: 600; font-size: 14px; }
.pg-fc-dash .dstat { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 0; font-size: 13px; padding-top: 8px; border-top: 1px dashed var(--border); }
.pg-fc-dash .dstat dd { margin: 0; overflow-wrap: anywhere; }
.pg-fc-dash .fcard footer { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-fc-dash .fcard footer span:first-child { font-variant-numeric: tabular-nums; }
.pg-fc-dash .empty { text-align: center; color: var(--muted); padding: 32px; }
.pg-fc-dash .errpre { white-space: pre-wrap; color: var(--danger); font-size: 13px; }
.pg-fc-dash .issues a.it { color: var(--text); }
.pg-fc-dash .issues a.it:hover { color: var(--accent); }



/* ==== pages/fc-folder.css ==== */
.pg-fc-folder .crumbs { margin-bottom: 10px; font-size: 14px; }
.pg-fc-folder .hero { display: grid; gap: 12px; }
.pg-fc-folder .hero-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.pg-fc-folder .badges { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pg-fc-folder .badges .chip { margin: 0; font-size: 12px; }
.pg-fc-folder .actions { display: flex; gap: 14px; flex-wrap: wrap; }
.pg-fc-folder .hmeta { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px 20px; font-size: 14px; }
.pg-fc-folder .hmeta .k { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.pg-fc-folder .secnav { position: sticky; top: 48px; z-index: 5; display: flex; gap: 4px; overflow-x: auto; margin: 16px -16px 0; padding: 8px 16px;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--border); }
.pg-fc-folder .secnav a { white-space: nowrap; padding: 5px 11px; border-radius: 999px; font-size: 13.5px; color: var(--text); }
.pg-fc-folder .secnav a:hover { background: var(--chipbg); text-decoration: none; }
.pg-fc-folder .secnav .n { font-size: 11.5px; color: var(--muted); }
.pg-fc-folder .fsec { margin-top: 26px; scroll-margin-top: 110px; }
.pg-fc-folder .sh { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.pg-fc-folder .sh h2 { margin: 0; font-size: 1.15rem; }
.pg-fc-folder .sh .muted, .pg-fc-folder .legend { font-size: 13px; color: var(--muted); }
.pg-fc-folder .dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.pg-fc-folder .dcard { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.pg-fc-folder .dcard.s-ok { border-left-color: var(--ok); }
.pg-fc-folder .dcard.s-warn { border-left-color: var(--warn); }
.pg-fc-folder .dcard.s-fail { border-left-color: var(--danger); }
.pg-fc-folder .dh { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pg-fc-folder .dn { font-weight: 600; font-size: 14px; }
.pg-fc-folder .dcard ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.pg-fc-folder .dcard li { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; }
.pg-fc-folder .ct { font-weight: 600; }
.pg-fc-folder .cd { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.pg-fc-folder .achead { font-size: 13px; color: var(--muted); margin: 4px 0 8px; }
.pg-fc-folder .cols2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 14px; align-items: start; }
.pg-fc-folder .cols2 > div { display: grid; gap: 14px; }
.pg-fc-folder .kvs { display: grid; gap: 10px; }
.pg-fc-folder .kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; font-size: 14px; }
.pg-fc-folder .kv .k { color: var(--muted); font-size: 13px; }
.pg-fc-folder .kv .v { overflow-wrap: anywhere; }
.pg-fc-folder .note { display: grid; gap: 6px; font-size: 14px; }
.pg-fc-folder .note .nh { display: flex; align-items: center; gap: 8px; }
.pg-fc-folder .bad-t { color: var(--danger); font-weight: 600; }
.pg-fc-folder .sector { margin-bottom: 14px; }
.pg-fc-folder .sech { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; font-size: 14px; }
.pg-fc-folder .sech .chip { margin: 0; }
.pg-fc-folder .pdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin: 0 7px 1px 0; vertical-align: middle; }
.pg-fc-folder .p-ok { background: var(--ok); }
.pg-fc-folder .p-pending { background: var(--warn); }
.pg-fc-folder .p-missing { background: var(--danger); }
.pg-fc-folder .legend .pdot { margin-left: 10px; }
.pg-fc-folder .warnbox { border-color: color-mix(in srgb, var(--warn) 50%, var(--border)); }
.pg-fc-folder .small { font-size: 12.5px; }
.pg-fc-folder .nowrap { white-space: nowrap; }
.pg-fc-folder .tbl.apt td { min-width: 110px; }
.pg-fc-folder .tbl.apt td:first-child, .pg-fc-folder .tbl.apt td:nth-child(2) { min-width: 0; }
.pg-fc-folder tr.final td { background: var(--bg); }
.pg-fc-folder .raw { white-space: pre-wrap; text-align: left; font-size: 12px; }
.pg-fc-folder .showall { margin-top: 10px; }
.pg-fc-folder .actions { align-items: center; }
.pg-fc-folder .btnlink { display: inline-block; padding: 5px 12px; border-radius: 7px; background: var(--accent); color: var(--accent-text) !important; font-size: 13px; font-weight: 600; }
.pg-fc-folder .btnlink:hover { text-decoration: none !important; filter: brightness(1.08); }
.pg-fc-folder .file { display: flex; align-items: center; gap: 6px; margin: 2px 0; overflow-wrap: anywhere; }
.pg-fc-folder a.file { display: inline-flex; margin-right: 14px; }
.pg-fc-folder .ext { flex: none; font: 700 9.5px/1.6 system-ui, sans-serif; letter-spacing: .03em; padding: 0 4px; border-radius: 3px; background: var(--chipbg); color: var(--muted); }
.pg-fc-folder .ext.e-pdf { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }
.pg-fc-folder .ext.e-docx, .pg-fc-folder .ext.e-doc { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); }
.pg-fc-folder .ext.e-xlsx, .pg-fc-folder .ext.e-xls, .pg-fc-folder .ext.e-csv { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.pg-fc-folder .ext.e-png, .pg-fc-folder .ext.e-jpg, .pg-fc-folder .ext.e-jpeg, .pg-fc-folder .ext.e-gif, .pg-fc-folder .ext.e-webp, .pg-fc-folder .ext.e-bmp { background: color-mix(in srgb, var(--c-TVP) 14%, transparent); color: var(--c-TVP); }
.pg-fc-folder .briefs { display: grid; gap: 10px; margin-bottom: 14px; }
.pg-fc-folder .spacer { flex: 1; }
.pg-fc-folder .note { margin-bottom: 14px; }
.pg-fc-folder .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; margin-top: 6px; }
.pg-fc-folder .gallery figure { margin: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--bg); }
.pg-fc-folder .gallery img { display: block; width: 100%; height: 200px; object-fit: contain; background: #fff; }
.pg-fc-folder .gallery figcaption { padding: 6px 10px; font-size: 12.5px; }
.pg-fc-folder .empty { color: var(--muted); }
.pg-fc-folder .permwrap { margin-bottom: 14px; }
.pg-fc-folder .tbl.perm { table-layout: fixed; min-width: 1000px; }
.pg-fc-folder .tbl.perm col.c-country { width: 16%; }
.pg-fc-folder .tbl.perm col.c-type { width: 7%; }
.pg-fc-folder .tbl.perm col.c-state { width: 9%; }
.pg-fc-folder .tbl.perm col.c-date { width: 10%; }
.pg-fc-folder .tbl.perm col.c-permit { width: 24%; }
.pg-fc-folder .tbl.perm col.c-notes { width: 14%; }
.pg-fc-folder .tbl.perm td { vertical-align: middle; overflow-wrap: anywhere; }
.pg-fc-folder .tbl.perm td.nowrap { overflow-wrap: normal; }
.pg-fc-folder .tbl.perm tbody tr:last-child td { border-bottom: 1px solid var(--border); }
.pg-fc-folder .tbl.perm tbody:last-child tr:last-child td { border-bottom: 0; }
.pg-fc-folder .tbl.perm tr.sect th { text-align: left; text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 400; color: var(--text); padding: 8px 10px;
  background: color-mix(in srgb, var(--accent) 9%, var(--surface)); border-top: 2px solid var(--border); }
.pg-fc-folder .tbl.perm tr.sect .sech { margin: 0; }
.pg-fc-folder .tbl.perm tbody + tbody tr.sect th { border-top: 10px solid var(--bg); }
.pg-fc-folder .wmbox { position: relative; padding: 6px; }
.pg-fc-folder .wm-tools { position: absolute; top: 14px; right: 14px; display: grid; gap: 4px; z-index: 1; }
.pg-fc-folder .wm-tools button { width: 30px; height: 30px; padding: 0; font-size: 16px; line-height: 1; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.pg-fc-folder .wm .wm-c-fc-ok { fill: color-mix(in srgb, var(--ok) 45%, var(--map-land, #f4f1ea)); }
.pg-fc-folder .wm .wm-c-fc-pending { fill: color-mix(in srgb, var(--warn) 45%, var(--map-land, #f4f1ea)); }
.pg-fc-folder .wm .wm-c-fc-missing { fill: color-mix(in srgb, var(--danger) 45%, var(--map-land, #f4f1ea)); }
.pg-fc-folder .maplegend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.pg-fc-folder .maplegend span { display: inline-flex; align-items: center; gap: 6px; }
.pg-fc-folder .maplegend .ln { width: 22px; border-top: 3px solid var(--map-route, #c2410c); }
.pg-fc-folder .maplegend .ln.ferry { border-top: 2px dashed var(--map-route-alt, #64748b); }
.pg-fc-folder .maplegend .sw { width: 12px; height: 12px; border-radius: 3px; }
.pg-fc-folder .mclist { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pg-fc-folder .mc { font-size: 12.5px; padding: 1px 9px; border-radius: 999px; }
.pg-fc-folder .mc-ok { background: color-mix(in srgb, var(--ok) 45%, var(--map-land, #f4f1ea)); }
.pg-fc-folder .mc-pending { background: color-mix(in srgb, var(--warn) 45%, var(--map-land, #f4f1ea)); }
.pg-fc-folder .mc-missing { background: color-mix(in srgb, var(--danger) 45%, var(--map-land, #f4f1ea)); }
.pg-fc-folder .mclist .mc { color: var(--text); }
.pg-fc-folder .dcard li .fix { margin-left: auto; flex: none; align-self: center; }
.pg-fc-folder .dcard .ct a { color: inherit; }
.pg-fc-folder .dcard .ct a:hover { color: var(--accent); }
.pg-fc-folder .bd { font-size: 9px; margin-left: 5px; vertical-align: 2px; cursor: help; }
.pg-fc-folder .bd.on { color: var(--ok); }
.pg-fc-folder .bd.off { color: var(--muted); }
.pg-fc-folder .tm[title] { cursor: help; text-decoration: underline dotted color-mix(in srgb, var(--muted) 55%, transparent); text-underline-offset: 3px; }
.pg-fc-folder .tm .moon { margin-left: 3px; font-size: 11px; color: var(--muted); }
.pg-fc-folder .tbl.perm td.ie { cursor: text; }
.pg-fc-folder .tbl.perm td.ie:hover, .pg-fc-folder .tbl.perm td.ie:focus-visible { outline: 1px dashed color-mix(in srgb, var(--accent) 65%, transparent); outline-offset: -3px; }
.pg-fc-folder .tbl.perm td.ie input { width: 100%; min-width: 0; font: inherit; padding: 2px 4px; border: 1px solid var(--accent); border-radius: 4px; background: var(--surface); color: var(--text); }
.pg-fc-folder .tbl.perm td.saving { opacity: .5; }
.pg-fc-folder .htools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.pg-fc-folder .htools input[type=search], .pg-fc-folder .htools select { padding: 6px 9px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; }
.pg-fc-folder .htools input[type=search] { min-width: 220px; }
.pg-fc-folder .hmsg .hp { font-weight: 600; }
.pg-fc-folder .hmsg .hd { display: grid; gap: 3px; margin-top: 3px; }
.pg-fc-folder .hmsg .hf b { margin-right: 4px; }
.pg-fc-folder .hmsg del { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); white-space: pre-wrap; }
.pg-fc-folder .hmsg ins { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); text-decoration: none; white-space: pre-wrap; }
.pg-fc-folder .hmsg .ln { display: block; padding: 0 4px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.pg-fc-folder .hmsg del.ln { text-decoration: none; }
.pg-fc-folder #fc-toast { position: fixed; left: 50%; bottom: 22px; z-index: 100; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  background: var(--text); color: var(--surface); padding: 8px 16px; border-radius: 8px; font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.pg-fc-folder #fc-toast.show { opacity: 1; transform: translate(-50%, 0); }
.pg-fc-folder #fc-toast.bad { background: var(--danger); color: #fff; }
@media (prefers-reduced-motion: reduce) {
.pg-fc-folder #fc-toast { transition: none; }
 }
@media (max-width: 700px) {
.pg-fc-folder .twrap { overflow-x: visible; }
.pg-fc-folder .tbl.stack, .pg-fc-folder .tbl.stack tbody, .pg-fc-folder .tbl.stack tr, .pg-fc-folder .tbl.stack td { display: block; width: auto; }
.pg-fc-folder .tbl.stack thead, .pg-fc-folder .tbl.stack tr.cols, .pg-fc-folder .tbl.stack colgroup { display: none; }
.pg-fc-folder .tbl.stack tr { padding: 6px 0; border-bottom: 1px solid var(--border); }
.pg-fc-folder .tbl.stack tr:last-child { border-bottom: 0; }
.pg-fc-folder .tbl.stack td { display: flex; gap: 10px; border: 0; padding: 2px 10px; min-width: 0; }
.pg-fc-folder .tbl.stack td[data-label]::before { content: attr(data-label); flex: 0 0 92px; color: var(--muted); font-size: 12px; padding-top: 1px; }
.pg-fc-folder .tbl.stack td > * { min-width: 0; }
.pg-fc-folder .tbl.perm { min-width: 0; table-layout: auto; }
.pg-fc-folder .tbl.perm tr.sect, .pg-fc-folder .tbl.perm tr.sect th { display: block; }
.pg-fc-folder .tbl.apt td { min-width: 0; }
.pg-fc-folder .htools input[type=search] { min-width: 0; flex: 1; }

}



/* ==== pages/fc-team.css ==== */
.pg-fc-team .phead { margin-bottom: 18px; }
.pg-fc-team .rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.pg-fc-team .role { padding: 14px 16px; }
.pg-fc-team .rh { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.pg-fc-team .rn { flex: 1; font-weight: 600; }
.pg-fc-team .role ul { margin: 0; padding-left: 18px; font-size: 14px; display: grid; gap: 3px; }
.pg-fc-team .role li.dis { color: var(--muted); text-decoration: line-through; }
.pg-fc-team .small { font-size: 13px; }
.pg-fc-team .nowrap { white-space: nowrap; }
.pg-fc-team .h2 { font-size: 1.15rem; margin: 28px 0 10px; }



/* ==== pages/handover.css ==== */
.pg-handover .ho-title { margin: 0 0 8px; font-size: 1.2rem; }
.pg-handover .ho-error { color: var(--danger); font-size: 1.1rem; }
.pg-handover .ho-warn { max-width: 550px; border: 1px solid var(--border); padding: 6px 10px; }
.pg-handover .ho-duty { border-collapse: collapse; margin-bottom: 8px; font-size: 13px; }
.pg-handover .ho-duty td { border: 1px solid var(--border); padding: 2px 8px; background: var(--surface); }
.pg-handover .ho-date { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; border: 1px solid var(--border); padding: 4px 10px 8px; margin: 0 0 10px; }
.pg-handover .ho-date select { width: auto; }
.pg-handover .btnlink { display: inline-block; padding: 2px 10px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); text-decoration: none; }
.pg-handover .ho-board { overflow-x: auto; max-width: 100%; }
.pg-handover .ho-board img { display: block; max-width: none; background: #fff; }
.pg-handover .ho-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 6px 0; }
.pg-handover .ho-text { font: 13px/1.35 "Courier New", Courier, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.pg-handover .ho-regs { margin-bottom: 6px; }
.pg-handover .ho-regs a { margin-right: 6px; }
.pg-handover .ho-reg { color: inherit; scroll-margin-top: 60px; }
.pg-handover textarea.ho-edit { width: 100%; max-width: 1100px; font: 13px/1.35 "Courier New", Courier, monospace; padding: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.pg-handover .small { font-size: 12.5px; }
.pg-handover .muted { color: var(--muted); }
.pg-handover .ho-unk { color: var(--danger); text-decoration: underline wavy var(--danger); cursor: help; }



/* ==== pages/inv.css ==== */
.pg-inv .phead { margin-bottom: 14px; }
.pg-inv .jhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.pg-inv .jhead h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pg-inv .jhead h1 .chip { font-size: 13px; }
.pg-inv .crumbs { font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.pg-inv .stat .cur { font-size: 15px; color: var(--muted); font-weight: 600; }
.pg-inv .sec { margin-bottom: 18px; }
.pg-inv .sh { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.pg-inv .sh h2, .pg-inv .jgrid h2, .pg-inv .sec > h2 { margin: 0; font-size: 1.05rem; }
.pg-inv .jgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-bottom: 18px; align-items: start; }
.pg-inv .jgrid h2 { margin-bottom: 10px; }
.pg-inv .kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 5px 14px; margin: 0; font-size: 14px; }
.pg-inv .kv dt { color: var(--muted); }
.pg-inv .kv dd { margin: 0; overflow-wrap: anywhere; }
.pg-inv .files { margin: 0; padding-left: 18px; font-size: 14px; }
.pg-inv .files li { margin: 3px 0; overflow-wrap: anywhere; }
.pg-inv .desc { margin: 8px 0 0; }
.pg-inv .docs .sh { margin-bottom: 10px; }
.pg-inv .docs .grow { flex: 1; }
.pg-inv .docs select { max-width: 60%; padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; font-size: 14px; }
.pg-inv .dochead { display: flex; gap: 14px 24px; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.pg-inv .dochead > div:first-child { flex: 1 1 320px; min-width: 0; }
.pg-inv .dochead .files { margin-top: 4px; }
.pg-inv .nofiles { margin: 4px 0 0; }
.pg-inv .fdel { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 4px; font-size: 13px; }
.pg-inv .fdel:hover, .pg-inv .fdel.armed { color: var(--danger); }
.pg-inv .fdel.armed { font-weight: 700; }
.pg-inv .drop { flex: 0 1 340px; border: 1.5px dashed var(--border); border-radius: 10px; padding: 16px; text-align: center; background: var(--surface); transition: border-color .15s, background .15s; }
.pg-inv .drop.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
body.pg-inv.dragging .docs iframe { pointer-events: none; }
.pg-inv .upmsg { margin-top: 8px; text-align: left; white-space: pre-line; }
.pg-inv .upmsg .err { color: var(--danger); }
.pg-inv .upmsg .ok { color: var(--ok); }
.pg-inv .pdfbar { border-top: 1px solid var(--border); padding-top: 12px; }
.pg-inv .docs iframe { display: block; width: 100%; height: 85vh; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.pg-inv .warn { color: var(--warn); font-weight: 600; }
.pg-inv .tbl.lines, .pg-inv .tbl.invs { font-size: 13px; }
.pg-inv .tbl.lines td, .pg-inv .tbl.invs td { padding: 5px 8px; vertical-align: top; }
.pg-inv .tbl.lines td.note { min-width: 160px; white-space: pre-wrap; }
.pg-inv .tbl tr.tot td { font-weight: 700; border-top: 2px solid var(--border); }
.pg-inv .lst { font-weight: 600; font-size: 12.5px; padding: 1px 7px; border-radius: 999px; background: var(--chipbg); white-space: nowrap; }
.pg-inv .lst.deb { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.pg-inv .lst.cred { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.pg-inv .lf { margin-top: 3px; font-size: 12.5px; }
.pg-inv .ledit { padding: 1px 8px; }
.pg-inv .tbl.invs th { position: sticky; top: 0; z-index: 1; }
.pg-inv .tbl.invs td.desc { min-width: 220px; }
.pg-inv .tbl.invs td.cn { min-width: 140px; }
.pg-inv .openbal { color: var(--warn); font-weight: 600; }
.pg-inv .overdue { color: var(--danger); }
.pg-inv .curtot { display: flex; gap: 8px 18px; flex-wrap: wrap; margin: 0 0 10px; font-size: 14px; }
.pg-inv .curtot > span { padding: 4px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.pg-inv .msearch { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.pg-inv .msearch label { display: grid; gap: 3px; font-size: 12px; color: var(--muted); }
.pg-inv .msearch input, .pg-inv .msearch select { width: 150px; padding: 6px 9px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; font-size: 14px; }
.pg-inv .msearch label.wide input { width: 280px; max-width: 70vw; }
.pg-inv .msearch a { align-self: center; font-size: 14px; }
.pg-inv .msearch .idbox { margin-left: auto; }
.pg-inv .msearch .idbox input { width: 100px; }
.pg-inv .mnav { display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; margin: 0 0 12px; }
.pg-inv .mnav h2 { margin: 0; font-size: 1.2rem; }
.pg-inv .mhead { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 4px 0 10px; }
.pg-inv .mhead h2 { margin: 0; font-size: 1.2rem; text-align: center; }
.pg-inv .mhead .arrow:last-child { justify-self: end; }
.pg-inv .mhead .arrow { font-size: 14px; }
.pg-inv .stats { margin: 0 0 14px; }
.pg-inv .jwrap { max-height: 75vh; }
.pg-inv details.card summary { cursor: pointer; font-weight: 600; }
.pg-inv details.card .twrap { margin-top: 10px; max-height: 60vh; }
.pg-inv .nowrap { white-space: nowrap; }
.pg-inv .small { font-size: 13px; }
.pg-inv .empty { text-align: center; color: var(--muted); padding: 28px; }
.pg-inv .ititle { margin: 0 0 8px; font-size: 1.35rem; }
.pg-inv table.lt { border-collapse: collapse; font-size: 12.5px; background: var(--surface); }
.pg-inv table.lt th, .pg-inv table.lt td { border: 1px solid var(--border); padding: 2px 5px; vertical-align: top; text-align: left; }
.pg-inv table.lt th { background: var(--th-bg, var(--bg)); font-weight: 700; text-align: center; white-space: nowrap; }
.pg-inv table.lt td.num { text-align: right; font-variant-numeric: tabular-nums; }
.pg-inv table.lt td.pre { white-space: pre-wrap; }
.pg-inv table.lt .cyr { color: var(--danger); }
.pg-inv .iclosed { margin: 0 0 10px; font-weight: 700; font-size: 13.5px; }
.pg-inv .itop { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: flex-start; margin-bottom: 16px; }
.pg-inv .ileft { flex: 0 1 560px; min-width: 0; display: grid; gap: 10px; }
.pg-inv .ihead { width: 100%; }
.pg-inv .ihead td:nth-child(odd) { color: var(--muted); }
.pg-inv .iactions { border: 1px solid var(--border); background: var(--surface); padding: 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pg-inv .iactions a { font-size: 13px; }
.pg-inv .ilife { flex: 1 1 520px; min-width: 0; overflow-x: auto; }
.pg-inv .ilife .ltitle { display: block; margin-bottom: 4px; font-size: 15px; }
.pg-inv .ilife table.lt { width: auto; }
.pg-inv .ilife tr.gap td { border-left: 0; border-right: 0; background: var(--bg); }
.pg-inv .ilife td.ebtn { padding: 1px 3px; }
.pg-inv .ilife .ledit { padding: 0 8px; font-size: 12px; }
.pg-inv .ilife .tip { border-bottom: 1px dotted currentColor; cursor: help; }
.pg-inv .ilife .lf { margin-top: 2px; font-size: 12px; }
.pg-inv .ierr { margin-top: 8px; padding: 5px 8px; background: #ffcccc; color: #000; font-weight: 700; font-size: 13px; }
.pg-inv td.cred { background: #ffcccc !important; color: #000; }
.pg-inv td.cgreen { background: #ccffcc !important; color: #000; }
.pg-inv td.corange { background: #ff9900 !important; color: #000; }
.pg-inv td.cyellow { background: #ffff99 !important; color: #000; }
.pg-inv td.cblue { background: #cce6ff !important; color: #000; }
.pg-inv td.cviolet { background: #cc66ff !important; color: #000; }
.pg-inv td.cdorange { background: #ff6600 !important; color: #000; }
.pg-inv td.cwhite { background: #fff !important; color: #000; }
.pg-inv td.cnoproc { background: #ff0000 !important; color: #fff; }
.pg-inv table.lt td[style*="background"] { color: #000; }
.pg-inv .ilineswrap { margin-bottom: 18px; overflow-x: auto; }
.pg-inv .ilines tr.tot td { font-weight: 700; border-top: 2px solid var(--border); }



/* ==== pages/job.css ==== */
.pg-job .phead { margin-bottom: 14px; }
.pg-job .jhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 24px; flex-wrap: wrap; }
.pg-job .jhead h1 { display: flex; align-items: center; gap: 10px; }
.pg-job .jhead h1 .chip { font-size: 13px; }
.pg-job .crumbs { font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.pg-job .jroute .route { font-size: 15px; }
.pg-job .jdesc { margin: 0 0 4px; font-size: 15px; }
.pg-job .jgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-bottom: 18px; align-items: start; }
.pg-job .jgrid h2, .pg-job .jlegs h2 { margin: 0 0 10px; font-size: 1.05rem; }
.pg-job .kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 5px 14px; margin: 0; font-size: 14px; }
.pg-job .kv dt { color: var(--muted); }
.pg-job .kv dd { margin: 0; overflow-wrap: anywhere; }
.pg-job .sh { display: flex; align-items: baseline; gap: 12px; }
.pg-job .jlegs { margin-bottom: 18px; }
.pg-job .allf summary { cursor: pointer; font-weight: 600; }
.pg-job .allf .kv { margin-top: 10px; font-size: 13px; }
.pg-job .msearch { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.pg-job .msearch label { display: grid; gap: 3px; font-size: 12px; color: var(--muted); }
.pg-job .msearch input { width: 150px; padding: 6px 9px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; font-size: 14px; }
.pg-job .msearch label.wide input { width: 300px; max-width: 70vw; }
.pg-job .msearch input.up { text-transform: uppercase; }
.pg-job .msearch input::placeholder { text-transform: none; }
.pg-job .msearch a { align-self: center; font-size: 14px; }
.pg-job .mnav { display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; margin: 0 0 12px; }
.pg-job .mnav h2 { margin: 0; font-size: 1.2rem; }
.pg-job .mhead { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 4px 0 10px; }
.pg-job .mhead h2 { margin: 0; font-size: 1.2rem; text-align: center; }
.pg-job .mhead .arrow:last-child { justify-self: end; }
.pg-job .mhead .arrow { font-size: 14px; }
.pg-job .stats { margin: 0 0 14px; }
.pg-job .jwrap { max-height: 75vh; }
.pg-job .tbl.jobs, .pg-job .tbl.mvt { font-size: 13px; }
.pg-job .tbl.jobs th { position: sticky; top: 0; z-index: 1; }
.pg-job .tbl.jobs td, .pg-job .tbl.mvt td { padding: 5px 8px; vertical-align: middle; }
.pg-job .tbl.jobs td.desc { min-width: 220px; }
.pg-job .tbl.jobs td.cust { min-width: 140px; }
.pg-job .nowrap { white-space: nowrap; }
.pg-job .small { font-size: 13px; }
.pg-job .empty { text-align: center; color: var(--muted); padding: 28px; }



/* ==== pages/jpp.css ==== */
.pg-jpp .phead { margin-bottom: 12px; }
.pg-jpp .jfind { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 12px; padding: 12px 14px !important; }
.pg-jpp .jfind label { display: grid; gap: 3px; font-size: 12px; color: var(--muted); }
.pg-jpp .jfind input { width: 90px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; text-transform: uppercase; }
.pg-jpp .jfind a, .pg-jpp .jfind #jstate { align-self: center; }
.pg-jpp .jsplit { display: grid; grid-template-columns: minmax(0, 640px) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) {
.pg-jpp .jsplit { grid-template-columns: 1fr; }
 }
.pg-jpp .jleft { position: sticky; top: 60px; max-height: calc(100vh - 80px); overflow: auto; }
.pg-jpp .tbl.jlist, .pg-jpp .tbl.jsum { font-size: 12.5px; width: 100%; }
.pg-jpp .tbl.jlist td, .pg-jpp .tbl.jlist th, .pg-jpp .tbl.jsum td, .pg-jpp .tbl.jsum th { padding: 4px 6px; white-space: nowrap; }
.pg-jpp .tbl.jlist tbody tr { cursor: pointer; }
.pg-jpp .tbl.jlist tbody tr:hover td { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.pg-jpp .tbl.jlist tbody tr.on td { background: color-mix(in srgb, var(--accent) 20%, transparent); }
.pg-jpp .cfpok { color: var(--ok); font-weight: 600; }
.pg-jpp .jhead { display: flex; align-items: baseline; gap: 12px; }
.pg-jpp .jhead h2 { margin: 0 0 8px; font-size: 1.15rem; }
.pg-jpp .jacts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 10px 0 12px; }
.pg-jpp .jright h3 { margin: 16px 0 6px; font-size: 1rem; }
.pg-jpp .tbl.bnd { font-size: 12.5px; }
.pg-jpp .tbl.bnd td { vertical-align: top; }
.pg-jpp .tbl.bnd .rte { white-space: normal; min-width: 220px; }
.pg-jpp pre.ofp, .pg-jpp pre.cfmu { font: 11.5px/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre; overflow-x: auto; margin: 0; }
.pg-jpp pre.cfmu { white-space: pre-wrap; max-height: 320px; overflow: auto; }
.pg-jpp .vok { color: var(--ok); }
.pg-jpp .vfail { color: var(--danger); }
.pg-jpp .wmbox { position: relative; padding: 0 !important; overflow: hidden; }
.pg-jpp .wmbox svg { display: block; width: 100%; height: auto; }
.pg-jpp .wm-tools { position: absolute; right: 8px; top: 8px; display: flex; flex-direction: column; gap: 4px; z-index: 2; }
.pg-jpp .wm-tools button { width: 30px; height: 30px; padding: 0; }
.pg-jpp .dlist ul { columns: 3 220px; margin: 0; padding-left: 18px; }
.pg-jpp .dlist li { margin: 3px 0; break-inside: avoid; }
.pg-jpp .dbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; }
.pg-jpp .dbar .sep { width: 12px; }
.pg-jpp .dbar .mv { display: flex; gap: 6px; align-items: center; font-size: 14px; }
.pg-jpp .dbar select { padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); }
.pg-jpp .tbl.dfl { font-size: 13px; }
.pg-jpp .tbl.dfl td, .pg-jpp .tbl.dfl th { padding: 4px 8px; white-space: nowrap; }
.pg-jpp textarea.imptext { width: 100%; max-width: 760px; font: 13px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 8px;
  border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); margin-bottom: 8px; }



/* ==== pages/login.css ==== */
.pg-login .login { max-width: 360px; margin: 8vh auto 0; display: grid; gap: 14px; }
.pg-login .login label { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.pg-login .login .hint { font-size: 13px; color: var(--muted); margin: -6px 0 0; }
.pg-login h1 { margin: 0; }
.pg-login .tfa { max-width: 400px; }
.pg-login .tfa .step { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.pg-login .tfa .step label { color: var(--muted); font-size: 14px; }
.pg-login .tfa .row { display: flex; gap: 8px; }
.pg-login .tfa .code { flex: 1; min-width: 0; font-size: 20px; letter-spacing: 4px; text-align: center; padding: 6px 10px;
  border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); }
.pg-login .tfa .sends button { text-align: left; }
.pg-login .tfa .sends .to { font-weight: 600; white-space: nowrap; }
.pg-login .tfa .msg.ok { color: var(--ok, #2e7d32); }
.pg-login .tfa .other { margin: 4px 0 0; }
.pg-login .login .logo { justify-self: center; width: 110px; height: 110px; margin: 0 0 -4px; border-radius: 50%; background: #fff; }
.pg-login .login h1 { text-align: center; }
.pg-login .login > .hint:first-of-type { text-align: center; }



/* ==== pages/mvt.css ==== */
.pg-mvt .phead { margin-bottom: 14px; }
.pg-mvt .msearch { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.pg-mvt .msearch label { display: grid; gap: 3px; font-size: 12px; color: var(--muted); }
.pg-mvt .msearch input {
  width: 150px; padding: 6px 9px;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--text);
  font: inherit; font-size: 14px;
  text-transform: uppercase;                                                                 
}
.pg-mvt .msearch input::placeholder { text-transform: none; }
.pg-mvt .msearch a { align-self: center; font-size: 14px; }
.pg-mvt .mnav { display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; margin: 0 0 12px; }
.pg-mvt .mnav h2 { margin: 0; font-size: 1.2rem; }
.pg-mvt .mhead { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 4px 0 10px; }
.pg-mvt .mhead h2 { margin: 0; font-size: 1.2rem; text-align: center; }
.pg-mvt .mhead .arrow { font-size: 14px; }
.pg-mvt .mhead .arrow:last-child { justify-self: end; }
.pg-mvt .stats { margin: 0 0 12px; }
.pg-mvt .mvtwrap { max-height: 75vh; }
.pg-mvt .tbl.mvt { font-size: 13px; }
.pg-mvt .tbl.mvt th { position: sticky; top: 0; z-index: 1; }
.pg-mvt .tbl.mvt td { padding: 5px 8px; vertical-align: middle; }
.pg-mvt .tbl.mvt tr.newday td { border-top: 2px solid var(--border); }
.pg-mvt .nowrap { white-space: nowrap; }
.pg-mvt .small { font-size: 13px; }
.pg-mvt .empty { text-align: center; color: var(--muted); padding: 28px; }
                         


/* ==== pages/ops-aftn.css ==== */
.pg-ops-aftn .phead { margin-bottom: 12px; }
.pg-ops-aftn .asearch { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; padding: 12px 14px !important; }
.pg-ops-aftn .asearch label { display: grid; gap: 3px; font-size: 12px; color: var(--muted); }
.pg-ops-aftn .asearch input { width: 420px; max-width: 70vw; padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; }
.pg-ops-aftn .asearch a { align-self: center; font-size: 14px; }
.pg-ops-aftn .aday { display: flex; align-items: stretch; gap: 6px; flex-wrap: wrap; margin: 0 0 6px; }
.pg-ops-aftn .aday form { display: contents; }
.pg-ops-aftn .aday input[type=date] { padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; font-weight: 600; }
.pg-ops-aftn .aday .ymarrow { display: inline-grid; place-items: center; min-width: 34px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); font-size: 12px; text-decoration: none; }
.pg-ops-aftn .aday a.ymarrow:hover { border-color: var(--accent); color: var(--accent); }
.pg-ops-aftn .aday .ymarrow.off { opacity: .35; }
.pg-ops-aftn .aday h2 { margin: 0 0 0 12px; font-size: 1.2rem; align-self: center; }
.pg-ops-aftn .aday > a.small { align-self: center; margin-left: 6px; }
.pg-ops-aftn .ares { font-size: 1.15rem; margin: 0 0 6px; }
.pg-ops-aftn .amsg { margin-bottom: 10px; padding: 10px 14px !important; }
.pg-ops-aftn .amsg .ah { font-size: 13.5px; margin-bottom: 6px; display: flex; gap: 6px; flex-wrap: wrap; align-items: baseline; }
.pg-ops-aftn pre.atext { margin: 0; font: 12.5px/1.45 "Courier New", Courier, ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.pg-ops-aftn pre.atext mark { background: color-mix(in srgb, #facc15 60%, transparent); color: inherit; }



/* ==== pages/placeholder.css ==== */
.pg-placeholder .ph { max-width: 560px; margin: 6vh auto 0; display: grid; gap: 10px; }
.pg-placeholder .ph h1 { margin: 0; }
.pg-placeholder .ph p { margin: 0; }
.pg-placeholder .ph .trail { color: var(--muted); font-size: 13px; }
.pg-placeholder .ph .badge { justify-self: start; padding: 3px 10px; border-radius: 999px; background: #fff3cd; color: #7a5b00; font-weight: 600; font-size: 13px; }
.pg-placeholder .ph .btnlink.primary { display: inline-block; padding: 8px 16px; border-radius: 6px; background: var(--accent); color: var(--accent-text); text-decoration: none; }
.pg-placeholder .ph .small { overflow-wrap: anywhere; }



/* ==== pages/pnotices.css ==== */
.pg-pnotices .crumbs { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.pg-pnotices .ptitle { margin: 0 0 10px; font-size: 1.2rem; max-width: 1000px; }
.pg-pnotices table.pfold { width: 800px; max-width: 100%; border: 1px solid var(--border); border-collapse: collapse; font-size: 15px; background: var(--surface); }
.pg-pnotices table.pfold td { padding: 4px 8px; border-bottom: 1px solid var(--border); }
.pg-pnotices table.pfold tr:nth-child(even) td { background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.pg-pnotices table.pfold tr:hover td { background: #ffff99; color: #000; }
.pg-pnotices a.fold { font-weight: 600; }
.pg-pnotices .ptools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.pg-pnotices table.lt { border-collapse: collapse; font-size: 12.5px; background: var(--surface); margin: 6px 0; }
.pg-pnotices table.lt th, .pg-pnotices table.lt td { border: 1px solid var(--border); padding: 3px 6px; vertical-align: top; text-align: left; }
.pg-pnotices table.lt th { background: var(--th-bg, var(--bg)); font-weight: 700; }
.pg-pnotices table.lt td.num { text-align: right; }
.pg-pnotices td.cgreen { background: #ccffcc !important; color: #000; }
.pg-pnotices td.cred { background: #ffcccc !important; color: #000; }
.pg-pnotices td.na { color: var(--muted); }
.pg-pnotices .btnlink { display: inline-block; padding: 3px 10px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); font-size: 13px; text-decoration: none; }
.pg-pnotices .pread { color: var(--ok); font-weight: 600; }
.pg-pnotices .pfav { display: inline-block; background: #ccffcc; color: #000; padding: 3px 8px; border: 1px solid #9c9; }
.pg-pnotices .pembed { display: block; width: 1024px; max-width: 100%; height: 768px; border: 1px solid var(--border); background: #fff; }
.pg-pnotices .pfiles { margin: 10px 0; }
.pg-pnotices .pfname { margin: 8px 0 3px; }
.pg-pnotices .ppdf { display: block; width: 600px; max-width: 100%; height: 800px; border: 1px solid var(--border); background: #fff; }
.pg-pnotices .padmin { border: 1px dashed var(--border); padding: 6px 10px; margin: 12px 0; max-width: 900px; }
.pg-pnotices .padmin summary { cursor: pointer; font-weight: 600; margin: 4px 0; }
.pg-pnotices .pdlg { border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); padding: 14px 18px; }
.pg-pnotices .pdlg input, .pg-pnotices .pdlg textarea { width: 600px; max-width: 70vw; font: inherit; padding: 4px 6px; }
.pg-pnotices .prform fieldset { border: 1px solid var(--border); padding: 6px 12px 10px; }
.pg-pnotices .prcats { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2px 12px; margin: 8px 0; font-size: 13px; max-height: 340px; overflow-y: auto; }
.pg-pnotices .prwrap { overflow: auto; max-height: 75vh; }
.pg-pnotices .prtable th { position: sticky; top: 0; font-size: 11px; font-weight: 600; min-width: 70px; max-width: 160px; vertical-align: bottom; }
.pg-pnotices .prtable td:first-child { position: sticky; left: 0; background: var(--surface); }
.pg-pnotices .prtable td { font-size: 11px; text-align: center; white-space: nowrap; }
.pg-pnotices .nowrap { white-space: nowrap; }
.pg-pnotices .muted { color: var(--muted); }
.pg-pnotices .small { font-size: 12.5px; }
.pg-pnotices .ucount { background: #d00; color: #fff; border-radius: 999px; padding: 0 9px; font-size: .85em; }
.pg-pnotices .pyears { display: flex; flex-wrap: wrap; gap: 8px; }



/* ==== pages/profile.css ==== */
.pg-profile h1 { margin: 0 0 16px; }
.pg-profile h2 { margin: 0 0 10px; font-size: 1.1rem; }
.pg-profile .pgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 16px; align-items: start; }
.pg-profile .card.wide { grid-column: 1 / -1; }
.pg-profile .pkv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 14px; }
.pg-profile .pkv dt { color: var(--muted); }
.pg-profile .pkv dd { margin: 0; }
.pg-profile .code { display: inline-block; font: 600 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 1px 7px; border-radius: 4px; background: var(--chipbg); margin: 0 2px 3px 0; }
.pg-profile .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.pg-profile .muted { color: var(--muted); }
.pg-profile .small { font-size: 12.5px; }
.pg-profile .pform { display: grid; gap: 10px; max-width: 360px; }
.pg-profile .pform label { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.pg-profile .prow { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.pg-profile .themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.pg-profile .theme-card { position: relative; display: grid; gap: 4px; padding: 10px; border: 2px solid var(--border); border-radius: var(--radius, 10px); cursor: pointer; background: var(--surface); }
.pg-profile .theme-card:hover { border-color: var(--muted); }
.pg-profile .theme-card.on { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.pg-profile .theme-card input { position: absolute; opacity: 0; pointer-events: none; }
.pg-profile .theme-card:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.pg-profile .sw { display: grid; grid-template-rows: 14px 1fr; height: 78px; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: var(--bg); }
.pg-profile .sw-bar { background: var(--bar); }
.pg-profile .sw-body { display: grid; place-items: center; padding: 8px; }
.pg-profile .sw-card { width: 100%; height: 100%; display: grid; gap: 4px; align-content: center; padding: 6px 8px; background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius, 10px) / 2); }
.pg-profile .sw-card i { display: block; height: 5px; border-radius: 3px; background: var(--muted); opacity: .5; }
.pg-profile .sw-card i:nth-child(2) { width: 70%; }
.pg-profile .sw-card i.a { width: 40%; background: var(--accent); opacity: 1; }
.pg-profile .card.notices.due { border-color: #d00; box-shadow: 0 0 0 2px rgba(221, 0, 0, .15); }
.pg-profile .ucount { display: inline-block; background: #d00; color: #fff; border-radius: 999px; padding: 0 10px; font-weight: 700; }
.pg-profile .btnp { display: inline-block; padding: 6px 14px; border-radius: 6px; background: #d00; color: #fff !important; font-weight: 600; text-decoration: none; }



/* ==== pages/reports-uop.css ==== */
.pg-reports-uop .uopbar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 14px; }
.pg-reports-uop table.lt { border-collapse: collapse; font-size: 12.5px; background: var(--surface); }
.pg-reports-uop table.lt th, .pg-reports-uop table.lt td { border: 1px solid var(--border); padding: 3px 6px; vertical-align: top; text-align: left; }
.pg-reports-uop table.lt th { background: var(--th-bg, var(--bg)); font-weight: 600; text-align: center; vertical-align: middle; }
.pg-reports-uop table.lt td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pg-reports-uop table.uop td { min-width: 0; }
.pg-reports-uop .muted { color: var(--muted); }
.pg-reports-uop .small { font-size: 13px; }



/* ==== pages/resource.css ==== */
.pg-resource .phead { margin-bottom: 10px; }
.pg-resource .rlinks { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 12px; }
.pg-resource table.r124 { border-collapse: collapse; background: #fff; color: #000; font-size: 12px; }
.pg-resource table.r124 td { padding: 2px 4px; text-align: center; white-space: nowrap; }
.pg-resource table.r124 td.fr { border: 1px solid #000; }
.pg-resource table.r124 .b { font-weight: 700; }
.pg-resource table.r124 .red { color: #d00; }
.pg-resource table.r124 .bgyellow { background: #ff0; }
.pg-resource table.r124 .bgred { background: #f33; }
.pg-resource table.r124 .motorm { background: #ccffcc; }
.pg-resource table.r124 .motorp { background: #ffff99; }
.pg-resource table.r124 .center { text-align: center; }
.pg-resource table.r124 a { color: #00e; }
.pg-resource table.r124 button.rv { border: 0; background: none; padding: 0; font: inherit; color: #00e; text-decoration: underline; cursor: pointer; }
.pg-resource textarea.mtext { width: 100%; max-width: 520px; font: 13px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); }
.pg-resource table.r74 th.fr { border: 1px solid #000; padding: 2px 4px; font-weight: 400; background: #eef2ff; white-space: normal; max-width: 120px; }
.pg-resource table.r74 td.num { text-align: right; }
.pg-resource table.r74 button.rv.red { color: #d00; }



/* ==== pages/source.css ==== */
.pg-source .files { width: 260px; flex: none; display: flex; flex-direction: column; border-right: 1px solid var(--border); background: var(--surface); }
.pg-source .files-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.pg-source .files ul { list-style: none; margin: 0; padding: 6px; overflow: auto; flex: 1; }
.pg-source .files li button { width: 100%; text-align: left; border: 0; background: none; padding: 5px 8px; border-radius: 5px;
  font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-source .files li button:hover { background: var(--bg); }
.pg-source .files li button.active { background: var(--accent); color: var(--accent-text); }
.pg-source .files .dir { opacity: .6; }
.pg-source .editor { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pg-source .toolbar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--surface); flex-wrap: wrap; }
.pg-source .toolbar .fname { font: 600 14px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.pg-source .toolbar .dirty { color: var(--danger); font-size: 13px; }
.pg-source .toolbar #hist { font-size: 14px; }
.pg-source .toolbar .msg { flex: 1; min-width: 120px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-source .errbox { display: none; margin: 0; padding: 10px 12px; max-height: 30vh; overflow: auto; background: var(--bg); color: var(--danger);
  border-bottom: 1px solid var(--border); font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; }
.pg-source .errbox.show { display: block; }
.pg-source #cm { flex: 1; min-height: 0; }
.pg-source #cm .CodeMirror { height: 100%; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.pg-source .hint { font-size: 12px; color: var(--muted); padding: 8px 12px; border-top: 1px solid var(--border); }
@media (max-width: 700px) {
.pg-source main.full { flex-direction: column; }
.pg-source .files { width: auto; max-height: 28vh; border-right: 0; border-bottom: 1px solid var(--border); }

}
.pg-source .files-find { position: relative; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.pg-source .files-find input { width: 100%; box-sizing: border-box; padding: 6px 54px 6px 9px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); font: 13px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.pg-source .files-find .findn { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 11.5px; color: var(--muted); pointer-events: none; }
.pg-source .files mark { background: color-mix(in srgb, #facc15 55%, transparent); color: inherit; border-radius: 2px; }
.pg-source .files li button.active mark { background: rgba(255,255,255,.35); }
.pg-source .files li.nofile { padding: 8px; color: var(--muted); font-size: 13px; }
.pg-source .CodeMirror-dialog { background: var(--surface); color: var(--text); font: 13px system-ui, sans-serif; padding: 6px 10px; }
.pg-source .CodeMirror-dialog-top { border-bottom: 1px solid var(--border); }
.pg-source .CodeMirror-dialog input { width: 22em; padding: 3px 6px; border: 1px solid var(--border); border-radius: 5px; background: var(--bg); color: var(--text); font: 13px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.pg-source .CodeMirror-dialog button { padding: 2px 10px; font-size: 13px; }
.pg-source .CodeMirror-dialog .CodeMirror-search-hint { color: var(--muted); margin-left: 8px; }
.pg-source .cm-searching { background: rgba(250, 204, 21, .45); }
.pg-source .CodeMirror-search-match { background: #f59e0b; border-top: 1px solid #f59e0b; border-bottom: 1px solid #f59e0b; opacity: .7; }



/* ==== pages/sqltest.css ==== */
.pg-sqltest .bar { display: flex; gap: 8px 16px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; font-size: 14px; }
.pg-sqltest .bar .q { font-size: 13px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px; }
.pg-sqltest .bar .toggle { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.pg-sqltest .muted { color: var(--muted); }
.pg-sqltest pre.err { white-space: pre-wrap; color: var(--danger); font-size: 13px; }



/* ==== pages/test.css ==== */
.pg-test .hello { display: grid; place-items: center; min-height: 60vh; }
.pg-test .hello h1 { font-size: clamp(2.2rem, 8vw, 4rem); margin: 0; }



/* ==== pages/zip.css ==== */
.pg-zip .ctitle { margin: 0 0 8px; font-size: 1.3rem; }
.pg-zip .znav, .pg-zip .zbtns { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 0 0 12px; }
.pg-zip .twrap { overflow-x: auto; }
.pg-zip table.lt { border-collapse: collapse; font-size: 12.5px; background: var(--surface); }
.pg-zip table.lt th, .pg-zip table.lt td { border: 1px solid var(--border); padding: 2px 6px; vertical-align: top; text-align: left; }
.pg-zip table.lt th { background: var(--th-bg, var(--bg)); font-weight: 700; white-space: nowrap; }
.pg-zip .nowrap { white-space: nowrap; }
.pg-zip .num { text-align: right; }
.pg-zip .small { font-size: 12.5px; }
.pg-zip .muted { color: var(--muted); }
.pg-zip td.zrep { background: #ffff99; color: #000; }
.pg-zip td.zok { background: #8fe08f; color: #000; }
.pg-zip table.zfleet { border-collapse: collapse; margin-bottom: 10px; }
.pg-zip table.zfleet td { padding: 4px; vertical-align: top; }
.pg-zip .zplane { width: 122px; height: 119px; position: relative; }
.pg-zip .zplane img { width: 122px; height: 119px; display: block; }
.pg-zip .ztag { position: absolute; transform: translateX(-50%); white-space: nowrap; background: #ccc; border: 1px solid #000; padding: 1px; opacity: .9; font: 7px verdana, arial, sans-serif; z-index: 2; }
.pg-zip .ztag a { color: #000; text-decoration: none; }
.pg-zip .ztag a.on { font-weight: 700; text-decoration: underline; }
.pg-zip .tag1 { left: 33px; top: 67px; }
.pg-zip .tag2 { left: 40px; top: 40px; }
.pg-zip .tag3 { left: 80px; top: 40px; }
.pg-zip .tag4 { left: 87px; top: 67px; }
.pg-zip .tag10 { left: 60px; top: 9px; font-size: 9px; }
.pg-zip .tag20 { left: 60px; top: 85px; font-size: 9px; }
.pg-zip .tag30 { left: 60px; top: 105px; font-size: 9px; }
.pg-zip td.zsum { white-space: nowrap; font: 9px verdana, arial, sans-serif; }
.pg-zip .zlocs { line-height: 2; }
.pg-zip .zlocs a { display: inline-block; margin-right: 8px; }
.pg-zip .zlocs a.on, .pg-zip .zsum a.on { font-weight: 700; }
.pg-zip .zsearch { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 4px 0 8px; }
.pg-zip .zsearch input[type=text] { width: 350px; max-width: 80vw; padding: 5px 8px; }
.pg-zip .zsearch select { padding: 5px; max-width: 220px; }
.pg-zip .zfilter { width: 350px; max-width: 80vw; padding: 5px 8px; }
.pg-zip .zitem { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-start; }
.pg-zip .zfiles iframe { width: 600px; max-width: 90vw; height: 800px; border: 1px solid var(--border); }
.pg-zip .zfiles p { margin: 0 0 4px; }
.pg-zip .btnlink { display: inline-block; padding: 2px 10px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); text-decoration: none; font-size: 13px; }
.pg-zip .zform input[type=text] { width: 300px; max-width: 70vw; padding: 4px 6px; }
.pg-zip .zform select { max-width: 70vw; padding: 4px; }
.pg-zip .znum { width: 110px; padding: 4px 6px; }
.pg-zip .zh2 { font-size: 1.05rem; margin: 16px 0 6px; }
.pg-zip button.linkbtn { padding: 0 6px; font-size: 12px; }
.pg-zip .msg.err { color: var(--danger); }
.pg-zip .msg.ok { color: #2e7d32; }


