:root {
  --wine: #ad1f24;
  --wine-light: #bf272c;
  --paper: #ffffff;
  --card: #ffffff;
  --text: #111111;
  --muted: #9ca0a7;
  --line: #ececec;
  --soft-gold: #fffcd8;
  --shadow: 0 2px 12px rgba(37, 23, 16, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  width: 100%;
  background: var(--paper);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

body {
  display: block;
}

#app {
  min-height: 100vh;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  width: 100%;
  min-height: 100vh;
}

.admin-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(255, 240, 204, 0.9), transparent 27%),
    linear-gradient(160deg, #f9f0ea 0%, #f6f7fb 54%, #eef1f6 100%);
  padding: 30px 24px 48px;
}

.admin-wrap {
  display: grid;
  grid-template-columns: minmax(310px, 390px) 1fr;
  gap: 20px;
  align-items: start;
}

.admin-stack,
.admin-list-stack {
  display: grid;
  gap: 20px;
}

.admin-panel,
.admin-list {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-radius: 26px;
  box-shadow: 0 18px 40px rgba(80, 42, 27, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.85);
}

.admin-panel {
  padding: 24px;
  position: sticky;
  top: 24px;
}

.wx-panel {
  position: static;
}

.admin-list {
  padding: 24px;
}

.wx-list {
  overflow: hidden;
}

.admin-kicker {
  color: var(--wine);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hot-kicker {
  color: #d45a14;
}

.admin-title {
  margin: 8px 0 10px;
  font-size: 32px;
  line-height: 1.1;
}

.sub-panel-title {
  margin: 8px 0 10px;
  font-size: 28px;
  line-height: 1.15;
}

.admin-desc {
  margin: 0 0 22px;
  color: #636870;
  line-height: 1.7;
  font-size: 14px;
}

.form-label {
  display: block;
  font-size: 14px;
  margin-bottom: 8px;
  color: #454952;
  font-weight: 600;
}

.import-input {
  width: 100%;
  min-height: 220px;
  padding: 16px;
  resize: vertical;
  border: 1px solid #ece6e2;
  border-radius: 20px;
  background: #fffdfc;
  box-shadow: inset 0 1px 4px rgba(95, 49, 30, 0.05);
}

.wx-import-input {
  min-height: 180px;
}

.text-input,
.table-note-input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid #ece6e2;
  background: #fffdfc;
  color: #1b1d21;
  outline: none;
}

.text-input:focus,
.table-note-input:focus,
.import-input:focus {
  border-color: rgba(173, 31, 36, 0.4);
  box-shadow: 0 0 0 3px rgba(173, 31, 36, 0.08);
}

.wx-check-result {
  margin-top: 6px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 14px;
}

.wx-check-result.success {
  border-color: #a9d8bb;
  background: #f1fff6;
  color: #16703b;
}

.wx-check-result.error {
  border-color: #efc5c5;
  background: #fff5f5;
  color: #a61d20;
}

.top-gap {
  margin-top: 14px;
}

.import-tip {
  margin: 10px 0 0;
  color: #7b818a;
  font-size: 12px;
  line-height: 1.7;
}

.file-import-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.file-import-input {
  flex: 1 1 220px;
  max-width: 100%;
}

.admin-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.wrap-actions {
  flex-wrap: wrap;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.ticket-button {
  appearance: none;
  border-radius: 999px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.ticket-button:hover {
  transform: translateY(-1px);
}

.primary-btn {
  background: linear-gradient(180deg, #cb3a3c 0%, #a61d20 100%);
  color: #fff;
  padding: 12px 20px;
  box-shadow: 0 10px 24px rgba(161, 30, 34, 0.2);
}

.secondary-btn {
  background: #fff;
  color: #5a6068;
  border: 1px solid #e7d8d4;
  padding: 12px 18px;
}

.danger-soft-btn {
  color: #a62328;
  border-color: #f0cfd1;
  background: #fff7f7;
}

.ghost-btn {
  background: transparent;
  color: var(--wine);
  padding: 0;
}

.search-input {
  width: min(280px, 100%);
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #e5d9d4;
  background: #fffdfc;
  color: #1b1d21;
  outline: none;
}

.search-input:focus {
  border-color: rgba(173, 31, 36, 0.45);
  box-shadow: 0 0 0 3px rgba(173, 31, 36, 0.08);
}

.sort-select {
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #e5d9d4;
  background: #fffdfc;
  color: #1b1d21;
}

.group-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #5a6068;
  font-size: 13px;
  padding: 0 4px;
}

.group-toggle input {
  width: 16px;
  height: 16px;
  accent-color: #a61d20;
}

.panel-message {
  min-height: 22px;
  margin-top: 14px;
  color: #5e636b;
  font-size: 13px;
}

.panel-message.error {
  color: #b82227;
}

.panel-message.success {
  color: #19744a;
}

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

.stacked-header {
  align-items: flex-start;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-list-title {
  margin: 0;
  font-size: 24px;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #6d737c;
  font-size: 13px;
}

.admin-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #28b66f;
}

.alt-badge::before {
  background: #d45a14;
}

.log-badge::before {
  background: #4e6fe8;
}

.compact-empty {
  min-height: 180px;
}

.debug-list {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 250, 246, 0.94)),
    radial-gradient(circle at top right, rgba(78, 111, 232, 0.12), transparent 34%);
}

