/* Global + shared primitives — loaded on EVERY page (tokens, reset, card, fields, buttons, links, flash, upload-zone, chips, balance-chip, auth-shell).
   Scoped-delivery split; see docs/superpowers/specs/2026-07-15-css-scoped-delivery-design.md */

/* ════════════════════════════════════════
   Aurora Studio — design tokens
   Sunrise palette · soft AI / generative calm
   Ported from converti2 for the auth app.
════════════════════════════════════════ */

:root {
  --bg-base:        #FFF8F1;
  --ink:            #1A1530;
  --ink-muted:      #6B6580;
  --ink-faint:      #ABA5C0;

  --surface:        rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.88);
  --surface-solid:  #FFFFFF;
  --border-soft:    rgba(26, 21, 48, 0.08);
  --border-mid:     rgba(26, 21, 48, 0.14);
  --border-focus:   rgba(255, 155, 122, 0.55);

  --accent-peach:      #FFC9A8;
  --accent-lavender:   #C9B8FF;
  --accent-mint:       #A8E6CF;
  --accent-coral:      #FF9B7A;
  --accent-coral-deep: #F07A55;

  --gradient-aurora-a: radial-gradient(60% 50% at 20% 10%, var(--accent-peach) 0%, transparent 60%);
  --gradient-aurora-b: radial-gradient(70% 60% at 80% 90%, var(--accent-lavender) 0%, transparent 65%);
  --gradient-aurora-c: radial-gradient(55% 45% at 95% 50%, var(--accent-mint) 0%, transparent 55%);

  --radius-sm:   12px;
  --radius-md:   18px;
  --radius-lg:   28px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 12px rgba(255, 155, 122, 0.08);
  --shadow-md: 0 8px 32px rgba(255, 155, 122, 0.12), 0 2px 8px rgba(26, 21, 48, 0.04);
  --shadow-lg: 0 24px 64px rgba(255, 155, 122, 0.18), 0 8px 24px rgba(26, 21, 48, 0.06);

  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-ui:      'Geist', 'Inter', system-ui, sans-serif;
}

/* ── Canvas ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* The three aurora blobs frame the work without competing with it. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    var(--gradient-aurora-a),
    var(--gradient-aurora-b),
    var(--gradient-aurora-c);
  opacity: 0.55;
  filter: blur(4px);
}

/* ── Auth shell: centers a single card on the canvas ── */
.auth-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.card {
  width: 100%;
  max-width: 400px;
  padding: 40px 36px;
  background: var(--surface-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.card__eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-coral-deep);
  margin: 0 0 6px;
}

.card h1 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  font-size: 30px;
  margin: 0 0 4px;
  color: var(--ink);
}

.card__sub {
  margin: 0 0 28px;
  color: var(--ink-muted);
  font-size: 14px;
}

/* ── Fields ─────────────────────────────── */
.field { margin-bottom: 16px; }

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
}

.field input {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(255, 155, 122, 0.15);
}

.field input::placeholder { color: var(--ink-faint); }

/* A bare label used where there's no <label> element (e.g. the Specs group). */
.field__label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
}

.field textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(255, 155, 122, 0.15);
}
.field textarea::placeholder { color: var(--ink-faint); }

/* Native file input — give the picker button the Aurora ghost look. */
.field input[type="file"] {
  padding: 9px 12px;
  font-size: 13px;
  color: var(--ink-muted);
}
.field input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 7px 16px;
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  background: var(--surface-strong);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.field input[type="file"]::file-selector-button:hover {
  background: var(--surface-solid);
  border-color: var(--ink-muted);
}

/* ── Buttons ────────────────────────────── */
.btn-primary {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 13px 18px;
  font-family: var(--font-ui);
  font-size: 14.5px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-coral) 0%, var(--accent-coral-deep) 100%);
  border: none;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.15s, filter 0.15s;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
  filter: brightness(1.03);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}

.btn-ghost:hover {
  background: var(--surface-strong);
  border-color: var(--ink-muted);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

/* ── Links & switch line ────────────────── */
a { color: var(--accent-coral-deep); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent-coral); }

.switch {
  margin: 22px 0 0;
  text-align: center;
  font-size: 13.5px;
  color: var(--ink-muted);
}

