/* BidConnect — palette matched to the Waco Habitat StoreConnect storefront */
:root {
  --brand: #385988;        /* waco-blue-primary */
  --brand-dark: #2a4374;   /* waco-blue-primary-hover */
  --action: #1565c0;       /* waco-blue-action (buttons) */
  --action-dark: #0d47a1;  /* waco-blue-action-hover */
  --link: #428bca;         /* waco-blue-link */
  --accent: #ff671f;       /* waco-orange (countdown) */
  --success: #44b02b;      /* waco-green */
  --bg: #f2f2f2;           /* waco-gray-bg */
  --card: #ffffff;
  --text: #333333;         /* waco-gray-heading */
  --muted: #757575;        /* waco-gray-body */
  --border: #cbd5e1;       /* waco-gray-border */
  --danger: #d32f2f;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
main { width: 100%; margin: 0 auto; padding: 1rem 1.5rem; }
a { color: var(--link); }

.site-header {
  display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center;
  justify-content: space-between; padding: .75rem 1rem;
  background: var(--brand); color: #fff;
}
.site-header .brand {
  color: #fff; font-weight: 700; text-decoration: none;
  display: flex; flex-direction: column; align-items: flex-start; gap: .3rem;
}
.site-header .brand span { font-size: 1.15rem; }
.site-header .brand img {
  height: 34px; width: auto; display: block;
  background: #fff; padding: 4px 10px; border-radius: 6px;
}
.site-header nav { display: flex; gap: .65rem; align-items: flex-start; font-size: .9rem; }
.site-header nav a { color: #fff; text-decoration: none; }
.site-header .powered-by-stack {
  display: flex; flex-direction: column; gap: .3rem;
  margin-left: .75rem; padding-left: 1rem;
  border-left: 1px solid rgb(255 255 255 / .35);
}
.site-header .powered-by {
  display: grid; grid-template-columns: 100px 1fr; align-items: center; gap: .4rem;
  font-size: .78rem; opacity: .85;
}
.site-header .powered-by:hover { opacity: 1; }
.site-header .powered-by img { height: 20px; width: 20px; display: block; justify-self: end; }
.site-header .powered-by .storeconnect-logo {
  height: 16px; width: auto;
  background: #fff; padding: 3px 6px; border-radius: 4px;
}
.inline-form { display: inline; }
.linklike {
  background: none; border: none; color: #fff; cursor: pointer;
  font: inherit; padding: 0; text-decoration: underline;
}

.countdown {
  background: var(--accent); color: #fff; text-align: center;
  padding: .4rem; font-weight: 600;
}
.banner { padding: .6rem 1rem; text-align: center; }
.banner-pre { background: #e0e7ff; }

.messages { width: 100%; margin: .5rem auto 0; padding: 0 1.5rem; }
.msg { padding: .6rem .9rem; border-radius: 6px; margin-bottom: .4rem; }
.msg-success { background: #d1fae5; }
.msg-warning { background: #fef3c7; }
.msg-error { background: #fee2e2; color: var(--danger); }

/* Listing: one thin horizontal strip per item — info left, bidding right. */
.item-list { display: flex; flex-direction: column; gap: .5rem; }
.item-row {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: center;
  justify-content: space-between;
  background: var(--card); border-radius: 8px; padding: .55rem 1rem;
  box-shadow: 0 1px 2px rgb(0 0 0 / .08);
}
.item-row-info { display: flex; gap: .75rem; align-items: center; min-width: 0; flex: 1 1 320px; }
.item-row-info img {
  width: 72px; aspect-ratio: 4/3; object-fit: cover;
  border-radius: 6px; flex-shrink: 0;
}
.item-thumb { position: relative; flex-shrink: 0; line-height: 0; }
.hot-badge {
  position: absolute; top: -6px; right: -6px;
  background: var(--card); border-radius: 50%;
  width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
  font-size: .9rem; box-shadow: 0 1px 3px rgb(0 0 0 / .25);
}
.hot-badge-standalone { position: static; margin-right: .5rem; box-shadow: none; background: none; }
.item-row-text { min-width: 0; }
.item-row-info h2 { font-size: 1.05rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-row-info h2 a { color: inherit; text-decoration: none; }
.item-row-info h2 a:hover { text-decoration: underline; }
.item-row-info .description {
  margin: .1rem 0 0; color: var(--muted); font-size: .9rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.item-row-bidding {
  display: flex; flex-wrap: wrap; gap: .4rem .9rem; align-items: center;
  justify-content: flex-end;
}
.item-row-bidding .price { margin: 0; white-space: nowrap; }
.item-row-bidding .bid-count { font-size: .9rem; }

/* Compact inline bid bar */
.bid-form { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.bid-form input[type="number"] {
  width: 7.5rem; padding: .4rem .5rem; border: 1px solid var(--border);
  border-radius: 6px; font-size: .95rem;
}
.bid-form .mode-select {
  padding: .4rem .4rem; border: 1px solid var(--border); border-radius: 6px;
  font-size: .95rem; background: #fff;
}
.bid-form .max-toggle {
  margin: 0; padding: 0; border: none; font-weight: 500;
  font-size: .9rem; white-space: nowrap;
}
.bid-form .btn-primary { padding: .42rem .9rem; font-size: .95rem; }
.price { margin: .25rem 0; }
.price.big { font-size: 1.3rem; }
.price strong { color: var(--brand-dark); }
.bid-count { color: var(--muted); font-size: .9rem; margin: 0; }
.price-hidden { color: var(--muted); font-style: italic; }

.item-detail { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .item-detail { grid-template-columns: 1fr 1fr; } }
.item-media img { width: 100%; border-radius: 10px; }


.btn-primary {
  background: var(--action); border: none; color: #fff; cursor: pointer;
  padding: .55rem 1.3rem; border-radius: 8px; font-size: 1rem;
  text-decoration: none; display: inline-block;
}
.btn-primary:hover { background: var(--action-dark); }

.winning-badge, .outbid-badge {
  display: inline-block; padding: .1rem .55rem; border-radius: 999px;
  font-size: .8rem; font-weight: 600; margin-left: .4rem;
}
.winning-badge { background: #e4f5df; color: var(--success); }
.outbid-badge { background: #fee2e2; color: var(--danger); }

.bids-table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 10px; }
.bids-table th, .bids-table td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid #e5e7eb; }

.auth-card {
  max-width: 420px; margin: 1.5rem auto; background: var(--card);
  border-radius: 10px; padding: 1.5rem; box-shadow: 0 1px 3px rgb(0 0 0 / .1);
}
.auth-card input {
  width: 100%; padding: .5rem .6rem; border: 1px solid var(--border);
  border-radius: 6px; font-size: 1rem;
}
.auth-card .helptext { color: var(--muted); font-size: .85rem; }

/* SMS toast (demo) — phone-notification banners, top right */
.sms-toast-stack {
  position: fixed; top: 1rem; right: 1rem; z-index: 1000;
  display: flex; flex-direction: column; gap: .6rem;
  width: min(360px, calc(100vw - 2rem));
}
.sms-toast {
  background: rgba(28, 28, 30, .96); color: #fff;
  border-radius: 14px; padding: .7rem .9rem;
  box-shadow: 0 8px 28px rgb(0 0 0 / .35);
  transform: translateX(120%); opacity: 0;
  transition: transform .35s cubic-bezier(.2, .9, .3, 1.1), opacity .35s;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.sms-toast.show { transform: translateX(0); opacity: 1; }
.sms-toast-header {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: .3rem;
}
.sms-toast-app { font-weight: 700; font-size: .85rem; letter-spacing: .02em; }
.sms-toast-to { color: #9ca3af; font-size: .75rem; }
.sms-toast-body { font-size: .92rem; line-height: 1.35; overflow-wrap: break-word; }
.sms-toast-link { color: #6cb2ff; }

.post-auction { text-align: center; padding: 3rem 1rem; }
.site-footer { text-align: center; color: var(--muted); padding: 2rem 1rem; font-size: .9rem; }
.hint { color: var(--muted); }

/* Analytics dashboard */
.kpi-row { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1rem 0 1.5rem; }
.kpi-tile {
  background: var(--card); border-radius: 10px; padding: 1rem 1.5rem;
  box-shadow: 0 1px 3px rgb(0 0 0 / .1); min-width: 140px; text-align: center;
}
.kpi-value { display: block; font-size: 2rem; font-weight: 700; color: var(--brand-dark); }
.kpi-label { display: block; color: var(--muted); font-size: .85rem; margin-top: .2rem; }

.chart-card {
  background: var(--card); border-radius: 10px; padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgb(0 0 0 / .1); margin-bottom: 1.25rem;
}
.chart-card h2 { margin-top: 0; font-size: 1.1rem; }
.chart-svg-wrap { width: 100%; overflow-x: auto; }
.chart-svg { width: 100%; height: 160px; display: block; }
.chart-area { fill: color-mix(in srgb, var(--action) 18%, transparent); stroke: none; }
.chart-line { fill: none; stroke: var(--action); stroke-width: 2; }

.bars { display: flex; flex-direction: column; gap: .6rem; }
.bar-row { display: grid; grid-template-columns: 160px 1fr 160px; gap: .75rem; align-items: center; }
.bar-label { font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { background: var(--bg); border-radius: 999px; height: 10px; overflow: hidden; }
.bar-fill { background: var(--action); height: 100%; border-radius: 999px; transition: width .4s ease; }
.bar-value { font-size: .85rem; color: var(--muted); white-space: nowrap; }
@media (max-width: 640px) {
  .bar-row { grid-template-columns: 1fr; gap: .25rem; }
}

/* Donut charts (category / geography breakdowns) */
.chart-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.chart-row .chart-card { margin-bottom: 0; }
@media (max-width: 800px) {
  .chart-row { grid-template-columns: 1fr; }
}
.donut-wrap { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; }
.donut-svg { width: 200px; height: 200px; flex-shrink: 0; }
.donut-total { font-size: 2rem; font-weight: 700; fill: var(--text); }
.donut-total-label { font-size: .7rem; fill: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.donut-legend { list-style: none; margin: 0; padding: 0; flex: 1 1 220px; min-width: 200px; }
.donut-legend li { display: flex; align-items: center; gap: .5rem; font-size: .9rem; padding: .3rem 0; }
.donut-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }

/* Big Board — venue TV/projector kiosk. Deliberately a different (dark,
   fullscreen, oversized-type) register from the rest of the light, compact
   site: this fills an entire screen from across a room, not a laptop tab. */
body.big-board {
  margin: 0; min-height: 100vh; background: #0b0b0f; color: #fff;
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  display: flex; flex-direction: column; padding: 2.5rem 3.5rem;
}
.big-board-header { display: flex; align-items: center; gap: 1.5rem; margin-bottom: 2rem; }
.big-board-header img { height: 56px; background: #fff; padding: 6px 14px; border-radius: 8px; }
.big-board-header h1 { font-size: 2.1rem; margin: 0; font-weight: 700; letter-spacing: .01em; }
.big-board-list { flex: 1; display: flex; flex-direction: column; gap: 1rem; overflow-y: auto; }
.big-board-row {
  display: grid; grid-template-columns: 70px 1fr 260px 180px; align-items: center;
  gap: 1.5rem; background: rgba(255, 255, 255, .07); border-radius: 14px;
  padding: 1.4rem 2rem;
}
.bb-rank { font-size: 2.2rem; font-weight: 700; color: var(--accent); text-align: center; }
.bb-name { font-size: 1.9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bb-flame { font-size: 1.4rem; }
.bb-bid { font-size: 2.6rem; font-weight: 700; color: #4ade80; text-align: right; white-space: nowrap; }
.bb-count { font-size: 1.15rem; color: rgba(255, 255, 255, .55); text-align: right; white-space: nowrap; }
.big-board-empty { font-size: 1.6rem; color: rgba(255, 255, 255, .55); text-align: center; margin-top: 4rem; }
@keyframes bb-pulse {
  from { box-shadow: 0 0 0 4px rgba(255, 159, 26, .95); }
  to { box-shadow: 0 0 0 0 rgba(255, 159, 26, 0); }
}
.bb-pulse { animation: bb-pulse 1.3s ease-out; }
@media (max-width: 900px) {
  .big-board-row { grid-template-columns: 50px 1fr; grid-template-areas: "rank name" "rank bid" "rank count"; }
  .bb-bid, .bb-count { text-align: left; }
}
