:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --hm-bg: #f8fafc;
  --hm-body-bg:
    radial-gradient(circle at top left, rgba(91, 91, 245, 0.12), transparent 30rem),
    linear-gradient(180deg, #fbfbff 0%, #f3f4fb 100%);
  --hm-surface: #ffffff;
  --hm-surface-muted: #f8fafc;
  --hm-border: #e5e7eb;
  --hm-text: #0f172a;
  --hm-muted: #64748b;
  --hm-primary: #4f46e5;
  background: var(--hm-bg);
  color: var(--hm-text);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --hm-bg: #020617;
  --hm-body-bg:
    radial-gradient(circle at top left, rgba(79, 70, 229, 0.2), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 100%);
  --hm-surface: #111827;
  --hm-surface-muted: #0f172a;
  --hm-border: #243044;
  --hm-text: #f8fafc;
  --hm-muted: #94a3b8;
  --hm-primary: #818cf8;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--hm-body-bg);
  color: var(--hm-text);
}

button,
input,
select {
  font: inherit;
}

h1,
h2,
p {
  margin: 0;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at 14% 18%, rgba(64, 172, 255, 0.22), transparent 17rem),
    radial-gradient(circle at 86% 72%, rgba(121, 86, 255, 0.28), transparent 22rem),
    linear-gradient(135deg, #050813 0%, #0c1020 55%, #11162a 100%);
}

.login-panel {
  position: relative;
  width: min(350px, 100%);
  padding: 22px 24px 26px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  background: #ffffff;
  text-align: center;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

.login-close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: 0;
  background: transparent;
  color: #697083;
  font-size: 24px;
  line-height: 1;
  cursor: default;
}

.login-logo-wrap {
  min-height: 68px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #ffe600;
  color: #080719;
  font-weight: 950;
}

.login-logo {
  width: 185px;
  max-width: 100%;
  display: block;
  margin: 0 auto;
  border-radius: 10px;
}

.login-panel > .eyebrow,
.login-panel > .muted {
  display: none;
}

.login-panel h1 {
  margin-top: 0;
  color: #5b5bf5;
  font-size: 27px;
  letter-spacing: 0;
}

.login-subtitle {
  margin-top: 4px;
  color: #808898;
  font-size: 14px;
  font-weight: 700;
}

.muted {
  margin-top: 8px;
  color: #697083;
  line-height: 1.5;
}

.login-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  text-align: left;
}

.login-form label span {
  display: block;
  margin-bottom: 7px;
  color: #40475b;
  font-size: 13px;
  font-weight: 800;
}

.login-form input {
  width: 100%;
  height: 44px;
  border: 1px solid #bfc9ff;
  border-radius: 8px;
  padding: 0 14px;
  outline: 0;
  background: #fbfcff;
  color: #101427;
}

.login-form input:focus {
  border-color: #5b5bf5;
  box-shadow: 0 0 0 4px rgba(91, 91, 245, 0.13);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #7f8798;
  cursor: pointer;
}

.password-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.forgot-link {
  justify-self: end;
  border: 0;
  padding: 0;
  background: transparent;
  color: #5b5bf5;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.login-error {
  color: #d92d20;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.login-submit {
  min-height: 46px;
  margin-top: 4px;
  background: linear-gradient(135deg, #5b5bf5 0%, #40acff 100%);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(91, 91, 245, 0.28);
}

.auth-switch {
  margin-top: 16px;
  color: #808898;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.auth-switch button {
  border: 0;
  padding: 0;
  background: transparent;
  color: #5b5bf5;
  font-weight: 900;
  cursor: pointer;
}

.signup-panel {
  padding: 24px 40px 32px;
  text-align: center;
}

.signup-brand {
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}

.signup-brand img {
  width: 154px;
  max-width: 70%;
  display: block;
}

.signup-heading {
  margin-bottom: 16px;
  text-align: center;
}

.signup-heading h1 {
  margin-top: 0;
  text-align: center;
}

.signup-heading .login-subtitle {
  max-width: none;
  margin-top: 4px;
  color: #697083;
  font-weight: 700;
}

.signup-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #5b5bf5 0%, #40acff 100%);
  color: #fff;
  box-shadow: 0 16px 28px rgba(91, 91, 245, 0.24);
}

.signup-icon.activation {
  background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
  box-shadow: 0 16px 28px rgba(34, 197, 94, 0.2);
}

.signup-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.signup-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
  margin-top: 0;
}

.signup-form label,
.signup-form .login-error,
.signup-form .signup-success,
.signup-form .signup-submit,
.signup-form + .auth-switch {
  min-width: 0;
}

.signup-form label:nth-child(1),
.signup-form label:nth-child(2),
.signup-form .terms-check,
.signup-form .login-error,
.signup-form .signup-success,
.signup-form .signup-submit {
  grid-column: 1 / -1;
}

.signup-form input {
  height: 48px;
  border-radius: 10px;
}

.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 2px;
}

.terms-check input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 1px;
  accent-color: #5b5bf5;
}

.terms-check span {
  margin: 0;
  color: #5f687b;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 750;
}

.signup-panel .auth-switch {
  text-align: center;
}

.signup-success {
  color: #047857;
  padding: 10px 12px;
  border: 1px solid rgba(4, 120, 87, 0.16);
  border-radius: 8px;
  background: #ecfdf5;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.activation-panel {
  padding: 40px 42px 36px;
}

.activation-panel h1 {
  margin-top: 0;
}

@media (max-width: 640px) {
  .signup-panel {
    padding: 28px 24px 30px;
  }

  .signup-brand img {
    max-width: 170px;
    width: 62%;
  }

  .signup-form {
    grid-template-columns: 1fr;
  }
}

.app-layout {
  min-height: 100vh;
  display: block;
}

.side-nav {
  position: sticky;
  top: 0;
  z-index: 15;
  min-height: 56px;
  height: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 24px;
  border-bottom: 1px solid #e4e7f4;
  background: rgba(255, 255, 255, 0.94);
  color: #18213a;
  box-shadow: 0 8px 18px rgba(25, 32, 60, 0.045);
  backdrop-filter: blur(16px);
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 172px;
  padding: 0;
  border-bottom: 0;
}

.side-logo {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 8px;
  object-fit: cover;
}

.side-brand strong {
  display: block;
  color: #18213a;
  font-size: 14px;
}

.side-brand span {
  color: #6f7590;
  font-size: 11px;
  font-weight: 800;
}

.menu-list {
  flex: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 0;
}

.menu-item,
.logout-button,
.ghost-button,
.period,
.chart-tab,
.columns-button,
.page-button {
  cursor: pointer;
}

.menu-item {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  padding: 0 8px;
  background: transparent;
  color: #566176;
  text-decoration: none;
  font-weight: 500;
}

.menu-item:hover {
  color: #5b5bf5;
}

.menu-item.active {
  background: #f0efff;
  color: #5b5bf5;
  font-weight: 600;
}

.menu-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: transparent;
  color: #7a8598;
}

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

.menu-item:hover .menu-icon,
.menu-item.active .menu-icon {
  background: #ecebff;
  color: #5b5bf5;
}

.menu-item.plan-locked,
.submenu-item.plan-locked {
  opacity: 0.62;
  cursor: not-allowed;
}

.menu-item.plan-locked:hover,
.submenu-item.plan-locked:hover {
  color: #566176;
}

.menu-group {
  position: relative;
}

.menu-parent {
  padding-right: 10px;
}

.menu-caret {
  color: #8a93a7;
  font-size: 15px;
  line-height: 1;
}

.submenu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  min-width: 214px;
  padding: 8px;
  border: 1px solid #e1e5f0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 36px rgba(23, 31, 56, 0.14);
}

.submenu-item {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  padding: 0 10px;
  background: transparent;
  color: #3f4a63;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.submenu-item:hover,
.submenu-item.active {
  background: #f0efff;
  color: #5b5bf5;
}

.submenu-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: #7a8598;
}

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

.plan-status {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid #cfd7ff;
  border-radius: 999px;
  background: #f7f8ff;
  color: #4a536d;
  white-space: nowrap;
}

.plan-status span {
  color: #5b5bf5;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.plan-status strong {
  color: #596276;
  font-size: 14px;
  font-weight: 600;
}

.plan-status strong.expiring {
  color: #d92d3c;
  font-weight: 700;
}

.logout-button {
  min-height: 34px;
  margin-top: 0;
  border: 1px solid #dce1f1;
  border-radius: 8px;
  background: #fff;
  color: #4a536d;
  font-weight: 500;
  padding: 0 12px;
}

.app-shell {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 22px 24px 34px;
}

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

.topbar h1 {
  font-size: 28px;
  font-weight: 650;
  letter-spacing: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow {
  color: #5d6478;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero {
  min-height: 190px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 28px;
  border-radius: 12px;
  background: linear-gradient(135deg, #5b5bf5 0%, #6b4ff7 52%, #2fc9b5 100%);
  color: #fff;
  box-shadow: 0 22px 54px rgba(91, 91, 245, 0.20);
}

.hero-main span {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-weight: 600;
}

.hero-main strong {
  display: block;
  margin: 4px 0 20px;
  max-width: min(620px, 100%);
  font-size: clamp(30px, 4vw, 50px);
  font-weight: 650;
  line-height: 1;
  overflow-wrap: anywhere;
}

.hero-main b {
  display: block;
  margin-top: 4px;
  max-width: min(620px, 100%);
  color: #ffffff;
  font-size: clamp(20px, 2.35vw, 32px);
  font-weight: 650;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.hero-actions {
  min-width: min(520px, 100%);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
}

.account-chip {
  max-width: 520px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: visible;
}

.account-toggle {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.account-toggle.active {
  border-color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.92);
  color: #253055;
  box-shadow: 0 10px 24px rgba(21, 29, 58, 0.16);
}

.account-toggle.needs-reconnect {
  border-color: rgba(217, 45, 32, 0.35);
  background: rgba(217, 45, 32, 0.14);
  color: #fff1ef;
}

.account-toggle .marketplace-logo {
  width: 23px;
  height: 23px;
  font-size: 9px;
}

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

.period {
  min-height: 34px;
  padding: 0 17px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-weight: 550;
}

.period.active {
  border-color: #fff;
  background: #fff;
  color: #5b5bf5;
}

.status-pill {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid #dce1ea;
  border-radius: 999px;
  background: #fff;
  color: #687084;
  font-size: 13px;
  font-weight: 550;
}

.status-pill.ok {
  border-color: rgba(0, 200, 117, 0.24);
  color: #06975a;
}

.status-pill.error {
  border-color: rgba(217, 45, 32, 0.25);
  color: #d92d20;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 14px;
  margin-top: -22px;
  padding: 0 16px;
}

.metric-card,
.panel {
  border: 1px solid #e1e5f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(23, 31, 56, 0.07);
}

.metric-card {
  min-width: 0;
  min-height: 108px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
}

.metric-card span {
  color: #525a70;
  font-weight: 600;
}

.metric-card strong {
  margin-top: 10px;
  color: #0f1530;
  font-size: clamp(17px, 1.45vw, 22px);
  font-weight: 650;
  line-height: 1.08;
  overflow-wrap: anywhere;
  max-width: 100%;
}

.metric-card small {
  color: #697083;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  overflow-wrap: anywhere;
  max-width: 100%;
}

.muted-card strong {
  color: #555d71;
}

.panel {
  margin-top: 16px;
  padding: 20px;
}

.executive-view {
  display: grid;
  gap: 16px;
}

.executive-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  padding: 20px;
  border: 1px solid #e1e5f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(23, 31, 56, 0.07);
}

.executive-title h2 {
  margin-top: 4px;
  font-size: 28px;
}

.executive-title span {
  display: block;
  margin-top: 6px;
  color: #687084;
  font-weight: 800;
}

.target-box {
  min-width: 190px;
  padding: 14px 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, #5b5bf5, #2fc9b5);
  color: #fff;
}

.target-box span,
.target-box strong {
  display: block;
  color: #fff;
}

.target-box strong {
  margin-top: 5px;
  font-size: 22px;
}

.target-box button {
  margin-top: 10px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.target-box button:hover {
  background: rgba(255, 255, 255, 0.24);
}

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

.top-executive-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(210px, 0.55fr) minmax(210px, 0.55fr);
}

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

.exec-card {
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid #e1e5f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(23, 31, 56, 0.07);
}

.exec-card header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.exec-card h3 {
  margin: 0;
  color: #20283b;
  font-size: 15px;
  text-transform: uppercase;
}

.exec-card header span {
  color: #687084;
  font-size: 12px;
  font-weight: 850;
}

.exec-card canvas {
  width: 100%;
  display: block;
  max-height: 220px;
}

#dailyRevenueChart,
#dailyOrdersChart,
#ticketChart {
  max-height: 150px;
}

#monthlyGoalChart {
  max-height: 190px;
}

.canvas-tooltip {
  position: fixed;
  z-index: 9999;
  min-width: 132px;
  padding: 8px 10px;
  border: 1px solid rgba(91, 91, 245, 0.26);
  border-radius: 8px;
  background: #070822;
  color: #fff;
  box-shadow: 0 12px 26px rgba(7, 8, 34, 0.2);
  pointer-events: none;
}

.canvas-tooltip strong,
.canvas-tooltip span {
  display: block;
}

.canvas-tooltip strong {
  font-size: 12px;
  color: #cfd7ff;
}

.canvas-tooltip span {
  margin-top: 3px;
  font-size: 14px;
  font-weight: 800;
}

.donut-card {
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.donut-summary {
  margin-top: 4px;
  color: #5b6479;
}

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

.donut-summary span {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.donut-summary strong {
  margin-top: 3px;
  color: #20283b;
}

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

.exec-kpi {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f7f9fd;
}

.exec-kpi span,
.exec-kpi strong,
.exec-kpi small {
  display: block;
}

.exec-kpi span {
  color: #596176;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.exec-kpi strong {
  margin-top: 5px;
  font-size: 20px;
}

.exec-kpi small {
  margin-top: 4px;
  color: #00a765;
  font-weight: 850;
}

.region-stack {
  display: flex;
  height: 42px;
  overflow: hidden;
  border-radius: 8px;
  background: #eef2f6;
}

.region-segment {
  min-width: 2px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 11px;
  font-weight: 950;
}

.region-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.region-chip {
  padding: 10px;
  border: 1px solid #e4e8f2;
  border-radius: 8px;
  background: #fbfcff;
}

.region-chip span,
.region-chip strong {
  display: block;
}

.region-chip span {
  font-size: 12px;
  font-weight: 950;
}

.region-chip strong {
  margin-top: 4px;
}

.exec-table-wrap {
  max-height: 420px;
  overflow: auto;
  border: 1px solid #e5e9f1;
  border-radius: 10px;
}

.exec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.exec-table th,
.exec-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #edf0f6;
  text-align: left;
}

.exec-table th {
  position: sticky;
  top: 0;
  background: #fff;
  color: #687084;
  text-transform: uppercase;
}

.ads-summary-panel {
  display: grid;
  grid-template-columns: minmax(190px, 1.4fr) repeat(5, minmax(120px, 1fr));
  gap: 16px;
  align-items: center;
}

.ads-investment span,
.ads-kpi span {
  display: block;
  color: #5b6479;
  font-weight: 600;
}

.ads-investment > div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ads-investment strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(24px, 2.2vw, 28px);
  font-weight: 650;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.ads-status {
  display: block;
  margin-top: 6px;
  color: #747c92;
  font-size: 12px;
  font-weight: 850;
}

.ads-status.error {
  color: #d92d20;
}

.ads-reconnect {
  width: fit-content;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  border-radius: 8px;
  padding: 0 10px;
  background: #ffe600;
  color: #211d00;
  text-decoration: none;
  font-size: 12px;
  font-weight: 950;
}

.ads-kpi {
  text-align: center;
}

.ads-kpi strong {
  display: block;
  margin-top: 5px;
  font-size: clamp(16px, 1.55vw, 18px);
  font-weight: 600;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.ads-subtract {
  min-height: 26px;
  border: 1px solid #ff6b5f;
  border-radius: 999px;
  padding: 0 10px;
  background: #fff5f4;
  color: #f04438;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.ads-subtract.active::before {
  content: "✓ ";
}

.product-share-panel {
  display: grid;
  gap: 14px;
}

.product-share-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.product-share-tab {
  min-height: 32px;
  padding: 0 18px;
  border: 1px solid #14182a;
  border-radius: 999px;
  background: #fff;
  color: #252b3e;
  font-weight: 500;
}

.product-share-tab.active {
  background: #5b5bf5;
  border-color: #5b5bf5;
  color: #fff;
}

.share-divider {
  width: 1px;
  height: 24px;
  background: #dce1ea;
}

.product-share-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, 1fr);
  grid-template-rows: repeat(4, minmax(0, auto));
  gap: 12px 18px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 4px 8px 2px;
  cursor: grab;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  user-select: none;
}

.product-share-grid.dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.product-share-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 58px 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.share-ring {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: conic-gradient(#5b5bf5 var(--share, 0deg), #dfe3e8 0deg);
  color: #252b3e;
  font-size: 13px;
  font-weight: 650;
  position: relative;
}

.share-ring::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: inherit;
  background: #fff;
}

.share-ring span {
  position: relative;
  z-index: 1;
}

.share-thumb {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border: 1px solid #eef1f6;
  border-radius: 5px;
  background: #f2f5f9;
}

.share-thumb.placeholder {
  display: block;
}

.share-thumb:not(img)::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
}

.share-product {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #edf0f5;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 6px 14px rgba(17, 24, 39, 0.06);
}

.share-product strong,
.share-product span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-product strong {
  color: #252b3e;
  font-size: 13px;
  font-weight: 520;
}

.share-product span {
  margin-top: 3px;
  color: #6b7280;
  font-size: 12px;
}

.product-share-empty {
  margin: 0;
  color: #6b7280;
}

.connection-panel {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.panel p {
  margin-top: 7px;
  color: #697083;
  line-height: 1.5;
}

.button,
.ghost-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 16px;
  text-decoration: none;
  font-weight: 600;
}

.button {
  border: 0;
  background: #5b5bf5;
  color: #fff;
}

.primary-button {
  width: 100%;
  background: #5b5bf5;
  color: #fff;
}

.primary-button.login-submit {
  background: linear-gradient(135deg, #5b5bf5 0%, #40acff 100%);
  color: #ffffff;
}

.button.disabled {
  pointer-events: none;
  background: #d8dde7;
  color: #6f7688;
}

.ghost-button {
  border: 1px solid #dce1ea;
  background: #fff;
  color: #101427;
}

.panel-stack {
  display: block;
}

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

.section-header h2 {
  margin-top: 4px;
}

.chart-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.chart-tab {
  min-height: 34px;
  padding: 0 18px;
  border: 1px solid #14182a;
  border-radius: 999px;
  background: #fff;
  color: #252b3e;
  font-weight: 850;
}

.chart-tab.active {
  background: #5b5bf5;
  color: #fff;
  border-color: #5b5bf5;
}

#periodChart {
  width: 100%;
  height: 100%;
  display: block;
}

.period-chart-wrap {
  width: 100%;
  height: clamp(180px, 22vw, 260px);
  min-height: 180px;
  overflow: hidden;
}

.chart-tooltip {
  position: fixed;
  z-index: 50;
  min-width: 138px;
  padding: 10px 12px;
  border: 1px solid rgba(91, 91, 245, 0.18);
  border-radius: 8px;
  background: #151830;
  color: #fff;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.22);
  pointer-events: none;
}

.chart-tooltip strong,
.chart-tooltip span {
  display: block;
}

.chart-tooltip strong {
  color: #d7d9ff;
  font-size: 12px;
}

.chart-tooltip span {
  margin-top: 3px;
  font-size: 15px;
  font-weight: 950;
}

.grid-toolbar {
  min-width: min(520px, 100%);
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.filter-box {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-radius: 8px;
  background: #eef2f6;
  color: #101427;
}

.grid-toolbar .filter-box {
  flex: 1;
}

.filter-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
}

.filter-select {
  height: 42px;
  min-width: 150px;
  border: 1px solid #dce1ea;
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: #252d40;
  font-weight: 850;
}

.columns-menu {
  position: relative;
}

.columns-button {
  height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  background: #5b5bf5;
  color: #fff;
  font-weight: 950;
}

.columns-popover {
  position: absolute;
  top: 48px;
  right: 0;
  z-index: 10;
  width: 194px;
  padding: 10px;
  border: 1px solid #dce1ea;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 20px 46px rgba(22, 28, 44, 0.18);
}

.columns-popover label {
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #273044;
  font-weight: 800;
}

.hidden-column {
  display: none;
}

.sales-table-wrap {
  overflow: auto;
  border: 1px solid #e5e9f1;
  border-radius: 10px;
}

.sales-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  font-size: 13px;
}

.sales-table th,
.sales-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #d6dce6;
  text-align: left;
  vertical-align: middle;
}

.sales-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
  color: #22283a;
  font-weight: 950;
}

.sortable-header {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font-weight: inherit;
  cursor: pointer;
}

.sortable-header:hover,
.sortable-header.active {
  color: #5b5bf5;
}

.sort-indicator {
  color: #8790a3;
  font-size: 12px;
  line-height: 1;
}

.sortable-header.active .sort-indicator {
  color: #5b5bf5;
}

.sales-table tr:nth-child(even) td {
  background: #f4f6f9;
}

.product-photo {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: #eef2f6;
}

.title-cell {
  max-width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cost-open {
  border: 0;
  background: transparent;
  color: #101427;
  font-weight: 950;
}

.cost-open::after {
  content: " edit";
  color: #7f8798;
  font-size: 11px;
}

.profit-pill {
  min-width: 80px;
  display: inline-flex;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: #151830;
  color: #38e2a3;
  font-weight: 950;
}

.profit-negative {
  color: #ff665c;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 14px 0 0;
  color: #30384c;
}

.page-button {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #080719;
  font-size: 28px;
  line-height: 1;
}

.pagination select {
  height: 32px;
  border: 0;
  border-bottom: 1px solid #aeb6c4;
  background: transparent;
}

.placeholder-panel {
  border-style: dashed;
  background: #fbfcfe;
}

.module-panel {
  padding: 0;
  overflow: hidden;
}

.module-titlebar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid #e3e7f3;
  background: #f8f8ff;
}

.module-titlebar h2 {
  margin-top: 3px;
  color: #24304b;
}

.ads-titlebar {
  background: #5b5bf5;
  color: #fff;
}

.ads-titlebar .eyebrow,
.ads-titlebar h2 {
  color: #fff;
}

.ads-titlebar .chart-tab {
  border-color: transparent;
  background: #fff;
  color: #2b3150;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 18px;
}

.module-card {
  min-height: 170px;
  padding: 18px;
  border: 1px solid #e2e6f2;
  border-radius: 10px;
  background: #fff;
}

.module-card span {
  display: block;
  color: #5b5bf5;
  font-weight: 950;
}

.module-card strong {
  display: block;
  margin-top: 14px;
  color: #1f2943;
  font-size: 24px;
}

.module-card small {
  display: block;
  margin-top: 8px;
  color: #6f7890;
  font-weight: 800;
}

.accent-purple {
  color: #fff;
  background: linear-gradient(135deg, #5b5bf5, #7b61ff);
}

.accent-purple span,
.accent-purple strong,
.accent-purple small {
  color: #fff;
}

.action-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.action-list p {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid #edf0f7;
}

.compact-field {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: #5b6479;
  font-size: 13px;
  font-weight: 850;
}

.compact-field input {
  height: 38px;
  border: 1px solid #ccd3e2;
  border-radius: 6px;
  padding: 0 10px;
}

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

.full-filter {
  min-width: min(360px, 100%);
  background: #f0f3f8;
}

.full-account-filter {
  min-width: 190px;
  background: #f0f3f8;
}

.full-account-filter select {
  width: 100%;
  border: 0;
  background: transparent;
  color: #101427;
  font: inherit;
  outline: none;
}

.full-filter span,
.full-account-filter span {
  color: #697083;
  font-size: 12px;
  font-weight: 500;
}

.full-layout {
  padding: 18px;
}

.full-planning-strip {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) minmax(280px, 0.72fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

.full-strategy-card {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(170px, 0.9fr) minmax(150px, 0.7fr) minmax(150px, 0.7fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #dfe5f3;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(24, 32, 62, 0.06);
}

.strategy-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.strategy-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #5b5bf5, #40acff);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.full-strategy-card h3 {
  margin: 0;
  color: #303957;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.15;
}

.full-strategy-card .compact-field {
  margin-top: 0;
  gap: 5px;
  font-size: 11px;
  line-height: 1.2;
}

.full-strategy-card .compact-field input {
  height: 34px;
}

.full-strategy-card input[type="range"] {
  width: 100%;
  grid-column: 1 / -1;
  margin: 0;
  accent-color: #5b5bf5;
}

#fullStrategyStatus {
  margin-top: 4px;
  color: #0a8f5a;
  font-weight: 500;
}

.full-content {
  min-width: 0;
}

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

.full-kpi-grid .module-card {
  min-height: 122px;
  padding: 14px;
}

.full-kpi-grid .module-card span,
.full-kpi-grid .module-card small,
.full-strategy-card .compact-field {
  font-weight: 500;
}

.full-kpi-grid .module-card strong {
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 500;
}

.full-note {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #e2e8f5;
  border-radius: 8px;
  background: #f7f8fc;
  color: #5d667c;
  font-size: 12px;
  font-weight: 500;
}

.full-table-wrap {
  max-height: 640px;
  overflow: auto;
}

.full-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #5b5bf5;
  color: #fff;
  font-weight: 500;
}

.full-table th small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
}

.full-sales-breakdown {
  display: block;
  margin-top: 3px;
  color: #67738d;
  font-size: 11px;
  font-weight: 400;
}

.full-send-pill {
  min-width: 54px;
  display: inline-flex;
  justify-content: center;
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 500;
}

.full-table strong,
.full-table b,
.full-strategy-card strong,
.full-strategy-card b {
  font-weight: 500;
}

.full-send-pill.full-send {
  background: #fff0d2;
  color: #9a5b00;
}

.full-send-pill.full-ok {
  background: #dcfce7;
  color: #047857;
}

.full-page {
  display: grid;
  gap: 22px;
  max-width: 1580px;
  margin: 0 auto;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.full-page[hidden] {
  display: none;
}

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

.full-page-header h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.full-page-header p {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 16px;
}

.full-page .full-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
}

.full-control {
  min-width: 220px;
  height: 48px;
  display: grid;
  align-items: center;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.05);
}

.full-control span {
  display: none;
}

.full-control select {
  width: 100%;
  border: 0;
  background: transparent;
  color: #0f172a;
  font: 600 14px Inter, sans-serif;
  outline: 0;
  padding: 0 16px;
}

.full-refresh-button {
  min-height: 48px;
  border-radius: 12px;
  padding-inline: 24px;
  background: #4f46e5;
  box-shadow: 0 18px 36px rgba(79, 70, 229, 0.22);
}

.full-kpi-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.full-kpi-card {
  display: flex;
  gap: 18px;
  align-items: center;
  min-height: 124px;
  padding: 22px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.06);
}

