:root {
  --bg: #f3f6fb;
  --surface: #fff;
  --surface-soft: #f8fafc;
  --text: #172033;
  --muted: #64748b;
  --border: #dbe4f0;
  --item-border: #e2e8f0;
  --primary: #0f5f9f;
  --primary-soft: #e0f2fe;
  --primary-strong: #084a7d;
  --accent: #14b8a6;
  --accent-soft: #ccfbf1;
  --sidebar-start: #123d64;
  --sidebar-end: #0c243f;
  --shadow: rgba(15, 23, 42, 0.08);
  --strong-shadow: rgba(15, 23, 42, 0.14);
  color: var(--text);
  background: var(--bg);
  font-family: Inter, Arial, sans-serif;
}

[data-theme="dark"] {
  --bg: #07111f;
  --surface: #101b2d;
  --surface-soft: #15243a;
  --text: #e5edf8;
  --muted: #9fb0c7;
  --border: #263650;
  --item-border: #2f405c;
  --primary: #22a9e8;
  --primary-soft: #123853;
  --primary-strong: #7dd3fc;
  --accent: #2dd4bf;
  --accent-soft: #0f3f3d;
  --sidebar-start: #071827;
  --sidebar-end: #040b13;
  --shadow: rgba(0, 0, 0, 0.28);
  --strong-shadow: rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--primary-soft) 70%, transparent), transparent 34rem),
    var(--bg);
}

.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  padding: 28px 22px;
  color: #fff;
  background: linear-gradient(180deg, var(--sidebar-start), var(--sidebar-end));
  box-shadow: 18px 0 45px rgba(2, 6, 23, 0.18);
}

.brand-logo {
  display: block;
  width: 100%;
  max-width: 210px;
  margin: 0 auto 24px;
  border-radius: 16px;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.sidebar a {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 12px 14px;
  color: #d7e8ff;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 14px;
  font-weight: 800;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.sidebar a:hover,
.sidebar a.active {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.13);
  transform: translateX(2px);
}

.nav-icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-icon svg {
  width: 18px;
  height: 18px;
}

.user-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  line-height: 1.5;
}

.user-box strong,
.user-box small {
  display: block;
}

.user-box small {
  color: #bdd6f7;
  overflow-wrap: anywhere;
}

.user-avatar {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  color: #083454;
  background: #e0f2fe;
  font-weight: 900;
}

.logout-button {
  margin-top: 20px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

main {
  width: min(1280px, 100%);
  padding: 76px 32px 36px;
}

.theme-toggle-panel {
  position: absolute;
  top: 18px;
  right: 22px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: 0 12px 30px var(--shadow);
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 800;
}

.theme-switch {
  position: relative;
  display: inline-flex;
  width: 52px;
  height: 28px;
  margin: 0;
  cursor: pointer;
}

.theme-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.theme-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 0.2s ease;
}

.theme-slider::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.22);
  transition: transform 0.2s ease;
}

.theme-switch input:checked + .theme-slider {
  background: var(--primary);
}

.theme-switch input:checked + .theme-slider::before {
  transform: translateX(24px);
}

.header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
}

.header h2 {
  margin: 0;
  font-size: 34px;
}

.muted {
  color: var(--muted);
}

.dashboard-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  margin-bottom: 20px;
  padding: 28px;
  border: 1px solid color-mix(in srgb, var(--primary) 16%, var(--border));
  border-radius: 26px;
  color: #fff;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--primary) 92%, #000), var(--primary-strong)),
    var(--primary);
  box-shadow: 0 24px 60px var(--strong-shadow);
}

.dashboard-hero h1 {
  max-width: 760px;
  margin: 8px 0 10px;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1;
}

.dashboard-hero p {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  color: #083454;
  background: #e0f2fe;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 10px;
}

.dashboard-hero .button-link {
  color: var(--primary);
  background: #fff;
}

.dashboard-hero .button-link.secondary {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card,
.panel {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 16px 40px var(--shadow);
}

.card {
  position: relative;
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute;
  right: -42px;
  top: -42px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary-soft) 70%, transparent);
}

.card strong {
  display: block;
  margin-top: 8px;
  font-size: 32px;
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card {
  display: grid;
  gap: 8px;
  min-height: 156px;
}

.metric-card > * {
  position: relative;
  z-index: 1;
}

.metric-icon {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 900;
}

.danger-icon {
  color: #991b1b;
  background: #fee2e2;
}

.attention-card strong {
  color: #dc2626;
}

.summary-panel {
  margin-top: 0;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 96%, var(--primary-soft)), var(--surface));
}

.summary-header {
  margin-bottom: 0;
}

.cadastro-hero {
  margin-bottom: 0;
}

.setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 20px;
  align-items: start;
}

.section-title {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.section-title h2 {
  margin: 0 0 4px;
}

.section-title p {
  margin: 0;
}

.section-icon {
  display: inline-grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 16px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 13px;
  font-weight: 900;
}

.knowledge-form-panel {
  position: relative;
}

.knowledge-form-panel.editing-mode {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--border));
  box-shadow: 0 18px 45px color-mix(in srgb, var(--accent) 18%, transparent);
}

