/* the exp. OS — unified visual system
   Brand: #05070a / #c9a35c. System accent: #3df2a1.
   Layout language: rail + system bar + bento panels + mono telemetry. */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@300;400;500;600&display=swap');

:root {
  --os-bg: #05070a;
  --os-bg-2: #070b10;
  --os-panel: rgba(11, 16, 22, 0.86);
  --os-panel-solid: #0b1016;
  --os-panel-2: #0e141b;
  --os-line: rgba(255, 255, 255, 0.075);
  --os-line-strong: rgba(255, 255, 255, 0.13);
  --os-gold: #c9a35c;
  --os-gold-soft: rgba(201, 163, 92, 0.14);
  --os-green: #3df2a1;
  --os-green-soft: rgba(61, 242, 161, 0.12);
  --os-cyan: #6ed7ff;
  --os-red: #ff5d6c;
  --os-amber: #ffb84d;
  --os-text: #e7edf2;
  --os-dim: #9aa7b4;
  --os-muted: #6d7b88;
  --os-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --os-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --os-radius: 14px;
  --os-radius-sm: 9px;
  --os-shadow: 0 24px 70px -18px rgba(0, 0, 0, 0.65);
  --os-transition: 180ms cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body.os-body,
body.os-public {
  margin: 0;
  background: var(--os-bg);
  color: var(--os-text);
  font-family: var(--os-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

body.os-body::before,
body.os-public::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 20%, black 0%, transparent 78%);
}

body.os-body::after,
body.os-public::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.012) 0, rgba(255,255,255,.012) 1px, transparent 1px, transparent 4px);
  opacity: .35;
}

a { color: var(--os-gold); text-decoration: none; transition: color var(--os-transition), opacity var(--os-transition); }
a:hover { color: #e1bd79; }

::selection { background: rgba(201,163,92,.28); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #070a0e; }
::-webkit-scrollbar-thumb { background: #1b232c; border: 3px solid #070a0e; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #2a3540; }

/* ---------- shared atoms ---------- */
.os-mono, .mono { font-family: var(--os-mono); }
.os-label {
  font-family: var(--os-mono);
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--os-muted);
}
.os-value { font-family: var(--os-mono); font-weight: 500; color: var(--os-text); }
.os-signal { color: var(--os-green) !important; }
.os-gold { color: var(--os-gold) !important; }
.os-danger { color: var(--os-red) !important; }
.os-dim { color: var(--os-dim) !important; }
.os-muted { color: var(--os-muted) !important; }

.os-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--os-green);
  box-shadow: 0 0 0 3px rgba(61,242,161,.10), 0 0 14px rgba(61,242,161,.55);
  flex: 0 0 auto;
}
.os-dot.gold { background: var(--os-gold); box-shadow: 0 0 0 3px rgba(201,163,92,.10), 0 0 14px rgba(201,163,92,.45); }
.os-dot.red { background: var(--os-red); box-shadow: 0 0 0 3px rgba(255,93,108,.10), 0 0 14px rgba(255,93,108,.45); }

.os-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid var(--os-line);
  border-radius: 999px;
  background: rgba(255,255,255,.025);
  font-family: var(--os-mono);
  font-size: .61rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--os-dim);
  white-space: nowrap;
}
.os-pill.green { border-color: rgba(61,242,161,.24); color: var(--os-green); background: rgba(61,242,161,.055); }
.os-pill.gold { border-color: rgba(201,163,92,.28); color: var(--os-gold); background: rgba(201,163,92,.055); }

.os-panel {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.022), transparent 42%), var(--os-panel);
  border: 1px solid var(--os-line);
  border-radius: var(--os-radius);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.os-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 18px; right: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,163,92,.22), transparent);
  pointer-events: none;
}
.os-panel:hover { border-color: rgba(255,255,255,.11); }

.os-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid var(--os-line-strong);
  border-radius: var(--os-radius-sm);
  background: rgba(255,255,255,.035);
  color: var(--os-text);
  font-family: var(--os-mono);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform var(--os-transition), border-color var(--os-transition), background var(--os-transition), color var(--os-transition);
}
.os-btn:hover { transform: translateY(-1px); border-color: rgba(201,163,92,.4); color: #fff; }
.os-btn.primary { background: var(--os-gold); border-color: var(--os-gold); color: #080b0e; }
.os-btn.primary:hover { background: #dfb972; border-color: #dfb972; box-shadow: 0 0 30px rgba(201,163,92,.18); }
.os-btn.green { background: var(--os-green); border-color: var(--os-green); color: #05100b; }
.os-btn.green:hover { background: #79ffc0; border-color: #79ffc0; box-shadow: 0 0 30px rgba(61,242,161,.18); }
.os-btn.ghost { background: transparent; }
.os-btn svg { flex: 0 0 auto; }

/* ---------- rail ---------- */
.os-rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: 220px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  padding: 20px 13px 16px;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(201,163,92,.075), transparent 44%),
    linear-gradient(180deg, #070b10, #05080c);
  border-right: 1px solid var(--os-line);
}
.os-brand {
  display: flex;
  align-items: baseline;
  gap: 3px;
  padding: 4px 9px 20px;
  font-family: var(--os-mono);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -.03em;
  color: #fff;
}
.os-brand span { color: var(--os-gold); }
.os-brand small {
  margin-left: auto;
  font-size: .52rem;
  letter-spacing: .08em;
  color: var(--os-muted);
  font-weight: 400;
}
.os-rail-label { padding: 12px 10px 8px; }
.os-rail nav { display: flex; flex-direction: column; gap: 3px; }
.os-rail nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--os-dim);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .01em;
  transition: background var(--os-transition), color var(--os-transition), border-color var(--os-transition);
}
.os-rail nav a:hover { background: rgba(255,255,255,.035); color: var(--os-text); }
.os-rail nav a.is-active {
  background: linear-gradient(90deg, rgba(201,163,92,.13), rgba(201,163,92,.035));
  border-color: rgba(201,163,92,.20);
  color: var(--os-text);
}
.os-rail nav a.is-active::before {
  content: '';
  position: absolute;
  left: -13px; top: 9px; bottom: 9px;
  width: 2px;
  border-radius: 2px;
  background: var(--os-gold);
  box-shadow: 0 0 12px rgba(201,163,92,.55);
}
.os-rail nav a svg { width: 15px; height: 15px; opacity: .85; }
.os-rail nav a .os-nav-meta { margin-left: auto; font-family: var(--os-mono); font-size: .58rem; color: var(--os-muted); }
.os-rail-foot {
  margin-top: auto;
  padding: 13px 10px 2px;
  border-top: 1px solid var(--os-line);
  font-family: var(--os-mono);
  font-size: .58rem;
  line-height: 1.7;
  letter-spacing: .045em;
  color: var(--os-muted);
}
.os-rail-foot .row { display: flex; align-items: center; gap: 8px; color: var(--os-green); }

/* ---------- system bar ---------- */
body.os-body { padding-left: 220px; }
body.os-body .topbar {
  position: fixed;
  left: 220px; right: 0; top: 0;
  height: 56px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  margin: 0;
  background: rgba(5, 8, 12, 0.78);
  border-bottom: 1px solid var(--os-line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
body.os-body .topbar .brand { display: none; }
body.os-body .topbar .nav-links { display: none; }
.os-top-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  font-family: var(--os-mono);
  font-size: .6rem;
  letter-spacing: .07em;
  color: var(--os-muted);
  text-transform: uppercase;
}
.os-clock { color: var(--os-dim); font-variant-numeric: tabular-nums; }
.os-command {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 210px;
  max-width: 360px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--os-line);
  border-radius: 7px;
  background: rgba(255,255,255,.022);
  color: var(--os-muted);
  font-family: var(--os-mono);
  font-size: .62rem;
}
.os-command kbd {
  margin-left: auto;
  padding: 1px 5px;
  border: 1px solid var(--os-line-strong);
  border-radius: 4px;
  background: rgba(255,255,255,.04);
  color: var(--os-dim);
  font-family: var(--os-mono);
  font-size: .58rem;
}

/* ---------- content frame ---------- */
body.os-body > main,
body.os-body .portal-main,
body.os-body .dash-main,
body.os-body .files-main,
body.os-body .knowledge-main,
body.os-body .status-main,
body.os-body .admin-main,
body.os-body .profile-main {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 48px));
  max-width: none;
  margin: 0 auto;
  padding: 86px 0 64px;
}
body.os-body .portal-main { width: min(1240px, calc(100% - 48px)); }

