/* ───────────────────────────────────────────────────────────────────────────
   brand.css — Juno INC brand tokens (single source of truth)
   ARIA is a PRODUCT of Juno INC. Operator/company-facing surfaces use the
   Juno orange + white palette below. (Customer-facing chat deliberately
   mimics the host channel — e.g. WhatsApp green — and does NOT use this file.)

   Palette locked from the ARIA logo: orange→deep-red gradient on white.
   Keep these values in sync with docs (PRD §"Brand", railway_deploy.md).
   ─────────────────────────────────────────────────────────────────────────── */
:root {
  --juno-orange:       #F15A24;  /* primary brand orange (logo mid-tone)   */
  --juno-orange-lite:  #FF7A45;  /* gradient start / hover-lighten         */
  --juno-orange-deep:  #D8341A;  /* gradient end / pressed                 */
  --juno-gradient:     linear-gradient(135deg, #FF7A45 0%, #F15A24 50%, #D8341A 100%);

  --juno-ink:          #1A1A1A;  /* primary text                           */
  --juno-muted:        #6B7280;  /* secondary text                         */
  --juno-faint:        #9CA3AF;  /* tertiary / placeholder                 */
  --juno-bg:           #FFFFFF;  /* page background                        */
  --juno-surface:      #FFF8F4;  /* card / panel tint                      */
  --juno-surface-2:    #F3ECE8;  /* image placeholder / deeper tint        */
  --juno-border:       #F0E2DA;  /* hairlines on white                     */
  --juno-border-strong:#E2D2C8;  /* stronger hairline                      */
  --juno-ok:           #16A34A;  /* success / live                         */
  --juno-warn:         #D97706;  /* attention                              */
  --juno-err:          #D8341A;  /* error (reuses deep red)                */

  /* Tinted fills (badges, flashes, focus rings) — were inlined as rgba()   */
  --juno-orange-12:    rgba(241,90,36,.12);
  --juno-orange-15:    rgba(241,90,36,.15);
  --juno-ok-12:        rgba(22,163,74,.12);
  --juno-err-10:       rgba(216,52,26,.10);

  --juno-radius:       12px;
  --juno-shadow:       0 1px 3px rgba(26,26,26,.08), 0 8px 24px rgba(241,90,36,.06);
  --juno-font:         -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--juno-font);
  color: var(--juno-ink);
  background: var(--juno-bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--juno-orange-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Brand bar ─────────────────────────────────────────────────────────── */
.juno-topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 24px;
  background: var(--juno-gradient);
  color: #fff;
  box-shadow: var(--juno-shadow);
}
.juno-topbar .brand-lockup { display: flex; align-items: center; gap: 12px; }
.juno-topbar .brand-logo {
  width: 38px; height: 38px; object-fit: contain;
  background: #fff; border-radius: 9px; padding: 4px;
  box-shadow: 0 1px 4px rgba(26,26,26,.18);
}
.juno-topbar .brand-mark {
  font-weight: 800; font-size: 20px; letter-spacing: .5px;
}
.juno-topbar .brand-sub {
  font-size: 12px; opacity: .9; font-weight: 500;
}
.juno-topbar nav { margin-left: auto; display: flex; gap: 18px; }
.juno-topbar nav a { color: #fff; font-weight: 600; font-size: 14px; }

/* ── Layout ────────────────────────────────────────────────────────────── */
.juno-wrap { max-width: 980px; margin: 0 auto; padding: 28px 24px 64px; }
.juno-card {
  background: var(--juno-bg);
  border: 1px solid var(--juno-border);
  border-radius: var(--juno-radius);
  box-shadow: var(--juno-shadow);
  padding: 22px;
  margin-bottom: 18px;
}
.juno-card h2 { margin: 0 0 4px; font-size: 18px; }
.juno-card .hint { color: var(--juno-muted); font-size: 13px; margin: 0 0 16px; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-block; cursor: pointer;
  border: none; border-radius: 10px;
  padding: 11px 18px; font-size: 14px; font-weight: 700;
  font-family: var(--juno-font);
  background: var(--juno-gradient); color: #fff;
  transition: filter .15s ease, transform .05s ease;
}
.btn:hover { filter: brightness(1.05); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.ghost {
  background: #fff; color: var(--juno-orange-deep);
  border: 1.5px solid var(--juno-orange);
}

/* ── Forms ─────────────────────────────────────────────────────────────── */
label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; }
input, textarea, select {
  width: 100%; padding: 10px 12px; font-size: 14px;
  border: 1px solid var(--juno-border); border-radius: 10px;
  font-family: var(--juno-font); color: var(--juno-ink); background: #fff;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--juno-orange);
  box-shadow: 0 0 0 3px var(--juno-orange-15);
}
textarea { resize: vertical; min-height: 70px; }
.field-note { font-size: 12px; color: var(--juno-muted); margin-top: 4px; }

/* Grouped form sections (onboard wizard) */
.form-section { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--juno-border); }
.form-section:first-of-type { margin-top: 8px; padding-top: 0; border-top: 0; }
.form-section > .sec-label {
  font-size: 12px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase;
  color: var(--juno-orange-deep); margin: 0 0 2px;
}
.form-section > .sec-hint { font-size: 12.5px; color: var(--juno-muted); margin: 0 0 6px; }
/* First label inside a section shouldn't double the top gap */
.form-section > label:first-of-type { margin-top: 10px; }

/* ── Table / list ──────────────────────────────────────────────────────── */
.tenant-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border: 1px solid var(--juno-border);
  border-radius: var(--juno-radius); margin-bottom: 10px;
  background: var(--juno-surface);
}
.tenant-row .meta { flex: 1; }
.tenant-row .meta .name { font-weight: 700; }
.tenant-row .meta .sub { color: var(--juno-muted); font-size: 13px; }
.badge {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .3px;
  background: var(--juno-orange-12); color: var(--juno-orange-deep);
}
.badge.live { background: var(--juno-ok-12); color: var(--juno-ok); }

