:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --text: #0d1b2f;
  --muted: #667085;
  --line: #dde7f5;
  --primary: #1167e8;
  --primary-2: #0a4bb8;
  --navy: #061b3a;
  --success: #19a463;
  --danger: #d92d20;
  --warning: #f59e0b;
  --shadow: 0 22px 55px rgba(10, 35, 75, 0.09);
  --radius: 24px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(17, 103, 232, 0.12), transparent 26rem),
    radial-gradient(circle at 90% 10%, rgba(6, 27, 58, 0.10), transparent 24rem),
    var(--bg);
}

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

a { color: inherit; }

.app-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(20px, 6vw, 84px);
  border-bottom: 1px solid rgba(221, 231, 245, 0.8);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand img {
  width: 74px;
  height: 74px;
  object-fit: contain;
  border-radius: 18px;
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 12px 25px rgba(13, 27, 47, 0.06);
}

.brand strong {
  display: block;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.brand small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
  font-size: 0.82rem;
}

nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

nav a {
  text-decoration: none;
  font-weight: 750;
  color: #1d2b44;
  font-size: 0.94rem;
}

.nav-cta {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--navy);
  color: white !important;
}

.mobile-menu {
  display: none;
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  padding: 9px 12px;
  cursor: pointer;
}

main {
  width: min(1220px, 92vw);
  margin: 0 auto;
}

.hero-section {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 34px;
  align-items: center;
  padding: 72px 0 34px;
}

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

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

h1 {
  font-size: clamp(2.8rem, 7vw, 6rem);
  letter-spacing: -0.07em;
  line-height: 0.92;
  margin-bottom: 24px;
}

h2 {
  font-size: clamp(1.8rem, 3vw, 3rem);
  letter-spacing: -0.045em;
  line-height: 1.02;
  margin-bottom: 12px;
}

h3 {
  letter-spacing: -0.03em;
}

.hero-lead {
  color: var(--muted);
  max-width: 720px;
  font-size: 1.12rem;
  line-height: 1.7;
}

.hero-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}

.btn {
  border: 0;
  border-radius: 14px;
  padding: 13px 18px;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 14px 30px rgba(17, 103, 232, 0.24);
}

.btn-ghost {
  background: white;
  border: 1px solid var(--line);
  color: var(--navy);
}

.btn-whatsapp {
  color: white;
  background: #16a85f;
}

