:root {
    --bg: #f6f7fb;
    --panel: #ffffff;
    --panel-strong: #0f172a;
    --muted: #64748b;
    --text: #0f172a;
    --border: #e2e8f0;
    --brand: #7c3aed;
    --brand-dark: #5b21b6;
    --accent: #14b8a6;
    --danger: #dc2626;
    --warning: #d97706;
    --success: #15803d;
    --shadow: 0 24px 80px rgba(15, 23, 42, .12);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.nav { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.brand-mark { width: 38px; height: 38px; border-radius: 14px; background: linear-gradient(135deg, var(--brand), var(--accent)); display: grid; place-items: center; color: white; box-shadow: var(--shadow); }
.nav-links { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn { border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 14px; padding: 12px 18px; font-weight: 700; font-size: 14px; transition: .2s ease; }
.btn-primary { background: var(--brand); color: white; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { background: white; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: #c4b5fd; }
.btn-danger { background: #fee2e2; color: var(--danger); }
.btn-full { width: 100%; }
.hero { position: relative; padding: 76px 0 64px; overflow: hidden; }
.hero:before { content: ""; position: absolute; inset: -200px -160px auto auto; width: 520px; height: 520px; border-radius: 999px; background: rgba(124, 58, 237, .18); filter: blur(8px); z-index: -1; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 42px; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 8px; background: #ede9fe; color: var(--brand-dark); border: 1px solid #ddd6fe; border-radius: 999px; padding: 8px 12px; font-weight: 700; font-size: 13px; }
.hero h1 { font-size: clamp(38px, 6vw, 72px); line-height: .96; letter-spacing: -.055em; margin: 22px 0; }
.hero p { color: var(--muted); font-size: 18px; line-height: 1.7; margin: 0; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-card, .card { background: var(--panel); border: 1px solid var(--border); border-radius: 28px; box-shadow: var(--shadow); }
.hero-card { padding: 24px; }
.mock-terminal { background: #0f172a; color: #dbeafe; border-radius: 20px; padding: 18px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 13px; overflow: hidden; }
.mock-line { display: block; padding: 5px 0; white-space: nowrap; }
.mock-ok { color: #5eead4; }
.mock-key { color: #c4b5fd; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.stat { background: #f8fafc; border: 1px solid var(--border); border-radius: 18px; padding: 16px; }
.stat strong { display: block; font-size: 22px; }
.stat span { color: var(--muted); font-size: 13px; }
.section { padding: 58px 0; }
.section h2 { font-size: clamp(28px, 4vw, 46px); letter-spacing: -.04em; margin: 0 0 16px; }
.section-subtitle { color: var(--muted); max-width: 720px; line-height: 1.7; margin: 0 0 28px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { padding: 24px; border-radius: 24px; border: 1px solid var(--border); background: white; }
.feature-icon { width: 44px; height: 44px; border-radius: 16px; background: #ede9fe; color: var(--brand); display: grid; place-items: center; font-weight: 900; margin-bottom: 18px; }
.feature h3 { margin: 0 0 10px; }
.feature p { color: var(--muted); margin: 0; line-height: 1.6; }
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; background: radial-gradient(circle at top right, rgba(20, 184, 166, .18), transparent 30%), var(--bg); }
.auth-card { width: min(760px, 100%); background: white; border: 1px solid var(--border); border-radius: 28px; box-shadow: var(--shadow); padding: 30px; }
.auth-card.compact { width: min(460px, 100%); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-row { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.form-row.full { grid-column: 1 / -1; }
label { font-weight: 700; font-size: 13px; }
input, select, textarea { width: 100%; border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; font: inherit; background: white; color: var(--text); }
input:focus, textarea:focus { outline: 3px solid rgba(124, 58, 237, .16); border-color: var(--brand); }
.error-text { color: var(--danger); font-size: 13px; }
.alert { border-radius: 18px; padding: 14px 16px; margin-bottom: 16px; border: 1px solid var(--border); }
.alert-success { background: #dcfce7; color: #14532d; border-color: #bbf7d0; }
.alert-error { background: #fee2e2; color: #7f1d1d; border-color: #fecaca; }
.alert-warning { background: #fef3c7; color: #78350f; border-color: #fde68a; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 280px 1fr; }
.sidebar { background: #0f172a; color: white; padding: 24px; position: sticky; top: 0; height: 100vh; }
.sidebar .brand-mark { box-shadow: none; }
.sidebar-nav { display: grid; gap: 8px; margin-top: 28px; }
.sidebar-nav a, .sidebar-nav button { width: 100%; text-align: left; border: 0; background: transparent; color: #cbd5e1; padding: 12px 14px; border-radius: 14px; font-weight: 700; cursor: pointer; }
.sidebar-nav a.active, .sidebar-nav a:hover, .sidebar-nav button:hover { background: rgba(255,255,255,.10); color: white; }
.main { padding: 28px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; }
.topbar h1 { margin: 0; letter-spacing: -.035em; }
.muted { color: var(--muted); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card { padding: 22px; box-shadow: none; }
.kpi-label { color: var(--muted); font-size: 13px; font-weight: 700; }
.kpi-value { display: block; font-size: 28px; font-weight: 900; margin-top: 8px; letter-spacing: -.03em; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
th, td { padding: 14px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.status { display: inline-flex; padding: 6px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; background: #e2e8f0; color: #334155; }
.status.PAID, .status.PROCESSED { background: #dcfce7; color: #166534; }
.status.PENDING, .status.CREATED { background: #fef3c7; color: #92400e; }
.status.FAILED, .status.CANCELLED, .status.EXPIRED { background: #fee2e2; color: #991b1b; }
.secret-box { background: #0f172a; color: #e0f2fe; border-radius: 18px; padding: 16px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; overflow-x: auto; }
.mobile-header { display: none; background: #0f172a; color: white; padding: 14px 18px; align-items: center; justify-content: space-between; }
.pagination { margin-top: 18px; }
@media (max-width: 960px) {
    .hero-grid, .feature-grid, .grid-4, .grid-2 { grid-template-columns: 1fr; }
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; }
    .main { padding: 18px; }
}
@media (max-width: 640px) {
    .form-grid { grid-template-columns: 1fr; }
    .nav { align-items: flex-start; }
    .nav-links { justify-content: flex-start; }
    .hero { padding-top: 42px; }
    .stats { grid-template-columns: 1fr; }
    .topbar { align-items: flex-start; flex-direction: column; }
}