.full-kpi-card.attention {
  background: linear-gradient(135deg, #fff 0%, #fffbeb 100%);
  border-color: #fde68a;
}

.full-kpi-card.safe {
  background: linear-gradient(135deg, #fff 0%, #ecfdf5 100%);
  border-color: #bbf7d0;
}

.full-kpi-icon {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
}

.full-kpi-icon svg,
.full-search svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.full-kpi-icon.success {
  color: #16a34a;
  background: #dcfce7;
}

.full-kpi-icon.warning {
  color: #f97316;
  background: #ffedd5;
}

.full-kpi-icon.blue {
  color: #2563eb;
  background: #dbeafe;
}

.full-kpi-icon.purple {
  color: #4f46e5;
  background: #ede9fe;
}

.full-kpi-card p,
.full-kpi-card strong,
.full-kpi-card small {
  display: block;
}

.full-kpi-card p {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 15px;
  font-weight: 700;
}

.full-kpi-card strong {
  color: #0f172a;
  font-size: clamp(26px, 2.2vw, 36px);
  line-height: 1;
  font-weight: 700;
}

.full-kpi-card small {
  margin-top: 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
}

.full-insights-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.8fr 1.35fr;
  gap: 18px;
}

.full-card,
.full-table-card {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.06);
}

.full-card {
  padding: 22px;
  min-height: 266px;
}

.full-card h3,
.full-table-card h3 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  font-weight: 700;
}

.full-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.full-card-head span {
  padding: 10px 14px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
}

.full-donut-layout {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(170px, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.full-legend {
  display: grid;
  gap: 14px;
}

.full-legend-item {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  gap: 10px;
  align-items: center;
  color: #0f172a;
  font-size: 14px;
}

.full-legend-item span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--legend-color);
}

.full-legend-item strong {
  font-weight: 600;
}

.full-legend-item em {
  color: #334155;
  font-style: normal;
  font-weight: 700;
}

.full-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.full-status-card {
  min-height: 90px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
}

.full-status-card strong {
  font-size: 22px;
  font-weight: 700;
}

.full-status-card span {
  font-weight: 700;
}

.full-status-card small {
  color: #64748b;
}

.full-status-card.critical {
  color: #dc2626;
  background: #fef2f2;
  border-color: #fecaca;
}

.full-status-card.warning {
  color: #f97316;
  background: #fff7ed;
  border-color: #fed7aa;
}

.full-status-card.stable {
  color: #ca8a04;
  background: #fefce8;
  border-color: #fde68a;
}

.full-status-card.safe {
  color: #16a34a;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.full-strategy-row {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) minmax(360px, 0.9fr);
  gap: 18px;
}

.full-page .full-strategy-card {
  grid-template-columns: minmax(190px, 0.9fr) minmax(160px, 0.7fr) minmax(160px, 0.7fr);
  padding: 18px;
  border-radius: 16px;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.06);
}

.full-page .strategy-icon {
  background: #4f46e5;
  border-radius: 14px;
}

.full-page .full-note {
  display: flex;
  align-items: center;
  min-height: 100%;
  padding: 18px;
  border-radius: 16px;
  background: #f8fafc;
  color: #475569;
  line-height: 1.55;
}

.full-table-card {
  overflow: hidden;
}

.full-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 12px;
}

.full-table-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.full-search {
  min-width: min(360px, 100%);
  height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  color: #64748b;
}

.full-search span {
  display: grid;
  place-items: center;
}

.full-search svg {
  width: 18px;
  height: 18px;
}

.full-search input {
  width: 100%;
  border: 0;
  background: transparent;
  color: #0f172a;
  font: 500 14px Inter, sans-serif;
  outline: none;
}

.full-table-filters select,
.full-table-filters .ghost-button {
  min-height: 44px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font: 600 14px Inter, sans-serif;
  padding: 0 14px;
}

.full-table-scroll {
  overflow-x: auto;
}

.full-page .full-table {
  min-width: 1180px;
  border-collapse: collapse;
}

.full-page .full-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 14px 16px;
  background: #f8fafc;
  color: #0f172a;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  font-size: 13px;
  font-weight: 700;
}

.full-page .full-table th small {
  color: #64748b;
  font-weight: 600;
}

.full-page .full-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
  color: #0f172a;
  font-size: 14px;
}

.full-page .full-table tr:hover td {
  background: #f8fafc;
}

.full-page .product-photo {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.full-page .title-cell {
  max-width: 260px;
}

.send-suggestion {
  color: #4f46e5;
  font-weight: 700;
}

.danger-text {
  color: #ef4444;
}

.coverage-pill,
.full-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-critical {
  color: #dc2626;
  background: #fee2e2;
}

.status-warning {
  color: #ea580c;
  background: #ffedd5;
}

.status-stable {
  color: #ca8a04;
  background: #fef3c7;
}

.status-safe {
  color: #15803d;
  background: #dcfce7;
}

.full-detail-button {
  border-radius: 10px;
  color: #0f172a;
}

.full-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px 20px;
  color: #64748b;
  font-size: 14px;
}

.full-pagination > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.full-page-button {
  min-width: 40px;
  height: 40px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font-weight: 700;
  cursor: pointer;
}

.full-page-button.active {
  border-color: #4f46e5;
  background: #4f46e5;
  color: #fff;
  box-shadow: 0 14px 28px rgba(79, 70, 229, 0.22);
}

.full-page-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

@media (max-width: 1280px) {
  .full-kpi-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .full-insights-grid,
  .full-strategy-row {
    grid-template-columns: 1fr;
  }

  .full-page .full-strategy-card {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .full-page-header,
  .full-table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .full-page .full-actions,
  .full-table-filters {
    justify-content: flex-start;
  }

  .full-kpi-row {
    grid-template-columns: 1fr;
  }

  .full-donut-layout,
  .full-page .full-strategy-card {
    grid-template-columns: 1fr;
  }

  .full-pagination {
    align-items: flex-start;
    flex-direction: column;
  }
}

.ads-manager {
  display: grid;
  gap: 18px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.ads-manager[hidden] {
  display: none;
}

.ads-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 28px 32px;
  border-radius: 14px;
  background: linear-gradient(135deg, #111827 0%, #24304f 58%, #3b5bdb 100%);
  color: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.13);
}

.ads-hero h2 {
  margin: 2px 0 5px;
  color: #fff;
  font-size: 24px;
}

.ads-hero .eyebrow,
.ads-hero span {
  color: rgba(255, 255, 255, 0.78);
}

.ads-hero-actions,
.ads-overview-toolbar,
.ads-campaign-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.ads-hero-actions > .chart-tab {
  display: none;
}

.ads-plan-slot {
  display: flex;
  align-items: center;
}

.ads-plan-slot .plan-status {
  min-height: 42px;
  border-color: rgba(199, 210, 254, 0.85);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

.ads-manager .chart-tab,
.ads-manager .ghost-button {
  min-height: 34px;
  border-color: #dce3ef;
  background: #fff;
}

.ads-overview-card {
  overflow: hidden;
  border: 1px solid #dde4f1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.04);
}

.ads-overview-toolbar {
  justify-content: space-between;
  padding: 10px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #e6ebf4;
}

.ads-overview-toolbar > .ads-filter-pill:not(.ads-period-trigger) {
  display: none;
}

.ads-live-pill,
.ads-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.ads-period-filter {
  position: relative;
}

.ads-account-filter {
  position: relative;
}

.ads-account-select {
  width: 220px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 10px;
  padding: 0 38px 0 14px;
  background: #fff;
  color: #111827;
  font: inherit;
  font-size: 14px;
  font-weight: 850;
  outline: 0;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.16);
}

.ads-period-trigger {
  cursor: pointer;
}

.ads-period-trigger span {
  font: inherit;
}

.ads-period-trigger small {
  display: none;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.ads-period-trigger::after {
  content: "⌄";
  color: #475569;
  font-size: 12px;
}

.ads-period-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  width: 220px;
  overflow: hidden;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
}

.ads-period-option {
  width: 100%;
  display: grid;
  gap: 3px;
  border: 0;
  padding: 10px 13px;
  background: #fff;
  color: #1f2937;
  text-align: left;
  cursor: pointer;
}

.ads-period-option:hover,
.ads-period-option.active {
  background: #f1f5ff;
}

.ads-period-option span {
  color: inherit;
  font-size: 13px;
  font-weight: 800;
}

.ads-period-option small {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.ads-period-option.active span {
  color: #2563eb;
}

.ads-live-pill span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #fb7185;
}

.ads-overview-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-bottom: 1px solid #e6ebf4;
}

.ads-overview-metric {
  position: relative;
  min-height: 94px;
  padding: 14px 13px;
  border-right: 1px solid #e6ebf4;
  background: #fff;
}

.ads-overview-metric:last-child {
  border-right: 0;
}

.ads-overview-metric.active::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: #3b82f6;
}

.ads-overview-metric span,
.ads-overview-metric small,
.ads-metric-grid span,
.ads-metric-grid small {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.ads-overview-metric strong {
  display: block;
  margin: 8px 0 5px;
  color: #0f172a;
  font-size: 21px;
  line-height: 1.1;
}

.ads-chart-panel {
  position: relative;
  min-height: 250px;
  padding: 22px 24px 52px;
  background:
    linear-gradient(#eef2f7 1px, transparent 1px) 0 28px / 100% 42px,
    #fff;
}

.ads-chart-bars {
  position: absolute;
  inset: 54px 34px 82px;
  display: grid;
  grid-template-columns: repeat(var(--bar-count, 18), minmax(8px, 1fr));
  grid-template-rows: 1fr;
  align-items: end;
  gap: clamp(6px, 0.8vw, 12px);
  overflow: visible;
}

.ads-chart-bars span,
.ads-chart-bar {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 3px;
  height: 100%;
  max-height: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: filter 0.18s ease, transform 0.18s ease;
}

.ads-chart-bar i {
  display: block;
  width: min(14px, 42%);
  min-width: 3px;
  border-radius: 4px 4px 0 0;
}

.ads-chart-bar i.revenue {
  height: var(--revenue-h);
  min-height: 12px;
  background: linear-gradient(180deg, #bfdbfe 0%, #93c5fd 100%);
}

.ads-chart-bar i.cost {
  height: var(--cost-h);
  min-height: 12px;
  background: #3b82f6;
}

.ads-chart-bar:hover,
.ads-chart-bar:focus-visible {
  filter: saturate(1.12);
  outline: 2px solid rgba(59, 130, 246, 0.35);
  outline-offset: 3px;
  transform: translateY(-2px);
}

.ads-line-legend {
  position: absolute;
  top: -2px;
  left: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
}

.ads-line-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ads-line-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.ads-line-legend i.revenue {
  background: #22c7b8;
}

.ads-line-legend i.cost {
  background: #514bff;
}

.ads-line-chart {
  position: absolute;
  inset: 20px 0 0;
  width: 100%;
  height: calc(100% - 20px);
  overflow: visible;
}

.ads-line-grid {
  stroke: #dfe6ef;
  stroke-width: 1;
}

.ads-line-area {
  fill: url(#adsRevenueArea);
}

.ads-line-series {
  fill: none;
  stroke-width: 3.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.ads-line-series.revenue {
  stroke: #22c7b8;
}

.ads-line-series.cost {
  stroke: #514bff;
}

.ads-line-axis,
.ads-line-x-label {
  fill: #64748b;
  font-size: 11px;
  font-weight: 500;
}

.ads-line-dot {
  opacity: 0;
  stroke: #fff;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.ads-line-dot.revenue {
  fill: #22c7b8;
}

.ads-line-dot.cost {
  fill: #514bff;
}

.ads-line-hover-rule {
  opacity: 0;
  stroke: #94a3b8;
  stroke-dasharray: 4 4;
  vector-effect: non-scaling-stroke;
}

.ads-line-hit {
  fill: transparent;
  cursor: pointer;
}

.ads-line-point:hover .ads-line-dot,
.ads-line-point:focus-visible .ads-line-dot,
.ads-line-point:hover .ads-line-hover-rule,
.ads-line-point:focus-visible .ads-line-hover-rule {
  opacity: 1;
}

.ads-line-point:focus-visible {
  outline: none;
}

.ads-chart-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.ads-chart-footer {
  position: absolute;
  right: 24px;
  bottom: 16px;
  left: 24px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: #64748b;
  font-size: 12px;
}

.ads-chart-footer b {
  color: #334155;
}

.ads-education-card {
  display: grid;
  grid-template-columns: minmax(240px, 0.58fr) minmax(0, 1.42fr);
  gap: 18px;
  align-items: stretch;
  padding: 18px;
  border: 1px solid #dfe7f3;
  border-radius: 16px;
  background:
    radial-gradient(circle at top left, rgba(79, 70, 229, 0.1), transparent 28rem),
    linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.045);
}

.ads-education-heading {
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 4px 8px;
}

.ads-education-heading h3 {
  margin: 0;
  color: #111827;
  font-size: clamp(20px, 1.7vw, 28px);
  line-height: 1.1;
}

.ads-education-heading span {
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

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

.ads-education-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  min-height: 154px;
  padding: 16px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.035);
}

.ads-education-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: var(--ads-education-color);
  background: var(--ads-education-bg);
}

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

.ads-education-item strong,
.ads-education-item p,
.ads-education-item small {
  display: block;
}

.ads-education-item strong {
  color: #0f172a;
  font-size: 16px;
}

.ads-education-item p {
  margin: 6px 0 8px;
  color: #1f2937;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.38;
}

.ads-education-item small {
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.ads-education-item.roas {
  --ads-education-bg: #dbeafe;
  --ads-education-color: #2563eb;
}

.ads-education-item.acos {
  --ads-education-bg: #fee2e2;
  --ads-education-color: #ef4444;
}

.ads-education-item.tacos {
  --ads-education-bg: #dcfce7;
  --ads-education-color: #16a34a;
}

.ads-management-grid {
  display: grid;
  grid-template-columns: minmax(440px, 1.04fr) minmax(420px, 0.96fr);
  gap: 16px;
  margin: 0;
}

.ads-alerts,
.ads-metrics,
.ads-campaign-preview {
  overflow: hidden;
  border: 1px solid #dde4f1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(31, 41, 55, 0.06);
}

.ads-alerts header,
.ads-metrics header,
.ads-campaign-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid #e8edf6;
  background: #f9fafb;
}

.ads-alerts h3,
.ads-metrics h3,
.ads-campaign-preview h3 {
  margin: 2px 0 0;
  color: #172033;
}

.ads-alerts header strong {
  padding: 6px 10px;
  border-radius: 999px;
  background: #ede9fe;
  color: #5b21b6;
  font-size: 12px;
}

.ads-alert-table {
  overflow-x: auto;
}

.ads-alert-heading,
.ads-alert-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.4fr) 58px 80px 104px 118px 70px 42px;
  gap: 10px;
  align-items: center;
  min-width: 720px;
  padding: 12px 14px;
}

.ads-alert-heading {
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.ads-alert-row {
  border-top: 1px solid #edf2f7;
  border-left: 4px solid #cbd5e1;
  color: #111827;
}

.ads-alert-row.danger {
  border-left-color: #ef4444;
}

.ads-alert-row.warning {
  border-left-color: #f59e0b;
}

.ads-alert-row.info {
  border-left-color: #06b6d4;
}

.ads-alert-row span {
  font-weight: 800;
}

.ads-alert-row b {
  color: #ef4444;
  font-size: 13px;
}

.ads-alert-row.warning b:nth-child(5),
.ads-alert-row.info b:nth-child(5) {
  color: #16a34a;
}

.ads-arrow-button {
  width: 32px;
  height: 32px;
  border: 1px solid #8b5cf6;
  border-radius: 8px;
  background: #fff;
  color: #6d28d9;
  cursor: pointer;
}

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

.ads-metric-grid div {
  min-height: 96px;
  padding: 14px;
  border: 1px solid #edf2f7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

.ads-metric-grid strong {
  display: block;
  margin: 7px 0 5px;
  color: #111827;
  font-size: 23px;
  line-height: 1.05;
}

.ads-campaign-preview {
  margin: 0;
}

.campaign-row {
  display: grid;
  grid-template-columns: 48px minmax(220px, 1.45fr) 72px repeat(5, minmax(92px, 0.7fr)) minmax(132px, auto);
  gap: 14px;
  align-items: center;
  padding: 15px 16px;
  border-top: 1px solid #edf2f7;
}

.campaign-row.attention {
  background: #f3f4ff;
}

.campaign-thumb {
  width: 46px;
  height: 46px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid #dbe3f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #4f46e5;
  font-size: 11px;
  font-weight: 950;
}

.campaign-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.campaign-name strong {
  display: block;
  color: #0f172a;
}

.campaign-name span,
.campaign-name small,
.campaign-row span small {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.campaign-row > b {
  justify-self: start;
  padding: 5px 10px;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font-size: 12px;
}

.campaign-row > b.paused {
  background: #f59e0b;
}

.campaign-row > b.removed {
  background: #64748b;
}

.campaign-row > span strong {
  display: block;
  color: #1f2937;
  font-size: 15px;
}

.campaign-actions {
  display: grid;
  gap: 7px;
}

.campaign-actions .button,
.campaign-actions .ghost-button {
  justify-content: center;
  min-height: 34px;
  text-decoration: none;
}

.ads-campaign-empty {
  padding: 22px 16px;
  color: #64748b;
  font-weight: 800;
}

.ads-campaign-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid #edf2f7;
  background: #f8fafc;
}

.ads-campaign-pagination span,
.ads-campaign-pagination strong {
  color: #475569;
  font-size: 12px;
  font-weight: 850;
}

.ads-campaign-pagination div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ads-campaign-detail {
  display: grid;
  gap: 16px;
  margin: 0;
}

.ads-campaign-detail[hidden] {
  display: none;
}

.ads-detail-header,
.ads-detail-chart-card {
  position: relative;
  border: 1px solid #dde4f1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(31, 41, 55, 0.06);
}

.ads-detail-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
}

.ads-detail-header h3 {
  margin: 2px 0 4px;
  color: #111827;
  font-size: 22px;
}

.ads-detail-header span {
  color: #64748b;
  font-size: 13px;
  font-weight: 750;
}

.ads-detail-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.ads-detail-kpis article {
  position: relative;
  min-height: 92px;
  padding: 16px 14px 14px 58px;
  overflow: hidden;
  border: 1px solid #e3e9f4;
  border-radius: 12px;
  background:
    radial-gradient(circle at 18px 18px, var(--ads-detail-kpi-glow, rgba(79, 70, 229, 0.08)), transparent 58px),
    #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.035);
}

.ads-detail-kpis article::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 14px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--ads-detail-kpi-bg, #eef2ff);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.ads-detail-kpis article::after {
  content: "";
  position: absolute;
  top: 24px;
  left: 22px;
  width: 16px;
  height: 16px;
  background: var(--ads-detail-kpi-color, #4f46e5);
  mask: var(--ads-detail-kpi-icon) center / contain no-repeat;
  -webkit-mask: var(--ads-detail-kpi-icon) center / contain no-repeat;
}

.ads-detail-kpis article:nth-child(1) {
  --ads-detail-kpi-bg: #dcfce7;
  --ads-detail-kpi-color: #16a34a;
  --ads-detail-kpi-glow: rgba(22, 163, 74, 0.12);
  --ads-detail-kpi-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 18V7M9 18V5M14 18v-7M19 18V9'/%3E%3Cpath d='M3 18h18'/%3E%3C/g%3E%3C/svg%3E");
}

.ads-detail-kpis article:nth-child(2) {
  --ads-detail-kpi-bg: #ffedd5;
  --ads-detail-kpi-color: #f97316;
  --ads-detail-kpi-glow: rgba(249, 115, 22, 0.12);
  --ads-detail-kpi-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2v20'/%3E%3Cpath d='M17 5H9.5a3.5 3.5 0 0 0 0 7H14a3.5 3.5 0 0 1 0 7H6'/%3E%3C/g%3E%3C/svg%3E");
}

.ads-detail-kpis article:nth-child(3) {
  --ads-detail-kpi-bg: #dbeafe;
  --ads-detail-kpi-color: #2563eb;
  --ads-detail-kpi-glow: rgba(37, 99, 235, 0.12);
  --ads-detail-kpi-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 16 5-5 4 4 7-8'/%3E%3Cpath d='M14 7h6v6'/%3E%3C/g%3E%3C/svg%3E");
}

.ads-detail-kpis article:nth-child(4) {
  --ads-detail-kpi-bg: #fee2e2;
  --ads-detail-kpi-color: #ef4444;
  --ads-detail-kpi-glow: rgba(239, 68, 68, 0.11);
  --ads-detail-kpi-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 5 5 19'/%3E%3Ccircle cx='7.5' cy='7.5' r='2.5'/%3E%3Ccircle cx='16.5' cy='16.5' r='2.5'/%3E%3C/g%3E%3C/svg%3E");
}

.ads-detail-kpis article:nth-child(5) {
  --ads-detail-kpi-bg: #ede9fe;
  --ads-detail-kpi-color: #7c3aed;
  --ads-detail-kpi-glow: rgba(124, 58, 237, 0.12);
  --ads-detail-kpi-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4 15 15'/%3E%3Cpath d='m9 16 2-6 6-2-4 12-2-5-5 2Z'/%3E%3C/g%3E%3C/svg%3E");
}

.ads-detail-kpis article:nth-child(6) {
  --ads-detail-kpi-bg: #ccfbf1;
  --ads-detail-kpi-color: #0f766e;
  --ads-detail-kpi-glow: rgba(15, 118, 110, 0.12);
  --ads-detail-kpi-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-6 10-6 10 6 10 6-3.5 6-10 6S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/g%3E%3C/svg%3E");
}

.ads-detail-kpis span,
.ads-detail-kpis small {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.ads-detail-kpis strong {
  display: block;
  margin: 7px 0 4px;
  color: #0f172a;
  font-size: 22px;
}

.ads-ai-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid #dde4f1;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 12px 30px rgba(31, 41, 55, 0.05);
}

.ads-ai-card h3 {
  margin: 2px 0 4px;
  color: #111827;
  font-size: 18px;
}

.ads-ai-card span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.ads-ai-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ads-ai-card li {
  position: relative;
  padding-left: 18px;
  color: #334155;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}

.ads-ai-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #4f46e5;
}

.ads-detail-chart-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid #e8edf6;
}

.ads-detail-chart-card h3 {
  margin: 2px 0 0;
  color: #172033;
}

.ads-detail-period-filter {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.ads-detail-period-filter > span {
  color: #1f2937;
  font-size: 13px;
  font-weight: 800;
}

.ads-detail-period-filter > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ads-detail-chart {
  position: relative;
  min-height: 250px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20px, 1fr));
  align-items: end;
  gap: 13px;
  padding: 28px 28px 34px;
  background:
    linear-gradient(#eef2f7 1px, transparent 1px) 0 28px / 100% 48px,
    #fff;
}

.ads-detail-chart.empty {
  align-items: center;
  display: flex;
  justify-content: center;
}

.ads-detail-chart-empty {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.ads-detail-bar {
  position: relative;
  align-self: end;
  height: var(--h);
  min-height: 36px;
  border: 0;
  border-radius: 5px 5px 0 0;
  background: #c7dcff;
  cursor: pointer;
  padding: 0;
  transition: filter 0.18s ease, transform 0.18s ease;
}

.ads-detail-bar::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: var(--l);
  border-radius: inherit;
  background: #3b82f6;
}

.ads-detail-bar:hover,
.ads-detail-bar:focus-visible {
  filter: saturate(1.1);
  outline: 2px solid rgba(59, 130, 246, 0.35);
  outline-offset: 3px;
  transform: translateY(-2px);
}

.ads-detail-bar span {
  position: absolute;
  left: 50%;
  bottom: -24px;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) rotate(-28deg);
  transform-origin: center;
  white-space: nowrap;
}

.ads-detail-bar:hover span,
.ads-detail-bar:focus-visible span {
  opacity: 1;
}

.ads-chart-tooltip {
  position: absolute;
  z-index: 5;
  width: 210px;
  display: grid;
  gap: 5px;
  padding: 10px 11px;
  border-radius: 7px;
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  font-size: 12px;
  line-height: 1.25;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.24);
  pointer-events: none;
}

.ads-chart-tooltip[hidden] {
  display: none;
}

.ads-chart-tooltip strong {
  font-size: 12px;
}

.ads-chart-tooltip span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ads-chart-tooltip i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.ads-chart-tooltip i.blue {
  background: #93c5fd;
}

.ads-chart-tooltip i.pink {
  background: #514bff;
}

.ads-chart-tooltip i.orange {
  background: #f97316;
}

.finance-panel {
  overflow: hidden;
}

.finance-source {
  display: inline-block;
  margin-top: 4px;
  color: #697083;
  font-size: 13px;
  font-weight: 400;
}

.filter-select {
  height: 40px;
  min-width: 130px;
  border: 1px solid #d8deec;
  border-radius: 8px;
  background: #fff;
  color: #18233d;
  padding: 0 12px;
  font-weight: 500;
}

.finance-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  border-top: 1px solid #eef1f7;
}

.finance-kpi,
.finance-card {
  border: 1px solid #e2e8f5;
  border-radius: 10px;
  background: #fff;
}

.finance-kpi {
  min-height: 112px;
  padding: 16px;
}

.finance-kpi span,
.finance-kpi small {
  display: block;
  color: #697083;
  font-weight: 400;
}

.finance-kpi strong {
  display: block;
  margin: 10px 0 6px;
  color: #071026;
  font-size: clamp(22px, 2.2vw, 32px);
  font-weight: 500;
  line-height: 1.1;
}

.finance-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 14px;
  padding: 0 16px 16px;
}

.finance-card {
  min-width: 0;
  padding: 16px;
}

.finance-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.finance-card h3 {
  margin: 0;
  color: #10192f;
  font-size: 18px;
  font-weight: 500;
}

.finance-card canvas {
  width: 100%;
  display: block;
}

.finance-chart-wrap {
  width: 100%;
  height: 230px;
  min-height: 230px;
  overflow: hidden;
}

.finance-chart-wrap canvas {
  height: 100%;
}

.finance-release-list,
.finance-payables {
  display: grid;
  gap: 10px;
}

.finance-release-row,
.finance-payable-row {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #eef1f7;
  border-radius: 8px;
  background: #f8faff;
}

.finance-release-row {
  grid-template-columns: 70px 1fr auto;
  align-items: center;
}

.finance-release-row span,
.finance-payable-row span {
  color: #5b5bf5;
  font-weight: 500;
}

.finance-release-row strong,
.finance-payable-row strong {
  color: #071026;
  font-size: 18px;
  font-weight: 500;
}

.finance-release-row small,
.finance-payable-row small,
.finance-empty {
  color: #697083;
  font-weight: 400;
}

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

.finance-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.finance-table th,
.finance-table td {
  padding: 12px;
  border-bottom: 1px solid #edf0f7;
  text-align: left;
  font-weight: 400;
}

.finance-table th {
  color: #4a5670;
  font-weight: 500;
}

.finance-target-hero {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  border-top: 1px solid #eef1f7;
}

.finance-target-editor,
.finance-target-card,
.finance-rule-box,
.payable-form {
  border: 1px solid #e2e8f5;
  border-radius: 10px;
  background: #fff;
}

.finance-target-editor,
.finance-target-card {
  min-height: 126px;
  padding: 16px;
}

