/* Linear-inspired · refined premium dark */
:root {
  --primary: #5e6ad2;
  --primary-hover: #828fff;
  --primary-focus: #5e69d1;
  --primary-soft: rgba(94, 106, 210, 0.12);
  --primary-glow: rgba(94, 106, 210, 0.35);
  --ink: #f7f8f8;
  --ink-muted: #d0d6e0;
  --ink-subtle: #8a8f98;
  --ink-tertiary: #62666d;
  --canvas: #010102;
  --canvas-mid: #08090e;
  --surface-1: rgba(15, 16, 17, 0.82);
  --surface-2: rgba(20, 21, 22, 0.88);
  --surface-3: rgba(24, 25, 26, 0.92);
  --hairline: rgba(255, 255, 255, 0.06);
  --hairline-strong: rgba(255, 255, 255, 0.1);
  --success: #27a644;
  --warning: #c9a227;
  --danger: #e5484d;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 9999px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-sm: 0 8px 32px rgba(0, 0, 0, 0.32);
  --shadow-md: 0 16px 48px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 64px rgba(94, 106, 210, 0.1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font);
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100vh;
  position: relative;
  isolation: isolate;
}

/* depth: tint + grid + vignette */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(ellipse 52% 44% at 10% 0%, rgba(94, 106, 210, 0.16), transparent 58%),
    radial-gradient(ellipse 40% 36% at 92% 8%, rgba(130, 143, 255, 0.08), transparent 52%),
    radial-gradient(ellipse 55% 48% at 50% 100%, rgba(94, 106, 210, 0.1), transparent 58%),
    linear-gradient(180deg, #0a0b10 0%, var(--canvas) 45%, #010102 100%);
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(ellipse 88% 78% at 50% 32%, #000 12%, transparent 74%);
  -webkit-mask-image: radial-gradient(ellipse 88% 78% at 50% 32%, #000 12%, transparent 74%);
  pointer-events: none;
}

html::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  opacity: 0.038;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.78' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

html::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 100% 80% at 50% 50%, transparent 40%, rgba(0, 0, 0, 0.45) 100%);
  pointer-events: none;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--primary-hover); }

/* glass panel base */
.surface {
  position: relative;
  background: linear-gradient(168deg, rgba(18, 19, 24, 0.9) 0%, rgba(12, 13, 17, 0.86) 100%);
  border: 1px solid var(--hairline);
  box-shadow:
    var(--shadow-sm),
    var(--shadow-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
}

.surface::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.02) 40%,
    rgba(94, 106, 210, 0.14) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(1, 1, 2, 0.65);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--hairline);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink-muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-chip {
  font-size: 13px;
  color: var(--ink-subtle);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--hairline);
}

.env-cleanup-topbtn {
  position: relative;
  gap: 6px;
}

.env-cleanup-label {
  font-weight: 600;
  transition: color 0.2s var(--ease);
}

.env-cleanup-label.is-need {
  color: #e8c65a;
}

.env-cleanup-label.is-ok {
  color: #6dd58a;
}

.env-cleanup-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 4px;
  border-radius: var(--radius-pill);
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.env-cleanup-badge.hidden {
  display: none;
}

.machine-env-cleanup-table-wrap {
  max-height: min(60vh, 520px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.machine-env-cleanup-table {
  min-width: 860px;
  width: 100%;
}

.machine-env-cleanup-table th:last-child,
.machine-env-cleanup-table td.machine-env-cleanup-actions {
  white-space: nowrap;
  width: 1%;
}

.env-cleanup-countdown {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.env-cleanup-countdown.is-overdue {
  color: var(--danger);
}

.env-cleanup-countdown.is-due-soon {
  color: var(--warning);
}

.env-cleanup-countdown.is-ok {
  color: var(--success);
}

.env-cleanup-countdown.is-never {
  color: var(--ink-subtle);
}

tr.env-cleanup-row-overdue td:first-child {
  border-left: 3px solid var(--danger);
}

tr.env-cleanup-row-due-soon td:first-child {
  border-left: 3px solid var(--warning);
}

.user-env-cleanup-btn {
  gap: 6px;
}

.user-env-cleanup-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  margin-left: 2px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--hairline);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}

.user-env-cleanup-chip.is-overdue,
.user-env-cleanup-chip.is-never {
  background: rgba(229, 72, 77, 0.16);
  border-color: rgba(229, 72, 77, 0.35);
  color: #ff8a8e;
}

.user-env-cleanup-chip.is-due-soon {
  background: rgba(201, 162, 39, 0.14);
  border-color: rgba(201, 162, 39, 0.35);
  color: #e8c65a;
}

.user-env-cleanup-chip.is-ok {
  color: #6dd58a;
}

.user-env-cleanup-card {
  padding: 16px 18px;
  margin-bottom: 4px;
  display: grid;
  gap: 12px;
}

.user-env-cleanup-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: center;
  gap: 20px;
  font-size: 14px;
}

.user-env-cleanup-row strong,
.user-env-cleanup-row span:not(.user-env-cleanup-label) {
  text-align: right;
  white-space: nowrap;
}

.user-env-cleanup-label {
  color: var(--ink-subtle);
  font-size: 13px;
  white-space: nowrap;
}

.container {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 40px 28px 72px;
}

.page-title {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin-bottom: 10px;
  color: var(--ink);
}

.page-desc {
  font-size: 15px;
  color: var(--ink-subtle);
  letter-spacing: -0.01em;
  margin-bottom: 36px;
  max-width: 540px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.history-date-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 22px 16px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--hairline);
}

.user-submitter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 22px 16px;
  padding: 0 4px;
}

.user-submitter-tabs .tab {
  flex-shrink: 0;
}

.settlement-date-bar {
  flex-wrap: wrap;
  align-items: center;
}

