:root {
  --ink: #1d2522;
  --muted: #68716d;
  --paper: #f4f1e9;
  --surface: #fffdf7;
  --line: #c9c4b8;
  --jade: #176955;
  --jade-dark: #0f4a3c;
  --red: #a33b2f;
  --shadow: rgba(29, 37, 34, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background-color: var(--paper);
  background-image: linear-gradient(rgba(29, 37, 34, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(29, 37, 34, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  letter-spacing: 0;
}

.topbar {
  min-height: 76px;
  padding: 12px max(24px, calc((100vw - 1040px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #fff;
  background: #202a27;
  border-bottom: 4px solid var(--red);
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 48px; height: 48px; object-fit: contain; image-rendering: auto; }
.brand-name { font-family: KaiTi, STKaiti, serif; font-size: 22px; font-weight: 700; line-height: 1.05; }
.brand-subtitle { margin-top: 4px; color: #c9d3ce; font-size: 12px; }

.server-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #dbe4df;
  font-family: Consolas, monospace;
  font-size: 13px;
}

.server-status span { width: 9px; height: 9px; border-radius: 50%; background: #63c795; box-shadow: 0 0 0 3px rgba(99, 199, 149, 0.14); }

main {
  width: min(100%, 1040px);
  min-height: calc(100vh - 132px);
  margin: 0 auto;
  padding: 48px 24px 56px;
  display: grid;
  place-items: start center;
}

.account-tool {
  width: min(100%, 560px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 5px solid var(--jade);
  box-shadow: 0 18px 44px var(--shadow);
}

.tool-heading { padding: 30px 34px 22px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 7px; color: var(--red); font-family: Georgia, serif; font-size: 11px; font-weight: 700; }
h1 { margin: 0; font-family: KaiTi, STKaiti, serif; font-size: 30px; line-height: 1.2; }

.tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.tab {
  min-height: 48px;
  border: 0;
  border-right: 1px solid var(--line);
  color: var(--muted);
  background: #ece8de;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.tab:last-child { border-right: 0; }
.tab.active { color: var(--jade-dark); background: var(--surface); box-shadow: inset 0 -3px 0 var(--jade); font-weight: 700; }
.tab:focus-visible, input:focus-visible, button:focus-visible { outline: 3px solid rgba(23, 105, 85, 0.25); outline-offset: 2px; }

.panel-stack { min-height: 470px; }
.form-panel { padding: 28px 34px 30px; display: grid; gap: 16px; }
.form-panel[hidden] { display: none; }
label { display: grid; gap: 7px; color: #3f4945; font-size: 13px; font-weight: 700; }
input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #aaa79d;
  border-radius: 4px;
  color: var(--ink);
  background: #fff;
  font: 15px Consolas, "Microsoft YaHei", sans-serif;
}
input:hover { border-color: #767d79; }
input:focus { border-color: var(--jade); box-shadow: inset 0 0 0 1px var(--jade); }

.primary-action {
  height: 46px;
  margin-top: 6px;
  border: 1px solid var(--jade-dark);
  border-radius: 4px;
  color: #fff;
  background: var(--jade);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.primary-action:hover { background: var(--jade-dark); }
.primary-action:disabled { cursor: wait; opacity: 0.62; }

.notice { min-height: 50px; padding: 0 34px 24px; color: var(--muted); font-size: 13px; }
.notice.success { color: var(--jade-dark); }
.notice.error { color: var(--red); }

footer { min-height: 56px; padding: 18px 24px; color: #737a76; text-align: center; font: 11px Georgia, serif; }

@media (max-width: 600px) {
  .topbar { min-height: 70px; padding: 10px 16px; }
  .brand img { width: 42px; height: 42px; }
  .brand-name { font-size: 19px; }
  .server-status { font-size: 11px; }
  main { min-height: calc(100vh - 126px); padding: 24px 14px 40px; }
  .tool-heading { padding: 24px 22px 18px; }
  h1 { font-size: 26px; }
  .panel-stack { min-height: 452px; }
  .form-panel { padding: 24px 22px 26px; }
  .notice { padding: 0 22px 20px; }
}

@media (max-width: 390px) {
  .server-status { max-width: 112px; text-align: right; line-height: 1.35; }
}
