.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 100vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
}

.admin-brand {
  position: relative;
  overflow: hidden;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  background: var(--gradient-subtle);
  border-bottom: 1px solid var(--border-light);
}

.admin-brand::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  animation: shimmer 4s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

.admin-brand img {
  position: relative;
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.admin-brand span {
  position: relative;
  overflow: hidden;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-nav {
  flex: 1;
  padding: 16px 12px;
}

.nav-section-title {
  padding: 12px 20px 8px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.admin-nav button {
  position: relative;
  width: calc(100% - 16px);
  height: 48px;
  justify-content: flex-start;
  margin: 4px 8px;
  padding: 0 16px;
  color: var(--text-secondary);
  background: transparent;
  box-shadow: none;
  border-radius: 12px;
  font-weight: 500;
}

.admin-nav button:hover {
  color: var(--primary);
  background: var(--gradient-subtle);
  transform: translateX(3px);
}

.admin-nav button.active {
  color: var(--primary);
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.10), rgba(124, 58, 237, 0.08));
  border: 1px solid rgba(0, 102, 255, 0.20);
  box-shadow: 0 2px 10px rgba(0, 102, 255, 0.10);
  font-weight: 700;
}

.admin-nav button.active::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 20px;
  transform: translateY(-50%);
  border-radius: 0 3px 3px 0;
  background: var(--gradient-primary);
}

.admin-user {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin: 8px 20px 16px;
  padding: 12px;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  background: #f8fafc;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--gradient-primary);
  font-weight: 800;
}

.admin-user b,
.admin-user span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user span {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 12px;
}

.admin-main {
  min-width: 0;
  padding: 24px;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: -24px -24px 24px;
  padding: 14px 24px;
  background: rgba(248, 250, 252, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.86);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
}

.breadcrumb strong {
  color: var(--text-primary);
  font-size: 18px;
}

.role-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: #eef4ff;
  font-size: 12px;
  font-weight: 700;
}

.admin-content {
  display: grid;
  gap: 16px;
}

#app.route-entered .admin-content {
  animation: routeContentIn 0.18s ease-out both;
}

#app.route-pending {
  cursor: progress;
}

@keyframes routeContentIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  #app.route-entered .admin-content {
    animation: none;
  }
}

.card {
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 18px;
  background: var(--bg-secondary);
  box-shadow: var(--shadow-sm);
}

.card.soft {
  background: #f8fbff;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.card h3 {
  margin: 0;
  font-size: 17px;
}

.admin-dashboard-hero {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, #0066ff 0%, #4f46e5 54%, #7c3aed 100%);
  box-shadow: var(--shadow-glow);
}

.admin-dashboard-hero h1 {
  margin: 0 0 10px;
  font-size: 28px;
}

.admin-dashboard-hero p {
  margin: 0;
  max-width: 720px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.8;
}

.platform-index-page,
.dealer-index-page {
  min-height: calc(100vh - 104px);
  display: grid;
  place-items: center;
  padding: 28px;
}

.platform-welcome-card {
  position: relative;
  width: min(100%, 960px);
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  padding: 56px 64px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
  text-align: center;
}

.platform-welcome-logo {
  width: 88px;
  height: 88px;
  object-fit: contain;
  margin-bottom: 24px;
}

.platform-welcome-card h1 {
  position: relative;
  margin: 0;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0;
}

.platform-welcome-date {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 15px;
}

.platform-welcome-date svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.platform-welcome-card p {
  margin: 16px 0 34px;
  color: var(--text-secondary);
  font-size: 16px;
}

.dealer-welcome-divider {
  width: 84px;
  height: 3px;
  margin: 26px auto 34px;
  border-radius: 999px;
  background: var(--gradient-primary);
}

.platform-index-stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.platform-index-stat {
  min-height: 152px;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 20px 16px;
  color: var(--text-primary);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.platform-index-stat span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--primary);
  background: rgba(0, 102, 255, 0.08);
}

.platform-index-stat svg {
  width: 24px;
  height: 24px;
}

.platform-index-stat strong {
  color: var(--primary);
  font-size: 32px;
  line-height: 1;
}

.platform-index-stat em {
  color: var(--text-secondary);
  font-style: normal;
  font-size: 14px;
}

.commercial-index-page {
  min-height: calc(100vh - 104px);
  display: grid;
  place-items: center;
  padding: 28px;
}

.commercial-welcome-card {
  border-radius: 18px;
}

.commercial-index-stat span {
  color: #0f766e;
  background: rgba(13, 148, 136, 0.10);
}

.commercial-index-stat strong {
  color: #0f766e;
}

.hero-logo {
  width: 96px;
  height: 96px;
  padding: 14px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.14);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.metric-card .metric-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: #eef4ff;
}

.metric-card svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.metric-card p,
.metric-card span {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
}

.metric-card strong {
  display: block;
  margin: 4px 0 2px;
  font-size: 24px;
}

.admin-grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 16px;
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px auto auto;
  gap: 10px;
  margin-bottom: 14px;
}

.inline-form {
  margin-top: 12px;
  grid-template-columns: minmax(0, 1fr) 150px auto;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--border-light);
  border-radius: 12px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
  background: #ffffff;
}

.table th {
  height: 44px;
  padding: 0 14px;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-light);
  font-size: 12px;
  text-align: left;
  white-space: nowrap;
}

.table td {
  padding: 13px 14px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
  color: var(--text-secondary);
  font-size: 13px;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table b {
  color: var(--text-primary);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.detail-item {
  padding: 12px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: #f8fafc;
}

.detail-item span {
  display: block;
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 12px;
}

.dictionary-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
}

.dict-categories-panel,
.dict-items-panel {
  border: 1px solid var(--border-light);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.dict-categories-panel {
  padding: 16px;
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.dict-category-list {
  display: grid;
  gap: 10px;
}

.dict-category-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  align-items: center;
  min-height: 70px;
  padding: 12px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: #f8fafc;
  color: var(--text-secondary);
  text-align: left;
}

.dict-category-list button.active {
  border-color: rgba(0, 102, 255, 0.28);
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.08), rgba(124, 58, 237, 0.06));
  color: var(--primary);
}

.dict-category-list b {
  color: var(--text-primary);
}

.dict-category-list span:not(.status) {
  color: var(--text-muted);
  font-size: 12px;
}

.dict-items-panel {
  padding: 18px;
}

.dict-items-panel .table {
  min-width: 100%;
  table-layout: fixed;
}

.dict-items-panel .table th,
.dict-items-panel .table td {
  padding-left: 10px;
  padding-right: 10px;
  font-size: 12px;
}

.dict-items-panel .table th:nth-child(1),
.dict-items-panel .table td:nth-child(1) {
  width: 25%;
}

.dict-items-panel .table th:nth-child(2),
.dict-items-panel .table td:nth-child(2) {
  width: 34%;
}

.dict-items-panel .table th:nth-child(4),
.dict-items-panel .table td:nth-child(4) {
  width: 144px;
}

.dict-items-panel .toolbar.compact {
  flex-wrap: nowrap;
  justify-content: flex-start;
}

.dict-key,
.image-url {
  display: inline-block;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #0052cc;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 12px;
  white-space: nowrap;
}

.dict-value {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dict-desc,
.template-name {
  color: var(--text-secondary);
}

.protocol-template-table {
  margin-bottom: 16px;
}

.settings-page {
  display: grid;
  gap: 18px;
}

.settings-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
}

.settings-page-head h2 {
  margin: 0;
  color: #0f172a;
  font-size: 24px;
  font-weight: 800;
}

.settings-page-head p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 14px;
}

.settings-table-card {
  border: 1px solid var(--border-light);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

.settings-table-card .table-wrap {
  border: 0;
  box-shadow: none;
}

.settings-table-card th {
  white-space: nowrap;
}

.tag-preview-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 5px;
  color: #ffffff;
  background: var(--tag-color);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.color-block {
  width: 24px;
  height: 24px;
  display: inline-block;
  margin-right: 8px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 5px;
  background: var(--tag-color);
  vertical-align: middle;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.condition-tags,
.metric-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.condition-tags span,
.metric-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
}

.condition-tags span {
  color: #2563eb;
  background: #eef4ff;
}

.metric-tags span {
  color: #16a34a;
  background: #ecfdf5;
}

.settings-form-panel {
  border: 1px solid var(--border-light);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.settings-form-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
  background: #f8fafc;
}

.settings-form-title b {
  color: #0f172a;
  font-size: 16px;
}

.settings-form-title span {
  color: #94a3b8;
  font-size: 13px;
}

.settings-inline-form {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.tag-preview-box {
  min-height: 54px;
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: #f8fafc;
}

.metric-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.metric-checkbox-grid label,
.permission-group label {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: #475569;
  font-size: 13px;
}

.metric-checkbox-grid input,
.permission-group input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.condition-builder {
  padding: 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
}

.condition-row {
  display: grid;
  grid-template-columns: 1.2fr 0.6fr 1fr auto;
  gap: 10px;
}

.condition-row select,
.condition-row input {
  min-height: 40px;
  border-radius: 8px;
}

.settings-alert {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  color: #075985;
  background: #f0f9ff;
}

.settings-alert svg {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  fill: currentColor;
}

.settings-alert b,
.settings-alert span {
  display: block;
}

.settings-alert span {
  margin-top: 4px;
  color: #0369a1;
  font-size: 13px;
  line-height: 1.7;
}

.sort-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sort-control span {
  min-width: 22px;
  color: #0f172a;
  font-weight: 800;
  text-align: center;
}

.sort-btn {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 0;
  color: #475569;
  background: #ffffff;
  box-shadow: none;
  font-size: 15px;
}

.sort-btn:disabled {
  color: #cbd5e1;
  background: #f1f5f9;
}

.menu-name-cell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.menu-icon-cell {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--primary);
  background: #eef4ff;
}

.menu-icon-cell svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.settings-switch {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: #64748b;
  font-size: 13px;
}

.settings-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.settings-switch i {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: 0.18s ease;
}

.settings-switch i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: 0.18s ease;
}

.settings-switch input:checked + i {
  background: #22c55e;
}

.settings-switch input:checked + i::after {
  left: 23px;
}

.password-card {
  display: grid;
  gap: 22px;
  max-width: 720px;
  padding: 24px;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

.tips-card {
  padding: 16px 18px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
}

.tips-card b {
  color: #1d4ed8;
}

.tips-card ul {
  margin: 10px 0 0;
  padding-left: 20px;
  color: #475569;
  font-size: 13px;
  line-height: 1.8;
}

.password-form {
  display: grid;
  gap: 18px;
}

.password-form label {
  display: grid;
  gap: 8px;
}

.password-form label > span {
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
}

.password-form label b {
  margin-left: 4px;
  color: #ef4444;
}

.password-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 66px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
}

.password-wrapper input {
  border: 0;
  border-radius: 0;
  background: #ffffff;
}

.password-wrapper button {
  border: 0;
  border-left: 1px solid var(--border-light);
  border-radius: 0;
  padding: 0;
  color: var(--primary);
  background: #f8fafc;
  box-shadow: none;
}

.password-strength {
  display: grid;
  gap: 8px;
}

.password-strength div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.password-strength i {
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
}

.password-strength i.strong {
  background: #22c55e;
}

.password-strength span {
  color: #16a34a;
  font-size: 12px;
}

.password-actions {
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  padding-top: 8px;
}

.account-cell {
  display: grid;
  gap: 4px;
}

.account-cell b {
  color: #0f172a;
}

.account-cell span {
  color: #94a3b8;
  font-size: 12px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid var(--border-light);
}

.pagination div {
  display: flex;
  gap: 6px;
}

.permission-tree {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: #f8fafc;
}

.permission-group {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 10px;
  background: #ffffff;
}

.permission-group-title {
  color: #0f172a;
}

.permission-group > div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding-left: 24px;
}

.progress {
  width: 150px;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--gradient-primary);
}

.mini-chart {
  width: 100%;
  height: 220px;
}

.chart-grid line {
  stroke: #e2e8f0;
  stroke-width: 1;
}

.chart-bars rect {
  fill: rgba(0, 102, 255, 0.12);
}

.mini-chart circle {
  fill: #ffffff;
  stroke: #0066ff;
  stroke-width: 3;
}

.rank-list {
  display: grid;
  gap: 10px;
}

.rank-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: #ffffff;
}

.rank-num {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #ffffff;
  background: var(--gradient-primary);
  font-weight: 800;
  font-size: 12px;
}

.data-center-page {
  display: grid;
  gap: 32px;
}

.data-center-hero {
  position: relative;
  overflow: hidden;
  min-height: 196px;
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 48px;
  border-radius: 20px;
  color: #ffffff;
  background: linear-gradient(135deg, #0066ff 0%, #7c3aed 100%);
  box-shadow: var(--shadow-lg);
}

.data-center-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.16), transparent 42%, rgba(255, 255, 255, 0.10));
}

.data-center-hero h2,
.data-center-hero p {
  position: relative;
  margin: 0;
}

.data-center-hero h2 {
  font-size: 36px;
  line-height: 1.18;
  font-weight: 800;
}

.data-center-hero p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 16px;
  line-height: 1.7;
}

.data-center-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.data-center-stat,
.data-center-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-light);
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