.settlement-payment-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.settlement-payment-btn {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.settlement-payment-btn-wechat {
  color: #4ecf6e;
  border: 1px solid rgba(7, 193, 96, 0.45);
  background: rgba(7, 193, 96, 0.12);
}

.settlement-payment-btn-wechat:hover,
.settlement-payment-btn-wechat.active {
  background: rgba(7, 193, 96, 0.22);
  border-color: rgba(7, 193, 96, 0.65);
  box-shadow: 0 0 12px rgba(7, 193, 96, 0.15);
}

.settlement-payment-btn-alipay {
  color: #6eb6ff;
  border: 1px solid rgba(22, 119, 255, 0.45);
  background: rgba(22, 119, 255, 0.12);
}

.settlement-payment-btn-alipay:hover,
.settlement-payment-btn-alipay.active {
  background: rgba(22, 119, 255, 0.22);
  border-color: rgba(22, 119, 255, 0.65);
  box-shadow: 0 0 12px rgba(22, 119, 255, 0.15);
}

.settlement-payment-total {
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.settlement-payment-total-wechat {
  color: #4ecf6e;
}

.settlement-payment-total-alipay {
  color: #6eb6ff;
}

.history-settlement-tabs {
  margin-left: auto;
  flex-shrink: 0;
}

.history-date-bar-export {
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.history-date-bar-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.history-export-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex: 1 1 280px;
  min-width: 0;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  background: rgba(94, 106, 210, 0.07);
  border: 1px solid rgba(94, 106, 210, 0.16);
}

.history-export-stats-scope {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary-hover);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: rgba(94, 106, 210, 0.12);
  border: 1px solid rgba(94, 106, 210, 0.2);
  white-space: nowrap;
  flex-shrink: 0;
}

.history-export-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-muted);
  white-space: nowrap;
}

.history-export-stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-subtle);
}

.history-export-stat strong {
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.history-export-stat-settled {
  color: #4ecf6e;
}

.history-export-stat-unsettled {
  color: #dbb94a;
}

.history-export-stat-after-sales {
  color: #9eb6ff;
}

tr.export-history-row-stale td {
  background: rgba(220, 38, 38, 0.28) !important;
  color: #ffe0e0 !important;
  border-bottom-color: rgba(220, 38, 38, 0.22) !important;
}

tr.export-history-row-stale code {
  color: #fff1f1 !important;
}

tr.export-history-row-stale .btn {
  border-color: rgba(255, 160, 160, 0.45);
  color: #ffe8e8;
}

tr.user-completed-problem-row td {
  background: rgba(220, 38, 38, 0.28) !important;
  color: #ffe0e0 !important;
  border-bottom-color: rgba(220, 38, 38, 0.22) !important;
}

tr.user-completed-problem-row code {
  color: #fff1f1 !important;
}

tr.user-completed-problem-row .badge {
  border-color: rgba(255, 160, 160, 0.45);
  color: #ffe8e8;
}

.user-after-sales-reason-cell {
  font-weight: 600;
  white-space: nowrap;
}

.history-account-search-table {
  min-width: 1320px;
  table-layout: auto;
}

.history-account-search-table th,
.history-account-search-table td {
  white-space: nowrap;
  word-break: keep-all;
}

.history-account-search-table th {
  text-transform: none;
  letter-spacing: normal;
  font-size: 12px;
}

.export-history-after-sales-cell {
  min-width: 168px;
}

.export-history-stale-label {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: rgba(120, 16, 24, 0.45);
  border: 1px solid rgba(255, 170, 170, 0.35);
  color: #fff5f5;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  writing-mode: horizontal-tb;
  word-break: keep-all;
  vertical-align: middle;
}

.shift-filter-bar {
  flex-wrap: wrap;
}

.shift-filter-label {
  font-size: 13px;
  color: var(--ink-subtle);
  flex-shrink: 0;
}

.shift-machine-select {
  min-width: 200px;
  max-width: 280px;
}


.history-date-label {
  font-size: 14px;
  color: var(--ink-muted);
}

.history-date-label::before {
  content: '当前：';
  color: var(--ink-faint);
}

.history-date-modal {
  width: min(360px, calc(100vw - 32px));
}

.history-calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.history-calendar-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.history-cal-nav {
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.history-calendar-weekdays,
.history-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.history-calendar-weekdays {
  margin-bottom: 8px;
}

.history-calendar-weekdays span {
  text-align: center;
  font-size: 12px;
  color: var(--ink-faint);
  padding: 4px 0;
}

.history-cal-day {
  aspect-ratio: 1;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-muted);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.history-cal-day:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

.history-cal-day.is-today {
  box-shadow: inset 0 0 0 1px var(--primary);
}

.history-cal-day.is-selected {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.history-cal-day.is-selected.is-today {
  box-shadow: none;
}

.history-cal-day:disabled {
  cursor: default;
  opacity: 0;
}

.shift-bar {
  margin-bottom: 24px;
  padding: 32px 24px;
}

.shift-bar-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  max-width: 480px;
  margin: 0 auto;
}

.shift-bar-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.shift-status-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.shift-status-label.is-on {
  color: var(--success);
}

.shift-timer {
  font-family: var(--mono);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--primary-hover);
}

.shift-bar-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  width: 100%;
}

.shift-clock-btn {
  min-width: 220px;
  padding: 18px 56px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-lg);
}

.shift-clock-btn.btn-primary {
  box-shadow: 0 12px 40px var(--primary-glow), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.shift-clock-btn.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 16px 48px var(--primary-glow), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.shift-clock-btn.btn-danger {
  min-width: 220px;
  box-shadow: 0 8px 28px rgba(229, 72, 77, 0.25);
}

.stat-card {
  position: relative;
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(160deg, rgba(20, 21, 26, 0.92) 0%, rgba(13, 14, 18, 0.88) 100%);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(94, 106, 210, 0.5), transparent);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, var(--primary-soft), transparent 70%);
  pointer-events: none;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(94, 106, 210, 0.22);
  box-shadow: var(--shadow-md), 0 0 48px rgba(94, 106, 210, 0.07);
}

.stat-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-subtle);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.stat-value {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--ink);
}

.stat-value.accent { color: var(--primary-hover); }
.stat-value.success { color: var(--success); }
.stat-value.warning { color: var(--warning); }

.panel {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(17, 18, 23, 0.94) 0%, rgba(10, 11, 14, 0.9) 100%);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.015);
}

.table-wrap {
  overflow-x: auto;
  width: 100%;
}

