/* Flipping Command Center — mobile-first, one-glance, big numbers. */

:root {
  --bg: #f4f4f0;
  --card: #ffffff;
  --ink: #1c1c1c;
  --muted: #6b6b6b;
  --line: #e3e2dc;
  --green: #15803d;
  --green-soft: #dcfce7;
  --red: #b91c1c;
  --red-soft: #fee2e2;
  --amber: #b45309;
  --amber-soft: #fef3c7;
  --blue: #1d4ed8;
  --radius: 12px;
}

* { box-sizing: border-box; }

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

.container { max-width: 720px; margin: 0 auto; padding: 12px 12px 80px; }

h1 { font-size: 1.5rem; margin: 0.6em 0 0.4em; }
h2 { font-size: 1.15rem; margin: 1.2em 0 0.5em; }
h3 { font-size: 1rem; margin: 0.8em 0 0.4em; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0.4em 0; }

/* Nav */
.topnav {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 6px; background: var(--ink); color: #fff; padding: 10px 14px;
  position: sticky; top: 0; z-index: 50;
}
.topnav a { color: #fff; font-weight: 600; padding: 4px 7px; border-radius: 6px; }
.topnav a:hover { background: rgba(255, 255, 255, 0.15); text-decoration: none; }
.topnav__brand { font-size: 1.05rem; }
.topnav__links { display: flex; flex-wrap: wrap; gap: 2px; }

/* Flash + banner */
.flash, .banner {
  display: flex; align-items: center; gap: 8px; justify-content: space-between;
  padding: 10px 14px; margin: 8px; border-radius: var(--radius); font-weight: 600;
}
.flash--notice { background: var(--green-soft); color: var(--green); }
.flash--alert { background: var(--red-soft); color: var(--red); }
.banner { background: var(--amber-soft); color: var(--amber); }
.flash__close { background: none; border: none; font-size: 1rem; cursor: pointer; color: inherit; }

/* Cards */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; margin: 10px 0; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Numbers */
.label { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; color: var(--muted); text-transform: uppercase; }
.num { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 1.3rem; }
.num--huge { font-size: 2.1rem; line-height: 1.1; }

/* Budget bar */
.budget-bar { display: flex; gap: 8px; text-align: center; }
.budget-bar__cell { flex: 1; padding: 6px 2px; }
.budget-bar__cell--hero { background: var(--green-soft); border-radius: var(--radius); }
.budget-bar__cell--hero .num { color: var(--green); }
.budget-bar__cell--danger { background: var(--red-soft); }
.budget-bar__cell--danger .num { color: var(--red); }

/* Bid cards */
.auction-group h3 { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.bid-card { display: flex; gap: 12px; }
.bid-card__photo { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.bid-card__body { flex: 1; min-width: 0; }
.bid-card__title { font-weight: 700; }
.bid-card__max { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 4px 0; }
.bid-card__max .num--huge { color: var(--green); }
.bid-card__actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.why { font-size: 0.85rem; color: var(--muted); margin: 4px 0; }
.stretch { font-size: 0.8rem; color: var(--amber); font-weight: 600; }
.verdict { font-size: 0.85rem; color: var(--blue); }
.citation { border-left: 3px solid var(--line); margin: 6px 0; padding: 4px 10px; color: var(--muted); font-size: 0.9rem; }

/* Countdown */
.countdown { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--amber); }
.countdown--urgent { color: var(--red); }
.countdown--closed { color: var(--muted); }

/* Buttons */
.btn {
  display: inline-block; border: none; border-radius: 10px; padding: 10px 16px;
  font-size: 0.95rem; font-weight: 700; cursor: pointer; text-align: center;
}
.btn:hover { text-decoration: none; filter: brightness(0.96); }
.btn--primary { background: var(--green); color: #fff !important; }
.btn--secondary { background: #ececec; color: var(--ink) !important; border: 1px solid var(--line); }
.btn--won { background: var(--green-soft); color: var(--green) !important; }
.btn--lost { background: var(--red-soft); color: var(--red) !important; }
.btn--big { font-size: 1.1rem; padding: 14px 22px; width: 100%; }
.btn--small { padding: 4px 10px; font-size: 0.8rem; }

/* Bid-placed toggle */
.check-toggle, button.check-toggle {
  background: #fff; border: 2px solid var(--line); border-radius: 10px;
  padding: 9px 14px; font-size: 0.95rem; font-weight: 700; cursor: pointer; color: var(--muted);
}
.check-toggle--done, button.check-toggle--done { background: var(--green-soft); border-color: var(--green); color: var(--green); }

/* Decide row (WON/LOST) */
.decide { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.won-details summary { list-style: none; }
.won-details summary::-webkit-details-marker { display: none; }
.won-form { display: flex; gap: 6px; margin-top: 6px; }
.won-form input[type="number"] { width: 130px; }

/* Chips */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.chip {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.75rem;
  font-weight: 700; background: #ececec; color: var(--ink); vertical-align: middle;
}
.chip--open, .chip--ready, .chip--won, .chip--bid { background: var(--green-soft); color: var(--green); }
.chip--closed, .chip--needed, .chip--lost, .chip--skip { background: var(--red-soft); color: var(--red); }
.chip--settled, .chip--in_progress, .chip--watch { background: var(--amber-soft); color: var(--amber); }

/* Rows / lists */
.auction-row, .listit-card { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.lot-row { display: flex; gap: 12px; }
.lot-row__photo { width: 76px; height: 76px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.lot-row__body { flex: 1; min-width: 0; }
.lot-row__title { font-weight: 700; }
.lot-row--won { border-left: 4px solid var(--green); }
.lot-row--lost { opacity: 0.6; }
.checklist { padding-left: 1.2em; margin: 6px 0; }
.checklist li { margin: 4px 0; }
.doc-list { list-style: none; padding: 0; }
.doc-list li { padding: 10px 4px; border-bottom: 1px solid var(--line); }
.empty { color: var(--muted); font-style: italic; }
.muted { color: var(--muted); font-size: 0.9rem; }
.thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; vertical-align: middle; margin-right: 8px; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; margin: 10px 0; }
.gallery img { width: 100%; height: 110px; object-fit: cover; border-radius: 8px; }

/* Thermometer */
.thermo { background: #ececec; border-radius: 999px; height: 26px; overflow: hidden; }
.thermo__fill { background: linear-gradient(90deg, var(--green), #22c55e); height: 100%; border-radius: 999px; transition: width 0.4s; }
.thermo__caption { margin-top: 8px; }

/* Forms */
.stack-form { display: flex; flex-direction: column; gap: 6px; }
.stack-form label { font-size: 0.8rem; font-weight: 700; color: var(--muted); margin-top: 6px; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.inline-form label { font-size: 0.8rem; font-weight: 700; color: var(--muted); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="url"], input[type="datetime-local"], select, textarea {
  font-size: 1rem; padding: 10px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; width: 100%; max-width: 100%; font-family: inherit;
}
.inline-form input[type="number"] { width: 140px; }
textarea { resize: vertical; }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th, .table td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--line); }
.num-col { text-align: right; font-variant-numeric: tabular-nums; }
.pos { color: var(--green); font-weight: 700; }
.neg { color: var(--red); font-weight: 700; }
.placeholder-row { background: var(--amber-soft); }

/* Docs */
.doc__body img { max-width: 100%; }
.doc__body table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.doc__body th, .doc__body td { border: 1px solid var(--line); padding: 6px; text-align: left; }
.doc__body pre { background: #f3f3f3; padding: 10px; border-radius: 8px; overflow-x: auto; }

/* Login */
.login { max-width: 380px; margin: 8vh auto 0; text-align: center; }
.login h1 { font-size: 1.7rem; }
.login .card { text-align: left; }

/* Channel cards */
.channel-card__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

@media (min-width: 600px) {
  .container { padding: 16px 20px 60px; }
  h1 { font-size: 1.8rem; }
}

/* Passkeys */
.btn--danger { background: #c0392b; color: #fff !important; }
.form-error { color: #c0392b; font-size: 0.9rem; margin: 8px 0 0; }
.hint { color: #666; font-size: 0.9rem; }
.login .btn--big { margin-top: 4px; }
.login__hint { color: #666; font-size: 0.9rem; text-align: center; }
.login__password { margin-top: 14px; }
.login__password summary { color: #666; font-size: 0.9rem; cursor: pointer; text-align: center; padding: 6px; }
.login__password .stack-form { margin-top: 10px; }
.passkey-promo { border: 2px solid var(--line); text-align: center; }
.passkey-promo .btn--primary { width: 100%; margin: 8px 0; }
.passkey-list { list-style: none; padding: 0; margin: 0 0 12px; }
.passkey-list__item { padding: 10px 0; border-bottom: 1px solid var(--line); }
.passkey-list__name { font-weight: 600; margin-right: 8px; }
.passkey-list__meta { color: #666; font-size: 0.85rem; }
.passkey-list__remove summary { color: #c0392b; font-size: 0.85rem; cursor: pointer; margin-top: 4px; }
.passkey-list__remove .stack-form { margin-top: 8px; max-width: 320px; }
