:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #eef4f8;
  --text: #17202a;
  --muted: #657384;
  --line: #dbe3ec;
  --primary: #1769aa;
  --primary-strong: #0f4f83;
  --accent: #18a999;
  --warning: #f6b73c;
  --danger: #c84646;
  --shadow: 0 22px 60px rgba(25, 41, 61, 0.12);
  --radius: 8px;
}

:root[data-theme="dark"] {
  --bg: #0f1720;
  --surface: #182333;
  --surface-soft: #223044;
  --text: #edf4fb;
  --muted: #a9b7c7;
  --line: #2d3d52;
  --primary: #61a8ff;
  --primary-strong: #9ecbff;
  --accent: #23c7b7;
  --warning: #f2b84b;
  --danger: #ff7777;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  isolation: isolate;
  font-family: "Heebo", "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(23, 105, 170, 0.1), transparent 34%),
    linear-gradient(315deg, rgba(24, 169, 153, 0.12), transparent 28%),
    var(--bg);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

body::before {
  background: url("/assets/everest-background.svg") center bottom / cover no-repeat;
  opacity: 0.52;
  transform: scale(1.04);
  transform-origin: center bottom;
  animation: everest-breath 14s ease-in-out infinite alternate;
}

body::after {
  background:
    radial-gradient(ellipse at 18% 24%, rgba(255, 255, 255, 0.58) 0 8%, transparent 18%),
    radial-gradient(ellipse at 72% 18%, rgba(255, 255, 255, 0.45) 0 10%, transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 54%);
  opacity: 0.72;
  animation: everest-cloud-drift 22s linear infinite;
}

body > * {
  position: relative;
  z-index: 1;
}

:root[data-theme="dark"] body {
  background:
    linear-gradient(135deg, rgba(97, 168, 255, 0.12), transparent 34%),
    linear-gradient(315deg, rgba(35, 199, 183, 0.1), transparent 28%),
    var(--bg);
}

:root[data-theme="dark"] body::before {
  opacity: 0.34;
  filter: saturate(0.9) brightness(0.78);
}

:root[data-theme="dark"] body::after {
  opacity: 0.38;
}

@keyframes everest-breath {
  from {
    transform: scale(1.04) translate3d(-10px, 0, 0);
  }

  to {
    transform: scale(1.1) translate3d(14px, -26px, 0);
  }
}

@keyframes everest-cloud-drift {
  from {
    background-position: 0 0, 0 0, 0 0;
  }

  to {
    background-position: 280px 0, -340px 0, 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after {
    animation: none;
  }
}

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

button {
  font: inherit;
}

.login-page {
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.login-shell,
.app-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.login-shell {
  display: block;
  max-width: 760px;
}

.login-hero,
.login-panel,
.hero-section,
.panel,
.data-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow);
}

.login-hero {
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 6vw, 64px);
}

.brand-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.15rem;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 800;
}

.eyebrow {
  margin: 36px 0 10px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 12ch;
  margin-bottom: 18px;
  font-size: clamp(2.4rem, 7vw, 5rem);
  line-height: 0.98;
}

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

.lead {
  max-width: 58ch;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.8;
}

.google-button,
.small-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.google-button {
  width: fit-content;
  min-height: 54px;
  gap: 12px;
  padding: 0 22px;
  color: #fff;
  background: var(--primary);
  font-weight: 800;
  box-shadow: 0 16px 32px rgba(23, 105, 170, 0.26);
}

.google-button:hover,
.small-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.google-button.is-disabled {
  pointer-events: none;
  opacity: 0.5;
}

.google-icon {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: var(--primary);
  background: #fff;
  font-weight: 800;
}

.notice {
  max-width: 680px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #c9d8e6;
  border-radius: var(--radius);
  color: #254864;
  background: #edf6ff;
  line-height: 1.6;
}

.notice-error {
  border-color: #ecc5c5;
  color: #813333;
  background: #fff1f1;
}

.login-panel {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: clamp(24px, 5vw, 40px);
  color: #fff;
  background:
    linear-gradient(160deg, rgba(15, 79, 131, 0.96), rgba(18, 71, 94, 0.96)),
    var(--primary-strong);
}

.status-card {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
}

.status-card p,
.status-card small {
  color: rgba(255, 255, 255, 0.72);
}

.status-card strong {
  display: block;
  direction: ltr;
  text-align: right;
  font-size: 1.35rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(24, 169, 153, 0.16);
}

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

.metric-grid div {
  min-height: 96px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.metric-grid strong,
.metric-grid span {
  display: block;
}

.metric-grid span {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.7);
}

.app-shell {
  padding: 24px 16px 48px;
}

.sheet-app-shell {
  width: min(1480px, 100%);
}

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

.user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
}

.user-menu img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

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

.user-menu span {
  direction: ltr;
  color: var(--muted);
  font-size: 0.9rem;
}

.icon-button {
  width: 42px;
  height: 42px;
  border-color: var(--line);
  color: var(--primary);
  background: var(--surface);
  font-size: 1.3rem;
}

.theme-toggle {
  color: var(--warning);
  line-height: 1;
  font-size: 1.15rem;
}

.sales-period-settings {
  position: relative;
}

.sales-period-settings-toggle {
  color: var(--muted);
  line-height: 1;
  font-size: 1.15rem;
}

.sales-period-settings-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 30;
  width: min(280px, calc(100vw - 24px));
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.sales-period-settings-menu[hidden] {
  display: none;
}

.sales-period-settings-menu strong {
  font-size: 0.92rem;
}

.sales-period-settings-menu label {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
}

.sales-period-settings-menu input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.sales-period-settings-menu .small-button {
  width: 100%;
  min-height: 36px;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 24px;
  align-items: end;
  padding: clamp(24px, 5vw, 48px);
  margin-bottom: 18px;
}

.hero-section h1 {
  max-width: 13ch;
  margin-bottom: 14px;
}

.access-card {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.access-card strong,
.access-card small {
  display: block;
  direction: ltr;
  text-align: right;
}

.access-card small {
  margin-top: 10px;
  color: var(--muted);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.data-card {
  padding: 22px;
}

.data-card span,
.data-card p {
  color: var(--muted);
}

.data-card strong {
  display: block;
  margin: 10px 0;
  font-size: 2rem;
}

.data-card p {
  margin-bottom: 0;
  line-height: 1.55;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
  gap: 16px;
}

.panel {
  padding: 22px;
}

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

.section-title .eyebrow {
  margin-top: 0;
}

.small-button {
  min-height: 40px;
  padding: 0 14px;
  border-color: var(--line);
  color: var(--primary);
  background: var(--surface);
  font-weight: 700;
}

.dollars-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dollars-title-row h2 {
  margin: 0;
}

.dollars-refresh-button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.82rem;
}

.task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  position: relative;
  z-index: 1;
}

.task-actions > .small-button {
  flex: 0 0 auto;
}

.chart {
  height: 280px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

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

.sales-traffic-grid,
.task-traffic-grid {
  margin-top: 0;
}

.bar {
  min-height: 18px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--accent), var(--primary));
  position: relative;
}

.bar span {
  position: absolute;
  right: 50%;
  bottom: -28px;
  transform: translateX(50%);
  color: var(--muted);
  font-size: 0.78rem;
}

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

.source-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.source-list li:last-child {
  border-bottom: 0;
}

.sheet-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, auto);
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow);
}

.sheet-toolbar .eyebrow {
  margin-top: 0;
}

.sheet-toolbar h1 {
  max-width: none;
  margin-bottom: 8px;
  font-size: clamp(2rem, 5vw, 3.8rem);
}

.dashboard-tabs-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "tabs"
    "content";
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.dashboard-tabs {
  grid-area: tabs;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  box-shadow: var(--shadow);
}

.dashboard-tab {
  position: relative;
  overflow: hidden;
  flex: 1 1 118px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.dashboard-tab::before {
  content: "";
  position: absolute;
  inset: -35% -65%;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 35%, rgba(255, 255, 255, 0.72) 50%, transparent 65%);
  transform: translateX(42%);
}

.dashboard-tab:hover,
.dashboard-tab:focus-visible {
  color: var(--text);
  outline: none;
  transform: translateY(-1px);
}

.dashboard-tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 14px 28px rgba(23, 105, 170, 0.24);
}

.dashboard-tab.is-animating {
  animation: dashboard-tab-pop 0.48s cubic-bezier(0.2, 1.4, 0.35, 1);
}

.dashboard-tab.is-animating::before {
  animation: dashboard-tab-sheen 0.62s ease-out;
}

.dashboard-tab-panel {
  grid-area: content;
  display: grid;
  min-width: 0;
  gap: 18px;
}

.dashboard-tab-panel.is-entering {
  animation: dashboard-panel-arrive 0.46s cubic-bezier(0.18, 0.9, 0.22, 1);
}

.dashboard-tab-panel[hidden] {
  display: none;
}

@keyframes dashboard-tab-pop {
  0% {
    transform: translateX(0) scale(0.98);
  }
  58% {
    transform: translateX(-4px) scale(1.035);
  }
  100% {
    transform: translateX(0) scale(1);
  }
}

@keyframes dashboard-tab-sheen {
  0% {
    opacity: 0;
    transform: translateX(48%);
  }
  20% {
    opacity: 0.72;
  }
  100% {
    opacity: 0;
    transform: translateX(-48%);
  }
}

@keyframes dashboard-panel-arrive {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    filter: blur(8px);
  }
  62% {
    opacity: 1;
    transform: translateY(-2px) scale(1.006);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-tab,
  .dashboard-tab::before,
  .dashboard-tab-panel,
  .personal-inner-tab,
  .personal-inner-tab::before,
  .personal-inner-panel {
    animation: none !important;
    transition: none !important;
  }
}

.placeholder-panel {
  min-height: 260px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow);
}

.personal-area-panel {
  display: grid;
  gap: 16px;
}

.personal-inner-tabs {
  display: inline-flex;
  width: fit-content;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.personal-inner-tab {
  position: relative;
  overflow: hidden;
  min-width: 92px;
  border: 0;
  border-radius: 6px;
  padding: 9px 14px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.personal-inner-tab::before {
  content: "";
  position: absolute;
  inset: -40% -70%;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 35%, rgba(255, 255, 255, 0.7) 50%, transparent 65%);
  transform: translateX(42%);
}

.personal-inner-tab:hover,
.personal-inner-tab:focus-visible {
  color: var(--text);
  outline: none;
}

.personal-inner-tab.is-active {
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.personal-inner-tab.is-animating {
  animation: dashboard-tab-pop 0.48s cubic-bezier(0.2, 1.4, 0.35, 1);
}

.personal-inner-tab.is-animating::before {
  animation: dashboard-tab-sheen 0.62s ease-out;
}

.personal-inner-panel {
  display: grid;
  gap: 16px;
}

.personal-inner-panel.is-entering {
  animation: dashboard-panel-arrive 0.46s cubic-bezier(0.18, 0.9, 0.22, 1);
}

.personal-inner-panel[hidden] {
  display: none;
}

.personal-area-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(3, minmax(140px, 1fr));
  gap: 14px;
}

.personal-profile-card,
.personal-stat-card,
.personal-task-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.personal-profile-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
}

.personal-profile-card img {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
}

.personal-profile-card div,
.personal-stat-card {
  display: grid;
  gap: 6px;
}

.personal-profile-card > div {
  grid-column: 1 / -1;
  min-width: 0;
}

.personal-profile-card img + div {
  grid-column: auto;
}

.personal-profile-card span,
.personal-profile-card small,
.personal-stat-card span,
.personal-task-list span {
  color: var(--muted);
  font-weight: 800;
}

.personal-profile-card strong,
.personal-profile-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
}

.personal-profile-card strong {
  white-space: nowrap;
}

.personal-profile-card small {
  white-space: normal;
  line-height: 1.35;
}

.personal-profile-card small:first-of-type {
  direction: ltr;
  text-align: right;
}

.personal-stat-card {
  align-content: center;
  min-height: 104px;
  padding: 16px;
}

.personal-stat-card strong {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
}

.personal-task-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.personal-task-card h3 {
  margin: 0;
}

.personal-financial-card {
  margin-top: 12px;
}

.personal-financial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.personal-financial-item {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.personal-financial-item span,
.personal-financial-item small {
  color: var(--muted);
  font-weight: 900;
}

.personal-financial-item strong {
  direction: ltr;
  text-align: right;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.server-time-card {
  display: grid;
  gap: 5px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface-soft) 86%, var(--accent)), var(--surface));
}

.server-time-card span,
.server-time-card small {
  color: var(--muted);
  font-weight: 900;
}

.server-time-card strong {
  direction: ltr;
  text-align: right;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

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

.attendance-status-item {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.attendance-status-item span {
  color: var(--muted);
  font-weight: 900;
}

.attendance-status-item strong {
  overflow-wrap: anywhere;
  font-size: 1.05rem;
}

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

.attendance-action-button {
  min-width: 120px;
  justify-content: center;
}

.attendance-month-panel {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.attendance-month-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.attendance-report-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 88%, var(--surface-soft));
}

.attendance-report-controls label {
  display: grid;
  gap: 6px;
  min-width: min(220px, 100%);
}

.attendance-report-controls span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
}

.attendance-report-controls select {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  font: inherit;
  font-weight: 800;
}

.attendance-report-controls select:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--primary) 58%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
}

.attendance-month-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: var(--surface);
}

.attendance-month-table th,
.attendance-month-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

.attendance-month-table tfoot td {
  padding: 12px;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  color: var(--text);
  font-weight: 900;
  background: var(--surface-soft);
}

.attendance-month-table th {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  background: var(--surface-soft);
}

.attendance-month-table tbody tr:last-child td {
  border-bottom: 0;
}

.attendance-month-table td:nth-child(5) {
  direction: ltr;
  text-align: right;
}

.attendance-month-table td:nth-child(7),
.attendance-month-table tfoot td:last-child {
  direction: ltr;
  text-align: right;
}

.birthday-party-open {
  overflow: hidden;
}

.birthday-invite-balloon {
  position: fixed;
  bottom: -150px;
  z-index: 999;
  width: 96px;
  height: 130px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  animation: birthdayInviteRise 24s linear forwards;
  filter: drop-shadow(0 12px 18px rgba(15, 23, 42, 0.22));
}

.birthday-invite-balloon span {
  position: absolute;
  inset: 0;
  border-radius: 50% 50% 46% 46%;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.86) 0 13px, transparent 14px),
    radial-gradient(circle at 70% 78%, rgba(127, 29, 29, 0.32) 0 24px, transparent 25px),
    linear-gradient(145deg, #f87171, #dc2626 46%, #991b1b);
  box-shadow:
    inset -14px -22px 0 rgba(127, 29, 29, 0.28),
    inset 10px 12px 0 rgba(255, 255, 255, 0.24);
  animation: birthdayInviteWobble 3.2s ease-in-out infinite;
}

.birthday-invite-balloon span::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -54px;
  width: 2px;
  height: 58px;
  background: rgba(255, 255, 255, 0.8);
  transform: translateX(-50%);
}

.birthday-invite-balloon:hover span,
.birthday-invite-balloon:focus-visible span {
  outline: none;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.92) 0 13px, transparent 14px),
    radial-gradient(circle at 70% 78%, rgba(127, 29, 29, 0.34) 0 24px, transparent 25px),
    linear-gradient(145deg, #fb7185, #ef4444 46%, #b91c1c);
}

.birthday-party-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  z-index: 1000;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transform: translateZ(0);
}

.birthday-party-overlay[hidden] {
  display: none;
}

@keyframes birthdayInviteRise {
  0% {
    opacity: 0;
    transform: translate3d(18px, 0, 0);
  }
  8% {
    opacity: 1;
  }
  35% {
    transform: translate3d(-18px, -34vh, 0);
  }
  68% {
    transform: translate3d(-54px, -72vh, 0);
  }
  100% {
    opacity: 0;
    transform: translate3d(-86px, calc(-100vh - 190px), 0);
  }
}

@keyframes birthdayInviteWobble {
  0%,
  100% {
    transform: rotate(-5deg);
  }
  50% {
    transform: rotate(6deg);
  }
}

.birthday-party-effects {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.birthday-balloon,
.birthday-confetti {
  position: absolute;
  background: var(--party-color);
  -webkit-animation-delay: var(--delay);
  animation-delay: var(--delay);
  -webkit-animation-duration: var(--duration);
  animation-duration: var(--duration);
  -webkit-animation-iteration-count: infinite;
  animation-iteration-count: infinite;
  -webkit-animation-timing-function: linear;
  animation-timing-function: linear;
  will-change: transform, opacity;
  transform: translateZ(0);
}

.birthday-balloon {
  bottom: -120px;
  width: 42px;
  height: 54px;
  border-radius: 50% 50% 46% 46%;
  box-shadow: inset -8px -10px 0 rgba(15, 23, 42, 0.14);
  -webkit-animation-name: birthdayBalloonRise;
  animation-name: birthdayBalloonRise;
}

.birthday-balloon::before {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 10px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.62);
}