.export-batch-detail-modal {
  padding: 0;
  display: flex;
  flex-direction: column;
  max-height: min(92vh, 900px);
  overflow: hidden;
}

.export-batch-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px 0;
}

.export-batch-detail-header h2 {
  margin: 0 0 4px;
}

.export-batch-detail-subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--ink-subtle);
}

.export-batch-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
  margin: 18px 28px 0;
  padding: 0;
  border-radius: var(--radius-md);
  background: rgba(94, 106, 210, 0.07);
  border: 1px solid rgba(94, 106, 210, 0.16);
  overflow: hidden;
}

.export-batch-detail-meta-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  flex: 1 1 180px;
  min-width: 0;
  padding: 14px 18px;
  border-right: 1px solid rgba(94, 106, 210, 0.14);
}

.export-batch-detail-meta-item:last-child {
  border-right: none;
}

.export-batch-detail-meta-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-subtle);
}

.export-batch-detail-meta-value {
  font-size: 14px;
  color: var(--ink);
  word-break: break-word;
  line-height: 1.4;
}

.export-batch-detail-batch-code {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--primary-hover);
  background: rgba(94, 106, 210, 0.12);
  border: 1px solid rgba(94, 106, 210, 0.22);
  white-space: nowrap;
}

.export-batch-detail-meta-strong {
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--primary-hover);
  line-height: 1.1;
}

.export-batch-detail-body {
  padding: 16px 28px 0;
  flex: 1 1 auto;
  min-height: 0;
}

.export-batch-detail-scroll {
  max-height: min(62vh, 560px);
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
}

.export-batch-detail-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: auto;
}

.export-batch-detail-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 12px 14px;
  white-space: nowrap;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-subtle);
  background: rgba(14, 15, 20, 0.98);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.export-batch-detail-table tbody td {
  padding: 11px 14px;
  vertical-align: middle;
  white-space: nowrap;
  border-bottom: 1px solid var(--hairline);
}

.export-batch-detail-table tbody tr:last-child td {
  border-bottom: none;
}

.export-batch-detail-table tbody tr:hover td {
  background: rgba(94, 106, 210, 0.06);
}

.export-batch-detail-table td code {
  display: inline-block;
  white-space: nowrap;
  vertical-align: bottom;
}

.export-batch-detail-table .cell-time {
  font-size: 12px;
  color: var(--ink-muted);
  white-space: nowrap;
}

.export-batch-detail-actions {
  padding: 18px 28px 24px;
  margin-top: 0;
  border-top: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.02);
}

.table-actions-inline {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  white-space: nowrap;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 14px;
}

.panel-title {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink-muted);
}

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

.account-list-toolbar {
  flex-wrap: nowrap;
  gap: 10px;
}

.account-search-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.account-search-input {
  width: 140px;
  min-width: 0;
  padding: 6px 10px;
  font-size: 13px;
}

.account-list-toolbar .tabs {
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  letter-spacing: -0.01em;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  white-space: nowrap;
}

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

.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, #6d78db 0%, var(--primary) 50%, #525dc4 100%);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 4px 16px var(--primary-glow);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, var(--primary-hover) 0%, #6d78db 50%, var(--primary) 100%);
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.15) inset,
    0 8px 24px rgba(94, 106, 210, 0.4);
}

.btn-secondary {
  color: var(--ink-muted);
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--hairline);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.btn-secondary:hover:not(:disabled) {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--hairline-strong);
}

.btn-ghost {
  color: var(--ink-subtle);
  background: transparent;
}
.btn-ghost:hover:not(:disabled) {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}

.btn-danger {
  color: var(--danger);
  background: rgba(229, 72, 77, 0.06);
  border-color: rgba(229, 72, 77, 0.2);
}
.btn-danger:hover:not(:disabled) { background: rgba(229, 72, 77, 0.12); }

.tabs {
  display: inline-flex;
  background: rgba(1, 1, 2, 0.6);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.tab {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-subtle);
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.25s var(--ease);
}

.tab:hover:not(.active) {
  color: var(--ink-muted);
  background: rgba(255, 255, 255, 0.05);
}

.tab.active {
  color: #fff;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(94, 106, 210, 0.72) 0%, rgba(130, 143, 255, 0.42) 100%);
  border-color: rgba(158, 168, 255, 0.32);
  box-shadow:
    0 2px 14px rgba(94, 106, 210, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

th, td {
  text-align: left;
  padding: 13px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

th {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(0, 0, 0, 0.2);
}

tbody tr { transition: background 0.2s var(--ease); }
tbody tr:hover td { background: rgba(94, 106, 210, 0.035); }
tr:last-child td { border-bottom: none; }

td code {
  font-family: var(--mono);
  font-size: 12px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--hairline);
  color: var(--ink-subtle);
}

.user-account-table {
  min-width: 800px;
}

.user-account-table .cell-time,
td.cell-time {
  font-size: 13px;
  color: var(--ink-subtle);
  white-space: nowrap;
}

.user-account-table .table-input-cell {
  padding: 8px 10px;
  min-width: 88px;
}

.user-account-table .table-actions-cell {
  padding: 8px 12px;
  white-space: nowrap;
}

.form-input-table {
  width: 100%;
  min-width: 72px;
  max-width: 140px;
  padding: 6px 10px;
  font-size: 13px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
}

.badge-available {
  background: rgba(94, 106, 210, 0.14);
  color: var(--primary-hover);
  box-shadow: 0 0 16px rgba(94, 106, 210, 0.08);
}
.badge-assigned {
  background: rgba(201, 162, 39, 0.12);
  color: #dbb94a;
}
.badge-completed {
  background: rgba(39, 166, 68, 0.12);
  color: #4ecf6e;
}

.badge-unsettled {
  background: rgba(229, 72, 77, 0.14);
  color: #ff6b6b;
}

.badge-settlement-wechat {
  background: rgba(7, 193, 96, 0.14);
  color: #4ecf6e;
}

.badge-settlement-alipay {
  background: rgba(22, 119, 255, 0.14);
  color: #6eb6ff;
}

.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-subtle);
  margin-bottom: 7px;
  letter-spacing: -0.01em;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 13px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  outline: none;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.18);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.form-input::placeholder, .form-textarea::placeholder { color: var(--ink-tertiary); }

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: rgba(94, 106, 210, 0.5);
  box-shadow:
    inset 0 1px 4px rgba(0, 0, 0, 0.2),
    0 0 0 3px rgba(94, 106, 210, 0.16),
    0 0 28px rgba(94, 106, 210, 0.06);
}

