:root {
  --primary: #6757f5;
  --primary-deep: #4e3ff2;
  --pink: #ef3dbf;
  --orange: #ff8a1d;
  --text: #1f2b4a;
  --muted: #7e8aa3;
  --line: #e6ebf4;
  --soft: #f5f7fb;
  --card: #ffffff;
  --shadow: 0 10px 26px rgba(47, 57, 105, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: #edf1f7;
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
  border: 0;
}

.phone-shell {
  height: 100vh;
  min-height: 0;
  display: flex;
  justify-content: center;
  background:
    radial-gradient(circle at top, rgba(103, 87, 245, 0.08), transparent 32%),
    #edf1f7;
}

.app {
  width: min(100vw, 390px);
  height: 100vh;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fd 100%);
  box-shadow: 0 0 0 1px #dfe6f1;
}

.top-banner {
  flex: 0 0 auto;
  min-height: 78px;
  padding: 14px 16px 10px;
  color: #fff;
  text-align: center;
  background: linear-gradient(115deg, #6b56ff 0%, #8a53f5 45%, #ff36aa 100%);
}

.mini-row {
  display: grid;
  grid-template-columns: 88px 1fr 112px;
  align-items: center;
  gap: 6px;
}

.top-banner h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.badge.warn {
  background: #ffbd2b;
  color: #fff;
}

.member-button {
  margin-top: 7px;
  padding: 5px 16px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, #ffba27, #ff8c19);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 5px 12px rgba(255, 136, 25, 0.28);
}

.vip-card {
  flex: 0 0 auto;
  margin: 14px 14px 12px;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #ffca97;
  border-radius: 10px;
  background: #fff7ef;
}

.gift {
  width: 22px;
  text-align: center;
}

.vip-card strong {
  display: block;
  color: #ff6116;
  font-size: 12px;
}

.vip-card p {
  margin: 2px 0 0;
  color: #ff4d12;
  font-size: 10px;
}

.stepper {
  flex: 0 0 auto;
  margin: 0 14px 14px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #f0f4fb;
}

.stepper[hidden] {
  display: none !important;
}

.step {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #9aa6bc;
  font-size: 12px;
  font-weight: 700;
}

.step span {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #8e9ab0;
  background: #dbe3f0;
  font-size: 11px;
}

.step.active,
.step.done {
  color: var(--primary);
}

.step.active span,
.step.done span {
  color: #fff;
  background: var(--primary);
}

.line {
  width: 34px;
  height: 2px;
  margin: 0 8px;
  background: #d8e0ee;
}

.page {
  display: none;
  padding: 0 14px 16px;
}

.page.active {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.search-row {
  display: grid;
  grid-template-columns: 82px 1fr 64px;
  gap: 8px;
}

.search-row input,
.source-select,
.account-card input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #dce4f1;
  border-radius: 9px;
  outline: none;
  background: #fff;
  color: var(--text);
  font-size: 13px;
}

.search-row input:focus,
.source-select:focus,
.account-card input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(103, 87, 245, 0.12);
}

