/* Same colours and fonts as the Lauraficated dashboard. */
:root {
  --bg-0: #0b0406;
  --bg-1: #1a080d;
  --bg-2: #2c0d15;
  --panel: rgba(30, 11, 16, 0.72);
  --panel-2: rgba(255, 255, 255, 0.025);
  --line: rgba(255, 120, 135, 0.12);
  --line-strong: rgba(255, 120, 135, 0.26);
  --text: #f6eaec;
  --muted: #b89ca2;
  --faint: #7f656b;
  --accent: #e5394f;
  --accent-2: #ff6b7d;
  --accent-glow: rgba(229, 57, 79, 0.35);
  --danger: #ff5f6d;
  --ok: #3ecf8e;
  --warn: #f5c542;
  --radius: 14px;
  --radius-sm: 9px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Sora', 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background:
    radial-gradient(1100px 700px at 8% -12%, rgba(214, 38, 70, 0.38), transparent 62%),
    radial-gradient(900px 640px at 108% 4%, rgba(150, 18, 52, 0.34), transparent 60%),
    radial-gradient(800px 600px at 50% 120%, rgba(110, 12, 34, 0.35), transparent 65%),
    linear-gradient(160deg, var(--bg-2) 0%, var(--bg-1) 42%, var(--bg-0) 100%);
  background-attachment: fixed;
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
h1, h2 { font-family: var(--display); margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 16px; }

/* ---------- Buttons ---------- */
.btn {
  appearance: none;
  display: inline-block;
  text-align: center;
  text-decoration: none;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: 600 13px var(--font);
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.08s, box-shadow 0.15s;
  white-space: nowrap;
}
.btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 120, 135, 0.4); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.sm { padding: 6px 11px; font-size: 12px; }
.btn.wide { width: 100%; }
.btn.primary {
  background: linear-gradient(135deg, var(--accent-2), var(--accent) 55%, #b81f3a);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 22px -8px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn.primary:hover:not(:disabled) { background: linear-gradient(135deg, #ff7d8c, #ee4459 55%, #c4243f); }
.btn.ghost { background: transparent; border-style: dashed; color: var(--muted); }
.btn.ghost:hover:not(:disabled) { color: var(--text); background: rgba(229, 57, 79, 0.08); }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card {
  width: min(380px, 100%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 34px 28px;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
}
.login-card h1 { font-size: 24px; margin-top: 6px; }
.login-card p { margin: -6px 0 10px; }
.form-error { color: var(--danger); min-height: 1em; margin: 0 !important; font-size: 13px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 24px;
  background: rgba(15, 5, 8, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff;
  font: 700 17px var(--display);
  box-shadow: 0 6px 18px -6px var(--accent-glow);
}
.brand-mark.big { width: 56px; height: 56px; border-radius: 16px; font-size: 26px; }
.brand-name { font: 700 15px var(--display); }
.brand-sub { font-size: 12px; color: var(--muted); }
.topbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.nav { display: flex; gap: 4px; padding: 3px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); border-radius: 11px; margin-left: 20px; }
.nav-link { appearance: none; border: 0; background: none; cursor: pointer; color: var(--muted); font: 600 13px var(--font); padding: 7px 14px; border-radius: 8px; transition: color 0.15s, background 0.15s; white-space: nowrap; }
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.nav-link.active { color: #fff; background: linear-gradient(135deg, var(--accent-2), var(--accent)); box-shadow: 0 4px 14px -6px var(--accent-glow); }
.count-pill { display: inline-block; min-width: 22px; padding: 0 7px; margin-left: 4px; border-radius: 999px; background: rgba(0, 0, 0, 0.3); color: inherit; font: 600 12px var(--font); text-align: center; }

.coin-chip, .user-chip {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.3);
  font-size: 13px;
}
.coin-chip b { font-variant-numeric: tabular-nums; color: var(--warn); }
.user-chip img { width: 22px; height: 22px; border-radius: 50%; }
.coin { margin-right: 4px; }

/* ---------- Page ---------- */
.page { max-width: 1100px; margin: 0 auto; padding: 22px 24px 40px; }
.lead { margin: 0 0 12px; }
.notice { margin-bottom: 14px; font-size: 13px; padding: 9px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.notice.error { color: #ffc2c8; background: rgba(255, 95, 109, 0.08); border-color: rgba(255, 95, 109, 0.35); }
.empty { padding: 34px 16px; text-align: center; color: var(--faint); background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); grid-column: 1 / -1; }

/* ---------- Items ---------- */
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.item-card {
  display: flex; flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(14px);
  transition: border-color 0.15s, transform 0.15s;
}
.item-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.item-card.sold-out { opacity: 0.6; }
.item-image { width: 100%; aspect-ratio: 4 / 3; display: block; background: rgba(0, 0, 0, 0.3); }
.item-image.placeholder { display: grid; place-items: center; font-size: 40px; }
/* The whole picture is always shown, never cropped or stretched. Whatever space is left over
   (tall or wide pictures) is filled with a blurred copy of the same picture. */
.item-image.picture { position: relative; overflow: hidden; }
.item-image.picture::before { content: ''; position: absolute; inset: -24px; background: var(--img) center / cover no-repeat; filter: blur(18px) brightness(0.5); }
.item-image.picture img { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; }
.item-body { display: flex; flex-direction: column; gap: 8px; padding: 14px; flex: 1; }
.item-desc { margin: 0; color: var(--muted); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; flex: 1; }
.item-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price { font: 700 15px var(--display); color: var(--warn); white-space: nowrap; font-variant-numeric: tabular-nums; }
.stock { font-size: 12px; color: var(--faint); }

/* ---------- Orders ---------- */
.order-list { display: flex; flex-direction: column; gap: 8px; }
.order-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.order-main { flex: 1; min-width: 0; }
.order-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-sub { font-size: 12px; color: var(--faint); margin-top: 2px; }
.status { font: 600 11px var(--font); text-transform: uppercase; letter-spacing: 0.06em; padding: 3px 9px; border-radius: 999px; }
.status.waiting { color: var(--warn); background: rgba(245, 197, 66, 0.12); }
.status.done { color: var(--ok); background: rgba(62, 207, 142, 0.12); }

/* ---------- Toasts ---------- */
.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 20; }
.toast {
  max-width: 340px;
  padding: 11px 14px;
  background: #1d0b10;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.7);
  font-size: 13px;
  transition: opacity 0.4s, transform 0.4s;
}
.toast.ok { border-color: rgba(62, 207, 142, 0.45); }
.toast.error { border-color: rgba(255, 95, 109, 0.6); background: #2c0f15; }
.toast.out { opacity: 0; transform: translateY(6px); }

@media (max-width: 720px) {
  .topbar { padding: 10px 14px; }
  .nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; }
  .page { padding: 16px 14px 32px; }
  .user-chip span { display: none; }
}
.order-note { margin-top: 6px; padding: 6px 10px; border-left: 2px solid var(--accent); background: rgba(229, 57, 79, 0.08); border-radius: 0 6px 6px 0; font-size: 13px; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Crowdfunding ---------- */
.cf-tag { display: inline-block; margin-left: 8px; padding: 2px 7px; border-radius: 6px; background: rgba(229, 57, 79, 0.14); color: var(--accent-2); font: 600 10.5px var(--font); text-transform: uppercase; letter-spacing: 0.06em; vertical-align: middle; }
.cf { display: flex; flex-direction: column; gap: 8px; }
.cf-bar { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.cf-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--warn)); transition: width 0.4s; }
.cf-goal { font: 500 13px var(--font); color: var(--muted); }
.cf-mine { font-size: 12px; color: var(--ok); }
.cf-people { list-style: none; margin: 0; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(0, 0, 0, 0.2); font-size: 12.5px; }
.cf-people li { display: flex; justify-content: space-between; gap: 10px; }
.cf-people span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-people b { font-variant-numeric: tabular-nums; color: var(--warn); }
.cf-people .more { color: var(--faint); }
.cf-form { display: flex; flex-direction: column; gap: 8px; }
.cf-row { display: flex; gap: 8px; }
.cf-row input { flex: 1; min-width: 0; background: rgba(8, 2, 4, 0.5); border: 1px solid var(--line); color: var(--text); font: 13.5px var(--font); padding: 9px 12px; border-radius: var(--radius-sm); outline: none; }
.cf-row input:focus { border-color: rgba(255, 107, 125, 0.55); box-shadow: 0 0 0 3px rgba(229, 57, 79, 0.15); }
.funded-badge { padding: 9px 12px; border-radius: var(--radius-sm); text-align: center; font-weight: 600; color: var(--ok); background: rgba(62, 207, 142, 0.1); border: 1px solid rgba(62, 207, 142, 0.3); }