.form-textarea {
  min-height: 124px;
  resize: vertical;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
}

.import-hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-subtle);
  letter-spacing: -0.01em;
}

.import-hint.has-count { color: var(--ink-muted); }
.import-hint.has-valid { color: var(--primary-hover); }
.import-hint.has-error { color: #ff9498; }

.payout-hint {
  font-size: 13px;
  color: var(--ink-subtle);
  margin-bottom: 14px;
}
.payout-hint.has-valid { color: var(--primary-hover); }

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.empty-state {
  text-align: center;
  padding: 52px 24px;
  color: var(--ink-subtle);
}

.empty-state-icon {
  font-size: 32px;
  margin-bottom: 12px;
  opacity: 0.4;
}

/* login */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  width: 560px;
  height: 560px;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 106, 210, 0.2) 0%, transparent 68%);
  filter: blur(44px);
  pointer-events: none;
  animation: glow-drift 14s ease-in-out infinite alternate;
}

.login-page::after {
  content: '';
  position: absolute;
  width: 380px;
  height: 380px;
  bottom: -120px;
  right: -60px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(130, 143, 255, 0.1) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  animation: glow-drift-alt 18s ease-in-out infinite alternate;
}

@keyframes glow-drift {
  from { transform: translateX(-50%) translateY(0); opacity: 0.85; }
  to { transform: translateX(calc(-50% + 20px)) translateY(16px); opacity: 1; }
}

@keyframes glow-drift-alt {
  from { transform: translate(0, 0); }
  to { transform: translate(-30px, -16px); }
}

.login-card {
  width: min(400px, 100%);
  position: relative;
  z-index: 1;
  padding: 44px 36px 40px;
  border-radius: var(--radius-xl);
  background: linear-gradient(168deg, rgba(16, 17, 22, 0.88) 0%, rgba(8, 9, 12, 0.84) 100%);
  border: 1px solid var(--hairline-strong);
  box-shadow:
    var(--shadow-md),
    var(--shadow-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
}

.login-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, rgba(255,255,255,0.12), rgba(255,255,255,0.02) 45%, rgba(94,106,210,0.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.login-card h1 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.04em;
  margin-bottom: 28px;
  color: var(--ink);
}

.error-msg {
  background: rgba(229, 72, 77, 0.08);
  border: 1px solid rgba(229, 72, 77, 0.22);
  color: #ff9498;
  padding: 10px 13px;
  border-radius: var(--radius-md);
  font-size: 13px;
  margin-bottom: 16px;
}

.success-msg {
  background: rgba(39, 166, 68, 0.08);
  border: 1px solid rgba(39, 166, 68, 0.22);
  color: #6dd87f;
  padding: 10px 13px;
  border-radius: var(--radius-md);
  font-size: 13px;
  margin-bottom: 16px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(1, 1, 2, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 200;
}

.modal {
  width: min(520px, 100%);
  padding: 28px;
  border-radius: var(--radius-xl);
  background: linear-gradient(168deg, rgba(18, 19, 24, 0.96) 0%, rgba(10, 11, 14, 0.94) 100%);
  border: 1px solid var(--hairline-strong);
  box-shadow: var(--shadow-md), var(--shadow-glow);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-wide {
  width: min(560px, 100%);
}

.modal.machine-env-cleanup-modal {
  width: min(980px, calc(100vw - 32px));
}

.modal.user-env-cleanup-modal {
  width: min(980px, calc(100vw - 32px));
}

/* 导出明细弹窗：必须写在 .modal 之后，否则会被 520px 默认宽度覆盖 */
.modal.export-batch-detail-modal {
  width: calc(100vw - 32px);
  max-width: calc(100vw - 32px);
  padding: 0;
  overflow: hidden;
}

#exportBatchDetailModal.modal-overlay {
  padding: 16px;
}

.user-pick-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.user-pick-list {
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
}

.user-pick-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--hairline);
  transition: background 0.15s;
}

.user-pick-item:last-child {
  border-bottom: none;
}

.user-pick-item:hover {
  background: rgba(94, 106, 210, 0.06);
}

.modal h2 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  color: var(--ink);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
}

.modal-overlay.dialog-layer {
  z-index: 400;
}

.dialog-box {
  width: min(440px, 100%);
  text-align: center;
  padding: 32px 28px 28px;
}

.dialog-box h2 {
  margin-bottom: 12px;
  font-size: 17px;
}

.dialog-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  border-radius: var(--radius-lg);
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 600;
  border: 1px solid var(--hairline);
}

.dialog-icon-info {
  background: rgba(94, 106, 210, 0.12);
  color: var(--primary-hover);
  border-color: rgba(94, 106, 210, 0.22);
}

.dialog-icon-success {
  background: rgba(39, 166, 68, 0.12);
  color: #4ecf6e;
  border-color: rgba(39, 166, 68, 0.22);
}

.dialog-icon-error {
  background: rgba(229, 72, 77, 0.1);
  color: #ff9498;
  border-color: rgba(229, 72, 77, 0.22);
}

.dialog-icon-confirm {
  background: rgba(201, 162, 39, 0.1);
  color: #dbb94a;
  border-color: rgba(201, 162, 39, 0.22);
}

.dialog-box-plain h2 {
  margin-bottom: 20px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.dialog-message.dialog-message-rich {
  text-align: left;
  white-space: normal;
}

.dialog-box-compact {
  width: min(100%, 380px);
  padding: 22px 22px 18px;
}

.dialog-box-compact h2 {
  margin-bottom: 14px;
  font-size: 16px;
  text-align: center;
}

.dialog-box-compact .dialog-message-rich {
  margin-bottom: 0;
}

.dialog-box-compact .modal-actions {
  margin-top: 18px;
  gap: 10px;
}

.settle-dialog-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settle-dialog-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: rgba(94, 106, 210, 0.08);
  border: 1px solid rgba(94, 106, 210, 0.16);
  font-size: 12px;
  color: var(--ink-muted);
}

