: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:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 82, 255, 0.08), transparent),
    linear-gradient(180deg, #E8EDF5 0%, #DDE4EF 100%);
  -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-page {
  width: min(1340px, calc(100vw - 48px));
  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.18;
  color: var(--primary);
}

.page-decor--headset {
  top: 8%;
  left: 4%;
  width: 280px;
  height: 280px;
  animation: decorFloat 8s ease-in-out infinite;
}

.page-decor--shield {
  bottom: 12%;
  right: 5%;
  width: 240px;
  height: 240px;
  animation: decorFloat 10s ease-in-out infinite 2s;
}

.page-decor--chat {
  top: 55%;
  left: 3%;
  width: 200px;
  height: 200px;
  animation: decorFloat 9s ease-in-out infinite 1s;
}

.page-decor--gear {
  top: 15%;
  right: 6%;
  width: 220px;
  height: 220px;
  animation: decorSpin 20s linear infinite;
}

.page-decor--check {
  bottom: 8%;
  left: 8%;
  width: 180px;
  height: 180px;
  animation: decorFloat 11s ease-in-out infinite 3s;
}

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

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

.customer-content,
.success-content {
  position: relative;
  padding: 48px 52px 36px;
  background: rgba(255, 255, 255, 0.97);
  border: 0;
  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);
  backdrop-filter: blur(20px) saturate(1.3);
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

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

.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: 72px;
  height: 72px;
  border-radius: 18px;
  font-size: 38px;
  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: 32px;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

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

.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: 0 1px 2px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

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

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



.country-chevron {
  color: var(--muted);
}

.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: 0 8px 18px rgba(37, 78, 139, 0.06);
}

.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: 14px;
}

.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: 16px;
  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);
}

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

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

.country-combo-toggle {
  position: absolute;
  top: 5px;
  right: 6px;
  width: 36px;
  height: 34px;
  min-height: 34px;
  border: 0;
  border-left: 0;
  border-radius: 7px;
  background: #f7fbff;
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
}

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

.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;
}

.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;
}

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

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

.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: stretch;
}

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

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

.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: 12px;
  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: 44px;
  padding: 0 13px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input,
.textarea {
  cursor: text;
}

.select {
  cursor: pointer;
}

.textarea {
  min-height: 92px;
  padding: 12px 13px;
  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;
}

.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: 46px;
  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;
  gap: 10px;
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  padding: 6px;
  border: 1px solid #e7d9c8;
  border-radius: 8px;
  background: linear-gradient(135deg, #fffaf3, #f8fbff);
}

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

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

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

.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: 0 0 0 2px rgba(0, 82, 255, 0.08);
}

.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);
}

.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 {
  min-height: 50px;
  border-color: #e3bd85;
  color: #7a4c18;
  background: #fffdf9;
}

.order-screenshot-panel .upload-zone-copy {
  padding: 3px 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-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.evidence-head p,
.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: 44px;
  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;
  padding: 4px;
  border: 1px solid #e3ebf8;
  border-radius: 8px;
  background: #fff;
  display: grid;
  gap: 3px;
}

.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 {
  color: var(--text);
  font-size: 10px;
  font-weight: 720;
}

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

.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;
}

.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-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: 12px;
}

.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: 14px;
  color: var(--text);
  font-size: 13px;
  font-weight: 760;
}

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

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

.phone-email-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 20px;
  align-items: start;
}

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

.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;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

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

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

.btn.primary:hover {
  box-shadow: var(--shadow-accent-lg);
}

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

.btn.teal:hover {
  box-shadow: var(--shadow-accent-lg);
}

.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: var(--shadow-sm);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.ui-toolbar-chip:hover:not(:disabled) {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.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;
}

.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;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  font-weight: 850;
}

.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: 18px;
  flex: 0 0 18px;
}

.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;
  box-shadow: none;
}

.sidebar-top-collapse:hover {
  background: #edf4ff;
  color: var(--text);
}

.collapse-line {
  display: block;
  width: 15px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

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

.collapse-line:nth-child(2) {
  width: 12px;
}

.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;
  min-width: 0;
}

.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,
.admin-theme-dark .sidebar-top-collapse:hover {
  background: #223351;
}

.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-inline-meta,
.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 .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 .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-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: 0;
}

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

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

.case-list-card .table-wrap > .data-table {
  flex: 1 0 auto;
  min-height: 100%;
}

.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(230px, 1.06fr) repeat(4, minmax(104px, 0.68fr)) minmax(0, 0.32fr) repeat(3, minmax(76px, auto));
}

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

.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;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.ui-date-range-trigger:hover {
  border-color: #bfd4fb;
}

