:root {
  --bg: #E8EDF5;
  --surface: #FFFFFF;
  --surface-soft: #F1F5F9;
  --line: #E2E8F0;
  --line-strong: #CBD5E1;
  --text: #0F172A;
  --muted: #475569;
  --primary: #0052FF;
  --primary-deep: #003ACC;
  --teal: #0891B2;
  --teal-deep: #0E7490;
  --green: #22C55E;
  --orange: #F59E0B;
  --red: #EF4444;
  --purple: #8B5CF6;
  --shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.08);
  --shadow-accent: 0 4px 14px rgba(0, 82, 255, 0.25);
  --shadow-accent-lg: 0 8px 24px rgba(0, 82, 255, 0.35);
  --radius: 10px;
  color-scheme: light;
  font-family: "Plus Jakarta Sans", "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei UI", sans-serif;
}

* {
  box-sizing: border-box;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 82, 255, 0); }
  50% { box-shadow: 0 0 20px 2px rgba(0, 82, 255, 0.06); }
}

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

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: #E8EDF5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.app-shell:has(.admin-layout) {
  display: block;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #f7faff;
}

.customer-page,
.success-page,
.login-shell {
  width: min(1220px, calc(100vw - 260px));
  margin: 0 auto;
  border: 0;
  border-radius: 16px;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.hero-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 15% 50%, rgba(0, 82, 255, 0.06), transparent),
    radial-gradient(ellipse 50% 40% at 85% 40%, rgba(14, 165, 233, 0.05), transparent);
}

.page-decor {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  opacity: 0.32;
  color: var(--primary);
  will-change: transform, translate;
  contain: layout style;
}

.page-decor--headset {
  top: 12%;
  left: max(42px, calc((100vw - 1220px) / 2 - 150px));
  width: 230px;
  height: 230px;
  animation: decorFloat 6s ease-in-out infinite, decorDrift 14s ease-in-out infinite;
}

.page-decor--shield {
  bottom: 10%;
  right: max(44px, calc((100vw - 1220px) / 2 - 140px));
  width: 220px;
  height: 220px;
  animation: decorFloat 7s ease-in-out infinite 2s, decorDrift 16s ease-in-out infinite 1s;
}

.page-decor--chat {
  top: 57%;
  left: max(30px, calc((100vw - 1220px) / 2 - 170px));
  width: 170px;
  height: 170px;
  animation: decorFloat 5.5s ease-in-out infinite 1s, decorDrift 13s ease-in-out infinite 2s;
}

.page-decor--gear {
  top: 17%;
  right: max(42px, calc((100vw - 1220px) / 2 - 145px));
  width: 190px;
  height: 190px;
  animation: decorSpin 14s linear infinite;
}

.page-decor--check {
  bottom: 7%;
  left: max(70px, calc((100vw - 1220px) / 2 - 90px));
  width: 160px;
  height: 160px;
  animation: decorFloat 6.5s ease-in-out infinite 3s, decorDrift 15s ease-in-out infinite 3s;
}

.page-decor--mail {
  top: 38%;
  right: max(50px, calc((100vw - 1220px) / 2 - 120px));
  width: 150px;
  height: 150px;
  animation: decorFloat 7.5s ease-in-out infinite 1.5s, decorDrift 16s ease-in-out infinite 4s;
}

.page-decor--star {
  top: 5%;
  left: max(140px, calc((100vw - 1220px) / 2 - 40px));
  width: 120px;
  height: 120px;
  animation: decorSpin 22s linear infinite reverse, decorFloat 8s ease-in-out infinite 2s;
}

.page-decor--bulb {
  top: 2%;
  right: max(160px, calc((100vw - 1220px) / 2 + 20px));
  width: 110px;
  height: 110px;
  animation: decorFloat 7s ease-in-out infinite 0.5s, decorDrift 14s ease-in-out infinite 2s;
}

.page-decor--clock {
  bottom: 3%;
  left: max(180px, calc((100vw - 1220px) / 2 + 40px));
  width: 120px;
  height: 120px;
  animation: decorFloat 8s ease-in-out infinite 1s, decorDrift 18s ease-in-out infinite;
}

.page-decor--heart {
  bottom: 2%;
  right: max(170px, calc((100vw - 1220px) / 2 + 30px));
  width: 100px;
  height: 100px;
  animation: decorFloat 6s ease-in-out infinite 2.5s, decorDrift 13s ease-in-out infinite 3s;
}


@keyframes decorFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-22px); }
}

@keyframes decorSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes decorDrift {
  0%, 100% { translate: 0 0; }
  33% { translate: 16px -8px; }
  66% { translate: -10px 12px; }
}

.customer-content,
.success-content {
  position: relative;
  padding: 30px 34px 24px;
  z-index: 1;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.06),
    0 10px 30px rgba(0, 0, 0, 0.07),
    0 30px 60px rgba(0, 0, 0, 0.04);
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.customer-content::before,
.success-content::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: rgba(240, 244, 250, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 0 0 1px rgba(255, 255, 255, 0.34);
  -webkit-backdrop-filter: blur(34px) saturate(1.24);
  backdrop-filter: blur(34px) saturate(1.24);
  pointer-events: none;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-mark,
.admin-mark,
.success-check {
  display: grid;
  place-items: center;
  color: white;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), #4D7CFF);
  box-shadow: var(--shadow-accent);
}

.brand-mark {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  font-size: 32px;
  animation: breathe 4s ease-in-out infinite;
}

.admin-mark {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 24px;
}

.logo-svg {
  display: block;
  color: white;
}

.brand h1,
.login-copy h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.brand p,
.login-copy p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.language-select,
.header-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--text);
  padding: 0 14px;
  box-shadow: 0 8px 18px rgba(37, 78, 139, 0.06);
}

.language-select {
  min-width: 136px;
  white-space: nowrap;
}

.language-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  line-height: 1;
}

.header-actions {
  position: relative;
}

.customer-country-wrap {
  position: relative;
}

.country-select-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  min-width: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0 14px;
  box-shadow: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.country-select-button:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.country-select-button:active {
  transform: translateY(0) scale(0.985);
}

.country-flag-icon {
  font-size: 16px;
}



.country-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  line-height: 0;
  transform: translateY(1px);
}

.country-chevron .combo-chevron-icon {
  width: 12px;
  height: 12px;
  display: block;
  stroke-width: 1.8;
}

.customer-language-wrap {
  position: relative;
}

.header-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: none;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.header-icon:hover {
  transform: translateY(-1px);
}

.header-icon:active {
  transform: translateY(0) scale(0.985);
}

.header-menu {
  position: absolute;
  right: 0;
  top: 48px;
  z-index: 40;
  width: 240px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(37, 78, 139, 0.16);
  padding: 12px;
}

.customer-language-menu {
  position: absolute;
  right: 0;
  top: 48px;
  z-index: 40;
  width: 190px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(37, 78, 139, 0.16);
  padding: 10px;
}

.customer-country-menu {
  position: absolute;
  right: 0;
  top: 48px;
  z-index: 40;
  width: 280px;
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(37, 78, 139, 0.16);
  padding: 6px;
}

.header-menu p {
  margin: 8px 0;
  color: var(--muted);
}

.menu-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  padding: 0 10px;
  text-align: left;
}

.menu-line:hover {
  background: #eef5ff;
}

.mobile-menu {
  display: none;
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 24px;
}

.desktop-only {
  display: flex;
}

.customer-header-controls {
  flex-direction: row;
  gap: 10px;
}

.mobile-controls-row {
  display: none;
}

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

.info-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0 20px;
  padding: 13px 18px;
  border: none;
  border-left: 4px solid rgba(0, 82, 255, 0.35);
  border-radius: 10px;
  color: var(--primary);
  background: rgba(0, 82, 255, 0.08);
  font-size: 14px;
  box-shadow: inset 0 0 0 1px rgba(0, 82, 255, 0.08);
}

.repeat-info-strip {
  justify-content: space-between;
  border-left-color: #f0a647;
  color: #6f4613;
  background: #fff7e8;
  box-shadow: inset 0 0 0 1px #f5d39d;
}

.repeat-info-strip > span:not(.info-strip-pill) {
  flex: 1 1 auto;
}

.info-strip-pill {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 999px;
  color: #0f5c9e;
  background: #eaf4ff;
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

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

.field-card,
.summary-card,
.admin-card,
.login-card,
.detail-card,
.settings-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #FFFFFF;
  box-shadow: var(--shadow-sm), 0 4px 12px rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
  transition:
    transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.field-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(0, 82, 255, 0.015) 45%, rgba(0, 82, 255, 0.03) 50%, rgba(0, 82, 255, 0.015) 55%, transparent 60%);
  background-size: 200% 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.field-card:hover::after {
  opacity: 1;
  animation: shimmer 1.5s ease-in-out;
}

.field-card:hover {
  border-color: rgba(0, 82, 255, 0.15);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(0, 82, 255, 0.06);
  transform: translateY(-2px);
}

.field-card {
  padding: 14px;
  cursor: default;
}

.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-12 { grid-column: span 12; }

.country-card {
  grid-column: span 3;
  position: relative;
  overflow: visible;
}

.country-card:has(.country-combo.open) {
  z-index: 90;
}

.country-combo {
  position: relative;
  display: block;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: visible;
}

.country-combo:focus-within,
.country-combo.open {
  border-color: #8fb7ff;
  box-shadow: 0 0 0 3px rgba(42, 123, 255, 0.1);
}

.product-combo {
  min-height: 40px;
}

.country-combo-input {
  width: 100%;
  min-height: 42px;
  padding-right: 54px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
}

.product-combo-search-input {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 38px;
  padding-right: 54px;
  text-align: left;
}

.product-combo-search-input.is-placeholder {
  color: var(--muted);
}

.country-combo-input:focus {
  outline: 0;
  box-shadow: none;
}

.country-combo-toggle {
  position: absolute;
  top: 1px;
  right: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: calc(100% - 2px);
  min-height: 0;
  border: 0;
  border-left: 0;
  border-radius: 0 7px 7px 0;
  background: transparent;
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.combo-chevron-icon {
  display: block;
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.country-combo-toggle:hover,
.country-combo.open .country-combo-toggle {
  background: transparent;
}

.country-combo-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 140;
  max-height: 330px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 18px 42px rgba(37, 78, 139, 0.16);
  padding: 10px;
}

.product-combo-menu {
  max-height: 260px;
}

.product-combo-empty {
  padding: 10px;
  color: var(--muted);
  font-size: 14px;
}

.product-model-thumb {
  display: inline-grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid #dce7f7;
  border-radius: 7px;
  background: #f7faff;
  color: #7890b1;
  font-size: 13px;
  overflow: hidden;
  background-color: #f7faff;
  background-position: center;
  background-size: cover;
}

.product-model-thumb-empty {
  background: #f8fbff;
}

.country-menu-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  line-height: 1.5;
  padding: 6px 10px;
  min-height: 40px;
}

.country-menu-line span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.5;
}

.country-menu-line small {
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
}

.country-menu-line:hover {
  background: #eef5ff;
}

.product-model-line {
  min-height: 48px;
}

.platform-card {
  grid-column: span 12;
}

.order-model-card {
  grid-column: span 12;
}

.order-model-card:has(.product-combo.open) {
  overflow: visible;
  z-index: 120;
}

.order-model-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.order-model-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.order-input-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.order-input-row > .input {
  flex: 1 1 0;
  min-width: 0;
  min-height: 38px;
  height: 40px;
}

.product-input-row {
  display: flex;
  flex-direction: row;
  gap: 10px;
}

.product-input-row > .product-combo {
  flex: 1 1 0;
  min-width: 0;
}

.icon {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-copy-line {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  min-width: 0;
  padding: 0;
  text-align: left;
}

.contact-copy-line:hover {
  color: var(--primary);
}

.contact-copy-line.is-copied {
  color: #078341;
  font-weight: 700;
}

.field-title {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 9px;
  letter-spacing: -0.01em;
}

.field-title small {
  color: var(--muted);
  font-weight: 650;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #FFFFFF;
  color: var(--text);
  min-height: 40px;
  padding: 0 12px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input,
.textarea {
  cursor: text;
}

.select {
  cursor: pointer;
}

.textarea {
  min-height: 78px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.5;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.1);
}

.input.locked,
.select.locked,
.input:disabled {
  background: var(--surface-soft);
  color: var(--muted);
  cursor: not-allowed;
}

.select:disabled {
  background: var(--surface-soft);
  color: var(--muted);
  cursor: not-allowed;
}

.field-feedback {
  min-height: 18px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.field-feedback[data-tone="ok"] {
  color: #0f6f45;
}

.field-feedback[data-tone="warn"] {
  color: #bc6200;
}

.field-feedback[data-tone="error"] {
  color: #b42318;
}

.customer-field-error.country-combo,
.customer-field-error .country-combo,
.customer-field-error.country-select-button,
.customer-field-error .country-select-button,
.customer-field-error.order-screenshot-panel {
  border-color: #d92d20;
  box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.12);
}

.platform-options,
.video-options,
.action-row,
.inline-row,
.tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.platform-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  flex-wrap: nowrap;
  gap: 8px;
}

.platform-option,
.video-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--text);
  padding: 0 14px;
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.14s ease,
    box-shadow 0.14s ease,
    border-color 0.14s ease,
    background-color 0.14s ease;
}

.platform-option {
  flex: 1 1 0;
  min-width: 0;
  gap: 6px;
  padding-inline: 5px;
  font-size: 12.5px;
  justify-content: center;
  white-space: nowrap;
}

.platform-option[data-platform="Amazon"],
.platform-option[data-platform="Other"] {
  flex-basis: auto;
}

.platform-option[data-platform="Mercado Libre"] {
  flex-basis: auto;
}

.platform-option[data-platform="eBay"],
.platform-option[data-platform="AliExpress"] {
  white-space: normal;
}

.platform-option[data-platform="eBay"] .platform-label,
.platform-option[data-platform="AliExpress"] .platform-label {
  display: none;
}

.order-screenshot-panel {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  width: 158px;
  height: 40px;
  gap: 0;
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  padding: 0;
  border: 1px solid #e7d9c8;
  border-radius: 8px;
  background: linear-gradient(135deg, #fffaf3, #f8fbff);
  overflow: hidden;
}

.order-screenshot-panel .muted {
  margin: 4px 0 0;
}

.order-screenshot-panel .field-feedback {
  display: none;
}

.order-model-card .field-feedback:empty {
  display: none;
}

.order-screenshot-panel .field-title {
  margin-bottom: 0;
  font-size: 13px;
  line-height: 1.2;
  color: #7a4c18;
}

.required-mark {
  display: inline-block;
  margin-left: 3px;
  color: #d92d20;
  font-weight: 800;
  line-height: 1;
}

.upload-zone-copy .required-mark,
.product-combo-button .required-mark,
.country-select-button .required-mark {
  margin-left: 2px;
  transform: translateY(-1px);
}

.screenshot-thumb {
  display: block;
  width: 56px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(37, 78, 139, 0.16);
}

.platform-logo {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  font-weight: 850;
  line-height: 1;
}

.platform-logo-frame {
  background: #fff;
  overflow: hidden;
}

.platform-logo-img {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.other-logo {
  color: var(--text);
  font-size: 15px;
}

.platform-label {
  display: inline-block;
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
}

.platform-option.active,
.video-option.active {
  border-color: rgba(0, 82, 255, 0.5);
  background: rgba(0, 82, 255, 0.1);
  color: var(--primary);
  box-shadow: none;
}

.tab.active,
.nav-item.active,
.btn.active {
  border-color: rgba(0, 82, 255, 0.3);
  background: rgba(0, 82, 255, 0.04);
  color: var(--primary);
  box-shadow: none;
}

.upload-zone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 90px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 8px;
  color: #3a5178;
  text-align: center;
  background: linear-gradient(180deg, #fff, #f9fbff);
  overflow: hidden;
  cursor: pointer;
}

.order-screenshot-panel .upload-zone {
  width: 100%;
  min-height: 38px;
  height: 100%;
  border: 0;
  border-radius: 7px;
  border-color: #e3bd85;
  color: #7a4c18;
  background: #fffdf9;
}

.order-screenshot-panel .upload-zone-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  gap: 6px;
  font-size: 12px;
}

.upload-zone-copy {
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 8px 10px;
  text-align: center;
  width: 100%;
}

.upload-zone-copy small {
  display: block;
}

.evidence-count {
  font-size: 11px;
  font-weight: 700;
  color: #7a4c18;
}

.evidence-preview-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.evidence-file-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(227, 189, 133, 0.16);
  color: #7a4c18;
  font-size: 11px;
  font-weight: 700;
}

.upload-inline-action {
  padding: 2px 8px;
  border: 1px solid #d4b882;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #7a4c18;
  background: rgba(227, 189, 133, 0.15);
}

.upload-short-text {
  font-size: 11px;
  color: #8b6f3a;
}

.upload-zone input,
.video-option input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.video-option input {
  z-index: 3;
}

.video-option > :not(input) {
  pointer-events: none;
}

.video-card .video-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.video-card .video-option {
  min-height: 86px;
  justify-content: flex-start;
  gap: 12px;
  padding: 14px 16px;
  text-align: left;
}

.video-icon-bubble {
  display: inline-grid;
  place-items: center;
  flex: 0 0 56px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #eef5ff;
  color: var(--primary);
  font-size: 20px;
}

.video-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.video-copy strong,
.video-copy small {
  display: block;
}

.video-copy strong {
  color: var(--text);
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.2;
}

.video-copy small {
  color: var(--muted);
  line-height: 1.25;
}

.video-copy small {
  color: var(--muted);
  line-height: 1.35;
}

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

.evidence-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.evidence-title-copy {
  margin-bottom: 0;
}

.evidence-title-copy span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.evidence-limits {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.evidence-limits {
  padding: 8px 10px;
  border-radius: 8px;
  background: #f8fbff;
  color: #47607f;
}

.evidence-counters,
.evidence-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.evidence-count-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid #d7e5ff;
  border-radius: 999px;
  color: #1d5fbf;
  background: #f2f7ff;
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.evidence-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.evidence-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 720;
  cursor: pointer;
  overflow: hidden;
}

.evidence-action:hover {
  border-color: #bdd5ff;
  background: #f8fbff;
}

.evidence-action input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.evidence-link-input {
  margin-top: 0;
}

.evidence-empty-note {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  border: 1px dashed #d8e2f0;
  border-radius: 8px;
  color: #7a8ca5;
  background: #fbfdff;
  font-size: 13px;
}

.evidence-selected {
  display: grid;
  gap: 8px;
}

.evidence-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 92px));
  gap: 6px;
  align-items: start;
}

.evidence-photo-item {
  position: relative;
  min-width: 0;
  max-width: 100%;
  padding: 4px;
  border: 1px solid #e3ebf8;
  border-radius: 8px;
  background: #fff;
  display: grid;
  gap: 3px;
  overflow: hidden;
}

.evidence-photo-item > * {
  min-width: 0;
  max-width: 100%;
}

.evidence-thumb {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  background: #f3f7ff;
  color: var(--primary);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.evidence-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.evidence-photo-item span,
.evidence-photo-item small,
.evidence-file-row strong,
.evidence-file-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evidence-photo-item span {
  display: block;
  color: var(--text);
  font-size: 10px;
  font-weight: 720;
}

.evidence-photo-item small,
.evidence-file-row small {
  color: var(--muted);
  font-size: 10px;
}

.evidence-photo-item small {
  display: block;
}

.evidence-remove,
.evidence-row-action {
  border: 0;
  border-radius: 999px;
  background: #eef4ff;
  color: #436083;
  cursor: pointer;
}

.evidence-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  padding: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  font-size: 0;
  line-height: 0;
}

.evidence-remove::before,
.evidence-remove::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  left: 50%;
  top: 50%;
  transform-origin: center;
}

.evidence-remove::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.evidence-remove::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.evidence-file-list {
  display: grid;
  gap: 6px;
}

.evidence-file-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 74px auto 28px;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid #e3ebf8;
  border-radius: 8px;
  background: #fff;
}

.evidence-file-icon {
  color: var(--primary);
}

.evidence-status {
  color: #11835b;
  font-size: 12px;
  font-weight: 760;
}

.evidence-row-action {
  width: 24px;
  height: 24px;
}

.counter {
  margin-top: 6px;
  text-align: right;
  color: var(--muted);
  font-size: 12px;
}

.issue-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 20px;
  margin-top: 6px;
}

.issue-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
}

.issue-category-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.issue-category-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.issue-category-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s;
}

.issue-category-option:hover {
  background: #f0f4fa;
}

.issue-category-option.active {
  background: #e8f0fe;
  font-weight: 600;
}

.issue-category-option input[type="radio"] {
  accent-color: #1a73e8;
}

.issue-textarea-col {
  display: flex;
  flex-direction: column;
}

.issue-textarea-col .textarea {
  flex: 1;
  min-height: 120px;
}

.textarea.issue-hint-placeholder::placeholder {
  color: #d96f00;
  opacity: 1;
}

.issue-footer .counter {
  margin-top: 0;
}

.phone-row {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 8px;
}

.contact-main-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.contact-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0;
}

.contact-title-row .field-title {
  margin-bottom: 0;
}

.same-whatsapp-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #0b6b62;
  font-size: 13px;
  font-weight: 720;
  white-space: nowrap;
  padding: 5px 8px;
  border: 1px solid #cfe9e3;
  border-radius: 999px;
  background: #f2fffb;
}

.preferred-contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 760;
}

.contact-title-spacer {
  margin-right: auto;
}

.preferred-contact-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #31547d;
  font-weight: 720;
}

.contact-preference-panel {
  align-self: start;
}

.contact-email-card {
  grid-column: span 12;
}

.contact-card-title {
  margin-bottom: 12px;
}

.phone-email-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 20px;
  row-gap: 14px;
  align-items: start;
}

.phone-email-panel {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

@media (min-width: 741px) {
  .phone-email-grid {
    align-items: start;
  }

  .phone-email-panel {
    justify-content: flex-start;
  }

  .contact-phone-panel,
  .preferred-contact-row {
    grid-column: auto;
  }

  .contact-preference-panel {
    padding-top: 39px;
  }
}

.whatsapp-extra {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.whatsapp-extra.is-hidden {
  display: none;
}

.check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.check-row label,
.remember-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #FFFFFF;
  color: var(--text);
  padding: 0 18px;
  font-weight: 600;
  box-shadow: none;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%), currentColor 0%, transparent 70%);
  opacity: 0;
  transform: scale(0);
  pointer-events: none;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0.5px) scale(0.97);
  transition-duration: 0.06s;
}

.btn.btn-ripple::after {
  animation: btn-ripple 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn-click-icon,
.btn > .icon,
.btn > .ui-icon,
.btn > svg,
.ui-toolbar-chip > .icon,
.ui-toolbar-chip > .ui-icon,
.ui-toolbar-chip > svg,
.date-range-trigger > .icon,
.date-range-trigger > .ui-icon,
.date-range-trigger > svg,
.ui-date-range-trigger > .icon,
.ui-date-range-trigger > .ui-icon,
.ui-date-range-trigger > svg {
  flex: 0 0 auto;
  transform-origin: center;
}

.btn.btn-icon-feedback,
.ui-toolbar-chip.btn-icon-feedback,
.date-range-trigger.btn-icon-feedback,
.ui-date-range-trigger.btn-icon-feedback {
  box-shadow: none;
}

.btn.btn-icon-feedback > .btn-click-icon,
.btn.btn-icon-feedback > .icon,
.btn.btn-icon-feedback > .ui-icon,
.btn.btn-icon-feedback > svg,
.ui-toolbar-chip.btn-icon-feedback > .icon,
.ui-toolbar-chip.btn-icon-feedback > .ui-icon,
.ui-toolbar-chip.btn-icon-feedback > svg,
.date-range-trigger.btn-icon-feedback > .icon,
.date-range-trigger.btn-icon-feedback > .ui-icon,
.date-range-trigger.btn-icon-feedback > svg,
.ui-date-range-trigger.btn-icon-feedback > .icon,
.ui-date-range-trigger.btn-icon-feedback > .ui-icon,
.ui-date-range-trigger.btn-icon-feedback > svg {
  animation: btn-icon-feedback 0.48s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes btn-icon-feedback {
  0% { transform: scale(1); opacity: 1; }
  40% { transform: scale(0.88); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes btn-ripple {
  0% { transform: scale(0); opacity: 0.12; }
  50% { transform: scale(2.5); opacity: 0.06; }
  100% { transform: scale(3.5); opacity: 0; }
}

.btn.btn-icon-feedback {
  animation: btn-bounce 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes btn-bounce {
  0% { transform: scale(1); }
  40% { transform: scale(0.97); }
  100% { transform: scale(1); }
}

.btn.primary,
.btn.teal {
  border-color: transparent;
  color: white;
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary), #4D7CFF);
}

.btn.primary:hover {
  filter: brightness(1.03);
}

.btn.teal {
  background: linear-gradient(135deg, var(--teal), #38BDF8);
}

.btn.teal:hover {
  filter: brightness(1.03);
}

.btn.danger {
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.3);
}

.ui-toolbar-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #FFFFFF;
  color: var(--text);
  box-shadow: none;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ui-toolbar-chip:hover:not(:disabled) {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.ui-toolbar-chip:active:not(:disabled) {
  transform: translateY(0) scale(0.985);
}

.ui-toolbar-chip:disabled {
  cursor: not-allowed;
  color: #94A3B8;
  background: #F8FAFC;
  box-shadow: none;
}

.form-actions {
  justify-content: flex-end;
  margin-top: 12px;
}

.form-actions .btn {
  width: 260px;
}

.success-main {
  text-align: center;
  padding: 38px 0 24px;
}

.success-check {
  width: 96px;
  height: 96px;
  margin: 0 auto 22px;
  border-radius: 50%;
  font-size: 54px;
}

.success-main h2 {
  margin: 0;
  font-size: 30px;
}

.success-main p {
  color: #3a5178;
}

.summary-card {
  padding: 22px;
  margin-top: 18px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.summary-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #e8eef8;
}

.summary-item strong {
  display: block;
  color: var(--text);
  margin-bottom: 4px;
}

.summary-item span[dir="auto"] {
  overflow-wrap: normal;
  word-break: keep-all;
}

.next-card {
  margin-top: 20px;
  padding: 20px 22px;
  border: 1px solid #d7e5ff;
  border-radius: 8px;
  background: #f8fbff;
}

.next-step {
  display: grid;
  grid-template-columns: 42px 64px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid #e0e9f8;
}

.next-note {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px 0 4px;
  border-top: 1px solid #e0e9f8;
}

.step-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--primary), #6b95ff);
  font-weight: 800;
}

.step-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: #e9f1ff;
  color: var(--primary);
  font-size: 24px;
}

.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background: #f7faff;
  transition: grid-template-columns 0.16s ease;
}

.admin-layout.sidebar-collapsed {
  grid-template-columns: 82px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: stretch;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  background: white;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: visible;
  z-index: 80;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 74px;
  min-width: 0;
  overflow: hidden;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  font-weight: 850;
}

.sidebar-brand strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav {
  padding: 20px 14px;
  display: grid;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  padding: 0 12px;
  font-weight: 730;
  transition:
    transform 0.14s ease,
    box-shadow 0.14s ease,
    border-color 0.14s ease,
    background-color 0.14s ease;
}

.nav-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  flex: 0 0 20px;
  color: #183b72;
}

.nav-icon .ui-icon {
  width: 20px;
  height: 20px;
  stroke-width: 2.3;
}