.knowledge-form-panel.editing-mode::before {
  content: "Modo edicao";
  position: absolute;
  top: -12px;
  right: 24px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #064e3b;
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 900;
}

.search-field {
  min-width: min(320px, 100%);
  margin: 0;
}

.knowledge-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.knowledge-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  border: 1px solid var(--item-border);
  border-radius: 20px;
  background: var(--surface-soft);
  box-shadow: 0 12px 30px var(--shadow);
}

.knowledge-cover {
  position: relative;
  display: grid;
  height: 180px;
  overflow: hidden;
  padding: 10px;
  place-items: center;
  color: var(--muted);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--primary-soft) 82%, transparent), var(--surface));
  font-weight: 900;
}

.knowledge-cover img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 12px;
}

.empty-cover {
  border-bottom: 1px solid var(--border);
}

.photo-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  font-size: 12px;
  font-weight: 900;
}

.knowledge-content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  padding: 16px;
  background: var(--surface-soft);
}

.knowledge-card-header {
  display: grid;
  gap: 10px;
  align-items: start;
}

.knowledge-card h3 {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.3;
}

.knowledge-card p {
  margin: 0;
}

.price-pill {
  width: fit-content;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  color: #064e3b;
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.knowledge-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.knowledge-details span,
.knowledge-details a {
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.quality-box {
  display: grid;
  gap: 7px;
  padding: 10px;
  border-radius: 14px;
  background: var(--surface);
}

.quality-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
  font-size: 13px;
}

.quality-bar {
  overflow: hidden;
  height: 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 65%, transparent);
}

.quality-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.knowledge-card .button-row {
  padding: 0 16px 16px;
}

.value-table-preview img {
  height: 160px;
  object-fit: contain;
  background: var(--surface);
}

.history-hero {
  margin-bottom: 0;
}

.history-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 16px;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-tabs button {
  width: auto;
  min-width: 110px;
}

.filter-tabs button.active {
  color: #fff;
  background: var(--primary);
}

.history-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.history-summary span {
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 800;
}

.conversation-list {
  display: grid;
  gap: 16px;
}

.unanswered-list {
  display: grid;
  gap: 14px;
}

.unanswered-card {
  display: grid;
  gap: 12px;
}

.unanswered-resolved {
  opacity: 0.75;
}

.conversation-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--item-border);
  border-radius: 20px;
  background: var(--surface-soft);
  box-shadow: 0 12px 30px var(--shadow);
}

.conversation-pending {
  border-color: #fca5a5;
}

.customer-card.conversation-pending {
  border: 3px solid #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.24), 0 16px 36px var(--shadow);
}

.conversation-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.conversation-header h3 {
  margin: 10px 0 4px;
}

.conversation-header p {
  margin: 0;
}

.conversation-timeline {
  display: grid;
  gap: 12px;
}

.timeline-message {
  display: grid;
  gap: 7px;
  padding: 14px;
  border-left: 4px solid var(--primary);
  border-radius: 14px;
  background: var(--surface);
}

.timeline-message p {
  margin: 0;
}

.timeline-pending {
  border-left-color: #dc2626;
}

.clients-hero,
.attendance-hero {
  margin-bottom: 0;
}

.customer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.customer-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--item-border);
  border-radius: 20px;
  background: var(--surface-soft);
  box-shadow: 0 12px 30px var(--shadow);
}

.customer-card-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.customer-card-header h3 {
  margin: 10px 0 4px;
}

.customer-card-header p,
.customer-card p {
  margin: 0;
}

.customer-form textarea {
  min-height: 84px;
}

.customer-card .admin-user-stats {
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
}

.customer-card .admin-user-stats span {
  min-height: 88px;
  align-content: center;
}

.customer-card .admin-user-stats strong,
.customer-card .admin-user-stats small {
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.lead-details {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  background: var(--surface);
}

.lead-details span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.lead-details strong {
  color: var(--text);
}

.human-action-alert {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #fca5a5;
  border-radius: 14px;
  color: #991b1b;
  background: #fee2e2;
}

.human-action-alert span {
  font-size: 0.92rem;
  line-height: 1.35;
}

.admin-hero {
  margin-bottom: 0;
}

.admin-users-grid {
  display: grid;
  gap: 18px;
}

.admin-user-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr);
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--item-border);
  border-radius: 20px;
  background: var(--surface-soft);
  box-shadow: 0 12px 30px var(--shadow);
}

.integration-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.integration-status-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--item-border);
}

.integration-status-card p {
  margin: 0;
  color: var(--muted);
}

