:root {
  --navy-950: #06182a;
  --navy-900: #0a223a;
  --navy-850: #0d2a47;
  --navy-800: #123a5d;
  --teal-700: #087f7a;
  --teal-600: #0b9b96;
  --teal-500: #16b8b0;
  --teal-100: #dff8f6;
  --orange-600: #d97706;
  --orange-500: #f59e0b;
  --red-600: #b91c1c;
  --green-700: #047857;
  --ink-950: #0f172a;
  --ink-800: #1e293b;
  --ink-700: #334155;
  --ink-600: #475569;
  --ink-500: #64748b;
  --ink-300: #cbd5e1;
  --ink-200: #e2e8f0;
  --ink-100: #f1f5f9;
  --paper: #ffffff;
  --surface: #f7f9fc;
  --line: #e1e7ef;
  --shadow-sm: 0 8px 24px rgba(6, 24, 42, 0.07);
  --shadow-md: 0 18px 42px rgba(6, 24, 42, 0.12);
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --sidebar-width: 264px;
  --sidebar-collapsed: 76px;
  --bottom-nav-height: 76px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink-950);
  background: var(--surface);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--surface);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 96% 2%, rgba(22, 184, 176, 0.11), transparent 34rem),
    radial-gradient(circle at 4% 98%, rgba(245, 158, 11, 0.08), transparent 28rem),
    var(--surface);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(22, 184, 176, 0.42);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

noscript {
  display: block;
  margin: 2rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: #fff7ed;
  color: #9a3412;
}

/* Desktop shell */
.desktop-app {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 180ms ease;
}

.desktop-app.sidebar-collapsed {
  grid-template-columns: var(--sidebar-collapsed) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 12px 14px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(180deg, var(--navy-950), var(--navy-900));
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  flex: 0 0 auto;
}

.icon-btn {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: inline-grid;
  place-content: center;
  gap: 4px;
  border-radius: 12px;
  cursor: pointer;
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  transition: background 160ms ease, transform 160ms ease;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.icon-btn span {
  display: block;
  width: 17px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  white-space: nowrap;
}

.brand-mark,
.mobile-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--teal-500), #2dd4bf);
  color: #05313d;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-copy strong {
  font-size: 0.92rem;
  letter-spacing: -0.01em;
}

.brand-copy small {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.62);
}

.sidebar-search {
  flex: 0 0 auto;
  margin: 14px 0 10px;
}

.sidebar-search input,
.drawer-search {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.sidebar-search input::placeholder,
.drawer-search::placeholder {
  color: rgba(255, 255, 255, 0.48);
}

.distributor-list,
.drawer-list {
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  align-content: start;
  gap: 5px;
  overflow-y: auto;
  padding: 2px 2px 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.24) transparent;
}

.distributor-list::-webkit-scrollbar,
.drawer-list::-webkit-scrollbar {
  width: 6px;
}

.distributor-list::-webkit-scrollbar-thumb,
.drawer-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.dist-button {
  width: 100%;
  min-height: 60px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 9px;
  overflow: hidden;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.82);
  text-align: left;
  cursor: pointer;
  background: transparent;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.dist-button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.dist-button.active {
  color: #fff;
  background: rgba(22, 184, 176, 0.18);
  box-shadow: inset 0 0 0 1px rgba(45, 212, 191, 0.23);
}

.dist-initial {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 900;
}

.dist-button.active .dist-initial {
  background: rgba(22, 184, 176, 0.26);
}

.dist-body {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 2px 8px;
}

.dist-body strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.85rem;
  letter-spacing: -0.01em;
}

.dist-body small {
  font-size: 0.67rem;
  color: rgba(255, 255, 255, 0.55);
}

.dist-brands {
  grid-column: 1 / -1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.60);
  font-size: 0.66rem;
}

.desktop-app.sidebar-collapsed .sidebar {
  padding-inline: 10px;
}

.desktop-app.sidebar-collapsed .sidebar-top {
  flex-direction: column;
  gap: 9px;
  min-height: 89px;
}