.nav-item.nav-icon-feedback > .nav-icon {
  animation: btn-icon-feedback 0.48s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nav-item.active .nav-icon {
  animation: nav-icon-pop 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes nav-icon-pop {
  0% { transform: scale(1); }
  40% { transform: scale(0.65); }
  70% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.nav-item.active .nav-icon,
.nav-item:hover .nav-icon,
.sidebar-user-chip .sidebar-avatar,
.sidebar-mini-tool,
.sidebar-mini-tool .ui-icon {
  color: inherit;
}

.nav-label {
  white-space: nowrap;
}

.logout {
  margin: auto 14px 22px;
  justify-content: flex-start;
}

.sidebar-tools {
  position: relative;
  margin-top: auto;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.9), #ffffff);
}

.sidebar-account-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 52px;
  border: 1px solid #d7e4fa;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(37, 78, 139, 0.06);
  padding: 6px;
  cursor: pointer;
}

.sidebar-user-chip,
.sidebar-mini-tool {
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.sidebar-user-chip {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
  gap: 9px;
  padding: 0;
  font-weight: 780;
}

.sidebar-user-chip strong {
  flex: 0 0 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-avatar {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 999px;
  background: #edf5ff;
  color: var(--text);
}

.sidebar-mini-tools {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 2px;
  margin-left: auto;
}

.sidebar-mini-tool {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 30px;
  border-radius: 8px;
}

.sidebar-mini-tool:hover,
.sidebar-user-chip:hover,
.sidebar-account-strip:hover {
  background: #eef5ff;
}

.sidebar-mini-tool .notice-badge {
  position: absolute;
  right: 0;
  top: 1px;
  width: 18px;
  height: 18px;
}

.ui-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-top-collapse {
  display: inline-grid;
  place-items: center;
  align-self: center;
  width: 30px;
  height: 30px;
  margin-left: 10px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #3d4f6d;
  cursor: pointer;
  outline: none;
  box-shadow: none;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s ease;
}

.sidebar-top-collapse:hover,
.sidebar-top-collapse:focus-visible {
  background: transparent;
  color: var(--primary);
  transform: translateY(-1px);
  outline: none;
  box-shadow: none;
}

.sidebar-top-collapse:active {
  transform: translateY(0) scale(0.985);
}

.collapse-menu-icon {
  display: inline-grid;
  justify-items: start;
  align-content: center;
  width: 18px;
  height: 18px;
}

.sidebar-top-collapse .collapse-line {
  display: block;
  width: 13px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: none;
}

.sidebar-top-collapse .collapse-line:nth-child(2) {
  width: 18px;
}

.sidebar-top-collapse .collapse-line + .collapse-line {
  margin-top: 5px;
}

.collapse-panel-icon {
  display: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-layout:not(.sidebar-collapsed) .collapse-menu-icon,
.sidebar-collapsed .sidebar-top-collapse:hover .collapse-menu-icon,
.sidebar-collapsed .sidebar-top-collapse:focus-visible .collapse-menu-icon {
  display: none;
}

.admin-layout:not(.sidebar-collapsed) .collapse-panel-icon,
.sidebar-collapsed .sidebar-top-collapse:hover .collapse-panel-icon,
.sidebar-collapsed .sidebar-top-collapse:focus-visible .collapse-panel-icon {
  display: block;
}

.sidebar-menu {
  z-index: 120;
  left: calc(100% + 10px);
  right: auto;
  top: auto;
  bottom: 14px;
}

.sidebar.collapsed .sidebar-brand {
  justify-content: center;
  padding: 0 12px;
}

.sidebar.collapsed .sidebar-brand strong,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .logout {
  display: none;
}

.sidebar.collapsed .nav {
  padding: 18px 12px;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 0;
}

.sidebar.collapsed .sidebar-tools {
  padding: 12px;
}

.sidebar.collapsed .sidebar-account-strip {
  flex-direction: column;
  gap: 8px;
  padding: 8px;
}

.sidebar.collapsed .sidebar-user-chip {
  justify-content: center;
  width: 40px;
  height: 34px;
  padding: 0;
}

.sidebar.collapsed .sidebar-user-chip strong {
  display: none;
}

.sidebar.collapsed .sidebar-mini-tools {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-left: 0;
}

.sidebar.collapsed .sidebar-mini-tool {
  width: 40px;
  height: 32px;
}

.admin-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.admin-header {
  position: sticky;
  top: 0;
  flex: 0 0 74px;
  z-index: 60;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  height: 74px;
  padding: 0 24px 0 0;
  border-bottom: 1px solid var(--line);
  background: white;
}

.admin-header-title h2 {
  margin: 0;
  font-size: 24px;
  color: #09265a;
}

.admin-header-title {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex-wrap: wrap;
}

.admin-header-extra {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.admin-header-extra .header-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #d8e3f2;
  border-radius: 7px;
  background: #f8fbff;
  color: #32445f;
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.knowledge-top-tabs {
  margin: 0;
}

.knowledge-top-tabs .btn {
  min-height: 38px;
}

.notice-badge {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--red);
  color: white;
  font-size: 11px;
  margin-left: -12px;
  margin-top: -18px;
}

.admin-theme-dark {
  background: #121a2b;
}

.admin-theme-dark .sidebar,
.admin-theme-dark .admin-header,
.admin-theme-dark .admin-card,
.admin-theme-dark .side-panel,
.admin-theme-dark .stats-overview-card,
.admin-theme-dark .settings-card {
  background: #17233a;
  border-color: #2a3b5a;
  color: #e9f0ff;
}

.admin-theme-dark .admin-content {
  background: #111827;
}

.admin-theme-dark .admin-header-title h2,
.admin-theme-dark .nav-item,
.admin-theme-dark .sidebar-user-chip,
.admin-theme-dark .sidebar-mini-tool,
.admin-theme-dark .sidebar-top-collapse,
.admin-theme-dark .data-table,
.admin-theme-dark .info-line strong {
  color: #e9f0ff;
}

.admin-theme-dark .sidebar-tools {
  background: linear-gradient(180deg, rgba(23, 35, 58, 0.9), #17233a);
  border-color: #2a3b5a;
}

.admin-theme-dark .sidebar-account-strip,
.admin-theme-dark .header-pill,
.admin-theme-dark .input,
.admin-theme-dark .select,
.admin-theme-dark textarea {
  background: #101a2e;
  border-color: #34486b;
  color: #e9f0ff;
}

.admin-theme-dark .sidebar-avatar {
  background: #223351;
  color: #e9f0ff;
}

.admin-theme-dark .sidebar-mini-tool:hover,
.admin-theme-dark .sidebar-user-chip:hover {
  background: #223351;
}

.admin-theme-dark .sidebar-top-collapse:hover {
  background: transparent;
  color: var(--primary);
}

.admin-theme-dark .case-note-input {
  background: #0f1a2d;
  border-color: #263b5f;
  color: #e5eefb;
}

.admin-theme-dark .admin-title,
.admin-theme-dark .admin-title h3,
.admin-theme-dark .admin-title h2,
.admin-theme-dark .admin-card h3,
.admin-theme-dark .settings-card h3,
.admin-theme-dark .management-card-title,
.admin-theme-dark label,
.admin-theme-dark .filter-field span,
.admin-theme-dark .case-order-product div,
.admin-theme-dark .return-reason-row strong,
.admin-theme-dark .return-reason-row em,
.admin-theme-dark .return-application-content,
.admin-theme-dark .return-product-cell,
.admin-theme-dark .credential-status,
.admin-theme-dark .catalog-editor-head strong,
.admin-theme-dark .personnel-main strong {
  color: #edf4ff;
}

.admin-theme-dark .muted,
.admin-theme-dark .case-date-stack small,
.admin-theme-dark .case-order-product span,
.admin-theme-dark .customer-date-stack small,
.admin-theme-dark .return-application-content span,
.admin-theme-dark .return-reason-row em small,
.admin-theme-dark .credential-status,
.admin-theme-dark .catalog-editor-hint,
.admin-theme-dark .lingxing-meta-tooltip-content,
.admin-theme-dark .lingxing-return-meta,
.admin-theme-dark .return-reason-inline span {
  color: #b9c8df;
}

.admin-theme-dark .btn,
.admin-theme-dark .btn.compact,
.admin-theme-dark .card-collapse-btn,
.admin-theme-dark .ui-date-range-trigger,
.admin-theme-dark .ui-date-range-preset,
.admin-theme-dark .page-size-select,
.admin-theme-dark .case-status-select,
.admin-theme-dark .case-status-trigger,
.admin-theme-dark .case-status-popover,
.admin-theme-dark .placeholder,
.admin-theme-dark .catalog-chip,
.admin-theme-dark .platform-catalog-editor .catalog-chip {
  background: #223351;
  border-color: #3b5074;
  color: #edf4ff;
  box-shadow: none;
}

.admin-theme-dark .case-status-option {
  color: #edf4ff;
}

.admin-theme-dark .case-status-option:hover,
.admin-theme-dark .case-status-option.active {
  background: #2b4168;
}

.admin-theme-dark .btn.primary,
.admin-theme-dark .btn.teal {
  border-color: transparent;
  background: linear-gradient(135deg, #4f83ff, #3bb4d7);
  color: #ffffff;
}

.admin-theme-dark .btn.danger {
  border-color: rgba(248, 113, 113, 0.42);
  color: #fecaca;
}

.admin-theme-dark .btn:hover,
.admin-theme-dark .ui-date-range-trigger:hover,
.admin-theme-dark .ui-date-range-trigger.open,
.admin-theme-dark .ui-date-range-trigger:focus-visible,
.admin-theme-dark .card-collapse-btn:hover {
  background: #2b4168;
  border-color: #54709c;
}

.admin-theme-dark .data-table th,
.admin-theme-dark .admin-cases-table thead th,
.admin-theme-dark .customers-table thead th,
.admin-theme-dark .return-analysis-table-card .data-table th,
.admin-theme-dark .stats-matrix-card .data-table th,
.admin-theme-dark .knowledge-management-card .data-table th,
.admin-theme-dark .template-management-card .data-table th {
  background: #223351;
  border-bottom-color: #3b5074;
  box-shadow: inset 0 -1px #3b5074;
  color: #edf4ff;
}

.admin-theme-dark .data-table td {
  border-bottom-color: #2b3d5d;
  color: #dbe7f7;
}

.admin-theme-dark .data-table tbody tr,
.admin-theme-dark .return-analysis-table tbody tr {
  background: #17233a;
}

.admin-theme-dark .data-table tr.selected,
.admin-theme-dark .data-table tbody tr:hover {
  background: #21375d;
}

.admin-theme-dark .input::placeholder,
.admin-theme-dark textarea::placeholder,
.admin-theme-dark .textarea::placeholder {
  color: #91a4c1;
}

.admin-theme-dark .ui-date-range-popover,
.admin-theme-dark .catalog-editor,
.admin-theme-dark .platform-catalog-editor,
.admin-theme-dark .lingxing-inner-card,
.admin-theme-dark .lingxing-advanced,
.admin-theme-dark .lingxing-status span,
.admin-theme-dark .lingxing-essentials-note,
.admin-theme-dark .lingxing-return-meta span,
.admin-theme-dark .return-reason-inline,
.admin-theme-dark .personnel-row,
.admin-theme-dark .admin-modal,
.admin-theme-dark .admin-modal-head,
.admin-theme-dark .admin-user-create-panel,
.admin-theme-dark .admin-user-toolbar,
.admin-theme-dark .admin-user-table-wrap {
  background: #17233a;
  border-color: #2f4264;
  color: #edf4ff;
}

.admin-theme-dark .admin-user-create-panel h4,
.admin-theme-dark .admin-user-inline-form label,
.admin-theme-dark .admin-user-modal-head h3 {
  color: #edf4ff;
}

.admin-theme-dark .admin-user-table th {
  background: #1d2a43;
  color: #b8c7dd;
}

.admin-theme-dark .admin-user-avatar {
  background: #2c4872;
  color: #edf4ff;
}

.admin-theme-dark .system-reserved {
  background: #22314d;
  color: #b8c7dd;
}

.admin-theme-dark .admin-user-table th {
  background: #203251;
  color: #edf4ff;
}

.admin-theme-dark .admin-user-table td {
  border-color: #2f4264;
}

.admin-theme-dark .admin-user-toolbar label {
  color: #edf4ff;
}

.admin-theme-dark .admin-user-avatar {
  background: #284066;
  color: #dbeafe;
}

.admin-theme-dark .danger-ghost,
.admin-theme-dark .admin-user-table-actions .btn[data-action="delete-admin-user"] {
  border-color: #7f3245;
  background: #3b1d2b;
  color: #fecdd3;
}

.admin-theme-dark .return-reason-row + .return-reason-row,
.admin-theme-dark .admin-modal-wide,
.admin-theme-dark .admin-modal-head {
  border-color: #2f4264;
}

.admin-theme-dark .return-reason-row span {
  background: #2a3b5a;
}

.admin-theme-dark .admin-modal-backdrop {
  background: rgba(6, 13, 28, 0.72);
}

.admin-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding: 26px 24px 32px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.admin-content > * {
  width: 100%;
  box-sizing: border-box;
}

.admin-content:has(.admin-mail-page) {
  overflow: hidden;
}

.admin-mail-page {
  display: flex;
  min-height: 0;
  height: 100%;
}

.admin-mail-workbench {
  position: relative;
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.admin-mail-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.admin-mail-state {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--surface);
  color: var(--text);
  text-align: center;
}

.admin-mail-workbench[data-mail-state="loading"] .admin-mail-state-loading,
.admin-mail-workbench[data-mail-state="reconnecting"] .admin-mail-state-reconnecting,
.admin-mail-workbench[data-mail-state="failed"] .admin-mail-state-failed {
  display: flex;
}

.admin-mail-workbench[data-mail-state="ready"] .admin-mail-state-ready {
  display: none;
}

.admin-theme-dark .admin-mail-workbench,
.admin-theme-dark .admin-mail-state {
  background: #17233a;
  border-color: #2a3b5a;
  color: #e9f0ff;
}

.admin-theme-dark .admin-mail-frame {
  background: #17233a;
}

.admin-layout:has(.admin-mail-page) .sidebar-user-chip {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
}

.admin-layout:has(.admin-mail-page) .sidebar-user-chip strong {
  flex: 1 1 auto;
  min-width: 0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-layout.sidebar-collapsed:has(.admin-mail-page) .sidebar-user-chip strong {
  display: none;
}

.admin-content:has(.stats-page) {
  overflow: hidden;
}

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

.admin-title h2,
.login-card h2,
.detail-card h3,
.admin-card h3,
.settings-card h3 {
  margin: 0;
}

.admin-card {
  padding: 20px;
  margin-bottom: 20px;
  width: 100%;
  box-sizing: border-box;
}

.case-list-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 154px);
}

.case-list-card .filter-grid {
  flex: 0 0 auto;
  margin-bottom: 8px;
}

.case-filter-card.case-list-card {
  padding-top: 12px;
  padding-bottom: 12px;
}

.case-list-card .table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.case-list-card .table-wrap > .data-table {
  min-height: 0;
}

.case-list-card .admin-list-footer {
  min-height: 18px;
  padding-top: 0;
  font-size: 12px;
  line-height: 1;
}

.case-list-card .admin-list-footer .pagination {
  gap: 4px;
}

.case-list-card .admin-list-footer .btn {
  min-height: 22px;
  padding: 0 7px;
}

.case-list-card .admin-list-footer .page-size-select {
  min-height: 22px;
  width: 62px;
  padding-inline: 8px;
}

.admin-card:last-child,
.admin-content > .split-layout:last-child,
.admin-content > .knowledge-grid:last-child,
.admin-content > .template-grid:last-child {
  margin-bottom: 0;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 16px;
  align-items: end;
}

.case-filter-card .filter-grid {
  grid-template-columns: minmax(260px, 1.15fr) minmax(186px, 0.68fr) repeat(4, minmax(104px, 0.66fr)) repeat(3, minmax(76px, auto));
}

.case-filter-card .filter-grid .btn {
  min-width: 88px;
  padding-inline: 10px;
}

.case-workbench-card {
  --case-action-column-width: 232px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dbe7f5;
  background: #ffffff;
}

.case-filter-card.case-list-card.case-workbench-card {
  padding: 0;
}

.case-filter-card.case-list-card.case-workbench-card:has(.case-toolbar-dropdown.open) {
  overflow: visible;
}

.case-workbench-card .case-toolbar {
  position: relative;
  z-index: 8;
  padding: 10px 12px;
  margin: 0;
  overflow: visible;
  border-bottom: 1px solid #e3edf9;
  background: #f8fbff;
  display: flex;
  align-items: center;
  gap: 8px;
  --case-filter-control-height: 34px;
}

/* 工具栏内所有控件统一34px高度，不换行，不压缩 */
.case-workbench-card .case-toolbar .btn,
.case-workbench-card .case-toolbar .input,
.case-workbench-card .case-toolbar .select,
.case-workbench-card .case-toolbar .ui-date-range-trigger,
.case-workbench-card .case-toolbar .case-toolbar-dropdown-toggle,
.case-workbench-card .case-toolbar .case-filter-toggle {
  height: var(--case-filter-control-height);
  min-height: var(--case-filter-control-height);
  box-sizing: border-box;
  padding-block: 0;
  white-space: nowrap;
  flex-shrink: 0;
}

.case-toolbar-filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 1;
  min-width: 0;
  flex-wrap: nowrap;
}

/* 操作组推到最右：margin-left:auto 而非 space-between */
.case-toolbar-action-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}

.case-toolbar-sep {
  width: 1px;
  height: 18px;
  background: #d8e4f0;
  flex-shrink: 0;
}

/* 搜索框：原grid为200px，允许按屏幕宽度适度收缩 */
.case-toolbar-filter-group > .input[name="search"] {
  width: 200px;
  flex-shrink: 1;
}

/* 日期控件：原grid 166px — 约束外层 wrapper div */
.case-toolbar-filter-group .admin-date-range,
.case-toolbar-filter-group .ui-date-range-trigger {
  width: 166px;
  min-width: 166px;
  max-width: 166px;
  flex-shrink: 0;
}

/* 工具栏内下拉容器：inline-flex 脱离 width:100% 循环，自然按内容宽度 */
.case-toolbar-filter-group .case-toolbar-dropdown {
  display: inline-flex;
  width: auto;
}

.case-toolbar-filter-group .case-toolbar-dropdown-toggle {
  width: max-content;
}

/* 工具栏按钮统一紧凑尺寸 */
.case-toolbar-filter-group .btn,
.case-toolbar-action-group .btn {
  min-height: 32px;
  min-width: auto;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 760;
  border-radius: 5px;
  border-color: #cfd7e3;
  background: #ffffff;
  color: #2b4361;
  box-shadow: none;
  transform: none;
}

.case-toolbar-filter-group .btn:hover,
.case-toolbar-action-group .btn:hover {
  border-color: #5ec4f4;
  background: #eef9ff;
  color: #075f95;
  transform: none;
}

.case-toolbar-filter-group .btn.primary,
.case-toolbar-action-group .btn.primary {
  border-color: #38aee6;
  background: #2459d6;
  color: #ffffff;
}

.case-toolbar-filter-group .btn.primary:hover,
.case-toolbar-action-group .btn.primary:hover {
  filter: brightness(1.06);
  border-color: #38aee6;
  transform: none;
}

.case-toolbar-filter-group .btn.ghost,
.case-toolbar-action-group .btn.ghost {
  background: transparent;
  border-color: transparent;
  color: #8b9cb2;
}

.case-toolbar-filter-group .btn.ghost:hover,
.case-toolbar-action-group .btn.ghost:hover {
  background: rgba(0, 0, 0, .04);
  color: #2b4361;
  border-color: transparent;
}

.case-pickup-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 12px 0;
  background: #ffffff;
  border-bottom: 1px solid #e3edf9;
}

.case-pickup-tab {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 5px 5px 0 0;
  color: #52657c;
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.case-pickup-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 8px;
  padding: 0 6px;
  border-radius: 999px;
  color: #1479bd;
  background: #e3f4ff;
  font-size: 11px;
  font-style: normal;
  line-height: 1;
}

.case-pickup-tab:hover {
  color: #1677b8;
  background: #f3f9ff;
}

.case-pickup-tab.active {
  color: #1479bd;
  border-bottom-color: #38aee6;
  background: #eef9ff;
}

.case-workbench-card .case-toolbar:has(.case-toolbar-dropdown.open) {
  z-index: 120;
}

.case-filter-card .filter-grid:has(.case-toolbar-dropdown.open) {
  position: relative;
  z-index: 120;
}

.case-toolbar-actions {
  display: grid;
  grid-template-columns: repeat(5, auto);
  gap: 6px;
  justify-content: end;
  align-items: center;
  min-width: 0;
}

.case-toolbar-actions .btn {
  min-width: 70px;
}

.customer-workbench-card .case-toolbar-actions {
  grid-template-columns: repeat(2, auto);
}

.case-workbench-card .filter-field {
  isolation: isolate;
}

.case-workbench-card .filter-field > span:not(.filter-label-hidden) {
  color: #617189;
  font-size: 11px;
  font-weight: 780;
}

.case-workbench-card .input,
.case-workbench-card .select,
.case-workbench-card .ui-date-range-trigger,
.case-workbench-card .case-filter-toggle,
.case-workbench-card .case-toolbar-dropdown-toggle,
.case-workbench-card .case-toolbar-actions .btn {
  border-color: #d6e1ef;
  background: #ffffff;
  color: #1b2f4a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.case-workbench-card .input,
.case-workbench-card .select {
  font-size: 12px;
  font-weight: 700;
}

.case-workbench-card .input::placeholder {
  color: #8b9cb2;
  font-weight: 650;
}

.case-workbench-card .ui-date-trigger-segment,
.case-workbench-card .ui-date-trigger-segment.placeholder,
.case-workbench-card .ui-date-trigger-segment.active {
  display: inline;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #6f7f94;
  cursor: inherit;
  font-weight: 700;
}

.case-workbench-card .ui-date-range-trigger {
  padding-inline: 8px 7px;
}

.case-workbench-card .ui-date-range-trigger-inputs {
  gap: 4px;
  min-width: 0;
  justify-content: center;
}

.case-workbench-card .ui-date-trigger-segment.placeholder,
.case-workbench-card .ui-date-trigger-segment.active {
  background: transparent;
}

.case-workbench-card .input:focus,
.case-workbench-card .select:focus,
.case-workbench-card .ui-date-range-trigger:focus-visible,
.case-workbench-card .case-filter-toggle:focus-visible,
.case-workbench-card .case-toolbar-dropdown-toggle:focus-visible {
  outline: 2px solid rgba(64, 116, 214, 0.16);
  border-color: #8fb0e8;
}

.case-workbench-card .case-combined-filter:has(.case-filter-popover),
.case-workbench-card .case-toolbar:has(.case-filter-popover) {
  z-index: 40;
}

.case-toolbar-actions .btn {
  color: #2b4361;
  font-size: 12px;
  font-weight: 760;
}

.case-toolbar-actions .btn.primary {
  background: #2459d6;
  color: #ffffff;
}

.case-workbench-card .case-toolbar-actions .btn,
.case-workbench-card .case-filter-toggle,
.case-workbench-card .case-toolbar-dropdown-toggle,
.admin-cases-table.case-table-density-compact .case-action-group .btn,
.customers-table.case-table-density-compact .case-action-group .btn,
.admin-modal-case-detail .btn {
  border-radius: 5px;
  box-shadow: none;
  transform: none;
}

.case-workbench-card .case-toolbar-actions .btn,
.case-workbench-card .case-toolbar-dropdown-toggle,
.admin-cases-table.case-table-density-compact .case-action-group .btn,
.customers-table.case-table-density-compact .case-action-group .btn,
.admin-modal-case-detail .btn {
  border-color: #cfd7e3;
  background: #ffffff;
  color: #2f3744;
}

.case-workbench-card .case-toolbar-actions .btn:hover,
.case-workbench-card .case-toolbar-dropdown-toggle:hover,
.admin-cases-table.case-table-density-compact .case-action-group .btn:hover,
.customers-table.case-table-density-compact .case-action-group .btn:hover,
.admin-modal-case-detail .btn:hover {
  border-color: #5ec4f4;
  background: #eef9ff;
  color: #075f95;
  transform: none;
}

.customers-table.case-table-density-compact .case-action-group .btn:hover {
  border-color: #5ec4f4;
  background: #eef9ff;
  color: #075f95;
  transform: none;
}

.knowledge-table.case-table-density-compact .case-action-group .btn,
.template-table.case-table-density-compact .case-action-group .btn {
  border-color: #cfd7e3;
  background: #ffffff;
  color: #2f3744;
}

.knowledge-table.case-table-density-compact .case-action-group .btn:hover,
.template-table.case-table-density-compact .case-action-group .btn:hover {
  border-color: #5ec4f4;
  background: #eef9ff;
  color: #075f95;
  transform: none;
}

.case-workbench-card .case-toolbar-actions .btn:active,
.case-workbench-card .case-toolbar-dropdown-toggle:active,
.admin-cases-table.case-table-density-compact .case-action-group .btn:active,
.customers-table.case-table-density-compact .case-action-group .btn:active,
.admin-modal-case-detail .btn:active {
  background: #dff3ff;
  transform: none;
}

.knowledge-table.case-table-density-compact .case-action-group .btn:active,
.template-table.case-table-density-compact .case-action-group .btn:active {
  background: #dff3ff;
  transform: none;
}

.case-workbench-card .case-toolbar-actions .btn.primary,
.admin-modal-case-detail .btn.primary {
  border-color: #38aee6;
  background: #ffffff;
  color: #066da8;
}

.case-workbench-card .case-toolbar-actions .btn.primary:hover,
.admin-modal-case-detail .btn.primary:hover {
  border-color: #10a5e8;
  background: #eaf8ff;
  color: #005f98;
}

.admin-cases-table.case-table-density-compact .case-action-group .btn.danger,
.knowledge-table.case-table-density-compact .case-action-group .btn.danger,
.template-table.case-table-density-compact .case-action-group .btn.danger,
.admin-modal-case-detail .btn.danger {
  border-color: #f0b8b8;
  background: #ffffff;
  color: #b83d3d;
}

.admin-cases-table.case-table-density-compact .case-action-group .btn.danger:hover,
.knowledge-table.case-table-density-compact .case-action-group .btn.danger:hover,
.template-table.case-table-density-compact .case-action-group .btn.danger:hover,
.admin-modal-case-detail .btn.danger:hover {
  border-color: #eb8f8f;
  background: #fff1f1;
  color: #a52f2f;
}

.filter-field {
  position: relative;
  min-width: 0;
}

.filter-label-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  white-space: nowrap;
}

.admin-date-range {
  position: relative;
}

.ui-date-range-compact {
  width: 100%;
}

.date-range-trigger,
.ui-date-range-trigger {
  width: 100%;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--text);
  font-weight: 760;
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.16s ease, background 0.16s ease;
}

.ui-date-range-trigger:hover {
  border-color: #bfd4fb;
  transform: translateY(-1px);
}

.ui-date-range-trigger.open,
.ui-date-range-trigger:focus-visible {
  border-color: #2b79ff;
  box-shadow: none;
  outline: none;
}

.ui-date-range-trigger:active {
  transform: translateY(0) scale(0.985);
}

.ui-date-range-trigger-inputs {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.ui-date-trigger-segment {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-date-trigger-segment.placeholder {
  color: #5a6d8a;
}

.ui-date-trigger-segment.active {
  color: #1d5dd8;
}

.ui-date-trigger-separator,
.ui-date-range-trigger-icon {
  color: #5a6d8a;
}

.ui-date-range-trigger.open .ui-date-range-trigger-icon {
  color: #1d5dd8;
}

.ui-date-range-popover-layer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  width: 0;
  height: 0;
  pointer-events: none;
}

.ui-date-range-popover {
  position: fixed;
  display: none;
  border: 1px solid #d4e2f8;
  border-radius: 8px;
  background: white;
  box-shadow: 0 20px 46px rgba(35, 72, 125, 0.18);
  pointer-events: auto;
}

.ui-date-range-popover.show {
  display: block;
}

.ui-date-range-popover::before {
  content: '';
  position: absolute;
  top: -7px;
  left: var(--date-popover-arrow-left, 32px);
  width: 14px;
  height: 14px;
  border-left: 1px solid #d4e2f8;
  border-top: 1px solid #d4e2f8;
  background: white;
  transform: rotate(45deg);
}

.ui-date-range-main {
  overflow: hidden;
  border-radius: 8px;
  background: white;
}

.ui-date-range-body {
  display: flex;
  align-items: stretch;
  min-width: 0;
}

.ui-date-range-presets {
  width: 118px;
  flex: 0 0 118px;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 12px;
  border-right: 1px solid #e3ebf8;
  background: #f7fbff;
}

.ui-date-range-preset {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #374d6d;
  font-weight: 760;
  text-align: left;
  cursor: pointer;
}

.ui-date-range-preset:hover,
.ui-date-range-preset.active {
  border-color: #bfdbfe;
  background: #eaf2ff;
  color: #1d5dd8;
}

.ui-date-range-content {
  flex: 1;
  min-width: 0;
}

.admin-date-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #e3ebf8;
}

.ui-date-field {
  display: grid;
  gap: 4px;
  color: #3a4f70;
  font-size: 12px;
  font-weight: 760;
}

.ui-date-field-input {
  min-height: 36px;
  border: 1px solid #d4e2f8;
  border-radius: 8px;
  padding: 0 10px;
  color: var(--text);
  font: inherit;
}

.ui-date-range-calendars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.calendar-pane + .calendar-pane {
  border-left: 1px solid #e3ebf8;
}

.calendar-head {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 10px 12px 8px;
  border-bottom: 1px solid #edf3fc;
}

.calendar-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 820;
}

.calendar-nav {
  display: inline-flex;
  min-width: 32px;
}

.calendar-nav.trailing {
  justify-content: flex-end;
}

.calendar-nav button {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #5a6d8a;
  font-size: 20px;
  cursor: pointer;
}

.calendar-nav button:hover {
  background: #edf4ff;
  color: #1d5dd8;
}

.calendar-grid {
  display: grid;
  gap: 6px;
  padding: 10px 12px 12px;
}

.calendar-weekdays,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays span {
  padding-bottom: 5px;
  color: #3a4f70;
  font-size: 11px;
  font-weight: 760;
  text-align: center;
}

.calendar-day {
  position: relative;
  min-height: 38px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.calendar-day::before {
  content: '';
  position: absolute;
  inset: 7px 0;
  background: transparent;
}

.calendar-day.muted {
  color: #8e9bb0;
}

.calendar-day:hover::before {
  background: #f5f9ff;
}

.calendar-day.in-range::before {
  background: #e9f1ff;
}

.calendar-day.range-start::before {
  left: 50%;
  right: 0;
  background: #e9f1ff;
}

.calendar-day.range-end::before {
  left: 0;
  right: 50%;
  background: #e9f1ff;
}

.calendar-day.single::before {
  background: transparent;
}

.day-label {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 13px;
}

.calendar-day.range-start .day-label,
.calendar-day.range-end .day-label {
  background: #2369e8;
  color: white;
  font-weight: 820;
  box-shadow: none;
}

.admin-date-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 14px 12px;
  border-top: 1px solid #edf3fc;
}

.admin-date-actions .btn {
  min-width: 68px;
  min-height: 34px;
  padding-inline: 12px;
  border-radius: 6px;
  font-size: 13px;
}

@media (max-width: 768px) {
  .ui-date-range-body {
    flex-direction: column;
  }

  .ui-date-range-presets {
    width: 100%;
    flex: 0 0 auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-right: 0;
    border-bottom: 1px solid #e3ebf8;
  }

  .admin-date-fields,
  .ui-date-range-calendars {
    grid-template-columns: 1fr;
  }

  .calendar-pane + .calendar-pane {
    border-left: 0;
    border-top: 1px solid #e3ebf8;
  }
}

.filter-grid label,
.settings-row label,
.editor label {
  display: grid;
  gap: 4px;
  color: var(--text);
  font-weight: 720;
  font-size: 13px;
}

.table-wrap {
  min-height: 0;
  overflow-x: auto;
}

.admin-content:has(.stats-overview-card) > .admin-card:last-child {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.split-layout > .admin-card .table-wrap,
.knowledge-grid > .admin-card .table-wrap,
.template-grid > .admin-card .table-wrap {
  flex: 1;
}

.split-layout > .admin-card,
.split-layout > .side-panel,
.knowledge-grid > .admin-card,
.knowledge-grid > .side-panel,
.template-grid > .admin-card,
.template-grid > .side-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 960px;
}

.data-table th,
.data-table td {
  padding: 13px 12px;
  border-bottom: 1px solid #e8eef8;
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

.contact-lines {
  display: grid;
  gap: 5px;
  line-height: 1.25;
  min-width: 220px;
}

.contact-lines span:not(.contact-line) {
  display: block;
  word-break: break-word;
}

.contact-line span {
  display: inline;
}

.admin-cases-table {
  min-width: 2300px;
  table-layout: fixed;
}

.admin-cases-table th,
.admin-cases-table td {
  padding: 10px 9px;
}

.admin-cases-table tbody tr {
  height: 64px;
  max-height: 64px;
}

.admin-cases-table tbody td {
  height: 64px;
  max-height: 64px;
}

.admin-cases-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #f8fbff;
  box-shadow: inset 0 -1px #dbe7f5;
}

