:root {
  --bg: #f3f7fc;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --subtle: #94a3b8;
  --line: #e5edf6;
  --line-soft: #edf3fa;
  --blue: #2f84ff;
  --blue-2: #4096ff;
  --blue-soft: #eaf3ff;
  --green: #12b76a;
  --green-soft: #ecfdf3;
  --orange: #f79009;
  --orange-soft: #fffaeb;
  --red: #f04438;
  --red-soft: #fef3f2;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-pop: 0 12px 32px rgba(15, 23, 42, .08);
  --radius: 10px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.loading::after {
  content: "加载中...";
  position: fixed;
  right: 24px;
  top: 92px;
  z-index: 50;
  padding: 10px 14px;
  color: #175cd3;
  background: #fff;
  border: 1px solid #b2ccff;
  border-radius: 10px;
  box-shadow: var(--shadow);
}
body.auth-locked .sidebar,
body.auth-locked .shell { display: none; }
body:not(.auth-locked) .admin-login { display: none; }
.admin-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #eef6ff, #f8fbff 55%, #edf4ff);
}
.admin-login-card {
  width: min(520px, 100%);
  padding: 38px 42px 36px;
  background: rgba(255, 255, 255, .96);
  border: 1px solid #dbe8f7;
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(35, 85, 140, .12);
}
.admin-login-brand { display: flex; align-items: center; gap: 11px; color: var(--ink); font-size: 22px; font-weight: 850; letter-spacing: -.02em; }
.admin-login-brand img { width: 46px; height: 46px; border-radius: 13px; }
.admin-login-card h1 { margin: 30px 0 8px; font-size: 28px; letter-spacing: -.02em; }
.admin-login-card > p { margin: 0 0 26px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.admin-login-card .stack-form { gap: 16px; }
.admin-login-card .stack-form label { gap: 7px; font-size: 13px; }
.admin-login-card input { min-height: 44px; padding: 9px 12px; border-radius: 8px; font-size: 14px; font-weight: 650; background: #f4f8ff; }
.admin-login-card input::placeholder { font-size: 14px; font-weight: 650; color: #8a98ad; opacity: 1; }
.admin-login-error { color: #b42318; font-size: 13px; font-weight: 700; }
.admin-captcha-row { display: grid; grid-template-columns: minmax(0, 1fr) 154px; gap: 12px; align-items: center; }
.admin-captcha-row input { width: 100%; font-size: 14px; }
.admin-captcha-row img { justify-self: end; width: 154px; height: 44px; padding: 6px 12px; box-sizing: border-box; object-fit: contain; background: #fff; border: 1px solid #d0dbe9; border-radius: 8px; cursor: pointer; }
.admin-login-card button[type="submit"] { min-height: 46px; margin-top: 4px; font-size: 15px; }

@media (max-width: 560px) {
  .admin-login { padding: 16px; }
  .admin-login-card { padding: 28px 24px 26px; border-radius: 16px; }
  .admin-login-card h1 { margin-top: 24px; }
  .admin-captcha-row { grid-template-columns: minmax(0, 1fr) 128px; gap: 8px; }
  .admin-captcha-row img { width: 128px; }
}

button, input, select, textarea { font: inherit; }
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 14px;
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
}
button svg,
button [data-lucide] {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}
button:hover { filter: brightness(.98); }
button.secondary { color: #175cd3; background: #fff; border-color: #b2ccff; }
button.success { color: #067647; background: var(--green-soft); border-color: #abefc6; }
button.warn { color: #b54708; background: var(--orange-soft); border-color: #fedf89; }
button.danger { color: #b42318; background: var(--red-soft); border-color: #fecdca; }
.icon-button { width: 36px; padding: 0; color: var(--muted); background: #fff; border-color: var(--line); }

input, select, textarea {
  width: 100%;
  min-height: 36px;
  padding: 8px 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  outline: 0;
}
textarea { resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: #84adff; box-shadow: 0 0 0 3px rgba(23, 105, 255, .12); }
svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 220px;
  padding: 18px 14px;
  background: #fff;
  border-right: 1px solid #e6edf5;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 8px 24px;
  border-bottom: 1px solid var(--line-soft);
}
.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  box-shadow: none;
}
.brand strong, .brand span { display: block; }
.brand strong {
  color: #020617;
  font-size: 20px;
  font-weight: 780;
  letter-spacing: -.01em;
  line-height: 1;
}
.brand span { display: none; }

.nav { display: grid; gap: 12px; padding-top: 18px; }
.nav button {
  justify-content: flex-start;
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  color: #26344d;
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 760;
  box-shadow: none;
}
.nav button:hover { color: var(--blue); background: #f4f8ff; }
.nav button.active {
  color: var(--blue);
  background: var(--blue-soft);
  box-shadow: none;
}
.nav-icon { display: grid; place-items: center; width: 25px; height: 25px; flex: 0 0 25px; }
.nav-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-icon svg * {
  fill: none;
  stroke: currentColor;
}
.shell { min-height: 100vh; margin-left: 220px; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 56px;
  padding: 10px 24px;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid #e6edf5;
  backdrop-filter: blur(14px);
}
.eyebrow, h1, h2, h3, p { margin: 0; }
.eyebrow { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
h1 { margin-top: 3px; font-size: 25px; }
h2 { font-size: 16px; }
h3 { margin: 18px 0 10px; font-size: 14px; }
main { padding: 24px 28px 46px; }

.section { display: none; }
.section.active { display: grid; gap: 16px; }
.key-form, .toolbar, .panel-head, .form-row, .row-actions, .title-with-icon, .entity-cell, .material-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.key-form { width: min(620px, 100%); }
.topbar-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.topbar-status span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  color: #475569;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
}
.topbar-status svg { width: 15px; height: 15px; color: var(--blue); }
.search-box { position: relative; flex: 1; }
.search-box span { position: absolute; left: 10px; top: 9px; color: var(--subtle); }
.search-box input { padding-left: 36px; }
#admin-key { max-width: 190px; }
.toolbar { flex-wrap: wrap; justify-content: flex-end; }
.toolbar input { max-width: 260px; }
.toolbar select, .toolbar input[type="date"] { max-width: 160px; }
.panel-head { justify-content: space-between; align-items: flex-start; margin-bottom: 15px; }

.dashboard-heading,
.hero-panel, .page-header, .panel, .metric, .summary-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  min-height: 56px;
  padding: 0 26px;
  background: #fff;
  border-bottom: 1px solid #e6edf5;
}
.admin-top-search {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 42px;
  height: 34px;
  padding-right: 18px;
  color: #07183f;
  border-right: 1px solid #dbe5f0;
  transition: width .18s ease;
}
.admin-top-search.open { width: 306px; }
.search-toggle {
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  color: #07183f;
  background: transparent;
  border: 0;
  border-radius: 8px;
  box-shadow: none;
}
.search-toggle:hover { background: #f4f8fd; }
.search-toggle:focus-visible { box-shadow: 0 0 0 3px rgba(47, 132, 255, .12); }
.admin-top-search svg {
  width: 21px;
  height: 21px;
}
.admin-user {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  color: #07183f;
  font-size: 16px;
  font-weight: 850;
  line-height: 1;
}
.admin-user img,
.admin-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
}
.admin-avatar {
  display: grid;
  place-items: center;
  color: #fff;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, .95) 0 8%, transparent 9%),
    linear-gradient(135deg, #2f84ff 0%, #6b7cff 48%, #14c8a4 100%);
  border: 1px solid rgba(47, 132, 255, .18);
  box-shadow: 0 6px 16px rgba(47, 132, 255, .18);
  font-size: 15px;
  font-weight: 820;
  letter-spacing: 0;
  flex: 0 0 38px;
}
.admin-avatar.has-image { background-position: center; background-size: cover; background-repeat: no-repeat; }
.admin-user { position: relative; }
.admin-user-toggle { min-width: 28px; width: 28px; min-height: 28px; padding: 0; color: #64748b; background: transparent; border: 0; }
.admin-user-toggle:hover { background: #f1f5f9; }
.admin-profile-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 12px);
  right: 0;
  width: 360px;
  padding: 20px;
  background: #fff;
  border: 1px solid #dbe6f2;
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .14);
}
.profile-menu-title { margin-bottom: 16px; color: var(--ink); font-size: 22px; font-weight: 850; }
.admin-profile-menu label { display: grid; gap: 7px; margin-top: 12px; color: #475569; font-size: 15px; font-weight: 760; }
.admin-profile-menu input { min-height: 46px; font-size: 15px; border-radius: 10px; background: #f8fbff; }
.admin-profile-menu button { width: 100%; min-height: 48px; margin-top: 14px; font-size: 15px; }
.profile-menu-divider { height: 1px; margin: 24px 0 18px; background: #dbe6f2; }
.profile-logout { color: #175cd3; background: #edf5ff; border-color: #d5e7ff; }
.admin-user svg {
  display: block;
  width: 16px;
  height: 16px;
  color: #1f3354;
  margin-top: 1px;
}
.dashboard-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 0 12px;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.dashboard-heading h2 {
  color: #07183f;
  font-size: 30px;
  line-height: 1.08;
}
.dashboard-heading p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}
.month-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.date-range {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 10px 0 11px;
  background: #fff;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .04);
}
.date-range input[type="date"] {
  width: 128px;
  min-height: 30px;
  padding: 0 2px;
  color: #07183f;
  background: transparent;
  border: 0;
  border-radius: 6px;
  box-shadow: none;
  font-size: 15px;
  font-weight: 760;
  line-height: 1;
}
.date-range input[type="date"]:focus {
  background: #f6f9fd;
  box-shadow: 0 0 0 3px rgba(47, 132, 255, .1);
}
.date-range input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: .85;
}
.date-range em {
  color: #07183f;
  font-style: normal;
  font-weight: 760;
}
.date-range button {
  min-height: 30px;
  padding: 0 12px;
  color: #1268d6;
  background: #eaf3ff;
  border-color: #eaf3ff;
  box-shadow: none;
}
.date-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.date-tools button,
.date-tools select {
  width: auto;
  min-height: 34px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .04);
}
.date-tools span {
  color: var(--muted);
  font-size: 12px;
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
}
.page-header h2 {
  margin-top: 6px;
  font-size: 22px;
}
.page-header p:last-child {
  max-width: 760px;
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.6;
}
.page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.user-header-tools {
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  max-width: none;
}
.user-page-heading {
  margin-bottom: -2px;
}
.module-page-heading {
  margin-bottom: -2px;
}
.user-page-heading h2 {
  color: #07183f;
  font-size: 30px;
  line-height: 1.08;
}
.module-page-heading h2 {
  color: #07183f;
  font-size: 30px;
  line-height: 1.08;
}
.user-page-heading p,
.module-page-heading p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}
.user-table-heading {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 20px 20px 8px;
}
.user-table-heading h2 {
  color: #07183f;
  font-size: 19px;
}
.module-table-panel > .table-wrap {
  padding-top: 8px;
}
#section-materials .module-table-panel table {
  min-width: 1040px;
  table-layout: fixed;
}
#section-materials .module-table-panel th:nth-child(1),
#section-materials .module-table-panel td:nth-child(1) {
  width: 28%;
}
#section-materials .module-table-panel th:nth-child(2),
#section-materials .module-table-panel td:nth-child(2) {
  width: 18%;
  padding-left: 4px;
}
#section-materials .module-table-panel th:nth-child(3),
#section-materials .module-table-panel td:nth-child(3) {
  width: 12%;
}
#section-materials .module-table-panel th:nth-child(4),
#section-materials .module-table-panel td:nth-child(4) {
  width: 12%;
}
#section-materials .module-table-panel th:nth-child(5),
#section-materials .module-table-panel td:nth-child(5) {
  width: 9%;
}
#section-materials .module-table-panel th:nth-child(6),
#section-materials .module-table-panel td:nth-child(6) {
  width: 21%;
  padding-left: 24px;
}
#section-materials .module-table-panel .row-actions {
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: nowrap;
}
#section-payments .module-table-panel th:nth-child(8),
#section-payments .module-table-panel td:nth-child(8) {
  padding-left: 68px;
}
#section-payments .module-table-panel th:nth-child(7),
#section-payments .module-table-panel td:nth-child(7) {
  padding-left: 18px;
}
#section-payments .module-table-panel .row-actions {
  justify-content: flex-start;
  flex-wrap: nowrap;
}
#section-codes .module-table-panel table {
  min-width: 1080px;
  table-layout: fixed;
}
#section-codes .module-table-panel th:nth-child(1),
#section-codes .module-table-panel td:nth-child(1) {
  width: 18%;
}
#section-codes .module-table-panel th:nth-child(2),
#section-codes .module-table-panel td:nth-child(2) {
  width: 12%;
}
#section-codes .module-table-panel th:nth-child(3),
#section-codes .module-table-panel td:nth-child(3) {
  width: 13%;
}
#section-codes .module-table-panel th:nth-child(4),
#section-codes .module-table-panel td:nth-child(4) {
  width: 15%;
}
#section-codes .module-table-panel th:nth-child(5),
#section-codes .module-table-panel td:nth-child(5) {
  width: 22%;
}
#section-codes .module-table-panel th:nth-child(6),
#section-codes .module-table-panel td:nth-child(6) {
  width: 20%;
  padding-left: 18px;
}
#section-codes .module-table-panel .row-actions {
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: nowrap;
}
#section-feedback .module-table-panel table {
  min-width: 1080px;
  table-layout: fixed;
}
#section-feedback .module-table-panel th:nth-child(1),
#section-feedback .module-table-panel td:nth-child(1) {
  width: 16%;
}
#section-feedback .module-table-panel th:nth-child(2),
#section-feedback .module-table-panel td:nth-child(2) {
  width: 21%;
}
#section-feedback .module-table-panel th:nth-child(3),
#section-feedback .module-table-panel td:nth-child(3) {
  width: 25%;
  padding-left: 30px;
}
#section-feedback .module-table-panel th:nth-child(4),
#section-feedback .module-table-panel td:nth-child(4) {
  width: 16%;
  padding-left: 2px;
}
#section-feedback .module-table-panel th:nth-child(5),
#section-feedback .module-table-panel td:nth-child(5) {
  width: 10%;
  padding-left: 2px;
}
#section-feedback .module-table-panel th:nth-child(6),
#section-feedback .module-table-panel td:nth-child(6) {
  width: 12%;
  padding-left: 2px;
}
#section-feedback .module-table-panel .row-actions {
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: nowrap;
}
.module-table-heading {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 20px 20px 8px;
}
.module-table-heading h2 {
  color: #07183f;
  font-size: 19px;
}
.module-form-panel .module-table-heading {
  padding-bottom: 0;
}
.module-split {
  display: grid;
  gap: 16px;
}
.compact-code-form {
  gap: 13px;
  padding: 6px 18px 18px;
}
.compact-code-form .form-row {
  align-items: stretch;
}
.compact-code-form [data-code-duration-days].is-hidden {
  display: none;
}
.compact-code-form button[type="submit"] {
  min-height: 42px;
}
.modal-card:has(.compact-code-form) {
  width: min(560px, calc(100vw - 48px));
}
.modal-card:has(.compact-code-form) > header {
  padding: 16px 18px;
}
.modal-card:has(.compact-code-form) .modal-body {
  padding: 16px;
}
.compact-material-form {
  gap: 14px;
}
.compact-material-form textarea {
  min-height: 92px;
}
.compact-material-form button[type="submit"] {
  justify-self: end;
  min-width: 118px;
}
.modal-card:has(.small-material-form) {
  width: min(440px, calc(100vw - 48px));
}
.modal-card:has(.material-create-form) {
  width: min(620px, calc(100vw - 48px));
}
.modal-card:has(.material-create-form) > header {
  padding: 16px 18px;
}
.modal-card:has(.material-create-form) .modal-body {
  padding: 18px;
}
.material-create-form {
  gap: 11px;
}
.material-create-form .material-upload-block {
  gap: 8px;
}
.material-create-form button[type="submit"] {
  min-width: 118px;
}
.modal-card:has(.small-material-form) > header {
  padding: 16px 18px;
}
.modal-card:has(.small-material-form) > header .icon-button {
  width: 38px;
  height: 38px;
}
.modal-card:has(.small-material-form) > header .icon-button svg {
  width: 18px;
  height: 18px;
}
.modal-card:has(.small-material-form) .modal-body {
  padding: 18px;
}
.small-material-form {
  gap: 14px;
}
.small-material-form button[type="submit"] {
  width: 100%;
  justify-self: stretch;
}
.material-upload-block {
  display: grid;
  gap: 10px;
}
.material-upload-block > span {
  color: #475569;
  font-size: 13px;
  font-weight: 760;
}
.material-mode-tabs {
  display: inline-flex;
  width: fit-content;
  overflow: hidden;
  border: 1px solid #dbe7f5;
  border-radius: 7px;
  background: #fff;
}
.material-mode-tabs button {
  min-height: 32px;
  padding: 0 15px;
  color: #52637c;
  background: #fff;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 13px;
  font-weight: 760;
}
.material-mode-tabs button.active {
  color: #fff;
  background: var(--blue);
}
.material-upload-block [data-material-video-panel] {
  display: grid;
  gap: 10px;
}
.material-upload-block [hidden] {
  display: none !important;
}
.hero-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 20px 22px;
  background:
    linear-gradient(90deg, rgba(22, 119, 255, .08), rgba(255, 255, 255, 0) 46%),
    #fff;
}
.dashboard-brief {
  display: none;
}
.hero-panel h2 { margin-top: 6px; font-size: 24px; }
.hero-panel p:last-child { max-width: 780px; margin-top: 8px; color: var(--muted); line-height: 1.6; }
.panel {
  padding: 0;
  overflow: hidden;
}
.panel > .panel-head {
  min-height: 64px;
  padding: 16px 18px;
  margin: 0;
  border-bottom: 1px solid var(--line-soft);
}
.panel > .toolbar,
.panel > .section-toolbar {
  padding: 12px 18px;
  margin: 0;
  background: #fbfdff;
  border-bottom: 1px solid var(--line-soft);
}
.panel > .table-wrap,
.panel > .trend-panel,
.panel > .alert-list,
.panel > .rank-list,
.panel > .status-list,
.panel > .funnel-list,
.panel > .feedback-list,
.panel > .stack-form {
  padding: 16px 18px;
}
.user-list-panel > .table-wrap {
  padding-top: 8px;
}
.user-list-panel table {
  min-width: 1180px;
}
.user-list-panel th:last-child,
.user-list-panel td:last-child {
  width: 320px;
  text-align: left;
  padding-left: 26px;
}
.user-list-panel th:nth-child(6),
.user-list-panel td:nth-child(6) {
  padding-left: 4px;
  padding-right: 20px;
}
.user-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 10px;
}
.user-actions button {
  min-width: 76px;
}
.reset-code-modal {
  display: grid;
  gap: 12px;
}
.reset-code-modal span,
.reset-code-modal p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}
.reset-code-modal code {
  display: inline-flex;
  width: fit-content;
  min-width: 160px;
  justify-content: center;
  padding: 12px 18px;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .08em;
}
.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 20px 18px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}
.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.pagination-buttons button {
  min-width: 34px;
  min-height: 32px;
  padding: 0 10px;
}
.pagination-buttons button.active {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}
.pagination-buttons button:disabled {
  color: #a7b2c2;
  background: #f7f9fc;
  border-color: #e2e8f0;
  cursor: not-allowed;
}
.pagination-buttons i {
  color: #94a3b8;
  font-style: normal;
  padding: 0 2px;
}