.desktop-app.sidebar-collapsed .brand-lockup {
  display: block;
}

.desktop-app.sidebar-collapsed .brand-copy,
.desktop-app.sidebar-collapsed .sidebar-search,
.desktop-app.sidebar-collapsed .dist-body {
  display: none;
}

.desktop-app.sidebar-collapsed .dist-button {
  width: 48px;
  min-height: 48px;
  grid-template-columns: 1fr;
  place-items: center;
  margin-inline: auto;
  padding: 0;
  border-radius: 14px;
}

.desktop-app.sidebar-collapsed .dist-initial {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.desktop-app.sidebar-collapsed .distributor-list {
  gap: 7px;
  padding-inline: 0;
}

.desktop-main {
  width: 100%;
  min-width: 0;
  padding: 22px clamp(20px, 2.6vw, 40px) 46px;
}

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

.eyebrow,
.section-kicker {
  margin: 0 0 5px;
  color: var(--teal-700);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.eyebrow.light {
  color: #7ce8df;
}

h1 {
  margin-bottom: 0;
  color: var(--navy-950);
  font-size: clamp(2rem, 2.65vw, 2.8rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.pill,
.hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.7rem;
  font-weight: 850;
  line-height: 1;
}

.pill {
  color: #fff;
  background: var(--navy-900);
}

.pill.muted {
  color: var(--ink-700);
  border: 1px solid var(--line);
  background: var(--paper);
}

.pill.muted-dark {
  color: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.pill.high {
  color: #9a3412;
  background: #ffedd5;
}

.pill.medium {
  color: #0e7490;
  background: #ecfeff;
}

.hero-brand {
  color: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  gap: 14px;
  margin-bottom: 10px;
}

.hero-card {
  position: relative;
  min-height: 184px;
  display: grid;
  align-content: space-between;
  gap: 24px;
  overflow: hidden;
  padding: 24px;
  border-radius: var(--radius-xl);
  color: #fff;
  background: linear-gradient(135deg, var(--navy-950), var(--navy-800));
  box-shadow: var(--shadow-md);
}

.hero-card::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  right: -78px;
  bottom: -126px;
  border-radius: 999px;
  background: rgba(22, 184, 176, 0.22);
}

.hero-main,
.hero-focus {
  position: relative;
  z-index: 1;
}

.hero-card h2 {
  margin: 0 0 13px;
  color: #fff;
  font-size: clamp(1.85rem, 2.4vw, 2.45rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.hero-focus {
  max-width: 820px;
  display: grid;
  gap: 4px;
  padding-top: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.hero-focus small {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-focus strong {
  color: rgba(255, 255, 255, 0.91);
  font-size: 0.98rem;
  line-height: 1.42;
}

.hero-side {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
}

.mini-card,
.card,
.brand-sales-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.91);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
}

.mini-card {
  display: grid;
  align-content: center;
  padding: 16px;
  border-radius: var(--radius-lg);
}

.mini-card small,
.stat small,
.insight-card small {
  display: block;
  margin-bottom: 5px;
  color: var(--ink-500);
  font-size: 0.64rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.mini-card strong {
  color: var(--navy-950);
  font-size: 1rem;
  line-height: 1.38;
}

.cadence-card {
  border-left: 3px solid var(--teal-500);
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  margin-bottom: 8px;
  padding: 9px 0 13px;
  scrollbar-width: none;
  background: linear-gradient(180deg, rgba(247, 249, 252, 0.98) 70%, rgba(247, 249, 252, 0));
}

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

.tab-button {
  flex: 0 0 auto;
  padding: 9px 13px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink-700);
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  font-size: 0.78rem;
  font-weight: 850;
}

.tab-button.active {
  color: #fff;
  border-color: var(--navy-900);
  background: var(--navy-900);
}

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

.card {
  grid-column: span 6;
  padding: 18px;
  border-radius: var(--radius-lg);
}

.card.full {
  grid-column: 1 / -1;
}

.card.third {
  grid-column: span 4;
}

.card h3,
.brand-sales-card h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
  color: var(--navy-950);
  font-size: 1.02rem;
  letter-spacing: -0.025em;
}

.card h4,
.brand-sales-card h4 {
  color: var(--navy-950);
}

.card p {
  color: var(--ink-700);
  line-height: 1.56;
}

.muted-text {
  color: var(--ink-500) !important;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.commercial-direction {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.4fr);
  align-items: center;
  gap: 30px;
  border-left: 4px solid var(--teal-500);
}

.commercial-direction h3,
.relationship-note h3 {
  justify-content: flex-start;
  margin-bottom: 0;
  font-size: 1.25rem;
}

.commercial-direction > p {
  margin-bottom: 0;
}

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

.insight-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.insight-card strong {
  display: block;
  margin-bottom: 5px;
  color: var(--navy-950);
  font-size: 1.17rem;
  letter-spacing: -0.035em;
}

.insight-card p {
  margin-bottom: 0;
  color: var(--ink-500);
  font-size: 0.77rem;
  line-height: 1.4;
}

.card-list {
  display: grid;
  gap: 9px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.card-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--ink-700);
  line-height: 1.45;
}

.card-list li::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  margin-top: 7px;
  border-radius: 999px;
  background: var(--teal-500);
}

.position-list {
  display: grid;
  gap: 2px;
}

.position-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

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

.position-row span {
  color: var(--ink-500);
  font-size: 0.75rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.position-row strong {
  color: var(--navy-950);
  line-height: 1.4;
}

.relationship-note {
  border-left: 4px solid var(--orange-500);
}

.relationship-note p:last-child {
  margin-bottom: 0;
}

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

.contact-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.contact-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--teal-700);
  background: var(--teal-100);
  font-weight: 900;
}

.contact-copy {
  min-width: 0;
}

.contact-copy small {
  display: block;
  margin-bottom: 2px;
  color: var(--ink-500);
  font-size: 0.68rem;
  line-height: 1.35;
}

.contact-copy h4 {
  margin: 0 0 5px;
  color: var(--navy-950);
  font-size: 0.96rem;
}

.contact-copy a {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--teal-700);
  font-size: 0.78rem;
  font-weight: 750;
  text-decoration: none;
}

