/* 2SureVerify — public/app design system.
   Color/font tokens are injected as :root custom properties by inc/header.php
   (from inc/branding.php), so this file only ever references var(--...). */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, .font-display {
  font-family: 'Sora', 'Inter', sans-serif;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 .5em;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-light); }
img { max-width: 100%; }
button, input, select, textarea { font-family: inherit; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; border: none; cursor: pointer;
  font-weight: 600; font-size: 15px; transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #241300; box-shadow: 0 8px 20px -8px rgba(242,169,59,.6); }
.btn-primary:hover { background: var(--accent-dark); color: #241300; }
.btn-dark { background: var(--brand); color: #fff; }
.btn-dark:hover { background: var(--brand-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--brand); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--brand); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Cards / surfaces ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 24px; box-shadow: 0 1px 2px rgba(20,29,69,.04);
}
.card-flat { background: var(--surface); border-radius: 16px; padding: 24px; }

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--text-soft); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px; border-radius: 10px; border: 1.5px solid var(--border);
  background: #fff; font-size: 15px; color: var(--text); transition: border-color .12s ease, box-shadow .12s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand-light); box-shadow: 0 0 0 4px rgba(46,63,143,.12);
}
.field .hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.radio-row { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-chip {
  border: 1.5px solid var(--border); border-radius: 10px; padding: 10px 16px; cursor: pointer;
  font-size: 14px; font-weight: 500; color: var(--text-soft); position: relative;
}
.radio-chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.radio-chip.checked, .radio-chip:has(input:checked) { border-color: var(--brand); background: rgba(30,42,94,.06); color: var(--brand); font-weight: 700; }

/* ---------- Badges / status ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge-success { background: rgba(21,163,110,.12); color: var(--success); }
.badge-danger  { background: rgba(226,55,68,.12); color: var(--danger); }
.badge-warning { background: rgba(245,158,11,.14); color: #92620a; }
.badge-pending { background: rgba(46,63,143,.12); color: var(--brand-light); }

/* ---------- Top nav (marketing pages) ---------- */
.topnav { position: sticky; top: 0; z-index: 40; background: rgba(246,247,251,.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.topnav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand-mark { display: flex; align-items: center; gap: 10px; font-family: 'Sora', sans-serif; font-weight: 800; font-size: 20px; color: var(--brand); }
.brand-mark img { height: 34px; width: auto; }
.topnav-links { display: flex; align-items: center; gap: 28px; }
.topnav-links a { color: var(--text-soft); font-weight: 600; font-size: 15px; }
.topnav-links a:hover { color: var(--brand); }
.topnav-cta { display: flex; align-items: center; gap: 12px; }

/* ---------- Hero (landing page) ---------- */
.hero { position: relative; overflow: hidden; padding: 88px 0 64px; }
.hero-mesh {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(600px 400px at 85% -10%, rgba(242,169,59,.25), transparent 60%),
    radial-gradient(700px 500px at -10% 20%, rgba(46,63,143,.35), transparent 60%),
    linear-gradient(180deg, var(--brand-dark), var(--brand) 55%, var(--brand-light));
}
.hero .container { position: relative; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.12); color: #fff; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; margin-bottom: 20px; }
.hero h1 { color: #fff; font-size: 46px; line-height: 1.12; max-width: 720px; }
.hero p.lead { color: rgba(255,255,255,.82); font-size: 18px; max-width: 560px; margin: 16px 0 32px; }
.hero-shapes svg { position: absolute; right: -60px; top: 40px; opacity: .5; width: 420px; }

/* ---------- Service grid ---------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.service-card { display: block; padding: 22px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.service-card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px -18px rgba(20,29,69,.25); border-color: var(--brand-light); }
.service-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: rgba(30,42,94,.08); color: var(--brand); margin-bottom: 14px; font-size: 20px; }
.service-card h3 { font-size: 16px; margin-bottom: 6px; }
.service-card p { font-size: 13px; color: var(--text-muted); margin: 0 0 10px; }
.service-price { font-size: 13px; font-weight: 700; color: var(--brand); }

/* ---------- Auth pages (centered card) ---------- */
.auth-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; background: var(--brand-dark); position: relative; overflow: hidden; }
.auth-shell::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(500px 350px at 90% 10%, rgba(242,169,59,.22), transparent 60%),
    radial-gradient(600px 400px at 10% 90%, rgba(46,63,143,.4), transparent 60%);
}
.auth-card { position: relative; width: 100%; max-width: 420px; background: #fff; border-radius: 20px; padding: 36px 32px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.4); }
.auth-logo { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 22px; }
.auth-card h1 { font-size: 22px; text-align: center; }
.auth-card .sub { text-align: center; color: var(--text-muted); font-size: 14px; margin-bottom: 26px; }
.pin-boxes { display: flex; gap: 12px; justify-content: center; }
.pin-boxes input { width: 52px; height: 58px; text-align: center; font-size: 24px; font-weight: 700; border-radius: 12px; border: 1.5px solid var(--border); }

/* ---------- App shell (dashboard + service pages) ---------- */
.app-shell { display: flex; min-height: 100vh; background: var(--bg); }
.app-sidebar { width: 260px; flex-shrink: 0; background: var(--brand-dark); color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.app-sidebar .brand-mark { color: #fff; padding: 22px 22px 18px; }
.app-nav { padding: 10px 14px; flex: 1; }
.app-nav-group { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.4); padding: 16px 10px 6px; font-weight: 700; }
.app-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; color: rgba(255,255,255,.78); font-size: 14px; font-weight: 500; margin-bottom: 2px; }
.app-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.app-nav a.active { background: var(--accent); color: #241300; font-weight: 700; }
.app-nav a .ic { width: 18px; text-align: center; opacity: .9; }
.app-sidebar-foot { padding: 16px 22px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; color: rgba(255,255,255,.5); }

.app-main { flex: 1; min-width: 0; }
.app-topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.app-content { padding: 28px; }
.wallet-pill { display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px 8px 8px; }
.wallet-pill .amt { font-weight: 800; color: var(--brand); }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--brand-light); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; overflow: hidden; }

.mobile-menu-btn { display: none; }
@media (max-width: 900px) {
  .app-sidebar { position: fixed; left: 0; top: 0; height: 100vh; transform: translateX(-100%); transition: transform .2s ease; z-index: 60; }
  .app-sidebar.open { transform: translateX(0); }
  .mobile-menu-btn { display: inline-flex; }
  .app-content { padding: 18px; }
}

/* ---------- Tables ---------- */
table.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); padding: 10px 14px; border-bottom: 1px solid var(--border); }
.data-table td { padding: 14px; border-bottom: 1px solid var(--border); color: var(--text-soft); }
.data-table tr:hover td { background: var(--bg); }
.table-scroll { overflow-x: auto; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.stat-tile { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; }
.stat-tile .label { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.stat-tile .value { font-size: 26px; font-weight: 800; color: var(--text); margin-top: 6px; font-family: 'Sora', sans-serif; }

.footer-mini { padding: 28px 0; text-align: center; color: var(--text-muted); font-size: 13px; border-top: 1px solid var(--border); margin-top: 40px; }