.debug-log-list {
  display: grid;
  gap: 0;
  max-height: 460px;
  overflow: auto;
  padding-right: 4px;
}

.debug-log-line {
  display: grid;
  grid-template-columns: 168px 54px minmax(180px, 0.7fr) minmax(260px, 1fr);
  gap: 10px;
  align-items: start;
  padding: 9px 0;
  border-bottom: 1px solid #eee7dc;
  color: #252a2d;
  font-size: 14px;
  line-height: 1.55;
}

.debug-log-line:last-child {
  border-bottom: 0;
}

.debug-log-line.success {
  color: #075d39;
}

.debug-log-line.error {
  color: #9d2026;
}

.debug-log-type {
  font-weight: 800;
}

.debug-log-time {
  color: #6f7771;
  white-space: nowrap;
}

.debug-log-title {
  font-weight: 800;
  word-break: break-word;
}

.debug-log-detail {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: inherit;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.55;
}

.records-table-wrap {
  overflow-x: auto;
  border: 1px solid #efe4dd;
  border-radius: 20px;
}

.records-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: linear-gradient(180deg, #fffefd 0%, #fffaf7 100%);
}

.records-table th,
.records-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #f0e5df;
  text-align: left;
  vertical-align: top;
}

.records-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff7f3;
  color: #69443b;
  font-size: 13px;
}

.records-table tbody tr:hover {
  background: rgba(255, 247, 243, 0.75);
}

.table-main,
.table-ellipsis {
  color: #1b1d21;
  font-size: 13px;
  line-height: 1.6;
}

.table-code {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.table-ellipsis {
  max-width: 280px;
  word-break: break-all;
}

.table-mini-btn,
.table-action-btn {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f5e8e2;
  color: #7e2b2c;
  border: 1px solid rgba(126, 43, 44, 0.08);
}

.table-mini-btn {
  margin-top: 8px;
  font-size: 12px;
}

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

.col-check {
  width: 56px;
}

.col-index {
  width: 68px;
}

.col-actions {
  width: 220px;
}

.wx-account-grid {
  display: grid;
  gap: 14px;
}

.wx-account-card {
  border-radius: 22px;
  padding: 18px;
  background: linear-gradient(180deg, #fffefd 0%, #fff8f3 100%);
  border: 1px solid #efe4dd;
  box-shadow: 0 12px 30px rgba(94, 52, 34, 0.08);
}

.wx-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.wx-card-index {
  color: #8a9098;
  font-size: 12px;
}

.wx-card-title {
  margin: 4px 0 0;
  font-size: 20px;
  word-break: break-all;
}

.wx-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.wx-status-pill.is-online {
  background: #eaf8f0;
  color: #19744a;
}

.wx-status-pill.is-working {
  background: #fff5e8;
  color: #b45a0a;
}

.wx-status-pill.is-error {
  background: #fff1f1;
  color: #b3272d;
}

.wx-status-pill.is-idle {
  background: #eef1f6;
  color: #5f6670;
}

.wx-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin-top: 16px;
}

.wx-meta-item {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(239, 228, 221, 0.95);
}

.wx-meta-item.wide {
  grid-column: 1 / -1;
}

.wx-meta-label {
  color: #8a9098;
  font-size: 12px;
}

.wx-meta-value {
  color: #1b1d21;
  font-size: 13px;
  line-height: 1.65;
  word-break: break-all;
}

.wx-meta-value.emphasis {
  font-weight: 600;
}

.code-value {
  font-family: Consolas, "Courier New", monospace;
}

.wx-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.wx-account-name {
  min-width: 0;
}

.wx-account-name span {
  display: block;
  color: #8a9098;
  font-size: 12px;
  margin-bottom: 4px;
}

.wx-account-name strong {
  display: block;
  color: #171b20;
  font-size: 18px;
  line-height: 1.35;
  word-break: break-all;
}

.wx-check-btn {
  background: #efe8d6;
  color: #202426;
}

.wx-check-return {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #eee7dc;
}

.wx-check-title {
  margin-bottom: 12px;
  color: #202426;
  font-size: 15px;
  font-weight: 900;
}

.wx-check-value {
  min-height: 58px;
  padding: 16px 18px;
  border-radius: 8px;
  border: 1px solid #98d9b6;
  background: #f0fff5;
  color: #006236;
  font-family: Consolas, "Courier New", monospace;
  font-size: 17px;
  line-height: 1.55;
  word-break: break-all;
}

.wx-check-value.error {
  border-color: #edb8b8;
  background: #fff5f5;
  color: #9d2026;
}

.wx-check-message {
  margin-top: 18px;
  color: #006236;
  font-size: 15px;
  font-weight: 800;
}

.wx-check-message.error {
  color: #9d2026;
}

.card-grid {
  display: grid;
  gap: 10px;
}

.select-all-row,
.bundle-select-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #6d737c;
  font-size: 13px;
}

.select-all-row {
  margin-bottom: 12px;
}

.bundle-select-row {
  margin-bottom: 12px;
}

.select-all-row input,
.bundle-select-row input {
  width: 16px;
  height: 16px;
  accent-color: #a61d20;
}