.contact-copy a:hover {
  text-decoration: underline;
}

.operational-card {
  display: flex;
  flex-direction: column;
}

.commercial-note {
  margin: auto 0 0;
  padding-top: 14px;
  color: var(--ink-600) !important;
  border-top: 1px solid var(--line);
  font-size: 0.83rem;
  font-style: italic;
}

.commercial-note strong {
  color: var(--navy-900);
  font-style: normal;
}

.finance-card p {
  margin-bottom: 0;
}

.card-status-line {
  margin-bottom: 10px;
}

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

.stat {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.stat strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--navy-950);
  font-size: 1.08rem;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.stat.danger {
  border-color: #fed7aa;
  background: #fff7ed;
}

.stat.danger small,
.stat.danger strong {
  color: #b45309;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--ink-700);
  background: var(--ink-100);
  font-size: 0.68rem;
  font-weight: 850;
}

.status-chip.high {
  color: #991b1b;
  background: #fee2e2;
}

.status-chip.medium {
  color: #92400e;
  background: #fef3c7;
}

.status-chip.open,
.status-chip.todo {
  color: #1d4ed8;
  background: #eff6ff;
}

.status-chip.agreed,
.status-chip.complete,
.status-chip.ongoing {
  color: var(--green-700);
  background: #ecfdf5;
}

.data-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.data-table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.data-table th,
.data-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: var(--ink-500);
  background: #f8fafc;
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.data-table td {
  color: var(--ink-700);
  line-height: 1.45;
}

.data-table td.number,
.data-table th.number {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

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

details.detail-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

details.detail-card + details.detail-card {
  margin-top: 9px;
}

details.detail-card > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 15px;
  cursor: pointer;
  color: var(--navy-950);
  list-style: none;
  font-size: 0.87rem;
  font-weight: 850;
}