.data-center-stat {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 128px;
  padding: 24px;
  border-radius: 16px;
  text-align: center;
}

.data-center-stat::before,
.data-center-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 102, 255, 0.22), transparent);
}

.data-center-stat strong {
  color: var(--primary);
  font-size: 36px;
  line-height: 1;
}

.data-center-stat span {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

.data-center-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.data-center-card {
  min-height: 312px;
  padding: 28px;
  border-radius: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.data-center-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.data-center-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.16);
}

.data-center-icon svg {
  width: 28px;
  height: 28px;
  fill: #ffffff;
}

.data-center-icon.blue { background: linear-gradient(135deg, #0066ff 0%, #7c3aed 100%); }
.data-center-icon.green { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.data-center-icon.orange { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.data-center-icon.red { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }
.data-center-icon.teal { background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%); }
.data-center-icon.amber { background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%); }

.data-center-card h3 {
  margin: 0 0 8px;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 800;
}

.data-center-card p {
  min-height: 42px;
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.data-center-links {
  display: grid;
  gap: 8px;
}

.data-center-link {
  width: 100%;
  min-height: 42px;
  justify-content: space-between;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text-secondary);
  background: #f8fafc;
  box-shadow: none;
  font-size: 13px;
  font-weight: 600;
}

.data-center-link::after {
  content: ">";
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
}

.data-center-link:hover {
  color: var(--primary);
  border-color: rgba(0, 102, 255, 0.18);
  background: #eef4ff;
  transform: translateX(2px);
}

.data-center-link:hover::after {
  color: var(--primary);
}

.team-source-page {
  display: grid;
  gap: 24px;
}

.team-page-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 4px 0;
}

.team-page-header h2 {
  margin: 0;
  color: #0f172a;
  font-size: 28px;
  font-weight: 800;
}

.team-table-card,
.team-modal-preview,
.team-form-card,
.team-transfer-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-light);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

.team-table-card::before,
.team-modal-preview::before,
.team-form-card::before,
.team-transfer-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 28px;
  right: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 102, 255, 0.20), transparent);
}

.team-table-card {
  padding: 0;
}

.team-table-card .table-wrap {
  border: 0;
  border-radius: 0;
}

.team-table-card .table {
  min-width: 1120px;
}

.region-change-table .table {
  min-width: 1080px;
}

.team-table-card .table th {
  height: 56px;
  color: #7c8aa5;
  background: linear-gradient(180deg, rgba(0, 102, 255, 0.04) 0%, rgba(124, 58, 237, 0.02) 100%);
}

.team-table-card .table td {
  padding: 20px;
  line-height: 1.55;
  vertical-align: middle;
}

.team-region-text {
  display: block;
  max-width: 300px;
  color: var(--text-secondary);
  white-space: normal;
}

.team-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

button.team-action {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 600;
}

button.team-action.primary { color: var(--primary); }
button.team-action.warning { color: #d97706; }
button.team-action.danger { color: #dc2626; }
button.team-action.success { color: #059669; }

button.team-action:hover {
  background: rgba(0, 102, 255, 0.08);
  transform: translateY(-1px);
}

.team-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px;
  border-top: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 14px;
}

.team-pagination > div {
  display: flex;
  gap: 8px;
}

.team-pagination b {
  color: var(--primary);
}

.page-btn {
  min-width: 36px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--text-secondary);
  background: #ffffff;
  box-shadow: none;
}

.page-btn.active {
  color: #ffffff;
  border-color: transparent;
  background: var(--gradient-primary);
}

.team-modal-preview {
  max-width: 980px;
  justify-self: center;
  width: 100%;
}

.team-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 68px;
  padding: 0 28px;
  border-bottom: 1px solid var(--border-light);
}

.team-modal-head strong {
  color: #0f172a;
  font-size: 18px;
}

.team-modal-head button {
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--text-muted);
  background: #f8fafc;
  box-shadow: none;
}

.team-office-form,
.team-transfer-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
  padding: 28px;
}

.team-office-form label,
.team-transfer-form label {
  display: grid;
  gap: 10px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
}

.team-office-form input,
.team-office-form select,
.team-transfer-form input,
.team-transfer-form select,
.team-transfer-form textarea {
  min-height: 46px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 0 14px;
  color: var(--text-primary);
  background: #f8fafc;
  font: inherit;
}

.team-transfer-form textarea {
  min-height: 96px;
  padding: 12px 14px;
  resize: vertical;
}

.team-area-selector {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: #f8fafc;
}

.team-area-selector b {
  color: #0f172a;
}

.team-area-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.team-area-columns span,
.team-selected-info span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--primary-dark);
  background: #eef4ff;
  font-size: 13px;
  font-weight: 700;
}

.team-transfer-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 22px 28px;
}

.team-transfer-step {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
}

.team-transfer-step span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #e2e8f0;
  font-weight: 800;
}

.team-transfer-step.active {
  color: var(--primary);
}

.team-transfer-step.active span {
  color: #ffffff;
  background: var(--gradient-primary);
}

.team-form-card {
  padding: 28px;
}

.team-form-card h3 {
  margin: 0 0 20px;
  color: #0f172a;
  font-size: 18px;
}

.team-area-selector.large {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  background: #ffffff;
}

.team-area-col {
  display: grid;
  gap: 10px;
  min-height: 230px;
  padding: 14px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: #f8fafc;
}

.team-area-col label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  white-space: nowrap;
}

.team-area-col label input {
  flex: 0 0 auto;
  width: 14px;
  min-height: 14px;
  margin: 0;
}

.team-selected-info {
  display: grid;
  gap: 12px;
  margin-top: 20px;
  padding: 16px;
  border-radius: 12px;
  background: #f0fdf4;
}

.team-selected-info > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.team-transfer-form {
  padding: 24px 0 0;
  border-top: 1px solid var(--border-light);
}

.team-confirm-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  background: #fff7ed;
}

.team-confirm-panel > div {
  display: grid;
  grid-template-columns: repeat(6, auto);
  gap: 10px 14px;
  align-items: center;
}

.team-confirm-panel span {
  color: var(--text-muted);
  font-size: 13px;
}

.team-confirm-panel p {
  margin: 0;
  color: #b45309;
  line-height: 1.6;
}

.team-radio-panel {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 54px;
  padding: 14px 16px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: #f8fafc;
}

.team-radio-panel b {
  margin-right: 6px;
  color: #0f172a;
}

.team-radio-panel label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
}

.team-radio-panel input {
  width: 16px;
  min-height: 16px;
  margin: 0;
}

.team-protection-stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, auto);
  align-items: center;
  justify-content: space-around;
  gap: 16px;
  min-height: 132px;
  padding: 28px;
  overflow: hidden;
  border-radius: 20px;
  color: #ffffff;
  background: var(--gradient-primary);
  box-shadow: var(--shadow-md);
}

.team-protection-stats::before {
  content: "";
  position: absolute;
  right: -80px;
  top: -110px;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.team-protection-stat {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  text-align: center;
}

.team-protection-stat strong {
  font-size: 34px;
  line-height: 1;
}

.team-protection-stat span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  font-weight: 600;
}

.team-protection-stats i {
  width: 1px;
  height: 48px;
  background: rgba(255, 255, 255, 0.24);
}

.team-protection-page.local .team-protection-stats {
  grid-template-columns: repeat(5, auto);
}

.team-protection-filter {
  display: grid;
  gap: 18px;
  padding: 20px 24px;
  border: 1px solid var(--border-light);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.team-protection-filter > div:first-child {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.team-protection-filter span {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
}

.team-view-tabs {
  display: inline-flex;
  padding: 4px;
  border-radius: 12px;
  background: #eef2f7;
}

.team-view-tabs button {
  min-height: 36px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  color: var(--text-secondary);
  background: transparent;
  box-shadow: none;
  font-weight: 700;
}

.team-view-tabs button.active {
  color: #ffffff;
  background: var(--gradient-primary);
}

.team-filter-switches {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.team-filter-switches label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.team-filter-switches i {
  position: relative;
  width: 46px;
  height: 24px;
  border-radius: 999px;
  background: #dbe4ef;
}

.team-filter-switches i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.team-filter-switches label:first-child i {
  background: #fca5a5;
}

.team-filter-switches label:first-child i::after {
  left: 25px;
}

.team-region-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}

.team-region-card-grid.summary {
  grid-template-columns: repeat(auto-fit, minmax(430px, 1fr));
}

.team-region-card {
  position: relative;
  display: grid;
  gap: 18px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--border-light);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.team-region-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.team-region-card.empty-region {
  border-style: dashed;
  border-color: rgba(239, 68, 68, 0.45);
  background: linear-gradient(135deg, rgba(254, 242, 242, 0.84), #ffffff);
}

.team-region-card.no-leader-region {
  border-style: dashed;
  border-color: rgba(245, 158, 11, 0.45);
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.84), #ffffff);
}

.team-region-card.empty-no-leader-region {
  border: 2px dashed rgba(239, 68, 68, 0.56);
  background: linear-gradient(135deg, rgba(254, 242, 242, 0.88), rgba(255, 251, 235, 0.72));
}

.team-region-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.team-region-card h3 {
  margin: 0;
  color: #0f172a;
  font-size: 20px;
}

.team-region-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.team-region-badge {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.team-region-badge.has-customer {
  color: #059669;
  background: rgba(16, 185, 129, 0.12);
}

.team-region-badge.empty {
  color: #dc2626;
  background: rgba(239, 68, 68, 0.12);
}

.team-region-badge.no-leader {
  color: #b45309;
  background: rgba(245, 158, 11, 0.14);
}

.team-region-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.team-region-stat-item {
  display: grid;
  gap: 6px;
  min-height: 62px;
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
}

.team-region-stat-label {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.team-region-stat-value {
  color: #0f172a;
  font-size: 15px;
  font-weight: 800;
}

.team-region-stat-value.highlight {
  color: var(--primary);
}

.team-region-stat-value.empty,
.team-child-item b.empty {
  color: #dc2626;
}

.team-region-stat-value.warning,
.team-child-item b.warning,
.team-child-item em.warning {
  color: #b45309;
}

.team-child-regions {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

.team-child-regions > b {
  color: var(--text-secondary);
  font-size: 13px;
}

.team-child-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
}

.team-child-item span {
  display: grid;
  gap: 2px;
  color: #0f172a;
}

.team-child-item strong {
  font-size: 14px;
}

.team-child-item em {
  color: var(--text-muted);
  font-size: 12px;
  font-style: normal;
}

.team-child-item b {
  color: var(--primary);
  white-space: nowrap;
}

.master-page-head,
.ad-page-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 4px 4px 10px;
}

.master-page-head h2,
.ad-page-head h2 {
  margin: 0;
  color: #0f172a;
  font-size: 28px;
  font-weight: 800;
}

.ad-page-head p {
  margin: 8px 0 0;
  color: #8aa0bc;
  font-size: 14px;
}

button.master-primary {
  min-height: 46px;
  border-radius: 12px;
  padding: 0 24px;
  background: var(--gradient-primary);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.master-table-card,
.ad-management-card {
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}

.admin-extra-section {
  display: grid;
  gap: 16px;
}

.admin-extra-section summary {
  cursor: pointer;
  border: 1px dashed var(--border-light);
  border-radius: 12px;
  padding: 12px 16px;
  color: #64748b;
  background: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.admin-extra-section[open] summary {
  margin-bottom: 16px;
}

.master-table-card .table-wrap,
.ad-management-card .table-wrap {
  border: 0;
  border-radius: 0;
}

.master-table-card .table,
.ad-management-card .table {
  min-width: 980px;
}

.master-table-card .table th,
.ad-management-card .table th {
  height: 56px;
  color: #7c8aa5;
  background: linear-gradient(180deg, #fbfdff 0%, #f8fafc 100%);
}

.master-table-card .table td,
.ad-management-card .table td {
  padding: 20px 14px;
  line-height: 1.55;
}

.ad-management-card {
  border-radius: 18px;
}

.ad-tabs {
  display: flex;
  min-height: 60px;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.04), rgba(124, 58, 237, 0.06));
}

.ad-tabs button {
  position: relative;
  min-width: 148px;
  min-height: 60px;
  border-radius: 0;
  color: var(--text-secondary);
  background: transparent;
  box-shadow: none;
  font-weight: 700;
}

.ad-tabs button.active {
  color: var(--primary);
}

.ad-tabs button.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--gradient-primary);
}

.ad-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 24px;
}

.ad-search {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 140px;
  gap: 12px;
  width: min(440px, 100%);
}

.ad-search input,
.ad-search select {
  min-height: 46px;
  border-radius: 12px;
  background: #f8fafc;
}

.sort-box {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--primary);
  background: #eef4ff;
  border: 1px solid #cfe0ff;
  font-weight: 800;
}

