/*
 * Partely receipt verification — dark, always (no theme toggle). Tokens mirror the Partely
 * Admin/desktop dark palette so a scanned receipt feels like the same product.
 */
:root {
  --bg: #080808;
  --card: #141414;
  --elevated: #1d1d1f;
  --panel: #1a1a1c;
  --border: #303033;
  --divider: #26262a;

  --ink: #f5f5f7;
  --muted: #a6a6ad;
  --subtle: #8a8a90;
  --disabled: #73737a;

  --brand: #7c9df2;
  --brand-fill: #315fae;
  --brand-fill-border: #3e6abb;

  --ok: #65c99a;
  --ok-bg: #10281c;
  --ok-border: #214632;
  --warn: #e6b968;
  --warn-bg: #2a2112;
  --warn-border: #4b3a1d;
  --err: #eb8585;
  --err-bg: #301818;
  --err-border: #522626;

  --radius: 13px;
  --radius-lg: 18px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 12px 32px rgba(0, 0, 0, 0.24);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

/* Spare-parts backdrop + dark scrim, like the admin console. */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(to bottom, rgba(5, 5, 5, 0.7) 0%, rgba(5, 5, 5, 0.84) 100%),
    url("/admin-background.jpg");
  background-size: cover, cover;
  background-position: center, center;
  background-attachment: fixed, fixed;
}

.shell {
  max-width: 560px;
  margin: 0 auto;
  padding: 28px 16px 56px;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 22px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  flex: none;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

.brand h1 { font-size: 20px; margin: 0; font-weight: 700; letter-spacing: -0.02em; }
.brand-sub { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

h2 { font-size: 17px; margin: 0 0 6px; font-weight: 650; letter-spacing: -0.01em; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }

.field { display: block; margin: 14px 0; }
.field span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }

input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  font-size: 15px;
}
input::placeholder { color: var(--disabled); }
input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(124, 157, 242, 0.22); }

button.primary {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--brand-fill-border);
  border-radius: 10px;
  background: var(--brand-fill);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 160ms ease, transform 120ms ease;
}
button.primary:hover { background: #3e6abb; }
button.primary:active { transform: translateY(1px); }

/* ---- status states ---- */
.state-wrap { margin-top: 16px; }
.state {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 22px;
  text-align: center;
}
.state-loading {
  display: grid;
  place-items: center;
  gap: 12px;
  color: var(--muted);
  border: 0;
  background: transparent;
  box-shadow: none;
}
.state.not_found, .state.unavailable { border-color: var(--warn-border); }
.state.invalid { border-color: var(--err-border); }
.state h2 { margin: 12px 0 6px; font-size: 19px; }
.state p { margin: 6px 0 0; }
.state .lead { color: var(--muted); font-size: 14px; max-width: 42ch; margin-left: auto; margin-right: auto; }

.medallion {
  width: 46px;
  height: 46px;
  margin: 0 auto;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
}
.medallion-verified { background: var(--ok-bg); border-color: var(--ok-border); color: var(--ok); }
.medallion-not_found, .medallion-unavailable { background: var(--warn-bg); border-color: var(--warn-border); color: var(--warn); }
.medallion-invalid { background: var(--err-bg); border-color: var(--err-border); color: var(--err); }

.spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--brand);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- verified receipt ---- */
.receipt { text-align: left; }
.status-head { text-align: center; padding-bottom: 18px; border-bottom: 1px solid var(--divider); }
.status-head h2 { margin: 12px 0 4px; font-size: 20px; font-weight: 700; }
.status-head .montime { color: var(--muted); font-size: 12px; }

.biz-name { font-size: 19px; font-weight: 700; margin: 18px 0 2px; letter-spacing: -0.02em; }
.biz-details { margin: 0; color: var(--muted); font-size: 13px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px 16px;
  margin-top: 14px;
}
.panel-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 14px 0 4px;
}

.row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--divider); }
.row:last-child { border-bottom: 0; }
.row.strong { font-weight: 700; }
.row-label { color: var(--muted); }
.row-value { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }

.item { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--divider); }
.item:last-child { border-bottom: 0; }
.item-name { font-weight: 600; }
.item-part { color: var(--muted); font-size: 12px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.item-right { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.item-qty { color: var(--muted); font-size: 12px; }

.verified-at { margin: 18px 0 0; text-align: center; }

.foot { margin-top: 22px; }
.foot p { margin: 6px 0; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