.birthday-balloon::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -44px;
  width: 1px;
  height: 46px;
  background: rgba(255, 255, 255, 0.72);
  transform: translateX(-50%);
}

.birthday-confetti {
  top: -24px;
  width: 9px;
  height: 15px;
  border-radius: 2px;
  -webkit-animation-name: birthdayConfettiFall;
  animation-name: birthdayConfettiFall;
}

.birthday-party-stage {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 34px;
  justify-items: center;
  width: min(560px, 100%);
}

.birthday-party-close {
  justify-self: end;
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  background: #fff;
  color: #111827;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.2);
}

.birthday-party-sign {
  width: min(520px, 100%);
  padding: 28px;
  border: 3px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 237, 0.94));
  color: #111827;
  text-align: center;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  animation: birthdaySignPop 0.42s ease-out both;
}

.birthday-party-sign h2 {
  margin: 0;
  font-size: clamp(2.2rem, 7vw, 4.6rem);
  line-height: 1;
}

.birthday-party-sign p {
  margin: 12px 0 0;
  color: #be123c;
  font-size: clamp(1.3rem, 4vw, 2rem);
  font-weight: 950;
}

.birthday-party-cake {
  --eye-x: 0px;
  --eye-y: 0px;
  position: relative;
  width: 230px;
  height: 218px;
  margin-top: 38px;
  animation: cakeBounce 2.2s ease-in-out infinite;
}

.party-cake-base,
.party-cake-cream {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.party-cake-base {
  bottom: 0;
  width: 190px;
  height: 104px;
  border-radius: 8px 8px 28px 28px;
  background:
    radial-gradient(circle at 22% 24%, #fff 0 4px, transparent 5px),
    radial-gradient(circle at 68% 34%, #fde68a 0 4px, transparent 5px),
    radial-gradient(circle at 44% 62%, #a7f3d0 0 4px, transparent 5px),
    linear-gradient(180deg, #f472b6, #be185d);
  box-shadow:
    inset 0 -18px 0 rgba(15, 23, 42, 0.12),
    inset 0 12px 0 rgba(255, 255, 255, 0.16);
}

.party-cake-cream {
  bottom: 88px;
  width: 180px;
  height: 34px;
  border-radius: 24px 24px 14px 14px;
  background:
    radial-gradient(circle at 18% 100%, #fff7ed 0 13px, transparent 14px),
    radial-gradient(circle at 42% 100%, #fff7ed 0 15px, transparent 16px),
    radial-gradient(circle at 70% 100%, #fff7ed 0 12px, transparent 13px),
    linear-gradient(#fff7ed, #ffedd5);
  box-shadow: inset 0 -6px 0 rgba(251, 191, 36, 0.14);
}

.party-cake-candle {
  position: absolute;
  left: 50%;
  bottom: 128px;
  width: 18px;
  height: 42px;
  border-radius: 5px;
  background: repeating-linear-gradient(45deg, #fff, #fff 6px, #38bdf8 6px, #38bdf8 12px);
  transform: translateX(-50%);
}

.party-cake-flame {
  position: absolute;
  left: 50%;
  bottom: 170px;
  width: 22px;
  height: 30px;
  border-radius: 50% 50% 50% 0;
  background: #f97316;
  transform: translateX(-50%) rotate(-45deg);
  animation: flameFlicker 0.58s ease-in-out infinite alternate;
}

.party-cake-eye {
  position: absolute;
  bottom: 54px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 2px rgba(15, 23, 42, 0.16);
}

.party-cake-eye-left {
  left: 76px;
}

.party-cake-eye-right {
  right: 76px;
}

.party-cake-eye i {
  position: absolute;
  top: calc(50% + var(--eye-y));
  left: calc(50% + var(--eye-x));
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #111827;
  transform: translate(-50%, -50%);
}

.party-cake-layer {
  position: absolute;
  left: 50%;
  z-index: 1;
  width: 174px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 247, 237, 0.74);
  transform: translateX(-50%);
}

.party-cake-layer.layer-1 {
  bottom: 34px;
}

.party-cake-layer.layer-2 {
  bottom: 72px;
}

.party-cake-sprinkle {
  position: absolute;
  z-index: 3;
  width: 18px;
  height: 5px;
  border-radius: 999px;
  box-shadow: 0 2px 0 rgba(15, 23, 42, 0.08);
}

.sprinkle-1 {
  left: 48px;
  bottom: 108px;
  background: #38bdf8;
  transform: rotate(18deg);
}

.sprinkle-2 {
  left: 82px;
  bottom: 118px;
  background: #ef4444;
  transform: rotate(-24deg);
}

.sprinkle-3 {
  right: 64px;
  bottom: 112px;
  background: #22c55e;
  transform: rotate(28deg);
}

.sprinkle-4 {
  right: 38px;
  bottom: 96px;
  background: #8b5cf6;
  transform: rotate(-12deg);
}

.sprinkle-5 {
  left: 58px;
  bottom: 74px;
  background: #f59e0b;
  transform: rotate(-32deg);
}

.sprinkle-6 {
  right: 54px;
  bottom: 62px;
  background: #06b6d4;
  transform: rotate(16deg);
}

.party-cake-cherry {
  position: absolute;
  z-index: 4;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #fecdd3 0 3px, #e11d48 4px);
  box-shadow: 0 4px 0 rgba(15, 23, 42, 0.1);
}

.party-cake-cherry::after {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 12px;
  width: 9px;
  height: 12px;
  border-top: 2px solid #166534;
  border-right: 2px solid #166534;
  border-radius: 50%;
}

.cherry-1 {
  left: 42px;
  bottom: 126px;
}

.cherry-2 {
  left: 106px;
  bottom: 136px;
}

.cherry-3 {
  right: 44px;
  bottom: 124px;
}

.party-cake-smile {
  position: absolute;
  left: 50%;
  bottom: 34px;
  width: 46px;
  height: 24px;
  border-bottom: 5px solid #7f1d1d;
  border-radius: 0 0 50px 50px;
  transform: translateX(-50%);
}

@keyframes birthdayBalloonRise {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(-5deg);
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift), -120vh, 0) rotate(14deg);
  }
}

@-webkit-keyframes birthdayBalloonRise {
  0% {
    opacity: 0;
    -webkit-transform: translate3d(0, 0, 0) rotate(-5deg);
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    -webkit-transform: translate3d(var(--drift), -120vh, 0) rotate(14deg);
  }
}

@keyframes birthdayConfettiFall {
  0% {
    opacity: 0;
    transform: translate3d(0, -10vh, 0) rotate(0deg);
  }
  10% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift), 112vh, 0) rotate(var(--spin));
  }
}

@-webkit-keyframes birthdayConfettiFall {
  0% {
    opacity: 0;
    -webkit-transform: translate3d(0, -10vh, 0) rotate(0deg);
  }
  10% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    -webkit-transform: translate3d(var(--drift), 112vh, 0) rotate(var(--spin));
  }
}

@keyframes birthdaySignPop {
  from {
    opacity: 0;
    transform: scale(0.88) translateY(18px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes cakeBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes flameFlicker {
  from {
    transform: translateX(-50%) rotate(-45deg) scale(0.92);
  }
  to {
    transform: translateX(-50%) rotate(-38deg) scale(1.08);
  }
}

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

.personal-task-list-item {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: inherit;
  font: inherit;
  text-align: right;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.personal-task-list-item:hover,
.personal-task-list-item:focus-visible {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  outline: none;
  transform: translateY(-1px);
}

.personal-task-list strong,
.personal-task-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-title {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.dashboard-title img {
  width: clamp(150px, 22vw, 260px);
  height: auto;
  display: block;
}

.dashboard-title h1 {
  margin-bottom: 0;
}

.sheet-toolbar .lead {
  margin-bottom: 0;
}

.sheet-actions {
  display: grid;
  gap: 12px;
  justify-items: stretch;
}

.access-card.compact {
  min-width: 300px;
  padding: 14px 16px;
}

.access-card.compact p {
  margin: 6px 0 2px;
}

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

.sheet-panel {
  height: calc(100vh - 270px);
  min-height: 620px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.sheet-frame {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #fff;
}

.leads-sheet-panel {
  display: grid;
  gap: 16px;
  min-height: 620px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  box-shadow: var(--shadow);
}

.leads-sheet-panel > .section-title {
  order: 1;
}

.leads-kpi-grid {
  order: 2;
}

.lead-command-center {
  order: 3;
}

.leads-filter-panel {
  order: 4;
}

.leads-sheet-table-wrap {
  order: 5;
}

.leads-chart-grid {
  order: 6;
}

.leads-tab-hero {
  align-items: end;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
  border-radius: calc(var(--radius) - 4px);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--primary) 8%, var(--surface)), color-mix(in srgb, var(--accent) 7%, var(--surface)));
}

.leads-tab-hero h2 {
  font-size: clamp(1.45rem, 2vw, 2.1rem);
}

.leads-tab-subtitle {
  max-width: 62ch;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.55;
}

.leads-sheet-table-wrap {
  max-height: calc(100vh - 360px);
  min-height: 520px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 4px);
  background: var(--surface);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 62%, transparent);
  scrollbar-color: color-mix(in srgb, var(--primary) 48%, var(--line)) transparent;
  scrollbar-width: thin;
}

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

.leads-kpi-card {
  min-height: 122px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 4px);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface) 88%, transparent), color-mix(in srgb, var(--surface-soft) 72%, transparent));
  box-shadow: 0 12px 20px rgba(18, 38, 63, 0.08);
}

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

.leads-kpi-card span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.leads-kpi-card strong {
  color: var(--text);
  font-size: 2rem;
  line-height: 1;
}

.leads-kpi-card small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.lead-command-center {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) repeat(2, minmax(150px, 1fr));
  gap: 12px;
  min-width: 0;
}

.lead-command-summary,
.lead-command-card {
  min-height: 126px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 4px);
  color: var(--text);
  background: var(--surface);
  text-align: start;
  font: inherit;
  box-shadow: 0 12px 22px rgba(18, 38, 63, 0.07);
}

.lead-command-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.lead-command-card::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 5px;
  background: var(--lead-command-color, var(--primary));
}

.lead-command-summary {
  color: #fff;
  border-color: color-mix(in srgb, var(--primary) 65%, #000);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--primary) 90%, #0f172a), color-mix(in srgb, var(--accent) 72%, #0f172a));
}

.lead-command-card:hover,
.lead-command-card:focus-visible,
.lead-command-card.is-active {
  outline: none;
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--lead-command-color, var(--primary)) 62%, var(--line));
  box-shadow: 0 16px 28px color-mix(in srgb, var(--lead-command-color, var(--primary)) 16%, transparent);
}

.lead-command-card.is-new {
  --lead-command-color: #16a34a;
}

.lead-command-card.is-empty {
  --lead-command-color: #64748b;
}

.lead-command-summary span,
.lead-command-card span {
  color: inherit;
  font-size: 0.84rem;
  font-weight: 900;
}

.lead-command-summary strong,
.lead-command-card strong {
  font-size: 2rem;
  line-height: 1;
}

.lead-command-summary small,
.lead-command-card small {
  color: color-mix(in srgb, currentColor 68%, transparent);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

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

.leads-chart-card {
  min-height: 340px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 4px);
  background: var(--surface);
}

.leads-chart-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.leads-pie-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.leads-pie {
  position: relative;
  width: 190px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.leads-pie svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotate(-90deg);
}

.leads-pie-slice {
  fill: none;
  stroke: var(--slice-color);
  stroke-width: 22;
  stroke-dasharray: var(--slice-size) calc(100 - var(--slice-size));
  stroke-dashoffset: var(--slice-offset);
  cursor: pointer;
  transition: stroke-width 0.18s ease;
}

.leads-pie-slice:hover,
.leads-pie-slice:focus-visible {
  outline: none;
  stroke-width: 26;
}