body.os-body .bg-grid,
body.os-body .bg-orb { display: none; }

/* ---------- legacy topbar content hidden, new meta injected ---------- */
.os-page-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 18px;
}
.os-page-title h1 { margin: 0; font-size: 1.55rem; letter-spacing: -.025em; font-weight: 600; }
.os-page-title .os-label { margin-bottom: 6px; }

/* ---------- hero / focus ---------- */
.hero, .dash-hero {
  position: relative;
  overflow: hidden;
  padding: 30px 30px 26px !important;
  margin-bottom: 16px !important;
  border: 1px solid var(--os-line) !important;
  border-radius: var(--os-radius) !important;
  background:
    radial-gradient(ellipse at 12% 0%, rgba(201,163,92,.16), transparent 44%),
    radial-gradient(ellipse at 92% 120%, rgba(61,242,161,.065), transparent 38%),
    linear-gradient(180deg, rgba(255,255,255,.026), transparent 62%),
    var(--os-panel) !important;
  box-shadow: var(--os-shadow), inset 0 1px 0 rgba(255,255,255,.04) !important;
}
.hero::after, .dash-hero::after {
  content: '';
  position: absolute;
  right: 26px; top: 26px;
  width: 88px; height: 88px;
  border: 1px solid rgba(201,163,92,.18);
  border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(201,163,92,.025), 0 0 0 36px rgba(201,163,92,.018);
  pointer-events: none;
}
.hero-eyebrow, .dash-hero .os-label {
  display: block;
  margin-bottom: 12px;
  font-family: var(--os-mono) !important;
  font-size: .63rem !important;
  font-weight: 500;
  letter-spacing: .16em !important;
  text-transform: uppercase;
  color: var(--os-green) !important;
}
.hero h1, .dash-hero h1 {
  margin: 0 0 8px !important;
  font-size: clamp(2rem, 4vw, 3.15rem) !important;
  line-height: .98;
  letter-spacing: -.055em;
  font-weight: 700 !important;
  color: #f4f7f9 !important;
}
.hero h1 span, .dash-hero h1 span { color: var(--os-gold) !important; }
.hero .tagline, .dash-hero .tagline {
  margin: 0 0 10px !important;
  font-family: var(--os-mono) !important;
  font-size: .64rem !important;
  letter-spacing: .2em !important;
  text-transform: uppercase;
  color: var(--os-gold) !important;
}
.hero-lede, .dash-hero p {
  max-width: 620px;
  margin: 0 !important;
  color: var(--os-dim) !important;
  font-size: .86rem !important;
  line-height: 1.65;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--os-line-strong);
  border-radius: 8px;
  background: rgba(255,255,255,.03);
  color: var(--os-text);
  font-family: var(--os-mono);
  font-size: .64rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: transform var(--os-transition), border-color var(--os-transition), background var(--os-transition);
}
.btn-hero:hover { transform: translateY(-1px); border-color: rgba(201,163,92,.42); color: #fff; }
.btn-hero-primary { background: var(--os-gold); border-color: var(--os-gold); color: #070a0d; }
.btn-hero-primary:hover { background: #dfb972; color: #070a0d; }

/* ---------- KPI / stats ---------- */
.stats-strip, .stat-strip {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
  gap: 9px !important;
  margin: 0 0 18px !important;
}
.stat-chip, .stat-card {
  position: relative;
  padding: 15px 15px 13px !important;
  border: 1px solid var(--os-line) !important;
  border-radius: 12px !important;
  background: linear-gradient(180deg, rgba(255,255,255,.022), transparent 60%), var(--os-panel) !important;
  text-align: left !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
  transition: border-color var(--os-transition), transform var(--os-transition);
}
.stat-chip:hover, .stat-card:hover { border-color: rgba(201,163,92,.28) !important; transform: translateY(-1px); }
.stat-icon { display: flex; color: var(--os-gold); opacity: .9; margin-bottom: 8px; }
.stat-value, .stat-num {
  display: block;
  font-family: var(--os-mono) !important;
  font-size: 1.7rem !important;
  font-weight: 500 !important;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--os-text) !important;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  display: block;
  margin-top: 7px !important;
  font-family: var(--os-mono) !important;
  font-size: .56rem !important;
  letter-spacing: .13em !important;
  text-transform: uppercase;
  color: var(--os-muted) !important;
}

/* ---------- sections / cards ---------- */
.svc-section { margin: 24px 0 0; }
.svc-cat-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 9px !important;
  font-family: var(--os-mono) !important;
  font-size: .58rem !important;
  font-weight: 500 !important;
  letter-spacing: .16em !important;
  text-transform: uppercase;
  color: var(--os-muted) !important;
}
.svc-cat-title::after { content: ''; flex: 1; height: 1px; background: var(--os-line); }
.service-grid { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important; gap: 9px !important; }
.service-card {
  position: relative;
  display: flex !important;
  flex-direction: column;
  min-height: 132px;
  padding: 18px !important;
  border: 1px solid var(--os-line) !important;
  border-radius: var(--os-radius) !important;
  background: linear-gradient(180deg, rgba(255,255,255,.02), transparent 55%), var(--os-panel) !important;
  color: var(--os-text) !important;
  overflow: hidden;
  transition: transform var(--os-transition), border-color var(--os-transition), background var(--os-transition);
}
.service-card:hover {
  transform: translateY(-2px);
  border-color: rgba(201,163,92,.30) !important;
  background: linear-gradient(180deg, rgba(201,163,92,.045), transparent 55%), var(--os-panel) !important;
}
.service-card h2 { margin: 12px 0 5px !important; font-size: .9rem !important; font-weight: 600 !important; letter-spacing: -.01em; color: var(--os-text) !important; }
.service-card p { margin: 0 !important; font-size: .75rem !important; line-height: 1.55; color: var(--os-muted) !important; }
.service-icon { display: flex; color: var(--os-gold); opacity: .9; }
.card-arrow {
  position: absolute;
  right: 16px; top: 16px;
  color: var(--os-muted) !important;
  font-family: var(--os-mono);
  transition: transform var(--os-transition), color var(--os-transition);
}
.service-card:hover .card-arrow { transform: translate(2px, -2px); color: var(--os-green) !important; }

.dash-grid { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 9px !important; }
.dash-card {
  padding: 18px !important;
  border: 1px solid var(--os-line) !important;
  border-radius: var(--os-radius) !important;
  background: linear-gradient(180deg, rgba(255,255,255,.02), transparent 55%), var(--os-panel) !important;
}
.dash-card h2 {
  margin: 0 0 12px !important;
  font-family: var(--os-mono) !important;
  font-size: .58rem !important;
  font-weight: 500 !important;
  letter-spacing: .15em !important;
  text-transform: uppercase;
  color: var(--os-green) !important;
}
.dash-card li { border-bottom-color: var(--os-line) !important; }
.skill-tag {
  border-color: rgba(201,163,92,.24) !important;
  background: rgba(201,163,92,.06) !important;
  color: var(--os-gold) !important;
  border-radius: 6px !important;
  font-family: var(--os-mono);
  font-size: .59rem !important;
}

/* ---------- tables / forms / misc ---------- */
body.os-body table { width: 100%; border-collapse: collapse; }
body.os-body th {
  font-family: var(--os-mono);
  font-size: .57rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--os-muted);
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--os-line-strong);
}
body.os-body td { padding: 10px; border-bottom: 1px solid var(--os-line); font-size: .78rem; color: var(--os-dim); }
body.os-body tr:hover td { background: rgba(255,255,255,.018); }
body.os-body input, body.os-body select, body.os-body textarea {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--os-line-strong);
  border-radius: 8px;
  background: rgba(5,8,12,.65);
  color: var(--os-text);
  font-family: var(--os-sans);
  font-size: .84rem;
  transition: border-color var(--os-transition), box-shadow var(--os-transition);
}
body.os-body input:focus, body.os-body select:focus, body.os-body textarea:focus {
  outline: none;
  border-color: var(--os-gold);
  box-shadow: 0 0 0 3px rgba(201,163,92,.10);
}
body.os-body label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--os-mono);
  font-size: .57rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--os-muted);
}