details.detail-card > summary small {
  display: block;
  margin-bottom: 3px;
  color: var(--teal-700);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

details.detail-card > summary::-webkit-details-marker {
  display: none;
}

details.detail-card > summary::after {
  content: "+";
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--ink-700);
  background: var(--ink-100);
}

details.detail-card[open] > summary::after {
  content: "–";
  color: #fff;
  background: var(--navy-900);
}

.detail-body {
  padding: 0 15px 15px;
}

.notice {
  grid-column: 1 / -1;
  padding: 14px 16px;
  border: 1px solid #bae6fd;
  border-radius: var(--radius-lg);
  color: #075985;
  background: #f0f9ff;
  font-size: 0.83rem;
  line-height: 1.5;
}

.brand-sales-card {
  grid-column: 1 / -1;
  display: grid;
  gap: 13px;
  padding: 18px;
  border-radius: var(--radius-xl);
}

.brand-sales-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.brand-sales-header h3 {
  justify-content: flex-start;
  margin-bottom: 6px;
  font-size: 1.28rem;
}

.brand-sales-header p:last-child {
  max-width: 1000px;
  margin-bottom: 0;
  color: var(--ink-700);
  line-height: 1.52;
}

.sales-monthly-panel {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.sales-monthly-panel h4 {
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.sales-column-chart-wrap {
  overflow-x: auto;
}

.sales-column-chart {
  min-width: 600px;
  display: grid;
  grid-template-columns: repeat(6, minmax(72px, 1fr));
  gap: 9px;
  padding: 3px 2px 0;
}

.sales-month-column {
  min-width: 0;
  display: grid;
  grid-template-rows: 24px 136px 22px;
  align-items: end;
  text-align: center;
}

.month-value {
  align-self: center;
  color: var(--ink-700);
  font-size: 0.72rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.month-value.negative {
  color: var(--orange-600);
}

.sales-bar-stage {
  position: relative;
  height: 136px;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fafc, #fff);
}

.sales-baseline {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 43px;
  height: 1px;
  background: var(--ink-300);
}

.sales-bar {
  position: absolute;
  left: 24%;
  right: 24%;
  bottom: 44px;
  min-height: 3px;
  border-radius: 7px 7px 2px 2px;
  background: linear-gradient(180deg, var(--teal-500), var(--teal-700));
}

.sales-bar.negative {
  top: 93px;
  bottom: auto;
  border-radius: 2px 2px 7px 7px;
  background: linear-gradient(180deg, var(--orange-500), #ea580c);
}

.sales-month-column > strong {
  align-self: end;
  color: var(--ink-600);
  font-size: 0.72rem;
}

.monthly-matrix {
  min-width: 860px;
}

.monthly-matrix th:first-child,
.monthly-matrix td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
}

.monthly-matrix thead th:first-child {
  z-index: 2;
  background: #f8fafc;
}

.monthly-matrix .total-column {
  background: #f0fdfa;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 27px;
  border: 1px dashed var(--ink-300);
  border-radius: var(--radius-xl);
  text-align: center;
  background: rgba(255, 255, 255, 0.74);
}

.empty-state h2 {
  margin-bottom: 7px;
  color: var(--navy-950);
}

.empty-state p {
  max-width: 650px;
  margin: 0 auto;
  color: var(--ink-500);
  line-height: 1.5;
}

.mobile-app {
  display: none;
}

@media (max-width: 1180px) {
  :root {
    --sidebar-width: 240px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) 240px;
  }

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

  .card.third {
    grid-column: span 6;
  }
}

/* Dedicated mobile shell */
@media (max-width: 840px), (max-aspect-ratio: 3/4), (hover: none) and (pointer: coarse) and (max-width: 1100px) {
  body {
    background: #f5f7fb;
  }

  .desktop-app {
    display: none !important;
  }

  .mobile-app {
    display: block;
    min-height: 100vh;
    padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
  }

  .mobile-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: calc(12px + env(safe-area-inset-top)) 14px 11px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.90);
    background: rgba(245, 247, 251, 0.92);
    backdrop-filter: blur(16px);
  }

  .mobile-distributor-button {
    min-width: 0;
    display: grid;
    gap: 2px;
    cursor: pointer;
    text-align: left;
    color: var(--navy-950);
    background: transparent;
  }

  .mobile-distributor-button span {
    font-size: 1.17rem;
    font-weight: 950;
    letter-spacing: -0.035em;
  }

  .mobile-distributor-button small {
    color: var(--ink-500);
    font-size: 0.73rem;
    font-weight: 750;
  }

  .mobile-mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    border-radius: 12px;
  }

  .mobile-content {
    padding: 12px 12px 0;
  }

  .mobile-hero {
    padding: 17px;
    border-radius: 22px;
    color: #fff;
    background: linear-gradient(135deg, var(--navy-950), var(--navy-800));
    box-shadow: var(--shadow-sm);
  }

  .mobile-hero h1 {
    margin-bottom: 7px;
    color: #fff;
    font-size: 1.55rem;
    line-height: 1;
    letter-spacing: -0.045em;
  }

  .mobile-hero p {
    margin-bottom: 13px;
    color: rgba(255, 255, 255, 0.79);
    font-size: 0.84rem;
    line-height: 1.48;
  }

  .mobile-hero .hero-tags {
    gap: 6px;
  }

  .mobile-hero .pill,
  .mobile-hero .hero-brand {
    padding: 6px 9px;
    font-size: 0.65rem;
  }

  .mobile-section {
    display: grid;
    gap: 11px;
    margin-top: 11px;
  }

  .mobile-content .card,
  .mobile-content .brand-sales-card,
  .mobile-content .notice,
  .mobile-content .empty-state {
    grid-column: auto;
  }

  .mobile-content .card,
  .mobile-content .brand-sales-card {
    padding: 15px;
    border-radius: 19px;
    background: #fff;
    box-shadow: 0 9px 25px rgba(6, 24, 42, 0.06);
  }

  .mobile-content .card.full,
  .mobile-content .card.third {
    grid-column: auto;
  }

  .mobile-content .commercial-direction {
    display: block;
  }

  .mobile-content .commercial-direction > div {
    margin-bottom: 10px;
  }

  .mobile-content .commercial-direction h3 {
    font-size: 1.08rem;
  }

  .mobile-content .insight-grid,
  .mobile-content .contact-grid,
  .mobile-content .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-content .insight-card,
  .mobile-content .stat {
    padding: 12px;
  }

  .mobile-content .insight-card strong,
  .mobile-content .stat strong {
    font-size: 0.96rem;
  }

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

  .mobile-content .position-row {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .mobile-content .brand-sales-header {
    display: grid;
  }

  .mobile-content .brand-sales-header .pill {
    justify-self: start;
  }

  .mobile-content .sales-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-content .sales-column-chart {
    min-width: 540px;
  }

  .mobile-content .sales-month-column {
    grid-template-rows: 22px 122px 20px;
  }

  .mobile-content .sales-bar-stage {
    height: 122px;
  }

  .mobile-content .sales-baseline {
    bottom: 38px;
  }

  .mobile-content .sales-bar {
    bottom: 39px;
  }

  .mobile-content .sales-bar.negative {
    top: 84px;
  }

  .mobile-content .data-table {
    min-width: 620px;
  }

  .mobile-content .monthly-matrix {
    min-width: 820px;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    min-height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
    padding: 7px 7px calc(7px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(226, 232, 240, 0.92);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 -16px 34px rgba(6, 24, 42, 0.08);
    backdrop-filter: blur(18px);
  }

  .mobile-nav-btn {
    display: grid;
    place-items: center;
    gap: 3px;
    padding: 7px 3px;
    border-radius: 15px;
    cursor: pointer;
    color: var(--ink-500);
    background: transparent;
    font-size: 0.68rem;
    font-weight: 850;
  }

  .mobile-nav-btn .nav-icon {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    border-radius: 10px;
    font-size: 0.9rem;
  }

  .mobile-nav-btn.active {
    color: var(--teal-700);
  }

  .mobile-nav-btn.active .nav-icon {
    color: #fff;
    background: var(--teal-600);
  }

  .mobile-drawer {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: none;
  }

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

  .drawer-scrim {
    position: absolute;
    inset: 0;
    background: rgba(6, 24, 42, 0.54);
    backdrop-filter: blur(2px);
  }

  .drawer-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    padding: 8px 14px calc(18px + env(safe-area-inset-bottom));
    border-radius: 26px 26px 0 0;
    color: #fff;
    background: linear-gradient(180deg, var(--navy-900), var(--navy-950));
    box-shadow: 0 -22px 50px rgba(6, 24, 42, 0.30);
  }

  .drawer-handle {
    width: 44px;
    height: 5px;
    margin: 0 auto 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
  }

  .drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
  }

  .drawer-header h2 {
    margin-bottom: 0;
    font-size: 1.35rem;
  }

  .icon-circle {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    cursor: pointer;
    color: #fff;
    background: rgba(255, 255, 255, 0.10);
    font-size: 1.3rem;
  }

  .drawer-search {
    margin: 13px 0 9px;
  }

  .drawer-list {
    padding-bottom: 4px;
  }

  .drawer-list .dist-button {
    min-height: 62px;
  }
}

