:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #eef2f5;
  --border: #d9e1e8;
  --text: #1f2933;
  --muted: #64748b;
  --primary: #0f8f6f;
  --primary-dark: #0a6b54;
  --blue: #2563eb;
  --danger: #b42318;
  --success: #0f766e;
  --shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  --sidebar-width: 224px;
}

.audio-upload-card {
  display: grid;
  gap: 18px;
}

.audio-upload-card audio,
.audio-library-card audio {
  width: 100%;
}

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

.audio-library-card {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.audio-library-card.inactive {
  opacity: 0.65;
}

.audio-library-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, Arial, Helvetica, sans-serif;
}

body.app-layout {
  padding-left: var(--sidebar-width);
  background:
    linear-gradient(180deg, rgba(15, 143, 111, 0.07), rgba(244, 246, 248, 0) 260px),
    var(--bg);
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px clamp(18px, 4vw, 42px);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  height: 100vh;
  min-height: 100vh;
  padding: 14px 10px;
  background: linear-gradient(180deg, #063d33 0%, #062f29 58%, #041f1c 100%);
  color: #effff9;
  box-shadow: 14px 0 34px rgba(4, 47, 41, 0.24);
  overflow: hidden;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 6px 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}

.sidebar-brand-logo {
  display: block;
  width: min(172px, 100%);
  height: auto;
  object-fit: contain;
}

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

.sidebar-brand strong {
  font-size: 14px;
}

.sidebar-brand span {
  margin-top: 3px;
  color: rgba(239, 255, 249, 0.68);
  font-size: 11px;
}

.sidebar-user {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  margin: 12px 0 14px;
  padding: 9px 8px;
  border: 1px solid rgba(186, 247, 222, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.sidebar-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(20, 184, 143, 0.24);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.sidebar-avatar.has-image {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

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

.sidebar-user strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user span {
  margin-top: 3px;
  color: rgba(239, 255, 249, 0.66);
  font-size: 11px;
  line-height: 1.3;
}

.sidebar-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  padding-right: 3px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(186, 247, 222, 0.4) transparent;
  scrollbar-width: thin;
}

.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(186, 247, 222, 0.38);
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-link {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: 26px 1fr;
  gap: 8px;
  align-items: center;
  min-height: 36px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: rgba(239, 255, 249, 0.78);
  font-size: 12px;
  font-weight: 800;
}

.sidebar-link:hover {
  border-color: rgba(186, 247, 222, 0.15);
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
}

.sidebar-link.active {
  border-color: rgba(94, 234, 177, 0.58);
  background: linear-gradient(135deg, #18b889, #0f8f6f);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 143, 111, 0.26);
}

.sidebar-link:last-child {
  margin-top: 6px;
}

.sidebar-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
}

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

.sidebar-link.active .sidebar-link-icon {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

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

.user-badge {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 13px;
  font-weight: 800;
}

.eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(24px, 3vw, 34px);
}

h2 {
  font-size: 18px;
}

.page {
  width: min(1180px, calc(100% - 28px));
  margin: 22px auto 48px;
}

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

.stat-card,
.filters,
.lead-row,
.form-shell,
.history-shell,
.notice,
.summary-card,
.empty-state {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 16px;
}

.stat-card.colored {
  position: relative;
  overflow: hidden;
  min-height: 104px;
  border: 0;
  color: #fff;
}

.stat-card.colored::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -38px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.stat-card.colored span,
.stat-card.colored small {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.92);
}

.stat-card.colored strong {
  position: relative;
  z-index: 1;
  color: #fff;
}

.stat-card.colored.purple {
  background: linear-gradient(135deg, #6d5dfc, #7c2fd0);
}

.stat-card.colored.green {
  background: linear-gradient(135deg, #16c784, #069668);
}

.stat-card.colored.blue {
  background: linear-gradient(135deg, #18b7f0, #0878c9);
}

.stat-card.colored.amber {
  background: linear-gradient(135deg, #ffbc27, #f08a00);
}

.stat-card span,
.lead-date span,
.section-title span,
.summary-card span {
  color: var(--muted);
  font-size: 13px;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.dashboard-page {
  display: grid;
  gap: 16px;
}

.dashboard-command-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr);
  gap: 18px;
  align-items: center;
  overflow: hidden;
  padding: 24px;
  border: 1px solid #b7eadc;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 143, 111, .12), rgba(255, 255, 255, .96) 48%),
    var(--surface);
  box-shadow: var(--shadow);
}

.dashboard-command-card::after {
  position: absolute;
  right: -80px;
  top: -90px;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(22, 199, 132, .24), rgba(22, 199, 132, 0) 66%);
  content: "";
}

.dashboard-command-copy {
  position: relative;
  z-index: 1;
}

.dashboard-command-copy h2 {
  margin: 6px 0 10px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.02;
}

.dashboard-command-copy p {
  max-width: 920px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.dashboard-command-metrics {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-command-metrics div {
  display: grid;
  gap: 5px;
  min-height: 96px;
  padding: 14px;
  border: 1px solid rgba(15, 143, 111, .18);
  border-radius: 8px;
  background: rgba(255, 255, 255, .82);
}

.dashboard-command-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-command-metrics strong {
  overflow: hidden;
  color: var(--primary-dark);
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-command-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  gap: 8px;
}

.dashboard-command-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid #b7eadc;
  border-radius: 8px;
  background: #f1fff8;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 900;
}

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

.dashboard-kpi,
.dashboard-card,
.dashboard-insight {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.dashboard-kpi {
  position: relative;
  overflow: hidden;
  min-height: 124px;
  padding: 16px;
}

.dashboard-kpi::before {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .22);
  color: #ffffff;
  content: attr(data-kpi-icon);
  font-size: 12px;
  font-weight: 900;
}

.dashboard-kpi-link {
  color: var(--text);
  text-decoration: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.dashboard-kpi-link:hover {
  border-color: #9ddcc9;
  box-shadow: 0 12px 28px rgba(15, 143, 111, 0.16);
  transform: translateY(-2px);
}

.dashboard-kpi.birthday::after {
  background: #ffe8ef;
}

.birthday-filter-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-kpi::after {
  position: absolute;
  inset: auto 14px 14px auto;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: #dff5ef;
  content: "";
  opacity: 0.72;
}

.dashboard-kpi.warning::after {
  background: #ffe5df;
}

.dashboard-kpi span,
.dashboard-card-title span,
.dashboard-product-highlight span,
.dashboard-insight span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-kpi strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 10px;
  font-size: 26px;
  line-height: 1.05;
}

.dashboard-kpi small {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.dashboard-kpi:is(.kpi-indigo, .kpi-green, .kpi-blue, .kpi-orange, .kpi-purple, .kpi-pink) {
  border-color: transparent;
  color: #fff;
  box-shadow: 0 14px 28px rgba(31, 41, 55, 0.16);
}

.dashboard-kpi.kpi-indigo { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.dashboard-kpi.kpi-green { background: linear-gradient(135deg, #16c784, #059669); }
.dashboard-kpi.kpi-blue { background: linear-gradient(135deg, #16a9f5, #0284c7); }
.dashboard-kpi.kpi-orange { background: linear-gradient(135deg, #ffb72b, #f59e0b); }
.dashboard-kpi.kpi-purple { background: linear-gradient(135deg, #7c4bd1, #6d28d9); }
.dashboard-kpi.kpi-pink { background: linear-gradient(135deg, #ec4899, #db2777); }

.dashboard-kpi:is(.kpi-indigo, .kpi-green, .kpi-blue, .kpi-orange, .kpi-purple, .kpi-pink) :is(span, small) {
  color: rgba(255, 255, 255, 0.9);
}

.dashboard-kpi:is(.kpi-indigo, .kpi-green, .kpi-blue, .kpi-orange, .kpi-purple, .kpi-pink)::after {
  inset: auto -18px -28px auto;
  width: 104px;
  height: 104px;
  background: rgba(255, 255, 255, 0.14);
  opacity: 1;
}

.dashboard-kpi-link.kpi-pink:hover {
  border-color: transparent;
  box-shadow: 0 18px 34px rgba(219, 39, 119, 0.28);
}

.quote-stat {
  position: relative;
  overflow: hidden;
  min-height: 112px;
  border-color: transparent;
  color: #fff;
  box-shadow: 0 14px 28px rgba(31, 41, 55, 0.14);
}

.quote-stat::after {
  position: absolute;
  right: -22px;
  bottom: -32px;
  width: 108px;
  height: 108px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  content: "";
}

.quote-stat-purple { background: linear-gradient(135deg, #7c4bd1, #6d28d9); }
.quote-stat-orange { background: linear-gradient(135deg, #ffb72b, #f59e0b); }
.quote-stat-blue { background: linear-gradient(135deg, #16a9f5, #0284c7); }
.quote-stat-green { background: linear-gradient(135deg, #16c784, #059669); }

.quote-stat :is(span, small) {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.9);
}

.quote-stat small {
  display: block;
  margin-top: 8px;
  font-size: 12px;
}

.quote-stat strong {
  position: relative;
  z-index: 1;
}

.quote-page-shell {
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.quote-page-shell > :is(form, .section-title, .table-wrap) {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.quote-list-shell .section-title {
  margin-bottom: 0;
}

.quote-filter-shell .filters {
  grid-template-columns: minmax(260px, 1fr) 180px 180px;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.finance-filters {
  grid-template-columns: minmax(240px, 1fr) repeat(2, minmax(130px, .55fr)) repeat(2, minmax(145px, .55fr)) auto !important;
}

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

.finance-page .page {
  width: min(1420px, calc(100% - 36px));
}

.finance-module-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #eef3f6;
}

.finance-module-tabs a {
  padding: 11px 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.finance-module-tabs a:hover,
.finance-module-tabs a.active {
  border-color: #b7e5d6;
  background: #fff;
  color: var(--primary);
  box-shadow: 0 5px 15px rgba(15, 23, 42, .08);
}

.finance-transaction-value { font-size: 16px; font-weight: 900; white-space: nowrap; }
.finance-transaction-value.entrada { color: #059669; }
.finance-transaction-value.saida { color: #dc2626; }

.checkbox-card {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8 !important;
  font-weight: 800 !important;
  text-transform: none !important;
}

.checkbox-card input {
  width: auto !important;
}

.finance-table-actions {
  min-width: 250px;
  white-space: nowrap;
}

.finance-table-wrap {
  border: 1px solid #dce5ec;
  border-radius: 10px;
  background: #fff;
}

.quote-list-shell .data-table.finance-table {
  min-width: 1120px;
  table-layout: fixed;
}

.finance-table th,
.finance-table td {
  border-right: 1px solid #edf2f6;
}

.finance-table th:last-child,
.finance-table td:last-child {
  border-right: 0;
}

.finance-table th {
  padding: 12px 10px;
  border-bottom: 1px solid #d7e1ea;
  font-size: 11px;
  letter-spacing: 0;
}

.finance-table th:nth-child(1) { width: 112px; background: #eef2ff; color: #4338ca; }
.finance-table th:nth-child(2) { width: 300px; background: #ecfdf5; color: #047857; }
.finance-table th:nth-child(3) { width: 220px; background: #f0f9ff; color: #0369a1; }
.finance-table th:nth-child(4) { width: 128px; background: #fff7ed; color: #c2410c; }
.finance-table th:nth-child(5) { width: 112px; background: #f5f3ff; color: #6d28d9; }
.finance-table th:nth-child(6) { width: 138px; background: #ecfeff; color: #0e7490; }
.finance-table th:nth-child(7) { width: 260px; background: #f8fafc; color: #475569; }

.finance-table tbody tr:nth-child(even) td {
  background: #f8fbfa;
}

.finance-table tbody tr:hover td {
  background: #f0fdfa;
}

.finance-table tbody td {
  padding: 13px 10px;
  line-height: 1.3;
  transition: background 140ms ease;
}

.finance-table .finance-row td:first-child {
  border-left: 4px solid #38bdf8;
}

.finance-table .finance-row-overdue td:first-child,
.finance-table .finance-row-saida td:first-child {
  border-left-color: #ef4444;
}

.finance-table .finance-row-paid td:first-child,
.finance-table .finance-row-entrada td:first-child {
  border-left-color: #10b981;
}

.finance-table .finance-row-canceled td:first-child {
  border-left-color: #94a3b8;
}

.finance-reference-cell strong {
  display: inline-block;
  padding: 5px 7px;
  border-radius: 6px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.finance-client-cell strong,
.finance-product-cell strong {
  display: block;
  color: #1e293b;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.finance-client-cell small,
.finance-product-cell small {
  font-size: 11px;
}

.finance-due-date {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
  padding: 7px 9px;
  border: 1px solid #bae6fd;
  border-radius: 7px;
  background: #f0f9ff;
  color: #075985;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.finance-due-date.is-overdue,
.finance-due-date.is-saida {
  border-color: #fecaca;
  background: #fff1f2;
  color: #be123c;
}

.finance-due-date.is-paid,
.finance-due-date.is-entrada {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #047857;
}

.finance-due-date.is-canceled {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #64748b;
}

.finance-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
  padding: 7px 9px;
  border: 1px solid transparent !important;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.finance-table .finance-status-badge.quote-status-enviado {
  border-color: #bae6fd !important;
  background: #f0f9ff;
  color: #075985;
}

.finance-table .finance-status-badge.quote-status-aprovado {
  border-color: #a7f3d0 !important;
  background: #ecfdf5;
  color: #047857;
}

.finance-table .finance-status-badge.quote-status-recusado {
  border-color: #fecaca !important;
  background: #fff1f2;
  color: #be123c;
}

.finance-table .finance-status-badge.quote-status-expirado {
  border-color: #e2e8f0 !important;
  background: #f8fafc;
  color: #64748b;
}

.finance-amount-cell {
  color: #0f766e;
  font-size: 16px;
  white-space: nowrap;
}

.finance-amount-cell strong {
  display: inline-block;
  padding: 7px 9px;
  border-radius: 7px;
  background: #ecfdf5;
  white-space: nowrap;
}

.finance-action-group {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: max-content;
}

.finance-action-group .inline-form {
  margin: 0;
}

.finance-action-group .mini-button {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 7px;
}

.finance-action-group .finance-action-edit {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.finance-action-group .finance-action-edit:hover {
  border-color: #2563eb;
  background: #dbeafe;
}

.finance-action-group .finance-action-pay {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #047857;
}

.finance-action-group .finance-action-pay:hover {
  border-color: #10b981;
  background: #d1fae5;
}

.finance-action-group .finance-action-delete {
  background: #fff7f7;
}

.finance-delete-dialog {
  width: min(430px, calc(100% - 32px));
  padding: 0;
  border: 0;
  border-radius: 12px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 26px 70px rgba(15, 23, 42, .28);
}

.finance-delete-dialog::backdrop {
  background: rgba(15, 23, 42, .52);
  backdrop-filter: blur(2px);
}

.finance-delete-dialog form {
  display: grid;
  gap: 12px;
  padding: 22px;
}

.finance-delete-dialog strong { font-size: 20px; }
.finance-delete-dialog p { color: var(--muted); line-height: 1.5; }

.inline-form { display: inline-flex; margin: 0 0 0 5px; }

.quote-list-shell .data-table {
  min-width: 760px;
}

.quote-table-empty {
  padding: 30px 12px !important;
  color: var(--muted);
  text-align: center !important;
}

.quote-table-empty strong,
.quote-table-empty span {
  display: block;
}

.quote-table-empty strong {
  margin-bottom: 5px;
  color: var(--text);
}

@media (max-width: 760px) {
  .quote-filter-shell .filters {
    grid-template-columns: 1fr;
  }

  .finance-filters {
    grid-template-columns: 1fr !important;
  }

  .finance-stats {
    grid-template-columns: 1fr;
  }

  .quote-list-shell .section-title {
    align-items: flex-start;
    flex-direction: column;
  }
}

.status-badge[class*="quote-status-"] { border: 0; color: #fff; }
.quote-status-rascunho { background: #64748b; }
.quote-status-pendente { background: #f59e0b; }
.quote-status-enviado { background: #0284c7; }
.quote-status-aprovado { background: #059669; }
.quote-status-recusado { background: #e11d48; }
.quote-status-expirado { background: #7c3aed; }

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

.dashboard-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  min-height: 280px;
  padding: 16px;
  border-top-width: 4px;
}

.dashboard-card-motion { border-top-color: #16a9f5; background: linear-gradient(135deg, #ffffff, #eff6ff); }
.dashboard-card-funnel { border-top-color: #6366f1; background: linear-gradient(135deg, #ffffff, #eef2ff); }
.dashboard-card-money { border-top-color: #16c784; background: linear-gradient(135deg, #ffffff, #f0fdf4); }
.dashboard-card-category { border-top-color: #0f8f6f; background: linear-gradient(135deg, #ffffff, #ecfdf5); }
.dashboard-card-tags { border-top-color: #ec4899; background: linear-gradient(135deg, #ffffff, #fdf2f8); }
.dashboard-card-tasks { border-top-color: #f59e0b; background: linear-gradient(135deg, #ffffff, #fffbeb); }
.dashboard-card-profile { border-top-color: #7c4bd1; background: linear-gradient(135deg, #ffffff, #f5f3ff); }
.dashboard-card-products { border-top-color: #0284c7; background: linear-gradient(135deg, #ffffff, #f0f9ff); }
.dashboard-card-team { border-top-color: #334155; background: linear-gradient(135deg, #ffffff, #f8fafc); }

.dashboard-card-large {
  grid-column: span 2;
}

.dashboard-card-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-card-title-with-filter {
  align-items: end;
}

.dashboard-card-title .eyebrow {
  margin-bottom: 4px;
}

.dashboard-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-movement-filter {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 128px 128px auto;
  gap: 8px;
  align-items: end;
  min-width: min(100%, 560px);
}

.dashboard-movement-filter label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-movement-filter select,
.dashboard-movement-filter input {
  width: 100%;
  box-sizing: border-box;
  min-height: 36px;
  padding: 8px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, .88);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  text-transform: none;
}

.dashboard-movement-filter .mini-button {
  min-height: 36px;
  background: #ffffff;
}

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

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

.legend-leads,
.bar-leads {
  background: var(--primary);
}

.legend-attendance,
.bar-attendance {
  background: #35c79a;
}

.legend-money,
.bar-money {
  background: #83dcbf;
}

.dashboard-month-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 12px;
  min-height: 210px;
}

.dashboard-month {
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.dashboard-month-bars {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 5px;
  min-height: 150px;
  padding: 10px 6px;
  border-radius: 8px;
  background: #f6fbf9;
}

.dashboard-month-bars span {
  display: block;
  width: 12px;
  min-height: 4px;
  border-radius: 999px 999px 4px 4px;
}

.dashboard-month strong {
  color: var(--text);
}

.dashboard-month small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-bars {
  display: grid;
  gap: 12px;
}

.dashboard-bar-row {
  display: grid;
  gap: 6px;
  min-width: 0;
}

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

.dashboard-bar-head strong {
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-bar-head span {
  flex: 0 0 auto;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 900;
}

.dashboard-bar-row small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.dashboard-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f8f6f, #35c79a);
}

.dashboard-card-money .dashboard-track span,
.dashboard-card-category .dashboard-track span {
  background: linear-gradient(90deg, #0f8f6f, #35c79a);
}

.dashboard-card-funnel .dashboard-track span {
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
}

.dashboard-card-tags .dashboard-track span {
  background: linear-gradient(90deg, #ec4899, #f472b6);
}

.dashboard-card-tasks .dashboard-track span {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.dashboard-card-products .dashboard-track span {
  background: linear-gradient(90deg, #0284c7, #38bdf8);
}

.dashboard-card-team .dashboard-track span {
  background: linear-gradient(90deg, #334155, #94a3b8);
}

.dashboard-empty {
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--muted);
  background: #fbfcfd;
  font-size: 13px;
  line-height: 1.45;
}

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

.dashboard-donut-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fffc;
}

.dashboard-donut-row span {
  min-width: 0;
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-donut-row strong {
  color: var(--primary-dark);
}

.dashboard-donut-row small {
  color: var(--muted);
  font-weight: 800;
}

.dashboard-product-highlight {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid #b7eadc;
  border-radius: 8px;
  background: #f1fff8;
}

.dashboard-product-highlight strong {
  font-size: 15px;
}

.dashboard-product-highlight small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

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

.dashboard-insight {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-left: 4px solid var(--primary);
  background: linear-gradient(135deg, #ffffff, #f8fafc);
}

.dashboard-insight strong {
  color: var(--primary-dark);
  font-size: 26px;
}

.dashboard-insight p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.dashboard-insight:nth-child(1) {
  border-left-color: #16c784;
  background: linear-gradient(135deg, #ffffff, #f0fdf4);
}

.dashboard-insight:nth-child(2) {
  border-left-color: #f59e0b;
  background: linear-gradient(135deg, #ffffff, #fffbeb);
}

.dashboard-insight:nth-child(3) {
  border-left-color: #16a9f5;
  background: linear-gradient(135deg, #ffffff, #f0f9ff);
}

.central-page {
  display: grid;
  gap: 16px;
}

.central-hero {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  padding: 22px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #064e3b, #0f8f6f 58%, #14b8a6);
  box-shadow: 0 18px 36px rgba(15, 143, 111, 0.18);
}

.central-hero::after {
  position: absolute;
  right: -50px;
  bottom: -55px;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  content: "";
}

.central-hero > div {
  position: relative;
  z-index: 1;
  max-width: 860px;
}

.central-hero span {
  color: #c8fff2;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.central-hero h2 {
  margin: 8px 0;
  font-size: 28px;
  line-height: 1.16;
}

.central-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.5;
}

.central-kpis {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

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

.central-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.central-card.has-items {
  border-color: #a7f3d0;
  background: linear-gradient(180deg, #f0fdf4, #fff);
}

.central-card.has-overdue {
  border-color: #fecaca;
  background: linear-gradient(180deg, #fff1f2, #fff);
}

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

.central-card-header h2 {
  margin: 3px 0;
  font-size: 20px;
}

.central-card-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.central-card-header > strong {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--primary);
  font-size: 18px;
}

.central-card.has-overdue .central-card-header > strong {
  background: #ef4444;
}

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

.central-item {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid #dbe6ef;
  border-left: 5px solid #0ea5e9;
  border-radius: 10px;
  background: #fff;
}

.central-item.warning {
  border-left-color: #f59e0b;
  background: #fffbeb;
}

.central-item.danger {
  border-color: #fecaca;
  border-left-color: #ef4444;
  background: #fff7f7;
}

.central-item strong {
  font-size: 14px;
  line-height: 1.3;
}

.central-item span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.central-item p {
  margin: 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.45;
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(140px, 1fr));
  gap: 12px;
  padding: 16px;
  margin-bottom: 18px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  color: var(--text);
  background: #ffffff;
  font: inherit;
  font-size: 14px;
  text-transform: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 143, 111, 0.14);
}

.filter-actions,
.actions {
  display: flex;
  align-items: end;
  gap: 8px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.button.primary {
  background: var(--primary);
  color: #ffffff;
}

.button.primary:hover {
  background: var(--primary-dark);
}

.button.secondary {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

.button.secondary:hover {
  background: var(--surface-soft);
}

.button.danger {
  border-color: var(--danger);
  background: var(--danger);
  color: #ffffff;
}

.button.danger:hover {
  border-color: #8f1c14;
  background: #8f1c14;
}

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

.button.disabled {
  cursor: not-allowed;
  opacity: 0.55;
  pointer-events: none;
}

.list-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 8px 0 12px;
}

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

.export-form {
  display: grid;
  gap: 10px;
}

.export-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

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

.export-actions span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-left: 6px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 12px;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.pagination-bar > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.pagination-pages {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.pagination-page,
.pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.pagination-page:hover {
  background: var(--surface-soft);
}

.pagination-page.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.pagination-ellipsis {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

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

.leads-dashboard-page {
  display: grid;
  gap: 18px;
}

.leads-dashboard-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.leads-dashboard-kpis .dashboard-kpi {
  min-height: 138px;
  padding: 18px;
}

.leads-dashboard-kpis .dashboard-kpi strong {
  font-size: 32px;
}

.leads-filter-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-top: 4px solid #0284c7;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.leads-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 18px;
  border-bottom: 1px solid #dfe9ee;
  background: #f4fbff;
}

.leads-panel-header > div {
  display: grid;
  gap: 2px;
}

.leads-panel-header > span {
  padding: 7px 10px;
  border-radius: 7px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 11px;
  font-weight: 900;
}

.leads-filters {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.leads-filters label {
  color: #52657b;
}

.leads-filters :is(input, select) {
  background: #fbfdff;
}

.leads-list-header {
  margin: 4px 0 2px;
  padding-left: 14px;
  border-left: 4px solid #7c4bd1;
}

.leads-list-header h2 {
  font-size: 22px;
}

.leads-export-toolbar {
  min-height: 64px;
  border-color: #d9e4ea;
  background: #fff;
  box-shadow: 0 8px 22px rgba(37, 51, 66, 0.06);
}

.leads-dashboard-page .lead-row {
  min-height: 98px;
  border: 1px solid #dbe5ea;
  border-left: 5px solid #d8e7f5;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(37, 51, 66, 0.06);
}

.leads-dashboard-page .lead-list .lead-row:nth-of-type(even) {
  border-color: #bdebdc;
  border-left-color: #22c58b;
  background: #f2fcf8;
}

.leads-dashboard-page .lead-list .lead-row:nth-of-type(odd) {
  border-left-color: #60a5fa;
  background: #fff;
}

.leads-dashboard-page .lead-list .lead-row:hover {
  border-color: #78cdb4;
  border-left-color: var(--primary);
  background: #edfbf6;
}

.leads-dashboard-page .lead-main strong {
  font-size: 17px;
}

.leads-dashboard-page .lead-date {
  padding: 10px 12px;
  border-radius: 7px;
  background: rgba(241, 245, 249, 0.84);
}

.leads-dashboard-page .lead-date strong {
  font-size: 14px;
}

.registration-link-dialog {
  width: min(560px, calc(100% - 28px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.registration-link-dialog::backdrop {
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(3px);
}

.registration-link-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid #b9e8da;
  border-top: 5px solid var(--primary);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.25);
}

.registration-link-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.registration-link-card > p {
  color: var(--muted);
  line-height: 1.5;
}

.registration-link-close {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  color: #52657b;
  cursor: pointer;
  font-size: 23px;
}

.registration-link-card input[readonly] {
  background: #f4faf7;
  color: var(--primary-dark);
  font-weight: 800;
}

.registration-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.registration-whatsapp-button {
  border-color: #16a66f;
  background: #16a66f;
  color: #fff;
}

.registration-whatsapp-button:hover {
  border-color: #087b55;
  background: #087b55;
}

.registration-copy-status {
  min-height: 16px;
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 800;
}

.lead-row {
  display: grid;
  grid-template-columns: 28px minmax(190px, 1.4fr) minmax(170px, 1fr) minmax(140px, 0.8fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-left: 4px solid transparent;
  background: #ffffff;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.lead-list .lead-row:nth-of-type(even) {
  border-color: #c8f3e5;
  background: #f1fff8;
}

.lead-list .lead-row:nth-of-type(odd) {
  border-left-color: #e4f7ef;
}

.lead-list .lead-row:hover {
  border-left-color: var(--primary);
  background: #eafff6;
  box-shadow: 0 12px 28px rgba(15, 143, 111, 0.12);
  transform: translateY(-1px);
}

.lead-list .lead-row.is-selected {
  border-color: #9fe4cf;
  border-left-color: var(--primary);
  background: #dff8ee;
}

.lead-select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--text);
}

.lead-select input {
  width: 17px;
  min-height: 17px;
  padding: 0;
}

.lead-main,
.lead-date,
.lead-meta {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.lead-main strong {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-whatsapp-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.lead-whatsapp-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.lead-whatsapp-link span {
  font-size: 11px;
}

.lead-main span,
.lead-main small,
.lead-date small,
.tags {
  color: var(--muted);
  font-size: 13px;
}

.pill {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  background: #dff5ef;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.pill.muted {
  background: var(--surface-soft);
  color: var(--muted);
}

.empty-state {
  display: grid;
  gap: 6px;
  padding: 18px;
}

.empty-state span {
  color: var(--muted);
}

.lead-page {
  display: grid;
  gap: 18px;
}

.lead-overview-card {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(360px, .9fr) auto;
  gap: 18px;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 143, 111, 0.1), rgba(255, 255, 255, 0) 42%),
    var(--surface);
  box-shadow: var(--shadow);
}

.lead-overview-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.lead-overview-main h2 {
  overflow: hidden;
  color: var(--text);
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.04;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-overview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lead-overview-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eaf7f2;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
}

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

.lead-overview-stats div {
  display: grid;
  gap: 5px;
  min-height: 86px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

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

.lead-overview-stats strong {
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-overview-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.lead-overview-actions .button {
  min-width: 132px;
}

.lead-merge-alert {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid #fed7aa;
  border-left: 5px solid #f97316;
  border-radius: 8px;
  background: #fff7ed;
}

.lead-merge-alert h2 {
  margin: 3px 0;
  color: #9a3412;
}

.lead-merge-alert p {
  margin: 0;
  color: #7c4a18;
  line-height: 1.45;
}

.lead-merge-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid #fdba74;
  border-radius: 8px;
  background: #fff;
}

.lead-merge-option div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.lead-merge-option span {
  color: var(--muted);
  font-size: 12px;
}

.lead-dashboard-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.lead-dashboard-kpis .dashboard-kpi strong {
  overflow: hidden;
  font-size: clamp(22px, 2.2vw, 34px);
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-page > .form-shell {
  border: 1px solid var(--border);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.96)),
    var(--surface);
  box-shadow: var(--shadow);
}

.lead-page .section-title {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.lead-page .section-title h2 {
  margin: 0;
}

.lead-page .section-title span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.notes-page {
  display: grid;
  gap: 16px;
}

.notes-hero-card,
.note-editor-panel,
.notes-list-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.notes-hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(15, 143, 111, .1), rgba(255, 255, 255, 0) 46%),
    var(--surface);
}

.notes-hero-card h2 {
  margin-bottom: 6px;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.05;
}

.notes-hero-card p {
  max-width: 760px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.notes-dashboard-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.note-editor-panel {
  display: none;
  padding: 20px;
}

.note-editor-panel.is-open {
  display: block;
}

.note-web-form {
  display: grid;
  gap: 16px;
}

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

.note-web-form-grid .full {
  grid-column: 1 / -1;
}

.note-web-form label,
.notes-filter-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.note-web-form input,
.note-web-form select,
.note-web-form textarea,
.notes-filter-card input,
.notes-filter-card select {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-transform: none;
}

.note-web-form textarea {
  min-height: 190px;
  resize: vertical;
}

.note-web-form small {
  color: var(--muted);
  font-size: 12px;
  text-transform: none;
}

.notes-filter-card {
  align-items: end;
}

.notes-list-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.notes-card-list {
  display: grid;
  gap: 12px;
}

.note-web-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
}

.note-web-card.is-done {
  border-left-color: #94a3b8;
  background: #f8fafc;
}

.note-web-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.note-web-card h3 {
  margin: 8px 0 3px;
  color: var(--text);
  font-size: 20px;
  line-height: 1.2;
}

.note-web-card small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.note-web-card p {
  color: var(--text);
  line-height: 1.55;
}

.note-web-lead,
.note-attachment-link {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #eaf7f2;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
}

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

.form-shell.quote-page-shell {
  grid-template-columns: minmax(0, 1fr);
}

.form-shell.quote-page-shell > * {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

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

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

.lead-extra-details {
  overflow: hidden;
  border: 1px solid #b9e4d8;
  border-radius: 10px;
  background: #f7fcfa;
}

.lead-extra-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px;
  color: var(--primary-dark);
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.lead-extra-details > summary::-webkit-details-marker {
  display: none;
}

.lead-extra-details .details-arrow {
  transition: transform 160ms ease;
}

.lead-extra-details[open] .details-arrow {
  transform: rotate(180deg);
}

.lead-extra-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 15px 15px;
}

.actions {
  margin-top: 14px;
}

.side-panel {
  display: grid;
  align-content: start;
  gap: 10px;
}

.summary-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-left: 4px solid var(--primary);
  background: linear-gradient(135deg, #ffffff, #f0fff8);
}

.summary-card strong {
  font-size: 17px;
}

.portal-account-card {
  border-left-color: #2563eb;
  background: linear-gradient(135deg, #ffffff, #eff6ff);
}

.portal-account-card small,
.portal-account-card a {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.portal-account-card a {
  color: #1d4ed8;
  text-decoration: none;
}

.portal-account-card a:hover {
  text-decoration: underline;
}

.portal-account-form {
  display: grid;
  gap: 9px;
  margin-top: 8px;
}

.portal-account-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.portal-account-form input {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  text-transform: none;
}

.history-shell {
  padding: 18px;
}

.conversation-history-shell {
  display: grid;
  gap: 14px;
}

.conversation-history-shell .section-title {
  margin-bottom: 0;
}

.conversation-filter-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(170px, 1fr)) auto auto;
  align-items: end;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
}

.conversation-filter-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.conversation-filter-shortcuts a {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.conversation-day-list,
.conversation-day-group,
.conversation-message-list {
  display: grid;
  gap: 10px;
}

.conversation-day-group {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
}

.conversation-day-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.conversation-day-heading strong {
  font-size: 16px;
}

.conversation-day-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.conversation-message {
  display: grid;
  gap: 6px;
  width: min(78%, 760px);
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
}

.conversation-message.sent {
  justify-self: end;
  border-color: #aee6d5;
  background: #e9fff6;
}

.conversation-message.received {
  justify-self: start;
}

.conversation-message header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.conversation-message header strong {
  color: var(--primary-dark);
  font-size: 12px;
}

.conversation-message time,
.conversation-message small {
  color: var(--muted);
  font-size: 11px;
}

.conversation-message p {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 14px;
  line-height: 1.48;
}

.conversation-message p a {
  color: var(--primary-dark);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.conversation-type {
  width: fit-content;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(15, 143, 111, 0.1);
  color: var(--primary-dark);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.conversation-empty-state {
  border: 1px dashed var(--border);
  border-radius: 8px;
}

.task-page {
  display: grid;
  gap: 18px;
}

.task-grid {
  display: grid;
  grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

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

.task-dashboard-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.task-create-card {
  display: block;
  padding: 18px;
}

.task-list-shell {
  min-width: 0;
}

.task-filters {
  grid-template-columns: minmax(180px, 1.2fr) minmax(130px, 0.8fr) minmax(130px, 0.8fr) auto;
}

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

.task-list.compact {
  margin-top: 12px;
}

.task-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.4fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.task-card.overdue {
  border-left-color: var(--danger);
  background: #fffafa;
}

.task-card-main,
.task-card-date {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.task-card-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.task-card-title strong {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-card-main span,
.task-card-main small,
.task-card-date span,
.task-card-date small {
  color: var(--muted);
  font-size: 13px;
}

.task-card-main p {
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.attendance-form {
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

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

.timeline-item {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
}

.timeline-item time,
.timeline-item span {
  color: var(--muted);
  font-size: 13px;
}

.timeline-item p {
  line-height: 1.45;
}

.notice {
  padding: 12px 14px;
  font-weight: 700;
}

.notice.success {
  border-color: rgba(15, 118, 110, 0.24);
  color: var(--success);
}

.notice.error {
  border-color: rgba(180, 35, 24, 0.24);
  color: var(--danger);
}

.notice.warning {
  border-color: rgba(180, 83, 9, 0.22);
  background: #fff8ed;
  color: var(--warning);
}

.auth-page {
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 16% 10%, rgba(15, 143, 111, 0.16), transparent 28%),
    radial-gradient(circle at 86% 84%, rgba(20, 184, 143, 0.14), transparent 30%),
    linear-gradient(135deg, #effff8 0%, #f4f8f6 48%, #e4f7ef 100%);
}

.auth-shell {
  width: min(420px, 100%);
}

.auth-shell-split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  width: min(980px, 100%);
  min-height: 560px;
  overflow: hidden;
  border: 1px solid rgba(15, 143, 111, 0.16);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 28px 70px rgba(6, 61, 51, 0.18);
}

.auth-hero-panel {
  position: relative;
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: clamp(26px, 5vw, 44px);
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(235, 255, 247, 0.92)),
    #effff8;
}

.auth-hero-panel::before {
  position: absolute;
  inset: auto -70px -100px auto;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: rgba(15, 143, 111, 0.1);
  content: "";
}

.auth-hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  max-width: 430px;
}

.auth-hero-copy h1 {
  max-width: 420px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.04;
}

.auth-hero-copy p {
  max-width: 410px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.auth-illustration {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  justify-self: center;
  filter: drop-shadow(0 22px 34px rgba(6, 61, 51, 0.14));
}

.auth-feature-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.auth-feature-grid span {
  min-height: 42px;
  padding: 11px 12px;
  border: 1px solid rgba(15, 143, 111, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.auth-form-panel {
  display: grid;
  place-items: center;
  padding: clamp(24px, 5vw, 48px);
  background:
    linear-gradient(145deg, #0f8f6f 0%, #0a6b54 56%, #063d33 100%);
}

.auth-card,
.profile-card {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-card p {
  color: var(--muted);
  line-height: 1.45;
}

.auth-login-card {
  width: min(390px, 100%);
  padding: 28px;
  box-shadow: 0 24px 58px rgba(4, 47, 41, 0.26);
}

.auth-form-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-form-header h2 {
  font-size: 27px;
}

.auth-form-logo {
  width: min(210px, 48vw);
  height: auto;
  object-fit: contain;
}

.profile-photo-row {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
}

.profile-photo-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border-radius: 14px;
  background: #12372f;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
}

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

.profile-photo-fields {
  display: grid;
  gap: 8px;
}

.profile-photo-fields p {
  color: var(--muted);
  font-size: 13px;
}

.profile-page {
  display: grid;
  gap: 18px;
}

.profile-company-section {
  display: grid;
  gap: 16px;
  margin-inline: -22px;
  padding: 20px 22px;
  border-block: 1px solid #bce9dc;
  background: #f4fcf9;
}

.profile-subheading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #d9e5e1;
}

.profile-subheading > div {
  display: grid;
  gap: 3px;
}

.profile-subheading h3 {
  color: var(--text);
  font-size: 19px;
}

.profile-subheading p {
  max-width: 440px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  text-align: right;
}

.profile-company-grid textarea {
  min-height: 88px;
  resize: vertical;
}

.profile-access-heading {
  margin-top: 2px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

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

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  color: var(--text);
  text-transform: none;
}

.checkbox-line.compact {
  min-height: auto;
  padding-top: 18px;
}

.checkbox-line input {
  width: 16px;
  min-height: 16px;
  padding: 0;
}

.category-multi-select {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
}

.category-multi-select legend {
  padding: 0 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.category-multi-select legend small {
  margin-left: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: none;
}

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

.category-option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  text-transform: none;
}

.category-option:has(input:checked) {
  border-color: var(--primary);
  background: rgba(15, 143, 111, 0.1);
  color: var(--primary-dark);
}

.category-option input {
  width: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

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

.data-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.data-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.inline-admin-form {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 74px auto;
  gap: 10px;
  align-items: end;
}

.inline-admin-form input[type="color"] {
  min-width: 54px;
  padding: 4px;
}

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

.config-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.config-chip:hover {
  background: var(--surface-soft);
}

.config-chip.inactive {
  opacity: 0.56;
}

.config-chip span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.edit-mode-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(15, 143, 111, 0.18);
  border-radius: 8px;
  background: #e9fff6;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.edit-mode-bar a {
  color: var(--primary-dark);
  text-decoration: underline;
}

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

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
}

.settings-item.inactive {
  opacity: 0.62;
}

.settings-name {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.settings-name span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.settings-name strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-name small {
  grid-column: 2;
  color: var(--muted);
  font-size: 11px;
}

.settings-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.settings-actions form {
  margin: 0;
}

.signature-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.signature-row:last-child {
  border-bottom: 0;
}

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

.signature-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.badge.success {
  background: #d9f8ea;
  color: #08704f;
}

.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.mini-button:hover {
  background: var(--surface-soft);
}

.mini-button.danger {
  border-color: rgba(180, 35, 24, 0.22);
  color: var(--danger);
}

.mini-button.danger:hover {
  background: #fff5f4;
}

.confirm-dialog {
  width: min(92vw, 480px);
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
}

.confirm-dialog::backdrop {
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(3px);
}

.confirm-dialog-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  padding: 24px;
  background: var(--surface);
}

.confirm-dialog-card h2 {
  margin: 4px 0 8px;
  font-size: 21px;
}

.confirm-dialog-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.confirm-dialog-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff0ef;
  color: var(--danger);
  font-size: 22px;
  font-weight: 900;
}

.confirm-dialog-card .confirm-dialog-warning {
  margin-top: 8px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
}

.confirm-dialog-actions {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.user-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  white-space: nowrap;
}

.products-page {
  display: grid;
  gap: 18px;
}

.products-dashboard-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product-catalog-shell {
  min-height: 0;
  padding: 20px;
}

.product-catalog-header,
.product-editor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.product-catalog-header h2,
.product-editor-header h2 {
  margin: 3px 0 6px;
  font-size: 24px;
}

.product-catalog-header p,
.product-editor-header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.product-catalog-actions .button {
  min-width: 150px;
}

.product-catalog-shell .product-filters {
  margin: 2px 0 0;
  padding: 14px;
  box-shadow: none;
}

.product-catalog-list-header {
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

.product-catalog-empty {
  grid-column: 1 / -1;
  justify-items: center;
  min-height: 190px;
  text-align: center;
}

.product-catalog-empty .button {
  margin-top: 8px;
}

.product-editor-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 22px;
}

.product-editor-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.product-editor-header .button {
  flex: 0 0 auto;
}

.product-category-editor-shell {
  display: grid;
  gap: 18px;
  width: min(900px, 100%);
  margin: 0 auto;
}

.product-category-editor-shell > .product-editor-header {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.product-category-main-form {
  grid-template-columns: minmax(0, 1fr) 190px;
  align-items: end;
}

.product-category-main-form .form-actions {
  grid-column: 1 / -1;
}

.product-category-list-card {
  gap: 12px;
}

.product-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

.product-form-card {
  align-items: start;
}

.product-preview-side {
  display: grid;
  gap: 12px;
}

.product-preview-side img,
.product-preview-placeholder,
.product-card-media {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
}

.product-preview-side img,
.product-preview-placeholder {
  aspect-ratio: 1 / 1;
}

.product-preview-side img,
.product-card-media img {
  display: block;
  object-fit: cover;
}

.product-preview-side img {
  height: auto;
}

.product-preview-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 900;
}

.product-category-card {
  align-self: start;
}

.product-filters {
  grid-template-columns: minmax(240px, 1.4fr) minmax(160px, 0.8fr) minmax(130px, 0.6fr) auto;
  margin-bottom: 0;
}

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

.product-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.product-card.inactive {
  opacity: 0.68;
}

.product-card-media {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  border-width: 0 0 1px;
  border-radius: 0;
  color: var(--muted);
  font-weight: 900;
}

.product-card-media img {
  width: 100%;
  height: 100%;
}

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

.product-card-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.product-card-title strong {
  min-width: 0;
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
}

.product-card-title span {
  flex: 0 0 auto;
  color: var(--primary-dark);
  font-weight: 900;
}

.product-card-body p {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.product-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-card-links a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 9px;
  border-radius: 8px;
  background: #e9fff6;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 900;
}

.product-card-actions {
  justify-content: flex-end;
  padding: 0 14px 14px;
}

.shortcuts-web-page {
  display: grid;
  gap: 18px;
}

.shortcuts-dashboard-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.shortcut-catalog-shell {
  min-height: 0;
  padding: 20px;
}

.shortcut-web-filters {
  grid-template-columns: minmax(240px, 1.4fr) minmax(170px, .8fr) minmax(130px, .55fr) auto;
  margin: 2px 0 0;
  padding: 14px;
  box-shadow: none;
}

.shortcut-list-header {
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

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

.shortcut-web-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.shortcut-web-card.inactive {
  opacity: .66;
}

.shortcut-web-media {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 8;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #edf7f4, #eef6ff);
  color: var(--muted);
  font-weight: 900;
}

.shortcut-web-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shortcut-web-body {
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 0;
  padding: 14px;
}

.shortcut-web-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.shortcut-web-title > strong {
  min-width: 0;
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shortcut-web-status {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 10px;
  font-weight: 900;
}

.shortcut-web-status.active {
  background: #dff7ea;
  color: #087553;
}

.shortcut-web-body p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.shortcut-web-actions {
  justify-content: flex-end;
  padding: 0 14px 14px;
}

.shortcut-web-empty {
  grid-column: 1 / -1;
  justify-items: center;
  min-height: 190px;
  text-align: center;
}

.shortcut-web-empty .button {
  margin-top: 8px;
}

.shortcut-editor-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 22px;
}

.shortcut-editor-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 20px;
  align-items: start;
}

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

.shortcut-editor-fields label {
  min-width: 0;
}

.shortcut-editor-fields label > small {
  color: var(--muted);
  font-weight: 500;
}

.shortcut-editor-preview {
  display: grid;
  gap: 12px;
}

.shortcut-editor-preview img,
.shortcut-preview-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 900;
}

.shortcut-editor-preview img {
  object-fit: contain;
}

.shortcut-category-list-card .settings-name > div {
  display: grid;
  gap: 3px;
}

.shortcut-category-list-card .settings-name small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.ai-page {
  display: grid;
  gap: 18px;
}

.ai-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: stretch;
  padding: 22px;
  border: 1px solid rgba(15, 143, 111, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(233, 255, 246, 0.92), rgba(255, 255, 255, 0.96)),
    var(--surface);
  box-shadow: var(--shadow);
}

.ai-hero-card h2 {
  margin-top: 6px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.05;
}

.ai-hero-card p {
  max-width: 820px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.ai-status-card {
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
}

.ai-status-card.active {
  border-color: #9ee7ce;
  background: #f0fff8;
}

.ai-status-card span,
.ai-status-card small {
  color: var(--muted);
}

.ai-status-card strong {
  color: var(--primary-dark);
  font-size: 22px;
}

.ai-dashboard-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ai-settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

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

.full-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.full-field textarea {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  text-transform: none;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

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

.ai-workflow-card {
  position: relative;
  display: grid;
  gap: 7px;
  min-height: 132px;
  padding: 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  overflow: hidden;
}

.ai-workflow-card::after {
  position: absolute;
  right: -28px;
  bottom: -34px;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  content: "";
}

.ai-workflow-card span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .22);
  color: #fff;
  font-weight: 900;
}

.ai-workflow-card strong {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 18px;
}

.ai-workflow-card small {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, .9);
  font-size: 13px;
  line-height: 1.4;
}

.ai-workflow-card.listen {
  background: linear-gradient(135deg, #16a9f5, #0284c7);
  box-shadow: 0 12px 24px rgba(2, 132, 199, .18);
}

.ai-workflow-card.suggest {
  background: linear-gradient(135deg, #16c784, #059669);
  box-shadow: 0 12px 24px rgba(5, 150, 105, .18);
}

.ai-workflow-card.act {
  background: linear-gradient(135deg, #7c4bd1, #6d28d9);
  box-shadow: 0 12px 24px rgba(109, 40, 217, .18);
}

.ai-side-column {
  display: grid;
  gap: 18px;
}

.ai-steps,
.ai-mode-list {
  display: grid;
  gap: 12px;
}

.ai-steps div,
.ai-mode-list div {
  position: relative;
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid rgba(15, 143, 111, 0.14);
  border-radius: 8px;
  border-left-width: 4px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
}

.ai-steps span,
.ai-mode-list span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.ai-step-card.step-brain,
.ai-mode-card.assistant {
  border-left-color: #16a9f5;
  background: linear-gradient(135deg, #eff6ff, #ffffff);
}

.ai-step-card.step-business {
  border-left-color: #16c784;
  background: linear-gradient(135deg, #f0fdf4, #ffffff);
}

.ai-step-card.step-api {
  border-left-color: #7c4bd1;
  background: linear-gradient(135deg, #f5f3ff, #ffffff);
}

.ai-step-card.step-crm,
.ai-mode-card.automatic {
  border-left-color: #f59e0b;
  background: linear-gradient(135deg, #fffbeb, #ffffff);
}

.campaign-page {
  width: min(1360px, calc(100% - 28px));
}

.campaign-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}

.campaign-layout {
  display: grid;
  grid-template-columns: minmax(420px, 0.95fr) minmax(420px, 1.25fr);
  gap: 16px;
  align-items: start;
}

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

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

.campaign-message-builder {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dbe7ef;
  border-radius: 8px;
  background: #f8fafc;
}

.campaign-message-builder-head,
.campaign-message-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.campaign-message-builder-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

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

.campaign-message-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
}

.campaign-message-card header strong {
  color: #0f766e;
}

.campaign-message-card header div {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.campaign-message-card textarea {
  width: 100%;
  resize: vertical;
}

.campaign-list-shell {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

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

.campaign-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  background: linear-gradient(135deg, #f3fff9 0%, #ffffff 64%);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.campaign-card::after {
  position: absolute;
  right: -34px;
  bottom: -46px;
  width: 126px;
  height: 126px;
  border-radius: 999px;
  background: rgba(15, 143, 111, 0.08);
  content: "";
}

.campaign-card-pronta { border-left-color: #16c784; }
.campaign-card-executando { border-left-color: #0284c7; background: linear-gradient(135deg, #effaff 0%, #ffffff 64%); }
.campaign-card-pausada { border-left-color: #f59e0b; background: linear-gradient(135deg, #fff8e8 0%, #ffffff 64%); }
.campaign-card-rascunho { border-left-color: #64748b; background: linear-gradient(135deg, #f8fafc 0%, #ffffff 64%); }
.campaign-card-cancelada { border-left-color: #e11d48; background: linear-gradient(135deg, #fff1f2 0%, #ffffff 64%); }
.campaign-card-concluida { border-left-color: #7c3aed; background: linear-gradient(135deg, #f5f3ff 0%, #ffffff 64%); }

.campaign-card-head,
.campaign-metrics {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.campaign-card-head {
  justify-content: space-between;
}

.campaign-card-main {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 9px;
  min-width: 0;
}

.campaign-card-main strong {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campaign-card-main small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.campaign-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: #dff5ef;
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.campaign-status-executando { background: #dff4ff; color: #0284c7; }
.campaign-status-pausada { background: #fff0cc; color: #b45309; }
.campaign-status-rascunho { background: #e2e8f0; color: #475569; }
.campaign-status-cancelada { background: #ffe4e6; color: #be123c; }
.campaign-status-concluida { background: #ede9fe; color: #6d28d9; }

.campaign-metrics span {
  display: inline-flex;
  gap: 4px;
  align-items: baseline;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 12px;
  box-shadow: inset 0 0 0 1px rgba(203, 213, 225, 0.75);
}

.campaign-metrics b {
  color: var(--text);
  font-size: 13px;
}

.campaign-progress {
  position: relative;
  z-index: 1;
  overflow: hidden;
  height: 9px;
  border-radius: 999px;
  background: #e8f1f4;
}

.campaign-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #16c784, #0284c7);
}

.campaign-card-meta {
  position: relative;
  z-index: 1;
}

.campaign-card .settings-actions {
  position: relative;
  z-index: 1;
  align-items: flex-end;
  flex-direction: column;
  justify-content: flex-end;
}

.campaign-card .settings-actions form {
  display: inline-flex;
}

body:not(.show-custom-dates) .custom-date {
  display: none;
}

@media (max-width: 920px) {
  .auth-page {
    align-items: start;
  }

  .auth-shell-split {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .auth-hero-panel {
    min-height: auto;
  }

  .auth-illustration {
    width: min(100%, 360px);
  }

  .auth-form-panel {
    background: #063d33;
  }

  body.app-layout {
    padding-left: 0;
  }

  .app-sidebar {
    position: static;
    width: auto;
    height: auto;
    min-height: auto;
    margin: 12px;
    padding: 12px;
    border-radius: 8px;
    overflow: visible;
  }

  .sidebar-brand {
    padding-bottom: 12px;
  }

  .sidebar-user {
    margin: 12px 0;
  }

  .sidebar-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-right: 0;
    overflow: visible;
  }

  .sidebar-link {
    grid-template-columns: 30px 1fr;
    min-width: 0;
  }

  .sidebar-link:last-child {
    margin-top: 0;
  }

  .stats-grid,
  .dashboard-command-card,
  .dashboard-command-metrics,
  .dashboard-movement-filter,
  .dashboard-kpis,
  .dashboard-grid,
  .dashboard-insights,
  .central-grid,
  .filters,
  .form-shell,
  .lead-row,
  .admin-grid,
  .settings-grid,
  .product-admin-grid,
  .product-grid,
  .ai-hero-card,
  .ai-settings-layout,
  .task-grid,
  .task-card,
  .task-filters,
  .product-filters,
  .campaign-layout,
  .campaign-form .form-grid,
  .campaign-card,
  .lead-overview-card,
  .lead-overview-stats,
  .notes-dashboard-kpis,
  .note-web-form-grid,
  .ai-dashboard-kpis,
  .ai-workflow-grid {
    grid-template-columns: 1fr;
  }

  .notes-hero-card,
  .note-web-card header,
  .dashboard-card-title-with-filter {
    align-items: stretch;
    flex-direction: column;
  }

  .lead-overview-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .lead-overview-actions .button {
    flex: 1 1 180px;
  }

  .dashboard-card-large {
    grid-column: auto;
  }

  .product-catalog-header,
  .product-editor-header {
    flex-direction: column;
  }

  .product-catalog-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .product-catalog-actions .button,
  .product-editor-header .button {
    width: 100%;
  }

  .shortcuts-dashboard-kpis,
  .shortcut-web-grid,
  .shortcut-web-filters,
  .shortcut-editor-form {
    grid-template-columns: 1fr;
  }

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

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

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

  .pagination-pages {
    justify-content: stretch;
  }

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

  .export-actions .button,
  .pagination-pages .button {
    width: 100%;
  }

  .lead-row {
    align-items: stretch;
  }

  .lead-select {
    justify-content: flex-start;
    width: 100%;
  }
}

@media (max-width: 620px) {
  .auth-page {
    padding: 12px;
  }

  .auth-shell-split {
    border-radius: 12px;
  }

  .auth-hero-panel,
  .auth-form-panel {
    padding: 22px;
  }

  .auth-feature-grid {
    grid-template-columns: 1fr;
  }

  .auth-login-card {
    padding: 22px;
  }

  .auth-form-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .app-sidebar {
    margin: 8px;
  }

  .sidebar-nav {
    grid-template-columns: 1fr 1fr;
  }

  .sidebar-link {
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 58px;
    text-align: center;
  }

  .sidebar-link-icon {
    width: 32px;
  }

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

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

  .top-actions .button,
  .top-actions .user-badge {
    width: 100%;
  }

  .form-grid,
  .lead-extra-grid,
  .attendance-form,
  .conversation-filter-form,
  .dashboard-month-chart {
    grid-template-columns: 1fr;
  }

  .product-catalog-shell,
  .product-editor-shell,
  .shortcut-catalog-shell,
  .shortcut-editor-shell {
    padding: 14px;
  }

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

  .product-catalog-header h2,
  .product-editor-header h2 {
    font-size: 21px;
  }

  .conversation-message {
    width: 94%;
  }

  .dashboard-month {
    grid-template-columns: 96px 1fr 86px;
    grid-template-rows: auto;
    align-items: center;
    text-align: left;
  }

  .dashboard-month-bars {
    min-height: 88px;
  }

  .filter-actions,
  .actions,
  .inline-admin-form {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .confirm-dialog-card {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .confirm-dialog-actions {
    grid-column: 1;
    flex-direction: column-reverse;
  }

.confirm-dialog-actions .button {
    width: 100%;
  }
}

.calendar-page {
  display: grid;
  gap: 18px;
}

.calendar-hero {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(14, 165, 233, 0.08)),
    #fff;
  border: 1px solid #cfe5df;
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
}

.calendar-hero h2 {
  color: #162231;
  font-size: 42px;
  line-height: 1;
  margin: 8px 0 10px;
}

.calendar-hero p {
  color: #64748b;
  font-size: 18px;
  line-height: 1.5;
  margin: 0;
  max-width: 780px;
}

.calendar-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.calendar-kpis {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.calendar-filter-form {
  align-items: end;
  background: #fff;
  border: 1px solid #d7e2ea;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto auto;
  padding: 16px;
}

.calendar-filter-form label {
  color: #64748b;
  display: grid;
  font-size: 12px;
  font-weight: 900;
  gap: 6px;
  text-transform: uppercase;
}

.calendar-filter-form select,
.calendar-filter-form input {
  border: 1px solid #cfdbe6;
  border-radius: 10px;
  color: #162231;
  font: inherit;
  font-weight: 800;
  padding: 11px 12px;
  text-transform: none;
}

.calendar-filter-form span {
  color: #0f766e;
  font-weight: 900;
  padding-bottom: 12px;
}

.calendar-kpi {
  background: #fff;
  border: 1px solid #d7e2ea;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  padding: 18px;
  position: relative;
}

.calendar-kpi::before {
  content: "";
  inset: 0 auto 0 0;
  position: absolute;
  width: 5px;
}

.calendar-kpi span,
.calendar-kpi small {
  color: #64748b;
  display: block;
  font-weight: 800;
}

.calendar-kpi strong {
  color: #162231;
  display: block;
  font-size: 34px;
  line-height: 1;
  margin: 10px 0 8px;
}

.calendar-kpi-total::before { background: #0f766e; }
.calendar-kpi-task::before { background: #2563eb; }
.calendar-kpi-finance::before { background: #059669; }
.calendar-kpi-appointment::before { background: #0e7490; }
.calendar-kpi-note::before { background: #7c3aed; }
.calendar-kpi-birthday::before { background: #f59e0b; }

.calendar-board {
  background: #fff;
  border: 1px solid #d7e2ea;
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.07);
  overflow: hidden;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays {
  background: #f4f8f7;
  border-bottom: 1px solid #dce8e6;
}

.calendar-weekdays strong {
  color: #64748b;
  font-size: 13px;
  padding: 12px;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day {
  background: #fff;
  border-bottom: 1px solid #edf2f5;
  border-right: 1px solid #edf2f5;
  min-height: 190px;
  padding: 12px;
}

.calendar-day:nth-child(7n) {
  border-right: 0;
}

.calendar-day-empty {
  background: #f8fbfb;
}

.calendar-day.is-today {
  background: #ecfdf5;
  box-shadow: inset 0 0 0 2px rgba(16, 185, 129, 0.35);
}

.calendar-day.has-items {
  background: linear-gradient(180deg, #fff, #f8fffc);
}

.calendar-day.has-birthday {
  background: linear-gradient(180deg, #fff7ed, #fff);
  box-shadow: inset 0 0 0 2px rgba(245, 158, 11, 0.28);
}

.calendar-day.drag-over {
  background: #ecfdf5;
  border-color: #0f9f79;
  box-shadow: inset 0 0 0 2px rgba(15, 159, 121, 0.28), 0 16px 32px rgba(15, 159, 121, 0.14);
}

.calendar-day header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.calendar-day header strong {
  color: #162231;
  font-size: 20px;
}

.calendar-day header span {
  align-items: center;
  background: #0f766e;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  height: 26px;
  justify-content: center;
  min-width: 26px;
  padding: 0 8px;
}

.calendar-day-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}

.calendar-pill {
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 7px;
}

.calendar-pill.tasks { background: #dbeafe; color: #1d4ed8; }
.calendar-pill.appointments { background: #cffafe; color: #0e7490; }
.calendar-pill.finance { background: #dcfce7; color: #047857; }
.calendar-pill.notes { background: #ede9fe; color: #6d28d9; }
.calendar-pill.quotes { background: #ffedd5; color: #c2410c; }
.calendar-pill.birthdays { background: #fef3c7; color: #b45309; }

.calendar-items {
  display: grid;
  gap: 7px;
}

.calendar-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #94a3b8;
  border-radius: 9px;
  color: #162231;
  display: grid;
  gap: 2px;
  padding: 8px;
  text-decoration: none;
}

.calendar-item[draggable="true"] {
  cursor: grab;
}

.calendar-item.dragging {
  cursor: grabbing;
  opacity: 0.55;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.16);
}

.tickets-dashboard-page {
  display: grid;
  gap: 16px;
  width: min(1500px, calc(100% - 28px));
}

.tickets-dashboard-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ticket-create-panel,
.ticket-queue-panel,
.ticket-conversation-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.ticket-create-panel {
  display: none;
  padding: 20px;
  border-top: 4px solid var(--primary);
}

.ticket-create-panel.is-open {
  display: grid;
  gap: 18px;
}

.ticket-panel-heading,
.ticket-conversation-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.ticket-panel-heading h2,
.ticket-conversation-header h2 {
  margin-top: 4px;
  font-size: 22px;
  line-height: 1.2;
}

.ticket-panel-heading p,
.ticket-conversation-header p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.ticket-panel-heading.compact {
  align-items: center;
}

.ticket-close-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

.ticket-close-button:hover {
  border-color: #9ddcc9;
  color: var(--primary-dark);
}

.ticket-create-form {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(320px, 1.2fr);
  gap: 14px;
}

.ticket-field,
.ticket-filters label,
.ticket-reply-form > label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.ticket-field-description {
  grid-column: 1 / -1;
}

.ticket-field input,
.ticket-field select,
.ticket-field textarea,
.ticket-filters input,
.ticket-filters select,
.ticket-public-link-actions input,
.ticket-reply-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  text-transform: none;
}

.ticket-field select {
  min-height: 48px;
}

.ticket-field textarea,
.ticket-reply-form textarea {
  min-height: 120px;
  line-height: 1.5;
  resize: vertical;
}

.ticket-field small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  text-transform: none;
}

.ticket-upload-field {
  align-self: end;
}

.ticket-upload-field input {
  padding: 8px;
  background: #f8fafc;
}

.ticket-upload-field input::file-selector-button,
.ticket-attachment-button::file-selector-button {
  border: 0;
  border-radius: 6px;
  background: #e6f7f1;
  color: var(--primary-dark);
  font: inherit;
  font-weight: 800;
}

.ticket-create-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 8px;
}

.ticket-workspace {
  display: grid;
  grid-template-columns: minmax(330px, .72fr) minmax(580px, 1.28fr);
  gap: 16px;
  align-items: start;
}

.ticket-queue-panel {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 16px;
  padding: 18px;
}

.ticket-result-count {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 999px;
  background: #dff5ef;
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 900;
}

.ticket-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, .65fr);
  gap: 10px;
  padding: 14px;
  border: 1px solid #dce7ee;
  border-radius: 8px;
  background: #f8fafc;
}

.ticket-filter-actions {
  display: flex;
  grid-column: 1 / -1;
  gap: 8px;
}

.ticket-filter-actions .button {
  flex: 1;
}

.ticket-list {
  display: grid;
  gap: 9px;
  max-height: calc(100vh - 390px);
  min-height: 180px;
  overflow: auto;
  padding-right: 3px;
}

.ticket-list-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  min-height: 180px;
  padding: 20px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.ticket-list-empty strong {
  color: var(--text);
}

.ticket-list-item {
  display: grid;
  gap: 6px;
  padding: 13px;
  border: 1px solid #dbe6ef;
  border-left: 4px solid #2563eb;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.ticket-list-item.status-respondido { border-left-color: #f59e0b; }
.ticket-list-item.status-aguardando_cliente { border-left-color: #7c3aed; }
.ticket-list-item.status-finalizado { border-left-color: #059669; }

.ticket-list-item.active,
.ticket-list-item:hover {
  border-color: #80d8bd;
  background: #effcf7;
  transform: translateX(2px);
}

.ticket-list-topline,
.ticket-title-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ticket-list-item > strong {
  overflow: hidden;
  font-size: 14px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-code {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ticket-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.ticket-status.status-respondido { background: #fef3c7; color: #b45309; }
.ticket-status.status-aguardando_cliente { background: #ede9fe; color: #6d28d9; }
.ticket-status.status-finalizado { background: #dcfce7; color: #047857; }

.ticket-lead-name,
.ticket-list-item > small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-conversation-panel {
  min-width: 0;
  overflow: hidden;
}

.ticket-empty-conversation {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  min-height: 520px;
  padding: 32px;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(15, 143, 111, .08), rgba(255, 255, 255, 0) 54%),
    #fff;
}

.ticket-empty-conversation p {
  max-width: 440px;
  color: var(--muted);
  line-height: 1.5;
}

.ticket-empty-icon {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  margin-bottom: 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, #16c784, #059669);
  color: #fff;
  box-shadow: 0 14px 28px rgba(5, 150, 105, .22);
  font-size: 17px;
  font-weight: 900;
}

.ticket-conversation-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #ffffff, #f0fdfa);
}

.ticket-conversation-header h2 {
  margin-top: 8px;
  font-size: clamp(20px, 2vw, 28px);
}

.ticket-conversation-header p span {
  margin: 0 4px;
  color: #9aa9b8;
}

.ticket-title-meta {
  justify-content: flex-start;
}

.ticket-public-link-panel {
  display: grid;
  gap: 12px;
  margin: 16px 20px 0;
  padding: 14px;
  border: 1px solid #bae6d7;
  border-radius: 8px;
  background: #effcf7;
}

.ticket-public-link-panel > div:first-child {
  display: grid;
  gap: 3px;
}

.ticket-public-link-panel span {
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.ticket-public-link-panel strong {
  font-size: 13px;
}

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

.ticket-public-link-actions input {
  overflow: hidden;
  background: #fff;
  color: #0f766e;
  font-size: 12px;
  text-overflow: ellipsis;
}

.ticket-thread {
  display: grid;
  gap: 12px;
  max-height: 620px;
  overflow: auto;
  padding: 20px;
  background: #f7f9fb;
}

.ticket-message {
  display: grid;
  gap: 8px;
  width: min(86%, 720px);
  padding: 14px;
  border: 1px solid #dbe6ef;
  border-radius: 8px;
  background: #fff;
}

.ticket-message.agent {
  justify-self: end;
  border-right: 4px solid #2563eb;
  background: #eff6ff;
}

.ticket-message.customer {
  justify-self: start;
  border-left: 4px solid #0f9f79;
  background: #ecfdf5;
}

.ticket-message.is-thread-reply {
  position: relative;
  justify-self: start;
  width: min(86%, calc(100% - min(calc(var(--ticket-thread-depth, 1) * 24px), 108px)));
  margin-inline-start: min(calc(var(--ticket-thread-depth, 1) * 24px), 108px);
}

.ticket-message.is-thread-reply::before {
  position: absolute;
  top: -13px;
  left: -16px;
  width: 13px;
  height: 25px;
  border-bottom: 2px solid #cbd5e1;
  border-left: 2px solid #cbd5e1;
  border-radius: 0 0 0 8px;
  content: "";
}

.ticket-reply-reference {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border-left: 3px solid #64748b;
  border-radius: 6px;
  background: rgba(255, 255, 255, .72);
}

.ticket-reply-reference span {
  color: #475569;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.ticket-reply-reference strong {
  overflow: hidden;
  color: #334155;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-message > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ticket-message > header > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ticket-message > header strong {
  font-size: 13px;
}

.ticket-message > header > div span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.ticket-message > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ticket-message > footer small {
  color: var(--muted);
  font-size: 11px;
}

.ticket-message > footer > span {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 800;
}

.ticket-message.is-reply-target {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

.ticket-message-reply-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid #93c5fd;
  border-radius: 6px;
  background: #fff;
  color: #1d4ed8;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
}

.ticket-message-reply-button:hover {
  border-color: #2563eb;
  background: #dbeafe;
}

.ticket-message p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.ticket-message > small {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.ticket-message-attachments {
  display: grid;
  gap: 7px;
}

.ticket-message-attachments a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px;
  border: 1px solid rgba(100, 116, 139, .2);
  border-radius: 7px;
  background: rgba(255, 255, 255, .78);
}

.ticket-message-attachments a > span {
  padding: 4px 6px;
  border-radius: 5px;
  background: #e2e8f0;
  color: #475569;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.ticket-message-attachments a > strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-message-attachments a > small {
  color: var(--muted);
  font-size: 10px;
}

.ticket-reply-form {
  display: grid;
  gap: 12px;
  padding: 18px 20px;
  border-top: 1px solid var(--border);
  background: #fff;
}

.ticket-selected-reply {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid #bfdbfe;
  border-left: 4px solid #2563eb;
  border-radius: 8px;
  background: #eff6ff;
}

.ticket-selected-reply[hidden] {
  display: none;
}

.ticket-selected-reply > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ticket-selected-reply span {
  color: #1d4ed8;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.ticket-selected-reply strong {
  font-size: 12px;
}

.ticket-selected-reply p {
  overflow: hidden;
  color: #475569;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-selected-reply > button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #dbeafe;
  color: #1d4ed8;
  cursor: pointer;
  font-size: 20px;
}

.ticket-reply-form textarea {
  min-height: 110px;
}

.ticket-reply-actions,
.ticket-status-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ticket-attachment-button {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.ticket-attachment-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.ticket-status-actions {
  justify-content: flex-end;
  padding: 0 20px 20px;
}

.ticket-closed-notice {
  margin: 18px 20px 12px;
  padding: 13px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
  color: #166534;
  font-size: 13px;
  font-weight: 700;
}

.public-ticket-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.public-ticket-main {
  max-width: 1180px;
}

.client-portal-main .public-ticket-card {
  width: 100%;
  max-width: none;
}

.public-ticket-unavailable {
  display: grid;
  justify-items: start;
  gap: 10px;
  padding: 30px;
  text-align: left;
}

.public-ticket-unavailable .button {
  margin-top: 4px;
}

.public-ticket-card {
  display: grid;
  gap: 16px;
  width: min(880px, 100%);
  max-width: 880px;
  padding-top: 0;
  overflow: hidden;
}

.public-ticket-title {
  display: grid;
  gap: 7px;
  padding: 4px 2px 0;
}

.public-ticket-title > p {
  color: var(--muted);
  line-height: 1.5;
}

.public-ticket-brand {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin: 0 -22px;
  padding: 20px 22px;
  border-bottom: 1px solid #bce9dc;
  background: #effcf7;
}

.public-ticket-brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  overflow: hidden;
  border: 1px solid #bce9dc;
  border-radius: 8px;
  background: #ffffff;
  color: var(--primary-dark);
  font-size: 24px;
  font-weight: 900;
}

.public-ticket-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

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

.public-ticket-brand-copy > span {
  color: var(--primary-dark);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.public-ticket-brand-copy > strong {
  color: var(--text);
  font-size: 20px;
  line-height: 1.2;
}

.public-ticket-brand-copy > p {
  max-width: 560px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.public-ticket-brand-contact,
.public-ticket-brand-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
}

.public-ticket-brand-contact a,
.public-ticket-brand-contact span {
  color: #426174;
  font-size: 11px;
  font-weight: 800;
}

.public-ticket-brand-links {
  justify-content: flex-end;
  max-width: 260px;
}

.public-ticket-brand-links a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid #a7e5d3;
  border-radius: 7px;
  background: #ffffff;
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 900;
}

.public-ticket-brand-links a:hover {
  border-color: var(--primary);
  background: #e8faf4;
}

.public-ticket-card .ticket-thread {
  max-height: none;
  margin-inline: -18px;
  border-block: 1px solid var(--border);
}

.public-ticket-card .stack-form {
  display: grid;
  gap: 12px;
}

.public-ticket-card .stack-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.public-ticket-card .stack-form input,
.public-ticket-card .stack-form textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  text-transform: none;
}

.public-ticket-card .stack-form textarea {
  min-height: 130px;
}

.portal-reply-identity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #bce9dc;
  border-radius: 7px;
  background: #f1fbf7;
}

.portal-reply-identity span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.public-ticket-account-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 -22px -16px;
  padding: 10px 22px;
  border-bottom: 1px solid #dce5ec;
  background: #f8fafc;
}

.public-ticket-account-bar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.public-ticket-account-bar a,
.public-ticket-account-bar button {
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #52657b;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
}

.public-ticket-account-bar a:hover,
.public-ticket-account-bar button:hover {
  background: #e8f5f0;
  color: var(--primary-dark);
}

.ticket-portal-access-fields {
  display: grid;
  grid-column: 1/-1;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
  padding: 16px;
  border-block: 1px solid #bce9dc;
  background: #f4fcf9;
}

.ticket-portal-access-fields > div {
  display: grid;
  grid-column: 1/-1;
  gap: 3px;
}

.ticket-portal-access-fields > div strong {
  font-size: 16px;
}

.ticket-portal-access-fields > div small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.portal-login-page {
  min-height: 100vh;
  margin: 0;
  background: #edf5f3;
}

.portal-login-shell {
  display: grid;
  grid-template-columns: minmax(300px,.9fr) minmax(360px,1.1fr);
  min-height: 100vh;
}

.portal-login-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(34px,7vw,92px);
  background: #0b6f59;
  color: #fff;
}

.portal-login-brand img {
  width: min(210px,70%);
  margin-bottom: 38px;
  padding: 10px;
  border-radius: 8px;
  background: #fff;
}

.portal-login-brand > span {
  margin-bottom: 8px;
  color: #a7f3d0;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.portal-login-brand h1 {
  color: #fff;
  font-size: clamp(36px,5vw,64px);
  line-height: 1;
}

.portal-login-brand p {
  max-width: 540px;
  margin-top: 18px;
  color: #d9f7eb;
  font-size: 18px;
  line-height: 1.5;
}

.portal-login-brand > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 30px;
}

.portal-login-brand > div span {
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 7px;
  background: rgba(255,255,255,.08);
  font-size: 12px;
  font-weight: 800;
}

.portal-login-form-panel {
  display: grid;
  place-items: center;
  padding: 28px;
}

.portal-login-card {
  display: grid;
  gap: 16px;
  width: min(430px,100%);
  padding: 30px;
  border: 1px solid #d5e3df;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15,61,53,.12);
}

.portal-login-card header {
  display: grid;
  gap: 6px;
}

.portal-login-card header p,
.portal-login-card > small {
  color: var(--muted);
  line-height: 1.45;
}

.portal-login-card label {
  display: grid;
  gap: 6px;
  color: #52657b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.portal-login-card input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font: inherit;
  text-transform: none;
}

.portal-login-links { display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:4px;font-size:13px;font-weight:800; }
.portal-login-links a { color:#0b6f59; }
.access-switch { display:grid;gap:12px;margin-top:4px;padding-top:16px;border-top:1px solid #dfe8e5; }
.access-switch-heading { display:flex;align-items:center;gap:10px; }
.access-switch-heading > span { display:grid;width:34px;height:34px;flex:0 0 34px;place-items:center;border-radius:7px;background:#e4f7f0;color:#08745b;font-size:10px;font-weight:900; }
.access-switch-heading > div { display:grid;gap:2px;min-width:0; }
.access-switch-heading strong { color:var(--text);font-size:13px; }
.access-switch-heading small { color:var(--muted);font-size:11px;line-height:1.35; }
.access-switch .button { width:100%; }
.portal-registration-page { padding:clamp(18px,4vw,48px); }
.portal-registration-shell { width:min(1080px,100%);margin:0 auto; }
.portal-registration-header { display:grid;grid-template-columns:170px minmax(0,1fr) auto;align-items:center;gap:28px;padding:24px;border:1px solid #cfe1dc;border-radius:8px 8px 0 0;background:#0b6f59;color:#fff; }
.portal-registration-header img { display:block;width:100%;padding:9px;border-radius:7px;background:#fff; }
.portal-registration-header h1 { margin:2px 0 6px;color:#fff;font-size:clamp(26px,4vw,42px); }
.portal-registration-header p { max-width:680px;color:#d9f7eb;line-height:1.45; }
.portal-registration-header .eyebrow { color:#a7f3d0; }
.portal-registration-header .button { border-color:rgba(255,255,255,.5);background:#fff; }
.portal-registration-card { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 18px;padding:clamp(22px,4vw,42px);border:1px solid #d5e3df;border-top:0;border-radius:0 0 8px 8px;background:#fff;box-shadow:0 24px 60px rgba(15,61,53,.1); }
.portal-registration-card label { display:grid;align-content:start;gap:6px;color:#52657b;font-size:11px;font-weight:900;text-transform:uppercase; }
.portal-registration-card input { min-width:0;width:100%;padding:12px;border:1px solid var(--border);border-radius:7px;font:inherit;text-transform:none; }
.portal-registration-card label small { color:var(--muted);font-weight:700;text-transform:none; }
.portal-form-wide,.portal-address-main { grid-column:1 / -1; }
.portal-contact-preferences { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px; }
.portal-registration-card .portal-contact-choice { display:flex;align-items:flex-start;gap:12px;padding:15px;border:1px solid #d7e4e0;border-radius:8px;background:#f8fbfa;cursor:pointer;text-transform:none; }
.portal-registration-card .portal-contact-choice:hover { border-color:#8ed8c2;background:#f0fbf7; }
.portal-registration-card .portal-contact-choice input { width:19px;height:19px;min-height:19px;flex:0 0 19px;margin-top:2px;padding:0;accent-color:var(--primary); }
.portal-contact-choice span { display:grid;gap:4px; }
.portal-contact-choice strong { color:var(--text);font-size:13px;line-height:1.35; }
.portal-contact-choice small { color:var(--muted);font-size:11px;line-height:1.4; }
.portal-form-section { margin-top:8px;padding-top:18px;border-top:1px solid #e3ece9; }
.portal-form-section:first-of-type { margin-top:0;padding-top:0;border-top:0; }
.portal-form-section h2 { margin-top:3px;font-size:22px; }
.portal-registration-actions { display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:8px;padding:18px;border:1px solid #bce8da;border-radius:8px;background:#effbf7; }
.portal-registration-actions p { color:#42645b;line-height:1.45; }
.portal-registration-actions .button { flex:0 0 auto; }
.portal-honeypot { position:absolute!important;left:-10000px!important;width:1px!important;height:1px!important;overflow:hidden!important; }

.client-portal-page {
  min-height: 100vh;
  margin: 0;
  background: #f1f5f4;
  color: var(--text);
}

.client-portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 82px;
  padding: 14px max(24px,calc((100vw - 1180px)/2));
  border-bottom: 1px solid #d8e5e1;
  background: #fff;
}

.client-portal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.client-portal-brand > img,
.client-portal-brand > span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  object-fit: contain;
  border: 1px solid #bce9dc;
  border-radius: 8px;
  background: #effcf7;
  color: var(--primary-dark);
  font-size: 20px;
  font-weight: 900;
}

.client-portal-brand > div,
.client-portal-user > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.client-portal-brand small,
.client-portal-user span {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.client-portal-brand strong,
.client-portal-user strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-portal-user {
  display: flex;
  align-items: center;
  gap: 14px;
}

.client-portal-user button {
  padding: 8px 10px;
  border: 1px solid #d5e0e8;
  border-radius: 7px;
  background: #fff;
  color: #52657b;
  cursor: pointer;
  font-weight: 900;
}

.client-portal-nav {
  display: flex;
  gap: 5px;
  padding: 10px max(24px,calc((100vw - 1180px)/2));
  overflow-x: auto;
  border-bottom: 1px solid #d8e5e1;
  background: #f8fbfa;
}

.client-portal-nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border-radius: 7px;
  color: #52657b;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.client-portal-nav a span {
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: #e5eeeb;
  font-size: 10px;
}

.client-portal-nav a.active {
  background: #e2f7ef;
  color: #08745b;
}

.client-portal-main {
  display: grid;
  gap: 18px;
  width: min(1180px,calc(100% - 48px));
  margin: 0 auto;
  padding: 26px 0 50px;
}

.client-portal-welcome,
.client-portal-page-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.client-portal-welcome > div,
.client-portal-page-title {
  gap: 5px;
}

.client-portal-page-title {
  display: grid;
  justify-content: stretch;
}

.client-portal-welcome p,
.client-portal-page-title p,
.client-portal-welcome > span {
  color: var(--muted);
}

.client-portal-kpis {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 12px;
}

.portal-kpi {
  display: grid;
  gap: 6px;
  min-height: 132px;
  padding: 18px;
  border: 1px solid #d8e5e1;
  border-top: 4px solid #0f9f79;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.portal-kpi.invoices { border-top-color:#0284c7; }
.portal-kpi.overdue { border-top-color:#e11d48; }
.portal-kpi.products { border-top-color:#7c3aed; }
.portal-kpi.quotes { border-top-color:#f97316; }
.portal-kpi > span { color:var(--muted);font-size:12px;font-weight:900;text-transform:uppercase; }
.portal-kpi > strong { font-size:30px;line-height:1; }
.portal-kpi > small { color:#64748b; }

.client-portal-section,
.client-ticket-list.large,
.client-finance-list,
.client-product-grid {
  border: 1px solid #d8e5e1;
  border-radius: 8px;
  background: #fff;
}

.client-portal-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid #e4ece9;
}

.client-portal-section > header a { color:var(--primary-dark);font-size:12px;font-weight:900; }
.client-ticket-list { display:grid; }
.client-ticket-list > a { display:flex;align-items:center;justify-content:space-between;gap:14px;padding:15px 18px;border-bottom:1px solid #edf2f0;color:var(--text); }
.client-ticket-list > a:last-child { border-bottom:0; }
.client-ticket-list > a:hover { background:#f4fcf9; }
.client-ticket-list > a > div { display:grid;gap:3px;min-width:0; }
.client-ticket-list strong { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.client-ticket-list small,.client-ticket-list div span { color:var(--muted);font-size:11px; }
.client-ticket-policy { display:flex;align-items:flex-start;gap:14px;padding:18px;border:1px solid #bae6fd;border-left:5px solid #0284c7;border-radius:8px;background:#f4fbff; }
.client-ticket-policy-icon { display:grid;width:34px;height:34px;flex:0 0 34px;place-items:center;border-radius:50%;background:#0284c7;color:#fff;font-size:16px;font-weight:900; }
.client-ticket-policy > div { display:grid;gap:5px; }
.client-ticket-policy strong { color:#16334a;font-size:14px; }
.client-ticket-policy p { color:#526b80;font-size:12px;line-height:1.55; }
.client-ticket-empty { display:grid;gap:6px; }
.client-ticket-empty strong { color:var(--text);font-size:15px; }
.client-ticket-empty span { color:var(--muted);font-size:12px; }
.ticket-closed-message { display:grid;gap:5px;padding:16px;border:1px solid #cbd5e1;border-left:5px solid #64748b;border-radius:8px;background:#f8fafc; }
.ticket-closed-message strong { color:#334155; }
.ticket-closed-message span { color:#64748b;font-size:12px;line-height:1.5; }

.client-status { display:inline-flex;align-items:center;justify-content:center;padding:6px 8px;border:1px solid #d8e5e1;border-radius:7px;background:#f8fafc;color:#52657b;font-size:10px;font-weight:900;white-space:nowrap; }
.client-status.status-respondido { border-color:#f9c66d;background:#fff7df;color:#9a4d08; }
.client-status.status-aberto { border-color:#bfdbfe;background:#eff6ff;color:#1d4ed8; }
.client-status.status-aguardando_cliente,.client-status.status-paga { border-color:#a7f3d0;background:#ecfdf5;color:#047857; }
.client-status.status-finalizado,.client-status.status-cancelada { border-color:#d8e0e8;background:#f1f5f9;color:#64748b; }
.client-status.status-vencida { border-color:#fecaca;background:#fff1f2;color:#be123c; }

.client-finance-list { display:grid;overflow:hidden; }
.client-finance-list article { display:flex;align-items:center;justify-content:space-between;gap:18px;padding:17px 18px;border-bottom:1px solid #edf2f0;border-left:4px solid #0284c7; }
.client-finance-list article:last-child { border-bottom:0; }
.client-finance-list article.overdue { border-left-color:#e11d48;background:#fffafb; }
.client-finance-list article > div { display:grid;gap:4px; }
.client-finance-list article > div:last-child { justify-items:end; }
.client-finance-list small,.client-finance-list span { color:var(--muted);font-size:11px; }
.client-finance-list article > div:last-child > strong { font-size:18px; }

.client-product-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;overflow:hidden; }
.client-product-grid article { display:grid;gap:8px;padding:20px;border-right:1px solid #edf2f0;border-bottom:1px solid #edf2f0; }
.client-product-grid article:nth-child(2n) { border-right:0; }
.client-product-grid article > span { color:#7c3aed;font-size:10px;font-weight:900;text-transform:uppercase; }
.client-product-grid article p { color:var(--muted);line-height:1.45; }
.client-product-grid footer { display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:6px; }
.client-product-grid footer span { color:var(--muted);font-size:11px; }
.client-product-grid footer strong { color:#08745b; }
.client-quote-items { display:grid;gap:6px;margin:4px 0 0;padding:0;list-style:none; }
.client-quote-items li { display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px;border-radius:7px;background:#f8fafc;color:#334155;font-size:12px; }
.client-quote-items li span { color:var(--muted);white-space:nowrap; }
.client-quote-files { display:flex;gap:6px;flex-wrap:wrap; }
.client-quote-files a { padding:7px 9px;border:1px solid #cbd5e1;border-radius:7px;background:#fff;color:#0f766e;font-size:12px;font-weight:800;text-decoration:none; }
.client-portal-empty { grid-column:1/-1;padding:28px;color:var(--muted);text-align:center; }

.client-finance-list .client-finance-invoice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 18px;
  border-bottom: 1px solid #edf2f0;
  border-left: 4px solid #0284c7;
  color: var(--text);
}

.client-finance-list .client-finance-invoice:last-child { border-bottom: 0; }
.client-finance-list .client-finance-invoice:hover { background: #f7fbff; }
.client-finance-list .client-finance-invoice.overdue { border-left-color:#e11d48;background:#fffafb; }
.client-finance-invoice > div { display:grid;gap:4px; }
.client-finance-invoice > div:last-child { justify-items:end; }
.client-finance-invoice small,.client-finance-invoice span { color:var(--muted);font-size:11px; }
.client-finance-invoice > div:last-child > strong { font-size:18px; }
.payment-submission-hint { width:max-content;padding:4px 7px;border-radius:6px;font-size:10px;font-style:normal;font-weight:900; }
.payment-submission-hint.status-pendente { background:#fff4d6;color:#9a5a06; }
.payment-submission-hint.status-aprovado { background:#dcfce7;color:#047857; }
.payment-submission-hint.status-recusado { background:#ffe4e6;color:#be123c; }

/* Comunicados e notificacoes da Area do Cliente */
.notifications-page { display:grid;gap:18px; }
.notifications-hero {
  display:flex;align-items:center;justify-content:space-between;gap:24px;
  padding:24px;border:1px solid #bae6fd;border-left:6px solid #0284c7;border-radius:8px;
  background:linear-gradient(110deg,#effaff 0%,#fff 70%);
}
.notifications-hero > div { display:grid;gap:6px;max-width:760px; }
.notifications-hero h2 { font-size:28px; }
.notifications-hero p { color:var(--muted);line-height:1.5; }
.notifications-kpis { grid-template-columns:repeat(4,minmax(0,1fr)); }
.notification-client-filters {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr)) auto;
  gap:10px;
  margin-bottom:10px;
}
.notification-client-filters input,
.notification-client-filters select {
  min-width:0;
  padding:10px;
  border:1px solid var(--border);
  border-radius:7px;
  background:#fff;
  font:inherit;
  font-size:12px;
}
.notification-kpi-action { width:100%;border:0;text-align:left;cursor:pointer;font:inherit;transition:transform 150ms ease,box-shadow 150ms ease; }
.notification-kpi-action:hover { box-shadow:0 18px 34px rgba(31,41,55,.24);transform:translateY(-2px); }
.notification-kpi-action:focus-visible { outline:3px solid rgba(14,165,233,.35);outline-offset:3px; }
.notification-editor { display:none;scroll-margin-top:20px; }
.notification-editor.is-open { display:block; }
.notification-editor form,.notification-history {
  overflow:hidden;border:1px solid #d8e5e1;border-radius:8px;background:#fff;
}
.notification-editor form > header,.notification-history > header {
  display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:20px 22px;border-bottom:1px solid #e5ecea;background:#f8fbfa;
}
.notification-editor form > header > div { display:grid;gap:4px; }
.notification-editor form > header p { color:var(--muted); }
.notification-form-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;padding:22px; }
.notification-form-grid > label { display:grid;align-content:start;gap:7px;color:#51657c;font-size:11px;font-weight:900;text-transform:uppercase; }
.notification-form-grid input,.notification-form-grid textarea {
  width:100%;padding:12px 13px;border:1px solid #ccd9e4;border-radius:7px;background:#fff;color:var(--text);font:inherit;text-transform:none;
}
.notification-form-grid textarea { resize:vertical;line-height:1.5; }
.notification-form-grid small { color:var(--muted);font-size:10px;font-weight:700;text-transform:none; }
.notification-form-grid .full { grid-column:1/-1; }
.notification-audience { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:15px;border:1px solid #d9e5e1;border-radius:8px; }
.notification-audience legend { padding:0 7px;color:#52657b;font-size:11px;font-weight:900;text-transform:uppercase; }
.notification-choice { display:flex;align-items:center;gap:10px;padding:13px;border:1px solid #dce7e3;border-radius:7px;background:#f8fbfa;cursor:pointer; }
.notification-choice input { width:17px;height:17px;flex:0 0 17px;accent-color:var(--primary); }
.notification-choice span { display:grid;gap:3px; }
.notification-client-picker { grid-column:1/-1;display:grid;gap:10px;padding-top:6px; }
.notification-client-picker[hidden] { display:none; }
.notification-client-list { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-height:300px;padding:3px;overflow:auto; }
.notification-client-list label { display:flex;align-items:center;gap:10px;padding:10px;border:1px solid #e0e8e5;border-radius:7px;cursor:pointer; }
.notification-client-list label:hover { border-color:#8ddac3;background:#f1fbf7; }
.notification-client-list label[hidden] { display:none; }
.notification-client-list input { width:17px;height:17px;flex:0 0 17px;accent-color:var(--primary); }
.notification-client-list span { display:grid;gap:2px;min-width:0; }
.notification-client-list strong,.notification-client-list small { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.notification-editor form > footer { display:flex;align-items:center;gap:16px;padding:18px 22px;border-top:1px solid #e5ecea;background:#fbfcfc; }
.notification-editor form > footer span { color:var(--muted);font-size:11px; }
.notification-admin-list { display:grid; }
.notification-admin-list article { display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:16px;padding:18px 22px;border-bottom:1px solid #e9efed; }
.notification-admin-list article:last-child { border-bottom:0; }
.notification-admin-list article > img { width:88px;height:68px;object-fit:cover;border-radius:7px; }
.notification-admin-content { display:grid;gap:3px;min-width:0; }
.notification-admin-content > span,.notification-admin-content > small { color:var(--muted);font-size:10px; }
.notification-admin-content h3 { font-size:17px; }
.notification-admin-content p { overflow:hidden;color:#52657b;text-overflow:ellipsis;white-space:nowrap; }
.notification-delivery-stats { display:grid;grid-template-columns:repeat(3,82px);gap:7px; }
.notification-delivery-stats button { display:grid;gap:2px;padding:9px;border:0;border-radius:7px;background:#f1f5f9;color:#64748b;cursor:pointer;font:inherit;font-size:9px;text-align:center;text-transform:uppercase;transition:filter 150ms ease,transform 150ms ease; }
.notification-delivery-stats button:hover { filter:brightness(.97);transform:translateY(-1px); }
.notification-delivery-stats strong { color:#273444;font-size:17px; }
.notification-delivery-stats .read { background:#eafaf4;color:#08745b; }
.notification-delivery-stats .unread { background:#fff7df;color:#a05b09; }

.notification-recipient-panel { scroll-margin-top:18px;overflow:hidden;border:1px solid #cfe2dc;border-radius:8px;background:#fff;box-shadow:var(--shadow); }
.notification-recipient-panel[hidden] { display:none; }
.notification-recipient-modal { display:grid;grid-template-rows:auto auto minmax(180px,auto) auto; }
.notification-recipient-modal > header { display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:21px 23px;border-bottom:1px solid #dfe8e5;background:#f5fbf9; }
.notification-recipient-modal > header > div { display:grid;gap:4px; }
.notification-recipient-modal > header p { color:#52657b;font-size:12px; }
.notification-recipient-modal > header > button { display:grid;width:34px;height:34px;place-items:center;border:1px solid #d6e1de;border-radius:7px;background:#fff;color:#52657b;cursor:pointer;font-size:24px;line-height:1; }
.notification-recipient-toolbar { display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 20px;border-bottom:1px solid #e7eeec; }
.notification-recipient-toolbar input { width:min(420px,100%);padding:10px 12px;border:1px solid #ccd9e4;border-radius:7px;font:inherit; }
.notification-recipient-toolbar span { color:#64748b;font-size:11px;font-weight:800; }
.notification-recipient-list { display:grid;align-content:start;max-height:560px;overflow:auto; }
.notification-recipient-row { display:grid;grid-template-columns:minmax(180px,1.15fr) minmax(190px,1fr) minmax(150px,.85fr) auto;align-items:center;gap:16px;padding:15px 20px;border-bottom:1px solid #e8efed;border-left:5px solid #f59e0b; }
.notification-recipient-row.is-read { border-left-color:#10b981;background:#fbfffd; }
.notification-recipient-row[hidden] { display:none; }
.notification-recipient-identity,.notification-recipient-contact,.notification-recipient-activity { display:grid;gap:3px;min-width:0; }
.notification-recipient-identity strong { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.notification-recipient-identity span,.notification-recipient-contact span,.notification-recipient-contact a,.notification-recipient-activity small { overflow:hidden;color:#64748b;font-size:11px;text-overflow:ellipsis;white-space:nowrap; }
.notification-recipient-contact a { color:#2563eb;font-weight:800; }
.notification-recipient-activity > span { width:max-content;padding:4px 7px;border-radius:6px;font-size:9px;font-weight:900;text-transform:uppercase; }
.notification-recipient-activity > span.read { background:#dcfce7;color:#047857; }
.notification-recipient-activity > span.unread { background:#fff4d6;color:#a05b09; }
.notification-recipient-campaign { color:#6d28d9!important;font-weight:800; }
.notification-whatsapp-button,.notification-whatsapp-disabled { display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:8px 11px;border-radius:7px;font-size:10px;font-weight:900;white-space:nowrap; }
.notification-whatsapp-button { background:#0f9f78;color:#fff; }
.notification-whatsapp-button:hover { background:#08745b; }
.notification-whatsapp-disabled { background:#eef2f4;color:#94a3b8; }
.notification-recipient-loading,.notification-recipient-empty { padding:34px;color:#64748b;text-align:center; }
.notification-recipient-empty.error { color:#b91c1c; }
.notification-recipient-modal > footer { display:flex;align-items:center;justify-content:center;gap:14px;padding:13px 20px;border-top:1px solid #dfe8e5;background:#f8fbfa; }
.notification-recipient-modal > footer span { min-width:120px;color:#52657b;font-size:11px;font-weight:900;text-align:center; }
.notification-recipient-modal > footer button:disabled { cursor:not-allowed;opacity:.45; }

.client-portal-nav a span.has-unread { background:#f97316;color:#fff; }
.notification-page-title { padding:22px;border:1px solid #ddd6fe;border-left:6px solid #7c3aed;border-radius:8px;background:#faf8ff; }
.client-notification-filters { display:flex;align-items:center;gap:7px; }
.client-notification-filters a { display:inline-flex;align-items:center;gap:7px;padding:9px 12px;border:1px solid #d8e5e1;border-radius:7px;background:#fff;color:#52657b;font-size:12px;font-weight:900; }
.client-notification-filters a.active { border-color:#a78bfa;background:#f5f3ff;color:#6d28d9; }
.client-notification-filters a span { display:grid;min-width:20px;height:20px;place-items:center;border-radius:50%;background:#f97316;color:#fff;font-size:9px; }
.client-notification-list { display:grid;overflow:hidden;border:1px solid #d8e5e1;border-radius:8px;background:#fff; }
.client-notification-list > a { display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:15px;padding:17px 18px;border-bottom:1px solid #e8efec;color:var(--text); }
.client-notification-list > a:last-child { border-bottom:0; }
.client-notification-list > a:hover { background:#faf8ff; }
.client-notification-list > a.is-unread { border-left:5px solid #7c3aed;background:#fbfaff; }
.client-notification-list > a > img,.notification-list-icon { width:64px;height:52px;object-fit:cover;border-radius:7px; }
.notification-list-icon { display:grid;place-items:center;background:#ede9fe;color:#6d28d9;font-size:24px;font-weight:900; }
.client-notification-list > a > div { display:grid;gap:3px;min-width:0; }
.client-notification-list > a > div > span { color:#7c3aed;font-size:9px;font-weight:900;text-transform:uppercase; }
.client-notification-list > a.is-read > div > span { color:#64748b; }
.client-notification-list p { overflow:hidden;color:#52657b;font-size:12px;text-overflow:ellipsis;white-space:nowrap; }
.client-notification-list time { color:var(--muted);font-size:10px; }
.client-notification-list > a > b { color:#6d28d9;font-size:11px;white-space:nowrap; }
.client-notification-push { position:fixed;right:24px;bottom:24px;z-index:100;display:grid;gap:6px;width:min(380px,calc(100vw - 28px));padding:20px 44px 20px 20px;border:1px solid #c4b5fd;border-left:6px solid #7c3aed;border-radius:8px;background:#fff;box-shadow:0 18px 50px rgba(45,34,84,.22); }
.client-notification-push > button { position:absolute;top:9px;right:10px;width:28px;height:28px;border:0;background:transparent;color:#64748b;font-size:23px;cursor:pointer; }
.client-notification-push > span { color:#7c3aed;font-size:10px;font-weight:900;text-transform:uppercase; }
.client-notification-push > strong { font-size:18px; }
.client-notification-push > p { display:-webkit-box;overflow:hidden;color:#52657b;line-height:1.4;-webkit-box-orient:vertical;-webkit-line-clamp:3; }
.client-notification-push > a { width:max-content;margin-top:5px;padding:9px 11px;border-radius:7px;background:#7c3aed;color:#fff;font-size:11px;font-weight:900; }
.portal-notification-main { max-width:920px; }
.portal-notification-detail { overflow:hidden;border:1px solid #d8e5e1;border-top:5px solid #7c3aed;border-radius:8px;background:#fff; }
.portal-notification-detail > header { display:grid;gap:6px;padding:24px;border-bottom:1px solid #e9efed; }
.portal-notification-detail > header h1 { font-size:32px; }
.portal-notification-detail > header time { color:var(--muted);font-size:11px; }
.portal-notification-image { display:block;width:100%;max-height:520px;object-fit:contain;background:#f4f6f5; }
.portal-notification-media-fallback { display:flex;align-items:center;justify-content:space-between;gap:18px;padding:22px 26px;border-bottom:1px solid #e9efed;background:#f8fafc;color:#52657b; }
.portal-notification-media-fallback[hidden] { display:none; }
.portal-notification-media-fallback a { color:#2563eb;font-weight:900; }
.portal-notification-body { padding:26px;color:#273444;font-size:16px;line-height:1.7; }
.portal-notification-body a { color:#2563eb;font-weight:800;text-decoration:underline;text-underline-offset:3px; }
.portal-notification-video { position:relative;width:calc(100% - 52px);margin:0 26px 26px;padding-top:56.25%;overflow:hidden;border-radius:8px;background:#111; }
.portal-notification-video iframe { position:absolute;inset:0;width:100%;height:100%;border:0; }
.portal-notification-video.direct { padding-top:0;background:#0f172a; }
.portal-notification-video video { display:block;width:100%;max-height:620px;background:#0f172a; }
.portal-notification-external-video { display:flex;align-items:center;justify-content:space-between;gap:20px;margin:0 26px 26px;padding:18px;border:1px solid #ddd6fe;border-left:5px solid #7c3aed;border-radius:8px;background:#faf8ff; }
.portal-notification-external-video > div { display:grid;gap:4px; }
.portal-notification-external-video span { color:#64748b;font-size:12px; }
.portal-notification-detail > footer { padding:0 26px 26px; }

@media (max-width: 820px) {
  .notifications-hero,.notification-editor form > header,.notification-history > header { align-items:flex-start;flex-direction:column; }
  .notifications-kpis,.notification-form-grid,.notification-audience,.notification-client-list,.notification-client-filters { grid-template-columns:1fr; }
  .notification-form-grid .full,.notification-client-picker { grid-column:1; }
  .notification-admin-list article { grid-template-columns:auto minmax(0,1fr); }
  .notification-delivery-stats { grid-column:1/-1;width:100%;grid-template-columns:repeat(3,1fr); }
  .client-notification-list > a { grid-template-columns:auto minmax(0,1fr); }
  .client-notification-list > a > b { grid-column:2; }
  .client-notification-push { right:14px;bottom:14px; }
  .portal-notification-media-fallback,.portal-notification-external-video { align-items:flex-start;flex-direction:column; }
  .notification-recipient-toolbar { align-items:stretch;flex-direction:column; }
  .notification-recipient-toolbar input { width:100%; }
  .notification-recipient-row { grid-template-columns:1fr; }
  .notification-recipient-action { justify-self:start; }
}

.portal-invoice-main { max-width: 1020px; }
.portal-back-link { width:max-content;color:#52657b;font-size:13px;font-weight:900; }
.portal-invoice-hero { display:flex;align-items:center;justify-content:space-between;gap:24px;padding:24px;border:1px solid #bae6fd;border-left:6px solid #0284c7;border-radius:8px;background:#f7fcff; }
.portal-invoice-hero.overdue { border-color:#fecdd3;border-left-color:#e11d48;background:#fff8f9; }
.portal-invoice-hero > div:first-child { display:grid;gap:5px; }
.portal-invoice-hero > div:last-child { display:grid;gap:4px;min-width:220px;padding:18px;border-radius:7px;background:#fff;text-align:right; }
.portal-invoice-hero > div:last-child span,.portal-invoice-hero > div:last-child small { color:var(--muted);font-size:11px; }
.portal-invoice-hero > div:last-child strong { color:#08745b;font-size:30px; }
.portal-payment-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px; }
.portal-payment-method { display:grid;align-content:start;gap:15px;padding:20px;border:1px solid #d8e5e1;border-top:4px solid #10b981;border-radius:8px;background:#fff; }
.portal-payment-method.card { border-top-color:#2563eb; }
.portal-payment-method header { display:grid;gap:2px; }
.portal-payment-method header span { color:#047857;font-size:10px;font-weight:900;text-transform:uppercase; }
.portal-payment-method.card header span { color:#1d4ed8; }
.portal-payment-method > img { width:min(220px,100%);aspect-ratio:1;object-fit:contain;padding:8px;border:1px solid #d8e5e1;border-radius:7px;background:#fff;justify-self:center; }
.portal-payment-method p { color:#52657b;line-height:1.5; }
.portal-payment-method label { display:grid;gap:6px;color:#52657b;font-size:11px;font-weight:900;text-transform:uppercase; }
.portal-copy-field { display:grid;grid-template-columns:minmax(0,1fr) auto; }
.portal-copy-field input { min-width:0;padding:11px;border:1px solid #cbd9d5;border-radius:7px 0 0 7px;background:#f8fafc;font:inherit; }
.portal-copy-field button { padding:0 13px;border:0;border-radius:0 7px 7px 0;background:#0b8065;color:#fff;cursor:pointer;font-weight:900; }
.portal-card-amount { display:grid;gap:3px;padding:16px;border-radius:7px;background:#eff6ff; }
.portal-card-amount span { color:#64748b;font-size:11px; }
.portal-card-amount strong { color:#1d4ed8;font-size:25px; }
.portal-proof-panel { display:grid;grid-template-columns:minmax(230px,.7fr) minmax(320px,1.3fr);gap:24px;padding:22px;border:1px solid #d8e5e1;border-radius:8px;background:#fff; }
.portal-proof-panel > div { display:grid;align-content:start;gap:6px; }
.portal-proof-panel > div p { color:var(--muted);line-height:1.45; }
.portal-proof-panel form { display:grid;gap:12px; }
.portal-proof-panel label { display:grid;gap:6px;color:#52657b;font-size:11px;font-weight:900;text-transform:uppercase; }
.portal-proof-panel input,.portal-proof-panel select,.portal-proof-panel textarea { width:100%;padding:11px;border:1px solid #cbd9d5;border-radius:7px;background:#fff;font:inherit;text-transform:none; }
.portal-proof-panel label small { color:var(--muted);font-weight:600;text-transform:none; }
.portal-payment-status { display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px;border:1px solid #f8d28b;border-left:5px solid #f59e0b;border-radius:8px;background:#fffbeb; }
.portal-payment-status.status-aprovado { border-color:#a7f3d0;border-left-color:#10b981;background:#ecfdf5; }
.portal-payment-status.status-recusado { border-color:#fecaca;border-left-color:#ef4444;background:#fff1f2; }
.portal-payment-status > div { display:grid;gap:3px; }
.portal-payment-status > div > span { color:var(--muted);font-size:10px;font-weight:900;text-transform:uppercase; }
.portal-payment-status > div p { color:#52657b;font-size:12px; }
.portal-payment-review-note { flex-basis:100%;padding-top:10px;border-top:1px solid rgba(100,116,139,.18); }

.finance-tab-alert { gap:7px; }
.finance-tab-alert span { display:grid;min-width:22px;height:22px;place-items:center;border-radius:50%;background:#e11d48;color:#fff;font-size:11px; }
.finance-payment-alert { display:flex;align-items:center;gap:14px;margin-bottom:16px;padding:14px 16px;border:1px solid #f8cf78;border-left:5px solid #f59e0b;border-radius:8px;background:#fffbeb;color:var(--text); }
.finance-payment-alert > span { display:grid;width:40px;height:40px;place-items:center;border-radius:7px;background:#f59e0b;color:#fff;font-size:18px;font-weight:900; }
.finance-payment-alert > div { display:grid;gap:2px;flex:1; }
.finance-payment-alert small { color:#8a651c; }
.finance-payment-alert b { color:#9a5a06; }
.finance-row.has-payment-pending { box-shadow:inset 4px 0 #f59e0b;background:#fffdf5; }
.finance-payment-pending-badge { display:block;width:max-content;margin-top:6px;padding:5px 7px;border-radius:6px;background:#fff0c2;color:#9a5a06;font-size:10px;font-weight:900;white-space:nowrap; }
.finance-payment-review-head,.finance-payment-settings-hero { display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:16px;padding:21px;border:1px solid #d8e5e1;border-radius:8px;background:#fff; }
.finance-payment-review-head > div:first-child,.finance-payment-settings-hero > div { display:grid;gap:4px; }
.finance-payment-review-head p,.finance-payment-settings-hero p,.finance-payment-settings-hero > span { color:var(--muted); }
.finance-payment-settings-hero > span { max-width:330px;text-align:right; }
.finance-review-summary { display:grid;min-width:130px;padding:14px;border-radius:7px;background:#fff7df;text-align:center; }
.finance-review-summary span { color:#9a5a06;font-size:10px;font-weight:900;text-transform:uppercase; }
.finance-review-summary strong { color:#9a5a06;font-size:30px; }
.finance-payment-review-list { display:grid;gap:12px; }
.finance-payment-review-card { display:grid;gap:16px;padding:19px;border:1px solid #d8e5e1;border-left:5px solid #94a3b8;border-radius:8px;background:#fff; }
.finance-payment-review-card.status-pendente { border-left-color:#f59e0b; }
.finance-payment-review-card.status-aprovado { border-left-color:#10b981; }
.finance-payment-review-card.status-recusado { border-left-color:#ef4444; }
.finance-payment-review-card > header { display:flex;align-items:flex-start;justify-content:space-between;gap:16px; }
.finance-payment-review-card > header > div { display:grid;gap:3px; }
.finance-payment-review-card > header span { color:var(--muted);font-size:10px;font-weight:900;text-transform:uppercase; }
.finance-review-status { padding:6px 8px;border-radius:6px;background:#f1f5f9;white-space:nowrap; }
.status-pendente .finance-review-status { background:#fff4d6;color:#9a5a06; }
.status-aprovado .finance-review-status { background:#dcfce7;color:#047857; }
.status-recusado .finance-review-status { background:#ffe4e6;color:#be123c; }
.finance-review-details { display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) auto;gap:10px; }
.finance-review-details > div { display:grid;gap:4px;padding:12px;border-radius:7px;background:#f7faf9; }
.finance-review-details span { color:var(--muted);font-size:10px;text-transform:uppercase; }
.finance-review-client-note { padding:12px;border-radius:7px;background:#f8fafc;color:#52657b; }
.finance-review-form { display:grid;grid-template-columns:minmax(260px,1fr) auto;align-items:end;gap:12px;padding-top:14px;border-top:1px solid #e5ece9; }
.finance-review-form label { display:grid;gap:5px;color:#52657b;font-size:11px;font-weight:900;text-transform:uppercase; }
.finance-review-form textarea { width:100%;padding:10px;border:1px solid #cbd9d5;border-radius:7px;font:inherit;text-transform:none; }
.finance-review-form > div { display:flex;gap:8px; }
.finance-payment-review-card > footer { display:flex;justify-content:space-between;gap:14px;color:var(--muted);font-size:12px; }
.finance-payment-settings-form { display:grid;gap:14px; }
.finance-payment-setting-card { display:grid;gap:18px;padding:20px;border:1px solid #d8e5e1;border-top:4px solid #10b981;border-radius:8px;background:#fff; }
.finance-payment-setting-card.card { border-top-color:#2563eb; }
.finance-payment-setting-card > header { display:flex;align-items:center;justify-content:space-between;gap:16px; }
.finance-payment-setting-card > header > div { display:grid;gap:3px; }
.finance-payment-setting-card > header span { color:var(--muted);font-size:10px;font-weight:900;text-transform:uppercase; }
.finance-setting-toggle { display:flex;align-items:center;gap:8px;padding:9px 11px;border-radius:7px;background:#f1f7f5;font-weight:900; }
.finance-setting-toggle span { color:#08745b!important;font-size:12px!important;text-transform:none!important; }
.finance-current-qr { display:flex;align-items:center;gap:14px;grid-column:1/-1;padding:12px;border:1px solid #d8e5e1;border-radius:7px;background:#f8fafc; }
.finance-current-qr img { width:96px;height:96px;object-fit:contain;background:#fff; }
.finance-payment-settings-actions { display:flex;justify-content:flex-end;padding:14px 0; }

@media (max-width: 1100px) {
  .ticket-workspace {
    grid-template-columns: 1fr;
  }

  .ticket-queue-panel {
    position: static;
  }

  .ticket-list {
    max-height: 480px;
  }
}

@media (max-width: 720px) {
  .portal-registration-page { padding:0; }
  .portal-registration-header { grid-template-columns:minmax(0,1fr) auto;border-radius:0; }
  .portal-registration-header > a:first-child { display:none; }
  .portal-registration-header .button { padding:9px 10px; }
  .portal-registration-card { grid-template-columns:1fr;border-radius:0; }
  .portal-registration-card > div:empty { display:none; }
  .portal-form-wide,.portal-address-main { grid-column:auto; }
  .portal-contact-preferences { grid-template-columns:1fr; }
  .portal-registration-actions { align-items:stretch;flex-direction:column; }

  .profile-subheading {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-subheading p {
    text-align: left;
  }

  .public-ticket-shell {
    padding: 10px;
  }

  .public-ticket-brand {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .public-ticket-brand-links {
    grid-column: 1 / -1;
    justify-content: flex-start;
    max-width: none;
  }

  .public-ticket-account-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .ticket-portal-access-fields,
  .portal-login-shell,
  .client-portal-kpis,
  .client-product-grid {
    grid-template-columns: 1fr;
  }

  .portal-login-brand {
    display: none;
  }

  .portal-login-form-panel {
    padding: 16px;
  }

  .client-portal-header {
    padding: 12px 14px;
  }

  .client-portal-user > div {
    display: none;
  }

  .client-portal-nav {
    padding-inline: 14px;
  }

  .client-portal-main {
    width: min(100% - 24px,1180px);
    padding-top: 18px;
  }

  .client-portal-welcome,
  .client-finance-list article,
  .client-finance-list .client-finance-invoice,
  .portal-invoice-hero,
  .portal-payment-status,
  .finance-payment-review-head,
  .finance-payment-settings-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .client-finance-list article > div:last-child {
    justify-items:start;
  }

  .client-product-grid article {
    border-right: 0;
  }

  .portal-payment-grid,
  .portal-proof-panel,
  .finance-review-form,
  .finance-review-details {
    grid-template-columns: 1fr;
  }

  .portal-invoice-hero > div:last-child,
  .client-finance-invoice > div:last-child {
    width: 100%;
    justify-items: start;
    text-align: left;
  }

  .finance-payment-alert,
  .finance-payment-review-card > header,
  .finance-payment-setting-card > header,
  .finance-review-form > div {
    align-items: stretch;
    flex-direction: column;
  }

  .finance-payment-alert b,
  .finance-payment-settings-hero > span {
    text-align: left;
  }

  .tickets-dashboard-kpis,
  .ticket-create-form,
  .ticket-filters,
  .ticket-public-link-actions {
    grid-template-columns: 1fr;
  }

  .ticket-field-description,
  .ticket-filter-actions {
    grid-column: auto;
  }

  .ticket-create-actions,
  .ticket-reply-actions,
  .ticket-status-actions,
  .ticket-conversation-header {
    align-items: stretch;
    flex-direction: column;
  }

  .ticket-create-actions .button,
  .ticket-reply-actions .button,
  .ticket-status-actions .button,
  .ticket-conversation-header .button,
  .ticket-attachment-button {
    width: 100%;
  }

  .ticket-message {
    width: 96%;
  }

  .ticket-message.is-thread-reply {
    width: calc(100% - min(calc(var(--ticket-thread-depth, 1) * 14px), 56px));
    margin-inline-start: min(calc(var(--ticket-thread-depth, 1) * 14px), 56px);
  }

  .ticket-message-attachments a {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .ticket-message-attachments a > small {
    grid-column: 2;
  }
}

.calendar-item span {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.calendar-item strong {
  font-size: 13px;
  line-height: 1.25;
}

.calendar-item small {
  color: #64748b;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-item.tasks { border-left-color: #2563eb; }
.calendar-item.appointments { border-left-color: #0e7490; }
.calendar-item.finance { border-left-color: #059669; }
.calendar-item.notes { border-left-color: #7c3aed; }
.calendar-item.quotes { border-left-color: #f97316; }
.calendar-item.birthdays { border-left-color: #f59e0b; }

.calendar-more summary {
  color: #0f766e;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  margin-top: 4px;
}

.calendar-day-empty-text {
  color: #94a3b8;
  font-weight: 800;
  margin-top: 44px;
  text-align: center;
}

.dashboard-command-card {
  display: none !important;
}

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

  .calendar-day {
    min-height: 160px;
  }
}

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

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

  .calendar-filter-form span {
    padding-bottom: 0;
  }

  .calendar-hero h2 {
    font-size: 32px;
  }

  .calendar-weekdays {
    display: none;
  }

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

  .calendar-day-empty {
    display: none;
  }

  .calendar-day {
    border-right: 0;
    min-height: 0;
  }
}

@media (max-width: 920px) and (min-width: 621px) {
  .leads-dashboard-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .leads-dashboard-kpis {
    grid-template-columns: 1fr;
  }

  .leads-panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .leads-panel-header > span {
    width: 100%;
  }

  .leads-dashboard-page .lead-row {
    gap: 10px;
    padding: 14px;
  }

  .leads-dashboard-page .lead-row > .button {
    width: 100%;
  }
}

.kanban-page{display:grid;gap:16px}.kanban-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:end;padding:16px;border:1px solid var(--border);border-radius:14px;background:#fff;box-shadow:var(--shadow-sm)}.kanban-search{display:flex;gap:10px;align-items:end;min-width:0}.kanban-search label{display:grid;flex:1;gap:6px;min-width:220px;color:var(--muted);font-size:12px;font-weight:800;text-transform:uppercase}.kanban-search input{width:100%;box-sizing:border-box;border:1px solid var(--border);border-radius:10px;background:#fff;color:var(--text);font:inherit;font-size:14px;font-weight:700;padding:11px 12px;text-transform:none}.kanban-total{display:grid;gap:2px;min-width:132px;padding:10px 12px;border-radius:12px;background:#ecfeff;color:#155e75;text-align:right}.kanban-total strong{font-size:26px;line-height:1}.kanban-total span{font-size:11px;font-weight:800;text-transform:uppercase}.kanban-online-board{display:flex;gap:14px;min-height:540px;overflow-x:auto;padding:2px 2px 18px;scrollbar-gutter:stable}.kanban-online-column{display:grid;grid-template-rows:auto minmax(160px,1fr);gap:10px;flex:0 0 292px;max-height:calc(100vh - 230px);padding:12px;border:1px solid var(--border);border-radius:14px;background:#f8fafc}.kanban-online-column>header{display:flex;align-items:center;justify-content:space-between;gap:10px}.kanban-online-column>header strong{color:var(--text);font-size:14px}.kanban-online-column>header span{display:grid;place-items:center;min-width:28px;height:28px;padding:0 8px;border-radius:999px;background:#0f766e;color:#fff;font-size:12px;font-weight:900}.kanban-online-list{display:grid;align-content:start;gap:10px;min-height:140px;overflow:auto;padding-right:2px}.kanban-online-column.drag-over{border-color:#06b6d4;background:#ecfeff;box-shadow:inset 0 0 0 2px rgba(6,182,212,.18)}.kanban-online-card{display:grid;gap:8px;padding:12px;border:1px solid #dbe6ef;border-left:4px solid #0891b2;border-radius:12px;background:#fff;box-shadow:0 8px 18px rgba(15,23,42,.06);cursor:grab}.kanban-online-card.dragging{opacity:.55;cursor:grabbing}.kanban-online-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.kanban-online-card-top strong{min-width:0;color:var(--text);font-size:14px;line-height:1.25;overflow-wrap:anywhere}.kanban-online-card-top span{flex:0 0 auto;padding:3px 7px;border-radius:999px;background:#e0f2fe;color:#0369a1;font-size:10px;font-weight:900}.kanban-online-card small{color:var(--muted);font-size:12px;line-height:1.35}.kanban-online-meta{display:flex;flex-wrap:wrap;gap:5px}.kanban-online-meta span{padding:4px 7px;border-radius:999px;background:#f1f5f9;color:#475569;font-size:10px;font-weight:800}.kanban-online-card .mini-button{justify-content:center;text-decoration:none}.kanban-online-empty{display:grid;place-items:center;min-height:86px;border:1px dashed #b8c7d6;border-radius:12px;color:#94a3b8;font-size:12px;font-weight:900;text-align:center}@media(max-width:760px){.kanban-toolbar,.kanban-search{display:grid;grid-template-columns:1fr}.kanban-total{text-align:left}.kanban-online-column{flex-basis:84vw;max-height:none}}
.kanban-online-column{background:var(--kanban-column-bg,#f8fafc);border-color:color-mix(in srgb,var(--kanban-column-accent,#0891b2) 22%,var(--border))}.kanban-online-column>header>div{display:grid;gap:6px;min-width:0}.kanban-online-column>header span{background:var(--kanban-column-accent,#0f766e)}.kanban-online-column .kanban-online-card{border-left-color:var(--kanban-column-accent,#0891b2)}.kanban-online-colors{display:flex;gap:5px;flex-wrap:wrap}.kanban-online-colors button{width:16px;height:16px;padding:0;border:1px solid var(--swatch-border,#94a3b8);border-radius:999px;background:var(--swatch,#f8fafc);cursor:pointer}.kanban-online-colors button.active{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--swatch-border,#94a3b8)}
.kanban-column-actions{display:flex;gap:5px;flex-wrap:wrap}.kanban-column-actions button{padding:4px 7px;border:1px solid rgba(100,116,139,.28);border-radius:7px;background:rgba(255,255,255,.72);color:#475569;cursor:pointer;font:inherit;font-size:10px;font-weight:900}.kanban-column-actions button:hover{border-color:var(--kanban-column-accent,#0891b2);color:var(--kanban-column-accent,#0891b2)}

.appointments-page{display:grid;gap:16px}.appointment-form-card{margin-bottom:0}.appointment-toolbar{padding:14px;border:1px solid var(--border);border-radius:14px;background:#fff;box-shadow:var(--shadow-sm)}.appointment-filters{display:grid;grid-template-columns:minmax(220px,1fr) repeat(3,minmax(140px,180px)) auto;gap:10px;align-items:end}.appointment-filters label{display:grid;gap:6px;color:var(--muted);font-size:12px;font-weight:800;text-transform:uppercase}.appointment-filters input,.appointment-filters select{width:100%;box-sizing:border-box;border:1px solid var(--border);border-radius:10px;background:#fff;color:var(--text);font:inherit;font-size:14px;font-weight:700;padding:11px 12px;text-transform:none}.appointment-list{display:grid;gap:10px}.appointment-row{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(220px,.8fr) auto;gap:14px;align-items:center;padding:16px;border:1px solid var(--border);border-left:5px solid #2563eb;border-radius:14px;background:#fff;box-shadow:var(--shadow-sm)}.appointment-row.confirmado{border-left-color:#059669}.appointment-row.compareceu{border-left-color:#7c3aed}.appointment-row.faltou{border-left-color:#d97706}.appointment-row.cancelado{border-left-color:#94a3b8;opacity:.78}.appointment-row span{color:var(--muted);font-size:12px;font-weight:800}.appointment-row h2{margin:4px 0;color:var(--text);font-size:18px;line-height:1.2}.appointment-row p{margin:0;color:var(--muted);font-weight:700}.appointment-row-meta{display:flex;gap:6px;flex-wrap:wrap}.appointment-row-meta span{padding:5px 8px;border-radius:999px;background:#f1f5f9;color:#475569}.appointment-row-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.appointment-row-actions form{margin:0}.appointment-calendar-shell{display:grid;gap:12px}.appointment-calendar-nav{display:flex;align-items:center;justify-content:center;gap:12px;padding:12px;border:1px solid var(--border);border-radius:14px;background:#fff}.appointment-calendar-nav strong{min-width:120px;text-align:center;color:var(--text);font-size:18px}.appointment-calendar-weekdays{display:grid;grid-template-columns:repeat(7,minmax(110px,1fr));gap:8px}.appointment-calendar-weekdays strong{text-align:center;color:var(--muted);font-size:12px}.appointment-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(110px,1fr));gap:8px}.appointment-day{display:grid;grid-template-rows:auto 1fr;gap:8px;min-height:150px;padding:10px;border:1px solid var(--border);border-radius:14px;background:#fff}.appointment-day.empty{background:transparent;border-color:transparent}.appointment-day.today{border-color:#22c55e;box-shadow:inset 0 0 0 1px rgba(34,197,94,.28)}.appointment-day.drag-over{border-color:#0ea5e9;background:#eff6ff;box-shadow:inset 0 0 0 2px rgba(14,165,233,.18)}.appointment-day header{display:flex;align-items:center;justify-content:space-between}.appointment-day header strong{color:var(--text)}.appointment-day header span{display:grid;place-items:center;min-width:24px;height:24px;padding:0 7px;border-radius:999px;background:#0f766e;color:#fff;font-size:11px;font-weight:900}.appointment-day-list{display:grid;align-content:start;gap:6px}.appointment-mini-item{display:grid;gap:2px;padding:8px;border:1px solid #dbe6ef;border-left:4px solid #2563eb;border-radius:10px;background:#f8fafc;text-decoration:none;cursor:grab}.appointment-mini-item.confirmado{border-left-color:#059669}.appointment-mini-item.compareceu{border-left-color:#7c3aed}.appointment-mini-item.faltou{border-left-color:#d97706}.appointment-mini-item.cancelado{border-left-color:#94a3b8}.appointment-mini-item.dragging{opacity:.55}.appointment-mini-item span{color:#2563eb;font-size:11px;font-weight:900}.appointment-mini-item strong{color:var(--text);font-size:12px;line-height:1.25;overflow-wrap:anywhere}.appointment-mini-item small{color:var(--muted);font-size:11px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mini-button.danger{border-color:#fecaca;background:#fff1f2;color:#b91c1c}@media(max-width:980px){.appointment-filters,.appointment-row{grid-template-columns:1fr}.appointment-row-actions{justify-content:flex-start}.appointment-calendar-weekdays,.appointment-calendar-grid{grid-template-columns:repeat(2,minmax(150px,1fr))}}@media(max-width:620px){.appointment-calendar-weekdays{display:none}.appointment-calendar-grid{grid-template-columns:1fr}.appointment-day.empty{display:none}}
.quotes-workspace{display:grid;gap:16px}.quote-filter-grid{grid-template-columns:minmax(220px,1fr) repeat(3,minmax(130px,170px)) auto auto;align-items:end}.quote-filter-grid label{display:grid;gap:6px;color:var(--muted);font-size:12px;font-weight:800;text-transform:uppercase}.quote-filter-grid input,.quote-filter-grid select{width:100%;box-sizing:border-box;border:1px solid var(--border);border-radius:10px;background:#fff;color:var(--text);font:inherit;font-weight:700;padding:11px 12px;text-transform:none}.quote-row-actions{display:flex;gap:6px;flex-wrap:wrap;align-items:center}.quote-row-actions form{margin:0}.quote-calendar-shell{display:grid;gap:14px}.quote-calendar-board{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px}.quote-calendar-day{display:grid;gap:10px;min-height:160px;padding:12px;border:1px solid var(--border);border-radius:14px;background:#fff;box-shadow:var(--shadow-sm)}.quote-calendar-day header{display:flex;align-items:center;justify-content:space-between}.quote-calendar-day header strong{color:var(--text)}.quote-calendar-day header span{display:grid;place-items:center;min-width:28px;height:28px;padding:0 8px;border-radius:999px;background:#0f766e;color:#fff;font-size:12px;font-weight:900}.quote-calendar-day>div{display:grid;gap:7px}.quote-calendar-item{display:grid;gap:2px;padding:9px;border:1px solid #dbe6ef;border-left:4px solid #6366f1;border-radius:10px;background:#f8fafc;text-decoration:none}.quote-calendar-item span{color:#4f46e5;font-size:11px;font-weight:900}.quote-calendar-item strong{color:var(--text);font-size:13px;line-height:1.25}.quote-calendar-item small{color:#08745b;font-weight:900}.client-quote-grid a.client-quote-card{display:grid;gap:8px;padding:20px;border-right:1px solid #edf2f0;border-bottom:1px solid #edf2f0;text-decoration:none;color:inherit}.client-quote-grid a.client-quote-card:nth-child(2n){border-right:0}.client-quote-card>span{color:#7c3aed;font-size:10px;font-weight:900;text-transform:uppercase}.client-quote-card p{color:var(--muted);line-height:1.45}.quote-document-page{min-height:100vh;background:#edf3f8;padding:24px;color:var(--text)}.quote-document-actions{max-width:980px;margin:0 auto 14px;display:flex;gap:8px;justify-content:flex-end;align-items:center;flex-wrap:wrap}.quote-document-actions form{margin:0}.quote-document-actions .button{width:auto}.quote-document{max-width:980px;margin:0 auto;display:grid;gap:14px;padding:24px;border:1px solid var(--border);border-radius:18px;background:#fff;box-shadow:var(--shadow)}.quote-document-hero{display:flex;justify-content:space-between;gap:18px;padding:22px;border-radius:16px;background:linear-gradient(135deg,#073b35,#0f9f79);color:#fff}.quote-document-hero span{font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.08em;color:#bff8e9}.quote-document-hero h1{margin:4px 0;font-size:34px}.quote-document-hero p{margin:0;color:#dcfff5}.quote-document-hero strong{display:block;font-size:30px;text-align:right}.quote-document-hero small{display:block;text-align:right;color:#dcfff5;font-weight:800}.quote-document-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.quote-document-grid article,.quote-document-card,.quote-document-totals{border:1px solid var(--border);border-radius:14px;background:#fff;padding:16px}.quote-document-grid span,.quote-document-totals span:first-child{color:var(--muted);font-size:11px;font-weight:900;text-transform:uppercase}.quote-document-grid strong{display:block;margin:4px 0;color:var(--text);font-size:18px}.quote-document-grid small{display:block;color:var(--muted);font-weight:700}.quote-document-card header{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.quote-document-card h2{margin:0;font-size:19px}.quote-document-table{width:100%;border-collapse:collapse}.quote-document-table th,.quote-document-table td{padding:11px;border-bottom:1px solid #e5edf3;text-align:left}.quote-document-table th{color:var(--muted);font-size:11px;text-transform:uppercase}.quote-document-table td small{display:block;color:var(--muted);margin-top:3px}.quote-document-totals{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:18px}.quote-document-totals p{margin:6px 0 0;line-height:1.55;color:#334155}.quote-document-totals aside{display:grid;gap:8px}.quote-document-totals aside span,.quote-document-totals aside b{display:flex;justify-content:space-between;gap:12px}.quote-document-totals aside b{padding-top:10px;border-top:1px solid var(--border);font-size:20px;color:#08745b}.quote-document-files{display:flex;gap:8px;flex-wrap:wrap}.quote-document-files a{padding:8px 10px;border:1px solid var(--border);border-radius:8px;background:#f8fafc;color:#0f766e;text-decoration:none;font-weight:800}@media(max-width:860px){.quote-filter-grid,.quote-document-grid,.quote-document-totals{grid-template-columns:1fr}.quote-document-page{padding:12px}.quote-document-hero{display:grid}.quote-document-hero strong,.quote-document-hero small{text-align:left}.quote-calendar-board{grid-template-columns:1fr}}@media print{.quote-document-page{background:#fff;padding:0}.quote-document-actions,.no-print,.sidebar,.topbar{display:none!important}.quote-document{max-width:none;border:0;box-shadow:none;padding:0}.quote-document-hero{print-color-adjust:exact;-webkit-print-color-adjust:exact}.quote-document-card,.quote-document-grid article,.quote-document-totals{break-inside:avoid}}