.admin-user-profile {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.admin-user-profile h3 {
  margin: 10px 0 4px;
}

.admin-user-profile p {
  margin: 0;
  overflow-wrap: anywhere;
}

.admin-user-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.admin-user-stats span {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  background: var(--surface);
}

.admin-user-stats strong {
  color: var(--primary);
  font-size: 18px;
}

.admin-user-stats small {
  color: var(--muted);
  font-weight: 800;
}

.admin-meta {
  display: grid;
  gap: 8px;
  align-content: start;
}

.admin-meta p {
  margin: 0;
}

.admin-quick-actions {
  grid-column: 1 / -1;
  margin-top: 0;
}

.admin-user-card .admin-form {
  grid-column: 1 / -1;
}

.settings-hero {
  margin-bottom: 20px;
}

.account-hero {
  margin-bottom: 0;
}

.account-summary {
  margin-top: 20px;
}

.settings-hero .hero-actions {
  min-width: min(360px, 100%);
}

.settings-hero .hero-actions button {
  color: var(--primary);
  background: #fff;
}

.settings-hero .hero-actions button.secondary {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
}

.connection-status-grid {
  margin-bottom: 20px;
}

.connection-status-grid .card strong {
  font-size: 22px;
  overflow-wrap: anywhere;
}

.connected-card .metric-icon,
.connected-card strong {
  color: #047857;
}

.connected-card .metric-icon {
  background: #d1fae5;
}

.waiting-card .metric-icon,
.waiting-card strong {
  color: #b45309;
}

.waiting-card .metric-icon {
  background: #fef3c7;
}

.disconnected-card .metric-icon,
.disconnected-card strong {
  color: #991b1b;
}

.disconnected-card .metric-icon {
  background: #fee2e2;
}

.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
  gap: 20px;
  align-items: start;
}

.steps-list {
  display: grid;
  gap: 12px;
}

.step-item {
  padding: 14px;
  border-left: 4px solid var(--primary);
  border-radius: 14px;
  background: var(--surface-soft);
}

.step-item p {
  margin: 6px 0 0;
  color: var(--muted);
}

.webhook-copy-box {
  display: grid;
  gap: 12px;
}

