.admin-app-root {
  min-height: 100%;
  color: #172033;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}

.admin-app-root *,
.admin-app-root *::before,
.admin-app-root *::after {
  box-sizing: border-box;
}

.admin-app-root button,
.admin-app-root input,
.admin-app-root select {
  font: inherit;
}

.admin-app-root button {
  color: inherit;
}

.admin-app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  background: #f5f7fb;
}

.admin-sidebar {
  min-height: 100vh;
  padding: 24px 15px;
  display: flex;
  flex-direction: column;
  color: #d9ddf2;
  background:
    radial-gradient(circle at 8% 0%, rgba(125, 115, 255, 0.3), transparent 15rem),
    linear-gradient(178deg, #20273e 0%, #171d31 100%);
  position: sticky;
  top: 0;
  height: 100vh;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 5px 10px 31px;
}

.admin-brand-mark {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 11px;
  font-weight: 800;
  background: linear-gradient(145deg, #958aff, #6557e4);
  box-shadow: 0 9px 20px rgba(102, 87, 228, 0.38);
}

.admin-brand strong,
.admin-brand small {
  display: block;
}

.admin-brand strong {
  color: #fff;
  font-size: 15px;
  letter-spacing: 0.02em;
}

.admin-brand small {
  margin-top: 3px;
  color: #8f98ba;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.admin-nav {
  display: grid;
  gap: 7px;
}

.admin-nav-item {
  height: 45px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 10px;
  color: #aeb6d0;
  background: transparent;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: 0.18s ease;
}

.admin-nav-item svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.admin-nav-item:hover {
  color: #f1f2ff;
  background: rgba(255, 255, 255, 0.06);
}

.admin-nav-item.is-active {
  color: #fff;
  font-weight: 700;
  background: linear-gradient(100deg, rgba(119, 108, 239, 0.93), rgba(99, 88, 215, 0.76));
  box-shadow: 0 6px 17px rgba(7, 10, 28, 0.25);
}

.admin-sidebar-foot {
  margin: auto 10px 2px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  color: #8e98b7;
  font-size: 12px;
}

.admin-live-dot {
  width: 7px;
  height: 7px;
  margin-right: 6px;
  display: inline-block;
  border-radius: 50%;
  background: #3bd69a;
  box-shadow: 0 0 0 4px rgba(59, 214, 154, 0.12);
}

.admin-main {
  min-width: 0;
}

.admin-topbar {
  min-height: 116px;
  padding: 25px 36px 23px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid #e8ebf2;
  background: rgba(255, 255, 255, 0.85);
}

.admin-eyebrow,
.admin-kicker {
  display: block;
  color: #776ce8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-topbar h1,
.admin-topbar p,
.admin-panel h2,
.admin-editor-intro h2,
.admin-generated-panel h2,
.admin-confirm-modal h2,
.admin-empty h3,
.admin-card-tip h3 {
  margin: 0;
}

.admin-topbar h1 {
  margin-top: 4px;
  font-size: 23px;
  letter-spacing: -0.035em;
}

.admin-topbar p {
  margin-top: 6px;
  color: #7f899e;
  font-size: 13px;
}

.admin-topbar-actions,
.admin-confirm-actions,
.admin-table-actions,
.admin-channel-actions,
.admin-generated-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-content {
  max-width: 1540px;
  margin: 0 auto;
  padding: 29px 36px 54px;
}

.admin-btn {
  min-height: 38px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: 0.18s ease;
}

.admin-btn svg,
.admin-icon-btn svg,
.admin-quick-action svg,
.admin-tip-icon svg,
.admin-generated-success svg,
.admin-toast svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-btn:disabled,
.admin-icon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.admin-btn-primary {
  color: #fff;
  background: linear-gradient(180deg, #766aee, #6152dd);
  box-shadow: 0 6px 15px rgba(98, 81, 220, 0.24);
}

.admin-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 19px rgba(98, 81, 220, 0.34);
}

.admin-btn-secondary {
  border-color: #e0e4ed;
  color: #566076;
  background: #fff;
}

.admin-btn-secondary:hover:not(:disabled) {
  color: #6254dd;
  border-color: #c9c4f8;
  background: #fafaff;
}

.admin-btn-danger {
  color: #fff;
  background: #dd4d61;
}

.admin-panel,
.admin-generated-panel {
  border: 1px solid #e6eaf1;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(29, 39, 69, 0.025);
}

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

.admin-stat-card {
  min-height: 145px;
  padding: 21px 22px;
  overflow: hidden;
  position: relative;
  border: 1px solid #e6e9f2;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(29, 39, 69, 0.03);
}

.admin-stat-card::after {
  width: 86px;
  height: 86px;
  content: "";
  position: absolute;
  right: -33px;
  bottom: -43px;
  border-radius: 50%;
  opacity: 0.12;
}

.admin-stat-violet::after { background: #7464e9; }
.admin-stat-blue::after { background: #3f8eee; }
.admin-stat-orange::after { background: #ef9e4a; }
.admin-stat-green::after { background: #34b781; }

.admin-stat-label,
.admin-stat-hint {
  display: block;
}

.admin-stat-label {
  color: #7b8498;
  font-size: 13px;
}

.admin-stat-card strong {
  margin: 12px 0 7px;
  display: block;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.admin-stat-hint {
  color: #a0a7b6;
  font-size: 11px;
}

.admin-dashboard-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(250px, 0.72fr);
  gap: 18px;
}

.admin-panel-heading {
  padding: 21px 22px 15px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}

.admin-panel h2,
.admin-editor-intro h2 {
  margin-top: 4px;
  font-size: 17px;
  letter-spacing: -0.025em;
}

.admin-muted,
.admin-count {
  color: #8d96a8;
  font-size: 12px;
}

.admin-overview-panel,
.admin-summary-panel {
  min-height: 278px;
}

.admin-empty-chart {
  min-height: 192px;
  margin: 0 22px 22px;
  display: grid;
  place-content: center;
  gap: 6px;
  border: 1px dashed #dce1eb;
  border-radius: 10px;
  color: #7e879a;
  text-align: center;
}

.admin-empty-chart small {
  color: #adb4c1;
}

.admin-bar-chart {
  height: 190px;
  margin: 1px 24px 21px;
  padding: 0 4px;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 14px;
  border-bottom: 1px solid #edf0f5;
}

.admin-chart-column {
  height: 100%;
  min-width: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
}

.admin-chart-column i {
  width: min(100%, 31px);
  min-height: 7px;
  display: block;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #9387fa, #695ae0);
}

.admin-chart-column small,
.admin-chart-value {
  color: #8a93a4;
  font-size: 10px;
}

.admin-chart-value {
  color: #5d6477;
  font-weight: 700;
}

.admin-summary-list {
  padding: 0 22px 13px;
}

.admin-summary-row {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #edf0f4;
  color: #626c7f;
  font-size: 13px;
}

.admin-summary-row:last-child {
  border-bottom: 0;
}

.admin-summary-row strong {
  color: #20293b;
  font-size: 17px;
}

.admin-dot {
  width: 8px;
  height: 8px;
  margin-right: 8px;
  display: inline-block;
  border-radius: 50%;
}

.admin-dot-available { background: #36c78c; }
.admin-dot-used { background: #6c78e6; }
.admin-dot-expired { background: #e0a549; }

.admin-quick-panel {
  margin-top: 18px;
}

.admin-quick-actions {
  padding: 0 22px 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.admin-quick-action {
  min-height: 82px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid #e7eaf2;
  border-radius: 11px;
  color: #2b3549;
  background: #fafbfe;
  text-align: left;
  cursor: pointer;
  transition: 0.18s ease;
}

.admin-quick-action:hover {
  border-color: #cec8f6;
  background: #f8f7ff;
  transform: translateY(-1px);
}

.admin-quick-action svg {
  width: 25px;
  height: 25px;
  color: #7163e6;
}

.admin-quick-action strong,
.admin-quick-action small {
  display: block;
}

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

.admin-quick-action small {
  margin-top: 5px;
  color: #8b94a7;
  font-size: 11px;
  line-height: 1.35;
}

.admin-list-panel {
  overflow: hidden;
}

.admin-list-toolbar,
.admin-table-tools {
  padding: 18px 21px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.admin-table-tools {
  padding-top: 0;
  padding-bottom: 17px;
  justify-content: flex-start;
}

.admin-search {
  height: 38px;
  min-width: min(100%, 320px);
  padding: 0 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e2e6ee;
  border-radius: 8px;
  color: #9aa3b4;
  background: #fff;
}

.admin-search:focus-within {
  border-color: #a9a0f3;
  box-shadow: 0 0 0 3px rgba(113, 99, 230, 0.1);
}

.admin-search span {
  font-size: 22px;
  line-height: 1;
  transform: rotate(-20deg);
}

.admin-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: #253047;
  background: transparent;
  font-size: 13px;
}

.admin-toolbar-note {
  margin: 0;
  padding: 0 22px 16px;
  color: #9ba3b2;
  font-size: 12px;
}

.admin-channel-list {
  border-top: 1px solid #edf0f4;
}

.admin-channel-row {
  min-height: 80px;
  padding: 12px 20px;
  display: grid;
  grid-template-columns: 26px 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #edf0f4;
  background: #fff;
  transition: 0.18s ease;
}

.admin-channel-row:last-child {
  border-bottom: 0;
}

.admin-channel-row:hover {
  background: #fcfcff;
}

.admin-channel-row.is-dragging {
  opacity: 0.42;
}

.admin-channel-row.is-drop-target {
  box-shadow: inset 0 3px #796de8;
}

.admin-drag-handle,
.admin-icon-btn {
  width: 31px;
  height: 31px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #8790a1;
  background: transparent;
  cursor: pointer;
  transition: 0.16s ease;
}

.admin-drag-handle {
  cursor: grab;
}

.admin-drag-handle:active {
  cursor: grabbing;
}

.admin-drag-handle svg,
.admin-icon-btn svg {
  width: 17px;
  height: 17px;
}

.admin-drag-handle svg {
  color: #aeb5c1;
}

.admin-icon-btn:hover:not(:disabled) {
  color: #6153da;
  border-color: #dedafb;
  background: #f7f6ff;
}

.admin-icon-danger:hover:not(:disabled) {
  color: #d84b5d;
  border-color: #f8d9df;
  background: #fff5f6;
}

.admin-channel-avatar {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #6254dc;
  background: #eeecff;
  font-size: 13px;
  font-weight: 800;
}

.admin-channel-copy {
  min-width: 0;
}

.admin-channel-copy h3 {
  margin: 0;
  overflow: hidden;
  color: #263045;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-channel-copy p {
  margin: 5px 0 0;
  overflow: hidden;
  color: #929aaa;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-editor-page {
  display: grid;
  gap: 17px;
}

.admin-editor-intro {
  padding: 21px 23px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 390px);
  align-items: end;
  gap: 25px;
  border: 1px solid #e7eaf1;
  border-radius: 14px;
  background: linear-gradient(110deg, #fff, #fbfaff);
}

.admin-editor-intro p {
  max-width: 690px;
  margin: 8px 0 0;
  color: #7d879a;
  font-size: 12px;
  line-height: 1.65;
}

.admin-field {
  display: grid;
  gap: 7px;
  color: #5b6578;
  font-size: 12px;
  font-weight: 700;
}

.admin-field > span em {
  color: #df5262;
  font-style: normal;
}

.admin-field input,
.admin-field select {
  width: 100%;
  height: 39px;
  padding: 0 11px;
  border: 1px solid #e0e4ec;
  border-radius: 8px;
  outline: 0;
  color: #202b40;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
}

.admin-field input:focus,
.admin-field select:focus {
  border-color: #a89ff3;
  box-shadow: 0 0 0 3px rgba(113, 99, 230, 0.1);
}

.admin-designer-wrap {
  overflow: auto;
  min-width: 0;
  container-name: admin-channel-designer;
  container-type: inline-size;
  border: 1px solid #e3e7f0;
  border-radius: 14px;
  background: #f4f6fa;
  box-shadow: 0 5px 15px rgba(29, 39, 69, 0.025);
}

.admin-designer-wrap > address-template-designer {
  width: 100%;
  min-width: 0;
  display: block;
}

@container admin-channel-designer (max-width: 1179px) {
  .admin-designer-wrap > address-template-designer .atd-app {
    min-height: 0;
  }

  .admin-designer-wrap > address-template-designer .atd-header {
    height: auto;
    min-height: 68px;
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 10px 16px;
  }

  .admin-designer-wrap > address-template-designer .atd-header-actions {
    margin-left: auto;
  }

  .admin-designer-wrap > address-template-designer .atd-main {
    height: auto;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-designer-wrap > address-template-designer .atd-panel {
    min-height: 0;
    overflow: visible;
  }

  .admin-designer-wrap > address-template-designer .atd-left-panel,
  .admin-designer-wrap > address-template-designer .atd-right-panel {
    border: 0;
    border-bottom: 1px solid var(--panel-border);
  }

  .admin-designer-wrap > address-template-designer .atd-workspace {
    min-height: 590px;
    grid-template-rows: auto minmax(470px, 1fr) 42px;
    border-bottom: 1px solid var(--panel-border);
  }

  .admin-designer-wrap > address-template-designer .atd-workspace-toolbar {
    min-height: 56px;
    padding: 9px 12px;
    flex-wrap: wrap;
  }

  .admin-designer-wrap > address-template-designer .atd-toolbar-group {
    flex-wrap: wrap;
  }

  .admin-designer-wrap > address-template-designer .atd-canvas-shell {
    min-height: 470px;
    padding: 28px 18px;
  }

  .admin-designer-wrap > address-template-designer .atd-preprocess-toolbar {
    width: calc(100% - 20px);
    min-width: 0;
    max-height: calc(100% - 20px);
    top: 10px;
    align-items: flex-start;
    flex-wrap: wrap;
    overflow-y: auto;
  }

  .admin-designer-wrap > address-template-designer .atd-preprocess-actions {
    flex: 1 1 560px;
    flex-wrap: wrap;
  }
}

@container admin-channel-designer (max-width: 560px) {
  .admin-designer-wrap > address-template-designer .atd-header {
    align-items: flex-start;
  }

  .admin-designer-wrap > address-template-designer .atd-brand {
    min-width: 0;
  }

  .admin-designer-wrap > address-template-designer .atd-brand p,
  .admin-designer-wrap > address-template-designer .atd-save-status {
    display: none;
  }

  .admin-designer-wrap > address-template-designer .atd-header-actions {
    width: 100%;
    margin-left: 0;
  }

  .admin-designer-wrap > address-template-designer .atd-header-actions .atd-button {
    width: 100%;
  }

  .admin-designer-wrap > address-template-designer .atd-workspace {
    min-height: 540px;
    grid-template-rows: auto minmax(420px, 1fr) 40px;
  }

  .admin-designer-wrap > address-template-designer .atd-workspace-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-designer-wrap > address-template-designer .atd-toolbar-group {
    width: 100%;
  }

  .admin-designer-wrap > address-template-designer .atd-toolbar-group .atd-button {
    min-width: 0;
    flex: 1 1 105px;
  }

  .admin-designer-wrap > address-template-designer .atd-toolbar-group:last-child {
    justify-content: space-between;
  }

  .admin-designer-wrap > address-template-designer .atd-image-name {
    max-width: 180px;
  }

  .admin-designer-wrap > address-template-designer .atd-canvas-shell {
    min-height: 420px;
    padding: 74px 10px 20px;
  }

  .admin-designer-wrap > address-template-designer .atd-preprocess-toolbar {
    align-content: flex-start;
    gap: 8px;
  }

  .admin-designer-wrap > address-template-designer .atd-preprocess-title,
  .admin-designer-wrap > address-template-designer .atd-preprocess-actions {
    width: 100%;
  }

  .admin-designer-wrap > address-template-designer .atd-preprocess-actions {
    flex-basis: auto;
    justify-content: flex-start;
  }

  .admin-designer-wrap > address-template-designer .atd-preprocess-color {
    flex: 1 1 120px;
  }

  .admin-designer-wrap > address-template-designer .atd-preprocess-count {
    min-width: 62px;
  }

  .admin-designer-wrap > address-template-designer .atd-canvas-footer {
    padding: 0 10px;
  }

  .admin-designer-wrap > address-template-designer .atd-footer-tip {
    display: none;
  }
}

.admin-cards-layout {
  display: grid;
  grid-template-columns: minmax(450px, 1fr) minmax(260px, 0.57fr);
  gap: 18px;
}

.admin-generate-form {
  padding: 0 22px 22px;
  display: grid;
  grid-template-columns: minmax(150px, 0.65fr) minmax(190px, 0.75fr) auto;
  align-items: end;
  gap: 13px;
}

.admin-number-input {
  position: relative;
}

.admin-number-input small {
  margin-top: 5px;
  display: block;
  color: #9aa2b1;
  font-size: 10px;
  font-weight: 500;
}

.admin-generate-submit {
  margin-bottom: 18px;
}

.admin-card-tip {
  padding: 25px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(132deg, #fff, #f9f8ff);
}

.admin-tip-icon {
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #6759df;
  background: #eceaff;
}

.admin-tip-icon svg {
  width: 21px;
  height: 21px;
}

.admin-card-tip h3 {
  color: #30394e;
  font-size: 14px;
}

.admin-card-tip p {
  margin: 6px 0 0;
  color: #8c95a7;
  font-size: 11px;
  line-height: 1.55;
}

.admin-generated-panel {
  margin: 18px 0;
  padding: 17px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  border-color: #cdeede;
  background: linear-gradient(120deg, #fbfffd, #f5fffa);
}

.admin-generated-panel > div:first-child {
  display: flex;
  align-items: center;
  gap: 11px;
}

.admin-generated-success {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #1da76e;
  background: #dff7eb;
}

.admin-generated-success svg {
  width: 18px;
}

.admin-generated-panel h2 {
  color: #2b5643;
  font-size: 14px;
}

.admin-generated-panel p {
  margin: 4px 0 0;
  color: #79a08e;
  font-size: 11px;
}

.admin-generated-codes {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.admin-generated-codes button,
.admin-generated-codes span {
  max-width: 100%;
  padding: 5px 7px;
  overflow: hidden;
  border: 1px solid #c7e9d7;
  border-radius: 5px;
  color: #337258;
  background: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-generated-codes button {
  cursor: pointer;
}

.admin-generated-codes button:hover {
  background: #edfdf4;
}

.admin-filter-select {
  height: 38px;
  padding: 0 9px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e2e6ee;
  border-radius: 8px;
  color: #848da0;
  background: #fff;
  font-size: 12px;
}

.admin-filter-select select {
  border: 0;
  outline: 0;
  color: #4d566a;
  background: transparent;
  font-size: 12px;
}

.admin-table-wrap {
  overflow-x: auto;
  border-top: 1px solid #edf0f4;
}

.admin-table {
  width: 100%;
  min-width: 750px;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th {
  height: 42px;
  padding: 0 20px;
  color: #8c95a7;
  background: #fbfcfe;
  font-size: 11px;
  font-weight: 700;
}

.admin-table td {
  height: 62px;
  padding: 9px 20px;
  border-top: 1px solid #eef1f5;
  color: #5e687b;
  font-size: 12px;
}

.admin-table tbody tr:hover {
  background: #fcfcff;
}

.admin-table code,
.admin-code-cell code {
  color: #343d51;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}

.admin-code-cell {
  display: grid;
  gap: 4px;
}

.admin-code-cell small {
  max-width: 260px;
  overflow: hidden;
  color: #9ca4b2;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-status {
  padding: 4px 8px;
  display: inline-block;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}

.admin-status-available {
  color: #18885b;
  background: #e6f8ef;
}

.admin-status-used {
  color: #5a54c6;
  background: #eeedff;
}

.admin-status-expired,
.admin-status-disabled {
  color: #a36d23;
  background: #fff4df;
}

.admin-status-neutral {
  color: #758094;
  background: #eff1f5;
}

.admin-error {
  margin: 0 21px 16px;
  padding: 10px 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #f4cbd2;
  border-radius: 8px;
  color: #b33f52;
  background: #fff7f8;
  font-size: 12px;
}

.admin-error > span {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #dc596b;
  font-size: 12px;
  font-weight: 800;
}

.admin-error p {
  flex: 1;
  margin: 0;
}

.admin-error button {
  border: 0;
  color: inherit;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.admin-loading,
.admin-empty {
  min-height: 205px;
  padding: 25px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  color: #8992a4;
  text-align: center;
  font-size: 13px;
}

.admin-spinner {
  width: 16px;
  height: 16px;
  display: inline-block;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: admin-spin 0.75s linear infinite;
}

.admin-empty-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #7467e7;
  background: #eeecff;
  font-size: 24px;
}

.admin-empty h3 {
  margin-top: 3px;
  color: #4b556a;
  font-size: 14px;
}

.admin-empty p {
  max-width: 340px;
  margin: 0;
  color: #929aaa;
  font-size: 12px;
  line-height: 1.6;
}

.admin-empty .admin-btn {
  margin-top: 7px;
}

.admin-toast {
  max-width: min(420px, calc(100vw - 32px));
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: fixed;
  right: 24px;
  bottom: 23px;
  z-index: 100;
  border-radius: 9px;
  color: #fff;
  background: #263047;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.23);
  font-size: 13px;
  animation: admin-toast-in 0.2s ease-out;
}

.admin-toast-success svg {
  color: #63e1aa;
}

.admin-toast-error {
  background: #b84455;
}

.admin-modal-backdrop {
  padding: 20px;
  display: grid;
  place-items: center;
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(22, 29, 47, 0.43);
}

.admin-confirm-modal {
  width: min(100%, 390px);
  padding: 27px;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 18px 60px rgba(13, 18, 33, 0.26);
  text-align: center;
}

.admin-confirm-icon {
  width: 39px;
  height: 39px;
  margin: 0 auto 13px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #cf4759;
  background: #ffe9ec;
  font-size: 20px;
  font-weight: 800;
}

.admin-confirm-modal h2 {
  color: #293348;
  font-size: 17px;
}

.admin-confirm-modal p {
  margin: 10px 0 22px;
  color: #798395;
  font-size: 13px;
  line-height: 1.65;
}

.admin-confirm-actions {
  justify-content: center;
}

.admin-denied {
  min-height: 100vh;
  padding: 20px;
  display: grid;
  place-items: center;
  color: #4d576c;
  background: #f5f7fb;
  text-align: center;
}

.admin-denied > div {
  max-width: 360px;
  padding: 37px;
  border: 1px solid #e3e7ee;
  border-radius: 16px;
  background: #fff;
}

.admin-denied span {
  width: 42px;
  height: 42px;
  margin: auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #b74356;
  background: #ffebee;
  font-weight: 800;
}

.admin-denied h1 {
  margin: 14px 0 7px;
  font-size: 18px;
}

.admin-denied p {
  margin: 0;
  color: #9098a7;
  font-size: 13px;
}

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

@keyframes admin-spin {
  to { transform: rotate(360deg); }
}

@keyframes admin-toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1050px) {
  .admin-app {
    grid-template-columns: 205px minmax(0, 1fr);
  }

  .admin-content,
  .admin-topbar {
    padding-left: 22px;
    padding-right: 22px;
  }

  .admin-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 720px) {
  .admin-app {
    display: block;
  }

  .admin-sidebar {
    min-height: auto;
    height: auto;
    padding: 13px;
    position: static;
  }

  .admin-brand {
    padding: 3px 6px 13px;
  }

  .admin-nav {
    grid-template-columns: repeat(4, 1fr);
  }

  .admin-nav-item {
    height: 39px;
    justify-content: center;
    padding: 0;
  }

  .admin-nav-item span {
    display: none;
  }

  .admin-sidebar-foot {
    display: none;
  }

  .admin-topbar {
    min-height: auto;
    padding-top: 19px;
    padding-bottom: 19px;
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-topbar-actions {
    width: 100%;
  }

  .admin-topbar-actions .admin-btn {
    flex: 1;
  }

  .admin-content {
    padding: 18px 13px 35px;
  }

  .admin-stats-grid,
  .admin-quick-actions,
  .admin-editor-intro,
  .admin-cards-layout {
    grid-template-columns: 1fr;
  }

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

  .admin-generate-submit {
    margin-bottom: 0;
  }

  .admin-channel-row {
    padding: 11px 10px;
    grid-template-columns: 22px 35px minmax(0, 1fr);
  }

  .admin-channel-actions {
    grid-column: 2 / -1;
    justify-content: flex-end;
  }

  .admin-list-toolbar,
  .admin-table-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-search {
    min-width: 0;
  }

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

  .admin-generated-actions {
    justify-content: flex-end;
  }
}

/* 数据化管理后台增强 */
.admin-app {
  min-height: calc(100vh - 62px);
  grid-template-columns: 218px minmax(0, 1fr);
}

.admin-sidebar {
  top: 62px;
  height: calc(100vh - 62px);
  min-height: calc(100vh - 62px);
  padding-top: 18px;
}

.admin-brand {
  padding-bottom: 20px;
}

.admin-topbar {
  min-height: 88px;
  padding: 16px 25px;
}

.admin-topbar h1 {
  font-size: 21px;
}

.admin-topbar p {
  margin-top: 4px;
  font-size: 12px;
}

.admin-content {
  padding: 20px 25px 38px;
}

.admin-stats-grid {
  gap: 11px;
}

.admin-stat-card {
  min-height: 112px;
  padding: 16px 17px;
}

.admin-stat-card strong {
  margin: 9px 0 5px;
  font-size: 26px;
}

.admin-dashboard-grid,
.admin-quick-panel {
  margin-top: 12px;
}

.admin-dashboard-grid {
  gap: 12px;
}

.admin-overview-panel,
.admin-summary-panel {
  min-height: 238px;
}

.admin-bar-chart {
  height: 155px;
}

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

.admin-insight-grid > .admin-panel {
  min-height: 232px;
}

.admin-distribution-list,
.admin-activity-list {
  padding: 0 18px 16px;
}

.admin-distribution-row {
  min-height: 34px;
  display: grid;
  grid-template-columns: minmax(84px, 0.7fr) minmax(70px, 1fr) 28px;
  align-items: center;
  gap: 8px;
  color: #697387;
  font-size: 11px;
}

.admin-distribution-row > span {
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-distribution-row > span i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--distribution-color);
}

.admin-distribution-row > div {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f4;
}

.admin-distribution-row > div b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8175ee, #5f9be7);
}

.admin-distribution-row > strong {
  color: #2c3548;
  text-align: right;
}

.admin-activity-row {
  min-height: 36px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #eff1f4;
}

.admin-activity-row:last-child {
  border-bottom: 0;
}

.admin-activity-row p {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #5f697c;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}

.admin-activity-row time {
  color: #a0a7b4;
  font-size: 9px;
}

.admin-mini-empty {
  min-height: 150px;
  display: grid;
  place-items: center;
  color: #9aa2b1;
  font-size: 12px;
}

.admin-quick-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.admin-cards-layout {
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 12px;
}

.admin-generate-form {
  grid-template-columns: minmax(180px, 1fr) 180px 150px auto;
  gap: 10px;
}

.admin-plan-picker {
  min-width: 0;
  margin: 0;
  padding: 0;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  border: 0;
}

.admin-plan-picker legend {
  margin-bottom: 7px;
  color: #5b6578;
  font-size: 12px;
  font-weight: 700;
}

.admin-plan-picker label {
  min-width: 0;
  cursor: pointer;
}

.admin-plan-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.admin-plan-picker label > span {
  min-height: 64px;
  padding: 10px 11px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid #e2e5ec;
  border-radius: 9px;
  background: #fafbfc;
  transition: 0.16s ease;
}

.admin-plan-picker label > span strong,
.admin-plan-picker label > span small {
  display: block;
}

.admin-plan-picker label > span strong {
  color: #30394c;
  font-size: 13px;
}

.admin-plan-picker label > span small {
  overflow: hidden;
  color: #929baa;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
}

.admin-plan-picker input:checked + span {
  border-color: #776ae9;
  background: #f2f0ff;
  box-shadow: inset 0 0 0 1px #776ae9;
}

.admin-plan-picker input:checked + span strong {
  color: #5e51d1;
}

.admin-generate-submit {
  margin-bottom: 18px;
}

.admin-card-summary,
.admin-user-summary {
  display: grid;
  gap: 9px;
  margin: 12px 0;
}

.admin-card-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-card-summary > div,
.admin-user-summary > article {
  padding: 13px 15px;
  border: 1px solid #e5e8ef;
  border-radius: 11px;
  background: #fff;
}

.admin-card-summary span,
.admin-user-summary span,
.admin-user-summary small {
  display: block;
  color: #858fa1;
  font-size: 10px;
}

.admin-card-summary strong,
.admin-user-summary strong {
  display: block;
  margin-top: 5px;
  color: #283248;
  font-size: 20px;
}

.admin-user-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0;
}

.admin-user-summary small {
  margin-top: 4px;
}

.admin-toolbar-inline-note {
  color: #929aaa;
  font-size: 10px;
}

.admin-user-table {
  min-width: 900px;
}

.admin-user-cell {
  display: flex;
  align-items: center;
  gap: 9px;
}

.admin-user-cell > span,
.admin-grant-user > span {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #6255d7;
  background: #efedff;
  font-size: 11px;
  font-weight: 800;
}

.admin-user-cell strong,
.admin-user-cell small {
  display: block;
}

.admin-user-cell strong {
  color: #30394d;
  font-size: 12px;
}

.admin-user-cell small {
  margin-top: 3px;
  color: #9ba3b1;
  font-size: 9px;
}

.admin-plan-chip {
  padding: 4px 8px;
  display: inline-block;
  border-radius: 999px;
  color: #197853;
  background: #e7f8ef;
  font-size: 10px;
  font-weight: 800;
}

.admin-btn-compact {
  min-height: 31px;
  padding: 0 9px;
  font-size: 10px;
}

.admin-grant-modal {
  position: relative;
  width: min(100%, 590px);
  padding: 25px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 64px rgba(19, 26, 44, 0.28);
}

.admin-grant-modal h2 {
  margin: 5px 0 16px;
  color: #283247;
  font-size: 19px;
}

.admin-grant-close {
  position: absolute;
  top: 15px;
  right: 15px;
}

.admin-grant-user {
  padding: 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #e7e9ef;
  border-radius: 10px;
  background: #fafbfc;
}

.admin-grant-user strong,
.admin-grant-user small {
  display: block;
}

.admin-grant-user strong {
  color: #313a4e;
  font-size: 13px;
}

.admin-grant-user small {
  margin-top: 3px;
  color: #9199a8;
  font-size: 10px;
}

.admin-grant-current {
  margin: 10px 0 16px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #5f6b7e;
  background: #f4f6f9;
  font-size: 11px;
  line-height: 1.6;
}

.admin-plan-picker--grant {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 13px;
}

.admin-grant-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

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

  .admin-insight-grid > .admin-panel:last-child {
    grid-column: 1 / -1;
  }

  .admin-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 720px) {
  .admin-app {
    min-height: calc(100vh - 58px);
  }

  .admin-sidebar {
    min-height: auto;
    height: auto;
    padding: 9px 10px;
  }

  .admin-brand {
    display: none;
  }

  .admin-nav {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(48px, 1fr);
    grid-template-columns: none;
    overflow-x: auto;
    gap: 5px;
  }

  .admin-nav-item {
    height: 38px;
  }

  .admin-topbar {
    padding: 13px 12px;
    gap: 10px;
  }

  .admin-topbar h1 {
    font-size: 18px;
  }

  .admin-topbar p,
  .admin-eyebrow {
    display: none;
  }

  .admin-content {
    padding: 12px 10px 28px;
  }

  .admin-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .admin-stat-card {
    min-height: 96px;
    padding: 12px;
  }

  .admin-stat-card strong {
    font-size: 22px;
  }

  .admin-insight-grid,
  .admin-user-summary {
    grid-template-columns: 1fr;
  }

  .admin-insight-grid > .admin-panel:last-child {
    grid-column: auto;
  }

  .admin-quick-actions,
  .admin-card-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-plan-picker,
  .admin-plan-picker--grant {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .admin-plan-picker {
    grid-column: auto;
  }

  .admin-generate-submit {
    margin-bottom: 0;
  }

  .admin-grant-modal {
    padding: 21px 15px 16px;
  }

  .admin-modal-backdrop {
    padding: 10px;
  }
}

@media (max-width: 390px) {
  .admin-card-summary {
    grid-template-columns: 1fr 1fr;
  }

  .admin-plan-picker label > span {
    min-height: 58px;
    padding: 8px;
  }
}
