:root {
  color: #182033;
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-synthesis: none;
  --bg: #f3f6fb;
  --panel: #ffffff;
  --panel-soft: #f8faff;
  --text: #172033;
  --muted: #77839a;
  --line: #e5eaf2;
  --primary: #246bfd;
  --primary-dark: #1556dc;
  --primary-soft: #eaf1ff;
  --green: #16a879;
  --green-soft: #e7f8f2;
  --orange: #e98b20;
  --orange-soft: #fff3df;
  --red: #e24862;
  --red-soft: #ffedf0;
  --purple: #7856d8;
  --shadow: 0 16px 42px rgba(32, 55, 92, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
}

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

button {
  cursor: pointer;
}

.is-hidden {
  display: none !important;
}

.login-view {
  align-items: center;
  background:
    radial-gradient(circle at 18% 8%, rgba(77, 132, 255, 0.28), transparent 30%),
    radial-gradient(circle at 88% 85%, rgba(38, 213, 181, 0.18), transparent 28%),
    #0b1630;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
  padding: 28px;
  position: relative;
}

.login-decoration {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  position: absolute;
}

.login-decoration-one {
  height: 420px;
  left: -180px;
  top: -160px;
  width: 420px;
}

.login-decoration-two {
  bottom: -210px;
  height: 520px;
  right: -190px;
  width: 520px;
}

.login-card {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
  max-width: 430px;
  padding: 42px;
  position: relative;
  width: 100%;
  z-index: 1;
}

.brand-mark,
.sidebar-brand-mark {
  align-items: center;
  background: linear-gradient(145deg, #246bfd, #3a9ff7);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(36, 107, 253, 0.24);
  color: #fff;
  display: flex;
  font-size: 24px;
  font-weight: 700;
  height: 52px;
  justify-content: center;
  width: 52px;
}

.eyebrow {
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  margin: 24px 0 7px;
}

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

.login-copy {
  color: var(--muted);
  line-height: 1.65;
  margin: 10px 0 28px;
}

label {
  color: #4f5b70;
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 18px;
}

label > span {
  display: block;
  margin-bottom: 8px;
}

input,
select,
textarea {
  background: #fff;
  border: 1px solid #dce3ee;
  border-radius: 10px;
  color: var(--text);
  outline: none;
  padding: 11px 13px;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
  width: 100%;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(36, 107, 253, 0.11);
}

.primary-button,
.ghost-button,
.danger-button,
.soft-button {
  border: 0;
  border-radius: 10px;
  font-weight: 600;
  min-height: 40px;
  padding: 9px 16px;
}

.primary-button {
  background: var(--primary);
  color: #fff;
}

.primary-button:hover {
  background: var(--primary-dark);
}

.ghost-button {
  background: #eef2f8;
  color: #4d5c72;
}

.soft-button {
  background: var(--primary-soft);
  color: var(--primary);
}

.danger-button {
  background: var(--red-soft);
  color: var(--red);
}

.login-button,
.full-button {
  width: 100%;
}

.form-error {
  color: var(--red);
  font-size: 13px;
  min-height: 18px;
}

.app-view {
  min-height: 100vh;
}

.sidebar {
  background: #0d1830;
  bottom: 0;
  color: #fff;
  display: flex;
  flex-direction: column;
  left: 0;
  padding: 24px 17px;
  position: fixed;
  top: 0;
  width: 238px;
  z-index: 30;
}

.sidebar-brand {
  align-items: center;
  display: flex;
  gap: 12px;
  padding: 2px 8px 27px;
}

.sidebar-brand-mark {
  border-radius: 12px;
  flex: 0 0 auto;
  font-size: 20px;
  height: 44px;
  width: 44px;
}

.sidebar-brand strong,
.sidebar-brand span {
  display: block;
}

.sidebar-brand strong {
  font-size: 18px;
}

.sidebar-brand span {
  color: #8190ad;
  font-size: 12px;
  margin-top: 3px;
}

.nav-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.nav-list::-webkit-scrollbar {
  width: 6px;
}

.nav-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 3px;
}

.nav-item {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 11px;
  color: #8f9db8;
  display: flex;
  font-size: 14px;
  gap: 12px;
  padding: 12px 14px;
  text-align: left;
  transition: 0.18s ease;
  width: 100%;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #dce5f5;
}

.nav-item.is-active {
  background: linear-gradient(90deg, rgba(50, 114, 255, 0.28), rgba(50, 114, 255, 0.1));
  color: #fff;
}

.nav-icon {
  align-items: center;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 7px;
  display: flex;
  font-size: 13px;
  height: 27px;
  justify-content: center;
  width: 27px;
}

.nav-item.is-active .nav-icon {
  background: var(--primary);
}

.sidebar-foot {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 17px;
}

.admin-summary {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-avatar {
  align-items: center;
  background: #253a63;
  border-radius: 50%;
  color: #aecaef;
  display: flex;
  font-weight: 700;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.admin-summary strong,
.admin-summary span {
  display: block;
}

.admin-summary strong {
  font-size: 13px;
}

.admin-summary span {
  color: #71819e;
  font-size: 11px;
  margin-top: 3px;
}

.sidebar .ghost-button {
  background: rgba(255, 255, 255, 0.07);
  color: #9ba9c3;
}

.main-shell {
  margin-left: 238px;
  min-height: 100vh;
}

.topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  display: flex;
  height: 82px;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar h2 {
  font-size: 21px;
  margin: 0;
}

.topbar p {
  color: var(--muted);
  font-size: 12px;
  margin: 5px 0 0;
}

.topbar-status {
  align-items: center;
  background: var(--green-soft);
  border-radius: 999px;
  color: var(--green);
  display: flex;
  font-size: 12px;
  font-weight: 600;
  gap: 7px;
  padding: 8px 12px;
}

.topbar-status span {
  background: var(--green);
  border-radius: 50%;
  height: 7px;
  width: 7px;
}

.mobile-menu-button {
  background: transparent;
  border: 0;
  display: none;
  font-size: 22px;
  margin-right: 12px;
}

.content {
  padding: 28px 32px 48px;
}

.loading-state,
.empty-state {
  color: var(--muted);
  padding: 56px 0;
  text-align: center;
}

.stat-grid {
  display: grid;
  gap: 17px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 24px;
}

.stat-card,
.panel {
  background: var(--panel);
  border: 1px solid rgba(222, 229, 240, 0.8);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.stat-card {
  overflow: hidden;
  padding: 22px;
  position: relative;
}

.stat-card::after {
  background: var(--stat-color, var(--primary));
  border-radius: 50%;
  content: "";
  height: 90px;
  opacity: 0.08;
  position: absolute;
  right: -28px;
  top: -32px;
  width: 90px;
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
}

.stat-value {
  display: block;
  font-size: 32px;
  font-weight: 700;
  margin-top: 12px;
}

.stat-context {
  color: #9aa5b7;
  display: block;
  font-size: 12px;
  margin-top: 6px;
}

.panel {
  margin-bottom: 20px;
  overflow: hidden;
}

.panel-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 18px 20px;
}

.panel-head h3 {
  font-size: 16px;
  margin: 0;
}

.panel-head p {
  color: var(--muted);
  font-size: 12px;
  margin: 5px 0 0;
}

.panel-body {
  padding: 20px;
}

.toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.toolbar-group {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.toolbar input,
.toolbar select {
  min-width: 150px;
  width: auto;
}

.search-input {
  min-width: 260px !important;
}

.device-toolbar-panel {
  margin-bottom: 16px;
}

.device-access-summary {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.device-access-summary span {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 12px;
}

.device-access-summary__authorized {
  background: var(--green-soft);
  color: #087a55;
}

.device-access-summary__unauthorized {
  background: var(--orange-soft);
  color: #b66a0d;
}

.device-access-panel {
  border-top: 3px solid transparent;
}

.device-access-panel--authorized {
  border-top-color: var(--green);
}

.device-access-panel--unauthorized {
  border-top-color: var(--orange);
}

.device-access-panel--authorized .device-access-head {
  background: linear-gradient(90deg, rgba(22, 168, 121, 0.1), rgba(255, 255, 255, 0));
}

.device-access-panel--unauthorized .device-access-head {
  background: linear-gradient(90deg, rgba(233, 139, 32, 0.11), rgba(255, 255, 255, 0));
}

.device-access-head h3 {
  align-items: center;
  display: flex;
}

.device-access-dot {
  background: currentColor;
  border-radius: 50%;
  display: inline-block;
  height: 9px;
  margin-right: 9px;
  width: 9px;
}

.device-access-panel--authorized .device-access-dot {
  color: var(--green);
  box-shadow: 0 0 0 5px rgba(22, 168, 121, 0.12);
}

.device-access-panel--unauthorized .device-access-dot {
  color: var(--orange);
  box-shadow: 0 0 0 5px rgba(233, 139, 32, 0.12);
}

.device-access-count {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  justify-content: center;
  margin-left: 9px;
  min-width: 26px;
  padding: 3px 8px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  min-width: 850px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid #edf0f5;
  font-size: 13px;
  padding: 13px 11px;
  text-align: left;
  vertical-align: middle;
}

th {
  background: #fafbfe;
  color: #768298;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

td {
  color: #344057;
}

tr:last-child td {
  border-bottom: 0;
}

.cell-title {
  color: var(--text);
  display: block;
  font-weight: 600;
}

.cell-sub {
  color: #929daf;
  display: block;
  font-size: 11px;
  margin-top: 4px;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 用户头像下的位置/IP 信息：允许换行完整显示 */
.user-location-sub {
  color: #929daf;
  display: block;
  font-size: 11px;
  line-height: 1.5;
  margin-top: 4px;
  max-width: none;
  overflow: visible;
  white-space: normal;
}

.user-location-sub .cell-title {
  color: var(--text);
  display: block;
  font-weight: 600;
}

.user-location-sub .cell-sub {
  display: block;
  margin-top: 2px;
  max-width: none;
  overflow: visible;
  white-space: normal;
}

.after-sales-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 17px;
}

.after-sales-summary span {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 12px;
}

.after-sales-summary__pending {
  background: var(--orange-soft);
  color: var(--orange);
}

.after-sales-summary__processing {
  background: var(--primary-soft);
  color: var(--primary);
}

.after-sales-summary__completed {
  background: var(--green-soft);
  color: var(--green);
}

.after-sales-summary__closed {
  background: #eef1f6;
  color: #758197;
}

.after-sales-table {
  min-width: 1180px;
}

.after-sales-contact {
  color: #4c73b8;
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-top: 5px;
  word-break: break-all;
}

.after-sales-description {
  color: #7b879a;
  display: block;
  font-size: 12px;
  line-height: 1.55;
  margin-top: 5px;
  max-width: 230px;
  white-space: normal;
  word-break: break-word;
}

.after-sales-detail {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 20px;
}

.after-sales-detail__item {
  background: #f7f9fc;
  border: 1px solid #e8edf5;
  border-radius: 10px;
  min-width: 0;
  padding: 11px 12px;
}

.after-sales-detail__item.is-wide {
  grid-column: 1 / -1;
}

.after-sales-detail__item span {
  color: #8b96a8;
  display: block;
  font-size: 11px;
  margin-bottom: 5px;
}

.after-sales-detail__item strong {
  color: #344057;
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.after-sales-handler {
  background: #f5f8fd;
  border-radius: 8px;
  color: #7c889c;
  font-size: 12px;
  margin: -4px 0 0;
  padding: 10px 12px;
}

.user-identity {
  align-items: center;
  display: flex;
  min-width: 260px;
}

.user-identity__avatar {
  background: #e8eef8;
  border-radius: 50%;
  flex-shrink: 0;
  height: 42px;
  margin-right: 11px;
  object-fit: cover;
  width: 42px;
}

.user-identity__avatar--empty {
  align-items: center;
  background: linear-gradient(135deg, #4f8dff, #6656d9);
  color: #fff;
  display: flex;
  font-size: 16px;
  font-weight: 700;
  justify-content: center;
}

.user-identity__copy {
  min-width: 0;
}

.badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 9px;
  white-space: nowrap;
}

.badge-green {
  background: var(--green-soft);
  color: var(--green);
}

.badge-orange {
  background: var(--orange-soft);
  color: var(--orange);
}

.badge-red {
  background: var(--red-soft);
  color: var(--red);
}

.badge-blue {
  background: var(--primary-soft);
  color: var(--primary);
}

.badge-gray {
  background: #eef1f6;
  color: #758197;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.small-button {
  border: 0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 10px;
}

.small-button.blue {
  background: var(--primary-soft);
  color: var(--primary);
}

.small-button.red {
  background: var(--red-soft);
  color: var(--red);
}

.small-button.gray {
  background: #eef1f6;
  color: #66748a;
}

.small-button.green {
  background: var(--green-soft);
  color: var(--green);
}

.pagination {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 12px;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 16px;
}

.two-column {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

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

.upload-box {
  background: var(--panel-soft);
  border: 1px dashed #cdd7e7;
  border-radius: 12px;
  padding: 18px;
}

.upload-box h4 {
  margin: 0 0 14px;
}

.tabs {
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 4px;
  padding: 0 20px;
}

.tab-button {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-weight: 600;
  padding: 15px 17px 13px;
}

.tab-button.is-active {
  border-bottom-color: var(--primary);
  color: var(--primary);
}

.image-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  margin-top: 13px;
}

.image-item {
  background: #edf1f7;
  border-radius: 12px;
  min-height: 120px;
  overflow: hidden;
  position: relative;
}

.image-item img {
  display: block;
  height: 130px;
  object-fit: cover;
  width: 100%;
}

.image-item button {
  background: rgba(13, 24, 48, 0.78);
  border: 0;
  border-radius: 7px;
  color: #fff;
  padding: 6px 9px;
  position: absolute;
  right: 8px;
  top: 8px;
}

.image-placeholder {
  align-items: center;
  color: #8995a8;
  display: flex;
  height: 130px;
  justify-content: center;
}

.modal {
  inset: 0;
  position: fixed;
  z-index: 100;
}

.modal-mask {
  background: rgba(9, 17, 32, 0.58);
  inset: 0;
  position: absolute;
}

.modal-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
  left: 50%;
  max-height: calc(100vh - 48px);
  max-width: 560px;
  overflow-y: auto;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 32px);
}

.modal-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 18px 21px;
}

.modal-head h3 {
  font-size: 17px;
  margin: 0;
}

.icon-button {
  background: transparent;
  border: 0;
  color: #8490a5;
  font-size: 24px;
}

.modal-body {
  padding: 21px;
}

.modal-actions {
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 15px 21px 20px;
}

#modalError {
  margin: 0;
  padding: 0 21px;
}

.toast {
  background: rgba(19, 30, 49, 0.94);
  border-radius: 10px;
  bottom: 28px;
  color: #fff;
  left: 50%;
  max-width: calc(100% - 40px);
  opacity: 0;
  padding: 11px 18px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 16px);
  transition: 0.22s ease;
  z-index: 200;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.sidebar-mask {
  background: rgba(7, 14, 27, 0.5);
  display: none;
  inset: 0;
  position: fixed;
  z-index: 25;
}

.access-master-panel {
  border: 1px solid #d7dfec;
}

.access-master-panel.is-enabled {
  border-color: rgba(22, 168, 121, 0.45);
  box-shadow: 0 14px 32px rgba(22, 168, 121, 0.1);
}

.master-toggle {
  align-items: center;
  background: #eef2f7;
  border: 1px solid #d5deeb;
  border-radius: 999px;
  color: #647184;
  cursor: pointer;
  display: inline-flex;
  flex-shrink: 0;
  gap: 10px;
  padding: 7px 13px 7px 8px;
}

.master-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.master-toggle__track {
  background: #aeb9c8;
  border-radius: 999px;
  display: inline-flex;
  height: 24px;
  padding: 3px;
  transition: 0.2s ease;
  width: 44px;
}

.master-toggle__track span {
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(28, 44, 68, 0.28);
  display: block;
  height: 18px;
  transition: 0.2s ease;
  width: 18px;
}

.master-toggle.is-on {
  background: rgba(22, 168, 121, 0.1);
  border-color: rgba(22, 168, 121, 0.4);
  color: #0d8b62;
}

.master-toggle.is-on .master-toggle__track {
  background: #16a879;
}

.master-toggle.is-on .master-toggle__track span {
  transform: translateX(20px);
}

.master-access-note {
  background: #f7f9fc;
  border-radius: 10px;
  color: #526074;
  font-size: 13px;
  line-height: 1.7;
  padding: 13px 15px;
}

.license-generate-form {
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
}

.license-generate-form .primary-button {
  margin-top: 14px;
}

.license-result-box {
  background: rgba(22, 168, 121, 0.07);
  border: 1px solid rgba(22, 168, 121, 0.28);
  border-radius: 12px;
  margin-top: 18px;
  padding: 17px;
}

.license-result-head {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.license-result-head h4,
.license-result-head p {
  margin: 0;
}

.license-result-head p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 5px;
}

.license-generated-list {
  background: #fff;
  border: 1px solid rgba(22, 168, 121, 0.28);
  border-radius: 10px;
  box-sizing: border-box;
  color: #176b51;
  font-family: Consolas, Monaco, monospace;
  font-size: 14px;
  line-height: 1.65;
  min-height: 130px;
  padding: 12px 14px;
  resize: vertical;
  width: 100%;
}

.license-code-text {
  color: #6d4bc1;
  font-family: Consolas, Monaco, monospace;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .two-column {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.22s ease;
  }

  body.menu-open .sidebar {
    transform: translateX(0);
  }

  body.menu-open .sidebar-mask {
    display: block;
  }

  .main-shell {
    margin-left: 0;
  }

  .mobile-menu-button {
    display: block;
  }

  .topbar {
    height: 74px;
    justify-content: flex-start;
    padding: 0 18px;
  }

  .topbar-status {
    margin-left: auto;
  }

  .content {
    padding: 20px 15px 40px;
  }

  .stat-grid {
    gap: 12px;
  }

  .stat-card {
    padding: 17px;
  }

  .stat-value {
    font-size: 27px;
  }

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

  .form-grid .wide {
    grid-column: auto;
  }

  .after-sales-detail {
    grid-template-columns: 1fr;
  }

  .after-sales-detail__item.is-wide {
    grid-column: auto;
  }

  .license-result-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .login-card {
    border-radius: 18px;
    padding: 30px 24px;
  }

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

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-group {
    width: 100%;
  }

  .toolbar input,
  .toolbar select,
  .search-input {
    flex: 1;
    min-width: 0 !important;
    width: 100%;
  }

  .topbar-status {
    display: none;
  }
}

/* 小程序设置：多小程序清单 */
.app-key-tag {
  background: var(--primary-soft);
  border: 1px solid #d3e0ff;
  border-radius: 6px;
  color: var(--primary-dark);
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  padding: 3px 8px;
}

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

.miniapp-actions .ghost-button {
  padding: 6px 12px;
  font-size: 12px;
}

.maintenance-preview {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 18px;
}

.maintenance-preview__phone {
  background: linear-gradient(180deg, #ffffff, #eef2f8);
  border: 8px solid #182033;
  border-radius: 26px;
  box-shadow: 0 18px 40px rgba(24, 32, 51, 0.18);
  flex: none;
  height: 380px;
  overflow: hidden;
  position: relative;
  width: 210px;
}

.maintenance-preview__mask {
  align-items: center;
  background: rgba(17, 24, 39, 0.92);
  bottom: 0;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
  left: 0;
  padding: 24px 20px;
  position: absolute;
  right: 0;
  text-align: center;
  top: 0;
}

.maintenance-preview__icon {
  align-items: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  display: flex;
  font-size: 24px;
  font-style: normal;
  font-weight: 700;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.maintenance-preview__mask h4 {
  font-size: 17px;
  letter-spacing: 1px;
  margin: 0;
}

.maintenance-preview__mask p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 1.7;
  margin: 0;
}

.maintenance-preview__tip {
  color: var(--muted);
  flex: 1;
  font-size: 13px;
  line-height: 1.8;
  min-width: 220px;
}
