:root {
  color-scheme: light;
  --ink: #173a34;
  --muted: #667b76;
  --line: #d8e4e0;
  --paper: #fbfdfc;
  --green: #167565;
  --green-dark: #0c594d;
  --green-soft: #e7f2ef;
  --amber: #d78a2d;
  --danger: #a43d35;
  font-family: "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: #edf3f0; color: var(--ink); }
button, input, select { font: inherit; }
a { color: var(--green); }
.auth-page { min-height: 100vh; background: radial-gradient(circle at 15% 15%, #f8f0df 0, transparent 28%), #e7f0ed; }
.auth-shell { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(360px, 480px); min-height: 100vh; }
.brand-panel { display: flex; flex-direction: column; justify-content: center; padding: clamp(40px, 9vw, 140px); background: linear-gradient(145deg, rgba(10, 73, 63, .96), rgba(22, 117, 101, .88)); color: white; }
.brand-panel h1 { max-width: 700px; margin: 14px 0; font-family: Georgia, "Noto Serif SC", serif; font-size: clamp(38px, 5vw, 72px); line-height: 1.12; }
.brand-panel > p:last-child { max-width: 560px; color: #d5e8e3; font-size: 18px; }
.brand-mark { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 16px; background: var(--amber); color: white; font-weight: 800; letter-spacing: .08em; }
.brand-mark.small { display: inline-grid; width: 38px; height: 38px; margin-right: 12px; border-radius: 11px; font-size: 13px; }
.eyebrow { margin: 18px 0 6px; color: var(--amber); font-size: 12px; font-weight: 800; letter-spacing: .18em; }
.auth-card { align-self: center; margin: 40px; padding: 42px; border: 1px solid rgba(255,255,255,.8); border-radius: 22px; background: rgba(255,255,255,.92); box-shadow: 0 24px 70px rgba(23,58,52,.14); }
.auth-card h2, .console-card h2, .account-card h2 { margin: 8px 0 18px; }
.tabs { display: flex; gap: 24px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.tab { border: 0; border-bottom: 3px solid transparent; background: transparent; padding: 12px 0; color: var(--muted); cursor: pointer; }
.tab.active { border-color: var(--green); color: var(--green); font-weight: 700; }
.form-panel { display: none; }
.form-panel.active { display: grid; gap: 18px; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 14px; font-weight: 600; }
input, select { width: 100%; border: 1px solid #bfd0cb; border-radius: 10px; background: white; padding: 12px 13px; color: var(--ink); outline: none; }
input:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(22,117,101,.12); }
.primary-button, .secondary-button, .danger-button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; border-radius: 10px; padding: 10px 18px; font-weight: 700; text-decoration: none; cursor: pointer; }
.primary-button { border: 1px solid var(--green); background: var(--green); color: white; }
.primary-button:hover { background: var(--green-dark); }
.secondary-button { border: 1px solid var(--green); background: white; color: var(--green); }
.danger-button { border: 1px solid #dbb6b2; background: #fff7f6; color: var(--danger); }
.full-width { width: 100%; margin-top: 12px; }
.message { min-height: 20px; color: var(--danger); font-size: 14px; }
.message.success { color: var(--green); }
.hint, .console-card p, .role-label { color: var(--muted); line-height: 1.65; }
.console-header { display: flex; min-height: 70px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: white; padding: 0 max(24px, calc((100vw - 1180px) / 2)); }
.console-header > div { display: flex; align-items: center; }
.console-header nav { display: flex; gap: 24px; }
.console-header a { font-weight: 650; text-decoration: none; }
.console-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; width: min(1180px, calc(100% - 40px)); margin: 36px auto 70px; }
.console-card { border: 1px solid var(--line); border-radius: 18px; background: white; padding: 28px; box-shadow: 0 10px 30px rgba(23,58,52,.05); }
.release-card { grid-column: 1 / -1; background: linear-gradient(110deg, white 55%, var(--green-soft)); }
.release-card h1 { margin: 6px 0; font-size: 34px; }
.button-row { display: flex; gap: 12px; margin-top: 22px; }
.section-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.section-heading span { color: var(--muted); font-size: 12px; }
.inline-form { display: grid; grid-template-columns: 1fr 140px auto; gap: 10px; align-items: end; margin-bottom: 18px; }
.data-list { display: grid; gap: 8px; }
.data-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; border-top: 1px solid var(--line); padding: 13px 0; }
.data-row p { margin: 3px 0; font-size: 13px; }
.data-actions { display: flex; gap: 8px; align-items: center; }
.small-button { border: 1px solid var(--line); border-radius: 8px; background: white; padding: 7px 9px; color: var(--ink); cursor: pointer; }
.active-pill { border-radius: 999px; background: var(--green-soft); padding: 5px 9px; color: var(--green); font-size: 12px; font-weight: 700; }
.activation-result { margin: 14px 0; border: 1px dashed var(--amber); border-radius: 10px; background: #fffaf1; padding: 14px; word-break: break-all; }
.activation-result code { display: block; margin-top: 7px; color: #8b571d; }
.compact-card { align-self: start; }
.text-link { font-weight: 700; }
.account-page { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: linear-gradient(145deg, #e7f2ef, #f8f2e7); }
.account-card { width: min(460px, 100%); border: 1px solid white; border-radius: 20px; background: white; padding: 36px; box-shadow: 0 24px 70px rgba(23,58,52,.12); }
.account-card h1 { margin: 8px 0; word-break: break-all; }
.account-card hr { margin: 28px 0; border: 0; border-top: 1px solid var(--line); }
.stacked-form { display: grid; gap: 16px; }
.back-link { text-decoration: none; font-weight: 650; }

@media (max-width: 820px) {
  .auth-shell { display: block; padding: 18px; }
  .brand-panel { display: block; min-height: auto; border-radius: 20px 20px 0 0; padding: 30px; }
  .brand-panel h1 { font-size: 30px; }
  .brand-panel > p:last-child { display: none; }
  .auth-card { margin: 0; border-radius: 0 0 20px 20px; padding: 28px 24px; }
  .console-header { align-items: flex-start; gap: 16px; padding: 16px 20px; }
  .console-header nav { flex-wrap: wrap; gap: 12px; }
  .console-grid { grid-template-columns: 1fr; width: min(100% - 24px, 680px); margin-top: 18px; }
  .release-card { grid-column: auto; }
  .inline-form { grid-template-columns: 1fr; }
  .button-row { flex-direction: column; }
}
