:root {
  --brand: #0f6b5c;
  --brand-dark: #0a4e43;
  --brand-soft: #e6f3f0;
  --accent: #f2a93b;
  --ink: #18212c;
  --muted: #5d6877;
  --line: #dde3ea;
  --bg: #f7f9fb;
  --card: #ffffff;
  --danger: #c0392b;
  --ok: #1e8e5a;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.5; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* Barra superior */
.nav { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.nav .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.logo { font-weight: 800; font-size: 24px; letter-spacing: 3px; color: var(--brand); text-decoration: none; }
.nav .links { display: flex; gap: 18px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav .links a { text-decoration: none; color: var(--ink); font-weight: 500; font-size: 15px; }
.nav .links a.active { color: var(--brand); }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 18px; }
@media (max-width: 760px) {
  .menu-btn { display: block; }
  .nav .links { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--card); flex-direction: column; align-items: stretch; padding: 12px 16px; border-bottom: 1px solid var(--line); gap: 12px; }
  .nav .links.open { display: flex; }
}

/* Botones */
.btn { display: inline-block; border: 0; border-radius: 10px; padding: 11px 18px; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; text-align: center; font-family: inherit; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-accent { background: var(--accent); color: #2b1d05; }
.btn-ghost { background: transparent; border: 1.5px solid var(--brand); color: var(--brand); }
.btn-sm { padding: 7px 12px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Portada */
.hero { background: linear-gradient(135deg, var(--brand) 0%, #13846f 100%); color: #fff; padding: 64px 0 72px; }
.hero h1 { font-size: clamp(30px, 5vw, 48px); max-width: 720px; }
.hero p { font-size: 18px; max-width: 620px; opacity: .92; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero .btn-ghost { border-color: #fff; color: #fff; }

section.block { padding: 56px 0; }
.section-title { text-align: center; margin-bottom: 32px; }
.section-title p { color: var(--muted); }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { font-size: 19px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding-left: 40px; margin: 14px 0; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 700; display: grid; place-items: center; }

.badge { display: inline-block; background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; }
.badge-accent { background: #fdf0d9; color: #8a5a0b; }
.badge-gray { background: #eef1f4; color: var(--muted); }

/* Planes */
.plan { display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--brand); }
.plan .price { font-size: 34px; font-weight: 800; margin: 6px 0 12px; }
.plan .price small { font-size: 15px; color: var(--muted); font-weight: 500; }
.plan ul { padding-left: 18px; margin: 0 0 18px; flex: 1; }
.plan li { margin: 6px 0; }
.tabs { display: inline-flex; background: #eef1f4; border-radius: 10px; padding: 4px; margin-bottom: 24px; }
.tabs button { border: 0; background: none; padding: 8px 16px; border-radius: 8px; font-weight: 600; cursor: pointer; font-family: inherit; font-size: 15px; color: var(--muted); }
.tabs button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* Formularios */
.page { padding: 36px 0 64px; }
.page-head { margin-bottom: 24px; }
.page-head p { color: var(--muted); margin: 0; }
form .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: 14px; }
.field .hint { font-size: 13px; color: var(--muted); }
input, select, textarea { font: inherit; padding: 10px 12px; border: 1px solid #c7cfd9; border-radius: 9px; background: #fff; width: 100%; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.checks label { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; font-size: 15px; }
.checks input { width: auto; }

/* Resultados */
.result { display: grid; grid-template-columns: 56px 1fr auto; gap: 16px; align-items: center; }
.result + .result { margin-top: 12px; }
.score { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 18px; color: #fff; background: var(--brand); }
.result.best { border: 2px solid var(--brand); }
.result .meta { color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; }
.result .total { text-align: right; }
.result .total b { font-size: 22px; display: block; }
.bars { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px 14px; margin-top: 10px; }
.bar { font-size: 12px; color: var(--muted); }
.bar i { display: block; height: 6px; background: #eef1f4; border-radius: 3px; margin-top: 3px; overflow: hidden; }
.bar i span { display: block; height: 100%; background: var(--brand); }
@media (max-width: 600px) {
  .result { grid-template-columns: 48px 1fr; }
  .result .total { grid-column: 1 / -1; text-align: left; }
  .score { width: 48px; height: 48px; font-size: 16px; }
}

/* Tablas */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--card); }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { background: #f1f4f7; font-weight: 600; }
td.num, th.num { text-align: right; }
tr.up td { background: #eaf7ef; }
tr.down td { background: #fdf3e6; }
tr.new td { background: #e9f1fd; }

/* Asistente de registro */
.wizard-steps { display: flex; gap: 6px; margin-bottom: 22px; flex-wrap: wrap; }
.wizard-steps span { flex: 1; min-width: 90px; font-size: 13px; font-weight: 600; color: var(--muted); border-top: 4px solid var(--line); padding-top: 6px; }
.wizard-steps span.on { color: var(--brand); border-color: var(--brand); }
.wizard-steps span.done { color: var(--ink); border-color: #8ccfc1; }
.actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; flex-wrap: wrap; }

.drop { border: 2px dashed #b8c4d0; border-radius: var(--radius); padding: 28px; text-align: center; background: #fbfcfd; cursor: pointer; }
.drop.over { border-color: var(--brand); background: var(--brand-soft); }
.option-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 18px; }
.option-cards label { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 16px; cursor: pointer; display: block; background: #fff; }
.option-cards input { width: auto; margin-right: 6px; }
.option-cards label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }

.notice { padding: 12px 14px; border-radius: 10px; font-size: 14px; margin: 12px 0; }
.notice-info { background: #eaf2fb; color: #1d4f80; }
.notice-ok { background: #e7f6ee; color: #145c3b; }
.notice-warn { background: #fff4e0; color: #7a4d06; }
.notice-err { background: #fdecea; color: #8e2a20; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-size: 24px; }
.stat span { color: var(--muted); font-size: 13px; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar input { flex: 1; min-width: 200px; }
.toolbar select { width: auto; }

/* Ventana de contacto */
.modal-bg { position: fixed; inset: 0; background: rgba(14, 26, 36, .55); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { background: var(--card); border-radius: 16px; width: 100%; max-width: 560px; max-height: 92vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.modal-head .x { background: none; border: 0; font-size: 22px; cursor: pointer; color: var(--muted); line-height: 1; }
.modal-body { padding: 16px 20px; overflow-y: auto; flex: 1; background: #f4f7f9; }
.modal-foot { padding: 12px 20px; border-top: 1px solid var(--line); background: var(--card); }
.msg-row { display: flex; margin: 8px 0; }
.msg-row.yo { justify-content: flex-end; }
.burbuja { max-width: 82%; padding: 10px 13px; border-radius: 14px; font-size: 14.5px; background: #fff; border: 1px solid var(--line); white-space: pre-line; }
.yo .burbuja { background: var(--brand); color: #fff; border-color: var(--brand); }
.burbuja small { display: block; opacity: .65; font-size: 11px; margin-top: 4px; }
.cotizacion { background: #fff; border: 2px solid var(--brand); border-radius: 12px; padding: 12px 14px; margin: 8px 0; font-size: 14px; }
.cotizacion table { background: none; }
.cotizacion td { padding: 4px 0; border: 0; white-space: normal; }
.typing { color: var(--muted); font-size: 13px; font-style: italic; margin: 6px 2px; }
.demo-tag { font-size: 11px; font-weight: 700; color: #8a5a0b; background: #fdf0d9; padding: 2px 8px; border-radius: 99px; }

footer { background: #0e1a24; color: #b8c3cf; padding: 32px 0; font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a { color: #fff; }
.empty { text-align: center; color: var(--muted); padding: 32px; }