.leads-pie::after {
  content: "";
  position: absolute;
  inset: 50px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.leads-pie span {
  position: absolute;
  z-index: 1;
  color: var(--text);
  font-size: 1.55rem;
  font-weight: 900;
}

.leads-chart-legend {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.leads-chart-legend div {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.leads-chart-legend i {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.leads-chart-legend span {
  overflow: hidden;
  color: var(--text);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leads-chart-legend b {
  color: var(--muted);
  font-size: 0.86rem;
  white-space: nowrap;
}

.leads-bar-chart {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(76px, 1fr);
  gap: 12px;
  min-height: 230px;
  overflow-x: auto;
  padding: 8px 4px 2px;
}

.leads-bar-item {
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 8px;
  align-items: end;
  min-width: 76px;
  text-align: center;
}

.leads-bar-track {
  position: relative;
  width: 100%;
  height: 190px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 10px 10px 6px 6px;
  background: var(--surface-soft);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.leads-bar-fill {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  min-height: 8px;
  display: grid;
  place-items: start center;
  padding-top: 8px;
  border-radius: 10px 10px 6px 6px;
  color: #fff;
  background: var(--bar-color);
  font-weight: 900;
}

.leads-bar-item strong {
  overflow: hidden;
  max-width: 100%;
  color: var(--text);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leads-bar-item small {
  color: var(--muted);
  font-weight: 800;
}

.leads-bar-item.is-clickable {
  cursor: pointer;
}

.leads-bar-item.is-clickable:hover .leads-bar-track,
.leads-bar-item.is-clickable:focus-visible .leads-bar-track {
  border-color: color-mix(in srgb, var(--primary) 62%, var(--line));
  box-shadow: 0 14px 24px color-mix(in srgb, var(--primary) 16%, transparent);
  transform: translateY(-2px);
}

.leads-bar-item.is-clickable:focus-visible {
  outline: none;
}

.leads-filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 4px);
  background: color-mix(in srgb, var(--surface) 88%, var(--surface-soft));
}

.leads-workbench-head,
.leads-workbench-search {
  display: flex;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
  min-width: 0;
}

.leads-workbench-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.08rem;
}

.leads-workbench-search .leads-name-search {
  flex: 1;
}

.lead-view-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 8px;
  min-width: 0;
}

.lead-view-chip {
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.lead-view-chip span {
  min-width: 0;
  overflow: hidden;
  font-size: 0.86rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-view-chip b {
  min-width: 32px;
  min-height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, var(--surface-soft));
  font-size: 0.84rem;
  font-weight: 900;
}

.lead-view-chip:hover,
.lead-view-chip:focus-visible,
.lead-view-chip.is-active {
  outline: none;
  border-color: color-mix(in srgb, var(--primary) 58%, var(--line));
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
}

.lead-view-chip.is-active {
  box-shadow: inset 0 -3px 0 var(--primary);
}

.leads-name-search {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.leads-name-search span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.leads-name-search input {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  font: inherit;
  font-weight: 800;
}

.leads-name-search input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--primary) 58%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
}

.leads-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.lead-filter-field {
  position: relative;
}

.lead-filter-toggle,
.lead-filter-quick,
.lead-filter-reset {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 900;
  cursor: pointer;
}

.lead-filter-toggle {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  max-width: 190px;
}

.lead-filter-toggle span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-filter-toggle b {
  min-width: 0;
  color: var(--primary);
  font-size: 0.78rem;
}

.lead-filter-field.has-filter .lead-filter-toggle {
  border-color: color-mix(in srgb, var(--primary) 58%, var(--line));
  background: color-mix(in srgb, var(--primary) 9%, var(--surface));
}

.lead-filter-toggle:hover,
.lead-filter-toggle:focus-visible,
.lead-filter-quick:hover,
.lead-filter-quick:focus-visible,
.lead-filter-reset:hover,
.lead-filter-reset:focus-visible {
  outline: none;
  border-color: var(--primary);
}

.lead-filter-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  width: min(280px, 82vw);
  max-height: 330px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.lead-filter-menu[hidden] {
  display: none;
}

.lead-filter-menu-head {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.lead-filter-menu-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-filter-menu-head button {
  border: 0;
  color: var(--primary);
  background: transparent;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

.lead-filter-options {
  display: grid;
  gap: 2px;
  overflow: auto;
  padding: 6px;
}

.lead-filter-options label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  border-radius: 8px;
  cursor: pointer;
}

.lead-filter-options label:hover {
  background: var(--surface-soft);
}

.lead-filter-options input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.lead-filter-options span {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-filter-reset {
  color: var(--danger);
}

.lead-filter-quick {
  color: #14532d;
  border-color: color-mix(in srgb, #16a34a 42%, var(--line));
  background: #ecfdf5;
}

.lead-filter-summary {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
  white-space: nowrap;
}

.leads-sheet-table {
  width: 100%;
  min-width: 1520px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--text);
  font-size: 0.88rem;
}

.leads-sheet-table[data-leads-table] {
  min-width: 1496px;
}

.leads-sheet-table th,
.leads-sheet-table td {
  height: 58px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  text-align: right;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leads-sheet-table .leads-name-column {
  width: 49px;
  max-width: 49px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 900;
}

.leads-sheet-table .leads-narrow-column {
  width: 112px;
  max-width: 112px;
}

.leads-sheet-table .leads-email-column {
  width: 240px;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leads-sheet-table .leads-date-column {
  width: 67px;
  max-width: 67px;
}

.leads-sheet-table .leads-phone-column {
  width: 72px;
  max-width: 72px;
  direction: ltr;
  text-align: center;
}

.leads-sheet-table .leads-call-metric-column {
  width: 190px;
  max-width: 190px;
}

.leads-sheet-table .leads-status-column {
  width: 66px;
}

.leads-sheet-table .leads-loss-reason-column {
  width: 66px;
}

.leads-sheet-table .leads-status-column .lead-edit-control {
  width: 100%;
}

.leads-sheet-table .leads-action-column {
  position: sticky;
  right: 0;
  z-index: 2;
  width: 83px;
  min-width: 83px;
  text-align: center;
  background: var(--surface);
  box-shadow: -8px 0 16px rgba(15, 23, 42, 0.06);
}

.leads-sheet-table[data-leads-table] .leads-name-column {
  width: 11px;
  max-width: 22px;
}

.leads-sheet-table[data-leads-table] .leads-narrow-column {
  width: 76px;
  max-width: 76px;
}

.leads-sheet-table[data-leads-table] .leads-email-column {
  width: 163px;
  max-width: 163px;
}

.leads-sheet-table[data-leads-table] .leads-date-column {
  width: 30px;
  max-width: 30px;
}

.leads-sheet-table[data-leads-table] .leads-phone-column {
  width: 31px;
  max-width: 31px;
}

.leads-sheet-table[data-leads-table] .leads-call-metric-column {
  width: 130px;
  max-width: 130px;
}

.leads-sheet-table[data-leads-table] .leads-last-call-column {
  width: 43px;
  max-width: 43px;
}

.leads-sheet-table[data-leads-table] .leads-call-count-column {
  width: 65px;
  max-width: 65px;
}

.leads-sheet-table[data-leads-table] .leads-status-column {
  width: 45px;
}

.leads-sheet-table[data-leads-table] .leads-loss-reason-column {
  width: 27px;
}

.leads-sheet-table[data-leads-table] .leads-action-column {
  width: 55px;
  min-width: 55px;
}

.leads-sheet-table[data-leads-table] {
  min-width: 1280px;
}

.leads-sheet-table[data-leads-table] .leads-action-column {
  width: 132px;
  min-width: 132px;
}

.leads-sheet-table[data-leads-table] .leads-name-column {
  width: 156px;
  max-width: 156px;
}

.leads-sheet-table[data-leads-table] .leads-phone-column {
  width: 112px;
  max-width: 112px;
}

.leads-sheet-table[data-leads-table] .leads-date-column {
  width: 104px;
  max-width: 104px;
}

.leads-sheet-table[data-leads-table] .leads-status-column {
  width: 170px;
  max-width: 170px;
}

.leads-sheet-table[data-leads-table] .leads-loss-reason-column {
  width: 150px;
  max-width: 150px;
}

.lead-data-row {
  --lead-row-accent: var(--line);
}

.lead-data-row.lead-status-new {
  --lead-row-accent: #16a34a;
}

.lead-data-row.lead-status-empty {
  --lead-row-accent: #dc2626;
}

.lead-data-row > td:first-child {
  box-shadow: inset -4px 0 0 var(--lead-row-accent);
}

.lead-status-cell .lead-edit-control {
  border-radius: 999px;
  text-align: center;
  font-weight: 900;
}

.lead-status-cell-new .lead-edit-control,
.leads-sheet-table td.lead-new-status-cell .lead-edit-control {
  border-color: color-mix(in srgb, #16a34a 54%, var(--line));
  color: #14532d;
}

.lead-status-cell-empty .lead-edit-control {
  border-color: color-mix(in srgb, #dc2626 44%, var(--line));
  color: #991b1b;
}

.lead-status-cell-active .lead-edit-control {
  border-color: color-mix(in srgb, #2563eb 48%, var(--line));
  color: #1e3a8a;
}

.lead-status-cell-won .lead-edit-control {
  border-color: color-mix(in srgb, #0f766e 48%, var(--line));
  color: #115e59;
}

.lead-status-cell-lost .lead-edit-control {
  border-color: color-mix(in srgb, #7f1d1d 42%, var(--line));
  color: #7f1d1d;
}

.operational-phones-table {
  min-width: 76px;
}

.operational-phone-add-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 4px);
  background: color-mix(in srgb, var(--surface) 88%, var(--surface-soft));
}

.operational-phone-add-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.operational-phone-add-form label span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
}

.operational-phone-add-form input {
  min-height: 38px;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  font: inherit;
  font-weight: 800;
}

.operational-phone-add-form input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--primary) 58%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
}

.operational-phone-add-form .form-message {
  grid-column: 1 / -1;
  margin: 0;
}

.operational-phones-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 4px);
  background: color-mix(in srgb, var(--surface) 88%, var(--surface-soft));
}

.operational-phones-filter label {
  display: grid;
  gap: 6px;
  min-width: min(260px, 100%);
}

.operational-phones-filter span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
}

.operational-phones-filter input {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  font: inherit;
  font-weight: 800;
}

.operational-phones-filter input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--primary) 58%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
}

.operational-phones-table .leads-action-column {
  width: 116px;
  min-width: 116px;
}

.operational-phones-table th:nth-child(1),
.operational-phones-table td:nth-child(1),
.operational-phones-table th:nth-child(2),
.operational-phones-table td:nth-child(2),
.operational-phones-table th:nth-child(3),
.operational-phones-table td:nth-child(3) {
  width: 11px;
  max-width: 11px;
}

.operational-phone-number {
  direction: ltr;
  text-align: center;
}

.operational-phone-actions {
  white-space: nowrap;
}

.operational-phone-edit-button {
  width: 34px;
  height: 34px;
  min-height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--primary) 58%, #fff);
  border-radius: 999px;
  background: var(--surface);
  color: var(--primary);
  font: inherit;
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.operational-phone-edit-button:hover,
.operational-phone-edit-button:focus-visible {
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--primary) 16%, transparent);
}

.lead-call-attempt-button,
.lead-call-end-button,
.lead-whatsapp-button {
  width: 27px;
  height: 27px;
  min-height: 27px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #fff;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.lead-call-attempt-button {
  background: #16a34a;
  border-color: color-mix(in srgb, #16a34a 72%, #fff);
}

.lead-call-end-button {
  margin-inline-start: 6px;
  background: #dc2626;
  border-color: color-mix(in srgb, #dc2626 72%, #fff);
}

.lead-whatsapp-button {
  margin-inline-start: 6px;
  background: #22c55e;
  border-color: color-mix(in srgb, #22c55e 72%, #fff);
}

.lead-call-attempt-button svg,
.lead-call-end-button svg,
.lead-whatsapp-button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lead-call-attempt-button:hover,
.lead-call-attempt-button:focus-visible,
.lead-call-end-button:hover,
.lead-call-end-button:focus-visible,
.lead-whatsapp-button:hover,
.lead-whatsapp-button:focus-visible {
  outline: none;
  transform: translateY(-1px);
}

.lead-call-attempt-button:hover,
.lead-call-attempt-button:focus-visible {
  background: #15803d;
  box-shadow: 0 10px 18px rgba(22, 163, 74, 0.18);
}

.lead-call-end-button:hover,
.lead-call-end-button:focus-visible {
  background: #b91c1c;
  box-shadow: 0 10px 18px rgba(220, 38, 38, 0.18);
}

.lead-whatsapp-button:hover,
.lead-whatsapp-button:focus-visible {
  background: #16a34a;
  box-shadow: 0 10px 18px rgba(34, 197, 94, 0.18);
}

.lead-call-attempt-button:disabled,
.lead-call-end-button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.lead-call-attempt-button.is-saved {
  background: var(--accent);
  border-color: var(--accent);
}

.lead-call-attempt-button.is-error {
  background: var(--danger);
  border-color: var(--danger);
}

.temporary-risk-close-button {
  width: auto;
  min-width: 112px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--danger);
  border-color: var(--danger);
}

.temporary-risk-close-button:hover,
.temporary-risk-close-button:focus-visible {
  background: color-mix(in srgb, var(--danger) 86%, #000);
  border-color: color-mix(in srgb, var(--danger) 86%, #000);
}

.pre-consulting-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
  align-items: stretch;
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--line));
  border-radius: calc(var(--radius) - 2px);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--primary) 10%, transparent), transparent 44%),
    var(--surface);
}

.pre-consulting-hero-copy {
  display: grid;
  align-content: center;
  gap: 6px;
}

.pre-consulting-hero-copy h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.pre-consulting-hero-copy span {
  max-width: 62ch;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.55;
}

.pre-consulting-hero-meter {
  position: relative;
  min-height: 142px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 5px);
  background: var(--surface-soft);
  text-align: center;
}

.pre-consulting-hero-meter::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: var(--pre-consulting-progress, 0%);
  background: linear-gradient(180deg, #fbbf24, #22c55e);
  opacity: 0.28;
}

.pre-consulting-hero-meter strong,
.pre-consulting-hero-meter span {
  position: relative;
}

.pre-consulting-hero-meter strong {
  direction: ltr;
  font-size: 2.15rem;
  font-weight: 950;
  line-height: 1;
}

.pre-consulting-hero-meter span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.pre-consulting-command-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.pre-consulting-command-card {
  display: grid;
  gap: 6px;
  min-height: 128px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 5px);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.pre-consulting-command-card span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
}

.pre-consulting-command-card strong {
  color: var(--pre-consulting-card-color, var(--text));
  font-size: 2rem;
  font-weight: 950;
  line-height: 1;
}

.pre-consulting-command-card small {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

.pre-consulting-command-card.is-warning {
  --pre-consulting-card-color: #f59e0b;
}

.pre-consulting-command-card.is-meeting {
  --pre-consulting-card-color: #2563eb;
}

.pre-consulting-command-card.is-money {
  --pre-consulting-card-color: #16a34a;
}

.pre-consulting-workbench {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 5px);
  background: var(--surface);
}

.pre-consulting-workbench-head,
.pre-consulting-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pre-consulting-workbench-head h3 {
  margin: 0;
  font-size: 1.08rem;
}

.pre-consulting-workbench-head [data-pre-consulting-filter-summary] {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.pre-consulting-search {
  flex: 1 1 280px;
  display: grid;
  gap: 5px;
  min-width: 220px;
}

.pre-consulting-search span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.pre-consulting-search input {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-soft);
  font: inherit;
  font-weight: 800;
}

.pre-consulting-search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent);
}

.pre-consulting-view-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.pre-consulting-view-switch button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 900;
  cursor: pointer;
}

.pre-consulting-view-switch button:hover,
.pre-consulting-view-switch button:focus-visible,
.pre-consulting-view-switch button.is-active {
  outline: none;
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 52%, var(--line));
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
}

.pre-consulting-add-form {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 4px);
  background: var(--surface);
}

.pre-consulting-summary-card {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 4px);
  background: var(--surface);
}

.pre-consulting-summary-card .section-title {
  margin-bottom: 0;
}

.pre-consulting-summary-card h3 {
  margin: 0;
  font-size: 1.08rem;
}

.pre-consulting-pie-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.pre-consulting-pie-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 4px);
  background: var(--surface);
}

.pre-consulting-pie-card h3 {
  margin: 0;
  font-size: 1.08rem;
}

.pre-consulting-pie-layout {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.pre-consulting-pie {
  width: 128px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--surface) 0 54%, transparent 55%),
    conic-gradient(var(--pie-color) calc(var(--pie-percent) * 1%), color-mix(in srgb, var(--line) 72%, #fff) 0);
  box-shadow: inset 0 0 0 1px var(--line);
}

.pre-consulting-pie span {
  direction: ltr;
  color: var(--text);
  font-size: 1.24rem;
  font-weight: 900;
}

.pre-consulting-pie-stats {
  display: grid;
  gap: 6px;
}

.pre-consulting-pie-stats strong {
  font-size: 2rem;
  line-height: 1;
}

.pre-consulting-pie-stats span {
  color: var(--muted);
  font-weight: 800;
}

.pre-consulting-month-chart {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(86px, 1fr);
  gap: 12px;
  min-height: 230px;
  overflow-x: auto;
  padding: 6px 4px 2px;
}

.pre-consulting-month-bar {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 8px;
  align-items: end;
  min-width: 86px;
  text-align: center;
}

.pre-consulting-month-track {
  position: relative;
  width: 100%;
  height: 188px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px 10px 6px 6px;
  background: var(--surface-soft);
}

.pre-consulting-month-fill {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  min-height: 8px;
  display: grid;
  place-items: start center;
  padding-top: 8px;
  border-radius: 10px 10px 6px 6px;
  color: #fff;
  background: var(--primary);
  font-weight: 900;
}

.pre-consulting-month-bar strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pre-consulting-add-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 6px;
}

.pre-consulting-add-grid label {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.pre-consulting-add-grid span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pre-consulting-add-grid input:not([type="checkbox"]),
.pre-consulting-edit-input:not([type="checkbox"]) {
  width: 100%;
  min-height: 30px;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  font: inherit;
  font-size: 0.86rem;
}

.pre-consulting-add-grid input[type="checkbox"],
.pre-consulting-edit-input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 5px 0 0;
  accent-color: var(--primary);
}

.pre-consulting-table .pre-consulting-action-column {
  width: 206px;
  min-width: 206px;
  text-align: right;
}

.pre-consulting-data-row {
  border-inline-start: 4px solid transparent;
}

.pre-consulting-data-row.is-attention {
  border-inline-start-color: #f59e0b;
}

.pre-consulting-data-row.is-open {
  border-inline-start-color: #4aa3ff;
}

.pre-consulting-data-row.is-complete {
  border-inline-start-color: #20d47b;
}

.pre-consulting-data-row[hidden] {
  display: none;
}

.pre-consulting-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-start;
  margin-bottom: 8px;
}

