/* ========== Auth Pages ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #1a5c9e;
  --primary-dark: #0d3d6e;
  --primary-light: #e8f2fc;
  --accent: #d4a017;
  --text-dark: #2c2c2c;
  --text-body: #4a4a4a;
  --text-muted: #888;
  --border: #e0e0e0;
  --bg-light: #f4f8fc;
  --white: #ffffff;
  --danger: #d85a30;
  --shadow: 0 8px 40px rgba(26,92,158,0.12);
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: var(--text-body);
  background: linear-gradient(135deg, #e8f2fc 0%, #f4f8fc 60%, #eef3f8 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { text-decoration: none; color: var(--primary); transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

/* ========== Top Brand Row ========== */
.auth-brand {
  text-align: center;
  padding: 40px 20px 10px;
}
.auth-brand .logo {
  width: 56px; height: 56px;
  background: var(--primary);
  border-radius: 12px;
  color: #fff; font-size: 20px; font-weight: bold;
  letter-spacing: 1px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.auth-brand h1 { font-size: 22px; color: var(--text-dark); font-weight: 600; }
.auth-brand p { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ========== Auth Card ========== */
.auth-wrap {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px 20px 50px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 36px 36px 30px;
}
.auth-card h2 { font-size: 22px; color: var(--text-dark); text-align: center; margin-bottom: 6px; font-weight: 600; }
.auth-card .auth-sub { text-align: center; font-size: 13px; color: var(--text-muted); margin-bottom: 26px; }

/* ========== Tabs ========== */
.auth-tabs {
  display: flex;
  background: var(--bg-light);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
}
.auth-tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-size: 14px;
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}
.auth-tab.active { background: var(--white); color: var(--primary); box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.auth-tab a { color: inherit; display: block; }

/* ========== Form ========== */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; color: var(--text-dark); margin-bottom: 7px; font-weight: 500; }
.form-control {
  width: 100%;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--text-dark);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,92,158,0.12);
}
textarea.form-control { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.6; }

.input-row { display: flex; gap: 10px; }
.input-row .form-control { flex: 1; }

.btn-code {
  flex-shrink: 0;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--primary);
  background: var(--white);
  color: var(--primary);
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.btn-code:hover:not(:disabled) { background: var(--primary-light); }
.btn-code:disabled { border-color: var(--border); color: var(--text-muted); background: var(--bg-light); cursor: not-allowed; }

.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.form-hint.error { color: var(--danger); }

/* ========== Submit Button ========== */
.btn-submit {
  width: 100%;
  height: 46px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
  transition: background 0.2s;
}
.btn-submit:hover { background: var(--primary-dark); }

/* ========== Agreement & Extras ========== */
.auth-agree { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--text-muted); margin: 4px 0 18px; }
.auth-agree input { margin-top: 2px; }
.auth-agree a { font-size: 12px; }

.auth-extra {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-top: 18px;
}
.auth-extra a { color: var(--primary); }

.auth-divider {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin: 22px 0 14px;
  position: relative;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 38%;
  height: 1px;
  background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

.auth-third { display: flex; justify-content: center; gap: 16px; }
.auth-third a {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--bg-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.auth-foot { text-align: center; font-size: 13px; color: var(--text-muted); padding: 16px; }
.auth-foot a { color: var(--primary); }

/* ========== Back to home ========== */
.auth-home { text-align: center; margin-top: 16px; font-size: 13px; }
.auth-home a { color: var(--text-muted); }
.auth-home a:hover { color: var(--primary); }

.success-box {
  text-align: center;
  padding: 14px 0 6px;
}
.success-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: #e1f5ee;
  color: #0f6e56;
  font-size: 32px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