.bundle-card {
  border-radius: 16px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #fffefd 0%, #fffaf7 100%);
  border: 1px solid #efe4dd;
  box-shadow: 0 6px 14px rgba(99, 50, 30, 0.05);
}

.bundle-group {
  display: grid;
  gap: 10px;
}

.bundle-group-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: #5a2a2a;
  font-size: 16px;
  font-weight: 700;
  padding: 4px 4px 0;
}

.bundle-group-title span {
  color: #8a9098;
  font-size: 12px;
  font-weight: 500;
}

.bundle-group-list {
  display: grid;
  gap: 8px;
}

.bundle-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.bundle-title {
  margin: 0;
  font-size: 18px;
}

.bundle-subtitle {
  margin: 8px 0 0;
  color: #7b818a;
  font-size: 13px;
}

.bundle-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff4f0;
  color: var(--wine);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.bundle-meta {
  display: block;
  margin: 12px 0;
}

.bundle-meta-item {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 8px 12px;
  padding: 9px 0;
  border-bottom: 1px solid #f0e5df;
  border-radius: 0;
  background: transparent;
}

.bundle-note-item {
  grid-template-columns: 84px minmax(0, 1fr);
}

.bundle-meta-item:first-child {
  padding-top: 0;
}

.bundle-meta-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.bundle-meta-label {
  color: #8a9098;
  font-size: 12px;
  margin-bottom: 0;
  padding-top: 2px;
}

.bundle-meta-value {
  color: #1b1d21;
  font-size: 13px;
  word-break: break-all;
}

.note-input {
  width: 100%;
  min-height: 64px;
  resize: vertical;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid #eadfd9;
  background: #ffffff;
  color: #1b1d21;
}

.note-save-btn {
  margin-top: 10px;
}

.bundle-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid #f0e5df;
}

.inline-btn {
  padding: 10px 14px;
  border-radius: 999px;
  background: #f3e7e1;
  color: #7e2b2c;
  font-size: 13px;
}

.danger-btn {
  background: #fff1f1;
  color: #b3272d;
}

.empty-state.admin-empty {
  min-height: 280px;
  background: linear-gradient(180deg, rgba(255, 252, 250, 0.92), rgba(253, 249, 246, 0.92));
  border: 1px dashed #ead7d0;
}

.phone-page {
  width: 100%;
  min-height: 100vh;
  background: var(--paper);
}

.phone-shell {
  width: 100%;
  min-height: 100vh;
  background: inherit;
}

.phone-page {
  font-weight: 400;
}

.app-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--wine);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.14);
}

.nav-row {
  display: flex;
  align-items: center;
  gap: 0;
  height: 68px;
  padding: 0 12px 0 10px;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
}

.nav-left {
  width: 46px;
  flex: 0 0 46px;
  justify-content: flex-start;
}

.nav-right {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 32px;
  padding: 0 10px;
  gap: 12px;
  color: #2a2020;
  background: #e9b6b8;
  border-radius: 999px;
}

.nav-right::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 22%;
  width: 1px;
  height: 56%;
  background: rgba(42, 32, 32, 0.14);
  transform: translateX(-50%);
}

.nav-title {
  flex: 1 1 auto;
  text-align: center;
  font-size: 19px;
  line-height: 1;
  font-weight: 600;
  color: #ffffff;
  margin-right: 2px;
  padding-left: 34px;
}

.nav-spacer {
  width: 32px;
  height: 32px;
}

.back-btn {
  width: 32px;
  height: 32px;
  margin-right: 10px;
  padding: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.back-icon {
  width: 30px;
  height: 30px;
}

.back-icon path {
  fill: none;
  stroke: #ffffff;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-right-btn {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  opacity: 0.95;
}

.nav-right-btn svg {
  width: 100%;
  height: 100%;
  display: block;
}

.tabs {
  position: sticky;
  top: 68px;
  z-index: 19;
  display: flex;
  background: #ffffff;
  box-shadow: 0 3px 12px rgba(111, 120, 138, 0.12);
}

.tab {
  flex: 1;
  height: 46px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #575b61;
  font-size: 20px;
  font-weight: 500;
  position: relative;
}

.tab.active {
  color: var(--wine-light);
}

.tab.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 24px;
  height: 5px;
  border-radius: 999px;
  background: var(--wine-light);
  box-shadow: 0 2px 5px rgba(195, 40, 45, 0.38);
  transform: translateX(-50%);
}

.ticket-page {
  min-height: calc(100vh - 114px);
  padding: 12px 0 28px;
  background: var(--paper);
  display: flex;
}

