:root {
  --ink: #07120f;
  --ink-2: #0e1f1a;
  --paper: #f4f0e7;
  --paper-2: #ebe5d9;
  --line: rgba(15, 38, 30, 0.14);
  --line-strong: rgba(15, 38, 30, 0.24);
  --text: #10231c;
  --muted: #69776f;
  --accent: #e6a94a;
  --accent-2: #a8d7c4;
  --danger: #b64242;
  --success: #176b50;
  --shadow: 0 28px 80px rgba(3, 14, 10, 0.22);
  color-scheme: light;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }

button { cursor: pointer; }

button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 3px solid rgba(230, 169, 74, 0.75);
  outline-offset: 3px;
}

a { color: inherit; }

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(420px, 0.88fr);
  min-height: 100vh;
  background:
    radial-gradient(circle at 88% 12%, rgba(168, 215, 196, 0.12), transparent 28rem),
    var(--ink);
}

.brand-panel {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(34px, 5vw, 72px);
  background:
    linear-gradient(150deg, rgba(7, 18, 15, 0.2), rgba(7, 18, 15, 0.92)),
    radial-gradient(circle at 12% 18%, rgba(168, 215, 196, 0.26), transparent 22rem),
    radial-gradient(circle at 78% 72%, rgba(230, 169, 74, 0.14), transparent 25rem),
    #0c211a;
  color: #f4f0e7;
}

.brand-panel::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(168, 215, 196, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 215, 196, 0.055) 1px, transparent 1px);
  background-size: 58px 58px;
  content: "";
  mask-image: linear-gradient(115deg, black 12%, transparent 74%);
  pointer-events: none;
}

.brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(244, 240, 231, 0.26);
  border-radius: 12px;
  background: rgba(244, 240, 231, 0.08);
}

.brand-mark svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-width: 2;
}

.brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-copy {
  position: relative;
  z-index: 1;
  max-width: 650px;
  margin-top: auto;
  padding-top: 10vh;
}

.eyebrow, .micro-label {
  margin: 0 0 18px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.brand-copy h2 {
  max-width: 640px;
  margin: 0;
  font-family: "Songti SC", "STSong", "Times New Roman", serif;
  font-size: clamp(30px, 4.2vw, 60px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.14;
}

.brand-lead {
  max-width: 560px;
  margin: 25px 0 0;
  color: rgba(244, 240, 231, 0.66);
  font-size: 14px;
  line-height: 1.8;
}

.search-visual {
  position: relative;
  z-index: 1;
  width: min(590px, 100%);
  margin: 58px 0 0;
  border: 1px solid rgba(168, 215, 196, 0.18);
  border-radius: 18px;
  background: rgba(5, 19, 14, 0.68);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.22);
}

.visual-toolbar {
  display: flex;
  min-height: 54px;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid rgba(168, 215, 196, 0.12);
  padding: 0 18px;
}

.visual-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(230, 169, 74, 0.1);
}

.visual-search {
  flex: 1;
  color: rgba(244, 240, 231, 0.68);
  font-size: 12px;
}

.visual-key {
  border: 1px solid rgba(244, 240, 231, 0.16);
  border-radius: 6px;
  padding: 4px 7px;
  color: rgba(244, 240, 231, 0.66);
  font-size: 12px;
}

.visual-results { padding: 8px 10px 12px; }

.visual-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-radius: 10px;
  padding: 12px 10px;
  color: rgba(244, 240, 231, 0.7);
  font-size: 12px;
}

.visual-row + .visual-row { border-top: 1px solid rgba(168, 215, 196, 0.08); }
.visual-indexer { color: var(--accent-2); font-weight: 700; }
.visual-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visual-meta { color: rgba(244, 240, 231, 0.62); font-size: 12px; letter-spacing: 0.08em; }

.brand-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 42px;
  color: rgba(244, 240, 231, 0.66);
  font-size: 12px;
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--accent-2);
}

.auth-main {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: clamp(24px, 5vw, 64px);
  background:
    radial-gradient(circle at 18% 18%, rgba(230, 169, 74, 0.15), transparent 18rem),
    var(--paper);
}

.auth-card {
  width: min(100%, 500px);
  border: 1px solid rgba(15, 38, 30, 0.09);
  border-radius: 24px;
  background: rgba(255, 252, 246, 0.92);
  box-shadow: var(--shadow);
  padding: clamp(26px, 4vw, 44px);
}