.finance-target-editor span,
.finance-target-card span {
  display: block;
  color: #59647c;
  font-weight: 500;
}

.finance-target-editor div {
  display: flex;
  gap: 10px;
  margin: 12px 0;
}

.finance-target-editor input,
.target-year-field input,
.payable-form input,
.payable-form select {
  height: 40px;
  border: 1px solid #d8deec;
  border-radius: 8px;
  background: #fbfcff;
  color: #071026;
  padding: 0 10px;
  font-weight: 400;
}

.finance-target-editor input {
  width: min(220px, 100%);
  font-size: 20px;
}

.finance-target-editor small,
.finance-target-card small {
  color: #68728a;
  font-weight: 400;
}

.finance-target-card strong {
  display: block;
  margin: 14px 0 8px;
  color: #071026;
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 500;
  line-height: 1.12;
}

.finance-target-layout {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

.finance-rule-box {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: #f8faff;
}

.finance-rule-box p {
  margin: 0;
  color: #4d5871;
  line-height: 1.45;
}

.finance-target-table-wrap {
  margin: 0 16px 16px;
}

.target-year-field {
  min-width: 120px;
}

.target-year-field input {
  width: 96px;
  margin-top: 4px;
}

.payables-month {
  min-width: 150px;
}

.payables-search {
  min-width: min(360px, 100%);
}

.payables-kpi-grid {
  border-top: 1px solid #eef1f7;
}

.danger-kpi strong {
  color: #d94d62;
}

.payable-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 16px 16px;
  padding: 16px;
  background: #fbfcff;
}

.payable-form[hidden] {
  display: none;
}

.payable-form-title {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e4e9f4;
}

.payable-form-title span,
.payable-form-title strong {
  display: block;
}

.payable-form-title span {
  color: #697083;
  font-size: 12px;
  font-weight: 500;
}

.payable-form-title strong {
  margin-top: 3px;
  color: #071026;
  font-size: 18px;
  font-weight: 500;
}

.payable-form-close {
  font-size: 28px;
}

.payable-form label {
  display: grid;
  gap: 6px;
  color: #4d5871;
  font-size: 13px;
  font-weight: 500;
}

.checkbox-field {
  align-content: end;
  grid-template-columns: auto 1fr;
  gap: 8px !important;
  min-height: 62px;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.recurrence-field {
  display: grid;
  gap: 6px;
}

.payable-notes-field {
  grid-column: span 2;
}

.payable-form-actions {
  display: flex;
  align-items: end;
  gap: 10px;
}

.payables-table-wrap {
  margin: 0 16px 16px;
}

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

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef1ff;
  color: #5b5bf5;
  font-weight: 500;
}

.status-badge.paid {
  background: #eaf9f2;
  color: #088b51;
}

.status-badge.cancelled {
  background: #f5f6fa;
  color: #68728a;
}

.due-days-badge {
  display: inline-flex;
  min-width: 38px;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef2f7;
  color: #4d5871;
  font-weight: 500;
}

.due-days-badge.warning {
  background: #fff3c4;
  color: #9a6500;
}

.due-days-badge.danger {
  background: #ffe1e5;
  color: #c6283a;
}

.recurrence-label {
  display: block;
  margin-top: 3px;
  color: #5b5bf5;
  font-size: 11px;
  font-weight: 500;
}

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

.row-actions button {
  min-height: 30px;
  border: 1px solid #d8deec;
  border-radius: 8px;
  background: #fff;
  color: #4d5871;
  cursor: pointer;
}

.payables-modern-page {
  gap: 20px;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.payables-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.payables-page-header h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -0.03em;
}

.payables-page-header p {
  margin: 8px 0 0;
  color: #475569;
  font-size: 15px;
}

.payables-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.payables-filter-control,
.payables-primary-button,
.payables-secondary-button {
  min-height: 48px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font-weight: 600;
  padding: 0 18px;
}

.payables-primary-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: #4f46e5;
  color: #fff;
  box-shadow: 0 14px 28px rgba(79, 70, 229, 0.22);
  cursor: pointer;
}

.payables-primary-button span {
  font-size: 22px;
  line-height: 1;
}

.payables-secondary-button {
  cursor: pointer;
}

.payables-metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.payables-metric-card {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 130px;
  padding: 22px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.05);
}

.payables-metric-card span:not(.payables-metric-icon) {
  display: block;
  color: #334155;
  font-weight: 500;
}

.payables-metric-card strong {
  display: block;
  margin-top: 8px;
  color: #0f172a;
  font-size: clamp(22px, 2vw, 30px);
  letter-spacing: -0.03em;
}

.payables-metric-card small {
  display: block;
  margin-top: 8px;
  color: #475569;
  font-size: 14px;
}

.payables-metric-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 700;
  flex: 0 0 auto;
}

.payables-icon-primary {
  background: #eef2ff;
  color: #4f46e5;
}

.payables-icon-danger {
  background: #fee2e2;
  color: #ef4444;
}

.payables-icon-warning {
  background: #fff7ed;
  color: #f59e0b;
}

.payables-icon-success {
  background: #dcfce7;
  color: #16a34a;
}

.payables-table-card {
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.05);
}

.payables-table-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px) auto;
  gap: 16px;
  align-items: center;
  padding: 22px 24px;
}

.payables-tabbar {
  display: flex;
  gap: 4px;
  overflow-x: auto;
}

.payables-tab {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
  padding: 0 18px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}

.payables-tab.active {
  border-color: #e0e7ff;
  background: #eef2ff;
  color: #4f46e5;
}

.payables-search-control {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
  color: #64748b;
}

.payables-search-control input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #0f172a;
  font: inherit;
}

.payables-table-scroll {
  overflow-x: auto;
}

.payables-modern-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
}

.payables-modern-table th {
  padding: 18px 24px;
  border-top: 1px solid #eef2f7;
  border-bottom: 1px solid #eef2f7;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.payables-modern-table td {
  padding: 18px 24px;
  border-bottom: 1px solid #eef2f7;
  color: #0f172a;
  font-size: 14px;
  vertical-align: middle;
}

.payables-modern-table tbody tr:hover {
  background: #f8fafc;
}

.payables-supplier-cell {
  display: flex;
  align-items: center;
  gap: 14px;
}

.payables-supplier-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 12px;
  font-weight: 700;
}

.payables-category-badge,
.payables-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 9px;
  font-weight: 700;
  font-size: 12px;
}

.payables-category-badge.marketing {
  background: #fce7f3;
  color: #be185d;
}

.payables-category-badge.finance {
  background: #dbeafe;
  color: #1d4ed8;
}

.payables-category-badge.services {
  background: #d1fae5;
  color: #047857;
}

.payables-category-badge.logistics {
  background: #e0f2fe;
  color: #0369a1;
}

.payables-category-badge.supplier,
.payables-category-badge.other {
  background: #fef3c7;
  color: #b45309;
}

.payables-status-pill.open {
  background: #e0e7ff;
  color: #4f46e5;
}

.payables-status-pill.warning {
  background: #ffedd5;
  color: #ea580c;
}

.payables-status-pill.danger {
  background: #fee2e2;
  color: #dc2626;
}

.payables-status-pill.paid {
  background: #dcfce7;
  color: #15803d;
}

.payables-status-pill.cancelled {
  background: #f1f5f9;
  color: #64748b;
}

.payables-row-actions {
  justify-content: flex-start;
}

.payables-row-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  border-radius: 10px;
  color: #475569;
  font-size: 16px;
}

.payables-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  color: #475569;
}

.payables-pagination {
  display: flex;
  align-items: center;
  gap: 10px;
}

.payables-pagination button {
  min-width: 42px;
  height: 42px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font-weight: 700;
}

.payables-pagination button.active {
  border-color: #4f46e5;
  background: #4f46e5;
  color: #fff;
  box-shadow: 0 10px 20px rgba(79, 70, 229, 0.22);
}

@media (max-width: 1100px) {
  .payables-page-header,
  .payables-header-actions {
    align-items: stretch;
    flex-direction: column;
  }

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

  .payables-table-toolbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .payables-metric-grid {
    grid-template-columns: 1fr;
  }

  .payables-metric-card {
    min-height: auto;
  }

  .payables-table-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

.positive-value {
  color: #17885b;
}

.negative-value {
  color: #d94d62;
}

.products-table {
  min-width: 1540px;
}

.products-count {
  margin: -4px 0 12px;
  color: #697083;
  font-size: 13px;
  font-weight: 850;
}

.stock-pill,
.catalog-pill {
  min-width: 54px;
  display: inline-flex;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  font-weight: 950;
}

.stock-pill {
  background: #eef2f6;
  color: #101427;
}

.catalog-pill.status-ok {
  background: rgba(0, 200, 117, 0.13);
  color: #04764a;
}

.catalog-pill.status-alert {
  background: rgba(255, 186, 0, 0.18);
  color: #8a5a00;
}

.catalog-pill.status-muted {
  background: #eef2f6;
  color: #687084;
}

.status-text {
  color: #101427;
  font-weight: 850;
}

.competition-cell {
  min-width: 190px;
  display: grid;
  gap: 6px;
}

.competition-pill {
  width: fit-content;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  color: #fff;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.competition-cell small {
  max-width: 250px;
  color: #4d566b;
  font-size: 12px;
  line-height: 1.35;
}

.competition-winning {
  background: #00a650;
}

.competition-sharing {
  background: #ff7a2f;
}

.competition-losing {
  background: #f04438;
}

.competition-listed {
  background: #5b5bf5;
}

.competition-muted {
  background: #8d95a8;
}

.suggested-margin {
  min-width: 142px;
  display: grid;
  gap: 4px;
}

.suggested-margin strong {
  color: #101427;
  font-weight: 800;
}

.margin-separator {
  color: #a3abbc;
  font-weight: 700;
}

.suggested-margin small,
.suggested-empty {
  color: #687084;
  font-size: 12px;
}

.meli-price-button {
  min-height: 32px;
  border: 1px solid rgba(91, 91, 245, 0.22);
  border-radius: 9px;
  padding: 0 12px;
  background: #5b5bf5;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.meli-price-button:disabled {
  border-color: #dce1ea;
  background: #eef2f6;
  color: #8d95a8;
  cursor: default;
}

.section-subtitle {
  display: block;
  margin-top: 4px;
  color: #68728a;
  font-size: 13px;
  font-weight: 400;
}

.listing-status {
  margin: 0 16px 16px;
  color: #68728a;
  font-size: 13px;
}

.listing-overview-grid {
  display: grid;
  gap: 12px;
  margin: 0 16px 16px;
}

.listing-mode-hidden {
  display: none !important;
}

.listing-overview-grid[hidden],
.listing-pagination[hidden] {
  display: none;
}

.listing-pagination,
.listing-detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 16px 16px;
}

.listing-detail-toolbar {
  justify-content: flex-start;
}

.listing-pagination span {
  color: #68728a;
  font-size: 13px;
}

.listing-pagination button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.listing-overview-card {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(520px, 1.2fr) max-content;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid #dfe5f1;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(29, 39, 76, 0.05);
}

.listing-overview-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.listing-overview-identity img {
  width: 78px;
  height: 78px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 8px;
  background: #eef2f7;
}

.listing-overview-identity strong,
.listing-overview-identity small,
.listing-overview-identity a {
  display: block;
}

.listing-overview-identity strong {
  max-width: 460px;
  color: #071026;
  font-size: 16px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.listing-overview-identity small {
  margin-top: 6px;
  color: #68728a;
}

.listing-overview-identity a {
  margin-top: 6px;
  color: #5b5bf5;
  font-weight: 500;
}

.listing-overview-scores {
  display: grid;
  grid-template-columns: repeat(6, minmax(70px, 1fr));
  gap: 10px;
}

.listing-mini-score {
  display: grid;
  place-items: center;
  gap: 6px;
  text-align: center;
}

.listing-mini-score small {
  color: #4d5871;
  font-size: 11px;
}

.score-ring.mini {
  width: 58px;
  height: 58px;
}

.score-ring.mini span {
  width: 44px;
  height: 44px;
  font-size: 12px;
}

.listing-hero,
.listing-analysis-grid,
.quality-score-grid,
.post-sales-kpis,
.post-sales-tabs {
  display: grid;
  gap: 14px;
  margin: 0 16px 16px;
}

.listing-hero {
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  align-items: stretch;
}

.listing-identity,
.analysis-card,
.post-sales-kpi,
.post-sales-row {
  border: 1px solid #dfe5f1;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(29, 39, 76, 0.05);
}

.listing-identity {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px;
}

.listing-identity img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
  background: #eef2f7;
}

.listing-identity h3,
.analysis-card h3 {
  margin: 0;
  color: #071026;
  font-size: 18px;
  font-weight: 500;
}

.listing-identity p {
  margin: 6px 0;
  color: #5c667d;
}

.listing-identity a {
  color: #5b5bf5;
  font-weight: 500;
}

.quality-score-grid {
  grid-template-columns: repeat(6, minmax(92px, 1fr));
  margin: 0;
  padding: 16px;
  border: 1px solid #dfe5f1;
  border-radius: 10px;
  background: #fff;
}

.quality-score {
  display: grid;
  place-items: center;
  gap: 8px;
  color: #59647c;
  text-align: center;
}

.quality-score strong {
  font-size: 12px;
  font-weight: 500;
}

.score-ring {
  --score: 0;
  --score-color: #5b5bf5;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: conic-gradient(var(--score-color) calc(var(--score) * 1%), #e5e9f0 0);
}

.score-ring span {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #fff;
  color: #071026;
  font-weight: 600;
}

.listing-analysis-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.analysis-card {
  padding: 14px;
  overflow: hidden;
}

.analysis-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.analysis-card header span {
  color: #68728a;
  font-size: 12px;
}

.listing-images-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}

.listing-image-card {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid #e7ebf4;
  border-radius: 8px;
  background: #f8faff;
}

.listing-image-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  background: #eef2f7;
}

.listing-image-card strong,
.listing-image-card span,
.recommendation-list p {
  margin: 0;
  color: #4d5871;
  font-size: 12px;
}

.recommendation-list {
  display: grid;
  gap: 8px;
}

.recommendation-list p {
  padding: 10px;
  border-radius: 8px;
  background: #f4f6ff;
}

.compact-table-wrap {
  margin: 0;
  max-height: 360px;
}

.compact-analysis-table {
  min-width: 640px;
}

.description-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.description-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.description-columns strong {
  display: block;
  margin-bottom: 8px;
  color: #4d5871;
  font-weight: 500;
}

.description-columns textarea {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  border: 1px solid #d8deec;
  border-radius: 8px;
  padding: 10px;
  color: #071026;
  background: #fbfcff;
}

.description-feedback {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f4f6ff;
  color: #4d5871;
  font-size: 13px;
}

.description-feedback[data-type="success"] {
  background: #eefbf5;
  color: #08784a;
}

.description-feedback[data-type="error"] {
  background: #fff0f2;
  color: #c6283a;
}

.post-sales-kpis {
  grid-template-columns: repeat(5, minmax(130px, 1fr));
}

.post-sales-kpi {
  padding: 14px;
}

.post-sales-kpi span {
  color: #5b5bf5;
  font-size: 12px;
  font-weight: 500;
}

.post-sales-kpi strong {
  display: block;
  margin-top: 8px;
  color: #071026;
  font-size: 24px;
  font-weight: 500;
}

.post-sales-tabs {
  grid-template-columns: repeat(3, max-content);
  justify-content: start;
}

.post-sales-list {
  display: grid;
  gap: 10px;
  margin: 0 16px 16px;
}

.post-sales-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) max-content;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.post-sales-row img,
.post-sales-thumb {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  object-fit: cover;
  background: #eef2f7;
}

.post-sales-thumb {
  display: grid;
  place-items: center;
  color: #5b5bf5;
  font-size: 12px;
  font-weight: 600;
}

.post-sales-row strong,
.post-sales-row span {
  display: block;
}

.post-sales-row strong {
  color: #071026;
  font-weight: 500;
}

.post-sales-row span {
  margin-top: 4px;
  color: #68728a;
  font-size: 12px;
}

.post-sales-row b {
  color: #5b5bf5;
  font-weight: 500;
}

.danger-text {
  color: #d94d62 !important;
}

.post-sales-empty {
  margin: 0;
  padding: 20px;
  border: 1px dashed #d8deec;
  border-radius: 10px;
  color: #68728a;
}

.user-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}

.account-form {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.account-notes-field {
  grid-column: span 2;
}

.user-form label span {
  display: block;
  margin-bottom: 6px;
  color: #525a70;
  font-size: 13px;
  font-weight: 900;
}

.user-form input,
.user-form select {
  width: 100%;
  height: 42px;
  border: 1px solid #dce1ea;
  border-radius: 8px;
  padding: 0 12px;
  background: #f9fafc;
}

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

.user-row {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid #e5e9f1;
  border-radius: 10px;
  background: #fbfcfe;
}

.user-row strong,
.user-row span {
  display: block;
}

.user-row span,
.user-row small {
  margin-top: 3px;
  color: #697083;
  font-size: 13px;
  font-weight: 800;
}

.remove-user {
  min-height: 34px;
  border: 1px solid #ffd2cc;
  border-radius: 8px;
  padding: 0 12px;
  background: #fff5f4;
  color: #b42318;
  font-weight: 900;
  cursor: pointer;
}

.account-row {
  align-items: flex-start;
}

.account-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 260px;
}

.account-row-actions span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: #eef2ff;
  color: #525a70;
  font-size: 12px;
  font-weight: 700;
}

.client-accounts-page {
  display: grid;
  gap: 24px;
  max-width: 1680px;
  margin: 0 auto;
  padding: 8px 8px 40px;
}

.client-accounts-page[hidden],
.client-account-form-modern[hidden] {
  display: none !important;
}

.client-accounts-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.client-accounts-header h2 {
  margin: 0;
  color: #0f172a;
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.client-accounts-header p {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 16px;
}

.client-accounts-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  min-width: min(560px, 100%);
}

.client-account-search {
  flex: 1;
  min-width: 280px;
  height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  padding: 0 18px;
  background: #fff;
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.03);
}

.client-account-search span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.client-account-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #0f172a;
  font: inherit;
}

.client-account-primary {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 12px;
  padding: 0 24px;
  background: #4f46e5;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 18px 34px rgba(79, 70, 229, 0.24);
  cursor: pointer;
}

.client-account-primary span {
  font-size: 24px;
  line-height: 1;
}

.client-accounts-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.client-account-summary-card {
  min-height: 126px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 26px;
  border-right: 1px solid #e5e7eb;
}

.client-account-summary-card:last-child {
  border-right: 0;
}

.client-account-summary-icon {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 24px;
  font-weight: 900;
}

.client-account-summary-icon.purple { background: #ede9fe; color: #4f46e5; }
.client-account-summary-icon.green { background: #dcfce7; color: #16a34a; }
.client-account-summary-icon.amber { background: #ffedd5; color: #f59e0b; }
.client-account-summary-icon.violet { background: #f3e8ff; color: #7c3aed; }
.client-account-summary-icon.blue { background: #dbeafe; color: #2563eb; }

.client-account-summary-card p,
.client-account-summary-card small {
  margin: 0;
  color: #64748b;
}

.client-account-summary-card p {
  color: #334155;
  font-weight: 700;
}

.client-account-summary-card strong {
  display: block;
  margin: 8px 0 6px;
  color: #0f172a;
  font-size: 28px;
  line-height: 1;
}

.client-account-form-modern {
  position: relative;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 22px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.05);
}

.client-account-form-title {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 14px;
}

.client-account-form-title span {
  display: block;
  margin: 0 0 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.client-account-form-title strong {
  color: #0f172a;
  font-size: 18px;
}

.client-accounts-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}

.client-account-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
}

.client-account-tab {
  min-height: 52px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 10px;
  padding: 0 26px;
  background: transparent;
  color: #334155;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.client-account-tab.active {
  border-color: #4f46e5;
  background: #eef2ff;
  color: #4f46e5;
}

.client-account-sort {
  min-width: 240px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
}

.client-account-sort span {
  color: #64748b;
  font-weight: 600;
}

.client-account-sort select {
  min-height: 44px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #0f172a;
  font-weight: 700;
}

.client-account-list-modern {
  gap: 16px;
}

.client-account-card {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(520px, 0.9fr) 160px;
  align-items: center;
  gap: 24px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 28px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.04);
}

.client-account-main {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}

.client-account-avatar {
  width: 76px;
  height: 76px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #6d5dfc, #3b32bb);
  color: #fff;
  font-size: 36px;
  font-weight: 800;
  box-shadow: 0 16px 26px rgba(79, 70, 229, 0.22);
}

.client-account-copy {
  min-width: 0;
}

.client-account-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.client-account-title-row h3 {
  margin: 0;
  color: #0f172a;
  font-size: 23px;
  line-height: 1.15;
}

.client-account-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 12px;
  background: #dcfce7;
  color: #15803d;
  font-size: 13px;
  font-weight: 800;
}

.client-account-status.canceled {
  background: #fee2e2;
  color: #b91c1c;
}

.client-account-status.overdue,
.client-account-status.suspended {
  background: #ffedd5;
  color: #c2410c;
}

.client-account-status.pending_email {
  background: #e0f2fe;
  color: #0369a1;
}

.client-account-copy p {
  margin: 8px 0 0;
  color: #475569;
  font-size: 15px;
}

.client-account-expiring {
  color: #f97316;
  font-weight: 800;
}

.client-account-valid {
  color: #16a34a;
  font-weight: 800;
}

.client-account-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.client-account-tags span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border-radius: 9px;
  padding: 0 14px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 14px;
  font-weight: 800;
}

.client-account-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(95px, 1fr));
  border-left: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
}

.client-account-stats div {
  min-height: 124px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-right: 1px solid #e5e7eb;
  text-align: center;
}

.client-account-stats div:last-child {
  border-right: 0;
}

.client-account-stats span {
  color: #475569;
  font-size: 14px;
}

.client-account-stats strong {
  color: #4f46e5;
  font-size: 28px;
  line-height: 1;
}

.client-account-stats b {
  color: #0f172a;
  font-size: 15px;
}

.client-account-plan-state.active {
  color: #16a34a;
}

.client-account-plan-state.canceled {
  color: #dc2626;
}

.client-account-plan-state.overdue,
.client-account-plan-state.suspended {
  color: #f97316;
}

.client-account-plan-state.pending_email {
  color: #0369a1;
}

.client-account-actions {
  display: grid;
  gap: 10px;
}

.client-account-actions button {
  min-height: 48px;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
}

.client-account-edit,
.client-account-more {
  border: 1px solid #dbe3ef;
  background: #fff;
  color: #4f46e5;
}

.client-account-cancel {
  border: 1px solid #fecaca;
  background: #fff7f7;
  color: #b91c1c;
}

.client-account-empty {
  border: 1px dashed #dbe3ef;
  border-radius: 16px;
  padding: 28px;
  background: #fff;
  color: #64748b;
  text-align: center;
}

.client-accounts-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #475569;
  font-size: 16px;
}

.client-account-pagination {
  display: flex;
  gap: 10px;
}

.client-account-pagination button {
  width: 46px;
  height: 46px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #fff;
  color: #475569;
  font-weight: 800;
}

.client-account-pagination button.active {
  border-color: #4f46e5;
  background: #4f46e5;
  color: #fff;
}

@media (max-width: 1440px) {
  .client-accounts-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .client-account-summary-card:nth-child(3) {
    border-right: 0;
  }

  .client-account-card {
    grid-template-columns: 1fr;
  }

  .client-account-stats {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
  }

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

@media (max-width: 900px) {
  .client-accounts-header,
  .client-accounts-actions,
  .client-accounts-controls,
  .client-accounts-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .client-accounts-actions,
  .client-account-search,
  .client-account-sort {
    min-width: 0;
    width: 100%;
  }

  .client-accounts-summary,
  .client-account-stats {
    grid-template-columns: 1fr;
  }

  .client-account-summary-card,
  .client-account-stats div {
    border-right: 0;
    border-bottom: 1px solid #e5e7eb;
  }

  .client-account-summary-card:last-child,
  .client-account-stats div:last-child {
    border-bottom: 0;
  }

  .client-account-main {
    align-items: flex-start;
  }

  .client-account-actions {
    grid-template-columns: 1fr;
  }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 7, 25, 0.48);
}

.modal-backdrop[hidden] {
  display: none;
}

.cost-modal {
  width: min(520px, calc(100vw - 28px));
  min-height: 520px;
  overflow: hidden;
  border-radius: 14px;
  background: #eef2f7;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.marketplaces-modal {
  width: min(430px, calc(100vw - 28px));
  min-height: 560px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 12px;
  background: #eef1f7;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.30);
}

.platform-modal {
  width: min(360px, calc(100vw - 28px));
  overflow: hidden;
  border-radius: 12px;
  background: #eef1f7;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.30);
}

.password-setup-modal {
  width: min(390px, calc(100vw - 28px));
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.30);
}

.password-setup-form {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.password-setup-form label span {
  display: block;
  margin-bottom: 6px;
  color: #43506b;
  font-size: 12px;
  font-weight: 600;
}

.password-setup-form input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cfd6e7;
  border-radius: 7px;
  padding: 0 12px;
  background: #fbfcff;
}

.password-setup-form input:focus {
  border-color: #5b5bf5;
  box-shadow: 0 0 0 4px rgba(91, 91, 245, 0.12);
  outline: none;
}

.date-modal {
  width: min(520px, calc(100vw - 28px));
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.30);
}

.date-modal-header {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-bottom: 1px solid #e2e6ee;
}

.date-modal-header h2 {
  flex: 1;
  text-align: center;
  font-size: 18px;
  font-weight: 520;
}

.date-modal-body {
  display: grid;
  gap: 18px;
  padding: 22px 26px 26px;
}

.date-month-label {
  margin: 0;
  text-align: center;
  color: #111827;
  font-weight: 520;
}

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

.date-range-grid span {
  display: block;
  margin-bottom: 6px;
  color: #5b6479;
  font-size: 12px;
}

.date-range-grid input {
  width: 100%;
  min-height: 40px;
  border: 1px solid #d6dce8;
  border-radius: 8px;
  padding: 0 10px;
  background: #fbfcff;
  color: #101427;
}

.date-search-button {
  width: min(260px, 100%);
  justify-self: center;
  background: linear-gradient(135deg, #5b5bf5 0%, #2fc9b5 100%);
}

.import-modal {
  width: min(620px, calc(100vw - 28px));
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.30);
}

.import-modal-body {
  display: grid;
  gap: 14px;
  padding: 18px 20px 20px;
}

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

.import-columns-grid article {
  border: 1px solid #e2e8f5;
  border-radius: 10px;
  background: #f8faff;
  padding: 14px;
}

.import-columns-grid span,
.import-example span {
  display: block;
  color: #5b5bf5;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.import-columns-grid ul {
  display: grid;
  gap: 7px;
  margin: 10px 0 0;
  padding-left: 18px;
  color: #34405a;
}

.import-columns-grid strong {
  font-weight: 600;
}

.import-example {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px dashed #c8d1e4;
  border-radius: 10px;
  background: #fff;
}

.import-example code {
  white-space: normal;
  color: #071026;
  font-size: 12px;
}

.import-note {
  margin: 0;
  color: #5f6b82;
  line-height: 1.45;
}