.ticket-list {
  padding: 0 12px;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.ticket-card {
  background: #ffffff;
  border-radius: 11px;
  margin: 10px 4px;
  padding: 18px 18px 16px;
  box-shadow: var(--shadow);
}

.ticket-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.ticket-title {
  margin: 0;
  flex: 1;
  font-size: 21px;
  line-height: 1.34;
  font-weight: 700;
}

.ticket-status {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.ticket-status.unused {
  color: var(--wine-light);
}

.ticket-status.used,
.ticket-status.expired {
  color: #111111;
}

.ticket-date {
  margin: 16px 0 16px;
  padding: 20px 0;
  font-size: 16px;
  color: #acb1b7;
  font-weight: 600;
  border-top: 1px solid #ededed;
  border-bottom: 1px solid #ededed;
}

.ticket-rule-line {
  display: none;
}

.ticket-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-top: 16px;
}

.ticket-remark {
  flex: 1;
  color: #ff2416;
  font-size: 19px;
  line-height: 1.45;
  font-weight: 400;
}

.ticket-button {
  min-width: 96px;
  height: 40px;
  padding: 0 18px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  background: var(--wine);
  box-shadow: none;
}

.ticket-button.is-disabled {
  background: #a7a7a7;
  cursor: default;
  transform: none;
}

.empty-state {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #c3c7cf;
  gap: 12px;
}

.empty-icon {
  width: 74px;
  height: 74px;
  border: 4px solid #c3c7cf;
  border-radius: 7px;
  position: relative;
}

.empty-icon::before {
  content: "";
  position: absolute;
  top: -4px;
  right: -4px;
  width: 24px;
  height: 24px;
  border-top: 4px solid #c3c7cf;
  border-right: 4px solid #c3c7cf;
  background: var(--paper);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.empty-icon::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 22px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 4px solid #c3c7cf;
  box-shadow: 17px 17px 0 -12px var(--paper), 17px 17px 0 -8px #c3c7cf;
}

.empty-text {
  font-size: 19px;
  font-weight: 600;
}

.detail-page {
  min-height: 100vh;
  background: var(--wine);
}

.detail-body {
  padding: 16px clamp(44px, 9vw, 84px) 28px;
}

.detail-card {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
}

.detail-header {
  background: linear-gradient(180deg, #fffdd8 0%, #fffbe9 100%);
  color: var(--wine-light);
  padding: 12px 18px;
  text-align: center;
  font-size: 21px;
  line-height: 1.4;
  font-weight: 600;
}

.detail-main {
  padding: 18px 18px 10px;
  text-align: center;
}

.qr-frame {
  width: 218px;
  height: 218px;
  margin: 4px auto 0;
  display: grid;
  place-items: center;
  background: #ffffff;
}

.qr-frame:empty {
  background: #ffffff;
}

.qr-canvas {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  display: block;
}

.qr-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.qr-image-error {
  min-height: 18px;
  margin-top: 8px;
  color: #b82227;
  font-size: 13px;
  line-height: 1.4;
}

.code-label {
  margin: 18px 0 4px;
  font-size: 19px;
  font-weight: 600;
  color: #111111;
}

.code-label strong {
  letter-spacing: 0.03em;
}

.refresh-text {
  color: #828894;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.detail-rule {
  border-top: 1px solid #efefef;
  padding: 14px 20px 18px;
}

.rule-title {
  color: var(--wine-light);
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 4px;
}

.rule-item {
  color: #959ba3;
  font-size: 15px;
  line-height: 1.7;
  font-weight: 500;
}

.card-verify-page {
  min-height: 100vh;
  background: #f1f2f4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 42px;
}

.card-verify-shell {
  position: relative;
  width: min(724px, 100%);
  min-height: 322px;
}

.card-entry {
  padding: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: auto;
}

.card-entry-box {
  width: 100%;
  max-width: 724px;
  background: #fff;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 8px 24px rgba(36, 20, 10, 0.08);
}

.card-entry-field {
  display: grid;
  grid-template-columns: 124px 1fr;
  align-items: start;
  gap: 48px;
  min-height: 102px;
  border-top: 1px solid #f1f1f1;
  border-bottom: 1px solid #f1f1f1;
  padding: 20px 26px;
}

.card-entry-field span {
  font-size: 20px;
  color: #555a62;
  line-height: 34px;
}

.card-input {
  border: 0;
  border-radius: 0;
  min-height: 34px;
  padding: 0;
  color: #ff001e;
  font-size: 20px;
  outline: none;
  background: transparent;
}

.card-tip {
  margin-top: 18px;
  min-height: 45px;
  padding: 12px 20px;
  background: #eef9ff;
  color: #2479ff;
  border-radius: 6px;
  font-size: 15px;
  display: flex;
  align-items: center;
}

.card-tip-icon {
  width: 19px;
  height: 19px;
  display: inline-grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  font-family: Georgia, serif;
}

.card-submit {
  width: 100%;
  margin-top: 30px;
  min-height: 66px;
  border-radius: 2px;
  background: #09c565;
  box-shadow: none;
  font-size: 22px;
  font-weight: 700;
}

.center-message {
  min-height: 100vh;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #61656d;
  background: var(--paper);
}

.error-message {
  color: #b82227;
  font-size: 17px;
  margin-top: -58px;
  margin-left: 172px;
  min-height: 30px;
}

.verify-toast {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 180px;
  height: 180px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.68);
  color: #ffffff;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  z-index: 20;
  pointer-events: none;
}

.verify-toast-mark {
  font-size: 48px;
  line-height: 1;
  font-weight: 700;
}

.verify-toast-text {
  font-size: 21px;
  font-weight: 700;
  text-align: center;
  line-height: 1.25;
}

.loading {
  min-height: 100vh;
  padding: 40px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #6b7078;
  background: var(--paper);
}

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

  .admin-panel {
    position: static;
  }

  .wx-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .admin-page {
    padding: 18px 14px 24px;
  }

  .admin-panel,
  .admin-list {
    border-radius: 20px;
    padding: 18px;
  }

  .admin-title {
    font-size: 26px;
  }

  .admin-list-header {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-toolbar {
    width: 100%;
    justify-content: stretch;
  }

  .search-input {
    width: 100%;
  }

  .sort-select {
    width: 100%;
  }

  .text-input {
    width: 100%;
  }

  .card-verify-page {
    padding: 44px 14px 0;
  }

  .card-entry-box {
    padding: 22px 18px;
  }

  .card-entry-field {
    grid-template-columns: 72px 1fr;
    gap: 14px;
    padding: 16px 10px;
  }

  .card-entry-field span,
  .card-input {
    font-size: 18px;
  }

  .error-message {
    margin-left: 96px;
    font-size: 15px;
  }

  .card-submit {
    min-height: 54px;
    font-size: 20px;
  }

  .verify-toast {
    width: 168px;
    height: 168px;
  }

  .file-import-row {
    align-items: stretch;
  }

  .admin-actions,
  .wx-card-actions,
  .row-actions {
    flex-direction: column;
  }

  .table-action-btn,
  .table-mini-btn,
  .primary-btn,
  .secondary-btn {
    width: 100%;
  }

  .records-table-wrap {
    border-radius: 16px;
  }

  .wx-account-card {
    padding: 16px;
    border-radius: 18px;
  }

  .wx-card-head {
    flex-direction: column;
  }

  .nav-row {
    height: 66px;
    padding: 0 8px 0 7px;
  }

  .nav-title {
    font-size: 19px;
    padding-left: 30px;
    margin-right: 2px;
  }

  .nav-right {
    width: 96px;
    height: 32px;
    padding: 0 10px;
    gap: 12px;
  }

  .tabs {
    top: 66px;
  }

  .ticket-title {
    font-size: 20px;
  }

  .ticket-status,
  .ticket-remark,
  .rule-item {
    font-size: 17px;
  }

  .tab {
    font-size: 19px;
  }

  .ticket-date {
    font-size: 15px;
    padding: 18px 0;
  }

  .detail-body {
    padding: 16px 36px 28px;
  }

  .detail-card {
    max-width: none;
  }

  .detail-header {
    font-size: 20px;
  }

  .code-label {
    font-size: 19px;
  }

  .refresh-text {
    font-size: 14px;
  }

  .qr-frame {
    width: 192px;
    height: 192px;
  }
}






/* New admin workspace */
.admin-page {
  --admin-bg: #111416;
  --admin-ink: #181c20;
  --admin-panel: #ffffff;
  --admin-panel-soft: #f6f5ef;
  --admin-line: #dedbd2;
  --admin-muted: #6e756f;
  --admin-red: #b8292f;
  --admin-red-dark: #8f171f;
  --admin-gold: #c99a3b;
  --admin-green: #1d8d5b;
  --admin-blue: #2f64c7;
  min-height: 100vh;
  padding: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(135deg, #15181b 0%, #222621 42%, #f4f1e8 42.2%, #f5f3ee 100%);
  background-size: 28px 28px, 28px 28px, auto;
  color: var(--admin-ink);
}

.admin-wrap {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 0;
  min-height: 100vh;
  align-items: stretch;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 22px;
  padding: 26px 18px;
  color: #f6f1e4;
  background:
    linear-gradient(180deg, rgba(184, 41, 47, 0.18), transparent 38%),
    #121618;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-brand-block {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.admin-brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f4e8c4;
  color: #8e1820;
  font-size: 24px;
  font-weight: 900;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.12);
}

.admin-sidebar .admin-kicker {
  color: #d9b361;
}

.admin-title {
  margin: 6px 0 0;
  font-size: 24px;
  line-height: 1.12;
  letter-spacing: 0;
  color: inherit;
}

.admin-user-strip {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.admin-user-strip span {
  color: rgba(246, 241, 228, 0.62);
  font-size: 12px;
}

.admin-user-strip strong {
  font-size: 15px;
  word-break: break-word;
}

.admin-side-nav {
  display: grid;
  align-content: start;
  gap: 8px;
}

.admin-side-nav button {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 6px;
  background: transparent;
  color: rgba(246, 241, 228, 0.76);
  text-align: left;
  border: 1px solid transparent;
}

.admin-side-nav button:hover {
  color: #fff8dd;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
}

.logout-btn {
  width: 100%;
  justify-content: center;
}

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

.admin-topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding: 18px 20px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 18px 50px rgba(19, 19, 17, 0.16);
}

.admin-page-title {
  margin: 6px 0 6px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.08;
  letter-spacing: 0;
  color: #161a1f;
}

.admin-page-copy {
  margin: 0;
  max-width: 760px;
  color: #657067;
  font-size: 14px;
  line-height: 1.65;
}

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

.admin-stat-card {
  min-height: 106px;
  display: grid;
  align-content: space-between;
  padding: 16px;
  border-radius: 8px;
  background: #fffcf3;
  border: 1px solid rgba(29, 34, 36, 0.12);
  box-shadow: 0 10px 28px rgba(19, 19, 17, 0.08);
}

.admin-stat-card span {
  color: #69716b;
  font-size: 13px;
}

.admin-stat-card strong {
  color: #171b20;
  font-size: 34px;
  line-height: 1;
  font-weight: 900;
}

.admin-stat-card.hot {
  background: #fff6df;
  border-color: rgba(201, 154, 59, 0.35);
}

.admin-stat-card.hot strong {
  color: #94640d;
}

.admin-stat-card.alert {
  background: #fff1f1;
  border-color: rgba(184, 41, 47, 0.25);
}

.admin-stat-card.alert strong {
  color: var(--admin-red-dark);
}

.admin-work-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.15fr) minmax(320px, 0.85fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 16px;
}

