:root {
  --bg: #f5f8f7;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #687385;
  --line: #dfe5ec;
  --teal-950: #022c25;
  --teal-900: #064237;
  --teal-800: #075646;
  --teal-700: #047857;
  --teal-600: #059669;
  --blue-600: #2563eb;
  --green-600: #16a34a;
  --amber-500: #d99b18;
  --red-600: #dc2626;
  --violet-600: #7c3aed;
  --soft-teal: #e6f5f3;
  --soft-blue: #eaf1ff;
  --soft-green: #e9f8ef;
  --soft-amber: #fff5da;
  --soft-red: #fdecec;
  --shadow: 0 16px 38px rgba(15, 23, 42, 0.10);
}

* { box-sizing: border-box; }

html {
  height: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  height: 100%;
  min-height: 100vh;
  overflow: hidden;
  color: var(--ink);
  font-family: Inter, Segoe UI, Arial, sans-serif;
  background: var(--bg);
}

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

button { cursor: pointer; }

svg { width: 20px; height: 20px; flex: 0 0 auto; }

.app-root {
  height: 100vh;
  min-height: 100vh;
  min-width: 0;
}

@supports (height: 100dvh) {
  body,
  .app-root,
  .app-shell {
    height: 100dvh;
    min-height: 100dvh;
  }
}

.app-shell {
  height: 100vh;
  min-height: 100vh;
  min-width: 0;
  display: grid;
  grid-template-columns: clamp(210px, 17vw, 240px) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    radial-gradient(circle at 30% 12%, rgba(16, 185, 129, 0.32), transparent 28%),
    radial-gradient(circle at 80% 82%, rgba(20, 184, 166, 0.22), transparent 30%),
    linear-gradient(155deg, #053f34 0%, #012f29 48%, #001d1a 100%);
  color: #fff;
  z-index: 20;
  box-shadow: 18px 0 42px rgba(1, 45, 38, 0.24);
  overflow: hidden;
}

.brand {
  min-height: 104px;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 18px 12px 16px;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.brand-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #0f8a68, #27c79a);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

.logo-mark {
  overflow: hidden;
  background: #fff;
  padding: 4px;
}

.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

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

.brand strong { font-size: 15px; line-height: 1.12; }
.brand small { margin-top: 3px; color: rgba(255,255,255,0.72); }

.brand em {
  display: inline-flex;
  margin-top: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #d7fff4;
  background: rgba(255,255,255,0.10);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.brand-button:hover {
  background: rgba(255,255,255,0.06);
}

.brand-button:focus-visible {
  outline: 3px solid rgba(16, 185, 129, 0.42);
  outline-offset: -3px;
}

.nav-list {
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-item {
  width: 100%;
  min-height: 48px;
  margin-bottom: 6px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: rgba(255,255,255,0.86);
  background: transparent;
  text-align: left;
  font-weight: 750;
}

.nav-item:hover { background: rgba(255,255,255,0.10); }

.nav-item.active {
  color: #fff;
  background:
    linear-gradient(45deg, rgba(255,255,255,0.12), transparent 38%),
    linear-gradient(135deg, rgba(16, 185, 129, 0.88), rgba(20, 184, 166, 0.48));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.22), 0 12px 24px rgba(0,0,0,0.12);
}

.source-box {
  margin: 12px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 12px;
  background: rgba(255,255,255,0.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.source-box small,
.source-box strong,
.source-box span { display: block; }
.source-box small { color: rgba(255,255,255,0.64); }
.source-box strong { margin-top: 4px; }
.source-box span { margin-top: 5px; color: rgba(255,255,255,0.72); font-size: 13px; }

.content-shell {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #fff;
  border-radius: 26px 0 0 0;
  overflow: hidden;
  box-shadow: -8px 0 34px rgba(15, 23, 42, 0.08);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 68px;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr) minmax(240px, 420px) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(16px);
}

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

.topbar-title h1 {
  margin: 0;
  font-size: 23px;
  line-height: 1.1;
  letter-spacing: 0;
}

.topbar-title span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.mobile-menu { display: none; }

.global-search {
  position: relative;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.global-search > svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

.global-search input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 58px 0 42px;
  outline: none;
  color: var(--ink);
  background: #fff;
  text-overflow: ellipsis;
}

.voice-search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  width: 36px;
  height: 36px;
  min-height: 36px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: var(--teal-800);
  background: #eef8f4;
  transform: translateY(-50%);
  z-index: 1;
}

.voice-search-btn:hover,
.voice-search-btn.listening {
  color: #fff;
  background: var(--teal-700);
}

.global-search input:focus,
.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--teal-700);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  flex-wrap: nowrap;
}

.topbar-actions > * {
  flex: 0 0 auto;
}

.notification-btn {
  position: relative;
  width: 42px;
  height: 42px;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: var(--ink);
  background: transparent;
}

.notification-btn:hover { background: #eef5f2; }

.notification-btn i {
  position: absolute;
  right: 8px;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--teal-600);
  box-shadow: 0 0 0 3px #fff;
}

.notification-btn .notification-count {
  position: absolute;
  right: -3px;
  top: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: none;
  place-items: center;
  color: #fff;
  background: var(--red-600);
  font-size: 10px;
  font-weight: 900;
  line-height: 18px;
  box-shadow: 0 0 0 2px #fff;
}

.notification-btn.has-notifications .notification-count {
  display: grid;
}

.notification-btn:not(.has-notifications) i {
  opacity: 0.35;
}

.profile-button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 4px;
  color: var(--ink);
  background: #fff;
}

.profile-button:hover { background: #eef5f2; }

.profile-button svg { width: 16px; height: 16px; }

.profile-button-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 850;
}

@media (max-width: 1440px) {
  .topbar {
    grid-template-columns: auto minmax(150px, 0.9fr) minmax(260px, 1.1fr) auto;
    padding-right: 16px;
    padding-left: 16px;
  }

  .topbar-actions .secondary-btn span,
  .profile-button-name {
    display: none;
  }

  .profile-button {
    padding-right: 4px;
  }

  .primary-btn {
    padding: 0 14px;
  }

  .topbar-actions .secondary-btn {
    width: 48px;
    min-width: 48px;
    padding: 0;
  }

  .topbar-actions .primary-btn {
    min-width: 96px;
  }
}

