:root {
  color-scheme: light;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f3f6fb;
  --surface: #ffffff;
  --navy: #111827;
  --blue: #0d6efd;
  --teal: #0ea5a4;
  --green: #2f9e44;
  --amber: #f59e0b;
  --red: #dc3545;
  --sidebar: #172033;
  --sidebar-soft: #202b43;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
  --radius: 0.625rem;
}

/* Meta Ads monthly client report */
.meta-report-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  margin-bottom: 18px;
  color: #fff;
  background: linear-gradient(125deg, #073447 0%, #075e63 58%, #0c9489 100%);
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(4, 55, 68, 0.18);
}

.meta-report-hero h2 {
  margin: 10px 0 6px;
  font-size: clamp(24px, 2vw, 34px);
}

.meta-report-hero p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
}

.meta-report-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  color: #aaf5e9;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meta-report-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.meta-report-hero .ghost-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.28);
}

.meta-report-hero .primary-button {
  color: #06424b;
  background: #c9fff2;
  border-color: #c9fff2;
}

.meta-report-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(220px, 300px) 1fr;
  align-items: end;
  margin-bottom: 18px;
}

.meta-report-period-note {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 42px;
  color: var(--muted);
  font-size: 12px;
}

.meta-report-kpis {
  display: grid;
  grid-template-columns: repeat(7, minmax(135px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.meta-report-kpis article {
  position: relative;
  min-height: 126px;
  padding: 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dce9eb;
  border-radius: 15px;
  box-shadow: 0 10px 24px rgba(28, 72, 84, 0.07);
}

.meta-report-kpis i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  color: #078a81;
  background: #e4f7f4;
  border-radius: 10px;
}

.meta-report-kpis span,
.meta-report-kpis small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.meta-report-kpis span {
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.meta-report-kpis strong {
  display: block;
  margin: 5px 0;
  color: #113548;
  font-size: 20px;
}

.meta-funnel-panel {
  margin-bottom: 18px;
}

.meta-funnel {
  display: grid;
  grid-template-columns: repeat(11, auto);
  align-items: center;
  gap: 10px;
  padding: 8px 20px 24px;
}

.meta-funnel > i {
  color: #9fb5bc;
}

.meta-funnel-step {
  min-width: 130px;
  padding: 16px;
  text-align: center;
  background: linear-gradient(180deg, #f4fbfa, #fff);
  border: 1px solid #d9ebe9;
  border-radius: 13px;
}

.meta-funnel-step span,
.meta-funnel-step small,
.meta-funnel-step strong {
  display: block;
}

.meta-funnel-step span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.meta-funnel-step strong {
  margin: 6px 0;
  color: #0d5260;
  font-size: 22px;
}

.meta-funnel-step small {
  color: #849aa2;
  font-size: 9px;
}

.meta-report-table {
  min-width: 1120px;
}

.meta-report-table td:first-child {
  min-width: 220px;
}

.meta-report-table td small {
  color: var(--muted);
}

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

@media (max-width: 1500px) {
  .meta-report-kpis {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
  }

  .meta-funnel {
    overflow-x: auto;
  }
}

@media (max-width: 850px) {
  .meta-report-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .meta-report-actions {
    justify-content: flex-start;
  }

  .meta-report-toolbar,
  .meta-report-kpis,
  .meta-report-form .form-grid {
    grid-template-columns: 1fr;
  }

  .meta-report-period-note {
    justify-content: flex-start;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background:
    radial-gradient(circle at 12% 12%, rgba(42, 116, 255, 0.16), transparent 32%),
    radial-gradient(circle at 88% 88%, rgba(16, 185, 129, 0.11), transparent 28%),
    #eef4f8;
  overflow: hidden;
}

.login-shell {
  position: relative;
  width: min(1180px, 100%);
  min-height: min(760px, calc(100vh - 64px));
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.85fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(15, 41, 62, 0.16), 0 8px 24px rgba(15, 41, 62, 0.08);
}

.login-showcase {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 34px;
  overflow: hidden;
  padding: 52px;
  background:
    linear-gradient(145deg, rgba(6, 30, 48, 0.98), rgba(8, 62, 74, 0.96)),
    #071f31;
  color: #fff;
}

.login-showcase::before,
.login-showcase::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
}

.login-showcase::before {
  width: 420px;
  height: 420px;
  right: -210px;
  top: -170px;
  border: 1px solid rgba(125, 211, 252, 0.18);
  box-shadow: 0 0 0 70px rgba(125, 211, 252, 0.035), 0 0 0 140px rgba(125, 211, 252, 0.025);
}

.login-showcase::after {
  width: 280px;
  height: 280px;
  left: -150px;
  bottom: -150px;
  background: rgba(16, 185, 129, 0.12);
  filter: blur(4px);
}

.login-showcase-glow {
  position: absolute;
  z-index: -1;
  width: 340px;
  height: 340px;
  right: 8%;
  bottom: 13%;
  border-radius: 50%;
  background: rgba(14, 165, 164, 0.12);
  filter: blur(45px);
}

.login-premium-brand,
.login-mobile-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.login-premium-brand > span:last-child,
.login-mobile-brand > span:last-child {
  display: grid;
  gap: 2px;
}

.login-premium-brand strong,
.login-mobile-brand strong {
  font-size: 21px;
  letter-spacing: -0.03em;
}

.login-premium-brand small,
.login-mobile-brand small {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.22em;
  opacity: 0.65;
}

.login-logo {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  background: linear-gradient(145deg, #1d87ff, #0ea5a4);
  color: #fff;
  box-shadow: 0 12px 30px rgba(13, 110, 253, 0.26);
  font-size: 21px;
}

.login-showcase-copy {
  max-width: 570px;
}

.login-kicker,
.login-secure-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-kicker {
  border: 1px solid rgba(125, 211, 252, 0.22);
  padding: 8px 12px;
  background: rgba(125, 211, 252, 0.08);
  color: #9ee7e5;
}

.login-showcase-copy h1 {
  margin: 22px 0 18px;
  max-width: 560px;
  color: #fff;
  font-size: clamp(38px, 4.2vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.login-showcase-copy h1 em {
  color: #5eead4;
  font-family: Georgia, serif;
  font-weight: 500;
}

.login-showcase-copy p {
  max-width: 530px;
  margin: 0;
  color: #b9cad4;
  font-size: 16px;
  line-height: 1.75;
}

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

.login-feature-grid article {
  min-width: 0;
  display: grid;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 17px;
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(12px);
}

.login-feature-grid article > i {
  color: #5eead4;
  font-size: 20px;
}

.login-feature-grid span,
.login-feature-grid strong,
.login-feature-grid small {
  display: block;
}

.login-feature-grid strong {
  margin-bottom: 5px;
  color: #f8fafc;
  font-size: 13px;
}

.login-feature-grid small {
  color: #91a7b4;
  font-size: 11px;
  line-height: 1.5;
}

.login-proof {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-proof-avatars {
  display: flex;
  padding-left: 8px;
}

.login-proof-avatars span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin-left: -8px;
  border: 2px solid #0a3544;
  border-radius: 50%;
  background: #e2f4f4;
  color: #0f5960;
  font-size: 9px;
  font-weight: 900;
}

.login-proof p,
.login-proof strong,
.login-proof small {
  display: block;
  margin: 0;
}

.login-proof strong {
  color: #e9f3f6;
  font-size: 12px;
}

.login-proof small {
  margin-top: 3px;
  color: #7895a3;
  font-size: 10px;
}

.login-panel {
  display: grid;
  place-items: center;
  padding: 48px clamp(34px, 5vw, 70px);
  background: #fff;
}

.login-card {
  width: min(430px, 100%);
  display: grid;
  gap: 19px;
}

.login-mobile-brand {
  display: none;
  margin-bottom: 8px;
  color: #0a3144;
}

.login-heading {
  margin-bottom: 7px;
}

.login-secure-label {
  padding: 7px 10px;
  background: #e8f8f4;
  color: #087b68;
}

.login-heading h2 {
  margin: 17px 0 8px;
  color: #102a3b;
  font-size: 31px;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.login-heading p {
  margin: 0;
  color: #71818c;
  font-size: 14px;
  line-height: 1.65;
}

.login-field {
  display: grid;
  gap: 8px;
}

.login-field > span:first-child {
  color: #415867;
  font-size: 11px;
  letter-spacing: 0.06em;
}

.login-input-wrap {
  min-height: 51px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border: 1px solid #dbe4e9;
  border-radius: 12px;
  padding: 0 14px;
  background: #fbfcfd;
  color: #8ca0ac;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.login-input-wrap:focus-within {
  border-color: #1f8d9a;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(31, 141, 154, 0.1);
}

.login-input-wrap input {
  min-width: 0;
  height: 48px;
  border: 0;
  outline: 0;
  padding: 0;
  background: transparent;
  color: #163344;
}

.login-input-wrap input::placeholder {
  color: #a2b0b9;
}

.login-captcha-wrap {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 10px;
}

.login-hint {
  min-height: 0;
  margin: -6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.login-hint:empty {
  display: none;
}

.login-hint.login-error {
  color: #b42318;
  font-weight: 800;
}

.login-hint.login-success {
  color: #047857;
  font-weight: 800;
}

.login-card.is-loading input,
.login-card.is-loading button {
  cursor: wait;
}

.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  overflow: hidden;
  border: 1px solid #dbe4e9;
  border-radius: 12px;
  background: #f1f7f7;
}

.captcha-row strong {
  min-height: 51px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  color: #0c5561;
  font-size: 14px;
  letter-spacing: 0.03em;
}

.login-refresh-button {
  width: 42px;
  height: 51px;
  border: 0;
  border-left: 1px solid #dbe4e9;
  background: transparent;
  color: #0e7180;
}

.login-refresh-button:hover {
  background: #e2f2f1;
}

.login-submit-button {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, #0b6573, #0f8f88);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(10, 111, 115, 0.22);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.login-submit-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(10, 111, 115, 0.28);
}

.login-submit-button > i {
  transition: transform 0.18s ease;
}

.login-submit-button:hover > i {
  transform: translateX(3px);
}

.login-trust {
  display: flex;
  justify-content: center;
  gap: 20px;
  color: #8a9aa4;
  font-size: 10px;
}

.login-trust span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.login-trust i {
  color: #26968d;
}

.app-shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

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

.app-shell.sidebar-collapsed .sidebar {
  display: none;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 100vh;
  overflow-y: auto;
  background: var(--sidebar);
  color: #fff;
  padding: 0 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 10px 0 30px rgba(15, 23, 42, 0.1);
}

.sidebar-head {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 -14px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: #111827;
}

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

.sidebar-brand {
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: #fff;
  text-align: left;
}

.sidebar-brand:hover .brand-mark,
.sidebar-brand:focus-visible .brand-mark {
  background: #2f83ff;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.18);
}

.sidebar-brand strong {
  font-size: 17px;
  line-height: 1;
  white-space: nowrap;
}

.user-avatar,
.sidebar-avatar,
.profile-avatar-large,
.avatar-option {
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #e8f3ff;
  color: var(--blue);
}

.user-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  font-size: 18px;
}

.sidebar-avatar {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  font-size: 24px;
}

.user-avatar img,
.sidebar-avatar img,
.profile-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand strong,
.brand span {
  display: block;
}

.brand span,
.sidebar-profile small,
.sidebar-panel small {
  color: #c2c7d0;
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px;
  background: var(--sidebar-soft);
  color: #fff;
  text-align: left;
}

.sidebar-profile span {
  min-width: 0;
}

.sidebar-profile strong,
.sidebar-profile small {
  display: block;
}

.sidebar-profile strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-profile:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: #263553;
}

.sidebar-section {
  display: grid;
  gap: 8px;
}

.sidebar-title {
  color: #7f8ea8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.nav-tabs {
  display: grid;
  gap: 6px;
  border-bottom: 0;
}

.nav-tab {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #cbd5e1;
  background: transparent;
  padding: 0 12px;
  text-align: left;
  font-weight: 600;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.nav-tab span {
  min-width: 0;
}

.nav-badge {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  padding: 0 7px;
  background: #ef4444;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.nav-tab i,
.sidebar-logout i,
.sidebar-open-button i,
.sidebar-toggle i {
  font-size: 1rem;
  line-height: 1;
}

.nav-tab.active,
.nav-tab:hover {
  border-color: rgba(255, 255, 255, 0.08);
  background: var(--blue);
  color: #fff;
}

.settings-dropdown {
  display: grid;
  gap: 4px;
}

.settings-dropdown-toggle {
  width: 100%;
}

.settings-chevron {
  margin-left: auto;
  transition: transform 0.16s ease;
}

.settings-dropdown.open .settings-chevron {
  transform: rotate(180deg);
}

.settings-submenu {
  display: none;
  gap: 4px;
  padding: 4px 0 4px 24px;
}

.settings-dropdown.open .settings-submenu {
  display: grid;
}

.settings-submenu-item {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 10px;
  background: transparent;
  color: #cbd5e1;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
}

.settings-submenu-item.active,
.settings-submenu-item:hover {
  border-color: rgba(255, 255, 255, 0.08);
  background: var(--sidebar-soft);
  color: #fff;
}

.settings-tab {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 0 10px;
  background: transparent;
  color: #c2c7d0;
  text-align: left;
  font-weight: 600;
}

.settings-tab.active,
.settings-tab:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.sidebar-logout:hover {
  background: var(--blue);
  color: #fff;
}

.sidebar-toggle,
.sidebar-open-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 12px;
  font-weight: 800;
}

.sidebar-toggle {
  flex: 0 0 auto;
  width: 38px;
  padding: 0;
  background: var(--sidebar-soft);
  border-color: rgba(255, 255, 255, 0.16);
  color: #f8f9fa;
}

.sidebar-toggle:hover {
  background: var(--blue);
  color: #fff;
}

.sidebar-open-button {
  display: none;
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.app-shell.sidebar-collapsed .sidebar-open-button {
  display: inline-flex;
  align-items: center;
}

.sidebar-panel {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 14px;
  display: grid;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-logout {
  width: 100%;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 0 14px;
  background: var(--sidebar-soft);
  color: #f8f9fa;
  font-weight: 800;
}

.panel-label,
.eyebrow,
label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sidebar-panel .panel-label {
  color: #9fb0c8;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.progress-track span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--teal);
}

.main {
  min-width: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 0 24px 32px;
}

.topbar {
  display: flex;
  justify-content: flex-start;
  gap: 14px;
  align-items: center;
  min-height: 64px;
  margin: 0 -24px 22px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  position: sticky;
  top: 0;
  z-index: 20;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
}

h2 {
  font-size: 18px;
  font-weight: 700;
}

h3 {
  font-size: 15px;
  font-weight: 700;
}

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

.topbar-notification {
  position: relative;
  margin-left: auto;
}

.notification-button {
  position: relative;
}

.notification-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  padding: 0 5px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.notification-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  width: min(380px, calc(100vw - 36px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
}

.notification-menu-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.notification-menu-head small {
  color: var(--muted);
}

.notification-list {
  display: grid;
  max-height: 360px;
  overflow: auto;
}

.notification-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 2px 10px;
  border: 0;
  border-bottom: 1px solid #edf2f7;
  padding: 11px 14px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.notification-item:hover {
  background: #fff7ed;
}

.notification-item > span {
  grid-row: 1 / 4;
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #0d6efd;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.notification-item strong,
.notification-item small,
.notification-item p {
  min-width: 0;
}

.notification-item small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-item p {
  margin: 0;
  color: #334155;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-empty {
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.primary-button,
.ghost-button,
.danger-button,
.icon-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 14px;
  font-weight: 600;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}

.primary-button {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 6px 14px rgba(13, 110, 253, 0.18);
}

.primary-button:hover {
  background: #0b5ed7;
  color: #fff;
}

.login-submit-button {
  gap: 8px;
}

.login-submit-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: login-spin 0.8s linear infinite;
}

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

.ghost-button {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.ghost-button:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.danger-button {
  background: #dc3545;
  border-color: #dc3545;
  color: #fff;
}

.icon-button {
  width: 40px;
  padding: 0;
  background: #fff;
  border-color: var(--line);
}

.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 16px;
}

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

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

.info-timebar div {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.info-timebar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.info-timebar strong {
  font-size: 18px;
}

.target-summary-panel {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 16px;
}

.target-summary-panel strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

.target-summary-progress {
  display: grid;
  gap: 8px;
}

.target-summary-panel .progress-track {
  background: #e9ecef;
}

.target-summary-panel small {
  color: var(--muted);
  font-weight: 600;
}

.metric,
.panel,
.pipeline-column,
.lead-card,
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.metric {
  position: relative;
  padding: 18px;
  display: grid;
  gap: 10px;
  overflow: hidden;
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--blue);
}

.metric span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric strong {
  font-size: 28px;
  font-weight: 600;
}

.content-grid,
.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.9fr);
  gap: 16px;
}

.settings-grid,
.settings-layout {
  align-items: start;
}

.settings-layout {
  display: grid;
  gap: 16px;
}

.settings-panel {
  display: none;
}

.settings-panel.active {
  display: block;
}

.settings-menu-panel {
  display: none;
}

.settings-tabbar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.settings-tabbar .settings-tab {
  flex: 0 0 auto;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  text-align: center;
  font-weight: 700;
}

.settings-tabbar .settings-tab.active,
.settings-tabbar .settings-tab:hover {
  border-color: var(--blue);
  background: #e8f3ff;
  color: var(--blue);
}

.wa-settings-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 18px 14px;
  border-bottom: 1px solid var(--line);
}

.wa-settings-tab {
  flex: 0 0 auto;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.wa-settings-tab.active,
.wa-settings-tab:hover {
  border-color: var(--blue);
  background: #e8f3ff;
  color: var(--blue);
}

.wa-settings-panel {
  display: none;
  padding-top: 16px;
}

.wa-settings-panel.active {
  display: block;
}

.wa-settings-panel .section-heading {
  padding-top: 0;
}

.panel {
  padding: 0;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover td {
  background: #eef6ff;
}

.lead-row-unread td {
  background: #fff7ed;
}

.lead-row-unread:hover td {
  background: #ffedd5 !important;
}

.lead-unread-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-left: 8px;
  border-radius: 999px;
  padding: 0 8px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  vertical-align: middle;
}

.clickable-row:focus {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}

.compact-button {
  min-height: 34px;
  margin-bottom: 8px;
}

.compact-heading {
  padding-top: 0;
}

.lead-detail-panel {
  overflow: hidden;
}

.lead-detail-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.25fr);
  gap: 18px;
  padding: 0 18px 18px;
  align-items: start;
}

.lead-detail-summary,
.lead-detail-workstream,
.lead-detail-timeline {
  display: grid;
  gap: 14px;
  align-content: start;
}

.lead-detail-summary {
  position: sticky;
  top: 86px;
  max-height: calc(100vh - 118px);
  overflow: auto;
  padding-right: 2px;
}

.lead-detail-workstream {
  min-height: 0;
  grid-template-rows: auto minmax(240px, 38vh) minmax(340px, calc(56vh - 160px));
}

.lead-detail-timeline,
.lead-comments-panel {
  min-height: 0;
  overflow: hidden;
}

.lead-detail-timeline {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.lead-detail-hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.lead-detail-hero h3 {
  margin: 10px 0 6px;
  font-size: 24px;
}

.lead-detail-hero p {
  margin: 0;
  color: var(--muted);
}

.lead-detail-hero > strong {
  white-space: nowrap;
  font-size: 18px;
}

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

.lead-detail-grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.lead-detail-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.lead-detail-grid strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.lead-address-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.lead-address-card.is-empty {
  background: #fbfcfe;
}

.lead-address-card > div:first-child {
  display: grid;
  gap: 4px;
}

.lead-address-card span,
.lead-address-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.lead-address-card strong,
.lead-address-grid strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.lead-address-grid .muted-value {
  color: var(--muted);
  font-weight: 700;
}

.lead-address-card p {
  margin: 0;
  color: var(--ink);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.lead-address-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.lead-address-grid small {
  display: grid;
  gap: 3px;
  padding: 8px;
  border-radius: 6px;
  background: #f8fafc;
}

.detail-history-list {
  max-height: none;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.detail-history-item {
  background: #fff;
}

.detail-history-item p,
.detail-history-item small {
  overflow-wrap: anywhere;
}

.lead-comments-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.lead-comment-list {
  display: grid;
  gap: 12px;
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding-right: 4px;
}

.lead-comment-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.lead-comment-item.own-comment {
  grid-template-columns: minmax(0, 1fr) 42px;
}

.lead-comment-item.own-comment .lead-comment-avatar {
  grid-column: 2;
  grid-row: 1;
}

.lead-comment-item.own-comment .lead-comment-bubble {
  grid-column: 1;
  grid-row: 1;
  background: #eef8ff;
}

.comment-avatar {
  width: 42px;
  height: 42px;
  font-size: 16px;
}

.lead-comment-bubble {
  display: grid;
  gap: 6px;
  padding: 11px 12px;
  border: 1px solid #dbe4ec;
  border-radius: 8px;
  background: #f8fafc;
}

.lead-comment-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.lead-comment-head small {
  color: var(--muted);
}

.lead-comment-bubble p {
  margin: 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.lead-reply-quote,
.lead-reply-preview {
  display: grid;
  gap: 3px;
  border: 0;
  border-left: 3px solid #0ea5a4;
  border-radius: 6px;
  padding: 8px 10px;
  background: #f0fdfa;
  color: var(--ink);
  text-align: left;
}

.lead-reply-quote span,
.lead-reply-preview p {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-reply-preview {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.lead-reply-preview p {
  margin: 2px 0 0;
}

.lead-comment-footer {
  display: flex;
  justify-content: flex-end;
}

.lead-comment-reply-button {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  border: 0;
  padding: 2px 0;
  background: transparent;
  color: #0d6efd;
  font-size: 12px;
  font-weight: 900;
}

.lead-mention {
  border-radius: 999px;
  padding: 1px 6px;
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 800;
}

.lead-comment-form {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.lead-comment-tools {
  display: flex;
  gap: 10px;
  align-items: center;
}

.lead-comment-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 11px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.lead-comment-input-wrap {
  position: relative;
  display: grid;
}

.lead-mention-suggestions {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 8;
  display: grid;
  width: min(360px, 100%);
  max-height: 260px;
  overflow: auto;
  border: 1px solid #dbe4ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.16);
}

.lead-mention-suggestions button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid #edf2f7;
  padding: 9px 10px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.lead-mention-suggestions button:last-child {
  border-bottom: 0;
}

.lead-mention-suggestions button:hover,
.lead-mention-suggestions button.active {
  background: #f0f9ff;
}

.lead-mention-suggestions span {
  display: grid;
  min-width: 0;
}

.lead-mention-suggestions small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mention-avatar {
  width: 34px;
  height: 34px;
  font-size: 14px;
}

.lead-sticker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.lead-sticker-button {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border: 1px solid #dbe4ec;
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.lead-sticker-button:hover {
  border-color: #9bd5ff;
  background: #f0f9ff;
}

.lead-comment-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.lead-comment-actions small {
  color: var(--muted);
}

.profile-panel {
  overflow: hidden;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1fr);
  gap: 18px;
  padding: 0 18px 18px;
}

.profile-avatar-card,
.profile-avatar-tools,
.profile-form {
  display: grid;
  gap: 14px;
  align-content: start;
}

.profile-avatar-card {
  justify-items: center;
  text-align: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.profile-avatar-card small,
.profile-actions small,
.form-label-text {
  color: var(--muted);
  font-weight: 700;
}

.profile-avatar-large {
  width: 112px;
  height: 112px;
  font-size: 58px;
}

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

.profile-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  grid-column: 1 / -1;
}

.profile-avatar-tools {
  grid-column: 1 / -1;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.avatar-option-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.avatar-option {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  font-size: 22px;
}

.avatar-option.active,
.avatar-option:hover {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.user-cell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.wide-panel {
  min-width: 0;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
}

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

.page-size-control {
  display: inline-grid;
  grid-template-columns: auto minmax(78px, auto);
  gap: 8px;
  align-items: center;
  margin: 0;
}

.page-size-control span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.page-size-control select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
}

.section-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.panel > :not(.section-heading):not(.table-wrap) {
  margin: 16px;
}

.sdr-list,
.source-list,
.activity-list,
.editable-list,
.kpi-grid {
  display: grid;
  gap: 10px;
}

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

.sdr-row,
.source-row,
.activity-row,
.editable-row,
.kpi-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.sdr-row-top,
.source-row-top,
.editable-row,
.kpi-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.editable-row small,
.kpi-card small,
.kpi-line span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.kpi-line {
  display: grid;
  gap: 8px;
}

.kpi-line strong {
  font-size: 26px;
}

.user-settings-row {
  align-items: stretch;
}

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

.account-editor {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
}

.account-editor input {
  max-width: none;
}

.password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.bar-track {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #e9ecef;
}

.bar-track span {
  display: block;
  height: 100%;
  background: var(--teal);
}

.meeting-bar span {
  background: var(--amber);
}

.timeline-card small,
.lead-card small,
td small {
  color: var(--muted);
}

.timeline-panel {
  overflow: hidden;
}

.timeline-list {
  position: relative;
  gap: 0;
  padding: 4px 0;
}

.timeline-list::before {
  content: "";
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 36px;
  width: 2px;
  background: #dbeafe;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 0;
  padding: 10px 0;
}

.timeline-item-unread .timeline-card {
  border-color: #fdba74;
  background: #fff7ed;
}

.feed-unread-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-left: 6px;
  border-radius: 999px;
  padding: 0 7px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.timeline-marker {
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: 6px;
  z-index: 1;
}

.timeline-marker span {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #0d6efd;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 0 0 2px #bfdbfe;
}

.timeline-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.timeline-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.timeline-head strong,
.timeline-head span {
  display: block;
}

.timeline-head span,
.timeline-head time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.timeline-followup {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}

.timeline-followup strong {
  color: var(--ink);
  font-size: 13px;
}

.timeline-followup p {
  margin: 0;
}

.timeline-link {
  border: 0;
  border-radius: 999px;
  padding: 5px 10px;
  background: #eef6ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.timeline-link:hover {
  background: #dbeafe;
  color: #0b5ed7;
}

.followup-assistant-panel {
  display: grid;
  gap: 12px;
}

.followup-assistant-list {
  display: grid;
  gap: 12px;
}

.followup-assistant-compact {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
}

.followup-assistant-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.followup-assistant-summary span,
.followup-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 8px;
  background: #eff6ff;
  color: #075985;
  font-size: 12px;
  font-weight: 900;
}

.followup-compact-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.followup-compact-action p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.reminder-news-ticker {
  padding: 0 18px 14px;
}

.reminder-ticker {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 10px;
  background: #eff6ff;
}

.reminder-ticker.is-compact {
  max-width: min(760px, 100%);
  border: 0;
  padding: 0;
  background: transparent;
}

.reminder-ticker-track {
  min-width: 0;
  overflow: hidden;
}

.reminder-ticker-track span {
  display: block;
  color: #075985;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.reminder-ticker-track strong,
.reminder-ticker-track p {
  display: block;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reminder-ticker-track p {
  color: var(--muted);
  font-size: 13px;
}

.reminder-ticker-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.reminder-ticker-empty {
  margin: 0;
  color: var(--muted);
}

.reminder-page-panel {
  overflow: hidden;
}

.reminder-filter-tabs {
  display: flex;
  gap: 8px;
  padding: 0 18px 14px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.reminder-page-panel .followup-assistant-list {
  padding: 18px;
}

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

.followup-reminder-card {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.followup-reminder-card small,
.followup-reminder-card p,
.followup-guide-card small,
.followup-guide-card p,
.followup-modal-guide-card p,
.followup-modal-guide-card small {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.followup-reminder-card strong,
.followup-guide-card h3 {
  margin: 2px 0;
  color: var(--ink);
}

.followup-reminder-action {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 8px;
  background: #f8fafc;
}

.followup-reminder-action span,
.followup-guide-card span,
.followup-modal-guide-card span {
  color: #075985;
  font-size: 12px;
  font-weight: 900;
}

.followup-guide-card,
.followup-modal-guide-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
}

.followup-guide-meta {
  display: grid;
  justify-items: end;
  gap: 5px;
  text-align: right;
}

.followup-guide-meta strong {
  color: #075985;
}

.tone-urgent {
  border-color: #fecaca;
  background: #fff7f7;
}

.tone-warning {
  border-color: #fed7aa;
  background: #fff7ed;
}

.tone-active {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.tone-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.tone-neutral {
  border-color: var(--line);
  background: #f8fafc;
}

.timeline-pagination {
  margin: 0;
  border-radius: 0 0 var(--radius) var(--radius);
}

.inbox-layout {
  display: grid;
  gap: 16px;
}

.wa-browser-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 12px;
  padding: 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.wa-page-tabs {
  display: flex;
  gap: 8px;
  padding: 0 18px 14px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.wa-page-tab {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
  color: var(--muted);
  font-weight: 900;
  white-space: nowrap;
}

.wa-page-tab.active,
.wa-page-tab:hover {
  border-color: #0d8bd8;
  background: #eef8ff;
  color: #075985;
}

.wa-followup-panel {
  display: none;
}

.wa-followup-panel.active {
  display: block;
}

.wa-funnel-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.wa-funnel-hero h2 {
  margin: 0 0 8px;
  color: var(--ink);
}

.wa-funnel-hero p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.55;
}

.wa-funnel-summary {
  min-width: 132px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 14px;
  background: #eff6ff;
  color: #075985;
  text-align: center;
}

.wa-funnel-summary strong {
  font-size: 34px;
  line-height: 1;
}

.wa-funnel-summary span {
  color: #0369a1;
  font-size: 12px;
  font-weight: 900;
}

.wa-funnel-infographic {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  background: #eef9f6;
}

.wa-funnel-mini-map {
  position: sticky;
  top: 18px;
  align-self: start;
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 14px;
  border: 1px solid #d7e2e3;
  border-radius: 8px;
  background: #fff;
  list-style: none;
}

.wa-funnel-mini-map li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.wa-funnel-mini-map span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 11px;
  font-weight: 900;
}

.wa-funnel-flow {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.wa-funnel-phase {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.wa-funnel-phase-label {
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 116px;
  padding: 16px;
  border-radius: 8px;
  background: #0f766e;
  color: #fff;
}

.wa-funnel-phase-label strong {
  font-size: 18px;
}

.wa-funnel-phase-label span {
  color: #ccfbf1;
  font-size: 12px;
  line-height: 1.45;
}

.wa-funnel-phase-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.wa-funnel-phase-steps::before {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  top: 26px;
  height: 3px;
  background: #bae6fd;
}

.wa-funnel-step {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
  padding: 12px;
  border: 1px solid #d7e2e3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.08);
}

.wa-funnel-node {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 4px solid #bae6fd;
  border-radius: 999px;
  background: #0d8bd8;
  color: #fff;
  font-weight: 900;
}

.wa-funnel-node:hover,
.wa-funnel-node:focus {
  border-color: #0d8bd8;
  background: #075985;
}

.wa-funnel-node span {
  line-height: 1;
}

.wa-funnel-content {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.wa-funnel-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.wa-funnel-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.wa-funnel-head h3 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 15px;
}

.wa-funnel-head strong {
  color: #047857;
  font-size: 12px;
  white-space: nowrap;
}

.wa-funnel-content p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.wa-funnel-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.wa-funnel-tags small {
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  padding: 5px 8px;
  background: #f0fdf4;
  color: #047857;
  font-size: 11px;
  font-weight: 900;
}

.wa-search-box {
  position: relative;
}

.wa-search-box i {
  position: absolute;
  left: 14px;
  top: 50%;
  color: var(--muted);
  transform: translateY(-50%);
  z-index: 1;
}

.wa-search-box input {
  width: 100%;
  padding-left: 42px;
}

.wa-language-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #b8c3cf;
  border-radius: 4px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.wa-language-button select {
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 800;
  outline: 0;
  appearance: none;
}

.wa-copy-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 0;
  min-height: 680px;
  background: #eef9f6;
}

.wa-category-sidebar {
  position: sticky;
  top: 82px;
  z-index: 4;
  display: grid;
  gap: 8px;
  align-content: start;
  align-self: start;
  max-height: calc(100vh - 104px);
  overflow: auto;
  padding: 20px;
  background: #fff;
  border-right: 1px solid var(--line);
}

.wa-template-workspace {
  display: grid;
  align-content: start;
  gap: 18px;
  min-width: 0;
  padding: 28px;
}

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

.template-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 22px;
  padding: 32px;
  overflow-x: hidden;
}

.template-form .modal-heading,
.template-form .full-span,
.template-form small,
.template-form .modal-actions {
  grid-column: 1 / -1;
}

.template-form .modal-heading {
  margin: 0;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
}

.template-form label {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.template-form label span {
  color: #667085;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.template-form input,
.template-form select,
.template-form textarea {
  width: 100%;
  min-width: 0;
}

.template-form textarea {
  min-height: 190px;
  max-height: 32vh;
  resize: vertical;
}

.template-form small {
  color: var(--muted);
  line-height: 1.5;
}

.template-form .modal-actions {
  margin: 6px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  background: #fff;
}

.whatsapp-template-list {
  display: grid;
  gap: 16px;
}

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

.wa-category-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 0;
  padding: 9px 0;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  text-align: left;
}

.wa-category-option.active,
.wa-category-option:hover {
  color: #0676bd;
}

.wa-category-option span {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

.wa-category-option i {
  width: 30px;
  height: 30px;
  display: inline-block;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
}

.wa-category-option.active i {
  border: 8px solid #0d8bd8;
}

.wa-category-option strong {
  color: var(--muted);
  font-size: 13px;
}

.wa-sdr-tips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wa-sdr-tips span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.wa-results-count {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.wa-template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px 20px;
  align-items: stretch;
}

.whatsapp-template-card {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0;
  align-items: start;
  padding: 0;
  border: 1px solid #d7e2e3;
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.12);
}

.whatsapp-template-card.active {
  border-color: #86b7fe;
  background: #f8fbff;
}

.wa-template-meta {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.wa-template-meta strong,
.wa-template-meta span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wa-template-meta strong {
  color: var(--ink);
  font-size: 14px;
}

.wa-template-meta span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.wa-template-info {
  width: 32px;
  height: 32px;
  min-height: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
}

.wa-template-tooltip {
  grid-column: 1 / -1;
  width: 100%;
  display: none;
  gap: 6px;
  margin-top: 2px;
  padding: 10px 11px;
  border: 1px solid #d7e2e3;
  border-radius: 8px;
  background: #f8fafc;
  box-shadow: none;
}

.wa-template-tooltip b,
.wa-template-tooltip p,
.wa-template-tooltip small {
  margin: 0;
}

.wa-template-tooltip p {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wa-template-tooltip small {
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
}

.wa-template-info:hover + .wa-template-tooltip,
.wa-template-info:focus + .wa-template-tooltip,
.wa-template-meta:focus-within .wa-template-tooltip {
  display: grid;
}

.whatsapp-template-pick {
  display: grid;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.wa-chat-preview {
  display: grid;
  min-height: 300px;
  background: #e7dfd5;
}

.wa-chat-screen {
  min-height: 300px;
  overflow: hidden;
  padding: 32px 24px;
  background:
    radial-gradient(circle at 10px 10px, rgba(0, 0, 0, 0.035) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)),
    #e5ddd5;
}

.wa-chat-bubble {
  position: relative;
  width: min(100%, 340px);
  margin: 0 auto;
  padding: 13px 13px 26px;
  border-radius: 7px;
  background: #fff;
  color: #1f2937;
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.12);
}

.wa-chat-bubble p {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 10;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wa-chat-bubble-full {
  width: min(100%, 620px);
}

.wa-chat-bubble-full p {
  display: block;
  overflow: visible;
  white-space: pre-wrap;
}

.wa-chat-bubble time {
  position: absolute;
  right: 11px;
  bottom: 7px;
  color: #9ca3af;
  font-size: 11px;
}

.wa-placeholder {
  color: #2f7d18;
}

.wa-template-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.92);
}

.wa-template-tags {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wa-template-tags small {
  min-width: 0;
  max-width: 150px;
  border-radius: 999px;
  padding: 4px 7px;
  background: #ecfdf5;
  color: #047857;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wa-preview-form {
  display: grid;
  max-height: calc(100vh - 48px);
  overflow: hidden;
}

.wa-preview-modal-body {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  min-height: 0;
  max-height: min(70vh, 720px);
  overflow: hidden;
}

.wa-preview-message {
  min-width: 0;
  min-height: 0;
  overflow: auto;
}

.wa-chat-preview-full,
.wa-chat-preview-full .wa-chat-screen {
  min-height: 100%;
}

.wa-chat-preview-full .wa-chat-screen {
  overflow: visible;
}

.wa-preview-send-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: #f8fafc;
  overflow: auto;
}

.wa-preview-send-panel label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 800;
}

.wa-preview-send-panel input,
.wa-preview-send-panel select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 11px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.wa-preview-send-panel select:not([size]) {
  height: 44px;
  min-height: 44px;
}

#waPreviewLeadSelect {
  min-height: 190px;
  max-height: 220px;
}

.wa-preview-send-panel option {
  padding: 8px;
}

.toolbar,
.date-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(5, minmax(140px, 180px));
  gap: 12px;
}

.leads-toolbar {
  grid-template-columns: minmax(260px, 1.6fr) repeat(6, minmax(140px, 1fr));
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.leads-toolbar label {
  min-width: 0;
}

.leads-toolbar .search-box {
  min-width: 260px;
}

.pipeline-toolbar {
  grid-template-columns: minmax(180px, 240px) minmax(160px, 200px) repeat(2, minmax(150px, 180px)) auto auto;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.date-toolbar {
  grid-template-columns: minmax(180px, 220px) repeat(2, minmax(160px, 190px)) auto;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

label {
  display: grid;
  gap: 6px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

textarea {
  resize: vertical;
}

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

.table-panel .section-heading {
  padding: 14px 16px;
}

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

table {
  width: 100%;
  margin-bottom: 0 !important;
  min-width: 980px;
  --bs-table-striped-bg: #f8fbff;
  --bs-table-hover-bg: #eef6ff;
}

.master-table {
  min-width: 560px;
}

.target-table {
  min-width: 820px;
}

.master-table th:first-child,
.master-table td:first-child {
  width: 72px;
}

.master-table th:nth-child(2),
.master-table td:nth-child(2) {
  width: 130px;
}

.master-table th:last-child,
.master-table td:last-child {
  width: 220px;
}

th,
td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
}

th {
  color: #495057;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
  background: #f8fafc !important;
}

.table > :not(caption) > * > * {
  border-bottom-color: #e9edf3;
}

.table tbody tr:nth-child(even) > * {
  background-color: #fcfdff;
}

.table tbody tr:hover > * {
  background-color: #eef6ff !important;
}

.table th:first-child,
.table td:first-child {
  width: 42px;
  text-align: center;
}

.lead-select-input,
#selectAllLeadsInput {
  width: 16px;
  height: 16px;
}

.status-pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: #e8f3ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.status-warning {
  background: #fff4e6;
  color: #b45309;
}

.status-success {
  background: #e8fdf0;
  color: #047857;
}

.matrix-table th:nth-child(n + 4),
.matrix-table td:nth-child(n + 4) {
  text-align: right;
}

.matrix-table th:last-child,
.matrix-table td:last-child {
  text-align: left;
}

.kpi-review-editor {
  max-height: 58vh;
  overflow: auto;
}

.kpi-review-editor textarea {
  min-width: 260px;
  width: 100%;
  resize: vertical;
}

.kpi-export-wizard {
  display: grid;
  gap: 16px;
}

.kpi-person-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.kpi-person-card > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #f8fafc;
}

.kpi-person-card span,
.kpi-person-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.kpi-person-card strong {
  display: block;
  margin: 6px 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}

#kpiExportDialog {
  width: min(1160px, calc(100vw - 40px));
  max-height: calc(100vh - 48px);
  overflow: hidden;
}

.kpi-export-form {
  display: grid;
  max-height: calc(100vh - 48px);
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.kpi-export-body {
  display: grid;
  gap: 18px;
  overflow-y: auto;
  padding: 18px 22px 22px;
}

.kpi-export-form .form-grid {
  padding: 0;
}

.kpi-export-form label {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.kpi-export-form label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.kpi-export-form input,
.kpi-export-form select,
.kpi-export-form textarea {
  width: 100%;
}

.kpi-export-form textarea {
  min-height: 118px;
  resize: vertical;
}

.kpi-export-form #kpiExportNotesInput {
  min-height: 96px;
}

.kpi-export-form .modal-actions {
  position: sticky;
  bottom: 0;
  z-index: 1;
}

.row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.table-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.small-button {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  min-height: 32px;
  padding: 0 10px;
  font-weight: 600;
  color: var(--ink);
}

.small-button:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.small-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.action-button {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-radius: 8px;
  font-size: 15px;
}

.action-button-primary {
  border-color: #b9d7ff;
  background: #eef6ff;
  color: #0d6efd;
}

.action-button-primary:hover {
  border-color: #86b7fe;
  background: #dbeafe;
  color: #0b5ed7;
}

.action-button-info {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #047857;
}

.action-button-info:hover {
  border-color: #6ee7b7;
  background: #d1fae5;
  color: #065f46;
}

.action-button-secondary {
  border-color: #d8dee8;
  background: #f8fafc;
  color: #475569;
}

.action-button-secondary:hover {
  border-color: #cbd5e1;
  background: #eef2f7;
  color: #334155;
}

.action-button-danger {
  border-color: #fecaca;
  background: #fef2f2;
  color: #dc2626;
}

.action-button-danger:hover {
  border-color: #fca5a5;
  background: #fee2e2;
  color: #b91c1c;
}

.pipeline-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 1fr);
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.pipeline-scroll-top {
  overflow-x: auto;
  overflow-y: hidden;
  height: 16px;
  margin: 0 0 10px;
}

.pipeline-scroll-top > div {
  height: 1px;
}

.pipeline-column {
  min-height: 560px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pipeline-column header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.pipeline-column header small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.pipeline-dropzone {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 480px;
  padding: 14px;
}

.lead-card {
  padding: 14px;
  box-shadow: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.lead-card[draggable="true"] {
  cursor: pointer;
}

.lead-card:hover,
.lead-card:focus {
  border-color: #b9d7ff;
  box-shadow: 0 8px 20px rgba(13, 110, 253, 0.12);
  outline: 0;
  transform: translateY(-1px);
}

.lead-card h3 {
  margin-bottom: 4px;
}

.lead-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.lead-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: #eef5ef;
  color: #1f6f43;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 800;
}

.sdr-avatar-label strong {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #0d6efd;
  color: #fff;
  font-size: 10px;
  line-height: 1;
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 14px;
}

.user-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

dialog .inline-form,
dialog .template-form,
dialog .user-form {
  margin-bottom: 0;
}

dialog .template-form,
dialog .user-form {
  width: min(760px, calc(100vw - 36px));
}

dialog .user-form .modal-actions button,
dialog .template-form .modal-actions button {
  grid-column: auto;
}

.target-mini {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin: 0;
}

.target-mini legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.target-editor {
  display: grid;
  gap: 10px;
}

.target-editor {
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  width: 100%;
}

.target-period-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 240px) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f9fa;
}

.target-mini {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  background: #f8f9fa;
}

.target-modal-grid {
  grid-template-columns: 1fr;
}

.target-modal-grid .target-mini {
  margin: 0;
}

.monthly-target {
  background: #eef8f6;
  border-color: #b7e4dc;
}

.selected-row {
  background: #eef6ff;
}

.target-month-modal-field {
  max-width: 260px;
}

.target-month-editor {
  max-height: 62vh;
  overflow: auto;
}

.target-month-editor input {
  min-width: 92px;
}

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

.user-form button {
  grid-column: 1 / -1;
}

.inline-form.two-columns {
  grid-template-columns: 1fr 100px auto;
}

.editable-row input {
  max-width: 140px;
}

.danger-panel {
  grid-column: 1 / -1;
}

dialog {
  width: min(760px, calc(100vw - 32px));
  border: 0;
  border-radius: 14px;
  padding: 0;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
}

#waTemplateModal {
  width: min(820px, calc(100vw - 40px));
  max-height: calc(100vh - 48px);
  overflow: hidden;
}

#waTemplateModal .template-form {
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 32px 24px 32px 32px;
}

#waTemplateModal .modal-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding-bottom: 2px;
  box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.04);
}

#waTemplateModal .template-helper {
  display: block;
  padding: 12px 14px;
  border: 1px solid #dbe4ec;
  border-radius: 6px;
  background: #f8fafc;
}

.wide-dialog {
  width: min(1180px, calc(100vw - 28px));
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.48);
}

.lead-form {
  padding: 0;
}

.import-preview-body {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.import-preview-wrap {
  max-height: min(62vh, 640px);
  overflow: auto;
}

.import-preview-table {
  min-width: 980px;
}

.import-preview-table th,
.import-preview-table td {
  white-space: nowrap;
}

.modal-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 0;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

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

.input-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.input-action-row .ghost-button {
  min-height: 42px;
  white-space: nowrap;
}

.detect-status {
  display: block;
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

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

.lead-extra-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  overflow: hidden;
}

.lead-extra-details summary {
  cursor: pointer;
  padding: 12px 14px;
  color: var(--ink);
  font-weight: 800;
}

.lead-extra-details summary::marker {
  color: var(--primary);
}

.nested-form-grid {
  padding: 0 14px 14px;
}

.modal-actions {
  justify-content: flex-end;
  margin-top: 0;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: #f8f9fa;
}

.history-panel {
  display: grid;
  gap: 10px;
  margin: 0 18px 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.history-list {
  display: grid;
  gap: 10px;
  max-height: 280px;
  overflow: auto;
}

.history-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f8f9fa;
}

.history-item-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.history-item small {
  color: var(--muted);
}

.empty-state {
  color: var(--muted);
  padding: 18px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

/* EstateFlow premium application shell */
.app-shell {
  --ink: #102a3b;
  --muted: #71818c;
  --line: #dfe8ed;
  --bg: #f2f6f8;
  --surface: #ffffff;
  --blue: #0e7f88;
  --teal: #0f9b8e;
  --green: #16a779;
  --sidebar: #071f31;
  --sidebar-soft: rgba(255, 255, 255, 0.065);
  --shadow: 0 10px 34px rgba(19, 51, 68, 0.065), 0 2px 8px rgba(19, 51, 68, 0.035);
  --radius: 15px;
  grid-template-columns: 278px minmax(0, 1fr);
  background:
    radial-gradient(circle at 96% 2%, rgba(14, 127, 136, 0.07), transparent 24%),
    var(--bg);
}

.app-shell .sidebar {
  padding: 0 15px 20px;
  background:
    radial-gradient(circle at 0 100%, rgba(15, 155, 142, 0.14), transparent 30%),
    linear-gradient(180deg, #071f31 0%, #092839 100%);
  box-shadow: 12px 0 42px rgba(7, 31, 49, 0.12);
}

.app-shell .sidebar-head {
  min-height: 78px;
  margin: 0 -15px;
  padding: 15px 16px;
  border-bottom-color: rgba(255, 255, 255, 0.07);
  background: transparent;
}

.app-shell .sidebar-brand {
  gap: 11px;
}

.app-shell .brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(145deg, #1688e8, #0ea5a4);
  font-size: 18px;
  box-shadow: 0 10px 24px rgba(14, 165, 164, 0.2);
}

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

.sidebar-brand-copy strong {
  font-size: 18px;
  letter-spacing: -0.025em;
}

.sidebar-brand-copy small {
  color: #6f94a3;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.2em;
}

.app-shell .sidebar-toggle {
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.05);
  color: #9db4bf;
}

.app-shell .sidebar-profile {
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(12px);
}

.app-shell .sidebar-profile:hover {
  border-color: rgba(94, 234, 212, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

.app-shell .sidebar-avatar {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  background: #dff7f2;
  color: #087b72;
}

.app-shell .sidebar-title {
  padding: 6px 11px 2px;
  color: #668594;
  font-size: 9px;
  letter-spacing: 0.16em;
}

.app-shell .nav-tabs {
  gap: 5px;
}

.app-shell .nav-tab {
  min-height: 45px;
  border-radius: 11px;
  padding: 0 13px;
  color: #9fb4be;
  font-size: 13px;
  font-weight: 700;
}

.app-shell .nav-tab i {
  width: 21px;
  color: #6f929f;
  font-size: 16px;
  text-align: center;
}

.app-shell .nav-tab.active,
.app-shell .nav-tab:hover {
  border-color: rgba(94, 234, 212, 0.1);
  background: linear-gradient(135deg, rgba(15, 155, 142, 0.23), rgba(14, 127, 136, 0.16));
  color: #f3fbfb;
  box-shadow: inset 3px 0 0 #5eead4;
}

.app-shell .nav-tab.active i,
.app-shell .nav-tab:hover i {
  color: #5eead4;
}

.app-shell .settings-submenu {
  padding-left: 32px;
}

.app-shell .settings-submenu-item {
  border-radius: 9px;
  color: #89a4af;
  font-size: 12px;
}

.app-shell .sidebar-logout {
  min-height: 44px;
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.045);
  color: #9fb4be;
}

.app-shell .sidebar-logout:hover {
  border-color: rgba(248, 113, 113, 0.2);
  background: rgba(248, 113, 113, 0.11);
  color: #fecaca;
}

.app-shell .main {
  padding: 0 28px 38px;
}

.app-shell .topbar {
  min-height: 78px;
  margin: 0 -28px 26px;
  padding: 0 30px;
  border-bottom-color: rgba(210, 224, 231, 0.8);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 5px 20px rgba(31, 68, 86, 0.035);
  backdrop-filter: blur(18px);
}

.app-shell .topbar .eyebrow {
  margin-bottom: 4px;
  color: #0e8c82;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.app-shell .topbar h1 {
  color: #102e3f;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.app-shell .notification-button,
.app-shell .sidebar-open-button {
  border-color: #dce7eb;
  border-radius: 12px;
  background: #f9fbfc;
  color: #315566;
}

.app-shell .notification-menu {
  border-color: #dce7eb;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(13, 45, 63, 0.18);
}

.app-shell .view.active {
  gap: 19px;
}

.app-shell .panel,
.app-shell .pipeline-column,
.app-shell .lead-card,
.app-shell .kpi-card,
.app-shell .metric,
.app-shell .info-timebar div,
.app-shell .toolbar,
.app-shell .date-toolbar {
  border-color: #dfe8ed;
  border-radius: 15px;
  box-shadow: var(--shadow);
}

.app-shell .section-heading {
  min-height: 74px;
  align-items: center;
  padding: 18px 20px;
  border-bottom-color: #e7eef2;
  border-radius: 15px 15px 0 0;
  background: linear-gradient(180deg, #ffffff, #fcfdfd);
}

.app-shell .section-heading h2 {
  color: #153548;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.app-shell .section-heading p {
  color: #82929c;
  font-size: 12px;
}

.app-shell .info-timebar {
  gap: 13px;
}

.app-shell .info-timebar div {
  position: relative;
  gap: 5px;
  overflow: hidden;
  padding: 16px 18px;
  background: linear-gradient(145deg, #ffffff, #f9fcfc);
}

.app-shell .info-timebar div::after {
  content: "";
  position: absolute;
  width: 52px;
  height: 52px;
  right: -18px;
  bottom: -24px;
  border-radius: 50%;
  background: rgba(14, 127, 136, 0.08);
}

.app-shell .info-timebar span {
  color: #82939d;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.app-shell .info-timebar strong {
  color: #17384a;
  font-size: 16px;
}

.app-shell .date-toolbar,
.app-shell .leads-toolbar,
.app-shell .pipeline-toolbar {
  padding: 16px;
  background: rgba(255, 255, 255, 0.92);
}

.app-shell label > span,
.app-shell .panel-label,
.app-shell .form-label-text {
  color: #667d89;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.055em;
}

.app-shell input,
.app-shell select,
.app-shell textarea {
  min-height: 43px;
  border-color: #dce6eb;
  border-radius: 10px;
  background: #fbfcfd;
  color: #183849;
}

.app-shell textarea {
  min-height: auto;
}

.app-shell input:focus,
.app-shell select:focus,
.app-shell textarea:focus {
  border-color: #2b9b9b;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(43, 155, 155, 0.1);
}

.app-shell .primary-button {
  min-height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0c7280, #10978e);
  box-shadow: 0 8px 18px rgba(14, 127, 136, 0.16);
  font-weight: 750;
}

.app-shell .primary-button:hover {
  background: linear-gradient(135deg, #095f6c, #0b827b);
  box-shadow: 0 10px 24px rgba(14, 127, 136, 0.22);
}

.app-shell .ghost-button,
.app-shell .icon-button {
  border-color: #dbe6eb;
  border-radius: 10px;
  background: #fff;
  color: #365563;
}

.app-shell .ghost-button:hover,
.app-shell .icon-button:hover {
  border-color: #bcd5d9;
  background: #f1f8f8;
  color: #0d7479;
}

.app-shell .metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}

.app-shell .metric {
  grid-template-columns: 38px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  gap: 2px 12px;
  padding: 18px;
  background: linear-gradient(145deg, #fff, #fbfdfd);
}

.app-shell .metric::before {
  display: none;
}

.app-shell .metric > i {
  grid-row: 1 / 4;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #e5f6f3;
  color: #0b897f;
  font-size: 17px;
}

.app-shell .metric span {
  color: #778b96;
  font-size: 10px;
  text-transform: uppercase;
}

.app-shell .metric strong {
  color: #133447;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.app-shell .metric small {
  color: #9aa8b0;
  font-size: 9px;
}

.app-shell .metric-hot {
  border-color: #fecaca;
  background: linear-gradient(145deg, #fff, #fff8f7);
}

.app-shell .metric-visit {
  border-color: #a7e2da;
  background: linear-gradient(145deg, #fff, #f2fbf9);
}

.app-shell .metric-visit > i {
  background: #d9f5f0;
  color: #078577;
}

.app-shell .metric-visit strong {
  color: #076b64;
}

.app-shell .metric-hot > i {
  background: #fee2e2;
  color: #dc2626;
}

.app-shell .metric-hot strong {
  color: #b91c1c;
}

.app-shell .metric-warm {
  border-color: #fde3a7;
  background: linear-gradient(145deg, #fff, #fffbeb);
}

.app-shell .metric-warm > i {
  background: #fef3c7;
  color: #d97706;
}

.app-shell .metric-warm strong {
  color: #b45309;
}

.app-shell .metric-cold {
  border-color: #bfdbfe;
  background: linear-gradient(145deg, #fff, #f5f9ff);
}

.app-shell .metric-cold > i {
  background: #dbeafe;
  color: #2563eb;
}

.app-shell .metric-cold strong {
  color: #1d4ed8;
}

.app-shell .target-summary-panel {
  padding: 18px 20px;
  background: linear-gradient(110deg, #0a3245, #0d5960);
  color: #fff;
}

.app-shell .target-summary-panel .panel-label,
.app-shell .target-summary-panel small {
  color: #a7c5cc;
}

.app-shell .target-summary-panel .progress-track {
  height: 9px;
  background: rgba(255, 255, 255, 0.15);
}

.app-shell .target-summary-panel .progress-track span {
  border-radius: 99px;
  background: linear-gradient(90deg, #2dd4bf, #6ee7b7);
}

.app-shell .sdr-row,
.app-shell .source-row,
.app-shell .activity-row,
.app-shell .editable-row,
.app-shell .kpi-card {
  border-color: #e1eaee;
  border-radius: 12px;
  padding: 14px;
  background: #fcfdfd;
}

.app-shell .progress-track {
  border-radius: 999px;
  background: #e7eff2;
}

.app-shell .progress-track span {
  border-radius: 999px;
  background: linear-gradient(90deg, #0e7f88, #16a779);
}

.app-shell .table-wrap {
  scrollbar-color: #bfd1d8 transparent;
}

.app-shell table {
  --bs-table-striped-bg: #fafcfc;
  --bs-table-hover-bg: #edf8f7;
}

.app-shell th {
  height: 48px;
  vertical-align: middle;
  background: #f5f9fa !important;
  color: #5f7783;
  font-size: 10px;
  letter-spacing: 0.055em;
}

.app-shell td {
  padding-top: 14px;
  padding-bottom: 14px;
  color: #294755;
}

.app-shell .table > :not(caption) > * > * {
  border-bottom-color: #e7eef1;
}

.app-shell .table tbody tr:hover > *,
.app-shell .clickable-row:hover td {
  background: #edf8f7 !important;
}

.app-shell .status-pill {
  min-height: 27px;
  padding: 0 10px;
  background: #e3f4f3;
  color: #087c78;
  font-size: 10px;
  letter-spacing: 0.02em;
}

.app-shell .pipeline-board {
  gap: 14px;
}

.app-shell .pipeline-column {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.72);
}

.app-shell .pipeline-column header {
  min-height: 72px;
  border-bottom-color: #e1eaee;
  background: linear-gradient(180deg, #fff, #f8fbfb);
}

.app-shell .pipeline-column header h2 {
  color: #17394a;
  font-size: 15px;
}

.app-shell .lead-card {
  border-color: #dfe9ed;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(25, 61, 78, 0.055);
}

.app-shell .lead-card:hover,
.app-shell .lead-card:focus {
  border-color: #82c9c3;
  box-shadow: 0 12px 26px rgba(14, 127, 136, 0.12);
}

.app-shell .lead-card-meta span {
  background: #e8f6f3;
  color: #127a70;
}

body > dialog {
  --blue: #0e7f88;
  --teal: #0f9b8e;
  --ink: #102a3b;
  --muted: #71818c;
  --line: #dfe8ed;
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(8, 35, 51, 0.25);
}

body > dialog::backdrop {
  background: rgba(5, 24, 36, 0.58);
  backdrop-filter: blur(4px);
}

body > dialog .modal-heading {
  background: linear-gradient(180deg, #fff, #f8fbfb);
}

.app-shell .table-pagination button {
  border-radius: 9px;
}

@media (max-width: 980px) {
  .login-screen {
    padding: 24px;
  }

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

  .login-showcase {
    display: none;
  }

  .login-panel {
    padding: 48px;
  }

  .login-mobile-brand {
    display: flex;
  }

  .app-shell,
  .app-shell.sidebar-collapsed {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .app-shell .main {
    padding: 0 22px 32px;
  }

  .app-shell .topbar {
    margin: 0 -22px 22px;
    padding: 0 22px;
  }

  .sidebar {
    position: static;
    height: auto;
    min-height: 0;
    overflow: visible;
    padding: 18px;
  }

  .app-shell.sidebar-collapsed .sidebar {
    display: none;
  }

  .main {
    height: auto;
    overflow: visible;
  }

  .nav-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .metric-grid,
  .info-timebar,
  .content-grid,
  .settings-grid,
  .toolbar,
  .date-toolbar,
  .kpi-grid {
    grid-template-columns: 1fr 1fr;
  }

  .target-editor {
    grid-template-columns: 1fr 1fr;
  }

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

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

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

  .followup-assistant-compact,
  .followup-compact-action {
    align-items: stretch;
    flex-direction: column;
  }

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

  .reminder-ticker-actions {
    grid-column: 1 / -1;
  }

  .profile-layout,
  .profile-form,
  .lead-detail-layout,
  .wa-copy-layout {
    grid-template-columns: 1fr;
  }

  .wa-category-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .lead-detail-summary {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .lead-detail-workstream {
    grid-template-rows: none;
  }

  .lead-detail-timeline,
  .lead-comments-panel,
  .detail-history-list,
  .lead-comment-list {
    max-height: none;
    overflow: visible;
  }

  .wa-browser-bar {
    grid-template-columns: 1fr;
  }

  .wa-funnel-hero {
    flex-direction: column;
  }

  .wa-funnel-infographic {
    grid-template-columns: 1fr;
  }

  .wa-funnel-mini-map {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wa-funnel-phase {
    grid-template-columns: 1fr;
  }

  .wa-funnel-phase-label {
    min-height: 0;
  }

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

  .leads-toolbar .search-box {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .login-screen {
    display: block;
    padding: 0;
    background: #fff;
  }

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

  .login-panel {
    align-items: start;
    padding: 34px 24px;
  }

  .login-card {
    gap: 17px;
  }

  .login-heading h2 {
    font-size: 28px;
  }

  .login-captcha-wrap {
    grid-template-columns: 1fr;
  }

  .login-trust {
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
  }

  .main {
    height: auto;
    overflow: visible;
    padding: 18px;
  }

  .app-shell .main {
    padding: 0 16px 26px;
  }

  .app-shell .topbar {
    min-height: 70px;
    margin: 0 -16px 18px;
    padding: 12px 16px;
  }

  .app-shell .metric {
    min-height: 104px;
  }

  .topbar {
    gap: 12px;
  }

  .sidebar-head {
    align-items: stretch;
  }

  .topbar,
  .section-heading,
  .sdr-row-top,
  .source-row-top,
  .editable-row,
  .user-settings-head,
  .kpi-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-notification {
    width: 100%;
    margin-left: 0;
    display: flex;
    justify-content: flex-end;
  }

  .nav-tabs,
  .metric-grid,
  .info-timebar,
  .target-summary-panel,
  .content-grid,
  .settings-grid,
  .toolbar,
  .date-toolbar,
  .kpi-grid,
  .form-grid,
  .inline-form,
  .user-form,
  .target-editor,
  .target-period-toolbar,
  .account-editor,
  .profile-layout,
  .profile-form,
  .lead-detail-layout,
  .lead-detail-grid,
  .lead-address-grid,
  .wa-copy-layout,
  .wa-preview-modal-body,
  .inline-form.two-columns {
    grid-template-columns: 1fr;
  }

  .wa-preview-modal-body {
    max-height: calc(100vh - 150px);
    overflow: auto;
  }

  .wa-preview-send-panel {
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  .lead-comment-tools {
    grid-template-columns: 1fr;
  }

  .lead-comment-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .lead-detail-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .pipeline-board {
    grid-auto-flow: row;
    grid-auto-columns: auto;
  }

  .pipeline-column {
    min-height: 320px;
  }

  .timeline-list::before {
    left: 24px;
  }

  .timeline-item {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .timeline-marker span {
    width: 34px;
    height: 34px;
    font-size: 11px;
  }

  .timeline-head {
    flex-direction: column;
    gap: 4px;
  }

  .whatsapp-toolbar,
  .template-form,
  .whatsapp-template-card,
  .followup-reminder-grid,
  .followup-guide-card,
  .followup-modal-guide-card,
  .wa-template-grid {
    grid-template-columns: 1fr;
  }

  .followup-guide-meta {
    justify-items: start;
    text-align: left;
  }

  .template-form {
    padding: 24px;
  }

  #waTemplateModal .template-form {
    padding: 24px;
  }

  .template-form .modal-actions {
    margin-right: 0;
    margin-left: 0;
    padding-right: 0;
    padding-left: 0;
  }

  .wa-copy-layout {
    min-height: 0;
  }

  .wa-funnel-infographic {
    padding: 14px;
  }

  .wa-funnel-phase-steps {
    grid-template-columns: 1fr;
  }

  .wa-funnel-phase-steps::before {
    left: 31px;
    right: auto;
    top: 20px;
    bottom: 20px;
    width: 3px;
    height: auto;
  }

  .wa-template-workspace {
    padding: 18px;
  }

  .wa-category-sidebar {
    position: static;
  }

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

  .leads-toolbar .search-box {
    min-width: 0;
  }

  .table-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .pagination-controls {
    justify-content: space-between;
  }
}
