:root {
  color-scheme: light;
  --ink: #111113;
  --ink-soft: #6e6e73;
  --ink-muted: #8a8a90;
  --paper: rgba(255, 255, 255, 0.82);
  --paper-solid: #ffffff;
  --canvas: #f5f5f7;
  --line: rgba(0, 0, 0, 0.08);
  --green: #1d5f50;
  --green-dark: #123e35;
  --green-pale: #e7f2ee;
  --amber: #f5a623;
  --amber-dark: #d88900;
  --amber-pale: #fff4df;
  --blue: #007aff;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.08);
  --soft-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  --radius-lg: 28px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(245, 166, 35, 0.18), transparent 24rem),
    radial-gradient(circle at 88% 0%, rgba(0, 122, 255, 0.1), transparent 28rem),
    linear-gradient(180deg, #fbfbfd 0%, var(--canvas) 100%);
  font-family: "Noto Sans SC", sans-serif;
}

body.auth-locked {
  overflow: hidden;
}

.auth-gate {
  position: fixed;
  z-index: 9999;
  inset: 0;
  display: grid;
  padding: 28px;
  background:
    radial-gradient(circle at 16% 18%, rgba(227, 27, 35, 0.12), transparent 34%),
    radial-gradient(circle at 86% 82%, rgba(255, 184, 71, 0.18), transparent 32%),
    #f5f5f7;
  place-items: center;
}

.auth-gate[hidden] {
  display: none;
}

