/* SimBridge 登录与账号管理页样式（与教师端同一套品牌色） */
:root {
  --blue: #1347BA;
  --blue-dark: #0E3A92;
  --red: #EE575A;
  --ink: #1B2740;
  --muted: #657089;
  --line: #E1E6F0;
  --bg: #F5F7FC;
  --soft: #EBF0FB;
  --white: #fff;
  --danger: #B03A34;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body.auth-body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.65 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p { margin: 0; }
.muted { color: var(--muted); }
.fineprint { font-size: 12px; color: var(--muted); margin-top: 14px; line-height: 1.7; }
.form-error {
  margin-top: 12px; padding: 9px 12px; border-radius: 8px; font-size: 13px;
  background: #FBEFEB; color: var(--danger); border: 1px solid #EED3CA;
}
[hidden] { display: none !important; }

/* 登录页 */
.login-shell { min-height: 100%; display: grid; grid-template-columns: minmax(360px, 1.05fr) minmax(420px, 1fr); }
.login-brand {
  position: relative; overflow: hidden; padding: 64px 56px; color: #fff;
  background: linear-gradient(150deg, #0E3A92 0%, #1347BA 55%, #1B5CD8 100%);
  display: flex; flex-direction: column; justify-content: center;
}
.login-brand::after {
  content: ""; position: absolute; width: 520px; height: 520px; right: -180px; bottom: -220px;
  border-radius: 50%; background: rgba(238, 87, 90, .22);
}
.login-brand::before {
  content: ""; position: absolute; width: 360px; height: 360px; left: -120px; top: -140px;
  border-radius: 50%; background: rgba(255, 255, 255, .10);
}
.wordmark { position: relative; font-size: 46px; font-weight: 700; letter-spacing: -1.6px; }
.wordmark .sim { color: #fff; }
.wordmark .bridge { color: #FF8A8C; }
.brand-sub { position: relative; margin-top: 6px; font-size: 18px; letter-spacing: 6px; color: rgba(255,255,255,.86); }
.brand-line { position: relative; margin-top: 38px; font-size: 15px; color: rgba(255,255,255,.82); }
.brand-foot { position: relative; margin-top: auto; padding-top: 48px; font-size: 12px; letter-spacing: 1px; color: rgba(255,255,255,.55); }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 48px 32px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.login-card { width: min(420px, 100%); box-shadow: 0 18px 50px rgba(27, 39, 64, .08); }
.login-card h1 { font-size: 26px; letter-spacing: -.6px; }
.login-card > .muted { margin-top: 6px; font-size: 13px; }
.field { display: block; margin-top: 22px; font-size: 13px; font-weight: 500; }
.field input, .field select, .field textarea {
  display: block; width: 100%; margin-top: 8px; padding: 11px 13px; min-height: 44px;
  border: 1px solid #D5DEEE; border-radius: 9px; background: var(--white); color: var(--ink);
  font: inherit; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(19, 71, 186, .12);
}
.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 62px; }
.ghost {
  border: 0; background: transparent; color: var(--blue); font: inherit; font-size: 12px;
  cursor: pointer; padding: 6px 8px; border-radius: 6px;
}
.password-wrap .eye { position: absolute; right: 6px; top: 17px; }
.options { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 16px; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--blue); margin: 0; }
button.primary, button.secondary, button.ghost-btn {
  font: inherit; font-size: 14px; border-radius: 9px; padding: 11px 18px; cursor: pointer;
  border: 1px solid transparent; transition: filter .15s, background .15s;
}
button.primary { background: var(--blue); color: #fff; font-weight: 600; }
button.primary:hover:not(:disabled) { filter: brightness(.94); }
button.secondary { background: #fff; border-color: #C9D5EA; color: var(--ink); }
button.secondary:hover:not(:disabled) { background: var(--soft); }
button:disabled { opacity: .5; cursor: not-allowed; }
.block { display: block; width: 100%; margin-top: 22px; min-height: 46px; }

/* 弹窗 */
.modal {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center;
  background: rgba(14, 26, 52, .55); padding: 20px;
}
.modal-card {
  position: relative;
  width: min(560px, 100%); background: #fff; border-radius: 16px; padding: 28px;
  box-shadow: 0 30px 80px rgba(14, 26, 52, .35);
}
.modal-card h2 { font-size: 20px; }
.modal-card > .muted { margin-top: 6px; font-size: 12px; }
.summary { margin: 18px 0; padding-left: 20px; color: var(--ink); }
.summary li { margin: 7px 0; }
.icon-close { position: absolute; top: 10px; right: 12px; border: 0; background: transparent;
  font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.icon-close:hover { background: var(--soft); color: var(--ink); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* 协议正文 */
.doc-shell { max-width: 900px; margin: 0 auto; padding: 48px 24px 72px; }
.doc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.doc-head .wordmark-sm { font-size: 22px; font-weight: 700; letter-spacing: -.6px; }
.doc-head .wordmark-sm .sim { color: var(--blue); }
.doc-head .wordmark-sm .bridge { color: var(--red); }
.doc-body { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 36px 40px; margin-top: 22px; }
.doc-body h1 { font-size: 24px; letter-spacing: -.4px; }
.doc-body h2 { font-size: 15px; margin-top: 26px; }
.doc-body p, .doc-body li { color: #33415C; font-size: 13.5px; }
.doc-body p { margin-top: 8px; }
.doc-body ul { padding-left: 20px; margin: 8px 0 0; }
.doc-meta { margin-top: 6px; font-size: 12px; color: var(--muted); }

/* 改密页 */
.center-shell { min-height: 100%; display: grid; place-items: center; padding: 40px 20px; }
.narrow-card { width: min(460px, 100%); box-shadow: 0 18px 50px rgba(27, 39, 64, .08); }
.narrow-card h1 { font-size: 22px; }
.notice-box {
  margin-top: 16px; padding: 12px 14px; border-radius: 9px; font-size: 13px;
  background: var(--soft); color: #3A5E97; border: 1px solid #D3DFF2;
}

/* 账号管理 */
.admin-shell { max-width: 1180px; margin: 0 auto; padding: 32px 24px 64px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.admin-head h1 { font-size: 24px; }
.admin-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; margin-top: 22px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.panel h2 { font-size: 15px; margin-bottom: 4px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid #EDF0F7; white-space: nowrap; }
th { color: var(--muted); font-weight: 500; font-size: 12px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11px; background: var(--soft); color: #3A5E97; }
.badge.off { background: #FBEFEB; color: var(--danger); }
.badge.admin { background: #E8F0FF; color: var(--blue); }
.row-actions { display: flex; gap: 6px; }
.row-actions button { font-size: 12px; padding: 5px 9px; }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: #10306E; color: #fff; border-radius: 9px; padding: 11px 20px; font-size: 13px;
  box-shadow: 0 8px 30px rgba(16, 48, 110, .3); z-index: 60;
}
.toast.error { background: #974D3E; }
.code-block { font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }
textarea.code { min-height: 150px; font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; }

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { padding: 40px 28px; }
  .wordmark { font-size: 36px; }
  .brand-line, .brand-foot { display: none; }
  .login-panel { padding: 28px 18px 40px; }
  .admin-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-head { align-items: flex-start; flex-direction: column; }
  .admin-head > div:last-child { flex-wrap: wrap; }
  .doc-body { padding: 24px 20px; }
}
