/* FLT platform shell (Phase 0, D9) — the one bar that sits on top of every page:
   fltortho.com/login (brand only), /home, po.fltortho.com, commissions.fltortho.com, bo.fltortho.com.
   Theme lifted verbatim from the commissions / PO portals (bg #0c0f14, ink #e8eef7, muted #9fb0c7, gold #d6a73a).
   Served from Pages as /platform/platform.css?v=N. Host pages add this file + platform.js and nothing else changes
   until platform.js mounts (every override below is scoped to body.fp-mounted). */
:root{
  --fp-h:48px;
  --fp-bg:#0c0f14; --fp-bar:rgba(17,22,30,.96); --fp-pop:#151b25;
  --fp-ink:#e8eef7; --fp-muted:#9fb0c7; --fp-dim:#718198; --fp-soft:#c6d2e3;
  --fp-gold:#d6a73a; --fp-gold-hover:#ecc152; --fp-gold-ink:#10151d; --fp-gold-dim:#5f4818;
  --fp-input:#10151d; --fp-border:#303846; --fp-line:rgba(255,255,255,.08); --fp-line-strong:rgba(255,255,255,.13);
  --fp-card:rgba(255,255,255,.04);
  --fp-font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
/* Shaded tiles + drop-downs (Brian 2026-10-31, TG 63361: from two, three feet a thin grey line was the only thing telling a
   drop-down from the page). One tile fill per theme, >= 8% luminance from the page under it, a 2px edge and a soft shadow;
   hover = one step darker edge. Warm Porcelain sets its own inside .ops-sheet (door/ops-live.css). scripts/check-site-shading.py */
:root{--sh-tile:#4d5a6d;--sh-tile-line:#93a1b6;--sh-tile-line2:#c3cddb;--sh-tile-muted:#d0d9e5;--sh-tile-shadow:0 6px 18px rgba(0,0,0,.45)}
html[data-theme=light]{--sh-tile:#e1e7ef;--sh-tile-line:#8fa0b8;--sh-tile-line2:#5d6f88;--sh-tile-muted:#45566e;--sh-tile-shadow:0 4px 14px rgba(24,40,61,.16)}
/* the top bar stays dark in every theme, so its drop-downs keep a dark tile. Brian 2026-11-07 07:01 (TG 65508): the slate
   blue-grey tile with its light trim "doesn't match the website at all"; the site is navy + gold, so the bar's drop-downs are a
   navy tile one step above the bar with a 2px gold edge (gold-hover on hover) and the deep shadow; the text stays bright
   (readability kept from the 10/31 fix). The gold edge, not the fill, is what tells the drop-down from the page from three feet. */
.fp-bar{--sh-tile:#1e2634;--sh-tile-line:#b8902f;--sh-tile-line2:#ecc152;--sh-tile-muted:#b7c3d4;--sh-tile-shadow:0 20px 55px rgba(0,0,0,.6)}
.fp-bar .fp-pop{--fp-line:rgba(214,167,58,.22);--fp-line-strong:rgba(214,167,58,.34)}
.fp-bar .fp-pop .fp-block{background:rgba(0,0,0,.22)}

/* ---------- the bar ---------- */
.fp-bar{position:sticky;top:0;z-index:25;display:flex;align-items:center;gap:4px;height:var(--fp-h);
  padding:0 12px 0 16px;background:var(--fp-bar);border-bottom:1px solid var(--fp-line);backdrop-filter:blur(8px);
  font-family:var(--fp-font);font-size:13px;line-height:1.2;color:var(--fp-ink);box-sizing:border-box;margin:0}
.fp-bar *,.fp-bar *::before,.fp-bar *::after{box-sizing:border-box}
.fp-bar a{text-decoration:none;color:inherit}
.fp-brand{display:inline-flex;align-items:center;flex:0 0 auto;margin-right:10px;font-weight:700;font-size:15px;
  letter-spacing:-.01em;white-space:nowrap;color:var(--fp-ink)}
.fp-brand em{font-style:normal;color:var(--fp-gold);margin-left:5px}
.fp-brand:hover em{color:var(--fp-gold-hover)}
.fp-nav{display:flex;align-items:center;gap:4px;flex:1 1 auto;min-width:0}
.fp-right{display:flex;align-items:center;gap:4px;flex:0 0 auto;margin-left:auto}

/* top-level items and drop-down handles share one look */
.fp-nav>a,.fp-menu>summary{display:inline-flex;align-items:center;gap:7px;padding:7px 11px;border-radius:7px;
  color:var(--fp-muted);font-size:13px;font-weight:600;white-space:nowrap;cursor:pointer;user-select:none;list-style:none;
  background:transparent;border:0;margin:0;line-height:1.2}
.fp-menu>summary::-webkit-details-marker{display:none}
.fp-menu>summary::marker{content:""}
.fp-nav>a:hover,.fp-menu>summary:hover,.fp-menu[open]>summary{color:#fff;background:rgba(255,255,255,.07)}
/* The page you are on: white text + a thin gold underline, the same on every bar item. No filled gold box (Brian
   2026-10-15 11:32: the yellow box around Cases "stays there even when you click off it"). data-callout only keeps
   Cases visible beside Menu on phones. */
.fp-nav>a.fp-on,.fp-menu.fp-on>summary{color:#fff;background:transparent;box-shadow:inset 0 -2px 0 var(--fp-gold)}
.fp-nav>a.fp-on:hover,.fp-menu.fp-on>summary:hover{background:rgba(255,255,255,.07)}
.fp-caret{display:none} /* Brian 2026-10-17 22:19: no drop-down carets on the top bar; menus still open on click */
.fp-menu[open]>summary .fp-caret{transform:rotate(180deg)}
.fp-menu.fp-on>summary .fp-caret{color:var(--fp-dim)}
/* No sub-page name beside a top button (Brian 2026-10-21 21:37, TG 60334): the gold underline above is the only "you are here". */

/* drop-downs */
.fp-menu{position:relative;margin:0;padding:0}
.fp-pop{position:absolute;z-index:30;top:calc(100% + 8px);left:0;display:grid;min-width:220px;padding:7px;margin:0;
  max-height:calc(100vh - var(--fp-h) - 16px);overflow-y:auto;overscroll-behavior:contain;
  background:var(--sh-tile);border:2px solid var(--sh-tile-line);border-radius:10px;box-shadow:var(--sh-tile-shadow);
  --fp-muted:var(--sh-tile-muted);--fp-dim:#b4c0d0;--fp-line:rgba(255,255,255,.18);--fp-line-strong:rgba(255,255,255,.3)}
.fp-menu[open]>.fp-pop:hover{border-color:var(--sh-tile-line2)}
.fp-pop.fp-pop-right{left:auto;right:0;min-width:190px}
.fp-pop a{display:block;padding:9px 11px;border-radius:7px;color:var(--fp-ink);font-size:13px;font-weight:500;white-space:nowrap}
.fp-pop a:hover{color:#fff;background:rgba(255,255,255,.14)}
.fp-pop a.fp-on,.fp-pop a.fp-on:hover{color:var(--fp-gold-ink);background:var(--fp-gold);font-weight:700}
.fp-pop .fp-sep{height:1px;margin:6px 4px;background:var(--fp-line)}
/* My Business (Brian 2026-10-21 09:27): three blocks, each with a thin quiet border, not bold */
.fp-pop .fp-block{margin:4px 1px;padding:3px;border:2px solid var(--fp-line-strong);border-radius:8px;background:rgba(0,0,0,.16)}
.fp-pop .fp-block:first-child{margin-top:1px}
.fp-pop .fp-block:last-child{margin-bottom:1px}
/* A group heading is a quiet grey label, never gold: in a drop-down only the page you are on is gold (Brian, 2026-10-09: gold
   headings and a gold current page looked alike). */
.fp-pop .fp-head{padding:9px 11px 4px;font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--fp-muted);font-weight:700;cursor:default;user-select:none}
.fp-pop .fp-who{padding:8px 11px 6px;color:var(--fp-muted);font-size:12px;line-height:1.45;white-space:nowrap}
.fp-pop .fp-who b{display:block;color:var(--fp-ink);font-size:13px}
.fp-pop .fp-who span{display:block;color:var(--fp-soft);font-size:12px;font-weight:600}
.fp-pop a.fp-signout{color:#f0b7b2}
.fp-pop a.fp-signout:hover{background:rgba(218,54,51,.16);color:#ffd2cf}

/* the person on the right */
.fp-user>summary{font-weight:600;color:var(--fp-ink)}
.fp-user>summary .fp-avatar{display:inline-grid;place-items:center;width:24px;height:24px;border-radius:50%;
  background:var(--fp-gold);color:var(--fp-gold-ink);font-size:11px;font-weight:800;letter-spacing:0}
.fp-user-name{max-width:180px;overflow:hidden;text-overflow:ellipsis}

/* ---------- the line (Brian, 2026-10-09): left = what a rep sees, right = admin only ----------
   A clear vertical divider between the two sides, only for people who have a right side. */
.fp-line{flex:0 0 auto;align-self:center;width:2px;height:26px;margin:0 10px;border-radius:2px;background:rgba(232,238,247,.42);box-shadow:0 0 0 1px rgba(0,0,0,.25)}
/* ---------- one row, always (Brian 2026-10-19: a laptop showed the admin side wrapped onto a second and third row) ----------
   The bar never wraps. platform.js fit() hides whatever does not fit (fp-hid, from the right end inward) and shows those
   links inside the More ▾ drop-down (fp-more, shown only while it holds something). */
.fp-nav{flex-wrap:nowrap}
.fp-nav>.fp-hid{display:none!important}
.fp-nav>.fp-more{display:none}
.fp-nav>.fp-more.fp-show{display:block}
/* the phone Menu: the same line, drawn across */
.fp-pop .fp-line-h{display:flex;align-items:center;gap:8px;margin:8px 4px 2px;color:var(--fp-muted);font-size:10px;letter-spacing:.14em;text-transform:uppercase;font-weight:700}
.fp-pop .fp-line-h::before,.fp-pop .fp-line-h::after{content:"";flex:1 1 auto;height:2px;background:rgba(232,238,247,.42);border-radius:2px}

/* compact: one "Menu" drop-down carries every link on narrow screens */
.fp-all{display:none}
@media (max-width:760px){
  .fp-bar{padding:0 8px 0 12px}
  .fp-brand{margin-right:4px}
  /* phone-44 */
  .fp-brand,.fp-all>summary,.fp-user>summary{min-height:44px;padding-left:10px;padding-right:10px}
  .fp-pop a{min-height:44px;display:flex;align-items:center}
  .fp-nav>a,.fp-nav>.fp-menu,.fp-nav>.fp-line,.fp-nav>.fp-more.fp-show{display:none}
  .fp-nav>.fp-all{display:block;margin-left:auto}
  /* Phones keep Cases beside Menu (outlined) instead of only inside it; the bar stays 48px. */
  .fp-nav>a[data-callout]{display:inline-flex;min-height:36px;margin-left:auto}
  .fp-nav>a[data-callout]~.fp-all{margin-left:0}
  .fp-user-name{display:none}
  .fp-pop{min-width:200px}
}

/* ---------- host pages ----------
   Nothing here applies until platform.js has mounted (body.fp-mounted), so a missing script leaves the page as it was.
   Commissions + PO board (Brian, 2026-10-03): the portal's own top bar is gone — the platform bar's drop-down mirrors every
   view and action it had (platform.js hostGroups), and its hidden links still switch the view in place. */
body.fp-mounted.fp-host-po .topbar,
body.fp-mounted.fp-host-commissions .topbar{display:none!important}
/* Back office (and anything else still keeping its own bar): it becomes a sub-nav under the platform bar. */
body.fp-mounted .topbar{top:var(--fp-h)}
body.fp-mounted .topbar .portal-switch,
body.fp-mounted .topbar .portal-link,
body.fp-mounted .topbar .logout,
body.fp-mounted .topbar #logout-btn{display:none!important}
body.fp-mounted .topbar .brand{font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--fp-muted);font-weight:700}
body.fp-mounted .topbar .brand span{color:var(--fp-gold)}
body.fp-mounted .topbar .who{opacity:.85}
/* Hermes (bo.fltortho.com): blue square mark retired, title becomes the section label */
body.fp-mounted.fp-host-bo .topbar .brand-mark.small{display:none}
body.fp-mounted.fp-host-bo .topbar-title{font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--fp-gold);font-weight:700}
body.fp-mounted.fp-host-bo .topbar{padding-top:10px;padding-bottom:10px}
/* Every other drop-down panel on the site (<details>: courier panels, Settings parts, Health check areas, case filters/notes,
   More on ops pages, reference sources) wears the same shaded tile (TG 63361). Nested details stay inside their parent's tile.
   Padding has zero specificity so each page's own spacing still wins. */
:where(body.fp-mounted details:not(.fp-menu):not(details details)){padding:10px 14px;border-radius:10px}
body.fp-mounted details:not(.fp-menu):not(details details){background:var(--sh-tile);border:2px solid var(--sh-tile-line);
  box-shadow:var(--sh-tile-shadow);--muted:var(--sh-tile-muted);--dim:var(--sh-tile-muted);--cw-muted:var(--sh-tile-muted)}
body.fp-mounted details:not(.fp-menu):not(details details):hover,
body.fp-mounted details[open]:not(.fp-menu):not(details details){border-color:var(--sh-tile-line2)}
/* anchors the bar would otherwise cover when a deep link scrolls to them */
body.fp-mounted [id]{scroll-margin-top:calc(var(--fp-h) + 12px)}
/* Brian 2026-10-21 (TG 60298): no default blue / visited purple links anywhere on the site. A link with no colour of its own takes
   the Warm Porcelain accent; zero specificity, so every page's own link colour still wins. */
:where(a:link,a:visited){color:#D2CECC}