.metrics, .module-summary {
  display: grid;
  gap: 14px;
}
.metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.module-summary { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.metric {
  min-height: 150px;
  padding: 24px 26px 18px;
  display: grid;
  align-content: space-between;
}
.summary-card { padding: 15px; }
.metric-icon, .summary-icon, .mini-icon {
  display: grid;
  place-items: center;
  color: var(--blue);
  background: #f0f6ff;
  border: 1px solid #d6e8ff;
  border-radius: 8px;
}
.metric-main,
.metric-top,
.summary-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.metric-top,
.summary-top {
  justify-content: space-between;
}
.metric-main {
  justify-content: center;
  gap: 24px;
}
.metric-icon {
  width: 78px;
  height: 78px;
  flex: 0 0 78px;
  color: #22c98b;
  background: #dcfaee;
  border: 0;
  border-radius: 50%;
}
.metric:nth-child(1) .metric-icon {
  color: #20c997;
  background: #dcfaee;
}
.metric:nth-child(2) .metric-icon {
  color: #2f84ff;
  background: #eaf3ff;
}
.metric:nth-child(3) .metric-icon {
  color: #8b5cf6;
  background: #f1ecff;
}
.metric:nth-child(4) .metric-icon {
  color: #ff8a45;
  background: #fff0e8;
}
.summary-icon { width: 30px; height: 30px; margin-bottom: 10px; }
.mini-icon { width: 30px; height: 30px; flex: 0 0 30px; }
.metric span, .summary-card span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.metric .metric-icon {
  display: grid;
  place-items: center;
}
.metric strong {
  display: block;
  margin-top: 7px;
  color: #16213f;
  font-size: 26px;
  line-height: 1.1;
}
.metric-icon svg {
  display: block;
  width: 34px;
  height: 34px;
  margin: 0;
  stroke-width: 2.15;
}
.metric-icon img {
  display: block;
  width: 78px;
  height: 78px;
  object-fit: contain;
  border-radius: 50%;
}
.metric-label {
  color: #7b8798 !important;
  font-size: 15px !important;
  font-weight: 760 !important;
}
.metric-showcase strong {
  margin-top: 10px;
  color: #253044;
  font-size: 28px;
  font-weight: 760;
}
.metric small {
  display: block;
  margin-top: 7px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
}
.metric-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 22px;
  color: #7f8c9f;
  font-size: 13px;
  font-weight: 720;
  white-space: nowrap;
}
.metric-footer i {
  width: 1px;
  height: 18px;
  background: #dfe6ef;
}
.metric-footer strong {
  display: inline;
  margin: 0;
  color: #7f8c9f;
  font-size: 13px;
  font-weight: 760;
}
.dashboard-charts {
  align-items: stretch;
}
.chart-card .line-chart {
  padding: 14px 18px 18px;
}
.line-chart {
  position: relative;
  min-height: 270px;
}
.line-chart svg {
  display: block;
  width: 100%;
  height: 220px;
  overflow: visible;
}
.line-chart text {
  fill: #71829a;
  font-size: 12px;
  font-weight: 700;
}
.chart-summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.chart-summary strong {
  color: #07183f;
  font-size: 24px;
  font-weight: 850;
}
.chart-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.summary-card strong { display: block; margin-top: 6px; font-size: 20px; overflow-wrap: anywhere; }
.summary-top .summary-icon { margin-bottom: 0; }
.metric:hover,
.summary-card:hover,
.panel:hover {
  border-color: #d6e4f5;
}