.ui-date-range-trigger.open,
.ui-date-range-trigger:focus-visible {
  border-color: #2b79ff;
  box-shadow: 0 0 0 3px rgba(43, 121, 255, 0.14);
  outline: none;
}

.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: 0 0 0 5px rgba(35, 105, 232, 0.11);
}

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

@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: 1602px;
  table-layout: fixed;
}

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

.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: 118px; }
.admin-cases-table th:nth-child(3) { width: 46px; }
.admin-cases-table th:nth-child(4) { width: 88px; }
.admin-cases-table th:nth-child(5) { width: 172px; }
.admin-cases-table th:nth-child(6) { width: 176px; }
.admin-cases-table th:nth-child(7) { width: 96px; }
.admin-cases-table th:nth-child(8) { width: 320px; }
.admin-cases-table th:nth-child(9) { width: 108px; }
.admin-cases-table th:nth-child(10) { width: 50px; }
.admin-cases-table th:nth-child(11) { width: 132px; }

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

.admin-cases-table .case-status-cell {
  text-align: center;
}

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

.case-status-select-wrap.is-open {
  width: max-content;
  min-width: 88px;
}

.case-status-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

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

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

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

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

.case-status-select {
  width: 64px;
  max-width: 64px;
  min-height: 28px;
  border: 1px solid #d9e4f2;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font-size: 12px;
  font-weight: 760;
  padding: 2px 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;
}

.case-action-group {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: center;
  align-items: center;
  min-width: 112px;
}

.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: min(980px, calc(100vw - 48px));
  max-height: min(860px, calc(100vh - 64px));
}

.admin-modal-case-media .admin-modal-body {
  max-height: calc(100vh - 140px);
  overflow: auto;
}

.case-media-stack {
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
}

.admin-cases-table .icon-count,
.admin-cases-table td:nth-child(10) {
  text-align: center;
}

.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-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;
}

.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;
}

.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 {
  min-height: 18px;
  padding-top: 0;
  font-size: 12px;
  line-height: 1;
}

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

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

.customers-table-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;
}

.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;
}

.media-count-button:hover,
.media-count-button:focus-visible {
  background: #edf5ff;
  outline: 1px solid #b9d5ff;
}

.media-count-button.empty {
  color: #4f6380;
}

.login-page {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(480px, 1fr);
  align-items: start;
  min-height: auto;
  background:
    linear-gradient(135deg, rgba(255, 250, 243, 0.98), rgba(255, 255, 255, 0.94)),
    radial-gradient(circle at 8% 8%, rgba(255, 228, 194, 0.38), transparent 18rem);
}

.login-copy {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 48px 42px;
  background: transparent;
  border-right: 1px solid #eadfce;
  position: relative;
}

.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;
}

.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);
}

.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: grid;
  gap: 10px;
}

.case-reply-composer .admin-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.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 {
  min-height: 260px;
  resize: vertical;
}

.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(4, 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;
}

.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;
}

.customers-table-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.customers-table-card .table-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.customers-table-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: 180px;
}

.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,
.knowledge-grid > .admin-card,
.template-grid > .admin-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.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;
}

.card-collapse-btn:hover {
  border-color: #b8cdf4;
  background: #eef6ff;
}

.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 {
  width: min(760px, 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-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;
}

.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;
}

.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-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.admin-media-preview {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 180px;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  background: #f8fbff;
  padding: 16px;
  color: var(--text);
  text-decoration: none;
}

.admin-media-frame {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 360px;
  max-height: calc(100vh - 240px);
  overflow: auto;
  border: 1px dashed #a9c2e7;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(235, 244, 255, 0.94)),
    repeating-linear-gradient(0deg, rgba(40, 91, 170, 0.08) 0 1px, transparent 1px 14px);
}

.admin-media-frame-image {
  padding: 16px;
}

.admin-media-frame-video {
  padding: 12px;
  background: #0c1f3d;
}

.admin-screenshot-preview {
  display: grid;
  place-items: center;
  min-height: 120px;
  border: 1px dashed #a9c2e7;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(235, 244, 255, 0.94)),
    repeating-linear-gradient(0deg, rgba(40, 91, 170, 0.08) 0 1px, transparent 1px 14px);
  color: #2f65b8;
  font-size: 42px;
}

.admin-media-video {
  width: 100%;
  min-height: 150px;
  border-radius: 8px;
  background: #0c1f3d;
}

.admin-media-actions,
.admin-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.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-title-row {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  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-inline-meta {
  justify-self: end;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.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: 12px;
  margin-top: 12px;
  align-items: start;
}

.lingxing-inner-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: auto;
}

.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;
  grid-column: 1 / -1;
  justify-content: stretch;
  min-height: 24px;
  margin-top: 0;
  gap: 12px;
}