.import-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.platform-options {
  display: grid;
  gap: 12px;
  padding: 24px;
}

.platform-option {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border-radius: 9px;
  background: #08d97c;
  color: #061423;
  text-decoration: none;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(8, 217, 124, 0.20);
}

.platform-option:hover {
  filter: brightness(0.98);
}

.marketplace-header {
  align-items: center;
  background: #f7f8fc;
}

.marketplace-header h2 {
  width: 100%;
  text-align: center;
  font-size: 21px;
}

.marketplace-list {
  display: grid;
  gap: 18px;
  padding: 28px 22px;
}

.marketplace-card {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  border: 1px solid #e1e7ef;
  border-radius: 10px;
  padding: 14px 16px;
  background: #fbfffc;
  color: #101427;
  text-align: left;
  box-shadow: 0 12px 22px rgba(23, 31, 56, 0.12);
}

.marketplace-card:hover,
.marketplace-card.selected {
  border-color: rgba(0, 200, 117, 0.45);
  box-shadow: 0 14px 28px rgba(0, 200, 117, 0.13);
}

.marketplace-card.needs-reconnect {
  border-color: rgba(217, 45, 32, 0.32);
  background: #fffafa;
  box-shadow: 0 12px 22px rgba(217, 45, 32, 0.08);
}

.marketplace-select {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.marketplace-remove {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid #ffd2cc;
  border-radius: 9px;
  background: #fff5f4;
  color: #d92d20;
  font-size: 22px;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}

.marketplace-remove:hover {
  background: #d92d20;
  color: #fff;
}

.marketplace-reconnect {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #ffb4ab;
  border-radius: 9px;
  background: #fff5f4;
  color: #b42318;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.marketplace-reconnect:hover {
  background: #d92d20;
  color: #fff;
}

.marketplace-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 950;
}

.marketplace-logo.meli {
  background: #ffe600;
  color: #2457c5;
}

.marketplace-logo.shopee {
  background: #ffefe9;
  color: #ee4d2d;
  border: 1px solid #ffb9a6;
}

.marketplace-logo.generic {
  background: #eef2f6;
  color: #536078;
}

.marketplace-card strong,
.marketplace-card small {
  display: block;
}

.marketplace-card strong {
  font-size: 15px;
}

.marketplace-card small {
  margin-top: 4px;
  color: #6f7890;
  font-size: 12px;
  font-weight: 800;
}

.marketplace-empty {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px dashed #cbd3e2;
  border-radius: 10px;
  color: #6f7890;
  text-align: center;
}

.marketplace-empty strong {
  color: #101427;
}

.marketplace-add {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: auto 22px 22px;
  border-radius: 9px;
  background: #08d97c;
  color: #03180e;
  text-decoration: none;
  font-weight: 950;
}

.marketplace-add span {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1.5px solid currentColor;
  border-radius: 5px;
  line-height: 1;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid #d9dee8;
}

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

.modal-header p {
  margin-top: 4px;
  color: #828a9b;
  font-size: 12px;
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #101427;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.store-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 12px 8px;
}

.store-tab {
  min-height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: #dfe5ee;
  color: #252d40;
  font-weight: 950;
}

.store-tab.active {
  background: #00c875;
  color: #03180e;
}

.modal-search {
  margin: 4px 12px 12px;
}

.cost-editor {
  margin: 0 12px;
  padding: 14px;
  border-radius: 10px;
  background: #fff;
}

.cost-editor-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.cost-editor-title p {
  margin-top: 12px;
  color: #8991a1;
  font-size: 13px;
}

.editor-grid {
  display: grid;
  grid-template-columns: 0.85fr 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.editor-grid span {
  display: block;
  margin-bottom: 6px;
  color: #6d7688;
  font-size: 12px;
  font-weight: 950;
}

.editor-grid input {
  width: 100%;
  height: 36px;
  border: 1px solid #dce1ea;
  border-radius: 8px;
  padding: 0 10px;
  background: #f8fafc;
  font-weight: 850;
}

.modal-save {
  width: 100%;
  margin-top: 12px;
  background: #5b5bf5;
  color: #fff;
}

@media (max-width: 980px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .side-nav {
    position: static;
    height: auto;
    align-items: stretch;
    flex-direction: column;
  }

  .menu-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .logout-button {
    margin-top: 18px;
  }

  .hero,
  .topbar,
  .section-header,
  .connection-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions {
    min-width: 0;
    align-items: flex-start;
  }

  .periods {
    justify-content: flex-start;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 16px;
    padding: 0;
  }

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

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

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

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

  .product-share-grid {
    grid-auto-columns: minmax(280px, 72vw);
  }

  .grid-toolbar {
    min-width: 0;
  }

  .user-form {
    grid-template-columns: 1fr 1fr;
  }

  .account-notes-field {
    grid-column: 1 / -1;
  }

  .module-grid,
  .ads-layout,
  .ads-education-card,
  .ads-education-items,
  .ads-management-grid,
  .finance-layout,
  .listing-overview-card,
  .listing-hero,
  .listing-analysis-grid,
  .full-planning-strip,
  .top-executive-grid,
  .two-columns {
    grid-template-columns: 1fr;
  }

  .quality-score-grid,
  .listing-overview-scores,
  .post-sales-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .full-strategy-card {
    grid-template-columns: 1fr 1fr;
  }

  .strategy-heading {
    grid-column: 1 / -1;
  }

  .ads-overview-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .campaign-row {
    grid-template-columns: 1fr;
  }

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

  .ads-campaign-pagination,
  .ads-campaign-pagination div {
    align-items: stretch;
    flex-direction: column;
  }

  .ads-detail-header,
  .ads-detail-kpis,
  .ads-ai-card {
    grid-template-columns: 1fr;
  }

  .ads-detail-chart-card header,
  .ads-detail-period-filter {
    align-items: stretch;
    justify-items: stretch;
  }

  .ads-detail-period-filter > div {
    flex-wrap: wrap;
  }
}

@media (max-width: 620px) {
  .app-shell {
    padding: 14px;
  }

  .chart-panel .section-header {
    align-items: stretch;
    gap: 12px;
  }

  .chart-panel .chart-tabs {
    justify-content: flex-start;
  }

  .chart-panel .chart-tab {
    min-height: 32px;
    padding: 0 12px;
    font-size: 12px;
  }

  .period-chart-wrap {
    height: 170px;
    min-height: 170px;
  }

  .quality-score-grid,
  .listing-overview-scores,
  .post-sales-kpis,
  .post-sales-tabs {
    grid-template-columns: 1fr;
  }

  .post-sales-row {
    grid-template-columns: 44px 1fr;
  }

  .post-sales-row b {
    grid-column: 2;
  }

  .menu-list {
    grid-template-columns: 1fr 1fr;
  }

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

  .ads-summary-panel {
    grid-template-columns: 1fr;
  }

  .product-share-grid {
    grid-auto-columns: minmax(270px, 86vw);
    grid-template-rows: repeat(4, minmax(0, auto));
  }

  .product-share-item {
    grid-template-columns: 52px 40px minmax(0, 1fr);
  }

  .share-ring {
    width: 50px;
    height: 50px;
    font-size: 12px;
  }

  .date-range-grid {
    grid-template-columns: 1fr;
  }

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

  .import-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .ads-kpi {
    text-align: left;
  }

  .ads-hero,
  .ads-chart-footer,
  .ads-campaign-header {
    align-items: stretch;
    flex-direction: column;
  }

  .ads-overview-card,
  .ads-campaign-preview,
  .ads-campaign-detail {
    margin-right: 0;
    margin-left: 0;
  }

  .ads-management-grid {
    margin-right: 0;
    margin-left: 0;
  }

  .ads-overview-metrics,
  .ads-metric-grid {
    grid-template-columns: 1fr;
  }

  .ads-period-filter,
  .ads-period-trigger,
  .ads-account-filter,
  .ads-account-select {
    width: 100%;
  }

  .ads-period-menu {
    right: 0;
    left: 0;
    width: auto;
  }

  .ads-overview-metric {
    border-right: 0;
    border-bottom: 1px solid #e6ebf4;
  }

  .ads-chart-panel {
    min-height: 210px;
  }

  .ads-chart-bars {
    gap: 5px;
  }

  .ads-alert-heading,
  .ads-alert-row {
    min-width: 680px;
  }

  .grid-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

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

  .user-form {
    grid-template-columns: 1fr;
  }

  .full-strategy-card,
  .full-kpi-grid,
  .finance-kpi-grid,
  .finance-target-hero,
  .payable-form {
    grid-template-columns: 1fr;
  }

  .finance-target-editor div,
  .payable-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .payable-notes-field {
    grid-column: span 1;
  }

  .executive-title {
    align-items: stretch;
    flex-direction: column;
  }

  .exec-kpi-row,
  .region-list {
    grid-template-columns: 1fr;
  }
}

/* Hype Metrics Design System v2 */
:root {
  --hm-bg: #f8fafc;
  --hm-surface: #ffffff;
  --hm-border: #e5e7eb;
  --hm-border-strong: #d8dee9;
  --hm-text: #0f172a;
  --hm-muted: #64748b;
  --hm-primary: #4f46e5;
  --hm-primary-weak: #eef2ff;
  --hm-success: #22c55e;
  --hm-warning: #f59e0b;
  --hm-danger: #ef4444;
  --hm-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
  --hm-shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.045);
  --hm-radius: 16px;
  --hm-sidebar: 284px;
}

body {
  background: var(--hm-bg);
  color: var(--hm-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

h1,
h2,
h3,
strong,
.topbar h1,
.section-header h2,
.module-titlebar h2 {
  color: var(--hm-text);
  font-weight: 700;
  letter-spacing: 0;
}

p,
small,
span,
td,
th,
label {
  letter-spacing: 0;
}

.eyebrow {
  color: var(--hm-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.app-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--hm-sidebar) minmax(0, 1fr);
  background: var(--hm-bg);
}

.side-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 100vh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 24px 18px;
  border-right: 1px solid var(--hm-border);
  border-bottom: 0;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 12px 0 42px rgba(15, 23, 42, 0.035);
  backdrop-filter: blur(20px);
}

.side-brand {
  min-width: 0;
  gap: 12px;
  padding: 0 8px 22px;
  border-bottom: 1px solid var(--hm-border);
}

.side-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: contain;
}

.side-brand strong {
  color: var(--hm-text);
  font-size: 18px;
  font-weight: 700;
}

.side-brand span {
  color: var(--hm-muted);
  font-size: 12px;
  font-weight: 600;
}

.menu-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  margin-top: 22px;
  overflow-y: auto;
  padding-right: 2px;
}

.menu-group {
  position: static;
  display: grid;
  gap: 4px;
}

.menu-item,
.submenu-item {
  width: 100%;
  min-height: 44px;
  justify-content: flex-start;
  gap: 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #334155;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.menu-item:hover,
.submenu-item:hover {
  background: #f1f5f9;
  color: var(--hm-primary);
}

.menu-item.active,
.submenu-item.active,
.menu-item.menu-parent.active {
  background: var(--hm-primary-weak);
  color: var(--hm-primary);
  font-weight: 600;
}

.menu-icon,
.submenu-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  background: #f8fafc;
  color: #64748b;
}

.menu-item:hover .menu-icon,
.submenu-item:hover .submenu-icon,
.menu-item.active .menu-icon,
.submenu-item.active .submenu-icon {
  background: #e0e7ff;
  color: var(--hm-primary);
}

.submenu {
  position: static;
  width: auto;
  min-width: 0;
  display: grid;
  gap: 4px;
  margin: 2px 0 8px 42px;
  padding: 0 0 0 12px;
  border: 0;
  border-left: 1px solid var(--hm-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.submenu[hidden] {
  display: none !important;
}

.submenu-item {
  min-height: 38px;
  padding: 0 10px;
  font-size: 14px;
}

.submenu-icon {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
}

.menu-caret {
  margin-left: auto;
  color: var(--hm-muted);
}

.plan-status {
  margin: 18px 0 10px;
  padding: 12px;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--hm-primary);
  text-align: center;
}

.plan-status span,
.plan-status strong {
  color: inherit;
}

.topbar-plan-status {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0 16px;
  border-radius: 12px;
  text-align: left;
  white-space: nowrap;
}

.topbar-plan-status span {
  font-size: 12px;
  font-weight: 700;
}

.topbar-plan-status strong {
  font-size: 12px;
  font-weight: 500;
}

.logout-button {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--hm-border);
  border-radius: 12px;
  background: var(--hm-surface);
  color: #334155;
  font-weight: 600;
}

.app-shell {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: 30px 38px 48px;
}

.topbar,
.section-header,
.module-titlebar,
.executive-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.topbar {
  position: static;
  padding: 0;
}

.topbar h1,
.section-header h2,
.module-titlebar h2,
.executive-title h2 {
  font-size: clamp(28px, 2.4vw, 38px);
  line-height: 1.12;
}

.topbar-actions,
.toolbar,
.grid-toolbar,
.full-actions,
.section-actions {
  gap: 12px;
}

.button,
.primary-button,
.ghost-button,
.columns-button,
.page-button,
.period,
.chart-tab,
.filter-select,
.filter-box,
.search-box,
.date-search-button,
.meli-price-button,
.row-actions button,
.listing-pagination button {
  border-radius: 12px;
}

.button,
.primary-button,
.columns-button,
.date-search-button {
  border: 0;
  background: var(--hm-primary);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(79, 70, 229, 0.18);
}

.ghost-button,
.filter-select,
.filter-box,
.search-box,
input,
select,
textarea {
  border: 1px solid var(--hm-border);
  background: var(--hm-surface);
  color: var(--hm-text);
}

.ghost-button:hover,
.filter-select:hover,
.filter-box:focus-within {
  border-color: #c7d2fe;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08);
}

.status-pill,
.account-toggle,
.status-badge,
.catalog-badge,
.competition-pill,
.stock-pill,
.plan-status,
.period {
  border-radius: 999px;
}

.status-pill {
  border-color: rgba(34, 197, 94, 0.28);
  background: #f0fdf4;
  color: #15803d;
}

.hero {
  border: 0;
  border-radius: 24px;
  background: linear-gradient(135deg, #4f46e5 0%, #2563eb 48%, #14b8a6 100%);
  box-shadow: var(--hm-shadow);
}

.summary-grid,
.full-kpi-grid,
.finance-kpi-grid,
.exec-kpi-row {
  gap: 16px;
}

.metric-card,
.panel,
.module-card,
.exec-card,
.finance-kpi,
.finance-card,
.finance-target-card,
.finance-target-editor,
.finance-rule-box,
.payable-form,
.listing-overview-card,
.listing-identity,
.analysis-card,
.post-sales-kpi,
.post-sales-row,
.ads-alerts,
.ads-metrics,
.ads-campaign-preview,
.marketplace-card {
  border: 1px solid var(--hm-border);
  border-radius: var(--hm-radius);
  background: var(--hm-surface);
  box-shadow: var(--hm-shadow-soft);
}

.metric-card {
  min-height: 124px;
  padding: 20px;
}

.ads-manager .ads-overview-card,
.ads-manager .ads-alerts,
.ads-manager .ads-metrics,
.ads-manager .ads-campaign-preview,
.ads-manager .ads-metric-grid div {
  border-radius: 8px;
}

.metric-card span,
.module-card span,
.finance-kpi span,
.finance-target-card span {
  color: var(--hm-muted);
  font-weight: 600;
}

.metric-card strong,
.module-card strong,
.finance-kpi strong,
.finance-target-card strong {
  color: var(--hm-text);
  font-weight: 700;
}

.panel,
.module-panel,
.finance-panel {
  overflow: hidden;
}

.section-header,
.module-titlebar {
  padding: 24px 26px;
  border-bottom: 1px solid var(--hm-border);
}

.sales-table-wrap,
.finance-table-wrap,
.exec-table-wrap,
.payables-table-wrap,
.full-table-wrap {
  border: 1px solid var(--hm-border);
  border-radius: var(--hm-radius);
  background: var(--hm-surface);
  overflow: auto;
}

.sales-table,
.finance-table,
.exec-table {
  border-collapse: separate;
  border-spacing: 0;
}

.sales-table th,
.finance-table th,
.exec-table th,
.full-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid var(--hm-border);
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  text-transform: none;
}

.sales-table td,
.finance-table td,
.exec-table td {
  border-bottom: 1px solid var(--hm-border);
  background: var(--hm-surface);
  color: var(--hm-text);
}

.sales-table tr:nth-child(even) td {
  background: #fbfdff;
}

.sales-table tbody tr:hover td,
.finance-table tbody tr:hover td,
.exec-table tbody tr:hover td {
  background: #f8fafc;
}

.page-button,
.listing-pagination button {
  border: 1px solid var(--hm-border);
  background: var(--hm-surface);
  color: var(--hm-text);
}

.page-button.active,
.period.active,
.chart-tab.active,
.product-share-tab.active {
  background: var(--hm-primary);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.18);
}

.product-share-tab,
.chart-tab,
.period {
  border: 1px solid var(--hm-border);
  background: var(--hm-surface);
  color: var(--hm-text);
}

.product-share-grid {
  scrollbar-color: #94a3b8 transparent;
}

.share-ring {
  color: var(--hm-primary);
}

.listing-overview-card {
  grid-template-columns: minmax(320px, 1fr) minmax(420px, 1.1fr) max-content;
}

.listing-detail-button,
.meli-price-button {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: var(--hm-primary);
  font-weight: 600;
}

.score-ring[data-tone="good"],
.status-badge.paid,
.catalog-badge.good,
.competition-pill.winning {
  color: #15803d;
}

.score-ring[data-tone="warning"],
.catalog-badge.warning,
.competition-pill.sharing {
  color: #b45309;
}

.score-ring[data-tone="danger"],
.status-badge.cancelled,
.competition-pill.losing {
  color: #b91c1c;
}

@media (max-width: 1100px) {
  .app-layout {
    display: block;
  }

  .side-nav {
    position: sticky;
    height: auto;
    min-height: 0;
    flex-direction: column;
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--hm-border);
  }

  .menu-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 14px;
    overflow: visible;
  }

  .submenu {
    margin-left: 0;
  }

  .app-shell {
    padding: 22px 18px 36px;
  }
}

@media (max-width: 720px) {
  .topbar,
  .section-header,
  .module-titlebar,
  .executive-title {
    align-items: stretch;
    flex-direction: column;
  }

  .menu-list {
    grid-template-columns: 1fr;
  }

  .summary-grid,
  .full-kpi-grid,
  .finance-kpi-grid,
  .exec-kpi-row {
    grid-template-columns: 1fr;
  }
}

/* Dashboard Executivo */
.executive-dashboard-v2 {
  --executive-primary: #4f46e5;
  --executive-text: #0f172a;
  --executive-muted: #64748b;
  --executive-border: #e2e8f0;
  display: grid;
  gap: 16px;
  margin-top: 0;
  padding-bottom: 24px;
}

.executive-dashboard-v2[hidden] {
  display: none !important;
}

.executive-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  margin-bottom: 20px;
  padding-top: 4px;
}

.executive-filter-button,
.executive-refresh-button,
.executive-select-label {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.executive-filter-button {
  cursor: pointer;
}

.executive-filter-button svg,
.executive-refresh-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.executive-refresh-button {
  border-color: #4f46e5;
  background: #4f46e5;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 7px 18px rgba(79, 70, 229, 0.18);
}

.executive-refresh-button:hover {
  background: #4338ca;
}

.executive-refresh-button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.executive-refresh-button.loading svg {
  animation: executive-spin 900ms linear infinite;
}

@keyframes executive-spin {
  to { transform: rotate(360deg); }
}

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

.executive-kpi-card {
  min-width: 0;
  min-height: 128px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  justify-items: start;
  padding: 18px;
  border: 1px solid var(--executive-border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.035);
}

.executive-kpi-card > div {
  min-width: 0;
}

.executive-kpi-card span,
.executive-kpi-card strong,
.executive-kpi-card small {
  display: block;
}

.executive-kpi-card > div > span {
  min-height: 34px;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.executive-kpi-card strong {
  margin-top: 4px;
  color: var(--executive-text);
  font-size: clamp(18px, 1.55vw, 25px);
  font-weight: 700;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.executive-kpi-card small {
  margin-top: 10px;
  color: #16a34a;
  font-size: 11px;
  font-weight: 600;
}

.executive-kpi-card small.down {
  color: #dc2626;
}

.executive-kpi-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  align-self: center;
  justify-self: center;
  margin: auto;
  border-radius: 50%;
}

.executive-kpi-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.executive-kpi-icon.revenue { background: #eafaf1; color: #16a34a; }
.executive-kpi-icon.profit { background: #eaf4ff; color: #2583e9; }
.executive-kpi-icon.orders { background: #f2efff; color: #6d4aff; }
.executive-kpi-icon.ticket { background: #fff5e5; color: #f59e0b; }
.executive-kpi-icon.units { background: #e7fbf8; color: #0faaa0; }

.executive-card {
  min-width: 0;
  border: 1px solid var(--executive-border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.035);
}

.executive-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin: 0;
}

.executive-card h3 {
  margin: 0;
  color: var(--executive-text);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.executive-analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.86fr) minmax(270px, 0.9fr);
  gap: 14px;
  align-items: stretch;
}

.executive-revenue-card,
.executive-channel-card,
.executive-goals-card {
  min-height: 310px;
  padding: 18px;
}

.executive-chart-total {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 9px;
}

.executive-chart-total strong {
  color: var(--executive-text);
  font-size: 21px;
}

.executive-chart-total small {
  color: #16a34a;
  font-size: 11px;
  font-weight: 600;
}

.executive-chart-total small.down {
  color: #dc2626;
}

.executive-select-label {
  min-height: 35px;
  padding: 0 12px;
  color: #334155;
  cursor: default;
}

button.executive-select-label {
  cursor: pointer;
}

.executive-revenue-card canvas {
  width: 100%;
  height: 228px;
  display: block;
  margin-top: 10px;
}

.executive-channel-content {
  min-height: 245px;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.executive-donut-wrap {
  position: relative;
  width: 150px;
  height: 150px;
  min-width: 150px;
  margin: 0 auto;
}

.executive-donut-wrap canvas {
  width: 150px;
  height: 150px;
  display: block;
}

.executive-donut-center {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 94px;
  text-align: center;
  transform: translate(-50%, -50%);
}

.executive-donut-center strong,
.executive-donut-center span {
  display: block;
}

.executive-donut-center strong {
  color: var(--executive-text);
  font-size: 13px;
  line-height: 1.25;
}

.executive-donut-center span {
  margin-top: 2px;
  color: var(--executive-muted);
  font-size: 10px;
}

.executive-channel-legend {
  display: grid;
  gap: 10px;
}

.executive-channel-legend > div {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.executive-channel-legend > div > span {
  width: 9px;
  height: 9px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--channel-color);
}

.executive-channel-legend p,
.executive-channel-legend strong,
.executive-channel-legend small {
  display: block;
  margin: 0;
}

.executive-channel-legend strong {
  color: #334155;
  font-size: 11px;
}

.executive-channel-legend small {
  margin-top: 2px;
  color: var(--executive-muted);
  font-size: 10px;
  line-height: 1.35;
}

.executive-goals-list {
  display: grid;
  gap: 15px;
  margin-top: 24px;
}

.executive-goal {
  position: relative;
  padding-right: 42px;
}

.executive-goal > div:first-child {
  display: grid;
  gap: 4px;
}

.executive-goal span {
  color: #475569;
  font-size: 11px;
}

.executive-goal strong {
  color: var(--executive-text);
  font-size: 12px;
  font-weight: 600;
}

.executive-goal strong b {
  font-size: 14px;
}

.executive-goal strong i {
  color: var(--executive-muted);
  font-style: normal;
}

.executive-goal em {
  position: absolute;
  top: 21px;
  right: 0;
  color: #16a34a;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.executive-progress {
  height: 5px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 5px;
  background: #eef2f7;
}

.executive-progress span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: #4f46e5;
  transition: width 260ms ease;
}

.executive-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.05fr) minmax(0, 1.08fr);
  gap: 14px;
}

.executive-bottom-grid .executive-card {
  min-height: 245px;
  padding: 18px;
}

.executive-ranked-list,
.executive-orders-list {
  display: grid;
  margin-top: 12px;
}

.executive-ranked-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 22px 38px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #edf1f6;
}

.executive-ranked-row:last-child,
.executive-order-row:last-child {
  border-bottom: 0;
}

.executive-rank {
  color: #475569;
  font-size: 11px;
  text-align: center;
}

.executive-ranked-row img {
  width: 36px;
  height: 36px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #f8fafc;
  object-fit: contain;
}

.executive-ranked-row div {
  min-width: 0;
}

.executive-ranked-row strong,
.executive-ranked-row small,
.executive-ranked-row b {
  display: block;
}

.executive-ranked-row div strong {
  overflow: hidden;
  color: #1e293b;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.executive-ranked-row div small {
  margin-top: 2px;
  color: var(--executive-muted);
  font-size: 9px;
}

.executive-ranked-row b {
  color: #16a34a;
  font-size: 11px;
  text-align: right;
}

.executive-ranked-row b small {
  margin-top: 2px;
  color: var(--executive-muted);
  font-size: 9px;
  font-weight: 400;
}

.executive-financial-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
  border: 1px solid #edf1f6;
  border-radius: 8px;
  overflow: hidden;
}

.executive-financial-grid > div {
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border-right: 1px solid #edf1f6;
  border-bottom: 1px solid #edf1f6;
}

.executive-financial-item p {
  display: grid;
  gap: 6px;
  margin: 0;
}

.executive-financial-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
}

.executive-financial-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.executive-financial-icon.received { background: #dcfce7; color: #16a34a; }
.executive-financial-icon.costs { background: #dbeafe; color: #2583e9; }
.executive-financial-icon.pending { background: #fef3c7; color: #f59e0b; }
.executive-financial-icon.profit { background: #f3e8ff; color: #7c3aed; }

.executive-financial-grid > div:nth-child(2n) {
  border-right: 0;
}

.executive-financial-grid > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.executive-financial-grid span {
  color: var(--executive-muted);
  font-size: 10px;
}

.executive-financial-grid strong {
  color: var(--executive-text);
  font-size: 15px;
}

.app-layout[data-view="executive"] .sales-control-bar {
  display: none !important;
}

.app-layout[data-view="executive"] .topbar {
  margin-bottom: 0;
}

.executive-order-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #edf1f6;
}

.executive-order-row > strong {
  overflow: hidden;
  color: #4f46e5;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.executive-order-row > span {
  overflow: hidden;
  color: #334155;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.executive-order-row > b {
  color: var(--executive-text);
  font-size: 10px;
  white-space: nowrap;
}

.executive-order-row .marketplace {
  padding: 4px 6px;
  border-radius: 5px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 8px;
  font-weight: 600;
  white-space: nowrap;
}

.executive-order-row .marketplace.shopee {
  background: #fff3e8;
  color: #ea580c;
}

.executive-empty {
  margin: 30px 0;
  color: var(--executive-muted);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 1380px) {
  .executive-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .executive-analytics-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.75fr);
  }

  .executive-goals-card {
    grid-column: 1 / -1;
    min-height: auto;
  }

  .executive-goals-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .executive-toolbar {
    margin-top: 0;
    margin-bottom: 0;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

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

  .executive-analytics-grid {
    grid-template-columns: 1fr;
  }

  .executive-goals-card {
    grid-column: auto;
  }

  .executive-goals-list {
    grid-template-columns: 1fr;
  }

  .executive-bottom-grid .executive-list-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .executive-toolbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .executive-filter-button,
  .executive-refresh-button {
    width: 100%;
    justify-content: center;
  }

  .executive-kpi-grid,
  .executive-bottom-grid {
    grid-template-columns: 1fr;
  }

  .executive-kpi-card {
    min-height: 108px;
  }

  .executive-channel-content {
    grid-template-columns: 1fr;
  }

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

  .executive-bottom-grid .executive-list-card:last-child {
    grid-column: auto;
  }

  .executive-order-row {
    grid-template-columns: 64px minmax(0, 1fr) auto;
  }

  .executive-order-row .marketplace {
    display: none;
  }
}

/* Contextual page visibility must win over layout display rules. */
.dashboard-view[hidden],
.sales-control-bar[hidden],
.topbar-actions #syncButton[hidden],
.topbar-actions .presentation-toggle[hidden] {
  display: none !important;
}

.app-layout:not([data-view="dashboard"]) .topbar {
  margin-bottom: 18px;
}

.app-layout:not([data-view="dashboard"]) .topbar-actions {
  align-self: flex-start;
}

/* Sales page model */
.sales-control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--hm-border);
  border-radius: var(--hm-radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--hm-shadow-soft);
}

