:root {
  --purple: #6c3cf0;
  --purple-dark: #4b1fb8;
  --purple-soft: #f4f0ff;
  --blue: #2563eb;
  --blue-soft: #eef4ff;
  --green: #16a34a;
  --green-soft: #eaf8ef;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --ink: #111235;
  --muted: #6b7280;
  --soft-muted: #8b93a7;
  --line: #e6e8f0;
  --line-strong: #d7dbea;
  --surface: #ffffff;
  --canvas: #f6f7fb;
  --sidebar-width: 292px;
  --radius: 16px;
  --shadow: 0 16px 44px rgba(23, 16, 62, 0.08);
  --shadow-hover: 0 22px 60px rgba(23, 16, 62, 0.13);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.team-panel { display: grid; gap: 18px; min-width: 0; overflow: hidden; padding: 1.35rem; }
.team-panel .panel-title-row { min-width: 0; }
.team-panel .panel-title-row > div { min-width: 0; }
.team-panel .panel-title-row h2 { margin-bottom: 0; }
.team-description { margin: -8px 0 0; color: var(--muted); font-size: .88rem; line-height: 1.5; }
#adminTeamsCount { flex: 0 0 auto; margin-top: 0; white-space: nowrap; }
.team-form { display: flex; align-items: end; gap: 12px; }
.team-form label { flex: 1 1 auto; min-width: 0; display: grid; gap: 7px; color: var(--muted); font-size: .82rem; font-weight: 700; }
.team-form input, .team-select { width: 100%; max-width: 100%; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); padding: 10px 12px; font: inherit; }
.team-form .gradient-button { flex: 0 0 auto; min-width: 9rem; }
.teams-list { display: flex; flex-wrap: wrap; gap: 8px; }
.team-chip { border: 1px solid var(--line); border-radius: 999px; background: var(--canvas); padding: 7px 11px; color: var(--muted); font-size: .82rem; font-weight: 600; }
.team-select { min-width: 150px; }
.organizations-list { display: grid; gap: 0.8rem; }
.organization-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--canvas); padding: 1rem; }
.organization-card div { min-width: 0; }
.organization-card strong { display: block; color: var(--ink); }
.organization-card p { margin: 0.35rem 0; color: var(--muted); font-size: 0.86rem; }
.organization-card a { display: block; overflow-wrap: anywhere; color: var(--purple-dark); font-size: 0.8rem; font-weight: 700; }
.branding-editor { display: grid; grid-template-columns: minmax(180px, 280px) minmax(0, 1fr); gap: 1.4rem; align-items: center; }
.branding-preview { display: grid; min-height: 150px; place-items: center; border: 1px dashed var(--line-strong); border-radius: 16px; background: #fff; padding: 1.2rem; }
.branding-preview img { display: block; width: 100%; max-width: 220px; max-height: 120px; object-fit: contain; }
.branding-editor .auth-form { margin-top: 0; }
.branding-editor small { color: var(--muted); line-height: 1.5; }
@media (max-width: 960px) {
  .team-form { align-items: stretch; flex-direction: column; }
  .team-form .gradient-button { width: 100%; }
  .organization-card { align-items: stretch; flex-direction: column; }
  .organization-card .ghost-button { width: 100%; }
  .branding-editor { grid-template-columns: 1fr; }
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 88% 2%, rgba(108, 60, 240, 0.1), transparent 32rem),
    linear-gradient(180deg, #fbfbff 0%, var(--canvas) 48%, #f3f5fa 100%);
  color: var(--ink);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: 0;
}

button,
input,
a {
  font: inherit;
}

button,
a {
  transition:
    transform 250ms ease,
    border-color 250ms ease,
    box-shadow 250ms ease,
    background 250ms ease,
    color 250ms ease,
    opacity 250ms ease;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
  height: 1.25rem;
  width: 1.25rem;
}

svg path,
svg circle,
svg rect {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

[hidden] {
  display: none !important;
}

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

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  gap: 1.5rem;
  overflow: hidden;
  padding: 1.5rem 1.25rem;
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 255, 255, 0.18), transparent 16rem),
    radial-gradient(circle at 100% 80%, rgba(108, 60, 240, 0.36), transparent 20rem),
    linear-gradient(180deg, #221052 0%, #2d126d 46%, var(--purple-dark) 100%);
  color: #fff;
  box-shadow: 18px 0 50px rgba(37, 17, 87, 0.22);
}

.sidebar::after {
  position: absolute;
  right: -4rem;
  bottom: 8rem;
  width: 15rem;
  height: 15rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  content: "";
  transform: rotate(28deg);
}

.sidebar-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 5.5rem;
}

.brand-logo {
  display: block;
  width: 13.75rem;
  height: 4.5rem;
  border-radius: 14px;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 12px 32px rgba(12, 5, 38, 0.18);
}

.sidebar-nav {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.45rem;
  overflow: hidden;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 3.1rem;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 0 0.9rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.94rem;
  font-weight: 600;
}

.nav-item svg {
  flex: 0 0 auto;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.13);
  color: #fff;
  transform: translateX(2px);
}

.sidebar-footer {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.8rem;
  margin-top: auto;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.avatar {
  display: inline-grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-weight: 800;
}

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

.user-card strong {
  font-size: 0.92rem;
}

.user-card div span {
  margin-top: 0.18rem;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
}

.logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.7rem;
  width: 100%;
  min-height: 2.7rem;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.75rem 0 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  font-weight: 700;
}

.logout-button:hover {
  color: #fff;
}

.workspace {
  display: grid;
  gap: 1.35rem;
  margin-left: var(--sidebar-width);
  padding: 2rem;
}

.workspace > * {
  min-width: 0;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  min-height: 9.2rem;
}

.sidebar-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--purple-dark);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(17, 18, 53, 0.08);
}

.title-stack {
  min-width: 0;
}

.eyebrow,
.section-label,
.metric-label {
  display: inline-block;
  color: var(--purple);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.title-stack h1,
.panel-title-row h2,
.summary-head h2 {
  margin: 0.35rem 0 0;
  color: var(--ink);
  font-size: 2rem;
  line-height: 1.1;
}

.title-stack p,
.summary-head p {
  margin: 0.65rem 0 0;
  color: #565d78;
  font-size: 1rem;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.outline-button,
.ghost-button,
.gradient-button,
.detail-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
}

.outline-button {
  min-height: 2.9rem;
  border: 1px solid rgba(108, 60, 240, 0.32);
  padding: 0 1.2rem;
  background: rgba(255, 255, 255, 0.75);
  color: var(--purple-dark);
  box-shadow: 0 10px 28px rgba(108, 60, 240, 0.09);
}

.outline-button:hover {
  border-color: rgba(108, 60, 240, 0.56);
  box-shadow: 0 16px 34px rgba(108, 60, 240, 0.15);
  transform: translateY(-1px);
}

.outline-button:disabled,
.ghost-button:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.ghost-button {
  min-height: 2.9rem;
  border: 1px solid var(--line);
  padding: 0 1rem;
  background: #fff;
  color: #414861;
}

.ghost-button:hover {
  border-color: rgba(108, 60, 240, 0.32);
  color: var(--purple-dark);
  transform: translateY(-1px);
}

.analytics-illustration {
  display: grid;
  width: 7.2rem;
  height: 5.5rem;
  place-items: center;
  color: var(--purple);
  opacity: 0.9;
}

.analytics-illustration svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 16px 18px rgba(108, 60, 240, 0.22));
}

.analytics-illustration.compact {
  width: 5.4rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 2.15rem;
  border-radius: 999px;
  padding: 0 0.8rem;
  background: var(--purple-soft);
  color: var(--purple-dark);
  font-size: 0.78rem;
  font-weight: 800;
}

.status-badge.error {
  background: var(--red-soft);
  color: var(--red);
}

.status-panel {
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.status-panel:empty {
  display: none;
}

.status-panel.error {
  border: 1px solid rgba(220, 38, 38, 0.2);
  padding: 1.1rem 1.25rem;
  color: #7f1d1d;
}

.missing-list {
  margin: 0.55rem 0 0;
  padding-left: 1.3rem;
}

.dashboard-card {
  border: 1px solid rgba(215, 219, 234, 0.92);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  transition:
    transform 250ms ease,
    box-shadow 250ms ease,
    border-color 250ms ease;
}

.dashboard-card:hover {
  border-color: rgba(108, 60, 240, 0.28);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.search-panel {
  padding: 1.35rem;
}

.search-form {
  display: grid;
  gap: 0.65rem;
}

.search-form label {
  color: #333a58;
  font-size: 0.82rem;
  font-weight: 800;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16rem;
  gap: 1rem;
}

.search-control {
  position: relative;
  display: flex;
  align-items: center;
}

.search-control svg {
  position: absolute;
  left: 1rem;
  color: #9aa1b8;
  pointer-events: none;
}

#cnpjInput {
  width: 100%;
  min-height: 3.35rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  outline: 0;
  padding: 0 1rem 0 3.1rem;
  font-size: 1rem;
  font-weight: 700;
  transition:
    border-color 250ms ease,
    box-shadow 250ms ease;
}

#cnpjInput::placeholder {
  color: #9aa1b8;
  font-weight: 600;
}

#cnpjInput:focus {
  border-color: rgba(108, 60, 240, 0.65);
  box-shadow: 0 0 0 4px rgba(108, 60, 240, 0.12);
}

.gradient-button {
  position: relative;
  min-height: 3.35rem;
  border: 0;
  padding: 0 1.5rem;
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  color: #fff;
  box-shadow: 0 16px 34px rgba(108, 60, 240, 0.28);
}

.gradient-button:hover:not(:disabled) {
  box-shadow: 0 18px 42px rgba(108, 60, 240, 0.36);
  transform: translateY(-1px);
}

.gradient-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.button-content {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.button-spinner {
  display: none;
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-top-color: #fff;
  border-radius: 999px;
  animation: spin 800ms linear infinite;
}

.gradient-button.is-loading .button-content {
  opacity: 0;
}

.gradient-button.is-loading .button-spinner {
  position: absolute;
  display: block;
}

.message-panel {
  border: 1px solid rgba(108, 60, 240, 0.2);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  background: #fff;
  color: #4d5570;
  box-shadow: var(--shadow);
  font-weight: 700;
}

.message-panel.warning {
  border-color: rgba(220, 38, 38, 0.2);
  background: var(--red-soft);
  color: #991b1b;
}

.message-panel.success {
  border-color: rgba(22, 163, 74, 0.2);
  background: var(--green-soft);
  color: #166534;
}

.message-panel.loading {
  position: relative;
  overflow: hidden;
  color: var(--purple-dark);
}

.message-panel.loading::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(108, 60, 240, 0.08), transparent);
  content: "";
  animation: shimmer 1.25s infinite;
}

.print-report-header {
  display: none;
}

.client-card {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 0;
  overflow: hidden;
  border-top: 4px solid var(--purple);
}

.client-column {
  display: flex;
  gap: 1rem;
  min-width: 0;
  padding: 1.6rem;
}

.client-column + .client-column {
  border-left: 1px solid var(--line);
}

.feature-icon,
.kpi-icon,
.mini-icon {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 16px;
}

.feature-icon {
  width: 4rem;
  height: 4rem;
}

.feature-icon.purple,
.kpi-icon.purple,
.mini-icon.purple {
  background: var(--purple-soft);
  color: var(--purple);
}

.feature-icon.blue,
.kpi-icon.blue,
.mini-icon.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.feature-icon.green,
.kpi-icon.green,
.mini-icon.green {
  background: var(--green-soft);
  color: var(--green);
}

.feature-icon svg,
.kpi-icon svg,
.mini-icon svg {
  width: 1.65rem;
  height: 1.65rem;
}

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

.company-name {
  display: block;
  margin: 0.45rem 0 0;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.client-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin: 1rem 0 0;
}

.client-meta div {
  min-width: 7rem;
}