.webhook-copy-box code {
  display: block;
  padding: 14px;
  border: 1px dashed var(--primary);
  border-radius: 14px;
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.qr-panel {
  overflow: hidden;
}

.qr-panel .qr-box {
  margin-top: 0;
}

.plan-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel {
  margin-top: 20px;
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  font-weight: 700;
}

input,
select,
textarea,
button {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
}

input,
select,
textarea {
  color: var(--text);
  background: var(--surface);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

button {
  cursor: pointer;
  color: #fff;
  border: 0;
  background: var(--primary);
  font-weight: 800;
}

.button-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 12px 14px;
  text-decoration: none;
  font-weight: 800;
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

button.is-loading {
  position: relative;
}

button.is-loading::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 8px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 999px;
  vertical-align: -2px;
  animation: spin 0.8s linear infinite;
}

button.secondary {
  color: var(--primary);
  background: var(--primary-soft);
}

button.danger-button {
  color: #991b1b;
  background: #fee2e2;
}

[data-theme="dark"] button.danger-button {
  color: #fecaca;
  background: #3b1117;
}

.button-link.secondary {
  color: var(--primary);
  background: var(--primary-soft);
}

.compact-header {
  margin-bottom: 12px;
}

.billing-form {
  display: grid;
  gap: 12px;
}

.subscription-notes {
  display: grid;
  gap: 10px;
}

.subscription-notes p {
  margin: 0;
  padding: 14px;
  border-radius: 14px;
  background: var(--surface-soft);
}

.row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.list {
  display: grid;
  gap: 12px;
}

.item {
  padding: 16px;
  border: 1px solid var(--item-border);
  border-radius: 16px;
  background: var(--surface-soft);
}

.item h3 {
  margin: 0 0 8px;
}

.message {
  display: grid;
  gap: 8px;
}

.admin-summary {
  margin-bottom: 20px;
}

.admin-user {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 20px;
}

.admin-form textarea {
  min-height: 82px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.photo-grid img {
  width: 100%;
  height: 110px;
  border-radius: 12px;
  object-fit: cover;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.existing-photos-panel {
  margin: 8px 0 4px;
}

.editable-photo-grid {
  margin-top: 8px;
}

.editable-photo {
  margin: 0;
  display: grid;
  gap: 8px;
}

.photo-remove-button {
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
}

.badge {
  display: inline-block;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 800;
}

.danger-badge {
  color: #991b1b;
  background: #fee2e2;
}

.handoff-box {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.handoff-pending {
  border-color: #fca5a5;
  background: #fff1f2;
}

[data-theme="dark"] .handoff-pending {
  border-color: #7f1d1d;
  background: #2a1218;
}

.info-box {
  margin: 18px 0;
  padding: 16px;
  border: 1px dashed var(--primary);
  border-radius: 14px;
  background: var(--primary-soft);
}

.info-box p {
  overflow-wrap: anywhere;
  color: var(--primary);
  font-weight: 800;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.qr-box {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 20px;
  border-radius: 18px;
  background: var(--surface-soft);
}

.qr-box img {
  width: min(280px, 100%);
  border: 12px solid var(--surface);
  border-radius: 18px;
  box-shadow: 0 14px 35px var(--strong-shadow);
}

.alert {
  display: none;
  margin: 16px 0;
  padding: 12px;
  border-radius: 12px;
  color: #166534;
  background: #dcfce7;
}

.error-alert {
  color: #991b1b;
  background: #fee2e2;
}

.empty-state {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 22px;
  border: 1px dashed var(--border);
  border-radius: 18px;
  color: var(--muted);
  background: var(--surface-soft);
}

.empty-state strong {
  color: var(--text);
  font-size: 18px;
}

.empty-state p {
  margin: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.login-page {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(380px, 0.9fr);
  gap: 32px;
  align-items: center;
  min-height: 100vh;
  padding: 42px;
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--primary-soft) 80%, transparent), transparent 34rem),
    linear-gradient(135deg, var(--bg), color-mix(in srgb, var(--primary-soft) 28%, var(--bg)));
}

.login-hero {
  max-width: 720px;
}

.login-hero h1 {
  margin: 12px 0;
  color: var(--text);
  font-size: clamp(38px, 5vw, 64px);
  line-height: 0.98;
}

.login-hero p {
  max-width: 620px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.login-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.login-benefits span {
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 900;
}

.login-card {
  width: min(500px, 100%);
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 20px 60px var(--strong-shadow);
}

.login-card h2 {
  margin: 0 0 6px;
  font-size: 30px;
}

.login-logo {
  display: block;
  width: min(320px, 100%);
  margin: 0 auto 18px;
  border-radius: 16px;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0;
}

.tabs button {
  color: var(--primary);
  background: var(--primary-soft);
}

.tabs button.active {
  color: #fff;
  background: var(--primary);
}

.auth-links {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.link-button {
  width: auto;
  padding: 0;
  color: var(--primary);
  background: transparent;
  font-weight: 900;
  text-decoration: underline;
}

@media (max-width: 860px) {
  .layout,
  .grid,
  .metric-grid,
  .plan-grid,
  .setup-grid,
  .settings-layout,
  .status-grid,
  .row,
  .admin-user-card,
  .admin-user-stats,
  .customer-grid,
  .admin-user {
    grid-template-columns: 1fr;
  }

  .login-page {
    grid-template-columns: 1fr;
    padding: 90px 20px 24px;
  }

  .login-hero {
    text-align: center;
  }

  .login-benefits {
    justify-content: center;
  }

  .sidebar {
    position: static;
    min-height: auto;
  }

  .dashboard-hero,
  .header,
  .history-toolbar,
  .conversation-header {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-hero {
    padding: 22px;
  }

  .hero-actions,
  .hero-actions .button-link,
  .header .button-link,
  .search-field,
  .filter-tabs button,
  .header button {
    width: 100%;
  }

  .knowledge-card-header {
    display: grid;
  }

  .price-pill {
    max-width: 100%;
    width: fit-content;
  }

  main {
    padding: 90px 20px 24px;
  }

  .theme-toggle-panel {
    top: 14px;
    right: 14px;
  }
}

/* Modern UI refresh */
:root {
  --bg: #eef4fb;
  --surface: #ffffff;
  --surface-soft: #f7faff;
  --text: #111827;
  --muted: #667085;
  --border: #d8e2ee;
  --item-border: #e4ebf3;
  --primary: #0b77bd;
  --primary-soft: #e6f4ff;
  --primary-strong: #075b92;
  --accent: #12b981;
  --accent-soft: #dcfce7;
  --sidebar-start: #06182a;
  --sidebar-end: #0d2b45;
  --shadow: rgba(15, 23, 42, 0.07);
  --strong-shadow: rgba(15, 23, 42, 0.14);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-xl: 32px;
}

[data-theme="dark"] {
  --bg: #08111f;
  --surface: #101b2c;
  --surface-soft: #142238;
  --text: #edf4ff;
  --muted: #a8b5c8;
  --border: #263850;
  --item-border: #31445f;
  --primary: #38bdf8;
  --primary-soft: #0d334f;
  --primary-strong: #7dd3fc;
  --accent: #34d399;
  --accent-soft: #103b30;
  --sidebar-start: #050c16;
  --sidebar-end: #091827;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--primary-soft) 82%, transparent), transparent 28rem),
    linear-gradient(180deg, var(--bg), color-mix(in srgb, var(--bg) 88%, var(--surface-soft)));
  line-height: 1.5;
}

.layout {
  grid-template-columns: 264px minmax(0, 1fr);
}

main {
  width: min(1360px, 100%);
  padding: 72px 34px 48px;
}

.sidebar {
  padding: 22px 16px;
  background:
    radial-gradient(circle at 30% 0, rgba(56, 189, 248, 0.18), transparent 18rem),
    linear-gradient(180deg, var(--sidebar-start), var(--sidebar-end));
  box-shadow: 16px 0 48px rgba(2, 6, 23, 0.22);
}

.brand-logo {
  max-width: 184px;
  margin-bottom: 8px;
  border-radius: 18px;
}

.brand-block {
  display: grid;
  justify-items: center;
  gap: 4px;
  margin-bottom: 10px;
  text-align: center;
}

.brand-block small {
  color: rgba(231, 243, 255, 0.72);
  font-weight: 800;
}

.user-box {
  padding: 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(12px);
}

.user-box-content {
  min-width: 0;
}

.sidebar-user-line {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  margin-bottom: 12px;
  padding: 8px 10px;
  border-radius: 14px;
  color: rgba(231, 243, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
  font-weight: 900;
}

.sidebar-user-line span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.small-avatar {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 0.75rem;
}

.sidebar-nav {
  gap: 6px;
  margin-top: 10px;
}

.sidebar a {
  padding: 10px 11px;
  border-radius: 16px;
  color: rgba(231, 243, 255, 0.82);
  font-size: 0.95rem;
  font-weight: 800;
}

.sidebar a:hover,
.sidebar a.active {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.14);
  transform: none;
}

.nav-icon {
  width: 32px;
  height: 32px;
  border-radius: 12px;
}

.logout-button {
  border-radius: 16px;
}

.theme-toggle-panel {
  top: 20px;
  right: 24px;
  padding: 8px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
}

.header {
  margin-bottom: 22px;
}

.header h2 {
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.04em;
}

.header p,
.muted {
  line-height: 1.55;
}

.dashboard-hero {
  position: relative;
  overflow: hidden;
  align-items: center;
  padding: 30px;
  border: 0;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.18), transparent 14rem),
    linear-gradient(135deg, #0a72b5, #0f4d7a 58%, #0b2c4a);
}

.dashboard-hero::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -80px;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.dashboard-hero > * {
  position: relative;
  z-index: 1;
}

.dashboard-hero h1 {
  max-width: 840px;
  font-size: clamp(32px, 4vw, 54px);
  letter-spacing: -0.055em;
}

.dashboard-hero p {
  max-width: 720px;
  font-size: 1.02rem;
}

.eyebrow {
  padding: 6px 10px;
  color: #075985;
  background: rgba(224, 242, 254, 0.94);
}

.card,
.panel,
.item,
.conversation-card,
.customer-card,
.admin-user-card,
.knowledge-card,
.integration-status-card {
  border-color: var(--item-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 34px var(--shadow);
}

.panel {
  padding: 24px;
}

.card,
.metric-card {
  border-radius: 24px;
}

.metric-card {
  min-height: 138px;
  padding: 20px;
}

.metric-card span:not(.metric-icon) {
  color: var(--muted);
  font-weight: 800;
}

.card strong,
.metric-card strong {
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.04em;
}

.metric-icon,
.section-icon {
  border-radius: 14px;
}

button,
.button-link {
  min-height: 44px;
  border-radius: 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

button:hover,
.button-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px var(--shadow);
}

button.secondary,
.button-link.secondary {
  border: 1px solid color-mix(in srgb, var(--primary) 14%, var(--border));
}

input,
select,
textarea {
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 92%, var(--surface-soft));
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--primary) 68%, var(--border));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary-soft) 70%, transparent);
}

label {
  color: var(--text);
  font-size: 0.95rem;
}

.history-toolbar {
  padding: 10px;
  border: 1px solid var(--item-border);
  border-radius: 20px;
  background: var(--surface-soft);
}

.filter-tabs button {
  min-width: auto;
  border-radius: 999px;
}

.history-summary span,
.badge,
.price-pill,
.knowledge-details span,
.knowledge-details a {
  border: 1px solid color-mix(in srgb, var(--primary) 10%, transparent);
}

.customer-card,
.conversation-card,
.admin-user-card,
.knowledge-card {
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
}

.customer-card {
  align-content: start;
}

.customer-card.conversation-pending {
  border: 2px solid #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12), 0 18px 42px var(--shadow);
}

.human-action-alert {
  border-radius: 16px;
}

.lead-details,
.quality-box,
.admin-user-stats span,
.subscription-notes p,
.step-item {
  border: 1px solid var(--item-border);
}

.lead-card .lead-details {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.lead-card .lead-details span {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-soft) 76%, var(--surface));
}