/* ---------- public pages ---------- */
.os-public { overflow-x: hidden; }
.os-public .pub-shell { position: relative; z-index: 2; min-height: 100vh; display: flex; flex-direction: column; padding: 22px 28px 18px; }
.pub-top { display: flex; align-items: center; gap: 18px; }
.pub-brand { display: flex; align-items: baseline; gap: 3px; font-family: var(--os-mono); font-size: 1.15rem; font-weight: 600; letter-spacing: -.03em; color: #fff; }
.pub-brand span { color: var(--os-gold); }
.pub-top .os-pill { margin-left: 2px; }
.pub-top-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.pub-main { flex: 1; display: flex; flex-direction: column; justify-content: center; width: min(1120px, 100%); margin: 0 auto; padding: 44px 0 26px; }
.pub-eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font-family: var(--os-mono); font-size: .64rem; letter-spacing: .17em; text-transform: uppercase; color: var(--os-green); }
.pub-eyebrow::before { content: ''; width: 26px; height: 1px; background: var(--os-green); opacity: .7; }
.pub-title { margin: 0; font-size: clamp(3.8rem, 12vw, 9rem); line-height: .82; letter-spacing: -.075em; font-weight: 800; color: #f4f7f9; }
.pub-title span { color: var(--os-gold); }
.pub-sub { max-width: 560px; margin: 22px 0 0; color: var(--os-dim); font-size: clamp(.9rem, 1.4vw, 1.02rem); line-height: 1.65; }
.pub-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.pub-bento { display: grid; grid-template-columns: 1.35fr .65fr .65fr; gap: 9px; margin-top: 42px; }
.pub-bento .os-panel { padding: 17px; min-height: 104px; }
.pub-focus { grid-row: span 2; min-height: 216px; display: flex; flex-direction: column; justify-content: space-between; }
.pub-focus h2 { margin: 8px 0 6px; font-size: 1.32rem; letter-spacing: -.03em; font-weight: 600; color: #f1f5f7; }
.pub-focus p { margin: 0; max-width: 400px; color: var(--os-muted); font-size: .78rem; line-height: 1.6; }
.pub-focus .focus-line { display: flex; align-items: center; gap: 9px; margin-top: 18px; font-family: var(--os-mono); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: var(--os-green); }
.pub-metric { display: flex; flex-direction: column; justify-content: space-between; }
.pub-metric .value { font-family: var(--os-mono); font-size: 1.7rem; letter-spacing: -.03em; color: var(--os-text); }
.pub-metric .meta { font-family: var(--os-mono); font-size: .56rem; letter-spacing: .12em; text-transform: uppercase; color: var(--os-muted); }
.pub-foot { display: flex; align-items: center; gap: 16px; width: min(1120px, 100%); margin: 0 auto; padding-top: 16px; border-top: 1px solid var(--os-line); font-family: var(--os-mono); font-size: .58rem; letter-spacing: .09em; text-transform: uppercase; color: var(--os-muted); }
.pub-foot .right { margin-left: auto; }
.pub-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: .75; }

/* login */
.login-shell { position: relative; z-index: 2; min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; }
.login-aside { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 34px; border-right: 1px solid var(--os-line); overflow: hidden; }
.login-aside::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 15% 10%, rgba(201,163,92,.16), transparent 48%), radial-gradient(ellipse at 90% 90%, rgba(61,242,161,.07), transparent 42%); pointer-events: none; }
.login-aside > * { position: relative; z-index: 1; }
.login-aside .aside-kicker { font-family: var(--os-mono); font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: var(--os-green); }
.login-aside h1 { margin: 12px 0 0; font-size: clamp(2rem, 4vw, 3.5rem); line-height: .94; letter-spacing: -.06em; font-weight: 700; }
.login-aside h1 span { color: var(--os-gold); }
.login-aside p { max-width: 420px; margin: 16px 0 0; color: var(--os-dim); font-size: .86rem; line-height: 1.65; }
.login-status { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.login-right { display: flex; align-items: center; justify-content: center; padding: 28px; }
.login-card { width: min(380px, 100%); padding: 28px 26px 24px; }
.login-card .brand-mark { font-family: var(--os-mono); font-size: 1.18rem; font-weight: 600; letter-spacing: -.03em; }
.login-card .brand-mark span { color: var(--os-gold); }
.login-card .subtitle { margin: 5px 0 22px; font-family: var(--os-mono); font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; color: var(--os-muted); }
.login-card .subtitle::before { content: '// '; color: var(--os-green); }
.field { margin-bottom: 12px; }
.field label { display: block; margin-bottom: 6px; font-family: var(--os-mono); font-size: .57rem; letter-spacing: .12em; text-transform: uppercase; color: var(--os-muted); }
.field input { width: 100%; padding: 11px 12px; border: 1px solid var(--os-line-strong); border-radius: 8px; background: rgba(5,8,12,.62); color: var(--os-text); font-size: .88rem; }
.field input:focus { outline: none; border-color: var(--os-gold); box-shadow: 0 0 0 3px rgba(201,163,92,.10); }
.field .pw-wrap { position: relative; }
.field .pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--os-muted); font-family: var(--os-mono); font-size: .56rem; letter-spacing: .06em; cursor: pointer; padding: 4px; }
.field .pw-toggle:hover { color: var(--os-gold); }
.btn-primary { width: 100%; min-height: 42px; margin-top: 6px; border: 1px solid var(--os-gold); border-radius: 8px; background: var(--os-gold); color: #070a0d; font-family: var(--os-mono); font-size: .68rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; cursor: pointer; transition: transform var(--os-transition), box-shadow var(--os-transition), background var(--os-transition); }
.btn-primary:hover { background: #dfb972; box-shadow: 0 0 28px rgba(201,163,92,.20); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.forgot { margin-top: 16px; text-align: center; font-family: var(--os-mono); font-size: .62rem; }
.forgot a { color: var(--os-muted); }
.forgot a:hover { color: var(--os-gold); }
.login-footer { margin-top: 18px; text-align: center; font-family: var(--os-mono); font-size: .55rem; letter-spacing: .12em; color: var(--os-muted); opacity: .7; }
.flash-messages { margin-bottom: 14px; }
.flash { padding: 8px 10px; border: 1px solid; border-radius: 7px; margin-bottom: 6px; font-family: var(--os-mono); font-size: .66rem; }
.flash.error { border-color: rgba(255,93,108,.4); color: var(--os-red); background: rgba(255,93,108,.06); }
.flash.success { border-color: rgba(61,242,161,.4); color: var(--os-green); background: rgba(61,242,161,.06); }
.flash.info { border-color: rgba(201,163,92,.35); color: var(--os-gold); background: rgba(201,163,92,.06); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  body.os-body { padding-left: 0; }
  body.os-body .topbar { left: 0; padding: 0 16px; }
  .os-rail { display: none; }
  body.os-body > main, body.os-body .portal-main, body.os-body .dash-main,
  body.os-body .files-main, body.os-body .knowledge-main, body.os-body .status-main,
  body.os-body .admin-main, body.os-body .profile-main,
  body.os-body .portal-main { width: calc(100% - 32px); padding-top: 78px; }
  .pub-bento { grid-template-columns: 1fr 1fr; }
  .pub-focus { grid-column: 1 / -1; grid-row: auto; }
  .login-shell { grid-template-columns: 1fr; }
  .login-aside { display: none; }
}
@media (max-width: 680px) {
  .os-public .pub-shell { padding: 16px 16px 14px; }
  .pub-top { flex-wrap: wrap; }
  .pub-top-right { width: 100%; margin-left: 0; }
  .pub-main { padding-top: 34px; }
  .pub-title { font-size: clamp(3.2rem, 18vw, 5.4rem); }
  .pub-bento { grid-template-columns: 1fr; }
  .pub-focus { grid-column: auto; }
  .pub-foot { flex-wrap: wrap; gap: 8px; }
  .pub-foot .right { width: 100%; margin-left: 0; }
  .stats-strip, .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .dash-grid { grid-template-columns: 1fr !important; }
  body.os-body .topbar { gap: 8px; }
  .os-command { display: none; }
  .os-top-meta { font-size: .54rem; }
}
/* ---------- 404 / signal lost ---------- */
.os-pill.red { color: var(--os-red); border-color: rgba(255,93,108,.28); }
.os-pill.red .os-dot { background: var(--os-red); box-shadow: 0 0 12px var(--os-red); }
.pub-top-link { margin-left: auto; color: var(--os-dim); font: 500 .62rem var(--os-mono); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; }
.pub-top-link:hover { color: var(--os-gold); }
.os-error { position: relative; z-index: 2; width: min(920px, calc(100% - 40px)); margin: 0 auto; padding: clamp(80px, 16vh, 180px) 0 40px; }
.os-error-code { font: 300 clamp(7rem, 22vw, 16rem)/.8 var(--os-mono); letter-spacing: -.08em; color: var(--os-gold); text-shadow: 0 0 80px rgba(201,163,92,.15); }
.os-error .os-kicker { margin-top: 26px; }
.os-error h1 { margin: 10px 0 14px; font-size: clamp(2rem, 5vw, 3.8rem); letter-spacing: -.045em; font-weight: 300; }
.os-error h1 span { color: var(--os-gold); }
.os-error > p:not(.os-kicker) { max-width: 480px; color: var(--os-dim); font-size: .95rem; line-height: 1.7; }
.os-error-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.os-error-meta { display: flex; gap: 10px 24px; flex-wrap: wrap; margin-top: 64px; padding-top: 16px; border-top: 1px solid var(--os-line); font: 500 .6rem var(--os-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--os-muted); }
.os-error-meta span:not(#os-clock) { color: var(--os-gold); }

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

/* ---------- 2026-10-27 visual QA refinements ---------- */
:root {
  --os-dim: #a9b5c1;
  --os-muted: #8291a0;
  --os-line: rgba(255, 255, 255, 0.09);
}

/* Keep bento cards from stretching into one huge empty card. */
body.os-body .service-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 330px)) !important;
  justify-content: start;
}
body.os-body .service-card { min-height: 138px; }
body.os-body .service-card p { color: var(--os-dim) !important; }
body.os-body .stat-label { color: var(--os-muted) !important; letter-spacing: .11em !important; }