.admin-cases-table th,
.admin-cases-table .case-nowrap {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-cases-table th {
  min-width: 42px;
  resize: horizontal;
}

.admin-cases-table th:nth-child(1) { width: 88px; }
.admin-cases-table th:nth-child(2) { width: 46px; }
.admin-cases-table th:nth-child(3) { width: 88px; }
.admin-cases-table th:nth-child(4) { width: 180px; }
.admin-cases-table th:nth-child(5) { width: 80px; }
.admin-cases-table th:nth-child(6) { width: 293px; }
.admin-cases-table th:nth-child(7) { width: 140px; }
.admin-cases-table th:nth-child(8) { width: 96px; }
.admin-cases-table th:nth-child(9) { width: 160px; }
.admin-cases-table th:nth-child(10) { width: 50px; }
.admin-cases-table th:nth-child(11) { width: 56px; }
.admin-cases-table th:nth-child(12) { width: 320px; }
.admin-cases-table th:nth-child(13) { width: 140px; }

.case-status-cell {
  text-align: center;
  overflow: visible !important;
}

.case-status-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  width: auto;
  min-width: 82px;
  justify-content: center;
}

.case-status-select-wrap.is-open {
  min-width: 82px;
}

.case-status-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  min-width: 74px;
  height: 28px;
  padding: 0 9px;
  border: 1px solid #d9e4f2;
  border-radius: 999px;
  background: #ffffff;
  color: #23324a;
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
}

.case-status-trigger:hover,
.case-status-select-wrap.is-open .case-status-trigger {
  border-color: #b7c9e4;
  box-shadow: 0 8px 18px rgba(31, 52, 92, 0.12);
}

.case-status-dot {
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #cbd7e8;
}

.case-status-dot.new,
.case-status-pill.new .case-status-dot {
  background: #ef4444;
}

.case-status-dot.processing,
.case-status-pill.processing .case-status-dot {
  background: #f59e0b;
}

.case-status-dot.closed,
.case-status-pill.closed .case-status-dot {
  background: #22c55e;
}

.case-status-dot.unhandled {
  background: #ef4444;
}

.case-status-dot.following {
  background: #f59e0b;
}

.case-status-dot.done {
  background: #22c55e;
}

.case-status-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 12;
  display: grid;
  gap: 4px;
  width: 118px;
  padding: 6px;
  transform: translateX(-50%);
  border: 1px solid #d9e4f2;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(28, 45, 78, 0.18);
}

.case-status-option {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
  text-align: left;
}

.case-status-option:hover,
.case-status-option.active {
  background: #f0f5ff;
}

.case-customer-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-event-item {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.case-event-item:last-child {
  border-bottom: 0;
}

.case-event-item p {
  margin: 0;
  line-height: 1.55;
}

.case-event-item small {
  color: var(--muted);
}

.case-event-item time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.case-progress-timeline {
  display: grid;
  gap: 0;
  padding: 4px 0;
}

.case-progress-step {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  padding: 0 0 14px;
}

.case-progress-step::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 18px;
  bottom: 0;
  width: 2px;
  background: #dbe8fb;
}

.case-progress-step:last-child {
  padding-bottom: 0;
}

.case-progress-step:last-child::before {
  display: none;
}

.case-progress-dot {
  position: relative;
  z-index: 1;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  border: 3px solid #d9e8ff;
  border-radius: 50%;
  background: #4f83ff;
  box-sizing: border-box;
}

.case-progress-step strong,
.case-progress-step time {
  display: inline-flex;
  margin-right: 8px;
}

.case-progress-step time {
  color: var(--muted);
  font-size: 12px;
}

.case-progress-step p {
  margin: 3px 0 0;
  color: #31547d;
  line-height: 1.45;
}

.case-detail-head h3,
.case-detail-head p {
  margin: 0;
}

.case-detail-head h3 {
  font-size: 18px;
  line-height: 1.1;
}

.case-detail-head p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.admin-modal.admin-modal-case-detail {
  display: flex;
  flex-direction: column;
  width: min(1240px, calc(100vw - 28px));
  height: auto;
  max-height: min(980px, calc(100vh - 12px));
  overflow: hidden;
}

.admin-modal-case-detail .case-detail-head {
  position: sticky;
  top: 0;
  z-index: 20;
  flex: 0 0 auto;
  min-height: 54px;
  padding: 10px 14px;
  background: #fff;
  box-shadow: 0 1px 0 var(--line);
}

.admin-modal-case-detail .admin-modal-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-modal-case-detail .admin-modal-actions .btn {
  min-height: 34px;
  padding: 0 14px;
}

.admin-modal.admin-modal-case-detail .case-detail-body {
  display: block;
  flex: 1 1 auto;
  padding: 10px;
  min-height: 0;
  overflow: auto;
  background: #f6f9fd;
}

.admin-modal-backdrop:has(.case-communication-drawer) {
  place-items: stretch end;
  padding: 0;
}

.admin-modal.admin-modal-case-detail.case-communication-drawer {
  width: min(560px, 100vw);
  height: 100vh;
  max-height: 100vh;
  border-radius: 8px 0 0 8px;
}

.case-communication-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  overflow: hidden;
}

.case-communication-section {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #dbe6f3;
  border-radius: 8px;
  background: #ffffff;
}

.case-communication-info-grid {
  display: grid;
  gap: 6px;
}

.case-communication-info-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  min-width: 0;
}

.case-communication-info-row span,
.case-communication-section .case-block-head small {
  color: #6a7d91;
  font-size: 12px;
  font-weight: 760;
}

.case-communication-info-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #1d3655;
  font-size: 13px;
}

.case-communication-info-row .pickup-copy-value {
  max-width: 100%;
}

.case-communication-text {
  min-height: 112px;
  font-size: 13px;
}

.case-communication-section .case-block-head {
  align-items: center;
}

.case-communication-flag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  color: #31547d;
  font-size: 12px;
  font-weight: 780;
}

.case-communication-processing-method {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.case-communication-processing-method > span {
  color: #6a7d91;
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.case-communication-processing-method .select,
.case-communication-processing-method .btn {
  min-height: 32px;
}

.case-communication-reply .case-reply-composer {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.case-communication-reply {
  flex: 1 1 280px;
  min-height: 0;
}

.case-communication-reply .case-reply-toolbar {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) minmax(120px, 0.72fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
}

.case-communication-reply .case-reply-toolbar h4 {
  margin: 0;
  white-space: nowrap;
  color: #1d3655;
  font-size: 14px;
  font-weight: 840;
}

.case-communication-reply .case-reply-toolbar label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #6a7d91;
  font-size: 12px;
  font-weight: 760;
}

.case-communication-reply .case-reply-copy {
  min-height: 30px;
  min-width: 108px;
  padding: 0 10px;
  border-color: #b8cbe2;
  border-radius: 7px;
  background: #f8fbff;
  color: #22344d;
  font-size: 12px;
  font-weight: 820;
}

.case-communication-reply .case-reply-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.case-communication-reply .case-reply-controls label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #6a7d91;
  font-size: 12px;
  font-weight: 760;
}

.case-communication-reply .case-detail-custom-select > summary {
  min-height: 32px;
  border-radius: 7px;
  font-size: 12px;
}

.case-communication-reply .case-reply-textarea {
  width: 100%;
  height: 100%;
  min-height: 180px;
  font-size: 13px;
  line-height: 1.45;
  resize: vertical;
}

.case-detail-workbench {
  display: grid;
  grid-template-columns: minmax(0, 68fr) minmax(280px, 32fr);
  gap: 10px;
  align-items: stretch;
  height: auto;
  min-height: 0;
}

.case-detail-left {
  display: flex;
  flex-direction: column;
  align-content: start;
  gap: 10px;
  min-width: 0;
  min-height: 0;
}

.case-detail-base-area,
.case-detail-current-area {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.case-detail-base-area {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.case-detail-current-area {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.case-detail-region-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 20px;
  padding: 0 2px;
  min-width: 0;
}

.case-detail-region-title strong {
  color: #1d3655;
  font-size: 13px;
  font-weight: 820;
  line-height: 1.2;
}

.case-detail-log-shell {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-self: stretch;
  align-content: stretch;
  gap: 8px;
  height: 100%;
  min-width: 0;
  min-height: 0;
  contain: size layout;
  overflow: hidden;
}

.case-detail-log-head {
  padding: 0 2px;
}

.case-detail-log-head strong {
  font-size: 12px;
  font-weight: 800;
}

.case-detail-log-rail {
  position: static;
  display: block;
  align-self: stretch;
  height: 100%;
  min-height: 0;
  max-height: none;
  min-width: 0;
  overflow: auto;
  padding: 8px;
  border: 1px solid #dce7f4;
  border-radius: 8px;
  background: #fff;
}

.case-detail-info-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  overflow: visible;
  padding: 6px 8px;
  border: 1px solid #dce7f4;
  border-radius: 8px;
  background: #fff;
}

.case-detail-info-column {
  display: grid;
  gap: 4px;
  align-content: start;
  min-width: 0;
}

.case-detail-info-line {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.case-detail-info-line span {
  color: #244360;
  font-size: 10px;
  font-weight: 820;
  line-height: 1;
  white-space: nowrap;
}

.case-detail-info-controls {
  display: grid;
  min-width: 0;
}

.case-info-platform-line .case-detail-info-controls,
.case-info-phone-line .case-detail-info-controls {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
}

.case-info-phone-line .case-detail-info-controls {
  grid-template-columns: minmax(70px, 0.38fr) minmax(0, 1fr);
}

.case-detail-info-line .input,
.case-detail-info-line .case-detail-custom-select > summary {
  min-height: 26px;
  padding: 0 7px;
  border-color: #d7e2ef;
  border-radius: 6px;
  color: #1d3655;
  background: #fff;
  font-size: 12px;
  font-weight: 720;
}

.case-detail-info-line .case-detail-custom-select > summary::after {
  font-size: 13px;
}

.case-detail-info-line .case-detail-custom-menu {
  top: calc(100% + 4px);
}

.case-detail-static-value {
  min-height: 26px;
  display: grid;
  align-items: center;
  padding: 0 7px;
  border: 1px solid #d7e2ef;
  border-radius: 6px;
  background: #f7faff;
  color: #40536b;
  font-size: 12px;
  font-weight: 720;
}

.case-detail-base-addresses {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.case-detail-address-group {
  min-width: 0;
  padding-top: 7px;
  border-top: 1px solid #e5edf6;
}

.case-detail-address-group h4 {
  margin: 0 0 6px;
  color: #244360;
  font-size: 11px;
  line-height: 1.2;
}

.case-detail-address-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 10px;
}

.case-detail-address-fields .case-detail-info-line {
  grid-template-columns: 48px minmax(0, 1fr);
}

.case-detail-left-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.78fr);
  gap: 10px;
  align-items: stretch;
  min-width: 0;
  min-height: 185px;
}

.case-detail-left-main,
.case-detail-left-side {
  display: grid;
  gap: 10px;
  min-width: 0;
  min-height: 0;
}

.case-detail-left-main {
  align-content: start;
  grid-template-rows: auto auto;
}

.case-detail-current-stack {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.case-detail-secondary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 10px;
  align-items: stretch;
  min-width: 0;
}

.case-detail-current-stack {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.case-detail-area-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
  min-width: 0;
}

.case-detail-area-column {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
}

.case-detail-current-marker {
  margin-left: auto;
  color: #52708f;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.case-detail-method-label {
  color: #52708f;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.case-detail-area-card {
  align-self: start;
  width: 100%;
  min-width: 0;
  min-height: 0;
}

.case-detail-area-card.is-disabled {
  background: #f8fafc;
}

.case-detail-area-card .pickup-state-info-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.case-detail-area-card .pickup-state-info-grid div {
  min-width: 0;
}

.case-detail-area-card .pickup-state-primary {
  justify-content: flex-end;
}

@media (max-width: 900px) {
  .case-detail-area-stack {
    grid-template-columns: minmax(0, 1fr);
  }

  .case-detail-area-column {
    display: contents;
  }

  .case-detail-area-card[data-detail-area="地址区域"] { order: 1; }
  .case-detail-area-card[data-detail-area="取件区域"],
  .case-detail-area-card[data-detail-area="客户寄回"] { order: 2; }
  .case-detail-area-card[data-detail-area="重发区域"],
  .case-detail-area-card[data-detail-area="物流区域"] { order: 3; }
  .case-detail-area-card[data-detail-area="退款区域"] { order: 4; }

  .case-detail-current-marker { margin-left: auto; }
}

@media (max-width: 520px) {
  .case-detail-area-card .pickup-state-info-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.case-detail-current-area .case-detail-block {
  padding: 8px;
}

.case-detail-current-area .btn.compact {
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.case-detail-block {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #dde8f4;
  border-radius: 8px;
  background: #fff;
}

.case-block-head {
  display: flex;
  align-items: center;
  min-width: 0;
}

.case-block-head strong {
  color: #1d3655;
  font-size: 13px;
  font-weight: 820;
}

.case-block-head em {
  margin-left: auto;
  font-style: normal;
}

.case-detail-field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  gap: 6px;
}

.case-detail-block .input,
.case-detail-block .select,
.case-detail-block .textarea {
  border-color: #d7e2ef;
  border-radius: 6px;
  color: #1d3655;
  background: #fff;
  font-size: 12px;
}

.case-detail-block .input,
.case-detail-block .select {
  min-height: 30px;
  padding: 0 8px;
}

.case-block-workflow {
  gap: 7px;
}

.case-block-method-selection {
  align-content: start;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.case-block-method-selection .case-block-head {
  grid-column: 1 / -1;
}

.workflow-method-panel,
.case-block-method-selection .workflow-closure-actions {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 6px;
  min-width: 0;
}

.workflow-method-panel .workflow-field,
.case-block-method-selection .workflow-closure-actions .workflow-field {
  display: contents;
}

.workflow-method-panel .workflow-field > span,
.case-block-method-selection .workflow-closure-actions .workflow-field > span {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
}

.workflow-method-panel .workflow-field > .select,
.case-block-method-selection .workflow-closure-actions .workflow-field > .textarea {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.workflow-method-action,
.workflow-closure-action {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
}

.case-block-method-selection .workflow-closure-actions {
  margin-top: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

@media (max-width: 900px) {
  .case-block-method-selection {
    grid-template-columns: minmax(0, 1fr);
  }

  .case-block-method-selection .case-block-head {
    grid-column: auto;
  }
}

.workflow-focused-panel {
  gap: 7px;
}

.workflow-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.workflow-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 6px;
}

.workflow-summary-item {
  display: grid;
  gap: 2px;
  min-width: 0;
  min-height: 42px;
  padding: 6px 8px;
  border: 1px solid #dfe8f3;
  border-radius: 6px;
  background: #f8fbff;
}

.workflow-field {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.workflow-field > span,
.workflow-summary-item > span {
  color: #52708f;
  font-size: 11px;
  font-weight: 760;
}

.workflow-field > strong,
.workflow-summary-item > strong,
.workflow-result {
  margin: 0;
  color: #1d3655;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.workflow-result {
  padding: 7px 9px;
  border: 1px solid #dfe8f3;
  border-radius: 6px;
  background: #f8fbff;
}

.workflow-issue-panel,
.workflow-correction-panel {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 8px;
  border: 1px solid #dfe8f3;
  border-radius: 6px;
  background: #f8fbff;
}

.workflow-issue-panel.is-pending {
  border-color: #f0c7bf;
  background: #fff9f7;
}

.workflow-issue-panel > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.workflow-issue-panel > div:first-child strong,
.workflow-correction-panel > strong {
  color: #1d3655;
  font-size: 12px;
  font-weight: 820;
}

.workflow-issue-panel > p,
.workflow-issue-panel > small {
  margin: 0;
  color: #657c94;
  font-size: 11px;
  line-height: 1.45;
}

.workflow-issue-panel .workflow-actions,
.workflow-correction-panel .workflow-actions {
  justify-content: flex-start;
}

.workflow-correction-disclosure {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.workflow-correction-disclosure > summary {
  width: max-content;
  cursor: pointer;
  list-style: none;
}

.workflow-correction-disclosure > summary::-webkit-details-marker {
  display: none;
}

.workflow-area {
  grid-column: 1 / -1;
}

.refund-completion-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.refund-note-action-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 10px;
  align-items: end;
}

.refund-note-action-row .workflow-area {
  grid-column: auto;
}

.refund-note-field .textarea {
  min-height: 58px;
  resize: vertical;
}

.case-block-workflow .refund-submit-btn {
  justify-self: end;
  width: max-content;
  min-width: 108px;
  min-height: 34px;
  padding-inline: 14px;
}

.workflow-focused-refund-panel .refund-submit-btn {
  justify-self: end;
  width: max-content;
  min-width: 108px;
  min-height: 34px;
  padding-inline: 14px;
}

.workflow-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
}

.case-block-workflow > .btn {
  justify-self: start;
  width: max-content;
  max-width: 100%;
  min-width: 128px;
}

.case-block-workflow > .btn.primary {
  padding-inline: 14px;
}

.workflow-focused-panel > .btn {
  justify-self: start;
  width: max-content;
  max-width: 100%;
  min-width: 128px;
}

.workflow-focused-panel > .btn.primary {
  padding-inline: 14px;
}

.workflow-field-action {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  min-width: 0;
}

.workflow-field-action .workflow-field {
  flex: 1 1 0;
  min-width: 0;
}

.workflow-field-action .btn {
  flex: 0 0 auto;
  align-self: flex-end;
}

.workflow-closure-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.workflow-closure-header > span {
  color: #7a8fa6;
  font-size: 11px;
  font-weight: 760;
}

.workflow-closure-header .btn {
  flex: 0 0 auto;
}

.workflow-closure-actions {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px 10px 8px;
  margin-top: 4px;
  border-top: 1px solid #dfe8f3;
  border-radius: 6px;
  background: #f6f8fb;
}

.workflow-closure-actions .workflow-field > span {
  color: #7a8fa6;
}

.workflow-closure-actions .workflow-actions {
  justify-content: flex-start;
}

.case-detail-custom-select {
  position: relative;
  min-width: 0;
}

.case-detail-custom-select > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid #d7e2ef;
  border-radius: 7px;
  color: #1d3655;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.case-detail-custom-select > summary::-webkit-details-marker {
  display: none;
}

.case-detail-custom-select > summary::after {
  content: '⌄';
  flex: 0 0 auto;
  color: #31547d;
  font-size: 16px;
  line-height: 1;
}

.case-detail-custom-select > summary span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-detail-custom-select[open] > summary {
  border-color: #8bb6ff;
  box-shadow: 0 0 0 4px rgba(47, 104, 255, 0.12);
}

.case-detail-custom-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 70;
  display: grid;
  min-width: 100%;
  max-height: 220px;
  overflow: auto;
  padding: 4px;
  border: 1px solid #cddbea;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(22, 47, 74, 0.18);
}

.case-detail-custom-option {
  display: block;
  width: 100%;
  min-height: 30px;
  padding: 0 9px;
  border: 0;
  border-radius: 5px;
  color: #1d3655;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.case-detail-custom-option:hover,
.case-detail-custom-option:focus-visible {
  background: #f2f6fd;
  outline: none;
}

.case-detail-custom-option.is-selected {
  color: #174ea6;
  background: #eaf2ff;
}

.case-detail-custom-select.is-disabled > summary {
  color: #74869a;
  cursor: default;
}

.case-detail-block .textarea {
  min-height: 66px;
  padding: 8px;
  line-height: 1.45;
  resize: vertical;
}

.case-block-problem {
  grid-template-rows: auto auto minmax(96px, 1fr);
  align-content: start;
  gap: 8px;
  min-height: 194px;
  padding: 10px;
}

.case-block-problem .case-block-head {
  min-height: 18px;
}

.case-block-problem .case-block-head strong {
  font-size: 13px;
  line-height: 1.1;
}

.case-problem-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 0.8fr);
  gap: 8px;
  min-width: 0;
}

.case-problem-controls-single {
  grid-template-columns: minmax(0, 1fr);
}

.case-block-problem .case-detail-custom-select > summary {
  min-height: 32px;
}

.case-block-problem > .textarea {
  min-height: 96px;
  height: auto;
  overflow: auto;
  resize: vertical;
}

.case-block-note .textarea {
  min-height: 70px;
}

.case-block-reply .case-reply-composer,
.case-block-reply .reply-composer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.case-block-reply {
  position: relative;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 194px;
  overflow: visible;
}

.case-block-reply .case-reply-head {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 2;
  display: block;
  justify-content: flex-end;
  margin: 0;
}

.case-block-reply .case-reply-head h4 {
  display: none;
}

.case-block-reply .case-reply-head .btn {
  min-width: 58px;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 820;
}

.case-block-reply .case-reply-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.case-block-reply .case-reply-controls label {
  font-size: 0;
}

.case-block-reply .case-detail-custom-select {
  font-size: 13px;
}

.case-block-reply .case-detail-custom-select > summary {
  min-height: 30px;
}

.case-block-reply .case-reply-empty {
  padding: 7px 9px;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.35;
}

.case-block-reply .case-reply-textarea,
.case-block-reply textarea {
  flex: 1 1 auto;
  min-height: 118px;
  height: auto;
  overflow: auto;
  resize: vertical;
  font-size: 12px;
}

.case-pickup-state-card {
  gap: 8px;
  padding: 9px 10px;
}

.pickup-state-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.pickup-state-head div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.pickup-state-head span,
.pickup-state-current span,
.pickup-state-info-section > span {
  color: #52708f;
  font-size: 11px;
  font-weight: 780;
  line-height: 1.2;
}

.pickup-state-head strong {
  color: #1d3655;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.2;
}

.pickup-state-head em {
  margin-left: auto;
  padding: 3px 8px;
  border: 1px solid #cfe1f4;
  border-radius: 999px;
  color: #295274;
  background: #f3f8ff;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.pickup-state-current {
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid #dce8f5;
  border-radius: 7px;
  background: #fbfdff;
}

.pickup-state-current strong {
  color: #1f3654;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.2;
}

.pickup-state-current p {
  margin: 0;
  color: #61758c;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.pickup-state-info-section {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.pickup-state-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
}

.pickup-state-edit-left,
.pickup-state-edit-right {
  display: grid;
  gap: 7px;
  align-content: start;
  min-width: 0;
}

.pickup-state-address-grid {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.pickup-state-edit-grid label {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 3px;
  min-width: 0;
  color: #6a7d91;
  font-size: 10px;
  font-weight: 760;
}

.pickup-state-edit-grid .input,
.pickup-state-edit-grid .textarea {
  border-color: #d7e2ef;
  border-radius: 6px;
  color: #1d3655;
  background: #fff;
  font-size: 12px;
  font-weight: 720;
}

.pickup-state-edit-grid .input {
  min-height: 32px;
  padding: 0 8px;
}

.pickup-state-edit-grid .pickup-time-field,
.pickup-state-edit-grid .pickup-remark-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 5px;
}

.pickup-state-edit-grid .pickup-time-controls {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(2, 32px);
  gap: 4px;
}

.pickup-state-edit-grid .pickup-time-row {
  grid-template-columns: 54px minmax(0, 1fr);
}

.pickup-state-edit-grid .pickup-remark-field .textarea {
  min-height: 64px;
  padding: 7px 8px;
}

.case-workflow-state-card .workflow-state-info-section {
  padding: 0;
}

.case-workflow-state-card .workflow-summary {
  grid-template-columns: repeat(3, minmax(124px, 1fr));
}

.case-workflow-state-card .workflow-summary-item {
  grid-template-columns: none;
  align-items: start;
  min-height: 38px;
}

.case-workflow-state-card .workflow-fields {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

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

.pickup-state-info-grid div {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  min-height: 32px;
  padding: 5px 7px;
  border: 1px solid #dde8f4;
  border-radius: 6px;
  background: #ffffff;
}

.pickup-state-info-grid small {
  color: #6a7d91;
  font-size: 10px;
  font-weight: 760;
  line-height: 1.1;
}

.pickup-state-info-grid strong {
  min-width: 0;
  color: #1f3654;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.pickup-state-primary {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-start;
}

.case-pickup-state-card.is-editable .pickup-state-primary {
  justify-content: flex-end;
}

.pickup-state-flow-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pickup-state-primary .btn {
  width: max-content;
  min-height: 30px;
  padding: 0 12px;
}

.pickup-user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 0.72fr);
  gap: 7px;
  min-width: 0;
}

.pickup-user-row label {
  grid-template-columns: 54px minmax(0, 1fr);
}

.pickup-remark-field {
  align-items: start;
}

.pickup-time-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr);
  grid-template-rows: 32px;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.pickup-time-arrow {
  color: #5f7691;
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  text-align: center;
}

.pickup-remark-field .textarea {
  min-height: 96px;
  height: auto;
}

.case-log-list {
  position: relative;
  display: grid;
  gap: 4px;
  padding-left: 10px;
}

.case-log-list::before {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 3px;
  width: 1px;
  background: #d9e4f0;
}

.case-log-item {
  position: relative;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: start;
  gap: 4px 6px;
  min-width: 0;
  padding: 4px 6px;
  border: 1px solid #e2ebf5;
  border-radius: 8px;
  background: #fbfdff;
}

.case-log-item.is-latest {
  border-color: #b9d4ef;
  background: #eef5ff;
}

.case-log-item::before {
  content: '';
  position: absolute;
  top: 11px;
  left: -12px;
  width: 7px;
  height: 7px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #8aa7c7;
  box-shadow: 0 0 0 1px #cfdbeb;
}

.case-log-item time {
  min-width: max-content;
  color: #74869a;
  font-size: 10px;
  font-weight: 720;
  line-height: 18px;
  white-space: nowrap;
}

.case-log-item p {
  display: -webkit-box;
  min-width: 0;
  max-height: 36px;
  overflow: hidden;
  margin: 0;
  color: #31547d;
  font-size: 11px;
  line-height: 18px;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.case-log-chip {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 6px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 860;
  white-space: nowrap;
}

.case-log-chip.order {
  color: #2450a6;
  background: #edf3ff;
}

.case-log-chip.customer {
  color: #16734b;
  background: #ecf8f0;
}

.case-log-chip.admin {
  color: #8f5a07;
  background: #fff4df;
}

.case-log-chip.note {
  color: #6246a8;
  background: #f3efff;
}

.case-log-chip.pickup {
  color: #12658f;
  background: #eaf7ff;
}

.case-log-chip.operation {
  color: #a53b3b;
  background: #fff0f0;
}

.case-detail-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid #dbe7f6;
  border-radius: 8px;
  background: #f6faff;
}

.case-detail-summary div,
.case-detail-panel {
  min-width: 0;
}

.case-detail-summary span {
  display: block;
  margin-bottom: 4px;
  color: #6a7d91;
  font-size: 12px;
  font-weight: 760;
}

.case-detail-summary strong {
  display: block;
  overflow: hidden;
  color: #1d3655;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-detail-sections {
  display: grid;
  grid-template-columns: minmax(360px, 2fr) minmax(280px, 1fr);
  gap: 14px;
  align-items: start;
}

.case-detail-primary,
.case-detail-aside {
  display: grid;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  align-content: start;
}

.case-detail-panel {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid #e0e9f6;
  border-radius: 8px;
  background: #fff;
}

.case-detail-panel h4,
.case-detail-panel p {
  margin: 0;
}

.case-detail-panel h4,
.case-detail-panel > strong {
  color: #1d3655;
  font-size: 14px;
}

.case-detail-panel p {
  line-height: 1.62;
}

.case-detail-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.case-detail-edit-panel {
  gap: 12px;
}

.case-detail-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.case-detail-form-grid label,
.case-detail-wide-field {
  display: grid;
  gap: 6px;
  color: #31547d;
  font-size: 12px;
  font-weight: 760;
}

.case-detail-wide-field {
  margin: 0;
}

.case-detail-edit-panel .textarea {
  min-height: 92px;
}

.case-detail-timeline-panel {
  align-content: start;
  min-height: 0;
  height: auto;
  max-height: none;
  overflow: visible;
  overscroll-behavior: auto;
}

.case-detail-reply-panel {
  min-height: 0;
}

.case-detail-reply-panel .reply-composer {
  margin: 0;
}

.detail-badge {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3b82f6;
}

.detail-count {
  font-size: 12px;
  font-weight: 600;
  color: #6a7d91;
  background: #eef3fb;
  border-radius: 10px;
  padding: 1px 7px;
}

.case-detail-timeline-more > summary {
  font-size: 12px;
  color: #3b82f6;
  cursor: pointer;
  margin-top: 8px;
}

.pickup-section-summary {
  display: grid;
  gap: 10px;
}

.pickup-title-with-help {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.pickup-help-wrap {
  position: relative;
  display: inline-flex;
}

.pickup-help-trigger {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid #9db8d8;
  border-radius: 999px;
  background: #f6faff;
  color: #31547d;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: help;
}

.pickup-help-tooltip {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 35;
  display: none;
  width: min(560px, calc(100vw - 160px));
  padding: 12px 16px;
  border: 1px solid #c8d8ee;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgb(32 72 117 / 16%);
  color: #1d3655;
  font-size: 13px;
  line-height: 1.55;
  text-transform: none;
  letter-spacing: 0;
}

.pickup-help-wrap:hover .pickup-help-tooltip,
.pickup-help-wrap:focus-within .pickup-help-tooltip {
  display: grid;
  gap: 8px;
}

.pickup-help-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  white-space: normal;
}

.pickup-help-row strong {
  white-space: nowrap;
}

.pickup-section-actions {
  display: grid;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid #e0e9f6;
}

.pickup-section-history {
  border-top: 1px solid #e0e9f6;
  padding-top: 10px;
  display: grid;
  gap: 10px;
}

.pickup-section-history h5 {
  margin: 0;
  font-size: 14px;
  color: #1d3655;
}

.pickup-section-history h6 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: #31547d;
}

.pickup-section-history .pickup-lines {
  display: grid;
  gap: 10px;
}

.pickup-section-history .pickup-lines > details > summary {
  font-size: 13px;
  font-weight: 600;
  color: #31547d;
  cursor: pointer;
  margin-bottom: 6px;
}

.admin-cases-table .preferred-contact-cell {
  color: #31547d;
  font-weight: 760;
  text-align: center;
}

.preferred-contact-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 820;
}

.preferred-contact-pill.email {
  color: #1d5d95;
  background: #e8f4ff;
}

.preferred-contact-pill.whatsapp {
  color: #14734e;
  background: #e8f8ef;
}

.country-hover-cell {
  overflow: visible !important;
  position: relative;
}

.country-hover-cell:hover::after {
  content: attr(data-country-name);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -145%);
  z-index: 5;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(18, 39, 75, 0.14);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 8px 10px;
  pointer-events: none;
  white-space: nowrap;
}

.admin-cases-table .case-problem-cell {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
  display: table-cell;
  vertical-align: middle;
}

