/* GoldDigger Shop — light, professional design system.
   White canvas, restrained antique-gold + slate accents, clean type, no glass. */

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --border: #e4e7ec;
  --border-strong: #d3d8e0;

  --ink: #18212f;         /* primary text */
  --ink-soft: #545e6f;    /* secondary text */
  --ink-faint: #8b95a5;   /* tertiary / labels */

  --navy: #17273f;        /* dark primary (buttons, brand) */
  --navy-hover: #21344f;
  --gold: #9a7b33;        /* refined accent gold */
  --gold-deep: #6f5720;
  --gold-soft: #f4eedd;
  --green: #157347;
  --green-soft: #e7f2ec;
  --red: #b42318;
  --red-soft: #fbeae8;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow: 0 6px 22px rgba(16, 24, 40, 0.08);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --container: 1140px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { color: var(--ink); }

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px;
  background: var(--navy); color: #fff; font-weight: 700; font-size: 13px; letter-spacing: 0.02em;
}
.brand-name { font-size: 1.12rem; font-weight: 650; letter-spacing: -0.01em; }
.brand-sub { color: var(--gold); margin-left: 4px; font-weight: 600; }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a:not(.btn) { color: var(--ink-soft); font-size: 0.93rem; font-weight: 500; }
.site-nav a:not(.btn):hover { color: var(--ink); text-decoration: none; }
.nav-user { color: var(--ink-faint); font-size: 0.85rem; }
.nav-toggle { display: none; align-items: center; justify-content: center; flex-direction: column; gap: 4px; width: 42px; height: 38px; padding: 0; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; cursor: pointer; }
.nav-toggle-bar { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; }
[x-cloak] { display: none !important; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 9px; border: 1px solid transparent;
  font-family: inherit; font-size: 0.94rem; font-weight: 600; cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
  text-decoration: none; line-height: 1.2;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 7px 13px; font-size: 0.85rem; }
.btn-lg { padding: 13px 24px; font-size: 1rem; }
.btn-primary { background: var(--navy); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--navy-hover); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--surface); color: var(--red); border-color: #efc4bf; }
.btn-danger:hover { background: var(--red-soft); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px;
}
.card-hover { transition: box-shadow 0.16s ease, border-color 0.16s ease, transform 0.16s ease; }
.card-hover:hover { box-shadow: var(--shadow); border-color: var(--border-strong); transform: translateY(-2px); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, #ffffff 0%, #fbfaf5 100%);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 44px 40px; margin: 26px 0 30px; box-shadow: var(--shadow-sm);
}
.hero .eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.72rem; font-weight: 700; }
.hero h1 { font-family: var(--serif); font-size: 2.15rem; font-weight: 600; letter-spacing: -0.01em; margin: 10px 0 10px; }
.hero p { color: var(--ink-soft); font-size: 1.06rem; margin: 0; max-width: 60ch; }

/* ---------- Product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.product-card { display: flex; flex-direction: column; gap: 12px; color: var(--ink); }
.product-card:hover { text-decoration: none; }
.product-meta { font-size: 0.72rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.product-name { font-size: 1rem; font-weight: 600; line-height: 1.35; color: var(--ink); }
.price-value { color: var(--ink); font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em; }
.price-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint); font-weight: 600; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.data th, table.data td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data thead th { background: var(--surface-2); color: var(--ink-soft); font-weight: 600; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: #fafbfc; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Status badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; border: 1px solid transparent; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-placed   { background: var(--surface-2); color: var(--ink-soft); }
.badge-invoiced { background: var(--gold-soft); color: var(--gold-deep); }
.badge-paid     { background: var(--green-soft); color: var(--green); }
.badge-complete { background: #dcefe3; color: #0f5132; }
.badge-canceled { background: var(--red-soft); color: var(--red); }

/* ---------- Forms ---------- */
label { display: block; font-size: 0.82rem; color: var(--ink-soft); margin-bottom: 6px; font-weight: 600; }
input, select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 9px; font-family: inherit; font-size: 0.94rem;
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(154, 123, 51, 0.15); }
.field { margin-bottom: 16px; }
.form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.form-row > .field { flex: 1; min-width: 160px; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 18px 24px; border-left: 2px solid var(--border); }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 3px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.timeline .t-when { font-size: 0.78rem; color: var(--ink-faint); }
.timeline .t-what { font-weight: 600; color: var(--ink); }

/* ---------- Flash messages ---------- */
.flashes { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.flash { padding: 12px 16px; border-radius: 10px; font-size: 0.9rem; border: 1px solid var(--border); background: var(--surface); }
.flash-success { background: var(--green-soft); color: var(--green); border-color: #bfe0cd; }
.flash-error { background: var(--red-soft); color: var(--red); border-color: #efc4bf; }
.flash-info { background: var(--surface-2); color: var(--ink-soft); }

/* ---------- Layout helpers ---------- */
.main-content { flex: 1; padding: 26px 24px 64px; }
.page-title { font-size: 1.5rem; font-weight: 650; letter-spacing: -0.01em; margin: 8px 0 20px; }
.row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }
.right { text-align: right; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.disclaimer { font-size: 0.82rem; color: var(--ink-soft); border-left: 2px solid var(--gold); padding-left: 12px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 24px 0; margin-top: auto; color: var(--ink-faint); font-size: 0.8rem; }
.footer-fine { margin: 4px 0 0; }

/* ---------- Stat cards ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.stat { padding: 18px 20px; }
.stat .stat-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-faint); font-weight: 600; }
.stat .stat-value { font-size: 1.55rem; font-weight: 700; margin-top: 6px; letter-spacing: -0.01em; }

@media (max-width: 760px) {
  .container { padding: 0 16px; }
  .header-inner { position: relative; height: 60px; }
  .brand-name { font-size: 1.02rem; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute; top: calc(100% + 1px); left: 0; right: 0; z-index: 60;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow); padding: 6px 0;
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: 12px 20px; font-size: 1rem; }
  .site-nav a.btn { margin: 8px 20px; justify-content: center; }
  .nav-user { display: block; padding: 10px 20px 2px; }
  .hero { padding: 28px 22px; }
  .hero h1 { font-size: 1.6rem; }
  .main-content { padding: 18px 16px 48px; }
  .page-title { font-size: 1.3rem; }
}
