:root {
  color-scheme: light dark;
  --bg: #0f1115;
  --panel: #171a21;
  --border: #2a2e38;
  --text: #e7e9ee;
  --muted: #9aa1ad;
  --accent: #e0a940;
  --danger: #d2554a;
  --ok: #4caf7d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}

header.site .brand {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--accent);
  text-decoration: none;
}

header.site .brand small {
  color: var(--muted);
  font-weight: 400;
  margin-left: 8px;
  font-size: 0.75rem;
}

header.site nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 16px;
  font-size: 0.9rem;
}

header.site form { display: inline; }
header.site button.link {
  background: none; border: none; color: var(--muted); cursor: pointer; font-size: 0.9rem; margin-left: 16px;
}

main {
  max-width: 880px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

h1 { font-size: 1.4rem; margin-bottom: 4px; }
h2 { font-size: 1.1rem; margin-top: 28px; color: var(--accent); }
p.sub { color: var(--muted); margin-top: 0; }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 18px;
}

label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 14px 0 4px;
}
label.required::after { content: " *"; color: var(--accent); }

input[type=text], input[type=date], input[type=email], input[type=password], textarea, select {
  width: 100%;
  padding: 8px 10px;
  background: #0d0f13;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}

textarea { min-height: 60px; resize: vertical; }

fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 18px 0;
  padding: 4px 14px 14px;
}
fieldset legend { color: var(--accent); font-size: 0.9rem; padding: 0 6px; }

.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > div { flex: 1; min-width: 160px; }