.auth-head h1 {
  margin: 0;
  color: var(--text);
  font-family: "Songti SC", "STSong", "Times New Roman", serif;
  font-size: clamp(31px, 4vw, 44px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.auth-head > p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.micro-label { margin-bottom: 12px; color: #5a7768; }

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 30px 0 22px;
  border-bottom: 1px solid var(--line);
}

.tab {
  position: relative;
  border: 0;
  background: transparent;
  padding: 12px 8px 14px;
  color: #7e8b83;
  font-size: 13px;
  font-weight: 650;
}

.tab::after {
  position: absolute;
  right: 18%;
  bottom: -1px;
  left: 18%;
  height: 2px;
  border-radius: 99px;
  background: transparent;
  content: "";
}

.tab.is-active { color: var(--text); }
.tab.is-active::after { background: var(--accent); }

.form-message {
  margin: 0 0 18px;
  border: 1px solid rgba(182, 66, 66, 0.18);
  border-radius: 10px;
  background: rgba(182, 66, 66, 0.07);
  padding: 11px 13px;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.55;
}

.form-message.is-success {
  border-color: rgba(23, 107, 80, 0.2);
  background: rgba(23, 107, 80, 0.08);
  color: var(--success);
}

.field { margin-bottom: 17px; }

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.field label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  color: #30453b;
  font-size: 12px;
  font-weight: 700;
}

.optional {
  color: #65736b;
  font-size: 12px;
  font-weight: 500;
}

.field input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.56);
  padding: 0 13px;
  color: var(--text);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field input::placeholder { color: #7d8a82; }
.field input:hover { border-color: rgba(15, 38, 30, 0.4); }
.field input:focus { border-color: #739d86; background: #fffdf8; box-shadow: 0 0 0 4px rgba(115, 157, 134, 0.13); }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 56px; }

.text-button {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 5px;
  background: transparent;
  padding: 7px 6px;
  color: #647b6e;
  font-size: 12px;
}

.text-button:hover { color: var(--text); background: rgba(15, 38, 30, 0.06); }

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 1px 0 21px;
  color: #58685f;
  font-size: 12px;
  cursor: pointer;
}

.checkbox-row input {
  width: 15px;
  height: 15px;
  accent-color: #477b61;
}

.primary-button {
  display: flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #0c3b28;
  border-radius: 9px;
  background: #103e2b;
  color: #f8f4ea;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.primary-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.primary-button:hover { background: #185238; box-shadow: 0 8px 18px rgba(16, 62, 43, 0.18); }
.primary-button:active { transform: translateY(1px); }
.primary-button:disabled { cursor: wait; opacity: 0.64; }

.register-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  border-left: 1px solid var(--accent);
  padding: 3px 0 3px 11px;
  color: #64736a;
  font-size: 12px;
  line-height: 1.6;
}

.note-icon { color: #b87819; font-size: 15px; line-height: 1.2; }
.register-note p { margin: 0; }

.form-hint {
  margin: -4px 0 17px;
  color: #65736a;
  font-size: 12px;
  line-height: 1.6;
}

.success-state { padding: 28px 4px 20px; text-align: center; }
.success-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  margin: 0 auto 18px;
  border: 1px solid rgba(23, 107, 80, 0.22);
  border-radius: 50%;
  background: rgba(23, 107, 80, 0.08);
  color: var(--success);
  font-size: 24px;
}
.success-state h2 { margin: 0; font-family: "Songti SC", "STSong", serif; font-size: 28px; font-weight: 600; }
.success-state p { margin: 12px auto 22px; max-width: 330px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.success-state strong { color: var(--text); }

.auth-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-top: 26px;
  color: #64736a;
  font-size: 12px;
}
.auth-foot a { color: #4d6b5b; text-underline-offset: 3px; }

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: minmax(0, 0.8fr) minmax(400px, 1.2fr); }
  .brand-copy h2 { font-size: 36px; }
  .search-visual { margin-top: 38px; }
}

@media (max-width: 760px) {
  .auth-shell { display: block; min-height: 100vh; }
  .brand-panel { min-height: auto; padding: 26px 22px 28px; }
  .brand-copy { margin-top: 34px; padding-top: 0; }
  .brand-copy h2 { max-width: 540px; font-size: clamp(28px, 8vw, 40px); }
  .brand-lead { margin-top: 15px; font-size: 12px; }
  .search-visual, .brand-foot { display: none; }
  .auth-main { min-height: auto; place-items: start center; padding: 18px 14px 34px; }
  .auth-card { border-radius: 18px; padding: 25px 20px 22px; }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .auth-head h1 { font-size: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
