:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --ink: #171a1f;
  --muted: #6a7079;
  --line: #e3e6ea;
  --dark: #121519;
  --red: #e63946;
  --red-dark: #bf2632;
  --green: #16794b;
  --amber: #9b6500;
  --blue: #215fa6;
  --radius: 16px;
  --shadow: 0 12px 35px rgba(20, 25, 31, .07);
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}
a { color: inherit; }
.container { width: min(1180px, calc(100% - 36px)); margin: 0 auto; }

.topbar {
  background: var(--dark);
  color: #fff;
  min-height: 72px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.09);
}
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display:flex; align-items:center; gap:14px; text-decoration:none; }
.brand-radial {
  font-weight: 900;
  letter-spacing: .12em;
  font-size: .95rem;
}
.brand-dot { color: var(--red); }
.brand-divider { width: 1px; height: 26px; background: rgba(255,255,255,.25); }
.brand-paycore { font-size: 1.1rem; font-weight: 650; letter-spacing: -.02em; }

.nav { display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
.nav a, .nav button {
  color:#dfe3e8;
  background:transparent;
  border:0;
  text-decoration:none;
  padding:9px 11px;
  border-radius:9px;
  font:inherit;
  cursor:pointer;
}
.nav a:hover, .nav button:hover { background:rgba(255,255,255,.08); color:#fff; }

.hero {
  background:
    radial-gradient(circle at 85% 20%, rgba(230,57,70,.24), transparent 28%),
    linear-gradient(145deg,#161a20,#0f1114 68%);
  color:#fff;
  padding:84px 0 92px;
}
.hero-grid { display:grid; grid-template-columns: 1.25fr .75fr; gap:56px; align-items:center; }
.kicker { color:#ff7782; text-transform:uppercase; letter-spacing:.12em; font-size:.8rem; font-weight:800; }
h1 { font-size:clamp(2.5rem,6vw,5rem); line-height:.95; letter-spacing:-.055em; margin:.25em 0; }
.hero p { color:#c9ced5; max-width:720px; font-size:1.08rem; }
.hero-card {
  border:1px solid rgba(255,255,255,.11);
  background:rgba(255,255,255,.055);
  padding:26px;
  border-radius:20px;
  backdrop-filter: blur(8px);
}
.provider-row { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:18px; }
.provider-pill {
  border:1px solid rgba(255,255,255,.11);
  padding:12px 14px;
  border-radius:12px;
  color:#e9ebee;
  background:rgba(0,0,0,.15);
}

.section { padding:58px 0; }
.section-title { margin:0 0 8px; font-size:2rem; letter-spacing:-.035em; }
.section-lead { color:var(--muted); margin:0 0 28px; max-width:760px; }

.grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.card {
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:22px;
  box-shadow:var(--shadow);
}
.card h3 { margin:0 0 8px; }
.card p { color:var(--muted); }

.btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:0;
  border-radius:10px;
  padding:11px 16px;
  background:var(--dark);
  color:#fff;
  text-decoration:none;
  cursor:pointer;
  font:inherit;
  font-weight:700;
}
.btn:hover { filter:brightness(1.08); }
.btn-primary { background:var(--red); }
.btn-primary:hover { background:var(--red-dark); }
.btn-secondary { background:#eef0f3; color:var(--ink); }
.btn-danger { background:#a21d29; }
.actions { display:flex; gap:10px; flex-wrap:wrap; }

.page { padding:34px 0 60px; }
.page-head { display:flex; justify-content:space-between; align-items:end; gap:24px; margin-bottom:24px; }
.page-head h1 { color:var(--ink); font-size:2.2rem; line-height:1; margin:0; }

.stats { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin-bottom:24px; }
.stat { background:#fff; border:1px solid var(--line); border-radius:14px; padding:18px; }
.stat strong { display:block; font-size:1.8rem; letter-spacing:-.04em; }
.stat span { color:var(--muted); font-size:.88rem; }

.table-wrap { background:#fff; border:1px solid var(--line); border-radius:14px; overflow:auto; }
table { width:100%; border-collapse:collapse; min-width:760px; }
th, td { padding:13px 15px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
th { font-size:.78rem; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); background:#fafbfc; }
tr:last-child td { border-bottom:0; }

.form-card { max-width:720px; }
label { display:block; font-size:.87rem; font-weight:750; margin:0 0 6px; }
input, select {
  width:100%;
  border:1px solid #cfd4da;
  border-radius:10px;
  padding:11px 12px;
  font:inherit;
  background:#fff;
  color:var(--ink);
}
input:focus, select:focus { outline:3px solid rgba(230,57,70,.12); border-color:var(--red); }
.field { margin-bottom:15px; }

.alert {
  border:1px solid var(--line);
  background:#fff;
  padding:14px 16px;
  border-radius:11px;
  margin:0 0 18px;
}
.alert-success { border-color:#b8ddca; background:#f0fbf5; color:#0e6840; }
.alert-error { border-color:#efbdc1; background:#fff4f5; color:#8b1823; }
.alert-warn { border-color:#ead6a5; background:#fffaf0; color:#715000; }

.badge {
  display:inline-flex;
  border-radius:999px;
  padding:4px 9px;
  background:#eef0f3;
  font-size:.78rem;
  font-weight:750;
}
.badge-ok { background:#e8f7ef; color:var(--green); }
.badge-warn { background:#fff4d8; color:var(--amber); }
.badge-off { background:#f0f1f3; color:#777; }
.badge-fail { background:#fdebed; color:#9b2230; }

.codebox {
  background:#11151a;
  color:#e8edf2;
  padding:14px 16px;
  border-radius:10px;
  overflow:auto;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:.88rem;
  word-break:break-all;
}

.auth-shell {
  min-height:calc(100vh - 72px);
  display:grid;
  place-items:center;
  padding:40px 18px;
}
.auth-card { width:min(460px,100%); }

.legal { max-width:900px; margin:0 auto; }
.legal h1 { color:var(--ink); font-size:2.5rem; }
.legal h2 { margin-top:30px; }
.legal p, .legal li { color:#454b54; }

.footer {
  background:#101317;
  color:#aeb5be;
  padding:28px 0;
}
.footer .container { display:flex; justify-content:space-between; gap:20px; flex-wrap:wrap; }
.footer a { color:#d8dde3; }

.small { color:var(--muted); font-size:.85rem; }
.mono { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; }
.secret-panel { border:2px solid var(--red); }

@media (max-width: 900px) {
  .hero-grid, .grid { grid-template-columns:1fr; }
  .stats { grid-template-columns:1fr 1fr; }
  .topbar .container { align-items:flex-start; padding:15px 0; flex-direction:column; }
  .hero { padding:60px 0; }
}
@media (max-width: 560px) {
  .stats, .provider-row { grid-template-columns:1fr; }
  .page-head { align-items:flex-start; flex-direction:column; }
}