.profile-photo {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, var(--teal-900), var(--teal-600));
  box-shadow: 0 0 0 3px #fff, 0 8px 18px rgba(15, 23, 42, 0.18);
}

.profile-photo.small {
  width: 40px;
  height: 40px;
}

.profile-photo.large {
  width: 108px;
  height: 108px;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-screen {
  height: 100vh;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: auto;
  background:
    radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.20), transparent 32%),
    linear-gradient(145deg, #f8fbfa 0%, #eef7f4 55%, #ffffff 100%);
}

.login-card {
  width: min(1040px, 100%);
  min-height: min(640px, calc(100dvh - 48px));
  max-height: calc(100dvh - 48px);
  border: 1px solid rgba(6, 66, 55, 0.10);
  border-radius: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 28px 80px rgba(2, 44, 37, 0.16);
}

.login-logo {
  display: grid;
  place-items: center;
  padding: 42px;
  background: linear-gradient(160deg, #ffffff, #f0faf7);
}

.login-logo img {
  width: min(360px, 84%);
  height: auto;
}

.login-form {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: 48px;
  min-width: 0;
  overflow: auto;
  background: #fff;
}

.login-form h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.login-form p {
  margin: -6px 0 8px;
  color: var(--muted);
}

.login-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.login-submit { width: 100%; min-height: 48px; }
.login-register-shortcut {
  width: 100%;
  min-height: 46px;
}
.login-error { min-height: 20px; color: var(--red-600); font-weight: 850; }
.login-error.success { color: var(--green-700); }
.login-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}
.login-links button {
  border: 0;
  background: transparent;
  color: var(--green-700);
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  padding: 4px 0;
  text-align: left;
}
.login-links button:hover { text-decoration: underline; }

.primary-btn,
.secondary-btn,
.danger-btn,
.ghost-btn,
.icon-btn,
.link-btn {
  border-radius: 8px;
  min-height: 42px;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.primary-btn {
  padding: 0 16px;
  color: #fff;
  background: var(--teal-700);
}

.primary-btn:hover { background: var(--teal-600); }

.secondary-btn {
  padding: 0 14px;
  color: var(--teal-900);
  border: 1px solid var(--line);
  background: #fff;
}

.secondary-btn:hover { border-color: var(--teal-700); background: var(--soft-teal); }

.danger-btn {
  padding: 0 14px;
  color: #fff;
  background: var(--red-600);
}

.ghost-btn {
  padding: 0 10px;
  color: var(--teal-900);
  background: transparent;
}

.ghost-btn:hover { background: var(--soft-teal); }

.icon-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  color: var(--ink);
  background: transparent;
}

.icon-btn:hover { background: #eef3f6; }
.icon-btn.small { width: 34px; height: 34px; min-height: 34px; }
.icon-btn.small svg { width: 18px; height: 18px; }

.link-btn {
  min-height: 0;
  padding: 0;
  color: var(--teal-700);
  background: transparent;
  text-align: left;
  font-weight: 850;
}

.icon-link {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  color: var(--green-600);
  text-decoration: none;
}

.icon-link:hover { background: var(--soft-green); }

.phone-cell {
  min-width: 210px;
  display: grid;
  gap: 6px;
}

.phone-cell strong {
  display: block;
  color: var(--ink);
  font-weight: 850;
}

.phone-number-link {
  width: fit-content;
  color: var(--teal-700);
  text-decoration: none;
  font-weight: 850;
}

.phone-number-link:hover {
  text-decoration: underline;
}

.phone-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.25;
}

.phone-line span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.phone-number-empty {
  color: var(--muted);
}

.phone-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.phone-actions.compact {
  margin-top: 8px;
}

.phone-action {
  min-height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 9px;
  color: var(--teal-900);
  background: var(--soft-teal);
  text-decoration: none;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.phone-action svg {
  width: 16px;
  height: 16px;
}

.phone-action.reminder {
  color: #7c2d12;
  background: #ffedd5;
}

.phone-action.reminder:hover {
  background: #fed7aa;
}

.phone-action.call {
  color: #1d4ed8;
  background: var(--soft-blue);
}

.phone-action.whatsapp {
  color: #0f6b32;
  background: var(--soft-green);
}

.phone-action.map {
  color: #7c2d12;
  background: #ffedd5;
}

.phone-action:hover {
  filter: brightness(0.97);
}

.phone-action {
  border: 0;
  cursor: pointer;
}

.phone-action.photo {
  color: #6d28d9;
  background: #f1ecff;
}

.phone-action.gallery {
  color: #075985;
  background: #e0f2fe;
}

.phone-action.document {
  color: #92400e;
  background: #fef3c7;
}

.gallery-card {
  width: min(1180px, 100%);
  grid-template-rows: auto minmax(0, 1fr);
}

.gallery-body {
  min-height: 0;
  overflow: auto;
  padding: 18px;
  background: #f8fafc;
}

.gallery-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.gallery-grid {
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
}

.gallery-thumb a {
  aspect-ratio: 1 / 1;
}

.gallery-empty {
  min-height: 220px;
}

.photo-section {
  grid-column: span 3;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #f8fafc;
}

.photo-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

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

.photo-section-head strong {
  color: var(--ink);
  font-size: 16px;
}

.photo-section-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
  gap: 10px;
}

.photo-thumb {
  position: relative;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.photo-thumb a {
  display: block;
  aspect-ratio: 4 / 3;
  background: #e5eaf0;
}

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

.photo-thumb figcaption {
  min-height: 52px;
  display: grid;
  gap: 2px;
  padding: 8px 8px 4px;
}

.photo-tools {
  display: flex;
  gap: 6px;
  padding: 0 8px 8px;
}

.photo-tools .icon-mini {
  width: 32px;
  height: 32px;
}

.photo-thumb figcaption span,
.photo-thumb figcaption small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-thumb figcaption span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.photo-thumb figcaption small {
  color: var(--muted);
  font-size: 11px;
}

.photo-delete,
.photo-share {
  position: absolute;
  top: 6px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
}

.photo-delete {
  right: 6px;
  background: rgba(220, 38, 38, 0.92);
}

.photo-share {
  left: 6px;
  background: rgba(15, 118, 110, 0.92);
}

.photo-delete svg,
.photo-share svg {
  width: 16px;
  height: 16px;
}

.photo-empty {
  min-height: 72px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  padding: 14px;
  color: var(--muted);
  text-align: center;
  background: #fff;
}

.document-section {
  background: #fffaf0;
}

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

.document-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.document-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #92400e;
  background: #fef3c7;
}