.lingxing-action-row .lingxing-enable-row {
  justify-self: start;
  min-width: 190px;
  min-height: 24px;
}

.lingxing-action-row .btn {
  min-height: 30px;
  padding-block: 0;
}

.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: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
}

.lingxing-credential-grid .settings-row {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.lingxing-credential-card {
  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;
}

.lingxing-return-filter-card,
.lingxing-return-overview-card,
.return-reason-card {
  overflow: visible;
}

.case-filter-card .filter-grid {
  grid-template-columns: minmax(230px, 1.06fr) repeat(4, minmax(104px, 0.68fr)) minmax(0, 0.32fr) repeat(3, minmax(76px, auto));
  gap: 12px;
}

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

.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-card .table-wrap {
  max-height: 62vh;
  overflow: auto;
}

.return-analysis-table-card {
  display: flex;
  flex-direction: column;
}

.stats-matrix-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.stats-matrix-card .table-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.stats-matrix-card .table-wrap > .data-table {
  flex: 1 0 auto;
  min-height: 100%;
}

.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: 4px;
  max-width: 360px;
  line-height: 1.45;
}

.return-application-content span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: #33445a;
}

.return-category-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 220px;
}

.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));
  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(1120px, calc(100vw - 48px));
  max-height: min(860px, calc(100vh - 36px));
  border-radius: 28px;
}

.admin-user-modal-head {
  align-items: center;
  padding: 28px 38px;
}

.admin-user-modal-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.admin-user-modal-head h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #1f2d44;
  font-size: 28px;
  font-weight: 900;
}

.admin-modal-x {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: #a4a9b1;
  cursor: pointer;
  font-size: 42px;
  line-height: 1;
}

.admin-user-management-body {
  display: grid;
  gap: 28px;
  padding: 34px 38px 24px;
}

.admin-user-create-panel {
  display: grid;
  gap: 22px;
  padding: 26px 34px 28px;
  border: 1px solid #e4e8ee;
  border-radius: 12px;
  background: #fdfdfd;
}

.admin-user-create-panel h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #1f2d44;
  font-size: 22px;
  font-weight: 900;
}

.admin-user-inline-form,
.admin-user-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 140px;
  align-items: center;
  gap: 18px;
}

.admin-user-inline-form label,
.admin-user-toolbar label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #8a8a8a;
  font-size: 17px;
  font-weight: 800;
}

.admin-user-inline-form .btn,
.admin-user-toolbar .btn {
  align-self: end;
  min-height: 58px;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
}

.admin-user-table-wrap {
  overflow: auto;
  border: 1px solid #e4e8ee;
  border-radius: 12px;
  background: #ffffff;
}

.admin-user-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.admin-user-table.data-table {
  min-width: 760px;
}

.admin-user-table th,
.admin-user-table td {
  padding: 20px 28px;
  border-bottom: 1px solid #edf0f4;
  text-align: left;
  vertical-align: middle;
}

.admin-user-table th {
  background: #fafafa;
  color: #8a8a8a;
  font-size: 18px;
  font-weight: 850;
}

.admin-user-table td:first-child {
  display: grid;
  gap: 4px;
}

.admin-user-table td:first-child span,
.admin-user-lock {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.admin-user-table tr:last-child td {
  border-bottom: 0;
}

.admin-user-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.admin-user-avatar {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #d8e6ff;
  color: #1f2d44;
  font-size: 20px;
  font-weight: 900;
}

.admin-user-table-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
}

.system-reserved {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 16px;
  border-radius: 8px;
  background: #f3f4f6;
  color: var(--muted);
  font-size: 16px;
  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: 54px;
  justify-content: center;
  font-size: 18px;
  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;
}

.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;
}

.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);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  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: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.is-customer-route .toast {
  left: 50%;
  right: auto;
  bottom: auto;
  top: 50%;
  width: min(460px, calc(100vw - 32px));
  transform: translate(-50%, -50%) scale(0.96);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.is-customer-route .toast.show {
  transform: translate(-50%, -50%) scale(1);
}

.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: 900px) {
  .login-page {
    grid-template-columns: 1fr;
  }

  .login-copy {
    border-right: 0;
    border-bottom: 1px solid #eadfce;
  }
}

@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) {
  .evidence-photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(76px, 92px));
  }
}

@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-page {
    width: calc(100vw - 16px);
    margin: 8px auto;
  }

  .customer-page {
    overflow: visible;
  }

  .customer-content {
    overflow: visible;
  }

  .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-head {
    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;
  }

  .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 {
    grid-template-columns: 1fr;
  }

  .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;
  }

  .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-height: 48px;
    border-radius: 10px;
  }

  .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 {
    display: none;
  }
}

@media (max-width: 740px) {
  .app-shell {
    overflow: visible;
  }
}
