:root {
  --bg: #eef2f7;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #667085;
  --line: #dde5ef;
  --dark: #101423;
  --blue: #3150a8;
  --green: #14794d;
  --warn: #9a5a00;
  --shadow: 0 14px 36px rgba(25, 36, 60, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

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

.login-card {
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.eyebrow {
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

.login-card h1 {
  margin-top: 10px;
  font-size: 30px;
}

.login-card p {
  color: var(--muted);
  line-height: 1.6;
}

label {
  display: block;
  margin: 14px 0 8px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcff;
  color: var(--ink);
  padding: 0 12px;
}

textarea {
  min-height: 88px;
  padding: 10px 12px;
  resize: vertical;
}

.primary,
.top-actions button,
.quick-logins button,
.action,
.secondary,
.danger {
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  padding: 0 14px;
  font-weight: 800;
}

.primary,
.action {
  background: var(--dark);
  color: #fff;
}

.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.danger {
  background: #fff3de;
  color: var(--warn);
}

#loginBtn {
  width: 100%;
  margin-top: 18px;
}

.full-button {
  width: 100%;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
  color: var(--muted);
  font-size: 12px;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.qr-login {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.qr-login img {
  width: 220px;
  height: 220px;
  border: 1px solid var(--line);
  background: #fff;
}

.qr-login strong {
  color: var(--ink);
  font-size: 13px;
}

.quick-logins {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.quick-logins button,
.top-actions button {
  border: 1px solid var(--line);
  background: #fff;
}

.error {
  min-height: 20px;
  margin-top: 12px;
  color: #b42318;
  font-size: 13px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  background: var(--dark);
  color: #fff;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #fff;
  color: var(--dark);
  font-weight: 900;
}

.brand-mark img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.brand span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
}

nav {
  display: grid;
  gap: 8px;
}

nav button {
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  text-align: left;
  padding: 0 12px;
}

nav button.nav-active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 800;
}

.main {
  min-width: 0;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.topbar h2 {
  margin-top: 6px;
  font-size: 28px;
}

.top-actions {
  display: flex;
  gap: 10px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  gap: 16px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-pad {
  padding: 18px;
}

.metric {
  padding: 18px;
}

.metric strong {
  display: block;
  font-size: 28px;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
}

.section-title {
  margin: 22px 0 12px;
  font-size: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.form-grid-wide {
  grid-template-columns: minmax(220px, 0.8fr) minmax(220px, 0.8fr) minmax(320px, 1.4fr);
  align-items: end;
}

.compact-form {
  margin-bottom: 18px;
}

.form-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.form-heading p {
  max-width: 560px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.risk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  align-items: start;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  border-bottom: 1px solid #edf1f6;
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

th {
  color: #475467;
  font-size: 12px;
  font-weight: 800;
  background: #f8fafc;
}

td {
  font-size: 14px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef3ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.tag.ok {
  background: #e9f8f1;
  color: var(--green);
}

.tag.warn {
  background: #fff3de;
  color: var(--warn);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.binding-actions {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(130px, 1fr) repeat(3, auto);
  gap: 8px;
  min-width: 580px;
}

.binding-actions select {
  min-height: 32px;
}

.row-actions button,
.export-link {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.export-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.export-link {
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: 0 14px;
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  nav {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid,
  .two-col,
  .form-grid,
  .form-grid-wide,
  .risk-grid,
  .export-grid {
    grid-template-columns: 1fr;
  }
}

/* 素悦品牌主题：与官方网站统一的深色玻璃、金色主操作和蓝紫信息层级 */
:root {
  color-scheme: dark;
  --bg: #060a14;
  --panel: rgba(15, 23, 42, 0.84);
  --panel-strong: #111827;
  --ink: #e8eaf0;
  --muted: #8b94aa;
  --line: rgba(255, 255, 255, 0.1);
  --dark: #070b15;
  --blue: #4fc3f7;
  --green: #4ade80;
  --warn: #e8c96a;
  --gold: #c9a84c;
  --gold-light: #e8c96a;
  --purple: #7c3aed;
  --danger: #fb7185;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.3);
}

html {
  background: var(--bg);
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 82% 12%, rgba(79, 195, 247, 0.13), transparent 31%),
    radial-gradient(circle at 14% 86%, rgba(201, 168, 76, 0.11), transparent 30%),
    radial-gradient(circle at 72% 74%, rgba(124, 58, 237, 0.1), transparent 28%),
    var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 56px 56px;
  content: "";
  pointer-events: none;
}

.login-shell,
.app-shell {
  position: relative;
  z-index: 1;
}

.login-shell {
  padding: 42px 24px;
}

.login-card {
  position: relative;
  width: min(460px, 100%);
  padding: 38px;
  overflow: hidden;
  border: 1px solid rgba(201, 168, 76, 0.24);
  border-radius: 24px;
  background: rgba(9, 15, 29, 0.9);
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.48), 0 0 60px rgba(79, 195, 247, 0.08);
  backdrop-filter: blur(24px);
}

.login-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--blue), var(--purple));
  content: "";
}

.login-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  color: var(--ink);
  text-decoration: none;
}

.login-brand img {
  width: 64px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(79, 195, 247, 0.2));
}

.login-brand span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.login-brand strong {
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 16px;
  letter-spacing: 3px;
}

.login-brand small {
  color: var(--gold);
  font-size: 9px;
  letter-spacing: 2px;
}

.eyebrow {
  color: var(--gold-light);
  font-size: 10px;
  letter-spacing: 3px;
}

.login-card h1 {
  margin-top: 12px;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(26px, 5vw, 34px);
  line-height: 1.25;
}

.login-card p {
  margin: 12px 0 26px;
  color: var(--muted);
}

label {
  color: #c6cbd7;
  letter-spacing: 0.5px;
}

input,
select,
textarea {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(201, 168, 76, 0.7);
  background: rgba(255, 255, 255, 0.065);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.11);
}

.primary,
.action {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #080b12;
  box-shadow: 0 10px 28px rgba(201, 168, 76, 0.18);
}

.primary:hover,
.action:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.secondary,
.top-actions button,
.quick-logins button,
.row-actions button,
.export-link {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
}

.secondary:hover,
.top-actions button:hover,
.row-actions button:hover,
.export-link:hover {
  border-color: rgba(201, 168, 76, 0.45);
  background: rgba(201, 168, 76, 0.08);
}

.danger {
  background: rgba(251, 113, 133, 0.11);
  color: #fda4af;
}

.login-divider {
  color: var(--muted);
}

.login-divider::before,
.login-divider::after {
  background: var(--line);
}

.qr-login img {
  padding: 8px;
  border-color: rgba(201, 168, 76, 0.28);
  border-radius: 16px;
}

.qr-login strong {
  color: var(--ink);
}

.error {
  color: #fda4af;
}

.login-assurance {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.login-assurance span {
  padding: 4px 8px;
  border: 1px solid rgba(79, 195, 247, 0.12);
  border-radius: 999px;
  background: rgba(79, 195, 247, 0.055);
  color: var(--muted);
  font-size: 10px;
}

.app-shell {
  grid-template-columns: 260px 1fr;
}

.sidebar {
  padding: 24px 16px;
  border-right: 1px solid var(--line);
  background: rgba(6, 10, 20, 0.94);
  box-shadow: 14px 0 46px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(22px);
}

.brand {
  margin-bottom: 28px;
  padding: 0 8px 20px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  width: 52px;
  height: 42px;
  border: 1px solid rgba(201, 168, 76, 0.18);
  background: rgba(255, 255, 255, 0.035);
}

.brand-mark img {
  width: 44px;
  height: 34px;
}

.brand strong {
  font-family: "Noto Serif SC", "Songti SC", serif;
  letter-spacing: 1px;
}

nav {
  gap: 6px;
}

nav button {
  position: relative;
  min-height: 42px;
  border: 1px solid transparent;
  color: rgba(232, 234, 240, 0.68);
  transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.2s;
}

nav button:hover {
  border-color: rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink);
  transform: translateX(2px);
}

nav button.nav-active {
  border-color: rgba(201, 168, 76, 0.22);
  background: linear-gradient(90deg, rgba(201, 168, 76, 0.16), rgba(201, 168, 76, 0.035));
  color: var(--gold-light);
}

nav button.nav-active::before {
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: -1px;
  width: 2px;
  border-radius: 2px;
  background: var(--gold);
  content: "";
}

.main {
  padding: 30px;
}

.topbar {
  margin-bottom: 24px;
  padding: 4px 0 20px;
  border-bottom: 1px solid var(--line);
}

.topbar h2 {
  font-family: "Noto Serif SC", "Songti SC", serif;
}

.top-actions {
  align-items: center;
}

.home-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: 10px;
  color: var(--gold-light);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.home-link:hover {
  background: rgba(201, 168, 76, 0.09);
}

.card {
  border-color: var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.card-pad,
.metric {
  padding: 20px;
}

.metric {
  position: relative;
  overflow: hidden;
}

.metric::after {
  position: absolute;
  right: -30px;
  bottom: -45px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(79, 195, 247, 0.065);
  content: "";
}

.metric strong {
  color: var(--gold-light);
  font-family: "Bebas Neue", "Arial Narrow", sans-serif;
  font-size: 34px;
}

.metric span,
.form-heading p {
  color: var(--muted);
}

.section-title {
  color: var(--ink);
  font-family: "Noto Serif SC", "Songti SC", serif;
}

table {
  background: transparent;
}

th,
td {
  border-bottom-color: rgba(255, 255, 255, 0.07);
}

th {
  background: rgba(255, 255, 255, 0.035);
  color: #aeb5c4;
}

td {
  color: #d7dbe4;
}

tbody tr:hover td {
  background: rgba(79, 195, 247, 0.025);
}

.tag {
  background: rgba(79, 195, 247, 0.1);
  color: #8bdcff;
}

.tag.ok {
  background: rgba(74, 222, 128, 0.1);
  color: #86efac;
}

.tag.warn {
  background: rgba(232, 201, 106, 0.11);
  color: var(--gold-light);
}

.export-link {
  min-height: 58px;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(201, 168, 76, 0.28);
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: auto;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    margin-bottom: 10px;
    padding: 0 4px 10px;
  }

  .sidebar nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .sidebar nav button {
    flex: 0 0 auto;
    min-width: 88px;
    padding: 0 12px;
    text-align: center;
  }

  nav button:hover {
    transform: none;
  }

  .main {
    padding: 20px 14px 32px;
  }

  .topbar {
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .login-shell {
    padding: 18px 14px;
  }

  .login-card {
    padding: 28px 22px;
    border-radius: 20px;
  }

  .login-brand {
    margin-bottom: 24px;
  }

  .login-assurance {
    flex-wrap: wrap;
  }

  .topbar {
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
  }

  .top-actions > * {
    flex: 1;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
