/* Inland Merch House — Customer Portal
   DARK THEME: page #0b0b0d + elevated #151517 + gold #d9b62c.
   Primary CTAs use the brand gradient (gold -> ember -> red). Mobile-first. */
:root {
  color-scheme: dark;
  --black: #0b0b0d;
  --ink: #f5f5f5;
  --white: #ffffff;
  --gold: #d9b62c;
  --gold-dark: #b8941f;
  --muted: #bdbdbd;
  --grey: #bdbdbd;
  --grey-light: rgba(255, 255, 255, 0.08);
  --bg: #0b0b0d;
  --surface: #151517;
  --surface-2: #1c1c1f;
  --border: rgba(255, 255, 255, 0.08);
  --border-soft: rgba(255, 255, 255, 0.12);
  --green: #81c784;
  --red: #ff7a7a;
  --cta: linear-gradient(135deg, #d9b62c, #ff9a3c, #ff5c38);
  --radius: 12px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--gold); }
::placeholder { color: var(--muted); opacity: 1; }

/* Header */
.site-header {
  background: #08080a;
  color: var(--white);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--white); }
.brand-logo { height: 44px; width: auto; border-radius: 6px; }
.brand-text { font-weight: 800; font-size: 1.05rem; letter-spacing: 0.3px; }
.brand-sub { display: block; font-weight: 400; font-size: 0.72rem; color: var(--gold); letter-spacing: 1.5px; text-transform: uppercase; }
.site-nav { display: flex; gap: 8px; }
.nav-link {
  color: var(--white); text-decoration: none; font-weight: 600; font-size: 0.85rem;
  padding: 8px 14px; border: 1px solid rgba(255,255,255,0.25); border-radius: 999px;
}
.nav-link:hover { border-color: var(--gold); color: var(--gold); }
.nav-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,0.25); color: var(--white); font-size: 1.25rem; border-radius: 8px; padding: 6px 12px; cursor: pointer; line-height: 1; }
.mobile-menu { display: none; }
@media (max-width: 760px) {
  .site-nav { display: none; }
  .nav-toggle { display: block; }
  .brand-logo { height: 36px; }
  .brand-text { font-size: 0.92rem; white-space: nowrap; }
  .brand-sub { font-size: 0.62rem; letter-spacing: 1.2px; }
  .mobile-menu.open {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: #0b0b0d; padding: 8px 20px 16px; z-index: 60;
    border-top: 1px solid rgba(255,255,255,0.12);
  }
  .mobile-menu a {
    color: var(--white); text-decoration: none; font-weight: 600; font-size: 1rem;
    padding: 13px 4px; border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .mobile-menu a:last-child { border-bottom: none; }
}

.app { flex: 1; max-width: 960px; width: 100%; margin: 0 auto; padding: 28px 20px 48px; }

.site-footer {
  background: #08080a; color: var(--muted); text-align: center;
  padding: 18px 12px; font-size: 0.8rem;
  border-top: 1px solid var(--border);
}
.site-footer p { margin: 3px 0; }
.site-footer .ig-foot a {
  color: var(--gold); font-weight: 700; text-decoration: none;
}
.site-footer .ig-foot a:hover { text-decoration: underline; }

/* Hero */
.hero {
  background:
    radial-gradient(640px 320px at 50% -80px, rgba(217,182,44,0.18), transparent 70%),
    radial-gradient(480px 260px at 85% 120%, rgba(255,92,56,0.10), transparent 70%),
    #0b0b0d;
  color: var(--white);
  border-radius: var(--radius); padding: 52px 32px; text-align: center;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}
.hero h1 { font-size: clamp(1.7rem, 5vw, 2.6rem); font-weight: 800; line-height: 1.15; margin-bottom: 12px; }
.hero h1 .gold {
  background: var(--cta);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero p { color: #cfcfcf; font-size: 1.02rem; max-width: 620px; margin: 0 auto; }

.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; }
@media (max-width: 640px) { .card-grid { grid-template-columns: 1fr; } }
.card-single { max-width: 560px; margin: 24px auto 0; }
.card {
  background: var(--surface); border-radius: var(--radius); padding: 30px 26px;
  border: 1px solid var(--border); box-shadow: 0 2px 14px rgba(0,0,0,0.35);
}
.card h2 { font-size: 1.25rem; margin-bottom: 8px; color: var(--ink); }
.card p { color: var(--muted); font-size: 0.94rem; margin-bottom: 18px; }
.card .icon { font-size: 2rem; margin-bottom: 10px; display: block; }

/* Instagram section */
.ig-section { margin-top: 44px; text-align: center; }
.ig-section h2 { font-size: 1.3rem; margin-bottom: 16px; font-weight: 800; }
.ig-section h2 a { color: var(--gold); text-decoration: none; }
.ig-section h2 a:hover { text-decoration: underline; }
.ig-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
@media (max-width: 640px) { .ig-grid { grid-template-columns: repeat(3, 1fr); } }
.ig-item {
  display: block; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border); aspect-ratio: 1;
  background: var(--surface);
}
.ig-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.2s ease; }
.ig-item:hover img { transform: scale(1.05); }