.admin-list-stack {
  display: grid;
  gap: 14px;
}

.admin-panel,
.admin-list {
  border-radius: 8px;
  background: var(--admin-panel);
  border: 1px solid var(--admin-line);
  box-shadow: 0 14px 34px rgba(22, 24, 24, 0.10);
  backdrop-filter: none;
}

.admin-panel {
  position: static;
  top: auto;
  padding: 18px;
}

.admin-list {
  padding: 18px;
}

.admin-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.admin-kicker {
  color: var(--admin-red);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hot-kicker {
  color: #b46912;
}

.sub-panel-title,
.admin-list-title {
  margin: 0;
  color: #171b20;
  letter-spacing: 0;
}

.sub-panel-title {
  margin-top: 5px;
  font-size: 22px;
  line-height: 1.16;
}

.admin-list-title {
  font-size: 22px;
  line-height: 1.2;
}

.panel-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f8e8e7;
  color: #9d2026;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.panel-chip.orange {
  background: #fff1db;
  color: #9b5a0d;
}

.admin-desc {
  margin: 0 0 16px;
  color: #666f69;
  line-height: 1.65;
  font-size: 13px;
}

.form-label {
  color: #32383a;
  font-size: 13px;
  font-weight: 800;
}

.import-input,
.text-input,
.table-note-input,
.search-input,
.sort-select {
  border-radius: 6px;
  border: 1px solid #d8d5ca;
  background: #fffefa;
  color: #171b20;
  outline: none;
  box-shadow: none;
}

