/* ==========================================================================
   Cocon-Stats mockups — Unifiber design system
   Tokens and component classes lifted from the unifiber-design skill.
   Shared by every mockup screen so the chrome stays identical while we iterate.
   ========================================================================== */

:root {
  --uf-purple: #84257a;
  --uf-rose: #ed125f;
  --uf-orange: #f47b3b;
  --uf-anthracite: #4f4a54;
  --brand-gradient: linear-gradient(135deg, #84257a 0%, #ed125f 55%, #f47b3b 100%);
}

/* Gradient page titles and the sidebar wordmark. The only gradient text on a screen. */
.gradient-text {
  background: linear-gradient(135deg, #ed125f, #f47b3b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Section header bands, app mark, avatars. Never behind readable content. */
.gradient-band { background: var(--brand-gradient); }

.gradient-btn {
  background: var(--brand-gradient);
  color: #fff;
  transition: all .2s ease;
}
.gradient-btn:hover {
  box-shadow: 0 8px 25px rgba(237, 18, 95, .35);
  transform: translateY(-1px);
}

/* Glass cards — KPI tiles only inside the app. */
.glass-card {
  background: rgba(255, 255, 255, .65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, .5);
  box-shadow: 0 4px 24px rgba(0, 0, 0, .06);
}

/* ---------- Unauthenticated screens (the one full-bleed gradient) ---------- */
.bg-scene {
  background: var(--brand-gradient);
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
  background-attachment: fixed;
}
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.glass-card-login {
  background: rgba(255, 255, 255, .22);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, .25);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .3);
}
.glass-input {
  background: rgba(255, 255, 255, .14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .25);
  color: #fff;
  transition: all .2s ease;
}
.glass-input::placeholder { color: rgba(255, 255, 255, .5); }
.glass-input:focus {
  outline: none;
  border-color: #ed125f;
  background: rgba(255, 255, 255, .22);
  box-shadow: 0 0 0 3px rgba(237, 18, 95, .25);
}
.glass-outline-btn {
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all .2s ease;
}
.glass-outline-btn:hover {
  background: rgba(255, 255, 255, .18);
  border-color: rgba(255, 255, 255, .4);
  transform: translateY(-1px);
}
.divider-text { display: flex; align-items: center; gap: 1rem; }
.divider-text::before,
.divider-text::after { content: ''; flex: 1; height: 1px; background: rgba(255, 255, 255, .22); }

/* ---------- Navigation ---------- */
.nav-item { transition: background-color .2s ease, color .2s ease; }
.nav-item:hover:not(.nav-item-active) { background: rgba(0, 0, 0, .03); }
.nav-item-active {
  color: #ed125f;
  background: linear-gradient(90deg, rgba(237, 18, 95, .08), transparent);
  border-right: 3px solid #ed125f;
}

.custom-scrollbar::-webkit-scrollbar { width: 4px; height: 8px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 2px; }

/* ---------- Status pills ----------
   10px bold uppercase, .08em tracking, 50/200/700 tinted trio. Closed vocabulary. */
.pill {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  border-radius: 9999px;
  border-width: 1px;
  border-style: solid;
  padding: 2px 8px;
  font-size: 10px;
  line-height: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  white-space: nowrap;
}
.pill-dot { width: 6px; height: 6px; border-radius: 9999px; flex-shrink: 0; }

.pill-blue    { background: #eff6ff; border-color: #bedbfe; color: #1d4fd7; }
.pill-amber   { background: #fffbeb; border-color: #fde68a; color: #b45309; }
.pill-violet  { background: #f5f3ff; border-color: #ddd6fe; color: #6d28d9; }
.pill-emerald { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.pill-slate   { background: #f8fafc; border-color: #e2e8f0; color: #64748b; }
.pill-orange  { background: #fff7ed; border-color: #fed7aa; color: #c2410c; }
.pill-red     { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.pill-purple  { background: #faf5ff; border-color: #e9d5ff; color: #7e22ce; }
.pill-rose    { background: rgba(237,18,95,.08); border-color: rgba(237,18,95,.25); color: #ed125f; }

/* ---------- Tables ----------
   Header cells are slate, never gradient (readme "Extra notes"). The gradient
   lives in a separate band above the panel. */
.tbl { width: 100%; font-size: 12px; border-collapse: separate; border-spacing: 0; }
.tbl thead th {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #94a3b8;
  text-align: left;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 10;
}
.tbl tbody td { padding: 12px 16px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background-color .15s ease; }
.tbl tbody tr:hover { background: rgba(237, 18, 95, .03); }
.tbl .num { font-variant-numeric: tabular-nums; }

.sort-header { cursor: pointer; user-select: none; }
.sort-header:hover { color: #ed125f; }

/* ---------- Form controls ---------- */
.field {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #334155;
  transition: all .2s ease;
}
.field:focus {
  outline: none;
  border-color: rgba(237, 18, 95, .4);
  box-shadow: 0 0 0 3px rgba(237, 18, 95, .2);
}
.field::placeholder { color: #94a3b8; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: all .2s ease;
  white-space: nowrap;
}
.btn-sm { height: 32px; padding: 0 12px; font-size: 11px; border-radius: 6px; }
.btn-outline { background: #fff; border: 1px solid #e2e8f0; color: #334155; }
.btn-outline:hover { background: #f8fafc; color: #0f172a; }
.btn-ghost { background: transparent; color: #475569; }
.btn-ghost:hover { background: #f1f5f9; }
.btn:disabled { opacity: .5; pointer-events: none; }

/* Filter pills */
.chip {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  height: 32px;
  padding: 0 12px;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  transition: all .15s ease;
  white-space: nowrap;
}
.chip:hover { border-color: #ed125f; color: #ed125f; }
.chip-active {
  background: linear-gradient(135deg, #ed125f, #f47b3b);
  border-color: transparent;
  color: #fff;
}
.chip-active:hover { color: #fff; }

/* Active-filter echo chips */
.chip-echo {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: 3px 10px;
  border-radius: 9999px;
  background: rgba(237, 18, 95, .10);
  border: 1px solid rgba(237, 18, 95, .20);
  color: #ed125f;
  font-size: 11px;
  font-weight: 600;
}

/* Tick box — the drawing control's main instrument */
.tick {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: all .15s ease;
}
.tick:checked { background: linear-gradient(135deg, #ed125f, #f47b3b); border-color: transparent; }
.tick:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.tick:hover { border-color: #ed125f; }
.tick:focus { outline: none; box-shadow: 0 0 0 3px rgba(237, 18, 95, .2); }

/* Cards */
.card { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; }
.card-accent-rose       { border-left: 4px solid #ed125f; }
.card-accent-purple     { border-left: 4px solid #84257a; }
.card-accent-orange     { border-left: 4px solid #f47b3b; }
.card-accent-anthracite { border-left: 4px solid #4f4a54; }
.card-accent-red        { border-left: 4px solid #dc2626; }
.card-accent-emerald    { border-left: 4px solid #10b981; }

.eyebrow {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #94a3b8;
}

.mono { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; }

/* Mockup harness banner */
.harness-banner {
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  color: #b45309;
}

/* Skeleton rows — no shimmer, per the motion rules */
.skeleton { background: #f1f5f9; border-radius: 6px; }

/* Charts */
.chart-grid line { stroke: #f1f5f9; stroke-width: 1; }
.chart-axis { font-size: 10px; fill: #94a3b8; }

/* Value labels sit above the bars and are part of the data, not decoration — so they
   are darker than the axis and use the tabular figures the rest of the app uses. */
.chart-val {
  font-size: 9px;
  font-weight: 700;
  fill: #475569;
  font-variant-numeric: tabular-nums;
  pointer-events: none;      /* never steal the hover from the bar underneath */
}

/* Hover: the bar lifts, its own label goes full-strength anthracite, and the native
   <title> supplies the tooltip. No animation on the data itself — only on the hint. */
.bar rect { transition: opacity .12s ease; }
svg:hover .bar rect { opacity: .55; }
svg:hover .bar:hover rect { opacity: 1; }
.bar:hover .chart-val { fill: #1e293b; font-size: 10px; }

/* ---------- Mockup banner offset ----------
   The banner is fixed to the top, so the sidebar and the sticky top bar have to
   start below it. --banner-h is measured by shell.js and re-measured on resize. */
#cs-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 50; }
body.has-shell { padding-top: var(--banner-h, 0px); }
.cs-offset-top { top: var(--banner-h, 0px); }

/* Table cells stay on one line; the panel scrolls sideways instead of the row
   growing four lines tall. Add .wrap to a cell that genuinely needs to wrap. */
.tbl tbody td { white-space: nowrap; }
.tbl tbody td.wrap { white-space: normal; }

/* Numeric pills (ages) keep their own casing — "402 DAYS" reads, "402D" does not. */
.pill-num { text-transform: none; letter-spacing: 0; font-size: 11px; }


/* Disabled controls: half opacity, never a grey recolour. */
.tick:disabled { opacity: .5; cursor: not-allowed; }