.source-select {
  appearance: none;
  cursor: pointer;
  padding-right: 22px;
  background:
    linear-gradient(45deg, transparent 50%, #64748b 50%) calc(100% - 14px)
      17px / 6px 6px no-repeat,
    linear-gradient(135deg, #64748b 50%, transparent 50%) calc(100% - 10px)
      17px / 6px 6px no-repeat,
    #fff;
  font-weight: 700;
}

.search-row button,
.primary {
  color: #fff;
  border-radius: 9px;
  background: linear-gradient(180deg, #7564ff, #5c4bf3);
  font-weight: 800;
  box-shadow: 0 8px 16px rgba(92, 75, 243, 0.22);
}

.gender-tabs {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.gender-tabs button,
.tag,
.secondary {
  height: 36px;
  border-radius: 9px;
  color: #5f6b84;
  background: #edf2f8;
  font-weight: 700;
}

.gender-tabs button.selected {
  color: #fff;
  background: var(--primary);
}

.gender-tabs.female-mode button.selected {
  background: #f02f9b;
}

.tag-row {
  margin: 10px 0 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  flex: 0 0 auto;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
}

.tag.selected {
  color: var(--primary);
  background: #e9ecff;
}

.tag-row.female-mode .tag.selected {
  color: #ef2d96;
  background: #ffe7f4;
}

.tag.more {
  color: #3f5573;
  background: #e8eef7;
}

.section-title,
.records-title {
  margin: 0 0 9px;
  font-size: 14px;
  font-weight: 800;
}

.book-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.book-card {
  min-height: 80px;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 8px;
  padding: 8px;
  border: 1px solid #e5ebf4;
  border-radius: 10px;
  background: #fff;
}

.book-card img,
.selected-book img {
  width: 48px;
  height: 64px;
  object-fit: cover;
  border-radius: 7px;
  background: #d7deeb;
}

.book-card h3 {
  margin: 1px 0 3px;
  font-size: 12px;
  line-height: 1.25;
}

.book-card p {
  margin: 0 0 4px;
  color: #6d7891;
  font-size: 10px;
}

.book-card em,
.selected-book em {
  display: inline-flex;
  margin-right: 4px;
  padding: 2px 5px;
  border-radius: 999px;
  color: #6574a8;
  background: #eef2ff;
  font-size: 9px;
  font-style: normal;
}

.load-more {
  width: 100%;
  height: 34px;
  margin-top: 12px;
  border-radius: 9px;
  color: #6f5cf5;
  background: #edf2fb;
  font-weight: 800;
}

.tip {
  margin-top: 14px;
  padding: 12px;
  border-left: 3px solid #7b6cff;
  border-radius: 8px;
  color: #55617e;
  background: #eef2ff;
  font-size: 12px;
}

.selected-book {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 86px;
  margin-bottom: 14px;
  padding: 10px;
  border-radius: 13px;
  background: #eef2f8;
}

.selected-book h2 {
  margin: 0 0 4px;
  font-size: 14px;
}

.selected-book p {
  margin: 0 0 6px;
  color: #6f7a91;
  font-size: 11px;
}

.format-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.chapter-range-card {
  margin: 0 14px 10px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border: 1px solid #e5eaf5;
  border-radius: 10px;
  background: #f8faff;
}

.chapter-range-card strong {
  flex: 0 0 auto;
  color: #24304a;
  font-size: 12px;
  font-weight: 800;
}

.chapter-range-card span {
  color: #76839d;
  font-size: 10px;
  white-space: nowrap;
}

.chapter-range-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.chapter-range-card input {
  width: 56px;
  height: 28px;
  border: 1px solid #d8e0ef;
  border-radius: 8px;
  color: #172033;
  background: #fff;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  outline: none;
}

.chapter-range-card input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(103, 87, 245, 0.12);
}

#chapterRangeTip {
  color: #6574a8;
}

.format-card {
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid #e3e8f2;
  border-radius: 10px;
  background: #fff;
}

.format-card.selected {
  border-color: var(--primary);
  background: #eef1ff;
  box-shadow: inset 0 0 0 1px rgba(103, 87, 245, 0.2);
}

.file-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
}

.file-icon.txt {
  background: #19c6a1;
}

.file-icon.epub {
  background: #a66bff;
}

.format-card strong {
  font-size: 12px;
}

.format-card em {
  color: #ff6c15;
  font-size: 11px;
  font-style: normal;
}

.membership-gate {
  width: 100%;
  min-height: 90px;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid #ffd35d;
  border-radius: 14px;
  color: #e87500;
  background: #fffbea;
}

.membership-gate[hidden] {
  display: none;
}

.membership-gate strong {
  font-size: 14px;
  font-weight: 500;
}

.membership-gate span {
  font-size: 12px;
}

.download-progress {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid #d7e8ff;
  border-radius: 14px;
  background: #eef6ff;
}

.progress-title {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #2576f0;
  font-size: 13px;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #b8d4ff;
  border-top-color: #2576f0;
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

.spinner.done {
  border-color: #15b981;
  animation: none;
}

.progress-bar {
  height: 8px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #c9ddf8;
}

.progress-bar i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f7dff, #69b7ff);
  transition: width 0.25s ease;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: #4976b9;
  font-size: 12px;
  font-weight: 800;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 14px;
}

.action-row button,
.block {
  height: 40px;
}

.account-card {
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid #e3e9f3;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

.account-card h2,
.account-card h3 {
  margin: 0 0 7px;
  font-size: 16px;
}

.account-card p {
  margin: 0 0 12px;
  color: #61708c;
  font-size: 12px;
}

.muted {
  color: var(--muted);
}

.account-card input {
  margin-bottom: 9px;
}

.profile-card {
  margin: 6px 4px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid #e8edf5;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(31, 43, 74, 0.12);
}

.avatar {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(145deg, #8a6cff, #6c35d9);
  font-size: 24px;
}

.profile-card p {
  margin: 0 0 5px;
  font-size: 16px;
}

.profile-card a {
  color: #2146ff;
  font-size: 14px;
  text-decoration: none;
}

.profile-card.guest {
  flex-direction: column;
  text-align: center;
  gap: 10px;
  padding: 20px;
}

.profile-card.guest .avatar {
  color: #ff315e;
  background: #ebe7ff;
  font-size: 28px;
  font-weight: 900;
}

.profile-card.guest p {
  color: #5f6b84;
  font-size: 14px;
}

.profile-card.guest a {
  display: none;
}

.account-actions {
  margin: 0 4px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 18px;
}

.big {
  min-height: 40px;
  height: 40px;
  border-radius: 12px;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(40, 53, 100, 0.1);
}

.big[hidden] {
  display: none;
}

.big:disabled {
  color: #8f9ab0;
  background: #dfe5ee;
  box-shadow: none;
  cursor: not-allowed;
}

.big.orange {
  background: #ff970e;
}

.big.purple {
  background: #6257ff;
}

.big.blue {
  background: #0ca7df;
}

.big.gray {
  color: #5e6879;
  background: #dfe5ee;
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(0, 0, 0, 0.46);
}

.modal-layer.show {
  display: flex;
}

.dialog {
  position: relative;
  width: min(100%, 430px);
  display: none;
  padding: 28px 30px 26px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.dialog.active {
  display: block;
}

.dialog h2 {
  margin: 0 0 20px;
  font-size: 20px;
  line-height: 1.2;
}

.dialog-tip,
.buy-link {
  margin: 0 0 22px;
  color: #7e8aa3;
  text-align: center;
}

.buy-link {
  margin: 15px 0 0;
  font-size: 13px;
}

.buy-link button {
  color: #7c87a1;
  background: transparent;
}

.dialog-close {
  position: absolute;
  top: 24px;
  right: 24px;
  color: #9aa5b7;
  background: transparent;
  font-size: 28px;
  line-height: 1;
}

.dialog label {
  display: block;
  margin: 10px 0 6px;
  color: #596783;
  font-size: 13px;
}

.dialog input {
  width: 100%;
  height: 40px;
  margin-bottom: 14px;
  padding: 0 18px;
  border: 1px solid #dde5f1;
  border-radius: 14px;
  outline: none;
  color: var(--text);
  font-size: 14px;
}

.dialog input:focus {
  border-color: #8b8cff;
  box-shadow: 0 0 0 3px rgba(103, 87, 245, 0.12);
}

.dialog .block {
  height: 40px;
  border-radius: 12px;
  font-size: 15px;
}

.disclaimer-dialog {
  width: min(100%, 386px);
  padding: 20px 18px 18px;
  border-radius: 24px;
}

.disclaimer-dialog h2 {
  margin: 0 0 16px;
  color: #2f3442;
  text-align: center;
  font-size: 20px;
  line-height: 1.2;
}

.disclaimer-dialog h2 span {
  display: inline-block;
  padding: 2px 8px;
  background: #e5e5e5;
  border-radius: 2px;
}

.disclaimer-scroll {
  max-height: 228px;
  overflow-y: auto;
  padding: 2px 12px 2px 0;
  color: #34435b;
  font-size: 15px;
  line-height: 1.68;
  scrollbar-color: #8f8f8f transparent;
}

.disclaimer-scroll p {
  margin: 0 0 12px;
  padding: 2px 4px;
  background: #f1f1f1;
  border-radius: 2px;
}

.disclaimer-scroll strong {
  color: #35425f;
}

.disclaimer-check {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 16px 0 10px !important;
  color: #5f6d87;
  font-size: 16px !important;
}

.disclaimer-check input {
  width: 20px !important;
  height: 20px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 4px !important;
  box-shadow: none !important;
}

.disclaimer-ok {
  display: block;
  width: 142px;
  height: 44px;
  margin: 0 auto;
  border-radius: 15px;
  font-size: 18px;
}

.charge-success-dialog {
  width: min(100%, 320px);
  padding: 28px 24px;
  text-align: center;
}

.charge-success-dialog .success-icon {
  margin-bottom: 12px;
  font-size: 56px;
  line-height: 1;
}

.charge-success-dialog h2 {
  margin: 0 0 8px;
  color: #1f2937;
  font-size: 20px;
}

.charge-success-dialog strong {
  display: block;
  margin-bottom: 4px;
  color: #f59e0b;
  font-size: 28px;
}

.charge-success-dialog p {
  margin: 0 0 4px;
  color: #64748b;
  font-size: 14px;
}

.charge-success-dialog span {
  display: block;
  margin-bottom: 18px;
  color: #94a3b8;
  font-size: 13px;
}

.record-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.record-card {
  display: grid;
  grid-template-columns: 1fr 72px;
  gap: 8px;
  align-items: center;
  min-height: 48px;
  padding: 9px 10px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(30, 42, 72, 0.04);
}

.record-card strong {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
}

.record-card span {
  color: #75829d;
  font-size: 10px;
}

.record-card button {
  height: 26px;
  border-radius: 999px;
  color: var(--primary);
  background: #ecefff;
  font-size: 10px;
  font-weight: 800;
}

.bottom-nav {
  position: relative;
  z-index: 10;
  flex: 0 0 60px;
  width: 100%;
  height: 60px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid #dde5f0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #61708b;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}

.nav-item span {
  font-size: 17px;
}

.nav-item.selected {
  color: var(--primary);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 76px;
  z-index: 20;
  max-width: 320px;
  padding: 10px 14px;
  border-radius: 999px;
  color: #fff;
  background: rgba(17, 24, 39, 0.92);
  font-size: 12px;
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (min-width: 760px) {
  .phone-shell {
    padding: 24px 0;
    align-items: center;
  }

  .app {
    height: min(820px, calc(100vh - 48px));
    min-height: 0;
    border-radius: 18px;
    overflow: hidden;
  }

  .bottom-nav {
    position: relative;
  }
}

.admin-body {
  min-height: 100vh;
  background: #f0f2f6;
}

.admin-hero {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1360px) / 2));
  color: #fff;
  background: linear-gradient(105deg, #665cff 0%, #a94ef6 47%, #ff2d91 100%);
  box-shadow: 0 8px 24px rgba(39, 45, 88, 0.18);
}

.admin-hero h1 {
  margin: 0;
  font-size: 24px;
}

.admin-hero p {
  margin: 4px 0 0;
  opacity: 0.92;
}

.admin-logout {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 22px;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
  text-decoration: none;
  font-weight: 800;
}

.admin-wrap {
  width: min(1360px, calc(100vw - 40px));
  margin: 20px auto 50px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.stat-card {
  min-height: 118px;
  padding: 22px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.stat-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 34px;
}

.stat-card span {
  display: block;
  color: #546078;
}

.stat-card em {
  display: block;
  margin-top: 8px;
  color: #ff8900;
  font-style: normal;
}

.stat-card.purple strong {
  color: #5a45ff;
}

.stat-card.red strong {
  color: #e60012;
}

.stat-card.green strong {
  color: #009b72;
}

.stat-card.blue strong {
  color: #225cff;
}

.admin-tabs {
  margin: 20px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 54px;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.admin-tab {
  color: #4e5b73;
  background: #fff;
  font-size: 17px;
  font-weight: 800;
  border-bottom: 3px solid transparent;
}

.admin-tab.active {
  color: #5948ff;
  border-color: #5948ff;
}

.admin-panel {
  display: none;
}

.admin-panel.active {
  display: block;
}

.panel-card {
  margin-bottom: 18px;
  padding: 22px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.panel-card h2 {
  margin: 0 0 20px;
  font-size: 21px;
}

.generate-row {
  display: grid;
  grid-template-columns: 160px 150px 120px 84px;
  gap: 14px;
  align-items: end;
}

.generate-row label {
  color: #596783;
  font-size: 14px;
}

.generate-row input,
.generate-row select {
  width: 100%;
  height: 44px;
  margin-top: 8px;
  padding: 0 12px;
  border: 1px solid #dce4f1;
  border-radius: 12px;
  outline: none;
  background: #fff;
}

.admin-primary {
  height: 44px;
  border-radius: 12px;
  color: #fff;
  background: var(--primary);
  font-weight: 900;
}

.table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.copy-tools {
  display: flex;
  gap: 10px;
}

.copy-tools button {
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  color: #245cff;
  background: #eaf0ff;
  font-weight: 800;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}

.admin-table th,
.admin-table td {
  padding: 14px 16px;
  border-top: 1px solid #e5eaf2;
  color: #24304c;
  text-align: left;
}

.admin-table th {
  color: #526079;
  background: #f7f9fc;
  font-weight: 800;
}

.code-text {
  color: #5140ff;
}

.pill {
  display: inline-flex;
  min-width: 60px;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 800;
}

.pill.unused {
  color: #008864;
  background: #c9f8e6;
}

.pill.used {
  color: #6f6f78;
  background: #eef1f5;
}

.pill.normal {
  color: #5c6790;
  background: #eef2ff;
}

.danger-text,
.restore-text {
  padding: 6px 10px;
  border-radius: 7px;
  font-weight: 800;
}

.danger-text {
  color: #ff244c;
  background: #ffe5e9;
}

.restore-text {
  color: #008864;
  background: #e1f8ed;
}

.admin-empty {
  color: #7e8aa3;
  text-align: center !important;
}

@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .generate-row {
    grid-template-columns: 1fr 1fr;
  }

  .admin-table {
    min-width: 900px;
  }

  .panel-card {
    overflow-x: auto;
  }
}


.plan-dialog {
  width: min(100%, 430px);
  padding: 24px;
}

.plan-dialog h2 {
  margin-bottom: 8px;
}

.plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.plan-card {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px;
  border: 1px solid #dbe7f3;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  color: #0f172a;
  text-align: left;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
}

.plan-card:hover {
  border-color: #38bdf8;
  box-shadow: 0 12px 26px rgba(14, 165, 233, 0.16);
  transform: translateY(-1px);
}

.plan-card:disabled {
  opacity: 0.72;
  transform: none;
}

.plan-card strong {
  font-size: 18px;
  font-weight: 900;
}

.plan-card em {
  color: #0284c7;
  font-size: 22px;
  font-style: normal;
  font-weight: 900;
}

.plan-card small {
  color: #64748b;
  font-size: 12px;
}

.plan-badge {
  padding: 3px 8px;
  border-radius: 999px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 11px;
  font-weight: 800;
}

.pay-help {
  margin: 14px 0 0;
  color: #64748b;
  font-size: 12px;
  text-align: center;
}