.lead-item {
  padding: 12px 14px; border-left: 3px solid var(--juno-orange);
  background: var(--juno-surface); border-radius: 8px; margin-bottom: 8px;
}
.lead-item .who { font-weight: 700; }
.lead-item .when { color: var(--juno-muted); font-size: 12px; }

.flash {
  padding: 12px 16px; border-radius: 10px; margin-bottom: 16px;
  background: rgba(22,163,74,.10); color: var(--juno-ok); font-weight: 600;
}
.flash.err { background: var(--juno-err-10); color: var(--juno-orange-deep); }

.empty { text-align: center; color: var(--juno-muted); padding: 40px 0; }

/* ── Multi-select checkbox pills (languages, feature toggles) ─────────────── */
.pillset { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 2px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  font-size: 13.5px; font-weight: 600; color: var(--juno-ink);
  background: var(--juno-surface); border: 1.5px solid var(--juno-border);
  border-radius: 999px; padding: 7px 14px; user-select: none;
  transition: border-color .12s ease, background .12s ease, color .12s ease;
}
/* Native checkbox visually hidden but still focusable/operable (a11y). */
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill:hover { border-color: var(--juno-orange-lite); }
.pill:has(input:checked) {
  background: var(--juno-orange-12); border-color: var(--juno-orange);
  color: var(--juno-orange-deep);
}
.pill:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--juno-orange-15); }
/* Static (read-only) "on" pill — used to DISPLAY enabled options (client side). */
.pill.on {
  cursor: default; background: var(--juno-orange-12);
  border-color: var(--juno-orange); color: var(--juno-orange-deep);
}
/* Fallback for the checked ✓ glyph via a data marker (no :has → still readable) */
.pill .tick { font-weight: 800; opacity: 0; width: 0; transition: opacity .12s; }
.pill:has(input:checked) .tick { opacity: 1; width: auto; }

/* ── Listings intake ───────────────────────────────────────────────────── */
.btn.small { padding: 7px 12px; font-size: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.radio { display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 8px 0 0; }
.radio input { width: auto; }

.listing-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.listing-card {
  border: 1px solid var(--juno-border); border-radius: var(--juno-radius);
  overflow: hidden; background: var(--juno-surface);
}
.listing-thumb { position: relative; aspect-ratio: 4 / 3; background: var(--juno-surface-2); }
.listing-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.listing-thumb .noimg {
  width: 100%; height: 100%; display: grid; place-items: center;
  color: var(--juno-muted); font-size: 13px;
}
.listing-thumb .imgcount {
  position: absolute; right: 8px; bottom: 8px;
  background: rgba(26,26,26,.72); color: #fff;
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
}
.listing-body { padding: 12px 14px; }
.listing-title { font-weight: 700; font-size: 14px; }
.listing-sub { color: var(--juno-muted); font-size: 12px; margin: 2px 0; }
.listing-price { color: var(--juno-orange-deep); font-weight: 800; margin: 4px 0; }
.listing-meta { color: var(--juno-muted); font-size: 12px; }

/* ── Login ─────────────────────────────────────────────────────────────── */
.login-shell {
  min-height: 100vh; display: grid; place-items: center;
  background: linear-gradient(160deg, #fff 0%, var(--juno-surface) 100%);
}
.login-box {
  width: 380px; max-width: 92vw; text-align: center;
  background: #fff; border: 1px solid var(--juno-border);
  border-radius: 18px; box-shadow: var(--juno-shadow); padding: 34px 30px;
}
.login-box .logo {
  width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 18px;
  background: var(--juno-surface); border: 1px solid var(--juno-border);
  display: grid; place-items: center; padding: 12px;
}
.login-box .logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.login-box h1 { font-size: 20px; margin: 0 0 4px; }
.login-box p { color: var(--juno-muted); font-size: 14px; margin: 0 0 20px; }
.devlink {
  margin-top: 18px; padding: 12px; font-size: 12px; word-break: break-all;
  background: var(--juno-surface); border-radius: 10px; color: var(--juno-ink);
}