.admin-cases-table .case-problem-cell > span {
  display: block;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.admin-cases-table .case-action {
  text-align: center;
}

.admin-cases-table .case-identity-cell,
.admin-cases-table .case-supply-chain {
  text-align: left;
}

.admin-cases-table .case-contact-copy {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-cases-table .case-multiline-cell,
.admin-cases-table .case-fact-stack {
  display: grid;
  gap: 3px;
  min-width: 0;
  text-align: left;
}

.admin-cases-table .case-multiline-cell > div,
.admin-cases-table .case-fact-line {
  display: flex;
  align-items: baseline;
  gap: 2px;
  min-width: 0;
}

.admin-cases-table .case-multiline-cell span,
.admin-cases-table .case-fact-line span {
  flex: 0 0 auto;
  white-space: nowrap;
}

.admin-cases-table .case-multiline-cell strong,
.admin-cases-table .case-fact-line strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-cases-table .case-problem-line strong {
  white-space: normal;
  overflow-wrap: anywhere;
}

.admin-cases-table .case-identity-cell .case-id-value {
  display: inline-flex;
}

.admin-cases-table .case-identity-cell {
  position: relative;
  padding-right: 28px;
}

.admin-cases-table .case-duplicate-badge {
  position: absolute;
  top: 6px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #fff5f5;
  font-size: 11px;
  font-weight: 760;
  line-height: 1;
}

.case-action-group {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  justify-content: center;
  align-items: center;
  min-width: 112px;
}

.case-action-cluster {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.case-action-separator {
  align-self: stretch;
  width: 1px;
  min-height: 22px;
  background: #d8e1ed;
}

.case-action-group .icon-compact {
  min-width: 32px;
  min-height: 26px;
  padding: 0 7px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

/* 操作列文字链接样式 */
.case-op-links {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  justify-content: center;
}

.op-link {
  font-size: 12px;
  color: #1677ff;
  background: none;
  border: none;
  padding: 0 8px;
  cursor: pointer;
  line-height: 1.5;
  transition: color 0.15s ease;
}

.op-link:first-child {
  padding-left: 0;
}

.op-link:hover {
  color: #4096ff;
}

.op-link.op-muted {
  color: #8c8c8c;
}

.op-link.op-muted:hover {
  color: #555;
}

.op-link.op-accent {
  color: #722ed1;
}

.op-link.op-accent:hover {
  color: #9254de;
}

/* 条件操作按钮各自颜色 */
.op-link.op-accent-pickup {
  color: #d46b08;
}

.op-link.op-accent-pickup:hover {
  color: #fa8c16;
}

.op-link.op-accent-reissue {
  color: #096dd9;
}

.op-link.op-accent-reissue:hover {
  color: #1890ff;
}

.op-link.op-accent-refund {
  color: #389e0d;
}

.op-link.op-accent-refund:hover {
  color: #52c41a;
}

.op-link.op-del {
  color: #ff4d4f;
}

.op-link.op-del:hover {
  color: #ff7875;
}

.op-sep {
  color: #e0e0e0;
  font-size: 11px;
  user-select: none;
  padding: 0 1px;
}

/* 操作列「更多」下拉菜单 */
.case-more-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.case-more-dropdown {
  display: none; /* JS portal 模式：移入 body 后通过 inline style display:block 显示 */
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 5px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .10);
  min-width: 120px;
  width: max-content;
  z-index: 9999;
  padding: 4px 0;
  white-space: nowrap;
}

.case-more-item {
  display: block;
  width: 100%;
  padding: 7px 14px;
  font-size: 12px;
  color: #444;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1.4;
}

/* 下拉菜单内的按钮，覆盖其他上下文的 padding 规则 */
.case-more-dropdown .case-more-item {
  padding: 7px 14px;
}

.case-more-item:hover {
  background: #f5f5f5;
}

.case-more-item-danger {
  color: #cf1322;
  border-top: 1px solid #f5f5f5;
  margin-top: 3px;
}

.case-more-item-danger:hover {
  background: #fff1f0;
}

/* 聚焦工作流弹窗（处理补发/退款） */
.workflow-focused-body {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 20px;
}

.workflow-focused-refund-body {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 520px);
  gap: 14px;
  align-items: start;
  justify-content: center;
  max-width: min(780px, calc(100vw - 72px));
  margin: 0 auto;
}

.workflow-focused-refund-body .workflow-focused-refund-panel {
  width: 100%;
  max-width: 520px;
}

.workflow-focused-basic-info {
  display: grid;
  gap: 14px;
  align-content: start;
  min-height: 0;
  padding: 6px 0 0;
  color: #1d3655;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.workflow-focused-basic-info > strong {
  font-size: 15px;
  font-weight: 850;
  line-height: 1.2;
}

.workflow-focused-basic-info > p {
  display: grid;
  gap: 5px;
  margin: 0;
  min-width: 0;
}

.workflow-focused-basic-info span {
  color: #52708f;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.25;
}

.workflow-focused-basic-info b {
  color: #1d3655;
  font-size: 16px;
  font-weight: 760;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.admin-modal.admin-modal-case-detail:has(.return-workbench) {
  width: min(1420px, calc(100vw - 48px));
}

.admin-modal.admin-modal-case-detail:has(.return-workbench.is-return-pickup) {
  width: min(1160px, calc(100vw - 48px));
}

.admin-modal.admin-modal-case-detail:has(.return-workbench.is-return-pickup.has-refund-panel) {
  width: min(1420px, calc(100vw - 48px));
}

.admin-modal.admin-modal-case-detail:has(.return-workbench.is-return-reissue) {
  width: min(1420px, calc(100vw - 48px));
}

.admin-modal.admin-modal-case-detail:has(.return-workbench.is-reissue-direct) {
  width: min(1120px, calc(100vw - 48px));
}

.admin-modal.admin-modal-case-detail.admin-modal-logistics-compact:has(.return-workbench) {
  width: min(500px, calc(100vw - 28px));
  max-height: min(660px, calc(100vh - 20px));
}

.workflow-focused-body:has(.return-workbench) {
  max-width: min(1404px, calc(100vw - 72px));
  padding: 12px 8px;
}

.admin-modal-logistics-compact .workflow-focused-body:has(.return-workbench) {
  max-width: 100%;
  padding: 8px;
}

.return-workbench {
  display: grid;
  gap: 10px;
  align-items: stretch;
  min-width: 0;
}

.return-workbench.is-return-pickup {
  grid-template-columns: repeat(3, minmax(230px, 1fr));
  max-width: 1080px;
  margin: 0 auto;
}

.return-workbench.is-return-pickup.has-refund-panel {
  grid-template-columns: minmax(220px, 0.82fr) minmax(300px, 1.08fr) minmax(270px, 1fr) minmax(250px, 0.92fr);
  max-width: none;
}

.return-workbench.is-return-reissue {
  grid-template-columns: minmax(220px, 0.82fr) minmax(300px, 1.08fr) minmax(270px, 1fr) minmax(250px, 0.92fr);
}

.return-workbench.is-return-reissue.has-refund-panel {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.08fr) minmax(0, 1fr) minmax(0, 0.92fr) minmax(0, 0.92fr);
}

.return-workbench.is-reissue-direct {
  grid-template-columns: minmax(220px, 0.82fr) minmax(300px, 1.08fr) minmax(250px, 0.92fr);
  max-width: 1064px;
  margin: 0 auto;
}

.admin-modal-logistics-compact .return-workbench,
.admin-modal-logistics-compact .return-workbench.is-return-pickup,
.admin-modal-logistics-compact .return-workbench.is-return-reissue,
.admin-modal-logistics-compact .return-workbench.is-reissue-direct {
  grid-template-columns: minmax(0, 1fr);
  max-width: none;
  gap: 8px;
}

.admin-modal-logistics-compact .return-product-panel,
.admin-modal-logistics-compact .return-address-panel,
.admin-modal-logistics-compact .return-reissue-panel {
  display: none;
}

.admin-modal-logistics-compact .return-workbench-panel {
  min-height: auto;
  padding: 8px;
  gap: 7px;
}

.return-workbench-panel {
  display: grid;
  grid-template-rows: auto;
  gap: 8px;
  align-content: start;
  min-width: 0;
  min-height: 100%;
  padding: 10px;
  border: 1px solid #dbe6f3;
  border-radius: 7px;
  background: #ffffff;
}

.return-workbench-panel.return-product-plain {
  gap: 8px;
  /* border / border-radius / background inherit from .return-workbench-panel (white card) */
}

.return-product-plain .return-panel-title {
  min-height: 0;
  margin-bottom: 2px;
}

.return-product-plain label > span {
  color: #52708f;
  font-size: 13px;
  font-weight: 780;
}

/* Single-column field list inside product panel */
.return-product-list {
  display: grid;
  gap: 6px;
  align-items: start;
}

.return-product-list label {
  grid-template-columns: 4em minmax(0, 1fr);
  align-items: center;
  gap: 4px;
}

.return-product-list label > span {
  color: #52708f;
  font-size: 13px;
  font-weight: 780;
}

.return-panel-title {
  display: flex;
  align-items: center;
  min-height: 24px;
}

.return-panel-title strong {
  color: #1d3655;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.2;
}

.return-workbench-panel label {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #6a7d91;
  font-size: 11px;
  font-weight: 760;
}

.return-workbench-panel .input,
.return-workbench-panel .select,
.return-workbench-panel .textarea {
  width: 100%;
  min-width: 0;
  border-color: #d5e1ef;
  border-radius: 7px;
  color: #1d3655;
  background: #ffffff;
  font-size: 12px;
  font-weight: 720;
}

.return-workbench-panel .input,
.return-workbench-panel .select {
  min-height: 34px;
  padding: 0 9px;
}

.return-workbench-panel .textarea {
  min-height: 72px;
  padding: 8px 9px;
  resize: vertical;
}

.return-workbench-panel input[readonly],
.return-workbench-panel textarea[readonly],
.return-workbench-panel select:disabled,
.return-workbench-panel input:disabled,
.return-workbench-panel textarea:disabled {
  color: #66798e;
  background: #f4f7fb;
  cursor: not-allowed;
}

.return-address-panel,
.return-logistics-panel,
.return-reissue-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
}

.return-address-panel .return-panel-title,
.return-logistics-panel .return-panel-title,
.return-reissue-panel .return-panel-title {
  min-height: 20px;
}

.return-address-panel .return-panel-title strong,
.return-logistics-panel .return-panel-title strong,
.return-reissue-panel .return-panel-title strong {
  font-size: 13px;
  line-height: 1.15;
}

.return-address-panel label,
.return-logistics-panel label,
.return-reissue-panel label {
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 5px;
  font-size: 10px;
  line-height: 1.2;
}

.return-address-panel .input,
.return-address-panel .select,
.return-address-panel .textarea,
.return-logistics-panel .input,
.return-logistics-panel .select,
.return-logistics-panel .textarea,
.return-reissue-panel .input,
.return-reissue-panel .select,
.return-reissue-panel .textarea {
  border-radius: 6px;
  font-size: 11px;
  font-weight: 720;
}

.return-address-panel .input,
.return-address-panel .select,
.return-logistics-panel .input,
.return-logistics-panel .select,
.return-reissue-panel .input,
.return-reissue-panel .select {
  min-height: 30px;
  padding: 0 8px;
}

.return-address-panel .textarea,
.return-logistics-panel .textarea,
.return-reissue-panel .textarea {
  min-height: 54px;
  padding: 6px 8px;
}

.return-address-grid {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.return-address-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 1.2fr);
  gap: 6px;
  min-width: 0;
}

.return-address-country-postal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  min-width: 0;
}

.return-address-pickup-photos {
  display: grid;
  gap: 6px;
  padding-top: 2px;
}

.return-address-photo-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.return-address-photo-heading > span {
  color: #526b86;
  font-size: 10px;
  font-weight: 720;
}

.pickup-photo-append {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.pickup-photo-append input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.pickup-photo-preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 6px;
  min-width: 0;
}

.pickup-photo-preview {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  padding: 0;
  border: 1px solid #d5e1ef;
  border-radius: 6px;
  background: #f7faff;
}

button.pickup-photo-preview {
  cursor: zoom-in;
}

.pickup-photo-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.return-address-inline label,
.return-address-inline .return-address-user {
  grid-template-columns: 48px minmax(0, 1fr);
}

.return-panel-note {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.return-panel-note span {
  line-height: 1.2;
}

.return-panel-note--exception span {
  color: #c26a00;
}

.return-panel-note--exception textarea {
  border-left: 3px solid #f0b659;
  background: #fffbf3;
}

.return-workbench-panel .pickup-return-completion-fields {
  display: grid;
  gap: 6px;
}

.return-refund-panel > .workflow-issue-panel {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.return-refund-panel {
  display: flex;
  flex-direction: column;
}

.return-refund-panel > .workflow-issue-panel > .btn,
.return-refund-panel > .btn,
.return-refund-panel > .workflow-actions {
  margin-top: auto;
}

.return-refund-panel > .workflow-issue-panel > .btn,
.return-refund-panel > .btn {
  align-self: flex-start;
}

.return-refund-panel .refund-completion-fields {
  flex: 1;
  grid-template-rows: auto auto auto 1fr;
}

.return-refund-panel .refund-note-action-row {
  align-self: end;
}

.return-refund-panel .workflow-fields,
.return-refund-panel .refund-note-action-row {
  grid-template-columns: minmax(0, 1fr);
}

.return-refund-panel .input,
.return-refund-panel .select {
  width: 100%;
  min-width: 0;
}

.return-refund-panel .refund-submit-btn {
  justify-self: start;
  width: max-content;
  max-width: 100%;
  min-width: 108px;
}

.return-completion-summary {
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid #d5e1ef;
  border-radius: 6px;
  color: #526b86;
  background: #f7faff;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.return-completion-summary strong {
  color: #1d3655;
  font-size: 12px;
}

.workflow-focused-followup {
  display: grid;
  gap: 8px;
  width: min(720px, 100%);
  margin: 10px auto 0;
  padding: 10px;
  border: 1px solid #dbe6f3;
  border-radius: 7px;
  background: #ffffff;
}

.workflow-focused-followup.is-completed {
  color: #315f46;
  background: #f3faf6;
}

.return-dimension-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.return-dimension-grid label {
  grid-template-columns: 62px minmax(0, 1fr);
}

.return-workbench.is-reissue-direct .return-logistics-panel label {
  grid-template-columns: 62px minmax(0, 1fr);
}

.return-panel-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 6px;
  gap: 6px;
  min-width: 0;
}

.return-panel-actions .btn {
  min-height: 28px;
  padding: 0 10px;
  font-size: 11px;
}

.admin-modal-logistics-compact .return-panel-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 0 -8px -8px;
  padding: 8px;
  border-top: 1px solid #dbe6f3;
  background: #fff;
}

.return-logistics-panel.is-disabled,
.return-reissue-panel.is-disabled {
  background: #f8fafc;
}

.admin-media-image {
  width: 100%;
  text-align: left;
  cursor: zoom-in;
}

.admin-media-image .admin-screenshot-preview {
  width: 100%;
  object-fit: contain;
  min-height: 220px;
}

.admin-media-image .admin-screenshot-preview,
.admin-media-video {
  aspect-ratio: 16 / 10;
}

.admin-media-preview:focus-visible,
.case-action .btn:focus-visible,
.case-attachment-actions .btn:focus-visible {
  outline: 2px solid #7aa7f3;
  outline-offset: 2px;
}

.admin-modal-case-media {
  width: auto;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 48px);
}

.admin-modal-case-media .admin-modal-body {
  max-height: calc(100vh - 48px);
  overflow: visible;
}

/* legacy media classes — no longer used */

.admin-cases-table .icon-count,
.admin-cases-table td:nth-child(12) {
  text-align: center;
}

.admin-cases-table .case-screenshot-cell {
  text-align: center;
}

.admin-cases-table .case-screenshot-cell .case-screenshot-thumb {
  margin-inline: auto;
}

.admin-cases-table .case-screenshot-cell .case-screenshot-empty {
  display: block;
}

.case-screenshot-thumb {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 42px;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  background: #f8fbff;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
}

.case-screenshot-thumb span {
  width: 100%;
  height: 100%;
  background-position: center;
  background-size: cover;
}

.case-screenshot-empty {
  color: #8a9bb3;
  font-weight: 760;
}

.case-duplicate-yes {
  color: #c62828 !important;
  font-weight: 600;
}

.admin-cases-table td:nth-child(3),
.admin-cases-table th:nth-child(3),
.admin-cases-table td:nth-child(4),
.admin-cases-table th:nth-child(4),
.admin-cases-table td:nth-child(11),
.admin-cases-table th:nth-child(11),
.admin-cases-table td:nth-child(12),
.admin-cases-table th:nth-child(12) {
  text-align: center;
}

.case-note-cell {
  padding-block: 6px !important;
}

.case-note-input {
  width: 100%;
  min-height: 36px;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  padding: 7px 9px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  line-height: 1.25;
  resize: vertical;
  overflow: auto;
}

.case-note-input:focus {
  outline: 2px solid rgba(37, 99, 235, 0.16);
  border-color: #93b4f7;
}

.case-supply-chain-cell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}

.case-supply-chain-cell label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  color: #52657d;
  font-size: 12px;
  font-weight: 760;
}

.case-supply-chain-input {
  width: 100%;
  min-height: 26px;
  max-height: 30px;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  padding: 5px 7px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  line-height: 1.2;
  resize: vertical;
}

.case-supply-chain-input.is-active,
.case-supply-chain-input:focus {
  min-height: 44px;
  max-height: 86px;
}

.case-supply-chain-input:focus {
  outline: 2px solid rgba(37, 99, 235, 0.16);
  border-color: #93b4f7;
}

.case-media-export {
  min-height: 28px;
  min-width: 60px;
  padding-inline: 8px;
  font-size: 12px;
}

.case-date-stack,
.case-order-product {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.case-media-stack {
  display: inline-grid;
  gap: 3px;
  justify-items: center;
}

.case-date-stack span,
.case-date-stack small,
.case-order-product div,
.case-order-product span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-date-stack small,
.case-order-product span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.admin-cases-table .case-order-product div,
.admin-cases-table .case-order-product span,
.admin-cases-table .case-contact .contact-line,
.admin-cases-table .case-contact .contact-lines span:not(.contact-line) {
  overflow: visible;
  text-overflow: clip;
}

.case-order-product div {
  display: block;
  color: var(--text);
  font-weight: 760;
}

.case-order-product span {
  display: inline-block;
  width: 32px;
}

.admin-cases-table .case-date {
  white-space: nowrap;
  font-size: 12px;
  text-align: center;
}

.admin-cases-table .case-date .case-date-stack {
  justify-items: center;
}

.admin-cases-table .case-order-cell {
  min-width: 0;
}

.admin-cases-table .case-platform-line {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.admin-cases-table .case-platform-line > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-cases-table .case-contact .contact-lines {
  min-width: 0;
  gap: 3px;
}

.admin-cases-table .case-contact .contact-lines span:not(.contact-line) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
}

.admin-cases-table .case-contact .contact-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-cases-table .case-contact .contact-line span {
  display: inline;
}

.admin-cases-table th {
  text-align: center;
}

.admin-cases-table.case-table-density-compact,
.customers-table.case-table-density-compact,
.return-analysis-table.case-table-density-compact {
  min-width: 2020px;
  background: #ffffff;
}

.knowledge-table.case-table-density-compact,
.template-table.case-table-density-compact {
  min-width: 1120px;
  background: #ffffff;
}

.customers-table.case-table-density-compact {
  min-width: 1120px;
  table-layout: fixed;
}

.return-analysis-table.case-table-density-compact {
  min-width: 1320px;
  table-layout: fixed;
}

.knowledge-table.case-table-density-compact,
.template-table.case-table-density-compact {
  table-layout: fixed;
}

.template-table.case-table-density-compact {
  min-width: 1280px;
}

.admin-cases-table.case-table-density-compact {
  min-width: 2300px;
  table-layout: fixed;
}

.admin-cases-table.case-table-density-compact th,
.admin-cases-table.case-table-density-compact td,
.customers-table.case-table-density-compact th,
.customers-table.case-table-density-compact td,
.return-analysis-table.case-table-density-compact th,
.return-analysis-table.case-table-density-compact td,
.knowledge-table.case-table-density-compact th,
.knowledge-table.case-table-density-compact td,
.template-table.case-table-density-compact th,
.template-table.case-table-density-compact td {
  padding: 7px 9px;
  font-size: 12px;
}

.admin-cases-table.case-table-density-compact tbody tr,
.customers-table.case-table-density-compact tbody tr,
.return-analysis-table.case-table-density-compact tbody tr {
  height: 54px;
  max-height: 54px;
}

.knowledge-table.case-table-density-compact tbody tr,
.template-table.case-table-density-compact tbody tr {
  height: 54px;
  max-height: 54px;
}

.admin-cases-table.case-table-density-compact tbody tr {
  height: 54px;
  max-height: 54px;
}

.admin-cases-table.case-table-density-compact tbody td,
.customers-table.case-table-density-compact tbody td,
.return-analysis-table.case-table-density-compact tbody td,
.knowledge-table.case-table-density-compact tbody td,
.template-table.case-table-density-compact tbody td {
  height: 54px;
  max-height: 54px;
}

.admin-cases-table.case-table-density-compact thead th,
.customers-table.case-table-density-compact thead th,
.return-analysis-table.case-table-density-compact thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  overflow: hidden;
  height: 38px;
  border-bottom: 1px solid #d7e2f0;
  background: #eef4fb;
  color: #40536b;
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0;
  line-height: 1.2;
  resize: none;
  text-transform: none;
  box-shadow: inset 0 -1px #d7e2f0;
  text-align: center;
}

.knowledge-table.case-table-density-compact thead th,
.template-table.case-table-density-compact thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  overflow: hidden;
  height: 38px;
  border-bottom: 1px solid #d7e2f0;
  background: #eef4fb;
  color: #40536b;
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0;
  line-height: 1.2;
  resize: none;
  text-transform: none;
  box-shadow: inset 0 -1px #d7e2f0;
  text-align: center;
}

.admin-cases-table.case-table-density-compact thead th {
  resize: none;
}

.admin-cases-table.case-table-density-compact thead th::after,
.customers-table.case-table-density-compact thead th::after,
.return-analysis-table.case-table-density-compact thead th::after {
  content: "";
  position: absolute;
  top: 9px;
  right: 0;
  width: 1px;
  height: 20px;
  background: #d2deeb;
  pointer-events: none;
  opacity: 0.72;
}

.knowledge-table.case-table-density-compact thead th::after,
.template-table.case-table-density-compact thead th::after {
  content: "";
  position: absolute;
  top: 9px;
  right: 0;
  width: 1px;
  height: 20px;
  background: #d2deeb;
  pointer-events: none;
  opacity: 0.72;
}

.admin-cases-table.case-table-density-compact thead th:hover::after,
.customers-table.case-table-density-compact thead th:hover::after,
.return-analysis-table.case-table-density-compact thead th:hover::after {
  width: 2px;
  background: #8fa9c8;
  opacity: 1;
}

.knowledge-table.case-table-density-compact thead th:hover::after,
.template-table.case-table-density-compact thead th:hover::after {
  width: 2px;
  background: #8fa9c8;
  opacity: 1;
}

.admin-cases-table.case-table-density-compact thead th:last-child::after,
.customers-table.case-table-density-compact thead th:last-child::after,
.return-analysis-table.case-table-density-compact thead th:last-child::after,
.knowledge-table.case-table-density-compact thead th:last-child::after,
.template-table.case-table-density-compact thead th:last-child::after {
  display: none;
}

.column-resize-handle {
  position: absolute;
  top: 8px;
  right: 0;
  z-index: 5;
  width: 10px;
  height: 22px;
  cursor: col-resize;
}

.column-resize-handle::before {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 1px;
  height: 100%;
  border-radius: 999px;
  background: #9fb4ce;
}

.column-resize-handle:hover::before {
  width: 2px;
  background: #6286b3;
}

.column-resize-handle-start {
  left: 0;
  right: auto;
}

.column-resize-handle-start::before {
  left: 0;
  right: auto;
}

.admin-cases-table.case-table-density-compact tbody tr,
.customers-table.case-table-density-compact tbody tr,
.return-analysis-table.case-table-density-compact tbody tr,
.knowledge-table.case-table-density-compact tbody tr,
.template-table.case-table-density-compact tbody tr {
  background: #ffffff;
}

.admin-cases-table.case-table-density-compact tbody tr:nth-child(even),
.customers-table.case-table-density-compact tbody tr:nth-child(even),
.return-analysis-table.case-table-density-compact tbody tr:nth-child(even),
.knowledge-table.case-table-density-compact tbody tr:nth-child(even),
.template-table.case-table-density-compact tbody tr:nth-child(even) {
  background: #fbfdff;
}

.admin-cases-table.case-table-density-compact tbody tr:hover,
.customers-table.case-table-density-compact tbody tr:hover,
.return-analysis-table.case-table-density-compact tbody tr:hover,
.knowledge-table.case-table-density-compact tbody tr:hover,
.template-table.case-table-density-compact tbody tr:hover {
  background: #f4f8ff;
}

.admin-cases-table.case-table-density-compact tbody td,
.customers-table.case-table-density-compact tbody td,
.return-analysis-table.case-table-density-compact tbody td,
.knowledge-table.case-table-density-compact tbody td,
.template-table.case-table-density-compact tbody td {
  border-bottom-color: #edf2f8;
  color: #22344d;
  text-align: center;
}

.admin-cases-table.case-table-density-compact th:nth-child(1) { width: 96px; }
.admin-cases-table.case-table-density-compact th:nth-child(2) { width: 220px; }
.admin-cases-table.case-table-density-compact th:nth-child(3) { width: 96px; }
.admin-cases-table.case-table-density-compact th:nth-child(4) { width: 50px; }
.admin-cases-table.case-table-density-compact th:nth-child(5) { width: 62px; }
.admin-cases-table.case-table-density-compact th:nth-child(6) { width: 78px; }
.admin-cases-table.case-table-density-compact th:nth-child(7) { width: 170px; }
.admin-cases-table.case-table-density-compact th:nth-child(8) { width: 260px; }
.admin-cases-table.case-table-density-compact th:nth-child(9) { width: 220px; }
.admin-cases-table.case-table-density-compact th:nth-child(10) { width: 76px; }
.admin-cases-table.case-table-density-compact th:nth-child(11) { width: 180px; }
.admin-cases-table.case-table-density-compact th:nth-child(12) { width: 140px; }
.admin-cases-table.case-table-density-compact th:nth-child(13) { width: 110px; }
.admin-cases-table.case-table-density-compact th:nth-child(14) { width: var(--case-action-column-width); }

.customers-table.case-table-density-compact th:nth-child(1) { width: 128px; }
.customers-table.case-table-density-compact th:nth-child(2) { width: 180px; }
.customers-table.case-table-density-compact th:nth-child(3) { width: 64px; }
.customers-table.case-table-density-compact th:nth-child(4) { width: 240px; }
.customers-table.case-table-density-compact th:nth-child(5) { width: 96px; }
.customers-table.case-table-density-compact th:nth-child(6) { width: 82px; }
.customers-table.case-table-density-compact th:nth-child(7) { width: 124px; }
.customers-table.case-table-density-compact th:nth-child(8) { width: 146px; }
.customers-table.case-table-density-compact th:nth-child(9) { width: 60px; }

.return-analysis-table.case-table-density-compact { min-width: 1614px; }
.return-analysis-table.case-table-density-compact th:nth-child(1) { width: 126px; }
.return-analysis-table.case-table-density-compact th:nth-child(2) { width: 190px; }
.return-analysis-table.case-table-density-compact th:nth-child(3) { width: 170px; }
.return-analysis-table.case-table-density-compact th:nth-child(4) { width: 210px; }
.return-analysis-table.case-table-density-compact th:nth-child(5) { width: 270px; }
.return-analysis-table.case-table-density-compact th:nth-child(6) { width: 96px; }
.return-analysis-table.case-table-density-compact th:nth-child(7) { width: 112px; }
.return-analysis-table.case-table-density-compact th:nth-child(8) { width: 168px; }
.return-analysis-table.case-table-density-compact th:nth-child(9) { width: 128px; }
.return-analysis-table.case-table-density-compact th:nth-child(10) { width: 144px; }

.knowledge-table.case-table-density-compact th:nth-child(1) { width: 320px; }
.knowledge-table.case-table-density-compact th:nth-child(2) { width: 150px; }
.knowledge-table.case-table-density-compact th:nth-child(3) { width: 150px; }
.knowledge-table.case-table-density-compact th:nth-child(4) { width: 132px; }
.knowledge-table.case-table-density-compact th:nth-child(5) { width: 90px; }
.knowledge-table.case-table-density-compact th:nth-child(6) { width: 96px; }

.template-table.case-table-density-compact th:nth-child(1) { width: 220px; }
.template-table.case-table-density-compact th:nth-child(2) { width: 118px; }
.template-table.case-table-density-compact th:nth-child(3) { width: 96px; }
.template-table.case-table-density-compact th:nth-child(4) { width: 178px; }
.template-table.case-table-density-compact th:nth-child(5) { width: 170px; }
.template-table.case-table-density-compact th:nth-child(6) { width: 132px; }
.template-table.case-table-density-compact th:nth-child(7) { width: 92px; }
.template-table.case-table-density-compact th:nth-child(8) { width: 156px; }

.admin-cases-table.case-table-density-compact .case-country-cell .icon-only-flag,
.customers-table.case-table-density-compact .case-country-cell .icon-only-flag {
  font-size: 20px;
  line-height: 1;
}

.admin-cases-table.case-table-density-compact .case-country-cell .icon-only-flag {
  font-size: 20px;
  line-height: 1;
}

.admin-cases-table.case-table-density-compact .case-contact,
.admin-cases-table.case-table-density-compact .case-problem-cell,
.admin-cases-table.case-table-density-compact .case-identity-cell,
.admin-cases-table.case-table-density-compact .case-note-cell,
.return-analysis-table.case-table-density-compact .return-product-cell,
.return-analysis-table.case-table-density-compact .return-application-cell,
.customers-table.case-table-density-compact .case-contact,
.customers-table.case-table-density-compact .customer-tag-cell {
  text-align: left;
}

.admin-cases-table.case-table-density-compact .case-contact,
.admin-cases-table.case-table-density-compact .case-problem-cell,
.admin-cases-table.case-table-density-compact .case-identity-cell,
.admin-cases-table.case-table-density-compact .case-note-cell {
  text-align: left;
}

.admin-cases-table.case-table-density-compact .case-id-cell {
  text-align: left;
}