.settle-dialog-count strong {
  color: var(--ink);
  font-weight: 600;
}

.settle-dialog-batch {
  font-size: 11px;
  color: var(--primary-hover);
  background: rgba(0, 0, 0, 0.18);
  padding: 2px 6px;
  border-radius: 6px;
}

.settle-dialog-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.settle-dialog-fields-single {
  grid-template-columns: 1fr;
}

.settle-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.settle-field-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-subtle);
}

.settle-field-input {
  padding: 8px 10px;
  font-size: 13px;
}

.settle-dialog-hint {
  padding: 8px 10px;
  border-radius: var(--radius-md);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-muted);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--hairline);
}

.settle-dialog-hint-warn {
  font-size: 13px;
  font-weight: 600;
  color: #ff6b6b;
  background: rgba(229, 72, 77, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.45);
  box-shadow: 0 0 16px rgba(229, 72, 77, 0.12);
}

.settle-dialog-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(39, 166, 68, 0.08);
  border: 1px solid rgba(39, 166, 68, 0.2);
}

.settle-dialog-total-edit {
  margin-bottom: 0;
  cursor: default;
}

.settle-field-payment {
  gap: 4px;
}

.settle-field-payment > .settle-field-label {
  line-height: 1.2;
}

.settle-payment-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}

.payment-method-option {
  position: relative;
  display: block;
  min-width: 0;
  cursor: pointer;
}

.payment-method-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.settle-field-remark {
  margin-top: 4px;
}

.settle-remark-input {
  min-height: 72px;
  resize: vertical;
  font-size: 13px;
}

.settle-amount-input {
  width: 140px;
  max-width: 55%;
  padding: 8px 10px;
  text-align: right;
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #4ecf6e;
  background: rgba(0, 0, 0, 0.18);
  border-color: rgba(39, 166, 68, 0.35);
}

.payment-method-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px 6px;
  min-height: 36px;
  box-sizing: border-box;
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}

.payment-method-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.payment-method-wechat .payment-method-icon,
.payment-method-wechat {
  color: #2fd07d;
}

.payment-method-alipay .payment-method-icon,
.payment-method-alipay {
  color: #4aa8ff;
}

.payment-method-option input:checked + .payment-method-card.payment-method-wechat {
  border-color: rgba(7, 193, 96, 0.5);
  background: rgba(7, 193, 96, 0.1);
  color: #4ecf6e;
}

.payment-method-option input:checked + .payment-method-card.payment-method-alipay {
  border-color: rgba(22, 119, 255, 0.5);
  background: rgba(22, 119, 255, 0.1);
  color: #6eb6ff;
}

.payment-method-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.payment-method-badge.payment-method-wechat {
  color: #4ecf6e;
  background: rgba(7, 193, 96, 0.14);
  border: 1px solid rgba(7, 193, 96, 0.28);
}

.payment-method-badge.payment-method-alipay {
  color: #6eb6ff;
  background: rgba(22, 119, 255, 0.14);
  border: 1px solid rgba(22, 119, 255, 0.28);
}

.cell-remark-col {
  max-width: 200px;
}

.cell-remark {
  display: inline-block;
  max-width: 200px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.settle-total-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-subtle);
}

.settle-total-value {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #4ecf6e;
  letter-spacing: -0.02em;
}

.shift-end-summary {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--hairline);
}

.shift-end-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.shift-end-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  flex-shrink: 0;
}

.shift-end-value {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.shift-end-value-time {
  font-family: var(--mono);
  font-size: 24px;
  letter-spacing: 0.04em;
  color: var(--primary-hover);
}

.dialog-message {
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-muted);
  text-align: center;
  word-break: break-word;
  white-space: pre-line;
}

.dialog-detail {
  margin-top: 14px;
  padding: 12px 14px;
  max-height: 200px;
  overflow: auto;
  text-align: left;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-subtle);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  white-space: pre-wrap;
  word-break: break-word;
}

.dialog-detail-emphasis {
  text-align: center;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.7;
  color: #ff6b6b;
  background: rgba(229, 72, 77, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.45);
  box-shadow: 0 0 20px rgba(229, 72, 77, 0.15);
}

.dialog-box .modal-actions {
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.dialog-after-sales-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}

.dialog-after-sales-toggle input[type='checkbox'] {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.dialog-after-sales-toggle.is-active,
.dialog-after-sales-toggle:has(input:checked) {
  border-color: rgba(94, 106, 210, 0.45);
  background: rgba(94, 106, 210, 0.12);
  color: var(--ink);
}

.after-sales-reason-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.after-sales-reason-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
  color: var(--ink-muted);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}

.after-sales-reason-option input[type='radio'] {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.after-sales-reason-option:has(input:checked) {
  border-color: rgba(94, 106, 210, 0.45);
  background: rgba(94, 106, 210, 0.12);
  color: var(--ink);
}

#afterSalesReasonOther {
  margin-top: 10px;
}

#appDialog.modal-overlay {
  z-index: 400;
}

.account-card {
  position: relative;
  padding: 16px 18px;
  margin-bottom: 12px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(18, 19, 24, 0.9) 0%, rgba(12, 13, 17, 0.86) 100%);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.account-card:hover {
  border-color: rgba(94, 106, 210, 0.18);
  box-shadow: var(--shadow-sm), 0 0 36px rgba(94, 106, 210, 0.05);
}

.account-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.account-card-header strong {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.account-fields-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin: 0 0 12px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--ink-muted);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  line-height: 1.4;
}

.account-fields-inline code {
  font-family: var(--mono);
  color: var(--ink);
  font-size: 13px;
}

.account-inline-sep {
  color: var(--ink-subtle);
  opacity: 0.45;
  user-select: none;
}

.account-info-line {
  word-break: break-all;
}

.account-meta-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin: 0;
  padding: 0;
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.4;
}