.ad-image-placeholder {
  width: 112px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #64748b;
  background: linear-gradient(135deg, #eef4ff, #f8fafc);
  border: 1px dashed #cbd5e1;
  font-size: 12px;
}

.ad-page {
  display: grid;
  gap: 18px;
}

.ad-list-page + .admin-extra-section {
  margin-top: 18px;
}

.ad-footer-preview {
  overflow: hidden;
  padding: 0;
}

.ad-footer-preview .card-head {
  padding: 18px 20px;
  margin: 0;
  border-bottom: 1px solid var(--border-light);
}

.ad-footer-preview .table-wrap {
  border: 0;
  border-radius: 0;
}

.ad-image-swatch {
  width: 120px;
  height: 60px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, #667eea, #764ba2);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(102, 126, 234, 0.22);
}

.ad-image-swatch.violet {
  background: linear-gradient(135deg, #764ba2, #9333ea);
}

.ad-image-swatch.orange {
  background: linear-gradient(135deg, #fa8c16, #f97316);
}

.ad-image-swatch.cyan {
  background: linear-gradient(135deg, #06b6d4, #2563eb);
}

.ad-image-swatch.pink {
  background: linear-gradient(135deg, #ec4899, #db2777);
}

.ad-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.ad-status.active {
  color: #047857;
  background: #d1fae5;
}

.ad-status.inactive {
  color: #475569;
  background: #e2e8f0;
}

.ad-status.expired {
  color: #b45309;
  background: #ffedd5;
}

.ad-form-container {
  max-width: 1080px;
}

.ad-upload-card {
  min-height: 220px;
  display: grid;
  place-items: center;
  border: 2px dashed #dbe3ef;
  border-radius: 14px;
  background: #f8fafc;
  overflow: hidden;
}

.ad-upload-placeholder {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 28px;
  text-align: center;
}

.ad-upload-placeholder b {
  color: var(--primary);
  font-size: 18px;
  letter-spacing: 0;
}

.ad-upload-placeholder p {
  margin: 0;
  color: #334155;
  font-size: 14px;
  font-weight: 800;
}

.ad-upload-placeholder em {
  color: #94a3b8;
  font-size: 12px;
  font-style: normal;
}

.ad-upload-card.has-image {
  border-style: solid;
  background: #ffffff;
}

.ad-upload-preview {
  position: relative;
  width: 100%;
  min-height: 220px;
  display: grid;
  place-items: center;
  padding: 16px;
}

.ad-banner-preview {
  width: min(100%, 750px);
  aspect-ratio: 5 / 2;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #667eea, #764ba2);
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(102, 126, 234, 0.24);
}

.ad-upload-preview button {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  min-height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  padding: 0;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: none;
}

.ad-editor-content {
  min-height: 260px;
}

.after-sale-page,
.after-sale-detail-page {
  display: grid;
  gap: 20px;
}

.after-sale-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.after-sale-filter-row {
  grid-template-columns: minmax(220px, 1.3fr) 150px 150px 150px auto;
}

.after-sale-table-container .table {
  min-width: 1320px;
}

.after-sale-table-container .order-no {
  margin-top: 8px;
  color: #0f172a;
  font-weight: 800;
}

.after-sale-table-container .order-ref {
  margin-top: 2px;
  color: #94a3b8;
  font-size: 12px;
}

.after-sale-type-pill,
.after-sale-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.after-sale-type-pill.instant {
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.after-sale-type-pill.prepay {
  color: #7c3aed;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
}

.after-sale-type-pill.pickup {
  color: #ea580c;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.after-sale-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.after-sale-status.pending {
  color: #ea580c;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.after-sale-status.processing {
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.after-sale-status.completed {
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
}

.after-sale-status.rejected {
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.refund-amount {
  color: #ef4444;
  font-weight: 900;
}

.return-qty {
  color: #ea580c;
  font-weight: 900;
}

.after-sale-status-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  min-height: 150px;
  padding: 28px;
  border-radius: 20px;
  color: #ffffff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
}

.after-sale-detail-page.instant .after-sale-status-header {
  background: linear-gradient(135deg, #0066ff, #0052cc);
}

.after-sale-detail-page.prepay .after-sale-status-header {
  background: linear-gradient(135deg, #9333ea, #7c3aed);
}

.after-sale-detail-page.pickup .after-sale-status-header {
  background: linear-gradient(135deg, #ea580c, #dc2626);
}

.after-sale-status-header h2 {
  margin: 12px 0 8px;
  font-size: 28px;
  font-weight: 900;
}

.after-sale-status-header p,
.after-sale-status-header small {
  color: rgba(255, 255, 255, 0.82);
}

.ghost-back {
  min-height: 34px;
  padding: 0 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow: none;
}

.status-info {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: 200px;
}

.status-info .after-sale-status {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.32);
  color: #ffffff;
}

.after-sale-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.8fr);
  gap: 20px;
  align-items: start;
}

.after-sale-detail-layout .left-content,
.after-sale-detail-layout .right-content {
  display: grid;
  gap: 20px;
}

.after-sale-card {
  overflow: hidden;
  border: 1px solid var(--border-light);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

.after-sale-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-light);
}

.after-sale-card-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
}

.approval-list {
  display: grid;
  gap: 0;
  padding: 8px 24px 24px;
}

.approval-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  padding-top: 18px;
}

.approval-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--gradient-primary);
  font-weight: 900;
}

.approval-item.waiting .approval-avatar {
  background: #cbd5e1;
}

.approval-body {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-light);
}

.approval-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.approval-body p {
  display: flex;
  gap: 16px;
  margin: 8px 0;
  color: #475569;
  font-size: 13px;
}

.approval-body em {
  display: block;
  margin-bottom: 8px;
  color: #64748b;
  font-style: normal;
  font-size: 13px;
}

.approval-body time {
  color: #94a3b8;
  font-size: 12px;
}

.product-row-detail {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 24px;
}

.product-thumb {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #2563eb;
  background: #eff6ff;
  font-weight: 900;
}

.product-row-detail p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
}

.after-sale-amount-line {
  display: flex;
  justify-content: space-between;
  padding: 18px 24px 22px;
  border-top: 1px solid var(--border-light);
  background: #f8fafc;
}

.reason-content {
  margin: 24px 24px 16px;
  padding: 18px;
  border-radius: 14px;
  color: #475569;
  background: #f8fafc;
  line-height: 1.7;
}

.reason-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 0 24px 24px;
}

.reason-images span {
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #94a3b8;
  background: linear-gradient(135deg, #f8fafc, #eef4ff);
  border: 1px dashed #cbd5e1;
  font-weight: 700;
}

.prepay-mini-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 24px;
}

.prepay-mini-stats div {
  padding: 16px;
  border-radius: 14px;
  background: #f8fafc;
}

.prepay-mini-stats span,
.after-sale-info-item span {
  display: block;
  margin-bottom: 8px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
}

.prepay-mini-stats b,
.after-sale-info-item b {
  color: #0f172a;
  font-size: 14px;
}

.after-sale-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  padding: 24px;
}

.after-sale-info-item.full {
  grid-column: span 2;
}

.action-card {
  padding-bottom: 24px;
}

.action-card p {
  margin: 20px 24px;
  color: #64748b;
  line-height: 1.6;
}

.toolbar.stacked {
  display: grid;
  grid-template-columns: 1fr;
  padding: 0 24px;
}

@media (max-width: 1180px) {
  .after-sale-detail-layout {
    grid-template-columns: 1fr;
  }

  .after-sale-filter-row {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

.order-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 4px 8px;
}

.order-page-head h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
}

.order-page-head button.green {
  min-height: 46px;
  border-radius: 12px;
  padding: 0 24px;
  background: #10b981;
  box-shadow: 0 10px 22px rgba(16, 185, 129, 0.20);
}

.order-tabs-card {
  display: flex;
  align-items: center;
  gap: 42px;
  min-height: 62px;
  padding: 0 24px;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

.order-tabs-card button {
  position: relative;
  min-height: 62px;
  padding: 0;
  border-radius: 0;
  color: var(--text-secondary);
  background: transparent;
  box-shadow: none;
  font-weight: 700;
}

.order-tabs-card button.active {
  color: var(--primary);
}

.order-tabs-card button.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--gradient-primary);
}

.order-tabs-card span {
  min-width: 24px;
  min-height: 22px;
  display: inline-grid;
  place-items: center;
  margin-left: 8px;
  border-radius: 999px;
  color: #ffffff;
  background: #fb5534;
  font-size: 12px;
}

.order-filter-card {
  padding: 24px;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}

.order-filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 22px 20px;
  align-items: end;
}

.order-filter-grid label {
  display: grid;
  gap: 8px;
}

.order-filter-grid label span {
  color: #7c8aa5;
  font-size: 13px;
  font-weight: 700;
}

.order-filter-grid input,
.order-filter-grid select {
  min-height: 46px;
  border-radius: 12px;
  background: #f8fafc;
}

.order-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.order-filter-actions button {
  min-width: 78px;
  min-height: 46px;
}

.order-table-card {
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}

.order-table-card .table-wrap {
  border: 0;
  border-radius: 0;
}

.order-table-card .table {
  min-width: 1080px;
  table-layout: fixed;
}

.platform-order-table .table {
  min-width: 100%;
}

.platform-order-table .table th,
.platform-order-table .table td {
  padding-left: 6px;
  padding-right: 6px;
  font-size: 11px;
}

.platform-order-table .toolbar.compact {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.order-table-card .table th {
  height: 56px;
  color: #7c8aa5;
  background: linear-gradient(180deg, #fbfdff 0%, #f8fafc 100%);
}

.order-table-card .table td {
  padding: 16px 8px;
  line-height: 1.55;
  font-size: 12px;
  word-break: break-word;
}

.order-table-card .table th {
  padding: 0 8px;
}

.order-type-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  margin-bottom: 6px;
  border-radius: 7px;
  padding: 0 8px;
  color: #0066ff;
  background: #bfdbfe;
  font-size: 12px;
  font-weight: 800;
}

.order-no {
  display: block;
  color: #0066ff;
  font-size: 12px;
  letter-spacing: 0;
}

.order-products {
  display: grid;
  gap: 5px;
  color: var(--text-primary);
}

.order-products em {
  color: var(--text-secondary);
  font-style: normal;
}

.order-products small {
  color: var(--primary);
  font-weight: 700;
}

.toolbar.compact {
  gap: 6px;
  flex-wrap: wrap;
}

.toolbar.compact button {
  min-width: 58px;
  padding: 0 8px;
}

.table-footer {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  border-top: 1px solid var(--border-light);
  color: #7c8aa5;
  background: #ffffff;
}

.table-footer b {
  color: var(--primary);
}

.pager {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pager button {
  min-width: 38px;
}

.admin-order-detail-page,
.admin-order-logistics-page {
  display: grid;
  gap: 18px;
}

.detail-page-back {
  display: flex;
  justify-content: flex-start;
}

.order-status-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 136px;
  padding: 26px 30px;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.18);
}

.order-status-hero.prepay {
  background: linear-gradient(135deg, #7c3aed, #2563eb);
}

.order-status-main {
  display: flex;
  gap: 16px;
  align-items: center;
}

.order-status-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.18);
}

.order-status-icon svg {
  width: 30px;
  height: 30px;
  fill: #ffffff;
}

.order-status-main h2 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 900;
}

.order-status-main p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
}

.order-status-meta {
  display: grid;
  gap: 8px;
  min-width: 260px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
}

.order-status-meta b {
  color: #ffffff;
}

.admin-order-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.admin-order-content main,
.admin-order-content aside {
  display: grid;
  gap: 18px;
}

.admin-order-section,
.admin-order-info-card {
  border: 1px solid var(--border-light);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.admin-order-section > header,
.admin-order-info-card > header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-light);
  background: #f8fafc;
}

.admin-order-section h3,
.admin-order-info-card h3 {
  margin: 0;
  color: #0f172a;
  font-size: 17px;
  font-weight: 900;
}

.admin-order-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 22px;
}

.admin-order-progress > div {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: #94a3b8;
  text-align: center;
}

.admin-order-progress i {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #94a3b8;
  background: #f1f5f9;
}

.admin-order-progress svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.admin-order-progress .completed i,
.admin-order-progress .active i {
  color: #ffffff;
  background: var(--primary);
}

.admin-order-progress b {
  color: #0f172a;
  font-size: 13px;
}

.admin-order-progress span {
  font-size: 12px;
}

.admin-logistics-timeline {
  display: grid;
  gap: 0;
  padding: 0 24px 24px;
}

.admin-logistics-timeline article {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 14px;
  padding: 0 0 20px;
}

.admin-logistics-timeline article::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 0;
  left: 8px;
  width: 2px;
  background: #e2e8f0;
}

.admin-logistics-timeline article:last-child::before {
  display: none;
}

.admin-logistics-timeline i {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  border: 4px solid #dbeafe;
  border-radius: 50%;
  background: var(--primary);
}

.admin-logistics-timeline b {
  color: #0f172a;
  font-size: 14px;
}

.admin-logistics-timeline p {
  margin: 6px 0;
  color: #475569;
  line-height: 1.65;
}

.admin-logistics-timeline span {
  color: #94a3b8;
  font-size: 12px;
}

.admin-order-products {
  display: grid;
  gap: 14px;
  padding: 20px 22px;
}

.admin-order-products article {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(160px, auto);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  background: #fbfdff;
}

.product-image-box {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #64748b;
  background: #f1f5f9;
}

.product-image-box svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.admin-order-products h4 {
  margin: 0 0 6px;
  color: #0f172a;
  font-size: 15px;
}

.admin-order-products p {
  margin: 0 0 4px;
  color: #64748b;
  font-size: 13px;
}