.lead-card .lead-details strong {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.conversation-preview {
  gap: 14px;
}

.conversation-preview > div {
  padding: 12px;
  border: 1px solid var(--item-border);
  border-radius: 16px;
  background: var(--surface);
}

.conversation-preview > div strong {
  color: var(--primary);
}

.ai-test-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.15fr);
  gap: 20px;
  align-items: start;
}

.quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.quick-prompts button {
  width: auto;
}

.ai-test-result {
  display: grid;
  gap: 14px;
}

.ai-response-card,
.ai-test-section,
.ai-diagnostic-grid article {
  padding: 14px;
  border: 1px solid var(--item-border);
  border-radius: 18px;
  background: var(--surface-soft);
}

.ai-response-card p {
  margin-bottom: 0;
  white-space: pre-wrap;
}

.ai-diagnostic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ai-diagnostic-grid p,
.ai-test-section p {
  margin: 6px 0 0;
  color: var(--muted);
}

.matched-knowledge-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.matched-knowledge-list span {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-radius: 14px;
  background: var(--surface);
}

.warning-section {
  border-color: #fde68a;
  background: #fffbeb;
}

[data-theme="dark"] .warning-section {
  border-color: #854d0e;
  background: #2a1e0b;
}

.plan-alert {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 18px 0 0;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--item-border);
}