.account-meta-inline .meta-label {
  margin-right: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-subtle);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.account-fields {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--hairline);
  margin-bottom: 16px;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.15);
}

.field-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 13px;
  transition: background 0.2s;
}

.field-row:hover { background: rgba(255, 255, 255, 0.015); }
.field-row:last-child { border-bottom: none; }

.field-label {
  flex: 0 0 84px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-subtle);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field-value {
  font-family: var(--mono);
  color: var(--ink-muted);
  word-break: break-all;
  font-size: 13px;
}

.loadout-publish-input {
  width: 100%;
  min-height: 160px;
  resize: vertical;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
}

.loadout-panel {
  margin-bottom: 24px;
}

.loadout-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 22px 22px;
}

.loadout-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--hairline);
}

.loadout-card-main {
  flex: 1;
  min-width: 0;
}

.loadout-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.loadout-card-mode {
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--primary-hover);
  background: rgba(94, 106, 210, 0.12);
  border: 1px solid rgba(94, 106, 210, 0.22);
}

.loadout-card-code {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-muted);
  word-break: break-all;
  white-space: pre-wrap;
}

.loadout-card-actions {
  display: flex;
  flex-shrink: 0;
  flex-direction: column;
  gap: 8px;
}

.admin-loadout-list .admin-loadout-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
}

