:root {
  --blue: #1769e0;
  --text: #15233d;
  --muted: #667085;
  --line: #e6eaf0;
  --bg: #f5f7fb;
  --danger: #b42318;
  --green: #067647;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif; }
button, input, textarea { font: inherit; }
button { cursor: pointer; border: 0; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 240px 1fr; }
.side { padding: 24px; background: #fff; border-right: 1px solid var(--line); }
.brand { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.sub { color: var(--muted); font-size: 13px; line-height: 1.6; margin-bottom: 28px; }
.nav button { display: block; width: 100%; height: 44px; margin-bottom: 10px; border-radius: 8px; background: transparent; color: #475467; text-align: left; padding: 0 14px; }
.nav button.active { background: var(--blue); color: #fff; font-weight: 700; }
.logout { margin-top: 30px; width: 100%; height: 40px; border-radius: 8px; color: var(--danger); background: #fff1f0; }
.main { padding: 26px 32px 60px; overflow: auto; }
.top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
h1 { margin: 0; font-size: 26px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 22px; margin-bottom: 18px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field label { display: block; margin-bottom: 8px; color: #475467; font-size: 14px; }
.field input, .field textarea, .search { width: 100%; border: 1px solid #cfd7e3; border-radius: 8px; padding: 11px 12px; outline: none; }
.field textarea { min-height: 86px; resize: vertical; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.primary { background: var(--blue); color: #fff; border-radius: 8px; padding: 10px 16px; font-weight: 700; }
.ghost { background: #edf4ff; color: var(--blue); border-radius: 8px; padding: 10px 16px; }
.danger { background: #fff1f0; color: var(--danger); border-radius: 8px; padding: 10px 16px; }
.small { padding: 8px 12px; font-size: 13px; }
.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.table th, .table td { border-bottom: 1px solid var(--line); padding: 12px; text-align: left; font-size: 14px; vertical-align: top; }
.table th { color: #475467; background: #f8fafc; }
.badge { display: inline-block; border-radius: 999px; padding: 4px 10px; font-size: 12px; }
.ok { color: var(--green); background: #ecfdf3; }
.warn { color: #b54708; background: #fffaeb; }
.bad { color: var(--danger); background: #fff1f0; }
.info { color: #175cd3; background: #eff8ff; }
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(520px, 1fr) minmax(420px, 520px) minmax(40px, 8vw); align-items: stretch; padding: 0; background: #031b3d var(--login-bg, url("/assets/login-bg.png")) center/cover no-repeat; }
.login::before { content: ""; position: fixed; inset: 0; background: linear-gradient(90deg, rgba(2, 18, 44, .84), rgba(2, 18, 44, .58) 48%, rgba(245, 247, 251, .58) 76%, rgba(245, 247, 251, .9)); pointer-events: none; }
.login-hero { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; padding: 6vw 0 6vw 7vw; color: #fff; }
.login-kicker { margin-bottom: 16px; color: #9bd7ff; font-size: 13px; font-weight: 800; letter-spacing: 0; }
.login-title { max-width: 640px; font-size: clamp(34px, 3.6vw, 52px); line-height: 1.12; font-weight: 850; margin-bottom: 18px; }
.login-desc { max-width: 610px; color: rgba(255,255,255,.78); font-size: 16px; line-height: 1.8; }
.login-panel { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; padding: 32px; grid-column: 2; }
.login .card { width: min(390px, 100%); border: 1px solid rgba(255,255,255,.78); box-shadow: 0 28px 80px rgba(15,35,71,.22); backdrop-filter: blur(12px); }
.login-card-tag { display: inline-block; margin-bottom: 14px; padding: 5px 10px; border-radius: 999px; color: var(--blue); background: #edf4ff; font-size: 12px; font-weight: 800; }
.login .primary { width: 100%; height: 46px; margin-top: 8px; }
.hint { color: var(--muted); font-size: 13px; line-height: 1.6; }
.review-box { width: 220px; min-height: 56px; border: 1px solid #cfd7e3; border-radius: 8px; padding: 8px; }
.security-card { max-width: 520px; }
.security-card .field { margin-top: 16px; }
.settings-card .field { margin-top: 16px; }
.login-bg-preview { height: 180px; border-radius: 12px; border: 1px solid var(--line); background-size: cover; background-position: center; box-shadow: inset 0 0 0 1px rgba(255,255,255,.28); }
select { border: 1px solid #cfd7e3; border-radius: 8px; padding: 9px 10px; background: #fff; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); }
  .grid { grid-template-columns: 1fr; }
  .main { padding: 20px; }
  .login { grid-template-columns: 1fr; }
  .login-hero { padding: 48px 28px 12px; }
  .login-title { font-size: 36px; }
  .login-panel { padding: 20px; align-items: flex-start; }
}