.plan-alert p {
  margin: 4px 0 0;
}

.plan-alert.warning {
  color: #92400e;
  border-color: #fde68a;
  background: #fffbeb;
}

.plan-alert.danger {
  color: #991b1b;
  border-color: #fecaca;
  background: #fff1f2;
}

[data-theme="dark"] .plan-alert.warning {
  color: #fbbf24;
  border-color: #854d0e;
  background: #2a1e0b;
}

[data-theme="dark"] .plan-alert.danger {
  color: #fecaca;
  border-color: #7f1d1d;
  background: #2a1218;
}

.onboarding-panel {
  display: grid;
  gap: 16px;
}

.onboarding-panel summary {
  cursor: pointer;
  list-style: none;
}

.onboarding-panel summary::-webkit-details-marker {
  display: none;
}

.onboarding-panel:not([open]) {
  padding-bottom: 18px;
}

.onboarding-panel:not([open]) .onboarding-list,
.onboarding-panel:not([open]) .onboarding-progress {
  display: none;
}

.onboarding-panel .eyebrow {
  margin-bottom: 8px;
}

.onboarding-progress {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 68%, transparent);
}

.onboarding-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.25s ease;
}

.onboarding-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.onboarding-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--item-border);
  border-radius: 18px;
  background: var(--surface-soft);
}

.onboarding-step.completed {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--item-border));
  background: color-mix(in srgb, var(--accent-soft) 38%, var(--surface));
}

.onboarding-check {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--item-border);
  font-weight: 900;
}

.onboarding-step.completed .onboarding-check {
  color: #047857;
  border-color: #86efac;
  background: #dcfce7;
}

.onboarding-step p {
  margin: 4px 0 0;
  color: var(--muted);
}

.onboarding-step .button-link {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 38px;
  padding: 9px 12px;
}

.stacked-form {
  display: grid;
  gap: 18px;
}

.template-collapse {
  margin: 0 0 18px;
  border: 1px solid var(--item-border);
  border-radius: 22px;
  background: var(--surface-soft);
  overflow: hidden;
}

.template-collapse summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}

.template-collapse summary::-webkit-details-marker {
  display: none;
}

.template-collapse summary::after {
  content: "Abrir";
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 0.78rem;
  font-weight: 900;
}

.template-collapse[open] summary::after {
  content: "Fechar";
}

.template-collapse summary strong,
.template-collapse summary small {
  display: block;
}

.template-collapse summary small,
.template-help {
  color: var(--muted);
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 18px 12px;
}

.template-card {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 132px;
  padding: 14px;
  text-align: left;
  white-space: normal;
}

.template-card span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.template-help {
  margin: 0;
  padding: 0 18px 18px;
}

.form-section {
  padding: 18px;
  border: 1px solid var(--item-border);
  border-radius: 22px;
  background: var(--surface-soft);
}

.compact-section-title {
  margin-bottom: 14px;
}

.compact-section-title h3 {
  margin: 0 0 4px;
}

.knowledge-cover {
  height: 190px;
}

.knowledge-content {
  background: transparent;
}

.empty-state {
  padding: 28px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface-soft) 92%, var(--primary-soft)), var(--surface-soft));
}

.alert {
  border: 1px solid #bbf7d0;
  border-radius: 16px;
}

.error-alert {
  border-color: #fecaca;
}

.login-page {
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--primary-soft) 90%, transparent), transparent 30rem),
    linear-gradient(135deg, var(--bg), color-mix(in srgb, var(--surface) 72%, var(--bg)));
}

.login-card {
  border-radius: 28px;
}

@media (max-width: 1020px) {
  .layout {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  main {
    padding-inline: 24px;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .layout {
    grid-template-columns: 1fr;
  }

  main {
    padding: 84px 16px 28px;
  }

  .sidebar {
    padding: 18px;
    border-radius: 0 0 28px 28px;
  }

  .sidebar-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar a {
    justify-content: flex-start;
  }

  .template-grid {
    grid-template-columns: 1fr;
  }

  .onboarding-list,
  .onboarding-step,
  .ai-test-layout,
  .ai-diagnostic-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-hero,
  .panel {
    border-radius: 24px;
  }
}

/* ===================== Landing page ===================== */
.lp-body {
  scroll-behavior: smooth;
}

.lp-body main {
  width: 100%;
  max-width: none;
  padding: 0;
}

.lp-container {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 0 24px;
}

.lp-skip {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 0 0 12px 0;
  color: #fff;
  background: var(--primary);
}

.lp-skip:focus {
  left: 0;
}

/* Header */
.lp-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.lp-header.is-scrolled {
  border-bottom-color: var(--border);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  box-shadow: 0 10px 30px var(--shadow);
}

.lp-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 72px;
}

.lp-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 900;
}

