/* ============================================================
   LBOS — Refined layer (v2 exploration)
   Layered ON TOP of lbos.css. Everything is scoped under `.rf`
   so the "Current" baseline artboard renders with stock styles.
   Brand kept: Navy #0B1F3A · Gold #C9A84C — palette & type refined.
   ============================================================ */

.rf {
  /* --- refined brand --- */
  --navy:        #0B1F3A;
  --navy-700:    #11294b;
  --navy-600:    #16335c;
  --navy-900:    #07152a;
  --gold:        #C9A84C;
  --gold-bright: #E4C26A;   /* for use on dark surfaces */
  --gold-soft:   #f3e9cd;
  --gold-tint:   #fbf7ec;

  /* warm-tinted neutrals (subtle vs. the cool stock grays) */
  --paper:   #faf9f7;
  --surface: #ffffff;
  --ink-900: #14213a;
  --ink-700: #3a4256;
  --ink-600: #4b5563;
  --ink-500: #6b7280;
  --ink-400: #9aa1ad;
  --line:    #ece9e3;
  --line-2:  #e3e0d8;

  /* data-viz — matched lightness/chroma, varied hue (oklch) */
  --dv-good:  oklch(0.62 0.09 155);
  --dv-good-bg: oklch(0.95 0.03 155);
  --dv-info:  oklch(0.60 0.10 245);
  --dv-info-bg: oklch(0.95 0.03 245);
  --dv-warn:  oklch(0.70 0.10 75);
  --dv-warn-bg: oklch(0.95 0.04 80);
  --dv-risk:  oklch(0.60 0.14 28);
  --dv-risk-bg: oklch(0.95 0.04 30);

  --rf-shadow-sm: 0 1px 2px rgba(15,28,54,0.05);
  --rf-shadow:    0 2px 4px rgba(15,28,54,0.04), 0 6px 16px rgba(15,28,54,0.06);
  --rf-shadow-lg: 0 12px 32px rgba(15,28,54,0.12);

  font-family: var(--font-ui);
  font-feature-settings: "cv05" 1, "cv08" 1, "ss01" 1;
  color: var(--ink-900);
  -webkit-font-smoothing: antialiased;
}
.rf .tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* ============================================================
   SHELL
   ============================================================ */
.rf-shell { display: flex; min-height: 100%; background: var(--paper); }

.rf-sidebar {
  width: 248px; flex-shrink: 0;
  background: linear-gradient(180deg, var(--navy-700) 0%, var(--navy) 42%, var(--navy-900) 100%);
  display: flex; flex-direction: column;
  color: #fff;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
}
.rf-sidebar::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 1px;
  background: linear-gradient(180deg, transparent, rgba(201,168,76,0.25), transparent);
}

.rf-logo { padding: 1.5rem 1.4rem 1.25rem; display: flex; align-items: center; gap: 0.7rem; }
.rf-logo-mark {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  display: flex; align-items: center; justify-content: center;
  color: var(--navy-900); font-weight: 800; font-size: 0.95rem; letter-spacing: -0.04em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 2px 8px rgba(201,168,76,0.3);
}
.rf-logo-text .wm { font-size: 1.18rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.rf-logo-text .wm span { color: var(--gold-bright); }
.rf-logo-text .tag { font-size: 0.62rem; color: rgba(255,255,255,0.5); letter-spacing: 0.06em; text-transform: uppercase; margin-top: 0.3rem; }

.rf-nav { overflow: visible; padding: 0.5rem 0.7rem 0.5rem; }
.rf-nav::-webkit-scrollbar { width: 3px; }
.rf-nav::-webkit-scrollbar-track { background: transparent; }
.rf-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
.rf-nav-label {
  font-size: 0.62rem; font-weight: 700; color: rgba(255,255,255,0.55);
  text-transform: uppercase; letter-spacing: 0.14em; padding: 0.9rem 0.7rem 0.4rem;
}
.rf-nav-item {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.5rem 0.7rem; border-radius: 8px; margin-bottom: 1px;
  font-size: 0.9rem; font-weight: 600; color: rgba(255,255,255,0.88);
  text-decoration: none; cursor: pointer; position: relative;
  transition: background 0.13s, color 0.13s;
}
.rf-nav-item .rf-ico { color: rgba(255,255,255,0.75); transition: color 0.13s; }
.rf-nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; text-decoration: none; }
.rf-nav-item:hover .rf-ico { color: var(--gold-bright); }
.rf-nav-item.active { background: rgba(201,168,76,0.14); color: #fff; }
.rf-nav-item.active .rf-ico { color: var(--gold-bright); }
.rf-nav-item.active::before {
  content: ""; position: absolute; left: -0.7rem; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--gold-bright);
}
.rf-nav-item.sub { padding-left: 2.3rem; font-size: 0.79rem; font-weight: 500; color: rgba(255,255,255,0.6); }
.rf-nav-badge {
  margin-left: auto; background: var(--gold); color: var(--navy-900);
  font-size: 0.64rem; font-weight: 800; padding: 0.05rem 0.4rem; border-radius: 999px;
}