.client-meta dt {
  color: var(--soft-muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.client-meta dd {
  margin: 0.25rem 0 0;
  color: #2a3048;
  font-size: 0.9rem;
  font-weight: 800;
}

.highlight-value {
  display: block;
  margin-top: 0.45rem;
  color: var(--ink);
  font-size: 1.25rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

#broadbandAvailability .highlight-value {
  font-size: 1.12rem;
}

#detailCnpj {
  font-size: 1.05rem;
  white-space: nowrap;
}

.progress-track {
  width: 100%;
  height: 0.55rem;
  margin: 1rem 0 0.55rem;
  overflow: hidden;
  border-radius: 999px;
  background: #eef0f7;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #57c878);
  transition: width 250ms ease;
}

.client-copy p,
.kpi-card p,
.mini-card p {
  margin: 0.4rem 0 0;
  color: #61687f;
  font-size: 0.84rem;
  line-height: 1.45;
}

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 1.75rem;
  border-radius: 999px;
  padding: 0 0.7rem;
  font-size: 0.76rem;
  font-weight: 800;
}

.badge.success {
  background: var(--green-soft);
  color: var(--green);
}

.badge.neutral {
  margin-top: 0.7rem;
  background: #eef0f5;
  color: #5e667a;
}

.badge.info {
  margin-top: 0.7rem;
  background: var(--blue-soft);
  color: var(--blue);
}

.offers-panel {
  overflow: hidden;
}

.offers-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 5.25rem;
  gap: 1rem;
  border: 0;
  padding: 1rem 1.25rem;
  background: #fff;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.offers-toggle:hover {
  background: #fbfaff;
}

.offers-toggle:focus-visible {
  outline: 3px solid rgba(108, 60, 240, 0.24);
  outline-offset: -3px;
}

.offers-heading,
.offers-toggle-action {
  display: flex;
  align-items: center;
}

.offers-heading {
  min-width: 0;
  gap: 0.9rem;
}

.offers-icon {
  display: inline-grid;
  flex: 0 0 auto;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: 14px;
  background: var(--purple-soft);
  color: var(--purple);
}

.offers-icon svg,
.offers-chevron {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.offers-icon svg {
  width: 1.45rem;
  height: 1.45rem;
}

.offers-title,
.offers-subtitle {
  display: block;
}

.offers-title {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 850;
}

.offers-subtitle {
  margin-top: 0.25rem;
  color: #687086;
  font-size: 0.8rem;
  font-weight: 650;
}

.offers-toggle-action {
  flex: 0 0 auto;
  gap: 0.45rem;
  color: var(--purple-dark);
  font-size: 0.8rem;
  font-weight: 800;
}

.offers-chevron {
  width: 1.15rem;
  height: 1.15rem;
  transition: transform 250ms ease;
}

.offers-panel.is-expanded .offers-chevron {
  transform: rotate(180deg);
}

.offers-content {
  border-top: 1px solid var(--line);
  animation: offers-reveal 250ms ease;
}

.offers-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  margin: 0;
}

.offer-item {
  min-width: 0;
  padding: 1.25rem;
}

.offer-item + .offer-item {
  border-left: 1px solid var(--line);
}

.offer-item:nth-child(3n + 1) {
  border-left: 0;
}

.offer-item:nth-child(n + 4) {
  border-top: 1px solid var(--line);
}

