/* =========================================================================
   Tweak Shop — visual identity
   Concept: a system diagnostics panel for your rig. Numbers read like
   benchmark output (monospace), headlines are blunt and heavy, and the
   signal-green accent is the "everything's optimized" indicator color —
   used sparingly so it still means something when it shows up.
   ========================================================================= */

:root {
  --bg: #07080b;
  --bg-alt: #0d0f14;
  --card: #12141b;
  --card-hover: #161923;
  --border: #22252f;
  --border-bright: #2e323f;
  --text: #eef0f4;
  --text-dim: #8991a3;
  --text-faint: #5b6274;

  --accent: #3dffa3;         /* signal green — CTAs + "good" state */
  --accent-ink: #05140d;     /* text color when sitting on accent */
  --accent-dim: rgba(61, 255, 163, 0.1);
  --accent-border: rgba(61, 255, 163, 0.35);

  --flag: #ff5468;           /* coral — badges/attention, kept distinct from accent */
  --flag-dim: rgba(255, 84, 104, 0.12);

  --success: #3dffa3;
  --danger: #ff5468;
  --warn: #ffb648;

  /* kept for admin-panel compatibility */
  --accent2: #6fe3ff;
  --accent-grad: linear-gradient(90deg, #3dffa3, #6fe3ff);

  --radius: 14px;
  --radius-lg: 20px;

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;
}

* { box-sizing: border-box; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.01em; }

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
code, .mono { font-family: var(--font-mono); }

/* ---------- Header ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0;
  background: rgba(7, 8, 11, 0.85);
  backdrop-filter: blur(10px);
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--accent-ink); font-family: var(--font-display);
}
.nav-links { display: flex; gap: 26px; font-size: 0.9rem; color: var(--text-dim); }
.nav-links a { transition: color 0.15s ease; }
.nav-links a:hover { color: var(--text); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; font-weight: 700; font-size: 0.9rem;
  border: none; cursor: pointer; transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
  font-family: var(--font-body);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { opacity: 0.9; }
.btn-outline { background: transparent; border: 1px solid var(--border-bright); color: var(--text); }
.btn-outline:hover { border-color: var(--accent-border); }
.btn-block { width: 100%; }
.btn-danger { background: var(--danger); color: #200608; }
.btn-success { background: var(--success); color: var(--accent-ink); }
.btn-sm { padding: 8px 15px; font-size: 0.8rem; }

/* ---------- Category pills ---------- */
.category-nav {
  display: flex; gap: 10px; overflow-x: auto; padding: 14px 20px;
  border-bottom: 1px solid var(--border); background: var(--bg-alt);
  scrollbar-width: none;
}
.category-nav::-webkit-scrollbar { display: none; }
.category-pill {
  flex-shrink: 0; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border);
  font-size: 0.8rem; font-weight: 600; color: var(--text-dim); background: var(--card);
  cursor: pointer; transition: all 0.15s ease; font-family: var(--font-mono); letter-spacing: 0.02em;
}
.category-pill:hover { color: var(--text); border-color: var(--border-bright); }
.category-pill.is-active { background: var(--accent-dim); border-color: var(--accent-border); color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  text-align: center; padding: 76px 20px 20px; position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(180deg, rgba(255,255,255,0.02) 0px, rgba(255,255,255,0.02) 1px, transparent 1px, transparent 34px);
  mask-image: radial-gradient(ellipse 60% 50% at 50% 0%, black, transparent);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px 7px 12px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--border);
  font-size: 0.78rem; color: var(--text-dim); margin-bottom: 24px; font-family: var(--font-mono);
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 700; margin: 0 0 16px; line-height: 1.08; position: relative; }
.hero h1 .accent { color: var(--accent); }
.hero p { color: var(--text-dim); font-size: 1.05rem; max-width: 560px; margin: 0 auto 30px; position: relative; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; }

/* ---------- Diagnostics strip (signature element) ---------- */
.diagnostics {
  display: flex; flex-wrap: wrap; gap: 0; margin: 44px 0 0; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; background: var(--bg-alt);
}
.diagnostics-item {
  flex: 1 1 160px; padding: 20px 22px; border-right: 1px solid var(--border);
}
.diagnostics-item:last-child { border-right: none; }
.diagnostics-item .d-label {
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 6px;
}
.diagnostics-item .d-value { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 600; color: var(--text); }
.diagnostics-item .d-value.is-live { color: var(--accent); }

/* ---------- Section headings ---------- */
.section { padding: 56px 0; }
.section-eyebrow {
  text-align: center; color: var(--accent); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; margin-bottom: 12px; font-family: var(--font-mono);
}
.section-title { text-align: center; font-size: clamp(1.6rem, 3.5vw, 2.1rem); font-weight: 700; margin: 0 0 12px; }
.section-sub { text-align: center; color: var(--text-dim); margin-bottom: 44px; max-width: 480px; margin-left: auto; margin-right: auto; }