/* Files page: a real themed picker instead of native chrome. */
.form-field { margin-bottom: 12px; }
.form-field > label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--os-mono);
  font-size: .58rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--os-dim);
}
.form-help { margin: 5px 0 0; color: var(--os-muted); font-size: .68rem; line-height: 1.45; }
.file-picker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px dashed rgba(201,163,92,.32);
  border-radius: 8px;
  background: rgba(201,163,92,.035);
  color: var(--os-dim);
  cursor: pointer;
  transition: border-color var(--os-transition), background var(--os-transition);
}
.file-picker:hover { border-color: rgba(201,163,92,.58); background: rgba(201,163,92,.065); }
.file-picker input[type="file"] {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}
.file-pick-btn {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--os-line-strong);
  border-radius: 6px;
  color: var(--os-gold);
  font-family: var(--os-mono);
  font-size: .6rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
}
.file-pick-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--os-mono);
  font-size: .68rem;
}
.file-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  color: var(--os-red);
  font-size: .75rem;
}
.file-error .os-btn { min-height: 30px; font-size: .6rem; }
.file-empty { text-align: left; }
.file-date { opacity: .78; }
.files-toolbar .btn-sm { min-height: 32px; }

/* Top bar exists on desktop; expose navigation when the rail collapses. */
@media (max-width: 1080px) {
  body.os-body .topbar .brand { display: flex; min-width: max-content; }
  body.os-body .topbar .brand a { font-family: var(--os-mono); font-size: .78rem; }
  body.os-body .topbar .nav-links {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    font-family: var(--os-mono);
    font-size: .62rem;
    letter-spacing: .06em;
    text-transform: uppercase;
  }
  body.os-body .topbar .nav-links::-webkit-scrollbar { display: none; }
  body.os-body .topbar .nav-links a { color: var(--os-dim); }
  body.os-body .topbar .os-top-meta { display: none; }
}
@media (max-width: 680px) {
  body.os-body .topbar { height: 52px; padding: 0 12px; gap: 10px; }
  body.os-body .topbar .brand a { font-size: .7rem; }
  body.os-body .topbar .nav-links { gap: 11px; font-size: .57rem; }
  body.os-body .files-header { gap: 8px; }
  body.os-body .file-row { flex-wrap: wrap; gap: 6px; }
  body.os-body .file-size, body.os-body .file-date { min-width: 0; }
  body.os-body .file-name { flex-basis: calc(100% - 28px); }
  body.os-body .service-grid { grid-template-columns: 1fr !important; }
}

body.os-body .file-picker { display: flex; align-items: center; }
body.os-body .file-picker input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }

body.os-body .topbar .os-top-context {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
  font-family: var(--os-mono);
  font-size: .62rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--os-muted);
}
body.os-body .topbar .os-crumb-brand { color: var(--os-text); font-weight: 600; letter-spacing: -.02em; text-transform: none; font-size: .72rem; }
body.os-body .topbar .os-crumb-sep { color: var(--os-gold); opacity: .7; }
body.os-body .topbar .os-crumb-current { color: var(--os-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.os-body .topbar .nav-links a.is-current { color: var(--os-gold); }
.os-page-heading { margin: 5px 0 4px !important; font-family: var(--os-display) !important; font-size: 2.4rem !important; font-weight: 600 !important; letter-spacing: -.035em !important; color: #f4f1ea; }
.os-page-lede { margin: 0 0 22px; color: var(--os-dim); font-size: .87rem; }
@media (max-width: 1080px) {
  body.os-body .topbar .os-top-context { display: none; }
}

body.os-body .btn:disabled, body.os-body .btn-primary:disabled { opacity: .42; cursor: not-allowed; transform: none; box-shadow: none; }
body.os-body input:required, body.os-body textarea:required { border-left: 2px solid rgba(201,163,92,.55); }

/* ==========================================================================
   THE EXP — PORTAL V2 / 2026-10-28
   A calmer shell, editorial hierarchy, and a real command-centre home.
   ========================================================================== */
:root {
  --os-bg: #05070b;
  --os-bg-2: #080c12;
  --os-panel: rgba(12, 17, 24, .88);
  --os-panel-2: #0d141c;
  --os-line: rgba(255,255,255,.085);
  --os-line-strong: rgba(255,255,255,.16);
  --os-gold: #c9a35c;
  --os-gold-soft: rgba(201,163,92,.12);
  --os-green: #45e0a2;
  --os-red: #ff6575;
  --os-amber: #f6b45d;
  --os-text: #eef3f7;
  --os-dim: #b4c0cb;
  --os-muted: #8b99a7;
  --os-display: 'Cormorant Garamond', Georgia, serif;
  --os-radius: 18px;
  --os-radius-sm: 10px;
  --os-shadow: 0 28px 90px -32px rgba(0,0,0,.9);
}

body.os-body {
  background:
    radial-gradient(ellipse at 18% -8%, rgba(201,163,92,.095), transparent 38%),
    radial-gradient(ellipse at 92% 18%, rgba(69,224,162,.035), transparent 32%),
    var(--os-bg);
  font-size: 15px;
  line-height: 1.55;
}

body.os-body::before { opacity: .65; }
body.os-body::after { opacity: .18; }

body.os-body .os-rail {
  width: 248px;
  padding: 24px 16px 18px;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(201,163,92,.075), transparent 42%),
    linear-gradient(180deg, #080d14, #05080c 72%);
}
body.os-body { padding-left: 248px; }
body.os-body .topbar { left: 248px; height: 64px; padding: 0 28px; }
.os-brand { font-size: 1.08rem; padding: 2px 9px 26px; }
.os-rail-label { padding: 16px 10px 8px; font-size: .58rem; letter-spacing: .19em; }
.os-rail nav a { min-height: 42px; padding: 9px 11px; font-size: .76rem; }
.os-rail nav a.is-active { background: linear-gradient(90deg, rgba(201,163,92,.15), rgba(201,163,92,.025)); }
.os-rail nav a.is-active::before { left: -16px; }
.os-rail-foot { padding-top: 16px; font-size: .55rem; }

body.os-body > main,
body.os-body .portal-main,
body.os-body .dash-main,
body.os-body .files-main,
body.os-body .knowledge-main,
body.os-body .status-main,
body.os-body .admin-main,
body.os-body .profile-main {
  width: min(1280px, calc(100% - 56px));
  padding: 96px 0 72px;
}
body.os-body .portal-main { width: min(1280px, calc(100% - 56px)); }

body.os-body .topbar .os-top-context { font-size: .6rem; }
body.os-body .topbar .os-crumb-brand { font-size: .76rem; }
body.os-body .os-command { min-width: 250px; height: 34px; border-radius: 9px; background: rgba(255,255,255,.028); }
body.os-body .os-pill { min-height: 28px; }

/* Typography: display for statements, sans for UI, mono for telemetry. */
body.os-body h1, body.os-body h2, body.os-body h3 { letter-spacing: -.025em; }
body.os-body h1 { font-family: var(--os-display); font-weight: 600; }
body.os-body .os-label, body.os-body .stat-label, body.os-body .svc-cat-title { font-family: var(--os-mono); }
body.os-body .os-label { font-size: .59rem; letter-spacing: .16em; color: var(--os-muted); }

/* Shared panels */
.os-panel, body.os-body .os-panel, body.os-body .service-card, body.os-body .dash-card,
body.os-body .stat-card, body.os-body .form-card, body.os-body .guide-card, body.os-body .kb-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.025), transparent 46%),
    var(--os-panel);
  border-color: var(--os-line);
  border-radius: var(--os-radius);
  box-shadow: var(--os-shadow), inset 0 1px 0 rgba(255,255,255,.035);
}

/* Focus + motion */
body.os-body a:focus-visible, body.os-body button:focus-visible, body.os-body input:focus-visible {
  outline: 2px solid var(--os-gold);
  outline-offset: 3px;
}
body.os-body .os-dot { animation: osPulse 3.4s ease-in-out infinite; }
@keyframes osPulse { 0%,100% { opacity: .82; } 50% { opacity: 1; box-shadow: 0 0 0 4px rgba(69,224,162,.08), 0 0 18px rgba(69,224,162,.6); } }

/* --------------------------------------------------------------------------
   Home: command centre
   -------------------------------------------------------------------------- */
.command-main { display: flex; flex-direction: column; gap: 16px; }