.btn-voice {
  color: white;
  background: linear-gradient(135deg, #0d1b2f, #1f3b65);
}

.btn-small {
  padding: 9px 12px;
  min-height: 38px;
  font-size: 0.88rem;
}

.trust-row {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.trust-row span {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.72);
  color: #1d2b44;
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 800;
}

.hero-dashboard {
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  border: 1px solid var(--line);
  border-radius: 32px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.dashboard-top {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 850;
  margin-bottom: 18px;
}

.status-dot {
  width: 11px;
  height: 11px;
  background: var(--success);
  border-radius: 999px;
  box-shadow: 0 0 0 6px rgba(25, 164, 99, 0.12);
}

.mini-card {
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 16px;
}

.mini-card.dark {
  background: linear-gradient(135deg, var(--navy), #0d438c);
  color: white;
}

.mini-card span {
  display: block;
  opacity: 0.78;
  font-weight: 800;
}

.mini-card strong {
  display: block;
  font-size: 2.9rem;
  letter-spacing: -0.06em;
  margin-top: 12px;
}

.mini-card small {
  opacity: 0.75;
}

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

.mini-grid div,
.dashboard-stats div {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: white;
}

.mini-grid strong,
.dashboard-stats strong {
  display: block;
  font-size: 1.4rem;
}

.mini-grid span,
.dashboard-stats span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.ai-bubble {
  margin-top: 16px;
  background: #edf5ff;
  border: 1px solid #cfe3ff;
  border-radius: 18px;
  padding: 16px;
  line-height: 1.55;
  color: #133a72;
}

.feature-strip,
.section-card {
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  margin: 22px 0;
}

.feature-strip article {
  padding: 24px;
  background: white;
}

.feature-strip strong {
  display: block;
  margin-bottom: 8px;
}

.feature-strip p {
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 0;
}

.section-card {
  padding: clamp(22px, 4vw, 38px);
  margin: 28px 0;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 24px;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.65;
}

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

.plan {
  position: relative;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  justify-content: space-between;
}

.plan.featured {
  background: white;
  border: 2px solid var(--primary);
  box-shadow: 0 20px 45px rgba(17, 103, 232, 0.13);
  transform: translateY(-7px);
}

.tag {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--primary);
  color: white;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
}

.plan-name {
  margin: 0;
  color: var(--primary);
  text-transform: uppercase;
  font-weight: 950;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
}

.plan h3 {
  font-size: 2.35rem;
  margin: 0 0 8px;
}

.plan h3 span {
  color: var(--muted);
  font-size: 1rem;
}

.plan p {
  color: var(--muted);
  line-height: 1.55;
}

.plan ul {
  margin: 0;
  padding-left: 20px;
  line-height: 1.85;
}

.gradient-card {
  background: linear-gradient(135deg, #ffffff, #f0f7ff);
}

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

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

label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #20314f;
  font-size: 0.9rem;
  font-weight: 850;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  color: var(--text);
  padding: 13px 14px;
  outline: none;
  transition: border 0.18s ease, box-shadow 0.18s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(17, 103, 232, 0.5);
  box-shadow: 0 0 0 4px rgba(17, 103, 232, 0.10);
}

textarea {
  resize: vertical;
}

.workspace {
  display: grid;
  grid-template-columns: 270px 1fr 310px;
  gap: 18px;
  align-items: start;
}

.side-panel,
.quote-panel,
.chat-panel,
.login-card,
.dashboard-card,
.payment-card {
  border: 1px solid var(--line);
  background: white;
  border-radius: 24px;
  padding: 20px;
}

.side-panel h3,
.chat-panel h3,
.login-card h3,
.dashboard-card h3,
.payment-card h3 {
  margin-bottom: 8px;
}

.side-panel p,
.payment-card p,
.login-card p {
  color: var(--muted);
  line-height: 1.55;
}

.service-list {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.service-item {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  border-radius: 16px;
  padding: 12px;
}

.service-item strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 5px;
}

.service-item span {
  color: var(--primary);
  font-weight: 900;
  font-size: 0.88rem;
}

.service-item small {
  display: block;
  color: var(--muted);
  margin-top: 6px;
}

.db-editor {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.db-editor summary {
  cursor: pointer;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 14px;
}

.db-editor label {
  margin-bottom: 10px;
}

.quote-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 18px;
}

.tab {
  border: 1px solid var(--line);
  background: #f8fbff;
  border-radius: 999px;
  padding: 9px 13px;
  font-weight: 900;
  cursor: pointer;
}

.tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.split-actions {
  justify-content: space-between;
}

.info-note {
  border: 1px solid #cfe3ff;
  background: #edf5ff;
  color: #133a72;
  border-radius: 14px;
  padding: 12px;
  margin: 12px 0;
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

.quote-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  margin: 18px 0 10px;
}

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

.quote-table th,
.quote-table td {
  border-bottom: 1px solid var(--line);
  padding: 11px;
  text-align: left;
}

.quote-table th {
  background: #f8fbff;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.quote-table td input {
  padding: 9px;
  border-radius: 10px;
  min-width: 75px;
}

.quote-table .desc-input {
  min-width: 230px;
}

.remove-row {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #ffd1d1;
  color: var(--danger);
  background: #fff1f1;
  font-weight: 950;
  cursor: pointer;
}

.totals-card {
  margin-left: auto;
  margin-top: 18px;
  margin-bottom: 18px;
  width: min(390px, 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.totals-card div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.totals-card div:last-child {
  border-bottom: 0;
}

.totals-card .grand {
  background: linear-gradient(135deg, #eef6ff, #ffffff);
  color: var(--primary);
  font-size: 1.2rem;
}

.chat-panel {
  display: flex;
  flex-direction: column;
  min-height: 590px;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.chat-header span {
  background: #eef6ff;
  color: var(--primary);
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 0.76rem;
  font-weight: 900;
}

.chat-messages {
  flex: 1;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 10px;
  padding-right: 4px;
}

.message {
  padding: 11px 12px;
  border-radius: 16px;
  line-height: 1.45;
  font-size: 0.92rem;
}

.message.bot {
  background: #edf5ff;
  color: #173b70;
  border: 1px solid #cfe3ff;
}

.message.user {
  background: var(--navy);
  color: white;
  margin-left: 26px;
}

.chat-input {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.chat-input input {
  flex: 1;
}

.chat-input button {
  border: 0;
  border-radius: 12px;
  background: var(--primary);
  color: white;
  font-weight: 900;
  padding: 0 12px;
  cursor: pointer;
}

.management-grid,
.payments-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 18px;
  align-items: start;
}

.dashboard-stats {
  margin-bottom: 18px;
}

.saved-quotes {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
}

.saved-quote {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: var(--surface-soft);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.saved-quote strong {
  display: block;
}

.saved-quote span {
  color: var(--muted);
  font-size: 0.85rem;
}

.payment-card {
  min-height: 330px;
}

.paypal-box {
  margin: 14px 0;
  min-height: 55px;
}

.technical-note {
  font-size: 0.84rem;
  color: var(--muted);
}

code {
  background: #eef4ff;
  border: 1px solid #d8e7ff;
  padding: 2px 5px;
  border-radius: 6px;
}

.site-footer {
  width: min(1220px, 92vw);
  margin: 40px auto 0;
  padding: 26px 0 40px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
}

.site-footer strong {
  color: var(--text);
}

.site-footer a {
  color: var(--primary);
  font-weight: 900;
  text-decoration: none;
}

.print-area {
  display: none;
}

@media (max-width: 1080px) {
  .hero-section,
  .workspace,
  .management-grid,
  .payments-grid {
    grid-template-columns: 1fr;
  }

  .plans,
  .feature-strip {
    grid-template-columns: 1fr;
  }

  .plan.featured {
    transform: none;
  }

  .chat-panel {
    min-height: 420px;
  }
}

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
  }

  .mobile-menu {
    display: inline-flex;
  }

  nav {
    display: none;
    position: absolute;
    left: 20px;
    right: 20px;
    top: 94px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 16px;
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
  }

  nav.open {
    display: flex;
  }

  .brand img {
    width: 62px;
    height: 62px;
  }

  .form-grid,
  .mini-grid,
  .dashboard-stats {
    grid-template-columns: 1fr;
  }

  .hero-section {
    padding-top: 38px;
  }

  h1 {
    font-size: 3.1rem;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media print {
  body > .app-shell {
    display: none !important;
  }

  body {
    background: white;
  }

  .print-area {
    display: block;
    padding: 22px;
    color: #111;
    font-size: 12px;
  }

  .print-header {
    display: flex;
    gap: 18px;
    align-items: center;
    border-bottom: 2px solid #111;
    padding-bottom: 14px;
    margin-bottom: 18px;
  }

  .print-header img {
    width: 95px;
    height: 95px;
    object-fit: contain;
  }

  .print-header h1 {
    font-size: 24px;
    margin: 0;
    letter-spacing: 0;
    line-height: 1.1;
  }

  .print-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 18px;
  }

  .print-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 14px;
  }

  .print-table th,
  .print-table td {
    border: 1px solid #111;
    padding: 7px;
    text-align: left;
  }

  .print-totals {
    margin: 14px 0 14px auto;
    width: 270px;
    text-align: right;
  }

  .print-grand {
    font-size: 16px;
  }
}