.lp-brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
}

.lp-brand-name {
  font-size: 17px;
  letter-spacing: -0.01em;
}

.lp-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lp-nav a {
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  transition: color 0.15s ease, background 0.15s ease;
}

.lp-nav a:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--primary-soft) 60%, transparent);
}

.lp-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lp-cta {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--primary) 35%, transparent);
}

.lp-cta:hover {
  background: var(--primary-strong);
}

.lp-ghost {
  color: var(--primary);
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--border));
}

.lp-ghost:hover {
  background: var(--primary-soft);
}

.lp-cta-lg {
  padding: 14px 22px;
  font-size: 16px;
}

.lp-cta-block {
  width: 100%;
  margin-top: 6px;
}

.lp-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.lp-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Hero */
.lp-hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 24px;
  background:
    radial-gradient(circle at 85% -10%, color-mix(in srgb, var(--primary-soft) 85%, transparent), transparent 42%),
    radial-gradient(circle at -5% 20%, color-mix(in srgb, var(--accent-soft) 70%, transparent), transparent 38%),
    var(--bg);
}

.lp-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: center;
}

.lp-hero-copy h1 {
  margin: 16px 0 14px;
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.03;
  letter-spacing: -0.03em;
}

.lp-hero-copy p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.lp-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 18px;
}

.lp-hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
}

.lp-hero-points li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lp-hero-points li::before {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background:
    var(--accent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}

/* Hero visual */
.lp-hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 440px;
}

.lp-chat {
  width: min(360px, 100%);
  border: 1px solid var(--border);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 30px 70px var(--strong-shadow);
  overflow: hidden;
  transform: rotate(-1.5deg);
}

.lp-chat-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--sidebar-start), var(--primary));
}

.lp-chat-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-weight: 900;
}

.lp-chat-top strong {
  display: block;
  font-size: 15px;
}

.lp-chat-top small {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
}

.lp-chat-body {
  display: grid;
  gap: 10px;
  padding: 18px;
  background:
    radial-gradient(circle at 20% 10%, color-mix(in srgb, var(--primary-soft) 40%, transparent), transparent 40%),
    var(--surface-soft);
}

.lp-bubble {
  max-width: 82%;
  padding: 10px 13px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.45;
  box-shadow: 0 4px 12px var(--shadow);
}

.lp-bubble-in {
  justify-self: start;
  border-bottom-left-radius: 4px;
  color: var(--text);
  background: var(--surface);
}

.lp-bubble-out {
  justify-self: end;
  border-bottom-right-radius: 4px;
  color: #08321f;
  background: #d7f7e3;
}

[data-theme="dark"] .lp-bubble-out {
  color: #d7f7e3;
  background: #14492f;
}

.lp-typing {
  justify-self: end;
  display: inline-flex;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 4px 12px var(--shadow);
}

.lp-typing span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--muted);
  animation: lpTyping 1.2s infinite ease-in-out;
}

.lp-typing span:nth-child(2) {
  animation-delay: 0.18s;
}

.lp-typing span:nth-child(3) {
  animation-delay: 0.36s;
}

@keyframes lpTyping {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.lp-float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 18px 40px var(--strong-shadow);
}

.lp-float-card strong {
  display: block;
  font-size: 13px;
}

.lp-float-card small {
  color: var(--muted);
  font-size: 12px;
}

.lp-float-icon {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 32px;
  padding: 0 8px;
  border-radius: 10px;
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 900;
  font-size: 14px;
}

.lp-float-1 {
  top: 6%;
  left: -2%;
  animation: lpFloat 5s ease-in-out infinite;
}

.lp-float-2 {
  bottom: 8%;
  right: -2%;
  animation: lpFloat 5s ease-in-out infinite 0.8s;
}

@keyframes lpFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Trust bar */
.lp-trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 36px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}

.lp-trust > span {
  max-width: 360px;
  color: var(--muted);
  font-weight: 700;
}

.lp-trust-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}

.lp-trust-stats strong {
  display: block;
  font-size: 26px;
  color: var(--primary);
}

.lp-trust-stats small {
  color: var(--muted);
}

/* Sections */
.lp-section {
  padding: 84px 0;
}

.lp-section-alt {
  background: var(--surface-soft);
}

.lp-section :where(h2, h3, p) {
  margin: 0;
}

.lp-section-head {
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
}

.lp-section-head h2 {
  margin: 14px 0 12px;
  font-size: clamp(28px, 3.4vw, 42px);
  letter-spacing: -0.03em;
}

.lp-section-head p {
  color: var(--muted);
  font-size: 18px;
}

[id] {
  scroll-margin-top: 92px;
}