.product-price-box {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.product-price-box b {
  color: #ef4444;
  font-size: 17px;
}

.product-price-box span {
  color: #64748b;
  font-size: 13px;
  text-align: right;
}

.order-summary-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  border-top: 1px solid var(--border-light);
  color: #475569;
  background: #f8fafc;
  font-weight: 800;
}

.order-summary-line b {
  color: var(--primary);
}

.platform-points-card > div {
  padding: 18px;
}

.platform-points-grid {
  display: grid;
  gap: 12px;
}

.platform-points-grid article {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  background: #f8fafc;
}

.platform-points-grid article > b {
  color: #0f172a;
  font-size: 14px;
}

.platform-points-grid p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  color: #64748b;
}

.platform-points-grid strong {
  color: var(--primary);
}

.platform-points-grid strong.cyan {
  color: #06b6d4;
}

.platform-approval-list {
  display: grid;
  gap: 0;
  padding: 20px 22px;
}

.platform-approval-list article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  padding: 0 0 18px;
}

.platform-approval-list article:last-child {
  padding-bottom: 0;
}

.platform-approval-list i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--primary);
  font-style: normal;
  font-weight: 800;
}

.platform-approval-list b {
  color: #0f172a;
}

.platform-approval-list p {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 6px 0;
  color: #64748b;
}

.platform-approval-list em {
  display: block;
  color: #94a3b8;
  font-style: normal;
}

.platform-approval-list time {
  display: block;
  margin-top: 6px;
  color: #94a3b8;
  font-size: 12px;
}

.admin-order-info-card p {
  margin: 0;
  display: grid;
  gap: 6px;
  padding: 14px 20px;
  border-bottom: 1px solid #eef2f7;
}

.admin-order-info-card p:last-child {
  border-bottom: 0;
}

.admin-order-info-card span {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
}

.admin-order-info-card b {
  color: #0f172a;
  font-size: 14px;
  line-height: 1.6;
}

.logistics-company-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin: 20px 22px;
  padding: 16px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #eff6ff;
}

.company-logo {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: var(--primary);
}

.company-logo svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.logistics-company-card b,
.logistics-company-card span {
  display: block;
}

.logistics-company-card span {
  margin-top: 6px;
  color: #64748b;
  font-size: 13px;
}

.logistics-company-card small {
  display: block;
  margin-top: 4px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
}

.prepay-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.pickup-records {
  display: grid;
  gap: 12px;
  padding: 20px 22px;
}

.pickup-records article {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  background: #fbfdff;
}

.pickup-records b,
.pickup-records strong {
  color: #0f172a;
}

.pickup-records span {
  display: inline-flex;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  color: #2563eb;
  background: #dbeafe;
  font-size: 12px;
}

.pickup-records span.return {
  color: #ef4444;
  background: #fee2e2;
}

.pickup-records p,
.pickup-records em {
  margin: 6px 0 0;
  color: #94a3b8;
  font-size: 12px;
  font-style: normal;
}

.source-page-header {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
}

.source-page-header h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 28px;
  font-weight: 700;
}

.source-page-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.source-stats-row,
.source-stats-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

.source-stats-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.source-stats-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.source-stat-card {
  position: relative;
  overflow: hidden;
  min-height: 118px;
  padding: 22px 20px;
  border: 1px solid rgba(0, 102, 255, 0.10);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

.source-stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--gradient-primary);
}

.source-stat-card.success::before {
  background: linear-gradient(135deg, #10b981 0%, #22c55e 100%);
}

.source-stat-card.warning::before,
.source-stat-card.muted-card::before {
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
}

.source-stat-card.danger::before {
  background: linear-gradient(135deg, #ef4444 0%, #fb7185 100%);
}

.source-stat-card.info::before {
  background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
}

.source-stat-card span {
  display: block;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.source-stat-card strong {
  display: block;
  margin-top: 12px;
  color: var(--text-primary);
  font-size: 32px;
  font-weight: 700;
}

.source-stat-card strong small {
  margin-left: 4px;
  color: var(--text-secondary);
  font-size: 14px;
}

.source-stat-card.purple::before {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.prepay-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.prepay-tabs button {
  min-width: 128px;
  min-height: 48px;
  border: 0;
  border-radius: 0;
  color: var(--text-secondary);
  background: transparent;
  box-shadow: none;
  font-size: 14px;
  font-weight: 600;
}

.prepay-tabs button.active {
  color: #ffffff;
  background: var(--gradient-primary);
}

.prepay-stats-row .source-stat-card {
  min-height: 112px;
}

.source-filter-section {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
  padding: 24px;
  border: 1px solid var(--border-light);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

.source-filter-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr)) auto;
  gap: 20px;
  align-items: end;
}

.source-filter-row.compact-2 {
  grid-template-columns: repeat(2, minmax(220px, 1fr)) auto;
}

.prepay-filter-row {
  grid-template-columns: repeat(3, minmax(190px, 1fr)) auto;
}

.prepay-customer-section .prepay-filter-row {
  grid-template-columns: repeat(2, minmax(220px, 1fr)) auto;
}

.source-filter-row label {
  display: grid;
  gap: 8px;
}

.source-filter-row label span {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.source-filter-row input,
.source-filter-row select {
  min-height: 46px;
  border-radius: 12px;
  background: #f8fafc;
}

.source-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  align-self: end;
}

.source-filter-actions button {
  min-width: 78px;
  min-height: 46px;
  border-radius: 12px;
}

.source-page-actions {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 16px;
}

.source-page-actions button {
  min-height: 46px;
  border-radius: 12px;
  padding: 0 24px;
  box-shadow: var(--shadow-glow);
}

.source-table-container {
  overflow: hidden;
  border: 1px solid var(--border-light);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

.source-table-container > header {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-light);
}

.source-table-container > header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

button.source-table-btn {
  min-height: 36px;
  border-radius: 10px;
  color: var(--primary);
  background: #eef4ff;
  box-shadow: none;
}

.source-table-container .table-wrap {
  border: 0;
  border-radius: 0;
}

.source-table-container .table {
  min-width: 1120px;
}

.source-table-container .table th {
  height: 56px;
  padding: 0 20px;
  color: var(--text-muted);
  background: linear-gradient(180deg, rgba(0, 102, 255, 0.04) 0%, rgba(124, 58, 237, 0.02) 100%);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.source-table-container .table td {
  padding: 18px 20px;
  line-height: 1.55;
  font-size: 13px;
}

.commercial-company-page,
.logistics-sla-page {
  display: grid;
  gap: 20px;
}

.commercial-page-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.commercial-page-head button {
  min-height: 46px;
  border-radius: 12px;
  padding: 0 22px;
  box-shadow: var(--shadow-glow);
}

.commercial-company-table .table {
  min-width: 100%;
  table-layout: fixed;
}

.commercial-company-table .table th,
.commercial-company-table .table td {
  padding-left: 8px;
  padding-right: 8px;
  font-size: 11px;
}

.commercial-company-table .source-action-btns {
  display: grid;
  gap: 6px;
}

.dealer-headquarters-page .source-page-header h2,
.platform-customer-head h2 {
  color: #0f172a;
}

.dealer-headquarters-table .table {
  min-width: 100%;
}

.feedback-page {
  display: grid;
  gap: 20px;
}

.feedback-stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feedback-table .table {
  min-width: 100%;
  table-layout: fixed;
}

.feedback-table .table th,
.feedback-table .table td {
  padding-left: 10px;
  padding-right: 10px;
  font-size: 12px;
}

.feedback-type-tag {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 8px;
  padding: 0 9px;
  color: #047857;
  background: #d1fae5;
  font-size: 12px;
  font-weight: 800;
}

.feedback-type-tag.problem {
  color: #c2410c;
  background: #ffedd5;
}

.feedback-content {
  color: #475569;
  line-height: 1.6;
}

.feedback-detail-body {
  display: grid;
  gap: 16px;
  padding: 24px 0 0;
}

.feedback-detail-body h3 {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
  font-weight: 900;
}

.feedback-detail-body p {
  margin: 0;
  padding: 16px 18px;
  border-radius: 12px;
  color: #475569;
  background: #f8fafc;
  line-height: 1.8;
}

.feedback-images {
  display: flex;
  gap: 10px;
}

.feedback-images button {
  width: 96px;
  height: 72px;
  border-radius: 12px;
  color: var(--primary);
  background: #eff6ff;
  box-shadow: none;
}

.logistics-sla-table .table {
  min-width: 1080px;
}

.org-preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.org-preview-grid .reset-password-panel {
  grid-column: 2;
}

.org-detail-grid {
  display: grid;
  gap: 0;
  padding: 18px 24px;
}

.org-detail-grid p {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}

.org-detail-grid p:last-child {
  border-bottom: 0;
}

.org-detail-grid span {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
}

.org-detail-grid b {
  color: #0f172a;
  font-size: 14px;
}

.org-detail-panel footer {
  display: flex;
  justify-content: flex-end;
  padding: 16px 24px 22px;
}

.logistics-sla-form textarea {
  min-height: 96px;
}

.product-info {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 230px;
}

.product-image {
  width: 60px;
  height: 60px;
  flex: 0 0 60px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #667eea;
  background: #f0f5ff;
  font-weight: 800;
}

.product-details,
.customer-info,
.team-info,
.order-stats {
  display: grid;
  gap: 4px;
}

.product-name,
.customer-name {
  color: var(--text-primary);
  font-weight: 700;
}

.product-spec,
.customer-account,
.team-label,
.order-stat-label {
  color: var(--text-muted);
  font-size: 12px;
}

.source-price {
  color: var(--danger);
  font-weight: 800;
}

.number-cell {
  font-size: 15px;
  font-weight: 800;
}

.number-cell.purple {
  color: #7c3aed;
}

.number-cell.green {
  color: #16a34a;
}

.number-cell.orange {
  color: #f97316;
}

.prepay-progress-value {
  margin-bottom: 6px;
  color: var(--text-primary);
  font-weight: 700;
}

.prepay-progress {
  width: 120px;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.prepay-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--gradient-primary);
}

.source-status-tag,
.source-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
}

.source-status-tag.online,
.source-status-badge.valid {
  color: #047857;
  background: #dcfce7;
}

.source-status-tag.offline,
.source-status-badge.invalid {
  color: #b91c1c;
  background: #fee2e2;
}

.source-status-badge.pending {
  color: #b45309;
  background: #fef3c7;
}

.source-action-btns {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
}

button.source-action-btn {
  min-height: 32px;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--primary);
  background: #eff6ff;
  box-shadow: none;
  font-size: 12px;
}

button.source-action-btn.preview {
  color: #7c3aed;
  background: #f3e8ff;
}

button.source-action-btn.offline {
  color: #b91c1c;
  background: #fee2e2;
}

button.source-action-btn.online {
  color: #047857;
  background: #dcfce7;
}

.product-form-title {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
}

.product-form-title .back-btn {
  width: fit-content;
  min-height: 40px;
  border-radius: 10px;
  box-shadow: none;
}

.product-create-page {
  display: grid;
  gap: 24px;
}

.product-form-container {
  display: grid;
  gap: 20px;
  max-width: 1080px;
}

.product-form-card {
  overflow: hidden;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.product-form-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-light);
}

.product-form-card h3,
.h5-price-card h4,
.h5-info-card h4,
.h5-detail-images h4 {
  margin: 0;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 700;
}

.product-form-card header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.product-form-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
  padding: 24px;
}

.product-form-field {
  display: grid;
  gap: 8px;
}

.product-form-field.wide,
.product-switch-row.wide,
.company-code-list.wide,
.add-field-btn.wide,
.image-upload-grid.wide,
.detail-upload-grid.wide,
.product-upload-tip.wide,
.custom-field-block.wide {
  grid-column: 1 / -1;
}

.product-form-field > span,
.product-switch-row > span,
.custom-field-title {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.required {
  margin-left: 4px;
  color: var(--danger);
}

.product-form-field input,
.product-form-field select,
.product-form-field textarea,
.company-code-row input,
.company-code-row select,
.custom-field-item input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 0 14px;
  color: var(--text-primary);
  background: #f8fafc;
  font: inherit;
}

.product-form-field textarea {
  min-height: 96px;
  padding-top: 12px;
  resize: vertical;
}

.product-switch-row {
  display: grid;
  gap: 10px;
}

.product-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  cursor: pointer;
}

.product-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.product-switch i {
  position: relative;
  width: 48px;
  height: 26px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: 0.18s ease;
}

.product-switch i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.22);
  transition: 0.18s ease;
}

.product-switch input:checked + i {
  background: var(--primary);
}

.product-switch input:checked + i::after {
  transform: translateX(22px);
}

.product-switch b {
  color: var(--text-secondary);
  font-size: 13px;
}

.company-code-list {
  display: grid;
  gap: 12px;
}

.company-code-row,
.custom-field-item {
  display: grid;
  grid-template-columns: 1fr 1fr 36px;
  gap: 12px;
  align-items: center;
}

.company-delete,
.custom-field-item button {
  width: 36px;
  min-width: 36px;
  height: 36px;
  border-radius: 50%;
  padding: 0;
  color: #b91c1c;
  background: #fee2e2;
  box-shadow: none;
}