.admin-cases-table.case-table-density-compact .case-id-value {
  display: block;
  width: 100%;
  overflow: hidden;
  border: 0;
  padding: 0;
  background: transparent;
  color: #50637c;
  font-family: inherit;
  font-size: 11px;
  font-weight: 820;
  line-height: 1.2;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.admin-cases-table.case-table-density-compact .case-id-value:hover {
  color: #0f6fb8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.admin-cases-table.case-table-density-compact .case-order-number-cell,
.admin-cases-table.case-table-density-compact .case-product-model-cell,
.admin-cases-table.case-table-density-compact .case-issue-category-cell,
.admin-cases-table.case-table-density-compact .preferred-contact-cell,
.admin-cases-table.case-table-density-compact .pickup-status-cell {
  text-align: center;
}

.admin-cases-table.case-table-density-compact th:last-child,
.admin-cases-table.case-table-density-compact td.case-action,
.customers-table.case-table-density-compact th:last-child,
.customers-table.case-table-density-compact td.table-actions {
  position: sticky;
  right: 0;
  z-index: 6;
  background: #eef4fb;
  box-shadow: -8px 0 14px rgba(48, 73, 105, 0.08), -1px 0 #d7e2f0;
}

.knowledge-table.case-table-density-compact th:last-child,
.knowledge-table.case-table-density-compact td.table-actions,
.template-table.case-table-density-compact th:last-child,
.template-table.case-table-density-compact td.table-actions {
  position: sticky;
  right: 0;
  z-index: 6;
  background: #eef4fb;
  box-shadow: -8px 0 14px rgba(48, 73, 105, 0.08), -1px 0 #d7e2f0;
}

.admin-cases-table.case-table-density-compact th:last-child,
.admin-cases-table.case-table-density-compact td.case-action {
  width: var(--case-action-column-width);
  min-width: var(--case-action-column-width);
  max-width: var(--case-action-column-width);
  position: sticky;
  right: 0;
  background: #eef4fb;
}

.admin-cases-table.case-table-density-compact thead th:last-child,
.customers-table.case-table-density-compact thead th:last-child,
.knowledge-table.case-table-density-compact thead th:last-child,
.template-table.case-table-density-compact thead th:last-child {
  z-index: 8;
  background: #eef4fb;
}

.admin-cases-table.case-table-density-compact tbody tr:nth-child(even) td.case-action,
.customers-table.case-table-density-compact tbody tr:nth-child(even) td.table-actions,
.knowledge-table.case-table-density-compact tbody tr:nth-child(even) td.table-actions,
.template-table.case-table-density-compact tbody tr:nth-child(even) td.table-actions {
  background: #eef4fb;
}

.admin-cases-table.case-table-density-compact tbody tr:hover td.case-action,
.customers-table.case-table-density-compact tbody tr:hover td.table-actions,
.knowledge-table.case-table-density-compact tbody tr:hover td.table-actions,
.template-table.case-table-density-compact tbody tr:hover td.table-actions {
  background: #eef4fb;
}

.admin-cases-table.case-table-density-compact tbody tr:nth-child(even) td.case-action {
  background: #eef4fb;
}

.admin-cases-table.case-table-density-compact tbody tr:hover td.case-action {
  background: #eef4fb;
}

.admin-cases-table.case-table-density-compact .case-status-trigger {
  min-width: 68px;
  height: 24px;
  padding: 0 8px;
  border-color: #d7e2f0;
  background: #ffffff;
  color: #20344f;
  font-size: 11px;
  box-shadow: none;
}

.admin-cases-table.case-table-density-compact .pickup-status-stack {
  display: inline-grid;
  justify-items: center;
  gap: 4px;
}

.admin-cases-table.case-table-density-compact .pickup-status-id {
  color: #52657c;
  font-size: 10px;
  font-weight: 820;
  line-height: 1;
  white-space: nowrap;
}

.admin-cases-table.case-table-density-compact .pickup-status-stack.is-overdue .pickup-status-badge {
  border: 1px solid #fca5a5;
  background: #fff1f2;
  color: #be123c;
}

.pickup-overdue-chip {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 10px;
  font-style: normal;
  font-weight: 760;
  white-space: nowrap;
}

.admin-cases-table.case-table-density-compact .pickup-status-badge {
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
}

.admin-cases-table.case-table-density-compact.pickup-work-table th {
  white-space: nowrap;
}

.admin-cases-table.case-table-density-compact.pickup-work-table {
  table-layout: fixed;
  min-width: 1320px;
  width: max-content;
}

.admin-cases-table.case-table-density-compact.pickup-work-table .pickup-col-id { width: 280px; }
.admin-cases-table.case-table-density-compact.pickup-work-table .pickup-col-status { width: 116px; }
.admin-cases-table.case-table-density-compact.pickup-work-table .pickup-col-customer { width: 132px; }
.admin-cases-table.case-table-density-compact.pickup-work-table .pickup-col-phone { width: 118px; }
.admin-cases-table.case-table-density-compact.pickup-work-table .pickup-col-address1 { width: 172px; }
.admin-cases-table.case-table-density-compact.pickup-work-table .pickup-col-address2 { width: 132px; }
.admin-cases-table.case-table-density-compact.pickup-work-table .pickup-col-city { width: 96px; }
.admin-cases-table.case-table-density-compact.pickup-work-table .pickup-col-province { width: 88px; }
.admin-cases-table.case-table-density-compact.pickup-work-table .pickup-col-postal { width: 86px; }
.admin-cases-table.case-table-density-compact.pickup-work-table .pickup-col-country { width: 82px; }
.admin-cases-table.case-table-density-compact.pickup-work-table .pickup-col-note { width: 152px; }
.admin-cases-table.case-table-density-compact.pickup-work-table .pickup-col-appointment { width: 152px; }
.admin-cases-table.case-table-density-compact.pickup-work-table .pickup-col-logistics { width: 152px; }
.admin-cases-table.case-table-density-compact.pickup-work-table .pickup-col-done { width: 152px; }
.admin-cases-table.case-table-density-compact.pickup-work-table .pickup-work-actions-col {
  width: var(--case-action-column-width);
  min-width: var(--case-action-column-width);
  max-width: var(--case-action-column-width);
}

.pickup-work-empty {
  height: 72px;
  color: #52657d;
  font-weight: 760;
  text-align: center !important;
}

.pickup-work-empty .btn {
  margin-left: 10px;
}

.pickup-address-stack,
.pickup-logistics-stack,
.pickup-sku-stack {
  display: grid;
  gap: 2px;
  min-width: 0;
  text-align: left;
  line-height: 1.25;
}

.pickup-address-stack span,
.pickup-logistics-stack span,
.pickup-sku-stack span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pickup-address-stack em,
.pickup-logistics-stack em,
.pickup-sku-stack em {
  color: #66758a;
  font-style: normal;
  font-weight: 720;
}

.pickup-address-stack strong,
.pickup-logistics-stack strong,
.pickup-sku-stack strong {
  color: #22344d;
  font-weight: 760;
}

.pickup-copy-value {
  min-width: 0;
  border: 0;
  padding: 0;
  color: #22344d;
  background: transparent;
  font: inherit;
  font-weight: 760;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 2px;
  cursor: copy;
}

.pickup-copy-value:hover,
.pickup-copy-value:focus-visible {
  color: #0f6aa8;
  text-decoration-color: currentColor;
  outline: none;
}

.pickup-address-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
}

.pickup-address-inline span {
  display: inline-flex;
  gap: 2px;
  overflow: visible;
  white-space: nowrap;
}

.admin-cases-table.case-table-density-compact.pickup-work-table th:last-child,
.admin-cases-table.case-table-density-compact.pickup-work-table td.case-action {
  width: var(--case-action-column-width);
  min-width: var(--case-action-column-width);
  max-width: var(--case-action-column-width);
}

.admin-cases-table.case-table-density-compact.pickup-work-table td {
  vertical-align: middle;
}

.pickup-work-table .pickup-table-stack {
  display: grid;
  gap: 2px;
  min-width: 0;
  line-height: 1.2;
}

.pickup-work-table .pickup-table-stack strong,
.pickup-work-table .pickup-table-stack span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pickup-work-table .pickup-table-stack strong {
  color: #20344f;
  font-size: 12px;
  font-weight: 760;
}

.pickup-work-table .pickup-table-stack span {
  color: #6f8095;
  font-size: 11px;
}

.admin-cases-table.case-table-density-compact.pickup-work-table .case-action-group {
  justify-content: center;
}

.admin-cases-table.case-table-density-compact .case-screenshot-thumb {
  width: 46px;
  height: 34px;
  border-radius: 6px;
}

.admin-cases-table.case-table-density-compact .contact-lines {
  gap: 2px;
  font-size: 12px;
  line-height: 1.15;
}

.admin-cases-table.case-table-density-compact .case-note-input {
  min-height: 30px;
  border-color: #dce6f3;
  background: #fbfdff;
  padding: 5px 7px;
  font-size: 12px;
  resize: vertical;
}

.admin-cases-table.case-table-density-compact .case-action-group .icon-compact,
.customers-table.case-table-density-compact .case-action-group .icon-compact,
.knowledge-table.case-table-density-compact .case-action-group .icon-compact,
.template-table.case-table-density-compact .case-action-group .icon-compact {
  min-height: 24px;
  border-color: #d7e2f0;
  background: #ffffff;
  color: #2a4363;
  padding-inline: 6px;
  font-size: 11px;
}

.admin-cases-table.case-table-density-compact .case-action-group,
.customers-table.case-table-density-compact .case-action-group,
.knowledge-table.case-table-density-compact .case-action-group,
.template-table.case-table-density-compact .case-action-group {
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}

.admin-cases-table.case-table-density-compact .case-action-group {
  max-width: 100%;
  flex-wrap: wrap;
}

.admin-cases-table.case-table-density-compact .case-action-group .pickup-link-action {
  min-width: 58px;
}

.admin-cases-table.case-table-density-compact .case-action-group .icon-compact.danger {
  border-color: #f0c7c7;
  color: #c24141;
}

.admin-cases-table.case-table-density-compact .media-count-button {
  width: 34px;
  min-height: 24px;
  border-radius: 6px;
  color: #31527a;
}

.admin-cases-table.case-table-density-compact .preferred-contact-pill {
  min-width: 42px;
  min-height: 22px;
  padding-inline: 8px;
  font-size: 11px;
}

.customers-table .case-contact .contact-lines {
  min-width: 0;
  gap: 3px;
}

.customers-table .case-contact .contact-lines span:not(.contact-line) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
}

.customers-table .case-contact .contact-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customers-table .case-contact .contact-line span {
  display: inline;
}

.customers-table th {
  text-align: center;
}

.customers-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #f8fbff;
  box-shadow: inset 0 -1px #dbe7f5;
}

.customers-table th,
.customers-table td {
  padding-top: 8px;
  padding-bottom: 8px;
}

.customers-table .badge {
  min-height: 24px;
}

.customers-table .btn.compact {
  min-height: 30px;
}

.customer-date-stack {
  display: grid;
  justify-items: center;
  gap: 2px;
  line-height: 1.15;
  white-space: nowrap;
}

.customer-date-stack small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.btn.compact {
  min-height: 34px;
  padding: 0 10px;
  white-space: nowrap;
}

/* ghost 按钮：用于弹窗内次要操作（清空、复原等） */
.btn.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  font-weight: 400;
  box-shadow: none;
}

.btn.ghost:hover {
  background: rgba(0, 0, 0, .04);
  color: var(--text);
  border-color: transparent;
}

/* 弹窗表单输入框：小圆角、紧凑高度、清晰边框 */
.admin-modal .input,
.admin-modal .select,
.admin-modal .textarea {
  border-radius: 4px;
  min-height: 32px;
  padding: 0 9px;
  border-color: #dce3ec;
  font-size: 13px;
}

.admin-modal .textarea {
  min-height: 56px;
  padding: 6px 9px;
}

.admin-modal .btn.compact {
  min-height: 30px;
  border-radius: 5px;
  font-size: 12px;
}

/* 弹窗文件选择控件 */
.admin-modal input[type="file"],
.workflow-field input[type="file"] {
  /* 保留边框，但高度贴合按钮，不留多余垂直空间 */
  display: inline-block;
  width: auto;
  max-width: 280px;
  height: 30px;
  min-height: 0;
  padding: 2px 6px 2px 0;
  border-color: #dce3ec;
  border-radius: 5px;
  background: #fff;
  font-size: 12px;
  color: var(--muted);
  vertical-align: middle;
  box-sizing: border-box;
}

.admin-modal input[type="file"]::file-selector-button,
.workflow-field input[type="file"]::file-selector-button {
  height: 26px;
  padding: 0 10px;
  font-size: 12px;
  border: none;
  border-right: 1px solid #dce3ec;
  border-radius: 4px 0 0 4px;
  background: #f4f7fb;
  color: #2b4361;
  cursor: pointer;
  margin-right: 6px;
  font-weight: 500;
  vertical-align: middle;
}

.admin-modal input[type="file"]::file-selector-button:hover,
.workflow-field input[type="file"]::file-selector-button:hover {
  background: #e8f0fb;
  color: #075f95;
}

/* 删除重复规则 */

.admin-modal.admin-case-entry-modal {
  width: min(860px, calc(100vw - 42px));
  max-width: calc(100vw - 42px);
  border-radius: 6px;
}

.admin-case-entry-form {
  display: grid;
  gap: 10px;
}

.admin-case-entry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.admin-case-entry-grid label,
.admin-case-entry-problem,
.admin-case-entry-form > label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: #41536a;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.2;
}

.admin-case-entry-control,
.admin-modal .admin-case-entry-control {
  width: 100%;
  min-width: 0;
  min-height: 31px;
  border-radius: 5px;
  background: #fff;
  line-height: 1.2;
  box-sizing: border-box;
}

.admin-modal .admin-case-entry-control[type="file"] {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.admin-case-entry-problem .textarea,
.admin-modal .admin-case-entry-problem .textarea {
  min-height: 68px;
  resize: vertical;
}

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

.admin-case-entry-video-links {
  grid-column: 1 / -1;
}

.admin-case-entry-video-links > span {
  display: grid;
  gap: 6px;
}

.admin-case-video-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 6px;
}

.admin-case-video-link-row .btn {
  min-width: 31px;
  padding: 0;
}

.admin-case-entry-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.admin-case-import-modal {
  width: min(560px, calc(100vw - 42px)) !important;
}

/* 方案B：左说明右上传 双列布局 */
.case-import-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 20px;
  align-items: stretch;
}

.case-import-upload {
  display: flex;
  flex-direction: column;
}

.case-import-upload form {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.case-import-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.case-import-info h4 {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
}

.case-import-info ul {
  padding-left: 15px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.case-import-info li {
  font-size: 12px;
  color: #52708f;
  line-height: 1.5;
}

.case-import-info strong {
  color: #cf1322;
}

.case-import-info code {
  background: #f1f5f9;
  border-radius: 3px;
  padding: 0 4px;
  font-size: 11px;
  color: #334155;
  font-family: monospace;
}

.case-import-template-btn {
  align-self: flex-start;
  margin-top: 4px;
  font-size: 12px;
  height: 30px;
  min-height: 0;
  padding: 0 12px;
  border-color: #1677ff;
  color: #1677ff;
  background: #f0f7ff;
  border-radius: 5px;
}

.case-import-template-btn:hover {
  background: #dceeff;
  border-color: #0958d9;
  color: #0958d9;
}

/* 导入弹窗 footer 按钮紧凑化 */
.admin-case-import-modal .admin-case-entry-actions {
  padding: 12px 20px;
  margin-top: 0;
  border-top: 1px solid #f1f5f9;
}

.admin-case-import-modal .admin-case-entry-actions .btn {
  min-height: 34px;
  height: 34px;
  font-size: 13px;
  padding: 0 18px;
  border-radius: 5px;
}

/* 上传区 */
.case-import-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1.5px dashed #c4d4e8;
  border-radius: 7px;
  padding: 20px 16px;
  background: #f8fbff;
  cursor: pointer;
  height: 100%;
  min-height: 140px;
  text-align: center;
  transition: border-color .15s, background .15s;
}

.case-import-zone:hover {
  border-color: #4a9de0;
  background: #f0f7ff;
}

.case-import-zone input[type="file"] {
  display: none;
}

.case-import-zone-icon .ui-icon {
  width: 24px;
  height: 24px;
  color: #6097c8;
}

.case-import-zone-main {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
}

.case-import-zone-hint {
  font-size: 12px;
  color: #94a3b8;
}

.case-import-zone-limit {
  font-size: 11px;
  color: #b0bec9;
  margin-top: 2px;
}

@media (max-width: 720px) {
  .admin-case-entry-grid,
  .admin-case-entry-media-grid {
    grid-template-columns: 1fr;
  }
}

.data-table th {
  color: #293f69;
  font-weight: 820;
  background: #f1f5fb;
  border-bottom: 2px solid #dde4f0;
}

.data-table tr.selected,
.data-table tbody tr:hover {
  background: #f0f6ff;
}

.data-table tbody tr[data-customer],
.data-table tbody tr[data-knowledge],
.data-table tbody tr[data-template] {
  cursor: pointer;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  border: none;
  border-radius: 6px;
  padding: 0 9px;
  font-weight: 780;
  white-space: nowrap;
}

.badge.blue { color: #0b63e6; background: #e8f1ff; }
.badge.orange { color: #c26a00; background: #fff0da; }
.badge.purple { color: #6849d7; background: #eee9ff; }
.badge.green { color: #078341; background: #def8e9; }
.badge.red { color: #d8223b; background: #ffe3e8; }
.badge.gray {   color: #4a5d72; background: #edf2f7; }

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 14px;
}

.pagination-page-text {
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.admin-list-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 8px;
}

.admin-list-footer .pagination {
  flex: 0 0 auto;
  padding-top: 0;
}

.customers-table-card .admin-list-footer,
.customer-workbench-card .admin-list-footer {
  min-height: 18px;
  padding-top: 0;
  font-size: 12px;
  line-height: 1;
}

.customers-table-card .admin-list-footer .pagination,
.customer-workbench-card .admin-list-footer .pagination {
  gap: 4px;
}

.customers-table-card .admin-list-footer .btn,
.customer-workbench-card .admin-list-footer .btn {
  min-height: 22px;
  padding: 0 7px;
}

.customers-table-card .admin-list-footer .page-size-select,
.customer-workbench-card .admin-list-footer .page-size-select {
  min-height: 22px;
  width: 62px;
  padding-inline: 8px;
}

.knowledge-management-card .admin-list-footer,
.template-management-card .admin-list-footer {
  min-height: 30px;
  padding-top: 6px;
  font-size: 13px;
  position: sticky;
  bottom: 0;
  z-index: 3;
  background: #ffffff;
}

.knowledge-management-card .admin-list-footer .pagination,
.template-management-card .admin-list-footer .pagination {
  gap: 6px;
}

.knowledge-management-card .admin-list-footer .btn,
.template-management-card .admin-list-footer .btn {
  min-height: 26px;
  padding: 0 8px;
}

.knowledge-management-card .admin-list-footer .page-size-select,
.template-management-card .admin-list-footer .page-size-select {
  min-height: 26px;
  width: 68px;
}

.pager-buttons {
  align-items: center;
  display: flex;
  gap: 8px;
}

.pagination-icon-button {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  font-size: 18px;
  font-weight: 760;
  line-height: 1;
  box-shadow: none;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pagination-icon-button:hover {
  transform: translateY(-1px);
}

.pagination-icon-button:active {
  transform: translateY(0) scale(0.985);
}

.page-size-select {
  width: 82px;
  min-height: 36px;
  padding-inline: 10px;
}

.icon-count {
  color: var(--primary);
  font-weight: 760;
}

.media-count-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 42px;
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-weight: 820;
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.15s ease, color 0.15s ease, outline-color 0.15s ease;
}

.media-count-button:hover,
.media-count-button:focus-visible {
  background: #edf5ff;
  outline: 1px solid #b9d5ff;
  transform: translateY(-1px);
}

.media-count-button:active {
  transform: translateY(0) scale(0.985);
}

.media-count-button.empty {
  color: #4f6380;
}

.login-page {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(480px, 1fr);
  align-items: center;
  min-height: auto;
  background: transparent;
  z-index: 1;
}

.login-shell {
  position: relative;
}

.login-shell .page-decor {
  z-index: 0;
}

.login-shell .login-page {
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.06),
    0 10px 30px rgba(0, 0, 0, 0.07),
    0 30px 60px rgba(0, 0, 0, 0.04);
  z-index: 1;
}

.login-copy {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 48px 42px;
  background: transparent;
  border-right: 1px solid #eadfce;
  position: relative;
  z-index: 1;
}

.login-copy h1 {
  font-size: 28px;
}

.login-copy .brand-mark {
  width: 66px;
  height: 66px;
  flex: 0 0 auto;
}

.login-copy-text {
  max-width: 360px;
  line-height: 1.55;
}

.login-art {
  display: none;
}

.login-panel {
  display: grid;
  place-items: center;
  padding: 48px 52px;
  background: transparent;
  position: relative;
  z-index: 1;
}

.login-card {
  width: min(520px, 100%);
  padding: 42px 48px;
}

.login-card h2 {
  text-align: center;
  font-size: 32px;
}

.login-card > p {
  text-align: center;
  color: var(--muted);
  margin-bottom: 34px;
}

.login-form {
  display: grid;
  gap: 18px;
}

.login-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  border-top: 1px solid var(--line);
  padding: 0 58px;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.58fr);
  gap: 26px;
  width: 100%;
}

.detail-stack {
  display: grid;
  gap: 16px;
}

.detail-card {
  padding: 20px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.info-line {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
  color: #183664;
}

.info-line span:first-child {
  color: #3f5680;
  font-weight: 760;
}

.attachment-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 16px;
}

.attachment-group {
  margin-top: 18px;
}

.attachment-group:first-child {
  margin-top: 8px;
}

.attachment-group-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #3f5680;
  margin-bottom: 8px;
}

.attachment-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.attachment-row .attachment {
  flex: 0 0 auto;
  min-width: 120px;
}

.attachment {
  display: grid;
  gap: 8px;
  place-items: center;
  min-height: 106px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  color: var(--text);
  text-align: center;
  padding: 12px;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease,
    background-color 0.16s ease;
}

.ai-panel {
  display: grid;
  gap: 8px;
}

.ai-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfdff;
}

.ai-box h4 {
  margin: 0 0 6px;
}

.reply-draft {
  width: 100%;
  min-height: 150px;
  border: 1px solid #bcd1f2;
  border-radius: 8px;
  background: #f9fcff;
  padding: 14px;
  color: #132d59;
  white-space: pre-wrap;
}

.case-reply-composer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  min-height: 420px;
  padding-bottom: 0;
}

.case-reply-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.case-reply-head h4 {
  margin: 0;
}

.case-reply-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 0.55fr);
  gap: 10px;
}

.case-reply-controls label {
  min-width: 0;
}

.case-reply-textarea {
  flex: 1 1 auto;
  height: 100%;
  min-height: 260px;
  resize: vertical;
}

.case-reply-empty {
  margin: 0;
  border: 1px solid #f1d59b;
  border-radius: 8px;
  background: #fff8e8;
  color: #835900;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 720;
}

.warning {
  margin-top: 18px;
  border: 1px solid #ffd99b;
  border-radius: 8px;
  background: #fff8e8;
  color: #925b00;
  padding: 16px 20px;
  font-weight: 760;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
}

.stats-overview-card {
  display: grid;
  gap: 16px;
}

.stats-overview-compact {
  gap: 12px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.stats-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.stats-overview-head h3 {
  margin: 0;
}

.stats-overview-card .tabs {
  margin: 0;
}

.stats-overview-compact .tabs {
  justify-content: flex-end;
}

.stats-overview-compact .tabs .btn {
  min-height: 36px;
  padding-inline: 14px;
}

.stats-chart-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.stats-chart-actions .tabs {
  margin: 0;
  justify-content: flex-end;
}

.stats-chart-actions .tabs .btn {
  min-height: 36px;
  padding-inline: 14px;
}

.metric-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease,
    background-color 0.16s ease;
}

.metric-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: white;
  font-size: 24px;
  font-weight: 850;
}

.metric-icon.blue { background: linear-gradient(135deg, #3b83ff, #76a5ff); }
.metric-icon.green { background: linear-gradient(135deg, #22b866, #6be39e); }
.metric-icon.orange { background: linear-gradient(135deg, #ffa435, #ffc474); }
.metric-icon.purple { background: linear-gradient(135deg, #8d71ff, #c6b8ff); }

.metric-card strong {
  display: block;
  margin: 4px 0;
  font-size: 28px;
}

.stats-overview-compact .metric-card {
  min-height: 92px;
  padding: 16px 18px;
}

.stats-overview-compact .metric-icon {
  width: 48px;
  height: 48px;
  font-size: 21px;
}

.stats-overview-compact .metric-card strong {
  font-size: 24px;
}

.chart {
  height: 240px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 28px;
  align-items: end;
  padding: 20px 24px 28px;
  border-left: 1px solid #e7edf7;
  border-bottom: 1px solid #e7edf7;
  overflow: hidden;
}

.chart.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-state {
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
}

.bar {
  display: grid;
  gap: 8px;
  align-items: end;
  text-align: center;
  color: var(--text);
  font-size: 13px;
}

.bar span {
  display: block;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #5791ff, #1769ff);
  min-height: 16px;
}

.split-layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.58fr);
  gap: 20px;
  align-items: stretch;
  min-height: 0;
  width: 100%;
}

.admin-content:has(.customers-table) .split-layout {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.42fr);
  gap: 16px;
}

.side-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 14px;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease,
    background-color 0.16s ease;
}

.customer-profile {
  position: relative;
  text-align: center;
  border-bottom: 1px solid var(--line);
  padding: 14px 52px 14px;
  margin-bottom: 14px;
}

.customer-submission-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: #edf5ff;
  color: #235190;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 820;
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, #5089ff, #84a9ff);
  font-weight: 850;
}

.side-panel:has(.customer-profile) {
  padding: 14px 14px 12px;
}

.side-panel:has(.customer-profile) h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.customer-profile .avatar {
  width: 48px;
  height: 48px;
}

.customer-profile h3 {
  margin: 0 0 4px;
}

.customer-profile p {
  margin: 0;
}

.customer-workbench-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.customer-workbench-card .table-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.customer-workbench-card .table-wrap > .data-table {
  flex: 0 0 auto;
  min-height: 0;
}

.customer-tag-cell {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 120px;
}

.customers-table .icon-only-table-cell {
  min-width: 60px;
  text-align: center;
}

.customers-table .customer-platform-text {
  text-align: center;
}

.customers-table .customer-submissions-cell {
  text-align: center;
}

.customer-tag-badges,
.customer-tags-modal .customer-tag-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.customer-tag-badges .btn {
  min-height: 26px;
  padding: 0 9px;
}

.customer-detail-modal,
.customer-tags-modal {
  display: grid;
  gap: 18px;
}

.customer-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
}

.customer-info-grid div {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

.customer-info-grid span {
  color: var(--muted);
  font-weight: 760;
}

.customer-info-grid strong {
  color: var(--text);
  word-break: break-word;
}

.customer-timeline {
  display: grid;
  gap: 10px;
}

.customer-timeline-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

.customer-timeline-item time {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-bottom: 0;
}

.customer-timeline-item p {
  color: var(--text);
  margin: 8px 0;
}

.customer-timeline-content {
  min-width: 0;
}

.customer-profile-meta {
  margin-top: 10px;
}

.customer-info-line {
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  margin: 8px 0 !important;
}

.customer-info-line strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.tag-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.customer-tag-title {
  margin-top: 16px;
}

.customer-tag-title h3 {
  margin-bottom: 8px;
}

.customer-tag-editor {
  display: grid;
  gap: 4px;
}

.knowledge-grid {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
  min-height: 0;
  width: 100%;
}

.knowledge-management-card,
.template-management-card,
.kb-tabbed-card,
.knowledge-grid > .admin-card,
.template-grid > .admin-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.kb-tabbed-card {
  flex: 1;
  min-height: calc(100vh - 154px);
  padding: 0;
}

.kb-tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #e3edf9;
  padding: 0 12px;
  background: #f8fbff;
  flex: 0 0 auto;
}

.kb-tab {
  padding: 10px 20px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.kb-tab:hover {
  color: var(--text);
}

.kb-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.kb-tab-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.kb-tab-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.kb-tab-body .table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.kb-tab-body .data-table.case-table-density-compact thead th {
  background: #eef4fb;
  box-shadow: inset 0 -1px #d7e2f0;
}

.kb-tab-body .admin-list-footer {
  flex: 0 0 auto;
  border-top: 1px solid #e3edf9;
  padding: 0 22px;
  background: var(--surface);
}

.case-filter-card .filter-grid.knowledge-tab-filters,
.case-filter-card .filter-grid.template-tab-filters {
  grid-template-columns: minmax(220px, 1.28fr) repeat(2, minmax(132px, 0.72fr)) 292px;
  gap: 8px;
  margin-bottom: 0;
}

.case-filter-card .filter-grid.template-tab-filters {
  grid-template-columns: minmax(240px, 1.34fr) repeat(2, minmax(132px, 0.72fr)) 312px;
}

.case-filter-card .filter-grid.knowledge-tab-filters .case-toolbar-actions,
.case-filter-card .filter-grid.template-tab-filters .case-toolbar-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  justify-content: end;
  min-width: 0;
}

.knowledge-tab-filters .input,
.knowledge-tab-filters .select,
.template-tab-filters .input,
.template-tab-filters .select {
  min-height: 34px;
  font-size: 13px;
  width: 100%;
}

.case-filter-card .filter-grid.knowledge-tab-filters .btn,
.case-filter-card .filter-grid.template-tab-filters .btn {
  min-width: 0;
  min-height: 34px;
  font-size: 13px;
  padding: 0 12px;
  width: 100%;
  justify-content: center;
}

.case-filter-card .filter-grid.knowledge-tab-filters .btn.primary,
.case-filter-card .filter-grid.template-tab-filters .btn.primary {
  width: 100%;
}

.knowledge-management-card .knowledge-tools,
.template-management-card .template-filters {
  margin-bottom: 18px;
}

.management-card-title {
  margin: 0;
  align-self: center;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  white-space: nowrap;
}

.card-collapse-btn {
  width: 34px;
  min-width: 34px;
  height: 34px;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  background: #f8fbff;
  color: #264b7a;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.card-collapse-btn:hover {
  border-color: #b8cdf4;
  background: #eef6ff;
  transform: translateY(-1px);
}

.card-collapse-btn:active {
  transform: translateY(0) scale(0.985);
}

.knowledge-management-card,
.template-management-card {
  transition: flex-grow 0.16s ease;
}

.knowledge-management-card.is-collapsed,
.template-management-card.is-collapsed {
  flex: 0 0 auto;
}

.knowledge-management-card.is-collapsed .collapsible-card-body,
.template-management-card.is-collapsed .collapsible-card-body {
  display: none;
}

.knowledge-management-card.is-collapsed + .template-management-card,
.knowledge-management-card:has(+ .template-management-card.is-collapsed) {
  flex: 1 1 auto;
}

.template-grid {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
  min-height: 0;
  width: 100%;
}

.knowledge-tools {
  grid-template-columns: minmax(88px, auto) minmax(240px, 1.6fr) minmax(120px, 0.75fr) minmax(140px, 0.85fr) minmax(92px, auto) minmax(112px, auto) minmax(34px, auto);
  align-items: stretch;
}

.knowledge-tools label,
.template-filters label {
  min-width: 0;
}

.knowledge-tools .btn {
  min-width: 0;
  white-space: nowrap;
  line-height: 1.2;
  padding-inline: 10px;
}

.knowledge-tools [data-action="add-knowledge"] {
  justify-self: start;
}

.table-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
}

.customers-table td.table-actions {
  display: table-cell;
  text-align: center;
  vertical-align: middle;
}

.template-filters {
  grid-template-columns: minmax(92px, auto) minmax(220px, 1.35fr) repeat(2, minmax(140px, 1fr)) minmax(86px, auto) minmax(126px, auto) minmax(34px, auto);
}

.knowledge-management-card .table-wrap,
.template-management-card .table-wrap {
  max-height: min(52vh, 520px);
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.knowledge-management-card .table-wrap > .data-table,
.template-management-card .table-wrap > .data-table {
  flex: 1 0 auto;
  min-height: 100%;
}

.knowledge-management-card .table-wrap,
.template-management-card .table-wrap {
  flex: 0 0 auto;
  display: block;
  max-height: none;
}

.knowledge-management-card .table-wrap > .data-table,
.template-management-card .table-wrap > .data-table {
  flex: 0 0 auto;
  min-height: 0;
}

.knowledge-management-card .data-table th,
.knowledge-management-card .data-table td,
.template-management-card .data-table th,
.template-management-card .data-table td {
  padding-top: 9px;
  padding-bottom: 9px;
}

.knowledge-management-card .table-actions .btn,
.template-management-card .table-actions .btn {
  min-height: 24px;
  padding: 0 8px;
}

.knowledge-management-card .data-table th,
.template-management-card .data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.template-usage-note {
  display: grid;
  gap: 6px;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  background: #f7fbff;
  padding: 14px;
  color: var(--text);
}

.template-usage-note span {
  color: var(--muted);
  line-height: 1.5;
}

.template-editor-actions {
  margin-top: auto;
  padding-top: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  border-top: 1px solid var(--line);
}

.template-editor-actions .btn {
  min-height: 44px;
  justify-content: center;
  border-radius: 8px;
}

.template-editor-actions .template-editor-copy {
  background: #f8fbff;
}

.template-editor-actions .template-editor-save {
  box-shadow: none;
}

.admin-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 32px;
  background: rgba(8, 27, 58, 0.36);
}

.admin-modal-backdrop.case-media-backdrop {
  background: rgba(0, 0, 0, 0.85);
  padding: 32px 0;
}

.admin-modal {
  width: min(820px, calc(100vw - 48px));
  max-height: min(760px, calc(100vh - 64px));
  overflow: auto;
  border: 1px solid #d7e4fa;
  border-radius: 8px;
  background: white;
  box-shadow: 0 24px 70px rgba(8, 27, 58, 0.24);
}

.admin-modal.admin-modal-media-viewer {
  background: transparent;
  box-shadow: none;
  border: none;
  border-radius: 0;
  width: auto;
  max-width: none;
  max-height: none;
  overflow: visible;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.pickup-qr-modal {
  width: min(420px, calc(100vw - 40px));
}

.pickup-qr-body {
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
}

.pickup-qr-frame {
  display: grid;
  place-items: center;
  width: min(292px, 78vw);
  aspect-ratio: 1;
  padding: 12px;
  border: 1px solid #d7e2f0;
  border-radius: 6px;
  background: #fff;
}

.pickup-qr-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.pickup-qr-url {
  max-width: 100%;
  margin: 0;
  color: #40536b;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.pickup-qr-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: min(360px, 100%);
}

.pickup-qr-actions .btn {
  min-width: 0;
  text-decoration: none;
}

.admin-media-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  align-self: flex-end;
}

.admin-media-actions .btn {
  min-width: 38px;
  min-height: 34px;
  justify-content: center;
  border-color: rgba(255, 255, 255, 0.52);
  color: #fff;
  background: rgba(9, 20, 37, 0.58);
  backdrop-filter: blur(10px);
}

.admin-media-viewer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: calc(100vw - 64px);
  max-height: calc(100vh - 96px);
}