/* Features */
.lp-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.lp-feature {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 14px 36px var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.lp-feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px var(--strong-shadow);
}

.lp-feature-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-bottom: 16px;
  border-radius: 14px;
  color: var(--primary);
  background: var(--primary-soft);
}

.lp-feature-icon svg {
  width: 24px;
  height: 24px;
}

.lp-feature h3 {
  margin: 0 0 8px;
  font-size: 19px;
}

.lp-feature p {
  color: var(--muted);
  line-height: 1.55;
}

/* Steps */
.lp-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: lp-step;
}

.lp-step {
  position: relative;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 14px 36px var(--shadow);
}

.lp-step-num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 900;
  font-size: 18px;
}

.lp-step h3 {
  margin: 0 0 8px;
  font-size: 19px;
}

.lp-step p {
  color: var(--muted);
  line-height: 1.55;
}

/* Pricing */
.lp-pricing {
  display: flex;
  justify-content: center;
}

.lp-price-card {
  position: relative;
  width: min(440px, 100%);
  padding: 34px 30px;
  border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--border));
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 30px 70px var(--strong-shadow);
  text-align: center;
}

.lp-price-tag {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lp-price-card h3 {
  margin: 6px 0 6px;
  font-size: 24px;
}

.lp-price-desc {
  margin: 0 auto 18px;
  max-width: 320px;
  color: var(--muted);
}

.lp-price-value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}

.lp-price-currency {
  font-size: 22px;
  font-weight: 800;
  color: var(--muted);
}

.lp-price-number {
  font-size: 54px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.lp-price-cycle {
  color: var(--muted);
  font-weight: 700;
}

.lp-price-trial {
  display: inline-block;
  margin: 12px 0 20px;
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 800;
  font-size: 13px;
}

.lp-price-list {
  display: grid;
  gap: 12px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  text-align: left;
}

.lp-price-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text);
}

.lp-price-list li::before {
  content: "";
  flex: 0 0 auto;
  margin-top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background:
    var(--primary-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f5f9f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}

.lp-price-note {
  display: block;
  margin-top: 12px;
  color: var(--muted);
}

/* FAQ */
.lp-faq-wrap {
  max-width: 820px;
}

.lp-faq {
  display: grid;
  gap: 12px;
}

.lp-faq-item {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  overflow: hidden;
}

.lp-faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.lp-faq-item summary::-webkit-details-marker {
  display: none;
}

.lp-faq-item summary::after {
  content: "+";
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 18px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.lp-faq-item[open] summary::after {
  transform: rotate(45deg);
}

.lp-faq-item p {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--muted);
  line-height: 1.6;
}

/* Final CTA */
.lp-final {
  padding: 30px 24px 80px;
}

.lp-final-inner {
  padding: 56px 32px;
  border-radius: 30px;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.18), transparent 40%),
    linear-gradient(135deg, var(--sidebar-start), var(--primary));
  box-shadow: 0 30px 70px var(--strong-shadow);
}

.lp-final-inner h2 {
  margin: 0 0 12px;
  font-size: clamp(26px, 3.2vw, 40px);
  letter-spacing: -0.03em;
}

.lp-final-inner p {
  max-width: 540px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.85);
  font-size: 18px;
}

.lp-final-inner .lp-hero-actions {
  justify-content: center;
}

.lp-ghost-light {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
}

.lp-ghost-light:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Footer */
.lp-footer {
  padding: 56px 0 28px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.lp-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
}

.lp-footer-brand p {
  margin: 14px 0 0;
  max-width: 280px;
  color: var(--muted);
  line-height: 1.55;
}

.lp-footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lp-footer-col h4 {
  margin: 0 0 4px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.lp-footer-col a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.lp-footer-col a:hover {
  color: var(--primary);
}

.lp-footer-bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

/* Responsive */
@media (max-width: 960px) {
  .lp-hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .lp-hero-visual {
    min-height: 380px;
  }

  .lp-features,
  .lp-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lp-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .lp-nav {
    position: fixed;
    inset: 72px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px 24px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    box-shadow: 0 20px 40px var(--strong-shadow);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .lp-menu-open .lp-nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .lp-menu-toggle {
    display: inline-flex;
  }

  .lp-header-actions .lp-ghost {
    display: none;
  }

  .lp-menu-open .lp-menu-toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .lp-menu-open .lp-menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  .lp-menu-open .lp-menu-toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .lp-section {
    padding: 60px 0;
  }

  .lp-features,
  .lp-steps,
  .lp-footer-grid {
    grid-template-columns: 1fr;
  }

  .lp-hero-actions .button-link,
  .lp-final-inner .button-link {
    width: 100%;
  }

  .lp-trust {
    flex-direction: column;
    align-items: flex-start;
  }

  .lp-float-1 {
    left: 0;
  }

  .lp-float-2 {
    right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lp-body {
    scroll-behavior: auto;
  }

  .lp-float-1,
  .lp-float-2,
  .lp-typing span {
    animation: none;
  }
}