.pre-consulting-row-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.pre-consulting-row-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.pre-consulting-row-tags span.is-warning {
  color: #92400e;
  border-color: color-mix(in srgb, #f59e0b 38%, var(--line));
  background: color-mix(in srgb, #f59e0b 12%, var(--surface));
}

.pre-consulting-row-tags span.is-done {
  color: #047857;
  border-color: color-mix(in srgb, #20d47b 38%, var(--line));
  background: color-mix(in srgb, #20d47b 12%, var(--surface));
}

.pre-consulting-row-button {
  min-height: 32px;
  margin: 0 2px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-soft);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 900;
  cursor: pointer;
}

.pre-consulting-row-button:hover,
.pre-consulting-row-button:focus-visible {
  outline: none;
  border-color: var(--primary);
}

.pre-consulting-row-button.is-save {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
}

.pre-consulting-row-button.is-cancel {
  color: var(--danger);
}

.lead-edit-control {
  width: min(260px, 100%);
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background:
    linear-gradient(180deg, color-mix(in srgb, #fff 42%, transparent), transparent),
    var(--surface);
  font: inherit;
  font-weight: 700;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.lead-edit-control:hover,
.lead-edit-control:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--primary) 56%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
}

.lead-edit-notes {
  min-width: 0;
  min-height: 48px;
  max-height: 92px;
  resize: vertical;
  white-space: normal;
  line-height: 1.35;
}

.leads-sheet-table .lead-edit-control,
.leads-sheet-table .lead-edit-notes {
  min-width: 0;
  width: 100%;
}

.leads-sheet-table textarea.lead-edit-control {
  min-width: 190px;
}

.leads-sheet-table select.lead-edit-control {
  cursor: pointer;
}

.leads-sheet-table input[type="date"].lead-edit-control,
.leads-sheet-table input[type="datetime-local"].lead-edit-control {
  direction: ltr;
  text-align: center;
}

.lead-edit-control.is-saving {
  opacity: 0.7;
}

.lead-edit-control.is-saved {
  border-color: #20d47b;
  box-shadow: 0 0 0 3px rgba(32, 212, 123, 0.14);
}

.lead-edit-control.is-error {
  border-color: #ff6b82;
  box-shadow: 0 0 0 3px rgba(255, 107, 130, 0.14);
}

.leads-sheet-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 48px;
  background:
    linear-gradient(180deg, color-mix(in srgb, #fff 46%, transparent), transparent),
    var(--surface-soft);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: inset 0 -1px 0 var(--line);
}

.leads-sheet-table thead tr:nth-child(2) th {
  top: 48px;
  background: color-mix(in srgb, var(--warning) 14%, var(--surface));
}

.leads-sheet-table th.leads-action-column {
  z-index: 5;
  background: var(--surface-soft);
}

.leads-sheet-table tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--surface-soft) 46%, var(--surface));
}

.leads-sheet-table tr:hover td {
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
}

.leads-sheet-table tr:hover .leads-action-column {
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
}

.leads-sheet-table td.lead-new-status-cell .lead-edit-control {
  border-color: color-mix(in srgb, #16a34a 48%, var(--line));
  background: #ecfdf5;
  color: #14532d;
}

.leads-sheet-table td.temporary-risk-current-year-cell {
  border-color: color-mix(in srgb, #dc2626 52%, var(--line));
  color: #991b1b;
  background:
    linear-gradient(135deg, rgba(220, 38, 38, 0.16), rgba(255, 255, 255, 0) 68%),
    #fff1f2;
  box-shadow: inset 3px 0 0 #dc2626;
  font-weight: 900;
}

.leads-sheet-table tr:hover td.temporary-risk-current-year-cell {
  background:
    linear-gradient(135deg, rgba(220, 38, 38, 0.22), rgba(255, 255, 255, 0) 68%),
    #ffe4e6;
}

.boolean-display {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  vertical-align: middle;
}

.boolean-display input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--primary);
  cursor: default;
}

.lead-data-row {
  cursor: pointer;
}

.lead-data-row:focus-visible td {
  outline: 2px solid color-mix(in srgb, var(--primary) 72%, transparent);
  outline-offset: -2px;
}

.dashboard-notice {
  max-width: none;
}

.money-mascot-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.speech-bubble {
  position: relative;
  padding: 20px;
  border: 3px solid var(--text);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 7px 7px 0 color-mix(in srgb, var(--text) 16%, transparent);
}

.speech-bubble::before {
  content: "";
  position: absolute;
  left: -19px;
  top: 54%;
  width: 30px;
  height: 30px;
  border-left: 3px solid var(--text);
  border-bottom: 3px solid var(--text);
  background: var(--surface);
  transform: rotate(45deg);
}

.speech-bubble .eyebrow {
  margin-top: 0;
}

.speech-bubble h2 {
  margin-bottom: 12px;
}

.speech-bubble ul {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.speech-bubble li {
  color: var(--muted);
  font-weight: 700;
}

.speech-bubble strong {
  direction: ltr;
  display: inline-block;
  color: var(--text);
  font-size: 1.35rem;
  margin-left: 6px;
}

.quick-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
}

.quick-summary-grid article {
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-soft) 76%, #fff);
}

.quick-summary-grid strong {
  margin-left: 0;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  line-height: 1;
}

.quick-summary-grid span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.money-mascot {
  width: 180px;
  height: 210px;
  position: relative;
  justify-self: center;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.money-mascot:focus-visible .money-body {
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--accent) 32%, transparent),
    inset 0 -14px 0 rgba(4, 92, 49, 0.22),
    0 18px 24px rgba(0, 0, 0, 0.16);
}

.money-mascot:active .money-body,
.money-mascot.is-ringing .money-body {
  animation: mascot-ding 0.28s ease, mascot-bob 2.8s ease-in-out infinite 0.28s;
}

.money-body {
  width: 132px;
  height: 154px;
  position: absolute;
  left: 24px;
  top: 14px;
  display: grid;
  place-items: center;
  border: 4px solid #0f5b36;
  border-radius: 22px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 0 8px, transparent 8px 22px),
    linear-gradient(135deg, #32d276, #0e9f55);
  box-shadow: inset 0 -14px 0 rgba(4, 92, 49, 0.22), 0 18px 24px rgba(0, 0, 0, 0.16);
  animation: mascot-bob 2.8s ease-in-out infinite;
  z-index: 3;
}

.money-symbol {
  color: #eaffcf;
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.16);
}

.money-eye {
  width: 24px;
  height: 24px;
  position: absolute;
  top: 42px;
  display: grid;
  place-items: center;
  border: 3px solid #083b25;
  border-radius: 50%;
  background: #fff;
  overflow: hidden;
}

.money-eye span {
  width: 9px;
  height: 9px;
  display: block;
  border-radius: 50%;
  background: #102015;
  animation: eye-wander 3.2s ease-in-out infinite;
}

.eye-left {
  right: 31px;
}

.eye-right {
  left: 31px;
}

.money-smile {
  width: 32px;
  height: 15px;
  position: absolute;
  bottom: 38px;
  border-bottom: 4px solid #083b25;
  border-radius: 0 0 999px 999px;
}

.money-arm,
.money-leg {
  position: absolute;
  background: #0f8f51;
  border: 3px solid #0f5b36;
  border-radius: 999px;
  z-index: 2;
}

.money-arm {
  width: 18px;
  height: 70px;
  top: 70px;
}

.arm-left {
  left: 14px;
  transform-origin: top center;
  transform: rotate(24deg);
  animation: arm-wave 1.7s ease-in-out infinite;
}

.arm-right {
  right: 14px;
  transform: rotate(-24deg);
}

.money-leg {
  width: 18px;
  height: 44px;
  bottom: 12px;
}

.leg-left {
  left: 60px;
  animation: leg-tap 1.8s ease-in-out infinite;
}

.leg-right {
  right: 60px;
  animation: leg-tap 1.8s ease-in-out infinite reverse;
}

.money-shadow {
  width: 124px;
  height: 20px;
  position: absolute;
  left: 28px;
  bottom: 2px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.16);
  animation: shadow-pulse 2.8s ease-in-out infinite;
}

@keyframes mascot-bob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}

@keyframes mascot-ding {
  0%, 100% { transform: translateY(0) rotate(-1deg) scale(1); }
  20% { transform: translateY(-6px) rotate(-9deg) scale(1.05); }
  45% { transform: translateY(-8px) rotate(8deg) scale(1.04); }
  70% { transform: translateY(-3px) rotate(-5deg) scale(1.02); }
}

@keyframes eye-wander {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(5px, -1px); }
  55% { transform: translate(-5px, 2px); }
  75% { transform: translate(1px, 4px); }
}

@keyframes arm-wave {
  0%, 100% { transform: rotate(24deg); }
  50% { transform: rotate(48deg) translateY(-4px); }
}

@keyframes leg-tap {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

@keyframes shadow-pulse {
  0%, 100% { transform: scaleX(1); opacity: 0.16; }
  50% { transform: scaleX(0.82); opacity: 0.1; }
}

.birthdays-panel {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface) 94%, transparent), color-mix(in srgb, var(--surface-soft) 76%, transparent)),
    radial-gradient(circle at 10% 0%, color-mix(in srgb, #8e7dff 17%, transparent), transparent 36%);
  box-shadow: var(--shadow);
}

.birthdays-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.28), transparent 24%),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.04));
}

.birthdays-panel > * {
  position: relative;
  z-index: 1;
}

.birthday-title {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.animated-cake {
  width: 54px;
  height: 54px;
  position: relative;
  flex: 0 0 auto;
  animation: cake-bob 2.4s ease-in-out infinite;
}

.cake-base,
.cake-top,
.cake-candle,
.cake-flame {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: block;
}

.cake-base {
  width: 42px;
  height: 22px;
  bottom: 4px;
  border-radius: 8px 8px 10px 10px;
  background: linear-gradient(135deg, #8e7dff, #5d53c7);
  box-shadow:
    inset 6px 6px 10px rgba(255, 255, 255, 0.22),
    inset -8px -8px 12px rgba(0, 0, 0, 0.18),
    0 10px 16px rgba(18, 38, 63, 0.14);
}

.cake-top {
  width: 46px;
  height: 14px;
  bottom: 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff1b8, #f6b73c);
}

.cake-candle {
  width: 8px;
  height: 18px;
  bottom: 34px;
  border-radius: 4px;
  background: repeating-linear-gradient(45deg, #fff 0 4px, #ff7080 4px 8px);
}

.cake-flame {
  width: 14px;
  height: 18px;
  bottom: 49px;
  border-radius: 50% 50% 50% 0;
  background: radial-gradient(circle at 55% 65%, #fff7a8 0 22%, #ffbf3d 48%, #ff6f2e 100%);
  transform: translateX(-50%) rotate(-42deg);
  transform-origin: center bottom;
  animation: flame-flicker 0.9s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(255, 191, 61, 0.7));
}

@keyframes cake-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes flame-flicker {
  0%, 100% { transform: translateX(-50%) rotate(-42deg) scale(1); }
  50% { transform: translateX(-50%) rotate(-34deg) scale(0.86, 1.08); }
}

.birthday-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.birthday-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.birthday-close-row {
  display: flex;
  justify-content: flex-start;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.birthday-close-row[hidden] {
  display: none;
}

.birthday-close-row + .birthday-columns {
  border-top: 0;
}

.birthday-close-button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: 999px;
  color: var(--text);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface) 92%, transparent), color-mix(in srgb, var(--accent-soft) 55%, transparent));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    0 10px 20px rgba(18, 38, 63, 0.08);
  cursor: pointer;
  font-weight: 900;
}

.birthday-close-button:hover,
.birthday-close-button:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
  outline: none;
}

.birthday-day-card {
  min-width: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface) 88%, transparent), color-mix(in srgb, var(--surface-soft) 74%, transparent));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 12px 20px rgba(18, 38, 63, 0.09);
  overflow: hidden;
}

.birthday-day-toggle {
  width: 100%;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 18px;
  border: 0;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  text-align: right;
}

.birthday-day-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.birthday-day-toggle span {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #8e7dff, #18a999);
  font-size: 1.45rem;
  font-weight: 800;
  box-shadow:
    inset 6px 8px 10px rgba(255, 255, 255, 0.22),
    inset -8px -10px 12px rgba(0, 0, 0, 0.18),
    0 12px 18px rgba(18, 38, 63, 0.14);
}

.birthday-day-toggle::after {
  content: "⌄";
  color: var(--muted);
  font-size: 1.2rem;
  font-weight: 800;
  transition: transform 0.18s ease;
}

.birthday-day-toggle[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

.birthday-dropdown {
  padding: 0 14px 14px;
  animation: dropdown-in 0.18s ease;
}

.birthday-dropdown[hidden] {
  display: none;
}

@keyframes dropdown-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.birthday-list.compact {
  grid-template-columns: 1fr;
  padding-top: 0;
  border-top: 0;
}

.birthday-empty {
  min-height: 82px;
  display: grid;
  place-items: center;
  margin: 0;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  font-weight: 700;
}

.birthday-card {
  min-height: 118px;
  min-width: 0;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface) 88%, transparent), color-mix(in srgb, var(--surface-soft) 74%, transparent));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 12px 20px rgba(18, 38, 63, 0.09);
  position: relative;
  overflow: hidden;
}

.birthday-avatar {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #8e7dff, #18a999);
  font-size: 1.35rem;
  font-weight: 800;
  box-shadow:
    inset 6px 8px 10px rgba(255, 255, 255, 0.22),
    inset -8px -10px 12px rgba(0, 0, 0, 0.18);
}

.birthday-icon {
  font-size: 1.55rem;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
}

.birthday-card strong,
.birthday-card p,
.birthday-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.birthday-card strong {
  color: var(--text);
}

.birthday-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.birthday-card small {
  direction: ltr;
  margin-top: 2px;
  color: var(--muted);
  text-align: right;
}

.dollars-panel {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface) 94%, transparent), color-mix(in srgb, var(--surface-soft) 76%, transparent)),
    radial-gradient(circle at 14% 0%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 36%);
  box-shadow: var(--shadow);
}

.dollars-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.28), transparent 24%),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.04));
}

.dollars-panel > * {
  position: relative;
  z-index: 1;
}

.api-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.dollars-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.dollars-kpis article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface) 86%, transparent), color-mix(in srgb, var(--surface-soft) 74%, transparent));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 12px 20px rgba(18, 38, 63, 0.08);
}

.dollars-kpis article > span,
.dollars-kpis article > strong,
.dollars-kpis article > small {
  display: block;
}

.dollar-period-label {
  min-height: 2.45em;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.22;
}

.dollars-kpis article > strong {
  direction: ltr;
  margin-top: 6px;
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1.1;
}

.goal-progress {
  display: grid;
  gap: 9px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.46), transparent 34%),
    linear-gradient(145deg, color-mix(in srgb, var(--accent-soft) 74%, transparent), color-mix(in srgb, var(--surface) 86%, transparent));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    0 12px 24px rgba(18, 38, 63, 0.08);
}

.goal-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.goal-progress-head span,
.goal-progress-head b {
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 900;
}

.goal-progress-head b {
  direction: ltr;
  padding: 5px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 62%, transparent);
  border-radius: 999px;
  color: #ffffff;
  background:
    linear-gradient(135deg, #0b6f46, #16a463);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 0 16px color-mix(in srgb, var(--accent) 44%, transparent);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.38);
}

.goal-track {
  height: 18px;
  overflow: hidden;
  position: relative;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent 42%),
    color-mix(in srgb, var(--surface) 74%, transparent);
  box-shadow:
    inset 0 3px 8px rgba(18, 38, 63, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.55);
}

.goal-track::after {
  content: "";
  position: absolute;
  inset: 3px 4px auto;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  pointer-events: none;
}

.goal-fill {
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, #06884f, #20d47b 38%, #b9ef6a 72%, #f6c452);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    inset 0 -5px 10px rgba(4, 92, 49, 0.22),
    0 0 22px color-mix(in srgb, var(--accent) 42%, transparent);
}

.goal-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, transparent 0 22%, rgba(255, 255, 255, 0.38) 32%, transparent 44%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0 8px, transparent 8px 16px);
  mix-blend-mode: screen;
}

.goal-progress small {
  margin-top: 0;
  color: color-mix(in srgb, var(--muted) 82%, var(--text));
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.55;
}

.goal-progress-compact {
  margin-top: 10px;
  padding: 10px;
  border-style: dashed;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface-soft) 82%, transparent), color-mix(in srgb, var(--surface) 90%, transparent));
}

.goal-progress-compact .goal-track {
  height: 14px;
}

.dollar-breakdown {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 76%, transparent);
}

.dollar-breakdown span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.dollar-breakdown b {
  direction: ltr;
  color: var(--text);
  font-size: 0.86rem;
}

.premium-goal-progress {
  display: grid;
  gap: 7px;
  margin-top: 2px;
  padding: 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 8px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface-soft) 84%, transparent), color-mix(in srgb, var(--surface) 88%, transparent));
}

.premium-goal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.premium-goal-head span,
.premium-goal-head b {
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 900;
}

.premium-goal-head b {
  direction: ltr;
  padding: 4px 8px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #1769aa, #20b2aa);
  box-shadow: 0 0 14px color-mix(in srgb, #20b2aa 34%, transparent);
}

.premium-goal-track {
  height: 12px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 48%),
    color-mix(in srgb, var(--surface) 72%, transparent);
  box-shadow: inset 0 2px 6px rgba(18, 38, 63, 0.14);
}

.premium-goal-fill {
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, #1769aa, #20b2aa 48%, #7bd88f);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 0 16px color-mix(in srgb, #20b2aa 38%, transparent);
}

.premium-goal-progress small {
  margin-top: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.premium-goal-progress-compact {
  border-style: dashed;
  background: color-mix(in srgb, var(--surface-soft) 78%, transparent);
}

.premium-goal-progress-compact .premium-goal-track {
  height: 10px;
}

.dollars-kpis small {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.company-pie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.company-pie-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.5), transparent 26%),
    linear-gradient(145deg, color-mix(in srgb, var(--surface) 88%, transparent), color-mix(in srgb, var(--surface-soft) 76%, transparent));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 14px 24px rgba(18, 38, 63, 0.08);
}

.company-pie-card.is-clickable {
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.company-pie-card.is-clickable:hover,
.company-pie-card.is-clickable:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 52%, var(--line));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 18px 34px rgba(18, 38, 63, 0.14);
  outline: none;
  transform: translateY(-2px);
}

.company-pie-card header {
  display: grid;
  gap: 3px;
  margin-bottom: 10px;
}

.company-pie-card header span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.company-pie-card header strong {
  color: var(--text);
  font-size: 0.98rem;
}

.company-pie-wrap {
  display: grid;
  place-items: center;
  min-height: 170px;
}