.admin-media-viewer-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
}

.admin-media-viewer-content img,
.admin-media-viewer-content video {
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100vw - 96px);
  max-height: calc(100vh - 112px);
  object-fit: contain;
  background: transparent;
}

.admin-media-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 8px;
  color: #fff;
  background: rgba(9, 20, 37, 0.72);
  text-decoration: none;
  font-weight: 700;
}

.admin-modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.admin-modal-head h3 {
  margin: 0;
}

.admin-modal-body {
  padding: 18px;
}

.admin-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
}

.evidence-page {
  display: grid;
  gap: 14px;
}

.evidence-layout-card {
  --evidence-panel-command-height: 45px;
  --evidence-table-header-height: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 1px;
  height: calc(100vh - 140px);
  min-height: calc(100vh - 140px);
  border: 1px solid #e3edf9;
  border-radius: 0;
  background: #e3edf9;
  overflow: hidden;
}

.evidence-model-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: #fff;
}

.evidence-model-search-wrap {
  display: flex;
  align-items: center;
  height: var(--evidence-panel-command-height);
  box-sizing: border-box;
  padding: 6px 10px;
  border-bottom: 1px solid #edf3fb;
}

.evidence-model-search {
  width: 100%;
  height: 32px;
  min-height: 0;
  box-sizing: border-box;
}

.evidence-model-header,
.evidence-model-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.evidence-model-header {
  height: var(--evidence-table-header-height);
  box-sizing: border-box;
  justify-items: center;
  padding: 6px 12px;
  border-bottom: 1px solid #edf3fb;
  background: #eef4fb;
  color: #4a6d8c;
  font-size: 11px;
  font-weight: 820;
  text-align: center;
}

.evidence-model-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.evidence-model-item {
  min-height: 52px;
  padding: 7px 12px;
  border-bottom: 1px solid #f5f8fc;
  cursor: pointer;
  transition: background-color 0.1s ease;
  font-size: 13px;
}

.evidence-model-item:hover {
  background: #f0f5fc;
}

.evidence-model-item.active {
  background: #e8f0fc;
  color: var(--primary);
  font-weight: 700;
}

.evidence-model-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evidence-model-thumb,
.evidence-media-thumb {
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #dce7f4;
  border-radius: 5px;
  background: #f6f9fd;
  color: #7b8da3;
  font-size: 10px;
  font-weight: 760;
}

.evidence-model-thumb {
  width: 44px;
  height: 34px;
}

.evidence-model-thumb img,
.evidence-media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.evidence-media-thumb {
  width: 42px;
  height: 30px;
  padding: 0;
  cursor: pointer;
}

.evidence-media-thumb:hover {
  border-color: #5ec4f4;
  background: #eef9ff;
}

.evidence-media-pane {
  display: grid;
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  background: #fff;
}

.evidence-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border-bottom: 1px solid #edf3fb;
}

.evidence-panel:last-child {
  border-bottom: 0;
}

.evidence-panel-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  height: var(--evidence-panel-command-height);
  box-sizing: border-box;
  padding: 8px 12px;
  border-bottom: 1px solid #edf3fb;
  background: #fafcff;
}

.evidence-panel-title-wrap {
  grid-column: 1;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
}

.evidence-panel-title {
  font-size: 13px;
  font-weight: 700;
  color: #1b2f4a;
}

.evidence-panel-count {
  padding: 1px 8px;
  border-radius: 10px;
  background: #eef4ff;
  color: #4a6d8c;
  font-size: 11px;
  font-weight: 700;
}

.evidence-panel-actions {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.evidence-panel-actions label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #2b4361;
  font-size: 12px;
  font-weight: 700;
}

.evidence-panel-actions .btn {
  min-height: 28px;
  padding: 0 10px;
  border-color: #cfd7e3;
  border-radius: 5px;
  background: #fff;
  box-shadow: none;
  color: #2b4361;
  transform: none;
  font-size: 12px;
  font-weight: 760;
}

.evidence-panel-actions .btn:hover {
  border-color: #5ec4f4;
  background: #eef9ff;
  color: #075f95;
  transform: none;
}

.evidence-panel-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.evidence-table-wrap {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
}

.evidence-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.evidence-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: var(--evidence-table-header-height);
  box-sizing: border-box;
  padding: 6px 8px;
  border-bottom: 1px solid #edf3fb;
  background: #eef4fb;
  color: #4a6d8c;
  text-align: center;
  white-space: nowrap;
  font-weight: 700;
}

.evidence-table tbody td {
  max-width: 180px;
  padding: 5px 8px;
  border-bottom: 1px solid #f5f8fc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evidence-table tbody tr:hover {
  background: #f8faff;
}

.evidence-th-check,
.evidence-table tbody tr td:first-child,
.evidence-table thead th:first-child,
.evidence-table tbody td:nth-child(6),
.evidence-table thead th:nth-child(6) {
  text-align: center;
}

.evidence-th-check {
  width: 32px;
}

.evidence-table tbody td:nth-child(6),
.evidence-table thead th:nth-child(6) {
  width: 58px;
  max-width: 58px;
}

.evidence-table tbody .btn.link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
}

.evidence-table tbody .btn.link:hover {
  text-decoration: underline;
}

.evidence-td-filename {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evidence-header-tools {
  --case-filter-control-height: 34px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.evidence-header-date {
  width: 166px;
  flex: 0 0 166px;
}

.evidence-header-date .admin-date-range {
  width: 100%;
}

.evidence-export-all-btn {
  background: #fff;
  color: #2b4361;
  border-color: #cfd7e3;
  border-radius: 5px;
  box-shadow: none;
  transform: none;
  font-size: 12px;
  font-weight: 760;
  padding: 0 12px;
}

.evidence-export-all-btn:hover {
  border-color: #5ec4f4;
  background: #eef9ff;
  color: #075f95;
  transform: none;
}

.evidence-export-all-btn[aria-busy="true"] {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.evidence-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid #c6d3e6;
  border-top-color: #16395f;
  border-radius: 999px;
  animation: evidence-spin 0.8s linear infinite;
}

@keyframes evidence-spin {
  to { transform: rotate(360deg); }
}

.evidence-header-tools .btn,
.evidence-header-tools .input,
.evidence-header-tools .select,
.evidence-header-tools .ui-date-range-trigger {
  height: var(--case-filter-control-height);
  min-height: var(--case-filter-control-height);
  box-sizing: border-box;
  padding-block: 0;
  border-color: #d6e1ef;
  border-radius: 5px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: #1b2f4a;
  font-size: 12px;
  font-weight: 700;
}

.evidence-header-tools .ui-date-range-trigger {
  padding-inline: 10px;
}

.evidence-header-tools .ui-date-range-trigger-inputs {
  gap: 6px;
  min-width: 0;
  justify-content: center;
}

.evidence-header-tools .ui-date-trigger-segment,
.evidence-header-tools .ui-date-trigger-segment.placeholder,
.evidence-header-tools .ui-date-trigger-segment.active {
  display: inline;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #6f7f94;
  cursor: inherit;
  font-weight: 700;
}

.evidence-toolbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(8, 27, 58, 0.08);
}

.evidence-toolbar[hidden] {
  display: none;
}

.evidence-groups {
  display: grid;
  gap: 18px;
}

.evidence-product-group {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.evidence-product-header,
.evidence-product-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.evidence-product-header {
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: nowrap;
  gap: 16px;
}

.evidence-product-title {
  --case-filter-control-height: 50px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.evidence-product-title h3 {
  margin: 0;
  white-space: nowrap;
}

.evidence-product-title .muted {
  white-space: nowrap;
}

.evidence-product-title .evidence-tabs {
  margin-left: 8px;
}

.evidence-product-actions {
  flex-wrap: nowrap;
  justify-content: flex-end;
  white-space: nowrap;
  min-width: 0;
}

.evidence-product-actions label,
.evidence-selected-pill {
  flex: 0 0 auto;
}

.evidence-selected-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  background: #eef4ff;
  color: var(--primary);
  font-weight: 700;
}

.evidence-product-actions .btn,
.evidence-product-actions label {
  flex-shrink: 0;
}

.evidence-product-action-cluster {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  min-width: 0;
}

.evidence-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faff;
}

.evidence-tab {
  min-width: 64px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #31547d;
  cursor: pointer;
  font-weight: 760;
}

.evidence-tab.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 4px 12px rgba(8, 27, 58, 0.08);
}

.evidence-media-viewport {
  height: 520px;
  overflow-y: auto;
  overscroll-behavior-y: auto;
  padding: 2px 4px 6px 2px;
  border-top: 1px solid #edf3fb;
}

.evidence-flat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 120px);
  gap: 10px;
  align-content: start;
}

.evidence-media-item {
  min-width: 0;
  margin: 0;
}

.evidence-thumb,
.evidence-video-card {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  cursor: pointer;
  background: #0f172a;
}

.evidence-thumb {
  width: 120px;
  height: 120px;
}

.evidence-thumb img,
.evidence-video-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.evidence-thumb .evidence-check,
.evidence-video-card .evidence-check {
  position: absolute;
  top: 5px;
  left: 5px;
  z-index: 2;
}

.evidence-video-card {
  width: 120px;
  height: 120px;
}

.evidence-video-card [data-evidence-video] {
  width: 100%;
  height: 100%;
}

.evidence-video-card .play-icon,
.evidence-video-link {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.evidence-video-card .play-icon {
  font-size: 36px;
  background: rgba(0, 0, 0, 0.32);
}

.evidence-video-link {
  top: auto;
  padding-bottom: 18px;
  font-size: 12px;
}

.evidence-item-meta {
  display: grid;
  gap: 2px;
  margin-top: 6px;
  font-size: 12px;
}

.evidence-item-meta button {
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font-weight: 700;
}

.evidence-item-meta span {
  color: var(--muted);
}

.evidence-load-more {
  margin-top: 12px;
}

.evidence-media-nav {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border-color: rgba(255, 255, 255, 0.52);
  color: #fff;
  background: rgba(9, 20, 37, 0.5);
  backdrop-filter: blur(10px);
  line-height: 1;
}

.evidence-lightbox {
  background: rgba(0, 0, 0, 0.85);
  padding: 16px 0 24px;
}

.evidence-lightbox-modal {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100vw;
  height: 100%;
  justify-content: center;
  gap: 22px;
}

.admin-modal.admin-modal-media-viewer.evidence-lightbox-modal {
  width: 100vw;
}

.evidence-lightbox-media-frame .admin-media-actions {
  position: absolute;
  top: -46px;
  right: 0;
  display: flex;
  flex-direction: row;
  gap: 6px;
  z-index: 5;
}

.evidence-lightbox .admin-media-viewer-content,
.case-media-backdrop .admin-media-viewer-content {
  flex-direction: column;
  gap: 18px;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
}

.evidence-lightbox-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  padding: 56px 0 0;
  box-sizing: border-box;
  overflow: hidden;
}

.evidence-lightbox-main-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
}

.evidence-lightbox-media-frame {
  position: relative;
  display: inline-flex;
}

.evidence-lightbox-main-panel img,
.evidence-lightbox-main-panel video {
  display: block;
  width: auto;
  height: auto;
  max-width: min(54.67vw, calc(80vw - 272px));
  max-height: calc(80vh - 121px);
  object-fit: contain;
  border-radius: 6px;
}

.evidence-lightbox-main-panel video {
  background: #000;
}

.evidence-lightbox-side {
  position: absolute;
  top: 56px;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  opacity: 0.42;
  cursor: pointer;
  transition: opacity 0.15s;
  filter: grayscale(0.32) brightness(0.64);
  background: transparent;
}

.evidence-lightbox-side:hover {
  opacity: 0.58;
  filter: grayscale(0.16) brightness(0.72);
}

.evidence-lightbox-side.peek-prev,
.evidence-lightbox-side.peek-next {
  transform: none;
  margin: 0;
}

.evidence-lightbox-side.peek-prev {
  right: calc(50% + min(27.34vw, calc(40vw - 136px)) + 60px);
  margin-left: 0;
}

.evidence-lightbox-side.peek-next {
  left: calc(50% + min(27.34vw, calc(40vw - 136px)) + 60px);
}

.evidence-lightbox-side img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(54.67vw, calc(80vw - 272px));
  max-height: calc(80vh - 121px);
  object-fit: contain;
  border-radius: 6px;
  pointer-events: none;
}

.evidence-lightbox-side span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.5);
  font-size: 36px;
  pointer-events: none;
}

.evidence-lightbox-side.is-empty {
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 720px) {
  .evidence-lightbox-side:not(.is-empty) {
    display: none;
  }
}

/* 订单截图预览：恢复原始简单布局，不使用绝对定位侧图 */
.evidence-lightbox-stage--order {
  position: static;
  display: grid;
  grid-template-columns: clamp(70px, 8vw, 120px) minmax(0, auto) clamp(70px, 8vw, 120px);
  column-gap: clamp(160px, 12vw, 260px);
}

.evidence-lightbox-stage--order .evidence-lightbox-side {
  position: static;
  top: auto;
  bottom: auto;
  width: 100%;
  height: min(48vw, calc(100vh - 152px));
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.evidence-lightbox-stage--order .evidence-lightbox-side img {
  width: 400%;
  height: 100%;
  max-width: none;
  max-height: 100%;
  object-fit: cover;
}

.evidence-lightbox-stage--order .evidence-lightbox-side.peek-prev {
  justify-content: flex-start;
}

.evidence-lightbox-stage--order .evidence-lightbox-side.peek-next {
  justify-content: flex-end;
}

.evidence-lightbox-counter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  width: 100%;
}

.evidence-lightbox-counter .evidence-media-nav {
  position: relative;
  width: 36px;
  height: 36px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  font-size: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  line-height: 0;
}

.evidence-lightbox-counter .evidence-media-nav::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-color: currentColor;
  border-style: solid;
  border-width: 0;
}

.evidence-lightbox-counter [data-evidence-lightbox-prev].evidence-media-nav::before,
.evidence-lightbox-counter [data-action="case-media-prev"].evidence-media-nav::before {
  border-left-width: 2.4px;
  border-bottom-width: 2.4px;
  transform: translate(-42%, -50%) rotate(45deg);
}

.evidence-lightbox-counter [data-evidence-lightbox-next].evidence-media-nav::before,
.evidence-lightbox-counter [data-action="case-media-next"].evidence-media-nav::before {
  border-right-width: 2.4px;
  border-top-width: 2.4px;
  transform: translate(-58%, -50%) rotate(45deg);
}

.admin-modal-wide {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #e8eef8;
}

.admin-modal-lg {
  width: min(880px, calc(100vw - 48px));
  max-height: min(680px, calc(100vh - 64px));
}

.admin-modal-lg .settings-row,
.admin-modal-lg .dual-row,
.admin-modal-lg label,
.admin-modal-lg .textarea,
.admin-modal-lg .input,
.admin-modal-lg .select {
  font-size: 14px;
}

.admin-modal-lg .ai-box {
  margin-top: 14px;
}

.logistics-modal-head-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.logistics-range-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.logistics-range-tabs .btn {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
}

.logistics-updates-body {
  display: grid;
  gap: 18px;
}

.logistics-updates-section {
  display: grid;
  gap: 8px;
}

.logistics-updates-operation-card {
  padding: 12px;
  border: 1px solid #e0e9f3;
  border-radius: 6px;
  background: #ffffff;
}

.logistics-updates-issue-section {
  padding-inline: 12px;
}

.logistics-updates-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logistics-updates-section-head h4,
.logistics-updates-section-head strong {
  font-size: 13px;
}

.logistics-updates-section-head h4 {
  margin: 0;
  font-weight: 600;
  color: #223b5c;
}

.logistics-updates-section-head strong {
  min-width: 24px;
  padding: 2px 8px;
  border-radius: 10px;
  background: #e3f1ff;
  color: #075f95;
  font-weight: 700;
  text-align: center;
}

.logistics-updates-table th,
.logistics-updates-table td {
  padding: 7px 10px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.logistics-updates-table td:first-child > div + div {
  margin-top: 4px;
}

.logistics-updates-table tr[data-logistics-age="24h"] > td:first-child {
  border-left: 4px solid #0e7490;
}

.logistics-updates-table tr[data-logistics-age="48h"] > td:first-child {
  border-left: 4px solid #b45309;
}

.logistics-updates-table tr[data-logistics-age="3d"] > td:first-child {
  border-left: 4px solid #c2410c;
}

.logistics-updates-table tr[data-logistics-age="older"] > td:first-child {
  border-left: 4px solid #b91c1c;
}

.logistics-updates-modal .table-wrap {
  overflow-x: hidden;
}

.logistics-updates-table {
  min-width: 0;
  table-layout: fixed;
}

.logistics-updates-operation-card .logistics-updates-table th:nth-child(1),
.logistics-updates-operation-card .logistics-updates-table td:nth-child(1) {
  width: 38%;
}

.logistics-updates-operation-card .logistics-cell {
  line-height: 1.55;
}

.logistics-tracking-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
  white-space: nowrap;
}

.logistics-tracking-actions .op-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}

.logistics-tracking-actions svg {
  display: block;
  width: 14px;
  height: 14px;
}

.logistics-updates-empty {
  padding: 22px 12px !important;
  text-align: center;
}

.admin-modal-wide p {
  margin: 0;
  line-height: 1.65;
}

.case-contact-preference-row {
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.45fr);
  gap: 18px;
}

.case-contact-preference-row section {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.admin-media-link span:first-child {
  font-size: 34px;
}

.editor {
  display: grid;
  gap: 10px;
}

.placeholder-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.placeholder {
  border-radius: 4px;
  background: #eef3ff;
  color: #3b5998;
  padding: 4px 10px;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.5;
  cursor: pointer;
  border: 1px solid #d4dff0;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.placeholder:hover {
  background: #dae6ff;
  border-color: #b3cceb;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

.settings-card {
  padding: 16px;
}

.settings-top-card {
  display: flex;
  flex-direction: column;
  min-height: 350px;
}

.settings-top-card .settings-bottom-save {
  align-self: flex-start;
  margin-top: auto;
}

.settings-card-footer {
  display: flex;
  align-items: center;
  margin-top: auto;
}

.ai-settings-footer {
  justify-content: space-between;
  gap: 16px;
}

.ai-enable-line {
  flex: 0 0 auto;
  min-width: 190px;
}

.settings-wide {
  grid-column: 1 / -1;
}

.settings-card h3 {
  font-size: 18px;
}

.settings-row {
  display: grid;
  gap: 8px;
  margin-top: 0;
}

.knowledge-editor-row {
  grid-template-columns: 1fr 1fr 1fr;
}

.dual-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.settings-card .input,
.settings-card .select {
  min-height: 38px;
  padding: 0 12px;
}

.settings-card .textarea {
  min-height: 82px;
  padding: 10px 12px;
}

.settings-copy-textarea {
  min-height: 76px;
  resize: vertical;
}

.admin-password-form {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto;
  align-items: end;
  gap: 10px;
}

.settings-card .btn {
  min-height: 38px;
}

.settings-card .switch-line {
  gap: 12px;
}

.settings-card > .muted {
  margin: 8px 0 0;
}

.lingxing-settings-card .admin-title {
  align-items: center;
}

.lingxing-settings-card {
  padding: 14px 16px;
}

.lingxing-title-row {
  display: grid;
  grid-template-columns: auto auto auto;
  justify-content: start;
  gap: 8px 12px;
}

.lingxing-title-row .badge {
  min-height: 22px;
  border-radius: 5px;
  padding: 0 7px;
  font-size: 12px;
  line-height: 1;
}

.lingxing-meta-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: #6d7f95;
  cursor: help;
  outline: none;
}

.lingxing-meta-tooltip:focus-visible .lingxing-meta-tooltip-icon {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.lingxing-meta-tooltip-icon {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid #c8d6e7;
  border-radius: 50%;
  background: #f7faff;
  color: #4d6480;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.lingxing-meta-tooltip-content {
  position: absolute;
  z-index: 8;
  top: calc(100% + 8px);
  left: 50%;
  display: grid;
  width: max-content;
  max-width: min(560px, calc(100vw - 48px));
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #cbd9e8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(35, 57, 84, 0.14);
  color: #40536b;
  font-size: 12px;
  line-height: 18px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -4px);
  transition: opacity 120ms ease, transform 120ms ease;
  visibility: hidden;
}

.lingxing-meta-tooltip-content strong {
  color: #1f3150;
  font-size: 13px;
  font-weight: 800;
}

.lingxing-meta-tooltip-content b {
  color: #61758d;
  font-weight: 720;
}

.admin-theme-dark .lingxing-meta-tooltip-icon {
  border-color: #4a6282;
  background: #253956;
  color: #c9d9ed;
}

.admin-theme-dark .lingxing-meta-tooltip-content {
  border-color: #405a7a;
  background: #1e2e45;
}

.admin-theme-dark .lingxing-meta-tooltip-content strong {
  color: #f1f6ff;
}

.admin-theme-dark .lingxing-meta-tooltip-content b {
  color: #b9c8df;
}

.lingxing-meta-tooltip:hover .lingxing-meta-tooltip-content,
.lingxing-meta-tooltip:focus .lingxing-meta-tooltip-content {
  opacity: 1;
  transform: translate(-50%, 0);
  visibility: visible;
}

.lingxing-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.lingxing-status span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid #dbe7f5;
  border-radius: 6px;
  background: #f7fbff;
  color: #2a4060;
  font-size: 13px;
  font-weight: 720;
}

.lingxing-essentials-note {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  background: linear-gradient(135deg, #f8fbff, #fffaf3);
}

.lingxing-essentials-note strong {
  color: var(--text);
}

.lingxing-essentials-note span {
  color: #3d4e66;
  font-size: 13px;
}

.lingxing-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
  align-items: stretch;
}

.lingxing-inner-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.lingxing-card-grid > .catalog-editor,
.lingxing-card-grid > .lingxing-credential-grid > .catalog-editor {
  align-self: stretch;
  height: 100%;
  min-height: 0;
}

.lingxing-card-grid .catalog-editor {
  align-content: start;
}

.lingxing-inner-card .catalog-editor-head {
  min-height: 22px;
}

.lingxing-inner-card .catalog-editor-head strong {
  font-size: 18px;
  font-weight: 760;
  line-height: 22px;
}

.lingxing-inner-card .settings-row label {
  font-size: 13px;
  font-weight: 720;
  line-height: 18px;
  white-space: nowrap;
}

.lingxing-inner-card .input {
  height: 36px;
  min-height: 36px;
  font-size: 14px;
  font-weight: 650;
  line-height: 20px;
  white-space: nowrap;
}

.lingxing-grid {
  grid-template-columns: minmax(0, 1fr);
}

.lingxing-enable-row {
  min-height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
}

.lingxing-action-row {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto auto;
  grid-column: 1 / -1;
  justify-content: stretch;
  min-height: 32px;
  margin-top: 0;
  gap: 8px;
}

.lingxing-action-row .lingxing-enable-row {
  justify-self: start;
  min-width: 190px;
  min-height: 32px;
}

.lingxing-request-ip {
  align-items: center;
  background: #eef4fb;
  border: 1px solid #d7e2f0;
  border-radius: 8px;
  color: #40536b;
  display: inline-flex;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  white-space: nowrap;
}

.lingxing-request-ip code {
  color: #24384f;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 760;
}

.lingxing-request-ip small {
  color: #6d7f95;
  font-size: 11px;
}

.lingxing-request-ip.error {
  background: #fff5f5;
  border-color: #ffd4d4;
  color: #9a3412;
}

.lingxing-request-ip em {
  font-style: normal;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lingxing-action-row .btn {
  height: 32px;
  min-height: 32px;
  min-width: 0;
  width: auto;
  padding-block: 0;
  padding-inline: 14px;
  white-space: nowrap;
}

.lingxing-action-row .btn.primary {
  min-width: 154px;
}

.lingxing-action-row > .action-row {
  margin-left: auto;
  justify-content: flex-end;
}

.lingxing-grid .switch-line {
  grid-column: span 1;
  min-height: 38px;
}

.lingxing-credential-grid {
  display: contents;
  padding: 0;
}

.lingxing-credential-grid .settings-row {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.lingxing-credential-card {
  box-sizing: border-box;
  min-height: 0;
}

.lingxing-advanced {
  margin-top: 12px;
  border: 1px solid #e4ecf8;
  border-radius: 8px;
  background: #fbfdff;
}

.lingxing-advanced summary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 760;
  color: #21457c;
}

.lingxing-advanced-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0 14px 14px;
}

.lingxing-return-filter-card .filter-grid,
.lingxing-return-overview-card .filter-grid {
  grid-template-columns: minmax(294px, 1.32fr) minmax(280px, 1.35fr) minmax(120px, 0.7fr) minmax(120px, 0.7fr) minmax(88px, 0.45fr) minmax(108px, 0.52fr);
  gap: 12px;
}

.return-analysis-workbench {
  padding: 0;
}

.return-analysis-toolbar {
  grid-template-columns: minmax(260px, 1.16fr) minmax(108px, 0.44fr) minmax(260px, 1.3fr) minmax(118px, 0.48fr) minmax(196px, auto);
}

.return-analysis-workbench .case-toolbar-actions {
  grid-template-columns: repeat(2, auto);
  gap: 8px;
}

.return-analysis-workbench .return-reason-list {
  margin: 0;
  padding: 0 22px 10px;
}

.return-analysis-body {
  min-width: 0;
}

.return-analysis-meta {
  padding: 0 22px 8px;
  font-size: 12px;
  font-weight: 720;
}

.lingxing-return-filter-card,
.lingxing-return-overview-card,
.return-reason-card {
  overflow: visible;
}

.case-filter-card .filter-grid {
  --case-filter-control-height: 34px;
  grid-template-columns: 200px 166px 88px 112px 150px max-content;
  gap: 8px;
  align-items: center;
}

.case-filter-card .filter-grid .btn {
  height: var(--case-filter-control-height);
  min-height: var(--case-filter-control-height);
  min-width: 76px;
  padding-inline: 8px;
  padding-block: 0;
  line-height: 1;
}

.case-filter-card .filter-grid .filter-field,
.case-filter-card .filter-grid .admin-date-range,
.case-filter-card .filter-grid .ui-date-range-compact,
.case-filter-card .filter-grid .case-combined-filter,
.case-filter-card .filter-grid .case-toolbar-dropdown {
  height: var(--case-filter-control-height);
  min-height: var(--case-filter-control-height);
}