.add-field-btn {
  width: fit-content;
  min-height: 36px;
  border-radius: 10px;
  color: var(--primary);
  background: #eef4ff;
  box-shadow: none;
}

.image-upload-grid,
.detail-upload-grid {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.product-main-image,
.detail-image-box,
.image-upload-box {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #667eea;
  background: #f0f5ff;
  font-weight: 800;
}

.image-upload-box {
  border: 1px dashed #cbd5e1;
  color: var(--text-muted);
  background: #ffffff;
  box-shadow: none;
}

.image-upload-box strong {
  font-size: 28px;
  line-height: 1;
}

.image-upload-box span {
  padding: 0 8px;
  font-size: 12px;
  text-align: center;
}

.product-upload-tip {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.price-input-wrapper {
  position: relative;
}

.price-input-wrapper input {
  padding-right: 46px;
}

.price-input-wrapper span {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}

.custom-field-block {
  display: grid;
  gap: 12px;
  margin-top: 6px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}

.product-checkbox-group {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.product-checkbox-group label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 0 12px;
  color: var(--text-secondary);
  background: #f8fafc;
  font-size: 13px;
  font-weight: 700;
}

.product-checkbox-group input {
  width: 15px;
  height: 15px;
}

.product-action-bar {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 2px;
  padding: 18px 24px;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

.product-action-bar button {
  min-width: 104px;
  min-height: 42px;
  border-radius: 10px;
}

.product-save-btn {
  color: #ffffff;
  background: var(--gradient-primary);
}

.h5-preview-page {
  display: flex;
  justify-content: center;
  padding: 8px 0 40px;
}

.h5-preview-shell {
  width: 375px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #f5f5f5;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.16);
}

.h5-preview-shell > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
  padding: 0 16px;
  background: #ffffff;
  border-bottom: 1px solid #f0f0f0;
}

.h5-preview-shell > header div {
  color: #1f2937;
  font-size: 16px;
  font-weight: 700;
}

.h5-preview-shell > header span {
  border-radius: 999px;
  padding: 4px 10px;
  color: #1890ff;
  background: #e6f4ff;
  font-size: 12px;
  font-weight: 700;
}

.h5-preview-content {
  max-height: 760px;
  overflow-y: auto;
  background: #f5f5f5;
}

.h5-swiper {
  position: relative;
  background: #ffffff;
}

.h5-product-image {
  height: 375px;
  display: grid;
  place-items: center;
  color: #1890ff;
  background: #f0f5ff;
  font-size: 24px;
  font-weight: 800;
}

.h5-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.h5-dots i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
}

.h5-dots i.active {
  width: 18px;
  background: #1890ff;
}

.h5-product-info,
.h5-price-card,
.h5-info-card,
.h5-detail-images {
  margin-top: 10px;
  padding: 16px;
  background: #ffffff;
}

.h5-product-info h3 {
  margin: 0 0 8px;
  color: #1f2937;
  font-size: 20px;
  font-weight: 800;
}

.h5-product-info p {
  margin: 0;
  color: #666666;
  font-size: 14px;
  line-height: 1.6;
}

.h5-product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.h5-product-tags span {
  border-radius: 999px;
  padding: 5px 10px;
  color: #1890ff;
  background: #e6f4ff;
  font-size: 12px;
  font-weight: 700;
}

.h5-product-tags span + span {
  color: #fa8c16;
  background: #fff7e6;
}

.h5-price-card {
  display: grid;
  gap: 12px;
}

.h5-price-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 4px;
  min-height: 42px;
}

.h5-price-row div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.h5-price-row i {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.h5-price-row span,
.h5-spec-item span {
  color: #666666;
  font-size: 14px;
}

.h5-price-row strong {
  font-size: 18px;
  font-weight: 800;
}

.h5-price-row em {
  color: #999999;
  font-size: 12px;
  font-style: normal;
}

.h5-price-row .supply {
  color: #f5222d;
}

.h5-price-row i.supply {
  color: #ffffff;
  background: #f5222d;
}

.h5-price-row .dealer {
  color: #fa8c16;
}

.h5-price-row i.dealer {
  color: #ffffff;
  background: #fa8c16;
}

.h5-price-row .province {
  color: #1890ff;
}

.h5-price-row i.province {
  color: #ffffff;
  background: #1890ff;
}

.h5-price-row .city {
  color: #722ed1;
}

.h5-price-row i.city {
  color: #ffffff;
  background: #722ed1;
}

.h5-price-row .customer {
  color: #52c41a;
}

.h5-price-row i.customer {
  color: #ffffff;
  background: #52c41a;
}

.h5-spec-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.h5-spec-item {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: start;
}

.h5-spec-item b {
  color: #333333;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
}

.h5-detail-images {
  display: grid;
  gap: 12px;
}

.h5-detail-images div {
  height: 180px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #1890ff;
  background: #f0f5ff;
  font-weight: 800;
}

.h5-preview-shell > footer {
  padding: 16px;
  border-top: 1px solid #f0f0f0;
  color: #999999;
  background: #ffffff;
  font-size: 13px;
  text-align: center;
}

.customer-type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  border-radius: 8px;
  padding: 0 12px;
  color: #7e22ce;
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.12) 0%, rgba(147, 51, 234, 0.06) 100%);
  font-size: 12px;
  font-weight: 700;
}

.customer-type svg {
  width: 16px;
  height: 16px;
}

.customer-type.pharmacy {
  color: #2563eb;
  background: #eff6ff;
}

.prepay-customer-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
}

.customer-avatar {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: var(--gradient-primary);
  font-size: 16px;
  font-weight: 800;
}

.prepay-customer-type {
  width: fit-content;
  margin-top: 4px;
  border-radius: 999px;
  padding: 2px 8px;
  color: #7c3aed;
  background: #f3e8ff;
  font-size: 12px;
  font-weight: 700;
}

.team-item,
.order-stat-item {
  display: flex;
  gap: 4px;
  align-items: center;
  white-space: nowrap;
}

.team-value,
.order-stat-value {
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
}

.customer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 130px;
}

.customer-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 7px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
}

.customer-tag.blue {
  color: #1d4ed8;
  background: #dbeafe;
}

.customer-tag.green {
  color: #047857;
  background: #dcfce7;
}

.customer-tag.red {
  color: #b91c1c;
  background: #fee2e2;
}

.customer-tag.orange {
  color: #c2410c;
  background: #ffedd5;
}

.customer-tag.gray {
  color: #475569;
  background: #f1f5f9;
}

.platform-customer-table .table {
  min-width: 100%;
  table-layout: fixed;
}

.platform-customer-table .table th,
.platform-customer-table .table td {
  padding-left: 8px;
  padding-right: 8px;
  font-size: 11px;
  vertical-align: top;
}

.platform-customer-table .table th:nth-child(1),
.platform-customer-table .table td:nth-child(1) {
  width: 12%;
}

.platform-customer-table .table th:nth-child(3),
.platform-customer-table .table td:nth-child(3) {
  width: 11%;
}

.platform-customer-table .table th:nth-child(7),
.platform-customer-table .table td:nth-child(7),
.platform-customer-table .table th:nth-child(8),
.platform-customer-table .table td:nth-child(8) {
  width: 10%;
}

.dealer-cell,
.refund-stats {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.dealer-cell b,
.refund-stats b {
  color: #0f172a;
  font-weight: 800;
}

.dealer-cell span,
.refund-stat-label {
  color: #64748b;
  font-size: 11px;
}

.refund-stats > div {
  display: grid;
  gap: 2px;
}

.customer-detail-page {
  display: grid;
  gap: 18px;
}

.customer-profile-hero {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--border-light);
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: var(--shadow-md);
}

.customer-avatar.large {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  font-size: 28px;
}

.customer-profile-hero h2 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 26px;
  font-weight: 900;
}

.customer-profile-hero p {
  margin: 0 0 12px;
  color: #64748b;
}

.customer-profile-status {
  display: grid;
  justify-items: end;
  gap: 10px;
  color: #64748b;
  font-size: 13px;
}

.qualification-stats-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.qualification-audit-stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.qualification-cert-view-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.platform-qualification-audit-table .table,
.platform-cert-view-table .table {
  min-width: 100%;
  table-layout: fixed;
}

.platform-qualification-audit-table .table th,
.platform-qualification-audit-table .table td,
.platform-cert-view-table .table th,
.platform-cert-view-table .table td {
  padding-left: 8px;
  padding-right: 8px;
  font-size: 11px;
  vertical-align: top;
}

.platform-qualification-list .qualification-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.platform-qualification-detail-page .qualification-customer-meta {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.qualification-review-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 18px 22px 22px;
  border-top: 1px solid var(--border-light);
  background: #ffffff;
}

.qualification-list {
  display: grid;
  gap: 18px;
}

.qualification-item,
.qualification-customer-card,
.qualification-tab-section {
  border: 1px solid var(--border-light);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

.qualification-item {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.qualification-item header,
.qualification-customer-card header,
.qualification-cert-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.qualification-item h3,
.qualification-customer-card h2,
.qualification-cert-card h4 {
  margin: 0;
  color: #0f172a;
  font-weight: 900;
}

.qualification-item h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.qualification-item .view-detail-btn {
  min-height: 38px;
  border-radius: 10px;
  color: var(--primary);
  background: #eef4ff;
  box-shadow: none;
}

.qualification-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 32px;
  color: #64748b;
  font-size: 13px;
}

.qualification-meta b {
  color: #94a3b8;
}

.qualification-cert-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.qualification-cert-stats div {
  min-height: 68px;
  display: grid;
  place-items: center;
  gap: 4px;
  border-radius: 14px;
  color: #475569;
  background: #f8fafc;
}

.qualification-cert-stats span {
  font-size: 12px;
  font-weight: 700;
}

.qualification-cert-stats b {
  font-size: 22px;
  font-weight: 900;
}

.qualification-cert-stats .valid {
  color: #047857;
  background: #dcfce7;
}

.qualification-cert-stats .auditing {
  color: #1d4ed8;
  background: #dbeafe;
}

.qualification-cert-stats .expiring {
  color: #b45309;
  background: #fef3c7;
}

.qualification-cert-stats .expired {
  color: #b91c1c;
  background: #fee2e2;
}

.qualification-detail-page {
  display: grid;
  gap: 18px;
}

.qualification-customer-card {
  padding: 24px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}

.qualification-customer-card h2 {
  margin-bottom: 10px;
  font-size: 24px;
}

.qualification-customer-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.qualification-customer-meta div {
  padding: 14px;
  border-radius: 12px;
  background: #f8fafc;
}

.qualification-customer-meta span,
.qualification-cert-info span {
  display: block;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
}

.qualification-customer-meta b,
.qualification-cert-info b {
  display: block;
  margin-top: 6px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.qualification-tab-section {
  overflow: hidden;
}

.qualification-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--border-light);
  background: #ffffff;
}

.qualification-tabs button {
  min-height: 56px;
  border-radius: 0;
  padding: 0 22px;
  color: #64748b;
  background: transparent;
  box-shadow: none;
  font-weight: 800;
}

.qualification-tabs button.active {
  color: var(--primary);
  box-shadow: inset 0 -3px 0 var(--primary);
}

.qualification-tabs span {
  margin-left: 6px;
  border-radius: 999px;
  padding: 2px 7px;
  color: inherit;
  background: #eef2ff;
  font-size: 12px;
}

.qualification-cert-list {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.qualification-cert-card {
  display: grid;
  gap: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 18px;
  background: #ffffff;
}

.qualification-cert-card header > div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.qualification-cert-card h4 {
  font-size: 17px;
}

.qualification-cert-card em {
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.qualification-cert-card.valid em {
  color: #047857;
  background: #dcfce7;
}

.qualification-cert-card.auditing em {
  color: #1d4ed8;
  background: #dbeafe;
}

.qualification-cert-card.expiring em {
  color: #b45309;
  background: #fef3c7;
}

.qualification-cert-card.expired,
.qualification-cert-card.reupload {
  border-color: #fecaca;
}

.qualification-cert-card.expired em,
.qualification-cert-card.reupload em {
  color: #b91c1c;
  background: #fee2e2;
}

.qualification-cert-card.not-submitted em {
  color: #475569;
  background: #f1f5f9;
}

.cert-required,
.cert-optional {
  font-size: 12px;
  font-weight: 800;
}

.cert-required {
  color: #ef4444;
}

.cert-optional {
  color: #94a3b8;
}

.qualification-audit {
  display: grid;
  gap: 4px;
  border-radius: 12px;
  padding: 12px;
  font-size: 13px;
}

.qualification-audit b {
  font-weight: 900;
}

.qualification-audit.reupload {
  color: #b91c1c;
  background: #fff1f2;
}

.qualification-audit.auditing {
  color: #1d4ed8;
  background: #eff6ff;
}

.qualification-cert-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.qualification-cert-info div {
  border-radius: 12px;
  padding: 12px;
  background: #f8fafc;
}

.qualification-cert-images {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.qualification-cert-image {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  color: #2563eb;
  background: #eff6ff;
  box-shadow: none;
  font-weight: 900;
}

.qualification-cert-image.empty {
  color: #94a3b8;
  border-style: dashed;
  background: #f8fafc;
}

.qualification-cert-image.empty span {
  font-size: 26px;
  line-height: 1;
}

.commercial-code-query-page,
.commercial-qualification-audit-page,
.commercial-qualification-detail-page,
.commercial-certificate-audit-page {
  display: grid;
  gap: 18px;
}

.commercial-code-stats,
.commercial-qualification-stats,
.commercial-certificate-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.commercial-code-filter .source-filter-row,
.commercial-qualification-filter .source-filter-row,
.commercial-certificate-filter .source-filter-row {
  grid-template-columns: repeat(4, minmax(180px, 1fr)) auto;
}

.commercial-code-table,
.commercial-qualification-table,
.commercial-certificate-table {
  overflow: hidden;
}

.commercial-code-table .table,
.commercial-qualification-table .table,
.commercial-certificate-table .table {
  min-width: 1040px;
}

.commercial-type-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.commercial-type-pill.pharmacy {
  color: #047857;
  background: #ecfdf5;
}

.commercial-type-pill.clinic {
  color: #7c3aed;
  background: #f5f3ff;
}

.commercial-cert-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.commercial-cert-status span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #64748b;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 800;
}

.commercial-cert-status i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
}

.commercial-cert-status .valid {
  color: #059669;
  background: #ecfdf5;
}

.commercial-cert-status .pending {
  color: #d97706;
  background: #fffbeb;
}

.commercial-cert-status .expired {
  color: #dc2626;
  background: #fef2f2;
}

.commercial-detail-card,
.commercial-summary-bar,
.commercial-reject-sample,
.commercial-certificate-modal {
  border: 1px solid var(--border-light);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.commercial-detail-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  position: relative;
}

.commercial-detail-card::before,
.commercial-reject-sample::before,
.commercial-certificate-modal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
}