.company-pie {
  position: relative;
  width: min(162px, 100%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  box-shadow:
    inset 10px 12px 18px rgba(255, 255, 255, 0.26),
    inset -12px -14px 22px rgba(0, 0, 0, 0.18),
    0 16px 26px rgba(18, 38, 63, 0.16);
}

.company-pie svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotate(-90deg);
}

.company-slice {
  fill: none;
  stroke: var(--slice-color);
  stroke-width: 22;
  stroke-dasharray: var(--slice-size) 100;
  stroke-dashoffset: var(--slice-offset);
  stroke-linecap: butt;
  cursor: pointer;
  filter: drop-shadow(0 5px 5px rgba(18, 38, 63, 0.14));
  transition: stroke-width 0.16s ease, filter 0.16s ease, opacity 0.16s ease;
}

.company-pie:hover .company-slice {
  opacity: 0.72;
}

.company-pie .company-slice:hover {
  opacity: 1;
  stroke-width: 26;
  filter: drop-shadow(0 8px 8px rgba(18, 38, 63, 0.22));
}

.company-pie::after {
  content: "";
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  background: var(--surface);
  box-shadow:
    inset 0 2px 8px rgba(18, 38, 63, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.45);
}

.company-pie span {
  position: relative;
  z-index: 2;
  direction: ltr;
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  font-size: 1rem;
  font-weight: 900;
  white-space: nowrap;
}

.company-pie-legend {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.company-pie-legend div {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.company-pie-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #20d47b;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 12%, transparent);
}

.company-pie-legend div:nth-child(2) i {
  background: #4aa3ff;
}

.company-pie-legend div:nth-child(3) i {
  background: #f6c452;
}

.company-pie-legend div:nth-child(4) i {
  background: #ff6b82;
}

.company-pie-legend div:nth-child(5) i {
  background: #9b7cff;
}

.company-pie-legend span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-pie-legend b {
  direction: ltr;
  color: var(--text);
}

.slice-tooltip {
  position: fixed;
  z-index: 80;
  max-width: 240px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: var(--radius);
  color: var(--text);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface) 96%, transparent), color-mix(in srgb, var(--surface-soft) 94%, transparent));
  box-shadow: 0 18px 38px rgba(18, 38, 63, 0.18);
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1.45;
  pointer-events: none;
  transform: translate(12px, 12px);
  white-space: pre-line;
}

.slice-tooltip.radar-tooltip {
  max-width: 280px;
  border-color: rgba(34, 197, 94, 0.42);
  color: #102016;
  background:
    linear-gradient(145deg, rgba(240, 253, 244, 0.98), rgba(220, 252, 231, 0.96));
  box-shadow:
    0 18px 38px rgba(2, 44, 21, 0.2),
    inset 3px 0 0 rgba(239, 35, 60, 0.86);
  direction: rtl;
  text-align: right;
}

:root[data-theme="dark"] .slice-tooltip.radar-tooltip {
  border-color: rgba(74, 222, 128, 0.52);
  color: #f0fdf4;
  background:
    linear-gradient(145deg, rgba(8, 47, 28, 0.98), rgba(15, 23, 42, 0.98));
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.44),
    inset 3px 0 0 rgba(251, 113, 133, 0.92),
    0 0 0 1px rgba(187, 247, 208, 0.08);
}

.mini-empty {
  min-height: 170px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.birthday-details {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(23, 105, 170, 0.96), rgba(24, 169, 153, 0.96));
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.birthday-card:hover .birthday-details,
.birthday-card:focus-within .birthday-details {
  opacity: 1;
  transform: translateY(0);
}

.birthday-details span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.birthday-details span:nth-child(n + 2) {
  direction: ltr;
  text-align: right;
  font-size: 0.9rem;
  opacity: 0.9;
}

.birthday-whatsapp {
  justify-self: start;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 999px;
  color: #0f3f35;
  background: #fff;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.birthday-whatsapp:hover,
.birthday-whatsapp:focus-visible {
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

.gauge-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.gauge-card,
.bar-dashboard {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow);
}

.gauge-card {
  min-height: 132px;
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 22px;
}

.gauge-card span {
  color: var(--muted);
  font-weight: 700;
}

.gauge-card strong {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1;
}

.gauge-card .small-value {
  font-size: clamp(1.25rem, 3vw, 1.8rem);
  line-height: 1.2;
}

.task-search-card {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow);
}

.task-search-card .section-title {
  margin-bottom: 0;
}

.task-search-card .section-title > strong {
  min-width: 42px;
  min-height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--primary);
  font-size: 1.2rem;
}

.task-search-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 190px) minmax(150px, 190px);
  gap: 12px;
  align-items: end;
}

.task-search-form label {
  display: grid;
  gap: 7px;
}

.task-search-form span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.task-search-form input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  font: inherit;
  font-weight: 700;
}

.task-search-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.task-search-result {
  min-height: 74px;
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-soft);
  text-align: right;
  cursor: pointer;
}

.task-search-result:hover,
.task-search-result:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}

.task-search-result strong,
.task-search-result span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-search-result span,
.task-search-empty {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.task-search-empty {
  margin: 0;
}

.bar-dashboard {
  padding: 24px;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.compact-chart-card {
  min-width: 0;
  padding: 18px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface) 94%, transparent), color-mix(in srgb, var(--surface-soft) 78%, transparent)),
    radial-gradient(circle at 18% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 34%);
}

.compact-chart-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.34), transparent 26%),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.04));
}

.compact-chart-card > * {
  position: relative;
  z-index: 1;
}

.compact-chart-card .section-title {
  margin-bottom: 14px;
}

.compact-chart-card h2 {
  font-size: 1.12rem;
}

.task-bar-chart {
  height: min(58vh, 560px);
  min-height: 380px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(106px, 1fr));
  gap: 14px;
  align-items: end;
  padding: 24px 10px 0;
  border-top: 1px solid var(--line);
  position: relative;
  background:
    linear-gradient(to top, color-mix(in srgb, var(--primary) 9%, transparent) 0 1px, transparent 1px 25%),
    radial-gradient(ellipse at center bottom, color-mix(in srgb, var(--accent) 13%, transparent), transparent 58%);
  border-radius: var(--radius);
  transform-style: preserve-3d;
}

.task-bar-chart::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 48px;
  height: 34px;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(20, 38, 56, 0.16), transparent 70%);
  filter: blur(2px);
}

.compact-bar-chart {
  height: 310px;
  min-height: 310px;
  grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
  gap: 9px;
  padding-top: 16px;
}

.task-bar-item {
  min-width: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 12px;
  height: 100%;
  position: relative;
  z-index: 1;
}

.task-bar-item.is-clickable {
  cursor: pointer;
  border-radius: var(--radius);
}

.task-bar-item.is-clickable:hover .task-bar-track,
.task-bar-item.is-clickable:focus-visible .task-bar-track {
  box-shadow:
    inset 5px 0 10px rgba(255, 255, 255, 0.28),
    inset -6px 0 10px rgba(0, 0, 0, 0.08),
    0 18px 28px rgba(93, 83, 199, 0.28);
}

.task-bar-item.is-clickable:focus-visible {
  outline: 3px solid color-mix(in srgb, #8e7dff 70%, transparent);
  outline-offset: 6px;
}

.task-bar-track {
  height: 100%;
  display: flex;
  align-items: end;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.28), transparent 18%, rgba(0, 0, 0, 0.08) 100%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface-soft) 68%, #fff), var(--surface-soft));
  box-shadow:
    inset 5px 0 10px rgba(255, 255, 255, 0.28),
    inset -6px 0 10px rgba(0, 0, 0, 0.08),
    0 12px 18px rgba(18, 38, 63, 0.12);
  overflow: visible;
  transform: perspective(560px) rotateX(2deg);
}

.combined-track {
  position: relative;
}

.task-bar-fill {
  width: 100%;
  min-height: 28px;
  display: flex;
  align-items: start;
  justify-content: center;
  padding-top: 10px;
  color: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(180deg, var(--accent), var(--primary));
  font-weight: 800;
  position: relative;
  transform-style: preserve-3d;
  box-shadow:
    inset 8px 0 12px rgba(255, 255, 255, 0.22),
    inset -10px 0 14px rgba(0, 0, 0, 0.18),
    0 14px 22px rgba(23, 105, 170, 0.24);
}

.task-bar-fill::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 13px;
  border-radius: var(--radius) var(--radius) 2px 2px;
  background: rgba(255, 255, 255, 0.36);
  transform: translateY(-6px) skewX(-18deg);
  transform-origin: bottom;
}

.task-bar-fill::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 18px;
  border-radius: 0 var(--radius) 0 0;
  background: rgba(0, 0, 0, 0.12);
}

.task-bar-fill.total-fill {
  background: linear-gradient(155deg, #45e3cf 0%, var(--accent) 32%, var(--primary) 100%);
}

.task-bar-fill.open-fill {
  background: linear-gradient(155deg, #ffe08a 0%, var(--warning) 38%, #c97917 100%);
}

.task-bar-fill.potential-fill {
  background: linear-gradient(155deg, #c5bcff 0%, #8e7dff 36%, #5d53c7 100%);
}

.task-bar-fill.handler-fill {
  background: linear-gradient(155deg, #9be7ff 0%, #2f9bd8 38%, #1769aa 100%);
}

.handler-bar-chart {
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
}

.handler-bar-item strong {
  min-height: 54px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.overlay-fill {
  position: absolute;
  left: 18%;
  bottom: 0;
  width: 64%;
  z-index: 2;
  box-shadow:
    inset 7px 0 10px rgba(255, 255, 255, 0.24),
    inset -8px 0 12px rgba(0, 0, 0, 0.16),
    0 -8px 18px rgba(0, 0, 0, 0.16);
}

.task-bar-fill span {
  direction: ltr;
}

.task-bar-item strong {
  min-height: 42px;
  display: block;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.25;
  text-align: center;
}

.task-bar-item strong small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: -8px 0 14px;
  color: var(--muted);
  font-weight: 700;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chart-legend i {
  width: 12px;
  height: 12px;
  display: inline-block;
  border-radius: 3px;
}

.legend-total {
  background: var(--primary);
}

.legend-open {
  background: var(--warning);
}

.legend-potential {
  background: #6f63e8;
}

.potential-dashboard {
  grid-column: 1 / -1;
  margin-top: 0;
  border-color: color-mix(in srgb, #8e7dff 24%, var(--line));
}

.potential-radar-panel {
  display: grid;
  grid-template-columns: minmax(190px, 0.42fr) minmax(220px, 1fr);
  gap: 18px;
  align-items: center;
  margin-top: 22px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, #16a34a 30%, var(--line));
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 90%, #02140a), color-mix(in srgb, var(--surface-soft) 78%, #052e16)),
    radial-gradient(circle at 78% 18%, rgba(34, 197, 94, 0.2), transparent 34%);
}

.potential-radar-copy span,
.potential-radar-copy strong {
  display: block;
}

.potential-radar-copy span {
  color: var(--muted);
  font-weight: 800;
}

.potential-radar-copy strong {
  margin-top: 6px;
  color: var(--text);
  font-size: 1.3rem;
}

.potential-radar-copy small {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-weight: 750;
  line-height: 1.45;
}

.potential-radar-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 16px;
}

.potential-radar-metrics div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, #16a34a 22%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 72%, #dcfce7);
}

.potential-radar-metrics span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.potential-radar-metrics b {
  direction: ltr;
  color: var(--text);
  font-size: 0.96rem;
}

.potential-radar {
  width: min(340px, 100%);
  aspect-ratio: 1;
  justify-self: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 197, 94, 0.58);
  border-radius: 50%;
  outline: none;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(74, 222, 128, 0.42) 50%, transparent calc(50% + 1px)),
    linear-gradient(0deg, transparent calc(50% - 1px), rgba(74, 222, 128, 0.42) 50%, transparent calc(50% + 1px)),
    repeating-radial-gradient(circle, rgba(74, 222, 128, 0.36) 0 1px, transparent 1px 18%),
    radial-gradient(circle at 50% 50%, rgba(22, 163, 74, 0.2), rgba(2, 44, 21, 0.94) 62%, #011707 100%);
  box-shadow:
    inset 0 0 34px rgba(34, 197, 94, 0.34),
    0 20px 36px rgba(2, 44, 21, 0.2);
  isolation: isolate;
}

.potential-radar:focus-visible {
  box-shadow:
    0 0 0 4px color-mix(in srgb, #22c55e 34%, transparent),
    inset 0 0 34px rgba(34, 197, 94, 0.34),
    0 20px 36px rgba(2, 44, 21, 0.2);
}

.potential-radar::before,
.potential-radar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}

.potential-radar::before {
  z-index: 1;
  background: conic-gradient(from -28deg, rgba(74, 222, 128, 0.66) 0deg, rgba(74, 222, 128, 0.24) 26deg, transparent 58deg);
  mix-blend-mode: screen;
  animation: potential-radar-spin 3.4s linear infinite;
}

.potential-radar::after {
  z-index: 4;
  border: 1px solid rgba(187, 247, 208, 0.24);
  box-shadow: inset 0 0 22px rgba(187, 247, 208, 0.18);
}

.potential-radar-sweep {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 50%;
  height: 2px;
  display: block;
  background: linear-gradient(90deg, rgba(187, 247, 208, 0.94), rgba(34, 197, 94, 0));
  transform-origin: 0 50%;
  animation: potential-radar-line 3.4s linear infinite;
  z-index: 3;
}

.potential-radar-core {
  width: 14px;
  height: 14px;
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  border-radius: 50%;
  background: #bbf7d0;
  box-shadow: 0 0 18px rgba(134, 239, 172, 0.9);
  transform: translate(-50%, -50%);
  z-index: 5;
}

.potential-radar-dot {
  width: var(--dot-size, 10px);
  height: var(--dot-size, 10px);
  position: absolute;
  left: var(--dot-x);
  top: var(--dot-y);
  display: block;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  background: #ef233c;
  box-shadow:
    0 0 0 2px rgba(239, 35, 60, 0.18),
    0 0 14px rgba(239, 35, 60, 0.78);
  transform: translate(-50%, -50%);
  animation:
    potential-radar-dot-pulse 1.8s ease-in-out infinite var(--dot-delay),
    potential-radar-dot-scan 3.4s linear infinite var(--scan-delay);
  cursor: help;
  z-index: 6;
}

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

@keyframes potential-radar-line {
  to {
    transform: rotate(360deg);
  }
}

@keyframes potential-radar-dot-pulse {
  0%,
  100% {
    opacity: 0.72;
    transform: translate(-50%, -50%) scale(0.86);
  }

  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
  }
}

@keyframes potential-radar-dot-scan {
  0%,
  7% {
    background: #ff4058;
    box-shadow:
      0 0 0 5px rgba(239, 35, 60, 0.24),
      0 0 26px rgba(255, 64, 88, 0.98),
      0 0 34px rgba(134, 239, 172, 0.72);
    filter: brightness(1.24) saturate(1.16);
  }

  18%,
  100% {
    background: #ef233c;
    box-shadow:
      0 0 0 2px rgba(239, 35, 60, 0.18),
      0 0 14px rgba(239, 35, 60, 0.78);
    filter: none;
  }
}

.hotel-bell-mascot {
  width: min(220px, 100%);
  height: 172px;
  position: relative;
  justify-self: center;
  display: block;
  grid-column: 1 / -1;
  margin: -4px auto 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.hotel-bell-mascot:focus-visible {
  box-shadow: 0 0 0 4px color-mix(in srgb, #8c959f 38%, transparent);
}

.hotel-bell-body {
  width: 154px;
  height: 100px;
  position: absolute;
  left: 50%;
  top: 30px;
  display: block;
  border: 4px solid #1f2328;
  border-radius: 80px 80px 24px 24px;
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.78) 0 10px, transparent 11px),
    linear-gradient(135deg, #f4f6f8 0%, #aeb4bb 42%, #5f6872 72%, #24292f 100%);
  box-shadow:
    inset 14px 16px 16px rgba(255, 255, 255, 0.28),
    inset -12px -16px 18px rgba(0, 0, 0, 0.26),
    0 16px 26px rgba(18, 38, 63, 0.16);
  transform: translateX(-50%);
  transform-origin: 50% 86%;
  animation: hotel-bell-breathe 2.7s ease-in-out infinite;
  z-index: 3;
}

.hotel-bell-mascot:hover .hotel-bell-body,
.hotel-bell-mascot:focus-visible .hotel-bell-body {
  filter: saturate(1.1) brightness(1.02);
}

.hotel-bell-mascot:active .hotel-bell-body,
.hotel-bell-mascot.is-ringing .hotel-bell-body {
  animation: hotel-bell-ring 0.38s ease, hotel-bell-breathe 2.7s ease-in-out infinite 0.38s;
}

.hotel-bell-button {
  width: 42px;
  height: 18px;
  position: absolute;
  left: 50%;
  top: -20px;
  display: block;
  border: 4px solid #1f2328;
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(135deg, #f7f8fa, #8c959f 62%, #24292f);
  transform: translateX(-50%);
}

.hotel-bell-eye {
  width: 26px;
  height: 28px;
  position: absolute;
  top: 38px;
  display: grid;
  place-items: center;
  border: 3px solid #1f2328;
  border-radius: 50%;
  background: #f7f8fa;
  overflow: hidden;
}

.hotel-bell-eye span {
  width: 9px;
  height: 9px;
  display: block;
  border-radius: 50%;
  background: #111418;
  animation: bell-eye-look 3s ease-in-out infinite;
}

.hotel-bell-eye-left {
  left: 42px;
}

.hotel-bell-eye-right {
  right: 42px;
}

.hotel-bell-smile {
  width: 34px;
  height: 16px;
  position: absolute;
  left: 50%;
  bottom: 22px;
  border-bottom: 4px solid #1f2328;
  border-radius: 0 0 999px 999px;
  transform: translateX(-50%);
}

.hotel-bell-base {
  width: 184px;
  height: 24px;
  position: absolute;
  left: 50%;
  bottom: 32px;
  display: block;
  border: 4px solid #1f2328;
  border-radius: 999px;
  background: linear-gradient(135deg, #f7f8fa, #8c959f 54%, #24292f);
  box-shadow: 0 12px 18px rgba(18, 38, 63, 0.18);
  transform: translateX(-50%);
  z-index: 4;
}

.hotel-bell-clapper {
  width: 18px;
  height: 10px;
  position: absolute;
  left: 50%;
  bottom: 22px;
  display: block;
  border-radius: 50%;
  background: #24292f;
  transform: translateX(-50%);
  z-index: 2;
}

.hotel-bell-shadow {
  width: 170px;
  height: 18px;
  position: absolute;
  left: 50%;
  bottom: 14px;
  display: block;
  border-radius: 50%;
  background: rgba(18, 38, 63, 0.14);
  transform: translateX(-50%);
  animation: hotel-bell-shadow 2.7s ease-in-out infinite;
}

.hotel-bell-spark {
  width: 10px;
  height: 10px;
  position: absolute;
  display: block;
  border-radius: 50%;
  background: #8c959f;
  opacity: 0;
  box-shadow: 0 0 0 5px color-mix(in srgb, #8c959f 24%, transparent);
}

.floating-dollar {
  position: fixed;
  z-index: 2147483647;
  pointer-events: none;
  direction: ltr;
  color: #10b85a;
  font-size: clamp(4.2rem, 8vw, 7rem);
  font-weight: 950;
  line-height: 1;
  text-shadow:
    0 3px 0 #08763b,
    0 12px 24px rgba(16, 184, 90, 0.32),
    0 0 18px rgba(16, 184, 90, 0.34);
  transform: translate(-50%, -50%);
  animation: floating-dollar-rise 1.15s cubic-bezier(0.2, 0.86, 0.24, 1) forwards;
  will-change: transform, opacity;
}

.spark-one {
  left: 34px;
  top: 36px;
}

.spark-two {
  right: 30px;
  top: 46px;
}

.spark-three {
  left: 50%;
  top: 8px;
}

.hotel-bell-mascot.is-ringing .hotel-bell-spark {
  animation: hotel-bell-spark 0.42s ease;
}

.hotel-bell-mascot.is-ringing .spark-two {
  animation-delay: 0.04s;
}

.hotel-bell-mascot.is-ringing .spark-three {
  animation-delay: 0.08s;
}

@keyframes hotel-bell-breathe {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(0deg); }
  50% { transform: translateX(-50%) translateY(-6px) rotate(0.8deg); }
}

@keyframes hotel-bell-ring {
  0%, 100% { transform: translateX(-50%) rotate(0deg) scale(1); }
  18% { transform: translateX(-50%) rotate(-10deg) scale(1.03); }
  38% { transform: translateX(-50%) rotate(9deg) scale(1.04); }
  58% { transform: translateX(-50%) rotate(-7deg) scale(1.02); }
  78% { transform: translateX(-50%) rotate(4deg) scale(1.01); }
}

@keyframes bell-eye-look {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-4px, -1px); }
  55% { transform: translate(4px, 2px); }
  75% { transform: translate(1px, 4px); }
}

@keyframes hotel-bell-shadow {
  0%, 100% { opacity: 0.14; transform: translateX(-50%) scaleX(1); }
  50% { opacity: 0.09; transform: translateX(-50%) scaleX(0.84); }
}

@keyframes hotel-bell-spark {
  0% { opacity: 0; transform: translateY(8px) scale(0.4); }
  38% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-12px) scale(0.7); }
}

@keyframes floating-dollar-rise {
  0% {
    opacity: 0;
    transform: translate(-50%, -35%) scale(0.58) rotate(-12deg);
  }
  18% {
    opacity: 1;
    transform: translate(calc(-50% + var(--float-drift) * -0.18), -76%) scale(1.08) rotate(7deg);
  }
  52% {
    opacity: 1;
    transform: translate(calc(-50% + var(--float-drift) * 0.55), -158%) scale(1) rotate(-5deg);
  }
  78% {
    opacity: 0.82;
    transform: translate(calc(-50% + var(--float-drift) * -0.22), -228%) scale(0.86) rotate(8deg);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--float-drift)), -300%) scale(0.62) rotate(-10deg);
  }
}

