/* Celona Orchestrator AI — brand tokens per "Celona brand guidelines — as
 * built" (2026-07-16). Palette and type roles are verbatim from the guide;
 * see specs/design.md. Names mirror the CMS swatches (bg-* / text-*). */

:root {
  /* Primary */
  --bg-white: #FFFFFF;
  --bg-light-buff: #F5F3EC;   /* default page ground */
  --bg-warm-linen: #ECE5D5;   /* alternate warm band */
  --bg-dark-blue: #00304A;    /* primary brand colour */
  --text-rich-charcoal: #191919;

  /* Secondary / accent */
  --bg-light-charcoal: #C3CBD5;
  --bg-warm-taupe: #C0B399;
  --teal: #5AA7A0;            /* the single accent */
  --text-charcoal: #414041;

  /* On-dark treatments derived from palette colors only: white overlays
     for raised/hairline states, Light Charcoal for muted on-navy text. */
  --navy-2: rgba(255, 255, 255, .08);   /* raised state on Dark Blue */
  --navy-line: rgba(255, 255, 255, .14);
  --on-navy-muted: var(--bg-light-charcoal);

  --sans: 'DM Sans', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Roboto Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 14px;
  --hairline: 1px solid rgba(0, 48, 74, .18);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--sans);
  font-weight: 400;
  color: var(--text-rich-charcoal);
  background: var(--bg-light-buff);
  line-height: 1.55;
  font-size: 16px;
}

.wrap { max-width: 880px; margin: 0 auto; padding: 0 24px; }
.spacer { flex: 1; }

/* ---------- type roles ---------- */
.eyebrow {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 10px;
}
.eyebrow .dot { margin-right: 8px; }
.hairline { border: 0; border-top: var(--hairline); margin: 0 0 26px; }

.display {
  font-weight: 400;               /* signature: large regular-weight display */
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.14;
  letter-spacing: -.01em;
  color: var(--bg-dark-blue);
  margin: 0 0 16px;
}
.lead {
  font-weight: 300;
  font-size: 18px;
  color: var(--text-charcoal);
  max-width: 46em;
  margin: 0;
}
.body-copy { color: var(--text-charcoal); font-size: 15px; margin: 6px 0 18px; }

.mono-label {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-charcoal);
}

/* ---------- standalone error page ---------- */
.band { padding: 56px 0; }
.band-buff { background: var(--bg-light-buff); }
.topbar { background: var(--bg-dark-blue); }
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 16px; padding-bottom: 16px;
}
.brandmark { display: flex; align-items: baseline; gap: 10px; color: var(--bg-white); }
.dotmark { color: var(--teal); font-size: 14px; }
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: .01em; }
.brand-sep { color: var(--bg-light-charcoal); font-weight: 300; }
.brand-app { font-weight: 300; font-size: 16px; color: var(--bg-light-charcoal); }
.eyebrow-err { color: var(--bg-warm-taupe); }
.card-err { border-left: 3px solid var(--bg-warm-taupe); }

/* ---------- console shell ---------- */
.app { display: grid; grid-template-columns: 236px 1fr; height: 100vh; }

/* sidebar — navy on-dark section */
.sidebar {
  background: var(--bg-dark-blue);
  display: flex; flex-direction: column; min-height: 0;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 18px; border-bottom: 1px solid var(--navy-line);
  color: var(--bg-white);
}
.brand .brand-mark { width: 30px; height: 30px; flex: none; }
.brand b { font-weight: 700; font-size: 16px; display: block; line-height: 1.15; }
.brand small { color: var(--on-navy-muted); font-size: 11.5px; font-weight: 300; }
.nav { padding: 10px; overflow: auto; flex: 1; min-height: 0; }
.nav .grp {
  font-family: var(--mono); font-weight: 500; font-size: 10.5px;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--on-navy-muted); padding: 16px 10px 6px;
}
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px;
  color: var(--bg-light-charcoal); text-decoration: none;
  font-weight: 500; font-size: 13.5px; cursor: pointer;
}
.nav a .ico { width: 16px; text-align: center; opacity: .9; }
.nav a:hover { background: var(--navy-2); color: var(--bg-white); }
.nav a.on { background: var(--navy-2); color: var(--bg-white); box-shadow: inset 2px 0 0 var(--teal); }
.nav a.on .ico { color: var(--teal); }
.nav a.ext .ext-mark { margin-left: auto; color: var(--on-navy-muted); font-size: 11px; }
.side-foot {
  padding: 14px 18px; border-top: 1px solid var(--navy-line);
  color: var(--on-navy-muted);
  text-transform: none;   /* show the version string verbatim */
}