.case-filter-card .filter-grid .input,
.case-filter-card .filter-grid .select,
.case-filter-card .filter-grid .ui-date-range-trigger,
.case-filter-card .filter-grid .case-filter-toggle,
.case-filter-card .filter-grid .case-toolbar-dropdown-toggle {
  height: var(--case-filter-control-height);
  min-height: var(--case-filter-control-height);
  box-sizing: border-box;
}

.case-filter-card .filter-grid .input,
.case-filter-card .filter-grid .select {
  padding-block: 0;
  line-height: 1;
}

.case-filter-card .filter-grid .ui-date-range-trigger,
.case-filter-card .filter-grid .case-filter-toggle,
.case-filter-card .filter-grid .case-toolbar-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.case-filter-card .filter-grid .filter-field,
.case-filter-card .filter-grid .case-toolbar-actions {
  align-self: stretch;
}

.case-filter-card #case-filter-form.filter-grid {
  grid-template-columns: 200px 166px 88px 112px 150px minmax(max-content, 1fr);
}

#case-filter-form .case-toolbar-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  min-width: max-content;
}

@media (max-width: 1380px) {
  .case-filter-card #case-filter-form.filter-grid {
    grid-template-columns: 176px 154px 78px 104px 124px minmax(280px, 1fr);
  }

  #case-filter-form .case-toolbar-actions .btn {
    min-width: 66px;
    padding-inline: 6px;
  }
}

.return-analysis-workbench .return-analysis-toolbar {
  grid-template-columns: minmax(240px, 1.12fr) minmax(128px, 0.54fr) minmax(250px, 1.18fr) minmax(128px, 0.54fr) minmax(196px, 0.78fr);
  align-items: end;
}

.return-analysis-workbench .case-toolbar-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.return-analysis-workbench .case-toolbar-actions .btn {
  width: 100%;
  justify-content: center;
}

.case-combined-filter {
  position: relative;
  z-index: 1;
}

.case-combined-filter:has(.case-filter-popover) {
  z-index: 80;
}

.case-toolbar-dropdown {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
}

.case-toolbar-dropdown.open {
  z-index: 130;
}

.case-toolbar-dropdown-toggle {
  position: relative;
  width: 100%;
  padding-inline: 10px 30px !important;
  overflow: hidden;
  border-color: #d6e1ef !important;
  background: #ffffff !important;
  color: #2f3744 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 760;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-status-dropdown .case-toolbar-dropdown-toggle {
  padding-inline: 8px 24px !important;
  gap: 5px;
}

.case-status-dropdown .ui-icon {
  flex: 0 0 auto;
}

.case-toolbar-dropdown-toggle span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-toolbar-dropdown-toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  width: 0;
  height: 0;
  border-top: 5px solid #68809d;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  transform: translateY(-35%);
}

.case-toolbar-dropdown-toggle.active,
.case-toolbar-dropdown.open .case-toolbar-dropdown-toggle {
  border-color: #38aee6 !important;
  background: #eef9ff !important;
  color: #066da8 !important;
}

.case-toolbar-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 130;
  width: 100%;
  max-height: 244px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid #d9e4f2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(28, 45, 78, 0.18);
}

.case-toolbar-dropdown-option {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 32px;
  padding: 0 9px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #ffffff;
  color: #273852;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.case-toolbar-dropdown-option:hover,
.case-toolbar-dropdown-option.selected {
  border-color: #d8e5f6;
  background: #f4f8ff;
  color: #075f95;
}

.case-processing-method {
  position: relative;
  overflow: visible;
}

.admin-cases-table.case-table-density-compact td.case-processing-method {
  overflow: visible;
}

.case-processing-method-picker {
  position: relative;
  width: 132px;
  max-width: 100%;
}

.case-processing-method-picker.open {
  z-index: 160;
}

.case-processing-method-trigger {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 32px;
  padding: 0 26px 0 10px;
  overflow: hidden;
  border: 1px solid #d6e1ef;
  border-radius: 8px;
  background: #ffffff;
  color: #1f3b5b;
  font-size: 12px;
  font-weight: 760;
  line-height: 1;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.case-processing-method-trigger span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-processing-method-trigger::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 10px;
  width: 0;
  height: 0;
  border-top: 5px solid #68809d;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  transform: translateY(-35%);
}

.case-processing-method-picker.open .case-processing-method-trigger {
  border-color: #9ec4ef;
  background: #f7fbff;
  color: #075f95;
}

.case-processing-method-picker.is-disabled .case-processing-method-trigger {
  border-color: #dfe6ef;
  background: #f5f7fa;
  color: #7a8899;
  cursor: default;
}

.case-processing-method-picker.is-disabled .case-processing-method-trigger::after {
  border-top-color: #9aa8b7;
}

.case-processing-method-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 170;
  width: max(100%, 148px);
  max-height: 248px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid #d9e4f2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(28, 45, 78, 0.18);
}

.case-processing-method-option {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 32px;
  padding: 0 9px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #ffffff;
  color: #273852;
  font-size: 12px;
  font-weight: 740;
  line-height: 1;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.case-processing-method-option:hover,
.case-processing-method-option.selected {
  border-color: #d8e5f6;
  background: #f4f8ff;
  color: #075f95;
}

.case-filter-toggle {
  width: 100%;
  justify-content: center;
  gap: 7px;
  min-height: var(--case-filter-control-height, 34px);
}

.case-filter-toggle.active {
  border-color: #b7c9e4;
  background: #f6f9ff;
  color: #243c68;
}

.case-filter-toggle[aria-expanded="true"] {
  border-color: #38aee6 !important;
  background: #eef9ff !important;
  color: #066da8 !important;
}

.case-filter-toggle em,
.case-filter-tab em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e8f0ff;
  color: #24416f;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.case-filter-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: 116px minmax(230px, 300px);
  width: min(430px, calc(100vw - 48px));
  min-height: 292px;
  overflow: hidden;
  border: 1px solid #d9e4f2;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(28, 45, 78, 0.18);
}

.case-filter-tabs {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 10px;
  border-right: 1px solid #e4ebf5;
  background: #f7faff;
}

.case-filter-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #42516b;
  font-size: 13px;
  font-weight: 760;
  cursor: pointer;
  text-align: left;
}

.case-filter-tab:hover,
.case-filter-tab.active {
  background: #ffffff;
  color: #20324f;
  box-shadow: inset 0 0 0 1px #dbe6f5;
}

.case-filter-panel {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 10px;
  min-width: 0;
  padding: 12px;
}

.case-filter-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.case-filter-panel-head strong {
  font-size: 14px;
  color: #20324f;
}

.case-filter-search {
  min-height: 34px;
}

.case-filter-options {
  display: grid;
  align-content: start;
  gap: 5px;
  max-height: 190px;
  overflow: auto;
  padding-right: 2px;
}

.case-filter-option {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  min-height: 32px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #ffffff;
  color: #273852;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.case-filter-option:hover,
.case-filter-option.selected {
  border-color: #d8e5f6;
  background: #f4f8ff;
}

.case-filter-check {
  color: #2f66c8;
  font-weight: 900;
}

.case-filter-empty {
  margin: 16px 0;
  text-align: center;
}

.stats-filter-card .filter-grid {
  grid-template-columns: minmax(220px, 1.1fr) repeat(4, minmax(128px, 0.86fr)) minmax(104px, 0.6fr) minmax(104px, 0.6fr);
  gap: 12px;
}

.customer-filter-card .filter-grid {
  grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(150px, 0.9fr)) minmax(112px, 0.7fr) minmax(112px, 0.7fr);
  gap: 12px;
}

.lingxing-return-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: #4f647a;
  font-size: 13px;
  font-weight: 720;
}

.lingxing-return-meta span {
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  background: #f8fbff;
}

.lingxing-return-meta span {
  padding: 7px 10px;
}

.return-metric-grid {
  margin-top: 18px;
}

.return-reason-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  overflow: visible;
  margin-top: 18px;
}

.return-reason-inline {
  min-height: 44px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 0 12px;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  background: #f8fbff;
  color: #21457c;
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.return-reason-inline strong,
.return-reason-inline span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.return-reason-inline span {
  color: var(--muted);
  font-size: 11px;
}

.return-reason-row {
  display: grid;
  grid-template-columns: minmax(168px, 0.54fr) minmax(108px, 1fr) minmax(84px, auto);
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}

.return-reason-row + .return-reason-row {
  border-top: 1px solid #dbe7f5;
}

.return-reason-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.return-reason-row span {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7eef9;
}

.return-reason-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f7ee6, #f59d3d);
}

.return-reason-row em {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 8px;
  color: #223047;
  font-style: normal;
  font-weight: 800;
  text-align: right;
}

.return-reason-row em strong {
  font-weight: 850;
}

.return-reason-row em small {
  color: #3d4e66;
  font-size: 12px;
  font-weight: 760;
}

.return-analysis-table th,
.return-analysis-table td {
  vertical-align: top;
}

.return-analysis-table.case-table-density-compact tbody tr {
  height: auto;
  min-height: 72px;
  max-height: none;
}

.return-analysis-table.case-table-density-compact tbody td {
  height: auto;
  vertical-align: middle;
}

.return-analysis-table .return-product-cell,
.return-analysis-table .return-application-cell {
  text-align: left;
}

.return-analysis-table-card .table-wrap {
  max-height: 62vh;
  overflow: auto;
}

.return-analysis-workbench .table-wrap {
  max-height: 62vh;
  overflow: auto;
}

.return-analysis-table-card {
  display: flex;
  flex-direction: column;
}

.stats-matrix-card {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.stats-matrix-card .table-wrap {
  min-height: 0;
  overflow: auto;
}

.stats-matrix-card .table-wrap > .data-table {
  min-height: 0;
}

.return-analysis-table-card .admin-list-footer {
  flex: 0 0 auto;
  min-height: 30px;
  padding-top: 2px;
  font-size: 13px;
}

.return-analysis-table-card .admin-list-footer .btn {
  min-height: 26px;
  padding: 0 8px;
}

.return-analysis-table-card .admin-list-footer .page-size-select {
  min-height: 26px;
  width: 76px;
}

.return-analysis-table-card .data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.case-list-card .admin-list-footer,
.customers-table-card .admin-list-footer,
.knowledge-management-card .admin-list-footer,
.template-management-card .admin-list-footer,
.return-analysis-table-card .admin-list-footer {
  align-items: center;
  flex: 0 0 auto;
  min-height: 38px;
  height: auto;
  padding: 0 22px;
  overflow: visible;
}

.case-list-card .admin-list-footer .pagination,
.customers-table-card .admin-list-footer .pagination,
.knowledge-management-card .admin-list-footer .pagination,
.template-management-card .admin-list-footer .pagination,
.return-analysis-table-card .admin-list-footer .pagination {
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0;
}

.stats-matrix-card .data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.return-application-content {
  display: grid;
  gap: 6px;
  max-width: none;
  line-height: 1.45;
}

.return-application-line {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

.return-application-line b {
  color: #6b7f97;
  font-size: 11px;
  font-weight: 760;
  white-space: nowrap;
}

.return-application-line span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: #33445a;
}

.return-analysis-table .return-category-cell,
.return-analysis-table .return-handler-cell {
  text-align: center;
}

.return-product-cell {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.credential-status {
  display: inline-flex;
  margin-top: 6px;
  color: #4e5a6a;
  font-size: 12px;
  font-weight: 720;
}

.credential-status.saved {
  color: #14734e;
}

.dictionary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
  margin-top: 12px;
}

.personnel-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.personnel-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

.personnel-row > div:first-child {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  white-space: nowrap;
}

.personnel-password-panel {
  margin-top: 12px;
}

.admin-modal #template-body {
  min-height: 220px;
}

.admin-user-management-modal {
  width: min(1180px, calc(100vw - 32px));
  max-height: min(860px, calc(100vh - 24px));
  border-radius: 16px;
}

.admin-user-modal-head {
  align-items: center;
  padding: 12px 24px;
}

.admin-user-modal-head > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-width: 0;
  white-space: nowrap;
}

.admin-user-modal-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.admin-user-modal-head h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #1f2d44;
  font-size: 20px;
  font-weight: 900;
  white-space: nowrap;
}

.admin-modal-x {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #a4a9b1;
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
}

.admin-user-management-body {
  display: grid;
  gap: 10px;
  padding: 10px 24px 14px;
}

.admin-user-create-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #e4e8ee;
  border-radius: 10px;
  background: #fdfdfd;
}

.admin-user-create-panel h4 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: #1f2d44;
  font-size: 18px;
  font-weight: 900;
  align-self: center;
  white-space: nowrap;
}

.admin-user-inline-form,
.admin-user-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
}

.admin-user-inline-form.admin-user-perm-row {
  display: flex;
  flex-wrap: nowrap;
  grid-template-columns: none;
}

.admin-user-inline-form .input {
  min-width: 0;
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.admin-user-inline-form .perm-check {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  font-size: 12px;
  color: #555;
  cursor: pointer;
}

.admin-user-inline-form .muted {
  white-space: nowrap;
  font-size: 12px;
}

.admin-user-inline-form .btn {
  flex: none;
  min-height: 34px;
  font-size: 13px;
  font-weight: 900;
  padding: 7px 10px;
  white-space: nowrap;
}

.admin-user-create-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-user-table-wrap {
  overflow: auto;
  border: 1px solid #e4e8ee;
  border-radius: 10px;
  background: #ffffff;
}

.admin-user-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1080px;
  table-layout: fixed;
}

.admin-user-table.data-table {
  min-width: 1080px;
}

.admin-user-table th,
.admin-user-table td {
  padding: 7px 16px;
  border-bottom: 1px solid #edf0f4;
  text-align: center;
  vertical-align: middle;
}

.admin-user-table th {
  background: #fafafa;
  color: #8a8a8a;
  font-size: 13px;
  font-weight: 850;
}

.admin-user-table th:nth-child(1) { width: 80px; }
.admin-user-table th:nth-child(2) { width: 120px; }
.admin-user-table th:nth-child(3) { width: 100px; }
.admin-user-table th:nth-child(4) { width: 280px; }
.admin-user-table th:nth-child(5) { width: 70px; }
.admin-user-table th:nth-child(6) { width: 160px; }
.admin-user-table th:nth-child(7) { width: 230px; }

.admin-user-table td {
  white-space: nowrap;
}

.admin-user-table td:nth-child(4) {
  white-space: normal;
}

.admin-user-table tr:last-child td {
  border-bottom: 0;
}

.admin-user-name-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.admin-user-avatar {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #d8e6ff;
  color: #1f2d44;
  font-size: 13px;
  font-weight: 900;
}

.admin-user-table-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 6px;
}

.admin-user-table-actions .btn.compact {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 12px;
}

.system-reserved {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 8px;
  background: #f3f4f6;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.danger-ghost,
.admin-user-table-actions .btn[data-action="delete-admin-user"] {
  border-color: #d7d7d7;
  color: #555;
  background: #fff;
}

.admin-modal-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}

.admin-modal-footer .btn {
  min-width: 112px;
  min-height: 40px;
  justify-content: center;
  font-size: 15px;
  font-weight: 900;
}

.personnel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.admin-user-modal-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.catalog-editor {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e4ecf8;
  border-radius: 8px;
  background: #fbfdff;
}

.catalog-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.catalog-editor-hint {
  margin: -2px 0 0;
  color: #3f5170;
  font-size: 13px;
}

.catalog-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.catalog-chip {
  border: 0;
  padding-inline: 10px 8px;
  cursor: pointer;
}

.catalog-chip-x {
  font-weight: 900;
  line-height: 1;
}

.catalog-editor-row {
  grid-template-columns: 1fr auto;
  margin-top: 0;
}

.issue-category-editor .catalog-editor-head {
  align-items: center;
  justify-content: space-between;
}

.issue-category-head-copy {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.issue-category-head-copy .catalog-editor-hint {
  margin: 0;
  white-space: nowrap;
}

.issue-category-row,
.issue-category-add-row {
  display: grid;
  align-items: center;
  gap: 12px;
}

.issue-category-row {
  grid-template-columns: minmax(160px, 0.55fr) minmax(260px, 1.45fr) auto auto;
}

.issue-category-add-row {
  grid-template-columns: minmax(160px, 0.55fr) minmax(260px, 1.45fr) auto;
}

.issue-category-key-input {
  min-width: 0;
}

.issue-category-hint-input {
  min-width: 0;
}

.platform-catalog-editor {
  background: linear-gradient(180deg, #fcfdff, #f7faff);
}

.platform-catalog-editor .catalog-chip-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(122px, 1fr));
  gap: 10px;
}

.platform-catalog-editor .catalog-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid #dce7f7;
  border-radius: 10px;
  background: #eef4fb;
  color: #2a4172;
  font-weight: 760;
}

.platform-catalog-editor .catalog-editor-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.product-model-catalog-editor {
  gap: 12px;
  width: 100%;
  align-self: start;
  padding: 18px 20px;
  border-radius: 12px;
}

.product-model-settings-card {
  align-self: start;
  grid-column: 1 / -1;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.product-model-settings-card > .product-model-catalog-editor {
  border-radius: 12px;
}

.product-model-catalog-editor .catalog-editor-head strong {
  color: #12203a;
  font-size: 18px;
  font-weight: 900;
}

.product-model-manager {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(260px, 1fr) minmax(300px, 1fr);
  gap: 16px;
  align-items: stretch;
  min-height: 380px;
}

.product-model-list-pane,
.product-model-add-edit-pane,
.product-model-contact-pane {
  min-width: 0;
}

.product-model-add-edit-pane {
  display: grid;
  align-content: start;
}

.product-model-unified-form {
  display: grid;
  gap: 16px;
  padding: 16px;
  border: 1px solid #e4ecf8;
  border-radius: 8px;
  background: #fbfdff;
}

.product-model-unified-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.product-model-list-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
}

.product-model-search {
  max-width: 360px;
}

.product-model-table-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid #e3ecf8;
  border-radius: 8px;
}

.product-model-admin-list {
  --product-model-row-height: 92px;
  --product-model-row-gap: 10px;
  max-height: calc((var(--product-model-row-height) * 2) + var(--product-model-row-gap) + 6px);
  overflow-y: auto;
}

.product-model-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}

.product-model-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f0f5fc;
}

.product-model-table thead th {
  padding: 10px 10px;
  font-weight: 700;
  color: #3a5580;
  text-align: left;
  border-bottom: 1px solid #dce7f7;
  white-space: nowrap;
}

.product-model-table tbody {
  display: block;
  max-height: calc(40px * 7.5);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.product-model-table thead tr,
.product-model-table tbody tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.product-model-admin-row {
  min-height: var(--product-model-row-height);
}

.product-model-table-row {
  cursor: pointer;
  transition: background 0.12s;
}

.product-model-table-row:hover {
  background: #f6faff;
}

.product-model-table-row.active {
  background: #edf4ff;
}

.product-model-table-row td {
  height: 40px;
  box-sizing: border-box;
  padding: 4px 10px;
  border-bottom: 1px solid #eef3fa;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #233b63;
}

.pm-cell-img { width: 56px; }
.pm-cell-name { width: auto; }
.pm-cell-count { width: 100px; }
.pm-cell-actions { width: 44px; text-align: center; }

.pm-table-thumb {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  object-fit: cover;
  display: block;
}

.pm-table-thumb-empty {
  display: inline-block;
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  color: #b0c4de;
  font-size: 16px;
}

.pm-empty {
  text-align: center;
  padding: 24px 10px;
  color: #8fa4c0;
}

.pm-contacts-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e4ecf8;
}

.product-model-contact-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 14px;
  border: 1px solid #e4ecf8;
  border-radius: 8px;
  background: #fbfdff;
}

.pm-contact-placeholder {
  align-self: center;
  text-align: center;
  font-size: 13px;
}

.pm-contacts-table-wrap {
  overflow-y: auto;
  max-height: calc(48px * 5 + 36px);
  overscroll-behavior: contain;
}

.pm-contacts-save {
  display: flex;
  justify-content: flex-end;
  padding-top: 8px;
  border-top: 1px solid #e4ecf8;
}

.pm-contacts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
  color: #31547d;
}

.pm-contacts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.pm-contacts-table th {
  padding: 6px 6px;
  text-align: left;
  font-weight: 700;
  color: #5a7aa0;
  border-bottom: 1px solid #e4ecf8;
}

.pm-contacts-table td {
  padding: 5px 4px;
  vertical-align: middle;
}

.pm-contacts-table .input {
  height: 30px;
  min-height: 30px;
  padding: 4px 6px;
  font-size: 12px;
}

.pm-contact-select {
  width: 100%;
}

.pm-contact-row .btn.danger {
  padding: 2px 8px;
  font-size: 14px;
  line-height: 1;
}

.product-model-row-icon {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid #dce7f7;
  border-radius: 8px;
  background: #f7faff;
  color: #2f4874;
  cursor: pointer;
}

.product-model-row-icon.danger {
  color: #a73535;
  background: #fff7f7;
  border-color: #f0d6d6;
}

.product-model-row-icon .ui-icon {
  width: 15px;
  height: 15px;
}

.product-model-admin-name {
  display: contents;
}

.product-model-name-input {
  min-width: 0;
}

.product-model-name-input {
  height: 34px;
  min-height: 34px;
  padding: 6px 8px;
  background: #f8fbff;
  color: #2a4172;
  font-weight: 760;
}

.product-model-row-label {
  display: -webkit-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-model-form-body {
  --product-model-image-size: 200px;
  display: grid;
  grid-template-columns: var(--product-model-image-size) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

.product-model-image-field {
  display: grid;
  justify-items: center;
  gap: 10px;
  min-width: 0;
}

.product-model-image-upload-frame {
  position: relative;
  display: inline-grid;
  width: var(--product-model-image-size);
  height: var(--product-model-image-size);
  cursor: pointer;
}

.product-model-image-upload-frame input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.product-model-image-upload-frame .product-model-admin-thumb {
  width: var(--product-model-image-size);
  height: var(--product-model-image-size);
  border-radius: 12px;
}

.product-model-control-field {
  display: grid;
  grid-template-rows: min-content 1fr min-content;
  gap: 10px;
  min-height: var(--product-model-image-size);
  max-height: var(--product-model-image-size);
  min-width: 0;
}

.product-model-name-field,
.product-model-unified-form {
  display: grid;
  gap: 7px;
  color: #31547d;
  font-size: 12px;
  font-weight: 760;
}


.product-model-form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #e4ecf8;
}

.product-model-form-actions-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

.product-model-admin-thumb {
  display: inline-grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 1px solid #dce7f7;
  border-radius: 8px;
  background: #f7faff;
  color: #5d7193;
  font-size: 12px;
  font-weight: 760;
  overflow: hidden;
  background-color: #f7faff;
  background-position: center;
  background-size: cover;
}

.product-model-upload-icon,
.product-model-remove-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #dce7f7;
  border-radius: 8px;
  background: #f7faff;
  color: #324760;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

.product-model-remove-icon {
  width: 30px;
  border: 0;
  background: #eef4fb;
}

.product-model-upload-icon input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.product-model-upload-btn {
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.product-model-upload-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.admin-user-form {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto;
  align-items: end;
  gap: 10px;
}

.admin-user-form-actions {
  align-self: end;
  justify-content: flex-end;
  margin-top: 0;
  white-space: nowrap;
}

.admin-user-form-actions .btn {
  min-height: 42px;
}

.catalog-country-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) auto;
  margin-top: 0;
}

.switch-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.switch {
  position: relative;
  width: 44px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: #c8d3e4;
  padding: 0;
}

.switch.on {
  background: var(--primary);
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  transition: transform 0.16s ease;
}

.switch.on::after {
  transform: translateX(20px);
}

.submit-progress {
  display: none;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  color: #0f766e;
  font-size: 13px;
  font-weight: 780;
}

.submit-progress::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid #a7f3d0;
  border-top-color: #0f766e;
  border-radius: 50%;
  animation: submitSpin 0.8s linear infinite;
}

.submit-progress.is-active {
  display: inline-flex;
}

.case-form.is-submitting {
  pointer-events: auto;
}

.case-form.is-submitting .btn[type="submit"] {
  min-width: 190px;
}

.customer-submit-overlay {
  position: fixed;
  inset: 0;
  z-index: 1800;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(8px);
}

.customer-submit-overlay.is-active {
  display: grid;
}

.customer-submit-dialog {
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(320px, calc(100vw - 48px));
  padding: 26px 24px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 8px;
  background: #fff;
  color: #123047;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.24);
  text-align: center;
}

.customer-submit-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid #ccfbf1;
  border-top-color: #0f766e;
  border-radius: 50%;
  animation: submitSpin 0.8s linear infinite;
}

@keyframes submitSpin {
  to { transform: rotate(360deg); }
}

