/* ═══════════════════════════════════════════════════
   app.css — Shared across all Claim Cipher app pages
   ═══════════════════════════════════════════════════ */

/* ── ROOT VARIABLES ── */
:root {
  --plate:      #0e0f11;
  --steel:      #161a1d;
  --steel-mid:  #1e2328;
  --steel-lift: #252b31;
  --input-bg:   #0a0c0e;
  --rivet:      #2e353d;
  --rivet-hi:   #3d464f;
  --amber:      #e8952a;
  --amber-dim:  rgba(232,149,42,0.12);
  --amber-line: rgba(232,149,42,0.35);
  --amber-glow: rgba(232,149,42,0.06);
  --white:      #edeae4;
  --text:       #8f9399;
  --text-hi:    #b8bdc2;
  --muted:      #4a5058;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--plate);
  color: var(--text-hi);
  font-family: 'Barlow', sans-serif;
  font-weight: 300;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.013) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.013) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

/* ── AUTH GUARD ── */
.body-hidden { visibility: hidden; }

/* ── NAV ── */
.nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px 0 24px; height: 72px;
  background: rgba(14,15,17,0.98);
  border-bottom: 1px solid var(--rivet);
  box-shadow: 0 1px 0 rgba(232,149,42,0.07);
  flex-shrink: 0;
}
.nav-logo {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; text-decoration: none;
}
.nav-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
.nav-tabs { display: flex; gap: 0; height: 100%; }
.nav-tab {
  display: flex; align-items: center; padding: 0 20px;
  font-family: 'DM Mono', monospace;
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); cursor: pointer;
  border-right: 1px solid var(--rivet);
  border-left: 1px solid transparent;
  transition: all 0.2s; text-decoration: none;
}
.nav-tab:first-child { border-left: 1px solid var(--rivet); }
.nav-tab:hover { color: var(--text-hi); background: rgba(255,255,255,0.02); }
.nav-tab.active { color: var(--amber); background: var(--amber-dim); border-bottom: 2px solid var(--amber); }
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-user { font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); text-align: right; }
.nav-user strong { color: var(--white); display: block; font-size: 12px; }
.nav-logout { padding: 7px 16px; border: 1px solid var(--rivet); color: var(--muted); font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; transition: all 0.2s; background: transparent; }
.nav-logout:hover { border-color: var(--rivet-hi); color: var(--text-hi); }

/* ── PAGE HEADER ── */
.page-header {
  background:
    radial-gradient(ellipse 60% 200% at 0% 50%, rgba(232,149,42,0.07) 0%, transparent 60%),
    var(--steel);
  border-bottom: 1px solid var(--rivet);
  padding: 24px 40px;
  position: relative; z-index: 1; flex-shrink: 0;
}
.page-header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.page-label { font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--amber); margin-bottom: 4px; }
.page-title { font-family: 'Bebas Neue', sans-serif; font-size: 32px; letter-spacing: 0.06em; color: var(--white); }
.page-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ── HEADER BADGE ── */
.header-badge { display: flex; gap: 3px; }
.hbadge {
  font-family: 'DM Mono', monospace;
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 6px 14px; border: 1px solid var(--rivet); color: var(--muted);
  background: var(--steel-mid);
}
.hbadge span { color: var(--amber); }

/* ── SHARED BUTTONS ── */
.btn { font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; padding: 12px 28px; border: none; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.btn-ghost { background: transparent; border: 1px solid var(--rivet); color: var(--muted); }
.btn-ghost:hover { border-color: var(--rivet-hi); color: var(--text-hi); }
.btn-steel { background: var(--steel-lift); border: 1px solid var(--rivet-hi); color: var(--text-hi); }
.btn-steel:hover { border-color: var(--amber-line); color: var(--white); }
.btn-primary { background: var(--amber); color: #000; font-weight: 600; border: 1px solid var(--amber); box-shadow: 0 0 20px rgba(232,149,42,0.25); }
.btn-primary:hover { background: #f0a030; box-shadow: 0 0 28px rgba(232,149,42,0.4); transform: translateY(-1px); }

/* ── ACTION FOOTER ── */
.action-footer {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(14,15,17,0.97);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--rivet);
  box-shadow: 0 -1px 0 rgba(232,149,42,0.1), 0 -8px 32px rgba(0,0,0,0.5);
  padding: 14px 40px; z-index: 100;
}
.action-footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.footer-info { display: flex; flex-direction: column; gap: 2px; }
.action-btns { display: flex; gap: 10px; }

/* ── CARD SYSTEM ── */
.card {
  background: var(--steel);
  border: 1px solid var(--rivet);
  border-left: 3px solid var(--rivet);
  position: relative;
}
.card.accent { border-left-color: var(--amber); }
.card::before, .card::after {
  content: ''; position: absolute;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--rivet-hi); border: 1px solid var(--muted);
}
.card::before { top: 10px; right: 12px; }
.card::after  { bottom: 10px; right: 12px; }
.card-header {
  padding: 14px 20px; border-bottom: 1px solid var(--rivet);
  background: var(--steel-mid);
  display: flex; align-items: center; gap: 10px;
}
.card-title { font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--amber); }
.card-line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--amber-line), transparent); }
.card-meta { font-family: 'DM Mono', monospace; font-size: 10px; color: var(--muted); letter-spacing: 0.1em; }
.card-body { padding: 24px; }

