:root {
  --background: #f7f8fc;
  --surface: #ffffff;
  --surface-soft: #eef2ff;
  --surface-muted: #f2f5fb;
  --line: #d8dde8;
  --line-strong: #b9c1d0;
  --text: #111827;
  --muted: #5f6978;
  --primary: #061427;
  --primary-2: #0a2540;
  --accent: #4648d4;
  --accent-soft: #e1e5ff;
  --success: #089b45;
  --warning: #b77900;
  --danger: #c81e1e;
  --info: #1769e0;
  --shadow: 0 16px 38px rgba(15, 23, 42, 0.1);
  --radius: 8px;
  --sidebar: 260px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

.material-symbols-outlined {
  font-size: 22px;
  line-height: 1;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  background: #061427;
  color: #fff;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 10;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 28px 24px 20px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #4648d4;
  font-weight: 900;
}

.brand h1 {
  margin: 0;
  font-size: 20px;
  line-height: 28px;
}

.brand p,
.user-card span {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.62);
}

.nav {
  flex: 1;
  padding: 8px;
}

.nav button {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border: 0;
  border-left: 4px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.68);
  font-weight: 700;
  text-align: left;
}

.nav button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav button.active {
  color: #fff;
  background: #575bea;
  border-left-color: #c8ceff;
}

.user-card {
  margin: 16px;
  padding: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
}

.avatar,
.initials {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: #dfe6ff;
  color: #0a2540;
  font-weight: 900;
  flex: 0 0 auto;
}

.shell {
  margin-left: var(--sidebar);
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.topbar-left,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.system-title {
  color: var(--primary);
  font-size: 22px;
  white-space: nowrap;
}

.search-box {
  width: min(440px, 42vw);
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: var(--surface-muted);
  border-radius: 6px;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.team-status {
  height: 32px;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--primary-2);
}

.team-status span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #12b76a;
}

.icon-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
}

.icon-button:hover {
  background: var(--surface-muted);
  color: var(--primary);
}

.segmented {
  display: flex;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.segmented button {
  min-width: 38px;
  height: 28px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.segmented button.active {
  background: var(--primary);
  color: #fff;
}

.content {
  padding: 28px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 22px;
}

.page-head h2 {
  margin: 0;
  color: var(--primary);
  font-size: 32px;
  line-height: 40px;
  font-weight: 900;
}

.page-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

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

.button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--primary);
  font-weight: 800;
}

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

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

.button.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--accent);
}

.grid {
  display: grid;
  gap: 16px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.two-col {
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
}

.card,
.table-wrap,
.filter-bar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.card {
  padding: 20px;
}

.stat-card {
  min-height: 74px;
  padding: 12px 14px;
  display: grid;
  align-content: center;
  gap: 2px;
}

.stat-card .label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
  line-height: 16px;
}

.stat-value {
  margin-top: 0;
  color: var(--primary);
  font-size: 22px;
  line-height: 28px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.trend {
  margin-top: 0;
  font-size: 12px;
  line-height: 16px;
  color: var(--success);
  font-weight: 700;
}

.stat-card .trend {
  display: none;
}

.trend.warn {
  color: var(--danger);
}

.filter-bar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  margin-bottom: 18px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.select,
.input,
.textarea {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 4px;
  color: var(--text);
  outline: 0;
}

.select,
.input {
  height: 40px;
  padding: 0 12px;
}

.textarea {
  min-height: 112px;
  padding: 12px;
  resize: vertical;
}

.multi-select {
  height: auto;
  min-height: 150px;
  padding: 8px;
}

.select:focus,
.input:focus,
.textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(70, 72, 212, 0.16);
}

.table-wrap {
  overflow: hidden;
}

.customer-table table {
  min-width: 980px;
}

.customer-table th,
.customer-table td {
  white-space: nowrap;
}

.customer-table th:first-child,
.customer-table td:first-child {
  min-width: 220px;
  white-space: normal;
}

