/* Same palette and type as the US FCL Rate Quoter (fclquoter/web/app.css): deep pine rail,
   pale sage page, muted green accent. No web fonts are fetched; IBM Plex is used where installed. */
:root {
  --bg: #f3f7f4; --fg: #13241c; --muted: #5d7066; --line: #dce7e0;
  --card: #ffffff; --accent: #2e7d5b; --accent-soft: #e7f2ec; --accent-line: #bfdccd;
  --bad: #b3261e; --bad-bg: #fdecea; --good: #1f6b48; --good-bg: #d9efe3;
  --ink: #12302a; --ink-2: #1b4238; --rail-fg: #dcece4; --rail-dim: #94b3a5;
  --rail-accent: #7cc9a2; --hover: #f4f9f6;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --cond: "IBM Plex Sans Condensed", "IBM Plex Sans", system-ui, sans-serif;
  --rail-w: 236px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 var(--sans); }
[hidden] { display: none !important; }
code { font-family: var(--mono); font-size: .9em; }
h2 { font-family: var(--cond); letter-spacing: .03em; margin: 0; text-transform: uppercase; font-size: 1.1rem; }
.sub { color: var(--muted); font-size: 13px; }
button { font: inherit; color: inherit; }

/* ---- shell ---- */
.shell { display: grid; grid-template-columns: var(--rail-w) 1fr; height: 100vh; }
.shell.collapsed { grid-template-columns: 0 1fr; }
.shell.collapsed .rail { visibility: hidden; }
.rail { background: var(--ink); color: var(--rail-fg); padding: 1.25rem 0 0; display: flex; flex-direction: column;
        height: 100vh; overflow-y: auto; }