/* ── FORM FIELDS ── */
.field { display: flex; flex-direction: column; gap: 5px; }
.field-label { font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.field-input {
  background: var(--input-bg);
  border: 1px solid var(--rivet); border-top: 1px solid var(--rivet-hi);
  padding: 11px 14px; color: var(--white); font-size: 13px;
  font-family: 'Barlow', sans-serif; outline: none; width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
}
.field-input:focus {
  border-color: var(--amber);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.4), 0 0 0 1px rgba(232,149,42,0.2);
}
.field-input::placeholder { color: var(--muted); }
.field-hint { font-size: 11px; color: var(--muted); font-style: italic; }

/* ── TOGGLE ── */
.toggle { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track { position: absolute; inset: 0; background: var(--rivet); border: 1px solid var(--rivet-hi); cursor: pointer; transition: all 0.2s; }
.toggle-thumb { position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; background: var(--muted); transition: all 0.2s; pointer-events: none; }
.toggle input:checked + .toggle-track { background: var(--amber-dim); border-color: var(--amber-line); }
.toggle input:checked ~ .toggle-thumb { background: var(--amber); left: 21px; box-shadow: 0 0 6px rgba(232,149,42,0.5); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--rivet); }
.toggle-row:last-child { border-bottom: none; padding-bottom: 0; }
.toggle-label { font-size: 13px; color: var(--text-hi); }
.toggle-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ── LEGACY BILLING-PAGE CLASSES ── */
/* Used by billing-required, billing-cancel, billing-success */
.main-container { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem; }

.stat-plate {
  position: relative; text-align: center; padding: 28px 20px 24px; border-radius: 6px;
  background: linear-gradient(160deg, var(--steel-lift) 0%, var(--steel-mid) 40%, var(--steel) 100%);
  border: 1px solid var(--rivet); border-top-color: var(--rivet-hi);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 8px 16px rgba(0,0,0,0.4);
}

.cipher-hero-title { font-size: 1.75rem; font-weight: 600; letter-spacing: -0.01em; color: var(--white); }
.cipher-body { font-size: 0.95rem; color: var(--text); line-height: 1.6; }

.cipher-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px; font-weight: 600; font-size: 0.95rem;
  letter-spacing: 0.5px; position: relative;
  background: linear-gradient(145deg, var(--steel-lift), var(--steel-mid));
  border: 2px solid var(--amber); border-radius: 8px; color: var(--white);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 6px 12px rgba(0,0,0,0.4);
  cursor: pointer; transition: all 0.2s; text-decoration: none; gap: 0.5rem;
}
.cipher-btn:hover { background: linear-gradient(145deg, var(--steel-mid), var(--steel)); transform: translateY(-1px); }
.cipher-btn:active { transform: translateY(1px); }
.primary-action-btn { background: var(--amber); color: #000; border-color: var(--amber); box-shadow: 0 0 20px rgba(232,149,42,0.25); }
.primary-action-btn:hover { background: #f0a030; box-shadow: 0 0 28px rgba(232,149,42,0.4); }
.secondary-btn { border-color: var(--rivet-hi); color: var(--text); }
.secondary-btn:hover { border-color: var(--amber-line); color: var(--text-hi); }

.rivet {
  position: absolute; width: 6px; height: 6px; border-radius: 50%; z-index: 2;
  background: radial-gradient(circle at 35% 35%, #6a7076, #454a50 40%, #2a2f34 75%, #14181c);
  box-shadow: inset 0 1px 1px rgba(0,0,0,0.6), 0 1px 2px rgba(0,0,0,0.5);
}
.rivet::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 55%; height: 1px;
  background: linear-gradient(90deg, #0e1114, #1b2025, #0e1114);
  transform: translate(-50%, -50%);
}
.rivet.tl { top: 8px; left: 8px; }
.rivet.tr { top: 8px; right: 8px; }
.rivet.bl { bottom: 8px; left: 8px; }
.rivet.br { bottom: 8px; right: 8px; }
.cipher-btn .rivet { width: 6px; height: 6px; background: #1a1d21; box-shadow: none; }