/* Buttons */
.btn {
  display: inline-block; background: var(--cta); color: #141414;
  font-weight: 700; border: none; border-radius: 999px; padding: 13px 28px;
  font-size: 0.95rem; cursor: pointer; text-decoration: none; text-align: center;
  transition: filter 0.15s ease, transform 0.1s ease;
}
.btn:hover { filter: brightness(0.93); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-dark { background: var(--cta); color: #141414; }
.btn-dark:hover { filter: brightness(0.93); }
.btn-dark:active { transform: scale(0.98); }
.btn-outline { background: transparent; color: var(--gold); border: 2px solid var(--gold); }
.btn-outline:hover { background: rgba(217,182,44,0.12); }
.btn-small { padding: 8px 16px; font-size: 0.82rem; }
.btn-block { display: block; width: 100%; }

/* Track lookup on home */
.track-row { display: flex; gap: 10px; }
.track-row input {
  flex: 1; padding: 12px 14px; border: 1.5px solid var(--border-soft);
  border-radius: 8px; font-size: 0.95rem; font-family: inherit;
  background: var(--surface-2); color: var(--ink);
}
.track-row input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217,182,44,0.2); }
@media (max-width: 480px) { .track-row { flex-direction: column; } }

/* Forms */
.form-wrap { background: var(--surface); border-radius: var(--radius); padding: 32px 28px; border: 1px solid var(--border); }
.form-wrap h1 { font-size: 1.6rem; margin-bottom: 6px; color: var(--ink); }
.form-sub { color: var(--muted); margin-bottom: 24px; font-size: 0.95rem; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 6px; color: var(--ink); }
.field label .req { color: var(--red); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border-soft); border-radius: 8px;
  font-size: 0.95rem; font-family: inherit; background: var(--surface-2); color: var(--ink);
}
.field select option { background: var(--surface-2); color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217,182,44,0.2);
}
.field textarea { min-height: 110px; resize: vertical; }
.field .hint, .hint { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }
.hint { color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field-error { color: var(--red); font-size: 0.8rem; margin-top: 4px; display: none; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--red); }
.field.invalid .field-error { display: block; }
.file-pill {
  display: inline-flex; align-items: center; gap: 8px; background: rgba(217,182,44,0.1);
  border: 1px solid var(--gold); border-radius: 999px; padding: 6px 14px;
  font-size: 0.82rem; margin-top: 8px; color: var(--ink);
}
.file-pill button { background: none; border: none; cursor: pointer; font-size: 1rem; color: var(--red); }
input[type="color"] { background: var(--surface-2); border: 1.5px solid var(--border-soft); border-radius: 8px; }

/* Confirmation */
.confirm-box { text-align: center; padding: 20px 0; }
.confirm-box .big-check {
  width: 72px; height: 72px; border-radius: 50%; background: #1e8e4f;
  color: #fff; font-size: 2rem; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
}
.ref-number {
  display: inline-block; background: #08080a; color: var(--gold);
  font-size: 1.4rem; font-weight: 800; letter-spacing: 2px;
  padding: 12px 28px; border-radius: 10px; margin: 14px 0;
  border: 1px solid var(--border-soft);
}

/* Timeline (public tracking) */
.track-head { text-align: center; margin-bottom: 30px; }
.track-head h1 { font-size: 1.7rem; }
.order-ref {
  display: inline-block; background: #08080a; color: var(--gold);
  font-weight: 800; letter-spacing: 1.5px; padding: 8px 22px; border-radius: 8px; margin: 10px 0;
  border: 1px solid var(--border-soft);
}
.track-meta { color: var(--muted); font-size: 0.92rem; }
.ship-box {
  background: #08080a; color: var(--white); border-radius: var(--radius);
  padding: 22px 24px; margin-bottom: 28px; border-left: 6px solid var(--gold);
  border-top: 1px solid var(--border); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.ship-box h3 { color: var(--gold); margin-bottom: 8px; font-size: 1.05rem; }
.ship-box p { font-size: 0.95rem; color: var(--ink); }
.ship-box .track-num { font-weight: 700; letter-spacing: 0.5px; }
.note-box {
  background: rgba(217,182,44,0.08); border: 1px solid rgba(217,182,44,0.45); border-radius: var(--radius);
  padding: 16px 20px; margin-bottom: 28px; font-size: 0.93rem; color: var(--ink);
}
.note-box strong { display: block; margin-bottom: 4px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--gold); }

