/* WrapFlo v2 — shared theme. Light, warm-paper + teal, Barlow family. */

:root {
  /* Backgrounds & surfaces */
  --bg:          #F2F0EB;
  --card:        #FFFFFF;
  --card-soft:   #FAF8F3;

  /* Ink / typography */
  --ink:         #141618;
  --ink-soft:    #2E3134;
  --muted:       #8A857A;
  --muted-soft:  #A8A49B;
  --border:      #DDD9CF;
  --border-soft: #EAE6DB;

  /* Brand */
  --teal:        #00897B;   /* primary accent on light surfaces */
  --teal-bright: #00E5CC;   /* pops on the dark dock */
  --spark:       #C8FF00;
  --ink-deep:    #0D0D0D;

  /* Status */
  --good:        #0F9D58;
  --warn:        #E68A00;
  --bad:         #C0392B;

  /* Dock (dark surface) */
  --dock-bg:     #111316;
  --dock-bg-2:   #1A1D20;
  --dock-edge:   #2A2E32;
  --dock-ink:    #C8C4BB;
  --dock-ink-soft: #6E6B63;
}

* { box-sizing: border-box; margin: 0; padding: 0; border-radius: 0 !important; }
html, body { height: 100%; }
body {
  background: var(--bg);
  font-family: 'Barlow', system-ui, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(0,137,123,0.05), transparent 60%),
    radial-gradient(900px 500px at 10% 120%, rgba(200,255,0,0.035), transparent 60%);
}

.wf-mono { font-family: 'IBM Plex Mono', monospace; }

/* ---------- Fields (shared across login / signup / forms) ---------- */
.field { margin-bottom: 14px; }
.field-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 10px; font-weight: 700; letter-spacing: 0.24em;
  color: var(--muted); text-transform: uppercase;
  margin-bottom: 5px;
  display: flex; align-items: center; gap: 8px;
}
.field-label::before {
  content: ""; width: 4px; height: 4px;
  background: var(--teal);
  clip-path: polygon(50% 0%,100% 25%,100% 75%,50% 100%,0 75%,0 25%);
}
.field input, .field textarea, .field select {
  width: 100%; background: var(--card);
  border: 1px solid var(--border);
  border-left: 2px solid var(--teal);
  padding: 12px 14px;
  font-family: 'Barlow', sans-serif;
  font-size: 14px; color: var(--ink);
  outline: none;
  transition: border-color .15s, background .15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--teal); background: var(--card-soft);
}
.field input::placeholder { color: var(--muted-soft); }
.field-hint { font-size: 10px; color: var(--muted-soft); margin-top: 4px; letter-spacing: 0.06em; }

/* ---------- Cassette-dark CTA button ---------- */
.cta-dark {
  width: 100%;
  position: relative;
  appearance: none; cursor: pointer; outline: none;
  background: linear-gradient(180deg, #262A2E 0%, #181B1E 100%);
  border: 1px solid #0A0A0A;
  padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px; font-weight: 900; letter-spacing: 0.22em;
  color: var(--spark); text-transform: uppercase;
  transition: transform .08s ease, box-shadow .15s ease;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.07) inset,
    0 -1px 0 rgba(0,0,0,0.5) inset,
    0 3px 0 #000,
    0 5px 10px rgba(0,0,0,0.35);
}
.cta-dark::before {
  content: "";
  position: absolute; top: 0; right: 0;
  width: 14px; height: 14px;
  background: #1C1F22;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
  transition: background .2s, box-shadow .2s;
}
.cta-dark:hover {
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.1) inset,
    0 -1px 0 rgba(0,0,0,0.5) inset,
    0 4px 0 #000,
    0 6px 14px rgba(0,0,0,0.45);
}
.cta-dark:hover::before { background: var(--spark); box-shadow: 0 0 8px rgba(200,255,0,0.6); }
.cta-dark:active {
  transform: translateY(2px);
  box-shadow: 0 2px 3px rgba(0,0,0,0.5) inset, 0 1px 0 #000;
}
.cta-dark:disabled { opacity: 0.55; cursor: wait; transform: none; }
.cta-dark .arrow { font-size: 20px; font-weight: 300; font-family: 'Barlow', sans-serif; }

/* ───────────────────────────────────────────────────────────────────
   Responsive escape hatch — many pages lock their shell to the
   viewport with `height: calc(100vh - 240px)` so a stats sidebar can
   stay put while a list scrolls. That layout breaks at high browser
   zoom or on shorter monitors: the chrome subtraction stays 240px
   but the viewport shrinks, so cards can't fit their content and
   visually "sink" behind the dock.

   Below 1400px width or 820px height, drop the fixed-viewport layout
   on every page-shell variant and let the page scroll naturally.
   Internal scroll panels also go back to natural height so nothing
   stays trapped at a too-small size.
   ─────────────────────────────────────────────────────────────────── */
@media (max-width: 1400px), (max-height: 820px) {
  .dash-fit, .q-shell, .qe, .c-shell, .cd-shell, .m-shell, .np-shell, .set-shell {
    height: auto !important;
    min-height: 0 !important;
  }
  .dash-fit .dash-panel,
  .dash-fit .dash-panel-scroll,
  .q-shell .q-stats,
  .qe-main, .qe-side {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
  /* Once the page scrolls naturally, the .stage's 160px bottom padding
     already clears the 96px dock — no extra spacer needed. */
}