.document-icon svg {
  width: 21px;
  height: 21px;
}

.document-info {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.document-info strong,
.document-info span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.document-info span {
  color: var(--muted);
  font-size: 12px;
}

.document-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.icon-mini {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  color: var(--teal-900);
  background: #fff;
  text-decoration: none;
}

.icon-mini svg {
  width: 16px;
  height: 16px;
}

.document-open-btn {
  width: auto;
  min-width: 78px;
  grid-auto-flow: column;
  gap: 6px;
  padding: 0 10px;
  font-weight: 800;
}

.document-open-btn span {
  font-size: 12px;
}

.whatsapp-mini {
  color: #0f6b32;
  background: var(--soft-green);
}

.mail-mini {
  color: #075985;
  background: #e0f2fe;
}

.danger-mini {
  color: #b91c1c;
  background: #fee2e2;
}

@media (max-width: 720px) {
  .document-item {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .document-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

.main-view {
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  overflow: auto;
  padding: 18px;
  background: #f7faf9;
}

.metric-grid,
.dashboard-grid,
.report-grid,
.settings-grid,
.finance-row {
  display: grid;
  gap: 14px;
}

.metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-bottom: 14px;
}

.metric-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 8px 22px rgba(23, 32, 51, 0.05);
}

.metric-card {
  min-height: 118px;
  padding: 14px;
  display: grid;
  align-content: space-between;
  gap: 9px;
}

.metric-card.clickable {
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.metric-card.clickable:hover,
.metric-card.clickable:focus-visible {
  border-color: rgba(4, 120, 87, 0.36);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.10);
  transform: translateY(-1px);
  outline: none;
}

.metric-head {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}

.metric-card strong {
  display: block;
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0;
}

.metric-card p {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
}

.metric-card small { color: var(--muted); }
.metric-card.success { background: linear-gradient(180deg, #fff, var(--soft-green)); }
.metric-card.progress { background: linear-gradient(180deg, #fff, var(--soft-blue)); }
.metric-card.warning { background: linear-gradient(180deg, #fff, var(--soft-amber)); }
.metric-card.danger { background: linear-gradient(180deg, #fff, var(--soft-red)); }
.metric-card.money { background: linear-gradient(180deg, #fff, #f1ecff); }

.dashboard-grid,
.report-grid,
.settings-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-12 { grid-column: span 12; }

.panel { padding: 16px; }

.panel-head {
  min-height: 42px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.filter-bar label,
.field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.clear-filters { margin-left: auto; }

.input,
.select,
.textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  outline: none;
  color: var(--ink);
  background: #fff;
}

.input::placeholder,
.textarea::placeholder {
  color: #aeb8c4;
  font-weight: 500;
  opacity: 1;
}

.input::-webkit-input-placeholder,
.textarea::-webkit-input-placeholder {
  color: #aeb8c4;
  font-weight: 500;
}

.input::-moz-placeholder,
.textarea::-moz-placeholder {
  color: #aeb8c4;
  font-weight: 500;
  opacity: 1;
}

.password-field { min-width: 0; }

.password-control {
  position: relative;
  display: block;
  min-width: 0;
}

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

.password-toggle {
  position: absolute;
  top: 50%;
  right: 4px;
  width: 36px;
  height: 36px;
  min-height: 36px;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle.is-visible {
  color: var(--green-700);
  background: #eef8f4;
}

.select { min-width: 170px; }

.textarea {
  min-height: 88px;
  padding-top: 10px;
  resize: vertical;
}

.table-panel { padding: 12px; }

.table-wrap {
  overflow: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(6, 66, 55, 0.45) #e8efed;
}

.table-wrap::-webkit-scrollbar,
.kanban-board::-webkit-scrollbar,
.main-view::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.table-wrap::-webkit-scrollbar-track,
.kanban-board::-webkit-scrollbar-track,
.main-view::-webkit-scrollbar-track {
  background: #e8efed;
  border-radius: 999px;
}

.table-wrap::-webkit-scrollbar-thumb,
.kanban-board::-webkit-scrollbar-thumb,
.main-view::-webkit-scrollbar-thumb {
  border: 2px solid #e8efed;
  border-radius: 999px;
  background: rgba(6, 66, 55, 0.45);
}

.table-wrap::-webkit-scrollbar-thumb:hover,
.kanban-board::-webkit-scrollbar-thumb:hover,
.main-view::-webkit-scrollbar-thumb:hover {
  background: rgba(6, 66, 55, 0.65);
}

.data-table {
  width: 100%;
  min-width: 1220px;
  border-collapse: collapse;
  background: #fff;
  table-layout: fixed;
}

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

.data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: var(--muted);
  background: #f8fafc;
  font-size: 12px;
  text-transform: uppercase;
}

.data-table td { font-size: 14px; }
.data-table td { overflow-wrap: normal; }
.data-table td strong,
.data-table .link-btn { overflow-wrap: break-word; }
.data-table td small { display: block; margin-top: 4px; color: var(--muted); line-height: 1.35; max-width: 260px; }
.data-table tr:hover td { background: #fbfdfd; }

.data-table th:nth-child(1),
.data-table td:nth-child(1) { width: 72px; }

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

.data-table th:nth-child(3),
.data-table td:nth-child(3) { width: 230px; }

.data-table th:nth-child(4),
.data-table td:nth-child(4) { width: 115px; }

.data-table th:nth-child(5),
.data-table td:nth-child(5) { width: 98px; }

.data-table th:nth-child(6),
.data-table td:nth-child(6) { width: 112px; }

.data-table th:nth-child(7),
.data-table td:nth-child(7) { width: 118px; }

.data-table th:nth-child(8),
.data-table td:nth-child(8) { width: 56px; text-align: center; }

.data-table th:nth-child(9),
.data-table td:nth-child(9) { width: 132px; }

.data-table th:nth-child(10),
.data-table td:nth-child(10) { width: 90px; }

.data-table th:nth-child(11),
.data-table td:nth-child(11) { width: 62px; text-align: center; }

.data-table th:nth-child(12),
.data-table td:nth-child(12) { width: 72px; }

.row-actions {
  min-width: 78px;
  white-space: nowrap;
}

@media (min-width: 721px) and (max-width: 1400px) {
  .table-panel {
    padding: 10px;
  }

  .data-table {
    min-width: 1220px;
    table-layout: fixed;
  }

  .data-table th,
  .data-table td {
    padding: 9px 7px;
    font-size: 13px;
  }

  .data-table td small {
    max-width: 100%;
  }

  .phone-action {
    min-height: 28px;
    padding: 0 6px;
    font-size: 11px;
  }

  .phone-action span {
    max-width: 54px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .phone-actions {
    gap: 5px;
  }

  .row-actions {
    min-width: 0;
  }

  .row-actions .icon-btn.small {
    width: 30px;
    height: 30px;
    min-height: 30px;
  }
}

.empty-cell,
.empty-state,
.empty-drop {
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.table-footer {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.badge {
  max-width: 100%;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge.neutral,
.badge.stage { color: #334155; background: #edf2f7; }
.badge.success { color: #0f6b32; background: var(--soft-green); }
.badge.progress { color: #1d4ed8; background: var(--soft-blue); }
.badge.warning { color: #8a5a00; background: var(--soft-amber); }
.badge.danger { color: #a51515; background: var(--soft-red); }

.bar-chart { display: grid; gap: 11px; }

.bar-row {
  width: 100%;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.bar-row.clickable {
  cursor: pointer;
  border-radius: 8px;
}

.bar-row.clickable:hover,
.bar-row.clickable:focus-visible {
  outline: none;
  background: #f8fafc;
}

.bar-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
  font-size: 14px;
}

.bar-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-label strong { color: var(--muted); font-size: 13px; }

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

.bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal-700), var(--blue-600));
}

.bar-chart.status .bar-track i { background: linear-gradient(90deg, var(--amber-500), var(--red-600)); }
.bar-chart.channel .bar-track i { background: linear-gradient(90deg, var(--green-600), var(--teal-700)); }
.bar-chart.city .bar-track i { background: linear-gradient(90deg, var(--blue-600), var(--violet-600)); }
.bar-chart.loss .bar-track i { background: linear-gradient(90deg, var(--red-600), var(--amber-500)); }

.action-list { display: grid; gap: 9px; }

.action-item,
.agenda-item,
.lead-card-main {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: #f8fafc;
  text-align: left;
}

.action-item {
  min-height: 68px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 10px;
  align-items: center;
  padding: 10px;
}

.action-item strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.action-item small { grid-column: 2; color: var(--muted); }

.kanban-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(244px, 280px);
  gap: 14px;
  overflow-x: auto;
  min-height: calc(100vh - 134px);
  padding-bottom: 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(6, 66, 55, 0.45) #e8efed;
}

.kanban-column {
  min-height: calc(100vh - 176px);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.kanban-column.drag-over {
  outline: 3px solid rgba(15, 118, 110, 0.18);
  border-color: var(--teal-700);
}

.kanban-head {
  min-height: 70px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  background: #fff;
  border-radius: 12px 12px 0 0;
}

.kanban-head strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kanban-head span { color: var(--teal-900); font-weight: 900; }
.kanban-head small { grid-column: 1 / -1; color: var(--muted); }

.kanban-cards {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px 18px 18px;
  overflow-y: auto;
}

.kanban-cards .empty-drop {
  min-height: 360px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 24px;
}

.empty-stage-icon {
  width: 82px;
  height: 82px;
  border: 1px solid rgba(4, 120, 87, 0.22);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--teal-700);
  background: linear-gradient(145deg, #ffffff, #effaf6);
}

.empty-stage-icon svg {
  width: 34px;
  height: 34px;
}

.empty-drop strong {
  color: var(--ink);
  font-size: 16px;
}

.empty-drop small {
  max-width: 220px;
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.lead-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  box-shadow: 0 6px 14px rgba(23, 32, 51, 0.06);
}

.lead-card-main {
  min-width: 0;
  padding: 0;
  background: transparent;
}

.lead-card-main strong,
.lead-card-main span,
.lead-card small { display: block; }
.lead-card-main strong { color: var(--ink); }
.lead-card-main span,
.lead-card small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.lead-card-meta {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.agenda-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.agenda-column { min-height: 360px; }
.agenda-column.danger { border-top: 4px solid var(--red-600); }
.agenda-column.progress { border-top: 4px solid var(--blue-600); }
.agenda-column.warning { border-top: 4px solid var(--amber-500); }

.count-pill {
  min-width: 34px;
  min-height: 26px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
  color: var(--teal-900);
  background: var(--soft-teal);
  font-weight: 900;
}

.agenda-item {
  min-height: 76px;
  display: grid;
  gap: 4px;
  padding: 11px;
  margin-bottom: 9px;
}

.agenda-item:hover,
.action-item:hover { background: #eef8f6; }
.agenda-item span,
.agenda-item small { color: var(--muted); }

.more-note {
  padding: 12px;
  color: var(--muted);
  text-align: center;
}

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

.definition-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 18px;
  margin: 0;
}

.definition-list dt { color: var(--muted); font-weight: 800; }
.definition-list dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

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

.option-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.option-list span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: #edf2f7;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.muted-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.user-form .primary-btn {
  min-height: 44px;
  white-space: nowrap;
}

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

.user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(260px, auto);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.user-row strong,
.user-row span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.user-row div > span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

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

.invite-box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  padding: 10px;
  border: 1px solid #b7e2d3;
  border-radius: 8px;
  background: #eef9f5;
}

.invite-box span {
  min-width: 0;
  color: var(--teal-900);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.small-action {
  min-height: 34px;
  padding: 6px 10px;
}

.locked-seller-field[readonly] {
  color: var(--teal-900);
  background: #eef9f5;
  border-color: #b7e2d3;
  cursor: not-allowed;
}

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

.formula-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #f8fafc;
}

.formula-grid strong,
.formula-grid span { display: block; }
.formula-grid span { margin-top: 6px; color: var(--muted); }

.hidden-input { display: none; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.42);
}

.modal-card {
  width: min(1120px, calc(100vw - 24px));
  max-height: min(840px, calc(100vh - 36px));
  max-height: min(840px, calc(100dvh - 36px));
  border-radius: 8px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.profile-card {
  width: min(720px, 100%);
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.profile-editor {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 24px;
  padding: 24px;
  overflow: auto;
}

.profile-editor-photo {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.profile-editor-fields {
  display: grid;
  align-content: start;
  gap: 14px;
}

.modal-head {
  min-height: 72px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-head h2 { margin: 0; font-size: 22px; }
.modal-head span { display: block; margin-top: 4px; color: var(--muted); }

.form-grid {
  padding: 18px;
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.lead-form-tabs-shell {
  grid-template-columns: 1fr;
  align-content: start;
  gap: 0;
  padding: 0;
  background: #f8fafc;
  min-width: 0;
}

.form-tabs {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  gap: 8px;
  padding: 12px 18px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: #fff;
  scrollbar-width: thin;
}

.form-tab {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #334155;
  background: #fff;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
}

.form-tab svg {
  width: 18px;
  height: 18px;
}

.form-tab.active {
  border-color: rgba(0, 126, 105, 0.34);
  color: var(--brand);
  background: #ecfdf5;
  box-shadow: inset 0 0 0 1px rgba(0, 126, 105, 0.08);
}

.form-tab-content {
  padding: 18px;
  display: grid;
  gap: 14px;
  min-width: 0;
}

.form-tab-panel {
  display: none;
}

.form-tab-panel.active {
  display: grid;
}

.form-tab-content .photo-section {
  grid-column: 1 / -1;
}

.meeting-history {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

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

.meeting-history-head strong {
  color: var(--ink);
}

.meeting-history-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

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

.meeting-history-list article {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(120px, 0.7fr) minmax(0, 1.5fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.meeting-history-list article:first-child {
  border-color: rgba(0, 126, 105, 0.28);
  background: #ecfdf5;
}

.meeting-history-list strong {
  color: var(--ink);
}

.meeting-history-list span {
  color: var(--brand);
  font-weight: 900;
}

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

.scheduled-message-section {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(4, 120, 87, 0.22);
  border-radius: 8px;
  background: #f7fffb;
}

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

.scheduled-message-grid .field.wide {
  grid-column: span 1;
}

.scheduled-message-help {
  color: var(--muted);
  line-height: 1.45;
}

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

.scheduled-message-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.scheduled-message-item.ready {
  border-color: rgba(4, 120, 87, 0.28);
  background: #ecfdf5;
}

.scheduled-message-item.done {
  background: #f8fafc;
}

.scheduled-message-item div:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.scheduled-message-item strong,
.scheduled-message-item small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.scheduled-message-item span {
  color: var(--brand);
  font-weight: 900;
}

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

.scheduled-message-item em {
  min-width: 112px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--soft-blue);
  color: #1e3a8a;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  text-align: center;
}

.scheduled-message-item.ready em {
  background: var(--soft-green);
  color: #047857;
}

.scheduled-message-item.done em {
  background: #eef2f7;
  color: var(--muted);
}

.scheduled-message-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.compact-btn {
  min-height: 34px;
  padding: 6px 10px;
}

.danger-outline {
  color: #b91c1c;
}

.notification-card {
  max-width: min(760px, 96vw);
}

.notification-body {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 16px;
  padding: 18px;
}

.notification-body h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.notification-item {
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  text-align: left;
}

.notification-item + .notification-item {
  margin-top: 8px;
}

.notification-item span,
.notification-item small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.team-message-panel {
  overflow: hidden;
}

.team-message-form {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

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

.team-message-list article {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.team-message-list span {
  overflow-wrap: anywhere;
}

.team-message-list small {
  color: var(--muted);
}

.form-section {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 16px 0 2px;
  border-top: 1px solid var(--line);
}

.form-accordion-stack {
  display: grid;
  gap: 12px;
}

.form-accordion {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.form-accordion .form-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  cursor: pointer;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.form-accordion .form-section-head svg {
  width: 20px;
  height: 20px;
  color: var(--brand);
}

.form-accordion .form-section-grid,
.form-accordion .meeting-history,
.form-accordion .scheduled-message-section,
.form-accordion .timeline-section,
.form-accordion .photo-section {
  margin: 0 16px 16px;
}

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

.opportunity-dashboard-card article {
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.opportunity-dashboard-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.opportunity-dashboard-card strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
}

.required-field > span {
  color: var(--brand-dark);
  font-weight: 900;
}

.map-field-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

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

.cep-action-field {
  grid-template-columns: minmax(0, 1fr) 42px 42px;
}

.inline-action-field .icon-mini {
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

.inline-action-field .icon-mini.is-loading {
  opacity: .7;
  pointer-events: none;
}

.field-help {
  display: block;
  margin-top: 5px;
  color: #9aa8b6;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
}

.form-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.form-section-head strong {
  color: var(--ink);
  font-size: 15px;
}

.form-section-head small {
  display: block;
  max-width: 760px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

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

.field span { color: var(--muted); }
.field.wide { grid-column: span 3; }
.form-section .field.wide { grid-column: 1 / -1; }

.integration-details {
  margin-top: 14px;
  border: 1px dashed rgba(15, 118, 110, .34);
  border-radius: 8px;
  background: #f8fffc;
  overflow: hidden;
}

.integration-details summary {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  color: var(--brand-dark);
  font-weight: 900;
}

.integration-details summary small {
  margin-left: auto;
  color: var(--muted);
  font-weight: 700;
}

.integration-details .form-section-grid {
  padding: 0 14px 14px;
}

.seller-summary-field {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #f8fafc;
  font-weight: 800;
  line-height: 1.35;
}

.timeline-section {
  display: grid;
  gap: 10px;
}

.timeline-item {
  display: grid;
  grid-template-columns: minmax(140px, 220px) minmax(120px, 180px) 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.timeline-item span,
.timeline-item small {
  color: var(--muted);
}

.calculated-strip {
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  background: #f8fafc;
}

.calculated-strip > span:not(.badge) {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-weight: 800;
}

.modal-actions {
  min-height: 70px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-actions > div {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.toast-root {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
}

.toast {
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 0 16px;
  border-radius: 8px;
  color: #fff;
  background: #11312f;
  box-shadow: var(--shadow);
  font-weight: 850;
}

@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-4,
  .span-5,
  .span-6,
  .span-7 { grid-column: span 12; }
  .agenda-grid { grid-template-columns: 1fr; }
}

@media (max-width: 920px) {
  .app-shell { grid-template-columns: 1fr; }
  .content-shell { border-radius: 0; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    height: 100vh;
    max-height: 100vh;
    width: min(86vw, 300px);
    display: block;
    transform: translateX(-105%);
    transition: transform 180ms ease;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  @supports (height: 100dvh) {
    .sidebar {
      height: 100dvh;
      max-height: 100dvh;
    }
  }

  .app-shell.sidebar-open .sidebar { transform: translateX(0); }
  .mobile-menu { display: inline-flex; }

  .brand {
    min-height: 94px;
    padding: 14px 12px 12px;
  }

  .brand-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
  }

  .brand strong {
    font-size: 14px;
    line-height: 1.08;
  }

  .brand small {
    font-size: 12px;
  }

  .brand em {
    margin-top: 6px;
    padding: 3px 7px;
    font-size: 10px;
  }

  .nav-list {
    padding: 10px 10px 4px;
    overflow: visible;
  }

  .nav-item {
    min-height: 42px;
    margin-bottom: 4px;
    padding: 0 12px;
    border-radius: 9px;
    gap: 10px;
    font-size: 14px;
  }

  .topbar {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "menu title actions"
      "search search search";
  }
  .mobile-menu { grid-area: menu; }
  .topbar-title { grid-area: title; }
  .global-search { grid-area: search; }
  .topbar-actions { grid-area: actions; }
  .topbar-actions .secondary-btn span { display: none; }
  .source-box {
    margin: 8px 10px calc(110px + env(safe-area-inset-bottom, 0px));
    padding: 10px;
    border-radius: 10px;
  }

  .source-box strong {
    font-size: 15px;
  }

  .source-box span {
    font-size: 12px;
  }
  .profile-button-name { display: none; }
  .profile-button { padding-right: 4px; }
  .main-view { padding: 14px; }
  .form-grid,
  .form-section-grid { grid-template-columns: 1fr; }
  .opportunity-dashboard-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .form-accordion .form-section-grid,
  .form-accordion .meeting-history,
  .form-accordion .scheduled-message-section,
  .form-accordion .timeline-section,
  .form-accordion .photo-section {
    margin: 0 10px 12px;
  }
  .map-field-actions {
    grid-template-columns: 1fr;
  }
  .inline-action-field,
  .cep-action-field {
    grid-template-columns: minmax(0, 1fr) 40px;
  }
  .cep-action-field {
    grid-template-columns: minmax(0, 1fr) 40px 40px;
  }
  .inline-action-field .icon-mini {
    width: 40px;
    height: 40px;
  }
  .field.wide,
  .form-section,
  .photo-section { grid-column: auto; }
  .integration-details summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .integration-details summary small {
    margin-left: 0;
  }
  .meeting-history-list article {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .formula-grid,
  .finance-row,
  .action-grid { grid-template-columns: 1fr; }
  .user-form {
    grid-template-columns: 1fr;
  }
  .user-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .user-actions {
    justify-content: flex-start;
  }
  .invite-box {
    grid-template-columns: 1fr;
  }
  .user-row .badge,
  .user-row button {
    justify-self: start;
  }
  .team-message-form {
    grid-template-columns: 1fr;
  }
  .login-card {
    grid-template-columns: 1fr;
    width: min(620px, 100%);
    min-height: 0;
    max-height: none;
  }
  .login-logo { padding: 28px 24px 0; }
  .login-logo img { width: min(220px, 68%); }
  .login-form {
    align-content: start;
    padding: 26px 24px 32px;
    overflow: visible;
  }
  .profile-editor { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .filter-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .filter-bar label,
  .filter-bar .select {
    min-width: 0;
  }

  .clear-filters {
    margin-left: 0;
    justify-self: start;
  }

  .table-panel {
    padding: 10px;
  }

  .table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
  }

  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .data-table {
    background: transparent;
  }

  .data-table thead {
    display: none;
  }

  .data-table tbody {
    display: grid;
    gap: 12px;
  }

  .data-table tr {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
  }

  .data-table td {
    padding: 0;
    border-bottom: 0;
  }

  .data-table td + td {
    margin-top: 10px;
  }

  .data-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .data-table td[data-label="Cliente"] .link-btn {
    font-size: 16px;
  }

  .phone-cell,
  .phone-actions {
    min-width: 0;
  }

  .phone-actions {
    gap: 7px;
  }

  .phone-action {
    min-height: 38px;
    flex: 1 1 118px;
  }

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

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

@media (max-width: 620px) {
  .metric-grid { grid-template-columns: 1fr; }
  .topbar-actions .primary-btn span { display: none; }
  .topbar-actions .secondary-btn { display: none; }
  .notification-btn {
    display: inline-grid;
    width: 42px;
    min-width: 42px;
  }
  .topbar {
    gap: 9px;
    padding: 10px 12px;
  }
  .topbar-title h1 {
    max-width: 100%;
    overflow: hidden;
    font-size: 20px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .topbar-title span {
    font-size: 12px;
  }
  .global-search input {
    min-height: 44px;
    font-size: 15px;
  }
  .topbar-actions {
    gap: 6px;
  }
  .topbar-actions .primary-btn,
  .profile-button,
  .mobile-menu {
    width: 42px;
    min-width: 42px;
    min-height: 42px;
    padding: 0;
  }
  .modal-backdrop { padding: 0; place-items: stretch; }
  .modal-card {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    max-height: 100vh;
    height: 100dvh;
    min-height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
  }
  .modal-card .form-grid {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 12px;
  }
  .modal-card .form-grid::-webkit-scrollbar,
  .notification-body::-webkit-scrollbar {
    width: 8px;
  }
  .modal-card .form-grid::-webkit-scrollbar-thumb,
  .notification-body::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(100, 116, 139, 0.55);
  }
  .modal-card .lead-form-tabs-shell {
    padding: 0;
  }
  .form-tabs {
    padding: 10px 12px;
  }
  .form-tab {
    min-height: 40px;
    padding: 0 12px;
    font-size: 13px;
  }
  .form-tab-content {
    padding: 12px;
  }
  .modal-card .calculated-strip {
    max-height: 74px;
    padding: 8px 12px;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .modal-card .calculated-strip > span:not(.badge) {
    min-height: 26px;
    padding: 2px 8px;
    white-space: nowrap;
    font-size: 13px;
  }

  .modal-card .calculated-strip .phone-actions {
    display: none;
  }

  .modal-card .modal-actions {
    position: relative;
    z-index: 2;
    min-height: 58px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    background: #fff;
  }
  .modal-actions {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .modal-actions > span:first-child {
    display: none;
  }

  .modal-actions > div {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .modal-actions button {
    flex: 1;
    min-height: 44px;
  }

  .modal-actions .danger-btn {
    width: 100%;
    min-height: 44px;
    max-width: none;
  }
  .login-screen {
    place-items: stretch;
    padding: 10px;
  }
  .login-card {
    width: 100%;
    min-height: calc(100dvh - 20px);
    border-radius: 12px;
  }
  .login-logo { padding: 18px 18px 0; }
  .login-logo img { width: min(170px, 56%); }
  .login-form {
    gap: 12px;
    padding: 20px 18px 24px;
  }
  .login-form h1 { font-size: 24px; }
  .login-form p { margin: -4px 0 2px; }
  .login-links { flex-direction: column; gap: 6px; }

  .main-view {
    padding: 10px;
    padding-bottom: 18px;
  }

  .filter-bar {
    gap: 10px;
    margin-bottom: 10px;
  }

  .filter-bar label {
    gap: 5px;
    font-size: 12px;
  }

  .table-panel {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .data-table tbody {
    gap: 10px;
  }

  .data-table tr {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  }

  .data-table td {
    min-width: 0;
  }

  .data-table td + td {
    margin-top: 0;
  }

  .data-table td::before {
    margin-bottom: 3px;
    font-size: 10px;
  }

  .data-table td:nth-child(1)::before,
  .data-table td:nth-child(2)::before,
  .data-table td:nth-child(3)::before,
  .data-table td:nth-child(12)::before {
    display: none;
  }

  .data-table td:nth-child(1) {
    grid-column: 1 / -1;
    grid-row: auto;
    color: var(--muted);
    font-size: 12px;
  }

  .data-table td:nth-child(1) strong {
    display: block;
    color: var(--ink);
    font-size: 14px;
  }

  .data-table td:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .data-table td:nth-child(2) .link-btn {
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: 16px;
    line-height: 1.2;
  }

  .data-table td:nth-child(2) small {
    max-width: 100%;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .data-table td:nth-child(3),
  .data-table td:nth-child(12) {
    grid-column: 1 / -1;
  }

  .data-table td:nth-child(n+4):not(:nth-child(12)) {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 5px;
    padding: 8px 0 0;
    border-top: 1px solid #edf2f7;
    overflow-wrap: anywhere;
  }

  .data-table td:nth-child(n+4):not(:nth-child(12))::before {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.02em;
  }

  .data-table td:nth-child(n+4):not(:nth-child(12)) > strong,
  .data-table td:nth-child(n+4):not(:nth-child(12)) > small,
  .data-table td:nth-child(n+4):not(:nth-child(12)) .badge {
    max-width: 100%;
    justify-self: start;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .data-table td:nth-child(8),
  .data-table td:nth-child(10),
  .data-table td:nth-child(11) {
    display: none;
  }

  .phone-cell {
    gap: 8px;
  }

  .phone-cell strong,
  .phone-number-link {
    overflow-wrap: anywhere;
  }

  .phone-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .phone-action {
    min-height: 40px;
    width: 100%;
    padding: 0 8px;
    font-size: 12px;
  }

  .phone-action span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .row-actions {
    justify-content: stretch;
  }

  .row-actions .icon-btn.small {
    width: 100%;
    min-height: 40px;
    background: #f8fafc;
  }

  .table-footer {
    padding: 4px 2px 0;
    font-size: 12px;
  }

  .modal-head {
    align-items: flex-start;
  }

  .form-grid {
    gap: 10px;
  }

  .form-section {
    padding: 12px;
  }

  .modal-actions {
    padding: 10px;
  }

  .modal-actions > div {
    gap: 8px;
  }

  .settings-grid {
    gap: 10px;
  }

  .definition-list {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .definition-list dt {
    font-size: 12px;
  }

  .definition-list dd {
    margin: 0 0 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #edf2f7;
    overflow-wrap: break-word;
    word-break: normal;
  }

  .definition-list dd:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
  }
}

@media (max-width: 520px) {
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .topbar-title h1 {
    font-size: 20px;
  }

  .modal-head {
    min-height: 64px;
    padding: 12px 14px;
  }

  .modal-head h2 {
    font-size: 20px;
  }

  .form-grid,
  .gallery-body {
    padding: 14px;
  }

  .opportunity-dashboard-card {
    grid-template-columns: 1fr;
  }

  .opportunity-dashboard-card article {
    min-height: 58px;
  }

  .lead-form-tabs-shell {
    padding: 0;
  }

  .form-tab-content {
    padding: 10px;
  }

  .calculated-strip {
    padding: 10px 14px;
  }
}

.campaign-page {
  display: grid;
  gap: 14px;
}

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

.campaign-form {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.campaign-form .field {
  min-width: 0;
  grid-column: span 3;
}

.campaign-form .field > span {
  min-width: 0;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.campaign-form .field:first-child,
.campaign-form .field:nth-child(4),
.campaign-form .field:nth-child(5) {
  grid-column: span 3;
}

.campaign-form .field:nth-child(2),
.campaign-form .field:nth-child(3),
.campaign-form .field:nth-child(6),
.campaign-form .field:nth-child(7),
.campaign-form .field:nth-child(8) {
  grid-column: span 2;
}

.campaign-form .primary-btn {
  grid-column: span 3;
  width: 100%;
}

.campaign-alerts,
.campaign-list {
  display: grid;
  gap: 12px;
}

.campaign-alert {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.campaign-alert svg {
  width: 24px;
  height: 24px;
}

.campaign-alert strong,
.campaign-alert span {
  min-width: 0;
  display: block;
  overflow-wrap: anywhere;
}

.campaign-alert span {
  color: var(--muted);
}

.campaign-alert b {
  color: var(--teal-800);
  font-size: 20px;
}

.campaign-alert.success {
  background: var(--soft-green);
  border-color: #bbf7d0;
}

.campaign-alert.warning {
  background: var(--soft-amber);
  border-color: #fde68a;
}

.compact-filter {
  min-width: 190px;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.campaign-card.success {
  border-color: #bbf7d0;
}

.campaign-card.warning {
  border-color: #fde68a;
}

.campaign-card.danger {
  border-color: #fecaca;
}

.campaign-card-head,
.campaign-card-foot,
.campaign-progress-text {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.campaign-card-head strong {
  display: block;
  font-size: 17px;
}

.campaign-card-head span,
.campaign-card-foot,
.campaign-progress-text span {
  color: var(--muted);
}

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

.progress-line {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef3;
}

.progress-line i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal-700), #22c55e);
}

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

.campaign-kpis span {
  display: grid;
  gap: 2px;
  padding: 10px;
  border-radius: 10px;
  background: #f8fafc;
}

.campaign-kpis b {
  font-size: 20px;
}

.campaign-kpis small {
  color: var(--muted);
}

.campaign-ranking {
  display: grid;
  gap: 10px;
}

.campaign-ranking article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.campaign-ranking b,
.campaign-ranking span {
  display: block;
}

.campaign-ranking span {
  color: var(--muted);
  font-size: 13px;
}

.campaign-ranking em {
  color: var(--teal-800);
  font-style: normal;
  font-weight: 900;
}

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

.campaign-report .metric-card {
  min-height: 108px;
}

.integrations-page,
.integrations-layout {
  display: grid;
  gap: 14px;
}

.integrations-layout {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

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

.integration-card,
.integration-leads button,
.scoring-list article {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.integration-card {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.integration-card.connected {
  border-color: rgba(4, 120, 87, 0.25);
  background: linear-gradient(180deg, #fff, #f0fdf4);
}

.integration-card > div:first-child,
.integration-actions,
.lead-levels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.integration-card > div:first-child {
  align-items: center;
  justify-content: space-between;
}

.integration-card small,
.integration-card em,
.webhook-box span,
.webhook-box small,
.scoring-list span,
.integration-leads span,
.integration-leads em {
  color: var(--muted);
}

.integration-card em,
.integration-leads em {
  font-style: normal;
}

.webhook-box {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px dashed rgba(4, 120, 87, 0.4);
  border-radius: 10px;
  background: #f0fdf4;
}

.webhook-box strong {
  overflow-wrap: anywhere;
  color: var(--teal-900);
}

.integration-config-form {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.integration-config-form .primary-btn,
.integration-config-form .secondary-btn,
.campaign-form .primary-btn {
  min-width: 0;
}

.integration-save-btn {
  grid-column: 1 / -1;
  width: fit-content;
  min-width: 118px;
  max-width: 100%;
  justify-self: end;
  justify-content: center;
  padding-inline: 10px;
  white-space: nowrap;
}

.integration-config-form .field,
.integration-config-form .input,
.integration-config-form .select {
  min-width: 0;
}

.integration-config-form .select {
  width: 100%;
}

@media (max-width: 1320px) {
  .integration-config-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .integration-save-btn {
    justify-self: end;
  }
}

.scoring-list,
.integration-leads {
  display: grid;
  gap: 8px;
}

.scoring-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  padding: 10px;
  background: #f8fafc;
  min-width: 0;
}

.scoring-list article strong,
.scoring-list article span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.scoring-list article b {
  grid-row: span 2;
  align-self: center;
  color: var(--teal-800);
}

.lead-levels {
  margin-top: 6px;
}

.lead-levels span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--soft-blue);
  color: #1e3a8a;
  font-weight: 800;
  font-size: 12px;
}

.integration-leads button {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px;
  color: var(--ink);
  text-align: left;
}

.integration-card strong,
.integration-card small,
.webhook-box strong,
.integration-leads span,
.integration-leads em {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
  .campaign-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .integration-save-btn {
    width: auto;
    justify-self: start;
  }

  .campaign-form .field:nth-child(n) {
    grid-column: span 1;
  }

  .campaign-form .field:first-child {
    grid-column: span 2;
  }

  .campaign-form .primary-btn {
    grid-column: span 2;
  }
}

@media (max-width: 760px) {
  .campaign-layout,
  .campaign-form,
  .integration-grid,
  .integration-config-form,
  .campaign-report,
  .campaign-kpis {
    grid-template-columns: 1fr;
  }

  .campaign-layout > .panel,
  .campaign-form .field,
  .campaign-form .field:nth-child(n),
  .campaign-form .field:first-child,
  .campaign-form .primary-btn,
  .integration-save-btn {
    grid-column: 1 / -1;
  }

  .scheduled-message-grid,
  .scheduled-message-item {
    grid-template-columns: 1fr;
  }

  .scheduled-message-grid .field.wide {
    grid-column: 1 / -1;
  }

  .scheduled-message-item em,
  .scheduled-message-actions {
    justify-self: start;
  }

  .integration-save-btn {
    width: 100%;
  }

  .campaign-alert,
  .campaign-ranking article {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .campaign-alert b,
  .campaign-ranking em {
    grid-column: 2;
    justify-self: start;
  }

  .campaign-card-head,
  .campaign-card-foot,
  .campaign-progress-text,
  .panel-head {
    align-items: flex-start;
  }

  .campaign-card-head,
  .campaign-card-foot,
  .campaign-progress-text {
    flex-direction: column;
  }

  .compact-filter {
    width: 100%;
  }
}