.timeline { position: relative; padding-left: 44px; margin: 10px 0 20px; }
.timeline::before {
  content: ""; position: absolute; left: 17px; top: 8px; bottom: 8px; width: 4px;
  background: rgba(255,255,255,0.12); border-radius: 2px;
}
.tl-step { position: relative; padding: 0 0 30px; }
.tl-step:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: -44px; top: 0; width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 1.05rem; font-weight: 700;
  background: var(--surface-2); border: 3px solid rgba(255,255,255,0.2); color: var(--muted);
}
.tl-step.done .tl-dot { background: #1e8e4f; border-color: #1e8e4f; color: #fff; }
.tl-step.current .tl-dot {
  background: var(--gold); border-color: var(--gold-dark); color: #141414;
  box-shadow: 0 0 0 6px rgba(217,182,44,0.25);
}
.tl-step.current .tl-card { border-color: var(--gold); border-width: 2px; }
.tl-step.future { opacity: 0.55; }
.tl-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: 10px; padding: 14px 18px; }
.tl-card h4 { font-size: 1rem; margin-bottom: 2px; color: var(--ink); }
.tl-step.current .tl-card h4 { color: var(--gold); }
.tl-date { font-size: 0.8rem; color: var(--muted); }
.tl-step.done .tl-date { color: var(--green); font-weight: 600; }

/* Admin */
.admin-gate { max-width: 420px; margin: 40px auto; }
.admin-tabs { display: flex; gap: 0; margin-bottom: 22px; border-bottom: 2px solid var(--border); }
.admin-tab {
  background: none; border: none; padding: 12px 24px; font-size: 0.95rem; font-weight: 700;
  cursor: pointer; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -2px;
  font-family: inherit;
}
.admin-tab.active { color: var(--ink); border-bottom-color: var(--gold); }
.data-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.data-table th { background: #08080a; color: #fff; text-align: left; padding: 12px 14px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }
.data-table td { padding: 12px 14px; border-top: 1px solid var(--border); font-size: 0.9rem; color: var(--ink); }
.data-table tr.row-link { cursor: pointer; }
.data-table tr.row-link:hover td { background: rgba(217,182,44,0.07); }
.table-scroll { overflow-x: auto; border-radius: var(--radius); }
.badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-new { background: rgba(147,197,253,0.14); color: #93c5fd; }
.badge-contacted { background: rgba(255,183,77,0.14); color: #ffb74d; }
.badge-converted { background: rgba(129,199,132,0.14); color: #81c784; }
.badge-stage { background: rgba(217,182,44,0.12); color: var(--gold); border: 1px solid rgba(217,182,44,0.5); }
.badge-shipped { background: rgba(129,199,132,0.14); color: #81c784; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
@media (max-width: 640px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; color: var(--ink); }
.detail-box h3 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-bottom: 12px; }
.kv { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--muted); font-weight: 600; }
.kv .v { text-align: right; max-width: 60%; word-break: break-word; }
.history-list { list-style: none; }
.history-list li { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; display: flex; gap: 12px; align-items: baseline; color: var(--ink); }
.history-list li:last-child { border-bottom: none; }
.history-list .h-dot { color: var(--green); font-weight: 700; }
.history-list .h-date { margin-left: auto; color: var(--muted); font-size: 0.78rem; white-space: nowrap; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; align-items: center; }
.toolbar h1 { color: var(--ink); }
.toolbar .spacer { flex: 1; }
.empty-state { text-align: center; padding: 48px 20px; color: var(--muted); background: var(--surface); border-radius: var(--radius); border: 1px dashed var(--border-soft); }
.empty-state .icon { font-size: 2.4rem; display: block; margin-bottom: 10px; }
.empty-state h2 { color: var(--ink); }

/* Alerts / toasts */
.alert { border-radius: 10px; padding: 14px 18px; margin-bottom: 20px; font-size: 0.92rem; }
.alert-error { background: rgba(255,122,122,0.1); color: #ffb3b3; border: 1px solid rgba(255,122,122,0.4); }
.alert-success { background: rgba(129,199,132,0.1); color: #a5d6a7; border: 1px solid rgba(129,199,132,0.4); }
.alert-info { background: rgba(144,202,249,0.1); color: #90caf9; border: 1px solid rgba(144,202,249,0.4); }

/* 404 */
.notfound { text-align: center; padding: 60px 20px; }
.notfound h1 { font-size: 1.8rem; margin-bottom: 10px; color: var(--ink); }
.notfound p { color: var(--muted); margin-bottom: 22px; }

.loading { text-align: center; padding: 60px 20px; color: var(--muted); }
.spinner {
  width: 38px; height: 38px; border: 4px solid rgba(255,255,255,0.12); border-top-color: var(--gold);
  border-radius: 50%; margin: 0 auto 14px; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px;
}