.rail h1 { font-family: var(--cond); font-weight: 700; font-size: 1.15rem; letter-spacing: .06em;
           text-transform: uppercase; color: #fff; margin: 0; padding: 0 1.25rem .2rem; line-height: 1.25; }
.brand-sub { font-family: var(--mono); font-size: .7rem; color: var(--rail-accent); padding: 0 1.25rem;
             letter-spacing: .04em; text-transform: uppercase; }
.tabs { margin-top: 1.5rem; flex: 1; }
.rail .tab { display: block; width: 100%; text-align: left; background: none; border: 0;
  border-left: 3px solid transparent; padding: .6rem 1.25rem; color: var(--rail-fg); cursor: pointer;
  font-family: var(--cond); font-weight: 600; font-size: .9rem; letter-spacing: .03em; text-transform: uppercase; }
.rail .tab .blurb { display: block; font-family: var(--sans); font-weight: 400; font-size: .72rem;
  text-transform: none; letter-spacing: 0; color: var(--rail-dim); }
.rail .tab:hover { background: var(--ink-2); color: #fff; }
.rail .tab[aria-selected="true"] { border-left-color: var(--rail-accent); background: var(--ink-2); color: #fff; }
.rail .tab:focus-visible, .collapse:focus-visible, .expand:focus-visible { outline: 2px solid var(--rail-accent); outline-offset: -2px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-left: .45rem; vertical-align: 2px;
  background: var(--rail-dim); }
.dot.up { background: var(--rail-accent); }
.dot.down { background: #e5786f; }
.rail-foot { display: flex; align-items: center; justify-content: space-between; padding: .8rem 1.25rem;
  border-top: 1px solid var(--ink-2); }
.role-chip { font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--rail-accent); border: 1px solid var(--ink-2); border-radius: 999px; padding: .05rem .55rem; }
.collapse { background: none; border: 1px solid var(--ink-2); color: var(--rail-fg); border-radius: 5px;
  cursor: pointer; padding: .1rem .5rem; }
.collapse:hover { background: var(--ink-2); }
.expand { position: fixed; left: 0; top: .75rem; z-index: 10; background: var(--ink); color: #fff; border: 0;
  border-radius: 0 6px 6px 0; padding: .35rem .55rem; cursor: pointer; box-shadow: 0 2px 8px rgba(18, 48, 42, .2); }

/* ---- page ---- */
.page { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: .55rem 1.25rem; background: var(--card); border-bottom: 1px solid var(--line); }
.shell.collapsed .toolbar { padding-left: 2.75rem; }
.toolbar-title { display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; min-width: 0; }
.toolbar-actions { display: flex; align-items: center; gap: .5rem; }
.frames { flex: 1; position: relative; min-height: 0; }
.frames iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.empty-state { color: var(--muted); padding: 3rem 1.5rem; text-align: center; }
.down-card { max-width: 560px; margin: 3rem auto; background: var(--card); border: 1px solid var(--line);
  border-radius: 8px; padding: 1.25rem 1.5rem; }
.down-card h3 { font-family: var(--cond); margin: 0 0 .4rem; }

.btn { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--accent); background: var(--accent);
  color: #fff; border-radius: 6px; padding: .45rem .9rem; cursor: pointer; font-family: var(--cond); font-weight: 600;
  letter-spacing: .02em; text-decoration: none; font-size: .9rem; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: #fff; color: var(--accent); }
.btn.small { padding: .25rem .6rem; font-size: .8rem; }
.badge { display: inline-block; font-family: var(--mono); font-size: .72rem; padding: .05rem .45rem; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--muted); white-space: nowrap; }
.badge.good { background: var(--good-bg); border-color: #b5dfc6; color: var(--good); }
.badge.bad { background: var(--bad-bg); border-color: #f1b7b2; color: var(--bad); }

/* ---- narrow screens: menu becomes a top bar ---- */
@media (max-width: 760px) {
  .shell, .shell.collapsed { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: 100vh; }
  .shell.collapsed .rail { visibility: visible; }
  .rail { height: auto; padding: .6rem 0 0; }
  .tabs { display: flex; overflow-x: auto; margin-top: .5rem; }
  .rail .tab { width: auto; white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; padding: .5rem 1rem; }
  .rail .tab[aria-selected="true"] { border-bottom-color: var(--rail-accent); }
  .rail .tab .blurb, .rail-foot, .expand { display: none !important; }
  .page { height: auto; min-height: 0; }
  .toolbar-title .sub { display: none; }
}

/* ---- sign out / sign in ---- */
.account { display: flex; flex-direction: column; margin-right: auto; margin-left: .6rem; line-height: 1.35; }
.account a { color: var(--rail-dim); font-size: .75rem; text-decoration: none; }
.account a:hover { color: #fff; text-decoration: underline; }
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 16px;
  background: var(--ink); }
.login-card { background: var(--card); border-radius: 8px; padding: 1.75rem 1.75rem 1.5rem; width: 100%; max-width: 360px;
  display: flex; flex-direction: column; gap: .5rem; box-shadow: 0 12px 40px rgba(0, 0, 0, .25); }
.login-card h1 { font-family: var(--cond); text-transform: uppercase; letter-spacing: .05em; font-size: 1.2rem; margin: 0; }
.login-card .sub { margin: 0 0 .75rem; }
.login-card label { font-family: var(--cond); font-weight: 600; font-size: .78rem; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); }
.login-card input[type=password] { width: 100%; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 6px;
  min-height: 42px; font: inherit; }
.login-card input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.login-card .btn { justify-content: center; min-height: 42px; margin-top: .5rem; }
.login-card .error { color: var(--bad); background: var(--bad-bg); border-radius: 6px; padding: .4rem .7rem; margin: 0; font-size: .9rem; }
.login-card .show { display: flex; align-items: center; gap: .4rem; text-transform: none; letter-spacing: 0;
  font-family: var(--sans); font-weight: 400; font-size: .85rem; cursor: pointer; }
.login-card .back { text-align: center; color: var(--muted); font-size: .85rem; }
.login-card input.pw { width: 100%; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 6px; min-height: 42px; font: inherit; }
