/* ===========================================================================
   Workflow by Arkos Learning Solutions — Nexus portal styles.
   Built to sit on the existing Nexus site (creamy white + navy + gold) while
   carrying the Workflow product identity. Self-contained; does not touch the
   Sentinel/Nexus marketing index.html styles.
   =========================================================================== */
:root {
  --bg: #FDFBF7;
  --bg-warm: #F4EFE4;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-solid: #ffffff;
  --ink: #131e33;          /* Workflow navy */
  --ink-soft: #3a4453;
  --muted: #5a6472;
  --faint: #8a8675;
  --line: rgba(19, 30, 51, 0.12);
  --line-strong: rgba(19, 30, 51, 0.22);
  --gold: #D4AF37;
  --gold-deep: #B8902E;
  --green: #1f6f54;
  --green-soft: #e7f5ed;
  --red: #b03a4e;
  --red-soft: #fbeaec;
  --amber: #9a7b1f;
  --amber-soft: #fff6e3;
  --violet: #6a4191;
  --violet-soft: #efe7f7;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 60px -18px rgba(19, 30, 51, 0.18);
  --shadow-sm: 0 6px 20px -10px rgba(19, 30, 51, 0.18);
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --heading: "Outfit", var(--sans);
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1420; --bg-warm: #141b2b; --panel: rgba(24, 31, 48, 0.86);
    --panel-solid: #18203a; --ink: #F4EFE4; --ink-soft: #d7dbe6; --muted: #9aa3b4;
    --faint: #7c8496; --line: rgba(244, 239, 228, 0.12); --line-strong: rgba(244,239,228,.22);
    --green-soft: #14271f; --red-soft: #2a1418; --amber-soft: #2a2410; --violet-soft: #1e1830;
    --shadow: 0 18px 60px -18px rgba(0,0,0,.6);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--sans); color: var(--ink-soft);
  background: var(--bg);
  background-image:
    radial-gradient(at 0% 0%, rgba(19,30,51,.04) 0, transparent 45%),
    radial-gradient(at 100% 0%, rgba(212,175,55,.05) 0, transparent 45%);
  min-height: 100vh; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--heading); color: var(--ink); letter-spacing: -.01em; line-height: 1.15; }

/* ---- BETA banner --------------------------------------------------------- */
.wf-beta {
  position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap; padding: 8px 20px; background: var(--ink); color: #F4EFE4;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; border-bottom: 1px solid var(--gold);
}
.wf-beta .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); display: inline-block; }
.wf-beta .tag { display: inline-flex; align-items: center; gap: 7px; color: var(--gold); font-weight: 600; }
.wf-beta .ver { margin-left: auto; opacity: .65; }
.wf-beta a { color: var(--gold); }