.sales-charts-grid {
  gap: 18px;
}

.sales-agent-section {
  grid-column: 1 / -1;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface) 94%, transparent), color-mix(in srgb, var(--surface-soft) 78%, transparent)),
    radial-gradient(circle at 12% 0%, color-mix(in srgb, #20b2aa 16%, transparent), transparent 34%);
  box-shadow: var(--shadow);
}

.sales-agent-section-title {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

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

.sales-agent-dollar-card {
  min-height: 0;
  margin-top: 0;
  padding: 14px;
  border-color: color-mix(in srgb, var(--accent) 22%, var(--line));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 10px 18px rgba(18, 38, 63, 0.07);
}

.sales-agent-dollar-card .section-title {
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.sales-agent-dollar-card h2 {
  font-size: 1rem;
}

.sales-agent-dollar-card .potential-summary {
  min-width: 130px;
  padding: 9px 10px;
}

.sales-agent-dollar-card .potential-summary strong {
  font-size: 1.08rem;
}

.sales-agent-pie-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.sales-agent-pie-block {
  min-width: 0;
  display: grid;
  align-content: start;
}

.sales-agent-pie-block h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 950;
  text-align: center;
}

.sales-agent-pie-layout {
  display: grid;
  gap: 10px;
  align-items: start;
  justify-items: center;
}

.sales-agent-pie {
  width: min(162px, 100%);
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 50%;
  box-shadow:
    inset 10px 12px 18px rgba(255, 255, 255, 0.26),
    inset -12px -14px 22px rgba(0, 0, 0, 0.18),
    0 16px 26px rgba(18, 38, 63, 0.16);
}

.sales-agent-pie svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotate(-90deg);
}

.sales-agent-slice {
  fill: none;
  stroke: var(--slice-color);
  stroke-width: 22;
  stroke-dasharray: var(--slice-size) 100;
  stroke-dashoffset: var(--slice-offset);
  stroke-linecap: butt;
  cursor: pointer;
  filter: drop-shadow(0 5px 5px rgba(18, 38, 63, 0.14));
  transition: stroke-width 0.16s ease, filter 0.16s ease, opacity 0.16s ease;
}

.sales-agent-pie:hover .sales-agent-slice {
  opacity: 0.72;
}

.sales-agent-pie .sales-agent-slice:hover {
  opacity: 1;
  stroke-width: 26;
  filter: drop-shadow(0 8px 8px rgba(18, 38, 63, 0.22));
}

.sales-agent-pie::after {
  content: "";
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  background: var(--surface);
  box-shadow:
    inset 0 2px 8px rgba(18, 38, 63, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.45);
}

.sales-agent-pie span {
  position: relative;
  z-index: 2;
  direction: ltr;
  max-width: 92px;
  overflow: hidden;
  color: var(--text);
  font-size: 1rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-agent-pie-legend {
  display: grid;
  width: 100%;
  gap: 7px;
  margin-top: 10px;
  min-width: 0;
}

.sales-agent-pie-legend div {
  min-width: 0;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.sales-agent-pie-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #20d47b;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 12%, transparent);
}

.sales-agent-pie-legend span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-agent-pie-legend b {
  direction: ltr;
  color: var(--text);
}

.sales-agent-pie-legend small {
  display: none;
}

.api-output {
  max-height: 520px;
  overflow: auto;
  direction: ltr;
  margin: 0;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  border-radius: 8px;
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 82%, #0b1220);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.78rem;
  line-height: 1.55;
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.potential-summary {
  min-width: 180px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

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

.potential-summary span {
  color: var(--muted);
  font-weight: 700;
}

.potential-summary strong {
  direction: ltr;
  margin-top: 4px;
  font-size: 1.35rem;
}

.task-age-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.62fr);
  gap: 16px;
  align-items: stretch;
  margin-top: 16px;
}

.age-dashboard {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface) 94%, transparent), color-mix(in srgb, var(--surface-soft) 76%, transparent)),
    radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--warning) 18%, transparent), transparent 34%);
  box-shadow: var(--shadow);
}

.task-age-layout .age-dashboard {
  margin-top: 0;
}

.age-dashboard::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.3), transparent 24%),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.04));
}

.age-dashboard > * {
  position: relative;
  z-index: 1;
}

.temporary-risk-period-card {
  margin-bottom: 16px;
}

.temporary-risk-period-card .age-row:nth-child(1) .age-track span {
  background: linear-gradient(90deg, #ff8a8a, var(--danger));
}

.temporary-risk-period-card .age-row:nth-child(2) .age-track span {
  background: linear-gradient(90deg, #ffe08a, var(--warning));
}

.temporary-risk-period-card .age-row:nth-child(3) .age-track span {
  background: linear-gradient(90deg, #20d9aa, #18a999);
}

.task-handler-pie-card {
  display: grid;
  align-content: start;
}

.task-handler-pie-layout {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.task-handler-pie {
  position: relative;
  width: min(220px, 100%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  justify-self: center;
  box-shadow:
    inset 10px 12px 18px rgba(255, 255, 255, 0.26),
    inset -12px -14px 22px rgba(0, 0, 0, 0.18),
    0 16px 26px rgba(18, 38, 63, 0.16);
}

.task-handler-pie svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotate(-90deg);
}

.task-handler-slice {
  fill: none;
  stroke: var(--slice-color);
  stroke-width: 22;
  stroke-dasharray: var(--slice-size) 100;
  stroke-dashoffset: var(--slice-offset);
  stroke-linecap: butt;
  cursor: pointer;
  filter: drop-shadow(0 5px 5px rgba(18, 38, 63, 0.14));
  transition: stroke-width 0.16s ease, filter 0.16s ease, opacity 0.16s ease;
}

.task-handler-pie:hover .task-handler-slice {
  opacity: 0.72;
}

.task-handler-pie .task-handler-slice:hover {
  opacity: 1;
  stroke-width: 26;
  filter: drop-shadow(0 8px 8px rgba(18, 38, 63, 0.22));
}

.task-handler-pie::after {
  content: "";
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  background: var(--surface);
  box-shadow:
    inset 0 0 0 1px var(--line),
    0 8px 18px rgba(18, 38, 63, 0.12);
}

.task-handler-pie span {
  position: relative;
  z-index: 2;
  direction: ltr;
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 950;
}

.task-handler-pie-legend {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.task-handler-pie-legend div {
  min-width: 0;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  cursor: pointer;
  transition: background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}

.task-handler-pie-legend div:hover,
.task-handler-pie-legend div:focus-visible {
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  box-shadow: inset 0 0 0 1px var(--line);
  outline: none;
}

.task-handler-pie-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 12%, transparent);
}

.task-handler-pie-legend span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-handler-pie-legend b {
  direction: ltr;
  color: var(--text);
}

.age-bars {
  display: grid;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  background:
    linear-gradient(to left, color-mix(in srgb, var(--primary) 8%, transparent) 0 1px, transparent 1px 25%),
    radial-gradient(ellipse at right center, color-mix(in srgb, var(--warning) 12%, transparent), transparent 58%);
  border-radius: var(--radius);
  padding: 18px 12px 4px;
}

.age-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 44px;
  gap: 12px;
  align-items: center;
}

.age-row.is-clickable {
  cursor: pointer;
}

.age-row.is-clickable:hover strong,
.age-row.is-clickable:focus-visible strong {
  color: var(--primary);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--primary) 62%, var(--line)),
    0 8px 18px color-mix(in srgb, var(--primary) 16%, transparent);
}

.age-row.is-clickable:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 34%, transparent);
  outline-offset: 5px;
  border-radius: var(--radius);
}

.age-row strong {
  color: var(--text);
  font-size: 0.95rem;
  padding: 8px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  box-shadow: inset 0 0 0 1px var(--line);
}

.age-row b {
  direction: ltr;
  color: var(--text);
  text-align: left;
  font-size: 1.1rem;
  padding: 6px 8px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.age-track {
  height: 28px;
  overflow: visible;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.26), transparent 20%, rgba(0, 0, 0, 0.08)),
    var(--surface-soft);
  box-shadow:
    inset 5px 0 10px rgba(255, 255, 255, 0.25),
    inset -7px 0 12px rgba(0, 0, 0, 0.1),
    0 10px 16px rgba(18, 38, 63, 0.1);
  transform: perspective(520px) rotateX(3deg);
}

.age-track span {
  height: 100%;
  display: block;
  border-radius: inherit;
  position: relative;
  background: linear-gradient(90deg, var(--accent), var(--warning));
  box-shadow:
    inset 8px 0 14px rgba(255, 255, 255, 0.22),
    inset -10px 0 14px rgba(0, 0, 0, 0.16),
    0 8px 16px color-mix(in srgb, var(--warning) 28%, transparent);
}

.age-track span::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

