:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #1a1a2e;
  --muted: #6b7280;
  --primary: #e53e3e;
  --primary-dark: #c53030;
  --primary-light: #fff5f5;
  --accent: #2b6cb0;
  --accent-light: #ebf8ff;
  --success: #38a169;
  --success-light: #f0fff4;
  --warning: #d69e2e;
  --border: #e2e8f0;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
}

.lookup-page {
  padding: 40px 0 64px;
}

.lookup-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  gap: 28px;
  align-items: stretch;
}

.lookup-guide-card {
  padding: 34px;
  border-radius: 22px;
  background: linear-gradient(135deg, #fff5f5 0%, #ebf8ff 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.lookup-kicker {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(229, 62, 62, 0.1);
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.lookup-guide-card h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
}

.lookup-guide-card p {
  max-width: 640px;
  color: var(--muted);
}

.lookup-steps {
  display: grid;
  gap: 12px;
  margin: 28px 0;
}

.lookup-steps div {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.lookup-steps strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
}

.lookup-safe-note {
  margin-bottom: 0;
}

.lookup-card,
.lookup-result,
.paid-order-notice,
.admin-detail-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.lookup-card {
  padding: 30px;
}

.lookup-card h2 {
  margin: 0 0 18px;
  font-size: 22px;
}

.lookup-form label {
  display: block;
  margin: 18px 0 8px;
  font-weight: 700;
  color: #1a202c;
}

.lookup-captcha-row {
  display: flex;
  gap: 14px;
  align-items: stretch;
}

.lookup-form > input,
.lookup-captcha-row input {
  width: 100%;
  flex: 1;
  min-width: 0;
  border: 1px solid #cbd5e0;
  border-radius: 10px;
  padding: 13px 14px;
  font-size: 1rem;
}

.lookup-clear-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.lookup-clear-button {
  width: auto;
}

.lookup-captcha-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  padding: 0 16px;
  border-radius: 10px;
  background: repeating-linear-gradient(135deg, #edf2f7, #edf2f7 8px, #e2e8f0 8px, #e2e8f0 16px);
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #2d3748;
}

.lookup-submit-button {
  margin-top: 22px;
}

.lookup-alert {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff5f5;
  color: #c53030;
  border: 1px solid #fed7d7;
}

.lookup-result {
  margin-top: 28px;
  padding: 28px;
}

.lookup-success-note {
  padding: 18px;
  border-radius: 14px;
  background: #f0fff4;
  border: 1px solid #c6f6d5;
}

.lookup-order-no-large,
.paid-order-no-block strong {
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 900;
  word-break: break-all;
  color: #22543d;
}

.lookup-result-grid,
.admin-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.lookup-result-grid div {
  padding: 14px;
  border-radius: 12px;
  background: #f7fafc;
}

.lookup-result-grid span {
  display: block;
  color: #718096;
  font-size: 0.9rem;
}

.lookup-delivery-card {
  margin-top: 18px;
}

.paid-order-notice {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 18px;
  align-items: center;
  padding: 22px;
  margin-bottom: 22px;
  background: linear-gradient(135deg, #f0fff4, #ebf8ff);
}

.paid-order-no-block span {
  display: block;
  color: #4a5568;
  font-size: 0.9rem;
}

.admin-detail-card {
  padding: 20px;
  margin-bottom: 18px;
}

.admin-empty-cell {
  text-align: center;
  color: #718096;
  padding: 28px;
}

@media (max-width: 720px) {
  .lookup-layout,
  .lookup-captcha-row,
  .paid-order-notice {
    display: block;
  }

  .lookup-guide-card,
  .lookup-card {
    padding: 22px;
  }

  .lookup-captcha-row input,
  .paid-order-notice .button {
    margin-top: 12px;
    width: 100%;
  }

  .lookup-clear-row {
    justify-content: stretch;
  }

  .lookup-clear-button {
    width: 100%;
  }

  .lookup-captcha-code {
    width: 100%;
    min-height: 46px;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

.container { width: min(1200px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 22px;
  color: var(--primary);
}

.brand-logo {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-logo-svg {
  width: 38px;
  height: 38px;
  display: block;
  filter: drop-shadow(0 6px 10px rgba(229, 62, 62, 0.18));
}

.header-search {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  max-width: 420px;
  min-width: 260px;
  margin: 0 24px;
}

.header-search-input {
  width: 100%;
  min-width: 0;
  height: 38px;
  border: 1px solid var(--border);
  border-right: 0;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  padding: 0 12px;
  font-size: 14px;
  outline: none;
}

.header-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.08);
}

.header-search-button {
  height: 38px;
  min-width: 72px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0 16px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
}

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

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
}

.nav a:hover { color: var(--primary); }

.nav-btn {
  padding: 7px 18px;
  background: var(--primary);
  color: #fff !important;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.nav-btn:hover { background: var(--primary-dark) !important; }

.nav-user {
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
}

.hero {
  padding: 80px 0;
  background: linear-gradient(135deg, #1a1a2e 0%, #2d1b4e 50%, #1a1a2e 100%);
  color: #fff;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 48px;
  align-items: center;
}

.eyebrow {
  color: #fc8181;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.15;
  margin: 12px 0;
  font-weight: 800;
}

.hero-copy {
  color: rgba(255, 255, 255, 0.75);
  font-size: 18px;
  line-height: 1.8;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  padding: 13px 28px;
  font-weight: 700;
  font-size: 15px;
  border: 1px solid transparent;
  transition: all 0.2s;
  cursor: pointer;
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.button.primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(229, 62, 62, 0.3);
}

.button.primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 16px rgba(229, 62, 62, 0.4);
  transform: translateY(-1px);
}

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

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

.button.secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
}

.button.secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.market-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(8px);
}

.market-card-badge {
  display: inline-flex;
  background: rgba(229, 62, 62, 0.2);
  color: #fc8181;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.market-card h2 {
  margin: 20px 0 14px;
  font-size: 20px;
  color: #fff;
}

.market-card li {
  margin: 12px 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  padding-left: 4px;
}

.home-categories {
  padding: 40px 0 20px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.home-categories h2 {
  font-size: 20px;
  margin: 0 0 16px;
}

.home-cat-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-cat-item {
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  transition: all 0.2s;
}

.home-cat-item:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.home-section {
  padding: 48px 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.section-header h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  position: relative;
  padding-left: 16px;
}

.section-header h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  background: var(--primary);
  border-radius: 2px;
}

.section-more {
  font-size: 14px;
  color: var(--accent);
  font-weight: 500;
}

.section-more:hover { text-decoration: underline; }

.home-features {
  padding: 60px 0;
  background: #fff;
  border-top: 1px solid var(--border);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.feature-item {
  text-align: center;
  padding: 24px 16px;
}

.feature-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.feature-item h3 {
  font-size: 18px;
  margin: 0 0 8px;
  font-weight: 700;
}

.feature-item p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.empty-msg {
  text-align: center;
  color: var(--muted);
  padding: 40px 0;
  font-size: 15px;
}

.site-footer {
  background: #1a1a2e;
  color: rgba(255, 255, 255, 0.7);
  padding: 48px 0 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
}

.footer-col h4 {
  color: #fff;
  margin: 0 0 12px;
  font-size: 16px;
}

.footer-col p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

.footer-col a {
  display: block;
  font-size: 14px;
  margin: 6px 0;
  color: rgba(255, 255, 255, 0.6);
}

.footer-col a:hover { color: #fff; }

.footerbot {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 0;
  text-align: center;
  font-size: 13px;
}

.error-panel {
  margin: 64px auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 600px;
  text-align: center;
}

@media (max-width: 760px) {
  .header-inner { height: auto; padding: 14px 0; align-items: flex-start; gap: 10px; flex-direction: column; }
  .nav { gap: 16px; flex-wrap: wrap; }
  .hero { padding: 48px 0; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .button { width: 100%; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .admin-order-search,
  .admin-order-search-group,
  .admin-order-search-button {
    width: 100%;
  }

  .admin-order-search-input {
    flex: 1;
    width: 100%;
  }
}

.auth-panel {
  max-width: 480px;
  margin: 64px auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow);
}

.auth-panel h1 {
  font-size: 28px;
  margin: 0 0 24px;
  text-align: center;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.full-width { width: 100%; }

.auth-switch {
  text-align: center;
  color: var(--muted);
  margin-top: 16px;
  font-size: 14px;
}

.auth-switch a {
  color: var(--primary);
  font-weight: 600;
}

.admin-panel { margin: 32px auto; }

.admin-body {
  background: #f0f2f5;
}

.admin-topbar {
  background: #1a1a2e;
  color: #fff;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.admin-topbar-inner {
  max-width: 100%;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-topbar-brand {
  font-weight: 700;
  font-size: 16px;
  color: #fff;
}

.admin-topbar-logout {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
}

.admin-topbar-logout:hover { color: #fff; }

.admin-wrapper {
  display: flex;
  min-height: calc(100vh - 56px);
}

.admin-sidebar {
  width: 200px;
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 16px 0;
  flex-shrink: 0;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
}

.admin-sidebar-item {
  display: block;
  padding: 10px 24px;
  font-size: 14px;
  color: var(--text);
  border-left: 3px solid transparent;
  transition: all 0.15s;
}

.admin-sidebar-item:hover {
  background: var(--bg);
  color: var(--primary);
}

.admin-sidebar-item.active {
  color: var(--primary);
  border-left-color: var(--primary);
  background: var(--primary-light);
  font-weight: 600;
}

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

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

.admin-page-header h1 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.admin-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-resource-search {
  display: inline-flex;
  align-items: stretch;
  flex-direction: row;
  flex-wrap: nowrap;
  flex: 0 0 auto;
  gap: 0;
  margin-right: 4px;
}

.admin-resource-search-group {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 0;
}

.admin-resource-search-box {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.admin-resource-search-input {
  width: 320px;
  min-height: 49px;
  padding: 13px 40px 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  line-height: 1;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.admin-resource-search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.admin-resource-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  text-decoration: none;
}

.admin-resource-search-clear:hover {
  color: var(--primary);
  text-decoration: none;
}

.admin-resource-search-button {
  border-left: 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding-left: 18px;
  padding-right: 18px;
  white-space: nowrap;
  width: auto;
  flex-shrink: 0;
}

.admin-orders-card {
  padding: 22px;
}

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

.admin-order-search {
  display: inline-flex;
  align-items: stretch;
  flex: 0 1 520px;
  max-width: 100%;
  margin: 0;
}

.admin-order-search-group {
  display: flex;
  align-items: stretch;
  width: 100%;
  gap: 0;
}

.admin-order-search-input {
  width: 360px;
  max-width: 100%;
  min-height: 49px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  line-height: 1;
}

.admin-order-search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.admin-order-search-button {
  min-height: 49px;
  border-left: 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding-left: 20px;
  padding-right: 20px;
  white-space: nowrap;
  width: auto;
  flex-shrink: 0;
}

.admin-table-scroll {
  overflow-x: auto;
}

.admin-order-pagination {
  margin-top: 18px;
}

.admin-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.admin-card h2 {
  font-size: 16px;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.xgj-export-settings-card,
.xgj-export-list-card,
.xgj-export-hidden-card,
.xgj-exported-resources {
  margin-bottom: 22px;
}

.xgj-exported-resources .admin-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.xgj-exported-resources .admin-card-header p,
.xgj-export-muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin: 4px 0 0;
}

.xgj-export-settings-form .form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  align-items: end;
}

.xgj-export-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.xgj-export-progress {
  min-height: 22px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 14px;
}

.xgj-export-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.xgj-export-picker:empty {
  display: none;
}

.xgj-export-picker .button {
  width: auto;
}

.xgj-category-path,
.xgj-region-path {
  grid-column: span 2;
}

.xgj-path-text {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.xgj-region-picker select,
.xgj-export-settings-form select {
  width: 100%;
}

.form-hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.xgj-category-search {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.xgj-category-search input {
  min-width: min(420px, 100%);
}

.admin-action {
  color: var(--accent) !important;
  font-size: 13px;
  margin-right: 10px;
}

.admin-action:hover { text-decoration: underline; }

.admin-action.danger { color: var(--primary) !important; }

.button-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.inline-form { display: inline; }

.admin-actions-cell {
  white-space: nowrap;
}

.check-col {
  width: 44px;
  text-align: center !important;
}

.batch-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.select-all-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 14px;
}

.page-total {
  color: var(--muted);
  font-size: 13px;
}

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

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-link.disabled {
  color: var(--muted);
  pointer-events: none;
  opacity: 0.5;
}

.per-page-form select {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  font: inherit;
}

.image-tip {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 16px;
}

.image-sort-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  min-height: 40px;
}

.img-card {
  position: relative;
  width: 140px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: grab;
  transition: border-color 0.15s, transform 0.15s;
}

.img-card:hover { border-color: var(--accent); }
.img-card.dragging { opacity: 0.4; }
.img-card.drag-over { border-color: var(--primary); transform: scale(1.05); }
.img-card.is-cover { border-color: var(--primary); }

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

.cover-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.img-del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border-radius: 50%;
  text-align: center;
  line-height: 20px;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}

.img-del:hover { background: var(--primary); }

.img-file-name {
  padding: 5px 6px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.upload-zone:hover { border-color: var(--accent); background: var(--accent-light); }
.upload-zone.drop-active { border-color: var(--primary); background: var(--primary-light); }

.upload-zone input[type="file"] {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

.upload-icon { font-size: 36px; margin-bottom: 8px; }

.upload-zone p {
  margin: 4px 0;
  color: var(--text);
  font-size: 15px;
}

.upload-hint { color: var(--muted) !important; font-size: 13px !important; }

.upload-progress {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

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

.admin-header h1 { margin: 0; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.admin-table th,
.admin-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  background: var(--bg);
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
}

.admin-table td a {
  color: var(--accent);
  margin-right: 8px;
  font-size: 13px;
}

.admin-table td a:hover { text-decoration: underline; }

.image-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0;
}

.image-item {
  width: 120px;
  text-align: center;
}

.image-item img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.image-item span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-list-page { padding: 32px 0; }

.resource-search { margin-bottom: 24px; }

.search-form {
  display: flex;
  gap: 12px;
  max-width: 600px;
}

.search-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  transition: border-color 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.category-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.cat-link {
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 14px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--muted);
  transition: all 0.2s;
}

.cat-link.active,
.cat-link:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.resource-card {
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.25s;
  box-shadow: var(--shadow);
}

.resource-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-cover {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card-cover-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
  color: var(--muted);
  font-size: 14px;
}

.card-body { padding: 16px; }

.card-type {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  margin: 10px 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text);
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-price {
  color: var(--primary);
  font-weight: 700;
  font-size: 20px;
}

.card-sales {
  color: var(--muted);
  font-size: 13px;
}

.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 40px;
}

.page-link {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: #fff;
  transition: all 0.2s;
}

.page-link:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.page-link-active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.detail-page { padding: 32px 0; }

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.75fr);
  gap: 32px;
  align-items: start;
}

.detail-images > img {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 8px;
}

.detail-image-placeholder {
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-radius: var(--radius);
  color: var(--muted);
}

.detail-info {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 88px;
}

.detail-type {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  margin-right: 8px;
}

.detail-category {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
}

.detail-title {
  font-size: 26px;
  font-weight: 700;
  margin: 18px 0;
  line-height: 1.3;
}

.detail-meta {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.detail-price {
  color: var(--primary);
  font-weight: 700;
  font-size: 32px;
}

.detail-sales { color: var(--muted); font-size: 14px; }

.detail-actions { margin-top: 8px; }

.detail-description {
  margin-top: 32px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
}

.detail-description h2 { margin: 0 0 16px; font-size: 20px; }

.description-content {
  line-height: 1.8;
  color: var(--text);
  white-space: pre-wrap;
  font-size: 15px;
}

@media (max-width: 760px) {
  .detail-grid { grid-template-columns: 1fr; }
  .resource-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

@media (max-width: 860px) {
  .header-inner {
    height: auto;
    min-height: 68px;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
  }

  .header-search {
    order: 3;
    flex-basis: 100%;
    max-width: none;
    margin: 0;
  }
}

.order-confirm { text-align: center; }

.order-resource-title {
  font-size: 20px;
  font-weight: 600;
  margin: 16px 0;
}

.order-price {
  font-size: 36px;
  color: var(--primary);
  font-weight: 700;
  margin: 8px 0 24px;
}

.order-detail { margin-bottom: 24px; }
.order-detail p { margin: 10px 0; font-size: 15px; }
.order-detail strong { color: var(--text); }

.delivery-info {
  background: var(--success-light);
  border: 1px solid #c6f6d5;
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 20px;
}

.delivery-info h2 { margin: 0 0 14px; color: var(--success); font-size: 18px; }
.delivery-info p { margin: 8px 0; font-size: 15px; }
.delivery-info a { color: var(--accent); word-break: break-all; }
.delivery-info a:hover { text-decoration: underline; }

.delivery-content {
  line-height: 1.8;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 15px;
}

.order-pending {
  color: var(--muted);
  text-align: center;
  padding: 24px;
  font-size: 15px;
}

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.status-paid { background: var(--success-light); color: var(--success); }
.status-pending { background: #fffbeb; color: var(--warning); }
.status-closed { background: #f7fafc; color: var(--muted); }
.test-status-success { background: var(--success-light); color: var(--success); }
.test-status-fail { background: var(--primary-light); color: var(--primary); }
.test-status-untested { background: #f7fafc; color: var(--muted); }

.test-result {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 14px;
}

.test-result.success {
  background: var(--success-light);
  color: var(--success);
}

.test-result.fail {
  background: var(--primary-light);
  color: var(--primary);
}

.test-message {
  max-width: 320px;
  word-break: break-word;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button.ghost {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}

.user-center {
  padding: 32px 0;
}

.user-center-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
}

.user-sidebar {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 0;
  height: fit-content;
}

.user-sidebar-item {
  display: block;
  padding: 10px 20px;
  font-size: 15px;
  color: var(--text);
  border-left: 3px solid transparent;
}

.user-sidebar-item:hover { background: var(--bg); }

.user-sidebar-item.active {
  color: var(--primary);
  border-left-color: var(--primary);
  background: var(--primary-light);
  font-weight: 600;
}

.user-content {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.user-info-card {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d1b4e 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-info-card h3 { margin: 0; font-size: 20px; }

.balance-amount {
  font-size: 28px;
  font-weight: 700;
  color: #fc8181;
}

.balance-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 4px;
}

.recharge-btn {
  display: inline-flex;
  padding: 8px 20px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
}

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

.user-center-page {
  padding: 32px 0;
  min-height: calc(100vh - 68px - 200px);
}

.user-center-page h1 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 24px;
  padding-left: 16px;
  position: relative;
}

.user-center-page h1::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  background: var(--primary);
  border-radius: 2px;
}

.empty-state {
  text-align: center;
  padding: 80px 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.empty-icon {
  font-size: 56px;
  margin-bottom: 16px;
}

.empty-state h2 {
  font-size: 20px;
  margin: 0 0 8px;
  color: var(--text);
}

.empty-state p {
  color: var(--muted);
  margin: 0 0 24px;
  font-size: 15px;
}

.breadcrumb {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
}

.breadcrumb a { color: var(--accent); }
.breadcrumb a:hover { text-decoration: underline; }

.detail-gallery {
  position: relative;
}

.detail-main-img {
  width: 100%;
  max-height: 560px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: block;
}

.detail-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
}

.detail-thumb {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s;
  flex-shrink: 0;
}

.detail-images .detail-thumb {
  width: 72px;
  height: 54px;
  margin-bottom: 0;
}

.detail-thumb:hover { border-color: var(--accent); }
.detail-thumb.thumb-active { border-color: var(--primary); }

.detail-guarantees {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.guarantee-item {
  font-size: 13px;
  color: var(--success);
  font-weight: 500;
}

.buy-page { padding: 32px 0; }

.buy-card {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 32px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
}

.buy-cover {
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
}

.buy-title {
  font-size: 22px;
  font-weight: 700;
  margin: 12px 0;
  line-height: 1.4;
}

.buy-tags { margin-bottom: 4px; }

.buy-price-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}

.buy-price {
  color: var(--primary);
  font-size: 32px;
  font-weight: 700;
}

.buy-sales { color: var(--muted); font-size: 14px; }

.buy-summary {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 20px;
}

.buy-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.buy-summary-row:last-child { border-bottom: none; }
.buy-summary-row span:last-child { color: var(--text); font-weight: 500; }

.buy-total { margin-top: 4px; }

.buy-total-price {
  color: var(--primary) !important;
  font-size: 20px !important;
  font-weight: 700 !important;
}

.buy-submit-btn { margin-top: 8px; }

.buy-back {
  display: inline-block;
  margin-top: 12px;
  color: var(--accent);
  font-size: 14px;
}

.buy-back:hover { text-decoration: underline; }

.buy-hint {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}

.order-page { padding: 32px 0; }

.order-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.order-header h1 {
  font-size: 20px;
  margin: 0;
}

.order-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.order-no {
  font-size: 14px;
  color: var(--muted);
}

.order-body {
  padding: 24px 28px;
}

.order-res-row {
  display: flex;
  gap: 16px;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.order-cover {
  width: 100px;
  height: 75px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.order-cover-placeholder {
  width: 100px;
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 12px;
  flex-shrink: 0;
}

.order-res-info h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.order-res-info .detail-price {
  font-size: 20px;
}

.order-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.order-info-item {
  font-size: 14px;
}

.order-info-label {
  color: var(--muted);
  margin-right: 8px;
}

.order-card .delivery-info {
  margin: 0;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-bottom: none;
}

.delivery-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  font-size: 15px;
}

.delivery-label {
  color: var(--muted);
  min-width: 80px;
  flex-shrink: 0;
}

.delivery-code {
  font-family: monospace;
  font-size: 16px;
  background: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.copy-btn {
  padding: 4px 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
}

.copy-btn:hover { background: #2c5282; }

@media (max-width: 760px) {
  .buy-card { grid-template-columns: 1fr; }
  .order-info-grid { grid-template-columns: 1fr; }
  .order-res-row { flex-direction: column; align-items: flex-start; }
  .order-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .detail-info { position: static; }
}
