:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #667085;
  --line: #e5eaf2;
  --primary: #2563eb;
  --primary-2: #1d4ed8;
  --success: #059669;
  --danger: #dc2626;
  --warning: #d97706;
  --shadow: 0 14px 40px rgba(31, 45, 70, .09);
  --radius: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--text); background: var(--bg); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.nav { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.88); border-bottom: 1px solid rgba(229,234,242,.9); backdrop-filter: blur(14px); }
.nav-inner { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.logo { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: white; background: linear-gradient(135deg,#2563eb,#7c3aed); box-shadow: 0 8px 20px rgba(37,99,235,.25); }
.nav-links { display: flex; align-items: center; gap: 20px; color: var(--muted); font-size: 14px; }
.nav-links a:hover { color: var(--primary); }
.hero { padding: 82px 0 54px; background: radial-gradient(circle at 20% 0%,#dbeafe 0,transparent 38%), radial-gradient(circle at 85% 10%,#ede9fe 0,transparent 34%); }
.hero-grid { display: grid; grid-template-columns: 1.12fr .88fr; align-items: center; gap: 52px; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; padding: 7px 11px; border-radius: 999px; color: var(--primary-2); background: #eff6ff; font-size: 13px; font-weight: 700; }
h1 { margin: 18px 0 16px; font-size: clamp(40px,6vw,68px); line-height: 1.03; letter-spacing: -.045em; }
h2 { margin: 0 0 18px; font-size: 28px; letter-spacing: -.02em; }
h3 { margin: 0 0 10px; font-size: 17px; }
.lead { max-width: 680px; color: var(--muted); font-size: 18px; line-height: 1.75; }
.hero-points { display: flex; flex-wrap: wrap; gap: 12px 22px; margin-top: 26px; color: #475467; font-size: 14px; }
.hero-points span::before { content: "✓"; color: var(--success); font-weight: 900; margin-right: 7px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.redeem-card { padding: 28px; }
.price-line { display: flex; align-items: flex-end; justify-content: space-between; margin: 16px 0 22px; padding: 16px; border-radius: 14px; background: #f8fafc; }
.price { color: var(--primary); font-size: 36px; font-weight: 800; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.field { margin-bottom: 15px; }
.field label { display: block; margin-bottom: 7px; color: #344054; font-size: 13px; font-weight: 700; }
.input, select { width: 100%; min-height: 45px; padding: 0 13px; border: 1px solid #d0d5dd; border-radius: 11px; color: var(--text); background: white; outline: none; transition: .2s; }
.input:focus, select:focus { border-color: #84adff; box-shadow: 0 0 0 4px rgba(37,99,235,.1); }
.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; border: 0; border-radius: 11px; background: var(--primary); color: white; font-weight: 750; transition: .18s; }
.button:hover { background: var(--primary-2); transform: translateY(-1px); }
.button:disabled { opacity: .55; transform: none; cursor: wait; }
.button.block { width: 100%; }
.button.secondary { color: var(--primary); background: #eff6ff; }
.button.secondary:hover { background: #dbeafe; }
.button.success { background: var(--success); }
.button.danger { color: var(--danger); background: #fef2f2; }
.button.ghost { color: #475467; background: transparent; border: 1px solid var(--line); }
.button.sm { min-height: 34px; padding: 0 12px; font-size: 12px; border-radius: 9px; }
.section { padding: 64px 0; }
.section-title { text-align: center; max-width: 680px; margin: 0 auto 34px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.feature { padding: 24px; }
.feature-icon { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 16px; border-radius: 13px; background: #eff6ff; font-size: 20px; }
.feature p { margin: 0; color: var(--muted); line-height: 1.65; font-size: 14px; }
.footer { padding: 30px 0; color: var(--muted); border-top: 1px solid var(--line); font-size: 13px; }
.page { padding: 34px 0 70px; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.page-head h1 { margin: 0; font-size: 34px; letter-spacing: -.03em; }
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 22px; }
.stat { padding: 20px; }
.stat-label { color: var(--muted); font-size: 13px; }
.stat-value { margin-top: 7px; font-size: 28px; font-weight: 800; }
.layout { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; }
.stack { display: grid; gap: 20px; }
.panel { padding: 22px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.notice { padding: 12px 14px; border-radius: 11px; color: #1e40af; background: #eff6ff; font-size: 13px; line-height: 1.6; }
.notice.warn { color: #92400e; background: #fffbeb; }
.notice.danger { color: #991b1b; background: #fef2f2; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { padding: 10px 9px; text-align: left; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 9px; border-bottom: 1px solid #f0f2f6; vertical-align: top; }
.badge { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; color: #344054; background: #f2f4f7; font-size: 11px; font-weight: 750; }
.badge.ACTIVE,.badge.CODE_RECEIVED,.badge.COMPLETED { color: #047857; background: #ecfdf3; }
.badge.ALLOCATING,.badge.WAITING_NEXT_CODE { color: #1d4ed8; background: #eff6ff; }
.badge.FAILED,.badge.DISABLED { color: #b42318; background: #fef3f2; }
.badge.REFUNDED,.badge.CANCELED { color: #92400e; background: #fffaeb; }
.code-box { padding: 14px; border: 1px dashed #94a3b8; border-radius: 11px; background: #f8fafc; font: 600 13px ui-monospace,SFMono-Regular,Consolas,monospace; word-break: break-all; }
.secret { color: #1d4ed8; background: #eff6ff; border-color: #93c5fd; }
.auth-wrap { width: min(460px,calc(100% - 32px)); margin: 64px auto; }
.auth-card { padding: 28px; }
.tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.tab { flex: 1; min-height: 40px; border: 0; border-radius: 10px; color: var(--muted); background: #f2f4f7; font-weight: 700; }
.tab.active { color: var(--primary); background: #eff6ff; }
.hidden { display: none !important; }
.empty { padding: 30px 10px; text-align: center; color: var(--muted); }
.mailbox-hero { padding: 26px; }
.mail-address { margin: 8px 0 18px; font-size: clamp(24px,5vw,40px); font-weight: 850; letter-spacing: -.03em; word-break: break-all; }
.countdown { font-variant-numeric: tabular-nums; }
.code-list { display: grid; gap: 10px; margin-top: 16px; }
.code-item { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 15px; border-radius: 12px; background: #f8fafc; }
.otp { font: 800 24px ui-monospace,SFMono-Regular,Consolas,monospace; letter-spacing: .12em; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 100; width: min(380px,calc(100% - 40px)); padding: 14px 16px; border-radius: 12px; color: white; background: #172033; box-shadow: var(--shadow); transition: .2s; }
.toast.error { background: #b42318; }
.json { overflow: auto; padding: 18px; color: #d1fae5; background: #10221a; border-radius: 14px; font: 13px/1.65 ui-monospace,SFMono-Regular,Consolas,monospace; white-space: pre; }
.doc { max-width: 850px; }
.doc h2 { margin-top: 40px; }
.doc p,.doc li { color: #475467; line-height: 1.75; }
.doc code { padding: 2px 6px; border-radius: 6px; background: #eef2f6; }
.admin-shell { background: #eef2f7; }
.admin-layout { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: calc(100vh - 66px); }
.admin-sidebar { padding: 26px 16px; color: #dbe4f0; background: #111827; }
.admin-sidebar-title { padding: 0 12px 22px; color: white; font-size: 15px; font-weight: 800; letter-spacing: .02em; }
.admin-sidebar-subtitle { padding: 0 12px 14px; color: #8391a7; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.admin-sidebar a { display: flex; align-items: center; gap: 10px; margin: 3px 0; padding: 11px 12px; border-radius: 10px; color: #aab8cc; font-size: 13px; }
.admin-sidebar a:hover,.admin-sidebar a.active { color: white; background: #243147; }
.admin-sidebar a.active { box-shadow: inset 3px 0 #60a5fa; }
.admin-main { width: min(1320px,100%); padding: 30px 34px 70px; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 26px; }
.admin-kicker { color: #64748b; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.admin-heading { margin: 5px 0 0; font-size: 32px; letter-spacing: -.035em; }
.admin-badge { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; color: #1e40af; background: #dbeafe; border-radius: 999px; font-size: 12px; font-weight: 800; }
.admin-section { scroll-margin-top: 24px; }
.admin-section + .admin-section { margin-top: 22px; }
.admin-section-label { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 12px; }
.admin-section-label h2 { margin: 0; font-size: 18px; }
.admin-section-label span { color: #64748b; font-size: 12px; }
.admin-risk { border-left: 4px solid #f59e0b; }
@media (max-width: 880px) {
  .hero-grid,.layout { grid-template-columns: 1fr; }
  .grid-3,.stats { grid-template-columns: repeat(2,1fr); }
  .hero { padding-top: 52px; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: flex; gap: 6px; overflow-x: auto; padding: 10px; }
  .admin-sidebar-title,.admin-sidebar-subtitle { display: none; }
  .admin-sidebar a { flex: 0 0 auto; margin: 0; }
  .admin-main { padding: 24px 16px 50px; }
}
@media (max-width: 600px) {
  .nav-links a:nth-child(-n+2) { display: none; }
  .grid-3,.stats { grid-template-columns: 1fr; }
  .page-head { align-items: start; flex-direction: column; }
  .panel,.redeem-card { padding: 18px; }
  h1 { font-size: 42px; }
}