.offer-item dt {
  color: var(--soft-muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.offer-item dd {
  margin: 0.45rem 0 0;
  color: #2a3048;
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.contacts-panel {
  display: grid;
  grid-template-columns: minmax(14rem, 0.72fr) minmax(0, 2.4fr);
  overflow: hidden;
}

.contacts-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.85rem;
  border-right: 1px solid var(--line);
  padding: 1rem 1.25rem;
  background: #fbfbff;
}

.contacts-icon {
  display: inline-grid;
  flex: 0 0 auto;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: 14px;
  background: var(--blue-soft);
  color: var(--blue);
}

.contacts-icon svg {
  width: 1.45rem;
  height: 1.45rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.contacts-title,
.contacts-subtitle {
  display: block;
}

.contacts-title {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 850;
}

.contacts-subtitle {
  margin-top: 0.25rem;
  color: #687086;
  font-size: 0.78rem;
  font-weight: 650;
}

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.contact-item {
  min-width: 0;
  padding: 1.15rem 1.25rem;
}

.contact-item + .contact-item {
  border-left: 1px solid var(--line);
}

.contact-item dt {
  color: var(--soft-muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-item dd {
  margin: 0.42rem 0 0;
  color: #2a3048;
  font-size: 0.9rem;
  font-weight: 780;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

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

.kpi-card {
  display: grid;
  min-height: 13rem;
  padding: 1.2rem;
}

.kpi-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.kpi-icon {
  width: 3.6rem;
  height: 3.6rem;
}

.sparkline {
  width: 7rem;
  height: 2.6rem;
  color: var(--purple);
  opacity: 0.7;
}

.sparkline path {
  stroke-width: 2.4;
}

.sparkline.blue-line {
  color: var(--blue);
}

.sparkline.green-line {
  color: var(--green);
}

.metric-label {
  margin-top: 1rem;
  color: #4f5680;
  text-transform: none;
}

.metric-value {
  display: block;
  margin-top: 0.35rem;
  color: var(--ink);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.detail-button {
  justify-self: flex-start;
  min-height: 2.35rem;
  margin-top: 1rem;
  border: 1px solid rgba(108, 60, 240, 0.28);
  padding: 0 0.95rem;
  background: #fff;
  color: var(--purple-dark);
  font-size: 0.82rem;
}

.detail-button:hover:not(.disabled):not(:disabled) {
  border-color: rgba(108, 60, 240, 0.58);
  box-shadow: 0 12px 26px rgba(108, 60, 240, 0.13);
  transform: translateY(-1px);
}

.detail-button.disabled,
.detail-button:disabled,
.detail-button.muted {
  cursor: not-allowed;
  opacity: 0.58;
}

.insights-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.mobile-panel,
.summary-card,
.detail-panel {
  padding: 1.35rem;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.panel-title-row h2,
.summary-head h2 {
  font-size: 1.2rem;
}

.mobile-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1.1rem;
}

.mini-card {
  display: flex;
  gap: 0.8rem;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  background: #fbfcff;
  transition:
    transform 250ms ease,
    border-color 250ms ease,
    box-shadow 250ms ease;
}

.mini-card:hover {
  border-color: rgba(108, 60, 240, 0.24);
  box-shadow: 0 12px 28px rgba(17, 18, 53, 0.07);
  transform: translateY(-1px);
}

.mini-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 14px;
}

.mini-card span {
  display: block;
  color: #596077;
  font-size: 0.76rem;
  font-weight: 800;
}

.mini-card strong {
  display: block;
  margin-top: 0.25rem;
  color: var(--ink);
  font-size: 1.18rem;
}

.fidelity-chart {
  margin-top: 1.15rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem;
  background: #fff;
}

.chart-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.chart-title h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
}

.chart-title span {
  color: var(--soft-muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.fidelity-row {
  display: grid;
  grid-template-columns: minmax(8rem, 11rem) minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding: 0.7rem 0;
}

.fidelity-row + .fidelity-row {
  border-top: 1px solid #eef0f6;
}

.fidelity-label {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.55rem;
  align-items: baseline;
}

.fidelity-label span {
  color: #39405d;
  font-size: 0.84rem;
  font-weight: 800;
}

.fidelity-label strong {
  color: var(--ink);
}

.fidelity-label small {
  color: var(--soft-muted);
  font-weight: 800;
}

.bar-track {
  height: 0.75rem;
  overflow: hidden;
  border-radius: 999px;
  background: #eef1f8;
}

.bar-fill {
  display: block;
  width: 0;
  height: 100%;
  min-width: 0.2rem;
  border-radius: inherit;
  transition: width 250ms ease;
}

.bar-fill.purple {
  background: linear-gradient(90deg, var(--purple), #9d7bff);
}

.bar-fill.blue {
  background: linear-gradient(90deg, var(--blue), #73a0ff);
}

.bar-fill.green {
  background: linear-gradient(90deg, var(--green), #5acb7a);
}

.summary-card {
  display: grid;
  align-content: start;
  background:
    linear-gradient(160deg, rgba(108, 60, 240, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.94);
}

.summary-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.donut-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.35rem;
}

.donut-card {
  display: grid;
  justify-items: center;
  gap: 0.65rem;
  min-width: 0;
  border: 1px solid rgba(215, 219, 234, 0.82);
  border-radius: 14px;
  padding: 1rem 0.7rem;
  background: rgba(255, 255, 255, 0.78);
}

.donut-ring {
  position: relative;
  display: grid;
  width: 6rem;
  height: 6rem;
  place-items: center;
  border-radius: 999px;
  background: conic-gradient(var(--donut-color) var(--donut-progress, 64%), #e8eaf3 0);
}

.donut-ring::after {
  position: absolute;
  inset: 0.45rem;
  border-radius: inherit;
  background: #fff;
  content: "";
}

.donut-ring span {
  position: relative;
  z-index: 1;
  max-width: 4.4rem;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  overflow-wrap: anywhere;
}

.donut-card strong {
  color: #4a5068;
  font-size: 0.8rem;
  text-align: center;
}

.summary-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
  color: var(--soft-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.detail-client {
  grid-template-columns: minmax(0, 1.5fr) minmax(18rem, 0.7fr);
}

.detail-panel {
  overflow: hidden;
}

.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  padding: 2rem;
  background: #fbfcff;
  color: #5a6279;
  font-weight: 700;
  text-align: center;
}

.detail-table {
  width: 100%;
  border-collapse: collapse;
  color: #303650;
  font-size: 0.9rem;
}

.detail-table thead {
  background: #f4f6fb;
}

.detail-table th,
.detail-table td {
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 0.9rem;
  text-align: left;
  vertical-align: top;
}

.detail-table th {
  color: #596077;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-table tbody tr:hover {
  background: #fafbff;
}

.mobile-detail-toolbar {
  display: flex;
  min-height: 4.25rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding: 0.8rem 1rem;
  background: #fbfbff;
}

.mobile-detail-toolbar > span {
  color: #596077;
  font-size: 0.8rem;
  font-weight: 800;
}

.mobile-offers-all-toggle,
.mobile-line-offers-toggle {
  display: inline-flex;
  min-height: 2.45rem;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid rgba(108, 60, 240, 0.28);
  border-radius: 10px;
  padding: 0 0.85rem;
  background: #fff;
  color: var(--purple-dark);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
  transition:
    border-color 250ms ease,
    box-shadow 250ms ease,
    transform 250ms ease;
}

.mobile-offers-all-toggle:hover,
.mobile-line-offers-toggle:hover {
  border-color: rgba(108, 60, 240, 0.58);
  box-shadow: 0 10px 22px rgba(108, 60, 240, 0.12);
  transform: translateY(-1px);
}

.mobile-line-offers-toggle svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform 250ms ease;
}

.mobile-line-offers-toggle.is-expanded svg {
  transform: rotate(180deg);
}

.mobile-offer-row > td {
  border-bottom: 1px solid rgba(108, 60, 240, 0.18);
  padding: 0;
  background: #fbfaff;
}

.mobile-offer-row:hover > td {
  background: #fbfaff;
}

.mobile-line-offers-panel {
  padding: 1rem;
  animation: offers-reveal 250ms ease;
}

.mobile-line-offers-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.mobile-line-offers-heading span {
  color: var(--purple-dark);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.mobile-line-offers-heading strong {
  color: #4f566f;
  font-size: 0.84rem;
}

.mobile-offer-table {
  border: 1px solid var(--line);
  background: #fff;
}

.mobile-offer-table th:first-child {
  width: 14rem;
}

.account-block {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.account-block + .account-block {
  margin-top: 1rem;
}

.account-header {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  padding: 1rem;
  background: linear-gradient(180deg, #fbfbff, #f5f6fb);
  border-bottom: 1px solid var(--line);
}

.account-header span {
  display: block;
  color: var(--soft-muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.account-header strong {
  display: block;
  margin-top: 0.3rem;
  color: var(--ink);
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.account-address {
  display: block;
  max-width: 34rem;
  margin-top: 0.35rem;
  color: #687086;
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.account-header.has-offers {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: center;
}

.account-offers-action {
  display: flex;
  justify-content: flex-end;
}

.account-offers-toggle {
  display: inline-flex;
  min-height: 2.55rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid rgba(108, 60, 240, 0.28);
  border-radius: 10px;
  padding: 0 0.9rem;
  background: #fff;
  color: var(--purple-dark);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 800;
  transition:
    border-color 250ms ease,
    box-shadow 250ms ease,
    transform 250ms ease;
}

.account-offers-toggle:hover {
  border-color: rgba(108, 60, 240, 0.58);
  box-shadow: 0 10px 22px rgba(108, 60, 240, 0.12);
  transform: translateY(-1px);
}

.account-offers-toggle:focus-visible {
  outline: 3px solid rgba(108, 60, 240, 0.2);
  outline-offset: 2px;
}

.account-offers-toggle svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform 250ms ease;
}

.account-offers-toggle.is-expanded svg {
  transform: rotate(180deg);
}

.account-offers-panel {
  border-top: 1px solid rgba(108, 60, 240, 0.18);
  padding: 1rem;
  background: #fbfaff;
  animation: offers-reveal 250ms ease;
}

.account-offers-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.account-offers-heading span {
  color: var(--purple-dark);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.account-offers-heading strong {
  color: #596077;
  font-size: 0.8rem;
}

.offer-table {
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}

.offer-table th:nth-child(1) {
  width: 25%;
}

.offer-table th:nth-child(3) {
  width: 12rem;
}

.offer-table th:nth-child(4),
.offer-table td:nth-child(4) {
  width: 10rem;
  color: var(--green);
  font-weight: 850;
  white-space: nowrap;
}

.auth-body {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 2rem;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(20rem, 0.9fr) minmax(24rem, 0.72fr);
  gap: 1.5rem;
  width: min(68rem, 100%);
}

.auth-shell.single {
  grid-template-columns: minmax(20rem, 30rem);
  justify-content: center;
}

.auth-brand-panel,
.auth-card {
  border-radius: 24px;
}

.auth-brand-panel {
  display: grid;
  align-content: space-between;
  min-height: 36rem;
  overflow: hidden;
  padding: 2rem;
  background:
    radial-gradient(circle at 24% 12%, rgba(255, 255, 255, 0.22), transparent 16rem),
    linear-gradient(145deg, #26105f, var(--purple-dark));
  color: #fff;
  box-shadow: 0 24px 70px rgba(37, 17, 87, 0.22);
}

.auth-brand-panel h1 {
  margin: 0.65rem 0 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.02;
}

.auth-brand-panel p {
  max-width: 28rem;
  color: rgba(255, 255, 255, 0.76);
  font-size: 1rem;
  line-height: 1.65;
}

.auth-logo {
  width: 14rem;
  height: 4.5rem;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 16px 38px rgba(9, 4, 31, 0.18);
}

.auth-logo.small {
  width: 12rem;
  height: 4rem;
}

.auth-card {
  align-self: center;
  padding: 1.5rem;
}

.auth-state-card {
  display: grid;
  justify-items: start;
  gap: 1rem;
  padding: 2rem;
}

.auth-state-card h1 {
  margin: 0;
  color: var(--ink);
  font-size: 1.8rem;
}

.auth-state-card p {
  margin: 0;
  color: #5f667c;
  line-height: 1.6;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.35rem;
  background: #f1f3f9;
}

.auth-tab {
  display: inline-flex;
  min-height: 2.6rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #5b6279;
  font-weight: 800;
}

.auth-tab.active {
  background: #fff;
  color: var(--purple-dark);
  box-shadow: 0 10px 24px rgba(17, 18, 53, 0.08);
}

.auth-heading {
  margin-top: 1.35rem;
}

.auth-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.65rem;
}

.auth-heading p {
  margin: 0.45rem 0 0;
  color: #626a80;
  line-height: 1.5;
}

.auth-form {
  display: grid;
  gap: 0.95rem;
  margin-top: 1.3rem;
}

.auth-form label,
.admin-toolbar label {
  display: grid;
  gap: 0.45rem;
  color: #343b55;
  font-size: 0.82rem;
  font-weight: 800;
}

.auth-form input,
.auth-form select,
.admin-toolbar input,
.admin-toolbar select {
  width: 100%;
  min-height: 3.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  outline: 0;
  padding: 0 0.95rem;
  font-weight: 700;
  transition:
    border-color 250ms ease,
    box-shadow 250ms ease;
}

.auth-form input:focus,
.auth-form select:focus,
.admin-toolbar input:focus,
.admin-toolbar select:focus {
  border-color: rgba(108, 60, 240, 0.65);
  box-shadow: 0 0 0 4px rgba(108, 60, 240, 0.12);
}

.auth-submit {
  width: 100%;
  min-height: 3.15rem;
}

.auth-form-row {
  display: flex;
  justify-content: flex-end;
}

.verification-resend-form {
  width: min(100%, 28rem);
  margin-top: 0.35rem;
  padding-top: 0.2rem;
}

.verification-resend-form .ghost-button {
  width: 100%;
}

.text-link {
  width: fit-content;
  color: var(--purple-dark);
  font-size: 0.86rem;
  font-weight: 800;
}

.text-link:hover {
  color: var(--purple);
}

.text-link.centered {
  justify-self: center;
}

.auth-message {
  margin: 0;
  border: 1px solid rgba(220, 38, 38, 0.18);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  background: var(--red-soft);
  color: #991b1b;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.45;
}

.auth-message.success {
  border-color: rgba(22, 163, 74, 0.18);
  background: var(--green-soft);
  color: #166534;
}

.auth-message.warning {
  border-color: rgba(217, 119, 6, 0.2);
  background: #fffbeb;
  color: #92400e;
}

.auth-message:empty {
  display: none;
}

.badge.danger {
  background: var(--red-soft);
  color: var(--red);
}

.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(18rem, 1fr) minmax(14rem, 0.35fr) auto;
  gap: 1rem;
  align-items: end;
  padding: 1.2rem;
}

.data-upload-panel {
  padding: 1.35rem;
}

.data-upload-form {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

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

.file-upload {
  display: grid;
  gap: 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 1rem;
  background: #fbfcff;
  color: #343b55;
  font-size: 0.82rem;
  font-weight: 800;
}

.file-upload input {
  width: 100%;
  color: #596077;
  font-size: 0.82rem;
  font-weight: 700;
}

.file-upload small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-organization-switcher {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem);
  gap: 1.2rem;
  align-items: end;
  padding: 1.2rem 1.35rem;
  border: 1px solid rgba(108, 60, 240, 0.16);
  background: linear-gradient(135deg, #fbfaff, #fff);
}

.admin-organization-switcher h2 {
  margin: 0.25rem 0 0;
  color: var(--ink);
  font-size: 1.1rem;
}

.admin-organization-switcher p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.admin-organization-switcher label {
  display: grid;
  gap: 0.45rem;
  color: #343b55;
  font-size: 0.78rem;
  font-weight: 800;
}

.admin-organization-switcher select {
  width: 100%;
  min-height: 2.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 0 0.8rem;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.upload-file-list {
  display: grid;
  gap: 0.55rem;
  border: 1px solid rgba(108, 60, 240, 0.16);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  background: #f8f6ff;
  color: #454a5f;
  font-size: 0.78rem;
}

.upload-file-list strong {
  color: var(--purple-dark);
}

.upload-file-list ul {
  display: grid;
  gap: 0.3rem;
  margin: 0;
  padding-left: 1.1rem;
}

.upload-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
}

.upload-actions .auth-message {
  min-height: 3rem;
}

.upload-summary {
  display: grid;
  gap: 0.7rem;
  margin-top: 1rem;
  border: 1px solid rgba(22, 163, 74, 0.16);
  border-radius: 14px;
  padding: 1rem;
  background: var(--green-soft);
  color: #166534;
}

.upload-summary strong {
  color: #14532d;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.upload-summary ul {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.86rem;
  font-weight: 800;
}

.admin-panel {
  padding: 1.35rem;
}

.history-panel {
  padding: 1.35rem;
}

.history-table td:first-child {
  color: var(--ink);
  font-weight: 800;
  white-space: nowrap;
}

.history-actions {
  display: flex;
  justify-content: flex-start;
}

.history-actions .admin-action-button {
  white-space: nowrap;
}

.reports-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.report-filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) repeat(2, minmax(190px, 1fr)) auto;
  gap: 1rem;
  align-items: end;
  padding: 1.2rem 1.35rem;
}

.report-filter-heading h2 {
  margin: 0.2rem 0 0;
  color: var(--ink);
  font-size: 1.05rem;
}

.report-filter-panel label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.report-filter-panel select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
  font-weight: 700;
  text-transform: none;
}

.report-filter-panel select:focus {
  border-color: var(--purple);
  outline: 3px solid rgba(108, 60, 240, 0.12);
}

.report-summary-card {
  display: grid;
  gap: 0.45rem;
  min-height: 7.5rem;
  padding: 1.2rem;
}

.report-summary-card span {
  color: #596077;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.report-summary-card strong {
  color: var(--purple-dark);
  font-size: 2.1rem;
  line-height: 1;
}

.reports-panel {
  padding: 1.35rem;
}

.reports-table td strong,
.reports-table td span {
  display: block;
}

.reports-table td strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.reports-table td span:not(.badge) {
  margin-top: 0.18rem;
  color: #6a7286;
  font-size: 0.8rem;
}

.ranking-position {
  color: var(--purple-dark);
  font-size: 1rem;
  font-weight: 900;
}

.report-number-cell {
  color: var(--ink);
  font-weight: 900;
}

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

.analytics-card { min-width: 0; padding: 1.35rem; }
.bar-chart { display: flex; align-items: end; gap: .45rem; height: 220px; margin-top: 1.25rem; padding-top: 1.5rem; border-bottom: 1px solid var(--line); }
.bar-column { display: grid; grid-template-rows: 1rem minmax(3px, 1fr) 1.4rem; align-items: end; justify-items: center; flex: 1; height: 100%; min-width: 0; }
.bar-column strong { color: var(--muted); font-size: .68rem; }
.bar-fill { width: min(24px, 75%); min-height: 3px; border-radius: 7px 7px 2px 2px; background: linear-gradient(180deg, var(--purple), var(--blue)); transition: height .25s ease; }
.bar-column small { color: var(--soft-muted); font-size: .65rem; white-space: nowrap; }
.bar-chart.compact .bar-column:nth-child(odd) small { visibility: hidden; }
.report-list { display: grid; gap: .2rem; margin-top: 1rem; }
.report-list-row { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; gap: .75rem; align-items: center; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.report-list-row:last-child { border-bottom: 0; }
.list-position { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; color: var(--purple-dark); background: var(--purple-soft); font-weight: 800; }
.report-list-row div { min-width: 0; }
.report-list-row strong, .report-list-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-list-row strong { color: var(--ink); font-size: .88rem; }
.report-list-row small { margin-top: .2rem; color: var(--muted); font-size: .75rem; }
.report-list-row b { color: var(--purple-dark); font-size: .8rem; white-space: nowrap; }
.report-list-empty { padding: 2rem 0; color: var(--muted); text-align: center; }

.admin-table-wrap {
  margin-top: 1rem;
  overflow-x: auto;
}

.admin-table td strong,
.admin-table td span {
  display: block;
}

.admin-table td strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.admin-table td span:not(.badge) {
  margin-top: 0.18rem;
  color: #6a7286;
  font-size: 0.8rem;
}

.admin-table td .email-verified {
  color: var(--green);
  font-weight: 800;
}

.admin-table td .email-pending {
  color: #b45309;
  font-weight: 800;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.admin-action-button {
  min-height: 2rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 0.75rem;
  background: #fff;
  color: #444c64;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
}

.admin-action-button:hover {
  transform: translateY(-1px);
}

.admin-action-button.aprovar,
.admin-action-button.reativar {
  border-color: rgba(22, 163, 74, 0.24);
  color: var(--green);
}

.admin-action-button.bloquear {
  border-color: rgba(108, 60, 240, 0.24);
  color: var(--purple-dark);
}

.admin-action-button.cancelar {
  border-color: rgba(220, 38, 38, 0.24);
  color: var(--red);
}

.admin-empty-cell {
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes offers-reveal {
  from {
    opacity: 0;
    transform: translateY(-0.35rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@page {
  size: A4 landscape;
  margin: 10mm;
}

@media print {
  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  html,
  body {
    min-height: 0;
    background: #fff;
  }

  body {
    color: var(--ink);
  }

  .sidebar,
  .page-header,
  .search-panel,
  #statusPanel,
  #searchMessage,
  .detail-button,
  .button-spinner {
    display: none !important;
  }

  .app-layout {
    display: block;
  }

  .workspace {
    display: grid;
    gap: 0.75rem;
    margin-left: 0;
    padding: 0;
  }

  .print-report-header {
    display: flex !important;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid #dfe3ee;
    padding: 0 0 0.65rem;
  }

  .print-report-header h2 {
    margin: 0.12rem 0 0;
    color: var(--ink);
    font-size: 1.25rem;
  }

  .print-report-header p {
    margin: 0.18rem 0 0;
    color: #596077;
    font-size: 0.78rem;
    font-weight: 700;
  }

  .print-report-header dl {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    gap: 0.8rem;
    margin: 0;
  }

  .print-report-header dt {
    color: #707891;
    font-size: 0.64rem;
    font-weight: 800;
    text-transform: uppercase;
  }

  .print-report-header dd {
    margin: 0.18rem 0 0;
    color: var(--ink);
    font-size: 0.78rem;
    font-weight: 800;
  }

  .dashboard-card {
    break-inside: avoid;
    border-color: #dfe3ee;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(23, 16, 62, 0.08);
    transform: none !important;
  }

  .client-card {
    grid-template-columns: 1.25fr 0.9fr 0.9fr;
    border-top-width: 3px;
  }

  .client-column {
    gap: 0.65rem;
    padding: 0.85rem;
  }

  .feature-icon,
  .kpi-icon,
  .mini-icon {
    flex: 0 0 auto;
  }

  .company-name {
    font-size: 0.98rem;
  }

  .client-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .highlight-value {
    font-size: 1rem;
  }

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

  .kpi-card {
    min-height: 8.7rem;
    padding: 0.85rem;
  }

  .metric-value {
    margin-top: 0.1rem;
    font-size: 1.55rem;
  }

  .sparkline {
    width: 4.8rem;
  }

  .insights-grid {
    display: block;
  }

  .mobile-panel {
    padding: 0.9rem;
  }

  .mobile-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 0.75rem;
  }

  .mini-card {
    padding: 0.7rem;
  }

  .fidelity-chart {
    margin-top: 0.75rem;
    padding: 0.75rem;
  }

  .fidelity-row {
    grid-template-columns: 9.5rem minmax(0, 1fr);
    gap: 0.65rem;
  }
}

.field-hint {
  color: #7b8195;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Premium login experience */
.login-page {
  position: relative;
  overflow-x: hidden;
  padding: clamp(1rem, 3vw, 2.5rem);
  background:
    radial-gradient(circle at 12% 12%, rgba(123, 92, 246, 0.28), transparent 30rem),
    radial-gradient(circle at 92% 88%, rgba(78, 58, 178, 0.18), transparent 28rem),
    linear-gradient(145deg, #090713 0%, #121022 48%, #080710 100%);
}

.login-page::before,
.login-page::after {
  position: fixed;
  z-index: 0;
  border-radius: 999px;
  content: "";
  pointer-events: none;
  filter: blur(2px);
}

.login-page::before {
  top: -12rem;
  right: 8%;
  width: 26rem;
  height: 26rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    0 0 0 4rem rgba(255, 255, 255, 0.012),
    0 0 0 8rem rgba(255, 255, 255, 0.008);
}

.login-page::after {
  bottom: -18rem;
  left: 28%;
  width: 32rem;
  height: 32rem;
  background: rgba(108, 60, 240, 0.08);
  filter: blur(70px);
}

.login-shell {
  position: relative;
  z-index: 1;
  grid-template-columns: minmax(0, 1.08fr) minmax(25rem, 0.78fr);
  gap: 0;
  width: min(76rem, 100%);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 32px;
  background: #fff;
  box-shadow: 0 44px 120px rgba(0, 0, 0, 0.42);
}

.login-showcase {
  position: relative;
  isolation: isolate;
  align-content: center;
  min-height: 44rem;
  border-radius: 0;
  padding: clamp(2rem, 4vw, 3.4rem);
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 18% 8%, rgba(164, 135, 255, 0.34), transparent 22rem),
    radial-gradient(circle at 92% 88%, rgba(108, 60, 240, 0.32), transparent 24rem),
    linear-gradient(145deg, #20114a 0%, #120c2a 58%, #0c0919 100%);
  background-size: 42px 42px, 42px 42px, auto, auto, auto;
  box-shadow: none;
}

.login-showcase::after {
  position: absolute;
  z-index: -1;
  right: -9rem;
  bottom: 7rem;
  width: 25rem;
  height: 25rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  content: "";
  box-shadow:
    0 0 0 3.5rem rgba(255, 255, 255, 0.018),
    0 0 0 7rem rgba(255, 255, 255, 0.012);
}

.login-security-note i {
  display: block;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: #55e3a3;
  box-shadow: 0 0 0 4px rgba(85, 227, 163, 0.12);
}

.login-showcase-copy {
  max-width: 35rem;
  align-self: center;
  padding: 0;
}

.login-kicker,
.login-card-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.login-kicker {
  color: #cfc2ff;
}

.login-showcase-copy h1 {
  max-width: 34rem;
  margin: 1rem 0 0;
  font-size: clamp(2.5rem, 4.3vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.login-showcase-copy p {
  max-width: 31rem;
  margin: 1.5rem 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 1.02rem;
  line-height: 1.72;
}

.login-card {
  display: flex;
  min-width: 0;
  align-self: stretch;
  flex-direction: column;
  justify-content: center;
  border: 0;
  border-radius: 0;
  padding: clamp(2rem, 4.5vw, 4.25rem);
  background: #fff;
  box-shadow: none;
}

.login-card-header {
  margin-bottom: 2rem;
}

.login-card-kicker {
  color: var(--purple);
}

.login-card-header h2 {
  margin: 0.75rem 0 0;
  color: #171429;
  font-size: clamp(2rem, 3vw, 2.65rem);
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.login-card-header p {
  margin: 0.8rem 0 0;
  color: #72768a;
  font-size: 0.93rem;
  line-height: 1.55;
}

.login-form {
  gap: 1.1rem;
  margin-top: 0;
}

.login-form label > span {
  color: #3b3a4c;
  font-size: 0.76rem;
  letter-spacing: 0.01em;
}

.login-form input {
  min-height: 3.55rem;
  border-color: #e2e3eb;
  border-radius: 14px;
  background: #f8f8fb;
  padding: 0 1rem;
  font-weight: 600;
}

.login-form input::placeholder {
  color: #a3a5b2;
  font-weight: 500;
}

.login-form input:focus {
  border-color: rgba(108, 60, 240, 0.52);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(108, 60, 240, 0.09);
}

.login-password-field {
  position: relative;
}

.login-password-field input {
  padding-right: 5.2rem;
}

.login-password-field button {
  position: absolute;
  top: 50%;
  right: 0.9rem;
  border: 0;
  padding: 0.4rem;
  background: transparent;
  color: var(--purple-dark);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
  transform: translateY(-50%);
}

.login-form-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.login-security-note {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #7c7e8e;
  font-size: 0.7rem;
  font-weight: 650;
}

.login-security-note i {
  width: 0.38rem;
  height: 0.38rem;
  background: #28b579;
  box-shadow: 0 0 0 3px rgba(40, 181, 121, 0.1);
}

.login-submit {
  justify-content: space-between;
  min-height: 3.65rem;
  margin-top: 0.15rem;
  border-radius: 14px;
  padding: 0 1.25rem;
  box-shadow: 0 18px 34px rgba(90, 49, 201, 0.24);
}

.login-submit span:last-child {
  font-size: 1.15rem;
  transition: transform 180ms ease;
}

.login-submit:hover:not(:disabled) span:last-child {
  transform: translateX(3px);
}

.login-card-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 2rem;
  border-top: 1px solid #eeeef3;
  padding-top: 1.4rem;
  color: #858797;
  font-size: 0.8rem;
}

.login-card-footer a {
  color: var(--purple-dark);
  font-weight: 800;
}

.login-verification-link {
  display: block;
  width: fit-content;
  margin: 0.9rem auto 0;
  color: #686c7d;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.login-verification-link:hover {
  color: var(--purple-dark);
  text-decoration: underline;
  text-underline-offset: 0.18rem;
}

.login-support {
  margin: 1rem 0 0;
  color: #afb0ba;
  font-size: 0.67rem;
  text-align: center;
}

@media (max-width: 1180px) {
  .login-shell {
    grid-template-columns: minmax(0, 1fr) minmax(23rem, 0.9fr);
    width: min(68rem, 100%);
  }

  .login-showcase {
    min-height: 40rem;
  }

  .login-showcase-copy h1 {
    font-size: clamp(2.4rem, 4.8vw, 3.35rem);
  }
}

@media (max-width: 860px) {
  .login-page {
    align-items: start;
    padding: 1rem;
  }

  .login-shell {
    grid-template-columns: 1fr;
    width: min(36rem, 100%);
    border-radius: 24px;
  }

  .login-showcase {
    min-height: 20rem;
    border-radius: 0;
    padding: 1.5rem;
  }

  .login-showcase-copy {
    padding: 0;
  }

  .login-showcase-copy h1 {
    max-width: 28rem;
    font-size: clamp(2.1rem, 8vw, 3rem);
  }

  .login-showcase-copy p {
    display: none;
  }

  .login-card {
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 520px) {
  .login-page {
    padding: 0;
    background: #fff;
  }

  .login-shell {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .login-showcase {
    min-height: 13rem;
    padding: 1.2rem;
  }

  .login-showcase-copy {
    padding: 0;
  }

  .login-showcase-copy h1 {
    margin-top: 0.65rem;
    font-size: 1.95rem;
  }

  .login-card {
    justify-content: flex-start;
    padding: 2rem 1.2rem 1.5rem;
  }

  .login-card-header h2 {
    font-size: 2rem;
  }

  .login-form-links {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.7rem;
  }

  .login-card-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-submit span:last-child {
    transition: none;
  }
}

@media (max-width: 1320px) {
  .kpi-grid,
  .reports-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .reports-analytics-grid { grid-template-columns: minmax(0, 1fr); }
  .report-filter-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-filter-heading { grid-column: 1 / -1; }
}

@media (max-width: 1400px) {
  .insights-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1120px) {
  .client-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .client-column + .client-column {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .contacts-panel {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 1180px) {
  .page-header {
    align-items: stretch;
    flex-direction: column;
    min-height: 0;
  }

  .header-actions {
    justify-content: flex-start;
  }

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

  .auth-shell {
    grid-template-columns: 1fr;
    width: min(34rem, 100%);
  }

  .auth-brand-panel {
    min-height: 18rem;
  }
}

@media (max-width: 960px) {
  .sidebar {
    transform: translateX(-105%);
    transition: transform 250ms ease;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .workspace {
    margin-left: 0;
    padding: 1.25rem;
  }

  .sidebar-toggle {
    display: inline-grid;
  }

  .page-header {
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem;
  }

  .title-stack {
    flex: 1;
  }

  .header-actions {
    flex-wrap: wrap;
  }

  .analytics-illustration {
    display: none;
  }
}

@media (max-width: 760px) {
  .workspace {
    gap: 1rem;
    padding: 1rem;
  }

  .page-header {
    flex-wrap: wrap;
  }

  .title-stack h1 {
    font-size: 1.65rem;
  }

  .header-actions {
    width: 100%;
  }

  .outline-button,
  .ghost-button {
    flex: 1 1 11rem;
  }

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

  .kpi-grid,
  .mobile-summary,
  .reports-summary-grid,
  .donut-grid,
  .detail-client {
    grid-template-columns: 1fr;
  }

  .report-filter-panel {
    grid-template-columns: 1fr;
  }

  .report-filter-heading {
    grid-column: auto;
  }

  .client-column {
    flex-direction: column;
    padding: 1.2rem;
  }

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

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

  .contact-item + .contact-item {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .offer-item + .offer-item {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .fidelity-row {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .detail-panel {
    overflow-x: auto;
  }

  .detail-table {
    min-width: 42rem;
  }

  .mobile-detail-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .mobile-offers-all-toggle {
    width: 100%;
  }

  .account-header.has-offers {
    grid-template-columns: 1fr;
  }

  .account-offers-action,
  .account-offers-toggle {
    width: 100%;
  }

  .auth-body {
    padding: 1rem;
  }

  .auth-card,
  .auth-brand-panel {
    border-radius: 18px;
  }

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

  .admin-organization-switcher {
    grid-template-columns: 1fr;
  }

  .upload-grid,
  .upload-actions {
    grid-template-columns: 1fr;
  }

  .admin-toolbar .ghost-button {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .sidebar {
    width: min(86vw, var(--sidebar-width));
  }

  .brand-logo {
    width: 12rem;
  }

  .outline-button span,
  .ghost-button span {
    display: none;
  }

  .outline-button,
  .ghost-button {
    flex: 0 0 auto;
    width: 2.85rem;
    padding: 0;
  }

  .gradient-button {
    width: 100%;
  }

  .metric-value {
    font-size: 1.75rem;
  }

  .offers-toggle {
    align-items: flex-start;
    padding: 1rem;
  }

  .offers-subtitle {
    display: none;
  }

  .offers-toggle-action > span {
    display: none;
  }

  #detailCnpj {
    white-space: normal;
  }

  .account-header {
    grid-template-columns: 1fr;
  }
}

@media print {
  .workspace {
    gap: 0.75rem !important;
    margin-left: 0 !important;
    padding: 0 !important;
  }

  .client-card {
    grid-template-columns: 1.25fr 0.9fr 0.9fr !important;
  }

  .client-column {
    flex-direction: row !important;
    padding: 0.85rem !important;
  }

  .kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  .mobile-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .fidelity-row {
    grid-template-columns: 9.5rem minmax(0, 1fr) !important;
  }
}

/* Final login overrides must remain after the legacy responsive rules. */
.login-password-field button:focus-visible {
  border-radius: 6px;
  outline: 2px solid rgba(108, 60, 240, 0.45);
  outline-offset: 2px;
}

@media (max-width: 860px) {
  body.login-page {
    padding: 1rem;
  }

  .login-shell.auth-shell {
    grid-template-columns: 1fr;
    width: min(36rem, 100%);
  }

  .login-showcase.auth-brand-panel {
    min-height: 20rem;
    border-radius: 0;
  }
}

@media (max-width: 520px) {
  body.login-page {
    padding: 0;
  }

  .login-shell.auth-shell {
    width: 100%;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .login-showcase.auth-brand-panel {
    min-height: 13rem;
    border-radius: 0;
  }

  .login-card.auth-card {
    border-radius: 0;
  }
}

/* Premium CNPJ consultation experience */
body.consultation-page {
  background:
    radial-gradient(circle at 72% 0%, rgba(122, 92, 246, 0.13), transparent 32rem),
    linear-gradient(180deg, #f8f8fc 0%, #f3f4f9 100%);
}

.consultation-page .sidebar {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 12% 8%, rgba(150, 115, 255, 0.26), transparent 17rem),
    radial-gradient(circle at 96% 82%, rgba(97, 53, 218, 0.35), transparent 20rem),
    linear-gradient(180deg, #160d35 0%, #21104d 52%, #2f126f 100%);
  box-shadow: 18px 0 60px rgba(24, 12, 55, 0.18);
}

.consultation-page .nav-item {
  min-height: 3rem;
  border-radius: 12px;
}

.consultation-page .nav-item.active {
  border-color: rgba(255, 255, 255, 0.16);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 30px rgba(12, 5, 38, 0.12);
}

.consultation-workspace {
  gap: 1.1rem;
  padding: 1.5rem 2rem 2rem;
}

.consultation-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  padding: clamp(1.6rem, 3vw, 2.4rem);
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 8% 4%, rgba(161, 132, 255, 0.28), transparent 25rem),
    radial-gradient(circle at 94% 84%, rgba(112, 66, 231, 0.38), transparent 26rem),
    linear-gradient(145deg, #1f1049 0%, #120b2b 58%, #0b0918 100%);
  background-size: 40px 40px, 40px 40px, auto, auto, auto;
  box-shadow: 0 30px 75px rgba(26, 16, 61, 0.2);
}

.consultation-hero::before {
  position: absolute;
  z-index: -1;
  right: -9rem;
  bottom: -12rem;
  width: 28rem;
  height: 28rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  content: "";
  box-shadow:
    0 0 0 4rem rgba(255, 255, 255, 0.018),
    0 0 0 8rem rgba(255, 255, 255, 0.012);
}

.consultation-page-header {
  position: relative;
  z-index: 1;
  align-items: flex-start;
  min-height: 0;
}

.consultation-page-header .title-stack {
  max-width: 38rem;
}

.consultation-page-header .eyebrow {
  color: #cfc2ff;
  letter-spacing: 0.14em;
}

.consultation-page-header .title-stack h1 {
  margin-top: 0.55rem;
  color: #fff;
  font-size: clamp(2.2rem, 4vw, 3.25rem);
  letter-spacing: -0.05em;
  line-height: 1;
}

.consultation-page-header .title-stack p {
  max-width: 34rem;
  color: rgba(255, 255, 255, 0.64);
  line-height: 1.65;
}

.consultation-page-header .header-actions {
  flex-wrap: wrap;
}

.consultation-page-header .outline-button,
.consultation-page-header .ghost-button {
  min-height: 2.75rem;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  box-shadow: none;
  backdrop-filter: blur(12px);
}

.consultation-page-header .outline-button:hover,
.consultation-page-header .ghost-button:hover {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  box-shadow: none;
}

.consultation-page-header .status-badge {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.consultation-hero > .status-panel.error {
  margin-top: 1.25rem;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: none;
}

.consultation-page .search-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(15rem, 0.7fr) minmax(24rem, 1.3fr);
  gap: clamp(1.5rem, 3vw, 2.6rem);
  align-items: center;
  margin-top: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 21px;
  padding: 1.35rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 55px rgba(3, 2, 13, 0.22);
  backdrop-filter: blur(18px);
}

.consultation-page .search-panel:hover {
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 24px 55px rgba(3, 2, 13, 0.22);
  transform: none;
}

.search-panel-copy {
  padding: 0.35rem 0.25rem;
}

.search-panel-kicker {
  color: var(--purple);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.search-panel-copy h2 {
  margin: 0.6rem 0 0;
  color: #18152a;
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.consultation-page .search-form {
  gap: 0.75rem;
}

.consultation-page .search-form label {
  color: #3c3a4e;
  font-size: 0.74rem;
  letter-spacing: 0.02em;
}

.consultation-page .search-row {
  grid-template-columns: minmax(0, 1fr) 10.5rem;
  gap: 0.75rem;
}

.consultation-page #cnpjInput {
  min-height: 3.75rem;
  border-color: #e1e2ea;
  border-radius: 14px;
  background: #f8f8fb;
  font-size: 1.02rem;
}

.consultation-page #cnpjInput:focus {
  border-color: rgba(108, 60, 240, 0.55);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(108, 60, 240, 0.09);
}

.consultation-page .search-row .gradient-button {
  min-height: 3.75rem;
  border-radius: 14px;
  box-shadow: 0 16px 30px rgba(90, 49, 201, 0.23);
}

.consultation-page .message-panel {
  border-radius: 16px;
}

.consultation-page .dashboard-card:not(.search-panel) {
  border-color: rgba(220, 222, 233, 0.82);
  border-radius: 20px;
  box-shadow: 0 18px 46px rgba(32, 28, 67, 0.08);
}

.consultation-page .client-card {
  border-top: 0;
}

@media (max-width: 1180px) {
  .consultation-page .search-panel {
    grid-template-columns: 1fr;
  }

  .consultation-page-header .header-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 960px) {
  .consultation-workspace {
    padding: 1rem;
  }

  .consultation-page-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .consultation-page-header .header-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .consultation-hero {
    border-radius: 22px;
    padding: 1.35rem;
  }

  .consultation-page .search-panel {
    margin-top: 1.5rem;
  }

  .consultation-page .search-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .consultation-workspace {
    padding: 0.65rem;
  }

  .consultation-hero {
    border-radius: 18px;
    padding: 1.1rem;
  }

  .consultation-page-header .title-stack h1 {
    font-size: 2rem;
  }

  .consultation-page-header .title-stack p {
    font-size: 0.88rem;
  }

  .consultation-page .search-panel {
    border-radius: 16px;
    padding: 1rem;
  }

  .search-panel-copy h2 {
    font-size: 1.45rem;
  }
}

@media print {
  .consultation-hero {
    border: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .consultation-page-header .title-stack h1 {
    color: var(--ink) !important;
  }
}

/* Premium result hierarchy */
.results-overview-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0.25rem 0;
}

.results-overview-header.compact {
  padding-top: 0.9rem;
}

.results-overview-header .eyebrow {
  letter-spacing: 0.12em;
}

.results-overview-header h2 {
  margin: 0.35rem 0 0;
  color: #1b1830;
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.consultation-page .client-card {
  position: relative;
  grid-template-columns: 1.35fr 0.92fr 0.92fr;
  border: 0;
  background: #fff;
  box-shadow: 0 24px 60px rgba(31, 24, 70, 0.11);
}

.consultation-page .client-column {
  position: relative;
  padding: 1.55rem;
}

.consultation-page .client-column:first-child {
  background:
    radial-gradient(circle at 12% 8%, rgba(162, 133, 255, 0.28), transparent 14rem),
    linear-gradient(145deg, #28145c, #180d37 72%);
}

.consultation-page .client-column:nth-child(2) {
  background: radial-gradient(circle at 100% 0%, rgba(47, 179, 110, 0.08), transparent 14rem), #fff;
}

.consultation-page .client-column:nth-child(3) {
  background: radial-gradient(circle at 100% 0%, rgba(46, 111, 231, 0.09), transparent 14rem), #fff;
}

.consultation-page .client-column + .client-column {
  border-left-color: #ececf3;
}

.consultation-page .client-column:first-child .feature-icon {
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.1);
  color: #d6caff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.consultation-page .client-column:first-child .section-label {
  color: #cfc2ff;
  letter-spacing: 0.1em;
}

.consultation-page .client-column:first-child .company-name,
.consultation-page .client-column:first-child .client-meta dd {
  color: #fff;
}

.consultation-page .client-column:first-child .company-name {
  font-size: 1.12rem;
  letter-spacing: -0.015em;
}

.consultation-page .client-column:first-child .client-meta dt {
  color: rgba(255, 255, 255, 0.5);
}

.consultation-page .client-column:first-child .badge.success {
  background: rgba(88, 223, 153, 0.15);
  color: #91efbd;
}

.consultation-page .feature-icon {
  width: 3.65rem;
  height: 3.65rem;
  border-radius: 17px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.consultation-page .highlight-value {
  margin-top: 0.55rem;
  font-size: 1.45rem;
  letter-spacing: -0.025em;
}

.consultation-page .progress-track {
  height: 0.45rem;
  background: #edf0f5;
}

.consultation-page .contacts-panel {
  grid-template-columns: minmax(13rem, 0.66fr) minmax(0, 2.5fr);
  border: 0;
  background: #fff;
}

.consultation-page .contacts-heading {
  border-right-color: #e6e3f2;
  padding: 1.25rem 1.35rem;
  background:
    radial-gradient(circle at 0% 0%, rgba(108, 60, 240, 0.12), transparent 12rem),
    linear-gradient(145deg, #f8f6ff, #f3f1fb);
}

.consultation-page .contacts-icon {
  border: 1px solid rgba(108, 60, 240, 0.12);
  background: #fff;
  color: var(--purple);
  box-shadow: 0 10px 24px rgba(70, 45, 132, 0.1);
}

.consultation-page .contacts-grid {
  grid-template-columns: 1.05fr 1.4fr 0.9fr;
}

.consultation-page .contact-item {
  display: grid;
  align-content: center;
  padding: 1.2rem 1.35rem;
  background: linear-gradient(180deg, #fff, #fdfdff);
}

.consultation-page .contact-item dt {
  color: #999bad;
  letter-spacing: 0.06em;
}

.consultation-page .contact-item dd {
  color: #25213a;
  font-size: 0.92rem;
}

.consultation-page .offers-panel {
  border: 0;
  background: #fff;
}

.consultation-page .offers-toggle {
  min-height: 6rem;
  padding: 1.2rem 1.4rem;
  background:
    radial-gradient(circle at 4% 0%, rgba(108, 60, 240, 0.07), transparent 17rem),
    linear-gradient(180deg, #fff, #fdfcff);
}

.consultation-page .offers-toggle:hover {
  background:
    radial-gradient(circle at 4% 0%, rgba(108, 60, 240, 0.1), transparent 17rem),
    #fdfcff;
}

.consultation-page .offers-icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--purple), var(--purple-dark));
  color: #fff;
  box-shadow: 0 13px 26px rgba(90, 49, 201, 0.2);
}

.consultation-page .offers-title {
  font-size: 1.05rem;
}

.consultation-page .offers-toggle-action {
  border-radius: 999px;
  padding: 0.6rem 0.8rem;
  background: var(--purple-soft);
}

.consultation-page .offers-content {
  border-top-color: #eceaf4;
  background: #fdfcff;
}

.consultation-page .offer-item {
  padding: 1.35rem 1.4rem;
}

.consultation-page .offer-item dt {
  color: #9995aa;
  letter-spacing: 0.06em;
}

.consultation-page .offer-item dd {
  color: #211d35;
}

.consultation-page .kpi-grid {
  gap: 1.1rem;
}

.consultation-page .kpi-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 14rem;
  border: 0;
  padding: 1.4rem;
  background: #fff;
  box-shadow: 0 20px 50px rgba(31, 24, 70, 0.09);
}

.consultation-page .kpi-card::before {
  position: absolute;
  z-index: -1;
  top: -5rem;
  right: -4rem;
  width: 12rem;
  height: 12rem;
  border-radius: 999px;
  background: rgba(108, 60, 240, 0.075);
  content: "";
}

.consultation-page .kpi-card:nth-child(2)::before {
  background: rgba(46, 111, 231, 0.075);
}

.consultation-page .kpi-card:nth-child(3)::before {
  background: rgba(47, 179, 110, 0.08);
}

.consultation-page .kpi-card:nth-child(4)::before {
  background: rgba(119, 73, 226, 0.075);
}

.consultation-page .kpi-card:hover {
  box-shadow: 0 26px 60px rgba(31, 24, 70, 0.13);
}

.consultation-page .kpi-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 17px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.consultation-page .sparkline {
  opacity: 0.88;
}

.consultation-page .metric-label {
  margin-top: 1.15rem;
  color: #69667b;
  font-size: 0.76rem;
  letter-spacing: 0.03em;
}

.consultation-page .metric-value {
  margin-top: 0.45rem;
  color: #1b172e;
  font-size: 2.3rem;
  letter-spacing: -0.045em;
}

.consultation-page .kpi-card p {
  color: #77798c;
}

.consultation-page .detail-button {
  border: 0;
  background: var(--purple-soft);
  box-shadow: none;
}

.consultation-page .detail-button:hover:not(.disabled):not(:disabled) {
  background: #e8e0ff;
  box-shadow: none;
}

.consultation-page .mobile-panel {
  border: 0;
  padding: 1.55rem;
  background:
    radial-gradient(circle at 100% 0%, rgba(108, 60, 240, 0.08), transparent 26rem),
    linear-gradient(180deg, #fff, #fbfaff);
  box-shadow: 0 24px 60px rgba(31, 24, 70, 0.1);
}

.consultation-page .mobile-panel > .panel-title-row {
  border-bottom: 1px solid #eceaf3;
  padding-bottom: 1.15rem;
}

.consultation-page .mobile-panel .panel-title-row h2 {
  margin-top: 0.45rem;
  font-size: 1.45rem;
  letter-spacing: -0.025em;
}

.consultation-page .mobile-summary {
  gap: 1rem;
  margin-top: 1.25rem;
}

.consultation-page .mini-card {
  border: 1px solid rgba(225, 224, 235, 0.86);
  border-radius: 18px;
  padding: 1.15rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(31, 24, 70, 0.055);
}

.consultation-page .mini-icon {
  border-radius: 15px;
}

.consultation-page .mini-card strong {
  color: #211d35;
  font-size: 1.28rem;
  letter-spacing: -0.02em;
}

.consultation-page .fidelity-chart {
  margin-top: 1.25rem;
  border-color: rgba(225, 224, 235, 0.9);
  border-radius: 18px;
  padding: 1.35rem;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.consultation-page .chart-title h3 {
  font-size: 1.05rem;
}

.consultation-page .bar-track {
  height: 0.65rem;
  background: #ececf4;
}

@media (max-width: 1120px) {
  .consultation-page .client-card,
  .consultation-page .contacts-panel {
    grid-template-columns: 1fr;
  }

  .consultation-page .client-column + .client-column {
    border-top: 1px solid #ececf3;
    border-left: 0;
  }

  .consultation-page .contacts-heading {
    border-right: 0;
    border-bottom: 1px solid #e6e3f2;
  }
}

@media (max-width: 760px) {
  .results-overview-header {
    padding-inline: 0.1rem;
  }

  .consultation-page .client-column {
    padding: 1.3rem;
  }

  .consultation-page .contacts-grid,
  .consultation-page .mobile-summary {
    grid-template-columns: 1fr;
  }

  .consultation-page .contact-item + .contact-item {
    border-top: 1px solid #ececf3;
    border-left: 0;
  }

  .consultation-page .kpi-card {
    min-height: 12.5rem;
  }
}

@media print {
  .consultation-page .client-column:first-child,
  .consultation-page .kpi-card,
  .consultation-page .mobile-panel {
    background: #fff !important;
    box-shadow: none !important;
  }

  .consultation-page .client-column:first-child .company-name,
  .consultation-page .client-column:first-child .client-meta dd {
    color: var(--ink) !important;
  }

  .consultation-page .client-column:first-child .client-meta dt {
    color: var(--soft-muted) !important;
  }
}

/* Premium mobile and fixed detail experience */
body.detail-page {
  background:
    radial-gradient(circle at 72% 0%, rgba(122, 92, 246, 0.12), transparent 32rem),
    linear-gradient(180deg, #f8f8fc 0%, #f2f3f8 100%);
}

.detail-page .sidebar {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 12% 8%, rgba(150, 115, 255, 0.26), transparent 17rem),
    radial-gradient(circle at 96% 82%, rgba(97, 53, 218, 0.35), transparent 20rem),
    linear-gradient(180deg, #160d35 0%, #21104d 52%, #2f126f 100%);
  box-shadow: 18px 0 60px rgba(24, 12, 55, 0.18);
}

.detail-page .nav-item {
  min-height: 3rem;
  border-radius: 12px;
}

.detail-page .nav-item.active {
  border-color: rgba(255, 255, 255, 0.16);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 30px rgba(12, 5, 38, 0.12);
}

.detail-workspace {
  gap: 1.15rem;
  padding: 1.5rem 2rem 2rem;
}

.detail-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  padding: clamp(1.6rem, 3vw, 2.4rem);
  background:
    linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    radial-gradient(circle at 8% 4%, rgba(161, 132, 255, 0.28), transparent 25rem),
    radial-gradient(circle at 94% 84%, rgba(112, 66, 231, 0.36), transparent 26rem),
    linear-gradient(145deg, #1f1049 0%, #120b2b 58%, #0b0918 100%);
  background-size: 40px 40px, 40px 40px, auto, auto, auto;
  box-shadow: 0 30px 75px rgba(26, 16, 61, 0.2);
}

.detail-hero::before {
  position: absolute;
  z-index: -1;
  right: -10rem;
  bottom: -13rem;
  width: 28rem;
  height: 28rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  content: "";
  box-shadow:
    0 0 0 4rem rgba(255, 255, 255, 0.018),
    0 0 0 8rem rgba(255, 255, 255, 0.012);
}

.detail-page-header {
  position: relative;
  z-index: 1;
  align-items: flex-start;
  min-height: 0;
}

.detail-page-header .eyebrow {
  color: #cfc2ff;
  letter-spacing: 0.14em;
}

.detail-page-header .title-stack h1 {
  margin-top: 0.55rem;
  color: #fff;
  font-size: clamp(2.15rem, 4vw, 3.1rem);
  letter-spacing: -0.05em;
  line-height: 1;
}

.detail-page-header .title-stack p {
  max-width: 38rem;
  color: rgba(255, 255, 255, 0.64);
  line-height: 1.65;
}

.detail-page-header .back-link {
  min-height: 2.85rem;
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  box-shadow: none;
  backdrop-filter: blur(12px);
}

.detail-page-header .back-link:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.detail-page .detail-client {
  position: relative;
  z-index: 1;
  grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.72fr);
  margin-top: 2rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 21px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 55px rgba(3, 2, 13, 0.22);
  backdrop-filter: blur(18px);
}

.detail-page .detail-client:hover {
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 24px 55px rgba(3, 2, 13, 0.22);
  transform: none;
}

.detail-page .detail-client .client-column {
  align-items: center;
  padding: 1.35rem 1.5rem;
}

.detail-page .detail-client .client-column:first-child {
  background: linear-gradient(145deg, #fff, #fbfaff);
}

.detail-page .detail-client .client-column:nth-child(2) {
  background:
    radial-gradient(circle at 100% 0%, rgba(46, 111, 231, 0.09), transparent 14rem),
    #fff;
}

.detail-page .detail-client .client-column + .client-column {
  border-left-color: #e8e6ef;
}

.detail-page .detail-client .feature-icon {
  width: 3.7rem;
  height: 3.7rem;
  border-radius: 17px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.detail-page .detail-client .company-name {
  font-size: 1.12rem;
  letter-spacing: -0.015em;
}

.detail-page .detail-client .highlight-value {
  margin-top: 0.5rem;
  font-size: 1.3rem;
  letter-spacing: -0.025em;
}

.detail-content-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.25rem 0;
}

.detail-content-header .eyebrow {
  letter-spacing: 0.12em;
}

.detail-content-header h2 {
  margin: 0.35rem 0 0;
  color: #1b1830;
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.detail-item-count {
  display: inline-flex;
  align-items: center;
  min-height: 2.3rem;
  border: 1px solid rgba(108, 60, 240, 0.12);
  border-radius: 999px;
  padding: 0 0.85rem;
  background: #eee9ff;
  color: var(--purple-dark);
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.detail-page .detail-panel {
  border: 0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(31, 24, 70, 0.1);
}

.detail-page .detail-panel:hover {
  border-color: transparent;
  box-shadow: 0 24px 60px rgba(31, 24, 70, 0.1);
  transform: none;
}

.detail-page .empty-state {
  margin: 1rem;
  border-color: rgba(108, 60, 240, 0.22);
  border-radius: 16px;
  background: linear-gradient(145deg, #fbfaff, #f7f5ff);
}

.detail-page .detail-table {
  border-collapse: separate;
  border-spacing: 0;
  color: #29253d;
  font-size: 0.88rem;
}

.detail-page .detail-table thead {
  background: linear-gradient(180deg, #f7f5fc, #f1eff7);
}

.detail-page .detail-table th,
.detail-page .detail-table td {
  border-bottom-color: #ececf3;
  padding: 1rem 1.05rem;
}

.detail-page .detail-table th {
  color: #777488;
  font-size: 0.7rem;
  letter-spacing: 0.055em;
}

.detail-page .detail-table tbody tr:nth-child(even):not(.mobile-offer-row) {
  background: #fcfcfe;
}

.detail-page .detail-table tbody tr:hover:not(.mobile-offer-row) {
  background: #f8f6ff;
}

.detail-page .detail-table td:first-child {
  color: #211d35;
  font-weight: 750;
}

.detail-page .mobile-detail-toolbar {
  min-height: 4.7rem;
  border-bottom-color: #e8e5f1;
  padding: 0.9rem 1.1rem;
  background:
    radial-gradient(circle at 0% 0%, rgba(108, 60, 240, 0.09), transparent 15rem),
    linear-gradient(180deg, #fbfaff, #f7f5fc);
}

.detail-page .mobile-detail-toolbar > span {
  color: #4d4862;
  font-size: 0.82rem;
}

.detail-page .mobile-offers-all-toggle {
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  color: #fff;
  box-shadow: 0 12px 24px rgba(90, 49, 201, 0.2);
}

.detail-page .mobile-offers-all-toggle:hover {
  border-color: transparent;
  box-shadow: 0 15px 28px rgba(90, 49, 201, 0.25);
}

.detail-page .mobile-line-offers-toggle {
  border: 0;
  border-radius: 10px;
  background: var(--purple-soft);
}

.detail-page .mobile-line-offers-toggle:hover {
  border-color: transparent;
  background: #e8e0ff;
  box-shadow: none;
}

.detail-page .mobile-offer-row > td {
  border-bottom-color: rgba(108, 60, 240, 0.16);
  background: #f9f7ff;
}

.detail-page .mobile-line-offers-panel {
  padding: 1.2rem;
}

.detail-page .mobile-offer-table {
  overflow: hidden;
  border-color: #e6e2f0;
  border-radius: 14px;
}

.detail-page .account-block {
  border: 0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(31, 24, 70, 0.08);
}

.detail-page .account-block + .account-block {
  margin-top: 1.25rem;
}

.detail-page .account-header {
  grid-template-columns: 1.4fr 0.6fr 0.8fr;
  gap: 1rem;
  border-bottom: 0;
  padding: 1.25rem 1.35rem;
  background:
    radial-gradient(circle at 4% 0%, rgba(156, 127, 255, 0.23), transparent 18rem),
    linear-gradient(145deg, #28145c, #170d35 72%);
}

.detail-page .account-header.has-offers {
  grid-template-columns: 1.4fr 0.55fr 0.75fr auto;
}

.detail-page .account-header span {
  color: #cfc2ff;
  letter-spacing: 0.065em;
}

.detail-page .account-header strong {
  color: #fff;
  font-size: 1.05rem;
}

.detail-page .account-address {
  color: rgba(255, 255, 255, 0.58);
}

.detail-page .account-offers-toggle {
  border-color: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: none;
}

.detail-page .account-offers-toggle:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: none;
}

.detail-page .account-block > .detail-table thead {
  background: #f5f3f9;
}

.detail-page .account-offers-panel {
  border-top-color: #e6e1f0;
  padding: 1.2rem;
  background: #f9f7ff;
}

.detail-page .offer-table {
  overflow: hidden;
  border-color: #e4dfed;
  border-radius: 14px;
}

@media (max-width: 960px) {
  .detail-workspace {
    padding: 1rem;
  }

  .detail-page-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .detail-page-header .header-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .detail-page .detail-client {
    grid-template-columns: 1fr;
  }

  .detail-page .detail-client .client-column + .client-column {
    border-top: 1px solid #e8e6ef;
    border-left: 0;
  }
}

@media (max-width: 760px) {
  .detail-hero {
    border-radius: 22px;
    padding: 1.35rem;
  }

  .detail-page .detail-client {
    margin-top: 1.5rem;
    border-radius: 17px;
  }

  .detail-page .detail-client .client-column {
    align-items: flex-start;
    padding: 1.25rem;
  }

  .detail-content-header {
    align-items: flex-start;
    padding-inline: 0.1rem;
  }

  .detail-page .account-header,
  .detail-page .account-header.has-offers {
    grid-template-columns: 1fr;
  }

  .detail-page .account-offers-action {
    justify-content: flex-start;
  }

  .detail-page .mobile-detail-toolbar {
    align-items: stretch;
  }
}

@media (max-width: 520px) {
  .detail-workspace {
    padding: 0.65rem;
  }

  .detail-hero {
    border-radius: 18px;
    padding: 1.1rem;
  }

  .detail-page-header .title-stack h1 {
    font-size: 2rem;
  }

  .detail-page-header .title-stack p {
    font-size: 0.88rem;
  }

  .detail-content-header {
    flex-direction: column;
  }
}

@media print {
  .detail-hero,
  .detail-page .account-header {
    border: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  .detail-page-header .title-stack h1,
  .detail-page .account-header strong {
    color: var(--ink) !important;
  }

  .detail-page .account-header span,
  .detail-page .account-address {
    color: var(--soft-muted) !important;
  }
}

/* Premium recommendations grid */
.consultation-page .offers-panel.is-expanded {
  box-shadow: 0 26px 65px rgba(31, 24, 70, 0.13);
}

.consultation-page .offers-panel.is-expanded .offers-toggle {
  border-bottom: 1px solid #ebe7f3;
}

.consultation-page .offers-panel.has-opportunities .offers-subtitle {
  color: #6e6486;
}

.consultation-page .offers-panel.has-opportunities .offers-subtitle::before {
  display: inline-block;
  width: 0.42rem;
  height: 0.42rem;
  margin-right: 0.45rem;
  border-radius: 999px;
  background: #39bd84;
  box-shadow: 0 0 0 3px rgba(57, 189, 132, 0.1);
  content: "";
  vertical-align: 0.05rem;
}

.consultation-page .offers-panel.is-expanded .offers-toggle-action {
  background: #e9e2ff;
}

.consultation-page .offers-content {
  padding: 1.15rem;
  background:
    radial-gradient(circle at 4% 0%, rgba(108, 60, 240, 0.07), transparent 18rem),
    linear-gradient(180deg, #faf9fd, #f6f5fa);
}

.consultation-page .offers-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.consultation-page .offer-item {
  --offer-accent: #6c3cf0;
  --offer-soft: rgba(108, 60, 240, 0.09);
  position: relative;
  isolation: isolate;
  min-height: 8.5rem;
  overflow: hidden;
  border: 1px solid rgba(222, 220, 232, 0.86);
  border-radius: 16px;
  padding: 1.15rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 28px rgba(31, 24, 70, 0.055);
  transition:
    border-color 220ms ease,
    box-shadow 220ms ease,
    transform 220ms ease;
}

.consultation-page .offer-item + .offer-item,
.consultation-page .offer-item:nth-child(3n + 1),
.consultation-page .offer-item:nth-child(n + 4) {
  border-top: 1px solid rgba(222, 220, 232, 0.86);
  border-left: 1px solid rgba(222, 220, 232, 0.86);
}

.consultation-page .offer-item::before {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--offer-accent);
  content: "";
}

.consultation-page .offer-item::after {
  position: absolute;
  z-index: -1;
  top: -3.5rem;
  right: -3.5rem;
  width: 8rem;
  height: 8rem;
  border-radius: 999px;
  background: var(--offer-soft);
  content: "";
}

.consultation-page .offer-item:nth-child(2),
.consultation-page .offer-item:nth-child(6) {
  --offer-accent: #2e6fe7;
  --offer-soft: rgba(46, 111, 231, 0.09);
}

.consultation-page .offer-item:nth-child(3),
.consultation-page .offer-item:nth-child(7) {
  --offer-accent: #20a86b;
  --offer-soft: rgba(32, 168, 107, 0.09);
}

.consultation-page .offer-item:nth-child(4),
.consultation-page .offer-item:nth-child(8) {
  --offer-accent: #d48a24;
  --offer-soft: rgba(212, 138, 36, 0.09);
}

.consultation-page .offer-item:hover {
  border-color: color-mix(in srgb, var(--offer-accent) 26%, #dedce8);
  box-shadow: 0 17px 34px rgba(31, 24, 70, 0.09);
  transform: translateY(-2px);
}

.consultation-page .offer-item dt {
  position: relative;
  z-index: 1;
  display: inline-flex;
  min-height: 1.7rem;
  align-items: center;
  border-radius: 999px;
  padding: 0 0.65rem;
  background: var(--offer-soft);
  color: var(--offer-accent);
  font-size: 0.66rem;
  letter-spacing: 0.07em;
}

.consultation-page .offer-item dd {
  position: relative;
  z-index: 1;
  margin-top: 0.8rem;
  color: #211d35;
  font-size: 0.91rem;
  font-weight: 760;
  line-height: 1.55;
}

.consultation-page .offer-item.is-empty {
  --offer-accent: #a6a8b5;
  --offer-soft: rgba(145, 147, 161, 0.08);
  border-style: dashed;
  box-shadow: none;
}

.consultation-page .offer-item.is-empty dd {
  color: #a0a1ad;
  font-size: 0.82rem;
  font-weight: 650;
}

.consultation-page .offer-item.is-empty:hover {
  border-color: rgba(166, 168, 181, 0.45);
  box-shadow: none;
  transform: none;
}

@media (max-width: 1180px) {
  .consultation-page .offers-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .consultation-page .offers-content {
    padding: 0.9rem;
  }

  .consultation-page .offers-grid {
    grid-template-columns: 1fr;
  }

  .consultation-page .offer-item {
    min-height: 0;
  }
}

@media print {
  .consultation-page .offers-content {
    padding: 0 !important;
    background: #fff !important;
  }

  .consultation-page .offers-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 0.4rem !important;
  }

  .consultation-page .offer-item {
    min-height: 0 !important;
    break-inside: avoid;
    box-shadow: none !important;
  }
}

/* Premium reports experience */
.reports-page {
  background:
    radial-gradient(circle at 82% 6%, rgba(102, 73, 230, 0.14), transparent 30rem),
    radial-gradient(circle at 45% 42%, rgba(37, 99, 235, 0.06), transparent 28rem),
    #f4f5fa;
}

.reports-workspace {
  gap: 1.15rem;
  padding: 1.5rem 2rem 2.5rem;
}

.reports-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  padding: 2rem 2.15rem;
  background:
    radial-gradient(circle at 88% 14%, rgba(130, 99, 255, 0.46), transparent 18rem),
    radial-gradient(circle at 52% 130%, rgba(37, 99, 235, 0.3), transparent 24rem),
    linear-gradient(132deg, #171036 0%, #291461 52%, #4930b6 100%);
  box-shadow: 0 28px 70px rgba(35, 20, 90, 0.22);
}

.reports-hero::before,
.reports-hero::after {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  content: "";
  pointer-events: none;
}

.reports-hero::before {
  top: -8rem;
  right: 8%;
  width: 21rem;
  height: 21rem;
}

.reports-hero::after {
  right: -4rem;
  bottom: -9rem;
  width: 18rem;
  height: 18rem;
}

.reports-page-header {
  position: relative;
  z-index: 1;
  min-height: 0;
  align-items: center;
}

.reports-page-header .title-stack {
  max-width: 50rem;
}

.reports-page-header .eyebrow {
  color: #bdafff;
  letter-spacing: 0.09em;
}

.reports-page-header .title-stack h1 {
  margin-top: 0.55rem;
  color: #fff;
  font-size: clamp(2rem, 3vw, 3.15rem);
  letter-spacing: -0.045em;
}

.reports-page-header .title-stack p {
  max-width: 48rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.98rem;
  line-height: 1.65;
}

.reports-live-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  padding: 0.45rem 0.72rem;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.72rem;
  font-weight: 750;
  backdrop-filter: blur(12px);
}

.reports-live-status i {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: #6ee7b7;
  box-shadow: 0 0 0 5px rgba(110, 231, 183, 0.12);
}

.reports-refresh-button {
  min-height: 3rem;
  border-color: rgba(255, 255, 255, 0.18);
  padding: 0 1.2rem;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  backdrop-filter: blur(14px);
}

.reports-refresh-button:hover {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.reports-page .dashboard-card {
  border-color: rgba(223, 225, 238, 0.9);
  border-radius: 22px;
  box-shadow: 0 14px 40px rgba(37, 28, 75, 0.07);
}

.reports-page .dashboard-card:hover {
  border-color: rgba(108, 60, 240, 0.18);
  box-shadow: 0 20px 52px rgba(37, 28, 75, 0.11);
}

.reports-page .report-filter-panel {
  grid-template-columns: minmax(260px, 1.25fr) repeat(3, minmax(170px, 0.9fr)) auto;
  gap: 1.1rem;
  align-items: center;
  padding: 1.1rem 1.25rem;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
}

.reports-page .report-filter-heading {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.report-filter-icon {
  position: relative;
  display: block;
  width: 3rem;
  height: 3rem;
  flex: 0 0 auto;
  border-radius: 14px;
  background: linear-gradient(145deg, #7652f3, #4a26bd);
  box-shadow: 0 10px 24px rgba(91, 54, 205, 0.24);
}

.report-filter-icon::before,
.report-filter-icon::after {
  position: absolute;
  left: 0.8rem;
  width: 1.4rem;
  height: 0.18rem;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0.48rem 0 rgba(255, 255, 255, 0.78), 0 0.96rem 0 rgba(255, 255, 255, 0.58);
  content: "";
}

.report-filter-icon::before {
  top: 0.9rem;
}

.report-filter-icon::after {
  top: 0.83rem;
  left: 1.55rem;
  width: 0.25rem;
  height: 0.32rem;
  background: #dcd5ff;
  box-shadow: -0.55rem 0.48rem 0 #dcd5ff, -0.15rem 0.96rem 0 #dcd5ff;
}

.reports-page .report-filter-heading h2 {
  font-size: 1rem;
}

.reports-page .report-filter-heading p {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

.reports-page .report-filter-control {
  gap: 0.55rem;
}

.reports-page .report-filter-panel select {
  min-height: 3rem;
  border-color: #e2e4ee;
  border-radius: 13px;
  padding: 0 2.5rem 0 0.9rem;
  background-color: #fafaff;
  color: #24233a;
  box-shadow: inset 0 1px 1px rgba(17, 18, 53, 0.02);
}

.reports-page #reportsClearFiltersButton {
  min-height: 3rem;
  border-color: rgba(108, 60, 240, 0.16);
  background: var(--purple-soft);
  color: var(--purple-dark);
}

.reports-page .reports-summary-grid {
  gap: 1.1rem;
}

.reports-page .report-summary-card {
  --summary-accent: #6c3cf0;
  --summary-soft: #f2edff;
  position: relative;
  align-content: start;
  gap: 0.75rem;
  min-height: 11.5rem;
  overflow: hidden;
  padding: 1.25rem 1.3rem 1.15rem;
  background:
    radial-gradient(circle at 100% 0%, var(--summary-soft), transparent 9rem),
    rgba(255, 255, 255, 0.96);
}

.reports-page .report-summary-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--summary-accent), transparent 84%);
  content: "";
}

.reports-page .summary-month {
  --summary-accent: #2563eb;
  --summary-soft: #eaf1ff;
}

.reports-page .summary-clients {
  --summary-accent: #0891b2;
  --summary-soft: #e6f8fb;
}

.reports-page .summary-adoption {
  --summary-accent: #059669;
  --summary-soft: #e8f8f1;
}

.report-summary-top,
.report-summary-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.report-summary-icon {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border-radius: 12px;
  background: var(--summary-soft);
  color: var(--summary-accent);
  font-size: 0.72rem;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--summary-accent) 12%, transparent);
}

.reports-page .report-summary-period {
  color: #85899c;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reports-page .report-summary-copy {
  align-items: end;
}

.reports-page .report-summary-copy > span {
  max-width: 8.5rem;
  color: #555b71;
  font-size: 0.72rem;
  line-height: 1.35;
}

.reports-page .report-summary-copy strong {
  color: #17152c;
  font-size: clamp(2rem, 2.6vw, 2.65rem);
  letter-spacing: -0.06em;
}

.reports-page .report-summary-card p {
  margin: auto 0 0;
  color: #898da0;
  font-size: 0.7rem;
  line-height: 1.45;
}

.report-adoption-track {
  height: 0.38rem;
  margin-top: auto;
  overflow: hidden;
  border-radius: 999px;
  background: #e8ebe9;
}

.report-adoption-track span {
  display: block;
  width: var(--adoption-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #34d399, #059669);
  transition: width 450ms ease;
}

.reports-page .reports-analytics-grid {
  gap: 1.1rem;
}

.reports-page .analytics-card {
  position: relative;
  overflow: hidden;
  padding: 1.45rem 1.5rem 1.25rem;
}

.reports-page .analytics-card .panel-title-row {
  align-items: flex-start;
}

.reports-page .analytics-card .panel-title-row h2,
.reports-page .reports-ranking-panel .panel-title-row h2 {
  margin-top: 0.32rem;
  font-size: 1.12rem;
  letter-spacing: -0.025em;
}

.reports-page .analytics-card .panel-title-row p,
.reports-page .reports-ranking-panel .panel-title-row p {
  margin: 0.38rem 0 0;
  color: #7b8092;
  font-size: 0.76rem;
  line-height: 1.5;
}

.analytics-card-mark {
  display: grid;
  width: 2.8rem;
  height: 2.8rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(108, 60, 240, 0.1);
  border-radius: 13px;
  background: var(--purple-soft);
  color: var(--purple-dark);
  font-size: 0.72rem;
  font-weight: 900;
}

.reports-page .bar-chart {
  position: relative;
  height: 245px;
  margin-top: 1.1rem;
  border-bottom: 0;
  border-radius: 16px;
  padding: 1.7rem 0.85rem 0.35rem;
  background:
    repeating-linear-gradient(to bottom, transparent 0, transparent calc(25% - 1px), rgba(99, 102, 133, 0.08) 25%);
}

.reports-page .bar-column {
  grid-template-rows: 1.15rem minmax(4px, 1fr) 1.55rem;
}

.reports-page .bar-column strong {
  color: #60657a;
  font-size: 0.64rem;
  font-variant-numeric: tabular-nums;
}

.reports-page .bar-fill {
  width: min(26px, 66%);
  min-height: 4px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, #8a6cff 0%, #633ce9 50%, #3159dc 100%);
  box-shadow: 0 7px 14px rgba(78, 51, 194, 0.18);
}

.reports-page .bar-column:hover .bar-fill {
  filter: saturate(1.15) brightness(1.03);
  transform: translateY(-2px);
}

.reports-page .bar-column small {
  color: #8d91a2;
  font-size: 0.62rem;
  font-weight: 700;
}

.reports-page .report-list {
  gap: 0.6rem;
  margin-top: 1.15rem;
}

.reports-page .report-list-row {
  min-height: 4.15rem;
  border: 1px solid #ececf4;
  border-radius: 14px;
  padding: 0.72rem 0.8rem;
  background: linear-gradient(135deg, #fff, #fafaff);
}

.reports-page .report-list-row:hover {
  border-color: rgba(108, 60, 240, 0.18);
  background: #fff;
  box-shadow: 0 9px 24px rgba(42, 31, 88, 0.07);
  transform: translateY(-1px);
}

.reports-page .list-position {
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(108, 60, 240, 0.1);
  background: linear-gradient(145deg, #f6f2ff, #ebe4ff);
  font-size: 0.74rem;
}

.reports-page .report-list-row strong {
  font-size: 0.82rem;
}

.reports-page .report-list-row b {
  border-radius: 999px;
  padding: 0.42rem 0.62rem;
  background: var(--purple-soft);
  font-size: 0.7rem;
}

.reports-page .reports-ranking-panel {
  overflow: hidden;
  padding: 1.5rem;
}

.reports-page #reportsGeneratedAt {
  border: 1px solid #e5e6ee;
  padding: 0.5rem 0.72rem;
  background: #f8f8fc;
  color: #666b7e;
  font-size: 0.68rem;
}

.reports-page .admin-table-wrap {
  margin-top: 1.2rem;
  border: 1px solid #e8e9f1;
  border-radius: 16px;
  background: #fff;
}

.reports-page .reports-table {
  min-width: 1080px;
  border-collapse: separate;
  border-spacing: 0;
}

.reports-page .reports-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid #e7e8f0;
  padding-top: 0.82rem;
  padding-bottom: 0.82rem;
  background: #f7f7fb;
  color: #6c7184;
  font-size: 0.65rem;
  letter-spacing: 0.055em;
}

.reports-page .reports-table tbody td {
  border-bottom-color: #eeeef4;
  padding-top: 0.95rem;
  padding-bottom: 0.95rem;
  color: #454a5f;
  font-size: 0.77rem;
}

.reports-page .reports-table tbody tr:last-child td {
  border-bottom: 0;
}

.reports-page .reports-table tbody tr:hover td {
  background: #faf9ff;
}

.reports-page .reports-table .ranking-position {
  color: var(--purple-dark);
  font-size: 0.9rem;
}

@media (max-width: 1180px) {
  .reports-page .report-filter-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reports-page .report-filter-heading {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .reports-workspace {
    gap: 0.9rem;
    padding: 0.9rem;
  }

  .reports-hero {
    border-radius: 22px;
    padding: 1.25rem;
  }

  .reports-page-header {
    gap: 1rem;
  }

  .reports-page-header .sidebar-toggle {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    box-shadow: none;
  }

  .reports-page-header .title-stack h1 {
    font-size: 2rem;
  }

  .reports-page-header .header-actions,
  .reports-refresh-button {
    width: 100%;
  }

  .reports-page .report-filter-panel {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .reports-page .report-filter-heading {
    grid-column: auto;
  }

  .reports-page .report-summary-card {
    min-height: 10.5rem;
  }

  .reports-page .analytics-card,
  .reports-page .reports-ranking-panel {
    padding: 1.1rem;
  }

  .reports-page .bar-chart {
    height: 210px;
    padding-right: 0.35rem;
    padding-left: 0.35rem;
  }

  .reports-page .bar-chart:not(.compact) .bar-column:nth-child(even) small,
  .reports-page .bar-chart.compact .bar-column:nth-child(odd) small {
    visibility: hidden;
  }

  .reports-page .report-list-row {
    grid-template-columns: 2rem minmax(0, 1fr);
  }

  .reports-page .report-list-row b {
    grid-column: 2;
    justify-self: start;
  }

  .reports-page .reports-ranking-panel .panel-title-row {
    align-items: flex-start;
    flex-direction: column;
  }
}