.rf-userbox {
  margin: 0 0.7rem; padding: 0.7rem; border-top: 1px solid rgba(255,255,255,0.09);
  display: flex; align-items: center; gap: 0.6rem;
}
.rf-userbox .av {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: rgba(201,168,76,0.18); color: var(--gold-bright);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.8rem;
}
.rf-userbox .nm { font-size: 0.8rem; font-weight: 700; color: #fff; line-height: 1.2; }
.rf-userbox .rl { font-size: 0.66rem; color: var(--gold-bright); text-transform: uppercase; letter-spacing: 0.05em; }

/* main */
.rf-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.rf-topbar {
  height: 52px; background: rgba(255,255,255,0.85); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.6rem; flex-shrink: 0;
  position: relative; z-index: 50;
}
.rf-crumb { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; color: var(--ink-400); }
.rf-crumb b { color: var(--navy); font-weight: 700; font-size: 0.95rem; }
.rf-topbar-actions { display: flex; align-items: center; gap: 0.6rem; }
.rf-search {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--paper); border: 1px solid var(--line-2); border-radius: 999px;
  padding: 0.4rem 0.9rem; color: var(--ink-400); font-size: 0.8rem; width: 200px;
}

.rf-content { padding: 1.6rem 1.8rem; }

/* ============================================================
   BUTTONS / PILLS
   ============================================================ */
.rf-btn {
  display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer;
  border-radius: 8px; font-weight: 700; font-size: 0.82rem; padding: 0.5rem 0.95rem;
  border: 1px solid transparent; transition: all 0.13s; white-space: nowrap; font-family: var(--font-ui);
}
.rf-btn-primary { background: var(--gold); color: var(--navy-900); box-shadow: 0 1px 2px rgba(168,135,46,0.3); }
.rf-btn-primary:hover { background: var(--gold-bright); transform: translateY(-1px); box-shadow: var(--rf-shadow); }
.rf-btn-dark { background: var(--navy); color: #fff; }
.rf-btn-dark:hover { background: var(--navy-600); }
.rf-btn-ghost { background: var(--surface); color: var(--ink-700); border-color: var(--line-2); }
.rf-btn-ghost:hover { border-color: var(--ink-400); color: var(--navy); }
.rf-btn-sm { padding: 0.35rem 0.7rem; font-size: 0.75rem; }

.rf-pill {
  display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.7rem; font-weight: 700;
  padding: 0.15rem 0.55rem; border-radius: 999px; letter-spacing: 0.01em;
}
.rf-pill.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.rf-pill-gold { background: var(--gold-tint); color: #8a6d1f; }
.rf-pill-good { background: var(--dv-good-bg); color: var(--dv-good); }
.rf-pill-info { background: var(--dv-info-bg); color: var(--dv-info); }
.rf-pill-warn { background: var(--dv-warn-bg); color: oklch(0.5 0.1 70); }
.rf-pill-risk { background: var(--dv-risk-bg); color: var(--dv-risk); }
.rf-pill-navy { background: var(--navy); color: var(--gold-bright); }

/* ============================================================
   CARDS / SECTIONS
   ============================================================ */
.rf-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--rf-shadow-sm);
}
.rf-card-pad { padding: 1.25rem 1.35rem; }
.rf-sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.9rem; }
.rf-sec-title { font-size: 0.95rem; font-weight: 800; color: var(--navy); letter-spacing: -0.01em; }
.rf-sec-sub { font-size: 0.76rem; color: var(--ink-500); margin-top: 0.1rem; font-weight: 500; }
.rf-eyebrow { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; color: var(--gold); }

/* greeting */
.rf-greet-name { font-size: 1.5rem; font-weight: 800; color: var(--navy); letter-spacing: -0.025em; }
.rf-greet-sub { font-size: 0.84rem; color: var(--ink-500); margin-top: 0.15rem; }

/* ============================================================
   STAT CARDS
   ============================================================ */
