/* 浅蓝色调 */
:root {
  --bg: #eef4fa;
  --card-bg: #ffffff;
  --border: #d0dce8;
  --text: #1a2b3c;
  --text-muted: #6b7f94;
  --accent: #2b7de9;
  --accent-hover: #1a5fb8;
  --btn-disabled-bg: #dfe7ef;
  --btn-disabled-text: #97a8b8;
  --success: #2d9a5f;
  --danger: #d03030;
  --danger-light: #fef0f0;
  --shadow: 0 2px 12px rgba(30, 60, 100, 0.08);
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* ── Card ── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 400px;
  padding: 40px 36px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.card-wide { max-width: 520px; }

.logo-wrap { margin-bottom: 24px; }
.logo-text {
  font-size: 22px; font-weight: 700; color: var(--accent); letter-spacing: 0.02em;
}
.logo-img { height: 36px; width: auto; display: block; }
.logo-img-nav { height: 28px; width: auto; display: block; }
.title {
  font-size: 17px; font-weight: 600; color: var(--text); margin-bottom: 24px; text-align: center;
}

/* ── Form ── */
.form { width: 100%; display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.field input {
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}
.field input:focus { border-color: var(--accent); }
.field input::placeholder { color: var(--btn-disabled-text); }

.error-msg {
  background: var(--danger-light);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
}
.success-msg {
  background: #e8f5ee;
  color: var(--success);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
}

/* ── Buttons ── */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 13px 20px; border-radius: 8px;
  border: 1px solid transparent; font-size: 15px; font-weight: 500;
  cursor: pointer; text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-primary:disabled { background: var(--btn-disabled-bg); color: var(--btn-disabled-text); border-color: var(--border); cursor: not-allowed; }

.btn-outline-muted {
  background: transparent; color: var(--text-muted); border-color: var(--border);
}
.btn-outline-muted:hover { border-color: var(--accent); color: var(--accent); }

.btn-secondary { background: transparent; color: var(--text-muted); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.btn-danger-outline {
  background: transparent; color: var(--danger); border: 1px solid var(--danger); border-radius: 8px;
}
.btn-danger-outline:hover { background: var(--danger-light); }

.btn-sm { padding: 9px 16px; font-size: 13px; width: auto; }
.btn-disabled { background: var(--btn-disabled-bg); color: var(--btn-disabled-text); border-color: var(--border); cursor: not-allowed; }

.btn-link {
  background: none; border: none; color: var(--accent); cursor: pointer;
  font-size: 13px; padding: 0; text-decoration: underline;
}
.btn-link:hover { color: var(--accent-hover); }
.btn-link-danger { color: var(--danger); }
.btn-link-danger:hover { color: #922; }

.btn-group { width: 100%; display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.btn-row { display: flex; gap: 10px; width: 100%; }
.btn-row .btn { flex: 1; }

/* ── Misc ── */
.divider { width: 100%; height: 1px; background: var(--border); margin: 4px 0 16px; }

.switch-hint { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.switch-hint a { color: var(--accent); text-decoration: none; font-weight: 500; }
.switch-hint a:hover { text-decoration: underline; }

.legal { font-size: 12px; color: var(--text-muted); text-align: center; line-height: 1.6; margin-bottom: 12px; }
.legal a { color: var(--accent); text-decoration: none; }
.legal a:hover { text-decoration: underline; }
.footer { font-size: 12px; color: var(--text-muted); text-align: center; }

.text-muted { color: var(--text-muted); font-size: 14px; }
.text-muted-sm { color: var(--text-muted); font-size: 12px; }

/* ── Profile sections ── */
.section { width: 100%; margin-bottom: 20px; }
.section-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 10px; }

.info-card {
  background: #f5f8fc; border: 1px solid var(--border); border-radius: 8px;
  padding: 4px 0; overflow: hidden;
}
.info-row {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; font-size: 14px;
}
.info-row + .info-row { border-top: 1px solid var(--border); }
.info-label { color: var(--text-muted); min-width: 80px; flex-shrink: 0; }
.info-value { flex: 1; color: var(--text); word-break: break-all; }

.tag-active {
  background: #e8f5ee; color: var(--success); padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 500;
}

.action-bar { display: flex; gap: 10px; width: 100%; flex-wrap: wrap; }

/* ── Authorize / Redirect pages ── */
.user-info {
  display: flex; align-items: center; gap: 12px; margin-bottom: 24px;
  width: 100%; padding: 14px 16px; background: #f5f8fc; border-radius: 8px; border: 1px solid var(--border);
}
.user-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--border); flex-shrink: 0; }
.user-avatar-placeholder { width: 44px; height: 44px; border-radius: 50%; background: var(--btn-disabled-bg); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.user-name { font-weight: 600; font-size: 15px; }
.user-via { font-size: 12px; color: var(--text-muted); }

.permissions { width: 100%; margin-bottom: 24px; }
.permissions h4 { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.permission-item { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 5px 0; }

.success-icon { font-size: 48px; margin-bottom: 16px; }
.success-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.success-desc { font-size: 14px; color: var(--text-muted); text-align: center; margin-bottom: 28px; line-height: 1.6; }

@media (max-width: 480px) {
  .card { padding: 28px 20px 24px; }
  .info-row { flex-wrap: wrap; }
}