/* ---- Top nav ------------------------------------------------------------- */
.wf-nav {
  display: flex; align-items: center; gap: 18px; padding: 16px 26px; max-width: 1180px; margin: 0 auto;
}
.wf-brand { display: flex; align-items: baseline; gap: 10px; }
.wf-brand .name { font-family: var(--heading); font-weight: 700; font-size: 22px; color: var(--ink); }
.wf-brand .by { font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.wf-nav .spacer { margin-left: auto; }
.wf-nav .links { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---- Layout -------------------------------------------------------------- */
.wf-wrap { max-width: 1180px; margin: 0 auto; padding: 28px 26px 80px; }
.wf-narrow { max-width: 460px; margin: 0 auto; padding: 36px 26px 80px; }
.wf-grid { display: grid; gap: 18px; }
@media (min-width: 760px) { .wf-grid.cols-2 { grid-template-columns: 1fr 1fr; } .wf-grid.cols-3 { grid-template-columns: repeat(3,1fr); } }

/* ---- Cards / panels ------------------------------------------------------ */
.card {
  background: var(--panel); backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 24px;
}
.card.solid { background: var(--panel-solid); backdrop-filter: none; }
.card h2 { margin: 0 0 6px; font-size: 22px; }
.card .eyebrow { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 12px; }

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-size: 14px; font-weight: 600; padding: 11px 18px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: #F4EFE4; }
.btn-primary:hover { box-shadow: 0 8px 22px -8px rgba(19,30,51,.5); text-decoration: none; }
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: #2a2208; }
.btn-gold:hover { box-shadow: 0 8px 22px -8px rgba(212,175,55,.6); text-decoration: none; }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { background: rgba(19,30,51,.05); text-decoration: none; }
.btn-green { background: var(--green); color: #eafaf3; }
.btn-danger { background: var(--red); color: #fff; }
.btn-sm { padding: 7px 12px; font-size: 12.5px; }
.btn[disabled], .btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---- Forms --------------------------------------------------------------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.input, select.input, textarea.input {
  width: 100%; font-family: var(--sans); font-size: 14px; color: var(--ink); background: var(--panel-solid);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 11px 13px; transition: border-color .12s, box-shadow .12s;
}
.input:focus, select.input:focus, textarea.input:focus { outline: none; border-color: var(--gold-deep); box-shadow: 0 0 0 3px rgba(212,175,55,.2); }
textarea.input { resize: vertical; min-height: 90px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-soft); margin-bottom: 12px; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--green); }

/* ---- Status pills (shape + color, never color alone) --------------------- */
.pill { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px;
  padding: 3px 10px; border-radius: 100px; border: 1px solid var(--line-strong); background: var(--panel-solid); color: var(--muted); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.ok    { color: var(--green); background: var(--green-soft); border-color: transparent; }
.pill.warn  { color: var(--amber); background: var(--amber-soft); border-color: transparent; }
.pill.bad   { color: var(--red); background: var(--red-soft); border-color: transparent; }
.pill.info  { color: var(--violet); background: var(--violet-soft); border-color: transparent; }
.pill.ok::before { border-radius: 50%; } /* circle = active */
.pill.warn::before { border-radius: 1px; transform: rotate(45deg); } /* diamond = attention */
.pill.bad::before { border-radius: 1px; } /* square = stopped */

/* ---- Definition rows ----------------------------------------------------- */
.dl { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; }
.dl .k { font-size: 13px; color: var(--muted); padding: 9px 0; border-bottom: 1px solid var(--line); }
.dl .v { font-size: 13px; color: var(--ink); font-weight: 600; text-align: right; padding: 9px 0; border-bottom: 1px solid var(--line); font-family: var(--mono); }

/* ---- Tables -------------------------------------------------------------- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-family: var(--mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase;
  color: var(--faint); font-weight: 500; padding: 10px 12px; border-bottom: 1px solid var(--line-strong); }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line); color: var(--ink-soft); vertical-align: middle; }
.table tr:hover td { background: rgba(212,175,55,.05); }

/* ---- Restricted-data notice --------------------------------------------- */
.restricted {
  background: var(--red-soft); border: 1px solid rgba(176,58,78,.25); border-left: 3px solid var(--red);
  border-radius: var(--radius-sm); padding: 14px 16px;
}
.restricted .h { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; color: var(--red); margin-bottom: 5px; }
.restricted p { margin: 0; font-size: 12.5px; color: var(--ink-soft); }

/* ---- Toast --------------------------------------------------------------- */
#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--ink); color: #F4EFE4; padding: 12px 18px; border-radius: var(--radius-sm); font-size: 13.5px;
  box-shadow: var(--shadow); animation: toastIn .2s ease; max-width: 80vw; }
.toast.err { background: var(--red); }
.toast.ok { background: var(--green); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ---- Misc ---------------------------------------------------------------- */
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.center { text-align: center; }
.stack > * + * { margin-top: 14px; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line-strong); border-top-color: var(--gold-deep); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab { padding: 9px 14px; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; background: none; border-top: none; border-left: none; border-right: none; font-family: var(--sans); }
.tab.active { color: var(--ink); border-bottom-color: var(--gold); }
.stat { text-align: center; padding: 16px; }
.stat .n { font-family: var(--heading); font-size: 30px; font-weight: 700; color: var(--ink); }
.stat .l { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-family: var(--mono); }
.empty { text-align: center; color: var(--muted); padding: 30px; font-size: 14px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001s !important; transition: none !important; } }

footer.wf-foot { max-width: 1180px; margin: 0 auto; padding: 26px; border-top: 1px solid var(--line); color: var(--faint); font-size: 11.5px; font-family: var(--mono); line-height: 1.7; }