.sales-control-bar > div:first-child > span {
  display: block;
  margin-bottom: 8px;
  color: var(--hm-muted);
  font-size: 12px;
  font-weight: 600;
}

.sales-control-bar .account-chip {
  min-height: 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--hm-text);
}

.sales-control-bar .periods {
  justify-content: flex-end;
  gap: 6px;
}

.sales-control-bar .period {
  min-height: 38px;
  padding: 0 16px;
  border-color: var(--hm-border);
  background: #ffffff;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
}

.sales-control-bar .period.active {
  border-color: var(--hm-primary);
  background: var(--hm-primary);
  color: #ffffff;
}

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

.sales-kpi-grid .metric-card {
  position: relative;
  min-height: 178px;
  padding: 22px;
  overflow: hidden;
}

.sales-kpi-grid .metric-card::before {
  content: "";
  width: 44px;
  height: 44px;
  display: block;
  margin-bottom: 22px;
  border-radius: 14px;
  background: var(--card-accent-bg, #eef2ff);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.sales-kpi-grid .metric-card::after {
  content: "";
  position: absolute;
  top: 22px;
  right: 18px;
  width: 96px;
  height: 48px;
  border: solid var(--card-accent, var(--hm-primary));
  border-width: 0 0 2px 0;
  border-radius: 50%;
  opacity: 0.28;
  transform: rotate(-12deg);
}

.metric-card-primary {
  --card-accent: #22c55e;
  --card-accent-bg: #dcfce7;
}

.metric-card-success {
  --card-accent: #f59e0b;
  --card-accent-bg: #fef3c7;
}

.metric-card-info {
  --card-accent: #3b82f6;
  --card-accent-bg: #dbeafe;
}

.metric-card-warning {
  --card-accent: #a855f7;
  --card-accent-bg: #f3e8ff;
}

.sales-kpi-grid .metric-card span {
  color: var(--hm-text);
  font-size: 14px;
  font-weight: 600;
}

.sales-kpi-grid .metric-card strong {
  margin-top: 8px;
  font-size: clamp(27px, 2.3vw, 36px);
  line-height: 1.08;
}

.sales-kpi-grid .metric-card small {
  margin-top: 14px;
  color: var(--hm-muted);
  font-size: 13px;
}

.sales-kpi-grid .metric-card .kpi-comparison {
  position: relative;
  z-index: 1;
  display: block;
  min-height: 18px;
  margin-top: auto;
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.sales-kpi-grid .metric-card .kpi-comparison.positive {
  color: #16a34a;
}

.sales-kpi-grid .metric-card .kpi-comparison.negative {
  color: #dc2626;
}

.sales-kpi-grid .metric-card .kpi-comparison.neutral,
.sales-kpi-grid .metric-card .kpi-comparison.unavailable {
  color: #64748b;
}

.sales-breakdown-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0 0 16px;
  padding: 0;
}

.sales-breakdown-grid .metric-card {
  min-height: 104px;
  padding: 18px;
}

.sales-breakdown-grid .metric-card strong {
  font-size: clamp(18px, 1.6vw, 24px);
}

.chart-panel.dashboard-view {
  margin-bottom: 16px;
}

.chart-panel .section-header {
  min-height: 72px;
}

.period-chart-wrap {
  height: 280px;
  min-height: 280px;
  padding: 0 18px 18px;
}

.ads-summary-panel.dashboard-view {
  grid-template-columns: minmax(220px, 1.5fr) repeat(5, minmax(120px, 1fr));
  margin-bottom: 16px;
  padding: 20px;
}

.ads-investment,
.ads-kpi {
  min-height: 84px;
  padding: 8px 10px;
  border-radius: 14px;
}

.ads-kpi span,
.ads-investment span {
  color: var(--hm-muted);
  font-size: 13px;
  font-weight: 600;
}

.ads-kpi strong,
.ads-investment strong {
  color: var(--hm-text);
  font-size: 22px;
  font-weight: 700;
}

.ads-subtract {
  border-color: #fecaca;
  background: #fff7ed;
  color: #ef4444;
}

.product-share-panel.dashboard-view {
  margin-bottom: 16px;
  padding: 0;
}

.compact-panel-header {
  min-height: 76px;
  margin-bottom: 0;
}

.product-share-panel .product-share-grid {
  padding: 18px;
}

.product-share-item {
  border: 1px solid var(--hm-border);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.sales-panel.dashboard-view {
  margin-bottom: 24px;
}

.sales-panel .section-header {
  margin-bottom: 0;
}

.sales-panel .sales-table-wrap {
  margin: 0 18px 18px;
}

.sales-table th,
.sales-table td {
  padding: 14px 16px;
}

.sales-table th {
  height: 48px;
}

.sales-table td {
  height: 62px;
}

.sales-panel .pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 18px 18px;
}

@media (max-width: 1280px) {
  .sales-kpi-grid,
  .sales-breakdown-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ads-summary-panel.dashboard-view {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .sales-control-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .sales-control-bar .periods {
    justify-content: flex-start;
  }

  .sales-kpi-grid,
  .sales-breakdown-grid,
  .ads-summary-panel.dashboard-view {
    grid-template-columns: 1fr;
  }

  .period-chart-wrap {
    height: 220px;
    min-height: 220px;
  }
}

/* Sales template fidelity pass */
body {
  font-family: Inter, "Inter", "Segoe UI", Arial, sans-serif;
}

.app-shell {
  max-width: 1500px;
  padding: 34px 44px 56px;
}

.topbar {
  align-items: flex-start;
  margin-bottom: 18px;
}

.topbar h1 {
  margin: 0;
  color: #0f172a;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.08;
}

.page-description {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 14px;
  font-weight: 400;
}

.topbar-actions {
  align-items: center;
}

.status-pill#apiStatus,
.ghost-button#syncButton {
  display: none;
}

.icon-button,
.date-display-button {
  min-height: 40px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

.icon-button {
  width: 42px;
  padding: 0;
}

.date-display-button {
  padding: 0 18px;
}

.sales-control-bar {
  justify-content: flex-end;
  gap: 14px;
  margin-bottom: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.sales-control-bar .periods {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 3px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.sales-control-bar .period {
  min-height: 34px;
  min-width: 78px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
}

.sales-control-bar .period[data-period="yesterday"],
.sales-control-bar .period[data-period="1y"],
.sales-control-bar .period[data-period="custom"] {
  display: none;
}

.sales-control-bar .period.active {
  background: #4f46e5;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.24);
}

.store-select-wrap {
  min-height: 42px;
  min-width: 230px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.store-select-wrap > span,
.store-select-wrap > div:first-child > span {
  display: none;
}

.store-select-wrap .account-chip,
.sales-control-bar .account-chip {
  min-height: 0;
  gap: 6px;
  font-size: 12px;
}

.account-toggle {
  min-height: 28px;
  padding: 0 10px;
  border: 0;
  background: #f8fafc;
  color: #0f172a;
  font-size: 12px;
  box-shadow: none;
}

.account-toggle.active {
  background: #eef2ff;
  color: #4f46e5;
}

.sales-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.sales-kpi-grid .metric-card {
  min-height: 210px;
  padding: 26px;
  border-radius: 16px;
  border-color: #e5e7eb;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
}

.sales-kpi-grid .metric-card::before {
  width: 46px;
  height: 46px;
  margin-bottom: 28px;
  border-radius: 14px;
}

.sales-kpi-grid .metric-card::after {
  top: 36px;
  right: 24px;
  width: 112px;
  height: 56px;
  border-width: 0 0 2px;
  border-radius: 50%;
  opacity: 0.38;
}

.sales-kpi-grid .metric-card span {
  color: #0f172a;
  font-size: 15px;
  font-weight: 600;
}

.sales-kpi-grid .metric-card strong {
  margin-top: 10px;
  color: #020617;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0;
}

.sales-kpi-grid .metric-card small {
  display: block;
  margin-top: 26px;
  color: #64748b;
  font-size: 13px;
}

.sales-kpi-grid .metric-card small b {
  color: #16a34a;
  font-weight: 700;
}

.sales-breakdown-grid,
.ads-summary-panel.dashboard-view,
.product-share-panel.dashboard-view {
  display: none !important;
}

.sales-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 0.95fr);
  gap: 16px;
  margin-bottom: 16px;
}

.chart-panel.dashboard-view,
.performance-panel,
.channel-panel,
.top-products-panel,
.performance-indicators-panel,
.sales-panel.dashboard-view {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
}

.chart-panel .section-header {
  min-height: 84px;
  padding: 24px 26px 10px;
  border-bottom: 0;
}

.chart-panel .section-header h2,
.performance-panel h2,
.channel-panel h2,
.top-products-panel h2,
.performance-indicators-panel h2,
.sales-panel .section-header h2 {
  margin: 0;
  color: #0f172a;
  font-size: 17px;
  font-weight: 700;
}

.chart-total-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

.chart-total-row strong {
  color: #0f172a;
  font-size: 24px;
  font-weight: 700;
}

.chart-total-row span {
  color: #16a34a;
  font-size: 14px;
  font-weight: 700;
}

.chart-total-row small {
  color: #64748b;
  font-weight: 400;
}

.chart-tabs {
  min-width: 128px;
}

.chart-tab {
  min-height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 13px;
}

.period-chart-wrap {
  height: 305px;
  min-height: 305px;
  padding: 0 26px 22px;
}

.performance-panel {
  padding: 24px 26px;
}

.performance-list {
  display: grid;
  gap: 0;
  margin-top: 28px;
}

.performance-list > div {
  min-height: 74px;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  column-gap: 14px;
  border-bottom: 1px solid #e5e7eb;
}

.performance-list > div:last-child {
  border-bottom: 0;
}

.performance-list p,
.performance-indicators p {
  margin: 0;
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
}

.performance-list strong {
  color: #0f172a;
  font-size: 18px;
  font-weight: 700;
  text-align: right;
}

.performance-list small {
  grid-column: 3;
  color: #64748b;
  font-size: 12px;
  text-align: right;
}

.performance-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
}

.performance-icon.green { background: #dcfce7; color: #16a34a; }
.performance-icon.amber { background: #fef3c7; color: #f59e0b; }
.performance-icon.blue { background: #dbeafe; color: #3b82f6; }
.performance-icon.purple { background: #f3e8ff; color: #9333ea; }

.sales-secondary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.channel-panel,
.top-products-panel {
  padding: 24px 26px;
}

.channel-bars {
  display: grid;
  gap: 22px;
  margin-top: 30px;
}

.channel-bars > div {
  display: grid;
  grid-template-columns: 140px minmax(120px, 1fr) 44px;
  align-items: center;
  gap: 18px;
}

.channel-bars span {
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
}

.channel-bars i {
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--color) var(--bar), #f1f5f9 var(--bar));
}

.channel-bars strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
}

.simple-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.simple-panel-header button {
  border: 0;
  background: transparent;
  color: #4f46e5;
  font-size: 13px;
  font-weight: 700;
}

.top-products-list {
  display: grid;
  gap: 0;
  margin-top: 16px;
}

.top-product-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: 24px 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #e5e7eb;
}

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

.top-product-rank {
  color: #0f172a;
  font-weight: 700;
}

.top-product-row img,
.top-product-image {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  object-fit: cover;
  background: #f1f5f9;
}

.top-product-row strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
}

.top-product-row small {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
}

.top-product-row p {
  margin: 0;
  color: #16a34a;
  text-align: right;
}

.performance-indicators-panel {
  margin-bottom: 16px;
  padding: 24px 26px;
}

.performance-indicators {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  margin-top: 26px;
}

.performance-indicators > div {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 12px;
}

.performance-indicators strong {
  grid-column: 2;
  color: #0f172a;
  font-size: 22px;
  font-weight: 700;
}

.performance-indicators small {
  grid-column: 2;
  color: #16a34a;
  font-size: 13px;
  font-weight: 700;
}

.sales-panel.dashboard-view {
  padding: 0;
}

.sales-panel .section-header {
  min-height: 74px;
  align-items: center;
  margin: 0;
  padding: 22px 26px;
  border-bottom: 0;
}

.sales-panel .grid-toolbar {
  margin-left: auto;
}

.columns-menu {
  display: none;
}

.sales-panel .filter-box {
  min-width: 310px;
  height: 40px;
  border-radius: 8px;
  background: #ffffff;
}

.sales-panel .sales-table-wrap {
  margin: 0 26px;
  border-radius: 12px;
}

.sales-table th {
  height: 46px;
  background: #ffffff;
  color: #0f172a;
  font-size: 13px;
}

.sales-table td {
  height: 60px;
  color: #0f172a;
  font-size: 13px;
}

.template-product-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.template-product-cell .product-photo {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 8px;
}

.template-product-cell span {
  max-width: 330px;
  overflow: hidden;
  color: #0f172a;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-table [data-column="account"] {
  color: #4f46e5;
  font-weight: 700;
}

.sales-table [data-column="profit"] strong {
  color: #16a34a;
}

.sales-panel .pagination {
  justify-content: space-between;
  padding: 18px 26px 24px;
}

.sales-panel .pagination::before {
  content: "Mostrando pedidos sincronizados";
  color: #64748b;
  font-size: 13px;
}

@media (max-width: 1180px) {
  .sales-main-grid,
  .sales-secondary-grid {
    grid-template-columns: 1fr;
  }

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

/* Page chrome normalization v4: final override for compact SaaS pages. */
:root {
  --hm-sidebar: 216px;
}

.side-nav {
  width: var(--hm-sidebar) !important;
  padding: 18px 10px !important;
}

.app-shell {
  padding-left: clamp(16px, 2vw, 32px) !important;
  padding-right: clamp(16px, 2vw, 32px) !important;
}

.app-layout:is(
    [data-view="full"],
    [data-view="listingImprovement"],
    [data-view="products"],
    [data-view="payables"],
    [data-view="clientAccounts"],
    [data-view="executive"]
  )
  .topbar {
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  width: 100% !important;
  min-height: 0 !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
}

.app-layout:is(
    [data-view="full"],
    [data-view="listingImprovement"],
    [data-view="products"],
    [data-view="payables"],
    [data-view="clientAccounts"],
    [data-view="executive"]
  )
  .topbar
  > div:first-child,
.app-layout:is(
    [data-view="full"],
    [data-view="listingImprovement"],
    [data-view="products"],
    [data-view="payables"],
    [data-view="clientAccounts"],
    [data-view="executive"]
  )
  .topbar
  .page-description,
.app-layout:is(
    [data-view="full"],
    [data-view="listingImprovement"],
    [data-view="products"],
    [data-view="payables"],
    [data-view="clientAccounts"],
    [data-view="executive"]
  )
  .sales-control-bar,
.app-layout:is(
    [data-view="full"],
    [data-view="listingImprovement"],
    [data-view="products"],
    [data-view="payables"],
    [data-view="clientAccounts"],
    [data-view="executive"]
  )
  .sales-top-actions,
.app-layout:is(
    [data-view="full"],
    [data-view="listingImprovement"],
    [data-view="products"],
    [data-view="payables"],
    [data-view="clientAccounts"],
    [data-view="executive"]
  )
  #syncButton {
  display: none !important;
}

.app-layout:is(
    [data-view="full"],
    [data-view="listingImprovement"],
    [data-view="products"],
    [data-view="payables"],
    [data-view="clientAccounts"],
    [data-view="executive"]
  )
  .topbar-actions {
  width: auto !important;
  min-width: 0 !important;
  display: inline-flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 10px !important;
}

.app-layout:is(
    [data-view="full"],
    [data-view="listingImprovement"],
    [data-view="products"],
    [data-view="payables"],
    [data-view="clientAccounts"],
    [data-view="executive"]
  )
  .app-shell {
  padding-top: 18px !important;
}

.app-layout:is(
    [data-view="full"],
    [data-view="listingImprovement"],
    [data-view="products"],
    [data-view="payables"],
    [data-view="clientAccounts"],
    [data-view="executive"]
  )
  :is(
    .full-page,
    .listing-improvement-panel,
    .products-page,
    .payables-modern-page,
    .client-accounts-page,
    .executive-dashboard-v2
  ) {
  margin-top: 0 !important;
  padding-top: 0 !important;
  gap: 16px !important;
}

.app-layout:is(
    [data-view="full"],
    [data-view="listingImprovement"],
    [data-view="products"],
    [data-view="payables"],
    [data-view="clientAccounts"],
    [data-view="executive"]
  )
  :is(
    .full-page-header,
    .listing-page-header,
    .products-header,
    .payables-page-header,
    .client-accounts-header,
    .executive-toolbar
  ) {
  display: grid !important;
  grid-template-columns: minmax(260px, 1fr) auto !important;
  align-items: center !important;
  gap: 14px !important;
  min-height: 0 !important;
  margin: 0 0 16px !important;
  padding: 0 !important;
  padding-right: 0 !important;
}

.app-layout:is(
    [data-view="full"],
    [data-view="listingImprovement"],
    [data-view="products"],
    [data-view="payables"],
    [data-view="clientAccounts"],
    [data-view="executive"]
  )
  :is(
    .full-page-header,
    .listing-page-header,
    .products-header,
    .payables-page-header,
    .client-accounts-header,
    .executive-toolbar
  )
  h2 {
  margin: 0 !important;
  font-size: clamp(28px, 2vw, 34px) !important;
  line-height: 1.05 !important;
}

.app-layout:is(
    [data-view="full"],
    [data-view="listingImprovement"],
    [data-view="products"],
    [data-view="payables"],
    [data-view="clientAccounts"],
    [data-view="executive"]
  )
  :is(
    .full-page-header,
    .listing-page-header,
    .products-header,
    .payables-page-header,
    .client-accounts-header,
    .executive-toolbar
  )
  p {
  margin: 6px 0 0 !important;
}

.app-layout[data-view="listingImprovement"] .listing-header-actions {
  display: grid !important;
  grid-template-columns: minmax(210px, 1fr) auto minmax(240px, 420px) !important;
  align-items: center !important;
  justify-content: flex-end !important;
  width: 100% !important;
}

.app-layout[data-view="listingImprovement"] .listing-header-actions .listing-analyze-button {
  min-width: 0 !important;
}

.app-layout[data-view="full"] .full-actions,
.app-layout[data-view="products"] .products-header-actions,
.app-layout[data-view="payables"] .payables-header-actions,
.app-layout[data-view="clientAccounts"] .client-accounts-actions,
.app-layout[data-view="executive"] .executive-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
}

.app-layout[data-view="full"] .full-kpi-row,
.app-layout[data-view="listingImprovement"] .listing-kpi-grid,
.app-layout[data-view="products"] .products-kpi-grid,
.app-layout[data-view="payables"] .payables-kpi-grid,
.app-layout[data-view="clientAccounts"] .client-accounts-summary,
.app-layout[data-view="executive"] .exec-kpi-row {
  margin-top: 0 !important;
}

@media (max-width: 1180px) {
  .app-layout:is(
      [data-view="full"],
      [data-view="listingImprovement"],
      [data-view="products"],
      [data-view="payables"],
      [data-view="clientAccounts"],
      [data-view="executive"]
    )
    :is(
      .full-page-header,
      .listing-page-header,
      .products-header,
      .payables-page-header,
      .client-accounts-header,
      .executive-toolbar
    ) {
    grid-template-columns: 1fr !important;
  }

  .app-layout[data-view="listingImprovement"] .listing-header-actions {
    grid-template-columns: 1fr !important;
  }

  .app-layout[data-view="full"] .full-actions,
  .app-layout[data-view="products"] .products-header-actions,
  .app-layout[data-view="payables"] .payables-header-actions,
  .app-layout[data-view="clientAccounts"] .client-accounts-actions,
  .app-layout[data-view="executive"] .executive-actions {
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
  }
}

/* Page chrome normalization v3: use Vendas as the spacing reference for every module. */
:root {
  --hm-sidebar: 216px;
}

.side-nav {
  width: var(--hm-sidebar) !important;
  padding-inline: 10px !important;
}

.side-brand {
  padding-inline: 4px !important;
}

.menu-item,
.submenu-item {
  font-weight: 500 !important;
}

.app-shell {
  padding-left: clamp(16px, 2vw, 34px) !important;
  padding-right: clamp(16px, 2vw, 34px) !important;
}

.app-layout:not([data-view="dashboard"]) .topbar {
  position: relative !important;
  inset: auto !important;
  z-index: 3 !important;
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  width: 100% !important;
  min-height: 0 !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
}

.app-layout:not([data-view="dashboard"]) .topbar > div:first-child,
.app-layout:not([data-view="dashboard"]) .topbar .page-description,
.app-layout:not([data-view="dashboard"]) .sales-control-bar,
.app-layout:not([data-view="dashboard"]) .sales-top-actions,
.app-layout:not([data-view="dashboard"]) #syncButton {
  display: none !important;
}

.app-layout:not([data-view="dashboard"]) .topbar-actions {
  display: inline-flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 10px !important;
  width: auto !important;
  min-width: 0 !important;
}

.app-layout:is(
    [data-view="full"],
    [data-view="listingImprovement"],
    [data-view="products"],
    [data-view="payables"],
    [data-view="clientAccounts"],
    [data-view="executive"]
  )
  .app-shell {
  position: relative !important;
  padding-top: 18px !important;
}

