:root {
  color-scheme: light;
  font-family: "Be Vietnam Pro", "Segoe UI", sans-serif;
  color: #16211e;
  background: #f4f6f4;
  font-synthesis: none;
  line-height: 1.5;
  --ink: #16211e;
  --muted: #68746f;
  --line: #dfe5e1;
  --surface: #fff;
  --green: #0e7959;
  --green-dark: #075a42;
  --green-soft: #e5f5ef;
  --amber: #a26005;
  --amber-soft: #fff3d6;
  --red: #a93434;
  --red-soft: #fde8e7;
  --blue: #285e9a;
  --blue-soft: #e8f1fb;
  --shadow: 0 18px 55px rgba(27, 52, 43, .08);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 7% 5%, #e5f2eb 0, transparent 28rem), #f4f6f4; }
button, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.mono { font-family: Consolas, "SFMono-Regular", monospace; letter-spacing: .02em; }

.topbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  background: rgba(255, 255, 255, .88);
  border-bottom: 1px solid rgba(210, 220, 215, .8);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 39px; height: 39px; display: grid; place-items: center; color: #fff; background: var(--green); border-radius: 12px; font-weight: 700; font-size: 14px; box-shadow: 0 7px 18px rgba(14, 121, 89, .24); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 14px; letter-spacing: -.01em; }
.brand small { color: var(--muted); font-size: 10px; margin-top: 1px; text-transform: uppercase; letter-spacing: .12em; }
.account-nav { display: flex; align-items: center; gap: 16px; }
.account-nav a { text-decoration: none; }
.account-email { font-size: 13px; color: var(--muted); }

main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.auth-layout { min-height: calc(100vh - 76px); display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(40px, 8vw, 110px); align-items: center; padding: 64px 0; }
.auth-intro { max-width: 610px; }
.eyebrow { margin: 0 0 8px; color: var(--green); text-transform: uppercase; letter-spacing: .12em; font-size: 11px; font-weight: 700; }
.auth-intro h1 { font-size: clamp(38px, 5.4vw, 68px); line-height: 1.06; letter-spacing: -.055em; margin: 0 0 22px; max-width: 650px; }
.lead { max-width: 570px; font-size: 17px; color: var(--muted); margin: 0 0 38px; }
.benefits { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.benefits li { display: flex; align-items: flex-start; gap: 14px; }
.benefits li > span { display: grid; place-items: center; flex: 0 0 36px; height: 36px; border-radius: 50%; background: var(--green-soft); color: var(--green); font-weight: 700; font-size: 11px; }
.benefits strong, .benefits small { display: block; }
.benefits strong { font-size: 14px; margin: 1px 0 3px; }
.benefits small { color: var(--muted); font-size: 12px; }

.auth-panel { width: 100%; max-width: 450px; justify-self: end; background: rgba(255, 255, 255, .96); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 30px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: #f0f3f1; border-radius: 12px; padding: 4px; margin-bottom: 28px; }
.tab { border: 0; background: transparent; color: var(--muted); border-radius: 9px; padding: 9px; font-size: 13px; font-weight: 600; }
.tab.active { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(20, 40, 32, .08); }
.form-heading h2, .success-state h2 { margin: 0 0 7px; font-size: 24px; letter-spacing: -.03em; }
.form-heading p, .success-state p { color: var(--muted); margin: 0 0 23px; font-size: 13px; }
label { display: block; margin: 0 0 16px; color: #39443f; font-size: 12px; font-weight: 600; }
input { width: 100%; margin-top: 7px; padding: 12px 13px; border: 1px solid #ccd5d0; border-radius: 10px; background: #fcfdfc; color: var(--ink); outline: none; transition: border .2s, box-shadow .2s; }
input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(14, 121, 89, .12); }
.form-row { display: flex; justify-content: flex-end; margin: -7px 0 15px; }
.text-button, .back-button { border: 0; background: transparent; color: var(--green); padding: 3px; font-size: 12px; font-weight: 600; }
.centered { display: block; margin: 15px auto 0; }
.back-button { margin: 0 0 18px; color: var(--muted); }
.success-state { text-align: center; padding: 8px 0; }
.success-icon { width: 62px; height: 62px; display: grid; place-items: center; margin: 0 auto 18px; color: var(--green); background: var(--green-soft); border-radius: 50%; font-size: 27px; font-weight: 700; }

.button { border: 0; border-radius: 10px; padding: 11px 16px; font-weight: 600; font-size: 13px; transition: transform .15s, opacity .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .55; transform: none; }
.button-primary { color: #fff; background: var(--green); box-shadow: 0 7px 18px rgba(14, 121, 89, .18); }
.button-primary:hover { background: var(--green-dark); }
.button-secondary { color: var(--green); background: var(--green-soft); }
.button-light { color: var(--green-dark); background: #fff; }
.button-quiet { color: var(--ink); background: #eef2ef; padding: 9px 13px; }
.button-danger { color: var(--red); background: var(--red-soft); }
.button-block { width: 100%; }

.dashboard { padding: 48px 0 70px; }
.dashboard-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 28px; }
.dashboard-heading h1 { margin: 0 0 6px; font-size: clamp(27px, 4vw, 38px); letter-spacing: -.04em; }
.dashboard-heading > div > p:last-child { margin: 0; color: var(--muted); font-size: 13px; }
.status-pill, .badge { display: inline-flex; align-items: center; white-space: nowrap; border-radius: 999px; padding: 6px 10px; background: var(--green-soft); color: var(--green-dark); font-size: 11px; font-weight: 700; }
.status-pill.unverified, .badge.pending { background: var(--amber-soft); color: var(--amber); }
.badge.blocked, .badge.revoked { background: var(--red-soft); color: var(--red); }
.badge.expired { background: #eef0ef; color: #65706b; }

.notice { display: flex; justify-content: space-between; align-items: center; gap: 18px; border-radius: 14px; padding: 15px 18px; margin-bottom: 20px; border: 1px solid #f0d49c; background: #fff8e8; }
.notice strong { display: block; font-size: 13px; }
.notice p { margin: 2px 0 0; color: #826438; font-size: 12px; }

.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.summary-card { display: flex; align-items: center; gap: 14px; padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.summary-card small, .summary-card strong { display: block; }
.summary-card small { color: var(--muted); font-size: 11px; margin-bottom: 2px; }
.summary-card strong { font-size: 20px; letter-spacing: -.025em; }
.summary-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; font-size: 13px; font-weight: 700; }
.summary-icon.green { background: var(--green-soft); color: var(--green); }
.summary-icon.amber { background: var(--amber-soft); color: var(--amber); }
.summary-icon.blue { background: var(--blue-soft); color: var(--blue); }

.plan-banner { display: flex; justify-content: space-between; align-items: center; gap: 28px; padding: 29px 32px; color: #fff; border-radius: 20px; background: linear-gradient(125deg, #075a42, #0d8060 62%, #15916e); box-shadow: 0 18px 40px rgba(8, 91, 68, .18); margin-bottom: 20px; overflow: hidden; position: relative; }
.plan-banner::after { content: ""; position: absolute; width: 260px; height: 260px; border: 45px solid rgba(255,255,255,.07); border-radius: 50%; right: -105px; top: -120px; }
.plan-banner > * { position: relative; z-index: 1; }
.plan-label { display: inline-block; color: #bcebdc; text-transform: uppercase; letter-spacing: .12em; font-size: 10px; font-weight: 700; margin-bottom: 7px; }
.plan-banner h2 { margin: 0 0 5px; font-size: 22px; }
.plan-banner > div > p { margin: 0; color: #d7f2e9; font-size: 12px; }
.plan-purchase { display: flex; align-items: center; gap: 22px; }
.plan-purchase p { white-space: nowrap; }
.plan-purchase p strong { color: #fff; font-size: 24px; }
.plan-purchase p span { color: #c5e9dd; font-size: 11px; }

.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.panel { padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 8px 28px rgba(28, 53, 44, .035); }
.panel-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 17px; }
.panel-heading h2 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.count-badge { min-width: 28px; height: 28px; display: grid; place-items: center; padding: 0 8px; color: var(--muted); background: #f0f3f1; border-radius: 9px; font-size: 11px; font-weight: 700; }
.card-list { display: grid; gap: 10px; }
.empty-state { text-align: center; padding: 34px 15px; border: 1px dashed #d5ddd8; border-radius: 13px; color: var(--muted); }
.empty-state strong { display: block; color: #4b5752; font-size: 13px; margin-bottom: 3px; }
.empty-state p { margin: 0; font-size: 11px; }
.data-card { border: 1px solid #e3e8e5; border-radius: 13px; padding: 14px; }
.data-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.data-card h3 { margin: 0; font-size: 13px; }
.license-key { margin: 8px 0 10px; padding: 9px 10px; display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #f5f7f5; border-radius: 9px; font-size: 12px; overflow-wrap: anywhere; }
.copy-button { flex: none; border: 0; background: transparent; color: var(--green); padding: 2px; font-size: 10px; font-weight: 700; }
.meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 9px; }
.meta-grid span, .order-meta span { display: block; color: var(--muted); font-size: 10px; }
.meta-grid strong, .order-meta strong { display: block; margin-top: 2px; font-size: 11px; font-weight: 600; }
.card-actions { display: flex; gap: 7px; margin-top: 12px; flex-wrap: wrap; }
.card-actions .button { padding: 7px 10px; font-size: 10px; }
.order-code { margin: 10px 0; padding: 10px; background: var(--amber-soft); color: #745314; border-radius: 9px; }
.order-code span { display: block; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 3px; }
.order-code strong { font-size: 13px; }
.order-meta { display: flex; justify-content: space-between; gap: 12px; }
.admin-panel { margin-top: 20px; }
.admin-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 18px; }
.admin-stat { padding: 13px; background: #f4f7f5; border-radius: 11px; }
.admin-stat strong, .admin-stat small { display: block; }
.admin-stat strong { font-size: 18px; }
.admin-stat small { color: var(--muted); font-size: 9px; }

.payment-dialog { width: min(440px, calc(100% - 30px)); border: 0; border-radius: 22px; padding: 30px; color: var(--ink); box-shadow: 0 30px 90px rgba(10, 31, 24, .25); }
.payment-dialog::backdrop { background: rgba(12, 28, 22, .58); backdrop-filter: blur(4px); }
.dialog-close { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: #eef2ef; color: var(--muted); font-size: 20px; line-height: 1; }
.payment-icon { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 14px; color: var(--green); background: var(--green-soft); font-size: 22px; font-weight: 700; margin-bottom: 18px; }
.payment-dialog h2 { margin: 0 0 6px; font-size: 23px; }
.payment-dialog > .muted { margin: 0 0 20px; font-size: 12px; }
.payment-qr-wrap { display: grid; place-items: center; padding: 12px; margin-bottom: 13px; background: #f7f9f7; border: 1px solid var(--line); border-radius: 14px; }
.payment-qr-wrap img { display: block; width: min(100%, 310px); max-height: 360px; object-fit: contain; border-radius: 8px; }
.bank-details { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; margin-bottom: 7px; background: #f5f7f5; border-radius: 11px; }
.bank-details > div:last-child { grid-column: 1 / -1; }
.bank-details span, .bank-details strong { display: block; }
.bank-details span { color: var(--muted); font-size: 9px; margin-bottom: 2px; }
.bank-details strong { font-size: 11px; overflow-wrap: anywhere; }
.payment-detail { padding: 13px 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; border-top: 1px solid var(--line); }
.payment-detail > span { color: var(--muted); font-size: 11px; }
.payment-detail > strong { font-size: 18px; }
.payment-detail > div { display: flex; align-items: center; gap: 8px; }
.dialog-note { padding: 10px 12px; margin: 8px 0 18px; color: #725825; background: var(--amber-soft); border-radius: 9px; font-size: 10px; }

.toast { position: fixed; right: 24px; bottom: 24px; max-width: min(390px, calc(100% - 48px)); padding: 13px 17px; color: #fff; background: #152b24; border-radius: 11px; box-shadow: 0 14px 40px rgba(0,0,0,.18); font-size: 12px; z-index: 50; animation: toast-in .2s ease-out; }
.toast.error { background: #8f2f2f; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }

@media (max-width: 900px) {
  .auth-layout { grid-template-columns: 1fr; max-width: 600px; margin: 0 auto; padding: 45px 0; }
  .auth-intro { text-align: center; margin: 0 auto; }
  .benefits { text-align: left; max-width: 450px; margin: 0 auto; }
  .auth-panel { justify-self: center; }
  .content-grid { grid-template-columns: 1fr; }
  .admin-stats { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  main { width: min(100% - 26px, 1180px); }
  .topbar { height: 66px; padding: 0 14px; }
  .account-email { display: none; }
  .auth-layout { min-height: calc(100vh - 66px); padding: 32px 0; gap: 35px; }
  .auth-intro h1 { font-size: 39px; }
  .auth-panel { padding: 22px; border-radius: 19px; }
  .dashboard { padding-top: 30px; }
  .dashboard-heading { display: block; }
  .dashboard-heading .status-pill { margin-top: 14px; }
  .notice, .plan-banner { align-items: flex-start; flex-direction: column; }
  .summary-grid { grid-template-columns: 1fr; }
  .summary-card { padding: 13px 15px; }
  .plan-banner { padding: 24px; }
  .plan-purchase { width: 100%; justify-content: space-between; }
  .panel { padding: 17px; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
}