.command-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(220px, .55fr);
  gap: 26px;
  align-items: center;
  min-height: 280px;
  padding: 34px 36px !important;
  border: 1px solid rgba(201,163,92,.18) !important;
  border-radius: 22px !important;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(201,163,92,.19), transparent 46%),
    radial-gradient(ellipse at 100% 100%, rgba(69,224,162,.055), transparent 36%),
    linear-gradient(135deg, rgba(255,255,255,.03), transparent 60%),
    var(--os-panel) !important;
  box-shadow: 0 36px 100px -40px rgba(0,0,0,.95), inset 0 1px 0 rgba(255,255,255,.045) !important;
}
.command-hero::before {
  content: '';
  position: absolute; top: 0; left: 36px; right: 36px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,163,92,.55), transparent);
}
.command-kicker {
  display: flex; align-items: center; gap: 9px;
  margin-bottom: 16px;
  color: var(--os-green); font: 500 .61rem var(--os-mono);
  letter-spacing: .17em; text-transform: uppercase;
}
.command-hero h1 {
  max-width: 700px;
  margin: 0 0 12px !important;
  font-family: var(--os-display) !important;
  font-size: clamp(2.45rem, 5vw, 4.4rem) !important;
  font-weight: 600 !important;
  line-height: .95 !important;
  letter-spacing: -.045em !important;
  color: #f7f4ed !important;
}
.command-hero h1 em { font-style: italic; color: var(--os-gold); }
.command-lede { max-width: 570px; margin: 0; color: var(--os-dim); font-size: .92rem; line-height: 1.7; }
.command-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.command-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.signal-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; }
.signal-item { display: flex; align-items: flex-start; gap: 9px; padding: 10px 13px; border: 1px solid rgba(246,180,93,.24); border-radius: 10px; background: rgba(246,180,93,.055); color: #f0d3a4; font-size: .76rem; line-height: 1.45; }
.signal-item.danger { border-color: rgba(255,101,117,.28); background: rgba(255,101,117,.06); color: #ffc3c9; }
.signal-mark { flex: 0 0 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid currentColor; border-radius: 50%; font: 600 .58rem var(--os-mono); }

.command-orbit { display: flex; justify-content: center; align-items: center; min-height: 180px; position: relative; }
.orbit-ring {
  position: relative; width: 162px; height: 162px; border-radius: 50%;
  border: 1px solid rgba(201,163,92,.28);
  background: radial-gradient(circle, rgba(201,163,92,.12), transparent 64%);
  box-shadow: 0 0 0 18px rgba(201,163,92,.025), 0 0 0 36px rgba(201,163,92,.012);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.orbit-ring::before { content: ''; position: absolute; inset: 10px; border: 1px dashed rgba(69,224,162,.18); border-radius: 50%; }
.orbit-ring strong { font: 600 2.35rem/1 var(--os-mono); color: var(--os-gold); letter-spacing: -.07em; }
.orbit-ring span { margin-top: 5px; color: var(--os-muted); font: .56rem var(--os-mono); letter-spacing: .14em; text-transform: uppercase; }
.orbit-caption { position: absolute; bottom: 3px; color: var(--os-green); font: .53rem var(--os-mono); letter-spacing: .16em; text-transform: uppercase; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.metric-card {
  position: relative; overflow: hidden;
  padding: 18px 18px 16px; border: 1px solid var(--os-line); border-radius: 15px;
  background: linear-gradient(145deg, rgba(255,255,255,.035), rgba(255,255,255,.008)), var(--os-panel);
}
.metric-card::after { content: ''; position: absolute; right: -18px; bottom: -32px; width: 88px; height: 88px; border: 1px solid rgba(201,163,92,.09); border-radius: 50%; }
.metric-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.metric-icon { color: var(--os-gold); opacity: .85; }
.metric-value { margin-top: 15px; font: 600 1.8rem/1 var(--os-mono); color: var(--os-text); letter-spacing: -.06em; }
.metric-label { margin-top: 7px; color: var(--os-muted); font: .58rem var(--os-mono); letter-spacing: .12em; text-transform: uppercase; }
.metric-hint { margin-top: 8px; color: var(--os-dim); font-size: .7rem; line-height: 1.4; }

.overview-grid { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); gap: 16px; }
.overview-panel { padding: 21px 22px; border: 1px solid var(--os-line); border-radius: var(--os-radius); background: var(--os-panel); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 13px; border-bottom: 1px solid var(--os-line); }
.panel-head h2 { margin: 0; font-family: var(--os-sans); font-size: .78rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--os-text); }
.panel-head .os-label { margin-top: 4px; }
.panel-index { color: var(--os-gold); font: .58rem var(--os-mono); letter-spacing: .1em; }
.focus-list { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.focus-item { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid rgba(255,255,255,.045); color: var(--os-text); }
.focus-item:last-child { border-bottom: 0; }
.focus-item:hover { color: var(--os-gold); }
.focus-item .focus-icon { flex: 0 0 28px; color: var(--os-gold); }
.focus-item .focus-copy { min-width: 0; flex: 1; }
.focus-item strong { display: block; font-size: .82rem; font-weight: 500; }
.focus-item small { display: block; margin-top: 2px; color: var(--os-muted); font-size: .7rem; }
.focus-item .focus-arrow { color: var(--os-muted); font-family: var(--os-mono); }
.live-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 15px; }
.live-cell { padding: 11px 12px; border: 1px solid rgba(255,255,255,.065); border-radius: 10px; background: rgba(255,255,255,.018); }
.live-cell strong { display: block; color: var(--os-text); font: 600 1.05rem var(--os-mono); letter-spacing: -.04em; }
.live-cell span { display: block; margin-top: 4px; color: var(--os-muted); font: .56rem var(--os-mono); letter-spacing: .1em; text-transform: uppercase; }
.live-note { margin-top: 13px; color: var(--os-muted); font-size: .7rem; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 10px; }
.section-head h2 { margin: 0; font-family: var(--os-sans); font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.section-head .os-label { margin-top: 4px; }
.section-count { color: var(--os-muted); font: .58rem var(--os-mono); }
body.os-body .service-grid { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(248px, 1fr)) !important; gap: 10px !important; }
body.os-body .service-card { min-height: 156px; padding: 17px 18px !important; }
body.os-body .service-card h2 { margin: 9px 0 5px !important; font-family: var(--os-display) !important; font-size: 1.38rem !important; font-weight: 600 !important; letter-spacing: -.02em; }
body.os-body .service-card p { color: var(--os-dim) !important; font-size: .76rem !important; line-height: 1.55; }
body.os-body .service-icon { color: var(--os-gold) !important; }
body.os-body .card-arrow { color: var(--os-gold) !important; }

/* --------------------------------------------------------------------------
   Dashboard
   -------------------------------------------------------------------------- */
.dash-main { display: flex; flex-direction: column; gap: 14px; }
.dash-hero { min-height: 176px !important; padding: 28px 30px !important; margin-bottom: 0 !important; }
.dash-hero h1 { font-family: var(--os-display) !important; font-size: clamp(2.1rem, 3.6vw, 3.1rem) !important; font-weight: 600 !important; letter-spacing: -.04em !important; color: #f7f4ed !important; }
.dash-hero p { max-width: 600px; }
.dash-hero::after { width: 72px; height: 72px; right: 30px; top: 22px; }
.stat-strip { margin: 0 !important; gap: 10px !important; }
body.os-body .stat-card { padding: 15px 16px !important; text-align: left !important; min-height: 92px; }
body.os-body .stat-num { color: var(--os-gold) !important; font-size: 1.55rem !important; letter-spacing: -.05em; }
body.os-body .stat-label { color: var(--os-muted) !important; font-size: .56rem !important; letter-spacing: .12em !important; }
.dash-grid { gap: 12px !important; }
body.os-body .dash-card { padding: 18px 19px !important; }
body.os-body .dash-card h2 { margin-bottom: 11px !important; color: var(--os-text) !important; font-family: var(--os-sans) !important; font-size: .72rem !important; font-weight: 600 !important; letter-spacing: .11em !important; }
body.os-body .dash-card li { padding: 8px 0 !important; border-color: rgba(255,255,255,.045) !important; font-size: .76rem !important; }
body.os-body .dash-card .empty { color: var(--os-muted) !important; }
body.os-body .skill-tag { border-radius: 6px !important; background: rgba(201,163,92,.06) !important; border-color: rgba(201,163,92,.18) !important; font-size: .62rem !important; }

/* --------------------------------------------------------------------------
   Files / knowledge / admin / status / profile
   -------------------------------------------------------------------------- */
.files-main { max-width: none !important; }
.files-box, body.os-body .files-box { max-width: none; width: 100%; }
.files-header { padding-bottom: 14px; margin-bottom: 8px; }
.files-toolbar .btn-sm { min-height: 34px; }
.dir-row, .file-row { min-height: 38px; }
.dir-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 4px 12px; }
.dir-row { border-radius: 7px; padding: 7px 9px; }
.dir-row:hover, .file-row:hover { background: rgba(201,163,92,.055); }
.guide-card { padding: 18px 20px; }
.guide-grid { grid-template-columns: 1fr 1fr; }

.kb-main { width: min(980px, 100%); padding: 96px 0 64px; margin: 0 auto; }
.kb-main h1 { font-family: var(--os-display); font-size: 2.5rem; font-weight: 600; }
.kb-list { display: block !important; }
.kb-group { margin-top: 24px; }
.kb-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--os-line); }
.kb-group-count { color: var(--os-muted); font: .58rem var(--os-mono); letter-spacing: .08em; text-transform: uppercase; }
.kb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; margin-top: 10px; }
.kb-card { padding: 18px 19px; }
.kb-card h3 { font-family: var(--os-display); font-size: 1.25rem; }
.kb-card p { font-size: .76rem; color: var(--os-dim); }

