:root {
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: #202631;
  background: #f5f6f8;
  font-synthesis: none;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.page { min-height: 100vh; display: flex; flex-direction: column; }
.header { height: 68px; padding: 0 max(24px, calc((100vw - 1180px) / 2)); display: flex; align-items: center; justify-content: space-between; background: #fff; border-bottom: 1px solid #e7e9ed; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 17px; font-weight: 700; letter-spacing: .01em; }
.brand-icon { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 6px; background: #1d2940; color: #fff; font-size: 12px; font-weight: 800; letter-spacing: -.03em; }
.header-tag { color: #838d9d; font-size: 13px; }
main { width: min(1180px, calc(100% - 48px)); flex: 1; margin: auto; display: flex; flex-direction: column; justify-content: center; }
.auth-layout { width: min(440px, 100%); margin: 48px auto; }
.auth-card { padding: 36px 38px 24px; border: 1px solid #e2e5ea; border-radius: 10px; background: #fff; box-shadow: 0 8px 28px rgba(28, 42, 65, .045); }
.auth-heading h1 { margin: 0; font-size: 27px; line-height: 1.35; font-weight: 700; letter-spacing: -.035em; }
.auth-heading p { margin: 8px 0 0; color: #8993a1; font-size: 13px; }
.auth-tabs { display: flex; gap: 30px; margin: 30px 0 24px; border-bottom: 1px solid #e9ebef; }
.auth-tabs button { padding: 0 1px 12px; border: 0; border-bottom: 2px solid transparent; background: none; color: #7e8998; font-size: 14px; font-weight: 600; }
.auth-tabs button.selected { color: #1967d2; border-color: #1967d2; }
.auth-form { display: flex; flex-direction: column; }
.auth-form label, .key-label { color: #465061; font-size: 13px; font-weight: 600; }
.auth-form input { width: 100%; height: 44px; margin: 8px 0 20px; padding: 0 13px; border: 1px solid #d8dde5; border-radius: 6px; outline: none; background: #fff; color: #202631; font-size: 14px; }
.auth-form input::placeholder { color: #abb2bd; }
.auth-form input:focus { border-color: #3480df; box-shadow: 0 0 0 3px rgba(52, 128, 223, .12); }
.field-top { display: flex; align-items: center; justify-content: space-between; }
.field-top .link-button { font-size: 12px; }
.link-button { border: 0; padding: 0; background: none; color: #286fc3; font-size: 13px; font-weight: 600; }
.link-button:hover, .admin-link:hover { text-decoration: underline; }
.primary-button { min-height: 44px; padding: 0 18px; border: 1px solid #1763c5; border-radius: 6px; background: #176bd3; color: #fff; font-size: 14px; font-weight: 600; }
.primary-button:hover { background: #115bb8; }
.primary-button:disabled { opacity: .55; cursor: not-allowed; }
.auth-form .primary-button { width: 100%; margin-top: 2px; }
.hint, .form-hint { margin: -1px 0 18px; color: #939ca9; font-size: 12px; line-height: 1.6; }
.back-link { align-self: center; margin-top: 18px; }
.message { min-height: 18px; margin: 14px 0 0; color: #ba443b; font-size: 12px; line-height: 1.5; }
.recovery-banner { width: min(680px, 100%); margin: 36px auto 0; padding: 18px 20px; border: 1px solid #ead49e; border-radius: 8px; background: #fff9e9; }
.recovery-banner strong { font-size: 14px; }
.recovery-banner p { margin: 5px 0 12px; color: #806f50; font-size: 12px; }
.recovery-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.recovery-actions code { flex: 1; min-width: 190px; overflow-wrap: anywhere; font-size: 14px; }
.recovery-actions button, .code-box button { padding: 7px 11px; border: 1px solid #d9dde4; border-radius: 5px; background: #fff; color: #2868b1; font-size: 12px; }
.dashboard { width: min(960px, 100%); margin: 54px auto 80px; }
.dashboard-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 22px; }
.section-caption { color: #8993a1; font-size: 12px; }
.dashboard-head h1 { margin: 8px 0 0; font-size: 28px; font-weight: 700; letter-spacing: -.03em; }
.account-menu { display: flex; align-items: center; gap: 18px; padding-bottom: 5px; color: #748091; font-size: 13px; }
.account-menu .link-button { padding-left: 16px; border-left: 1px solid #d7dce4; }
.admin-link { color: #286fc3; font-weight: 600; }
.license-card { border: 1px solid #e2e5ea; border-radius: 9px; background: #fff; }
.license-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 30px 34px; border-bottom: 1px solid #edf0f2; }
.license-label { color: #8c96a4; font-size: 12px; }
.license-top h2 { margin: 8px 0 0; font-size: 20px; font-weight: 650; }
.status-pill { padding: 6px 11px; border-radius: 4px; background: #e9f2ff; color: #2869b5; font-size: 12px; font-weight: 600; white-space: nowrap; }
.license-body { padding: 29px 34px 0; }
.key-label { margin-bottom: 10px; }
.code-box { display: flex; align-items: center; gap: 16px; min-height: 68px; padding: 13px 16px; border: 1px solid #dce1e8; border-radius: 6px; background: #fafbfd; }
.code-box code { flex: 1; color: #38465a; font-family: Consolas, "Cascadia Mono", monospace; font-size: clamp(14px, 1.8vw, 19px); font-weight: 600; overflow-wrap: anywhere; }
.license-actions { display: flex; align-items: center; gap: 18px; padding: 24px 34px 0; }
.license-actions .primary-button { min-width: 150px; }
.license-actions > span { color: #9aa3af; font-size: 12px; }
.license-card .message { padding: 0 34px 24px; }
footer { width: min(1180px, calc(100% - 48px)); margin: auto; display: flex; justify-content: space-between; padding: 20px 0 26px; color: #a4acb7; font-size: 12px; }
button:focus-visible, a:focus-visible { outline: 3px solid #8ab9f3; outline-offset: 2px; }
@media (max-width: 650px) {
  .header { height: 60px; padding: 0 18px; }
  main { width: calc(100% - 28px); }
  .auth-layout { margin: 28px auto; }
  .auth-card { padding: 29px 24px 19px; }
  .dashboard { margin: 30px auto 52px; }
  .dashboard-head { align-items: flex-start; flex-direction: column; gap: 13px; }
  .dashboard-head h1 { font-size: 24px; }
  .account-menu { gap: 13px; }
  .license-top { padding: 24px 21px; }
  .license-body { padding: 23px 21px 0; }
  .license-actions { align-items: flex-start; flex-direction: column; gap: 12px; padding: 21px 21px 0; }
  .license-actions .primary-button { width: 100%; }
  .license-card .message { padding: 0 21px 20px; }
  .code-box { flex-wrap: wrap; }
  footer { width: calc(100% - 36px); }
}