.age-row:nth-child(1) .age-track span {
  background: linear-gradient(90deg, #20d9aa, #18a999);
}

.age-row:nth-child(2) .age-track span {
  background: linear-gradient(90deg, #65c7ff, #1769aa);
}

.age-row:nth-child(3) .age-track span {
  background: linear-gradient(90deg, #ffe08a, var(--warning));
}

.age-row:nth-child(4) .age-track span {
  background: linear-gradient(90deg, #ff8a8a, var(--danger));
}

.task-agent-age-section {
  margin-top: 16px;
}

.task-agent-age-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.task-agent-age-card {
  min-width: 0;
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface) 92%, transparent), color-mix(in srgb, var(--surface-soft) 78%, transparent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.task-agent-age-card header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.task-agent-age-card header div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.task-agent-age-card header span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.task-agent-age-card header strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-agent-age-card header b {
  direction: ltr;
  min-width: 42px;
  padding: 7px 9px;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-align: center;
  box-shadow: inset 0 0 0 1px var(--line);
}

.task-agent-age-body {
  display: grid;
  grid-template-columns: minmax(118px, 0.55fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.task-age-pie {
  position: relative;
  width: min(150px, 100%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  justify-self: center;
  border-radius: 50%;
  box-shadow:
    inset 8px 10px 16px rgba(255, 255, 255, 0.24),
    inset -10px -12px 18px rgba(0, 0, 0, 0.16),
    0 12px 20px rgba(18, 38, 63, 0.14);
}

.task-age-pie svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotate(-90deg);
}

.task-age-slice {
  fill: none;
  stroke: var(--slice-color);
  stroke-width: 22;
  stroke-dasharray: var(--slice-size) 100;
  stroke-dashoffset: var(--slice-offset);
  stroke-linecap: butt;
  cursor: pointer;
  filter: drop-shadow(0 5px 5px rgba(18, 38, 63, 0.14));
  transition: stroke-width 0.16s ease, filter 0.16s ease, opacity 0.16s ease;
}

.task-age-pie:hover .task-age-slice {
  opacity: 0.72;
}

.task-age-pie .task-age-slice:hover {
  opacity: 1;
  stroke-width: 26;
  filter: drop-shadow(0 8px 8px rgba(18, 38, 63, 0.22));
}

.task-age-pie::after {
  content: "";
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  background: var(--surface);
  box-shadow:
    inset 0 0 0 1px var(--line),
    0 8px 16px rgba(18, 38, 63, 0.1);
}

.task-age-pie span {
  position: relative;
  z-index: 2;
  direction: ltr;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 950;
}

.task-age-legend {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.task-age-legend div {
  min-width: 0;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto auto;
  gap: 7px;
  align-items: center;
  padding: 7px 8px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.task-age-legend div.is-clickable {
  cursor: pointer;
  transition: background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}

.task-age-legend div.is-clickable:hover,
.task-age-legend div.is-clickable:focus-visible {
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  box-shadow: inset 0 0 0 1px var(--line);
  outline: none;
}

.task-age-legend div.is-empty {
  opacity: 0.56;
}

.task-age-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.task-age-legend span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-age-legend b,
.task-age-legend small {
  direction: ltr;
  color: var(--text);
}

.task-age-legend small {
  color: var(--muted);
}

.closure-time-card {
  grid-column: 1 / -1;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface) 94%, transparent), color-mix(in srgb, var(--surface-soft) 78%, transparent)),
    radial-gradient(circle at 12% 0%, color-mix(in srgb, #20d9aa 15%, transparent), transparent 34%);
  box-shadow: var(--shadow);
}

.task-agent-summary-card {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow);
}

.task-agent-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.task-agent-summary-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.task-agent-summary-item > span {
  overflow: hidden;
  color: var(--text);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-agent-summary-item div {
  min-width: 58px;
  display: grid;
  justify-items: center;
  gap: 3px;
}

.task-agent-summary-item strong {
  font-size: 1.45rem;
  line-height: 1;
}

.task-agent-summary-item small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

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

.closure-kpis div {
  min-width: 116px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
}

.closure-kpis span,
.closure-kpis strong {
  display: block;
}

.closure-kpis span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.closure-kpis strong {
  margin-top: 3px;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 950;
  white-space: nowrap;
}

.closure-chart {
  height: 300px;
  display: grid;
  grid-template-columns: repeat(5, minmax(72px, 1fr));
  gap: 12px;
  align-items: end;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.closure-bar-item {
  min-width: 0;
  display: grid;
  gap: 7px;
  align-items: end;
  text-align: center;
}

.closure-bar-track {
  height: 210px;
  position: relative;
  display: flex;
  align-items: end;
  padding: 34px 8px 8px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 86%, transparent), color-mix(in srgb, var(--surface-soft) 72%, transparent));
  overflow: visible;
}

.closure-bar-fill {
  width: 100%;
  min-height: 8px;
  position: relative;
  border-radius: 8px 8px 4px 4px;
  background:
    linear-gradient(180deg, color-mix(in srgb, #fff 30%, transparent), transparent 42%),
    linear-gradient(180deg, color-mix(in srgb, var(--closure-color) 78%, #fff), var(--closure-color));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 12px 20px color-mix(in srgb, var(--closure-color) 28%, transparent);
}

.closure-bar-value {
  position: absolute;
  left: 50%;
  top: 8px;
  direction: ltr;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 950;
  transform: translateX(-50%);
  z-index: 2;
}

.closure-bar-item.is-clickable {
  cursor: pointer;
}

.closure-bar-item.is-clickable .closure-bar-track {
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.closure-bar-item.is-clickable:hover .closure-bar-track,
.closure-bar-item.is-clickable:focus-visible .closure-bar-track {
  border-color: color-mix(in srgb, var(--accent) 62%, var(--line));
  outline: none;
  box-shadow: 0 16px 26px rgba(18, 38, 63, 0.14);
  transform: translateY(-2px);
}

.closure-bar-item.is-empty {
  opacity: 0.58;
}

.closure-bar-item strong {
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 950;
  white-space: nowrap;
}

.closure-bar-item small {
  direction: ltr;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.closure-range {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.closure-range span {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  font-weight: 850;
}

.closure-range strong {
  color: var(--text);
}

.traffic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.traffic-card {
  min-height: 210px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface) 94%, transparent), color-mix(in srgb, var(--surface-soft) 78%, transparent)),
    radial-gradient(circle at 10% 0%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 35%);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.traffic-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.3), transparent 24%),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.04));
}

.traffic-card > * {
  position: relative;
  z-index: 1;
}

.traffic-card .eyebrow {
  margin-top: 0;
}

.traffic-card h2 {
  font-size: 1.35rem;
}

.traffic-light {
  width: 74px;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, #000);
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.16), transparent 42%, rgba(0, 0, 0, 0.18)),
    #182432;
  box-shadow:
    inset 5px 0 10px rgba(255, 255, 255, 0.12),
    inset -8px 0 12px rgba(0, 0, 0, 0.32),
    0 18px 24px rgba(0, 0, 0, 0.18);
}

.traffic-light span {
  width: 48px;
  height: 48px;
  display: block;
  border-radius: 50%;
  position: relative;
  box-shadow:
    inset 6px 8px 10px rgba(255, 255, 255, 0.24),
    inset -8px -10px 12px rgba(0, 0, 0, 0.22);
}

.traffic-light span::after {
  content: "";
  position: absolute;
  inset: 8px 10px auto auto;
  width: 14px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  filter: blur(0.3px);
}

.traffic-red {
  background: radial-gradient(circle at 34% 24%, #ffd1d1, #ff4f5f 38%, #a9192a 100%);
  box-shadow:
    0 0 22px rgba(255, 79, 95, 0.42),
    inset 6px 8px 10px rgba(255, 255, 255, 0.24),
    inset -8px -10px 12px rgba(0, 0, 0, 0.22);
}

.traffic-yellow {
  background: radial-gradient(circle at 34% 24%, #fff7bf, #ffc83d 40%, #b7750c 100%);
  box-shadow:
    0 0 22px rgba(255, 200, 61, 0.42),
    inset 6px 8px 10px rgba(255, 255, 255, 0.24),
    inset -8px -10px 12px rgba(0, 0, 0, 0.22);
}

.traffic-green {
  background: radial-gradient(circle at 34% 24%, #caffdf, #22d172 42%, #087842 100%);
  box-shadow:
    0 0 22px rgba(34, 209, 114, 0.42),
    inset 6px 8px 10px rgba(255, 255, 255, 0.24),
    inset -8px -10px 12px rgba(0, 0, 0, 0.22);
}

.traffic-light:not(.active-red) .traffic-red,
.traffic-light:not(.active-yellow) .traffic-yellow,
.traffic-light:not(.active-green) .traffic-green {
  opacity: 0.3;
  filter: saturate(0.55);
  box-shadow:
    inset 6px 8px 10px rgba(255, 255, 255, 0.16),
    inset -8px -10px 12px rgba(0, 0, 0, 0.3);
}

.traffic-light.active-green .traffic-green,
.traffic-light.active-yellow .traffic-yellow,
.traffic-light.active-red .traffic-red {
  opacity: 1;
  filter: saturate(1.2) brightness(1.08);
  transform: scale(1.08);
}

.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at center, rgba(97, 168, 255, 0.16), transparent 42%),
    rgba(8, 14, 22, 0.58);
  backdrop-filter: blur(10px);
}

.modal-backdrop[hidden] {
  display: none;
}

.potential-modal {
  width: min(560px, 100%);
  max-height: min(720px, 88vh);
  overflow: auto;
  position: relative;
  padding: 24px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, #fff);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface) 96%, transparent), color-mix(in srgb, var(--surface-soft) 82%, transparent)),
    radial-gradient(circle at 20% 0%, color-mix(in srgb, #8e7dff 22%, transparent), transparent 38%);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  }

.potential-detail-modal {
  width: min(860px, 100%);
}

.lead-detail-modal {
  width: min(920px, 100%);
}

.potential-modal .eyebrow {
  margin-top: 0;
}

.potential-modal h2 {
  margin-bottom: 14px;
  font-size: clamp(1.45rem, 4vw, 2rem);
}

.modal-close {
  width: 40px;
  height: 40px;
  position: absolute;
  top: 14px;
  left: 14px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
}

.modal-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.modal-total span {
  color: var(--muted);
  font-weight: 800;
}

.modal-total strong {
  direction: ltr;
  font-size: 1.7rem;
}

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

.task-filter {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.task-filter span {
  color: var(--muted);
  font-weight: 900;
}

.task-filter select {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface);
  font: inherit;
  font-weight: 800;
}

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

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

.lead-modal-list.is-group-list {
  grid-template-columns: 1fr;
}

.lead-modal-row {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 84%, transparent);
}

.lead-modal-row span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.lead-modal-row strong {
  min-height: 22px;
  overflow-wrap: anywhere;
  color: var(--text);
  font-weight: 850;
  white-space: pre-wrap;
}

.lead-modal-row .boolean-display,
.task-field .boolean-display {
  display: inline-flex;
  min-height: 22px;
  margin-top: 2px;
  color: inherit;
  font-size: inherit;
}

.lead-modal-row .lead-edit-control {
  width: 100%;
}

.lead-modal-row .lead-edit-notes {
  min-width: 0;
}

.lead-group-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.lead-group-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
}

.lead-group-card .lead-modal-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.potential-client-row {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 34px auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  box-shadow: 0 10px 18px rgba(18, 38, 63, 0.08);
}

.task-modal-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px 10px;
  align-items: start;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  box-shadow: 0 8px 14px rgba(18, 38, 63, 0.07);
}

.task-row-actions {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: end;
}

.task-edit-button,
.task-save-button,
.task-cancel-button,
.task-close-button {
  min-height: 36px;
  padding: 0 10px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.task-edit-button,
.task-save-button {
  border: 1px solid color-mix(in srgb, var(--accent) 48%, var(--line));
  color: var(--accent);
}

.task-cancel-button {
  border: 1px solid color-mix(in srgb, var(--muted) 42%, var(--line));
  color: var(--muted);
}

.task-close-button {
  border: 1px solid color-mix(in srgb, var(--danger) 42%, var(--line));
  color: var(--danger);
}

.task-edit-button:hover,
.task-edit-button:focus-visible,
.task-save-button:hover,
.task-save-button:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 72%, var(--line));
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 10px 18px color-mix(in srgb, var(--accent) 18%, transparent);
}

.task-cancel-button:hover,
.task-cancel-button:focus-visible {
  border-color: color-mix(in srgb, var(--muted) 70%, var(--line));
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(18, 38, 63, 0.1);
}

.task-close-button:hover,
.task-close-button:focus-visible {
  border-color: color-mix(in srgb, var(--danger) 72%, var(--line));
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 10px 18px color-mix(in srgb, var(--danger) 18%, transparent);
}

.task-edit-button:disabled,
.task-save-button:disabled,
.task-cancel-button:disabled,
.task-close-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.task-modal-row b {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  direction: ltr;
  color: var(--text);
  white-space: nowrap;
}

.task-field-grid {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px;
}

.task-field {
  flex: 0 1 auto;
  width: fit-content;
  max-width: min(100%, 260px);
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 76%, transparent);
}

.task-field span,
.task-field strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-field span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.task-field strong {
  margin-top: 2px;
  color: var(--text);
  font-size: 0.88rem;
  overflow-wrap: normal;
  white-space: nowrap;
}

.task-edit-input {
  width: auto;
  max-width: min(100%, 220px);
  min-height: 36px;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
  border-radius: calc(var(--radius) - 2px);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  resize: vertical;
}

.task-edit-input:focus {
  border-color: color-mix(in srgb, var(--accent) 66%, var(--line));
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}

.task-field.is-long-text {
  flex: 1 1 360px;
  width: auto;
  max-width: 100%;
  position: relative;
  cursor: pointer;
}

.task-modal-row.is-editing .task-field.is-long-text {
  cursor: default;
}

.task-field.is-long-text strong {
  max-height: 2.6em;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
}

.task-field.is-long-text .task-edit-input {
  width: 100%;
  max-width: 100%;
  min-height: 76px;
}

.task-field.is-long-text:hover,
.task-field.is-long-text:focus,
.task-field.is-long-text.is-open {
  z-index: 8;
  border-color: color-mix(in srgb, var(--accent) 58%, var(--line));
  background: var(--surface);
  box-shadow: 0 18px 34px rgba(18, 38, 63, 0.18);
}

.task-field.is-long-text:hover strong,
.task-field.is-long-text:focus strong,
.task-field.is-long-text.is-open strong {
  max-height: none;
  overflow: visible;
  white-space: normal;
}

.potential-client-row.is-updating {
  opacity: 0.72;
}

.potential-client-row.is-updated {
  border-color: color-mix(in srgb, var(--accent) 58%, var(--line));
}

.potential-client-row.is-error {
  border-color: color-mix(in srgb, var(--danger) 58%, var(--line));
}

.client-rank {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #8e7dff, #5d53c7);
  font-weight: 800;
}

.potential-client-meta {
  grid-column: 1;
  min-width: 320px;
  display: grid;
  gap: 4px;
}

.potential-client-row > .client-rank {
  grid-column: 2;
}

.potential-client-row > b {
  grid-column: 3;
}

.potential-client-row > .potential-actions {
  grid-column: 4;
}

.potential-client-row strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.potential-status {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.potential-handling-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.potential-handling-field span {
  flex: 0 0 auto;
}

.potential-handling-field input {
  width: min(190px, 100%);
  min-width: 0;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  font: inherit;
  font-weight: 800;
}

.potential-handling-field input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--primary) 56%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
}

.potential-client-row b {
  direction: ltr;
  color: var(--text);
}

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

.potential-extension {
  position: relative;
}

.potential-extension-button,
.extension-options button {
  min-height: 34px;
  border: 1px solid color-mix(in srgb, var(--accent) 36%, var(--line));
  border-radius: 999px;
  color: var(--text);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface) 94%, transparent), color-mix(in srgb, var(--accent-soft) 58%, transparent));
  cursor: pointer;
  font-weight: 900;
}

.potential-extension-button {
  padding: 0 14px;
}

.potential-extension-button.close-button {
  border-color: color-mix(in srgb, var(--danger) 36%, var(--line));
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface) 94%, transparent), color-mix(in srgb, var(--danger) 10%, transparent));
}

.extension-options {
  min-width: 132px;
  display: grid;
  gap: 6px;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 12;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 18px 34px rgba(18, 38, 63, 0.16);
}

.extension-options[hidden] {
  display: none;
}

.extension-options button {
  width: 100%;
  padding: 0 10px;
  text-align: center;
}

.potential-extension-button:hover,
.potential-extension-button:focus-visible,
.extension-options button:hover,
.extension-options button:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 68%, var(--line));
  outline: none;
}

.modal-empty {
  margin: 0;
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.company-detail-modal {
  width: min(860px, 100%);
}

.task-detail-modal {
  width: min(1680px, 98vw);
}

.new-task-modal {
  width: min(720px, 100%);
}

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

.new-task-form label {
  display: grid;
  gap: 7px;
}

.new-task-form .full-width,
.new-task-form .form-message,
.new-task-form .save-task-button {
  grid-column: 1 / -1;
}

.new-task-form span {
  color: var(--muted);
  font-weight: 900;
}

.new-task-form input,
.new-task-form textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface);
  font: inherit;
  font-weight: 750;
}

.new-task-form textarea {
  resize: vertical;
}

.new-task-form input[readonly] {
  color: var(--muted);
  background: var(--surface-soft);
}

.save-task-button {
  min-height: 46px;
  border: 1px solid color-mix(in srgb, var(--accent) 48%, var(--line));
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(135deg, #0b6f46, #16a463);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  box-shadow: 0 14px 26px color-mix(in srgb, var(--accent) 24%, transparent);
}

.save-task-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.form-message {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-weight: 850;
}

.form-message.is-success {
  color: #0d6843;
  background: color-mix(in srgb, var(--accent-soft) 64%, transparent);
}

.form-message.is-error {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 12%, transparent);
}

.company-modal-layout {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.company-modal-pie {
  min-height: 320px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.45), transparent 32%),
    color-mix(in srgb, var(--surface-soft) 76%, transparent);
}

.company-modal-pie .company-pie {
  width: min(270px, 92%);
}

.company-modal-pie .company-pie span {
  max-width: 150px;
  font-size: 1.25rem;
}

.company-modal-list {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
}

.company-modal-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
}

.company-modal-row i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.company-modal-row strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-modal-row span,
.company-modal-row b {
  direction: ltr;
  color: var(--text);
  font-weight: 900;
  white-space: nowrap;
}