.import-input {
  min-height: 204px;
  padding: 12px;
}

.wx-import-input {
  min-height: 120px;
}

.text-input,
.table-note-input {
  min-height: 42px;
  padding: 0 12px;
}

.import-input:focus,
.text-input:focus,
.table-note-input:focus,
.search-input:focus,
.sort-select:focus {
  border-color: rgba(184, 41, 47, 0.72);
  box-shadow: 0 0 0 3px rgba(184, 41, 47, 0.11);
}

.import-tip {
  color: #7c817b;
}

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

.primary-btn,
.secondary-btn,
.ghost-btn,
.ticket-button {
  min-height: 40px;
  border-radius: 6px;
  font-weight: 800;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.ticket-button:hover {
  transform: translateY(-1px);
}

.primary-btn {
  padding: 0 16px;
  background: #b8292f;
  color: #fff;
  box-shadow: 0 10px 20px rgba(184, 41, 47, 0.18);
}

.primary-btn:hover {
  background: #9d2026;
}

.secondary-btn {
  padding: 0 14px;
  background: #f8f5ea;
  color: #343a38;
  border: 1px solid #d8d2c1;
}

.secondary-btn:hover {
  background: #eee8d8;
}

.danger-soft-btn {
  color: #9d2026;
  border-color: #e2babc;
  background: #fff2f2;
}

.ghost-btn {
  padding: 0 14px;
  color: #fcf2d0;
  background: #171b20;
  border: 1px solid #171b20;
}

.admin-topbar .ghost-btn {
  flex: 0 0 auto;
}

.panel-message {
  min-height: 22px;
  color: #5f6762;
  font-size: 13px;
  line-height: 1.5;
}

.panel-message.error {
  color: #a91f26;
}

.panel-message.success {
  color: #137047;
}

.yyb-fallback-config {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #ddd7c7;
}

.yyb-config-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.yyb-config-head h4 {
  margin: 3px 0 0;
  color: #202521;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: 0;
}

.yyb-config-status {
  flex: 0 0 auto;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid #d0c9b7;
  border-radius: 4px;
  background: #f8f5ea;
  color: #6b716c;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0;
}

.yyb-config-status.is-ready {
  border-color: #a9cebb;
  background: #edf8f1;
  color: #137047;
}

.yyb-config-status.is-missing {
  border-color: #e0c596;
  background: #fff8e7;
  color: #8b5b12;
}

.yyb-config-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 12px;
}

.yyb-config-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.yyb-config-actions {
  margin-top: 12px;
}

.code-source-switches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 9px 11px;
  border: 1px solid #ded8c9;
  border-radius: 6px;
  background: #fbfaf5;
  cursor: pointer;
}

.switch-row > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.switch-row strong {
  color: #292f2d;
  font-size: 13px;
}

.switch-row small {
  color: #7c817b;
  font-size: 11px;
}

.switch-row input {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 22px;
  margin: 0;
  appearance: none;
  border: 1px solid #bcb6a8;
  border-radius: 999px;
  background: #d9d5cb;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease;
}