.rf-stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 1.05rem 1.2rem; position: relative; overflow: hidden; box-shadow: var(--rf-shadow-sm);
}
.rf-stat-top { display: flex; align-items: center; justify-content: space-between; }
.rf-stat-ico {
  width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: var(--gold-tint); color: var(--gold);
}
.rf-stat-label { font-size: 0.7rem; font-weight: 700; color: var(--ink-500); text-transform: uppercase; letter-spacing: 0.07em; }
.rf-stat-value { font-size: 2rem; font-weight: 800; color: var(--navy); line-height: 1; letter-spacing: -0.03em; margin-top: 0.55rem; }
.rf-stat-meta { font-size: 0.72rem; color: var(--ink-400); margin-top: 0.5rem; display: flex; align-items: center; gap: 0.35rem; }
.rf-delta { font-weight: 800; display: inline-flex; align-items: center; gap: 0.15rem; }
.rf-delta.up { color: var(--dv-good); }
.rf-delta.down { color: var(--dv-risk); }

/* ============================================================
   AT-RISK ROW CARDS
   ============================================================ */
.rf-risk-row {
  display: flex; align-items: center; gap: 0.9rem; padding: 0.8rem 0;
  border-top: 1px solid var(--line);
}
.rf-risk-row:first-child { border-top: none; }
.rf-risk-av {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.82rem;
}

/* health meter */
.rf-meter { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; width: 100%; }
.rf-meter > span { display: block; height: 100%; border-radius: 999px; }

/* ============================================================
   SCORE RING (conic)
   ============================================================ */
.rf-ring { position: relative; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.rf-ring::before { content: ""; position: absolute; inset: 8px; background: var(--surface); border-radius: 50%; }
.rf-ring-val { position: relative; font-weight: 800; color: var(--navy); letter-spacing: -0.02em; }

/* maturity distribution bar */
.rf-mat { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--line); }
.rf-mat > span { display: block; height: 100%; }
.rf-mat-legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.1rem; margin-top: 0.8rem; }
.rf-mat-key { display: flex; align-items: center; gap: 0.4rem; font-size: 0.74rem; color: var(--ink-700); font-weight: 600; }
.rf-mat-key i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

/* sparkline wrap */
.rf-spark { width: 100%; height: 38px; display: block; }

/* table refinements */
.rf-table { width: 100%; border-collapse: collapse; font-size: 0.83rem; }
.rf-table th {
  text-align: left; padding: 0.55rem 0.4rem; color: var(--ink-400);
  font-size: 0.66rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  border-bottom: 1px solid var(--line);
}
.rf-table td { padding: 0.7rem 0.4rem; border-bottom: 1px solid var(--line); color: var(--ink-700); vertical-align: middle; }
.rf-table tr:last-child td { border-bottom: none; }
.rf-table tbody tr { transition: background 0.1s; }
.rf-table .co { font-weight: 700; color: var(--navy); }

/* quick action tile */
.rf-qa {
  display: flex; align-items: center; gap: 0.7rem; padding: 0.75rem 0.85rem;
  border: 1px solid var(--line); border-radius: 11px; background: var(--surface);
  cursor: pointer; transition: all 0.13s; text-decoration: none;
}
.rf-qa:hover { border-color: var(--gold); box-shadow: var(--rf-shadow); transform: translateY(-1px); text-decoration: none; }
.rf-qa .qa-ico { width: 34px; height: 34px; border-radius: 9px; background: var(--gold-tint); color: var(--gold); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rf-qa .qa-t { font-size: 0.82rem; font-weight: 700; color: var(--navy); }
.rf-qa .qa-s { font-size: 0.7rem; color: var(--ink-400); }

/* timeline (upcoming) */
.rf-tl-item { display: flex; gap: 0.75rem; padding: 0.55rem 0; }
.rf-tl-time { font-size: 0.72rem; font-weight: 800; color: var(--gold); width: 52px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.rf-tl-dot { position: relative; }
.rf-tl-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); display: block; margin-top: 4px; }
.rf-tl-body { font-size: 0.8rem; }
.rf-tl-body .t { font-weight: 700; color: var(--navy); }
.rf-tl-body .s { color: var(--ink-400); font-size: 0.74rem; }

/* ============================================================
   COMMAND CENTER (variant C) — navy hero band
   ============================================================ */
.rf-hero {
  background: linear-gradient(135deg, var(--navy-700), var(--navy) 55%, var(--navy-900));
  border-radius: 18px; padding: 1.5rem 1.7rem; color: #fff; position: relative; overflow: hidden;
  box-shadow: var(--rf-shadow-lg);
}
.rf-hero::before {
  content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(201,168,76,0.22), transparent 70%);
}
.rf-hero-stat .v { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; }
.rf-hero-stat .l { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.6); font-weight: 700; }
.rf-hero-divider { width: 1px; align-self: stretch; background: rgba(255,255,255,0.12); }

.rf-cc-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--rf-shadow-sm); }

/* focus-overlay: let artboards breathe */
.dc-focus .rf-shell { min-height: 100vh; }