.app-layout:is(
    [data-view="full"],
    [data-view="listingImprovement"],
    [data-view="products"],
    [data-view="payables"],
    [data-view="clientAccounts"],
    [data-view="executive"]
  )
  :is(
    .full-page,
    .listing-improvement-panel,
    .products-page,
    .payables-modern-page,
    .client-accounts-page,
    .executive-dashboard-v2
  ) {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.app-layout:is(
    [data-view="full"],
    [data-view="listingImprovement"],
    [data-view="products"],
    [data-view="payables"],
    [data-view="clientAccounts"],
    [data-view="executive"]
  )
  :is(
    .full-page-header,
    .section-header,
    .listing-page-header,
    .products-header,
    .payables-page-header,
    .client-accounts-header,
    .executive-toolbar
  ) {
  display: grid !important;
  grid-template-columns: minmax(280px, 1fr) auto !important;
  align-items: center !important;
  gap: 16px !important;
  min-height: 0 !important;
  margin: 0 0 16px !important;
  padding: 0 !important;
}

.app-layout:is(
    [data-view="full"],
    [data-view="listingImprovement"],
    [data-view="products"],
    [data-view="payables"],
    [data-view="clientAccounts"],
    [data-view="executive"]
  )
  :is(.full-page-header, .section-header, .listing-page-header, .products-header, .payables-page-header, .client-accounts-header, .executive-toolbar)
  h2 {
  margin: 0 !important;
  font-size: clamp(28px, 2vw, 36px) !important;
  line-height: 1.05 !important;
}

.app-layout:is(
    [data-view="full"],
    [data-view="listingImprovement"],
    [data-view="products"],
    [data-view="payables"],
    [data-view="clientAccounts"],
    [data-view="executive"]
  )
  :is(.full-page-header, .section-header, .listing-page-header, .products-header, .payables-page-header, .client-accounts-header, .executive-toolbar)
  p,
.app-layout[data-view="listingImprovement"] .section-subtitle {
  display: block !important;
  margin-top: 6px !important;
}

.app-layout[data-view="listingImprovement"] .listing-header-actions,
.app-layout[data-view="clientAccounts"] .client-accounts-actions,
.app-layout[data-view="payables"] .payables-header-actions,
.app-layout[data-view="products"] .products-header-actions,
.app-layout[data-view="full"] .full-actions,
.app-layout[data-view="executive"] .executive-toolbar {
  align-items: center !important;
  justify-content: flex-end !important;
  width: auto !important;
  min-width: 0 !important;
}

.app-layout[data-view="listingImprovement"] .listing-header-actions {
  display: grid !important;
  grid-template-columns: minmax(220px, 1fr) auto minmax(260px, 460px) !important;
}

.app-layout[data-view="listingImprovement"] .listing-header-actions .listing-analyze-button {
  min-width: 0 !important;
}

.app-layout[data-view="full"] .full-kpi-row,
.app-layout[data-view="products"] .products-kpi-grid,
.app-layout[data-view="payables"] .payables-kpi-grid,
.app-layout[data-view="clientAccounts"] .client-accounts-summary,
.app-layout[data-view="executive"] .exec-kpi-row,
.app-layout[data-view="listingImprovement"] .listing-kpi-grid {
  margin-top: 0 !important;
}

.app-layout[data-view="products"] .products-page,
.app-layout[data-view="payables"] .payables-modern-page,
.app-layout[data-view="clientAccounts"] .client-accounts-page,
.app-layout[data-view="executive"] .executive-dashboard-v2,
.app-layout[data-view="listingImprovement"] .listing-improvement-panel {
  gap: 16px !important;
}

@media (max-width: 1180px) {
  .app-layout:is(
      [data-view="full"],
      [data-view="listingImprovement"],
      [data-view="products"],
      [data-view="payables"],
      [data-view="clientAccounts"],
      [data-view="executive"]
    )
    :is(
      .full-page-header,
      .section-header,
      .listing-page-header,
      .products-header,
      .payables-page-header,
      .client-accounts-header,
      .executive-toolbar
    ) {
    grid-template-columns: 1fr !important;
  }

  .app-layout[data-view="listingImprovement"] .listing-header-actions,
  .app-layout[data-view="clientAccounts"] .client-accounts-actions,
  .app-layout[data-view="payables"] .payables-header-actions,
  .app-layout[data-view="products"] .products-header-actions,
  .app-layout[data-view="full"] .full-actions,
  .app-layout[data-view="executive"] .executive-toolbar {
    justify-content: flex-start !important;
    width: 100% !important;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 22px 16px 36px;
  }

  .sales-control-bar {
    align-items: stretch;
  }

  .sales-control-bar .periods {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .store-select-wrap {
    width: 100%;
  }

  .sales-kpi-grid,
  .performance-indicators {
    grid-template-columns: 1fr;
  }

  .channel-bars > div {
    grid-template-columns: 110px minmax(100px, 1fr) 40px;
  }
}

/* Sales v2 refinements */
.side-nav {
  padding: 24px 18px 18px;
}

.side-brand {
  padding-bottom: 20px;
}

.side-brand strong {
  font-size: 18px;
  letter-spacing: -0.01em;
}

.menu-list {
  gap: 8px;
}

.menu-item,
.submenu-item {
  min-height: 42px;
  border-radius: 12px;
  color: #334155;
  font-size: 15px;
  font-weight: 500;
}

.menu-item.active,
.submenu-item.active,
.menu-item.menu-parent.active {
  background: #eef2ff;
  color: #4f46e5;
  font-weight: 600;
}

.menu-icon,
.submenu-icon {
  background: transparent;
  color: #64748b;
}

.menu-icon svg,
.submenu-icon svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.9;
}

.menu-item:hover .menu-icon,
.submenu-item:hover .submenu-icon,
.menu-item.active .menu-icon,
.submenu-item.active .submenu-icon {
  background: #eef2ff;
  color: #4f46e5;
}

.submenu {
  margin: 2px 0 8px 38px;
  padding-left: 10px;
}

.submenu-item {
  min-height: 36px;
  color: #475569;
  font-size: 14px;
}

.topbar {
  max-width: 1320px;
  margin-inline: auto;
}

.sales-control-bar {
  max-width: 1320px;
  margin-inline: auto;
}

.sales-control-bar::before {
  content: "Contas selecionadas";
  align-self: center;
  margin-right: -2px;
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
}

.store-select-wrap {
  min-width: 260px;
  border-radius: 12px;
}

.account-toggle {
  gap: 7px;
  background: #f3f4ff;
  color: #4f46e5;
  font-weight: 600;
}

.account-toggle::before {
  box-shadow: 0 0 0 3px #fff;
}

.sales-kpi-grid,
.sales-main-grid,
.sales-secondary-grid,
.performance-indicators-panel,
.sales-panel.dashboard-view {
  max-width: 1320px;
  margin-inline: auto;
}

.sales-kpi-grid .metric-card::before {
  display: grid;
  place-items: center;
  color: var(--card-accent);
  font-size: 23px;
  font-weight: 700;
}

.sales-kpi-grid .metric-card:nth-child(1)::before {
  content: "$";
}

.sales-kpi-grid .metric-card:nth-child(2)::before {
  content: "⌁";
}

.sales-kpi-grid .metric-card:nth-child(3)::before {
  content: "◇";
}

.sales-kpi-grid .metric-card:nth-child(4)::before {
  content: "▣";
}

.chart-panel .section-header {
  align-items: flex-start;
}

.chart-tabs {
  display: flex;
  justify-content: flex-end;
}

.chart-tab[data-chart="revenue"] {
  min-width: 104px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.chart-tab[data-chart="revenue"]::after {
  content: "⌄";
  margin-left: 10px;
  color: #64748b;
}

.chart-tab[data-chart="revenue"].active {
  color: #0f172a;
}

.performance-icon {
  position: relative;
  font-size: 0;
}

.performance-icon-svg::before,
.performance-icon-svg::after {
  display: none;
  content: none;
}

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

.performance-icon::before,
.performance-icon::after {
  content: "";
  position: absolute;
  inset: 11px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.performance-icon[data-icon="rocket"]::before,
.performance-icon[data-icon="megaphone"]::before {
  inset: 12px 10px 10px 14px;
  border-radius: 2px 10px 10px 2px;
  transform: rotate(-35deg);
}

.performance-icon[data-icon="rocket"]::after {
  inset: auto 11px 9px auto;
  width: 8px;
  height: 8px;
  border-width: 0 2px 2px 0;
  border-radius: 0;
  transform: rotate(45deg);
}

.performance-icon[data-icon="target"]::before {
  inset: 10px;
}

.performance-icon[data-icon="target"]::after {
  inset: 16px;
}

.performance-icon[data-icon="layers"]::before {
  inset: 11px 9px;
  border-radius: 4px;
  transform: rotate(45deg);
}

.performance-icon[data-icon="layers"]::after {
  inset: 17px 9px auto;
  height: 7px;
  border-width: 0 0 2px;
  border-radius: 0;
}

.performance-icon[data-icon="pie"]::before {
  inset: 10px;
  border-radius: 999px;
}

.performance-icon[data-icon="pie"]::after {
  inset: 10px 10px auto auto;
  width: 12px;
  height: 12px;
  border-width: 0 0 2px 2px;
  border-radius: 0 999px 0 0;
}

.performance-icon[data-icon="bag"]::before {
  inset: 14px 10px 9px;
  border-radius: 4px;
}

.performance-icon[data-icon="bag"]::after {
  inset: 9px 15px auto;
  height: 9px;
  border-width: 2px 2px 0;
  border-radius: 999px 999px 0 0;
}

.performance-icon[data-icon="funnel"]::before {
  inset: 11px 9px 18px;
  border-radius: 3px;
}

.performance-icon[data-icon="funnel"]::after {
  inset: 18px 16px 9px;
  border-width: 0 2px 2px;
  border-radius: 0 0 3px 3px;
}

.performance-icon[data-icon="return"]::before {
  inset: 11px;
  border-right-color: transparent;
  transform: rotate(-40deg);
}

.performance-icon[data-icon="return"]::after {
  inset: 11px auto auto 10px;
  width: 9px;
  height: 9px;
  border-width: 2px 0 0 2px;
  border-radius: 0;
  transform: rotate(-45deg);
}

.performance-icon[data-icon="coin"]::before {
  inset: 10px;
}

.performance-icon[data-icon="coin"]::after {
  content: "$";
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: currentColor;
  font-size: 15px;
  font-weight: 800;
}

.top-product-row img,
.top-product-image,
.template-product-cell .product-photo,
.share-thumb {
  border: 1px solid #e5e7eb;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.template-product-cell .product-photo {
  padding: 2px;
  object-fit: cover;
}

.product-photo.placeholder,
.top-product-image.placeholder,
.share-thumb.placeholder {
  background: #f1f5f9;
}

@media (max-width: 760px) {
  .sales-control-bar::before {
    margin-right: 0;
  }
}

/* Sales page polish - 20260610 */
.side-nav {
  width: var(--hm-sidebar);
  padding: 28px 18px 18px;
  background: #ffffff;
}

.brand {
  gap: 12px;
  padding: 0 10px 26px;
  border-bottom: 1px solid #e5e7eb;
}

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

.brand h1 {
  font-size: 20px;
  letter-spacing: -0.02em;
}

.brand span {
  color: #64748b;
  font-size: 12px;
}

.menu-list {
  gap: 4px;
  margin-top: 22px;
}

.menu-item {
  min-height: 46px;
  justify-content: flex-start;
  gap: 12px;
  padding: 0 12px;
  border-radius: 12px;
  color: #475569;
  font-size: 15px;
  font-weight: 500;
}

.menu-icon,
.submenu-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 10px;
  background: #f8fafc;
  color: #64748b;
}

.menu-item.active {
  background: #eef2ff;
  color: #4f46e5;
}

.menu-item.active .menu-icon,
.submenu-item.active .submenu-icon {
  background: #e0e7ff;
  color: #4f46e5;
}

.submenu {
  margin: 2px 0 8px 46px;
  padding-left: 14px;
  border-left: 1px solid #e5e7eb;
}

.submenu-item {
  min-height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
}

.plan-pill {
  width: 100%;
  justify-content: center;
  gap: 8px;
  white-space: normal;
}

.topbar-actions .status-pill,
.topbar-actions #syncButton {
  display: none !important;
}

.sales-control-bar {
  min-height: 58px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  padding: 0;
}

.sales-control-bar::before {
  content: "Contas selecionadas";
  align-self: center;
  margin: 0 -4px 0 auto;
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
}

.sales-control-bar .periods {
  order: 1;
  min-height: 46px;
  padding: 4px;
  gap: 0;
  border-radius: 14px;
}

.sales-control-bar .period {
  min-width: 82px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 16px;
  border-radius: 0;
  border-left: 1px solid #e5e7eb;
  font-weight: 500;
}

.sales-control-bar .period:first-child {
  border-left: 0;
}

.sales-control-bar .period[data-period="today"] {
  border-radius: 10px 0 0 10px;
}

.sales-control-bar .period[data-period="custom"] {
  display: inline-flex !important;
  min-width: 118px;
  margin-left: 8px;
  border-radius: 0 10px 10px 0;
  position: relative;
}

.sales-control-bar .period[data-period="custom"]::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 7px;
  width: 1px;
  height: 22px;
  background: #cbd5e1;
}

.sales-control-bar .period.active {
  border-color: transparent;
  border-radius: 10px;
  font-weight: 700;
}

.store-select-wrap {
  order: 2;
  min-width: 250px;
  min-height: 46px;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 14px;
}

.store-select-wrap > span,
.store-select-wrap > div:first-child > span {
  display: none !important;
}

.account-toggle {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f8fafc;
  color: #4f46e5;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

.sales-main-grid {
  align-items: stretch;
}

.chart-panel.dashboard-view,
.performance-panel {
  min-height: 410px;
  height: 100%;
}

.period-chart-wrap {
  height: 286px;
  min-height: 286px;
}

.performance-panel {
  display: flex;
  flex-direction: column;
}

.performance-list {
  flex: 1;
}

.channel-bars {
  gap: 28px;
}

.channel-bars > div {
  grid-template-columns: 160px minmax(120px, 1fr) 44px;
}

.channel-bars span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.channel-icon {
  width: 26px;
  height: 26px;
  display: inline-block;
  flex: 0 0 26px;
  overflow: hidden;
  border-radius: 999px;
  background-repeat: no-repeat;
  box-shadow: 0 0 0 3px #ffffff;
}

.channel-icon.ml {
  width: 30px;
  height: 28px;
  flex-basis: 30px;
  border-radius: 6px;
  background-color: #ffffff;
}

img.channel-icon.ml {
  display: block;
  box-sizing: border-box;
  padding: 1px;
  object-fit: contain;
  object-position: center;
  background: #ffffff;
}

.channel-icon.shopee {
  border-radius: 8px;
  background-color: #fff1f2;
  background-image: url("./assets/shopee-logo.svg");
  background-size: 24px auto;
  background-position: center 1px;
}

.sales-table .product-photo {
  box-sizing: border-box;
  padding: 2px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.08);
  object-fit: contain;
}

.sales-table .product-photo.placeholder {
  background: #f8fafc;
}

.sales-table [data-column="account"] {
  width: 126px;
}

.store-badge {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.03);
}

.store-badge-green {
  background: #dcfce7;
  color: #059669;
}

.store-badge-blue {
  background: #dbeafe;
  color: #2563eb;
}

.store-badge-orange {
  background: #ffedd5;
  color: #f97316;
}

.sales-table [data-column="profit"] strong.profit-positive {
  color: #16a34a;
}

.sales-table [data-column="profit"] strong.profit-negative {
  color: #dc2626;
}

.sales-panel .pagination {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
}

.sales-panel .pagination::before {
  content: none !important;
}

#pageInfo {
  margin-right: auto;
  color: #64748b;
  font-size: 13px;
  font-weight: 400;
}

#pageSize {
  display: none;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.page-number,
.page-button {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  color: #334155;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.page-number.active {
  border-color: #4f46e5;
  background: #4f46e5;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(79, 70, 229, 0.22);
}

.page-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.page-dots {
  color: #64748b;
  padding: 0 2px;
}

@media (max-width: 1100px) {
  .sales-control-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .sales-control-bar::before {
    margin: 0;
  }

  .sales-control-bar .periods,
  .store-select-wrap {
    width: 100%;
    overflow-x: auto;
  }
}

/* Sales page polish round 2 - 20260610 */
.sales-control-bar::before {
  content: none !important;
  display: none !important;
}

.sales-control-bar > div:first-child > span,
.store-select-wrap > span,
.store-select-wrap > div:first-child > span {
  display: none !important;
}

.sales-control-bar {
  gap: 16px;
}

.sales-control-bar .period {
  border-color: #e5e7eb;
  color: #0f172a;
  font-weight: 500;
}

.sales-control-bar .period.active {
  background: #eef2ff !important;
  color: #4f46e5 !important;
  border-color: #c7d2fe !important;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.14) !important;
}

.sales-control-bar .period[data-period="custom"] {
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.menu-group,
.menu-group > .menu-item {
  width: 100%;
}

.menu-item,
.submenu-item {
  text-align: left;
}

.menu-item.menu-parent {
  justify-content: flex-start;
  padding-left: 14px;
}

.menu-caret {
  margin-left: auto;
}

.submenu {
  margin-left: 48px;
}

#profitHero .profit-percent {
  display: inline-block;
  margin-left: 6px;
  font-size: clamp(18px, 1.45vw, 24px);
  line-height: 1.1;
  vertical-align: baseline;
}

#profitHero .profit-percent-positive {
  color: #16a34a;
}

#profitHero .profit-percent-negative {
  color: #dc2626;
}

.performance-indicators-panel.ads-performance-panel {
  margin: 0 auto 20px;
  padding: 24px 26px;
}

.ads-performance-header {
  align-items: center;
  margin-bottom: 20px;
}

.ads-performance-header h2 {
  margin: 0;
}

.ads-performance-header .ads-subtract {
  min-height: 30px;
  border-radius: 999px;
  border: 1px solid #fecaca;
  background: #fff7ed;
  color: #dc2626;
  font-weight: 600;
}

.ads-performance-header .ads-subtract.active {
  border-color: #fecaca;
  background: #fff1f2;
  color: #dc2626;
}

.ads-summary-panel.dashboard-view {
  display: none !important;
}

.sales-breakdown-grid.dashboard-view {
  display: none !important;
}

.sales-main-grid {
  gap: 22px;
  margin-top: 0;
}

.performance-panel {
  min-height: 410px;
}

.finance-performance-list {
  gap: 0;
}

.finance-performance-list > div {
  min-height: 58px;
  padding: 13px 0;
}

.finance-performance-list strong {
  font-size: 18px;
}

.finance-performance-list small {
  font-size: 12px;
}

.top-product-rank,
.top-product-row p,
.top-product-row p strong {
  color: #16a34a !important;
}

/* Sales restore behavior - 20260610 */
.topbar-actions .status-pill,
.topbar-actions #syncButton {
  display: inline-flex !important;
}

.sales-top-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.notification-button,
.date-display-button {
  display: none !important;
}

.sales-control-bar .period[data-period="yesterday"],
.sales-control-bar .period[data-period="1y"] {
  display: inline-flex !important;
}

.sales-control-bar .period[data-period="custom"] {
  min-width: 136px;
}

.performance-indicators-panel.ads-performance-panel .performance-indicators {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 0;
}

.performance-indicators-panel.ads-performance-panel .performance-indicators > div:nth-child(1) {
  order: 4;
}

.performance-indicators-panel.ads-performance-panel .performance-indicators > div:nth-child(2) {
  order: 5;
}

.performance-indicators-panel.ads-performance-panel .performance-indicators > div:nth-child(3) {
  order: 6;
}

.performance-indicators-panel.ads-performance-panel .performance-indicators > div:nth-child(4) {
  order: 1;
}

.performance-indicators-panel.ads-performance-panel .performance-indicators > div:nth-child(5) {
  order: 2;
}

.performance-indicators-panel.ads-performance-panel .performance-indicators > div.ads-sales-metric {
  order: 3;
}

.sales-kpi-grid .metric-card strong {
  white-space: nowrap;
}

.sales-kpi-grid .metric-card-success strong {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: nowrap;
}

.sales-table [data-column="photo"] {
  width: 58px;
}

.sales-table [data-column="title"] {
  min-width: 230px;
}

.sales-table [data-column="logistic"],
.sales-table [data-column="quantity"],
.sales-table [data-column="fee"],
.sales-table [data-column="shipping"] {
  width: 88px;
}

.sales-table [data-column="cost"] {
  min-width: 148px;
}

.sales-table [data-column="profit"] {
  min-width: 118px;
}

.sales-table [data-column="profit"] small {
  margin-left: 8px;
  color: #0f172a;
  font-size: 12px;
}

.sales-table .cost-open {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}

.sales-table .cost-open:hover {
  background: #eef2ff;
  color: #4f46e5;
}

.cost-open::after {
  content: none;
}

.pencil-icon {
  width: 15px;
  height: 15px;
  display: block;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.chart-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chart-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.chart-info {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
}

.chart-period-total {
  display: block;
  margin-top: 10px;
  color: #0f172a;
  font-size: 22px;
  line-height: 1;
}

.chart-period-select select {
  min-width: 116px;
  height: 40px;
  padding: 0 34px 0 13px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 760px) {
  .chart-panel .section-header,
  .chart-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .chart-tabs {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .chart-period-select select {
    width: 100%;
  }
}

/* Sales dashboard polish - 20260611 */
.sales-kpi-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

.sales-kpi-grid .metric-card {
  --kpi-chart-color: #6366f1;
  --sales-kpi-color: #6366f1;
  --sales-kpi-icon-bg: #eef2ff;
  --sales-kpi-surface: #ffffff;
  --sales-kpi-border: #e5e7eb;
  min-width: 0;
  min-height: 218px;
  overflow: hidden;
  border-color: var(--sales-kpi-border);
  background: linear-gradient(135deg, #ffffff 0%, var(--sales-kpi-surface) 100%);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.06);
}

.sales-kpi-grid .metric-card::before {
  display: none !important;
}

.sales-kpi-grid .metric-card .kpi-comparison {
  display: block !important;
  min-height: 18px;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.sales-kpi-grid .metric-card::after {
  top: 18px !important;
  right: 16px !important;
  width: 126px !important;
  height: 82px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--kpi-chart-color) !important;
  -webkit-mask: url("./assets/kpi-line-chart.svg") center / contain no-repeat;
  mask: url("./assets/kpi-line-chart.svg") center / contain no-repeat;
  opacity: 0.48;
  transform: none !important;
}

.sales-kpi-grid .metric-card-primary {
  --kpi-chart-color: #22c55e;
  --sales-kpi-color: #16a34a;
  --sales-kpi-icon-bg: #dcfce7;
  --sales-kpi-surface: #f0fdf4;
  --sales-kpi-border: #bbf7d0;
}

.sales-kpi-grid .metric-card-success {
  --kpi-chart-color: #f59e0b;
  --sales-kpi-color: #f97316;
  --sales-kpi-icon-bg: #ffedd5;
  --sales-kpi-surface: #fffbeb;
  --sales-kpi-border: #fde68a;
}

.sales-kpi-grid .metric-card-info {
  --kpi-chart-color: #3b82f6;
  --sales-kpi-color: #2563eb;
  --sales-kpi-icon-bg: #dbeafe;
  --sales-kpi-surface: #eff6ff;
  --sales-kpi-border: #bfdbfe;
}

.sales-kpi-grid .metric-card-warning {
  --kpi-chart-color: #a855f7;
  --sales-kpi-color: #7c3aed;
  --sales-kpi-icon-bg: #ede9fe;
  --sales-kpi-surface: #faf5ff;
  --sales-kpi-border: #ddd6fe;
}

.sales-kpi-grid .metric-card-tax {
  --kpi-chart-color: #6366f1;
  --sales-kpi-color: #4f46e5;
  --sales-kpi-icon-bg: #e0e7ff;
  --sales-kpi-surface: #f5f3ff;
  --sales-kpi-border: #c7d2fe;
}

.sales-kpi-icon {
  position: relative;
  z-index: 1;
  display: grid !important;
  width: 52px;
  height: 52px;
  margin-bottom: 22px;
  place-items: center;
  border-radius: 15px;
  background: var(--sales-kpi-icon-bg);
  color: var(--sales-kpi-color) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.sales-kpi-icon svg,
.sales-kpi-icon img {
  display: block;
  width: 24px;
  height: 24px;
}

.sales-kpi-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sales-kpi-icon img {
  filter: brightness(0) saturate(100%) invert(48%) sepia(95%) saturate(1726%) hue-rotate(350deg) brightness(99%) contrast(96%);
}

.sales-kpi-grid .metric-card strong {
  position: relative;
  z-index: 1;
  max-width: 100%;
  font-size: clamp(22px, 1.5vw, 29px);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  white-space: nowrap;
}

.sales-kpi-grid .metric-card strong.kpi-value-compact {
  font-size: clamp(20px, 1.25vw, 25px);
}

.sales-kpi-grid .metric-card strong.kpi-value-tight {
  font-size: clamp(17px, 1vw, 20px);
}

.sales-kpi-grid .metric-card-success strong {
  max-width: 100%;
  font-size: clamp(18px, 1.15vw, 22px);
  gap: 3px;
}

#profitHero.kpi-value-compact .profit-percent,
#profitHero.kpi-value-tight .profit-percent {
  margin-left: 2px;
  font-size: 0.56em;
}

.sales-kpi-grid .metric-card #orders {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.orders-units {
  margin-top: 0 !important;
  color: #64748b;
  font-size: 0.46em !important;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.sales-kpi-grid .metric-card-tax::before {
  background: #ede9fe;
}

.sales-main-grid {
  grid-template-columns: minmax(0, 1.75fr) minmax(320px, 0.95fr);
  align-items: stretch;
}

.sales-main-grid .chart-panel.dashboard-view,
.sales-profit-panel {
  min-height: 410px;
}

.chart-panel .chart-controls {
  align-self: flex-start;
}

.chart-panel .chart-period-select select {
  min-width: 128px;
}

.sales-profit-panel {
  padding: 26px;
}

.sales-profit-panel .simple-panel-header {
  align-items: flex-start;
}

.panel-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.sales-profit-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #64748b;
  font-size: 12px;
}

.sales-profit-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sales-profit-legend i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.sales-profit-legend .orders {
  background: #4f46e5;
}

.sales-profit-legend .profit {
  background: #22c55e;
}

.sales-profit-chart-wrap {
  height: 300px;
  margin-top: 18px;
}

#salesProfitChart {
  display: block;
  width: 100%;
  height: 100%;
}

.sales-panel.dashboard-view {
  overflow: hidden;
  padding: 26px 28px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.06);
}

.sales-panel .sales-orders-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  min-height: 0;
  margin: 0;
  padding: 0 0 12px;
  border: 0;
}

.sales-panel .sales-orders-header h2 {
  margin: 0;
  color: #111827;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0;
}

.sales-panel .grid-toolbar {
  display: grid;
  grid-template-columns: minmax(300px, 420px) auto 1fr;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0;
}

.sales-panel .template-search.products-search {
  display: flex;
  width: 100%;
  height: 48px;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  color: #94a3b8;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.sales-panel .template-search.products-search svg {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sales-panel .template-search.products-search input {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #111827;
  font: inherit;
  font-size: 14px;
}

.sales-panel .template-search.products-search input::placeholder {
  color: #9ca3af;
}

.sales-panel .columns-menu {
  display: block;
}