.switch-row input::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 24, 22, 0.2);
  content: "";
  transition: transform 0.14s ease;
}

.switch-row input:checked {
  border-color: #168255;
  background: #1d8d5b;
}

.switch-row input:checked::after {
  transform: translateX(18px);
}

.cooldown-note {
  margin-top: 9px;
  color: #81867f;
  font-size: 11px;
  line-height: 1.5;
}

.cooldown-note .link-btn {
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 11px;
  color: #f0b35c;
  background: rgba(240, 179, 92, 0.12);
  border: 1px solid rgba(240, 179, 92, 0.35);
  border-radius: 6px;
  cursor: pointer;
  vertical-align: baseline;
}

.cooldown-note .link-btn:hover {
  background: rgba(240, 179, 92, 0.22);
}

.latest-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: #171b20;
  color: #f7efd9;
  border-color: #171b20;
}

.latest-strip .admin-kicker,
.latest-strip .admin-list-title {
  color: inherit;
}

.latest-content {
  display: grid;
  justify-items: end;
  gap: 6px;
  min-width: 0;
}

.latest-content strong {
  font-family: Consolas, "Courier New", monospace;
  color: #f2c35f;
  font-size: 19px;
  word-break: break-word;
  text-align: right;
}

.latest-content span {
  color: rgba(247, 239, 217, 0.74);
  font-size: 12px;
  word-break: break-word;
  text-align: right;
}

.admin-list-header {
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.admin-toolbar {
  gap: 8px;
  max-width: 980px;
}

.search-input {
  width: min(260px, 100%);
  height: 40px;
  padding: 0 12px;
}

.sort-select {
  height: 40px;
  padding: 0 12px;
}

.admin-badge {
  margin-top: 5px;
  color: #68716b;
}

.records-table-wrap {
  border: 1px solid #dad6c9;
  border-radius: 8px;
  background: #fffefa;
}

.records-table {
  min-width: 1260px;
  background: #fffefa;
}

.records-table th,
.records-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #e7e2d4;
}

.records-table thead th {
  background: #eee8d8;
  color: #333832;
  font-size: 12px;
  text-transform: none;
}

.records-table tbody tr:hover {
  background: #fff8e7;
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.table-page-summary {
  color: #6f766f;
  font-size: 12px;
  line-height: 32px;
}

.page-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 9px;
  border: 1px solid #d8d2c1;
  border-radius: 5px;
  background: #f8f5ea;
  color: #343a38;
  font-size: 12px;
  font-weight: 800;
}

.page-btn:hover:not(:disabled),
.page-btn.is-current {
  border-color: #b8292f;
  background: #b8292f;
  color: #fff;
}

.page-btn:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.log-placeholder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 76px;
  padding: 14px;
  border: 1px dashed #d8d2c1;
  border-radius: 6px;
  background: #fbfaf5;
}

.log-placeholder > div {
  display: grid;
  gap: 4px;
}

.log-placeholder strong {
  color: #303633;
  font-size: 13px;
}

.log-placeholder span {
  color: #7c817b;
  font-size: 12px;
}

.table-code {
  color: #9b2027;
}

.table-prize-title {
  min-width: 190px;
  max-width: 280px;
  color: #332c23;
  font-weight: 800;
  line-height: 1.45;
  word-break: break-word;
}

.table-subtle {
  margin-top: 4px;
  color: #7b817a;
  font-size: 12px;
  line-height: 1.45;
  word-break: break-word;
}

.expire-date {
  font-weight: 900;
}

.card-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid #d8d0bb;
  background: #efe8d6;
  color: #413b30;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.card-status-pill.is-unused {
  border-color: #b7d9c5;
  background: #ecfff3;
  color: #087143;
}

.card-status-pill.is-used {
  border-color: #e2d2ad;
  background: #fff8e5;
  color: #8a5b0b;
}

.card-status-pill.is-expired {
  border-color: #e6b8bc;
  background: #fff1f1;
  color: #a82027;
}

.table-mini-btn,
.table-action-btn,
.inline-btn {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  background: #efe8d6;
  color: #413b30;
  border: 1px solid #d8d0bb;
  font-weight: 700;
}

.danger-btn {
  background: #fff1f1;
  color: #a82027;
  border-color: #e3b9bc;
}

.copy-feedback {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid #d8d0bb;
  background: #f7f1e3;
  color: #6b6253;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.copy-feedback.success {
  border-color: #b7d9c5;
  background: #ecfff3;
  color: #087143;
}

.copy-feedback.error {
  border-color: #e6b8bc;
  background: #fff1f1;
  color: #a82027;
}

.copy-feedback.working {
  border-color: #e2d2ad;
  background: #fff8e5;
  color: #8a5b0b;
}

.wx-account-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.wx-account-card,
.bundle-card,
.debug-log-card {
  border-radius: 8px;
  background: #fffefa;
  border: 1px solid #ded9ca;
  box-shadow: none;
}

.wx-account-card {
  padding: 14px;
}

.wx-card-head .wx-card-actions {
  flex: 0 0 auto;
  margin-top: 0;
}

.wx-card-title {
  font-size: 17px;
  line-height: 1.35;
}