/* ---------- Product grid ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.product-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; display: flex; flex-direction: column; position: relative;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.product-card:hover { border-color: var(--border-bright); background: var(--card-hover); transform: translateY(-2px); }
.product-card.popular { border-color: var(--accent-border); }
.product-card.is-hidden { display: none; }
.badge-pop {
  position: absolute; top: -12px; right: 22px; background: var(--flag);
  color: #200308; font-size: 0.7rem; font-weight: 800; padding: 5px 13px; border-radius: 999px;
  letter-spacing: 0.02em;
}
.tag {
  display: inline-block; font-size: 0.7rem; color: var(--accent); font-weight: 700; text-transform: uppercase;
  margin-bottom: 12px; font-family: var(--font-mono); letter-spacing: 0.06em;
}
.product-card h3 { margin: 0 0 8px; font-size: 1.28rem; font-weight: 700; }
.product-card .tagline { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 20px; }
.price { font-family: var(--font-mono); font-size: 2rem; font-weight: 600; margin-bottom: 4px; }
.price small { font-size: 0.85rem; color: var(--text-dim); font-weight: 500; font-family: var(--font-body); }
.feature-list { list-style: none; padding: 0; margin: 18px 0 26px; }
.feature-list li { display: flex; gap: 9px; font-size: 0.88rem; color: var(--text-dim); margin-bottom: 10px; align-items: flex-start; }
.feature-list li::before { content: "▸"; color: var(--accent); font-weight: 900; flex-shrink: 0; }

/* ---------- Forms ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.85rem; color: var(--text-dim); margin-bottom: 7px; font-weight: 600; }
input[type=text], input[type=email], input[type=file], input[type=number], input[type=date], select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--bg-alt); color: var(--text); font-size: 0.95rem; font-family: var(--font-body);
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); }
.radio-row { display: flex; gap: 16px; }
.radio-option {
  flex: 1; border: 1px solid var(--border); border-radius: 10px; padding: 14px;
  cursor: pointer; text-align: center; background: var(--bg-alt);
}
.radio-option input { margin-right: 8px; }
.help-text { color: var(--text-dim); font-size: 0.82rem; margin-top: 6px; }
.alert { padding: 14px 16px; border-radius: 10px; margin-bottom: 20px; font-size: 0.9rem; }
.alert-error { background: rgba(255, 84, 104, 0.1); border: 1px solid var(--danger); color: #ffc4cb; }
.alert-success { background: rgba(61, 255, 163, 0.1); border: 1px solid var(--success); color: #b8ffdf; }

/* ---------- Payment instructions box ---------- */
.pay-instructions { background: var(--bg-alt); border: 1px dashed var(--accent-border); border-radius: 12px; padding: 20px; margin-bottom: 24px; }
.pay-instructions h4 { margin: 0 0 10px; color: var(--accent); font-family: var(--font-mono); font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.04em; }
.pay-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.92rem; font-family: var(--font-mono); }
.pay-row:last-child { border-bottom: none; }

/* ---------- Status page ---------- */
.status-pill { display: inline-block; padding: 6px 16px; border-radius: 999px; font-weight: 700; font-size: 0.85rem; font-family: var(--font-mono); }
.status-pending { background: rgba(255, 182, 72, 0.14); color: var(--warn); }
.status-approved { background: var(--accent-dim); color: var(--accent); }
.status-declined { background: var(--flag-dim); color: var(--flag); }

/* ---------- Tables (admin) ---------- */
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); }
th { color: var(--text-dim); font-weight: 700; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; font-family: var(--font-mono); }
tr:hover td { background: rgba(255,255,255,0.02); }

/* ---------- Admin shell ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar { width: 220px; background: var(--bg-alt); border-right: 1px solid var(--border); padding: 24px 16px; flex-shrink: 0; }
.admin-sidebar .brand { margin-bottom: 30px; padding: 0 6px; }
.admin-sidebar nav a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--text-dim); font-size: 0.9rem; margin-bottom: 4px; }
.admin-sidebar nav a:hover, .admin-sidebar nav a.active { background: var(--card); color: var(--text); }
.admin-main { flex: 1; padding: 30px; max-width: 1200px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.admin-topbar h1 { margin: 0; font-size: 1.5rem; }

.proof-thumb { max-width: 90px; border-radius: 8px; border: 1px solid var(--border); }
.small-muted { color: var(--text-dim); font-size: 0.8rem; }

footer { border-top: 1px solid var(--border); padding: 34px 0; text-align: center; color: var(--text-faint); font-size: 0.85rem; margin-top: 60px; }

@media (max-width: 720px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; display: flex; align-items: center; justify-content: space-between; }
  .admin-sidebar nav { display: flex; gap: 6px; }
  .diagnostics-item { flex: 1 1 50%; border-bottom: 1px solid var(--border); }
  .nav-links { display: none; }
}