.history-filter,
.history-board {
  margin-top: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .045);
}
.history-filter {
  padding: 20px 24px 22px;
}
.history-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.history-title span {
  width: 4px;
  height: 25px;
  background: #2087ff;
  border-radius: 999px;
}
.history-title h2 {
  margin: 0;
  color: #14213f;
  font-size: 22px;
  font-weight: 820;
}
.history-tools {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.segment {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid #dce4ef;
  border-radius: 5px;
}
.segment button {
  min-height: 34px;
  padding: 0 18px;
  color: #5f6f89;
  background: #fff;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.segment button.active {
  color: #fff;
  background: #2087ff;
}
.history-tools input[type="date"],
.history-tools select {
  width: 150px;
  min-height: 34px;
  padding: 0 10px;
  background: #fff;
  border-radius: 5px;
  box-shadow: none;
}
.history-tools select {
  cursor: pointer;
}
.history-tools em {
  color: #52637c;
  font-style: normal;
  font-weight: 680;
}
.history-tools .primary,
.history-tools .ghost {
  min-height: 34px;
  padding: 0 18px;
  border-radius: 5px;
}
.history-tools .ghost {
  color: #5f6f89;
  background: #fff;
  border: 1px dashed #d5dce7;
  box-shadow: none;
}
.history-board {
  padding: 30px 34px 24px;
}
.history-board-combined {
  padding: 24px 34px 34px;
}
.history-board-combined .history-tools {
  margin-bottom: 30px;
}
.history-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 22px;
  max-width: 980px;
  margin-bottom: 28px;
}
.history-metric {
  position: relative;
  min-height: 112px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 19px 28px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e3eaf3;
  border-radius: 6px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, .06);
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, opacity .18s ease;
}
.history-metric:hover {
  border-color: color-mix(in srgb, var(--metric-color) 55%, #d8e2ef);
  transform: translateY(-1px);
}
.history-metric.selected {
  border-color: var(--metric-color);
  box-shadow: 0 14px 30px rgba(15, 23, 42, .075);
}
.history-metric span {
  display: block;
  color: #8a95a8;
  font-size: 15px;
  font-weight: 720;
}
.history-metric strong {
  display: block;
  margin-top: 8px;
  color: #101a35;
  font-size: 26px;
  line-height: 1;
}
.history-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
}
.history-icon img {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: contain;
}
.history-check {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0 7px 2px 0;
  color: #fff;
  font-size: 22px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  opacity: 0;
  transition: opacity .18s ease;
}
.history-metric.selected .history-check {
  opacity: 1;
}
.history-check::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--metric-color);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  z-index: 0;
}
.history-check {
  z-index: 1;
}
.history-check::after {
  content: "✓";
  position: relative;
  z-index: 1;
  font-family: Arial, sans-serif;
  font-size: 22px;
  line-height: 1;
  transform: translate(-1px, -3px);
}
.history-check {
  font-size: 0;
}
.history-chart {
  margin-right: -18px;
  margin-left: -18px;
  min-height: 505px;
  position: relative;
}
.history-chart svg {
  display: block;
  width: 100%;
  height: 505px;
  overflow: visible;
}
.history-grid line {
  stroke: #dfe3e8;
  stroke-width: 1.15;
}
.history-pointer-surface {
  fill: transparent;
  stroke: none;
  pointer-events: all;
}
.history-hover-guide {
  stroke: #94a3b8;
  stroke-width: 1;
  stroke-dasharray: 5 5;
  opacity: 0;
  pointer-events: none;
}
.history-hover-guide.visible {
  opacity: .85;
}
.history-grid text,
.history-xlabels text {
  fill: #6f7f95;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  stroke: none;
  stroke-width: 0;
  paint-order: normal;
}
.history-line path {
  fill: none;
  stroke: var(--line-color);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: history-line-draw .72s ease-out forwards;
}
.history-line circle {
  fill: #fff;
  stroke: var(--line-color);
  stroke-width: 2.3;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: history-point-pop .22s ease-out forwards;
  animation-delay: calc(.12s + var(--point-index, 0) * .018s);
}
.history-line circle.hovered {
  animation: none;
  opacity: 1;
  transform: scale(1.55);
}
.history-tooltip {
  position: absolute;
  z-index: 8;
  width: 220px;
  padding: 13px 14px;
  border: 1px solid #dbe5f1;
  border-radius: 12px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 14px 36px rgba(15, 35, 70, .16);
  color: #10203d;
  pointer-events: none;
}
.history-tooltip-title {
  display: block;
  padding-bottom: 9px;
  border-bottom: 1px solid #edf1f6;
  font-size: 14px;
}
.history-tooltip-values {
  display: grid;
  gap: 7px;
  padding-top: 9px;
}
.history-tooltip-values div {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}
.history-tooltip-values i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tooltip-color);
}
.history-tooltip-values span {
  color: #66758c;
}
.history-tooltip-values b {
  color: #14213d;
  font-variant-numeric: tabular-nums;
}