.sales-panel .columns-button {
  display: inline-flex;
  height: 48px;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  color: #4b5563;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.sales-panel .columns-button svg,
.sales-update-status svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sales-panel .columns-popover {
  top: calc(100% + 8px);
  width: 220px;
  border-color: #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.14);
}

.sales-update-status {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 10px;
  color: #9ca3af;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.sales-panel .sales-table-wrap {
  margin: 0;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: none;
}

.sales-panel .sales-table {
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
}

.sales-panel .sales-table th,
.sales-panel .sales-table td {
  height: 58px;
  padding: 12px 20px;
  border-bottom: 1px solid #eef2f7;
  color: #111827;
  font-size: 14px;
}

.sales-panel .sales-table th {
  position: static;
  background: #ffffff;
  color: #111827;
  font-weight: 800;
}

.sales-panel .sales-table tbody tr:last-child td {
  border-bottom: 0;
}

.sales-panel .sales-table tbody tr:hover td {
  background: #f8fafc;
}

.sales-panel .template-product-cell {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.sales-panel .template-product-cell .product-photo,
.sales-table .product-photo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
}

.sales-panel .template-product-cell span {
  max-width: 420px;
  color: #111827;
  font-size: 14px;
  font-weight: 600;
}

.sales-panel .sales-table [data-column="title"] {
  min-width: 300px;
}

.sales-panel .sales-table [data-column="quantity"] {
  text-align: center;
}

.sales-panel .sales-table [data-column="value"],
.sales-panel .sales-table [data-column="profit"] {
  text-align: right;
}

.sales-panel .sales-table [data-column="profit"] strong {
  font-size: 15px;
  font-weight: 800;
}

.sales-panel .pagination {
  padding: 16px 0 0;
}

@media (max-width: 980px) {
  .sales-panel.dashboard-view {
    padding: 20px;
  }

  .sales-panel .grid-toolbar {
    grid-template-columns: 1fr auto;
  }

  .sales-update-status {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

.chart-panel.combined-financial-chart {
  width: min(1320px, 100%);
  max-width: 1320px;
  height: auto !important;
  min-height: 470px;
  margin: 0 auto 20px;
  box-sizing: border-box;
}

.chart-panel.combined-financial-chart .section-header {
  align-items: flex-start;
}

.chart-panel.combined-financial-chart .chart-controls {
  align-items: center;
  gap: 18px;
}

.financial-chart-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #64748b;
  font-size: 12px;
}

.financial-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.financial-chart-legend i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.financial-chart-legend .revenue {
  background: #2fc9b5;
}

.financial-chart-legend .profit {
  background: #4f46e5;
}

.chart-panel.combined-financial-chart .period-chart-wrap {
  height: 320px;
  min-height: 320px;
}

@media (max-width: 760px) {
  .chart-panel.combined-financial-chart {
    min-height: 390px;
  }

  .chart-panel.combined-financial-chart .period-chart-wrap {
    height: 250px;
    min-height: 250px;
  }

  .financial-chart-legend {
    justify-content: flex-start;
  }
}

@media (max-width: 1280px) {
  .sales-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 900px) {
  .sales-kpi-grid,
  .sales-main-grid {
    grid-template-columns: 1fr !important;
  }

  .sales-kpi-grid .metric-card {
    min-height: 150px;
  }
}

/* Compact sales filters */
.sales-control-bar.dashboard-view {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 12px !important;
  overflow: visible !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.sales-control-bar.dashboard-view::before {
  display: none !important;
  content: none !important;
}

.sales-dropdown {
  position: relative;
  flex: 0 0 auto;
  width: auto !important;
  min-width: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.sales-dropdown-trigger {
  display: inline-flex;
  min-width: 190px;
  height: 46px;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  cursor: pointer;
}

.sales-period-dropdown .sales-dropdown-trigger {
  min-width: 160px;
}

.sales-dropdown-trigger:hover,
.sales-dropdown-trigger[aria-expanded="true"] {
  border-color: #c7d2fe;
  background: #f8faff;
}

.sales-dropdown-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  color: #64748b;
}

.sales-dropdown-icon svg,
.sales-dropdown-chevron {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sales-dropdown-chevron {
  width: 16px;
  height: 16px;
  margin-left: auto;
  color: #94a3b8;
  transition: transform 160ms ease;
}

.sales-dropdown-trigger[aria-expanded="true"] .sales-dropdown-chevron {
  transform: rotate(180deg);
}

.sales-dropdown-menu {
  position: absolute !important;
  z-index: 120;
  top: calc(100% + 8px);
  right: 0;
  display: flex !important;
  width: 230px !important;
  max-width: min(300px, calc(100vw - 32px)) !important;
  flex-direction: column !important;
  gap: 4px !important;
  padding: 8px !important;
  overflow: auto !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14) !important;
}

.sales-dropdown-menu[hidden] {
  display: none !important;
}

.sales-period-dropdown .periods {
  min-width: 210px !important;
}

.sales-period-dropdown .period {
  display: flex !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 40px !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 0 12px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #334155 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  text-align: left !important;
  box-shadow: none !important;
}

.sales-period-dropdown .period::before,
.sales-period-dropdown .period::after {
  display: none !important;
  content: none !important;
}

.sales-period-dropdown .period:hover {
  background: #f8fafc !important;
}

.sales-period-dropdown .period.active {
  background: #eef2ff !important;
  color: #4f46e5 !important;
  font-weight: 600 !important;
}

.sales-store-dropdown.store-select-wrap {
  min-height: 0 !important;
}

.sales-store-dropdown #accounts {
  max-height: 320px !important;
}

.sales-store-dropdown .account-toggle {
  display: flex !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 44px !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  padding: 0 10px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #334155 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  text-align: left !important;
  box-shadow: none !important;
}

.sales-store-dropdown .account-toggle::before {
  display: none !important;
  content: none !important;
}

.sales-store-dropdown .account-toggle::after {
  margin-left: auto;
  color: #4f46e5;
  content: "";
}

.sales-store-dropdown .account-toggle:hover {
  background: #f8fafc !important;
}

.sales-store-dropdown .account-toggle.active {
  background: #eef2ff !important;
  color: #3730a3 !important;
}

.sales-store-dropdown .account-toggle.active::after {
  content: "\2713";
}

.sales-store-dropdown .marketplace-logo.all {
  background: #eef2ff;
  color: #4f46e5;
  font-size: 8px;
}

.sales-store-dropdown .marketplace-logo.marketplace-logo-asset {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.sales-store-dropdown .marketplace-logo.marketplace-logo-asset img {
  display: block;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  object-fit: contain;
}

.sales-store-dropdown .marketplace-logo.marketplace-logo-asset.meli img {
  padding: 3px;
}

.sales-store-dropdown .marketplace-logo.marketplace-logo-asset.shopee img {
  padding: 2px 5px;
}

@media (max-width: 760px) {
  .sales-control-bar.dashboard-view {
    width: 100%;
    justify-content: stretch !important;
  }

  .sales-dropdown {
    flex: 1 1 0;
  }

  .sales-dropdown-trigger {
    width: 100%;
    min-width: 0;
  }

  .sales-dropdown-menu {
    right: auto;
    left: 0;
    width: min(280px, calc(100vw - 32px)) !important;
  }
}

/* Presentation privacy mode */
.presentation-toggle,
.theme-toggle {
  width: 42px;
  height: 42px;
  display: inline-flex;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  color: #64748b;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.presentation-toggle:hover,
.theme-toggle:hover {
  border-color: #c7d2fe;
  color: #4f46e5;
}

.presentation-toggle.active,
.theme-toggle.active {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #4f46e5;
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.14);
}

.presentation-eye-icon,
.theme-toggle-icon {
  width: 20px;
  height: 20px;
  display: block;
  background: currentColor;
}

.presentation-eye-icon {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
}

.theme-toggle-icon {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3a6 6 0 0 0 9 7.2A9 9 0 1 1 12 3Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3a6 6 0 0 0 9 7.2A9 9 0 1 1 12 3Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.theme-toggle.active .theme-toggle-icon {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2'/%3E%3Cpath d='M12 20v2'/%3E%3Cpath d='m4.93 4.93 1.41 1.41'/%3E%3Cpath d='m17.66 17.66 1.41 1.41'/%3E%3Cpath d='M2 12h2'/%3E%3Cpath d='M20 12h2'/%3E%3Cpath d='m6.34 17.66-1.41 1.41'/%3E%3Cpath d='m19.07 4.93-1.41 1.41'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2'/%3E%3Cpath d='M12 20v2'/%3E%3Cpath d='m4.93 4.93 1.41 1.41'/%3E%3Cpath d='m17.66 17.66 1.41 1.41'/%3E%3Cpath d='M2 12h2'/%3E%3Cpath d='M20 12h2'/%3E%3Cpath d='m6.34 17.66-1.41 1.41'/%3E%3Cpath d='m19.07 4.93-1.41 1.41'/%3E%3C/svg%3E");
}

.presentation-toggle.active .presentation-eye-icon {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 3 18 18'/%3E%3Cpath d='M10.6 10.7a2 2 0 0 0 2.7 2.7'/%3E%3Cpath d='M9.9 4.2A10.8 10.8 0 0 1 12 4c6.5 0 10 8 10 8a18.5 18.5 0 0 1-2.1 3.2'/%3E%3Cpath d='M6.6 6.6C3.7 8.6 2 12 2 12s3.5 8 10 8a9.7 9.7 0 0 0 4.1-.9'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 3 18 18'/%3E%3Cpath d='M10.6 10.7a2 2 0 0 0 2.7 2.7'/%3E%3Cpath d='M9.9 4.2A10.8 10.8 0 0 1 12 4c6.5 0 10 8 10 8a18.5 18.5 0 0 1-2.1 3.2'/%3E%3Cpath d='M6.6 6.6C3.7 8.6 2 12 2 12s3.5 8 10 8a9.7 9.7 0 0 0 4.1-.9'/%3E%3C/svg%3E");
}

.ads-performance-panel .performance-indicators > div:not(.ads-sales-metric) small {
  display: none !important;
}

.presentation-mode .sales-table td[data-column="photo"] img,
.presentation-mode .sales-table td[data-column="photo"] .product-photo,
.presentation-mode .product-share-item .share-thumb,
.presentation-mode .top-product-row img,
.presentation-mode .top-product-row .top-product-image {
  opacity: 0.16;
  filter: blur(8px) grayscale(1);
}

.presentation-mode .sales-table td[data-column="title"] .template-product-cell > * {
  visibility: hidden;
}

.presentation-mode .product-share-item .share-product strong,
.presentation-mode .top-product-row > div strong {
  display: none;
}

.presentation-mode .sales-table td[data-column="title"] .template-product-cell,
.presentation-mode .product-share-item .share-product,
.presentation-mode .top-product-row > div {
  position: relative;
}

.presentation-mode .sales-table td[data-column="title"] .template-product-cell::after,
.presentation-mode .product-share-item .share-product::before,
.presentation-mode .top-product-row > div::before {
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  content: "Produto confidencial";
}

.presentation-mode .sales-table td[data-column="title"] .template-product-cell::after {
  position: absolute;
  inset: 50% auto auto 0;
  transform: translateY(-50%);
}

.presentation-mode .product-share-item .share-product::before,
.presentation-mode .top-product-row > div::before {
  display: block;
  margin-bottom: 2px;
}

.presentation-mode .sales-table td[data-column="account"] .store-badge {
  min-width: 96px;
  position: relative;
  color: transparent !important;
}

.presentation-mode .sales-table td[data-column="account"] .store-badge::after {
  position: absolute;
  inset: 50% 10px auto;
  color: #475569;
  letter-spacing: 2px;
  text-align: center;
  content: "********";
  transform: translateY(-50%);
}

@media (max-width: 760px) {
  .presentation-toggle,
  .theme-toggle {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }
}

:root[data-theme="dark"] body,
:root[data-theme="dark"] .app-layout,
:root[data-theme="dark"] .app-shell,
:root[data-theme="dark"] .login-screen {
  background: var(--hm-body-bg);
  color: var(--hm-text);
}

:root[data-theme="dark"] .sidebar,
:root[data-theme="dark"] .topbar,
:root[data-theme="dark"] .metric-card,
:root[data-theme="dark"] .sales-template-card,
:root[data-theme="dark"] .chart-panel,
:root[data-theme="dark"] .analytics-card,
:root[data-theme="dark"] .sales-table-wrap,
:root[data-theme="dark"] .table-card,
:root[data-theme="dark"] .dashboard-card,
:root[data-theme="dark"] .dashboard-panel,
:root[data-theme="dark"] .executive-card,
:root[data-theme="dark"] .listing-card,
:root[data-theme="dark"] .listing-table-card,
:root[data-theme="dark"] .full-card,
:root[data-theme="dark"] .full-panel,
:root[data-theme="dark"] .products-card,
:root[data-theme="dark"] .products-panel,
:root[data-theme="dark"] .payables-card,
:root[data-theme="dark"] .payables-panel,
:root[data-theme="dark"] .client-card,
:root[data-theme="dark"] .client-panel,
:root[data-theme="dark"] .modal-content,
:root[data-theme="dark"] .date-modal,
:root[data-theme="dark"] .import-modal,
:root[data-theme="dark"] .login-card,
:root[data-theme="dark"] .sales-dropdown-menu,
:root[data-theme="dark"] .sales-dropdown-trigger,
:root[data-theme="dark"] .presentation-toggle,
:root[data-theme="dark"] .theme-toggle,
:root[data-theme="dark"] #syncButton,
:root[data-theme="dark"] #planStatus {
  background-color: var(--hm-surface);
  border-color: var(--hm-border);
  color: var(--hm-text);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .metric-card,
:root[data-theme="dark"] .sales-template-card,
:root[data-theme="dark"] .analytics-card,
:root[data-theme="dark"] .dashboard-card,
:root[data-theme="dark"] .executive-card {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(15, 23, 42, 0.96));
}

:root[data-theme="dark"] .sales-kpi-grid .metric-card {
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, color-mix(in srgb, var(--sales-kpi-color) 13%, rgba(15, 23, 42, 0.96)) 100%);
  border-color: color-mix(in srgb, var(--sales-kpi-color) 34%, var(--hm-border));
}

:root[data-theme="dark"] .sales-kpi-icon {
  background: color-mix(in srgb, var(--sales-kpi-color) 18%, rgba(15, 23, 42, 0.98));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sales-kpi-color) 28%, transparent);
}

:root[data-theme="dark"] .sales-panel.dashboard-view,
:root[data-theme="dark"] .sales-panel .template-search.products-search,
:root[data-theme="dark"] .sales-panel .columns-button,
:root[data-theme="dark"] .sales-panel .sales-table-wrap,
:root[data-theme="dark"] .sales-panel .sales-table th,
:root[data-theme="dark"] .sales-panel .sales-table td {
  background: rgba(15, 23, 42, 0.96);
  border-color: var(--hm-border);
  color: var(--hm-text);
}

:root[data-theme="dark"] .sales-panel .sales-table tbody tr:hover td {
  background: rgba(30, 41, 59, 0.7);
}

:root[data-theme="dark"] .sales-panel .template-search.products-search input,
:root[data-theme="dark"] .sales-panel .template-product-cell span,
:root[data-theme="dark"] .sales-panel .sales-orders-header h2 {
  color: var(--hm-text);
}

:root[data-theme="dark"] h1,
:root[data-theme="dark"] h2,
:root[data-theme="dark"] h3,
:root[data-theme="dark"] h4,
:root[data-theme="dark"] strong,
:root[data-theme="dark"] th,
:root[data-theme="dark"] .page-title,
:root[data-theme="dark"] .metric-value,
:root[data-theme="dark"] .kpi-value,
:root[data-theme="dark"] .menu-item,
:root[data-theme="dark"] .submenu-item {
  color: var(--hm-text);
}

:root[data-theme="dark"] p,
:root[data-theme="dark"] small,
:root[data-theme="dark"] td,
:root[data-theme="dark"] label,
:root[data-theme="dark"] .page-description,
:root[data-theme="dark"] .eyebrow,
:root[data-theme="dark"] .muted,
:root[data-theme="dark"] .metric-label,
:root[data-theme="dark"] .card-subtitle,
:root[data-theme="dark"] .table-meta {
  color: var(--hm-muted);
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] .search-input,
:root[data-theme="dark"] .filter-input,
:root[data-theme="dark"] .sales-filter {
  background: var(--hm-surface-muted);
  border-color: var(--hm-border);
  color: var(--hm-text);
}

:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder {
  color: #64748b;
}

:root[data-theme="dark"] table,
:root[data-theme="dark"] thead,
:root[data-theme="dark"] tbody,
:root[data-theme="dark"] tr,
:root[data-theme="dark"] .sales-table,
:root[data-theme="dark"] .data-table {
  background: transparent;
  color: var(--hm-text);
}

:root[data-theme="dark"] th,
:root[data-theme="dark"] td,
:root[data-theme="dark"] .sales-table th,
:root[data-theme="dark"] .sales-table td,
:root[data-theme="dark"] .data-table th,
:root[data-theme="dark"] .data-table td {
  border-color: var(--hm-border);
}

:root[data-theme="dark"] tbody tr:hover,
:root[data-theme="dark"] .sales-table tbody tr:hover,
:root[data-theme="dark"] .data-table tbody tr:hover,
:root[data-theme="dark"] .sales-dropdown-option:hover,
:root[data-theme="dark"] .menu-item:hover,
:root[data-theme="dark"] .submenu-item:hover {
  background: rgba(79, 70, 229, 0.12);
}

:root[data-theme="dark"] .menu-item.active,
:root[data-theme="dark"] .submenu-item.active,
:root[data-theme="dark"] .sales-dropdown-option.active,
:root[data-theme="dark"] .sales-period-option.active,
:root[data-theme="dark"] .theme-toggle.active,
:root[data-theme="dark"] .presentation-toggle.active {
  background: rgba(129, 140, 248, 0.18);
  border-color: rgba(129, 140, 248, 0.45);
  color: #c7d2fe;
}

:root[data-theme="dark"] .store-pill,
:root[data-theme="dark"] .store-badge,
:root[data-theme="dark"] .badge,
:root[data-theme="dark"] .status-badge {
  border-color: rgba(148, 163, 184, 0.22);
}

:root[data-theme="dark"] .recharts-cartesian-grid line,
:root[data-theme="dark"] .chart-grid line {
  stroke: rgba(148, 163, 184, 0.18);
}

/* Listing improvement premium layout */
.listing-improvement-panel {
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.listing-improvement-panel .listing-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 0 24px;
  border: 0;
}

.listing-page-header h2 {
  margin: 0;
  color: #0f172a;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: 0;
}

.listing-page-header .section-subtitle {
  margin-top: 6px;
  color: #64748b;
  font-size: 14px;
}

.listing-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: nowrap;
}

.listing-header-actions .filter-box {
  width: min(310px, 30vw);
  min-height: 44px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #ffffff;
}

.listing-header-actions .filter-box > span {
  color: #64748b;
  font-size: 0;
}

.listing-header-actions .filter-box > span::before {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-sizing: border-box;
}

.listing-header-actions .filter-box > span::after {
  content: "";
  display: block;
  width: 6px;
  height: 2px;
  margin: -2px 0 0 11px;
  border-radius: 2px;
  background: currentColor;
  transform: rotate(45deg);
}

.listing-header-actions .ghost-button,
.listing-header-actions .primary-button {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  white-space: nowrap;
}

.listing-header-actions .listing-analyze-button {
  border-color: #4f46e5;
  background: #4f46e5;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.2);
}

.listing-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.listing-kpi-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-height: 136px;
  padding: 20px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.035);
}

.listing-kpi-card > div {
  min-width: 0;
}

.listing-kpi-card small,
.listing-kpi-card strong,
.listing-kpi-card p {
  display: block;
  margin: 0;
}

.listing-kpi-card small {
  min-height: 36px;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.listing-kpi-card strong {
  margin-top: 6px;
  color: #0f172a;
  font-size: 28px;
  line-height: 1.1;
}

.listing-kpi-card p {
  margin-top: 8px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.listing-kpi-card:first-child p {
  color: #16a34a;
}

.listing-kpi-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #ecfdf5;
  color: #16a34a;
}

.listing-kpi-icon::before {
  content: "";
  width: 22px;
  height: 22px;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-sizing: border-box;
}

.listing-kpi-icon.analyzed {
  background: #eff6ff;
  color: #2563eb;
}

.listing-kpi-icon.analyzed::before,
.listing-kpi-icon.critical::before {
  border-radius: 4px;
  transform: rotate(45deg);
}

.listing-kpi-icon.opportunities {
  background: #f5f3ff;
  color: #7c3aed;
}

.listing-kpi-icon.opportunities::before {
  border-radius: 5px;
  box-shadow: inset 0 -7px 0 rgba(124, 58, 237, 0.16);
}

.listing-kpi-icon.critical {
  background: #fff7ed;
  color: #f59e0b;
}

.listing-improvement-panel .listing-status {
  min-height: 20px;
  margin: 0 0 10px;
  color: #64748b;
  font-size: 12px;
}

.listing-overview-table-wrap {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.035);
  overflow: auto;
}

.listing-overview-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: separate;
  border-spacing: 0;
}

.listing-overview-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 15px 14px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.listing-overview-table th:nth-child(n + 3),
.listing-overview-table td:nth-child(n + 3) {
  text-align: center;
}

tbody.listing-overview-grid {
  display: table-row-group;
  margin: 0;
}

.listing-overview-table td {
  height: 88px;
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
  color: #0f172a;
  font-size: 13px;
  vertical-align: middle;
}

.listing-overview-table tbody tr:last-child td {
  border-bottom: 0;
}

.listing-overview-table tbody tr:hover td {
  background: #fafbff;
}

.listing-product-cell {
  display: grid;
  grid-template-columns: 52px minmax(170px, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 260px;
}

.listing-product-cell img,
.listing-product-cell .post-sales-thumb {
  width: 52px;
  height: 52px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  object-fit: contain;
}

.listing-product-cell strong,
.listing-product-cell small {
  display: block;
}

.listing-product-cell strong {
  max-width: 270px;
  overflow: hidden;
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.listing-product-cell small {
  margin-top: 5px;
  color: #64748b;
  font-size: 11px;
}

.listing-id {
  color: #334155;
  font-size: 12px;
  white-space: nowrap;
}

.listing-general-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 7px 9px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
}

.listing-general-badge.good {
  background: #eaf8f1;
  color: #15803d;
}

.listing-general-badge.warning {
  background: #fff7e6;
  color: #b45309;
}

.listing-general-badge.danger {
  background: #fff1ed;
  color: #c2410c;
}

.listing-table-score {
  display: grid;
  place-items: center;
}

.score-ring.table-score-ring {
  width: 48px;
  height: 48px;
}

.score-ring.table-score-ring span {
  width: 37px;
  height: 37px;
  font-size: 10px;
}

.listing-overview-table .listing-detail-button {
  min-width: 104px;
  min-height: 38px;
  border-radius: 8px;
}

.listing-improvement-panel .listing-pagination {
  justify-content: space-between;
  margin: 14px 0 0;
  padding: 0 4px;
}

.listing-pagination-summary {
  color: #64748b;
  font-size: 12px;
}

.listing-pagination-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.listing-page-button {
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 36px;
  padding: 0 9px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
}

.listing-page-button:hover:not(:disabled) {
  border-color: #c7d2fe;
  color: #4f46e5;
}

.listing-page-button.active {
  border-color: #4f46e5;
  background: #4f46e5;
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(79, 70, 229, 0.2);
}

.listing-page-button:disabled {
  opacity: 0.4;
  cursor: default;
}

.listing-page-ellipsis {
  color: #94a3b8;
}

.listing-detail-active .listing-page-header,
.listing-detail-active .listing-kpi-grid,
.listing-detail-active .listing-status,
.listing-detail-active .listing-overview-table-wrap,
.listing-detail-active > .listing-pagination {
  display: none !important;
}

.listing-improvement-panel .listing-detail-toolbar {
  justify-content: flex-start;
  margin: 0 0 16px;
}

.app-layout[data-view="listingImprovement"] .topbar {
  position: absolute;
  top: 0;
  right: 44px;
  z-index: 4;
  margin: 0;
  padding: 0;
}

.app-layout[data-view="listingImprovement"] .listing-improvement-panel {
  margin-top: 0;
}

.app-layout[data-view="listingImprovement"] .app-shell {
  position: relative;
  padding-top: 26px;
}

.app-layout[data-view="listingImprovement"] .listing-page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  min-height: 0;
  margin: 0 0 18px;
  padding: 0 0 18px;
  border-bottom: 1px solid #e5e7eb;
}

.app-layout[data-view="listingImprovement"] .listing-page-header > div:first-child {
  display: block;
}

.app-layout[data-view="listingImprovement"] .listing-header-actions {
  width: auto;
}