.toast {
  position: fixed;
  left: 50%;
  right: auto;
  top: 24px;
  bottom: auto;
  z-index: 2000;
  max-width: min(420px, calc(100vw - 40px));
  padding: 14px 18px;
  border-radius: 8px;
  background: #102a57;
  color: white;
  box-shadow: 0 18px 42px rgba(16, 42, 87, 0.22);
  transform: translate(-50%, -18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.is-customer-route .toast {
  width: min(460px, calc(100vw - 32px));
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.muted {
  color: var(--muted);
}

.nowrap {
  white-space: nowrap;
}

.admin-mobile-toggle {
  display: none;
}

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

  .field-card:hover,
  .btn:hover {
    transform: none;
  }
}

@media (max-width: 1120px) {
  .filter-grid,
  .stats-grid,
  .settings-grid,
  .lingxing-return-filter-card .filter-grid,
  .lingxing-return-overview-card .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-grid,
  .split-layout,
  .knowledge-grid,
  .template-grid {
    grid-template-columns: 1fr;
  }

  .return-reason-row {
    grid-template-columns: minmax(0, 1fr) minmax(80px, 0.6fr) auto;
  }

  .return-reason-list {
    grid-template-columns: 1fr;
  }

  .login-art {
    display: none;
  }
}

@media (max-width: 1180px) {
  .return-workbench.is-return-pickup.has-refund-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .return-workbench.is-return-reissue.has-refund-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .login-shell .login-page {
    grid-template-columns: 1fr;
  }

  .login-copy {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.34);
  }
}

@media (max-width: 1320px) {
  .country-card {
    grid-column: span 3;
  }

  .platform-card {
    grid-column: span 12;
  }

  .detail-grid,
  .split-layout,
  .knowledge-grid,
  .template-grid {
    grid-template-columns: 1fr;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .knowledge-editor-row,
  .dual-row {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 741px) {
  .app-shell:has(.customer-page) {
    align-items: center;
    overflow: auto;
    padding: max(24px, calc((100dvh - var(--customer-card-height, 0px)) / 2)) 0;
  }

  .evidence-photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(76px, 92px));
  }
}

@media (min-width: 741px) and (max-width: 1320px) {
  .customer-page,
  .success-page,
  .login-shell {
    width: min(1220px, calc(100vw - 96px));
  }

  .page-decor {
    opacity: 0.13;
  }
}

@media (max-width: 740px) {
  .lingxing-return-filter-card .filter-grid,
  .lingxing-return-overview-card .filter-grid,
  .return-metric-grid,
  .return-reason-row {
    grid-template-columns: 1fr;
  }

  .return-reason-row em {
    justify-content: flex-start;
    text-align: left;
  }

  .customer-page,
  .success-page,
  .login-shell {
    width: calc(100vw - 16px);
    margin: 8px auto;
  }

  .customer-page {
    overflow: visible;
  }

  .customer-content {
    overflow: visible;
  }

  .issue-layout {
    grid-template-columns: 1fr;
  }

  .customer-country-menu,
  .customer-language-menu {
    position: fixed;
    top: 0;
    left: -9999px;
    z-index: 9999;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 18px 42px rgba(37, 78, 139, 0.16);
  }

  .customer-content,
  .success-content {
    padding: 16px 10px 14px;
    border-radius: 14px;
  }

  .mobile-menu {
    display: inline-grid;
    place-items: center;
    grid-area: menu;
  }

  .topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
  }

  .desktop-only {
    display: none;
  }

  .mobile-controls-row {
    display: block;
    margin: 0 0 12px;
    overflow: visible;
  }

  .mobile-controls-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    overflow: visible;
  }

  .mobile-controls-inner .country-select-button,
  .mobile-controls-inner .language-select {
    width: 100%;
    min-height: 44px;
    justify-content: center;
    border-radius: 10px;
    font-size: 13px;
    padding: 0 12px;
  }

  .mobile-controls-inner .customer-country-wrap,
  .mobile-controls-inner .customer-language-wrap {
    width: 100%;
    overflow: visible;
  }

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

  .video-card .video-option {
    min-height: 72px;
  }

  .repeat-info-strip {
    align-items: flex-start;
    gap: 8px;
  }

  .info-strip-pill {
    align-self: center;
  }

  .evidence-title-row {
    display: grid;
    gap: 8px;
  }

  .evidence-actions {
    grid-template-columns: 1fr;
  }

  .evidence-action {
    min-height: 42px;
  }

  .evidence-photo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .evidence-file-row {
    grid-template-columns: 22px minmax(0, 1fr) auto 24px;
  }

  .evidence-file-row small {
    display: none;
  }

  .evidence-status {
    font-size: 11px;
  }

  .brand {
    gap: 10px;
    min-width: 0;
    flex: 1;
  }

  .customer-header-controls {
    display: none;
  }

  .customer-country-wrap,
  .customer-language-wrap {
    width: auto;
    max-width: none;
  }

  .country-select-button {
    min-width: 0;
    width: auto;
    max-width: none;
    min-height: 38px;
    border-radius: 10px;
    padding: 0 10px;
  }

  .country-flag-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    font-size: 14px;
  }

  .country-label-text {
    white-space: nowrap;
    overflow: visible;
    text-overflow: unset;
    font-size: 12px;
  }

  .country-chevron svg {
    width: 10px;
    height: 10px;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 24px;
  }

  .brand h1 {
    font-size: clamp(19px, 5vw, 26px);
    line-height: 1.2;
    letter-spacing: -0.02em;
    white-space: normal;
    overflow-wrap: break-word;
  }

  .brand p {
    font-size: 12px;
    line-height: 1.4;
    margin-top: 4px;
  }

  .info-strip {
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 16px;
    padding: 10px 12px;
    font-size: 12.5px;
    line-height: 1.45;
    border-radius: 10px;
  }

  .info-strip .icon {
    flex-shrink: 0;
    margin-top: 1px;
  }

  .field-title {
    gap: 6px;
    margin-bottom: 8px;
    font-size: 12.5px;
  }

  .span-3,
  .span-4,
  .span-5,
  .span-6,
  .span-7,
  .span-12 {
    grid-column: 1 / -1;
  }

  .platform-card,
  .order-model-card {
    grid-column: 1 / -1;
  }

  .order-model-grid {
    grid-template-columns: 1fr;
  }

  .product-input-row {
    flex-direction: column;
  }

  .dictionary-grid {
    grid-template-columns: 1fr;
  }

  .lingxing-grid,
  .lingxing-credential-grid {
    grid-template-columns: 1fr;
  }

  .lingxing-grid .switch-line,
  .lingxing-grid label:nth-child(5),
  .lingxing-grid label:nth-child(9) {
    grid-column: 1 / -1;
  }

  .catalog-editor-row,
  .catalog-country-row,
  .product-model-add-row {
    grid-template-columns: 1fr;
  }

  .product-model-manager {
    grid-template-columns: 1fr;
  }

  .product-model-form-body {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .product-model-control-field {
    min-height: 0;
    max-height: none;
  }

  .product-model-form-actions {
    justify-content: flex-start;
  }

  .product-model-table tbody {
    max-height: calc(48px * 4);
  }

  .order-screenshot-panel {
    flex-direction: column;
    width: 100%;
  }

  .order-input-row {
    flex-direction: column;
  }

  .order-input-row > .input {
    flex: 1 1 auto;
  }

  .order-screenshot-panel .upload-zone {
    min-height: 38px;
  }

  .screenshot-thumb {
    width: 44px;
    height: 32px;
  }

  .contact-main-row {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .same-whatsapp-check {
    justify-self: flex-start;
  }

  .form-grid {
    gap: 10px;
  }

  .field-card {
    padding: 14px;
    border-radius: 12px;
  }

  .field-card:hover {
    transform: none;
    box-shadow: 0 9px 24px rgba(37, 78, 139, 0.06);
  }

  .platform-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .platform-option {
    justify-content: center;
    width: 100%;
    padding: 10px 8px;
    min-height: 48px;
    font-size: 13px;
    text-align: center;
    border-radius: 10px;
  }

  .video-card .video-options {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .video-card .video-option {
    min-height: 80px;
    padding: 12px 14px;
    border-radius: 12px;
    gap: 12px;
  }

  .video-icon-bubble {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  .video-copy strong {
    white-space: normal;
  }

  .language-select {
    min-width: 0;
    width: auto;
    min-height: 38px;
    padding-inline: 10px;
    white-space: nowrap;
    border-radius: 10px;
    font-size: 12px;
  }

  .input,
  .select,
  .textarea {
    min-height: 46px;
    border-radius: 10px;
    font-size: 16px;
  }

  .input:focus,
  .select:focus,
  .textarea:focus {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  }

  .phone-email-grid {
    grid-template-columns: 1fr;
  }

  .phone-row {
    grid-template-columns: 100px 1fr;
  }

  .form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .case-form > .form-actions {
    position: sticky;
    bottom: 0;
    z-index: 20;
    margin: 12px -12px -12px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid rgba(42, 65, 102, 0.08);
    backdrop-filter: blur(16px);
  }

  .form-actions .btn {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    border-radius: 10px;
  }

  .form-actions .submit-progress {
    grid-column: 1 / -1;
    min-width: 0;
    margin-right: 0;
  }

  .summary-grid,
  .stats-grid,
  .filter-grid,
  .settings-grid,
  .attachment-grid {
    grid-template-columns: 1fr;
  }

  .next-step {
    grid-template-columns: 34px 44px 1fr;
  }

  .next-note {
    grid-template-columns: 44px 1fr;
  }

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

  .sidebar {
    position: fixed;
    z-index: 30;
    width: 248px;
    transform: translateX(-105%);
    transition: transform 0.18s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-top-collapse {
    display: none;
  }

  .admin-mobile-toggle {
    display: inline-flex;
  }

  .admin-header {
    grid-template-columns: auto minmax(0, 1fr);
    justify-content: space-between;
    padding: 0 14px;
  }

  .admin-content {
    padding: 18px 12px 26px;
  }

  .admin-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .chart {
    gap: 12px;
    padding-inline: 10px;
    overflow-x: auto;
  }

  .bar {
    min-width: 72px;
  }

  .login-copy,
  .login-panel {
    padding: 28px 18px;
  }

  .login-card {
    padding: 28px 20px;
  }

  .login-footer {
    padding: 0 18px;
    flex-direction: column;
    justify-content: center;
  }
}

@media (max-width: 900px) {
  .page-decor {
    opacity: 0.3;
  }

  .case-detail-workbench,
  .case-detail-left-grid,
  .case-detail-secondary-grid {
    grid-template-columns: 1fr;
  }

  .case-detail-info-strip {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding: 8px;
  }

  .case-detail-contact,
  .case-detail-address {
    grid-column: auto;
  }

  .case-detail-log-shell,
  .case-detail-log-rail {
    position: static;
  }

  .case-detail-log-rail {
    max-height: none;
  }

  .case-detail-summary,
  .case-detail-sections {
    grid-template-columns: 1fr;
  }

  .case-detail-info-grid,
  .case-detail-form-grid,
  .case-detail-field-row,
  .workflow-focused-refund-body,
  .refund-note-action-row,
  .pickup-state-edit-grid,
  .pickup-state-info-grid,
  .return-workbench.is-return-pickup.has-refund-panel,
  .return-workbench.is-return-pickup,
  .return-workbench.is-return-reissue,
  .return-workbench.is-reissue-direct,
  .case-contact-preference-row {
    grid-template-columns: 1fr;
  }

  .workflow-focused-body:has(.return-workbench) {
    max-width: 100%;
  }
}

@media (max-width: 740px) {
  .pickup-user-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .return-workbench.is-return-reissue.has-refund-panel {
    grid-template-columns: 1fr;
  }

  .app-shell {
    overflow: visible;
  }

  .admin-modal-backdrop {
    padding: 14px;
  }

  .admin-modal-case-detail {
    width: calc(100vw - 28px);
  }
}
/* 统计页面修复 - 最小化修改 */

/* 1. 筛选区域：让按钮垂直居中 */
.stats-filter-card .filter-grid {
  align-items: center;
}

/* 2. 图表卡片：标题和矩阵表格紧凑 */
.stats-chart-card .admin-title,
.stats-matrix-card .admin-title {
  margin-bottom: 10px;
}

/* 3. 矩阵表格：数字加粗便于阅读 */
.stats-matrix-table strong {
  font-weight: 800;
  font-size: 14px;
}

.stats-matrix-table small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  opacity: 0.7;
}

/* 4. 矩阵表格：汇总列突出 */
.stats-matrix-table td:nth-child(2) {
  background: #f8fbff;
  font-weight: 750;
}

/* 5. 确保表格sticky生效 */
.stats-matrix-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.stats-matrix-card .table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.stats-matrix-table th:first-child {
  position: sticky;
  left: 0;
  background: #f1f5fb;
  z-index: 3;
}

.stats-matrix-table tbody th {
  position: sticky;
  left: 0;
  background: white;
  z-index: 2;
}

.stats-matrix-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
}
/* ==========================================
   统计页面
   ========================================== */

.stats-page {
  display: grid;
  height: calc(100dvh - 74px - 58px);
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 16px;
  overflow: hidden;
}

.stats-main-chart,
.stats-heatmap {
  background: #ffffff;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  overflow: hidden;
}

.stats-main-chart {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.chart-header {
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 12px;
  border-bottom: 1px solid #e3edf9;
  background: #f8fbff;
}

.chart-title-group {
  --case-filter-control-height: 34px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.chart-title-group h3 {
  flex: 0 0 120px;
  margin: 0;
  color: #1b2f4a;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}

.chart-filters {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: flex-start;
  min-width: 0;
}

.chart-filters * {
  box-sizing: border-box;
}

.stats-date-input {
  width: 216px;
  flex: 0 0 216px;
}

.stats-date-input,
.stats-date-input .admin-date-range,
.stats-date-input .ui-date-range-compact {
  height: var(--case-filter-control-height);
  min-height: var(--case-filter-control-height);
}

.stats-date-input .ui-date-range-trigger {
  height: var(--case-filter-control-height);
  min-height: var(--case-filter-control-height);
  border-color: #d6e1ef;
  border-radius: 5px;
  background: #ffffff;
  color: #1b2f4a;
  padding-inline: 10px;
  font-size: 12px;
  font-weight: 700;
  transform: none;
}

.stats-date-input .ui-date-range-trigger-inputs {
  gap: 6px;
  justify-content: center;
}

.stats-date-input .ui-date-trigger-segment,
.stats-date-input .ui-date-trigger-segment.placeholder,
.stats-date-input .ui-date-trigger-segment.active {
  display: inline;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #6f7f94;
  cursor: inherit;
  font-weight: 700;
}

.stats-date-input .ui-date-trigger-separator,
.stats-date-input .ui-date-range-trigger-icon {
  color: #68809d;
}

.stats-main-chart .chart-filters .ui-date-range-trigger {
  height: var(--case-filter-control-height);
  min-height: var(--case-filter-control-height);
  border-radius: 5px;
  border-color: #d6e1ef;
  background: #ffffff;
  color: #2f3744;
  box-shadow: none;
}

.stats-filter-dropdown {
  position: relative;
  width: 118px;
  flex: 0 0 118px;
  min-width: 118px;
}

.stats-filter-dropdown.open {
  z-index: 90;
}

.stats-filter-toggle {
  position: relative;
  justify-content: center;
  width: 100%;
  padding-inline: 10px 30px !important;
  overflow: hidden;
  border-color: #d6e1ef !important;
  color: #2f3744 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-filter-toggle span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-filter-toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  width: 0;
  height: 0;
  border-top: 5px solid #68809d;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  transform: translateY(-35%);
}

.stats-filter-toggle.active,
.stats-filter-dropdown.open .stats-filter-toggle {
  border-color: #38aee6 !important;
  background: #eef9ff !important;
  color: #066da8 !important;
}

.stats-filter-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 90;
  width: 100%;
  max-height: 244px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid #d9e4f2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(28, 45, 78, 0.18);
}

.stats-filter-option {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #ffffff;
  color: #273852;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  cursor: pointer;
}

.stats-filter-option:hover,
.stats-filter-option.selected {
  border-color: #d8e5f6;
  background: #f4f8ff;
  color: #075f95;
}

.stats-main-chart .chart-filters .ui-date-range-trigger {
  padding-inline: 10px;
}

.stats-main-chart .chart-filters .btn {
  height: var(--case-filter-control-height);
  min-height: var(--case-filter-control-height);
  min-width: 70px;
  padding-inline: 10px;
  padding-block: 0;
  border-radius: 5px;
  border-color: #cfd7e3;
  background: #ffffff;
  color: #2f3744;
  box-shadow: none;
  font-size: 12px;
  font-weight: 760;
  line-height: 1;
}

.stats-main-chart .chart-filters .btn.primary {
  background: #ffffff;
  color: #066da8;
  border-color: #38aee6;
}

.stats-main-chart .chart-filters .btn:hover,
.stats-main-chart .chart-filters .stats-filter-toggle:hover,
.stats-main-chart .chart-filters .ui-date-range-trigger:hover {
  border-color: #5ec4f4;
  background: #eef9ff;
  color: #075f95;
  transform: none;
}

.stats-main-chart .chart-filters .btn:active,
.stats-main-chart .chart-filters .stats-filter-toggle:active,
.stats-main-chart .chart-filters .ui-date-range-trigger:active {
  background: #dff3ff;
  transform: none;
}

.chart-body {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 32px 20px 20px;
  flex: 1;
  min-height: 0;
}

.chart-body.is-empty {
  align-items: center;
}

.chart-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.2s;
}

.chart-bar:hover {
  transform: translateY(-2px);
}

.chart-bar-value {
  font-size: 14px;
  font-weight: 800;
  color: #1a2332;
}

.chart-bar-fill {
  width: 100%;
  max-width: 48px;
  background: #e8eef8;
  border-radius: 4px 4px 0 0;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chart-bar:hover .chart-bar-fill {
  box-shadow: 0 -4px 12px rgba(87, 145, 255, 0.3);
}

.chart-bar-inner {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(to top, #5791ff, #7ba6ff);
}

.chart-bar-label {
  font-size: 12px;
  font-weight: 600;
  color: #333;
  text-align: center;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-bar-percent {
  font-size: 11px;
  color: #999;
}

.chart-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 14px;
  text-align: center;
  line-height: 1.6;
}

.chart-empty small {
  color: #bbb;
}

.stats-heatmap {
  --stats-detail-row-height: 43px;
  --stats-detail-header-rows-height: 74px;
  --stats-detail-visible-model-rows: 12;
  --stats-detail-scroll-trim: 1px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: calc(var(--stats-detail-header-rows-height) + (var(--stats-detail-row-height) * var(--stats-detail-visible-model-rows)) - var(--stats-detail-scroll-trim));
}

.heatmap-body {
  flex: 0 1 auto;
  min-height: 0;
  max-height: inherit;
  padding: 0;
}

.heatmap-scroll {
  max-height: inherit;
  overflow: auto;
}

.heatmap-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.heatmap-table th,
.heatmap-table td {
  padding: 6px 10px;
  height: 36px;
  text-align: center;
  border: 1px solid #e8eef8;
}

.heatmap-table thead tr:first-child th {
  position: sticky;
  top: 0;
  z-index: 8;
  overflow: hidden;
  height: 38px;
  border-bottom: 1px solid #d7e2f0;
  background: #eef4fb;
  color: #40536b;
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0;
  line-height: 1.2;
  resize: none;
  text-transform: none;
  box-shadow: inset 0 -1px #d7e2f0;
  text-align: center;
}

.heatmap-table thead th {
  color: #40536b;
  font-weight: 820;
  font-size: 11px;
}

.heatmap-table thead tr:first-child th::after {
  content: "";
  position: absolute;
  top: 9px;
  right: 0;
  width: 1px;
  height: 20px;
  background: #d2deeb;
  pointer-events: none;
  opacity: 0.72;
}

.heatmap-table thead tr:first-child th:hover::after {
  width: 2px;
  background: #8fa9c8;
  opacity: 1;
}

.heatmap-table thead tr:first-child th:last-child::after {
  display: none;
}

.heatmap-table tbody th {
  position: sticky;
  left: 0;
  z-index: 4;
  text-align: left;
  background: #fafbfd;
  font-weight: 600;
  font-size: 12px;
}

.heatmap-corner {
  position: sticky;
  left: 0;
  z-index: 9;
}

.heatmap-table tbody td {
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
}

.heatmap-table tbody td:hover {
  transform: scale(1.1);
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.heat-0 { background: #f8fbff; color: #ccc; }
.heat-1,
.heat-2,
.heat-3 { background: #dce9ff !important; color: #1a3d6e !important; font-weight: 600; }

.heatmap-total,
.heatmap-total-cell {
  background: #eef6ff !important;
  font-weight: 800 !important;
}

.heatmap-summary-row {
  background: #eef6ff !important;
  border-bottom: 1px solid #cfe2ff !important;
}

.heatmap-summary-row th {
  position: sticky;
  top: 36px;
  height: 36px;
  vertical-align: middle;
  z-index: 7;
  background: #eef6ff !important;
  background-clip: padding-box;
  font-weight: 800 !important;
  color: #1d5dd8 !important;
  box-shadow: 0 1px 0 #cfe2ff;
}

.heatmap-summary-row .summary-total {
  background: #dbeafe !important;
  color: #1d4ed8 !important;
}

.matrix-empty {
  padding: 40px;
  text-align: center;
  color: #999;
}

.heatmap-table .cell-value {
  font-size: 13px;
  font-weight: 700;
}

.heatmap-table .cell-percent {
  font-size: 10px;
  opacity: 0.65;
  margin-top: 1px;
}

@media (max-width: 1200px) {
  .chart-body { overflow-x: auto; }
}

@media (max-width: 768px) {
  .chart-body { overflow-x: auto; }
}

/* ─── Pickup customer page ─── */

.pickup-customer-card {
  background: #FFFFFF;
  padding: 0;
  overflow: visible;
}

.pickup-customer-card > h2 {
  display: none;
}

.pickup-lookup-section {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm), 0 4px 12px rgba(0, 0, 0, .03);
  padding: 28px 24px;
  margin-bottom: 0;
}

.pickup-lookup-section .pickup-lookup-heading {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--text);
}

.pickup-lookup-section .pickup-lookup-hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 16px;
}

.pickup-lookup-form {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.pickup-lookup-form .input {
  flex: 1;
  min-width: 0;
}

.pickup-lookup-form .btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.pickup-result-area {
  padding: 24px;
}

.pickup-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}

.pickup-header-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pickup-header-meta .pickup-order-no {
  font-size: 0.82rem;
  color: var(--muted);
}

.pickup-header-meta .pickup-model {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.pickup-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.pickup-status-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.pickup-status-none {
  background: #f1f5f9;
  color: #64748b;
}

.pickup-status-waiting_customer_pickup_info {
  background: #ecfeff;
  color: #0e7490;
}

.pickup-status-pending_cs_confirm {
  background: #fef3c7;
  color: #b45309;
}

.pickup-status-need_customer_info {
  background: #ede9fe;
  color: #7c3aed;
}

.pickup-status-logistics_todo {
  background: #dbeafe;
  color: #1d4ed8;
}

.pickup-status-logistics_waiting {
  background: #e0f2fe;
  color: #0369a1;
}

.pickup-status-need_rebook {
  background: #fce7f3;
  color: #be185d;
}

.pickup-status-completed {
  background: #dcfce7;
  color: #15803d;
}

.pickup-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 12px;
}

.pickup-info-grid {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm), 0 4px 12px rgba(0, 0, 0, .03);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 6px 18px;
}

.pickup-info-grid > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}

.pickup-info-grid > div > span {
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 500;
}

.pickup-info-grid > div > strong {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.pickup-empty-info {
  padding: 16px 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.pickup-timeline {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm), 0 4px 12px rgba(0, 0, 0, .03);
  position: relative;
  padding: 16px 18px 16px 38px;
  margin: 0;
}

.pickup-timeline::before {
  content: '';
  position: absolute;
  left: 23px;
  top: 24px;
  bottom: 24px;
  width: 2px;
  background: var(--line);
  border-radius: 1px;
}

.pickup-timeline .pickup-timeline-item {
  position: relative;
  padding: 8px 0 16px;
}

.pickup-timeline .pickup-timeline-item::before {
  content: '';
  position: absolute;
  left: -19px;
  top: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid white;
  box-shadow: 0 0 0 2px var(--line);
}

.pickup-timeline .pickup-timeline-item:last-child {
  padding-bottom: 0;
}

.pickup-timeline .pickup-timeline-time {
  font-size: 0.74rem;
  color: var(--muted);
  margin-bottom: 2px;
}

.pickup-timeline .pickup-timeline-msg {
  font-size: 0.88rem;
  color: var(--text);
  margin: 0;
  line-height: 1.5;
}

.pickup-divider {
  height: 1px;
  background: var(--line);
  margin: 20px 0;
}

.pickup-submit-section {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm), 0 4px 12px rgba(0, 0, 0, .03);
  padding: 20px 24px;
  margin-top: 20px;
}

.pickup-submit-section .pickup-section-title {
  margin-bottom: 16px;
}

.pickup-submit-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pickup-field-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.pickup-address-mode {
  display: grid;
  gap: 8px;
  padding: 12px;
  margin-bottom: 14px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fff7f7;
}

.pickup-address-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
}

.pickup-address-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
}

.pickup-address-checkbox.is-disabled {
  color: var(--muted);
}

.pickup-address-warning {
  margin: 0;
  color: #b91c1c;
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.45;
}

.pickup-address-summary {
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid #fee2e2;
  border-radius: 8px;
  background: #ffffff;
}

.pickup-address-summary div {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  min-width: 0;
}

.pickup-address-summary span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 650;
}

.pickup-address-summary strong {
  min-width: 0;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.pickup-address-manual-fields {
  display: grid;
  gap: 0;
}

.pickup-submit-form.pickup-uses-shipping .pickup-address-manual-fields {
  display: none;
}

.pickup-appointment-ranges {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(180px, 0.8fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.pickup-appointment-range {
  position: relative;
  min-width: 0;
}

.pickup-range-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
}

.pickup-range-trigger > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pickup-range-trigger > b {
  margin-left: 10px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 700;
}

.pickup-range-trigger[aria-expanded="true"] {
  border-color: var(--teal);
}

.pickup-range-panel {
  position: absolute;
  z-index: 10;
  display: grid;
  gap: 10px;
  width: min(620px, calc(100vw - 48px));
  min-width: 100%;
  margin-top: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.pickup-range-panel[hidden] {
  display: none;
}

.pickup-range-panel > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.pickup-calendar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pickup-calendar-month {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 2px 8px;
}

.pickup-calendar-month + .pickup-calendar-month {
  border-left: 1px solid var(--line);
}

.pickup-calendar-month > strong {
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 650;
  text-align: center;
}

.pickup-calendar-weekdays,
.pickup-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}

.pickup-calendar-weekdays span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 600;
  text-align: center;
}

.pickup-calendar-day,
.pickup-time-slot {
  border: 0;
  border-radius: 4px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.pickup-calendar-day {
  min-height: 28px;
  font-size: 0.74rem;
}

.pickup-calendar-day:hover,
.pickup-time-slot:hover {
  background: #edf7fb;
}

.pickup-calendar-day.disabled {
  color: #c4ced8;
  cursor: default;
}

.pickup-calendar-day.range-start,
.pickup-calendar-day.range-end,
.pickup-time-slot.range-start,
.pickup-time-slot.range-end {
  color: #075f95;
  background: #cfeffc;
  font-weight: 700;
}

.pickup-calendar-day.in-range,
.pickup-time-slot.in-range {
  background: #eef9fe;
}

.pickup-time-slots {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 3px;
}

.pickup-time-range-panel {
  right: 0;
  left: auto;
  width: min(390px, calc(100vw - 48px));
}

.pickup-time-slot {
  min-height: 30px;
  font-size: 0.72rem;
}

.pickup-field-group.single-col {
  grid-template-columns: 1fr;
}

.pickup-field-group .input,
.pickup-field-group .textarea {
  width: 100%;
}

.pickup-field-group-label {
  grid-column: 1 / -1;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 2px;
}

.pickup-photo-field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.pickup-photo-hint {
  margin: -3px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.pickup-photo-picker {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  min-height: 48px;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.pickup-photo-native-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  clip-path: inset(50%);
}

.pickup-photo-choose-button {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  height: 46px;
  padding: 2px 18px 0;
  border-right: 1px solid var(--line);
  background: #f8fafc;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.pickup-photo-native-input:focus-visible + .pickup-photo-choose-button {
  outline: 2px solid var(--teal);
  outline-offset: -3px;
}

.pickup-photo-selection-status {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  height: 46px;
  min-width: 0;
  padding: 2px 16px 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pickup-photo-field .pickup-photo-preview-list {
  grid-template-columns: repeat(auto-fill, minmax(76px, 96px));
}

html.pickup-submission-confirmation-open {
  overflow: hidden;
}

.pickup-submission-confirmation-layer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(240, 244, 250, 0.4);
  -webkit-backdrop-filter: blur(34px) saturate(1.24);
  backdrop-filter: blur(34px) saturate(1.24);
}

.pickup-submission-confirmation-card {
  width: min(460px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  padding: 30px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 48px rgba(34, 55, 88, 0.18);
  color: var(--ink);
  text-align: center;
}

.pickup-submission-confirmation-card h2 {
  margin: 0;
  font-size: 1.35rem;
}

.pickup-submission-confirmation-card p {
  margin: 12px 0 22px;
  color: var(--muted);
  line-height: 1.6;
}

.pickup-submission-confirmation-card .btn {
  min-width: 112px;
}

.pickup-submit-form .btn.teal {
  margin-top: 8px;
  align-self: flex-start;
  padding: 0 28px;
}

.pickup-completed-readonly .pickup-result-area {
  opacity: 0.85;
}

.pickup-completed-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #dcfce7;
  border-radius: 10px;
  margin-bottom: 20px;
}

.pickup-completed-badge .pickup-completed-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #22c55e;
  color: white;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  font-weight: 700;
  flex-shrink: 0;
}

.pickup-completed-badge span {
  font-size: 0.88rem;
  color: #15803d;
  font-weight: 500;
}

.pickup-readonly-note {
  font-size: 0.84rem;
  color: var(--muted);
  padding: 10px 0 0;
  font-style: italic;
}

.pickup-empty-state {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm), 0 4px 12px rgba(0, 0, 0, .03);
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}

.pickup-empty-state .pickup-empty-icon {
  font-size: 2.4rem;
  margin-bottom: 10px;
  opacity: 0.5;
}

.pickup-empty-state p {
  font-size: 0.92rem;
  margin: 0;
}

@media (max-width: 740px) {
  .pickup-lookup-section {
    padding: 20px 16px;
  }

  .pickup-lookup-form {
    flex-direction: column;
  }

  .pickup-result-area {
    padding: 18px 16px;
  }

  .pickup-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .pickup-info-grid {
    grid-template-columns: 1fr;
    padding: 6px 14px;
  }

  .pickup-timeline {
    padding: 14px 14px 14px 34px;
  }

  .pickup-timeline::before {
    left: 20px;
  }

  .pickup-field-group {
    grid-template-columns: 1fr;
  }

  .pickup-address-summary div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .pickup-appointment-ranges {
    grid-template-columns: 1fr;
  }

  .pickup-range-panel {
    position: static;
    width: 100%;
    max-width: none;
  }

  .pickup-calendar {
    grid-template-columns: 1fr;
  }

  .pickup-calendar-month + .pickup-calendar-month {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .pickup-submit-section {
    padding: 16px;
  }

  .pickup-submit-form .btn.teal {
    align-self: stretch;
  }
}

/* ===== Pickup L2 hierarchy — hero / steps / subgroups (content layer only) ===== */
.pickup-lookup-slim {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  padding: 12px 16px;
  margin-bottom: 16px;
}
.pickup-lookup-slim > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  font-size: 0.84rem;
  color: var(--muted);
}
.pickup-lookup-slim > summary::-webkit-details-marker { display: none; }
.pickup-lookup-toggle {
  margin-left: auto;
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
}
.pickup-lookup-slim-body { margin-top: 12px; }

.pickup-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: linear-gradient(120deg, #eff6ff 0%, #f0f9ff 55%, #ffffff 100%);
  padding: 18px 22px;
  margin-bottom: 16px;
}
.pickup-hero::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary);
  border-radius: 0 2px 2px 0;
}
.pickup-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.pickup-hero-meta { display: flex; flex-direction: column; gap: 2px; }
.pickup-hero-meta .pickup-order-no { font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.pickup-hero-meta .pickup-model { font-size: 1.28rem; font-weight: 780; letter-spacing: -0.02em; color: var(--text); }

.pickup-steps { display: flex; align-items: center; margin-top: 16px; }
.pickup-step { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; min-width: 0; }
.pickup-step-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 800;
  background: #fff;
  border: 2px solid var(--line-strong);
  color: var(--muted);
}
.pickup-step.is-done .pickup-step-dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.pickup-step.is-current .pickup-step-dot {
  background: #fff;
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 82, 255, 0.13);
}
.pickup-step-label { font-size: 0.74rem; font-weight: 650; color: var(--muted); white-space: nowrap; }
.pickup-step.is-current .pickup-step-label { color: var(--primary); font-weight: 750; }
.pickup-step-line { flex: 1 1 auto; height: 2px; min-width: 16px; background: var(--line-strong); border-radius: 2px; margin: 0 8px; }
.pickup-step-line.is-done { background: var(--primary); }

.pickup-steps-mobile { display: none; margin-top: 14px; }
.pickup-steps-track { height: 6px; border-radius: 6px; background: var(--line-strong); overflow: hidden; }
.pickup-steps-track > i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--primary), var(--teal)); }
.pickup-steps-caption { margin-top: 7px; font-size: 0.8rem; font-weight: 700; color: var(--primary); }

.pickup-hero-cta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  padding: 10px 13px;
  border: 1px dashed #bfdbfe;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.86rem;
  color: var(--text);
  line-height: 1.45;
}
.pickup-hero-cta-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex-shrink: 0; box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.16); }

.pickup-sec-head { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; }
.pickup-sec-head h3 { margin: 0; font-size: 0.98rem; font-weight: 730; letter-spacing: -0.01em; color: var(--text); }
.pickup-sec-bar { width: 4px; height: 15px; border-radius: 3px; background: var(--primary); }
.pickup-sec-bar.is-muted { background: var(--line-strong); }

/* primary action card */
.pickup-submit-section {
  border-color: #c7d2fe;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 10px 26px rgba(0, 82, 255, 0.07);
}
.pickup-submit-section .pickup-sec-head { margin-bottom: 16px; }

/* labeled sub-groups + fields */
.pickup-sub-label { font-size: 0.82rem; font-weight: 700; color: var(--text); margin: 0 0 3px; display: flex; align-items: center; gap: 5px; }
.pickup-sub-hint { font-size: 0.76rem; color: var(--muted); margin: 0 0 10px; line-height: 1.45; }
.pickup-subgroup .pickup-field-group { margin-bottom: 0; }
.pickup-contact-schedule { grid-template-columns: 1fr; }
.pickup-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pickup-field-lbl { font-size: 0.72rem; font-weight: 650; color: var(--muted); }
.pickup-field .input { width: 100%; }
.pickup-field-appointment { min-width: 0; }
.pickup-submit-btn { margin-top: 4px; }

/* clearer resting + hover borders for pickup inputs (scoped, focus stays global) */
.pickup-field .input,
.pickup-submit-form .textarea,
.pickup-contact-schedule .pickup-range-trigger {
  border-color: var(--line-strong);
}
.pickup-field .input:hover,
.pickup-submit-form .textarea:hover,
.pickup-contact-schedule .pickup-range-trigger:hover {
  border-color: #94A3B8;
}

/* timeline demoted to a secondary card */
.pickup-timeline-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
  margin-top: 16px;
}
.pickup-timeline-card .pickup-timeline {
  border: 0;
  box-shadow: none;
  border-radius: 0;
  padding: 0 0 0 22px;
}
.pickup-timeline-card .pickup-timeline::before { left: 5px; top: 6px; bottom: 6px; }

@media (max-width: 740px) {
  .pickup-steps { display: none; }
  .pickup-steps-mobile { display: block; }
  .pickup-hero { padding: 16px; }
  .pickup-hero-meta .pickup-model { font-size: 1.12rem; }
  .pickup-contact-schedule { grid-template-columns: 1fr; }
  .pickup-timeline-card { padding: 16px; }
}
