:root {
  color-scheme: light;
  --ink: #162018;
  --muted: #68736b;
  --surface: #ffffff;
  --canvas: #f3f6f1;
  --line: #dfe6dc;
  --green: #176a42;
  --green-dark: #0e4a2d;
  --green-soft: #e6f2e9;
  --lime: #cce66a;
  --warning: #8b5d16;
  --warning-bg: #fff7dd;
  --sidebar: #10261b;
  --shadow: 0 24px 70px rgba(22, 48, 31, 0.12);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.brand-light {
  color: #fff;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--sidebar);
  background: var(--lime);
  border-radius: 11px;
  font-size: 19px;
  font-weight: 850;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.auth-layout {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(420px, 1fr) minmax(520px, 0.92fr);
}

.auth-intro {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  padding: 54px clamp(48px, 7vw, 110px);
  color: #fff;
  background:
    radial-gradient(circle at 85% 20%, rgba(204, 230, 106, 0.2), transparent 25%),
    linear-gradient(145deg, #183828 0%, #0c2016 72%);
}

.auth-intro .eyebrow {
  color: var(--lime);
}

.auth-intro-copy {
  max-width: 620px;
  margin: auto 0 64px;
}

.auth-intro-copy h1 {
  max-width: 570px;
  margin: 0;
  font-size: clamp(42px, 5vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.auth-intro-copy > p:last-child {
  max-width: 540px;
  margin: 26px 0 0;
  color: #b8cbbd;
  font-size: 17px;
  line-height: 1.8;
}

.feature-list {
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  display: grid;
  max-width: 150px;
  gap: 8px;
  color: #d5dfd7;
  font-size: 13px;
  line-height: 1.55;
}

.feature-list span {
  color: var(--lime);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.auth-panel {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 52px clamp(34px, 7vw, 96px) 26px;
}

.auth-card {
  width: min(100%, 480px);
  padding: 44px;
  background: var(--surface);
  border: 1px solid rgba(216, 226, 216, 0.9);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.auth-card-heading h1,
.auth-card-heading h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.auth-card-heading > p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.stage-notice {
  display: grid;
  gap: 3px;
  margin: 26px 0;
  padding: 14px 16px;
  color: var(--warning);
  background: var(--warning-bg);
  border: 1px solid #f0dda1;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
}

.stage-notice strong {
  font-size: 14px;
}

.auth-form {
  display: grid;
  gap: 18px;
}

.auth-form label {
  display: grid;
  gap: 8px;
  color: #39443c;
  font-size: 13px;
  font-weight: 650;
}

.auth-form input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  color: var(--ink);
  background: #f8faf7;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
}

.auth-form input:disabled {
  color: #879088;
  cursor: not-allowed;
}

.auth-form input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(23, 106, 66, 0.1);
}

.form-message {
  min-height: 20px;
  margin: -4px 0;
  color: #a23d2d;
  font-size: 12px;
  line-height: 1.6;
}

.primary-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  color: #fff;
  background: var(--green);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
}

.primary-button:disabled {
  color: #718077;
  background: #dfe5df;
  cursor: not-allowed;
}

.preview-link,
.text-link {
  display: flex;
  justify-content: center;
  margin-top: 24px;
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
}

.preview-link {
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.auth-footer {
  margin: auto 0 0;
  padding-top: 40px;
  color: #849087;
  font-size: 12px;
}

.compact-auth-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -20%, rgba(204, 230, 106, 0.35), transparent 32%),
    var(--canvas);
}

.single-auth-layout {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  gap: 42px;
  padding: 48px 24px;
}

.single-auth-layout .auth-card {
  margin: auto 0;
}

.password-rules {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.preview-banner {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 20px;
  color: #62420d;
  background: var(--warning-bg);
  border-bottom: 1px solid #ead797;
  font-size: 12px;
}

.preview-banner a {
  margin-left: 12px;
  color: var(--green);
  font-weight: 750;
}

.admin-layout {
  display: grid;
  min-height: calc(100vh - 42px);
  grid-template-columns: 252px 1fr;
}

.authenticated-admin-page .admin-layout {
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  padding: 30px 22px;
  color: #dce8df;
  background: var(--sidebar);
}

.workspace-badge {
  display: grid;
  gap: 4px;
  margin: 34px 0 22px;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.workspace-badge span,
.sidebar-scope span {
  color: #87a18f;
  font-size: 10px;
  letter-spacing: 0.09em;
}

.workspace-badge strong {
  font-size: 13px;
}

.sidebar-nav {
  display: grid;
  gap: 5px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: #aec1b3;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 620;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: #fff;
  background: rgba(204, 230, 106, 0.12);
}

.menu-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--lime);
  background: rgba(204, 230, 106, 0.08);
  border-radius: 8px;
  font-size: 12px;
}

.sidebar-scope {
  margin-top: auto;
  padding: 16px 13px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.sidebar-scope p {
  margin: 6px 0 0;
  color: #b4c5b8;
  font-size: 11px;
  line-height: 1.6;
}

.admin-main {
  min-width: 0;
  padding: 34px clamp(26px, 5vw, 72px) 48px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 28px;
}

.admin-header h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.035em;
}

.account-menu {
  display: flex;
  align-items: center;
  gap: 14px;
}

.account-menu > span {
  display: grid;
  gap: 2px;
  text-align: right;
}

.account-menu strong {
  font-size: 13px;
}

.account-menu small {
  color: var(--muted);
  font-size: 11px;
}

.secondary-button {
  min-height: 38px;
  padding: 0 14px;
  color: var(--green-dark);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.secondary-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.content-card {
  min-height: 420px;
  padding: clamp(24px, 4vw, 42px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 15px 42px rgba(29, 58, 37, 0.06);
}

.content-card-heading {
  display: flex;
  align-items: center;
  gap: 18px;
}

.content-card-heading h2 {
  margin: 0;
  font-size: 23px;
}

.content-card-heading p:last-child {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.content-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  color: var(--green-dark);
  background: var(--green-soft);
  border-radius: 14px;
  font-weight: 800;
}

.empty-state {
  display: flex;
  min-height: 275px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.empty-state-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 50%;
  font-size: 28px;
}

.empty-state h3 {
  margin: 16px 0 7px;
  font-size: 17px;
}

.empty-state p {
  max-width: 470px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.boundary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 18px;
}

.boundary-grid article {
  padding: 20px;
  background: #edf3ea;
  border: 1px solid #dce6d8;
  border-radius: 14px;
}

.boundary-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.boundary-grid strong {
  font-size: 14px;
}

.boundary-grid p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.error-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.error-card {
  width: min(100%, 500px);
  padding: 52px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.error-card .brand {
  justify-content: center;
}

.error-code {
  margin: 40px 0 4px;
  color: var(--green);
  font-size: 64px;
  font-weight: 850;
  letter-spacing: -0.06em;
}

.error-card h1 {
  margin: 0;
  font-size: 28px;
}

.error-card > p:not(.error-code) {
  margin: 12px 0 26px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-intro {
    min-height: auto;
    padding: 34px 30px 42px;
  }

  .auth-intro-copy {
    margin: 70px 0 44px;
  }

  .auth-intro-copy h1 {
    font-size: clamp(36px, 9vw, 54px);
  }

  .auth-panel {
    min-height: auto;
    padding: 48px 24px 28px;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    padding: 22px;
  }

  .workspace-badge,
  .sidebar-scope {
    display: none;
  }

  .sidebar-nav {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    margin-top: 22px;
    overflow-x: auto;
  }

  .boundary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .feature-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .auth-card {
    padding: 28px 22px;
  }

  .preview-banner {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .preview-banner a {
    margin: 4px 0 0;
  }

  .admin-layout {
    min-height: calc(100vh - 83px);
  }

  .admin-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-menu {
    width: 100%;
    justify-content: space-between;
  }

  .account-menu > span {
    text-align: left;
  }

  .admin-main {
    padding: 26px 18px 36px;
  }

  .content-card {
    min-height: 360px;
  }

  .content-card-heading {
    align-items: flex-start;
  }

  .error-card {
    padding: 38px 24px;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.legacy-auth-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background: #0a0a1a;
}

/* 后台壳层：展开 / 收起同一套骨架，顶栏与侧栏共用字号尺度 */
.admin-page {
  --p: #6366f1;
  --pd: #4f46e5;
  --bg: #f5f7fa;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --card-bg: #fff;
  --card-shadow: 0 1px 3px rgba(0, 0, 0, .04), 0 1px 2px rgba(0, 0, 0, .06);
  --topbar-bg: #fff;
  --topbar-border: #e2e8f0;
  --ctrl-bg: #f8fafc;
  --border-color: #e2e8f0;
  --sb: #fff;
  --sb-text: #334155;
  --sb-text-muted: #94a3b8;
  --sb-hover-bg: rgba(99, 102, 241, .06);
  --sb-active-bg: rgba(99, 102, 241, .1);
  --sb-active-border: #6366f1;
  --sb-border: #e2e8f0;
  --sb-group-title: #94a3b8;
  --sb-logo-text: #1e293b;
  --sb-logo-toggle: #64748b;
  --sb-ver-text: #94a3b8;
  --sidebar-width: 224px;
  --sidebar-collapsed-width: 64px;
  --topbar-height: 56px;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-md: 14px;
  --fs-title: 15px;
  background: var(--bg);
  color: var(--text-primary);
  display: block;
  min-height: 100vh;
  font-size: var(--fs-md);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

.admin-page .sidebar {
  width: var(--sidebar-width);
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  color: var(--sb-text);
  background: var(--sb);
  border-right: 1px solid var(--sb-border);
  transition: background .3s ease;
}

html.admin-sidebar-collapsed .admin-page .sidebar { width: var(--sidebar-collapsed-width); }
.admin-page .logo {
  height: var(--topbar-height);
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid var(--sb-border);
  color: var(--sb-logo-text);
  white-space: nowrap;
  overflow: hidden;
}
.admin-page .logo-icon {
  width: 28px;
  height: 28px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--p), #818cf8);
  border-radius: 8px;
  font-size: var(--fs-sm);
  font-weight: 700;
}
.admin-page .logo-text { font-size: var(--fs-title); font-weight: 600; letter-spacing: 0; }
html.admin-sidebar-collapsed .admin-page .sidebar .logo { justify-content: center; padding: 0; }
html.admin-sidebar-collapsed .admin-page .sidebar .logo-text { display: none; }
.admin-page #sidebar-nav { flex: 1; min-height: 0; padding: 8px 0; overflow-y: auto; scrollbar-width: thin; }
.admin-page #sidebar-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  margin: 2px 8px;
  padding: 0 12px;
  color: var(--sb-text);
  border-radius: 8px;
  font-size: var(--fs-md);
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  transition: color .15s ease, background .15s ease;
}
.admin-page #sidebar-nav a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 0;
  background: var(--p);
  border-radius: 0 2px 2px 0;
  transform: translateY(-50%);
  transition: height .15s ease;
}
.admin-page #sidebar-nav a:hover { color: var(--p); background: var(--sb-hover-bg); }
.admin-page #sidebar-nav a.active { color: var(--sb-active-border); background: var(--sb-active-bg); font-weight: 500; }
.admin-page #sidebar-nav a.active::before { height: 16px; }
.admin-page .ic { width: 20px; min-width: 20px; height: 20px; display: grid; place-items: center; color: currentColor; }
.admin-page .ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.admin-page .nav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.admin-page .nav-group-title {
  padding: 16px 20px 8px;
  color: var(--sb-group-title);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .08em;
  line-height: 1;
  white-space: nowrap;
}
.admin-page .nav-group-title:first-child { padding-top: 10px; }
html.admin-sidebar-collapsed .admin-page .sidebar .nav-group-title {
  height: 0;
  margin: 8px 16px;
  padding: 0;
  overflow: hidden;
  border-top: 1px solid var(--sb-border);
  font-size: 0;
  letter-spacing: 0;
}
html.admin-sidebar-collapsed .admin-page .sidebar .nav-group-title:first-child { margin-top: 4px; border-top: 0; }
html.admin-sidebar-collapsed .admin-page .sidebar #sidebar-nav a { justify-content: center; padding: 0; }
html.admin-sidebar-collapsed .admin-page .sidebar #sidebar-nav a::before { display: none; }
html.admin-sidebar-collapsed .admin-page .sidebar .nav-label,
html.admin-sidebar-collapsed .admin-page .sidebar .toggle-label,
html.admin-sidebar-collapsed .admin-page .sidebar .ver-text { display: none; }
.admin-page .sidebar-footer {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 48px;
  padding: 0 10px 0 8px;
  border-top: 1px solid var(--sb-border);
}
.admin-page .toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 8px;
  color: var(--sb-logo-toggle);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: var(--fs-sm);
  line-height: 1;
}
.admin-page .toggle-btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .2s ease;
}
html.admin-sidebar-collapsed .admin-page .sidebar .toggle-btn svg { transform: rotate(180deg); }
.admin-page .toggle-btn:hover,
.admin-page .theme-toggle:hover { color: var(--p); background: var(--sb-hover-bg); }
.admin-page .sidebar-footer-meta { display: flex; align-items: center; gap: 4px; min-width: 0; }
.admin-page .ver-text { color: var(--sb-ver-text); font-size: var(--fs-xs); line-height: 1; white-space: nowrap; }
.admin-page .theme-toggle {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--sb-logo-toggle);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
.admin-page .theme-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
html.admin-sidebar-collapsed .admin-page .sidebar .sidebar-footer {
  flex-direction: column;
  justify-content: center;
  height: auto;
  padding: 8px 0 10px;
  gap: 4px;
}
html.admin-sidebar-collapsed .admin-page .sidebar .toggle-btn,
html.admin-sidebar-collapsed .admin-page .sidebar .theme-toggle { width: 32px; padding: 0; justify-content: center; }
html.admin-sidebar-collapsed .admin-page .sidebar .sidebar-footer-meta { justify-content: center; }
.admin-page .main { min-width: 0; min-height: 100vh; margin-left: var(--sidebar-width); overflow-x: auto; }
html.admin-shell-ready .admin-page .sidebar { transition: width .2s ease, background .3s ease; }
html.admin-shell-ready .admin-page .main { transition: margin-left .2s ease; }
html.admin-sidebar-collapsed .admin-page .sidebar ~ .main { margin-left: var(--sidebar-collapsed-width); }
.admin-page .topbar {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--topbar-border);
}
.admin-page .topbar-left, .admin-page .topbar-right, .admin-page .breadcrumb { display: flex; align-items: center; }
.admin-page .topbar-left { gap: 12px; min-width: 0; }
.admin-page .topbar-right { gap: 8px; flex: 0 0 auto; }
.admin-page .breadcrumb { gap: 6px; font-size: var(--fs-md); }
.admin-page .breadcrumb-group { color: var(--text-muted); }
.admin-page .breadcrumb-sep { color: var(--text-muted); }
.admin-page .breadcrumb-page { color: var(--text-primary); font-weight: 600; }
.admin-page .topbar-user { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 0 4px 0 0; }
.admin-page .topbar-avatar {
  width: 28px;
  height: 28px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: var(--p);
  background: var(--sb-active-bg);
  border-radius: 8px;
  font-size: var(--fs-sm);
  font-weight: 600;
}
.admin-page .topbar-user-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; line-height: 1.2; }
.admin-page .topbar-nick { color: var(--text-primary); font-size: var(--fs-sm); font-weight: 600; }
.admin-page .inf { color: var(--text-muted); font-size: var(--fs-xs); }
.admin-page .topbar-btn {
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-family: inherit;
  font-size: var(--fs-sm);
  line-height: 1;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.admin-page .topbar-btn:hover { color: var(--p); border-color: var(--p); background: var(--sb-hover-bg); }
.admin-page .topbar-btn-icon { width: 32px; padding: 0; border-color: transparent; }
.admin-page .btn-logout:hover { color: #ef4444; border-color: #ef4444; background: #fef2f2; }
.admin-page .topbar-btn svg, .admin-page .hamburger svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.admin-page .ct { min-width: 0; padding: 24px; }
.admin-page .pn { min-width: 0; margin-bottom: 16px; padding: 18px; background: var(--card-bg); border-radius: 10px; box-shadow: var(--card-shadow); }
.admin-page .ph { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.admin-page .ph h2 { margin: 0; color: var(--text-primary); font-size: 20px; font-weight: 600; }
.admin-page .ph p { margin: 6px 0 0; color: var(--text-muted); font-size: 13px; }
.admin-page .module-icon { width: 42px; height: 42px; display: grid; place-items: center; color: var(--p); background: var(--sb-active-bg); border-radius: 10px; }
.admin-page .module-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.admin-page .empty { padding: 50px 20px; color: var(--text-muted); text-align: center; }
.admin-page .empty .icon { margin-bottom: 10px; color: var(--empty-color, var(--text-muted)); font-size: 40px; }
.admin-page .empty h3 { margin: 0 0 8px; color: var(--text-primary); font-size: 17px; }
.admin-page .empty p { max-width: 520px; margin: 0 auto; line-height: 1.7; }
.admin-page .account-list-card .ph { align-items: center; }
.admin-page .account-list-heading { display: flex; align-items: center; gap: 12px; }
.admin-page .account-list-heading .primary-button { min-height: 32px; padding: 0 14px; font-size: 13px; }
.admin-page .account-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.admin-page .account-form-grid > label { display: grid; gap: 6px; color: var(--text-secondary); font-size: 12px; font-weight: 600; }
.admin-page .account-role-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.admin-page .account-role-field legend { margin-bottom: 6px; padding: 0; color: var(--text-secondary); font-size: 12px; font-weight: 600; }
.admin-page .account-role-options { display: flex; gap: 8px; }
.admin-page .account-role-option { position: relative; display: flex; min-width: 0; flex: 1; min-height: 36px; align-items: center; justify-content: center; padding: 0 10px; color: var(--text-secondary); background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 6px; cursor: pointer; font-size: 12px; font-weight: 600; text-align: center; }
.admin-page .account-role-option:hover { color: var(--p); border-color: var(--p); }
.admin-page .account-role-option:has(input:checked) { color: var(--p); background: var(--sb-active-bg); border-color: var(--p); }
.admin-page .account-role-option:focus-within { outline: 2px solid rgba(99,102,241,.25); outline-offset: 1px; }
.admin-page .account-role-option input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.admin-page .account-form-grid > label input,
.admin-page .account-form-grid > label select { min-width: 0; height: 36px; padding: 0 10px; color: var(--text-primary); background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 6px; font: inherit; font-weight: 400; }
.admin-page .account-form-grid > label input:focus,
.admin-page .account-form-grid > label select:focus { outline: 2px solid rgba(99,102,241,.25); border-color: var(--p); }
.admin-page .account-create-form { padding: 20px; }
.admin-page .account-create-form .form-message { min-height: 18px; margin: 14px 0 0; color: #dc2626; font-size: 12px; }
.admin-page .primary-button { min-height: 36px; padding: 0 16px; color: #fff; background: var(--p); border: 0; border-radius: 6px; cursor: pointer; font: inherit; font-weight: 600; }
.admin-page .primary-button:hover { background: var(--pd); }
.admin-page .primary-button:disabled { cursor: wait; opacity: .65; }
.admin-page .secondary-button { min-height: 36px; padding: 0 16px; color: var(--text-secondary); background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 6px; cursor: pointer; font-size: 12px; font-weight: 600; }
.admin-page .secondary-button:hover { color: var(--p); border-color: var(--p); }
.admin-page .admin-query-button,
.admin-page .admin-reset-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 32px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.admin-page .admin-query-button { color: #fff; background: #5a5cf0; border: 1px solid #5a5cf0; }
.admin-page .admin-query-button:hover { filter: brightness(.97); }
.admin-page .admin-reset-button { color: #59677e; background: #fff; border: 1px solid #dce4ef; }
.admin-page .admin-reset-button:hover { color: #5a5cf0; border-color: #b9c5d7; }
.admin-page .account-count { color: var(--text-muted); font-size: 12px; }
.admin-page .account-table-wrap { max-height: calc(100vh - 260px); overflow: auto; border: 1px solid var(--border-color); border-radius: 8px; background: var(--card-bg); }
.admin-page .account-table { width: 100%; min-width: 920px; border-collapse: separate; border-spacing: 0; color: var(--text-primary); font-size: 13px; }
.admin-page .account-table th,
.admin-page .account-table td { height: 44px; padding: 9px 12px; border-right: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); vertical-align: middle; white-space: nowrap; }
.admin-page .account-table th { position: sticky; top: 0; z-index: 3; color: var(--text-muted); background: var(--ctrl-bg); font-size: 11px; font-weight: 600; text-align: center; }
.admin-page .account-table th:last-child,
.admin-page .account-table td:last-child { border-right: 0; }
.admin-page .account-table tbody tr:nth-child(odd) td { background: var(--card-bg); }
.admin-page .account-table tbody tr:nth-child(even) td { background: var(--ctrl-bg); }
.admin-page .account-table tbody tr:hover td { background: var(--sb-hover-bg); }
.admin-page .account-table tbody tr:hover td:first-child { background: var(--sb-hover-bg); }
.admin-page .account-table tbody tr:last-child td { border-bottom: 0; }
.admin-page .account-table th:first-child,
.admin-page .account-table td:first-child { position: sticky; left: 0; z-index: 2; box-shadow: 5px 0 10px rgba(15, 23, 42, .06); }
.admin-page .account-table th:first-child { z-index: 4; background: var(--ctrl-bg); }
.admin-page .account-table td:first-child { min-width: 140px; }
.admin-page .account-table td { text-align: center; }
.admin-page .account-id { color: var(--text-muted); font-size: 12px; }
.admin-page .account-identity { white-space: nowrap; }
.admin-page .account-time { color: var(--text-secondary); font-size: 12px; }
.admin-page .role-badge, .admin-page .status-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.admin-page .role-super_admin { color: #b91c1c; background: #fee2e2; }
.admin-page .role-team_admin { color: #92400e; background: #fef3c7; }
.admin-page .role-employee { color: #166534; background: #dcfce7; }
.admin-page .status-active { color: #166534; background: #dcfce7; }
.admin-page .status-disabled { color: #64748b; background: #e2e8f0; }
.admin-page .account-actions { display: flex; justify-content: center; gap: 10px; }
.admin-page .text-button { padding: 0; color: var(--p); background: transparent; border: 0; cursor: pointer; font: inherit; font-size: 12px; }
.admin-page .text-button:hover { color: var(--pd); text-decoration: underline; }
.admin-page .text-button:disabled { cursor: wait; opacity: .5; }
.admin-page .text-button-danger { color: #dc2626; }
.admin-page .text-button-danger:hover { color: #b91c1c; }
.admin-page .account-status-switch { width: 40px; height: 22px; padding: 2px; border: 0; border-radius: 999px; background: #cbd5e1; cursor: pointer; vertical-align: middle; transition: background-color .15s ease; }
.admin-page .account-status-switch::after { content: ""; display: block; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .2); transform: translateX(0); transition: transform .15s ease; }
.admin-page .account-status-switch[aria-checked="true"] { background: #22c55e; }
.admin-page .account-status-switch[aria-checked="true"]::after { transform: translateX(18px); }
.admin-page .account-status-switch:disabled { cursor: not-allowed; opacity: .45; }
.admin-page .account-status-switch:focus-visible { outline: 2px solid rgba(99,102,241,.45); outline-offset: 2px; }
.admin-page .account-protected { color: var(--text-muted); font-size: 12px; }
.admin-page .account-empty { padding: 40px 12px !important; color: var(--text-muted); text-align: center; }
.admin-page.account-modal-open { overflow: hidden; }
.admin-page .account-create-modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 24px; background: rgba(15, 23, 42, .48); backdrop-filter: blur(3px); }
.admin-page .account-create-modal[hidden] { display: none; }
.admin-page .account-create-modal-card { width: min(560px, 100%); max-height: 92vh; overflow: auto; border: 1px solid var(--border-color); border-radius: 14px; background: var(--card-bg); box-shadow: 0 24px 70px rgba(15, 23, 42, .24); }
.admin-page .account-create-modal-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--border-color); background: var(--card-bg); }
.admin-page .account-modal-kicker { color: var(--p); font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.admin-page .account-create-modal-card h2 { margin: 4px 0 0; color: var(--text-primary); font-size: 18px; }
.admin-page .account-create-modal-card header p { margin: 5px 0 0; color: var(--text-muted); font-size: 12px; line-height: 1.5; }
.admin-page .account-modal-close { min-height: 30px; padding: 4px 9px; color: var(--text-muted); background: transparent; border: 1px solid var(--border-color); border-radius: 6px; cursor: pointer; font-size: 11px; }
.admin-page .account-modal-close:hover { color: var(--p); border-color: var(--p); }
.admin-page .account-modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border-color); }
.admin-page .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.admin-page .cd { position: relative; overflow: hidden; padding: 16px 16px 16px 20px; background: var(--card-bg); border-radius: 10px; box-shadow: var(--card-shadow); }
.admin-page .cd[data-indicator] { border-left: 4px solid var(--indicator-blue, #3b82f6); }
.admin-page .cd[data-indicator="green"] { border-left-color: #27ae60; }
.admin-page .cd[data-indicator="purple"] { border-left-color: #8b5cf6; }
.admin-page .cd .lb { display: block; margin-bottom: 4px; color: var(--text-muted); font-size: 11px; }
.admin-page .cd strong { color: var(--text-primary); font-size: 15px; }
.admin-page .cd .su { margin: 5px 0 0; color: var(--text-muted); font-size: 11px; line-height: 1.5; }
.admin-page .hamburger { display: none; width: 32px; height: 32px; place-items: center; padding: 0; color: var(--text-secondary); background: transparent; border: 0; border-radius: 6px; cursor: pointer; }
.admin-page .hamburger:hover { color: var(--p); background: var(--sb-hover-bg); }
.admin-page .sidebar-overlay { display: none; }
.admin-nav-tip {
  position: fixed;
  z-index: 400;
  padding: 7px 10px;
  color: #fff;
  background: #1e293b;
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .2);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
}
.admin-nav-tip[hidden] { display: none; }
.admin-nav-tip::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -4px;
  width: 8px;
  height: 8px;
  background: inherit;
  transform: translateY(-50%) rotate(45deg);
}
html.dark .admin-nav-tip { color: #0f172a; background: #e2e8f0; }

html.dark .admin-page { --bg: #0f1117; --text-primary: #e2e8f0; --text-secondary: #94a3b8; --text-muted: #64748b; --card-bg: #1a1f2e; --card-shadow: 0 1px 3px rgba(0,0,0,.3); --topbar-bg: #1a1f2e; --topbar-border: #2d3548; --border-color: #2d3548; --sb: #0a0f1a; --sb-text: #94a3b8; --sb-text-muted: #64748b; --sb-hover-bg: rgba(99,102,241,.08); --sb-active-bg: rgba(99,102,241,.15); --sb-active-border: #818cf8; --sb-border: rgba(255,255,255,.06); --sb-group-title: #64748b; --sb-logo-text: #e2e8f0; --sb-logo-toggle: #94a3b8; --sb-ver-text: #64748b; --p: #818cf8; }

@media (max-width: 768px) {
  .admin-page .sidebar,
  html.admin-sidebar-collapsed .admin-page .sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width);
    transition: transform .25s ease;
  }
  .admin-page .sidebar.mobile-open,
  html.admin-sidebar-collapsed .admin-page .sidebar.mobile-open { transform: translateX(0); }
  .admin-page .main, html.admin-sidebar-collapsed .admin-page .sidebar ~ .main { width: 100%; margin-left: 0 !important; }
  .admin-page .hamburger { display: grid; }
  .admin-page .toggle-btn { display: none; }
  html.admin-sidebar-collapsed .admin-page .sidebar .logo { justify-content: flex-start; padding: 0 16px; }
  html.admin-sidebar-collapsed .admin-page .sidebar .logo-text,
  html.admin-sidebar-collapsed .admin-page .sidebar .nav-label,
  html.admin-sidebar-collapsed .admin-page .sidebar .ver-text { display: revert; }
  html.admin-sidebar-collapsed .admin-page .sidebar .nav-group-title {
    height: auto;
    margin: 0;
    padding: 16px 20px 8px;
    overflow: visible;
    border-top: 0;
    font-size: var(--fs-xs);
    letter-spacing: .08em;
  }
  html.admin-sidebar-collapsed .admin-page .sidebar .nav-group-title:first-child { padding-top: 10px; }
  html.admin-sidebar-collapsed .admin-page .sidebar #sidebar-nav a { justify-content: flex-start; padding: 0 12px; }
  html.admin-sidebar-collapsed .admin-page .sidebar #sidebar-nav a::before { display: block; }
  html.admin-sidebar-collapsed .admin-page .sidebar .sidebar-footer { flex-direction: row; height: 48px; padding: 0 10px 0 8px; }
  html.admin-sidebar-collapsed .admin-page .sidebar .theme-toggle { width: 32px; }
  .admin-page .sidebar-overlay.active { display: block; position: fixed; inset: 0; z-index: 99; background: rgba(0,0,0,.4); opacity: 1; }
  .admin-page .topbar { padding: 0 14px; }
  .admin-page .topbar-right { gap: 6px; }
  .admin-page .topbar-user-text .inf { display: none; }
  .admin-page .ct { padding: 16px; }
  .admin-page .account-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .admin-page .topbar-nick { max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .admin-page .topbar-btn.btn-guide { padding: 0 8px; }
  .admin-page .ct { padding: 12px; }
  .admin-page .account-form-grid { grid-template-columns: 1fr; }
  .admin-page .account-list-heading { gap: 8px; }
  .admin-page .account-create-modal { padding: 12px; }
  .admin-page .account-create-modal-card > header { padding: 16px; }
  .admin-page .account-create-form { padding: 16px; }
  .admin-page .account-modal-footer { flex-direction: column-reverse; }
  .admin-page .account-modal-footer button { width: 100%; }
}

.auth-background,
.auth-overlay,
.auth-stars,
.auth-meteors {
  position: fixed;
  inset: 0;
}

.auth-background {
  z-index: 0;
  background: #0a0a1a url('/assets/login-background/01.jpg') center/cover no-repeat;
  animation: authBackgroundDrift 18s ease-in-out infinite alternate;
}

.auth-bg-1 { background-image: url('/assets/login-background/01.jpg'); }
.auth-bg-2 { background-image: url('/assets/login-background/02.jpg'); }
.auth-bg-3 { background-image: url('/assets/login-background/03.jpg'); }
.auth-bg-4 { background-image: url('/assets/login-background/04.jpg'); }
.auth-bg-5 { background-image: url('/assets/login-background/05.jpg'); }
.auth-bg-6 { background-image: url('/assets/login-background/06.jpg'); }
.auth-bg-7 { background-image: url('/assets/login-background/07.jpg'); }
.auth-bg-8 { background-image: url('/assets/login-background/01.jpg'); }

.auth-overlay {
  z-index: 1;
  background: rgba(0, 0, 0, 0.46);
}

.auth-stars,
.auth-meteors {
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.auth-star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #fff;
  border-radius: 50%;
  animation: authStarTwinkle ease-in-out infinite;
}

.auth-star-pos-0 { left: 8%; top: 14%; animation-delay: 0.2s; animation-duration: 2.6s; }
.auth-star-pos-1 { left: 19%; top: 68%; animation-delay: 1.1s; animation-duration: 3.4s; }
.auth-star-pos-2 { left: 31%; top: 28%; animation-delay: 2.2s; animation-duration: 2.9s; }
.auth-star-pos-3 { left: 43%; top: 82%; animation-delay: 0.7s; animation-duration: 3.8s; }
.auth-star-pos-4 { left: 56%; top: 11%; animation-delay: 1.8s; animation-duration: 2.4s; }
.auth-star-pos-5 { left: 66%; top: 49%; animation-delay: 2.7s; animation-duration: 3.2s; }
.auth-star-pos-6 { left: 74%; top: 23%; animation-delay: 0.9s; animation-duration: 2.8s; }
.auth-star-pos-7 { left: 83%; top: 77%; animation-delay: 2.4s; animation-duration: 3.6s; }
.auth-star-pos-8 { left: 92%; top: 38%; animation-delay: 1.4s; animation-duration: 2.5s; }
.auth-star-pos-9 { left: 27%; top: 93%; animation-delay: 3.1s; animation-duration: 3.9s; }

.auth-meteor {
  position: absolute;
  top: -80px;
  width: 2px;
  height: 86px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), transparent);
  border-radius: 2px;
  opacity: 0;
  animation: authMeteorFall linear forwards;
}

.auth-meteor-pos-0 { left: 24%; animation-duration: 3.1s; }
.auth-meteor-pos-1 { left: 44%; height: 112px; animation-duration: 4s; }
.auth-meteor-pos-2 { left: 67%; height: 72px; animation-duration: 2.7s; }
.auth-meteor-pos-3 { left: 84%; height: 98px; animation-duration: 3.6s; }

.auth-meteor::after {
  position: absolute;
  top: 0;
  left: -1px;
  width: 4px;
  height: 4px;
  content: '';
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.6);
}

.legacy-auth-shell {
  position: relative;
  z-index: 3;
  display: flex;
  width: min(790px, 94vw);
  max-height: 96vh;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.legacy-auth-shell-compact {
  width: min(470px, 92vw);
}

.legacy-auth-card {
  width: 100%;
  flex: 0 1 400px;
  max-height: 96vh;
  overflow: auto;
  padding: 34px 36px 28px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  animation: authCardIn 0.5s ease-out;
}

.dev-users-panel {
  display: block;
  width: 340px;
  max-height: 560px;
  flex: 0 0 340px;
  overflow: auto;
  padding: 24px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  animation: authCardIn 0.5s ease-out;
}

.dev-users-panel[hidden] {
  display: none;
}

.panel-title {
  margin-bottom: 4px;
  color: #fff;
  font-size: 16px;
  font-weight: 650;
}

.panel-tip {
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.dev-users {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dev-user {
  min-width: 0;
  padding: 12px 14px;
  color: #fff;
  text-align: left;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.dev-user:hover {
  background: rgba(99, 102, 241, 0.22);
  border-color: rgba(129, 140, 248, 0.6);
  transform: translateY(-1px);
}

.dev-user:disabled {
  cursor: wait;
  opacity: 0.5;
  transform: none;
}

.dev-user-name,
.dev-user-meta {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dev-user-name {
  color: #fff;
  font-size: 14px;
  font-weight: 650;
}

.dev-user-meta {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.legacy-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.legacy-brand .brand-mark {
  width: 40px;
  height: 40px;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  border-radius: 12px;
}

.legacy-card-header {
  margin: 22px 0 26px;
  text-align: center;
}

.legacy-card-header h1 {
  margin: 0;
  color: #fff;
  font-size: 22px;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.legacy-card-header p,
.legacy-card-footer {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

.legacy-stage-notice {
  display: grid;
  gap: 3px;
  margin: 0 0 20px;
  padding: 11px 13px;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.5;
}

.legacy-stage-notice strong {
  font-size: 13px;
}

.legacy-auth-form {
  display: grid;
  gap: 14px;
}

.legacy-auth-input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  color: #fff;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.legacy-password-field {
  display: block;
}

.legacy-password-input-wrap {
  position: relative;
  display: block;
}

.legacy-password-input-wrap .legacy-auth-input {
  padding-right: 48px;
}

.legacy-password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  color: rgba(255, 255, 255, 0.62);
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  transform: translateY(-50%);
  transition: color 0.2s ease, background 0.2s ease;
}

.legacy-password-toggle:hover,
.legacy-password-toggle:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.legacy-password-eye {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.legacy-password-eye-closed {
  display: none;
}

.legacy-password-toggle[data-visible="true"] .legacy-password-eye-open {
  display: none;
}

.legacy-password-toggle[data-visible="true"] .legacy-password-eye-closed {
  display: block;
}

.legacy-auth-input::placeholder {
  color: rgba(255, 255, 255, 0.58);
}

.legacy-auth-input:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.16);
}

.legacy-auth-input:disabled {
  cursor: wait;
  opacity: 0.58;
}

.legacy-error {
  min-height: 20px;
  margin: 0;
  color: #fca5a5;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.legacy-login-btn {
  width: 100%;
  min-height: 46px;
  padding: 0 18px;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 650;
  transition: background 0.2s ease, transform 0.1s ease;
}

.legacy-login-btn:hover {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
}

.legacy-login-btn:active {
  transform: scale(0.98);
}

.legacy-login-btn:disabled {
  color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.2);
  cursor: wait;
  transform: none;
}

.legacy-password-rules {
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  line-height: 1.55;
}

.legacy-back-link {
  display: flex;
  justify-content: center;
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.legacy-back-link:hover {
  color: #fff;
}

.legacy-card-footer {
  margin-top: 20px;
  text-align: center;
}

.legacy-terms-agree {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  line-height: 1.55;
}

.legacy-terms-agree input {
  margin-top: 2px;
  accent-color: #818cf8;
}

.legacy-terms-agree button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #c7d2fe;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.legacy-terms-agree button:hover {
  color: #fff;
}

.legacy-terms-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 12, 24, 0.72);
}

.legacy-terms-modal[hidden] {
  display: none;
}

.legacy-terms-card {
  width: min(680px, 100%);
  max-height: min(80vh, 720px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.legacy-terms-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid #e5eaf2;
}

.legacy-terms-card h2 {
  margin: 0;
  color: #172033;
  font-size: 18px;
}

.legacy-terms-card header button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #d7dee9;
  border-radius: 8px;
  background: #fff;
  color: #4b5870;
  cursor: pointer;
}

.legacy-terms-body {
  overflow: auto;
  padding: 16px 18px 22px;
  color: #40506a;
  font-size: 13px;
  line-height: 1.7;
}

.service-terms-article p,
.service-terms-article h3,
.service-terms-article ol {
  margin: 0 0 12px;
}

.service-terms-article h3 {
  color: #172033;
  font-size: 15px;
}

.service-terms-article ol {
  padding-left: 18px;
}

.service-terms-article li + li {
  margin-top: 8px;
}

.admin-help {
  display: grid;
  gap: 16px;
}

.admin-help-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
}

.admin-help-list li + li {
  margin-top: 8px;
}

.legacy-clock {
  margin-top: 18px;
  padding-top: 14px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.legacy-clock-time {
  color: #fff;
  font-size: 34px;
  font-variant-numeric: tabular-nums;
  font-weight: 250;
  letter-spacing: 3px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.legacy-clock-info {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

@keyframes authBackgroundDrift {
  from { transform: scale(1.06) translate(0, 0); }
  to { transform: scale(1.14) translate(-14px, 12px); }
}

@keyframes authCardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes authStarTwinkle {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.72; }
}

@keyframes authMeteorFall {
  0% { opacity: 0; transform: translate(0, -100px) rotate(215deg); }
  5%, 60% { opacity: 1; }
  100% { opacity: 0; transform: translate(-500px, 100vh) rotate(215deg); }
}

@media (max-width: 620px) {
  .legacy-auth-page {
    overflow: auto;
    padding: 24px 0;
  }

  .legacy-auth-shell,
  .legacy-auth-card {
    max-height: none;
  }

  .legacy-auth-shell {
    width: 92vw;
    flex-direction: column;
    gap: 24px;
  }

  .dev-users-panel {
    width: 100%;
    max-width: 400px;
    max-height: 320px;
    flex-basis: auto;
    order: 2;
  }

  .legacy-auth-card {
    order: 1;
    flex-basis: auto;
  }

  .legacy-auth-card {
    padding: 30px 24px 24px;
  }

  .legacy-clock-time {
    font-size: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-background,
  .legacy-auth-card,
  .auth-star,
  .auth-meteor {
    animation: none;
  }
}
/* 导出格式选择弹窗 */
.export-format-modal{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:20px;background:#17203366}
.export-format-card{width:min(520px,100%);padding:24px;background:#fff;border-radius:14px;box-shadow:0 18px 50px #17203340;text-align:center;color:#172033}.export-format-card header{display:flex;justify-content:space-between;align-items:center;text-align:left;color:#8796ac}.export-format-card header button{border:0;background:none;font-size:24px;color:#8796ac;cursor:pointer}.export-format-card h2{margin:8px 0 14px}
.export-format-card h2{margin:0 0 8px;font-size:19px}.export-format-card p{margin:0 0 18px;color:#8796ac;font-size:13px}
.export-format-options{display:flex;gap:10px;justify-content:center}.export-format-options label{display:grid;gap:6px;flex:1;text-align:left;color:#64738a;font-size:12px}.export-format-options select{height:38px;border:1px solid #dce4ef;border-radius:8px;padding:0 10px;background:#fff}.export-format-options button,.export-format-cancel{min-width:116px;height:38px;padding:0 14px;border:1px solid #dce4ef;border-radius:8px;background:#5a5cf0;color:#fff;font:inherit;font-size:12px;cursor:pointer}.export-format-options button+button{background:#4db52d;border-color:#4db52d}.export-format-cancel{margin-top:14px;background:#fff;color:#64738a}.export-summary{display:flex;justify-content:space-between;align-items:center;padding:14px;background:#f4f6fb;border-radius:8px;margin-bottom:12px;text-align:left;color:#64738a;font-size:12px}.export-summary strong{font-size:22px;color:#5657e9}.export-hint,.export-estimate{font-size:12px!important;text-align:left}.export-estimate{padding:10px;background:#f1f5ff;border-radius:8px}.export-estimate strong{color:#5657e9;font-size:17px}.export-check{display:block;text-align:left;margin:10px 0;color:#52627b;font-size:12px}.export-format-card footer{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}.export-format-card footer button{height:36px;padding:0 16px;border:1px solid #dce4ef;border-radius:8px;background:#fff;color:#64738a;cursor:pointer}.export-format-card footer .primary{background:#5a5cf0;color:#fff;border-color:#5a5cf0}
.export-toast{position:fixed;right:24px;bottom:24px;z-index:1100;padding:11px 16px;border-radius:8px;background:#253454;color:#fff;box-shadow:0 8px 24px #17203330;font-size:12px}.export-toast.error{background:#b94d4d}.export-toast[hidden]{display:none}