/* ── Flash messages ─────────────────────── */
.flash {
  margin-bottom: 20px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
}
.flash--alert  { background: rgba(220, 38, 38, 0.08); color: #b91c1c; border: 1px solid rgba(220, 38, 38, 0.2); }
.flash--notice { background: rgba(16, 185, 129, 0.10); color: #047857; border: 1px solid rgba(16, 185, 129, 0.22); }

/* Pause/resume control — a status badge beside a small action button. */
.campaign-toggle { display: inline-flex; align-items: center; gap: 10px; }
.campaign-toggle__badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  border-radius: var(--radius-pill);
}
.campaign-toggle--live .campaign-toggle__badge {
  color: #0f7a4d; background: color-mix(in srgb, var(--accent-mint) 40%, var(--surface-strong));
}
.campaign-toggle--paused .campaign-toggle__badge {
  color: var(--ink-muted); background: color-mix(in srgb, var(--ink-faint) 22%, var(--surface-strong));
}
.campaign-toggle__btn {
  padding: 6px 14px; font-family: var(--font-ui); font-size: 12.5px; font-weight: 600; color: var(--ink);
  background: var(--surface-strong); border: 1px solid var(--border-mid); border-radius: var(--radius-pill);
  cursor: pointer; transition: border-color .12s ease, color .12s ease;
}
.campaign-toggle__btn:hover { border-color: var(--accent-coral); color: var(--accent-coral-deep); }
.campaign-toggle__btn--resume:hover { border-color: #0f7a4d; color: #0f7a4d; }
.campaign-toggle form.button_to { margin: 0; }

.upload-zone {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 22px; text-align: center; cursor: pointer;
  background: var(--surface); border: 1px dashed var(--border-mid);
  border-radius: var(--radius-md); transition: border-color .15s, background .15s;
}
.upload-zone.is-dragging { border-color: var(--accent-coral); background: var(--surface-strong); }
.upload-zone__hint { font-size: 13px; color: var(--ink-muted); }
.upload-zone__input { position: absolute; width: 1px; height: 1px; opacity: 0; }

/* Selected-file previews: a wrapping row of capped thumbnails, each with a corner × (multi only). */
.upload-zone__preview:empty { display: none; }
.upload-zone__preview {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
}
.upload-zone__thumb { position: relative; display: inline-flex; }
.upload-zone__preview img,
.upload-zone__preview video {
  width: 96px; height: 96px; object-fit: cover;
  border-radius: var(--radius-sm); background: var(--surface-strong);
}
.upload-zone__remove {
  position: absolute; top: -6px; right: -6px;
  display: grid; place-items: center;
  width: 20px; height: 20px;
  font-size: 13px; line-height: 1; color: #fff;
  background: rgba(0, 0, 0, 0.6); border: 2px solid var(--surface-solid); border-radius: 50%;
  cursor: pointer;
}
.upload-zone__remove:hover { background: var(--accent-coral-deep); }

/* Add button — shared by steps (services, catalog…): a compact centered pill on
   desktop, a round + on mobile. Sits on top of .btn-primary. */
.add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  margin: 12px auto 0;
  padding: 10px 24px;
}
.add-btn__icon { font-size: 18px; line-height: 1; }

@media (max-width: 860px) {
  .add-btn {
    width: 52px;
    height: 52px;
    padding: 0;
    border-radius: 50%;
  }
  .add-btn__label { display: none; }
  .add-btn__icon { font-size: 26px; }
}

/* ── Quick-pick chips — shared by the budget step and the publish add-funds form ── */
.chip {
  padding: 8px 15px; font-family: var(--font-ui); font-size: 13px; font-weight: 600;
  color: var(--ink); background: var(--surface-strong);
  border: 1px solid var(--border-mid); border-radius: var(--radius-pill);
  cursor: pointer; transition: border-color .12s ease, background .12s ease, transform .1s ease;
}
.chip:hover { border-color: var(--accent-coral); }
.chip:active { transform: translateY(1px); }
.chip.is-selected {
  color: var(--accent-coral-deep); border-color: var(--accent-coral);
  background: color-mix(in srgb, var(--accent-coral) 10%, var(--surface-strong));
}

/* Balance chip — shown in the header (wizard topbar + dashboard topbar). */
.balance-chip {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 12px;
  font-family: var(--font-ui); border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--accent-mint) 26%, var(--surface-strong));
  border: 1px solid var(--border-soft); white-space: nowrap;
}
.balance-chip__label { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-muted); }
.balance-chip__amount { font-size: 14px; font-weight: 700; color: var(--ink); }
.wizard__topbar .balance-chip { margin-left: auto; }
.topbar__right { display: flex; align-items: center; gap: 14px; }
.campaign-status__balance { margin: 0; font-size: .9rem; color: var(--ink-muted); }
.campaign-status__fund input[type="number"] {
  width: 100%; padding: 12px 14px; font-family: var(--font-ui); font-size: 15px; color: var(--ink);
  border: 1px solid var(--border-mid); border-radius: var(--radius-md); background: var(--surface);
}
.campaign-status__fund input[type="number"]:focus { outline: none; border-color: var(--accent-coral); }
.campaign-status__presets { display: flex; flex-wrap: wrap; gap: 8px; }
.campaign-status__update, .campaign-status__retry {
  align-self: flex-start; padding: 10px 20px; font-family: var(--font-ui); font-size: 13.5px; font-weight: 600;
  color: #fff; background: linear-gradient(135deg, var(--accent-coral) 0%, var(--accent-coral-deep) 100%);
  border: none; border-radius: var(--radius-pill); box-shadow: var(--shadow-sm); cursor: pointer;
}
.campaign-status__fix { color: var(--accent-coral-deep); font-weight: 600; }
