:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  color: #222b36;
  background: #f6f7f9;
  --blue: #205ad5;
  --blue-hover: #1748af;
  --muted: #66717f;
  --line: #e1e5eb;
  --green: #167048;
  --red: #b43333;
}
* { box-sizing: border-box; letter-spacing: 0; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 300px; min-height: 100vh; display: flex; flex-direction: column; }
button, input, textarea { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, a { touch-action: manipulation; }
:focus-visible { outline: 3px solid #84aafa; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 30px; line-height: 1.25; font-weight: 650; }
h2 { font-size: 20px; line-height: 1.35; font-weight: 650; }
h3 { font-size: 16px; line-height: 1.4; font-weight: 600; }
p { line-height: 1.6; }
svg.lucide { width: 20px; height: 20px; flex: 0 0 auto; stroke-width: 1.8; }
.skip-link { position: fixed; top: -80px; left: 12px; z-index: 20; padding: 12px; background: white; }
.skip-link:focus { top: 8px; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { width: min(1120px, 100%); min-height: 93px; padding: 20px 32px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; color: #192635; font-size: 25px; line-height: 1.15; font-weight: 750; }
.brand:hover { text-decoration: none; }
.brand img { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; }
.brand small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 5px; }
.header-actions { display: flex; align-items: center; gap: 22px; }
.support-link { display: inline-flex; align-items: center; gap: 8px; color: #475568; font-size: 14px; }
.page { width: min(1120px, 100%); margin: 0 auto; padding: 28px 32px 60px; flex: 1; }
.site-footer { width: min(1120px, 100%); margin: 0 auto; padding: 22px 32px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); }
.site-footer a { color: var(--muted); overflow-wrap: anywhere; }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border-radius: 6px; padding: 11px 16px; border: 1px solid transparent; font-weight: 600; font-size: 14px; line-height: 1.4; text-align: center; transition: background .15s, border-color .15s; }
.primary { background: var(--blue); color: #fff; }
.primary:hover:not(:disabled) { background: var(--blue-hover); }
.secondary { background: #fff; border-color: #cfd7e2; color: #354459; }
.secondary:hover:not(:disabled) { background: #f0f4fa; border-color: #a6b7d1; }
.full { width: 100%; }
.icon-button { position: relative; width: 42px; height: 42px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 1px solid transparent; border-radius: 6px; color: #526174; }
.icon-button:hover:not(:disabled) { background: #edf1f6; }
.bordered { border-color: #cfd7e2; background: white; width: 44px; height: 44px; }
[data-tooltip]::after { content: attr(data-tooltip); position: absolute; z-index: 10; right: 0; top: calc(100% + 7px); width: max-content; max-width: 180px; padding: 6px 9px; background: #222b36; color: white; border-radius: 4px; font-size: 12px; line-height: 1.4; pointer-events: none; opacity: 0; }
[data-tooltip]:hover::after, [data-tooltip]:focus-visible::after { opacity: 1; }
.text-button { display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; color: var(--blue); padding: 8px 0; font-size: 13px; min-height: 40px; }
.text-button:hover:not(:disabled) { text-decoration: underline; }
.muted { color: var(--muted); font-size: 14px; }
.eyebrow { color: var(--muted); font-size: 11px; font-weight: 650; margin-bottom: 8px; }
.detail-label { font-size: 12px; color: var(--muted); display: block; }
.field-note { font-size: 12px; color: var(--muted); line-height: 1.6; }
.notice { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 24px; border: 1px solid #cddbf7; border-radius: 6px; color: #264b89; background: #eff5ff; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.notice > span { flex: 1; min-width: 0; }
.notice.success { background: #edf8f1; border-color: #c2e4cf; color: var(--green); }
.notice.error { background: #fff1f0; border-color: #efcfcb; color: var(--red); }
.notice .icon-button { width: 32px; height: 32px; color: inherit; }
.center-state { padding: 100px 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.center-state h1 { font-size: 24px; }
.center-state p { color: var(--muted); }
.state-icon { color: var(--muted); }
.spinner { display: inline-block; width: 22px; height: 22px; border: 2px solid #d5dfef; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.auth-section { width: min(400px, 100%); margin: 58px auto 64px; }
.auth-heading { margin-bottom: 32px; }
.auth-heading h1 { font-size: 28px; }
.bind-context { margin: -10px 0 22px; color: var(--blue); font-size: 14px; font-weight: 550; }
.existing-account-warning { border-left: 3px solid #b78729; padding: 2px 0 2px 13px; margin-bottom: 26px; color: #715421; font-size: 13px; line-height: 1.65; }
.section-icon { width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; background: #eaf0fd; color: var(--blue); border-radius: 8px; margin-bottom: 24px; }
.auth-form label { display: block; font-size: 14px; font-weight: 550; margin: 0 0 9px; }
input, textarea { width: 100%; min-width: 0; padding: 13px 14px; border: 1px solid #c8d1df; border-radius: 6px; background: #fff; color: #222b36; font-size: 16px; }
input { min-height: 50px; }
input::placeholder { color: #8b96a5; }
input[aria-invalid="true"] { border-color: var(--red); }
.auth-form > .button { margin-top: 20px; min-height: 48px; }
.auth-form .field-note { margin-top: 8px; }
.code-recipient { color: var(--muted); font-size: 14px; margin-bottom: 24px; overflow-wrap: anywhere; }
.code-recipient strong { color: #334155; font-weight: 550; }
.code-input { font-size: 24px; font-variant-numeric: tabular-nums; }
.code-actions { display: flex; flex-wrap: wrap; justify-content: space-between; column-gap: 16px; margin-top: 12px; }
.form-error { margin-top: 18px; font-size: 14px; color: var(--red); overflow-wrap: anywhere; }
.auth-footer { margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.auth-footer svg { width: 16px; height: 18px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 9px 0 28px; }
.status-badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; border-radius: 4px; background: #edf0f4; color: #627085; font-size: 12px; font-weight: 550; line-height: 1.5; white-space: nowrap; }
.status-badge.active, .status-badge.succeeded { background: #e6f4ec; color: var(--green); }
.status-badge.active::before { content: ""; width: 6px; height: 6px; background: var(--green); border-radius: 50%; }
.status-badge.pending { background: #fff4dd; color: #885b13; }
.status-badge.failed, .status-badge.canceled, .status-badge.cancelled { background: #fceceb; color: var(--red); }
.tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--line); }
.tab { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 0; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: none; font-size: 14px; font-weight: 550; }
.tab[aria-selected="true"] { border-bottom-color: var(--blue); color: var(--blue); }
.tab:hover { color: var(--blue); }
.tab-panel { margin-top: 0; }
.tab-panel:focus { outline: none; }
.subscription-summary { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 30px 0; }
.subscription-summary h2 { font-size: 25px; margin-bottom: 6px; }
.subscription-dates { display: flex; flex-direction: column; gap: 6px; text-align: right; }
.subscription-dates strong { font-size: 16px; font-weight: 600; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 32px; border-block: 1px solid var(--line); }
.overview-grid:has(.quota-section[hidden]) { grid-template-columns: minmax(0, 1fr); }
.content-section { padding: 28px 0; min-width: 0; }
.quota-section { padding-left: 32px; border-left: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
.section-heading h2 { display: flex; align-items: center; gap: 9px; }
.section-heading h2 > svg { color: #7b899b; }
.section-heading > .muted { font-size: 12px; }
.connection-key { display: block; margin: 9px 0 12px; background: #fff; resize: vertical; min-height: 96px; max-height: 260px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; word-break: break-all; }
.key-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.app-links { margin-top: 28px; }
.app-links .muted { font-size: 12px; display: block; margin-top: 3px; }
.platforms { display: flex; gap: 10px 20px; flex-wrap: wrap; margin-top: 14px; }
.platform-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; min-height: 40px; }
.platform-link svg { width: 17px; height: 17px; }
.platform-link .external { width: 13px; height: 13px; color: #7b899b; }
.empty-state { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 22px 0; color: var(--muted); font-size: 14px; }
.empty-state > svg { width: 26px; height: 26px; color: #8593a6; }
.empty-state h3 { color: #354459; }
.quota-value { display: flex; flex-wrap: wrap; align-items: baseline; gap: 9px; margin-top: 2px; }
.quota-value strong { font-size: 30px; line-height: 1.4; font-weight: 600; }
.quota-meter { width: 100%; height: 6px; border-radius: 3px; overflow: hidden; margin: 18px 0 12px; background: #e0e6ee; }
.quota-meter > span { display: block; height: 100%; width: 0; background: var(--blue); }
.quota-meter.exhausted > span { background: var(--red); }
.quota-section .field-note { margin: 6px 0 22px; }
.plans-section { scroll-margin-top: 24px; }
.plans-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.plan { border: 1px solid #d9e0e9; background: #fff; border-radius: 8px; padding: 22px; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.plan h3 { overflow-wrap: anywhere; }
.plan-duration { color: var(--muted); font-size: 12px; margin-top: 5px; }
.plan-price { margin: 24px 0 22px; font-size: 28px; font-weight: 650; overflow-wrap: anywhere; }
.plan .button { margin-top: auto; }
.payment-status { display: flex; align-items: flex-start; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.payment-status .spinner { margin-top: 2px; }
.payment-status p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.payment-status.problem { color: var(--red); }
.table-wrap { max-width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { color: var(--muted); font-size: 12px; font-weight: 500; text-align: left; padding: 12px 14px; background: #edf0f4; }
td { padding: 18px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; overflow-wrap: anywhere; }
td:first-child { font-weight: 550; }
td:nth-child(2) { color: var(--muted); font-size: 12px; }
td:nth-child(3) { font-variant-numeric: tabular-nums; white-space: nowrap; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { text-align: right; padding-right: 0; }
.payment-id { display: block; font-size: 11px; color: var(--muted); margin-top: 5px; font-weight: 400; }
.account-details { margin: 0; }
.account-details > div { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line); align-items: center; }
.account-details dt { color: var(--muted); font-size: 14px; }
.account-details dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.account-details dd:has(button) { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.account-support { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-top: 28px; }
.account-support a { font-size: 14px; display: inline-block; margin-top: 8px; overflow-wrap: anywhere; }
.is-busy { cursor: wait !important; }
@media (min-width: 1100px) { .auth-section { margin-top: 80px; } }
@media (max-width: 760px) {
  .header-inner { min-height: 80px; padding: 16px 20px; }
  .page { padding: 24px 20px 40px; }
  .site-footer { padding: 20px; }
  .header-actions { gap: 10px; }
  .brand { font-size: 23px; gap: 10px; }
  .support-link span { display: none; }
  .support-link { padding: 10px; }
  .overview-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .quota-section { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .plans-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan { padding: 18px; }
  .account-details > div { grid-template-columns: 155px minmax(0, 1fr); }
  .subscription-summary h2 { font-size: 23px; }
  table { table-layout: fixed; }
  th, td { padding: 14px 8px; }
  th:first-child { width: 33%; }
  th:nth-child(2) { width: 23%; }
  th:nth-child(3) { width: 19%; }
  th:last-child { width: 25%; }
}
@media (max-width: 480px) {
  h1 { font-size: 27px; }
  h2 { font-size: 18px; }
  .page { padding-inline: 16px; }
  .header-inner { padding-inline: 16px; }
  .brand img { width: 40px; height: 40px; }
  .auth-section { margin-top: 32px; margin-bottom: 42px; }
  .auth-heading h1 { font-size: 25px; }
  .page-heading { align-items: flex-start; gap: 12px; }
  .page-heading > .status-badge { margin-top: 24px; }
  .tabs { gap: 0; justify-content: space-between; }
  .tab { font-size: 13px; gap: 6px; }
  .tab svg { width: 17px; height: 17px; }
  .subscription-summary { align-items: flex-start; flex-direction: column; gap: 20px; }
  .subscription-dates { text-align: left; }
  .section-heading { gap: 10px; }
  .section-heading > .muted { max-width: 112px; text-align: right; }
  .plans-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .plan { display: grid; grid-template-columns: minmax(0, 1fr) minmax(110px, auto); gap: 0 16px; align-items: center; }
  .plan-duration { grid-column: 1; }
  .plan-price { grid-column: 1; margin: 14px 0 0; font-size: 25px; }
  .plan .button { grid-column: 2; grid-row: 1 / 4; margin: 0; padding-inline: 12px; }
  .account-details > div { grid-template-columns: minmax(0, 1fr); gap: 9px; padding-block: 18px; }
  .account-support { align-items: flex-start; flex-direction: column; }
  .table-wrap { overflow: visible; }
  table, tbody { display: block; }
  thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
  td { padding: 0 !important; border: 0; }
  td:first-child { grid-column: 1; grid-row: 1; }
  td:nth-child(2) { grid-column: 1; grid-row: 2; }
  td:nth-child(3) { grid-column: 2; grid-row: 1; text-align: right; }
  td:nth-child(4) { grid-column: 2; grid-row: 2; }
  .payment-id { max-width: 190px; }
  .notice { padding: 10px; gap: 8px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 2s !important; transition: none !important; } }