@keyframes history-line-draw {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

@keyframes history-point-pop {
  from {
    opacity: 0;
    transform: scale(.72);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .history-line path,
  .history-line circle {
    animation: none;
    opacity: 1;
    stroke-dashoffset: 0;
  }
}

.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.two.wide-left { grid-template-columns: minmax(0, 1.45fr) minmax(360px, .75fr); }
.grid.three { grid-template-columns: 1fr 1fr 1fr; }
.grid.code-layout { grid-template-columns: minmax(320px, .42fr) minmax(0, 1fr); }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.settings-grid .panel {
  padding: 18px;
}
.settings-grid .panel .panel-head {
  min-height: auto;
  padding: 0 0 14px;
  border-bottom: 0;
}

.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 980px; border-collapse: separate; border-spacing: 0; }
th, td { padding: 13px 12px; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
th { color: #64748b; background: #f8fafc; font-size: 12px; font-weight: 820; }
td { font-size: 14px; }
tbody tr:hover td { background: #f8fbff; }
.subtext { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.empty { padding: 24px; color: var(--muted); text-align: center; background: #fbfcfe; border: 1px dashed #d0d5dd; border-radius: 10px; }

.avatar, .cover.placeholder {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  color: #175cd3;
  background: var(--blue-soft);
  border-radius: 8px;
  font-weight: 800;
}
img.avatar {
  display: block;
  object-fit: cover;
}
.cover { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.cover.material-kind-cover {
  width: 54px;
  height: 54px;
  object-fit: contain;
  background: transparent;
  border: 0;
  border-radius: 10px;
}
.metric-icon svg,
.summary-icon svg,
.mini-icon svg,
.cover.placeholder svg {
  fill: none;
  stroke: currentColor;
}
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin: 2px 3px 2px 0;
  padding: 0 8px;
  color: #344054;
  background: #f2f4f7;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
}
.tag.green { color: #067647; background: var(--green-soft); }
.tag.orange { color: #b54708; background: var(--orange-soft); }
.tag.red { color: #b42318; background: var(--red-soft); }
.tag.blue { color: #175cd3; background: var(--blue-soft); }

.trend-panel, .alert-list, .rank-list, .status-list, .funnel-list, .feedback-list { display: grid; gap: 10px; }
.trend-legend { display: flex; gap: 14px; color: var(--muted); font-size: 12px; font-weight: 700; }
.dot, .legend-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; }
.dot.blue, .legend-dot.pending { background: var(--blue-2); }
.dot.green, .legend-dot.paid, .legend-dot.processing { background: var(--green); }
.legend-dot.cancelled, .legend-dot.new { background: var(--orange); }
.legend-dot.refunded, .legend-dot.closed { background: var(--red); }
.trend-bars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; min-height: 205px; }
.trend-day { display: grid; grid-template-rows: 1fr auto auto; gap: 6px; text-align: center; }
.trend-bar-stack {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 5px;
  height: 150px;
  padding: 10px 0;
  background:
    linear-gradient(180deg, rgba(47, 132, 255, .06), rgba(47, 132, 255, .02)),
    #fbfdff;
  border: 1px dashed #dbe7f5;
  border-radius: 8px;
}
.trend-bar { width: 12px; min-height: 4px; border-radius: 999px; }
.trend-bar.revenue { background: var(--blue-2); }
.trend-bar.orders { background: var(--green); }
.trend-day strong { font-size: 12px; }
.trend-day small { color: var(--muted); font-size: 11px; }

.alert-item, .rank-item, .feedback-item, .funnel-item, .status-item, .donut-row, .note {
  padding: 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.health-list,
.status-list {
  align-content: start;
}
.status-item,
.alert-item,
.feedback-item {
  box-shadow: 0 1px 0 rgba(15, 23, 42, .02);
}
.status-item header,
.funnel-item header,
.feedback-item header {
  min-height: 28px;
}
.panel > .alert-list .alert-item {
  min-height: 58px;
}
.alert-item { border-left: 4px solid var(--blue); }
.alert-item.green { border-left-color: var(--green); }
.alert-item.orange { border-left-color: var(--orange); }
.alert-item.red { border-left-color: var(--red); }
.alert-item p { margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.rank-item { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.rank-no { display: grid; place-items: center; width: 28px; height: 28px; color: var(--blue); background: var(--blue-soft); border-radius: 7px; font-weight: 800; }
.bar { height: 8px; margin-top: 9px; overflow: hidden; background: #eef2f7; border-radius: 999px; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--blue-2)); border-radius: inherit; }
.donut-row { display: flex; align-items: center; gap: 14px; background: #f8fafc; }
.donut {
  display: grid;
  width: 132px;
  height: 132px;
  flex: 0 0 132px;
  place-items: center;
  background: radial-gradient(circle closest-side, #fff 56%, transparent 57%), conic-gradient(var(--blue-2) 0 calc(var(--a) * 1%), var(--green) calc(var(--a) * 1%) calc((var(--a) + var(--b)) * 1%), var(--orange) calc((var(--a) + var(--b)) * 1%) calc((var(--a) + var(--b) + var(--c)) * 1%), var(--red) calc((var(--a) + var(--b) + var(--c)) * 1%) 100%);
  border-radius: 50%;
  font-weight: 800;
}
.status-item header, .funnel-item header, .feedback-item header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.status-item header span, .funnel-item header span { color: var(--muted); font-weight: 700; }
.feedback-item p { margin-top: 10px; line-height: 1.6; }
.note { margin-top: 10px; color: var(--muted); background: #f8fafc; font-size: 12px; }

.stack-form { display: grid; gap: 12px; }
.stack-form label { display: grid; gap: 6px; color: #475569; font-size: 13px; font-weight: 760; }
.form-hint { margin: 0; color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.5; }
.field-hint { color: var(--subtle); font-size: 12px; font-weight: 600; line-height: 1.5; }
.check-field { display: grid; gap: 6px; }
.stack-form label.check { display: flex; align-items: center; gap: 8px; color: #14213f; font-size: 14px; }
.stack-form label.check input { width: 16px; height: 16px; min-height: auto; accent-color: var(--blue); }
.form-divider {
  margin: 10px 0 0;
  padding-top: 14px;
  color: #14213f;
  border-top: 1px dashed var(--line);
  font-size: 14px;
  font-weight: 800;
}

.settings-content-page {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.settings-content-page .settings-tabs {
  display: flex;
  width: 100%;
  margin: 0;
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}
.settings-tabs button { min-height: 44px; padding: 0 26px; font-weight: 760; }
.settings-single { display: grid; padding: 0 22px 18px; }
.settings-content-page .settings-panel {
  display: none;
  width: 100%;
  padding: 14px 0 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.settings-content-page .settings-panel.active { display: grid; }
.settings-content-page .settings-basic-panel { gap: 12px; }
.settings-content-page .settings-basic-panel > .panel-head {
  min-height: auto;
  padding: 10px 0 14px;
}
.settings-basic-form {
  width: min(720px, 100%);
  padding: 14px 16px;
  background: #f8fbff;
  border: 1px solid #e5edf7;
  border-radius: 8px;
}
.settings-basic-form label { margin: 0; }
.settings-payment-panel,
.settings-sms-panel,
.settings-content-panel,
.settings-admin-panel { gap: 14px; }
.settings-content-page .settings-payment-panel > .panel-head,
.settings-content-page .settings-sms-panel > .panel-head,
.settings-content-page .settings-content-panel > .panel-head,
.settings-content-page .settings-admin-panel > .panel-head {
  min-height: auto;
  padding: 10px 0 14px;
}
.settings-payment-card,
.settings-sms-card,
.settings-content-card,
.settings-admin-card {
  display: grid;
  gap: 13px;
  width: min(1080px, 100%);
  padding: 16px;
  background: #f8fbff;
  border: 1px solid #e5edf7;
  border-radius: 8px;
}
.settings-payment-card .form-row,
.settings-sms-card .form-row,
.settings-content-card .form-row,
.settings-admin-card .form-row { gap: 14px; }
.settings-content-card .form-row {
  flex-direction: column;
  align-items: stretch;
}
.settings-payment-card textarea { min-height: 120px; }
.settings-payment-card h3 { margin: 4px 0 10px; color: #14284c; }
.settings-payment-divider { height: 1px; margin: 24px 0; background: #dfe8f5; }
.settings-content-card textarea { min-height: 108px; }
.settings-admin-card { width: min(860px, 100%); }
.settings-admin-card .check-field { padding-top: 2px; }

.content-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.content-editor-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  background: #fff;
  border: 1px solid #dce8f5;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(40, 86, 135, .05);
}
.content-editor-item > span { color: var(--ink); font-size: 14px; font-weight: 800; }
.content-editor-item textarea { min-height: 132px; margin-top: 4px; }
.content-editor-item:nth-child(3) textarea,
.content-editor-item:nth-child(4) textarea { min-height: 178px; }

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

.admin-top-search input {
  width: 250px;
  min-height: 32px;
  margin-left: 8px;
  padding: 0 10px;
  border: 0;
  background: #f4f8fd;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 650;
}
.admin-top-search input[hidden] { display: none; }
.admin-top-search input:focus { box-shadow: 0 0 0 3px rgba(47, 132, 255, .12); }
.inline-filter {
  width: auto;
  min-height: 42px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .04);
  font-size: 14px;
  font-weight: 720;
  color: #07183f;
  cursor: pointer;
}

#toast-host {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  display: grid;
  gap: 10px;
  justify-items: end;
}
.toast-item {
  max-width: 340px;
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #0b2a56;
  background: #fff;
  border: 1px solid #cfe1f8;
  border-radius: 9px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .14);
  font-size: 13px;
  font-weight: 720;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .28s ease, transform .28s ease;
}
.toast-mark {
  display: inline-grid;
  place-items: center;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  color: #fff;
  background: #22a06b;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 900;
}
.toast-item.show { opacity: 1; transform: translateY(0); }
.form-row > label { flex: 1; }
.form-row[hidden] { display: none; }
.switch-row { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 13px; font-weight: 700; }
.switch-row label, .check { display: flex; align-items: center; gap: 8px; }
.switch-row input, .check input { width: auto; min-height: auto; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(16, 24, 40, .44);
}
.modal.show { display: flex; }
.modal-card {
  width: min(860px, 100%);
  max-height: min(86vh, 900px);
  overflow: auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--shadow-pop);
}
.modal-card > header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.modal-body { padding: 20px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.aftersale-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.aftersale-form h3 {
  color: #07183f;
  font-size: 17px;
}
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.detail-grid div, .mini-list div {
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.detail-grid span, .mini-list span { display: block; color: var(--muted); font-size: 12px; }
.detail-grid strong { display: block; margin-top: 4px; overflow-wrap: anywhere; }
.modal-text-block { margin: 8px 0 14px; color: #1f2a44; font-weight: 650; line-height: 1.7; overflow-wrap: anywhere; }
.feedback-content-box {
  width: 100%;
  min-height: 96px;
  margin: 8px 0 14px;
  padding: 12px 14px;
  color: #1f2a44;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.feedback-reply-form { margin-top: 12px; }
.feedback-reply-form label {
  display: block;
  color: #64748b;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
}
.feedback-reply-box {
  display: block;
  resize: vertical;
  outline: none;
}
.feedback-reply-box::placeholder {
  color: #8a98ad;
  font-size: 13px;
  font-weight: 600;
}
.feedback-reply-box:focus {
  border-color: #9ec5fe;
  box-shadow: 0 0 0 3px rgba(47, 132, 255, .12);
}
.pill-list, .mini-list { display: grid; gap: 8px; }

@media (max-width: 1400px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .module-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.three, .grid.two.wide-left, .grid.code-layout { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .sidebar { position: static; width: auto; }
  .shell { margin-left: 0; }
  .topbar, .hero-panel, .panel-head, .key-form { align-items: stretch; flex-direction: column; }
  #admin-key, .toolbar input, .toolbar select, .toolbar input[type="date"] { max-width: none; }
  .metrics, .module-summary, .grid.two, .settings-grid, .detail-grid { grid-template-columns: 1fr; }
  main { padding: 18px; }
}