.admin-main { width: min(1280px, calc(100% - 56px)); }
.admin-section { margin-bottom: 38px; }
.section-title { font-family: var(--os-mono); font-size: .8rem; letter-spacing: .1em; }
.section-header { padding-bottom: 12px; margin-bottom: 14px; }
body.os-body .form-card { padding: 20px 22px; }
body.os-body .form-card-title { color: var(--os-gold); font-size: .66rem; letter-spacing: .12em; }
.admin-table th { padding: 11px 13px; color: var(--os-muted); }
.admin-table td { padding: 11px 13px; border-color: rgba(255,255,255,.045); }
.admin-table tbody tr:hover { background: rgba(201,163,92,.055); }
#agent-os-panel, .agent-os-panel { border-radius: var(--os-radius); }

.status-main, .profile-main { width: min(1120px, calc(100% - 56px)); }
body.os-body .status-card, body.os-body .profile-card { border-radius: 15px; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  body.os-body { padding-left: 0; }
  body.os-body .topbar { left: 0; padding: 0 18px; }
  body.os-body > main, body.os-body .portal-main, body.os-body .dash-main,
  body.os-body .files-main, body.os-body .knowledge-main, body.os-body .status-main,
  body.os-body .admin-main, body.os-body .profile-main { width: calc(100% - 36px); padding-top: 82px; }
  .command-hero { grid-template-columns: 1fr; min-height: 0; padding: 30px 28px !important; }
  .command-orbit { display: none; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .overview-grid { grid-template-columns: 1fr; }
  .signal-strip { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  body.os-body .topbar { height: 54px; padding: 0 12px; }
  body.os-body .topbar .brand { flex: 0 0 auto; }
  body.os-body .topbar .nav-links { flex-wrap: nowrap; overflow-x: auto; max-width: calc(100vw - 92px); gap: 4px; font-size: .56rem; }
  body.os-body .topbar .nav-links a { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 44px; padding: 0 5px; }
  body.os-body .topbar .nav-links::-webkit-scrollbar { display: none; }
  body.os-body .topbar .nav-links { scrollbar-width: none; }
  body.os-body > main, body.os-body .portal-main, body.os-body .dash-main,
  body.os-body .files-main, body.os-body .knowledge-main, body.os-body .status-main,
  body.os-body .admin-main, body.os-body .profile-main { width: calc(100% - 28px); padding-top: 74px; }
  .command-hero { padding: 24px 20px !important; border-radius: 16px !important; }
  .command-hero h1 { font-size: 2.45rem !important; }
  .metric-grid, .live-grid, .stat-strip, .stats-strip { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  .overview-panel { padding: 17px 16px; }
  .section-head { margin-top: 4px; }
  .service-grid { grid-template-columns: 1fr !important; }
  .dash-grid { grid-template-columns: 1fr !important; }
  .guide-grid { grid-template-columns: 1fr !important; }
  .kb-main { padding-top: 82px; }
  .kb-list { grid-template-columns: 1fr; }
  .os-top-meta { display: none !important; }
  .os-brand small { display: none; }
}


/* --------------------------------------------------------------------------
   Company pulse — home intelligence band
   -------------------------------------------------------------------------- */
.intel-band {
  position: relative;
  padding: 22px 24px;
  border: 1px solid rgba(201,163,92,.20);
  border-radius: 20px;
  background:
    radial-gradient(900px 280px at 0% 0%, rgba(201,163,92,.10), transparent 58%),
    radial-gradient(700px 260px at 100% 100%, rgba(69,224,162,.045), transparent 62%),
    linear-gradient(145deg, rgba(255,255,255,.026), transparent 55%),
    var(--os-panel);
  box-shadow: 0 28px 70px -38px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.04);
}
.intel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--os-line); }
.intel-head h2 { margin: 3px 0 0; font-family: var(--os-display); font-size: 1.55rem; font-weight: 600; letter-spacing: -.03em; color: var(--os-text); }
.intel-head-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.intel-link { color: var(--os-gold); font: .62rem var(--os-mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.intel-link:hover { color: var(--os-green); }
.intel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 12px; }
.intel-card {
  position: relative; overflow: hidden; display: block; min-height: 170px;
  padding: 16px 17px; border: 1px solid rgba(255,255,255,.075); border-radius: 14px;
  background: linear-gradient(160deg, rgba(255,255,255,.035), rgba(255,255,255,.005) 62%), rgba(7,11,17,.68);
  color: var(--os-text); text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.intel-card:hover { transform: translateY(-2px); border-color: rgba(201,163,92,.38); box-shadow: 0 18px 42px -24px rgba(201,163,92,.35); }
.intel-card::after { content: ''; position: absolute; right: -28px; bottom: -44px; width: 130px; height: 130px; border: 1px solid rgba(201,163,92,.10); border-radius: 50%; }
.intel-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.intel-icon { color: var(--os-gold); display: inline-flex; }
.intel-mini { color: var(--os-muted); font: .54rem var(--os-mono); letter-spacing: .1em; text-transform: uppercase; }
.intel-big { margin-top: 18px; font: 600 2.5rem/.9 var(--os-mono); letter-spacing: -.08em; color: var(--os-gold); }
.intel-label { margin-top: 8px; color: var(--os-dim); font-size: .72rem; }
.intel-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 13px; }
.intel-chips span { padding: 3px 6px; border: 1px solid rgba(201,163,92,.16); border-radius: 999px; color: var(--os-muted); font: .54rem var(--os-mono); }
.intel-chips b { color: var(--os-gold); font-weight: 500; }
.intel-foot { position: absolute; left: 17px; right: 17px; bottom: 13px; color: var(--os-muted); font: .54rem var(--os-mono); letter-spacing: .04em; }
.intel-foot span { color: var(--os-dim); }
.intel-doc-list { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.intel-doc { display: flex; align-items: flex-start; gap: 8px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.05); color: var(--os-text); }
.intel-doc:last-child { border-bottom: 0; }
.intel-doc:hover strong { color: var(--os-gold); }
.intel-doc-mark { color: var(--os-gold); font: .65rem var(--os-mono); opacity: .7; margin-top: 1px; }
.intel-doc-copy { min-width: 0; }
.intel-doc-copy strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .76rem; font-weight: 500; line-height: 1.3; }
.intel-doc-copy small { display: block; margin-top: 2px; color: var(--os-muted); font: .52rem var(--os-mono); letter-spacing: .03em; }
.intel-empty { padding: 18px 0; color: var(--os-muted); font-size: .74rem; }
.intel-agent-value { margin-top: 20px; color: var(--os-text); font: 600 1.8rem/1 var(--os-mono); letter-spacing: -.07em; }
.intel-agent-value small { color: var(--os-muted); font: .55rem var(--os-mono); letter-spacing: .04em; }
.intel-agent-line { display: flex; align-items: center; gap: 7px; margin-top: 10px; color: var(--os-green); font: .56rem var(--os-mono); letter-spacing: .04em; }
.intel-agent-note { margin: 12px 0 0; color: var(--os-dim); font-size: .69rem; line-height: 1.5; }
.intel-sales-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 14px; }
.intel-sales-grid div { padding: 8px 6px; border: 1px solid rgba(255,255,255,.065); border-radius: 8px; background: rgba(255,255,255,.018); }
.intel-sales-grid strong { display: block; color: var(--os-text); font: 600 1.02rem var(--os-mono); letter-spacing: -.05em; }
.intel-sales-grid span { display: block; margin-top: 3px; color: var(--os-muted); font: .48rem var(--os-mono); letter-spacing: .05em; text-transform: uppercase; line-height: 1.3; }
@media (max-width: 1080px) {
  .intel-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .intel-card { min-height: 158px; }
}
@media (max-width: 680px) {
  .intel-band { padding: 16px; border-radius: 16px; }
  .intel-head { align-items: flex-start; flex-direction: column; gap: 8px; }
  .intel-head h2 { font-size: 1.3rem; }
  .intel-grid { grid-template-columns: 1fr; }
  .intel-card { min-height: 0; padding-bottom: 34px; }
  .intel-big { font-size: 2rem; }
}