.commercial-detail-card h3,
.commercial-reject-sample h3,
.commercial-certificate-modal h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  font-weight: 900;
}

.commercial-detail-card h3 svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
}

.commercial-submitter-info {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  color: #475569;
  font-size: 14px;
}

.commercial-submitter-info b {
  color: #0f172a;
}

.commercial-submitter-tip {
  margin: 0;
  border-radius: 12px;
  padding: 12px 14px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 13px;
  font-weight: 700;
}

.commercial-customer-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.commercial-customer-title h2 {
  margin: 0;
  color: #0f172a;
  font-size: 24px;
  font-weight: 900;
}

.commercial-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.commercial-info-item {
  display: grid;
  gap: 8px;
  border-radius: 12px;
  padding: 12px;
  background: #f8fafc;
}

.commercial-info-item.span-2 {
  grid-column: span 2;
}

.commercial-info-item span,
.commercial-cert-form span,
.commercial-modal-audit span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.commercial-info-item b {
  color: #334155;
  font-size: 13px;
}

.commercial-info-item input,
.commercial-region-selects select,
.commercial-cert-form input,
.commercial-modal-audit input,
.commercial-modal-audit textarea,
.commercial-reject-sample textarea {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  color: #0f172a;
  background: #ffffff;
  font: inherit;
}

.commercial-region-selects {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.commercial-scope-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.commercial-scope-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  padding: 12px;
  background: #f8fafc;
  color: #334155;
  font-weight: 800;
}

.commercial-scope-grid label span {
  min-width: 0;
  white-space: nowrap;
}

.commercial-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
}

.commercial-summary-bar div {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: #64748b;
  font-weight: 800;
}

.commercial-summary-bar b {
  color: var(--primary);
  font-size: 22px;
}

.commercial-cert-list {
  display: grid;
  gap: 16px;
}

.commercial-audit-cert-card {
  display: grid;
  gap: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.commercial-audit-cert-card.expiring {
  border-color: #fde68a;
  background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%);
}

.commercial-audit-cert-card header,
.commercial-audit-cert-card header > div,
.commercial-audit-cert-card footer,
.commercial-certificate-modal header,
.commercial-reject-sample header,
.commercial-certificate-modal footer,
.commercial-reject-sample footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.commercial-audit-cert-card h4 {
  margin: 0;
  color: #0f172a;
  font-size: 17px;
  font-weight: 900;
}

.commercial-audit-cert-card em {
  border-radius: 999px;
  padding: 5px 12px;
  color: #047857;
  background: #dcfce7;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.commercial-audit-cert-card.auditing em {
  color: #1d4ed8;
  background: #dbeafe;
}

.commercial-audit-cert-card.expiring em {
  color: #b45309;
  background: #fef3c7;
}

.commercial-audit-cert-card.reupload em,
.commercial-audit-cert-card.expired em {
  color: #b91c1c;
  background: #fee2e2;
}

.commercial-cert-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.commercial-cert-form label,
.commercial-cert-form div {
  display: grid;
  gap: 7px;
}

.commercial-cert-form em {
  color: #94a3b8;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
}

.commercial-cert-form b {
  color: #334155;
  font-size: 13px;
}

.commercial-cert-images,
.commercial-modal-images {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.commercial-cert-image,
.commercial-modal-images button {
  width: 116px;
  min-height: 88px;
  display: grid;
  place-items: center;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 10px;
  color: #1d4ed8;
  background: #eff6ff;
  box-shadow: none;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.commercial-cert-image.image-2,
.commercial-modal-images button:nth-child(2) {
  color: #047857;
  border-color: #bbf7d0;
  background: #ecfdf5;
}

.commercial-cert-image.image-3 {
  color: #c2410c;
  border-color: #fed7aa;
  background: #fff7ed;
}

.commercial-reject-sample,
.commercial-certificate-modal {
  display: grid;
  gap: 16px;
  padding: 20px;
  position: relative;
}

.commercial-reject-sample[hidden],
.commercial-certificate-modal[hidden] {
  display: none;
}

.commercial-certificate-table .submitter-info {
  display: grid;
  gap: 3px;
}

.commercial-certificate-table .submitter-info b,
.commercial-certificate-table .submitter-info span {
  display: block;
}

.commercial-certificate-table .submitter-info span {
  color: #64748b;
  font-size: 12px;
}

.commercial-reject-sample header button,
.commercial-certificate-modal header button {
  min-width: 32px;
  height: 32px;
  border-radius: 999px;
  padding: 0;
  color: #64748b;
  background: #f1f5f9;
  box-shadow: none;
}

.reason-tags,
.quick-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reason-tags button,
.quick-reasons button {
  border-radius: 999px;
  padding: 8px 12px;
  color: #475569;
  background: #f8fafc;
  box-shadow: none;
  font-size: 12px;
}

.commercial-modal-info {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.commercial-modal-info span {
  border-radius: 12px;
  padding: 11px 12px;
  color: #64748b;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 800;
}

.commercial-modal-info b {
  display: block;
  margin-top: 5px;
  color: #0f172a;
}

.commercial-modal-audit {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.commercial-modal-audit label {
  display: grid;
  gap: 7px;
}

.commercial-modal-audit textarea {
  grid-column: 1 / -1;
  min-height: 86px;
  resize: vertical;
}

.commercial-modal-audit .quick-reasons {
  grid-column: 1 / -1;
}

.customer-detail-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.customer-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.customer-detail-layout main,
.customer-detail-layout aside {
  display: grid;
  gap: 18px;
}

.customer-detail-card {
  border: 1px solid var(--border-light);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.customer-detail-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-light);
  background: #f8fafc;
}

.customer-detail-card h3 {
  margin: 0;
  color: #0f172a;
  font-size: 17px;
  font-weight: 900;
}

.customer-detail-card .table-wrap {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.platform-customer-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.platform-customer-detail-page .customer-detail-card .table {
  min-width: 100%;
  table-layout: fixed;
}

.platform-customer-detail-page .customer-detail-card .table th,
.platform-customer-detail-page .customer-detail-card .table td {
  padding-left: 10px;
  padding-right: 10px;
  font-size: 12px;
}

.platform-chart-body {
  padding: 18px 20px 22px;
}

.order-type-distribution {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 22px;
}

.order-type-distribution div {
  min-height: 104px;
  display: grid;
  place-items: center;
  gap: 6px;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  background: #f8fafc;
}

.order-type-distribution b {
  color: var(--primary);
  font-size: 24px;
  font-weight: 900;
}

.order-type-distribution span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.platform-top-products {
  display: grid;
  gap: 0;
  padding: 10px 22px 18px;
}

.platform-top-products p {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.platform-top-products p:last-child {
  border-bottom: 0;
}

.platform-top-products span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.platform-top-products b {
  overflow: hidden;
  color: #0f172a;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-top-products i {
  color: #64748b;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}

.section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.section-tabs button {
  min-height: 32px;
  border-radius: 999px;
  padding: 0 12px;
  color: #64748b;
  background: #eef2f7;
  box-shadow: none;
  font-size: 12px;
}

.section-tabs button.active {
  color: #ffffff;
  background: var(--primary);
}

.customer-visit-list {
  display: grid;
  gap: 12px;
  padding: 18px 22px;
}

.customer-visit-list article {
  padding: 14px;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  background: #fbfdff;
}

.customer-visit-list b {
  color: #0f172a;
}

.customer-visit-list p {
  margin: 8px 0;
  color: #475569;
  line-height: 1.65;
}

.customer-visit-list span {
  color: #94a3b8;
  font-size: 12px;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 170px;
}

.product-tag {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 7px;
  padding: 0 8px;
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 12px;
  font-weight: 700;
}

.product-tag.more {
  color: #7c3aed;
  background: #f3e8ff;
}

.prepay-table-container .table {
  min-width: 980px;
}

.platform-prepay-products-page .prepay-table-container .table,
.platform-prepay-customers-page .prepay-table-container .table {
  min-width: 1160px;
}

.prepay-detail-modal-preview {
  overflow: hidden;
  border: 1px solid var(--border-light);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

.prepay-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  min-height: 68px;
  padding: 0 28px;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(180deg, rgba(0, 102, 255, 0.03) 0%, transparent 100%);
}

.prepay-modal-head strong {
  color: #0f172a;
  font-size: 18px;
}

.prepay-modal-head button {
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--text-muted);
  background: #f8fafc;
  box-shadow: none;
}

.prepay-customer-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 24px 28px;
  border-bottom: 1px solid var(--border-light);
  background: #f8fafc;
}

.prepay-customer-summary div {
  display: flex;
  gap: 6px;
  align-items: center;
  min-height: 36px;
}

.prepay-customer-summary span {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}

.prepay-customer-summary b {
  color: #0f172a;
}

.prepay-customer-summary b.purple {
  color: #9333ea;
}

.prepay-customer-summary b.green {
  color: #16a34a;
}

.prepay-customer-summary b.orange {
  color: #f59e0b;
}

.prepay-detail-modal-preview .table-wrap {
  border: 0;
  border-radius: 0;
}

.prepay-detail-modal-preview .table {
  min-width: 940px;
}

.prepay-modal-footer {
  display: flex;
  justify-content: flex-end;
  padding: 18px 28px;
  border-top: 1px solid var(--border-light);
  background: #f8fafc;
}

.source-pagination {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  border-top: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 13px;
}

.source-pagination b {
  color: var(--primary);
}

.source-path {
  display: block;
  max-width: 520px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coverage-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: #f8fafc;
}

.coverage-strip b,
.coverage-strip span {
  display: block;
}

.coverage-strip span {
  margin-top: 4px;
}

.coverage-meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.coverage-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--gradient-primary);
}

.source-preview-shell {
  display: grid;
  gap: 12px;
}

.source-preview-head {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: #f8fafc;
}

.source-preview-head code {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-preview-frame {
  width: 100%;
  height: min(72vh, 760px);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: #ffffff;
}

.modal-panel:has(.source-preview-frame) {
  width: min(1180px, calc(100vw - 32px));
}

.material-page {
  display: grid;
  gap: 18px;
}

.material-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.material-page-head p {
  margin-top: 6px;
}

.material-filter-section {
  margin-bottom: 0;
}

.material-table-card .table {
  min-width: 980px;
}

.sort-handle {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  color: #94a3b8;
  background: #f8fafc;
  font-weight: 800;
}

.material-category-name {
  color: #0f172a;
  font-weight: 700;
}

.material-route-toolbar {
  margin-bottom: 12px;
}

.material-toolbar-card {
  overflow: hidden;
  padding: 0;
}

.material-toolbar-card .table-wrap {
  border-radius: 0;
  border-right: 0;
  border-left: 0;
}

.material-search-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px 130px 130px auto;
  gap: 12px;
  align-items: center;
  padding: 18px;
  border-bottom: 1px solid var(--border-light);
}

.material-search-bar.compact {
  grid-template-columns: minmax(260px, 420px) auto;
  justify-content: start;
}

.material-title-cell {
  min-width: 300px;
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.material-title-cell b {
  display: block;
  color: #0f172a;
}

.material-title-cell p {
  margin: 4px 0 0;
  color: #94a3b8;
  font-size: 12px;
}

.material-cover {
  width: 80px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #667eea, #764ba2);
  font-size: 12px;
  font-weight: 800;
}

.material-cover.green {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.material-cover.cyan {
  background: linear-gradient(135deg, #1890ff, #2563eb);
}

.material-cover.red {
  background: linear-gradient(135deg, #ff4d4f, #dc2626);
}

.material-cover.purple {
  background: linear-gradient(135deg, #7c3aed, #9333ea);
}

.material-cover.gray {
  background: linear-gradient(135deg, #64748b, #475569);
}

.material-type-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 800;
}

.material-type-pill.video {
  color: #1d4ed8;
  background: #dbeafe;
}

.material-type-pill.image {
  color: #047857;
  background: #dcfce7;
}

.material-type-pill.audio {
  color: #7c2d12;
  background: #ffedd5;
}

.course-duration {
  min-width: 58px;
  display: inline-flex;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 10px;
  color: #475569;
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 800;
}

.material-stats {
  display: grid;
  gap: 4px;
  color: #64748b;
  font-size: 12px;
  white-space: nowrap;
}

.material-modal-preview .form-grid label {
  display: grid;
  gap: 6px;
}

.form-actions {
  display: flex;
  gap: 10px;
  align-items: end;
  justify-content: flex-end;
}

.required-mark {
  color: #ef4444;
  font-weight: 800;
}

.material-type-selector {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.material-type-selector button {
  min-height: 74px;
  display: grid;
  justify-items: start;
  gap: 4px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  padding: 14px;
  color: #334155;
  background: #ffffff;
  box-shadow: none;
}

.material-type-selector button.active {
  border-color: #0066ff;
  color: #0052cc;
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.08), rgba(124, 58, 237, 0.06));
}

.material-type-selector span {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
}

.material-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.material-upload-grid div {
  min-height: 156px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  border: 2px dashed #dbe3ef;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  background: #f8fafc;
}

.material-upload-grid span {
  color: #2563eb;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
}

.material-upload-grid p {
  margin: 0;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.material-upload-grid em {
  color: #94a3b8;
  font-size: 12px;
  font-style: normal;
}

.course-upload-grid div {
  min-height: 146px;
}

.notice-page {
  display: grid;
  gap: 18px;
}

.notice-page-head {
  align-items: center;
}

.notice-table-card {
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: var(--shadow-md);
}

.notice-action-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  min-height: 78px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
  background: #ffffff;
}

.notice-search-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 140px;
  gap: 12px;
  width: min(460px, 100%);
}

.notice-search-box {
  position: relative;
}

.notice-search-box span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.notice-search-box input,
.notice-search-filters select {
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
  background: #f8fafc;
}

.notice-table-card .table-wrap {
  border: 0;
  border-radius: 0;
}

.notice-table-card .table {
  min-width: 980px;
}

.notice-table-card .table th {
  height: 56px;
  color: #7c8aa5;
  background: linear-gradient(180deg, #fbfdff 0%, #f8fafc 100%);
}

.notice-table-card .table td {
  padding: 18px 14px;
}

.notice-sort {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  color: #64748b;
  background: #f1f5f9;
  font-size: 13px;
  font-weight: 800;
}

.notice-title-link {
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--primary);
  background: transparent;
  box-shadow: none;
  font-weight: 800;
}

.notice-title-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
  transform: none;
  box-shadow: none;
}

.notice-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 12px;
  border-radius: 6px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.notice-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.notice-status.published {
  color: #047857;
  background: #d1fae5;
}

.notice-status.draft {
  color: #92400e;
  background: #fef3c7;
}

.notice-status.offline {
  color: #64748b;
  background: #f1f5f9;
}

.notice-delete-preview {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid #fee2e2;
  border-radius: 16px;
  color: #991b1b;
  background: #fff7f7;
}

.notice-delete-preview div:first-child {
  display: grid;
  gap: 4px;
}

.notice-delete-preview span {
  color: #ef4444;
  font-size: 13px;
}

.notice-detail-card,
.notice-form-container {
  border: 1px solid var(--border-light);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.notice-detail-card {
  padding: 0;
}

.notice-detail-header {
  padding: 32px 36px 24px;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.04), rgba(124, 58, 237, 0.05));
}

.notice-detail-header h2 {
  margin: 0;
  color: #0f172a;
  font-size: 28px;
  font-weight: 800;
}

.notice-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin-top: 16px;
  color: #64748b;
  font-size: 14px;
}

.notice-rich-content,
.notice-editor-content {
  color: #0f172a;
  font-size: 14px;
  line-height: 1.85;
}

.notice-rich-content {
  padding: 30px 36px;
}

.notice-rich-content h3,
.notice-editor-content h3 {
  margin: 0 0 16px;
  color: var(--primary);
  font-size: 18px;
}

.notice-rich-content p,
.notice-editor-content p {
  margin: 0 0 12px;
}

.notice-rich-content ul,
.notice-editor-content ul {
  margin: 0 0 12px;
  padding-left: 24px;
}

.notice-emphasis {
  color: #ff4d4f;
  font-weight: 800;
}

.notice-signature {
  margin-top: 24px;
  color: #94a3b8;
  font-size: 13px;
}

.notice-form-container {
  padding: 0 32px 28px;
}

.notice-form-section {
  padding: 28px 0;
  border-bottom: 1px solid var(--border-light);
}

.notice-form-section h3 {
  margin: 0 0 20px;
  color: #0f172a;
  font-size: 18px;
  font-weight: 800;
}

.notice-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 20px;
}

.notice-form-row.single {
  grid-template-columns: 1fr;
}

.notice-form-group {
  display: grid;
  gap: 10px;
}

.notice-form-group > span {
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
}

.notice-form-group b {
  margin-left: 4px;
  color: #ef4444;
}

.notice-form-group input {
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
  background: #f8fafc;
}

.notice-form-group input:focus {
  background: #ffffff;
}

.notice-form-group em {
  color: #94a3b8;
  font-size: 12px;
  font-style: normal;
}

.notice-switch {
  min-height: 46px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.notice-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.notice-switch i {
  position: relative;
  width: 48px;
  height: 26px;
  border-radius: 999px;
  background: var(--gradient-primary);
}

.notice-switch i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 25px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.notice-switch strong {
  color: #64748b;
  font-size: 14px;
}

.notice-color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 46px;
  align-items: center;
}

.notice-color-option {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 2px solid #dbe3ef;
  border-radius: 10px;
  padding: 0;
  background: #ffffff;
  box-shadow: none;
}

.notice-color-option i {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--notice-color);
}