button, input[type=submit] {
  background: var(--accent);
  color: #1a1400;
  border: none;
  padding: 9px 16px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
}
button.secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
button.danger { background: var(--danger); color: white; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
th { color: var(--muted); font-weight: 500; }
tr:hover td { background: rgba(255,255,255,0.03); }
a { color: var(--accent); }

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge.submitted { background: #3a3620; color: #e0c060; }
.badge.needs_revision { background: #3a2420; color: #e08060; }
.badge.pending_manager { background: #203a3a; color: #60d0d0; }
.badge.routed { background: #203a28; color: #70d090; }
.badge.closed { background: #2a2e38; color: var(--muted); }

.note {
  border-left: 3px solid var(--border);
  padding: 6px 12px;
  margin: 8px 0;
  font-size: 0.88rem;
}
.note .meta { color: var(--muted); font-size: 0.78rem; }
.note.send_back { border-color: var(--danger); }
.note.routed { border-color: var(--ok); }
.note.approved { border-color: var(--accent); }

.error { color: var(--danger); margin: 10px 0; }
.empty { color: var(--muted); padding: 20px 0; }

.login-wrap {
  max-width: 360px;
  margin: 10vh auto;
  text-align: center;
}
.login-wrap .brand { font-size: 1.8rem; color: var(--accent); font-weight: 700; }
.login-wrap .slogan { color: var(--muted); margin-bottom: 24px; }

.cc-row { display: flex; gap: 8px; margin-bottom: 6px; }
.cc-row input { flex: 1; }
.cc-row .cc-remove { padding: 6px 14px; font-size: 1.1rem; line-height: 1; }

.badge.review { background: #3a3620; color: #e0c060; }
.badge.completed { background: #203a28; color: #70d090; }
.badge.routed { background: #20303a; color: #70b0e0; }

nav.site-nav { display: inline-flex; gap: 14px; margin-right: 14px; font-size: 0.9rem; }

.stats { display: flex; flex-wrap: wrap; gap: 14px; }
.stat { flex: 1; min-width: 130px; }
.stat .num { font-size: 1.6rem; font-weight: 700; color: var(--accent); }
.stat .lbl { color: var(--muted); font-size: 0.85rem; }
.range { display: flex; align-items: center; gap: 10px; margin: 14px 0; }
.range label { margin: 0; }
.range select { width: auto; }
.table-wrap { overflow-x: auto; }

.info-request { border-left: 4px solid var(--danger); }
.info-request p { margin: 6px 0 0; }
input[type=file] { color: var(--text); font-size: 0.9rem; margin-top: 4px; max-width: 100%; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin: 8px 0; }
.media-grid figure { margin: 0; }
.media-grid img, .media-grid video { width: 100%; max-height: 220px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); background: #000; display: block; }
.media-grid figcaption { color: var(--muted); font-size: 0.75rem; margin-top: 4px; }

/* ---------- Header pieces ---------- */
header.site { gap: 10px; flex-wrap: wrap; }
.site-right { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 0; }
header.site .who { color: var(--muted); font-size: 0.85rem; }
nav.site-nav a { margin-left: 0; }
img, video { max-width: 100%; }
td.action { white-space: nowrap; }

/* ---------- Phones ---------- */
@media (max-width: 640px) {
  header.site { padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); }
  header.site .brand small { display: none; }
  .site-right { width: 100%; justify-content: space-between; }
  nav.site-nav { order: 2; width: 100%; margin: 6px 0 0; gap: 8px; }
  nav.site-nav a {
    flex: 1; text-align: center; padding: 10px 8px; border: 1px solid var(--border);
    border-radius: 8px; color: var(--text); font-size: 0.95rem;
  }
  header.site button.link { margin-left: 12px; padding: 8px 0; }

  main { padding: 16px 16px 48px; }
  h1 { font-size: 1.25rem; }
  .card { padding: 14px; border-radius: 8px; }
  h2 { margin-top: 8px; }

  /* 16px stops iOS zooming into fields on focus */
  input[type=text], input[type=date], input[type=email], input[type=password], textarea, select {
    font-size: 16px; padding: 10px 12px; min-height: 44px;
  }
  button, input[type=submit] { min-height: 44px; font-size: 1rem; }
  form > button[type=submit], .card form button[type=submit] { width: 100%; }
  .cc-row .cc-remove { width: auto; min-width: 48px; }
  .row > div { min-width: 100%; }

  /* Lists become one card per row */
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px; margin-bottom: 10px; }
  table.stack td { border: none; padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; }
  table.stack td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 0.8rem; }
  table.stack td.action { padding-top: 8px; }
  table.stack td.action a {
    display: block; width: 100%; text-align: center; padding: 10px; border-radius: 6px;
    background: var(--accent); color: #1a1400; font-weight: 600; text-decoration: none;
  }
  tr:hover td { background: none; }

  .media-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat .num { font-size: 1.3rem; }
  .stat { min-width: 40%; }
}

/* ---------- Issue area tags ---------- */
.tag { display: inline-block; padding: 1px 8px; margin: 0 4px 4px 0; border-radius: 4px; font-size: 0.75rem;
  border: 1px solid var(--border); color: var(--text); background: #1f232c; }
.tag.archived { color: var(--muted); text-decoration: line-through; }
.tag.none { color: var(--muted); }
.tags { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; }
h2.required-h::after { content: " *"; color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
label.chip { display: inline-flex; margin: 0; cursor: pointer; }
label.chip input { position: absolute; opacity: 0; pointer-events: none; }
label.chip span { padding: 8px 14px; border: 1px solid var(--border); border-radius: 20px; color: var(--text); font-size: 0.9rem; user-select: none; }
label.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: #1a1400; font-weight: 600; }
label.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
label.chip-none { margin-top: 6px; }
label.chip-none input:checked + span { background: #2a2e38; border-color: var(--muted); color: var(--text); }
#areas-card.missing { border-color: var(--danger); }
#areas-card.missing .sub { color: var(--danger); }

/* ---------- Areas admin ---------- */
.area-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.area-row .sub { font-size: 0.8rem; margin: 0; }
.area-row form button { width: auto; }
.area-add { margin-top: 10px; }
.area-add-row { display: flex; gap: 8px; }
.area-add-row input { flex: 1; }
.area-add-row button { width: auto; }
@media (max-width: 640px) {
  label.chip span { padding: 10px 16px; font-size: 1rem; }
  .card form.area-add button[type=submit], .area-row form button[type=submit] { width: auto; }
}

/* ---------- Per-area issue panels ---------- */
.area-panel { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--accent); border-radius: 8px; background: #1b1f27; }
.area-panel[hidden] { display: none; }
.area-panel h3, .issue h3 { margin: 0 0 4px; font-size: 1rem; color: var(--accent); }
.area-panel label:first-of-type { margin-top: 4px; }
.issue { padding: 10px 0; border-bottom: 1px solid var(--border); }
.issue:last-child { border-bottom: none; }
.issue h3 .tag { font-size: 0.85rem; }
.issue p { margin: 6px 0; white-space: pre-wrap; }

/* ---------- Lost & Found ---------- */
input[type=search] { width: 100%; padding: 8px 10px; background: #0d0f13; border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: 0.95rem; font-family: inherit; }
.lf-list { margin: 0 0 6px; padding-left: 20px; }
.lf-list li { margin: 3px 0; }
.lf-list .badge { margin-left: 6px; }
.lf-meta { font-size: 0.75rem; margin: 2px 0 0; }
.lf-return summary { list-style: none; display: inline-block; background: var(--accent); color: #1a1400; font-weight: 600;
  padding: 9px 16px; border-radius: 6px; cursor: pointer; font-size: 0.9rem; white-space: nowrap; }
.lf-return summary::-webkit-details-marker { display: none; }
.lf-return[open] summary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.lf-return form { margin-top: 8px; min-width: 260px; text-align: left; }
.lf-return label { margin-top: 8px; }
.lf-check { margin: 4px 0; }
.lf-action button { width: auto; white-space: nowrap; }
@media (max-width: 640px) {
  input[type=search] { font-size: 16px; padding: 10px 12px; min-height: 44px; }
  nav.site-nav { flex-wrap: wrap; }
  nav.site-nav a { flex: 1 1 auto; white-space: nowrap; }
  table.stack td[data-label="Description"] { flex-direction: column; gap: 2px; }
  table.stack td.lf-action { display: block; }
  .lf-return, .lf-return summary { display: block; width: 100%; text-align: center; min-height: 44px; }
  .lf-return form { min-width: 0; }
  .lf-action button { width: 100%; }
}

.card-row select { width: auto; flex: 0 0 auto; }
.card-row input[name=lf_card_name] { flex: 1; min-width: 0; }
.card-row input.last4 { flex: 0 0 76px; width: 76px; text-align: center; letter-spacing: 2px; }
@media (max-width: 640px) {
  .card-row { flex-wrap: wrap; padding-bottom: 8px; border-bottom: 1px dashed var(--border); }
  .card-row select { flex: 1 1 40%; }
  .card-row input[name=lf_card_name] { flex: 1 1 100%; order: 3; }
  .card-row input.last4 { flex: 1 1 30%; }
  .card-row .cc-remove { order: 2; }
}

/* ---------- All logs ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 10px 0 14px; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.tabs a { flex: 0 0 auto; padding: 8px 14px; border: 1px solid var(--border); border-radius: 20px; color: var(--text); text-decoration: none; font-size: 0.9rem; white-space: nowrap; }
.tabs a.active { background: var(--accent); border-color: var(--accent); color: #1a1400; font-weight: 600; }
.tabs .count { opacity: 0.7; font-size: 0.8rem; margin-left: 2px; }
td.detail { max-width: 320px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
@media (max-width: 640px) {
  table.stack td.detail { max-width: none; display: block; -webkit-line-clamp: unset; }
  table.stack td.detail::before { display: block; }
}

.company-picker { display: flex; align-items: center; gap: 10px; margin: 6px 0 12px; }
.company-picker label { margin: 0; }
.company-picker select { width: auto; min-width: 200px; }

/* ---------- Per-issue workflow ---------- */
.issue-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.issue-head .tag { font-size: 0.85rem; margin: 0; }
.issue-desc { margin: 8px 0; white-space: pre-wrap; }
.issue.focus { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 4px; }
.info-request.ask { border-left: 4px solid var(--danger); padding: 6px 12px; margin: 8px 0; background: rgba(210,85,74,0.08); }
.info-request.ask p { margin: 4px 0 0; }
.thread { margin: 8px 0; }
.note.needs_info { border-color: var(--danger); }
.note.reply { border-color: var(--accent); }
.note.assign { border-color: #70b0e0; }
.note.completed { border-color: var(--ok); }
.issue-actions { margin-top: 10px; }
.issue-actions summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: 6px 0; }
.issue-form .chips { margin-top: 6px; }
.note-hint { color: var(--muted); font-size: 0.75rem; }
.count-pill { font-size: 0.8rem; color: var(--muted); font-weight: 400; }

a.tag { text-decoration: none; cursor: pointer; }
a.tag:hover, a.tag:focus-visible { border-color: var(--accent); color: var(--accent); }

/* ---------- Brand ---------- */
.brand-mark { width: 26px; height: 26px; vertical-align: -6px; margin-right: 8px; }

/* ---------- Login / contact ---------- */
body.auth { min-height: 100vh; min-height: 100dvh; background: #0a0c10; overflow-x: hidden; }
body.auth main { position: relative; z-index: 1; max-width: none; padding: 0 16px; }
.auth-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(224,169,64,0.10), transparent 60%),
    linear-gradient(180deg, #0b0d12 0%, #0a0c10 100%); }
.auth-bg::before { /* faint grid that fades out toward the edges */
  content: ""; position: absolute; inset: -1px;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%); }
.auth-bg .glow { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55; animation: drift 22s ease-in-out infinite alternate; }
.auth-bg .g1 { width: 46vmax; height: 46vmax; left: -12vmax; top: -14vmax; background: radial-gradient(circle, rgba(224,169,64,0.55), transparent 65%); }
.auth-bg .g2 { width: 40vmax; height: 40vmax; right: -14vmax; top: 20vh; background: radial-gradient(circle, rgba(64,150,170,0.45), transparent 65%); animation-duration: 28s; animation-delay: -6s; }
.auth-bg .g3 { width: 34vmax; height: 34vmax; left: 20vw; bottom: -18vmax; background: radial-gradient(circle, rgba(120,90,200,0.35), transparent 65%); animation-duration: 32s; animation-delay: -12s; }
@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(4vmax, 3vmax, 0) scale(1.08); }
  100% { transform: translate3d(-3vmax, 5vmax, 0) scale(0.96); }
}
@media (prefers-reduced-motion: reduce) { .auth-bg .glow { animation: none; } }

/* Above the fixed background; otherwise plain text (name, tagline, links) is painted under it. */
.auth-wrap { position: relative; z-index: 1; max-width: 380px; margin: 0 auto; padding: 9vh 0 40px; text-align: center; }
.auth-wrap.auth-wide { max-width: 560px; }
.auth-brand { margin-bottom: 22px; }
.auth-logo { width: 64px; height: 64px; filter: drop-shadow(0 10px 30px rgba(224,169,64,0.35)); }
.auth-wordmark { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.02em; margin-top: 10px; color: var(--text); }
.auth-wordmark span { color: var(--accent); }
.auth-slogan { color: var(--muted); font-size: 0.95rem; margin-top: 2px; }
.auth-card { text-align: left; background: rgba(23,26,33,0.72); border-color: rgba(255,255,255,0.08);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 20px 60px rgba(0,0,0,0.45); padding: 22px; }
.auth-h { margin-top: 0; }
.auth-submit { width: 100%; margin-top: 18px; min-height: 44px; font-size: 1rem; }
.auth-foot { color: var(--muted); font-size: 0.9rem; margin-top: 16px; }
.button-link { display: inline-block; margin-top: 8px; background: var(--accent); color: #1a1400; font-weight: 600; padding: 10px 16px; border-radius: 6px; text-decoration: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Platform inbox ---------- */
.msg { padding: 12px 0; border-bottom: 1px solid var(--border); }
.msg:last-child { border-bottom: none; }
.msg.handled { opacity: 0.55; }
.msg-meta { font-size: 0.78rem; margin: 2px 0 0; }
.msg-body { white-space: pre-wrap; margin: 8px 0; }
.msg form button { width: auto; }

/* ---------- About ---------- */
.auth-home { display: inline-block; }
.about-wrap { max-width: 860px; }
.about-hero h1 { font-size: 1.8rem; line-height: 1.2; margin: 0 0 10px; letter-spacing: -0.01em; }
.about-hero .lead { font-size: 1.05rem; color: var(--text); margin: 0; }
.about-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 18px; }
.about-grid .card { margin-bottom: 0; }
.about-tile h2 { margin: 6px 0; }
.about-tile p { margin: 0; color: var(--muted); }
.about-step { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-weight: 700;
  background: rgba(224,169,64,0.15); color: var(--accent); border: 1px solid rgba(224,169,64,0.35); }
.about-industries { display: flex; flex-wrap: wrap; gap: 8px; }
.about-industries span { padding: 6px 12px; border-radius: 20px; border: 1px solid var(--border); font-size: 0.88rem; background: rgba(255,255,255,0.03); }
.about-cta { display: flex; gap: 10px; justify-content: center; margin: 6px 0 10px; }
.secondary-link { background: transparent; color: var(--text); border: 1px solid var(--border); }
@media (max-width: 640px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-hero h1 { font-size: 1.45rem; }
  .about-cta .button-link { flex: 1; text-align: center; }
}

/* ---------- Flash / users / onboarding ---------- */
.flash { background: rgba(76,175,125,0.12); border: 1px solid rgba(76,175,125,0.45); border-radius: 8px; padding: 12px 14px; margin: 0 0 16px; }
.flash-error { background: rgba(210,85,74,0.12); border-color: rgba(210,85,74,0.5); }
.flash-link { display: flex; gap: 8px; margin-top: 8px; }
.flash-link input { flex: 1; font-family: ui-monospace, monospace; font-size: 0.8rem; }
.flash-link button { width: auto; }
.user-actions form button { width: auto; white-space: nowrap; }
.invite-form h2 { margin-top: 0; }
.auth-forgot { text-align: center; margin: 12px 0 0; font-size: 0.9rem; }
.welcome-list { padding-left: 20px; margin: 10px 0 18px; }
.welcome-list li { margin: 6px 0; }
input[readonly] { opacity: 0.7; }

/* ---------- Landing (login) ---------- */
.landing { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 7vh 8px 48px;
  display: grid; grid-template-columns: 1.25fr 0.9fr; gap: 28px 56px;
  grid-template-areas: "hero login" "points points" "industries industries"; align-items: center; }
.landing-hero { grid-area: hero; }
.landing-login { grid-area: login; }
.landing-points { grid-area: points; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 16px; }
.landing-industries { grid-area: industries; text-align: center; }
.landing-industries p { color: var(--muted); margin: 6px 0 12px; font-size: 0.9rem; letter-spacing: 0.04em; text-transform: uppercase; }
.landing-industries .about-industries { justify-content: center; }

.landing-brand { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.landing-brand img { filter: drop-shadow(0 8px 24px rgba(224,169,64,0.35)); }
.landing-word { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
.landing-word span { color: var(--accent); }
.landing-tag { color: var(--muted); font-size: 0.9rem; padding-left: 12px; border-left: 1px solid var(--border); }
.eyebrow { display: inline-block; margin: 0 0 14px; padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); background: rgba(224,169,64,0.1); border: 1px solid rgba(224,169,64,0.3); }
.landing-h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 18px; font-weight: 800; }
.landing-h1 .grad { background: linear-gradient(90deg, #f2c15a, #e0a940 40%, #5fc3d6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.landing-lead { font-size: 1.12rem; color: #c9ced8; max-width: 34em; margin: 0 0 26px; }

/* Product preview: an issue moving Logged -> Assigned -> Completed */
.flow-card { max-width: 440px; padding: 14px 16px; border-radius: 12px; background: rgba(23,26,33,0.75);
  border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 16px 40px rgba(0,0,0,0.4); backdrop-filter: blur(10px); }
.flow-top { display: flex; justify-content: space-between; align-items: center; }
.flow-time { color: var(--muted); font-size: 0.75rem; }
.flow-title { font-weight: 600; margin: 8px 0 12px; }
.flow-steps { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.flow-steps .arrow { color: var(--muted); }
.step { padding: 3px 10px; border-radius: 20px; font-size: 0.78rem; font-weight: 600; border: 1px solid var(--border); color: var(--muted);
  animation: stepOn 6s infinite; }
.step.s1 { animation-delay: 0s; } .step.s2 { animation-delay: 2s; } .step.s3 { animation-delay: 4s; }
@keyframes stepOn {
  0%, 30% { background: rgba(224,169,64,0.18); border-color: var(--accent); color: var(--accent); }
  34%, 100% { background: transparent; border-color: var(--border); color: var(--muted); }
}
.step.s3 { animation-name: stepDone; }
@keyframes stepDone {
  0%, 30% { background: rgba(76,175,125,0.2); border-color: var(--ok); color: #70d090; }
  34%, 100% { background: transparent; border-color: var(--border); color: var(--muted); }
}
@media (prefers-reduced-motion: reduce) { .step { animation: none; } .step.s3 { background: rgba(76,175,125,0.2); border-color: var(--ok); color: #70d090; } }

.landing-login .auth-card { padding: 26px; }
.landing-login .auth-foot { text-align: center; }

.point { padding: 18px; border-radius: 12px; background: rgba(23,26,33,0.6); border: 1px solid rgba(255,255,255,0.07); backdrop-filter: blur(8px); }
.point h3 { margin: 10px 0 6px; font-size: 1rem; }
.point p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.point-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 1rem;
  color: var(--accent); background: rgba(224,169,64,0.12); border: 1px solid rgba(224,169,64,0.3); }

@media (max-width: 900px) {
  .landing { grid-template-columns: 1fr; grid-template-areas: "hero" "login" "points" "industries"; padding-top: 4vh; gap: 22px; }
  .landing-points { grid-template-columns: repeat(2, 1fr); }
  .landing-login { max-width: 440px; width: 100%; justify-self: center; }
}
@media (max-width: 640px) {
  .landing-points { grid-template-columns: 1fr; }
  .landing-brand { margin-bottom: 18px; }
  .landing-lead { font-size: 1rem; }
  .flow { display: none; }
}

/* ---------- Locations & log sections ---------- */
.button-link.small { padding: 6px 14px; margin: 0; font-size: 0.9rem; }
.row-actions { display: flex; gap: 8px; align-items: center; }
.row-actions form button { width: auto; }
.archived-row { opacity: 0.6; }
.new-section { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--border); }
.new-section h3 { margin: 0 0 4px; }
.section-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 8px; }
label.section-pick { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; color: var(--text); }
label.section-pick input { width: auto; margin-top: 3px; }
label.section-pick small { display: block; color: var(--muted); font-size: 0.8rem; margin-top: 2px; }
label.section-pick:has(input:checked) { border-color: var(--accent); background: rgba(224,169,64,0.08); }
.field-row { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.field-row input[type=text] { flex: 1; }
label.field-remove { display: flex; align-items: center; gap: 6px; margin: 0; white-space: nowrap; }
label.field-remove input { width: auto; }
@media (max-width: 640px) { .row-actions { flex-direction: column; align-items: stretch; } }

/* ---------- Dynamic log sections ---------- */
.dyn-toggle { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
label.dyn-check { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--text); font-size: 0.95rem; cursor: pointer; }
label.dyn-check input { width: auto; }
details.help { display: inline-block; }
details.help summary { list-style: none; cursor: pointer; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 0.8rem; font-weight: 700; color: var(--muted); border: 1px solid var(--border); }
details.help summary::-webkit-details-marker { display: none; }
details.help[open] summary { color: var(--accent); border-color: var(--accent); }
details.help p { flex-basis: 100%; margin: 8px 0 0; padding: 10px 12px; border-radius: 8px; background: rgba(224,169,64,0.08);
  border: 1px solid rgba(224,169,64,0.3); color: var(--text); font-size: 0.88rem; max-width: 520px; }
.extras { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); }
.extra-row input[name$="_label"] { flex: 0 0 34%; }
.extra-row input[name$="_value"] { flex: 1; }
.added-pill { font-size: 0.7rem; padding: 1px 7px; border-radius: 10px; border: 1px solid var(--border); color: var(--muted); vertical-align: 1px; }
@media (max-width: 640px) { .extra-row { flex-wrap: wrap; } .extra-row input[name$="_label"] { flex: 1 1 100%; } }
input.order-input { width: 110px; padding: 8px 10px; background: #0d0f13; border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: 0.95rem; }
textarea.grow { min-height: 0; resize: none; overflow: hidden; line-height: 1.4; }
.sv { white-space: pre-wrap; }
.area-add-row select { flex: 1; min-width: 0; }
@media (max-width: 640px) { .area-add-row { flex-wrap: wrap; } .area-add-row select, .area-add-row button { flex: 1 1 100%; } }

/* ---------- Advanced: positions & report types ---------- */
.advanced-link { text-align: center; color: var(--muted); font-size: 0.85rem; margin-top: 24px; }
.report-row { padding: 12px 0; border-bottom: 1px solid var(--border); }
.report-row-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.report-form { margin-top: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 8px; background: rgba(255,255,255,0.02); }
.report-form button[type=submit] { margin-top: 10px; }
details.new-section summary { cursor: pointer; color: var(--accent); padding: 4px 0; }
.report-label { display: inline-block; margin: -4px 0 10px; padding: 3px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 600;
  color: var(--accent); background: rgba(224,169,64,0.1); border: 1px solid rgba(224,169,64,0.3); }
.report-sub { font-size: 0.75rem; margin: 2px 0 0; }
.report-picks { display: grid; gap: 12px; max-width: 520px; }
a.report-pick { display: flex; justify-content: space-between; align-items: center; padding: 18px; border-radius: 10px; text-decoration: none;
  background: var(--panel); border: 1px solid var(--border); color: var(--text); font-size: 1.05rem; }
a.report-pick span { color: var(--accent); font-weight: 600; font-size: 0.9rem; }
a.report-pick:hover, a.report-pick:focus-visible { border-color: var(--accent); }
@media (max-width: 640px) { .report-row-head { flex-direction: column; align-items: stretch; } }

/* ---------- Copy setup confirmation ---------- */
.warn-banner { padding: 12px 14px; border-radius: 8px; background: rgba(210,85,74,0.12); border: 1px solid rgba(210,85,74,0.5); margin-bottom: 14px; }
.warn-banner strong { display: block; margin-bottom: 2px; }
.compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: start; margin: 6px 0 10px; }
.compare h3 { margin: 0 0 6px; font-size: 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.compare ul { margin: 0; padding-left: 18px; }
.compare li.gone { color: var(--danger); text-decoration: line-through; }
.compare li.new { color: #70d090; font-weight: 600; }
.compare-arrow { font-size: 1.4rem; color: var(--muted); padding-top: 22px; }
label.understand { display: flex; gap: 10px; align-items: flex-start; color: var(--text); font-size: 0.95rem; margin: 10px 0; }
label.understand input { width: auto; margin-top: 4px; }
.confirm-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; margin-top: 10px; }
.confirm-actions .button-link { margin: 0; }
.confirm-actions button { width: auto; }
@media (max-width: 640px) { .confirm-actions { flex-direction: column-reverse; align-items: stretch; } .confirm-actions button { width: 100%; } .confirm-actions .button-link { text-align: center; } }
header.site a.who { color: var(--muted); font-size: 0.85rem; text-decoration: none; } header.site a.who:hover { color: var(--accent); }
.bounce-flag { display: inline-block; margin-top: 3px; font-size: 0.72rem; font-weight: 600; color: #e08060; } 
.last-seen .sub { font-size: 0.75rem; margin: 2px 0 0; } .last-seen .never { color: #e08060; font-size: 0.85rem; }
