:root { --auth-ink:#252a29; --auth-muted:#7f8985; --auth-green:#315d50; --auth-line:#dfe5e2; }
.auth-page { margin:0; background:#f7f9f8; color:var(--auth-ink); font:15px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif; }
.auth-page *, .account-tools *, .account-dialog * { box-sizing:border-box; }
.auth-page button,.auth-page input,.auth-page select,.account-tools button,.account-dialog input,.account-dialog button { font:inherit; }
.auth-page button,.account-tools button,.account-dialog button { cursor:pointer; }
.auth-page button:disabled { opacity:.5; cursor:wait; }
.auth-header { min-height:82px; display:flex; align-items:center; justify-content:space-between; gap:20px; padding:18px 4vw; border-bottom:1px solid var(--auth-line); background:#fff; }
.auth-brand { display:inline-flex; align-items:center; gap:12px; color:var(--auth-ink); text-decoration:none; font-weight:700; font-size:18px; }
.auth-brand>span { display:grid; place-items:center; width:36px; height:36px; border-radius:10px; color:#fff; background:#242725; }
.auth-muted { color:var(--auth-muted); }
.login-layout { max-width:1160px; margin:auto; padding:85px 40px 60px; min-height:calc(100vh - 142px); display:grid; grid-template-columns:1.2fr 1fr; align-items:center; gap:85px; }
.auth-eyebrow { color:var(--auth-green); font-size:13px; font-weight:650; letter-spacing:.08em; }
.login-intro h1 { margin:22px 0; font-size:clamp(32px,3.7vw,50px); line-height:1.45; letter-spacing:-.04em; font-weight:650; }
.login-intro>p:not(.auth-eyebrow) { color:#7b8580; line-height:2; }
.login-modules { display:flex; flex-wrap:wrap; gap:10px 20px; margin-top:45px; padding-top:24px; border-top:1px solid var(--auth-line); font-size:13px; color:#65716b; }
.login-card { padding:38px; border:1px solid var(--auth-line); border-radius:20px; background:#fff; box-shadow:0 16px 50px #293e3210; }
.login-card h2 { font-size:25px; margin:8px 0; }
.login-card form { margin-top:28px; }
.auth-page label,.account-dialog label { display:block; font-size:14px; font-weight:600; margin-bottom:20px; }
.auth-page input,.auth-page select,.account-dialog input { width:100%; height:48px; padding:10px 14px; margin-top:8px; border:1px solid var(--auth-line); border-radius:9px; background:#fbfcfb; color:var(--auth-ink); }
.auth-page input:focus,.auth-page select:focus,.account-dialog input:focus { outline:2px solid #315d5030; border-color:var(--auth-green); }
.auth-password { display:flex; position:relative; }
.auth-password input { padding-right:60px; }
.auth-password button { position:absolute; right:10px; top:16px; padding:5px; border:0; background:transparent; color:var(--auth-green); font-size:13px; }
.auth-primary,.auth-secondary,.auth-danger,.account-tools button,.account-tools a,.account-dialog button { padding:10px 17px; border:1px solid var(--auth-line); border-radius:9px; background:#fff; color:var(--auth-ink); text-decoration:none; display:inline-flex; align-items:center; justify-content:center; gap:8px; font-size:14px; }
.auth-primary { background:#242725; border-color:#242725; color:#fff; }
.auth-secondary:hover,.account-tools button:hover,.account-tools a:hover { background:#f0f4f2; }
.auth-danger { color:#ae3b40; background:#fff9f9; border-color:#eed6d7; }
.auth-full { width:100%; justify-content:space-between; min-height:48px; }
.auth-feedback { color:#ad343b; font-size:13px; min-height:22px; margin:10px 0; overflow-wrap:anywhere; }
.auth-feedback.success { color:var(--auth-green); }
.login-help { margin:25px 0 0; font-size:12px; color:var(--auth-muted); line-height:1.9; }
.auth-footer { text-align:center; padding:18px; font-size:12px; color:var(--auth-muted); }
.admin-main { max-width:1160px; margin:40px auto; padding:0 30px; }
.admin-title { display:flex; justify-content:space-between; align-items:start; margin-bottom:24px; }
.admin-title h1 { font-size:28px; margin:0; }
.admin-title p { margin:6px 0; font-size:14px; }
.admin-card { background:#fff; padding:26px; border:1px solid var(--auth-line); border-radius:14px; margin-bottom:24px; }
.admin-card h2 { margin:0 0 20px; font-size:18px; }
.quick-generate-head { display:flex; align-items:center; justify-content:space-between; gap:24px; }
.quick-generate-head h2 { margin-bottom:2px; }
.quick-generate-head p { margin:0; font-size:13px; }
.quick-generate-head button { min-height:44px; white-space:nowrap; }
.generated-accounts { display:grid; gap:10px; }
.generated-account { display:grid; grid-template-columns:minmax(130px,1fr) minmax(160px,1.2fr) minmax(190px,1.3fr) auto; align-items:center; gap:16px; padding:15px 16px; border:1px solid #dce5e0; border-radius:11px; background:#f8faf9; }
.generated-field { min-width:0; }
.generated-field span { display:block; margin-bottom:3px; color:var(--auth-muted); font-size:11px; }
.generated-field code { display:block; overflow:hidden; color:var(--auth-ink); font:600 14px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace; text-overflow:ellipsis; white-space:nowrap; }
.generated-field time { font-size:13px; white-space:nowrap; }
.generated-account .copy-account { min-width:88px; }
.fixed-expiry { min-height:48px; margin-top:8px; padding:8px 13px; display:flex; flex-direction:column; justify-content:center; border:1px solid var(--auth-line); border-radius:9px; background:#f5f8f6; }
.fixed-expiry[hidden] { display:none; }
.fixed-expiry strong { font-size:14px; }
.fixed-expiry span { color:var(--auth-muted); font-size:11px; font-weight:400; }
.admin-create { display:grid; grid-template-columns:1fr 1fr 1.4fr auto; align-items:start; gap:18px; }
.admin-create label { margin:0; }
.admin-create>button { margin-top:30px; min-height:48px; }
.auth-page .auth-check { display:flex; align-items:center; gap:8px; font-size:13px; font-weight:400; margin:8px 0 0; }
.auth-check input { width:16px; height:16px; margin:0; accent-color:var(--auth-green); }
.admin-table-wrap { overflow:auto; }
.admin-table { width:100%; border-collapse:collapse; text-align:left; font-size:14px; }
.admin-table th { color:var(--auth-muted); font-size:12px; font-weight:500; padding:12px; border-bottom:1px solid var(--auth-line); white-space:nowrap; }
.admin-table td { padding:18px 12px; border-bottom:1px solid #edf0ee; white-space:nowrap; }
.admin-table tbody tr:last-child td { border:0; }
.admin-table td:first-child { font-weight:600; }
.admin-status { font-size:12px; padding:4px 8px; border-radius:6px; color:#315d50; background:#edf5f0; }
.admin-status.expired,.admin-status.disabled { color:#a85037; background:#fbf0ea; }
.admin-actions { display:flex; gap:8px; }
.admin-actions button { padding:6px 12px; font-size:12px; }
.admin-note { margin:16px 0 0; color:var(--auth-muted); font-size:12px; }
.admin-audit { padding-top:12px; }
.admin-audit summary { color:#65716b; cursor:pointer; font-size:14px; }
.account-tools { position:relative; color:var(--auth-ink); font:13px/1.5 -apple-system,"Microsoft YaHei",sans-serif; }
.account-tools summary { cursor:pointer; list-style:none; white-space:nowrap; border:1px solid var(--auth-line); padding:9px 12px; border-radius:9px; background:#fff; }
.account-tools summary::after { content:' ▾'; color:#84908a; }
.account-menu { position:absolute; z-index:1500; right:0; top:calc(100% + 10px); padding:18px; width:260px; border:1px solid var(--auth-line); border-radius:12px; box-shadow:0 15px 40px #20352720; background:#fff; display:grid; gap:10px; }
.account-tools [hidden] { display:none !important; }
.account-menu p { margin:0 0 6px; color:var(--auth-muted); }
.account-dialog { width:min(480px,calc(100vw - 32px)); border:1px solid var(--auth-line); border-radius:16px; padding:28px; color:var(--auth-ink); font:14px/1.6 -apple-system,"Microsoft YaHei",sans-serif; background:#fff; }
.account-dialog::backdrop { background:#18241e66; }
.account-dialog h2 { margin:0 0 20px; font-size:22px; }
.account-dialog .dialog-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:22px; }
.account-dialog button[type=submit] { background:#242725; color:#fff; }
.account-dialog .auth-check input { width:16px; height:16px; margin:0; }
.account-dialog .auth-check { display:flex; gap:8px; align-items:center; }
@media(max-width:950px) { .login-layout { gap:35px; padding:50px 30px; } .login-card { padding:28px; } .admin-create { grid-template-columns:1fr 1fr; } .admin-create>button { margin-top:30px; } .generated-account { grid-template-columns:1fr 1fr; } }
@media(max-width:650px) { .auth-header { padding:18px 22px; } .auth-header>.auth-muted { display:none; } .login-layout { grid-template-columns:1fr; gap:20px; padding:25px 22px; } .login-intro h1 { font-size:29px; margin:10px 0; } .login-intro>p:not(.auth-eyebrow),.login-modules { display:none; } .login-card { padding:26px; } .admin-main { padding:0 16px; margin-top:24px; } .admin-card { padding:18px; } .admin-create { grid-template-columns:1fr; } .admin-create>button { margin-top:0; } .admin-title { gap:10px; } .account-menu { max-width:calc(100vw - 30px); } .quick-generate-head { align-items:stretch; flex-direction:column; gap:14px; } .generated-account { grid-template-columns:1fr; gap:10px; } .generated-account .copy-account { width:100%; } }

/* Account control aligned with the creator toolbar. */
.topbar .account-tools {
  min-width:0;
  margin-left:2px;
  padding-left:8px;
  border-left:1px solid #e0e3e5;
  color:#303438;
  font:600 11px/1.2 -apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif;
}
.topbar .account-tools summary {
  width:98px;
  height:36px;
  padding:0 9px 0 6px;
  display:grid;
  grid-template-columns:24px minmax(0,1fr) 8px;
  align-items:center;
  gap:7px;
  overflow:hidden;
  border:1px solid #d9dde0;
  border-radius:10px;
  color:#34383c;
  background:#fff;
  transition:background-color 140ms ease,border-color 140ms ease,transform 100ms ease;
}
.topbar .account-tools summary::-webkit-details-marker { display:none; }
.topbar .account-tools summary::after { content:none; }
.topbar .account-tools summary:hover { border-color:#c7ccd0; background:#f6f7f7; }
.topbar .account-tools summary:active { transform:scale(.985); }
.topbar .account-tools[open] summary { border-color:#aeb5ba; background:#f2f4f4; }
.topbar .account-avatar {
  width:24px;
  height:24px;
  display:grid;
  place-items:center;
  border-radius:7px;
  color:#fff;
  background:#565d61;
  font-size:10px;
  font-weight:750;
}
.topbar .account-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.topbar .account-chevron {
  width:5px;
  height:5px;
  border-right:1.5px solid #72787d;
  border-bottom:1.5px solid #72787d;
  transform:translateY(-2px) rotate(45deg);
  transition:transform 140ms ease;
}
.topbar .account-tools[open] .account-chevron { transform:translateY(1px) rotate(225deg); }
.topbar .account-menu {
  top:44px;
  width:232px;
  padding:12px;
  gap:7px;
  border-color:#d7dbde;
  border-radius:12px;
  box-shadow:0 18px 55px rgba(35,39,43,.16);
}
.topbar .account-menu strong { padding:3px 4px 0; color:#303438; font-size:12px; }
.topbar .account-menu p { padding:0 4px 8px; border-bottom:1px solid #eceeef; color:#82888d; font-size:10px; }
.topbar .account-menu button,
.topbar .account-menu a {
  width:100%;
  min-height:34px;
  padding:0 10px;
  justify-content:flex-start;
  border:0;
  border-radius:8px;
  color:#454a4e;
  background:transparent;
  font-size:11px;
  font-weight:600;
}
.topbar .account-menu button:hover,
.topbar .account-menu a:hover { background:#f0f2f2; }
.topbar .account-menu button:active,
.topbar .account-menu a:active { transform:scale(.99); }

@media(max-width:1280px) and (min-width:901px) {
  .topbar .account-tools summary { width:86px; }
}

@media(max-width:900px) {
  .topbar .account-tools { padding-left:5px; }
  .topbar .account-tools summary { width:36px; padding:0; display:flex; justify-content:center; }
  .topbar .account-name,
  .topbar .account-chevron { display:none; }
}

@media(prefers-reduced-motion:reduce) {
  .topbar .account-tools summary,
  .topbar .account-chevron { transition:none; }
}