@media (min-width: 841px) {
  .desktop-app {
    display: grid;
  }
}

@media print {
  .sidebar,
  .topbar-actions,
  .tabs,
  .mobile-app {
    display: none !important;
  }

  .desktop-app {
    display: block;
  }

  .desktop-main {
    padding: 0;
  }

  .hero-card,
  .mini-card,
  .card,
  .brand-sales-card {
    box-shadow: none;
  }
}

@media (max-width: 840px), (max-aspect-ratio: 3/4), (hover: none) and (pointer: coarse) and (max-width: 1100px) {
  .mobile-section,
  .mobile-content .card,
  .mobile-content .brand-sales-card,
  .mobile-content .notice,
  .mobile-content .empty-state,
  .mobile-content .brand-sales-header,
  .mobile-content .brand-sales-header > div,
  .mobile-content .sales-monthly-panel,
  .mobile-content details.detail-card,
  .mobile-content .detail-body,
  .mobile-content .data-table-wrap,
  .mobile-content .sales-column-chart-wrap {
    min-width: 0;
    max-width: 100%;
  }
}

/* Forecast extension — v3 */
.stat span {
  display: block;
  margin-top: 5px;
  color: var(--ink-500);
  font-size: 0.7rem;
  line-height: 1.35;
}

.forecast-panel {
  display: grid;
  gap: 13px;
  margin-top: 3px;
  padding: 17px;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #eff6ff 0%, #f8fbff 100%);
}

.forecast-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.forecast-header h4 {
  margin: 1px 0 4px;
  font-size: 1.04rem;
}

.forecast-header p:last-child {
  margin: 0;
  color: var(--ink-500);
  font-size: 0.78rem;
}

.forecast-pill {
  color: #1e3a8a;
  border-color: #bfdbfe;
  background: #dbeafe;
}

.forecast-kpis .stat {
  border-color: #dbeafe;
}

.forecast-chart-panel {
  border-color: #dbeafe;
}

.forecast-notes {
  padding: 14px 15px;
  border: 1px solid #dbeafe;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.82);
}

.forecast-notes h4 {
  margin-bottom: 7px;
  font-size: 0.88rem;
}

.forecast-total-row td {
  color: var(--navy-950);
  background: #eff6ff;
}

@media (max-width: 820px), (max-aspect-ratio: 3 / 4) {
  .mobile-content .forecast-panel {
    padding: 13px;
  }

  .mobile-content .forecast-header {
    display: grid;
  }

  .mobile-content .forecast-pill {
    justify-self: start;
  }

  .mobile-content .forecast-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