@media (max-width: 1280px) {
  .listing-improvement-panel .listing-page-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .listing-header-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .listing-header-actions .filter-box {
    width: min(100%, 420px);
  }

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

@media (max-width: 720px) {
  .listing-page-header h2 {
    font-size: 26px;
  }

  .listing-header-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .listing-header-actions .filter-box {
    grid-column: 1 / -1;
    width: 100%;
  }

  .listing-header-actions .ghost-button,
  .listing-header-actions .primary-button {
    width: 100%;
    padding: 0 12px;
  }

  .listing-kpi-grid {
    grid-template-columns: 1fr;
  }

  .listing-kpi-card {
    min-height: 112px;
  }

  .listing-improvement-panel .listing-pagination {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Modern products page */
.products-page {
  display: grid;
  gap: 22px;
}

.products-page[hidden] {
  display: none;
}

.products-page .products-header {
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 0;
}

.products-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.products-search {
  min-width: 340px;
}

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

.products-kpi-card {
  min-height: 120px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
}

.products-kpi-card p,
.products-kpi-card small {
  margin: 0;
}

.products-kpi-card p {
  color: #0f172a;
  font-size: 15px;
  font-weight: 650;
}

.products-kpi-card strong {
  display: block;
  margin-top: 8px;
  color: #0f172a;
  font-size: 30px;
  line-height: 1;
  font-weight: 760;
  letter-spacing: 0;
}

.products-kpi-card small {
  display: block;
  margin-top: 8px;
  color: #64748b;
  font-size: 13px;
}

.products-kpi-icon {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 18px;
  font-size: 24px;
  font-weight: 780;
}

.products-kpi-icon.success {
  color: #16a34a;
  background: #dcfce7;
}

.products-kpi-icon.danger {
  color: #ef4444;
  background: #fee2e2;
}

.products-kpi-icon.warning {
  color: #f97316;
  background: #ffedd5;
}

.products-table-card {
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
}

.products-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.products-table-header h3 {
  margin: 0;
  color: #0f172a;
  font-size: 20px;
  font-weight: 720;
}

.products-table-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.products-table-scroll {
  overflow-x: auto;
}

.products-modern-table {
  width: 100%;
  min-width: 1220px;
  border-collapse: collapse;
}

.products-modern-table th,
.products-modern-table td {
  padding: 16px 18px;
  border-bottom: 1px solid #e5e7eb;
  color: #0f172a;
  font-size: 14px;
  text-align: left;
  vertical-align: middle;
}

.products-modern-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.products-modern-table tbody tr {
  transition: background 0.15s ease;
}

.products-modern-table tbody tr:hover {
  background: #f8fafc;
}

.products-modern-table .title-cell {
  min-width: 230px;
  max-width: 310px;
}

.products-modern-table .title-cell span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.products-modern-table .product-photo {
  width: 48px;
  height: 48px;
  display: block;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  object-fit: cover;
  background: #f1f5f9;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.products-modern-table .product-photo.placeholder {
  display: inline-block;
}

.products-modern-table .stock-pill {
  min-width: 54px;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 760;
}

.products-modern-table .stock-pill.success {
  color: #047857;
  background: #d1fae5;
}

.products-modern-table .stock-pill.warning {
  color: #b45309;
  background: #fef3c7;
}

.products-modern-table .stock-pill.danger {
  color: #dc2626;
  background: #fee2e2;
}

.products-modern-table .status-text {
  color: #0f172a;
  font-weight: 760;
}

.products-modern-table .catalog-pill {
  min-width: auto;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.products-modern-table .suggested-margin strong {
  font-size: 14px;
}

.products-modern-table .suggested-margin small {
  color: #64748b;
  font-size: 12px;
}

.product-actions-cell {
  min-width: 170px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-actions-cell .meli-price-button,
.product-menu-button {
  min-height: 38px;
  border: 1px solid #dbe3f0;
  border-radius: 10px;
  background: #fff;
  color: #4f46e5;
  font-weight: 700;
  cursor: pointer;
}

.product-actions-cell .meli-price-button {
  padding: 0 14px;
}

.product-actions-cell .meli-price-button:disabled {
  color: #94a3b8;
  background: #f8fafc;
  cursor: default;
}

.product-menu-button {
  width: 38px;
}

.products-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  color: #64748b;
  font-size: 14px;
}

.products-page-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.products-page-button {
  min-width: 40px;
  height: 40px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font-weight: 700;
  cursor: pointer;
}

.products-page-button.active {
  border-color: #4f46e5;
  background: #4f46e5;
  color: #fff;
  box-shadow: 0 12px 24px rgba(79, 70, 229, 0.22);
}

.products-page-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.products-page-gap {
  color: #94a3b8;
  font-weight: 700;
}

@media (max-width: 1280px) {
  .products-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .products-header-actions,
  .products-page .products-header {
    align-items: stretch;
  }

  .products-search {
    min-width: 260px;
  }
}

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

  .products-header-actions,
  .products-table-header,
  .products-pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .products-search {
    width: 100%;
    min-width: 0;
  }
}

/* Final layout polish: compact sidebar and contextual page header. */
:root {
  --hm-sidebar: 236px;
}

.side-nav {
  width: var(--hm-sidebar);
  padding: 18px 12px;
}

.side-brand {
  gap: 9px;
  padding: 0 6px 16px;
}

.side-logo {
  width: 34px;
  height: 34px;
}

.side-brand strong {
  font-size: 16px;
}

.side-brand span {
  font-size: 11px;
}

.menu-list {
  margin-top: 16px;
  gap: 4px;
}

.menu-item,
.submenu-item {
  min-height: 38px;
  border-radius: 10px;
  gap: 9px;
  font-size: 14px;
}

.menu-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
}

.submenu {
  margin-left: 34px;
  padding-left: 10px;
}

.submenu-item {
  min-height: 34px;
  font-size: 13px;
}

.submenu-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

.side-footer {
  padding: 10px 0 0;
}

.plan-pill {
  padding: 10px 12px;
  font-size: 12px;
}

.app-shell {
  padding-left: clamp(18px, 2.7vw, 40px);
  padding-right: clamp(18px, 2.7vw, 40px);
}

.app-layout:not([data-view="dashboard"]) .topbar {
  min-height: auto;
  margin: 0 0 16px;
  padding: 16px 0 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.app-layout:not([data-view="dashboard"]) .topbar > div:first-child,
.app-layout:not([data-view="dashboard"]) .topbar .page-description {
  display: none !important;
}

.app-layout:not([data-view="dashboard"]) .topbar-actions {
  width: auto;
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.app-layout:not([data-view="dashboard"]) #syncButton,
.app-layout:not([data-view="dashboard"]) .sales-control-bar {
  display: none !important;
}

/* Sales page spacing polish */
.app-layout[data-view="dashboard"] .app-shell {
  padding-top: 24px;
}

.app-layout[data-view="dashboard"] .topbar {
  align-items: flex-start;
  margin-bottom: 16px;
}

.app-layout[data-view="dashboard"] .topbar-actions,
.app-layout[data-view="dashboard"] .sales-top-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.app-layout[data-view="dashboard"] .sales-top-actions .sales-dropdown-trigger {
  height: 42px;
  min-width: 170px;
}

.app-layout[data-view="dashboard"] .sales-top-actions .sales-period-dropdown .sales-dropdown-trigger {
  min-width: 150px;
}

.app-layout[data-view="dashboard"] .sales-control-bar.dashboard-view {
  min-height: 44px;
  margin-top: 0;
  margin-bottom: 12px;
}

.app-layout[data-view="dashboard"] .sales-control-bar.dashboard-view.inline-controls-mounted {
  display: none !important;
}

.app-layout[data-view="dashboard"] .sales-dropdown-trigger {
  height: 42px;
}

.app-layout[data-view="dashboard"] .sales-kpi-grid {
  margin-top: 0;
}

.app-layout:not([data-view="dashboard"]) .sales-top-actions .sales-dropdown {
  display: none !important;
}

/* Estoque FULL: compacta o topo da pagina e remove o vazio herdado do header global. */
.app-layout[data-view="full"] .app-shell {
  position: relative;
  padding-top: 16px;
}

.app-layout[data-view="full"] .topbar {
  position: absolute;
  top: 16px;
  right: clamp(18px, 2.7vw, 40px);
  z-index: 5;
  margin: 0;
  padding: 0;
  width: auto;
}

.app-layout[data-view="full"] .topbar-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.app-layout[data-view="full"] .full-page {
  padding-top: 10px;
  gap: 14px;
}

.app-layout[data-view="full"] .full-page-header {
  align-items: center;
  gap: 16px;
  margin: 0;
  padding-right: min(420px, 32vw);
}

.app-layout[data-view="full"] .full-page-header h2 {
  font-size: clamp(30px, 2.5vw, 38px);
}

.app-layout[data-view="full"] .full-page-header p {
  margin-top: 6px;
}

.app-layout[data-view="full"] .full-page .full-actions {
  align-items: center;
  gap: 12px;
  margin: 0;
  padding-top: 0;
  justify-content: flex-end;
}

.app-layout[data-view="full"] .full-control,
.app-layout[data-view="full"] .full-refresh-button {
  height: 46px;
}

.app-layout[data-view="full"] .full-kpi-row {
  margin-top: 0;
}

@media (max-width: 1100px) {
  .app-layout[data-view="full"] .topbar {
    position: static;
    margin-bottom: 12px;
  }

  .app-layout[data-view="full"] .full-page {
    padding-top: 0;
  }

  .app-layout[data-view="full"] .full-page-header {
    flex-direction: column;
  }

  .app-layout[data-view="full"] .full-page .full-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

/* Unified compact page tops: keep each module action row aligned like Vendas. */
.app-layout:not([data-view="dashboard"]) .sales-control-bar,
.app-layout:not([data-view="dashboard"]) .sales-top-actions,
.app-layout:not([data-view="dashboard"]) #syncButton {
  display: none !important;
}

.app-layout:not([data-view="dashboard"]) .topbar > div:first-child,
.app-layout:not([data-view="dashboard"]) .topbar .page-description {
  display: none !important;
}

.app-layout:is(
    [data-view="full"],
    [data-view="listingImprovement"],
    [data-view="products"],
    [data-view="payables"],
    [data-view="clientAccounts"],
    [data-view="executive"]
  )
  .app-shell {
  position: relative;
  padding-top: 18px !important;
}

.app-layout:is(
    [data-view="full"],
    [data-view="listingImprovement"],
    [data-view="products"],
    [data-view="payables"],
    [data-view="clientAccounts"],
    [data-view="executive"]
  )
  .topbar {
  position: absolute !important;
  top: 18px !important;
  right: clamp(18px, 2.7vw, 40px) !important;
  z-index: 8;
  width: auto;
  min-height: 0;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
}

.app-layout:is(
    [data-view="full"],
    [data-view="listingImprovement"],
    [data-view="products"],
    [data-view="payables"],
    [data-view="clientAccounts"],
    [data-view="executive"]
  )
  .topbar-actions {
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.app-layout:is(
    [data-view="full"],
    [data-view="listingImprovement"],
    [data-view="products"],
    [data-view="payables"],
    [data-view="clientAccounts"],
    [data-view="executive"]
  )
  .topbar
  > div:first-child,
.app-layout:is(
    [data-view="full"],
    [data-view="listingImprovement"],
    [data-view="products"],
    [data-view="payables"],
    [data-view="clientAccounts"],
    [data-view="executive"]
  )
  .topbar
  .page-description,
.app-layout:is(
    [data-view="full"],
    [data-view="listingImprovement"],
    [data-view="products"],
    [data-view="payables"],
    [data-view="clientAccounts"],
    [data-view="executive"]
  )
  #syncButton,
.app-layout:is(
    [data-view="full"],
    [data-view="listingImprovement"],
    [data-view="products"],
    [data-view="payables"],
    [data-view="clientAccounts"],
    [data-view="executive"]
  )
  .sales-control-bar,
.app-layout:is(
    [data-view="full"],
    [data-view="listingImprovement"],
    [data-view="products"],
    [data-view="payables"],
    [data-view="clientAccounts"],
    [data-view="executive"]
  )
  .sales-top-actions {
  display: none !important;
}

.app-layout:is(
    [data-view="full"],
    [data-view="listingImprovement"],
    [data-view="products"],
    [data-view="payables"],
    [data-view="clientAccounts"],
    [data-view="executive"]
  )
  :is(
    .full-page,
    .listing-improvement-panel,
    .products-page,
    .payables-modern-page,
    .client-accounts-page,
    .executive-dashboard-v2
  ) {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.app-layout:is(
    [data-view="full"],
    [data-view="listingImprovement"],
    [data-view="products"],
    [data-view="payables"],
    [data-view="clientAccounts"],
    [data-view="executive"]
  )
  :is(
    .full-page-header,
    .listing-page-header,
    .products-header,
    .payables-page-header,
    .client-accounts-header,
    .executive-toolbar
  ) {
  min-height: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 18px !important;
  padding-top: 0 !important;
  align-items: center !important;
}

.app-layout:is(
    [data-view="full"],
    [data-view="listingImprovement"],
    [data-view="products"],
    [data-view="payables"],
    [data-view="clientAccounts"],
    [data-view="executive"]
  )
  :is(
    .full-page-header,
    .listing-page-header,
    .products-header,
    .payables-page-header,
    .client-accounts-header,
    .executive-toolbar
  )
  h2 {
  margin-top: 0 !important;
}

.app-layout[data-view="full"] .full-page-header,
.app-layout[data-view="products"] .products-header,
.app-layout[data-view="payables"] .payables-page-header,
.app-layout[data-view="clientAccounts"] .client-accounts-header,
.app-layout[data-view="executive"] .executive-toolbar {
  padding-right: min(380px, 28vw) !important;
}

.app-layout[data-view="listingImprovement"] .listing-page-header {
  grid-template-columns: minmax(280px, 1fr) minmax(420px, 760px) !important;
  padding-right: min(360px, 26vw) !important;
  padding-bottom: 16px !important;
}

.app-layout[data-view="listingImprovement"] .listing-header-actions {
  min-width: 0;
  justify-content: flex-end;
}

.app-layout[data-view="listingImprovement"] .listing-header-actions .listing-analyze-button {
  min-width: min(360px, 30vw);
}

.app-layout[data-view="full"] .full-page {
  gap: 14px !important;
}

.app-layout[data-view="full"] .full-kpi-row,
.app-layout[data-view="products"] .products-kpi-grid,
.app-layout[data-view="payables"] .payables-kpi-grid,
.app-layout[data-view="clientAccounts"] .client-accounts-summary,
.app-layout[data-view="executive"] .exec-kpi-row {
  margin-top: 0 !important;
}

.app-layout[data-view="products"] .products-page,
.app-layout[data-view="payables"] .payables-modern-page,
.app-layout[data-view="clientAccounts"] .client-accounts-page,
.app-layout[data-view="executive"] .executive-dashboard-v2 {
  gap: 18px !important;
}

.app-layout[data-view="clientAccounts"] .client-accounts-header,
.app-layout[data-view="payables"] .payables-page-header,
.app-layout[data-view="products"] .products-header {
  display: grid !important;
  grid-template-columns: minmax(260px, 1fr) minmax(420px, auto);
}

.app-layout[data-view="clientAccounts"] .client-accounts-actions,
.app-layout[data-view="payables"] .payables-header-actions,
.app-layout[data-view="products"] .products-header-actions,
.app-layout[data-view="full"] .full-actions {
  align-items: center !important;
  justify-content: flex-end !important;
}

@media (max-width: 1180px) {
  .app-layout:is(
      [data-view="full"],
      [data-view="listingImprovement"],
      [data-view="products"],
      [data-view="payables"],
      [data-view="clientAccounts"],
      [data-view="executive"]
    )
    .topbar {
    position: static !important;
    margin-bottom: 12px !important;
  }

  .app-layout:is(
      [data-view="full"],
      [data-view="listingImprovement"],
      [data-view="products"],
      [data-view="payables"],
      [data-view="clientAccounts"],
      [data-view="executive"]
    )
    :is(
      .full-page-header,
      .listing-page-header,
      .products-header,
      .payables-page-header,
      .client-accounts-header,
      .executive-toolbar
    ) {
    padding-right: 0 !important;
  }

  .app-layout[data-view="listingImprovement"] .listing-page-header,
  .app-layout[data-view="clientAccounts"] .client-accounts-header,
  .app-layout[data-view="payables"] .payables-page-header,
  .app-layout[data-view="products"] .products-header {
    grid-template-columns: 1fr !important;
  }

  .app-layout[data-view="clientAccounts"] .client-accounts-actions,
  .app-layout[data-view="payables"] .payables-header-actions,
  .app-layout[data-view="products"] .products-header-actions,
  .app-layout[data-view="full"] .full-actions,
  .app-layout[data-view="listingImprovement"] .listing-header-actions,
  .app-layout[data-view="executive"] .executive-toolbar {
    justify-content: flex-start !important;
    width: 100%;
  }
}
.operational-indicators-page {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  gap: 22px;
  padding: 0;
}

.app-layout[data-view="operationalIndicators"] .app-shell {
  background: #f8faff;
  padding: 28px 24px 42px 20px;
}

.app-layout[data-view="operationalIndicators"] .topbar {
  display: none !important;
}

.app-layout[data-view="operationalIndicators"] .operational-indicators-page {
  font-family: "Montserrat", var(--font-family, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  font-weight: 600;
  margin: 0;
  max-width: none;
  min-height: calc(100vh - 56px);
  width: 100%;
}

.operational-page-header {
  align-items: flex-start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(320px, 1fr) auto;
  margin-bottom: 8px;
}

.operational-page-header h2 {
  color: #07112f;
  font-size: clamp(1.9rem, 2.4vw, 2.55rem);
  font-weight: 600;
  line-height: 1.08;
  margin: 0 0 8px;
}

.operational-page-header .section-subtitle {
  color: #536179;
  display: block;
  font-size: 0.94rem;
  max-width: 620px;
}

.operational-bi-header {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.operational-actions {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(230px, auto);
  justify-content: end;
}

.operational-plan-pill {
  align-items: center;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  color: #4338ca;
  display: inline-flex;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  white-space: nowrap;
}

.operational-plan-pill span {
  font-size: 0.86rem;
  font-weight: 600;
}

.operational-plan-pill strong {
  color: #4f46e5;
  font-size: 0.86rem;
  font-weight: 600;
}

.operational-filter {
  position: relative;
}

.operational-filter-trigger {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  color: #07112f;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  gap: 10px;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 14px;
  width: 100%;
}

.operational-filter-trigger span {
  color: #536179;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
}

.operational-filter-trigger strong {
  color: #07112f;
  font-size: 0.92rem;
  font-weight: 600;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operational-filter-trigger::after {
  color: #64748b;
  content: "⌄";
  font-size: 0.9rem;
  line-height: 1;
}

.operational-filter-trigger[aria-expanded="true"] {
  border-color: #c7d2fe;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08);
}

.operational-filter-trigger[aria-expanded="true"]::after {
  content: "⌃";
}

.operational-filter-trigger::after {
  border-bottom: 1.5px solid #64748b;
  border-right: 1.5px solid #64748b;
  color: transparent;
  content: "";
  height: 6px;
  margin-left: 3px;
  transform: rotate(45deg) translateY(-2px);
  width: 6px;
}

.operational-filter-trigger[aria-expanded="true"]::after {
  content: "";
  transform: rotate(225deg) translateY(-2px);
}

.operational-filter-menu {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
  display: grid;
  gap: 6px;
  left: 0;
  min-width: 100%;
  padding: 8px;
  position: absolute;
  top: calc(100% + 8px);
  z-index: 40;
}

.operational-filter:nth-child(n + 3) .operational-filter-menu {
  left: auto;
  right: 0;
}

.operational-filter-menu[hidden] {
  display: none;
}

.operational-filter-menu button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 9px;
  color: #07112f;
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  gap: 12px;
  justify-content: space-between;
  min-height: 38px;
  padding: 0 10px;
  text-align: left;
  white-space: nowrap;
}

.operational-filter-menu button:hover,
.operational-filter-menu button.selected {
  background: #eef2ff;
  color: #4f46e5;
}

.operational-filter-menu button b {
  color: #4f46e5;
  font-size: 0;
  height: 14px;
  opacity: 0;
  position: relative;
  width: 14px;
}

.operational-filter-menu button.selected b {
  opacity: 1;
}

.operational-filter-menu button.selected b::after {
  border-bottom: 2px solid currentColor;
  border-right: 2px solid currentColor;
  content: "";
  height: 9px;
  left: 4px;
  position: absolute;
  top: 0;
  transform: rotate(45deg);
  width: 5px;
}

.operational-actions .primary-button {
  border-radius: 10px;
  grid-column: auto;
  min-height: 44px;
  padding: 0 16px;
  width: auto;
}

.operational-status,
.operational-empty {
  color: #536179;
  font-size: 0.88rem;
}

.operational-status.error {
  color: #dc2626;
}

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

.operational-summary-card {
  background: #ffffff;
  border: 1px solid #e5e9f2;
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.035);
  display: grid;
  gap: 6px;
  grid-template-rows: auto auto auto auto 1fr;
  min-height: 154px;
  padding: 18px 18px 16px 70px;
  position: relative;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.operational-summary-card:hover {
  border-color: #c7d2fe;
  box-shadow: 0 20px 50px rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
}

.operational-summary-card.status-critical {
  border-color: #ffe1e5;
}

.operational-summary-card.status-warning {
  border-color: #ffead2;
}

.operational-summary-card.status-safe {
  border-color: #d9f6e5;
}

.operational-summary-card span,
.operational-summary-card em {
  color: var(--hm-muted);
  font-size: 0.64rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

.operational-summary-card strong {
  color: #07112f;
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.28;
  margin-top: 2px;
}

.operational-summary-card p {
  color: #080f2d;
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0;
}

.operational-summary-card small {
  color: var(--hm-text);
  display: -webkit-box;
  font-size: 0.7rem;
  line-height: 1.32;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.operational-summary-card .operational-link-button {
  align-self: end;
  justify-self: flex-start;
  margin-top: 7px;
}

.operational-link-button {
  align-items: center;
  background: transparent;
  border: 0;
  color: #4f46e5;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  gap: 8px;
  min-height: 22px;
  padding: 0;
}

.operational-link-button b {
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.18s ease;
}

.operational-summary-card .operational-link-button span {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  text-transform: none;
}

.operational-link-button:hover,
.operational-link-button:focus-visible {
  color: #3730a3;
}

.operational-link-button:hover b,
.operational-link-button:focus-visible b {
  transform: translateX(3px);
}

.operational-card-icon {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  left: 18px;
  position: absolute;
  top: 18px;
  width: 38px;
}

.operational-card-icon svg {
  height: 20px;
  width: 20px;
}

.operational-card-danger .operational-card-icon,
.operational-card-support .operational-card-icon {
  background: #ffe9ed;
  color: #ef4444;
}

.operational-card-ads .operational-card-icon {
  background: #fff3dc;
  color: #f97316;
}

.operational-card-stock .operational-card-icon {
  background: #fff3dc;
  color: #f59e0b;
}

.operational-card-full .operational-card-icon {
  background: #dcfce7;
  color: #16a34a;
}

.operational-card-logistics .operational-card-icon {
  background: #dbeafe;
  color: #2563eb;
}

#operationalOverview {
  display: grid;
  gap: 18px;
}

.operational-command-center {
  border-color: #e5e9f2;
  min-width: 0;
}

.operational-overview-grid {
  display: none;
  gap: 16px;
  grid-template-columns: minmax(420px, 1.35fr) minmax(280px, 0.85fr) minmax(280px, 0.85fr);
}

.operational-wide-button {
  height: 42px;
  margin-top: 18px;
  width: 100%;
}

.operational-detail-page {
  display: grid;
  gap: 16px;
}

.operational-detail-page[hidden] {
  display: none;
}

.operational-detail-page-header {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e5e9f2;
  border-radius: 14px;
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.04);
  display: grid;
  gap: 14px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 18px;
}

.operational-detail-page-header h3 {
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  margin: 2px 0 4px;
}

.operational-detail-page-header span {
  color: var(--hm-muted);
  font-size: 0.9rem;
}

.operational-detail-page-header > strong {
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 999px;
  color: #1d4ed8;
  font-size: 0.86rem;
  padding: 8px 11px;
  white-space: nowrap;
}

.operational-back-button {
  height: 46px;
  white-space: nowrap;
}

.operational-detail-toolbar {
  align-items: stretch;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.operational-search {
  align-items: flex-start;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  display: grid;
  flex: 1 1 280px;
  gap: 4px;
  min-height: 46px;
  padding: 6px 12px;
}

.operational-search span {
  color: var(--hm-muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.operational-search input {
  border: 0;
  background: transparent;
  color: var(--hm-text);
  font: inherit;
  font-size: 0.92rem;
  outline: 0;
  padding: 0;
}

.operational-detail-tabs {
  align-items: center;
  background: var(--hm-surface);
  border: 1px solid var(--hm-border);
  border-radius: 8px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 6px;
}

.operational-detail-tabs button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--hm-muted);
  cursor: pointer;
  flex: 0 0 auto;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 8px 10px;
}

.operational-detail-tabs button.active {
  background: rgba(37, 99, 235, 0.09);
  border-color: rgba(37, 99, 235, 0.22);
  color: var(--hm-text);
}

.operational-section-grid {
  display: block;
  gap: 16px;
}

.operational-detail-panel {
  display: none;
}

.operational-detail-panel.active {
  display: block;
}

.operational-table-card {
  background: #ffffff;
  border: 1px solid #e5e9f2;
  border-radius: 14px;
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.04);
  padding: 18px;
}

.operational-table-header {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.operational-table-header h3 {
  margin: 2px 0;
}

.operational-table-header span {
  color: var(--hm-muted);
  font-size: 0.86rem;
}

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

.operational-table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 860px;
  width: 100%;
}

.operational-table th,
.operational-table td {
  border-bottom: 1px solid #eef2f7;
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

.operational-table th {
  background: #f7f8fb;
  color: #536179;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.operational-table td {
  color: #0f172a;
  font-size: 0.86rem;
  line-height: 1.35;
}

.operational-table td strong {
  display: block;
  font-size: 0.9rem;
}

.operational-table td small {
  color: #64748b;
  display: block;
  margin-top: 3px;
}

.operational-table tr:hover td {
  background: rgba(37, 99, 235, 0.035);
}

.operational-badge {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1;
  padding: 6px 8px;
  white-space: nowrap;
}

.operational-badge.status-critical,
.operational-table .status-critical {
  background: #fee2e2;
  color: #dc2626;
}

.operational-badge.status-warning,
.operational-table .status-warning {
  background: #ffedd5;
  color: #ea580c;
}

.operational-badge.status-safe,
.operational-table .status-safe {
  background: #dcfce7;
  color: #16a34a;
}

.operational-rank {
  align-items: center;
  background: #f1f5f9;
  border-radius: 8px;
  color: #0f172a;
  display: inline-flex;
  font-weight: 800;
  height: 26px;
  justify-content: center;
  width: 32px;
}

.operational-link-button {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #4f46e5;
  min-height: 28px;
  min-width: 0;
  padding: 0;
}

.operational-link-button:hover {
  background: transparent;
  box-shadow: none;
  color: #3730a3;
}

.operational-category-summary {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: 150px minmax(0, 1fr);
}

.operational-donut {
  align-items: center;
  border-radius: 999px;
  display: flex;
  height: 150px;
  justify-content: center;
  position: relative;
  width: 150px;
}

.operational-donut::after {
  background: #ffffff;
  border-radius: 999px;
  content: "";
  height: 90px;
  position: absolute;
  width: 90px;
}

.operational-donut span {
  color: #0f172a;
  display: grid;
  line-height: 1.1;
  position: relative;
  text-align: center;
  z-index: 1;
}

.operational-donut strong {
  font-size: 1.35rem;
}

.operational-donut small {
  color: #64748b;
}

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

.operational-category-list p {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  margin: 0;
}

.operational-category-list i {
  border-radius: 999px;
  height: 10px;
  width: 10px;
}

.operational-category-list span,
.operational-category-list strong {
  font-size: 0.85rem;
}

.operational-priority-summary {
  border-radius: 12px;
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
  overflow: hidden;
  padding: 14px;
}

.operational-priority-summary.status-critical { background: #fff1f2; border: 1px solid #fecdd3; }
.operational-priority-summary.status-warning { background: #fff7ed; border: 1px solid #fed7aa; }
.operational-priority-summary.status-safe { background: #f0fdf4; border: 1px solid #bbf7d0; }
.operational-priority-summary.status-critical { color: #ef4444; }
.operational-priority-summary.status-warning { color: #f97316; }
.operational-priority-summary.status-safe { color: #16a34a; }

.operational-priority-summary span,
.operational-priority-summary small {
  color: #536179;
  display: block;
  font-size: 0.82rem;
}

.operational-priority-summary strong {
  color: #07112f;
  display: block;
  font-size: 1.55rem;
  margin: 2px 0;
}

.operational-priority-summary b {
  background: rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  display: block;
  height: 3px;
  position: relative;
}

.operational-priority-summary b::after {
  background: currentColor;
  border-radius: inherit;
  content: "";
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: var(--spark-width);
}

.operational-recommended-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.operational-recommended-item {
  align-items: flex-start;
  border: 1px solid #edf1f7;
  border-radius: 14px;
  display: grid;
  gap: 12px;
  grid-template-columns: 46px minmax(0, 1fr);
  padding: 16px;
}

.operational-recommended-item .operational-card-icon {
  left: auto;
  position: static;
  top: auto;
}

.operational-recommended-item p {
  color: #536179;
  font-size: 0.84rem;
  line-height: 1.45;
  margin: 5px 0 12px;
}

.operational-recommended-item .operational-link-button {
  grid-column: 2;
  justify-self: stretch;
}

@media (max-width: 1280px) {
  .operational-page-header {
    grid-template-columns: 1fr;
  }

  .operational-actions {
    grid-template-columns: repeat(2, minmax(210px, max-content));
    justify-content: start;
  }

  .operational-plan-pill,
  .operational-filter {
    width: 100%;
  }

  .operational-filter-trigger {
    min-width: 210px;
  }

  .operational-actions {
    justify-content: stretch;
  }

  .operational-actions .primary-button {
    grid-column: auto;
  }

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

  .operational-overview-grid {
    grid-template-columns: 1fr;
  }

  .operational-category-summary {
    grid-template-columns: auto minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .app-layout[data-view="operationalIndicators"] .app-shell {
    padding: 18px 14px 32px;
  }

  .operational-actions {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .operational-plan-pill {
    justify-content: center;
    width: 100%;
  }

  .operational-actions .filter-box,
  .operational-actions .operational-filter,
  .operational-actions .button {
    width: 100%;
  }

  .operational-bi-header {
    padding: 14px;
  }

  .operational-summary-card {
    min-height: 154px;
  }

  .operational-summary-grid {
    grid-template-columns: 1fr;
  }

  .operational-summary-card {
    min-height: 154px;
  }

  .operational-category-summary {
    justify-items: center;
    grid-template-columns: 1fr;
  }

  .operational-recommended-item {
    grid-template-columns: 1fr;
  }

  .operational-recommended-item .operational-link-button {
    grid-column: 1;
  }

  .operational-detail-page-header {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .operational-detail-page-header > strong {
    justify-self: flex-start;
  }
}

/* ADS page: remove a sensacao de tela dentro de tela e aproxima do layout das paginas principais. */
.app-layout[data-view="ads"] .app-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 clamp(18px, 2.4vw, 40px) 44px !important;
}

.app-layout[data-view="ads"] .topbar {
  display: none !important;
}

.app-layout[data-view="ads"] .ads-manager {
  gap: 20px;
  width: 100%;
  max-width: none;
  margin: 0;
}

.app-layout[data-view="ads"] .ads-hero {
  margin: 0 calc(clamp(18px, 2.4vw, 40px) * -1);
  padding: 34px clamp(28px, 3.2vw, 58px);
  border-radius: 0;
  box-shadow: none;
}

.app-layout[data-view="ads"] .ads-overview-card,
.app-layout[data-view="ads"] .ads-alerts,
.app-layout[data-view="ads"] .ads-metrics,
.app-layout[data-view="ads"] .ads-campaign-preview,
.app-layout[data-view="ads"] .ads-campaign-detail {
  border-radius: 12px;
}

.app-layout[data-view="ads"] .ads-overview-card {
  display: grid;
  gap: 16px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.app-layout[data-view="ads"] .ads-overview-toolbar {
  padding: 0;
  border: 0;
  background: transparent;
}

.app-layout[data-view="ads"] .ads-overview-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  border: 0;
}

.app-layout[data-view="ads"] .ads-overview-metric {
  min-height: 122px;
  padding: 18px 18px 16px;
  overflow: hidden;
  border: 1px solid #dfe7f3;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(59, 130, 246, 0.06), transparent 58%),
    #fff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.045);
}

.app-layout[data-view="ads"] .ads-overview-metric:last-child {
  border-right: 1px solid #dfe7f3;
}

.app-layout[data-view="ads"] .ads-overview-metric.active::before {
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, rgba(59, 130, 246, 0));
}

.app-layout[data-view="ads"] .ads-overview-metric strong {
  margin-top: 12px;
  font-size: clamp(22px, 1.6vw, 30px);
}

.app-layout[data-view="ads"] .ads-chart-panel {
  min-height: 290px;
  overflow: hidden;
  border: 1px solid #dfe7f3;
  border-radius: 16px;
  background:
    linear-gradient(#eef2f7 1px, transparent 1px) 0 38px / 100% 48px,
    #fff;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.045);
}

.app-layout[data-view="ads"] .ads-chart-bars {
  inset: 58px 36px 82px;
}

@media (max-width: 760px) {
  .app-layout[data-view="ads"] .app-shell {
    padding: 0 14px 32px !important;
  }

  .app-layout[data-view="ads"] .ads-hero {
    margin-inline: -14px;
    padding: 24px 18px;
  }

  .app-layout[data-view="ads"] .ads-overview-metrics {
    grid-template-columns: 1fr;
  }
}
