/* Catalyst CMMS — design system (extends the standalone-page palette) */
:root {
  --bg: #f8fafc; --card: #ffffff; --border: #e2e8f0;
  --text: #0f172a; --muted: #5b6b82;
  --primary: #0e7490; --primary-dark: #155e75; --primary-light: #ecfeff;
  --green: #15803d; --green-bg: #f0fdf4;
  --amber: #b45309; --amber-bg: #fffbeb;
  --red: #be123c; --red-bg: #fff1f2;
  --blue: #1d4ed8; --blue-bg: #eff6ff;
  --sidebar-bg: #0c2430; --sidebar-text: #cbd5e1; --sidebar-active: #164e63;
  --radius: 0.5rem;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
       background: var(--bg); color: var(--text); line-height: 1.5; font-size: 15px; }
.hidden { display: none !important; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- layout ---- */
#app { display: flex; min-height: 100vh; }
.sidebar { width: 232px; flex: 0 0 232px; background: var(--sidebar-bg); color: var(--sidebar-text);
           display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 0.6rem; padding: 1rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
.brand-mark { width: 34px; height: 34px; border-radius: 8px; background: var(--primary);
              color: #fff; font-weight: 800; font-size: 1.1rem; display: flex; align-items: center; justify-content: center; }
.brand-mark.big { width: 52px; height: 52px; font-size: 1.6rem; margin: 0 auto 0.75rem; }
.brand-name { font-weight: 700; color: #fff; font-size: 1.05rem; line-height: 1.1; }
.brand-sub { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: #7dd3fc; }
#nav { flex: 1; overflow-y: auto; padding: 0.5rem; }
.nav-section { font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: #7d8ca3;
               padding: 0.9rem 0.6rem 0.3rem; }
.nav-item { display: block; padding: 0.45rem 0.6rem; border-radius: 0.375rem; color: var(--sidebar-text);
            font-size: 0.9rem; margin-bottom: 2px; }
.nav-item:hover { background: rgba(255,255,255,0.06); text-decoration: none; }
.nav-item.active { background: var(--sidebar-active); color: #fff; }
.sidebar-foot { padding: 0.75rem 1rem; border-top: 1px solid rgba(255,255,255,0.08); }

/* ---- text size (per-device, for readers who need bigger text) ----
   Screen-only zoom on the whole shell: words, icons and tap targets
   all scale together, on the sign-in screen too. Printed labels and
   documents are separate documents, so paper keeps its layout. */
@media screen {
  html[data-ts="115"] body { zoom: 1.15; }
  html[data-ts="130"] body { zoom: 1.30; }
  html[data-ts="145"] body { zoom: 1.45; }
}
.textsize-control { display: block; font-size: 0.85rem; color: #e2e8f0; margin: 0.55rem 0 0.65rem; }
.textsize-control select { display: block; width: 100%; margin-top: 0.3rem; font-size: 0.95rem; padding: 0.45rem 0.5rem;
  border-radius: 0.375rem; border: 1px solid rgba(255,255,255,0.28); background: rgba(255,255,255,0.08); color: #f1f5f9; }
.textsize-control select option { color: #0f172a; }
html[data-theme="dark"] .textsize-control select option,
html[data-theme="contrast"] .textsize-control select option { color: #f1f5f9; }

/* ---- themes (per-device): Dark and High contrast ----
   The design system runs on variables, so a theme is a variable set
   plus a handful of surfaces that hard-code light colors. Screen
   only in effect: printed documents are separate documents. */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1622; --card: #122533; --border: #274b63;
  --text: #e6eef5; --muted: #9db2c6;
  --primary: #2bb3d1; --primary-dark: #7dd3fc; --primary-light: #0d2b36;
  --green: #4ade80; --green-bg: #0d2818;
  --amber: #fbbf24; --amber-bg: #2a2008;
  --red: #fb7185; --red-bg: #2d0f18;
  --blue: #60a5fa; --blue-bg: #0e2145;
  --sidebar-bg: #081a24;
}
html[data-theme="contrast"] {
  color-scheme: dark;
  --bg: #000000; --card: #0a0a0a; --border: #8d99ae;
  --text: #ffffff; --muted: #d7dee8;
  --primary: #2ea6ff; --primary-dark: #99d6ff; --primary-light: #0a2a4a;
  --green: #00e676; --green-bg: #052e16;
  --amber: #ffd23f; --amber-bg: #2e2303;
  --red: #ff8296; --red-bg: #3d0a14;
  --blue: #66b2ff; --blue-bg: #0a2447;
  --sidebar-bg: #000000; --sidebar-active: #0a3a5c;
}
html[data-theme="dark"] .btn-primary:hover { background: #1f9bb8; }
html[data-theme="dark"] .btn-danger { background: #e11d48; border-color: #e11d48; color: #ffffff; }
html[data-theme="contrast"] .btn-danger { background: #ff4d6d; border-color: #ff4d6d; color: #000000; font-weight: 700; }
html[data-theme="contrast"] .btn-primary { background: #0057d9; border-color: #99d6ff; }
html[data-theme="contrast"] .btn-primary:hover { background: #2ea6ff; }
html[data-theme="dark"] .badge-gray { background: #1c3247; color: var(--text); }
html[data-theme="contrast"] .badge-gray { background: #1a1a1a; color: var(--text); }
html[data-theme="dark"] .bar-track { background: #1e3a4f; }
html[data-theme="contrast"] .bar-track { background: #262626; }
html[data-theme="dark"] .bubble { background: #1c3247; }
html[data-theme="contrast"] .bubble { background: #1a1a1a; }
html[data-theme="dark"] .toast { background: #e8eef5; color: #0b1520; }
html[data-theme="contrast"] .toast { background: #ffffff; color: #000000; }
html[data-theme="contrast"] a { color: #ffd23f; }
html[data-theme="contrast"] .card { border-width: 1.5px; }
/* The sign-in card stays light in every theme — its circuit animation
   and logo lockup were drawn for a light card. It sits on the themed
   backdrop like a lit sign. */
html[data-theme="dark"] .login-card, html[data-theme="contrast"] .login-card {
  background: #ffffff; border-color: #e2e8f0; color: #0f172a;
}
html[data-theme="dark"] .login-card p, html[data-theme="contrast"] .login-card p { color: #5b6b82; }
html[data-theme="dark"] .login-card input, html[data-theme="contrast"] .login-card input {
  background: #ffffff; color: #0f172a; border-color: #cbd5e1;
}
/* A clear ring around whatever holds keyboard focus, in every theme. */
:focus-visible { outline: 3px solid var(--primary); outline-offset: 1px; }
.user-chip { font-size: 0.82rem; color: #e2e8f0; margin-bottom: 0.4rem; }
.user-chip .role { color: #94a3b8; font-size: 0.72rem; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { background: var(--card); border-bottom: 1px solid var(--border); padding: 0.7rem 1.5rem;
          display: flex; align-items: center; gap: 1rem; position: sticky; top: 0; z-index: 10; }
.topbar h1 { font-size: 1.15rem; font-weight: 700; }
.topbar-right { margin-left: auto; display: flex; gap: 0.6rem; align-items: center; }
.content { padding: 1.25rem 1.5rem 3rem; max-width: 1440px; width: 100%; margin: 0 auto; }
.only-mobile { display: none; }

/* ---- controls ---- */
.btn { font-size: 0.875rem; padding: 0.5rem 0.85rem; border-radius: 0.375rem; border: 1px solid var(--border);
       background: var(--card); color: var(--text); cursor: pointer; display: inline-block; }
.btn:hover { border-color: #cbd5e1; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn-green { background: var(--green); color: #fff; border-color: var(--green); }
.btn-ghost { background: transparent; border-color: transparent; color: inherit; }
.btn-small { font-size: 0.8rem; padding: 0.35rem 0.6rem; }
.btn-block { width: 100%; }
select, input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="datetime-local"], textarea {
  font-size: 0.9rem; padding: 0.5rem 0.7rem; border-radius: 0.375rem; border: 1px solid var(--border);
  background: var(--card); color: var(--text); font-family: inherit; }
textarea { width: 100%; min-height: 70px; }
label.field { display: block; font-size: 0.8rem; font-weight: 600; color: var(--muted); margin-bottom: 0.25rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.9rem; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid input, .form-grid select { width: 100%; }

/* ---- cards, tables, badges ---- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
        padding: 1.1rem 1.25rem; margin-bottom: 1.25rem; }
.card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.2rem; }
.card .desc { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.9rem; }
.card-head { display: flex; align-items: flex-start; gap: 1rem; }
.card-head .spacer { margin-left: auto; display: flex; gap: 0.5rem; }
.section-title { font-size: 1.05rem; font-weight: 700; margin: 1.5rem 0 0.9rem; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th { text-align: left; padding: 0.55rem 0.7rem; color: var(--muted); font-weight: 600; font-size: 0.72rem;
     text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--border); }
td { padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: none; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--primary-light); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.badge { display: inline-block; padding: 0.12rem 0.5rem; border-radius: 9999px; font-size: 0.72rem; font-weight: 600; white-space: nowrap; }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-blue { background: var(--blue-bg); color: var(--blue); }
.badge-gray { background: #f1f5f9; color: var(--muted); }
.badge-teal { background: var(--primary-light); color: var(--primary-dark); }
.muted { color: var(--muted); }
.small { font-size: 0.82rem; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
@media (min-width: 1200px) { .kpi-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.kpi { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.kpi .label { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.kpi .value { font-size: 1.7rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi .hint { font-size: 0.75rem; color: var(--muted); margin-top: 0.15rem; }

/* Tool Checkout locked placeholder: a visible support-enabled feature
   door in Inventory, with no checkout workflow behind it in v1. */
.tool-checkout-tile { display: flex; align-items: center; gap: 1rem; cursor: pointer; }
.tool-checkout-tile:hover, .tool-checkout-tile:focus-visible { border-color: var(--primary); outline: none; }
.tool-checkout-visual { position: relative; flex: 0 0 64px; width: 64px; height: 64px;
  border-radius: var(--radius); background: var(--primary-light); display: flex;
  align-items: center; justify-content: center; }
.tool-checkout-wrench { font-size: 2rem; line-height: 1; }
.tool-checkout-lock { position: absolute; right: -7px; bottom: -7px; width: 26px; height: 26px;
  border-radius: 9999px; background: var(--card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 0.78rem; }
.tool-checkout-copy { min-width: 0; }
.tool-checkout-heading { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.tool-checkout-heading h3 { margin-bottom: 0; }
.tool-checkout-copy p { color: var(--muted); font-size: 0.9rem; margin-top: 0.2rem; }
.tool-checkout-arrow { margin-left: auto; color: var(--muted); font-size: 1.6rem; line-height: 1; }
.tool-checkout-message { font-size: 1rem; }
.kpi-ring { display: block; flex: none; }
.kpi-ring-num { font-size: 15px; font-weight: 700; fill: var(--text); }
.kpi-vizrow { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.35rem; }
.kpi-bar { position: relative; display: flex; height: 10px; margin-top: 0.6rem; }
.kpi-bar .seg-planned { background: var(--primary); border-radius: 5px 0 0 5px; height: 100%; }
.kpi-bar .seg-reactive { background: var(--amber); border-radius: 0 5px 5px 0; height: 100%; flex: 1; }
.kpi-benchmark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); opacity: 0.55; }
.kpi-cmp { margin-top: 0.55rem; display: grid; gap: 4px; }
.kpi-cmp .row { display: flex; align-items: center; gap: 6px; font-size: 0.68rem; color: var(--muted); }
.kpi-cmp .track { flex: 1; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.kpi-cmp .fill { height: 100%; border-radius: 4px; }
.kpi-cmp .fill.est { background: var(--muted); }
.kpi-cmp .fill.act-under { background: var(--green); }
.kpi-cmp .fill.act-over { background: var(--red); }
.kpi-cmp .num { font-variant-numeric: tabular-nums; color: var(--text); min-width: 54px; text-align: right; }
.kpi-flow { display: block; width: 100%; height: 40px; margin-top: 0.4rem; }
.kpi-legend { display: flex; gap: 10px; font-size: 0.68rem; color: var(--muted); margin-top: 4px; }
.kpi-legend .dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; }
.toolbar { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar .spacer { margin-left: auto; display: flex; gap: 0.5rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.bar-track { background: #f1f5f9; border-radius: 9999px; height: 8px; overflow: hidden; min-width: 90px; }
.bar-fill { background: var(--primary); height: 100%; }
.bar-fill.over { background: var(--red); }
.tree-row { padding: 0.3rem 0; }
.tree-children { margin-left: 1.4rem; border-left: 1px solid var(--border); padding-left: 0.8rem; }
.tree-toggle { min-width: 1.6rem; padding: 0 0.3rem; margin-right: 0.35rem; }
.tree-toggle-spacer { display: inline-block; width: 1.95rem; }
.tree-actions { margin-left: 0.6rem; white-space: nowrap; }
.tree-actions .btn { margin-right: 0.25rem; }
.tree-link { text-decoration: none; }
.tree-link:hover { text-decoration: underline; }

/* ---- team messages ---- */
.msg-layout { display: grid; grid-template-columns: 320px 1fr; gap: 1.25rem; align-items: start; }
.msg-item { padding: 0.7rem 0.8rem; border: 1px solid var(--border); border-radius: var(--radius);
            margin-bottom: 0.6rem; cursor: pointer; background: var(--card); }
.msg-item:hover { border-color: #cbd5e1; }
.msg-item.active { border-color: var(--primary); background: var(--primary-light); }
.msg-thread { display: flex; flex-direction: column; gap: 0.5rem; max-height: 55vh;
              overflow-y: auto; padding: 0.4rem 0.2rem; }
.bubble { max-width: 78%; padding: 0.55rem 0.8rem; border-radius: 0.9rem; background: #f1f5f9;
          align-self: flex-start; overflow-wrap: anywhere; }
.bubble.mine { background: var(--primary-light); align-self: flex-end; }
@media (max-width: 900px) { .msg-layout { grid-template-columns: 1fr; } }

/* ---- login, toast, modal ---- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.login-card { background: var(--card); border: 1px solid var(--border); border-radius: 0.75rem;
              padding: 2rem; max-width: 380px; width: 100%; text-align: center; }
.login-card p { color: var(--muted); font-size: 0.88rem; margin-bottom: 1.25rem; }
.login-card input { width: 100%; margin-bottom: 0.75rem; }
.error { color: var(--red); font-size: 0.85rem; margin-top: 0.5rem; min-height: 1.2em; }
.toast { position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%); background: var(--text);
         color: #fff; padding: 0.65rem 1.1rem; border-radius: 0.5rem; font-size: 0.88rem; z-index: 100;
         box-shadow: 0 8px 24px rgba(0,0,0,0.25); }
.toast.err { background: var(--red); }
.modal-back { position: fixed; inset: 0; background: rgba(15,23,42,0.5); z-index: 50;
              display: flex; align-items: flex-start; justify-content: center; padding: 2rem 1rem; overflow-y: auto; }
.modal { background: var(--card); border-radius: 0.75rem; max-width: 720px; width: 100%; padding: 1.5rem; }
.modal h3 { font-size: 1.05rem; margin-bottom: 1rem; }
.modal-actions { display: flex; gap: 0.6rem; justify-content: flex-end; margin-top: 1.25rem; }
.loading { color: var(--muted); padding: 2rem; text-align: center; }
.empty { color: var(--muted); padding: 1.5rem; text-align: center; font-size: 0.9rem; }

@media (max-width: 900px) {
  .sidebar { position: fixed; left: -240px; z-index: 40; transition: left 0.2s; }
  .sidebar.open { left: 0; }
  .only-mobile { display: inline-block; }
  .two-col { grid-template-columns: 1fr; }
  .content { padding: 1rem; }
  /* Wide tables scroll inside their card instead of stretching the page. */
  .card { overflow-x: auto; }
  th, td { padding: 0.5rem 0.5rem; }
  .topbar { flex-wrap: wrap; padding: 0.6rem 1rem; row-gap: 0.4rem; }
  .topbar-right { flex-wrap: wrap; }
  /* Finger-sized global chrome (Device Pass 2026-11-02). */
  #menu-btn, #bell-btn { min-width: 42px; min-height: 40px; }
  .kpi-grid { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); }
  .modal { padding: 1.1rem; }
  .modal-back { padding: 1rem 0.5rem; }
}

/* ---------- logo branding ---------- */
.brand-logo { background: #fff; border-radius: 9px; width: 40px; height: 40px; flex: 0 0 40px;
  display: flex; align-items: center; justify-content: center; }
.brand-logo img { width: 34px; height: 34px; display: block; }
.login-logo { width: 280px; max-width: 85%; height: auto; display: block; margin: 0 auto 0.7rem; }

/* Login animation — CINEMATIC REBUILD (2026-11-03, Kevin's direction):
   the circuit mark builds BIG at center screen on a deep-navy stage —
   the same navy as the app icon, so the phone splash flows straight
   into it — then glides up and shrinks away as the light sign-in card
   rises into place. One continuous motion: no static pre-icon, no
   double logo. Default state is the finished login; .animating only
   exists mid-play, so any failure leaves a normal login screen.
   Tap/click/keypress skips. Reduced-motion shows the end state. */
.login-wrap { position: relative; }
.login-wrap::before { content: ''; position: fixed; inset: 0; z-index: 58;
  background: radial-gradient(ellipse 90% 65% at 50% 42%, #14384c 0%, #0c2430 55%, #06161f 100%);
  opacity: 0; pointer-events: none; transition: opacity .7s ease; }
.login-wrap.animating::before { opacity: 1; }
.login-wrap.animating.reveal::before { opacity: 0; }
.login-anim { display: none; }
.login-wrap.animating .login-anim { display: flex; align-items: center; justify-content: center;
  position: fixed; inset: 0; z-index: 59; pointer-events: none; }
.login-anim svg { width: min(64vmin, 460px); height: auto; display: block;
  transition: transform .75s cubic-bezier(.5, 0, .15, 1), opacity .75s ease; }
.login-wrap.animating.reveal .login-anim svg { transform: translateY(-21vh) scale(.30); opacity: 0; }
.login-card { transition: opacity .55s ease, transform .55s ease; }
.login-wrap.animating .login-card { opacity: 0; transform: translateY(16px); pointer-events: none; }
.login-wrap.animating.reveal .login-card { opacity: 1; transform: none; }
.la-trace { animation: laDraw .6s linear forwards; }
.la-ring { animation: laDraw .65s linear forwards; }
@keyframes laDraw { to { stroke-dashoffset: 0; } }
.la-pad, .la-star { transform-box: fill-box; transform-origin: center; transform: scale(0);
  animation: laPop .4s cubic-bezier(.2, 1.6, .4, 1) forwards; }
@keyframes laPop { to { transform: scale(1); } }
.la-star { filter: drop-shadow(0 0 9px rgba(242, 160, 7, .85)); }
@media (prefers-reduced-motion: reduce) {
  .la-trace, .la-ring, .la-pad, .la-star { animation-duration: .01s !important; animation-delay: 0s !important; }
}

/* ---- Device Pass (2026-11-02): wide list tables + schedule touch ---- */
/* The main list tables used to sit in cards with overflow:hidden, which
   silently CLIPPED right-hand columns at narrow widths (no scroll, no
   way to reach Assigned/Due/actions on a phone). A .table-card is a
   deliberate horizontal scroller instead, with the first column pinned
   so the row identity stays visible while the rest scrolls. At desktop
   widths the tables fit and nothing scrolls. */
.card.table-card { padding: 0; overflow-x: auto; overflow-y: hidden; }
.table-card th:first-child, .table-card td:first-child {
  position: sticky; left: 0; background: var(--card); z-index: 1;
  box-shadow: 1px 0 0 var(--border);
}
.table-card thead th:first-child { z-index: 2; }
.table-card tbody tr.clickable:hover td:first-child { background: var(--primary-light); }

/* Schedule board: the technician column stays pinned inside the board's
   horizontal scroller, so a mid-scroll glance still names the row. */
.sched-techcol { position: sticky; left: 0; z-index: 2; background: var(--card);
                 box-shadow: 1px 0 0 var(--border); }

/* Tap-to-carry (touch): the bar that names the carried item, the carried
   card's lifted look, and the drop-target outline on cells and pool. */
.carry-bar { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  background: var(--primary-light); border: 1px solid var(--primary);
  color: var(--primary-dark); border-radius: var(--radius);
  padding: 0.6rem 0.8rem; margin-bottom: 1rem; font-size: 0.88rem; }
.carry-bar .spacer { margin-left: auto; }
.sched-wo.carried, .sched-block.carried { outline: 3px solid var(--primary);
  outline-offset: 1px; box-shadow: 0 6px 16px rgba(14,116,144,0.35); }
.sched-cell.drop-ok { box-shadow: inset 0 0 0 2px rgba(14,116,144,0.45); }
#wo-pool.drop-ok { box-shadow: inset 0 0 0 2px rgba(14,116,144,0.45); border-radius: 6px; }

/* Copilot */
.cp-thread { display: flex; flex-direction: column; gap: 0.5rem; max-height: 60vh; overflow-y: auto; padding: 0.25rem; }
.cp-thread .bubble { white-space: pre-wrap; }
.cp-tools { font-size: 0.75rem; color: var(--muted); margin-top: 0.35rem; }
.cp-draft { border: 1px solid var(--primary); background: var(--primary-light); border-radius: var(--radius); padding: 0.8rem 0.9rem; }

/* Platform Console support-session banner (app.js renderOpBanner). */
.op-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 12px 16px 0; padding: 10px 14px; border-radius: 8px;
  background: #fef3c7; border: 1px solid #f59e0b; color: #92400e;
  font-size: 0.9rem;
}
.op-banner.hidden { display: none; }

/* ---- KPI drill-down links (2026-11-03) ----
   Dashboard KPI cards that link to their underlying data (views/dashboard.js
   kpiCard). Linked cards keep the plain .kpi look; the affordance is the
   pointer, a subtle hover lift with a primary outline, and a clear focus
   ring for keyboard users. Unlinked cards (target module not in the org
   module set) stay plain .kpi divs and get none of this. */
a.kpi-link { display: block; color: inherit; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
a.kpi-link:hover { transform: translateY(-2px); border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.10); }
a.kpi-link:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