.customer-table th:nth-child(7),
.customer-table td:nth-child(7) {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-table td:last-child .button {
  min-width: 82px;
  white-space: nowrap;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

th {
  background: #edf1fb;
  color: #263143;
  font-size: 12px;
  font-weight: 900;
}

tr:hover td {
  background: #fafbff;
}

.name-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.name-cell strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
}

.name-cell span,
.muted {
  color: var(--muted);
}

.money,
.mono {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: var(--surface-muted);
  color: var(--primary);
  white-space: nowrap;
}

.tag.success {
  background: #dff8e9;
  color: #067a39;
}

.tag.warning {
  background: #fff1c7;
  color: #9a6500;
}

.tag.danger {
  background: #ffe1e1;
  color: #b42318;
}

.tag.info {
  background: #dce9ff;
  color: #064fb0;
}

.section-title {
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-size: 18px;
}

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

.section-title-row .section-title {
  margin: 0;
}

.activity-list,
.side-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.activity {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.activity:last-child,
.side-row:last-child {
  border-bottom: 0;
}

.activity-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--primary);
  color: #fff;
}

.activity strong,
.side-row strong {
  display: block;
  margin-bottom: 4px;
}

.activity p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.side-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.side-row > div:first-child {
  min-width: 0;
}

.detail-hero {
  padding: 0 0 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.breadcrumb {
  color: var(--muted);
  margin-bottom: 12px;
}

.hero-line {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-line h2 {
  margin: 0;
  font-size: 30px;
  line-height: 38px;
  color: var(--primary);
}

.chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.chips.compact {
  gap: 6px;
  margin: 6px 0 4px;
}

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

.section-head .section-title {
  margin-bottom: 0;
}

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

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

.role-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.role-card strong,
.role-card .muted {
  display: block;
}

.compact-card {
  padding: 14px;
}

.compact-card strong,
.compact-card span {
  display: block;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}

.contact-card {
  padding: 18px;
  border-right: 1px solid var(--line);
}

.contact-card:last-child {
  border-right: 0;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(15, 23, 42, 0.32);
  z-index: 20;
}

.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(520px, 100vw);
  transform: translateX(100%);
  transition: transform 180ms ease;
  background: var(--surface);
  box-shadow: var(--shadow);
  z-index: 21;
  overflow-y: auto;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-backdrop.open {
  display: block;
}

.drawer-head {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  z-index: 2;
}

.drawer-body {
  padding: 20px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-row {
  display: grid;
  gap: 6px;
}

.form-row label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.checkbox-row {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 800;
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
  align-items: start;
}

.map-dashboard {
  margin-top: 6px;
}

.map-card {
  padding: 0;
  overflow: hidden;
}

.map-card-primary {
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8fc 100%);
}

.map-loading {
  min-height: 320px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.map-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}

.map-toolbar strong,
.map-toolbar span {
  display: block;
}

.map-toolbar strong {
  color: var(--primary);
  font-size: 16px;
  line-height: 22px;
}

.map-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.map-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.map-legend span {
  width: 64px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e4f0ff, #6fa7f2, #1769e0);
}

.world-map-scroll {
  position: relative;
  aspect-ratio: 980 / 520;
  min-height: 360px;
  max-height: 520px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 78% 24%, rgba(255, 255, 255, 0.7), transparent 30%),
    linear-gradient(180deg, #e9f5ff 0%, #d8ebff 100%);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.world-map-scroll.is-dragging {
  cursor: grabbing;
}

.world-map-canvas {
  height: 100%;
  width: 100%;
  min-width: 0;
  transform-origin: 0 0;
  will-change: transform;
  transition: transform 90ms ease-out;
  backface-visibility: hidden;
}

.world-map-scroll.is-dragging .world-map-canvas {
  transition: none;
}

.world-map {
  height: 100%;
  width: 100%;
  display: block;
}

.map-ocean {
  fill: transparent;
}

.country-shape {
  fill: rgba(255, 255, 255, 0.74);
  stroke: rgba(113, 139, 166, 0.5);
  stroke-width: 0.58;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  transition: fill 120ms ease, stroke 120ms ease;
}

.country-shape.has-customers {
  fill: var(--country-fill);
  stroke: rgba(255, 255, 255, 0.92);
}

.country-shape:hover {
  fill: #2758cf;
  stroke: #061427;
}

.map-callout {
  pointer-events: none;
  opacity: 0.96;
  filter: drop-shadow(0 4px 8px rgba(15, 23, 42, 0.18));
}

.map-callout.map-fallback-marker {
  cursor: pointer;
  pointer-events: auto;
}

.map-callout line {
  stroke: rgba(6, 20, 39, 0.32);
  stroke-width: 0.8;
  vector-effect: non-scaling-stroke;
}

.map-callout-dot {
  fill: #061427;
  stroke: #ffffff;
  stroke-width: 1.4;
}

.map-callout-label-bg {
  fill: rgba(255, 255, 255, 0.9);
  stroke: rgba(6, 20, 39, 0.14);
  stroke-width: 0.65;
}

.map-callout-label {
  fill: #061427;
  font-size: 8.8px;
  font-weight: 900;
  text-anchor: middle;
  dominant-baseline: middle;
  font-variant-numeric: tabular-nums;
}

.map-insight-panel {
  padding: 14px;
  max-height: clamp(520px, 70vh, 720px);
  overflow: auto;
}

.map-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.map-metric {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.map-metric .material-symbols-outlined {
  color: var(--accent);
  font-size: 19px;
}

.map-metric strong,
.map-metric span:not(.material-symbols-outlined) {
  display: block;
}

.map-metric strong {
  color: var(--primary);
  font-size: 17px;
  line-height: 20px;
}

.map-metric span:not(.material-symbols-outlined) {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 15px;
}

.country-rank-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.country-rank-row:hover {
  background: var(--surface-muted);
  color: var(--accent);
}

.country-rank-row strong,
.country-rank-row .muted {
  display: block;
}

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

.note-summary div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
}

.note-summary strong,
.note-summary span {
  display: block;
}

.country-note-textarea {
  min-height: 220px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: none;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow);
  z-index: 30;
}

.toast.show {
  display: block;
}

.empty {
  padding: 34px;
  text-align: center;
  color: var(--muted);
}

.login-panel {
  min-height: calc(100vh - 120px);
  display: grid;
  place-items: center;
}

.login-card {
  width: min(440px, 100%);
  padding: 28px;
}

.login-card h2 {
  margin: 18px 0 6px;
  color: var(--primary);
  font-size: 28px;
}

.form-error {
  margin: 16px 0;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 6px;
  background: #fff1f2;
  color: var(--danger);
  font-weight: 700;
}

@media (max-width: 980px) {
  :root {
    --sidebar: 76px;
  }

  .brand div:not(.brand-mark),
  .nav span.label,
  .user-card div {
    display: none;
  }

  .brand {
    justify-content: center;
    padding-inline: 12px;
  }

  .user-card {
    justify-content: center;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .map-layout {
    grid-template-columns: 1fr;
  }

  .map-insight-panel {
    max-height: none;
  }

  .map-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .map-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .role-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar {
    align-items: stretch;
    height: auto;
    padding: 12px 16px;
    flex-direction: column;
  }

  .topbar-left,
  .topbar-actions,
  .page-head {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
  }

  .search-box {
    width: 100%;
  }

  .content {
    padding: 18px;
  }

  .table-wrap {
    overflow-x: auto;
  }

  table {
    min-width: 780px;
  }
}

@media (max-width: 700px) {
  :root {
    --sidebar: 0px;
  }

  body {
    padding-bottom: 72px;
    overflow-x: hidden;
  }

  .sidebar {
    inset: auto 0 0 0;
    width: 100%;
    height: 66px;
    display: flex;
    flex-direction: row;
    border-right: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .brand,
  .user-card {
    display: none;
  }

  .nav {
    display: flex;
    gap: 4px;
    padding: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }

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

  .nav button {
    width: 58px;
    min-width: 58px;
    height: 52px;
    flex: 0 0 auto;
    justify-content: center;
    padding: 0;
    border-left: 0;
    border-bottom: 3px solid transparent;
    border-radius: 6px;
  }

  .nav button.active {
    border-left-color: transparent;
    border-bottom-color: #c8ceff;
  }

  .shell {
    margin-left: 0;
    min-height: calc(100vh - 66px);
  }

  .topbar {
    gap: 10px;
    padding: 10px 12px;
  }

  .topbar-left,
  .topbar-actions {
    gap: 10px;
  }

  .topbar-actions {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .system-title {
    font-size: 20px;
    line-height: 28px;
  }

  .team-status {
    height: 30px;
    padding: 0 10px;
  }

  .icon-button {
    width: 34px;
    height: 34px;
  }

  .segmented button {
    min-width: 34px;
  }

  .content {
    padding: 12px;
  }

  .page-head {
    gap: 12px;
    margin-bottom: 14px;
  }

  .page-head p {
    display: none;
  }

  .actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .button {
    min-height: 40px;
    padding: 0 10px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
  }

  .stat-card {
    min-height: 68px;
    padding: 10px;
  }

  .stat-card .label {
    gap: 8px;
  }

  .stat-card .label .material-symbols-outlined {
    font-size: 19px;
  }

  .stat-value {
    font-size: 20px;
    line-height: 26px;
  }

  .filter-bar {
    min-height: 0;
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    margin-bottom: 12px;
  }

  .filter-group {
    gap: 8px;
  }

  .filter-group .select {
    flex: 1 1 160px;
  }

  .filter-bar .button {
    width: 100%;
  }

  .card {
    padding: 14px;
  }

  .map-card {
    padding: 0;
  }

  .world-map-scroll {
    height: 360px;
  }

  .activity {
    grid-template-columns: 36px 1fr;
  }

  .activity .muted {
    grid-column: 2;
  }

  .side-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .customer-table {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .customer-table table,
  .customer-table tbody,
  .customer-table tr,
  .customer-table td {
    display: block;
    width: 100%;
  }

  .customer-table table {
    min-width: 0;
    border-collapse: separate;
  }

  .customer-table thead {
    display: none;
  }

  .customer-table tr {
    margin-bottom: 8px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
  }

  .customer-table td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 0;
    border-bottom: 0;
    text-align: right;
  }

  .customer-table td::before {
    content: attr(data-label);
    flex: 0 0 70px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-align: left;
  }

  .customer-table td:first-child {
    display: block;
    padding-top: 0;
    text-align: left;
  }

  .customer-table td:first-child::before,
  .customer-table td:last-child::before,
  .customer-table .empty::before {
    content: none;
  }

  .customer-table td[data-label][data-empty="true"] {
    display: none;
  }

  .customer-table .name-cell strong {
    font-size: 15px;
    line-height: 21px;
  }

  .customer-table td:last-child {
    padding-top: 8px;
    padding-bottom: 0;
  }

  .customer-table td:last-child .button {
    width: 100%;
    min-height: 36px;
  }

  .customer-table .tag {
    justify-content: center;
    text-align: center;
  }

  .customer-table .empty {
    display: block;
    padding: 24px 12px;
    text-align: center;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-card {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .page-head h2 {
    font-size: 25px;
    line-height: 32px;
  }

  .hero-line h2 {
    font-size: 24px;
    line-height: 31px;
  }

  .drawer {
    width: 100vw;
  }

  .drawer-head,
  .drawer-body {
    padding: 14px;
  }
}

@media (max-width: 380px) {
  .actions,
  .stats-grid {
    grid-template-columns: 1fr;
  }
}
