:root {
  --ink: #14233b;
  --muted: #607089;
  --line: #dfe5ee;
  --surface: #ffffff;
  --background: #f4f7fb;
  --primary: #3157d5;
  --primary-dark: #2443ac;
  --success: #087f5b;
  --danger: #b42318;
  --shadow: 0 18px 50px rgba(25, 43, 75, .09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--background);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; line-height: 1.5; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.site-header { min-height: 76px; padding: 16px clamp(20px, 4vw, 64px); display: flex; align-items: center; justify-content: space-between; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 750; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--ink); color: white; font-size: 12px; letter-spacing: .03em; }
.environment { color: var(--muted); font-size: 13px; }
.site-footer { padding: 28px 20px; text-align: center; color: var(--muted); font-size: 12px; }
.auth-shell, .public-shell { width: min(100% - 32px, 520px); margin: clamp(42px, 8vh, 90px) auto 50px; }
.auth-card, .public-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(26px, 5vw, 44px); box-shadow: var(--shadow); }
.public-card { position: relative; overflow: hidden; }
.public-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--primary), #7c9cff); }
.eyebrow { margin: 0 0 9px; font-size: 11px; letter-spacing: .13em; font-weight: 800; color: var(--primary); }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: clamp(26px, 4vw, 36px); line-height: 1.15; letter-spacing: -.035em; }
h2 { margin-bottom: 5px; font-size: 18px; letter-spacing: -.015em; }
.muted, .section-heading p { color: var(--muted); }
.stack { display: grid; gap: 18px; margin-top: 26px; }
label { display: grid; gap: 7px; color: #34435a; font-size: 13px; font-weight: 650; }
input, select { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #cbd5e3; border-radius: 9px; background: white; color: var(--ink); font: inherit; font-weight: 450; }
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 3px solid rgba(49, 87, 213, .22); outline-offset: 2px; }
input:focus, select:focus { border-color: var(--primary); }
.button { min-height: 44px; padding: 10px 18px; border: 1px solid transparent; border-radius: 9px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: background .15s, transform .15s; }
.button:active { transform: translateY(1px); }
.button.primary { background: var(--primary); color: white; }
.button.primary:hover { background: var(--primary-dark); }
.button.secondary { background: white; color: var(--ink); border-color: var(--line); }
.button.full { width: 100%; margin-top: 24px; min-height: 50px; }
.button[disabled] { opacity: .65; cursor: wait; }
.alert { margin: 18px 0; padding: 12px 14px; border: 1px solid #b7c7f5; border-radius: 9px; background: #eff4ff; color: #25418e; font-size: 13px; }
.alert.warning { background: #fff7e6; border-color: #f0d49a; color: #785014; }
.form-error { min-height: 20px; margin: 10px 0 0; color: var(--danger); font-size: 13px; }
.secure-pill { float: right; padding: 6px 9px; border-radius: 6px; background: #eef8f4; color: var(--success); font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.amount { margin: 28px 0; font-size: clamp(34px, 8vw, 48px); font-weight: 760; letter-spacing: -.045em; }
.public-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.status { display: inline-flex; align-items: center; width: fit-content; padding: 4px 9px; border-radius: 999px; background: #edf1f7; color: #526078; font-size: 11px; font-weight: 750; white-space: nowrap; }
.status-paid { background: #e7f7f0; color: var(--success); }
.status-payment_failed { background: #fff0ee; color: var(--danger); }
.status-expired { background: #f1f1f1; color: #747474; }
.status-checkout_open { background: #fff6df; color: #896315; }
.privacy-note { margin: 22px 0 0; color: var(--muted); font-size: 12px; }
.success-message { color: var(--success); }
.dashboard { width: min(100% - 40px, 1440px); margin: 42px auto 60px; }
.dashboard-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.dashboard-heading h1 { margin-bottom: 7px; }
.dashboard-heading p { margin-bottom: 0; }
.panel { margin-top: 22px; padding: clamp(20px, 3vw, 30px); border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: 0 4px 18px rgba(25, 43, 75, .035); }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-heading p { margin: 0; font-size: 13px; }
.count { min-width: 30px; padding: 3px 8px; border-radius: 999px; text-align: center; background: #eef2f8; color: var(--muted); font-size: 12px; }
.payment-form { display: grid; grid-template-columns: minmax(120px, .7fr) minmax(100px, .5fr) 2fr auto; align-items: end; gap: 16px; }
.payment-form .wide { grid-column: span 1; }
.payment-form label:nth-of-type(4) { grid-column: 3; }
.payment-form .button { grid-column: 4; grid-row: 1 / span 2; align-self: center; min-width: 170px; }
.optional { color: var(--muted); font-weight: 400; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { padding: 10px 12px; text-align: left; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
td { max-width: 260px; padding: 16px 12px; border-bottom: 1px solid #edf0f5; vertical-align: middle; overflow-wrap: anywhere; }
td strong, td small { display: block; }
td small { margin-top: 4px; color: var(--muted); font-size: 10px; }
code { color: #526078; font-size: 11px; }
.empty { padding: 40px; text-align: center; color: var(--muted); }
@media (max-width: 1050px) {
  .payment-form { grid-template-columns: 1fr 1fr; }
  .payment-form .wide, .payment-form label:nth-of-type(4) { grid-column: auto; }
  .payment-form .button { grid-column: 1 / -1; grid-row: auto; }
}
@media (max-width: 680px) {
  .site-header { min-height: 66px; padding: 13px 18px; }
  .environment { display: none; }
  .dashboard { width: min(100% - 24px, 1440px); margin-top: 28px; }
  .dashboard-heading { align-items: center; }
  .dashboard-heading .muted { display: none; }
  .payment-form { grid-template-columns: 1fr; }
  .payment-form .button { grid-column: auto; }
  table, tbody { display: block; }
  thead { display: none; }
  tr { display: grid; grid-template-columns: 1fr 1fr; padding: 14px 0; border-bottom: 1px solid var(--line); }
  td { display: block; max-width: none; padding: 8px 4px; border: 0; }
  td::before { content: attr(data-label); display: block; margin-bottom: 4px; color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
  td:first-child, td:last-child { grid-column: 1 / -1; }
  .empty { grid-column: 1 / -1; }
  .secure-pill { float: none; display: inline-block; margin-bottom: 20px; }
}