/* --------------------------------------------------------------------------
   Knowledge — searchable company memory library
   -------------------------------------------------------------------------- */
.knowledge-main.kb-library { width: min(1180px, calc(100% - 56px)); margin: 0 auto; padding: 92px 0 56px; }
.kb-hero { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(260px,.55fr); gap: 28px; align-items: center; padding: 30px 32px; border: 1px solid rgba(201,163,92,.18); border-radius: 22px; background: radial-gradient(ellipse at 0 0, rgba(201,163,92,.16), transparent 55%), linear-gradient(145deg, rgba(255,255,255,.035), transparent 62%), var(--os-panel); box-shadow: 0 30px 80px -42px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.04); }
.kb-hero h1 { margin: 12px 0 10px; font-family: var(--os-display); font-size: clamp(2.5rem,5vw,4.2rem); line-height: .95; letter-spacing: -.05em; font-weight: 600; color: #f7f4ed; }
.kb-hero h1 em { color: var(--os-gold); font-style: italic; }
.kb-hero p { max-width: 620px; margin: 0; color: var(--os-dim); font-size: .9rem; line-height: 1.72; }
.kb-hero-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 20px; }
.kb-hero-side { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.kb-side-stat { padding: 13px 14px; border: 1px solid rgba(255,255,255,.07); border-radius: 11px; background: rgba(255,255,255,.022); }
.kb-side-stat strong { display: block; color: var(--os-gold); font: 600 1.55rem/1 var(--os-mono); letter-spacing: -.06em; }
.kb-side-stat span { display: block; margin-top: 5px; color: var(--os-muted); font: .52rem var(--os-mono); letter-spacing: .07em; text-transform: uppercase; line-height: 1.35; }
.kb-side-note { grid-column: 1 / -1; display: flex; align-items: center; gap: 7px; padding: 9px 2px 0; color: var(--os-green); font: .56rem var(--os-mono); letter-spacing: .04em; }
.kb-toolbar { margin-top: 14px; padding: 13px 15px; border: 1px solid var(--os-line); border-radius: 14px; background: rgba(255,255,255,.018); }
.kb-search-wrap { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 9px; background: rgba(6,10,16,.75); color: var(--os-muted); }
.kb-search-wrap svg { flex: 0 0 auto; color: var(--os-gold); }
.kb-search-wrap input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--os-text); font: .82rem var(--os-sans); }
.kb-search-wrap input::placeholder { color: var(--os-muted); }
.kb-search-wrap kbd { border: 1px solid rgba(255,255,255,.12); border-radius: 5px; padding: 2px 6px; color: var(--os-muted); font: .56rem var(--os-mono); }
.kb-chips { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 10px; }
.kb-chip { cursor: pointer; border: 1px solid rgba(255,255,255,.09); border-radius: 999px; padding: 5px 9px; background: transparent; color: var(--os-muted); font: .57rem var(--os-mono); letter-spacing: .04em; transition: all .15s ease; }
.kb-chip b { color: var(--os-dim); font-weight: 500; margin-left: 2px; }
.kb-chip:hover { border-color: rgba(201,163,92,.35); color: var(--os-text); }
.kb-chip.is-active { border-color: rgba(201,163,92,.55); background: rgba(201,163,92,.12); color: var(--os-gold); }
.kb-result-line { margin-top: 9px; color: var(--os-muted); font: .56rem var(--os-mono); letter-spacing: .05em; }
.kb-lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px,1fr)); gap: 10px; margin-top: 14px; }
.kb-doc-card { display: flex; flex-direction: column; min-height: 190px; padding: 16px 17px; border: 1px solid var(--os-line); border-radius: 14px; background: linear-gradient(160deg, rgba(255,255,255,.032), rgba(255,255,255,.006) 62%), var(--os-panel); color: var(--os-text); text-decoration: none; transition: border-color .18s, transform .18s, box-shadow .18s; }
.kb-doc-card:hover { border-color: rgba(201,163,92,.42); transform: translateY(-2px); box-shadow: 0 18px 38px -26px rgba(201,163,92,.35); }
.kb-doc-card[hidden] { display: none !important; }
.kb-doc-top { display: flex; justify-content: space-between; gap: 8px; color: var(--os-muted); font: .52rem var(--os-mono); letter-spacing: .07em; text-transform: uppercase; }
.kb-cat { color: var(--os-gold); }
.kb-date { color: var(--os-muted); }
.kb-doc-card h3 { margin: 12px 0 7px; font-family: var(--os-display); font-size: 1.28rem; line-height: 1.12; letter-spacing: -.025em; font-weight: 600; }
.kb-doc-card p { flex: 1; margin: 0; color: var(--os-dim); font-size: .74rem; line-height: 1.58; }
.kb-doc-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 13px; padding-top: 9px; border-top: 1px solid rgba(255,255,255,.06); color: var(--os-muted); font: .53rem var(--os-mono); letter-spacing: .04em; }
.kb-open { color: var(--os-gold); }
.kb-open span { margin-left: 3px; }
.kb-empty-state { grid-column: 1 / -1; padding: 30px; border: 1px dashed rgba(201,163,92,.22); border-radius: 12px; color: var(--os-muted); text-align: center; font-size: .8rem; }
@media (max-width: 1080px) {
  .knowledge-main.kb-library { width: calc(100% - 36px); padding-top: 82px; }
  .kb-hero { grid-template-columns: 1fr; padding: 24px 22px; }
  .kb-hero-side { grid-template-columns: 1fr 1fr; }
  .kb-side-note { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  .knowledge-main.kb-library { width: calc(100% - 28px); padding-top: 74px; }
  .kb-hero { padding: 20px 18px; border-radius: 16px; }
  .kb-hero h1 { font-size: 2.55rem; }
  .kb-hero-side { grid-template-columns: 1fr 1fr; }
  .kb-side-stat { padding: 10px; }
  .kb-side-stat strong { font-size: 1.3rem; }
  .kb-lib-grid { grid-template-columns: 1fr; }
  .kb-doc-card { min-height: 0; }
}