.wx-status-pill {
  border-radius: 6px;
  min-height: 30px;
  padding: 0 10px;
}

.wx-meta-item {
  border-radius: 6px;
  background: #f6f2e8;
  border-color: #e2dccd;
}

.debug-list {
  background: #ffffff;
}

.debug-log-list {
  max-height: 380px;
}

.debug-log-card {
  border-left-width: 4px;
  padding: 12px;
}

.debug-log-type {
  border-radius: 6px;
}

.empty-state.admin-empty {
  min-height: 210px;
  border-radius: 8px;
  background: #faf7ee;
  border: 1px dashed #d6cebb;
}

.admin-login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 480px);
  gap: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    #121618;
  background-size: 30px 30px, 30px 30px, auto;
  color: #f7efd9;
}

.login-hero {
  min-height: 100vh;
  display: grid;
  align-content: center;
  gap: 18px;
  padding: clamp(32px, 7vw, 90px);
  background:
    linear-gradient(135deg, rgba(184, 41, 47, 0.28), transparent 42%),
    linear-gradient(180deg, rgba(201, 154, 59, 0.12), transparent);
}

.login-brand {
  width: max-content;
  padding: 8px 12px;
  border-radius: 6px;
  background: #f4e8c4;
  color: #8e1820;
  font-weight: 900;
}

.login-title {
  margin: 0;
  max-width: 720px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: 0;
}

.login-copy {
  max-width: 610px;
  margin: 0;
  color: rgba(247, 239, 217, 0.76);
  font-size: 17px;
  line-height: 1.75;
}

.login-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 180px));
  gap: 10px;
  margin-top: 12px;
}

.login-stat {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.login-stat span {
  color: rgba(247, 239, 217, 0.62);
  font-size: 12px;
}

.login-stat strong {
  font-size: 20px;
}

.login-card {
  align-self: center;
  margin: 28px;
  padding: 24px;
  border-radius: 8px;
  background: #fffefa;
  color: #171b20;
  border: 1px solid rgba(255, 255, 255, 0.76);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.login-card-head {
  margin-bottom: 20px;
}

.login-card h2 {
  margin: 6px 0 0;
  font-size: 28px;
  line-height: 1.12;
}

.login-input {
  width: 100%;
}

.login-submit {
  width: 100%;
  margin-top: 18px;
}

.login-footnote {
  margin: 10px 0 0;
  color: #747b75;
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 1100px) {
  .admin-wrap {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 14px;
  }

  .admin-side-nav {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .logout-btn {
    width: auto;
  }

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

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

@media (max-width: 760px) {
  .code-source-switches {
    grid-template-columns: 1fr;
  }

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

  .page-btns {
    justify-content: flex-start;
  }

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

  .yyb-config-grid {
    grid-template-columns: 1fr;
  }

  .yyb-config-head {
    align-items: center;
  }

  .admin-main {
    padding: 14px;
  }

  .admin-topbar,
  .latest-strip,
  .admin-list-header {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-topbar .ghost-btn,
  .latest-content,
  .latest-content strong,
  .latest-content span {
    width: 100%;
    justify-items: start;
    text-align: left;
  }

  .admin-sidebar {
    grid-template-columns: 1fr;
    padding: 18px 14px;
  }

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

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

  .admin-toolbar,
  .admin-actions,
  .wx-card-actions,
  .row-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .search-input,
  .sort-select,
  .table-action-btn,
  .table-mini-btn,
  .primary-btn,
  .secondary-btn,
  .ghost-btn {
    width: 100%;
  }

  .admin-login-page {
    grid-template-columns: 1fr;
  }

  .login-hero {
    min-height: auto;
    padding: 34px 20px;
  }

  .login-card {
    margin: 0 14px 24px;
  }

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



















.ip-ban-list .ip-ban-form {
  display: grid;
  grid-template-columns: minmax(170px, 1.1fr) 100px minmax(150px, 1.4fr) auto auto;
  gap: 10px;
  align-items: center;
  margin: 0 0 12px;
}

.ip-ban-list .ip-whitelist-form {
  grid-template-columns: minmax(170px, 1.1fr) minmax(150px, 1.4fr) auto;
  margin-bottom: 14px;
}

.ip-ban-permanent {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  white-space: nowrap;
  color: inherit;
}

.ip-whitelist-block {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.permanent-badge {
  background: rgba(255, 77, 79, 0.18);
  color: #ff6b6b;
}

.ip-ban-list .ip-ban-form .primary-btn {
  height: 42px;
  white-space: nowrap;
}

.ip-ban-ip-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.02em;
}

.auto-badge {
  background: rgba(255, 138, 61, 0.16);
  color: #ff8a3d;
}

@media (max-width: 720px) {
  .ip-ban-list .ip-ban-form {
    grid-template-columns: 1fr 1fr;
  }
  .ip-ban-list .ip-ban-form #ipBanReasonInput,
  .ip-ban-list .ip-ban-form .primary-btn {
    grid-column: 1 / -1;
  }
}

.fw-badge {
  margin-top: 6px;
}

.fw-on {
  background: rgba(82, 196, 26, 0.16);
  color: #78d13a;
}

.fw-off {
  background: rgba(255, 169, 64, 0.16);
  color: #ffb457;
}