.notice-color-option.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.14);
}

.notice-color-option.active::after {
  content: "✓";
  position: absolute;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
}

.notice-tag-preview {
  min-height: 50px;
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: #f1f5f9;
}

.notice-tag-preview > span:not(.notice-tag) {
  color: #94a3b8;
  font-size: 13px;
}

.notice-editor {
  border: 1px solid var(--border-light);
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}

.notice-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  background: #f1f5f9;
}

.notice-toolbar-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 0;
  color: #475569;
  background: #ffffff;
  box-shadow: none;
  font-size: 13px;
  font-weight: 800;
}

.notice-toolbar-btn:hover {
  color: #ffffff;
  background: var(--primary);
  border-color: var(--primary);
}

.notice-toolbar-divider {
  width: 1px;
  height: 36px;
  margin: 0 4px;
  background: var(--border-light);
}

.notice-editor-content {
  min-height: 400px;
  padding: 20px;
  outline: none;
}

.notice-editor-content:empty::before {
  content: "请输入公告内容...";
  color: #94a3b8;
}

.notice-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 24px 0 0;
}

.notice-detail-card .notice-form-actions {
  padding: 0 36px 30px;
}

.review-page,
.review-detail-page {
  display: grid;
  gap: 20px;
}

.review-page-head {
  align-items: center;
}

.review-page-head > button {
  justify-self: end;
  width: fit-content;
}

.review-stats article {
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 8px;
  border: 1px solid #dfe7f2;
  border-top: 3px solid #0066ff;
  border-radius: 16px;
  padding: 20px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.review-stats span {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.review-stats b {
  color: #0f172a;
  font-size: 30px;
  font-weight: 900;
}

.review-stats em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.review-stats article {
  border-top-color: #0066ff;
}

.review-filter .source-filter-row {
  grid-template-columns: repeat(5, minmax(130px, 1fr)) auto;
}

.review-table .order-products {
  display: grid;
  gap: 6px;
}

.review-table .order-products small {
  color: #2563eb;
  font-weight: 800;
}

.review-type {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 2px 10px;
  color: #0066ff;
  background: #eaf2ff;
  font-size: 12px;
  font-weight: 900;
}

.review-type.prepay {
  color: #7c3aed;
  background: #f1e8ff;
}

.review-type.pickup {
  color: #ea580c;
  background: #fff3e6;
}

.review-card-list {
  display: grid;
  gap: 16px;
}

.review-order-card {
  overflow: hidden;
  border: 1px solid #dfe7f2;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.review-order-card > header,
.review-order-card > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
}

.review-order-card > header {
  border-bottom: 1px solid #e2e8f0;
}

.review-order-card > footer {
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

.review-order-card header > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.review-order-card header b {
  color: #0f172a;
  font-size: 15px;
}

.review-order-card header small {
  color: #64748b;
  font-size: 12px;
}

.review-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 18px 22px;
}

.review-card-grid p {
  margin: 0;
  display: grid;
  gap: 6px;
  color: #0f172a;
}

.review-card-grid p.full {
  grid-column: 1 / -1;
}

.review-card-grid span {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
}

.review-card-grid b {
  font-size: 14px;
}

.review-order-card section {
  padding: 0 22px 20px;
}

.review-order-card h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
}

.review-order-card h4 em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
}

.review-products {
  display: grid;
  gap: 10px;
}

.review-products article {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #edf2f7;
  border-radius: 12px;
  padding: 12px;
  background: #ffffff;
}

.review-products.compact article:nth-child(n+3) {
  display: none;
}

.review-products i {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #2563eb;
  background: #eff6ff;
  font-style: normal;
  font-weight: 900;
}

.review-products div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.review-products b {
  color: #0f172a;
  font-size: 14px;
}

.review-products span {
  color: #64748b;
  font-size: 12px;
}

.review-products strong {
  color: #ef4444;
  font-size: 13px;
  white-space: nowrap;
}

.review-detail-back {
  display: flex;
  justify-content: flex-start;
}

.review-detail-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-radius: 18px;
  padding: 26px 30px;
  color: #ffffff;
  background: linear-gradient(135deg, #0066ff, #7c3aed);
  box-shadow: 0 18px 42px rgba(0, 102, 255, 0.18);
}

.review-detail-title h2 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 28px;
  font-weight: 900;
}

.review-detail-title p {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-flow-card,
.review-detail-card,
.review-refund-card,
.review-info-card {
  overflow: hidden;
  border: 1px solid #dfe7f2;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.review-flow-card h3,
.review-refund-card h3 {
  margin: 0;
  border-bottom: 1px solid #e2e8f0;
  padding: 18px 22px;
  color: #0f172a;
  font-size: 17px;
  font-weight: 900;
}

.review-timeline {
  display: grid;
  padding: 4px 22px 20px;
}

.review-timeline article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  border-bottom: 1px solid #e2e8f0;
  padding: 18px 0;
}

.review-timeline article:last-child {
  border-bottom: 0;
}

.review-timeline i {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: #cbd5e1;
  font-style: normal;
  font-weight: 900;
}

.review-timeline article.completed i,
.review-timeline article.current i {
  background: linear-gradient(135deg, #0066ff, #7c3aed);
}

.review-timeline header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.review-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.review-info-grid span {
  display: grid;
  gap: 4px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
}

.review-info-grid em {
  color: #94a3b8;
  font-size: 12px;
  font-style: normal;
}

.review-timeline p {
  margin: 0;
  display: grid;
  gap: 4px;
  border-radius: 10px;
  padding: 10px 12px;
  color: #475569;
  background: #f8fafc;
  font-size: 13px;
}

.review-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: start;
}

.review-detail-layout main,
.review-detail-layout aside {
  display: grid;
  gap: 20px;
}

.review-detail-card > header,
.review-info-card > header {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e2e8f0;
  padding: 0 22px;
}

.review-detail-card h3,
.review-info-card h3 {
  margin: 0;
  color: #0f172a;
  font-size: 17px;
  font-weight: 900;
}

.review-detail-card .review-products {
  padding: 20px 22px;
}

.review-fee-line {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #e2e8f0;
  padding: 16px 22px;
  background: #f8fafc;
  color: #334155;
  font-weight: 900;
}

.review-fee-line b,
.highlight {
  color: #ef4444 !important;
}

.review-refund-card p,
.review-info-card p {
  margin: 0;
  display: grid;
  gap: 6px;
  padding: 14px 22px;
  border-bottom: 1px solid #eef2f7;
}

.review-refund-card p:last-of-type,
.review-info-card p:last-of-type {
  border-bottom: 0;
}

.review-refund-card span,
.review-info-card span {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
}

.review-refund-card b,
.review-info-card b {
  color: #0f172a;
  font-size: 14px;
}

.review-refund-card em {
  display: block;
  margin: 0 22px 20px;
  border-radius: 12px;
  padding: 12px;
  color: #b45309;
  background: #fff7ed;
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.review-action-stack {
  display: grid;
  gap: 10px;
  padding: 16px 22px 22px;
}

.review-action-stack .green,
.review-action-stack .red {
  min-height: 42px;
}

.review-action-stack p {
  margin: 0;
  border: 0;
  padding: 10px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
}

.metric-checkbox-grid label,
.permission-tree label {
  width: auto;
  min-height: auto;
  display: inline-flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
  color: #475569;
  font-size: 13px;
  line-height: 1.4;
  white-space: normal;
}

.metric-checkbox-grid input[type="checkbox"],
.permission-tree input[type="checkbox"] {
  width: 16px;
  min-width: 16px;
  max-width: 16px;
  height: 16px;
  min-height: 16px;
  max-height: 16px;
  flex: 0 0 16px;
  margin: 0;
  padding: 0;
  border-radius: 3px;
  accent-color: var(--primary);
}

.metric-checkbox-grid span,
.permission-tree span,
.permission-tree b {
  display: inline;
  min-width: 0;
  color: inherit;
  line-height: 1.4;
  word-break: keep-all;
}

.commercial-source-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.commercial-source-head span {
  color: var(--text-muted);
  font-size: 13px;
}

.commercial-source-head h2 {
  margin: 6px 0 0;
  color: var(--text-primary);
  font-size: 24px;
}

.commercial-view-tabs,
.commercial-period-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.commercial-view-tabs b {
  color: var(--text-secondary);
  font-size: 13px;
}

.commercial-view-tabs button,
.commercial-period-tabs button,
.commercial-month-grid button {
  min-height: 34px;
  border-radius: 8px;
  padding: 0 12px;
  color: #475569;
  background: #eef2f7;
  box-shadow: none;
  font-size: 13px;
}

.commercial-view-tabs button.active,
.commercial-period-tabs button.active,
.commercial-month-grid button.active {
  color: #ffffff;
  background: var(--primary);
}

.commercial-view-tabs em {
  font-style: normal;
  font-weight: 800;
}

.commercial-order-list-page,
.commercial-order-detail-page,
.commercial-stats-page {
  display: grid;
  gap: 18px;
}

.commercial-order-filter .source-filter-row {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
}

.commercial-order-card-list {
  display: grid;
  gap: 14px;
}

.commercial-order-card {
  overflow: hidden;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.commercial-order-card > header,
.commercial-order-card > footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
  background: #f8fafc;
}

.commercial-order-card > header div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
}

.commercial-order-card > header b {
  color: #0f172a;
}

.commercial-order-card > header span {
  color: var(--text-muted);
  font-size: 13px;
}

.commercial-order-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 18px;
  padding: 18px 20px;
}