/* main column */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.conbar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 26px;
  background: var(--bg-white);
  border-bottom: var(--hairline);
}
.crumb { font-size: 13.5px; color: var(--text-charcoal); }
.crumb b { color: var(--bg-dark-blue); font-weight: 600; }
.crumb-sep { color: var(--bg-light-charcoal); }
.content { overflow: auto; padding: 30px 34px; min-height: 0; background: var(--bg-light-buff); flex: 1; }
.view { display: none; max-width: 960px; }
.view.active { display: block; animation: fade .22s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* session pill (light + on-white variants) */
.session-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em;
  color: var(--bg-white);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px; padding: 6px 14px;
}
.session-pill.dark {
  color: var(--bg-dark-blue);
  border-color: var(--bg-light-charcoal);
}
.pill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.pill-dot.expired { background: var(--bg-warm-taupe); }

/* profile / avatar menu */
.profile { position: relative; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg-dark-blue); color: var(--bg-white);
  font-family: var(--sans); font-weight: 700; font-size: 12.5px;
  border: 0; cursor: pointer; letter-spacing: .04em;
}
.avatar:hover { filter: brightness(1.35); }
.menu {
  position: absolute; right: 0; top: 44px; z-index: 40;
  width: 300px;
  background: var(--bg-white);
  border: 1px solid rgba(0, 48, 74, .15);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 48, 74, .18);
  padding: 8px;
}
.menu-head { padding: 10px 12px 8px; }
.menu-user { font-weight: 700; font-size: 14.5px; color: var(--bg-dark-blue); word-break: break-all; }
.menu-sub { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); margin-top: 2px; }
.menu-row { display: flex; gap: 10px; padding: 6px 12px; font-size: 13px; }
.menu-row .k {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-charcoal);
  width: 76px; flex: none; padding-top: 2px;
}
.menu-row .v { color: var(--text-rich-charcoal); word-break: break-word; }
.menu-div { border-top: 1px dashed var(--bg-light-charcoal); margin: 8px 6px; }
.menu-item {
  display: block; width: 100%; text-align: left;
  background: none; border: 0; cursor: pointer;
  font-family: var(--sans); font-weight: 500; font-size: 13.5px;
  color: var(--bg-dark-blue);
  padding: 9px 12px; border-radius: 8px; text-decoration: none;
}
.menu-item:hover { background: var(--bg-light-buff); }

/* ---------- overview tiles / placeholders ---------- */
.tile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.tile {
  background: var(--bg-white); border: 1px solid rgba(0, 48, 74, .12);
  border-radius: var(--radius); padding: 18px;
}
.tile-ico { color: var(--teal); font-size: 18px; margin-bottom: 8px; }
.tile h3 { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: var(--bg-dark-blue); }
.tile p { margin: 0 0 12px; font-size: 13.5px; color: var(--text-charcoal); }
.chip-soon {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--bg-warm-taupe); border: 1px solid var(--bg-warm-taupe);
  border-radius: 999px; padding: 3px 10px;
}
.ph { text-align: left; max-width: 560px; padding: 26px 0; }
.ph-ico { color: var(--teal); font-size: 26px; }
.ph h2 { color: var(--bg-dark-blue); font-weight: 700; font-size: 22px; margin: 10px 0 6px; }
.ph p { color: var(--text-charcoal); font-size: 15px; margin: 0; }
@media (max-width: 1000px) { .tile-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .app { grid-template-columns: 1fr; } .sidebar { display: none; } }