.admin-loadout-list .loadout-card-title {
  margin-bottom: 0;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.admin-loadout-list .loadout-card-code {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.admin-loadout-list .loadout-card-actions {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.loadout-head {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin: 0 22px 10px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-subtle);
  letter-spacing: 0.04em;
}

.admin-loadout-head span:last-child {
  text-align: right;
}

.user-loadout-head span:last-child {
  text-align: right;
}

.user-loadout-head {
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
}

.loadout-list .user-loadout-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
}

.loadout-list .user-loadout-row .loadout-card-title,
.loadout-list .user-loadout-row .loadout-card-code {
  margin-bottom: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.loadout-list .user-loadout-row .loadout-card-code {
  word-break: normal;
}

.loadout-list .user-loadout-row .btn.is-copied {
  background: linear-gradient(180deg, #31b57e 0%, #23a06b 100%);
  border-color: rgba(49, 181, 126, 0.6);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 6px 18px rgba(35, 160, 107, 0.35);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.app-clock {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-muted);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--hairline);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--ink-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(39, 166, 68, 0.06);
  border: 1px solid rgba(39, 166, 68, 0.14);
}

.live-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px rgba(39, 166, 68, 0.5);
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.hidden { display: none !important; }

.batch-hint {
  font-size: 13px;
  color: var(--primary-hover);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(94, 106, 210, 0.1);
  border: 1px solid rgba(94, 106, 210, 0.18);
}

.col-check { width: 44px; text-align: center; }
.col-check.hidden, #checkAllTh.hidden { display: none; }

.row-check {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

tr.row-selected td { background: rgba(94, 106, 210, 0.06) !important; }

.admin-nav {
  margin-bottom: 28px;
  padding: 5px;
  gap: 4px;
  background: linear-gradient(180deg, rgba(18, 19, 28, 0.96) 0%, rgba(8, 9, 14, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 10px 36px rgba(0, 0, 0, 0.28);
}

.admin-nav .tab {
  padding: 11px 22px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: 0.01em;
}

.admin-nav .tab:hover:not(.active) {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
}

.admin-nav .tab.active {
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, #4f5cc4 0%, #636ee0 45%, #828fff 100%);
  border-color: rgba(190, 198, 255, 0.65);
  box-shadow:
    0 4px 22px rgba(94, 106, 210, 0.62),
    0 0 0 1px rgba(130, 143, 255, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  text-shadow: 0 1px 2px rgba(20, 24, 60, 0.35);
}

.view-section.hidden { display: none; }

.panel-desc {
  padding: 0 22px 16px;
  font-size: 13px;
  color: var(--ink-subtle);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.money { color: var(--primary-hover); font-variant-numeric: tabular-nums; }

.badge-disabled {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-subtle);
  border: 1px solid var(--hairline);
}

.badge-enabled {
  background: rgba(39, 166, 68, 0.12);
  color: #4ecf6e;
}

.badge-reusable-unused {
  background: rgba(220, 38, 38, 0.18);
  color: #ff6b6b;
  border: 1px solid rgba(220, 38, 38, 0.35);
}

.badge-reusable-used {
  background: rgba(39, 166, 68, 0.14);
  color: #4ecf6e;
  border: 1px solid rgba(39, 166, 68, 0.35);
}

.after-sales-used-badge {
  display: inline-flex;
  margin-left: 8px;
  vertical-align: middle;
}

.after-sales-date-bar {
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.after-sales-expand-btn {
  margin-left: 4px;
}

.after-sales-export-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-left: auto;
}

.after-sales-export-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.03);
}

.after-sales-export-stat-label {
  color: var(--ink-subtle);
  white-space: nowrap;
}

.after-sales-export-stat strong {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.after-sales-stat-yesterday strong {
  color: #6eb6ff;
}

.after-sales-stat-today strong {
  color: #4ecf6e;
}

.after-sales-staff-expand {
  margin: 0 22px 16px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(201, 162, 39, 0.35);
  background: rgba(201, 162, 39, 0.08);
}

.after-sales-staff-expand-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #dbb94a;
  margin-bottom: 12px;
}

.after-sales-staff-total {
  font-size: 14px;
  font-weight: 700;
  color: #ffe08a;
  font-variant-numeric: tabular-nums;
}

.after-sales-staff-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.after-sales-staff-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--hairline);
  font-size: 13px;
}

.after-sales-staff-chip strong {
  color: #dbb94a;
  font-variant-numeric: tabular-nums;
}

/* 用户端 · 加宽布局，避免顶栏/表格被裁切 */
.user-page .container {
  width: min(1440px, 100%);
  padding: 36px 32px 72px;
}

.user-page .page-desc {
  max-width: none;
}

.user-page .topbar {
  height: auto;
  min-height: 56px;
  padding: 10px 28px;
  flex-wrap: wrap;
  gap: 10px;
}

.user-page .topbar-actions {
  flex: 1;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.user-page .user-env-cleanup-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.user-page .panel-header .toolbar {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: flex-end;
}

.user-page .panel-header .tabs {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.user-page .table-wrap {
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 900px) {
  .user-page .app-clock {
    display: none;
  }
}

@media (max-width: 768px) {
  .container { padding: 28px 18px 60px; }
  .page-title { font-size: 26px; }
  .topbar { padding: 0 18px; }
  .login-card { padding: 36px 26px; }
  th, td { padding: 11px 14px; font-size: 13px; }

  .user-page .container {
    padding: 24px 14px calc(56px + env(safe-area-inset-bottom, 0px));
  }

  .user-page .topbar {
    padding: 10px 14px;
  }

  .user-page .topbar-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .user-page .user-chip {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .user-page .panel-header .tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    scrollbar-width: none;
  }

  .user-page .panel-header .tabs::-webkit-scrollbar {
    display: none;
  }

  .user-page .panel-header .tabs .tab {
    flex-shrink: 0;
  }

  .modal.machine-env-cleanup-modal,
  .modal.user-env-cleanup-modal {
    width: calc(100vw - 20px);
    padding: 20px 14px;
  }
}

/* 管理后台 · 手机端适配 */
@media (max-width: 768px) {
  .admin-page .container {
    padding: 20px 14px calc(48px + env(safe-area-inset-bottom, 0px));
  }

  .admin-page .page-title {
    font-size: 22px;
    margin-bottom: 6px;
  }

  .admin-page .page-desc {
    font-size: 13px;
    margin-bottom: 20px;
    max-width: none;
  }

  .admin-page .topbar {
    height: auto;
    min-height: 52px;
    padding: 10px 14px;
    gap: 8px;
    flex-wrap: wrap;
  }

  .admin-page .topbar-actions {
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 100%;
  }

  .admin-page .app-clock {
    display: none;
  }

  .admin-page .live-dot {
    font-size: 11px;
    padding: 3px 8px;
  }

  .admin-page .user-chip {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    padding: 4px 10px;
  }

  .admin-page .admin-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: 100%;
    margin-bottom: 20px;
    padding-bottom: 4px;
    border-radius: var(--radius-lg);
  }

  .admin-page .admin-nav::-webkit-scrollbar {
    display: none;
  }

  .admin-page .admin-nav .tab {
    flex-shrink: 0;
    padding: 10px 16px;
    font-size: 14px;
  }

  .admin-page .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
  }

  .admin-page .stat-card {
    padding: 12px 14px;
  }

  .admin-page .stat-label {
    font-size: 11px;
  }

  .admin-page .stat-value {
    font-size: 22px;
  }

  .admin-page .panel {
    border-radius: var(--radius-lg);
  }

  .admin-page .panel-header {
    flex-direction: column;
    align-items: stretch;
    padding: 14px 16px;
    gap: 10px;
  }

  .admin-page .panel-header .panel-title {
    width: 100%;
  }

  .admin-page .toolbar {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .admin-page .toolbar .form-input,
  .admin-page .toolbar .form-select,
  .admin-page .toolbar .btn {
    width: 100%;
    min-width: 0;
  }

  .admin-page .toolbar .tabs {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  .admin-page .toolbar .tabs .tab {
    flex-shrink: 0;
  }

  .admin-page .account-list-toolbar {
    flex-wrap: wrap;
  }

  .admin-page .account-search-inline {
    width: 100%;
  }

  .admin-page .account-search-input {
    flex: 1 1 auto;
    width: auto;
  }

  .admin-page .page-desc[style*="margin:0 22px"] {
    margin-left: 16px !important;
    margin-right: 16px !important;
  }

  .admin-page .history-date-bar {
    margin: 0 16px 14px;
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .admin-page .history-date-bar .btn {
    width: 100%;
  }

  .admin-page .history-date-bar-main {
    width: 100%;
  }

  .admin-page .history-date-bar-main .btn {
    width: auto;
    flex: 1 1 auto;
  }

  .admin-page .history-export-stats {
    flex: 1 1 100%;
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 12px;
    padding: 8px 12px;
  }

  .admin-page .history-settlement-tabs {
    margin-left: 0;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
  }

  .admin-page .settlement-payment-filters {
    margin-left: 0;
    width: 100%;
    flex-wrap: wrap;
  }

  .admin-page .history-settlement-tabs .tab {
    flex-shrink: 0;
  }

  .admin-page .shift-machine-select {
    min-width: 0;
    max-width: none;
    width: 100%;
  }

  .admin-page .table-wrap {
    -webkit-overflow-scrolling: touch;
  }

  .admin-page table {
    min-width: 640px;
  }

  .admin-page .btn-sm {
    padding: 7px 12px;
    font-size: 12px;
  }

  .admin-page .batch-hint {
    width: 100%;
    text-align: center;
  }

  .admin-page .admin-loadout-head {
    display: none;
  }

  .admin-page .admin-loadout-list .admin-loadout-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px 16px;
  }

  .admin-page .admin-loadout-list .loadout-card-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .admin-page .modal-overlay {
    padding: 12px;
    align-items: flex-end;
  }

  .admin-page .modal,
  .admin-page .modal-wide {
    width: 100%;
    max-height: 92vh;
    padding: 20px 18px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  .admin-page .modal.export-batch-detail-modal {
    width: 100%;
    max-width: 100%;
    padding: 0;
  }

  .admin-page .export-batch-detail-modal {
    padding: 0;
  }

  .admin-page .export-batch-detail-header,
  .admin-page .export-batch-detail-meta,
  .admin-page .export-batch-detail-body,
  .admin-page .export-batch-detail-actions {
    padding-left: 18px;
    padding-right: 18px;
  }

  .admin-page .export-batch-detail-header {
    padding-top: 20px;
  }

  .admin-page .export-batch-detail-meta {
    flex-direction: column;
  }

  .admin-page .export-batch-detail-meta-item {
    border-right: none;
    border-bottom: 1px solid rgba(94, 106, 210, 0.14);
  }

  .admin-page .export-batch-detail-meta-item:last-child {
    border-bottom: none;
  }

  .admin-page .export-batch-detail-scroll {
    overflow-x: auto;
  }

  .admin-page .export-batch-detail-table {
    min-width: 960px;
  }

  .admin-page #exportBatchDetailModal.modal-overlay {
    padding: 12px;
    align-items: flex-end;
  }

  .admin-page .export-batch-detail-actions {
    padding-bottom: 20px;
  }

  .admin-page #appDialog.modal-overlay {
    align-items: center;
    padding: 16px;
  }

  .admin-page .dialog-box-compact {
    width: 100%;
    max-width: none;
  }

  .admin-page .settle-dialog-fields {
    grid-template-columns: 1fr;
  }

  .admin-page .settle-payment-methods {
    width: 100%;
    max-width: none;
  }

  .admin-page .settle-dialog-total {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .admin-page .settle-amount-input {
    width: 100%;
    max-width: none;
    text-align: left;
  }

  .admin-page .dialog-box .modal-actions {
    flex-wrap: wrap;
    gap: 8px;
  }

  .admin-page .dialog-box .modal-actions .btn {
    flex: 1 1 auto;
    min-width: calc(50% - 4px);
  }

  .admin-page .dialog-after-sales-toggle {
    flex: 1 1 100%;
    justify-content: center;
  }

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

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

  .admin-page .user-pick-list {
    max-height: 40vh;
  }
}

@media (max-width: 480px) {
  .admin-page .live-dot {
    display: none;
  }

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

  .admin-page .stat-value {
    font-size: 20px;
  }

  .admin-page table {
    min-width: 580px;
  }

  .admin-page th,
  .admin-page td {
    padding: 10px 12px;
    font-size: 12px;
  }
}

.leaderboard-hint {
  margin: 0 22px 12px;
  font-size: 13px;
}

.leaderboard-table .col-rank {
  width: 88px;
  text-align: center;
}

.leaderboard-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-muted);
}

.leaderboard-rank.rank-1 {
  min-width: 44px;
  height: 44px;
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(255, 210, 77, 0.45), rgba(201, 162, 39, 0.22));
  color: #ffe89a;
  box-shadow: 0 0 28px rgba(255, 196, 58, 0.35);
  border: 1px solid rgba(255, 214, 102, 0.45);
}

.leaderboard-rank.rank-2 {
  min-width: 40px;
  height: 40px;
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(220, 228, 240, 0.35), rgba(160, 170, 185, 0.18));
  color: #f3f6fb;
  box-shadow: 0 0 20px rgba(192, 200, 215, 0.22);
  border: 1px solid rgba(210, 218, 230, 0.35);
}