.commercial-order-card h3,
.commercial-order-card p {
  margin: 0;
}

.commercial-order-card h3 {
  margin-bottom: 12px;
  color: #0f172a;
  font-size: 15px;
}

.commercial-order-card aside {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 14px;
  border-radius: 12px;
  background: #f8fafc;
}

.commercial-order-card aside p {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 8px;
  color: #475569;
  font-size: 13px;
}

.commercial-order-card aside em {
  color: #ef4444;
  font-style: normal;
  font-size: 12px;
  line-height: 1.6;
}

.commercial-order-products {
  display: grid;
  gap: 8px;
}

.commercial-order-products article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid #eef2f7;
  border-radius: 10px;
  background: #ffffff;
}

.commercial-order-products b,
.commercial-order-products span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commercial-order-products span {
  margin-top: 4px;
  color: #94a3b8;
  font-size: 12px;
}

.commercial-order-products p {
  color: #0f172a;
  font-weight: 800;
  white-space: nowrap;
}

.commercial-order-products em {
  color: #64748b;
  font-style: normal;
  font-weight: 700;
}

.commercial-order-products button {
  justify-self: start;
  min-height: 28px;
  padding: 0 10px;
  color: var(--primary);
  background: #eff6ff;
  box-shadow: none;
  font-size: 12px;
}

.commercial-order-card section > strong {
  display: block;
  margin-top: 12px;
  color: #dc2626;
  font-size: 18px;
}

.commercial-order-table .table {
  min-width: 1320px;
}

.commercial-ship-modal {
  overflow: hidden;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

.commercial-ship-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 22px 24px;
}

.commercial-ship-form label {
  display: grid;
  gap: 8px;
}

.commercial-ship-form label.span-2 {
  grid-column: 1 / -1;
}

.commercial-ship-form span {
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.commercial-ship-form b {
  color: #ef4444;
}

.commercial-ship-form em {
  color: #94a3b8;
  font-style: normal;
  font-size: 12px;
}

.commercial-ship-form input,
.commercial-ship-form select {
  min-height: 42px;
}

.commercial-detail-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 24px 28px;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.commercial-detail-hero h2,
.commercial-detail-hero p {
  margin: 0;
}

.commercial-detail-hero span {
  color: var(--text-muted);
  font-size: 13px;
}

.commercial-detail-hero h2 {
  margin: 8px 0;
  color: #0f172a;
  font-size: 24px;
}

.commercial-detail-hero > div:last-child {
  display: flex;
  gap: 10px;
  align-items: center;
}

.commercial-flow-card {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  background: #ffffff;
}

.commercial-flow-card article {
  display: grid;
  gap: 8px;
  justify-items: center;
  min-height: 112px;
  padding: 14px 10px;
  border-radius: 12px;
  background: #f8fafc;
  text-align: center;
}

.commercial-flow-card i {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #94a3b8;
  background: #e2e8f0;
  font-style: normal;
  font-weight: 900;
}

.commercial-flow-card article.done i,
.commercial-flow-card article.active i {
  color: #ffffff;
  background: var(--primary);
}

.commercial-flow-card b {
  color: #0f172a;
  font-size: 13px;
}

.commercial-flow-card span {
  color: #64748b;
  font-size: 12px;
}

.commercial-detail-products,
.commercial-logistics-list,
.commercial-record-list {
  display: grid;
  gap: 10px;
}

.commercial-detail-products article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 14px;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  background: #ffffff;
}

.commercial-detail-products b,
.commercial-detail-products span {
  display: block;
}

.commercial-detail-products span {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
}

.commercial-detail-products p {
  margin: 0;
  color: #dc2626;
  font-weight: 900;
  white-space: nowrap;
}

.commercial-detail-products em {
  color: #475569;
  font-style: normal;
}

.commercial-fee-card p,
.commercial-receiver-card {
  display: grid;
  gap: 10px;
}

.commercial-fee-card p {
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid #eef2f7;
}

.commercial-fee-card p:last-child {
  border-bottom: 0;
}

.commercial-fee-card b {
  color: #dc2626;
}

.commercial-receiver-card p {
  margin: 0;
  color: #475569;
  line-height: 1.7;
}

.commercial-receiver-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 10px;
  background: #f8fafc;
}

.commercial-receiver-card code {
  color: #0f172a;
  font-weight: 800;
}

.commercial-logistics-list article,
.commercial-record-list article {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #eef2f7;
}

.commercial-record-list article {
  grid-template-columns: 160px minmax(0, 1fr);
}

.commercial-logistics-list article:last-child,
.commercial-record-list article:last-child {
  border-bottom: 0;
}

.commercial-logistics-list i {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: #cbd5e1;
}

.commercial-logistics-list article.active i {
  background: var(--primary);
}

.commercial-logistics-list b,
.commercial-record-list b {
  display: block;
  color: #0f172a;
}

.commercial-logistics-list span,
.commercial-record-list span,
.commercial-record-list time {
  color: #64748b;
  font-size: 12px;
}

.commercial-tip-card p {
  margin: 0;
  color: #ef4444;
  line-height: 1.7;
}

.commercial-period-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
  align-items: start;
  padding: 20px;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.commercial-period-card b {
  display: block;
  margin-bottom: 12px;
  color: #0f172a;
}

.commercial-period-card label {
  display: grid;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.commercial-period-card select {
  min-height: 38px;
}

.commercial-month-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 8px;
}

.commercial-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.commercial-stat-grid article {
  min-height: 154px;
  padding: 22px;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.commercial-stat-grid span,
.commercial-stat-grid em,
.commercial-stat-grid p {
  color: #64748b;
}

.commercial-stat-grid span {
  display: block;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 800;
}

.commercial-stat-grid strong {
  color: #0f766e;
  font-size: 30px;
}

.commercial-stat-grid em {
  margin-left: 6px;
  font-style: normal;
}

.commercial-stat-grid p {
  margin: 8px 0 0;
  font-size: 12px;
}

.commercial-stat-grid article.refund strong {
  color: #dc2626;
}

.commercial-composition-card {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.commercial-donut {
  width: 220px;
  height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  justify-self: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #ffffff 0 48%, transparent 49%),
    conic-gradient(#2563eb 0 55%, #10b981 55% 78%, #f59e0b 78% 90%, #ef4444 90% 100%);
  text-align: center;
}

.commercial-donut strong {
  color: #0f172a;
  font-size: 24px;
}

.commercial-donut span {
  color: #64748b;
  font-size: 12px;
}

.commercial-composition-list {
  display: grid;
  gap: 12px;
}

.commercial-composition-list p {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto 44px;
  gap: 10px;
  align-items: center;
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8fafc;
}

.commercial-composition-list i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.commercial-composition-list .tone-1 { background: #2563eb; }
.commercial-composition-list .tone-2 { background: #10b981; }
.commercial-composition-list .tone-3 { background: #f59e0b; }
.commercial-composition-list .tone-4 { background: #ef4444; }

.commercial-composition-list b {
  overflow: hidden;
  color: #0f172a;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commercial-composition-list span,
.commercial-composition-list em {
  color: #64748b;
  font-style: normal;
}

.commercial-table-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  min-height: 64px;
  padding: 0 22px;
  border-bottom: 1px solid var(--border-light);
}

.commercial-table-head h3 {
  margin: 0;
  color: #0f172a;
}

.commercial-table-head label {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.commercial-stat-table .table {
  min-width: 1000px;
}

.commercial-stat-table b.positive {
  color: #0f766e;
}

.commercial-stat-table b.negative {
  color: #dc2626;
}

.settings-page-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 0 0;
}

@media (max-width: 1180px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-grid-2 {
    grid-template-columns: 1fr;
  }

  .review-detail-layout {
    grid-template-columns: 1fr;
  }

  .admin-order-content,
  .order-status-hero,
  .customer-profile-hero,
  .customer-detail-layout,
  .commercial-order-card-body,
  .commercial-info-grid,
  .commercial-modal-info,
  .commercial-modal-audit,
  .commercial-period-card,
  .commercial-composition-card {
    grid-template-columns: 1fr;
  }

  .prepay-stats-grid,
  .admin-order-progress,
  .customer-detail-stats,
  .data-center-stats,
  .commercial-flow-card,
  .commercial-code-stats,
  .commercial-qualification-stats,
  .commercial-certificate-stats,
  .commercial-scope-grid,
  .commercial-cert-form,
  .commercial-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .data-center-module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-area-selector.large {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-confirm-panel > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 840px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: relative;
    height: auto;
  }

  .admin-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-main {
    padding: 16px;
  }

  .admin-topbar {
    margin: -16px -16px 16px;
    padding: 12px 16px;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .coverage-strip {
    grid-template-columns: 1fr;
  }

  .material-page-head,
  .material-search-bar,
  .material-upload-grid {
    grid-template-columns: 1fr;
  }

  .material-page-head,
  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .review-filter .source-filter-row,
  .review-card-grid,
  .review-info-grid,
  .review-detail-layout {
    grid-template-columns: 1fr;
  }

  .review-order-card > header,
  .review-order-card > footer,
  .review-detail-title,
  .review-products article {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .order-page-head,
  .commercial-source-head,
  .commercial-detail-hero,
  .order-status-main,
  .logistics-company-card,
  .admin-order-products article,
  .pickup-records article,
  .commercial-order-card > header,
  .commercial-order-card > footer {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .prepay-stats-grid,
  .admin-order-progress,
  .customer-detail-stats,
  .data-center-stats,
  .data-center-module-grid,
  .commercial-order-filter .source-filter-row,
  .commercial-code-filter .source-filter-row,
  .commercial-qualification-filter .source-filter-row,
  .commercial-certificate-filter .source-filter-row,
  .commercial-ship-form,
  .commercial-flow-card,
  .commercial-code-stats,
  .commercial-qualification-stats,
  .commercial-certificate-stats,
  .commercial-info-grid,
  .commercial-info-item.span-2,
  .commercial-region-selects,
  .commercial-scope-grid,
  .commercial-cert-form,
  .commercial-modal-info,
  .commercial-modal-audit,
  .commercial-stat-grid,
  .commercial-month-grid,
  .commercial-composition-card {
    grid-template-columns: 1fr;
  }

  .commercial-summary-bar,
  .commercial-customer-title,
  .commercial-audit-cert-card header,
  .commercial-audit-cert-card footer,
  .commercial-reject-sample header,
  .commercial-reject-sample footer,
  .commercial-certificate-modal header,
  .commercial-certificate-modal footer {
    flex-direction: column;
    align-items: stretch;
  }

  .commercial-info-item.span-2,
  .commercial-modal-audit textarea,
  .commercial-modal-audit .quick-reasons {
    grid-column: auto;
  }

  .customer-profile-status,
  .product-price-box {
    justify-items: start;
  }

  .team-page-header,
  .team-pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .team-office-form,
  .team-transfer-form,
  .team-area-columns,
  .team-transfer-card,
  .team-area-selector.large {
    grid-template-columns: 1fr;
  }

  .data-center-hero {
    min-height: auto;
    padding: 28px;
  }

  .data-center-hero h2 {
    font-size: 28px;
  }
}