/* ---------- session card ---------- */
.card {
  background: var(--bg-white);
  border: 1px solid rgba(0, 48, 74, .12);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: 0 1px 2px rgba(0, 48, 74, .05);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.card-title { font-weight: 700; font-size: 20px; color: var(--bg-dark-blue); margin: 0; }

.badge {
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em;
  color: var(--bg-white); background: var(--teal);
  border-radius: 999px; padding: 4px 12px; white-space: nowrap;
}
.badge.expired { background: var(--bg-warm-taupe); }

.claims { width: 100%; border-collapse: collapse; margin: 6px 0 22px; }
.claims td {
  padding: 9px 0; vertical-align: top;
  border-bottom: 1px dashed var(--bg-light-charcoal);
}
.claims tr:last-child td { border-bottom: 0; }
.claims .k {
  font-family: var(--mono); font-weight: 500; font-size: 11.5px;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-charcoal); width: 180px; padding-right: 16px;
}
.claims .v { font-size: 14.5px; color: var(--text-rich-charcoal); word-break: break-word; }

.raw-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; gap: 12px; }
.raw-actions { display: flex; gap: 8px; }
.rawtoken, .json {
  font-family: var(--mono); font-size: 12px; line-height: 1.6;
  background: var(--bg-light-buff);
  border: 1px solid var(--bg-light-charcoal);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--bg-dark-blue);
}
.decoded { margin-top: 18px; }
.decoded summary { cursor: pointer; }
.decoded-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
.decoded-cols .json { margin-top: 6px; }
@media (max-width: 720px) { .decoded-cols { grid-template-columns: 1fr; } }

/* ---------- sample-data views (mockup-derived) ---------- */
.view-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.view-head > div { flex: 1; }
.vh1 { font-weight: 700; font-size: 24px; color: var(--bg-dark-blue); margin: 0 0 6px; }
.vsub { color: var(--text-charcoal); font-size: 14px; margin: 0; max-width: 46em; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-block; font-size: 11.5px; font-weight: 500;
  color: var(--text-charcoal); background: var(--bg-light-buff);
  border: 1px solid var(--bg-light-charcoal); border-radius: 999px; padding: 3px 10px;
}
.chip b { color: var(--bg-dark-blue); font-weight: 600; }
.chip-state { color: var(--bg-white); background: var(--teal); border-color: var(--teal); }
.chip-skill { color: var(--bg-dark-blue); background: var(--bg-light-buff); }
.chip-brain { color: var(--teal); border-color: var(--teal); background: var(--bg-white); }
.chip-tbd, .chip-sample { color: var(--bg-warm-taupe); border-color: var(--bg-warm-taupe);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; }
.chip-next { color: var(--bg-dark-blue); border-style: dashed; }
.live { color: var(--teal); font-weight: 700; }
.btn-sm { padding: 6px 14px; font-size: 13px; }

.sk-grid, .ag-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 1100px) { .sk-grid, .ag-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .sk-grid, .ag-grid { grid-template-columns: 1fr; } }
.sk, .ag {
  background: var(--bg-white); border: 1px solid rgba(0, 48, 74, .12);
  border-radius: var(--radius); padding: 16px;
  display: flex; flex-direction: column; gap: 9px;
}
.sk-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.sk h3, .ag h3 { margin: 0; font-size: 15px; font-weight: 700; color: var(--bg-dark-blue); }
.sk p, .ag p { margin: 0; font-size: 13px; color: var(--text-charcoal); }
.sk-foot { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; }
.ag-top { display: flex; gap: 10px; align-items: flex-start; }
.ag-ico {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  background: var(--bg-light-buff); border: 1px solid var(--bg-light-charcoal);
  display: grid; place-items: center; font-size: 17px;
}
.ag-ico.sm { width: 28px; height: 28px; font-size: 14px; border-radius: 8px; }
.ag-dim { opacity: .65; }