.leaderboard-rank.rank-3 {
  min-width: 38px;
  height: 38px;
  font-size: 17px;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(232, 156, 104, 0.38), rgba(180, 98, 52, 0.2));
  color: #ffd0b0;
  box-shadow: 0 0 18px rgba(205, 127, 50, 0.24);
  border: 1px solid rgba(232, 156, 104, 0.38);
}

.leaderboard-row-top1 td {
  font-size: 16px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.leaderboard-row-top2 td {
  font-size: 15px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.leaderboard-row-top3 td {
  font-size: 15px;
  padding-top: 13px;
  padding-bottom: 13px;
}

.leaderboard-row-top1 {
  background: linear-gradient(90deg, rgba(255, 196, 58, 0.1) 0%, rgba(255, 196, 58, 0.02) 55%, transparent 100%);
}

.leaderboard-row-top2 {
  background: linear-gradient(90deg, rgba(192, 200, 215, 0.09) 0%, rgba(192, 200, 215, 0.02) 55%, transparent 100%);
}

.leaderboard-row-top3 {
  background: linear-gradient(90deg, rgba(205, 127, 50, 0.1) 0%, rgba(205, 127, 50, 0.02) 55%, transparent 100%);
}

.leaderboard-row-top1 td:nth-child(2) {
  color: #ffe89a;
  font-size: 18px;
  font-weight: 700;
}

.leaderboard-row-top2 td:nth-child(2) {
  color: #e8edf5;
  font-size: 17px;
  font-weight: 600;
}

.leaderboard-row-top3 td:nth-child(2) {
  color: #ffc9a3;
  font-size: 17px;
  font-weight: 600;
}

.leaderboard-row-top1 .leaderboard-count {
  font-size: 28px;
  font-weight: 700;
  color: #ffd666;
  text-shadow: 0 0 20px rgba(255, 196, 58, 0.35);
}

.leaderboard-row-top2 .leaderboard-count {
  font-size: 24px;
  font-weight: 700;
  color: #dce4f0;
  text-shadow: 0 0 16px rgba(192, 200, 215, 0.28);
}

.leaderboard-row-top3 .leaderboard-count {
  font-size: 22px;
  font-weight: 700;
  color: #ffb07a;
  text-shadow: 0 0 14px rgba(205, 127, 50, 0.28);
}

.leaderboard-count {
  color: var(--primary-hover);
  font-variant-numeric: tabular-nums;
}

.settings-form {
  padding: 0 22px 22px;
}

.settings-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.settings-hint {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-subtle);
  line-height: 1.5;
}

.settings-hint code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-muted);
}

.settings-current {
  margin-top: 12px;
  font-size: 14px;
  color: var(--ink-muted);
}

.after-sales-review-panel {
  margin-bottom: 16px;
}

.after-sales-review-credentials {
  margin: 0 0 10px;
  font-size: 14px;
}

.after-sales-review-credentials code {
  font-size: 14px;
  color: var(--ink);
}

.after-sales-review-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
}

.after-sales-review-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
}

.after-sales-review-meta-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-subtle);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.after-sales-review-meta-value {
  font-size: 13px;
  color: var(--ink);
  word-break: break-word;
}

.after-sales-review-meta-value code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-muted);
}

.after-sales-review-reason-group {
  margin-bottom: 0;
}

.after-sales-review-reason {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hairline);
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.after-sales-review-reason--highlight {
  border-color: rgba(255, 176, 122, 0.35);
  background: rgba(255, 176, 122, 0.08);
  color: var(--ink);
  font-weight: 500;
}

.after-sales-review-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 18px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