.auth-card {
  width: min(460px, 100%);
  padding: 34px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(25, 25, 30, 0.14);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.auth-brand img {
  width: 74px;
  height: 40px;
  object-fit: contain;
}

.auth-brand div {
  display: grid;
}

.auth-brand strong {
  font-size: 13px;
}

.auth-brand span {
  color: var(--ink-soft);
  font-size: 9px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.auth-copy {
  margin: 38px 0 26px;
}

.auth-copy p {
  margin: 0 0 8px;
  color: #c0181f;
  font: 700 10px/1 "DM Sans", sans-serif;
  letter-spacing: 0.18em;
}

.auth-copy h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.auth-copy span {
  color: var(--ink-soft);
  font-size: 13px;
}

.auth-form {
  display: grid;
  gap: 15px;
}

.auth-form label {
  display: grid;
  gap: 7px;
}

.auth-form label span {
  font-size: 12px;
  font-weight: 700;
}

.auth-form input {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fafafa;
}

.auth-form .primary-button {
  min-height: 48px;
  margin-top: 3px;
}

.auth-message {
  min-height: 18px;
  margin: 0;
  color: #c0181f;
  font-size: 12px;
}

.nav-account {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.nav-account[hidden] {
  display: none;
}

.nav-account span {
  display: grid;
  min-width: 80px;
}

.nav-account strong {
  overflow: hidden;
  max-width: 112px;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-account small {
  color: var(--ink-soft);
  font-size: 9px;
}

.nav-account button {
  padding: 7px 10px;
  border: 0;
  border-radius: 10px;
  color: var(--ink-soft);
  background: #f1f1f3;
  cursor: pointer;
}

.account-security-panel {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-top: 24px;
  padding: 24px 26px;
}

.account-security-panel h2,
.account-security-panel p {
  margin: 4px 0;
}

.account-security-panel > div > p:last-child {
  color: var(--ink-soft);
  font-size: 12px;
}

.change-password-form {
  display: grid;
  grid-template-columns: 180px 210px auto;
  gap: 9px;
  align-items: center;
}

.change-password-form input {
  min-height: 42px;
}

.change-password-form .form-message {
  grid-column: 1 / -1;
  margin: 0;
}

.account-role-guide {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.account-role-guide article {
  display: flex;
  min-height: 112px;
  align-items: center;
  gap: 15px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
}

.account-role-guide b {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 15px;
  color: #fff;
  background: #1d1d1f;
  font: 700 20px/1 "DM Sans", sans-serif;
  place-items: center;
}

.account-role-guide article:nth-child(2) b {
  background: #c0181f;
}

.account-role-guide article:nth-child(3) b {
  background: #e99718;
}

.account-role-guide div {
  display: grid;
  gap: 5px;
}

.account-role-guide span {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.55;
}

.account-create-panel,
.account-list-panel {
  padding: 26px;
  margin-bottom: 22px;
}

.account-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.account-section-heading h2,
.account-section-heading p {
  margin: 4px 0;
}

.account-section-heading > p {
  color: var(--ink-soft);
  font-size: 11px;
}

.account-create-form {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.account-create-form > label {
  display: grid;
  gap: 7px;
}

.account-create-form > label span,
.account-store-field legend {
  font-size: 11px;
  font-weight: 700;
}

.account-create-form input,
.account-create-form select {
  min-height: 44px;
}

.account-store-field {
  grid-column: 1 / -1;
  padding: 14px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
}

.account-store-field[hidden] {
  display: none;
}

#accountStoreOptions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

#accountStoreOptions label,
.account-edit-stores label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  font-size: 11px;
}

#accountStoreOptions input,
.account-edit-stores input {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  accent-color: #c0181f;
}

.account-form-actions {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.account-form-actions .form-message {
  margin-right: auto;
}

.account-list-summary {
  color: var(--ink-soft);
  font-size: 11px;
}

.account-list {
  display: grid;
  gap: 10px;
}

.store-create-form {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(160px, 0.6fr) auto;
  gap: 12px;
  align-items: end;
}

.store-create-form .form-message {
  grid-column: 1 / -1;
}

.store-management-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.store-management-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.store-management-row div {
  display: grid;
  gap: 4px;
}

.store-management-row span {
  color: var(--ink-soft);
  font-size: 12px;
}

.secondary-button {
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f1f1f4;
  color: var(--ink);
  cursor: pointer;
}

.secondary-button:hover {
  background: #e7e7ec;
}

.danger-button {
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid rgba(192, 24, 31, 0.2);
  border-radius: 999px;
  background: #fff1f2;
  color: #c0181f;
  cursor: pointer;
  font-weight: 700;
}

.danger-button:hover {
  background: #ffe3e5;
}

.reminder-rules-form {
  display: grid;
  gap: 22px;
}

.reminder-rule-panel {
  padding: 26px;
}

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

.reminder-rule-grid > label {
  display: grid;
  gap: 9px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(250, 250, 250, 0.72);
}

.reminder-rule-grid > label > span {
  font-size: 13px;
  font-weight: 700;
}

.reminder-rule-grid > label > div {
  display: grid;
  grid-template-columns: minmax(90px, 150px) auto;
  align-items: center;
  gap: 10px;
}

.reminder-rule-grid input {
  min-height: 46px;
  font: 700 18px/1 "DM Sans", sans-serif;
}

.reminder-rule-grid em {
  color: var(--ink);
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
}

.reminder-rule-grid small {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.55;
}

.reminder-rule-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding-bottom: 20px;
}

.reminder-rule-actions .form-message {
  margin-right: auto;
}

.review-panel {
  padding: 26px;
  margin-bottom: 22px;
}

.review-list {
  display: grid;
  gap: 10px;
}

.review-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(180px, 1.5fr) minmax(150px, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.78);
}

.review-row > div:not(.review-actions) {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.review-row span,
.review-row small {
  color: var(--ink-soft);
  font-size: 11px;
}

.review-row strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-status {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  font-weight: 700;
}

.review-status.is-approved {
  color: #207a4a;
  background: #e8f6ee;
}

.review-status.is-rejected {
  color: #a23b34;
  background: #fbeceb;
}

.review-actions {
  display: flex;
  gap: 8px;
}

@media (max-width: 760px) {
  .reminder-rule-grid {
    grid-template-columns: 1fr;
  }

  .review-row {
    grid-template-columns: 1fr;
  }
}

.account-row {
  display: grid;
  grid-template-columns: 92px 1.2fr 1fr 1.5fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.account-sequence-badge {
  display: inline-grid;
  width: 58px;
  height: 34px;
  border-radius: 11px;
  color: #fff;
  background: #1d1d1f;
  font: 700 12px/1 "DM Sans", sans-serif;
  place-items: center;
}

.account-sequence-badge.is-p { background: #c0181f; }
.account-sequence-badge.is-s { background: #e99718; }

.account-row-info {
  display: grid;
  gap: 3px;
}

.account-row-info small,
.account-row-stores,
.account-row-login {
  color: var(--ink-soft);
  font-size: 10px;
}

.account-row-status {
  justify-self: start;
  padding: 5px 8px;
  border-radius: 999px;
  color: #176b52;
  background: #e8f5f0;
  font-size: 10px;
  font-weight: 700;
}

.account-row-status.is-disabled {
  color: #9a2020;
  background: #fff0f0;
}

.account-row-actions {
  display: flex;
  gap: 7px;
}

.account-row-actions button {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.account-edit-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.account-edit-panel[hidden] { display: none; }

.account-edit-panel input,
.account-edit-panel select {
  min-height: 40px;
}

.account-edit-stores {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 7px;
}

.account-edit-actions {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-end;
  gap: 8px;
}

body.modal-open {
  overflow: hidden;
}

.main-navigation {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
}

.brand-lockup {
  display: flex;
  align-items: center;
  min-width: 240px;
  gap: 12px;
}

.brand-lockup img {
  width: 84px;
  height: 42px;
  padding: 4px 6px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  background: #fff;
  object-fit: contain;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.05);
}

.brand-lockup strong,
.brand-lockup span {
  display: block;
}

.brand-lockup strong {
  font: 700 14px/1.2 "DM Sans", sans-serif;
  letter-spacing: -0.01em;
}

.brand-lockup span {
  margin-top: 2px;
  color: var(--ink-soft);
  font: 600 11px/1 "DM Sans", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-tabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  background: rgba(242, 242, 247, 0.72);
}

.main-navigation button,
.content-tabs button {
  padding: 9px 16px;
  border: 0;
  border-radius: 999px;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  font-weight: 600;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.main-navigation button.active,
.content-tabs button.active {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

button,
a {
  font: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 80px;
}

.page-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--amber-dark);
  font: 700 12px/1 "DM Sans", sans-serif;
  letter-spacing: 0.18em;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.15;
  letter-spacing: -0.06em;
}

.page-description {
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #222 0%, #111 100%);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  font-weight: 600;
  transition: transform 160ms ease, background 160ms ease;
}

.primary-button:hover {
  background: #000;
  transform: translateY(-1px);
}

.customer-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.accent-bar {
  height: 5px;
  background: linear-gradient(90deg, #161616 0 58%, var(--amber) 58% 68%, #f0f0f0 68%);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 34px;
  border-bottom: 1px solid var(--line);
}

.identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 18px;
}

.avatar {
  display: grid;
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(145deg, #111 0%, #333 100%);
  font: 700 18px/1 "DM Sans", sans-serif;
  letter-spacing: 0.04em;
}

.identity-copy {
  min-width: 0;
}

.title-line {
  display: flex;
  align-items: center;
  gap: 12px;
}

.title-line h2 {
  overflow: hidden;
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.25;
  letter-spacing: -0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.level-badge {
  flex: 0 0 auto;
  padding: 4px 9px;
  border: 1px solid rgba(245, 166, 35, 0.24);
  border-radius: 999px;
  color: #8c581a;
  background: var(--amber-pale);
  font: 700 12px/1.3 "DM Sans", sans-serif;
}

.buyer-account {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.buyer-account strong {
  margin-left: 8px;
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
}

.status-block {
  display: flex;
  align-items: end;
  flex-direction: column;
  gap: 8px;
}

.card-header-tools {
  display: flex;
  align-items: center;
  gap: 18px;
}

.customer-card-edit-button {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  color: #171719;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.customer-card-edit-button:hover,
.customer-card-edit-button[aria-expanded="true"] {
  color: #fff;
  background: #171719;
  transform: translateY(-1px);
}

.customer-card-edit-button[hidden] {
  display: none;
}

.status-label,
.field-label {
  color: #71807b;
  font-size: 12px;
}

.status-pill {
  position: relative;
  padding: 7px 12px 7px 28px;
  border-radius: 999px;
  color: #1d1d1f;
  background: #f2f2f7;
  font-size: 13px;
  font-weight: 700;
}

.status-pill::before {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.16);
  content: "";
  transform: translateY(-50%);
}

.card-body {
  padding: 30px 34px 34px;
}

.info-section + .info-section,
.follow-section {
  margin-top: 30px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 18px;
}

.section-heading h3 {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0.02em;
}

.section-icon {
  color: var(--green);
  font: 700 11px/1 "DM Sans", sans-serif;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.info-item {
  min-width: 0;
  padding: 16px 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
}

.info-item dt {
  margin-bottom: 7px;
  color: #71807b;
  font-size: 12px;
}

.info-item dd {
  overflow: hidden;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.info-item a {
  color: var(--green);
  text-decoration: none;
}

.info-item a:hover {
  text-decoration: underline;
}

.contact-placeholder {
  color: var(--ink);
  cursor: default;
}

.purchase-panel {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(135deg, #111 0%, #2b2b2f 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.product-cell,
.metric-cell {
  display: flex;
  min-width: 0;
  padding: 18px 20px;
  flex-direction: column;
  gap: 6px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.purchase-panel .field-label {
  color: rgba(255, 255, 255, 0.58);
}

.purchase-panel strong {
  overflow: hidden;
  color: #fff;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-panel--expanded {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  overflow: visible;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.purchase-product-group {
  overflow: hidden;
  border: 1px solid #e3e5ea;
  border-radius: 18px;
  background: #f7f7f9;
}

.purchase-product-group h4 {
  margin: 0;
  padding: 14px 18px;
  border-bottom: 1px solid #e3e5ea;
  color: #111;
  font-size: 15px;
}

.purchase-product-list {
  display: grid;
  gap: 0;
}

.purchase-product-row {
  display: grid;
  grid-template-columns: 1.4fr 1.2fr 0.8fr 0.9fr 0.7fr 1fr;
  border-bottom: 1px solid #e3e5ea;
}

.purchase-product-row:last-child {
  border-bottom: 0;
}

.purchase-product-cell {
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid #e3e5ea;
}

.purchase-product-cell:last-child {
  border-right: 0;
}

.purchase-panel--expanded .field-label {
  display: block;
  margin-bottom: 6px;
  color: #7b7f88;
  font-size: 12px;
}

.purchase-panel--expanded strong {
  display: block;
  overflow: hidden;
  color: #202226;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-empty {
  margin: 0;
  padding: 16px 18px;
  color: #7b7f88;
}

.total-cell {
  border-right: 0;
  background: rgba(255, 255, 255, 0.08);
}

.total-cell strong {
  color: var(--amber);
}

.follow-history {
  display: grid;
  gap: 12px;
}

.follow-history-item {
  padding: 18px 20px;
  border: 1px solid #e7decf;
  border-radius: 13px;
  background: #fcf8f0;
}

.follow-history-item header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.follow-history-item time {
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.follow-history-item header strong {
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--green-dark);
  background: var(--green-pale);
  font-size: 12px;
}

.follow-history-details {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
  color: var(--ink-soft);
  font-size: 12px;
}

.follow-history-details strong {
  color: var(--ink);
}

.follow-history-item p {
  margin: 0;
  color: #4a514e;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 34px;
  color: #7a8883;
  background: #f5f6f1;
  font: 500 11px/1.4 "DM Sans", "Noto Sans SC", sans-serif;
}

.card-footer strong {
  color: #42534e;
}

.footer-separator {
  width: 1px;
  height: 12px;
  margin: 0 5px;
  background: #cfd7d1;
}

.create-customer-section {
  position: fixed;
  z-index: 30;
  top: 5vh;
  left: 50%;
  width: min(1120px, calc(100% - 48px));
  max-height: 90vh;
  margin: 0;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  opacity: 1;
  box-shadow: 0 30px 90px rgba(19, 35, 31, 0.28);
  overflow-y: auto;
  transform: translateX(-50%);
}

.modal-backdrop {
  position: fixed;
  z-index: 20;
  inset: 0;
  background: rgba(16, 27, 24, 0.48);
}

.customer-detail-modal {
  position: fixed;
  z-index: 30;
  top: 5vh;
  left: 50%;
  width: min(1120px, calc(100% - 48px));
  max-height: 90vh;
  padding: 24px;
  border-radius: 18px;
  background: var(--canvas);
  box-shadow: 0 30px 90px rgba(19, 35, 31, 0.28);
  overflow-y: auto;
  transform: translateX(-50%);
}

.customer-detail-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.customer-detail-modal-header h2 {
  margin: 0;
}

.customer-owner-form,
.customer-edit-form,
.customer-follow-form {
  margin-top: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}

.customer-owner-form fieldset,
.customer-edit-form fieldset,
.customer-follow-form fieldset {
  margin-bottom: 18px;
}

.form-hint {
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 13px;
}

.follow-status-fields {
  margin-top: 20px;
}

.follow-content-field {
  margin-top: 20px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 26px;
}

.metric-card,
.data-panel,
.customer-filters,
.customer-list-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.metric-card {
  position: relative;
  display: flex;
  min-height: 142px;
  padding: 22px;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  overflow: hidden;
}

.metric-card::after {
  position: absolute;
  right: -26px;
  bottom: -34px;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 166, 35, 0.2), transparent 68%);
  content: "";
}

.metric-card span,
.metric-card small,
.customer-list-item span {
  color: var(--ink-soft);
  font-size: 12px;
}

.metric-card strong {
  font: 700 36px/1 "DM Sans", sans-serif;
  letter-spacing: -0.05em;
}

.metric-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.metric-action {
  position: relative;
  z-index: 1;
  padding: 7px 13px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #111;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
}

.metric-action:hover {
  background: var(--amber-dark);
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.data-panel {
  position: relative;
  padding: 24px;
  overflow: hidden;
}

.data-panel::before {
  position: absolute;
  top: 0;
  right: 0;
  width: 130px;
  height: 130px;
  background: radial-gradient(circle at top right, rgba(245, 166, 35, 0.16), transparent 68%);
  content: "";
  pointer-events: none;
}

.data-panel h2 {
  position: relative;
  margin: 0 0 20px;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.geo-insight-panel {
  grid-column: 1 / -1;
  padding: 26px 30px 30px;
  overflow: visible;
}

.geo-insight-panel::before {
  width: 260px;
  height: 260px;
  background: radial-gradient(circle at top right, rgba(225, 29, 29, 0.1), transparent 68%);
}

.geo-panel-heading,
.geo-map-meta,
.geo-map-footnote {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.geo-panel-heading {
  position: relative;
  z-index: 2;
  margin-bottom: 18px;
}

.geo-panel-heading h2 {
  margin: 3px 0 5px;
  font-size: 22px;
}

.geo-panel-heading p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.geo-panel-kicker {
  color: #b11414 !important;
  font: 700 10px/1 "DM Sans", sans-serif;
  letter-spacing: 0.18em;
}

.geo-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
}

.geo-legend i {
  width: 150px;
  height: 9px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  background: linear-gradient(90deg, #fff 0%, #ff8b8b 35%, #ef2525 63%, #180000 100%);
}

.geo-map-stack {
  position: relative;
  min-height: 640px;
  margin-right: 22px;
  perspective: 1400px;
}

.geo-map-card {
  position: absolute;
  inset: 0;
  padding: 18px 22px 14px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.11);
  opacity: 0;
  transform: translate3d(18px, 13px, -30px) scale(0.985);
  transform-origin: center right;
  transition: opacity 280ms ease, transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}

.geo-map-card::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  content: "";
  pointer-events: none;
}

.geo-map-card.is-active {
  z-index: 2;
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  pointer-events: auto;
}

.geo-map-card:not(.is-active) {
  z-index: 1;
  opacity: 0.58;
}

.geo-map-meta {
  position: relative;
  z-index: 2;
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.geo-map-meta strong {
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0;
}

.geo-map-canvas {
  position: relative;
  display: grid;
  height: 570px;
  place-items: center;
}

.customer-geo-map {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 8px 18px rgba(44, 53, 62, 0.08));
}

.customer-geo-map-china {
  width: min(88%, 790px);
}

.geo-region {
  vector-effect: non-scaling-stroke;
  stroke: #ffffff;
  stroke-linejoin: round;
  stroke-width: 0.95;
  transition: filter 160ms ease, opacity 160ms ease, stroke-width 160ms ease;
  cursor: default;
  outline: none;
}

.geo-region:hover,
.geo-region:focus {
  z-index: 2;
  filter: brightness(0.93) drop-shadow(0 3px 4px rgba(0, 0, 0, 0.2));
  stroke: #ffffff;
  stroke-width: 1.65;
}

.geo-region.has-customers {
  cursor: pointer;
}

.geo-map-tooltip {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  display: grid;
  min-width: 118px;
  gap: 3px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  color: #fff;
  background: rgba(20, 0, 0, 0.88);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 120ms ease, transform 120ms ease;
  pointer-events: none;
}

.geo-map-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.geo-map-tooltip strong {
  font-size: 12px;
}

.geo-map-tooltip span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
}

.geo-map-tooltip .geo-tooltip-amount {
  color: #f3b15a;
  font-weight: 700;
}

.geo-map-switch {
  position: absolute;
  z-index: 4;
  top: 50%;
  right: -24px;
  display: flex;
  align-items: center;
  min-width: 58px;
  gap: 9px;
  padding: 8px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 999px;
  color: #fff;
  background: #111;
  box-shadow: 0 13px 30px rgba(0, 0, 0, 0.22);
  transform: translateY(-50%);
  transition: width 220ms ease, background 160ms ease, transform 160ms ease;
  cursor: pointer;
  font: inherit;
}

.geo-switch-icon {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #111;
  background: #fff;
  place-items: center;
  font: 700 11px/1 "DM Sans", sans-serif;
}

.geo-map-switch [data-geo-switch-label] {
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-width 260ms ease, opacity 180ms ease;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
}

.geo-map-switch:hover,
.geo-map-switch:focus-visible {
  background: #920e0e;
  transform: translateY(-50%) translateX(-2px);
}

.geo-map-switch:hover [data-geo-switch-label],
.geo-map-switch:focus-visible [data-geo-switch-label] {
  max-width: 110px;
  padding-right: 9px;
  opacity: 1;
}

.geo-map-footnote {
  justify-content: flex-start;
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 11px;
}

.geo-map-footnote span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.geo-dot {
  width: 9px;
  height: 9px;
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 3px;
}

.geo-dot-empty { background: #e9edf1; }
.geo-dot-low { background: #ffc6c6; }
.geo-dot-medium { background: #ef2525; }
.geo-dot-high { background: #280000; }

.geo-map-loading {
  color: var(--ink-soft);
  font-size: 13px;
}

.customer-matrix-panel {
  grid-column: 1 / -1;
  padding: 28px 30px 30px;
}

.matrix-panel-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.matrix-panel-heading h2 {
  margin: 4px 0 6px;
  font-size: 22px;
}

.matrix-panel-heading p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.matrix-kicker {
  color: #ba1515 !important;
  font: 700 10px/1 "DM Sans", sans-serif;
  letter-spacing: 0.17em;
}

.matrix-summary {
  display: flex;
  gap: 10px;
}

.matrix-summary > span {
  display: grid;
  min-width: 138px;
  gap: 3px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.matrix-summary small {
  color: var(--ink-soft);
  font-size: 10px;
}

.matrix-summary strong {
  font-size: 13px;
}

.level-store-matrix {
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.76);
}

.matrix-scroll {
  min-width: 820px;
}

.matrix-row {
  display: grid;
  grid-template-columns: 168px repeat(7, minmax(64px, 1fr)) 68px;
  align-items: stretch;
  gap: 7px;
  padding: 7px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.055);
}

.matrix-row:last-child {
  border-bottom: 0;
}

.matrix-header-row,
.matrix-footer-row {
  color: var(--ink-soft);
  background: #f6f6f8;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.matrix-header-row > div,
.matrix-footer-row > div {
  display: grid;
  min-height: 32px;
  place-items: center;
}

.matrix-corner,
.matrix-footer-row > div:first-child {
  justify-items: start !important;
  padding-left: 7px;
}

.matrix-store-name {
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 6px 7px;
}

.matrix-store-name strong {
  font-size: 13px;
}

.matrix-store-name small {
  color: var(--ink-soft);
  font-size: 10px;
}

.matrix-cell {
  display: grid;
  min-height: 46px;
  border: 1px solid rgba(0, 0, 0, 0.025);
  border-radius: 12px;
  color: var(--matrix-ink);
  background: var(--matrix-heat);
  place-items: center;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.matrix-cell.has-value {
  cursor: default;
}

.matrix-cell.has-value:hover {
  z-index: 1;
  box-shadow: 0 8px 20px rgba(135, 18, 18, 0.18);
  transform: translateY(-2px) scale(1.025);
}

.matrix-cell span,
.matrix-total-cell {
  font: 700 13px/1 "DM Sans", sans-serif;
}

.matrix-total-cell {
  display: grid;
  margin: 4px 0;
  border-radius: 11px;
  color: #fff;
  background: #1d1d1f;
  place-items: center;
}

.matrix-footer-row > div:last-child {
  border-radius: 10px;
  color: #fff;
  background: #ba1515;
}

.matrix-seasonality {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.seasonality-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
}

.seasonality-heading h3 {
  margin: 5px 0 5px;
  font-size: 18px;
}

.seasonality-heading p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.seasonality-summary {
  display: flex;
  gap: 9px;
}

.seasonality-summary > span {
  display: grid;
  min-width: 156px;
  gap: 3px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.seasonality-summary > span.is-peak {
  border-color: rgba(186, 21, 21, 0.18);
  background: #fff3f3;
}

.seasonality-summary small {
  color: var(--ink-soft);
  font-size: 10px;
}

.seasonality-summary strong {
  font-size: 12px;
}

.seasonality-chart {
  overflow: hidden;
  padding: 8px 10px 2px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff 0%, #fbfbfc 100%);
}

.seasonality-chart svg {
  display: block;
  width: 100%;
  height: 214px;
  overflow: visible;
}

.seasonality-grid-line {
  stroke: rgba(0, 0, 0, 0.07);
  stroke-dasharray: 4 7;
  stroke-width: 1;
}

.seasonality-area {
  fill: url(#seasonalityArea);
}

.seasonality-line {
  fill: none;
  stroke: #d71920;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
  vector-effect: non-scaling-stroke;
}

.seasonality-point circle {
  fill: #fff;
  stroke: #d71920;
  stroke-width: 4;
  vector-effect: non-scaling-stroke;
}

.seasonality-point text {
  fill: #1d1d1f;
  font: 700 12px/1 "DM Sans", sans-serif;
  text-anchor: middle;
}

.seasonality-point .seasonality-month-label {
  fill: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
}

.product-explorer-panel {
  grid-column: 1 / -1;
  padding: 28px 30px 30px;
}

.product-explorer-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.product-explorer-heading h2 {
  margin: 4px 0 6px;
  font-size: 22px;
}

.product-explorer-heading p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.product-explorer-kicker {
  color: #ba1515 !important;
  font: 700 10px/1 "DM Sans", sans-serif;
  letter-spacing: 0.17em;
}

.product-explorer-summary {
  display: flex;
  gap: 9px;
}

.product-explorer-summary > span {
  display: grid;
  min-width: 108px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.product-explorer-summary strong {
  font: 700 19px/1.1 "DM Sans", sans-serif;
}

.product-explorer-summary small {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 10px;
}

.product-category-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 12px;
}

.product-category-tabs button {
  display: grid;
  min-width: 138px;
  gap: 3px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.product-category-tabs button.active {
  border-color: #1d1d1f;
  color: #fff;
  background: #1d1d1f;
  box-shadow: 0 10px 22px rgba(29, 29, 31, 0.15);
}

.product-category-tabs strong {
  font-size: 13px;
}

.product-category-tabs small {
  color: inherit;
  font-size: 10px;
  opacity: 0.66;
}

.product-model-toolbar {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin: 5px 0 14px;
}

.product-model-search {
  display: flex;
  flex: 1 1 auto;
  min-width: 280px;
  max-width: none;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.product-model-search span {
  color: var(--ink-soft);
  font-size: 18px;
}

.product-model-search input,
.product-model-toolbar select {
  min-height: 42px;
  border: 0;
  outline: 0;
  background: transparent;
}

.product-model-search input {
  width: 100%;
}

.product-model-toolbar select {
  flex: 0 0 auto;
  width: 240px;
  min-width: 240px;
  padding: 0 34px 0 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background-color: #fff;
}

.product-model-chart {
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.075);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff 0%, #fbfbfc 100%);
}

.product-bar-chart-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  color: var(--ink-soft);
  font-size: 10px;
}

.product-bar-chart-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.product-bar-chart-meta i {
  width: 24px;
  height: 3px;
  border-radius: 999px;
  background: #d71920;
}

.product-bar-chart-meta em {
  margin-right: 8px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #a31318;
  background: #fff0f0;
  font-style: normal;
  font-weight: 700;
}

.product-bar-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 8px 2px;
  scrollbar-color: #c6c7ca transparent;
  scrollbar-width: thin;
}

.product-bar-scroll svg {
  display: block;
  max-width: none;
  height: 330px;
}

.product-bar-grid {
  stroke: rgba(0, 0, 0, 0.075);
  stroke-dasharray: 4 7;
  stroke-width: 1;
}

.product-bar-y-label {
  color: var(--ink-soft);
  fill: currentColor;
  font: 600 10px/1 "DM Sans", sans-serif;
  text-anchor: end;
}

.product-bar-item rect {
  fill: url(#productModelBar);
}

.product-bar-item.is-unspecified rect {
  fill: #8a8a8e;
}

.product-bar-value,
.product-bar-label {
  fill: #1d1d1f;
  font: 700 11px/1 "DM Sans", sans-serif;
  text-anchor: middle;
}

.product-bar-label {
  font-size: 10px;
}

.product-bar-category-label {
  fill: var(--ink-soft);
  font-size: 9px;
  font-weight: 500;
}

.product-model-empty {
  padding: 48px 20px;
  color: var(--ink-soft);
  text-align: center;
}

.product-model-empty strong {
  color: var(--ink);
}

.product-model-empty p {
  margin: 7px 0 0;
  font-size: 12px;
}

.geo-map-ranking {
  position: absolute;
  z-index: 4;
  bottom: 24px;
  left: 24px;
  width: 218px;
  padding: 14px 15px 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 36px rgba(35, 40, 46, 0.12);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}

.geo-ranking-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.geo-ranking-heading span {
  color: #ba1515;
  font: 700 11px/1 "DM Sans", sans-serif;
  letter-spacing: 0.12em;
}

.geo-ranking-heading small {
  color: var(--ink-soft);
  font-size: 10px;
}

.geo-map-ranking ol {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.geo-map-ranking li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 25px;
  gap: 7px;
  color: #303034;
  font-size: 12px;
}

.geo-map-ranking li i {
  display: grid;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  color: #fff;
  background: #1b1b1d;
  place-items: center;
  font: normal 700 9px/1 "DM Sans", sans-serif;
}

.geo-map-ranking li:first-child i {
  background: #d92323;
}

.geo-map-ranking li span {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-map-ranking li strong {
  color: #111;
  font: 700 11px/1 "DM Sans", sans-serif;
}

.geo-map-ranking .geo-ranking-empty {
  display: block;
  color: var(--ink-soft);
}

.distribution-row {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.distribution-row:last-child {
  border-bottom: 0;
}

.distribution-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.distribution-row-top span {
  overflow: hidden;
  color: #303034;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.distribution-row-top strong {
  min-width: max-content;
  padding: 4px 9px;
  border-radius: 999px;
  color: #111;
  background: #f5f5f7;
  font: 700 13px/1 "DM Sans", sans-serif;
}

.distribution-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #ececf1;
}

.distribution-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #111, var(--amber));
}

.content-tabs {
  display: flex;
  width: max-content;
  gap: 6px;
  margin-bottom: 20px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
}

.section-description,
.empty-state {
  color: var(--ink-soft);
}

.customer-list {
  display: grid;
  gap: 14px;
}

.customer-list-item {
  display: grid;
  grid-template-columns: 1.6fr repeat(7, 1fr);
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.customer-list-item:hover {
  border-color: rgba(0, 0, 0, 0.14);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.customer-list-item.has-follow-action {
  grid-template-columns: 1.6fr repeat(7, 1fr) auto;
}

.customer-list-item.public-customer-summary {
  grid-template-columns: 1.8fr repeat(3, 1fr) auto;
}

.follow-customer-button {
  min-height: 38px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #111;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.customer-list-item > .customer-row-actions {
  display: flex;
  flex-direction: row;
  gap: 8px;
}

.delete-customer-button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(180, 35, 24, 0.28);
  border-radius: 999px;
  color: #b42318;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.customer-list-item > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.customer-list-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
  padding: 22px;
}

.filter-actions {
  display: flex;
  align-items: end;
  gap: 10px;
}

.detail-heading {
  margin: 34px 0 18px;
  font-size: 20px;
}

.form-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.modal-close-button {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

.form-header h2 {
  margin: 0;
  font-size: 28px;
}

.form-header p:last-child {
  margin: 8px 0 0;
  color: var(--ink-soft);
}

fieldset {
  min-width: 0;
  margin: 0 0 28px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

legend {
  padding: 0 8px;
  font-weight: 700;
}

.fieldset-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.fieldset-heading legend {
  display: contents;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

label > span {
  font-size: 13px;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: 0;
  border-color: rgba(0, 122, 255, 0.62);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.12);
}

textarea {
  resize: vertical;
}

.full-width-field {
  grid-column: 1 / -1;
}

.field-error,
.form-message {
  min-height: 18px;
  margin: 0;
  color: #aa3d32;
  font-size: 12px;
}

.product-group {
  display: grid;
  grid-template-columns: 2fr 1fr 1.3fr 1fr auto;
  align-items: end;
  gap: 14px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.product-group:first-child {
  border-top: 0;
}

.follow-detail-group {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafbf8;
}

.product-group-heading {
  margin-top: 20px;
}

.secondary-button,
.remove-product-button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  font: inherit;
}

.remove-product-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.boss-dashboard {
  display: grid;
  gap: 22px;
}

.boss-dashboard[hidden] {
  display: none;
}

.boss-operations-dashboard {
  display: grid;
  gap: 22px;
}

.boss-operations-dashboard[hidden],
#standardDashboardContent[hidden] {
  display: none;
}

.boss-operations-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.boss-attention-list,
.boss-activity-list {
  display: grid;
}

.boss-attention-row,
.boss-activity-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 15px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
}

.boss-attention-row > span,
.boss-activity-row > span {
  justify-self: start;
  padding: 5px 8px;
  border-radius: 999px;
  color: #745018;
  background: var(--amber-pale);
  font-size: 10px;
  font-weight: 700;
}

.boss-attention-row.is-high > span {
  color: #a11e24;
  background: #fff0f0;
}

.boss-attention-row.is-medium > span {
  color: #945b0c;
  background: #fff5df;
}

.boss-attention-row div,
.boss-activity-row div {
  display: grid;
  gap: 4px;
}

.boss-attention-row small,
.boss-activity-row small,
.boss-attention-row time,
.boss-activity-row time {
  color: var(--ink-soft);
  font-size: 10px;
}

.boss-attention-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.boss-activity-row {
  grid-template-columns: 82px minmax(0, 1fr) auto;
}

.boss-filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
}

.boss-filter-heading {
  display: flex;
  grid-column: 1 / -1;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 4px;
}

.boss-filter-heading strong {
  display: block;
  margin-top: 3px;
  font-size: 18px;
}

.boss-filter-heading > span {
  color: var(--ink-soft);
  font-size: 11px;
}

.boss-filters label {
  display: grid;
  gap: 7px;
}

.boss-filters label > span {
  color: #55555a;
  font-size: 11px;
}

.boss-filters input,
.boss-filters select {
  min-height: 42px;
  font-size: 12px;
}

.boss-filter-actions {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 2px;
}

.boss-filter-actions button {
  min-height: 38px;
}

.boss-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(520px, 1fr);
  align-items: end;
  gap: 34px;
  padding: 34px;
  overflow: hidden;
  border-radius: 26px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 5%, rgba(245, 166, 35, 0.32), transparent 30%),
    linear-gradient(135deg, #171719, #262629 58%, #111);
  box-shadow: 0 24px 55px rgba(20, 20, 22, 0.2);
}

.boss-hero::after {
  position: absolute;
  right: -80px;
  bottom: -140px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  content: "";
}

.boss-hero .eyebrow {
  color: #f5a623;
}

.boss-hero h2 {
  margin: 8px 0 12px;
  font-size: 34px;
  letter-spacing: -0.045em;
}

.boss-hero > div > p:last-child {
  max-width: 610px;
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 14px;
  line-height: 1.8;
}

.boss-revenue {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.boss-revenue article {
  display: grid;
  min-height: 125px;
  padding: 19px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(12px);
}

.boss-revenue span,
.boss-revenue small {
  color: rgba(255, 255, 255, 0.54);
  font-size: 11px;
}

.boss-revenue strong {
  align-self: center;
  font: 700 25px/1.2 "DM Sans", sans-serif;
  letter-spacing: -0.04em;
}

.boss-metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.boss-metric-card {
  display: grid;
  min-height: 128px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--soft-shadow);
}

.boss-metric-card span,
.boss-metric-card small {
  color: var(--ink-soft);
  font-size: 11px;
}

.boss-metric-card strong {
  align-self: center;
  font: 700 30px/1 "DM Sans", sans-serif;
  letter-spacing: -0.05em;
}

.boss-analysis-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 22px;
}

.boss-visual-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 22px;
}

.boss-visual-grid .data-panel {
  min-width: 0;
}

.boss-product-visual {
  display: grid;
  gap: 8px;
}

.boss-product-visual-row {
  display: grid;
  gap: 10px;
  padding: 15px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
}

.boss-product-visual-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.boss-product-visual-heading em {
  font: normal 700 11px/1.3 "DM Sans", sans-serif;
}

.boss-product-bar-line {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 72px;
  align-items: center;
  gap: 9px;
}

.boss-product-bar-line > span {
  color: var(--ink-soft);
  font-size: 10px;
}

.boss-product-bar-line > i {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #ececf1;
}

.boss-product-bar-line > i > b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #171719, #f5a623);
}

.boss-product-bar-line.is-quantity > i > b {
  background: linear-gradient(90deg, #b21f2d, #f0644b);
}

.boss-product-bar-line > strong {
  font-size: 10px;
  text-align: right;
}

.boss-revenue-ranking li {
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
}

.boss-revenue-ranking li span {
  display: grid;
  gap: 3px;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  word-break: keep-all;
}

.boss-revenue-ranking li span small {
  color: var(--ink-soft);
  display: block;
  font-size: 9px;
  font-weight: 400;
}

.boss-revenue-ranking li strong {
  max-width: 190px;
  line-height: 1.35;
  text-align: right;
  white-space: normal;
}

.boss-panel-heading {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.boss-panel-heading h2 {
  margin: 4px 0 0;
}

.boss-panel-heading > span {
  color: var(--ink-soft);
  font-size: 11px;
}

.boss-ranking-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 15px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.boss-ranking-row > b,
.boss-product-index {
  color: #a4a4aa;
  font: 700 11px/1 "DM Sans", sans-serif;
}

.boss-ranking-row > div,
.boss-product-name,
.boss-product-row > div:not(.boss-product-index) {
  display: grid;
  gap: 5px;
}

.boss-ranking-row span,
.boss-product-row span {
  color: var(--ink-soft);
  font-size: 10px;
}

.boss-ranking-row em {
  font: normal 700 12px/1.3 "DM Sans", sans-serif;
  text-align: right;
}

.boss-product-row {
  display: grid;
  grid-template-columns: 34px minmax(145px, 1fr) minmax(160px, 1fr) minmax(150px, 0.9fr);
  align-items: center;
  gap: 12px;
  padding: 15px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.boss-product-row > div > strong {
  font-size: 12px;
  line-height: 1.35;
}

.boss-table-panel {
  padding: 26px 28px 28px;
}

.boss-table-wrap {
  position: relative;
  overflow-x: auto;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 16px;
}

.boss-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.74);
  font-size: 12px;
}

.boss-table th,
.boss-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  text-align: left;
  white-space: nowrap;
}

.boss-table th {
  color: #77777d;
  background: #f7f7f9;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.boss-table tbody tr:last-child td {
  border-bottom: 0;
}

.boss-table tbody tr:hover td {
  background: #fffaf2;
}

.boss-table td small {
  display: block;
  margin-top: 4px;
  color: var(--ink-soft);
}

.boss-rate,
.boss-status {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  color: #176b52;
  background: #e8f5f0;
  font-weight: 700;
}

.boss-status {
  color: #7d5011;
  background: var(--amber-pale);
}

.boss-deal-table th:first-child,
.boss-deal-table td:first-child {
  min-width: 190px;
}

@media (max-width: 1100px) {
  .boss-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .boss-hero {
    grid-template-columns: 1fr;
  }

  .boss-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .boss-analysis-grid {
    grid-template-columns: 1fr;
  }

  .boss-visual-grid,
  .boss-operations-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .main-navigation {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
  }

  .brand-lockup {
    min-width: 0;
  }

  .nav-tabs {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .page-shell {
    width: min(100% - 24px, 620px);
    padding: 28px 0 44px;
  }

  .page-header {
    align-items: stretch;
    margin-bottom: 20px;
    flex-direction: column;
    gap: 18px;
  }

  .primary-button {
    align-self: flex-start;
  }

  .metric-grid,
  .analysis-grid,
  .customer-filters,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .customer-list-item,
  .customer-list-item.has-follow-action,
  .customer-list-item.public-customer-summary {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .customer-row-actions {
    justify-content: flex-start;
  }

  .card-header {
    align-items: flex-start;
    padding: 24px 20px;
    flex-direction: column;
  }

  .status-block {
    align-items: flex-start;
  }

  .card-body {
    padding: 24px 20px 28px;
  }

  .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .purchase-panel {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-cell {
    grid-column: 1 / -1;
  }

  .metric-cell {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .total-cell {
    grid-column: 1 / -1;
  }

  .card-footer {
    padding: 14px 20px;
  }
}

@media (max-width: 480px) {
  .avatar {
    width: 50px;
    height: 50px;
    border-radius: 14px;
  }

  .identity {
    align-items: flex-start;
  }

  .title-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .purchase-panel {
    grid-template-columns: 1fr;
  }

  .product-cell,
  .metric-cell,
  .total-cell {
    grid-column: auto;
    border-right: 0;
  }

  .card-footer {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}


/* ── personal dashboard (S account) overrides ── */

/* ── CRM visual refresh: UI only, no data or logic changes ── */
:root {
  --ink: #181512;
  --ink-soft: #706a62;
  --ink-muted: #9a9287;
  --canvas: #f6f1ea;
  --paper: rgba(255, 252, 247, 0.9);
  --paper-solid: #fffdf9;
  --line: rgba(62, 43, 28, 0.11);
  --green: #286253;
  --green-dark: #193f36;
  --green-pale: #e9f3ee;
  --amber: #c88a2d;
  --amber-dark: #9d6417;
  --amber-pale: #fff4df;
  --blue: #365f8f;
  --brand-red: #b8212a;
  --brand-gold: #c8943b;
  --brand-cream: #fff9ef;
  --shadow: 0 24px 70px rgba(73, 52, 34, 0.12);
  --soft-shadow: 0 12px 32px rgba(73, 52, 34, 0.08);
  --radius-lg: 30px;
  --radius-md: 20px;
}

body {
  background:
    radial-gradient(circle at 8% 12%, rgba(200, 148, 59, 0.18), transparent 30rem),
    radial-gradient(circle at 94% 8%, rgba(184, 33, 42, 0.11), transparent 28rem),
    linear-gradient(135deg, #fffaf3 0%, #f7f0e8 44%, #eef3f1 100%);
  letter-spacing: -0.01em;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image:
    linear-gradient(rgba(82, 61, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(82, 61, 42, 0.03) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent 78%);
}

.main-navigation {
  width: min(100% - 32px, 1240px);
  margin: 12px auto 0;
  border: 1px solid rgba(62, 43, 28, 0.1);
  border-radius: 26px;
  background: rgba(255, 252, 246, 0.82);
  box-shadow: 0 18px 50px rgba(72, 49, 28, 0.11);
}

.brand-lockup {
  gap: 15px;
}

.brand-lockup img,
.auth-brand img {
  border: 1px solid rgba(62, 43, 28, 0.08);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(72, 49, 28, 0.08);
}

.brand-lockup strong,
.auth-brand strong {
  letter-spacing: -0.03em;
}

.brand-lockup span,
.auth-brand span {
  color: #8b8176;
  font-weight: 700;
}

.nav-tabs,
.content-tabs {
  border: 1px solid rgba(62, 43, 28, 0.1);
  background: rgba(245, 238, 229, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.main-navigation button,
.content-tabs button {
  color: #625a52;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.main-navigation button:hover,
.content-tabs button:hover {
  color: var(--ink);
  transform: translateY(-1px);
}

.main-navigation button.active,
.content-tabs button.active {
  color: #1d1714;
  background: linear-gradient(180deg, #fff 0%, #fff9ef 100%);
  box-shadow: 0 10px 24px rgba(72, 49, 28, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.86);
}

.nav-account {
  border-left-color: rgba(62, 43, 28, 0.12);
}

.nav-account button,
.secondary-button,
.remove-product-button {
  border: 1px solid rgba(62, 43, 28, 0.1);
  color: #4d4740;
  background: #fffaf3;
}

.page-shell {
  padding-top: 46px;
}

.page-header {
  padding: 4px 8px 8px;
}

.page-header .eyebrow,
.geo-panel-kicker,
.boss-hero .eyebrow,
.auth-copy p {
  color: var(--brand-red);
  letter-spacing: 0.2em;
}

.page-header h1 {
  letter-spacing: -0.08em;
}

.page-description {
  color: #766e64;
}

.primary-button,
.follow-customer-button,
.metric-action,
.customer-card-edit-button {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #1e1714 0%, #3a221d 54%, #8d1d25 100%);
  box-shadow: 0 14px 30px rgba(92, 30, 25, 0.22);
}

.primary-button:hover,
.follow-customer-button:hover,
.metric-action:hover,
.customer-card-edit-button:hover,
.customer-card-edit-button[aria-expanded="true"] {
  color: #fff;
  background: linear-gradient(135deg, #2b1d18 0%, #5d1e1f 52%, #b8212a 100%);
  box-shadow: 0 18px 42px rgba(92, 30, 25, 0.28);
  transform: translateY(-1px);
}

.delete-customer-button {
  border-color: rgba(184, 33, 42, 0.22);
  color: #a71d25;
  background: rgba(255, 247, 244, 0.9);
}

.metric-card,
.data-panel,
.customer-filters,
.customer-card,
.customer-list-item,
.account-role-guide article,
.account-security-panel,
.account-create-panel,
.account-list-panel,
.boss-filters,
.boss-metric-card,
.boss-table-panel,
.boss-attention-list,
.boss-activity-list {
  border: 1px solid rgba(62, 43, 28, 0.1);
  background: linear-gradient(180deg, rgba(255, 253, 249, 0.96), rgba(255, 249, 240, 0.9));
  box-shadow: 0 18px 45px rgba(72, 49, 28, 0.09);
}

.metric-card,
.customer-list-item,
.boss-metric-card {
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.metric-card:hover,
.customer-list-item:hover,
.boss-metric-card:hover {
  border-color: rgba(184, 33, 42, 0.18);
  box-shadow: 0 24px 60px rgba(72, 49, 28, 0.13);
  transform: translateY(-2px);
}

.metric-card::after,
.data-panel::before,
.geo-insight-panel::before {
  background: linear-gradient(90deg, var(--brand-red), var(--brand-gold));
}

.metric-card strong,
.boss-metric-card strong {
  letter-spacing: -0.05em;
}

.metric-card span,
.metric-card small,
.boss-metric-card span,
.boss-metric-card small,
.customer-list-item span,
.boss-panel-heading > span {
  color: #81786d;
}

.customer-list-item {
  border-radius: 22px;
}

.customer-list-item strong,
.customer-card h2,
.boss-panel-heading h2,
.data-panel h2 {
  letter-spacing: -0.04em;
}

.customer-row-actions {
  gap: 9px;
}

.customer-card {
  overflow: hidden;
  background: #fffdf9;
}

.card-header {
  background:
    radial-gradient(circle at 12% 0%, rgba(200, 148, 59, 0.13), transparent 34%),
    linear-gradient(180deg, #fffdf9 0%, #fff8ee 100%);
}

.avatar {
  background: linear-gradient(135deg, #241a16, #6e1820);
  box-shadow: 0 15px 34px rgba(80, 28, 23, 0.24);
}

.level-badge,
.status-pill,
.boss-rate,
.boss-status {
  border: 1px solid rgba(200, 148, 59, 0.24);
  color: #7a4c10;
  background: #fff3dd;
}

.status-dot,
.geo-dot-medium,
.geo-dot-high {
  background: var(--brand-red);
}

.purchase-panel {
  background: linear-gradient(135deg, #1c1714 0%, #28211d 58%, #4b241d 100%);
}

.total-cell {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(200, 148, 59, 0.14));
}

.customer-filters,
.boss-filters {
  background: linear-gradient(180deg, rgba(255, 253, 249, 0.96), rgba(255, 248, 238, 0.92));
}

input,
select,
textarea {
  border-color: rgba(62, 43, 28, 0.14);
  color: #211b17;
  background: #fffdf9;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(184, 33, 42, 0.24);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(184, 33, 42, 0.42);
  box-shadow: 0 0 0 4px rgba(184, 33, 42, 0.09);
}

.modal-backdrop {
  background: rgba(34, 27, 22, 0.42);
  backdrop-filter: blur(10px);
}

.customer-detail-modal,
.auth-card {
  border-color: rgba(62, 43, 28, 0.12);
  background: #fffdf9;
  box-shadow: 0 34px 100px rgba(43, 31, 24, 0.24);
}

.modal-close-button {
  background: rgba(255, 250, 243, 0.94);
  box-shadow: 0 12px 26px rgba(43, 31, 24, 0.12);
}

.geo-insight-panel,
.geo-map-card {
  border-color: rgba(62, 43, 28, 0.1);
  background: linear-gradient(180deg, rgba(255, 253, 249, 0.96), rgba(255, 249, 241, 0.88));
  box-shadow: 0 24px 70px rgba(72, 49, 28, 0.1);
}

.geo-region {
  stroke: rgba(255, 255, 255, 0.92);
}

.geo-map-ranking {
  border-color: rgba(62, 43, 28, 0.1);
  background: rgba(255, 253, 249, 0.92);
  box-shadow: 0 20px 50px rgba(72, 49, 28, 0.13);
}

.geo-ranking-heading span {
  color: var(--brand-red);
}

.geo-map-tooltip {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(35, 22, 18, 0.93);
  box-shadow: 0 18px 42px rgba(43, 31, 24, 0.28);
}

.boss-hero {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 70% 10%, rgba(200, 148, 59, 0.28), transparent 22rem),
    linear-gradient(135deg, #171210 0%, #28201c 52%, #541c1e 100%);
  box-shadow: 0 28px 80px rgba(45, 30, 22, 0.2);
}

.boss-revenue article {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 251, 244, 0.08);
}

.boss-product-bar-line > i {
  background: rgba(62, 43, 28, 0.08);
}

.boss-product-bar-line > i > b,
.boss-product-bar-line.is-quantity > i > b {
  background: linear-gradient(90deg, var(--brand-red), var(--brand-gold));
}

.boss-table th {
  color: #7f756b;
  background: #fff7eb;
}

.boss-table tr:hover td {
  background: rgba(255, 246, 232, 0.72);
}

.product-category-tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, #241a16, #8d1d25);
}

.auth-gate {
  background:
    radial-gradient(circle at 18% 16%, rgba(184, 33, 42, 0.12), transparent 34%),
    radial-gradient(circle at 84% 76%, rgba(200, 148, 59, 0.2), transparent 34%),
    linear-gradient(135deg, #fff9ef, #f4ece2);
}


/* ── CRM visual refresh v2: executive calm UI skin only ── */
:root {
  --ink: #15171a;
  --ink-soft: #67707c;
  --ink-muted: #9aa3ad;
  --canvas: #f4f6f8;
  --paper: rgba(255, 255, 255, 0.88);
  --paper-solid: #ffffff;
  --line: rgba(20, 26, 34, 0.09);
  --green: #23675b;
  --green-dark: #164139;
  --green-pale: #e8f4f1;
  --amber: #c6923d;
  --amber-dark: #9f6a1d;
  --amber-pale: #fff5e1;
  --blue: #315f8f;
  --brand-red: #9f1f2c;
  --brand-gold: #c89a43;
  --brand-cream: #f8f2e7;
  --shadow: 0 26px 70px rgba(17, 24, 39, 0.1);
  --soft-shadow: 0 14px 34px rgba(17, 24, 39, 0.07);
  --radius-lg: 30px;
  --radius-md: 18px;
}

body {
  background:
    radial-gradient(circle at 16% 10%, rgba(200, 154, 67, 0.12), transparent 28rem),
    radial-gradient(circle at 86% 6%, rgba(49, 95, 143, 0.1), transparent 32rem),
    linear-gradient(180deg, #fbfcfd 0%, #f3f6f8 48%, #eef2f5 100%);
  color: var(--ink);
}

body::before {
  background-image:
    linear-gradient(rgba(36, 45, 57, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 45, 57, 0.024) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.48), transparent 74%);
}

.main-navigation {
  border-color: rgba(18, 24, 32, 0.08);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 60px rgba(17, 24, 39, 0.1);
}

.brand-lockup img,
.auth-brand img {
  border-color: rgba(18, 24, 32, 0.08);
  background: #fff;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08);
}

.brand-lockup strong,
.auth-brand strong {
  color: #121417;
}

.brand-lockup span,
.auth-brand span,
.page-description {
  color: #68717c;
}

.nav-tabs,
.content-tabs {
  border-color: rgba(18, 24, 32, 0.08);
  background: rgba(239, 243, 247, 0.82);
}

.main-navigation button,
.content-tabs button {
  color: #5d6671;
  font-weight: 800;
}

.main-navigation button.active,
.content-tabs button.active {
  color: #111418;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.9);
}

.page-header .eyebrow,
.geo-panel-kicker,
.boss-hero .eyebrow,
.auth-copy p {
  color: var(--brand-gold);
}

.page-header h1 {
  color: #0e1116;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

.primary-button,
.follow-customer-button,
.metric-action,
.customer-card-edit-button {
  background: linear-gradient(135deg, #101318 0%, #202733 62%, #2d4156 100%);
  box-shadow: 0 16px 34px rgba(20, 31, 45, 0.22);
}

.primary-button:hover,
.follow-customer-button:hover,
.metric-action:hover,
.customer-card-edit-button:hover,
.customer-card-edit-button[aria-expanded="true"] {
  background: linear-gradient(135deg, #151a22 0%, #283447 58%, #365b78 100%);
  box-shadow: 0 20px 48px rgba(20, 31, 45, 0.28);
}

.metric-card,
.data-panel,
.customer-filters,
.customer-card,
.customer-list-item,
.account-role-guide article,
.account-security-panel,
.account-create-panel,
.account-list-panel,
.boss-filters,
.boss-metric-card,
.boss-table-panel,
.boss-attention-list,
.boss-activity-list,
.geo-insight-panel,
.geo-map-card {
  border-color: rgba(18, 24, 32, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.92));
  box-shadow: 0 18px 48px rgba(17, 24, 39, 0.08);
}

.metric-card:hover,
.customer-list-item:hover,
.boss-metric-card:hover {
  border-color: rgba(49, 95, 143, 0.18);
  box-shadow: 0 26px 70px rgba(17, 24, 39, 0.12);
}

.metric-card::after,
.data-panel::before,
.geo-insight-panel::before {
  background: linear-gradient(90deg, #151a22, var(--brand-gold));
}

.metric-card span,
.metric-card small,
.boss-metric-card span,
.boss-metric-card small,
.customer-list-item span,
.boss-panel-heading > span {
  color: #77818c;
}

.customer-list-item {
  border-radius: 24px;
}

.customer-list-item strong,
.customer-card h2,
.boss-panel-heading h2,
.data-panel h2 {
  color: #111418;
}

.avatar {
  background: linear-gradient(135deg, #111418, #2b3542);
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.22);
}

.level-badge,
.status-pill,
.boss-rate,
.boss-status {
  border-color: rgba(200, 154, 67, 0.26);
  color: #765214;
  background: #fff6df;
}

.purchase-panel {
  background: linear-gradient(135deg, #111418 0%, #202632 60%, #314052 100%);
}

.total-cell {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(200, 154, 67, 0.13));
}

input,
select,
textarea,
.boss-filters input,
.boss-filters select {
  border-color: rgba(18, 24, 32, 0.12);
  background: #ffffff;
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(49, 95, 143, 0.22);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(49, 95, 143, 0.44);
  box-shadow: 0 0 0 4px rgba(49, 95, 143, 0.1);
}

.secondary-button,
.remove-product-button,
.nav-account button {
  border-color: rgba(18, 24, 32, 0.1);
  color: #45505c;
  background: #fff;
}

.delete-customer-button {
  border-color: rgba(159, 31, 44, 0.22);
  color: #9f1f2c;
  background: #fff7f7;
}

.boss-hero {
  background:
    radial-gradient(circle at 72% 12%, rgba(200, 154, 67, 0.25), transparent 23rem),
    linear-gradient(135deg, #111418 0%, #202733 54%, #33445a 100%);
  box-shadow: 0 30px 90px rgba(17, 24, 39, 0.22);
}

.boss-revenue article {
  background: rgba(255, 255, 255, 0.08);
}

.boss-table th {
  color: #68717c;
  background: #f5f7fa;
}

.boss-table tr:hover td {
  background: rgba(238, 243, 248, 0.82);
}

.geo-map-ranking {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 54px rgba(17, 24, 39, 0.12);
}

.geo-ranking-heading span {
  color: #9f1f2c;
}

.geo-map-tooltip {
  background: rgba(17, 20, 24, 0.94);
}

.geo-map-tooltip .geo-tooltip-amount {
  color: #f0c36a;
}

.product-category-tabs button.active {
  background: linear-gradient(135deg, #111418, #33445a);
}

.modal-backdrop {
  background: rgba(17, 24, 39, 0.42);
}

.customer-detail-modal,
.auth-card {
  background: #fff;
  box-shadow: 0 34px 100px rgba(17, 24, 39, 0.24);
}

.auth-gate {
  background:
    radial-gradient(circle at 18% 16%, rgba(200, 154, 67, 0.16), transparent 34%),
    radial-gradient(circle at 84% 76%, rgba(49, 95, 143, 0.14), transparent 34%),
    linear-gradient(135deg, #fbfcfd, #eef2f5);
}


/* ── Apple-style minimal UI skin: UI only, no data or logic changes ── */
:root {
  --ink: #1d1d1f;
  --ink-soft: #6e6e73;
  --ink-muted: #86868b;
  --canvas: #f5f5f7;
  --paper: rgba(255, 255, 255, 0.82);
  --paper-solid: #ffffff;
  --line: rgba(0, 0, 0, 0.08);
  --green: #248a6b;
  --green-dark: #17624f;
  --green-pale: #e9f7f2;
  --amber: #bf7d1f;
  --amber-dark: #965d10;
  --amber-pale: #fff4df;
  --blue: #0071e3;
  --brand-red: #d70015;
  --brand-gold: #a06d1f;
  --brand-cream: #fbfbfd;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.07);
  --soft-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  --radius-lg: 28px;
  --radius-md: 18px;
}

body {
  color: #1d1d1f;
  background: #f5f5f7;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0;
}

body::before {
  display: none;
}

.main-navigation {
  width: min(100% - 40px, 1220px);
  margin-top: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(22px) saturate(1.7);
  -webkit-backdrop-filter: blur(22px) saturate(1.7);
}

.brand-lockup img,
.auth-brand img {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  background: #fff;
  box-shadow: none;
}

.brand-lockup strong,
.auth-brand strong {
  color: #1d1d1f;
  font-weight: 800;
}

.brand-lockup span,
.auth-brand span,
.page-description {
  color: #6e6e73;
}

.nav-tabs,
.content-tabs,
.product-category-tabs {
  border: 0;
  background: #ebedf0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.main-navigation button,
.content-tabs button,
.product-category-tabs button {
  color: #515154;
  font-weight: 700;
}

.main-navigation button:hover,
.content-tabs button:hover,
.product-category-tabs button:hover {
  color: #1d1d1f;
  transform: none;
}

.main-navigation button.active,
.content-tabs button.active,
.product-category-tabs button.active {
  color: #1d1d1f;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.page-shell {
  padding-top: 44px;
}

.page-header {
  padding: 0 0 22px;
}

.page-header .eyebrow,
.geo-panel-kicker,
.boss-hero .eyebrow,
.auth-copy p {
  color: #0071e3;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.page-header h1 {
  color: #1d1d1f;
  letter-spacing: -0.075em;
  text-shadow: none;
}

.primary-button,
.follow-customer-button,
.metric-action,
.customer-card-edit-button {
  border: 0;
  color: #fff;
  background: #1d1d1f;
  box-shadow: none;
}

.primary-button:hover,
.follow-customer-button:hover,
.metric-action:hover,
.customer-card-edit-button:hover,
.customer-card-edit-button[aria-expanded="true"] {
  color: #fff;
  background: #000;
  box-shadow: none;
  transform: translateY(-1px);
}

.metric-action {
  background: #0071e3;
}

.metric-action:hover {
  background: #0077ed;
}

.metric-card,
.data-panel,
.customer-filters,
.customer-card,
.customer-list-item,
.account-role-guide article,
.account-security-panel,
.account-create-panel,
.account-list-panel,
.boss-filters,
.boss-metric-card,
.boss-table-panel,
.boss-attention-list,
.boss-activity-list,
.geo-insight-panel,
.geo-map-card {
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.045);
}

.metric-card,
.customer-list-item,
.boss-metric-card {
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.metric-card:hover,
.customer-list-item:hover,
.boss-metric-card:hover {
  border-color: rgba(0, 113, 227, 0.16);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.07);
  transform: translateY(-1px);
}

.metric-card::after,
.data-panel::before,
.geo-insight-panel::before {
  background: #1d1d1f;
}

.metric-card strong,
.boss-metric-card strong,
.customer-list-item strong,
.customer-card h2,
.boss-panel-heading h2,
.data-panel h2 {
  color: #1d1d1f;
}

.metric-card span,
.metric-card small,
.boss-metric-card span,
.boss-metric-card small,
.customer-list-item span,
.boss-panel-heading > span {
  color: #86868b;
}

.customer-list-item,
.customer-card,
.data-panel,
.metric-card {
  border-radius: 24px;
}

.card-header {
  background: #fff;
}

.avatar {
  background: #1d1d1f;
  box-shadow: none;
}

.level-badge,
.status-pill,
.boss-rate,
.boss-status {
  border: 1px solid rgba(0, 113, 227, 0.14);
  color: #0066cc;
  background: #f0f7ff;
}

.status-dot {
  background: #0071e3;
}

.purchase-panel {
  background: #1d1d1f;
}

.total-cell {
  background: rgba(255, 255, 255, 0.08);
}

input,
select,
textarea,
.boss-filters input,
.boss-filters select,
.product-model-search input,
.product-model-toolbar select {
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #1d1d1f;
  background: #fbfbfd;
  box-shadow: none;
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(0, 0, 0, 0.16);
}

input:focus,
select:focus,
textarea:focus {
  border-color: #0071e3;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
}

.secondary-button,
.remove-product-button,
.nav-account button {
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #1d1d1f;
  background: #f5f5f7;
  box-shadow: none;
}

.secondary-button:hover,
.remove-product-button:hover,
.nav-account button:hover {
  background: #e8e8ed;
}

.delete-customer-button {
  border-color: rgba(215, 0, 21, 0.18);
  color: #d70015;
  background: #fff;
}

.boss-hero {
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: #1d1d1f;
  background: #fff;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.06);
}

.boss-hero h2,
.boss-hero p {
  color: #1d1d1f;
}

.boss-revenue article {
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #f5f5f7;
}

.boss-revenue span,
.boss-revenue small {
  color: #6e6e73;
}

.boss-revenue strong {
  color: #1d1d1f;
}

.boss-product-bar-line > i {
  background: #e8e8ed;
}

.boss-product-bar-line > i > b,
.boss-product-bar-line.is-quantity > i > b {
  background: #0071e3;
}

.boss-table th {
  color: #6e6e73;
  background: #f5f5f7;
}

.boss-table tr:hover td {
  background: #fafafa;
}

.geo-map-card {
  background: #fff;
}

.geo-map-ranking {
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}

.geo-ranking-heading span {
  color: #d70015;
}

.geo-map-tooltip {
  background: rgba(29, 29, 31, 0.92);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.geo-map-tooltip .geo-tooltip-amount {
  color: #fff;
  font-weight: 800;
}

.modal-backdrop {
  background: rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.customer-detail-modal,
.auth-card {
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
}

.modal-close-button {
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.auth-gate {
  background: #f5f5f7;
}


/* ── Final clean Apple web pass: remove decorative layers, keep content unchanged ── */
:root {
  --ink: #1d1d1f;
  --ink-soft: #6e6e73;
  --ink-muted: #86868b;
  --canvas: #f5f5f7;
  --paper: #ffffff;
  --paper-solid: #ffffff;
  --line: rgba(0, 0, 0, 0.08);
  --blue: #0071e3;
  --brand-red: #d70015;
  --brand-gold: #8a8a8e;
  --shadow: none;
  --soft-shadow: none;
  --radius-lg: 24px;
  --radius-md: 16px;
}

html {
  background: #f5f5f7;
}

body {
  color: #1d1d1f;
  background: #f5f5f7 !important;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
}

body::before,
.metric-card::after,
.data-panel::before,
.geo-insight-panel::before,
.boss-hero::after {
  display: none !important;
}

.page-shell {
  width: min(100% - 48px, 1200px);
  padding-top: 34px;
}

.content-page {
  animation: none;
}

.main-navigation {
  position: sticky;
  z-index: 50;
  top: 10px;
  width: min(100% - 32px, 1200px);
  min-height: 62px;
  margin: 10px auto 0;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86) !important;
  box-shadow: none;
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
}

.brand-lockup img,
.auth-brand img {
  border: 0;
  border-radius: 12px;
  box-shadow: none;
}

.brand-lockup strong,
.auth-brand strong {
  color: #1d1d1f;
  font-weight: 700;
}

.brand-lockup span,
.auth-brand span,
.page-description,
.metric-card span,
.metric-card small,
.boss-metric-card span,
.boss-metric-card small,
.customer-list-item span,
.boss-panel-heading > span,
.boss-revenue span,
.boss-revenue small {
  color: #6e6e73;
}

.nav-tabs,
.content-tabs,
.product-category-tabs {
  border: 0;
  border-radius: 999px;
  background: #e8e8ed !important;
  box-shadow: none;
}

.main-navigation button,
.content-tabs button,
.product-category-tabs button {
  border-radius: 999px;
  color: #6e6e73;
  font-weight: 600;
  box-shadow: none;
  transform: none !important;
}

.main-navigation button.active,
.content-tabs button.active,
.product-category-tabs button.active {
  color: #1d1d1f;
  background: #ffffff !important;
  box-shadow: none;
}

.page-header {
  padding: 0 0 22px;
}

.page-header .eyebrow,
.geo-panel-kicker,
.boss-hero .eyebrow,
.auth-copy p {
  color: #6e6e73;
  letter-spacing: 0.12em;
}

.page-header h1 {
  color: #1d1d1f;
  font-weight: 800;
  letter-spacing: -0.06em;
  text-shadow: none;
}

.primary-button,
.follow-customer-button,
.metric-action,
.customer-card-edit-button {
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #0071e3 !important;
  box-shadow: none;
}

.primary-button:hover,
.follow-customer-button:hover,
.metric-action:hover,
.customer-card-edit-button:hover,
.customer-card-edit-button[aria-expanded="true"] {
  background: #0077ed !important;
  box-shadow: none;
  transform: none;
}

.secondary-button,
.remove-product-button,
.nav-account button,
.delete-customer-button {
  border-radius: 999px;
  box-shadow: none;
}

.secondary-button,
.remove-product-button,
.nav-account button {
  border: 0;
  color: #1d1d1f;
  background: #e8e8ed !important;
}

.delete-customer-button {
  border: 0;
  color: #d70015;
  background: #fff !important;
}

.metric-card,
.data-panel,
.customer-filters,
.customer-card,
.customer-list-item,
.account-role-guide article,
.account-security-panel,
.account-create-panel,
.account-list-panel,
.boss-filters,
.boss-metric-card,
.boss-table-panel,
.boss-attention-list,
.boss-activity-list,
.geo-insight-panel,
.geo-map-card,
.boss-hero,
.auth-card {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 22px;
  background: #ffffff !important;
  box-shadow: none;
}

.metric-card:hover,
.customer-list-item:hover,
.boss-metric-card:hover {
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: none;
  transform: none;
}

.customer-list-item {
  min-height: 82px;
  border-radius: 18px;
}

.metric-card strong,
.boss-metric-card strong,
.customer-list-item strong,
.customer-card h2,
.boss-panel-heading h2,
.data-panel h2,
.boss-hero h2,
.boss-hero p,
.boss-revenue strong {
  color: #1d1d1f;
}

.avatar {
  background: #1d1d1f !important;
  box-shadow: none;
}

.level-badge,
.status-pill,
.boss-rate,
.boss-status {
  border: 0;
  color: #0066cc;
  background: #f0f7ff !important;
}

input,
select,
textarea,
.boss-filters input,
.boss-filters select,
.product-model-search input,
.product-model-toolbar select {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  color: #1d1d1f;
  background: #ffffff !important;
  box-shadow: none;
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(0, 0, 0, 0.16);
}

input:focus,
select:focus,
textarea:focus {
  border-color: #0071e3;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.14);
}

.card-header {
  background: #ffffff !important;
}

.purchase-panel {
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: #1d1d1f;
  background: #f5f5f7 !important;
}

.metric-cell,
.total-cell {
  border-color: rgba(0, 0, 0, 0.06);
  background: transparent !important;
}

.purchase-panel .field-label,
.metric-cell span {
  color: #6e6e73;
}

.purchase-panel strong,
.metric-cell strong,
.total-cell strong {
  color: #1d1d1f;
}

.boss-revenue article,
.boss-table th,
.boss-table tr:hover td {
  background: #f5f5f7 !important;
}

.boss-product-bar-line > i {
  background: #e8e8ed !important;
}

.boss-product-bar-line > i > b,
.boss-product-bar-line.is-quantity > i > b {
  background: #0071e3 !important;
}

.geo-map-ranking {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: none;
}

.geo-ranking-heading span {
  color: #1d1d1f;
}

.geo-map-tooltip {
  background: rgba(29, 29, 31, 0.92) !important;
  box-shadow: none;
}

.modal-backdrop {
  background: rgba(0, 0, 0, 0.22) !important;
  backdrop-filter: blur(18px);
}

.customer-detail-modal {
  border-radius: 24px;
  background: #ffffff !important;
  box-shadow: none;
}

.modal-close-button {
  border: 0;
  background: #f5f5f7 !important;
  box-shadow: none;
}

.auth-gate {
  background: #f5f5f7 !important;
}

@media (max-width: 1100px) {
  .page-shell {
    width: min(100% - 28px, 1200px);
  }

  .main-navigation {
    width: min(100% - 20px, 1200px);
  }

  .nav-tabs {
    overflow-x: auto;
    max-width: 100%;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: calc(100% - 20px);
    padding-top: 24px;
  }

  .main-navigation {
    top: 6px;
    border-radius: 18px;
  }

  .page-header h1 {
    font-size: clamp(42px, 15vw, 68px);
  }
}


/* ── Screenshot polish: browser-first Apple layout cleanup ── */
.main-navigation {
  display: grid;
  grid-template-columns: minmax(220px, auto) minmax(460px, 1fr) minmax(190px, auto);
  gap: 20px;
  align-items: center;
  padding: 12px 22px;
}

.brand-lockup {
  min-width: 0;
  white-space: nowrap;
}

.brand-lockup img {
  width: 76px;
  height: 38px;
}

.nav-tabs {
  justify-self: center;
  display: flex;
  flex-wrap: nowrap;
  width: auto;
  max-width: 100%;
  gap: 3px;
  padding: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.main-navigation button,
.content-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: max-content;
  padding: 9px 15px;
  line-height: 1;
  white-space: nowrap;
  word-break: keep-all;
  writing-mode: horizontal-tb;
}

.nav-account {
  justify-self: end;
  min-width: 0;
}

.nav-account span {
  min-width: 74px;
}

.nav-account button {
  min-width: 56px;
  padding-inline: 14px;
}

.product-category-tabs {
  gap: 8px;
  padding: 0 0 12px;
  background: transparent !important;
  box-shadow: none;
}

.product-category-tabs button {
  min-width: 122px;
  padding: 10px 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  background: #fff !important;
}

.product-category-tabs button.active {
  border-color: #1d1d1f;
  color: #1d1d1f;
  background: #fff !important;
  box-shadow: inset 0 0 0 1px #1d1d1f;
}

.product-category-tabs strong {
  font-size: 12px;
}

.product-category-tabs small {
  color: #86868b;
  font-size: 10px;
}

.product-model-toolbar {
  gap: 12px;
  margin-top: 2px;
}

.product-model-search {
  min-height: 54px;
  padding: 0 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  background: #fff;
}

.product-model-search span {
  display: none;
}

.product-model-search input,
.product-model-toolbar select {
  min-height: 52px;
  font-size: 15px;
}

.product-model-toolbar select {
  border-radius: 16px;
}

.product-model-search input {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding-left: 0 !important;
}

.status-pill,
.follow-history-item header strong,
.boss-status,
.inline-status {
  --status-color: #6e6e73;
  --status-bg: rgba(142, 142, 147, 0.14);
  --status-ring: rgba(142, 142, 147, 0.18);
  color: var(--status-color) !important;
  background: var(--status-bg) !important;
}

.inline-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
}

.status-pill::before {
  background: var(--status-color) !important;
  box-shadow: 0 0 0 4px var(--status-ring) !important;
}

[data-status="跟进中"] {
  --status-color: #007aff;
  --status-bg: rgba(0, 122, 255, 0.12);
  --status-ring: rgba(0, 122, 255, 0.18);
}

[data-status="发样品"] {
  --status-color: #ff9500;
  --status-bg: rgba(255, 149, 0, 0.14);
  --status-ring: rgba(255, 149, 0, 0.2);
}

[data-status="生产中"] {
  --status-color: #af52de;
  --status-bg: rgba(175, 82, 222, 0.14);
  --status-ring: rgba(175, 82, 222, 0.2);
}

[data-status="已完成"] {
  --status-color: #34c759;
  --status-bg: rgba(52, 199, 89, 0.14);
  --status-ring: rgba(52, 199, 89, 0.2);
}

[data-status="已放弃"] {
  --status-color: #ff3b30;
  --status-bg: rgba(255, 59, 48, 0.12);
  --status-ring: rgba(255, 59, 48, 0.18);
}

[data-status="未跟进"],
[data-status="未设置状态"] {
  --status-color: #8e8e93;
  --status-bg: rgba(142, 142, 147, 0.14);
  --status-ring: rgba(142, 142, 147, 0.18);
}

[data-status="客户资料修改"] {
  --status-color: #00a6a6;
  --status-bg: rgba(0, 166, 166, 0.13);
  --status-ring: rgba(0, 166, 166, 0.18);
}

[data-status="系统流入公海"],
[data-status="公海申领待审核"],
[data-status="待审核"] {
  --status-color: #5856d6;
  --status-bg: rgba(88, 86, 214, 0.13);
  --status-ring: rgba(88, 86, 214, 0.18);
}

.stage-info-section {
  margin-top: 30px;
}

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

.stage-info-grid .info-item.full-span {
  grid-column: 1 / -1;
}

.stage-info-grid .info-item.full-span dd {
  overflow: visible;
  line-height: 1.65;
  text-overflow: clip;
  white-space: normal;
}

@media (max-width: 480px) {
  .stage-info-grid--sample {
    grid-template-columns: 1fr;
  }
}

.boss-visual-grid {
  align-items: start;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
}

.boss-visual-grid .data-panel {
  align-self: start;
  padding: 22px 20px;
}

.seasonality-summary > span {
  min-width: 124px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f5f5f7 !important;
}

.seasonality-summary > span.is-peak {
  border-color: rgba(0, 113, 227, 0.18);
  background: #f0f7ff !important;
}

.seasonality-chart {
  padding: 10px 8px 4px;
  border-color: rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  background: #fff !important;
}

.seasonality-chart svg {
  height: 176px;
}

.seasonality-grid-line {
  stroke: rgba(0, 0, 0, 0.055);
}

.seasonality-line {
  stroke: #0071e3;
  stroke-width: 3;
}

.seasonality-point circle {
  fill: #fff;
  stroke: #0071e3;
  stroke-width: 3;
}

.seasonality-point text {
  fill: #1d1d1f;
  font-weight: 700;
}

.seasonality-point .seasonality-month-label {
  fill: #86868b;
  font-weight: 600;
}

.boss-product-visual {
  gap: 0;
}

.boss-product-visual-row {
  gap: 9px;
  padding: 12px 0;
}

.boss-product-visual-row:first-child {
  border-top: 0;
}

.boss-product-visual-heading strong {
  font-size: 14px;
}

.boss-product-visual-heading em {
  color: #1d1d1f;
  font-size: 10px;
}

.boss-product-bar-line {
  grid-template-columns: 50px minmax(0, 1fr) 64px;
  gap: 8px;
}

.boss-product-bar-line > i {
  height: 5px;
}

.boss-product-bar-line > span,
.boss-product-bar-line > strong {
  font-size: 10px;
}

.data-panel h2 {
  font-size: 20px;
  letter-spacing: -0.035em;
}

@media (max-width: 980px) {
  .main-navigation {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .brand-lockup,
  .nav-tabs,
  .nav-account {
    justify-self: stretch;
  }

  .nav-account {
    justify-content: space-between;
  }

  .boss-visual-grid {
    grid-template-columns: 1fr;
  }
}

body.modal-open .main-navigation {
  display: none !important;
}

/* Align browser content rail with the top navigation rail */
.main-navigation,
.page-shell {
  width: min(100% - 48px, 1220px) !important;
}

.main-navigation {
  margin-left: auto !important;
  margin-right: auto !important;
}

.page-shell {
  margin-left: auto !important;
  margin-right: auto !important;
}

.page-header {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.boss-matrix-seasonality {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.boss-matrix-seasonality .boss-panel-heading {
  margin-bottom: 14px;
}

.boss-matrix-seasonality .seasonality-chart svg {
  height: 150px;
}

.boss-product-performance-panel {
  margin-top: 22px;
}

.boss-product-performance-panel .boss-product-visual {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
}

.boss-product-performance-panel .boss-product-visual-row {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.boss-product-performance-panel .boss-product-visual-row:nth-child(1),
.boss-product-performance-panel .boss-product-visual-row:nth-child(2) {
  border-top: 0;
}

@media (max-width: 980px) {
  .boss-product-performance-panel .boss-product-visual {
    grid-template-columns: 1fr;
  }

  .boss-product-performance-panel .boss-product-visual-row:nth-child(2) {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
  }
}

@media (max-width: 760px) {
  .main-navigation,
  .page-shell {
    width: calc(100% - 24px) !important;
  }
}

.purchase-panel.purchase-panel--expanded {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  overflow: visible;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #1d1d1f;
  background: transparent !important;
  box-shadow: none;
}

.purchase-panel--expanded .purchase-product-row {
  display: grid;
  grid-template-columns: 1.4fr 1.2fr 0.8fr 0.9fr 0.7fr 1fr;
}

@media (max-width: 760px) {
  .purchase-panel--expanded .purchase-product-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .purchase-product-cell:nth-child(2n) {
    border-right: 0;
  }
}

@media (max-width: 480px) {
  .purchase-panel--expanded .purchase-product-row {
    grid-template-columns: 1fr;
  }

  .purchase-product-cell,
  .purchase-product-cell:nth-child(2n) {
    border-right: 0;
  }
}

@media (max-width: 760px) {
  html {
    min-height: 100%;
    background: #f5f5f7;
    -webkit-text-size-adjust: 100%;
  }

  body {
    min-height: 100dvh;
    padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
    overflow-x: hidden;
  }

  button,
  input,
  select,
  textarea {
    min-height: 44px;
    font-size: 16px;
  }

  .auth-gate {
    align-items: stretch;
    padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
  }

  .auth-card {
    width: 100%;
    min-height: calc(100dvh - 36px);
    justify-content: center;
    padding: 34px 24px;
    border-radius: 28px;
  }

  .auth-copy h1 {
    font-size: clamp(30px, 9vw, 42px);
    line-height: 1.05;
  }

  .main-navigation {
    position: sticky;
    top: max(8px, env(safe-area-inset-top));
    z-index: 50;
    display: grid !important;
    width: calc(100% - 16px) !important;
    margin: 8px auto 0 !important;
    padding: 10px;
    grid-template-columns: 1fr;
    gap: 10px;
    border-radius: 22px;
    backdrop-filter: blur(18px);
  }

  .brand-lockup {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 10px;
    min-width: 0;
  }

  .brand-lockup img {
    width: 34px;
    height: 34px;
    object-fit: contain;
  }

  .brand-lockup strong,
  .brand-lockup span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-tabs {
    display: flex;
    overflow-x: auto;
    justify-content: flex-start;
    gap: 6px;
    padding: 4px;
    border-radius: 18px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

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

  .main-navigation button {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 9px 14px;
    border-radius: 999px;
    font-size: 14px;
    white-space: nowrap;
  }

  .nav-account {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
    min-width: 0;
  }

  .nav-account strong,
  .nav-account span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .page-shell {
    width: calc(100% - 18px) !important;
    padding: 22px 0 42px;
  }

  .page-header {
    gap: 16px;
    margin-bottom: 18px;
  }

  .page-header h1 {
    font-size: clamp(36px, 13vw, 54px);
    line-height: 0.98;
    letter-spacing: -0.08em;
  }

  .page-header p {
    font-size: 14px;
  }

  .page-actions,
  .customer-toolbar,
  .dashboard-actions {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .page-actions > *,
  .customer-toolbar > *,
  .dashboard-actions > * {
    flex: 0 0 auto;
  }

  .data-panel,
  .metric-card,
  .customer-filters,
  .account-role-guide article,
  .account-security-panel,
  .account-create-panel,
  .account-list-panel,
  .boss-table-panel,
  .boss-activity-list,
  .boss-attention-list,
  .geo-map-card,
  .geo-insight-panel {
    padding: 22px 18px;
    border-radius: 24px;
  }

  .metric-grid,
  .analysis-grid,
  .customer-filters,
  .form-grid,
  .account-create-form,
  .account-edit-grid,
  .store-create-form,
  .boss-filters,
  .boss-metric-grid,
  .boss-visual-grid,
  .boss-operations-grid,
  .geo-insight-grid {
    grid-template-columns: 1fr !important;
  }

  .customer-list {
    gap: 12px;
  }

  .customer-list-item,
  .customer-list-item.has-follow-action,
  .customer-list-item.public-customer-summary {
    grid-template-columns: 1fr !important;
    gap: 12px;
    padding: 18px;
    border-radius: 22px;
  }

  .customer-row-actions {
    display: flex;
    overflow-x: auto;
    justify-content: flex-start;
    gap: 8px;
  }

  .customer-detail-modal {
    inset: env(safe-area-inset-top) 0 0 0;
    width: 100vw;
    max-width: none;
    height: calc(100dvh - env(safe-area-inset-top));
    max-height: none;
    border-radius: 0;
  }

  .customer-detail-modal-header {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 14px 16px;
    backdrop-filter: blur(14px);
  }

  .customer-detail-modal-header h2 {
    font-size: 18px;
  }

  .modal-close-button {
    min-width: 44px;
    min-height: 44px;
  }

  .customer-card {
    border-radius: 0;
    box-shadow: none;
  }

  .card-header {
    padding: 22px 18px;
  }

  .card-body {
    gap: 24px;
    padding: 22px 18px 32px;
  }

  .info-grid,
  .stage-info-grid,
  .stage-info-grid--sample,
  .stage-info-grid--production {
    grid-template-columns: 1fr !important;
  }

  .info-item,
  .stage-info-grid--sample .info-item,
  .stage-info-grid--sample .full-span,
  .stage-info-grid--production .full-span {
    grid-column: auto !important;
  }

  .purchase-product-group {
    border-radius: 18px;
  }

  .purchase-product-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .purchase-product-cell {
    padding: 13px 14px;
  }

  .follow-history-item {
    padding: 16px;
    border-radius: 18px;
  }

  .follow-history-item header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .boss-table-wrapper,
  .boss-table-panel,
  .geo-map-frame,
  .matrix-table,
  .deal-table,
  .account-list {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .boss-table,
  .deal-table table {
    min-width: 680px;
  }
}

@media (max-width: 480px) {
  .auth-card {
    padding: 28px 20px;
  }

  .page-shell {
    width: calc(100% - 12px) !important;
  }

  .data-panel,
  .metric-card,
  .customer-filters {
    padding: 20px 16px;
  }

  .purchase-product-row {
    grid-template-columns: 1fr !important;
  }

  .purchase-product-cell {
    border-right: 0;
    border-bottom: 1px solid #e3e5ea;
  }

  .purchase-product-cell:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 760px) {
  .main-navigation {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 8px 12px !important;
    padding: 10px 12px !important;
    border-radius: 18px !important;
  }

  .brand-lockup {
    grid-column: 1;
    grid-row: 1;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 8px;
  }

  .brand-lockup img {
    width: 30px;
    height: 30px;
  }

  .brand-lockup strong {
    font-size: 13px;
  }

  .brand-lockup span {
    margin-top: 1px;
    font-size: 9px;
  }

  .nav-account {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    justify-self: end;
    gap: 8px;
    padding-left: 0;
    border-left: 0;
  }

  .nav-account span {
    display: block;
    min-width: 0;
    max-width: 74px;
  }

  .nav-account strong {
    display: block;
    max-width: 74px;
    font-size: 10px;
  }

  .nav-account small {
    display: none;
  }

  .nav-account button {
    min-width: 50px;
    min-height: 36px;
    padding: 7px 12px;
    font-size: 13px;
  }

  .nav-tabs {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    padding: 3px;
    gap: 3px;
    border-radius: 14px;
  }

  .main-navigation .nav-tabs button {
    min-height: 36px;
    padding: 7px 12px;
    font-size: 13px;
  }

  .page-shell {
    padding-top: 18px;
  }

  .page-header {
    gap: 12px;
  }

  .page-header h1 {
    font-size: clamp(32px, 10vw, 42px);
    line-height: 1.02;
  }

  .page-header .eyebrow {
    margin-bottom: 7px;
    font-size: 11px;
  }

  .data-panel,
  .metric-card,
  .customer-filters,
  .geo-map-card,
  .geo-insight-panel {
    padding: 18px 16px;
    border-radius: 20px;
  }

  .geo-map-stack {
    min-height: 110px;
    margin-right: 0;
    perspective: none;
  }

  .geo-map-card {
    position: relative;
    inset: auto;
    min-height: 110px;
  }

  .geo-map-card:not(.is-active) {
    display: none;
  }

  .geo-map-canvas {
    height: auto !important;
    min-height: 56px;
    padding: 14px 0 4px;
  }

  .geo-map-canvas .empty-state {
    margin: 0;
    padding: 12px;
  }

  .geo-map-switch,
  .geo-map-ranking {
    display: none !important;
  }

  .geo-panel-heading {
    align-items: flex-start;
    gap: 14px;
  }

  .geo-panel-heading h2,
  .boss-panel-heading h2,
  .data-panel h2 {
    font-size: 22px;
  }
}

/* ── Purpose-built mobile interface ── */
.mobile-logout-button {
  display: none;
}

@media (max-width: 760px) {
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
    background: #f5f5f7;
  }

  .main-navigation {
    position: fixed !important;
    inset: auto 8px max(8px, env(safe-area-inset-bottom)) !important;
    z-index: 100;
    display: block !important;
    width: auto !important;
    margin: 0 !important;
    padding: 6px !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 20px !important;
    background: rgba(250, 250, 252, 0.94) !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.16) !important;
    backdrop-filter: blur(24px) saturate(1.6) !important;
    -webkit-backdrop-filter: blur(24px) saturate(1.6) !important;
  }

  .main-navigation .brand-lockup,
  .main-navigation .nav-account {
    display: none !important;
  }

  .main-navigation .nav-tabs {
    display: flex;
    width: 100%;
    gap: 3px;
    padding: 0;
    overflow-x: auto;
    border: 0;
    border-radius: 15px;
    background: transparent;
    scroll-snap-type: x proximity;
  }

  .main-navigation .nav-tabs button {
    flex: 1 0 auto;
    min-width: 60px;
    min-height: 48px;
    padding: 7px 12px;
    border-radius: 14px;
    color: #6e6e73;
    font-size: 12px;
    font-weight: 700;
    scroll-snap-align: center;
  }

  .main-navigation .nav-tabs button.active {
    color: #fff !important;
    background: #1d1d1f !important;
    box-shadow: none;
  }

  .page-shell {
    width: 100% !important;
    padding: 22px 14px 24px;
  }

  .page-header {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
  }

  .page-header h1 {
    font-size: clamp(30px, 9vw, 38px);
    line-height: 1.05;
    letter-spacing: -0.055em;
  }

  .page-header .page-description {
    max-width: 34em;
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.6;
  }

  .page-header > .primary-button {
    width: 100%;
    min-height: 46px;
    justify-content: center;
    margin: 0;
  }

  .metric-grid,
  .boss-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
    margin-bottom: 16px;
  }

  .metric-card,
  .boss-metric-card {
    min-height: 116px;
    gap: 8px;
    padding: 15px 14px;
    border-radius: 18px;
  }

  .metric-card strong,
  .boss-metric-card strong {
    font-size: clamp(28px, 9vw, 38px);
  }

  .metric-card span,
  .metric-card small,
  .boss-metric-card span,
  .boss-metric-card small {
    font-size: 11px;
    line-height: 1.35;
  }

  .analysis-grid {
    gap: 14px;
  }

  .geo-panel-heading {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .geo-legend {
    justify-self: start;
  }

  .data-panel,
  .customer-matrix-panel,
  .product-explorer-panel,
  .geo-insight-panel {
    padding: 18px 14px;
    border-radius: 20px;
  }

  .matrix-panel-heading,
  .seasonality-heading,
  .product-explorer-heading {
    display: grid;
    align-items: start;
    gap: 14px;
    margin-bottom: 16px;
  }

  .matrix-panel-heading h2,
  .product-explorer-heading h2 {
    margin: 5px 0 6px;
    font-size: 24px;
    line-height: 1.15;
  }

  .matrix-panel-heading p,
  .product-explorer-heading p,
  .seasonality-heading p {
    max-width: none;
    font-size: 12px;
    line-height: 1.55;
  }

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

  .product-explorer-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .matrix-summary > span,
  .seasonality-summary > span,
  .product-explorer-summary > span {
    min-width: 0;
    padding: 10px;
    border-radius: 12px;
  }

  .product-explorer-summary strong {
    font-size: 18px;
  }

  .level-store-matrix {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .matrix-scroll {
    display: grid;
    min-width: 0;
    gap: 10px;
  }

  .matrix-header-row,
  .matrix-footer-row {
    display: none;
  }

  .matrix-row:not(.matrix-header-row):not(.matrix-footer-row) {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 16px;
    background: #fff;
  }

  .matrix-store-name {
    grid-column: 1 / -1;
    padding: 0 2px 7px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }

  .matrix-store-name strong {
    font-size: 14px;
  }

  .matrix-cell,
  .matrix-total-cell {
    position: relative;
    min-height: 58px;
    margin: 0;
    padding-top: 17px;
    border-radius: 11px;
  }

  .matrix-cell::before,
  .matrix-total-cell::before {
    position: absolute;
    top: 7px;
    left: 0;
    width: 100%;
    color: currentColor;
    font-size: 8px;
    font-weight: 700;
    text-align: center;
    opacity: 0.62;
  }

  .matrix-row > .matrix-cell:nth-child(2)::before { content: "L0"; }
  .matrix-row > .matrix-cell:nth-child(3)::before { content: "L1"; }
  .matrix-row > .matrix-cell:nth-child(4)::before { content: "L2"; }
  .matrix-row > .matrix-cell:nth-child(5)::before { content: "L3"; }
  .matrix-row > .matrix-cell:nth-child(6)::before { content: "L4"; }
  .matrix-row > .matrix-cell:nth-child(7)::before { content: "L5"; }
  .matrix-row > .matrix-cell:nth-child(8)::before { content: "L6"; }
  .matrix-row > .matrix-total-cell::before { content: "合计"; color: #fff; }

  .matrix-seasonality {
    margin-top: 20px;
    padding-top: 18px;
  }

  .seasonality-chart {
    overflow-x: auto;
    padding: 8px 4px 2px;
  }

  .seasonality-chart svg {
    min-width: 520px;
    height: 168px;
  }

  .product-category-tabs {
    gap: 7px;
    margin: 0 -14px;
    padding: 2px 14px 12px;
  }

  .product-category-tabs button {
    min-width: 112px;
    min-height: 58px;
    padding: 9px 12px;
  }

  .product-model-toolbar {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
  }

  .product-model-search,
  .product-model-toolbar select {
    width: 100%;
    min-width: 0;
    min-height: 48px;
  }

  .product-bar-chart-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
    padding: 11px 12px;
  }

  .product-bar-scroll {
    padding-inline: 0;
  }

  .product-bar-scroll svg {
    height: 250px;
  }

  .account-security-panel {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 16px;
    padding: 18px 14px;
  }

  .account-security-panel h2 {
    font-size: 24px;
    line-height: 1.15;
    letter-spacing: -0.04em;
  }

  .account-security-panel > div > p:last-child {
    max-width: none;
    font-size: 11px;
    line-height: 1.55;
  }

  .change-password-form {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .change-password-form input,
  .change-password-form button {
    width: 100%;
    min-width: 0;
    margin: 0;
  }

  .mobile-logout-button {
    display: inline-flex;
    width: 100%;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(215, 25, 32, 0.18);
    border-radius: 14px;
    color: #c0181f;
    background: #fff5f5;
    font-weight: 700;
  }

  body.modal-open {
    padding-bottom: 0;
  }
}

@media (max-width: 380px) {
  .page-shell {
    padding-inline: 10px;
  }

  .metric-grid,
  .boss-metric-grid {
    grid-template-columns: 1fr !important;
  }

  .metric-card,
  .boss-metric-card {
    min-height: 100px;
  }
}

@media (max-width: 760px) {
  [data-page="customers"] .page-header-actions {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  [data-page="customers"] .page-header-actions button {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding-inline: 10px;
    justify-content: center;
    font-size: 13px;
  }

  #customerFilters,
  #publicCustomerFilters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
    margin-bottom: 16px;
    padding: 14px;
  }

  #customerFilters > label,
  #publicCustomerFilters > label {
    min-width: 0;
  }

  #customerFilters input,
  #customerFilters select,
  #publicCustomerFilters input,
  #publicCustomerFilters select {
    width: 100%;
    min-width: 0;
  }

  #customerFilters .filter-actions,
  #publicCustomerFilters .filter-actions {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #customerFilters .filter-actions button,
  #publicCustomerFilters .filter-actions button {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    justify-content: center;
  }

  [data-page="follow"] .customer-list-item,
  [data-page="customers"] .customer-list-item,
  [data-page="public"] .customer-list-item,
  [data-page="follow"] .customer-list-item.has-follow-action,
  [data-page="customers"] .customer-list-item.has-follow-action,
  [data-page="public"] .customer-list-item.has-follow-action,
  [data-page="public"] .customer-list-item.public-customer-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: start;
    gap: 13px 10px;
    padding: 15px;
  }

  [data-page="follow"] .customer-list-item > div:first-child,
  [data-page="customers"] .customer-list-item > div:first-child,
  [data-page="public"] .customer-list-item > div:first-child,
  [data-page="follow"] .customer-list-item > .customer-row-actions,
  [data-page="customers"] .customer-list-item > .customer-row-actions,
  [data-page="public"] .customer-list-item > .customer-row-actions {
    grid-column: 1 / -1;
  }

  [data-page="follow"] .customer-list-item > div:first-child,
  [data-page="customers"] .customer-list-item > div:first-child,
  [data-page="public"] .customer-list-item > div:first-child {
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }

  [data-page="follow"] .customer-list-item > div,
  [data-page="customers"] .customer-list-item > div,
  [data-page="public"] .customer-list-item > div {
    gap: 4px;
  }

  [data-page="follow"] .customer-list-item span,
  [data-page="customers"] .customer-list-item span,
  [data-page="public"] .customer-list-item span {
    font-size: 10px;
  }

  [data-page="follow"] .customer-list-item strong,
  [data-page="customers"] .customer-list-item strong,
  [data-page="public"] .customer-list-item strong {
    font-size: 13px;
  }

  [data-page="follow"] .customer-row-actions,
  [data-page="customers"] .customer-row-actions,
  [data-page="public"] .customer-row-actions {
    display: flex;
    overflow: visible;
  }

  [data-page="follow"] .customer-row-actions button,
  [data-page="customers"] .customer-row-actions button,
  [data-page="public"] .customer-row-actions button {
    flex: 1 1 0;
    width: 100%;
    min-width: 0;
  }

  #bossFilters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
    padding: 14px;
  }

  #bossFilters .boss-filter-heading,
  #bossFilters .boss-filter-actions {
    grid-column: 1 / -1;
  }

  #bossFilters .boss-filter-heading {
    display: grid;
    align-items: start;
    gap: 5px;
  }

  #bossFilters label {
    min-width: 0;
  }

  #bossFilters input,
  #bossFilters select {
    width: 100%;
    min-width: 0;
    min-height: 44px;
  }

  #bossFilters .boss-filter-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-top: 2px;
  }

  #bossFilters .boss-filter-actions button {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    justify-content: center;
  }

  .boss-hero {
    grid-template-columns: 1fr !important;
    gap: 14px;
    padding: 18px 14px;
  }

  .boss-hero h2 {
    margin: 6px 0 0;
    font-size: 28px;
  }

  .boss-hero #bossInsight:empty {
    display: none;
  }

  .boss-hero #bossInsight {
    margin-top: 7px;
    color: #6e6e73 !important;
    font-size: 11px;
    line-height: 1.55;
  }

  .boss-revenue {
    gap: 9px;
  }

  .boss-revenue article {
    min-height: 104px;
    padding: 14px;
  }

  .boss-revenue strong {
    font-size: clamp(20px, 6vw, 28px);
  }

  .reminder-rule-panel {
    padding: 15px 13px;
  }

  .reminder-rule-panel .account-section-heading {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
  }

  .reminder-rule-panel .account-section-heading > p {
    margin: 0;
    font-size: 10px;
    line-height: 1.45;
  }

  .reminder-rule-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .reminder-rule-grid > label {
    min-width: 0;
    gap: 7px;
    padding: 12px 10px;
    border-radius: 14px;
  }

  .reminder-rule-grid > label > span {
    font-size: 12px;
    line-height: 1.35;
  }

  .reminder-rule-grid > label > div {
    grid-template-columns: minmax(48px, 68px) minmax(0, 1fr);
    gap: 6px;
  }

  .reminder-rule-grid input {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding-inline: 9px;
  }

  .reminder-rule-grid em {
    font-size: 10px;
    line-height: 1.3;
  }

  .reminder-rule-grid small {
    font-size: 9px;
    line-height: 1.45;
  }

  .customer-detail-modal {
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto;
    border: 0 !important;
    border-radius: 0 !important;
    transform: none !important;
  }

  .customer-detail-modal-header {
    position: sticky;
    top: 0;
    z-index: 10;
    min-height: 64px;
    margin: 0;
    padding: max(10px, env(safe-area-inset-top)) 14px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
  }

  .customer-detail-modal-header h2 {
    font-size: 18px;
  }

  #customerDetailCard {
    width: 100%;
    min-width: 0;
  }

  #customerDetailCard .customer-card {
    width: 100%;
    min-width: 0;
    border: 0;
    border-radius: 0;
  }

  #customerDetailCard .card-header {
    display: grid;
    gap: 14px;
    padding: 18px 14px;
  }

  #customerDetailCard .identity {
    width: 100%;
    min-width: 0;
    gap: 11px;
  }

  #customerDetailCard .avatar {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    font-size: 14px;
  }

  #customerDetailCard .identity-copy,
  #customerDetailCard .title-line {
    min-width: 0;
  }

  #customerDetailCard .title-line {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 6px 8px;
  }

  #customerDetailCard .title-line h2 {
    max-width: 100%;
    font-size: 19px;
    line-height: 1.25;
    white-space: normal;
  }

  #customerDetailCard .buyer-account {
    margin-top: 5px;
    font-size: 11px;
  }

  #customerDetailCard .buyer-account strong {
    margin-left: 4px;
  }

  #customerDetailCard .card-header-tools {
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  #customerDetailCard .status-block {
    align-items: flex-start;
    gap: 5px;
  }

  #customerDetailCard .card-body {
    padding: 18px 14px 24px;
  }

  #customerDetailCard .info-section + .info-section,
  #customerDetailCard .follow-section {
    margin-top: 22px;
  }

  #customerDetailCard .section-heading {
    margin-bottom: 12px;
  }

  #customerDetailCard .info-grid,
  #customerDetailCard .stage-info-grid,
  #customerDetailCard .stage-info-grid--sample,
  #customerDetailCard .stage-info-grid--production {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    border-radius: 14px;
  }

  #customerDetailCard .info-item {
    min-width: 0;
    padding: 12px 10px;
  }

  #customerDetailCard .info-item dt {
    margin-bottom: 5px;
    font-size: 10px;
  }

  #customerDetailCard .info-item dd,
  #customerDetailCard .info-item a {
    overflow-wrap: anywhere;
    font-size: 12px;
    line-height: 1.45;
    text-overflow: clip;
    white-space: normal;
  }

  #customerDetailCard .purchase-product-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #customerDetailCard .purchase-product-cell {
    padding: 11px 10px;
  }

  #customerDetailCard .follow-history-item {
    padding: 13px;
  }

  #customerDetailCard .follow-history-item header {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  #customerDetailCard .card-footer {
    flex-wrap: wrap;
    padding: 12px 14px;
  }

  .customer-detail-modal > .customer-owner-form,
  .customer-detail-modal > .customer-edit-form,
  .customer-detail-modal > .customer-follow-form {
    margin: 12px;
    padding: 14px;
    border-radius: 16px;
  }

  .customer-detail-modal .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
  }

  .customer-detail-modal .form-grid > label,
  .customer-detail-modal .form-grid input,
  .customer-detail-modal .form-grid select,
  .customer-detail-modal .form-grid textarea {
    min-width: 0;
    width: 100%;
  }

  .customer-detail-modal .form-actions {
    display: flex;
    gap: 8px;
  }

  .customer-detail-modal .form-actions button {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    justify-content: center;
  }

  .create-customer-section {
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    padding: 0 14px calc(22px + env(safe-area-inset-bottom)) !important;
    overflow-x: hidden !important;
    overflow-y: auto;
    border: 0 !important;
    border-radius: 0 !important;
    transform: none !important;
  }

  .create-customer-section > .form-header {
    position: sticky;
    top: 0;
    z-index: 10;
    margin: 0 -14px 16px;
    padding: max(12px, env(safe-area-inset-top)) 14px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
  }

  .create-customer-section > .form-header h2 {
    margin: 3px 0;
    font-size: 22px;
  }

  .create-customer-section > .form-header p:last-child {
    margin: 0;
    color: var(--ink-soft);
    font-size: 11px;
  }

  #newCustomerForm fieldset {
    min-width: 0;
    margin: 0 0 16px;
    padding: 13px 0 0;
  }

  #newCustomerForm .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
  }

  #newCustomerForm .form-grid > label,
  #newCustomerForm input,
  #newCustomerForm select,
  #newCustomerForm textarea {
    width: 100%;
    min-width: 0;
  }

  #newCustomerForm .product-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 13px 0;
  }

  #newCustomerForm .product-group .remove-product-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  #newCustomerForm .fieldset-heading {
    align-items: center;
    gap: 8px;
  }

  #newCustomerForm .fieldset-heading button {
    min-height: 40px;
    padding-inline: 11px;
    font-size: 11px;
  }

  #newCustomerForm .follow-detail-group {
    padding: 11px;
  }

  #newCustomerForm .form-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #newCustomerForm .form-actions button {
    width: 100%;
    min-width: 0;
    margin: 0;
    justify-content: center;
  }

  [data-page="accounts"] .account-role-guide {
    grid-template-columns: 1fr;
    gap: 9px;
    margin-bottom: 14px;
  }

  [data-page="accounts"] .account-role-guide article {
    width: 100%;
    min-height: 82px;
    gap: 12px;
    padding: 13px;
  }

  [data-page="accounts"] .account-role-guide b {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    font-size: 17px;
  }

  [data-page="accounts"] .account-section-heading {
    display: grid;
    align-items: start;
    gap: 5px;
    margin-bottom: 14px;
  }

  [data-page="accounts"] .account-section-heading > p {
    margin: 0;
    line-height: 1.45;
  }

  [data-page="accounts"] .store-management-panel,
  [data-page="accounts"] .account-create-panel,
  [data-page="accounts"] .account-list-panel {
    padding: 15px 13px;
  }

  [data-page="accounts"] .store-create-form,
  [data-page="accounts"] .account-create-form {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
  }

  [data-page="accounts"] .store-create-form > button,
  [data-page="accounts"] .store-create-form > .form-message,
  [data-page="accounts"] .account-store-field,
  [data-page="accounts"] .account-form-actions {
    grid-column: 1 / -1;
  }

  [data-page="accounts"] .store-create-form > button,
  [data-page="accounts"] .account-form-actions > button {
    width: 100%;
    margin: 0;
    justify-content: center;
  }

  [data-page="accounts"] .store-management-row {
    width: 100%;
    min-width: 0;
    padding: 12px;
  }

  [data-page="accounts"] .store-management-row > div {
    min-width: 0;
  }

  [data-page="accounts"] .store-management-row strong,
  [data-page="accounts"] .store-management-row span {
    overflow-wrap: anywhere;
  }

  [data-page="accounts"] .account-list {
    width: 100%;
    overflow-x: visible;
  }

  [data-page="accounts"] .account-row {
    width: 100%;
    min-width: 0;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 9px 10px;
    padding: 12px;
  }

  [data-page="accounts"] .account-row-info {
    min-width: 0;
  }

  [data-page="accounts"] .account-row-login {
    grid-column: 1 / 3;
    min-width: 0;
  }

  [data-page="accounts"] .account-row-stores {
    grid-column: 1 / -1;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  [data-page="accounts"] .account-row-status {
    grid-column: 3;
    grid-row: 1;
  }

  [data-page="accounts"] .account-row-actions {
    grid-column: 3;
    grid-row: 2;
    justify-self: end;
  }

  [data-page="accounts"] .account-edit-panel {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
  }

  [data-page="accounts"] .account-edit-actions {
    flex-wrap: wrap;
  }

  [data-page="accounts"] .account-edit-actions button {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
    margin: 0;
    justify-content: center;
  }
}

/* Mobile responsive foundation: keep app pages fluid without touching desktop */
@media (max-width: 760px) {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    padding-top: max(18px, env(safe-area-inset-top));
  }

  .page-shell {
    width: 100% !important;
    max-width: 100% !important;
    padding-top: max(22px, calc(env(safe-area-inset-top) + 14px)) !important;
    overflow-x: hidden;
  }

  .content-page,
  .page-header,
  .data-panel,
  .customer-filters,
  .boss-filters,
  .metric-grid,
  .boss-metric-grid,
  .boss-revenue,
  .customer-list,
  .customer-list-item {
    max-width: 100%;
    min-width: 0;
  }

  .page-header h1 {
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: clamp(28px, 9vw, 38px);
    line-height: 1.08;
  }

  .page-description,
  .section-description,
  .data-panel p {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  input,
  select,
  textarea,
  button {
    max-width: 100%;
  }

  input[type="date"] {
    min-width: 0;
    appearance: auto;
    -webkit-appearance: auto;
  }

  #customerFilters,
  #publicCustomerFilters,
  #bossFilters {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    overflow: hidden;
  }

  #customerFilters label,
  #publicCustomerFilters label,
  #bossFilters label {
    min-width: 0;
    overflow: hidden;
  }

  #customerFilters input,
  #customerFilters select,
  #publicCustomerFilters input,
  #publicCustomerFilters select,
  #bossFilters input,
  #bossFilters select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

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

  .boss-revenue article {
    min-width: 0;
    overflow: hidden;
  }

  .boss-revenue strong,
  .boss-metric-card strong,
  .metric-card strong {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-size: clamp(20px, 6vw, 34px);
    letter-spacing: -0.04em;
  }

  .geo-map-stack,
  .geo-map-card,
  .geo-map-canvas {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .geo-map-card {
    padding: 14px;
  }

  .geo-map-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: start;
  }

  .geo-map-meta span,
  .geo-map-meta strong {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .geo-map-canvas .empty-state {
    display: flex;
    min-height: 74px;
    align-items: center;
    justify-content: center;
    padding: 14px;
    color: #6e6e73;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  #bossFilters .boss-filter-heading + label,
  #bossFilters .boss-filter-heading + label + label {
    grid-column: 1 / -1;
  }

  #bossFilters input[type="date"] {
    display: block;
    min-height: 44px;
    padding: 0 12px;
  }

  .boss-revenue article {
    padding: 12px;
  }

  .boss-revenue strong {
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
    font-size: clamp(17px, 4.8vw, 22px);
    letter-spacing: -0.07em;
  }

  .boss-product-panel {
    overflow: hidden;
  }

  #bossProducts {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    padding-bottom: 8px;
  }

  #bossProducts .boss-product-row {
    min-width: 720px;
  }

  .product-category-tabs {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    padding-bottom: 8px;
  }

  .product-category-tabs button {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

@media (max-width: 380px) {
  #customerFilters,
  #publicCustomerFilters,
  .boss-revenue {
    grid-template-columns: 1fr !important;
  }
}