.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; font-family: var(--mono); font-weight: 500; font-size: 10.5px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--text-charcoal);
  padding: 12px 14px 9px; border-bottom: var(--hairline);
}
.tbl td { padding: 11px 14px; border-bottom: 1px dashed var(--bg-light-charcoal); vertical-align: top; color: var(--text-charcoal); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td b { color: var(--bg-dark-blue); font-weight: 600; }
.tsm { font-size: 11.5px; color: var(--bg-warm-taupe); margin-top: 2px; }

.ticket {
  display: flex; align-items: center; gap: 13px;
  background: var(--bg-white); border: 1px solid rgba(0, 48, 74, .12);
  border-radius: 12px; padding: 13px 16px; margin-bottom: 14px;
}
.ticket-sn {
  width: 34px; height: 34px; border-radius: 8px; flex: none;
  background: var(--bg-dark-blue); color: var(--bg-white);
  display: grid; place-items: center; font-weight: 700; font-size: 12px;
}
.agent-blk {
  background: var(--bg-white); border: 1px solid rgba(0, 48, 74, .12);
  border-radius: var(--radius); margin-bottom: 14px; overflow: hidden;
}
.agent-hd {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; background: var(--bg-light-buff);
  border-bottom: var(--hairline); color: var(--bg-dark-blue);
}
.steps { padding: 6px 16px 14px; }
.step { display: flex; gap: 11px; padding: 10px 0; border-bottom: 1px dashed var(--bg-light-charcoal); }
.step:last-child { border-bottom: 0; }
.step b { color: var(--bg-dark-blue); font-size: 13.5px; }
.step p { margin: 2px 0 6px; font-size: 13px; color: var(--text-charcoal); }
.stepn {
  width: 22px; height: 22px; border-radius: 50%; flex: none; margin-top: 1px;
  background: var(--bg-light-buff); border: 1px solid var(--teal);
  color: var(--teal); display: grid; place-items: center;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
}
.finding, .rec { border-radius: 10px; padding: 11px 13px; margin: 6px 0; }
.finding { background: var(--bg-warm-linen); border: 1px solid var(--bg-warm-taupe); }
.finding .mono-label { color: var(--bg-warm-taupe); }
.rec { background: var(--bg-light-buff); border: 1px solid var(--teal); }
.rec .mono-label { color: var(--teal); }
.finding p, .rec p { margin: 4px 0 8px; font-size: 13px; color: var(--text-rich-charcoal); }

/* ---------- settings ---------- */
.set-card { margin-bottom: 18px; }
.radio-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 16px; }
.radio-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 500; font-size: 14px; color: var(--bg-dark-blue);
  border: 1px solid var(--bg-light-charcoal); border-radius: 999px;
  padding: 8px 16px; cursor: pointer;
}
.radio-pill:has(input:checked) {
  border-color: var(--teal);
  box-shadow: inset 0 0 0 1px var(--teal);
  background: var(--bg-light-buff);
}
.radio-pill input { accent-color: var(--teal); margin: 0; }
.form-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.form-label {
  display: block; font-weight: 500; font-size: 13px;
  color: var(--bg-dark-blue);
}
.form-label .control { margin-top: 6px; }
.control {
  display: block; width: 100%;
  font-family: var(--sans); font-size: 14px;
  color: var(--text-rich-charcoal);
  background: var(--bg-white);
  border: 1px solid var(--bg-light-charcoal);
  border-radius: 9px; padding: 9px 12px;
}
.control:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(90,167,160,.18); }
.form-row .control { width: auto; flex: 1; min-width: 220px; }
.control-num { flex: 0 0 90px !important; min-width: 0 !important; }
.secret-wrap { display: flex; gap: 8px; align-items: center; }
.secret-wrap .control { flex: 1; }
.showtoggle { padding: 8px 14px; font-size: 13px; flex: none; }
.conn-form {
  border-top: 1px dashed var(--bg-light-charcoal);
  margin-top: 16px; padding-top: 16px;
}
.conn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
@media (max-width: 820px) { .conn-grid { grid-template-columns: 1fr; } }
.claims .act { text-align: right; white-space: nowrap; }
.linkbtn {
  background: none; border: 0; cursor: pointer;
  font-family: var(--sans); font-weight: 500; font-size: 13px;
  color: var(--teal); text-decoration: underline; text-underline-offset: 2px;
  padding: 0 4px;
}
.linkbtn.danger { color: var(--bg-warm-taupe); }

/* ---------- buttons (pill, navy or teal) ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans); font-weight: 500; font-size: 14px;
  border-radius: 999px; padding: 9px 20px;
  border: 1px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: filter .15s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-navy { background: var(--bg-dark-blue); color: var(--bg-white); }
.btn-teal { background: var(--teal); color: var(--bg-white); }
.btn-ghost {
  background: transparent; color: var(--bg-dark-blue);
  border-color: var(--bg-light-charcoal);
}
