:root {
  --bg: #f4f6fb; --ink: #0f172a; --text: #1e293b; --muted: #64748b; --faint: #94a3b8; --line: #e8ebf3; --line-2: #f1f3f9;
  --brand: #5b5bf6; --brand-ink: #4338ca; --brand-soft: #eef0ff; --grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --navy: #0f1236; --green: #059669; --green-soft: #e7f8f1; --red: #e11d48; --red-soft: #ffeef2; --amber: #d97706; --amber-soft: #fff5e6;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 4px 16px rgba(15,23,42,.05); --shadow-lg: 0 24px 60px rgba(15,18,54,.14);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.55; -webkit-font-smoothing: antialiased; min-height: 100vh; }
body.auth { display: grid; place-items: center; padding: 32px 16px; position: relative; overflow-x: hidden; }
body.auth::before { content: ''; position: fixed; inset: 0; z-index: -1; background:
  radial-gradient(520px 360px at 12% 18%, rgba(99,102,241,.16), transparent 70%),
  radial-gradient(520px 360px at 88% 82%, rgba(139,92,246,.16), transparent 70%); }
a { color: var(--brand-ink); font-weight: 600; text-decoration: none; }
a:hover { text-decoration: underline; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none !important; }
.logo b { color: var(--brand); font-weight: 800; }
.mark { width: 36px; height: 36px; border-radius: 11px; background: var(--grad); display: grid; place-items: center; color: #fff; font-size: .78rem; font-weight: 800; box-shadow: 0 6px 16px rgba(99,102,241,.4); }
.box { width: 100%; max-width: 440px; }
.box.wide { max-width: 520px; }
.box > .logo { margin-bottom: 22px; }
.card { background: #fff; border-radius: 22px; padding: 32px; box-shadow: var(--shadow-lg); border: 1px solid var(--line-2); }
h1 { font-size: 1.6rem; font-weight: 800; color: var(--ink); letter-spacing: -.025em; line-height: 1.2; margin-bottom: 6px; }
.lead { color: var(--muted); margin-bottom: 24px; }
.field { margin-bottom: 15px; }
label { display: block; font-weight: 700; font-size: .84rem; margin-bottom: 6px; color: var(--ink); }
input, select { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font: inherit; color: var(--text); background: #fff; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(91,91,246,.12); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; background: var(--grad); color: #fff; padding: 13px 20px; border-radius: 12px; font: inherit; font-weight: 700; border: none; cursor: pointer; box-shadow: 0 8px 22px rgba(99,102,241,.32); transition: filter .15s, transform .1s; text-decoration: none !important; }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .65; cursor: wait; }
.btn-light { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow); }
.err { display: none; background: var(--red-soft); color: var(--red); font-weight: 600; font-size: .9rem; padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; }
.err.show { display: block; }
.ok { background: var(--green-soft); color: var(--green); font-weight: 600; font-size: .92rem; padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; }
.foot { text-align: center; margin-top: 18px; color: var(--muted); font-size: .92rem; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: -4px 0 16px; font-size: .9rem; }
.demo-flag { display: inline-flex; align-items: center; gap: 8px; background: var(--amber-soft); color: var(--amber); font-weight: 700; font-size: .78rem; padding: 6px 12px; border-radius: 999px; margin-bottom: 18px; }
.summary { background: var(--bg); border-radius: 14px; padding: 16px 18px; margin-bottom: 20px; display: grid; gap: 6px; font-size: .94rem; }
.summary div { display: flex; justify-content: space-between; gap: 12px; }
.summary span { color: var(--muted); }
.summary b { color: var(--ink); }
.summary .total { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.fake-card { background: linear-gradient(135deg, #1e1b4b, #4338ca); color: #fff; border-radius: 16px; padding: 18px 20px; margin-bottom: 18px; font-family: ui-monospace, monospace; letter-spacing: .08em; }
.fake-card small { display: block; opacity: .7; font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: 0; font-size: .75rem; margin-bottom: 10px; }
.note { color: var(--muted); font-size: .84rem; text-align: center; margin-top: 12px; }
.plans { display: grid; gap: 10px; margin-bottom: 18px; }
.plan-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; cursor: pointer; background: #fff; font: inherit; text-align: left; }
.plan-opt.on { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(91,91,246,.12); }
.plan-opt b { color: var(--ink); display: block; }
.plan-opt small { color: var(--muted); }
.plan-opt .price { font-weight: 800; color: var(--ink); white-space: nowrap; }
.mail { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin-bottom: 12px; }
.mail h3 { font-size: 1rem; color: var(--ink); margin-bottom: 4px; }
.mail .meta { color: var(--muted); font-size: .82rem; margin-bottom: 10px; }
.mail pre { white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: .92rem; }
/* Setyu admin */
body.setyu { padding: 32px 16px; }
.setyu-wrap { max-width: 1100px; margin: 0 auto; }
.setyu-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.setyu-head h1 { margin-top: 18px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpis div { background: #fff; border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); }
.kpis small { color: var(--muted); font-weight: 600; display: block; }
.kpis b { font-size: 1.5rem; color: var(--ink); }
.table-wrap { background: #fff; border-radius: 16px; box-shadow: var(--shadow); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding: 12px 16px; background: #fbfcfe; white-space: nowrap; }
td { padding: 13px 16px; border-top: 1px solid var(--line-2); white-space: nowrap; }
.st { font-size: .76rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; text-transform: capitalize; }
.st-trialing { background: var(--brand-soft); color: var(--brand-ink); }
.st-active { background: var(--green-soft); color: var(--green); }
.st-past_due { background: var(--amber-soft); color: var(--amber); }
.st-paused, .st-cancelled { background: var(--red-soft); color: var(--red); }
@media (max-width: 520px) { .card { padding: 24px 20px; } }
