/* Founder Console skin for django-unfold.
 *
 * The colour ramps live in settings.UNFOLD["COLORS"] — this file carries only
 * what a ramp cannot express: the three typefaces, the dark sidebar rail, and
 * the editorial heading treatment from ~/Desktop/index (1).html.
 *
 * Loaded via UNFOLD["STYLES"]. Written against unfold's own CSS custom
 * properties and utility classes rather than deep element selectors, so a
 * theme upgrade degrades to "slightly off" instead of "unstyled".
 */

@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600;700&family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --ac-ui: 'Inter Tight', -apple-system, system-ui, sans-serif;
  --ac-display: 'Instrument Serif', 'Times New Roman', serif;
  --ac-mono: 'JetBrains Mono', ui-monospace, monospace;

  --ac-rail: linear-gradient(180deg, #1A150F 0%, #15110D 60%, #100C09 100%);
  --ac-on-dark-1: #FAF8F4;
  --ac-on-dark-2: rgba(250, 248, 244, .72);
  --ac-on-dark-3: rgba(250, 248, 244, .42);
  --ac-accent: #C58B43;
  --ac-line: rgba(20, 17, 13, .07);
}

/* ── Type ──────────────────────────────────────────────────────────────── */

body,
.unfold-body,
input, select, textarea, button {
  font-family: var(--ac-ui);
  -webkit-font-smoothing: antialiased;
}

code, pre, .font-mono,
/* Unfold renders ids and datetimes in its mono utility. */
[class*="font-mono"] {
  font-family: var(--ac-mono);
}

/* The mockup's one editorial move: page titles set in the serif, everything
   else in the UI face. Deliberately narrow — applying the serif to every
   heading turns a console into a magazine. */
