/* IndustrialPanelBuilds.com theme (matches ipbpages.netlify.app). */
:root {
  --black: #0a0a0a; --g950: #0d0d0d; --g900: #141414; --g850: #1a1a1a; --g800: #222; --g700: #333;
  --g600: #4a4a4a; --g400: #8a8a8a; --g200: #dcdcd7; --white: #f4f4f0;
  --amber: #e8a020; --amber-b: #f0b030; --amber-line: rgba(232,160,32,.35); --amber-glow: rgba(232,160,32,.10);
  --green: #3fb950; --red: #e5534b; --blue: #58a6ff;
  --disp: "Bebas Neue", Impact, sans-serif; --body: "DM Sans", -apple-system, system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, Menlo, monospace;
  --radius: 4px;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background-color: var(--black);
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 48px 48px;
  color: var(--white); font-family: var(--body); font-size: 18px; line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
h1, h2, h3 { font-family: var(--disp); font-weight: 400; letter-spacing: .02em; line-height: .95; margin: 0; }
.amber { color: var(--amber); }
.kicker { font-family: var(--mono); font-size: 13px; letter-spacing: .28em; text-transform: uppercase; color: var(--amber); }
.muted { color: var(--g400); }
.mono { font-family: var(--mono); }
[hidden] { display: none !important; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 28px; border-radius: var(--radius); border: 1px solid var(--amber);
  background: var(--amber); color: var(--black);
  font-family: var(--mono); font-size: 15px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  user-select: none; -webkit-user-select: none; transition: background .15s, transform .08s; text-decoration: none;
}
.btn:active { transform: scale(.98); background: var(--amber-b); }
.btn:disabled { opacity: .45; }
.btn-outline { background: transparent; color: var(--amber); }
.btn-outline:active { background: var(--amber-glow); }
.btn-ghost { background: transparent; border-color: var(--g700); color: var(--g200); }
.btn-danger { background: transparent; border-color: var(--red); color: var(--red); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 12px; letter-spacing: .14em; }

/* ---------- form controls ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-family: var(--mono); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--g400); }
.field > label.switch { font-family: var(--body); font-size: 16px; letter-spacing: 0; text-transform: none; color: var(--white); }
.field label .req { color: var(--amber); }
.input, select.input, textarea.input {
  width: 100%; min-height: 56px; padding: 12px 16px; border-radius: var(--radius);
  background: var(--g900); border: 1px solid var(--g700); color: var(--white); font-size: 19px; outline: none;
  -webkit-appearance: none; appearance: none;
}
textarea.input { min-height: 110px; resize: vertical; }
.input:focus { border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-glow); }
.input.invalid { border-color: var(--red); }
.err { color: var(--red); font-size: 14px; min-height: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 20px;
  border: 1px solid var(--g700); border-radius: 999px; background: var(--g900); color: var(--g200);
  font-size: 17px; user-select: none; -webkit-user-select: none;
}
.chip input:checked + span { border-color: var(--amber); background: var(--amber-glow); color: var(--amber); }
.chip input:checked + span::before { content: "✓"; font-weight: 700; }
.chip input:focus-visible + span { box-shadow: 0 0 0 3px var(--amber-line); }

.check { display: flex; align-items: flex-start; gap: 14px; padding: 16px; border: 1px solid var(--g700); border-radius: var(--radius); background: var(--g900); }
.check input { width: 28px; height: 28px; accent-color: var(--amber); flex: none; margin: 0; }
.check.invalid { border-color: var(--red); box-shadow: 0 0 0 3px rgba(229,83,75,.25); }

.panel { background: rgba(20,20,20,.92); border: 1px solid var(--g800); border-radius: var(--radius); }

/* ---------- modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.75); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal { width: min(560px, 100%); max-height: 90vh; overflow: auto; padding: 32px; background: var(--g900); border: 1px solid var(--amber-line); border-radius: var(--radius); }
.modal h2 { font-size: 40px; margin-bottom: 12px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; flex-wrap: wrap; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--g850); border: 1px solid var(--amber-line);
  padding: 14px 24px; border-radius: var(--radius); z-index: 60; font-size: 16px; max-width: calc(100% - 32px); }

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