.empty-state {
  min-height: 260px;
  display: grid;
  place-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.check-list {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.check-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  gap: 8px 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.check-row span {
  font-weight: 800;
}

.check-row p {
  grid-column: 1 / -1;
  margin: 0;
  direction: ltr;
  color: var(--muted);
  text-align: left;
  overflow-wrap: anywhere;
}

.check-row.is-ok span {
  color: var(--accent);
}

.check-row.is-bad span {
  color: var(--danger);
}

@media (max-width: 900px) {
  .login-shell,
  .hero-section,
  .content-grid,
  .dashboard-grid,
  .task-age-layout,
  .sheet-toolbar,
  .gauge-grid,
  .charts-grid,
  .money-mascot-panel,
  .traffic-grid,
  .birthday-columns,
  .company-pie-grid,
  .leads-kpi-grid,
  .lead-command-center,
  .leads-chart-grid,
  .dollars-kpis {
    grid-template-columns: 1fr;
  }

  .login-hero {
    min-height: auto;
  }

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

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

  .personal-area-grid {
    grid-template-columns: 1fr;
  }

  .attendance-status-grid {
    grid-template-columns: 1fr 1fr;
  }

  .personal-inner-tabs {
    width: 100%;
    flex-wrap: wrap;
  }

  .personal-inner-tab {
    flex: 1;
    min-width: 0;
  }

  .pre-consulting-pie-grid {
    grid-template-columns: 1fr;
  }

  .pre-consulting-hero,
  .pre-consulting-command-grid {
    grid-template-columns: 1fr;
  }

  .pre-consulting-toolbar,
  .pre-consulting-workbench-head {
    align-items: stretch;
    flex-direction: column;
  }

  .pre-consulting-view-switch {
    justify-content: flex-start;
  }

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

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

  .task-modal-row {
    grid-template-columns: minmax(0, 1fr) 28px;
  }

  .potential-client-row {
    grid-template-columns: minmax(0, 1fr) 34px;
  }

  .potential-client-meta {
    min-width: 0;
  }

  .potential-client-row > b,
  .potential-client-row > .potential-actions {
    grid-column: 1 / -1;
  }

  .task-modal-row b {
    grid-column: 1;
  }

  .task-row-actions {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-content: stretch;
  }

  .client-rank {
    grid-column: 2;
  }

  .task-edit-button,
  .task-save-button,
  .task-cancel-button,
  .task-close-button {
    width: 100%;
  }

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

  .lead-modal-list {
    grid-template-columns: 1fr;
  }

  .lead-group-card .lead-modal-list {
    grid-template-columns: 1fr;
  }

  .sheet-actions {
    justify-items: stretch;
  }

  .access-card.compact {
    min-width: 0;
  }

  .sheet-panel {
    height: 72vh;
    min-height: 520px;
  }

  .task-bar-chart {
    min-height: 340px;
    overflow-x: auto;
    grid-auto-flow: column;
    grid-auto-columns: minmax(76px, 92px);
    grid-template-columns: none;
    padding-bottom: 8px;
  }

  .compact-bar-chart {
    height: 320px;
    min-height: 320px;
  }

  .dashboard-tabs-layout {
    gap: 12px;
  }

  .dashboard-tab {
    min-height: 42px;
    padding: 0 12px;
  }

  .closure-chart {
    overflow-x: auto;
    grid-auto-flow: column;
    grid-auto-columns: minmax(92px, 112px);
    grid-template-columns: none;
    padding-bottom: 8px;
  }
}

@media (max-width: 640px) {
  .app-header,
  .user-menu,
  .section-title {
    align-items: stretch;
    flex-direction: column;
  }

  .attendance-status-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(2.25rem, 13vw, 3.6rem);
  }

  .quick-summary-grid {
    grid-template-columns: 1fr;
  }

  .google-button {
    width: 100%;
  }

  .chart {
    gap: 6px;
  }

  .sheet-toolbar {
    padding: 18px;
  }

  .sheet-panel {
    min-height: 460px;
  }

  .money-mascot-panel {
    padding: 16px;
  }

  .speech-bubble::before {
    left: 48%;
    top: auto;
    bottom: -18px;
    transform: rotate(-45deg);
  }

  .age-row {
    grid-template-columns: 1fr 40px;
  }

  .task-handler-pie-layout {
    grid-template-columns: 1fr;
  }

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

  .leads-pie {
    width: min(240px, 74vw);
    justify-self: center;
  }

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

  .lead-filter-toggle {
    max-width: 100%;
  }

  .leads-workbench-head,
  .leads-workbench-search,
  .leads-tab-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .lead-command-center {
    grid-auto-flow: column;
    grid-auto-columns: minmax(168px, 1fr);
    grid-template-columns: none;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .lead-view-strip {
    grid-auto-flow: column;
    grid-auto-columns: minmax(132px, 1fr);
    grid-template-columns: none;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .leads-filter-actions {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .leads-filter-actions > * {
    flex: 0 0 auto;
  }

  .leads-sheet-table-wrap {
    max-height: none;
    min-height: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .leads-sheet-table[data-leads-table],
  .leads-sheet-table[data-leads-table] tbody,
  .leads-sheet-table[data-leads-table] tr,
  .leads-sheet-table[data-leads-table] td {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .leads-sheet-table[data-leads-table] {
    min-width: 0;
  }

  .leads-sheet-table[data-leads-table] thead {
    display: none;
  }

  .leads-sheet-table[data-leads-table] tbody {
    display: grid;
    gap: 12px;
  }

  .leads-sheet-table[data-leads-table] tr {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: 0 10px 22px rgba(18, 38, 63, 0.07);
  }

  .leads-sheet-table[data-leads-table] td {
    height: auto;
    min-height: 44px;
    padding: 10px 12px;
    border-left: 0;
    white-space: normal;
  }

  .leads-sheet-table[data-leads-table] td:not(.leads-action-column)::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
  }

  .leads-sheet-table[data-leads-table] .leads-action-column {
    position: static;
    width: 100%;
    min-width: 0;
    padding-inline-start: 18px;
    text-align: start;
    background: color-mix(in srgb, var(--surface-soft) 62%, var(--surface));
    box-shadow: inset -4px 0 0 var(--lead-row-accent);
  }

  .task-handler-pie {
    width: min(240px, 74vw);
  }

  .task-agent-age-body {
    grid-template-columns: 1fr;
  }

  .task-age-pie {
    width: min(220px, 72vw);
  }

  .task-age-legend div {
    grid-template-columns: 10px minmax(0, 1fr) auto;
  }

  .task-age-legend small {
    display: none;
  }

  .age-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .sales-agent-card-grid {
    grid-template-columns: 1fr;
  }

  .sales-agent-dollar-card .section-title {
    align-items: stretch;
    flex-direction: column;
  }

  .sales-agent-pie-layout {
    grid-template-columns: 1fr;
  }

  .sales-agent-pie-pair {
    grid-template-columns: 1fr;
  }

  .sales-agent-pie {
    width: min(220px, 72vw);
    justify-self: center;
  }

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

  .potential-radar {
    width: min(280px, 78vw);
  }

  .dashboard-tabs {
    margin-bottom: 18px;
  }

  .dashboard-tab {
    flex-basis: min(140px, 46%);
  }
}

/* Professional dashboard system layer */
:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #111827;
  --muted: #667085;
  --line: #d7dee8;
  --primary: #1d4ed8;
  --primary-strong: #1e40af;
  --accent: #059669;
  --warning: #d97706;
  --danger: #dc2626;
  --shadow: 0 18px 42px rgba(17, 24, 39, 0.09);
  --shadow-soft: 0 10px 26px rgba(17, 24, 39, 0.07);
  --radius: 8px;
  --app-header-height: 72px;
}

:root[data-theme="dark"] {
  --bg: #10151f;
  --surface: #17202e;
  --surface-soft: #202b3a;
  --text: #eef4fb;
  --muted: #a6b2c2;
  --line: #324156;
  --primary: #60a5fa;
  --primary-strong: #93c5fd;
  --accent: #34d399;
  --warning: #fbbf24;
  --danger: #fb7185;
  --shadow: 0 22px 58px rgba(0, 0, 0, 0.32);
  --shadow-soft: 0 12px 28px rgba(0, 0, 0, 0.24);
}

html {
  background: var(--bg);
}

body {
  color: var(--text);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-soft) 86%, transparent), transparent 340px),
    var(--bg);
}

body::before {
  display: block;
  opacity: 0.42;
  filter: saturate(1.08) contrast(1.24) drop-shadow(0 10px 18px rgba(15, 23, 42, 0.16));
  animation: everest-breath 18s ease-in-out infinite alternate;
}

body::after {
  display: block;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 38%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.08), transparent 42%);
  opacity: 0.54;
  mix-blend-mode: multiply;
}

:root[data-theme="dark"] body::before {
  opacity: 0.32;
  filter: saturate(0.98) brightness(0.78) contrast(1.28) drop-shadow(0 12px 20px rgba(0, 0, 0, 0.24));
}

:root[data-theme="dark"] body::after {
  mix-blend-mode: screen;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 38%),
    linear-gradient(0deg, rgba(96, 165, 250, 0.08), transparent 42%);
  opacity: 0.42;
}

body,
button,
input,
select,
textarea {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.sheet-app-shell {
  width: min(1520px, 100%);
  padding: 18px 18px 56px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 80;
  min-height: var(--app-header-height);
  margin: -18px -18px 18px;
  padding: 12px 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
  backdrop-filter: blur(18px);
}

.brand-row {
  min-width: 0;
  gap: 10px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 900;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 12px 24px color-mix(in srgb, var(--primary) 24%, transparent);
}

.user-menu {
  gap: 10px;
  padding: 6px;
  border-color: color-mix(in srgb, var(--line) 82%, transparent);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow-soft);
}

.user-menu img {
  width: 36px;
  height: 36px;
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}

.user-menu strong {
  font-size: 0.92rem;
  font-weight: 900;
}

.user-menu span {
  max-width: 220px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border-color: var(--line);
  color: var(--text);
  background: var(--surface-soft);
  box-shadow: none;
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: color-mix(in srgb, var(--primary) 46%, var(--line));
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
}

.sheet-toolbar {
  grid-template-columns: minmax(0, 1fr) minmax(320px, auto);
  align-items: center;
  gap: 22px;
  margin-bottom: 14px;
  padding: 22px;
  border-color: color-mix(in srgb, var(--line) 86%, transparent);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.sheet-toolbar h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.9rem, 3.6vw, 3.25rem);
  line-height: 1.05;
}

.dashboard-title {
  align-items: center;
}

.dashboard-title img {
  max-height: 54px;
  object-fit: contain;
}

.sheet-actions {
  align-items: center;
}

.access-card.compact {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  box-shadow: none;
}

.status-dot {
  background: var(--accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 16%, transparent);
}

.eyebrow {
  color: color-mix(in srgb, var(--primary) 92%, var(--text));
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0;
}

.dashboard-tabs-layout {
  gap: 14px;
}

.dashboard-tabs {
  position: sticky;
  top: calc(var(--app-header-height) + 8px);
  z-index: 50;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 0;
  padding: 7px;
  border-color: color-mix(in srgb, var(--line) 84%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
  scrollbar-width: thin;
}

.dashboard-tab {
  flex: 0 0 auto;
  min-width: 116px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 0.9rem;
  font-weight: 900;
}

.dashboard-tab:hover,
.dashboard-tab:focus-visible {
  color: var(--text);
  background: var(--surface-soft);
  transform: translateY(0);
}

.dashboard-tab.is-active {
  color: #fff;
  border-color: color-mix(in srgb, var(--primary) 86%, #000);
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 72%, var(--accent)));
  box-shadow: 0 12px 24px color-mix(in srgb, var(--primary) 22%, transparent);
}

.dashboard-tab-panel {
  gap: 16px;
}

.section-title {
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.section-title h2,
.section-title h3,
.section-title p {
  margin-top: 0;
}

.section-title h2,
.section-title h3 {
  color: var(--text);
  font-weight: 950;
  letter-spacing: 0;
}

.section-title p:not(.eyebrow),
.api-subtitle {
  color: var(--muted);
}

:where(.panel, .data-card, .leads-sheet-panel, .money-mascot-panel, .dollars-panel, .birthdays-panel, .personal-area-panel, .task-search-card, .compact-chart-card, .company-pie-card, .task-agent-age-card, .sales-agent-dollar-card, .pre-consulting-summary-card, .pre-consulting-pie-card, .pre-consulting-workbench, .pre-consulting-add-form, .lead-command-summary, .lead-command-card, .lead-filter-panel, .leads-chart-card, .temporary-risk-period-card, .personal-profile-card, .personal-stat-card, .personal-task-card, .personal-financial-card) {
  border-color: color-mix(in srgb, var(--line) 88%, transparent);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

:where(.data-card, .lead-command-card, .pre-consulting-command-card, .personal-stat-card, .quick-summary-grid article, .dollars-kpi-card) {
  position: relative;
  overflow: hidden;
}

:where(.data-card, .lead-command-card, .pre-consulting-command-card, .personal-stat-card, .quick-summary-grid article, .dollars-kpi-card)::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0.86;
}

.small-button,
.google-button,
.lead-filter-reset,
.lead-filter-quick,
.pre-consulting-view-switch button,
.pre-consulting-row-button,
.temporary-risk-close-button,
.operational-phone-edit-button,
.birthday-close-button {
  border-radius: 8px;
  font-weight: 900;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.small-button {
  min-height: 38px;
  border-color: var(--line);
  color: var(--text);
  background: var(--surface);
}

.small-button:hover,
.small-button:focus-visible,
.google-button:hover,
.google-button:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--primary) 52%, var(--line));
  box-shadow: 0 10px 20px color-mix(in srgb, var(--primary) 14%, transparent);
  transform: translateY(-1px);
}

.primary-link,
.small-button.primary-link {
  color: #fff;
  border-color: color-mix(in srgb, var(--primary) 86%, #000);
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 78%, var(--accent)));
}

:where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea, .lead-edit-control, .lead-edit-notes, .task-edit-input, .pre-consulting-edit-input:not([type="checkbox"])) {
  border-radius: 8px;
  border-color: var(--line);
  color: var(--text);
  background: var(--surface);
  box-shadow: inset 0 1px 0 rgba(17, 24, 39, 0.02);
}

:where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea, .lead-edit-control, .lead-edit-notes, .task-edit-input, .pre-consulting-edit-input:not([type="checkbox"])):focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent);
}

.leads-sheet-table-wrap,
.attendance-month-table-wrap {
  border-color: color-mix(in srgb, var(--line) 88%, transparent);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.leads-sheet-table {
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
}

.leads-sheet-table th {
  position: sticky;
  top: 0;
  z-index: 4;
  border-bottom: 1px solid var(--line);
  color: color-mix(in srgb, var(--text) 82%, var(--muted));
  background: color-mix(in srgb, var(--surface-soft) 82%, var(--surface));
  font-size: 0.78rem;
  font-weight: 950;
}

.leads-sheet-table td {
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  color: color-mix(in srgb, var(--text) 92%, var(--muted));
}

.leads-sheet-table tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--surface-soft) 34%, var(--surface));
}

.leads-sheet-table tr:hover td {
  background: color-mix(in srgb, var(--primary) 6%, var(--surface));
}

.boolean-display,
.lead-status-pill,
.pre-consulting-row-tags span,
.birthday-details span {
  border-radius: 999px;
}

.modal-backdrop {
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(7px);
}

:where(.potential-modal, .lead-detail-modal, .company-detail-modal, .task-detail-modal, .new-task-modal, .potential-detail-modal) {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 26px 80px rgba(2, 6, 23, 0.28);
}

.modal-close {
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-soft);
}

.modal-close:hover,
.modal-close:focus-visible {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 32%, var(--line));
}

.pre-consulting-hero,
.leads-tab-hero {
  border-radius: 10px;
}

.pre-consulting-hero {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--primary) 8%, transparent), transparent 42%),
    var(--surface);
}

.pre-consulting-command-card {
  border-color: color-mix(in srgb, var(--line) 88%, transparent);
}

.lead-command-card:hover,
.lead-command-card:focus-visible,
.pre-consulting-view-switch button:hover,
.pre-consulting-view-switch button:focus-visible {
  transform: translateY(-1px);
}

@media (max-width: 900px) {
  .sheet-app-shell {
    padding: 12px 12px 40px;
  }

  .app-header {
    position: static;
    margin: -12px -12px 12px;
    padding: 10px 12px;
  }

  .user-menu {
    width: 100%;
    justify-content: space-between;
  }

  .user-menu > div {
    min-width: 0;
  }

  .sheet-toolbar {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .dashboard-tabs {
    position: sticky;
    top: 0;
    margin-inline: -2px;
  }

  .dashboard-tab {
    min-width: 118px;
    flex-basis: auto;
  }

  .section-title {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .app-header {
    align-items: stretch;
    flex-direction: column;
  }

  .brand-row {
    justify-content: center;
  }

  .sheet-actions,
  .task-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .sheet-toolbar h1 {
    font-size: clamp(1.8rem, 11vw, 2.7rem);
  }
}