#content > h1,
.unfold-page-title,
h1.text-font-important-light,
h1.text-font-important-dark {
  font-family: var(--ac-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  font-size: 1.9rem;
  line-height: 1.15;
}

/* Uppercase micro-labels, as in the mockup's section eyebrows. */
.unfold-section-title,
th[scope="col"] {
  font-family: var(--ac-mono);
  font-size: 10.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

/* ── The dark rail ─────────────────────────────────────────────────────── */
/* The console's sidebar is dark against a cream page in BOTH themes — that
   contrast is the layout's spine, so it is not tied to the dark-mode class. */

#nav-sidebar,
.unfold-sidebar,
aside[class*="sidebar"] {
  background: var(--ac-rail);
  border-right: 0;
}

#nav-sidebar a,
.unfold-sidebar a,
aside[class*="sidebar"] a {
  color: var(--ac-on-dark-2);
}

#nav-sidebar a:hover,
.unfold-sidebar a:hover,
aside[class*="sidebar"] a:hover {
  color: var(--ac-on-dark-1);
  background: rgba(250, 248, 244, .06);
}

/* Section headings inside the rail — quieter than the links they group. */
#nav-sidebar h2,
.unfold-sidebar h2 {
  color: var(--ac-on-dark-3);
  font-family: var(--ac-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Current page: a gold spine rather than a filled block, so the rail stays
   calm when several items are visible. */
#nav-sidebar a[aria-current="page"],
.unfold-sidebar a[aria-current="page"] {
  color: var(--ac-on-dark-1);
  background: rgba(197, 139, 67, .14);
  box-shadow: inset 2px 0 0 var(--ac-accent);
}

/* ── Surfaces ──────────────────────────────────────────────────────────── */

/* Hairlines, not borders. The mockup separates with 7%-opacity ink and leans
   on shadow for depth. */
.border,
.border-b,
.border-t,
.border-base-200 {
  border-color: var(--ac-line);
}

/* Primary actions carry the gold gradient from the mockup's CTAs. */
.button:not(.button-secondary),
input[type="submit"],
.submit-row input[type="submit"] {
  background-image: linear-gradient(135deg, #E0A95C 0%, #C58B43 55%, #8E5F22 100%);
  border: 0;
  color: #fff;
  font-weight: 600;
}

/* Keyboard focus stays visible and on-brand. */
:where(a, button, input, select, textarea):focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(197, 139, 67, .22);
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ── Founder Console dashboard (templates/admin/index.html) ─────────────── */

.fc { display: flex; flex-direction: column; gap: 26px; }

.fc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.fc-eyebrow {
  font-family: var(--ac-mono); font-size: 10.5px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ac-accent); margin-bottom: 8px;
}
.fc-greet {
  font-family: var(--ac-display); font-weight: 400; font-size: 2.4rem;
  line-height: 1.1; margin: 0 0 6px; letter-spacing: -.01em;
}
.fc-sub { margin: 0; font-size: 14px; opacity: .72; max-width: 60ch; }
.fc-alert {
  border: 1px solid rgba(196, 66, 50, .35); background: rgba(196, 66, 50, .08);
  color: #C44232; border-radius: 10px; padding: 9px 14px; font-size: 13px;
  font-weight: 600; text-decoration: none; white-space: nowrap;
}

/* Tiles. auto-fit so the row reflows instead of squashing — the mockup's
   4-across becomes 2 or 1 on a laptop without a media query per breakpoint. */
.fc-tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }
.fc-tile {
  border: 1px solid var(--ac-line); border-radius: 14px; padding: 16px 18px;
  background: rgba(255, 255, 255, .55);
  box-shadow: 0 1px 2px rgba(38, 28, 14, .05);
}
.fc-tile-label {
  font-family: var(--ac-mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; opacity: .6; margin-bottom: 10px;
}
.fc-tile-value {
  font-family: var(--ac-display); font-size: 2rem; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.fc-tile-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.fc-tile-note { font-size: 11.5px; opacity: .6; }
.fc-chip { font-size: 11px; font-weight: 600; border-radius: 999px; padding: 2px 7px; }
.fc-chip.up { color: #2F8F4E; background: #DCF1DE; }
.fc-chip.down { color: #C44232; background: #F4DCD6; }

.fc-cols { display: grid; gap: 16px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 900px) { .fc-cols { grid-template-columns: 1fr; } }

.fc-card {
  border: 1px solid var(--ac-line); border-radius: 14px; padding: 18px 20px;
  background: rgba(255, 255, 255, .55);
}
.fc-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.fc-card-head h2 { font-size: 15px; font-weight: 650; margin: 0; }
.fc-card-meta { font-size: 11.5px; opacity: .55; }
.fc-chart { width: 100%; height: 160px; }
.fc-empty { font-size: 13px; opacity: .6; margin: 6px 0; }

.fc-mix { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.fc-mix li { display: grid; grid-template-columns: 90px 1fr auto; align-items: center; gap: 10px; font-size: 12.5px; }
.fc-mix-label { text-transform: capitalize; opacity: .78; }
.fc-mix-bar { background: rgba(20, 17, 13, .07); border-radius: 999px; height: 7px; overflow: hidden; }
.fc-mix-bar i { display: block; height: 100%; background: linear-gradient(90deg, #E0A95C, #C58B43); }
.fc-mix-amt { font-variant-numeric: tabular-nums; font-weight: 600; }

.fc-ops { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.fc-ops li + li { border-top: 1px solid var(--ac-line); }
.fc-ops a { display: flex; align-items: center; gap: 12px; padding: 11px 2px; text-decoration: none; color: inherit; }
.fc-ops a:hover .fc-ops-go { opacity: 1; }
.fc-ops-count {
  min-width: 30px; text-align: center; border-radius: 8px; padding: 3px 7px;
  font-weight: 700; font-size: 12.5px; font-variant-numeric: tabular-nums;
}
.fc-ops-count.warn { color: #8A6212; background: #F4EAD0; }
.fc-ops-count.bad  { color: #C44232; background: #F4DCD6; }
.fc-ops-count.info { color: #3A6FBF; background: #DCE5F4; }
.fc-ops-label { flex: 1; font-size: 13.5px; }
.fc-ops-go { font-size: 12px; color: var(--ac-accent); opacity: .45; transition: opacity .15s; }

.fc-apps { margin-top: 6px; }
.fc-apps-head {
  font-family: var(--ac-mono); font-size: 10.5px; letter-spacing: .16em;
  text-transform: uppercase; opacity: .5; margin: 0 0 12px;
}
