/* Preciador GE · City Club — estilos (móvil primero)
   Paleta: rojo City Club, negro/grafito y dorado (Black), fondo neutro claro. */

:root {
  --bg: #f4f2f1;
  --card: #ffffff;
  --ink: #1b1b1d;
  --ink-soft: #66615f;
  --red: #b3261e;
  --red-dark: #7d1711;
  --red-soft: #fbe9e7;
  --black: #17171a;
  --gold: #c9a227;
  --gold-soft: #fbf4dc;
  --border: #e6e1df;
  --danger: #b3261e;
  --radius: 18px;
  --shadow: 0 8px 24px rgba(40, 20, 18, 0.09);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); min-height: 100vh; }
.screen { min-height: 100vh; }

/* ---------- Marca ---------- */
.wordmark { display: inline-flex; font-weight: 900; letter-spacing: .04em; font-size: 26px; line-height: 1; transform: skewX(-6deg); }
.wm-box { background: var(--red); color: #fff; padding: 6px 9px; }
.wm-dark { background: var(--black); }
.wordmark.small { font-size: 15px; }
.wordmark.small .wm-box { padding: 4px 6px; }

/* ---------- Login ---------- */
.login-screen {
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(circle at 50% -10%, var(--red-soft), var(--bg) 55%);
}
.login-card { width: 100%; max-width: 380px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 36px 28px; text-align: center; }
.login-logo { height: 84px; width: auto; display: block; margin: 0 auto 14px; }
.login-card h1 { font-size: 21px; line-height: 1.25; margin: 0 0 24px; }
#loginForm { text-align: left; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
input[type=text], input[type=password] {
  width: 100%; padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--border); font-size: 16px;
  outline: none; background: #fff; color: var(--ink); transition: border-color .15s;
}
input:focus { border-color: var(--red); }
#loginForm input { margin-bottom: 16px; }
.btn-primary { width: 100%; padding: 14px 16px; border: none; border-radius: 12px; background: var(--red); color: #fff; font-size: 16px; font-weight: 700; cursor: pointer; }
.btn-primary:hover { background: var(--red-dark); }
.btn-secondary { width: 100%; padding: 13px 16px; border: 1.5px solid var(--red); border-radius: 12px; background: #fff; color: var(--red-dark); font-size: 15px; font-weight: 700; cursor: pointer; margin-top: 16px; }
.error-msg { color: var(--danger); font-size: 13px; margin: -6px 0 6px; }

/* ---------- Barra superior ---------- */
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--card); border-bottom: 3px solid var(--red); }
.topbar-title { display: flex; align-items: center; gap: 10px; }
.topbar-title h2 { margin: 0; font-size: 16px; }
.topbar-logo { height: 44px; width: auto; display: block; }
.topbar-sub { font-size: 10px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; }
.topbar-actions { display: flex; gap: 6px; }
.icon-btn { width: 36px; height: 36px; border-radius: 11px; border: 1px solid var(--border); background: #fff; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--ink-soft); }
.icon-btn:hover { background: var(--red-soft); color: var(--red-dark); }

/* ---------- Estructura ---------- */
.content { max-width: 520px; margin: 0 auto; padding: 18px 16px 60px; display: flex; flex-direction: column; gap: 14px; }
#homeView, #quoteView { display: flex; flex-direction: column; gap: 14px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.section-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); margin: 0 0 -4px; }
.card .section-label { margin: 0 0 10px; }
.helper { font-size: 12px; color: var(--ink-soft); line-height: 1.45; margin: 8px 0 0; }

/* ---------- Búsqueda ---------- */
.search-results { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.result-item { text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: #fcfbfa; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px; font: inherit; color: inherit; }
.result-item:hover, .result-item:active { border-color: var(--red); background: var(--red-soft); }
.result-item .name { font-weight: 600; font-size: 14px; }
.result-item .cat { font-size: 11px; color: var(--ink-soft); text-align: right; flex-shrink: 0; max-width: 45%; }
.empty-msg { margin: 10px 0 0; font-size: 13px; color: var(--ink-soft); line-height: 1.4; }

/* ---------- Tarjetas de categoría ---------- */
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cat-card {
  position: relative; overflow: hidden; isolation: isolate; text-align: left; font: inherit; cursor: pointer; border: 0;
  border-radius: 18px; padding: 12px 12px 12px 14px; min-height: 108px; display: flex; flex-direction: column;
  justify-content: flex-end; gap: 1px; color: #fff; transition: transform .12s;
  box-shadow: 0 10px 22px rgba(60, 20, 16, .22), inset 0 1px 0 rgba(255, 255, 255, .26), inset 0 -1px 0 rgba(0, 0, 0, .14);
}
.cat-card.wide { grid-column: 1 / -1; min-height: 96px; }
.cat-card:active { transform: scale(.97); }
.cat-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(circle at 18% 8%, rgba(255, 255, 255, .24), transparent 46%),
              radial-gradient(rgba(255, 255, 255, .15) 1.1px, transparent 1.3px) 0 0 / 11px 11px;
}
.cat-card::after { content: ""; position: absolute; width: 130px; height: 130px; border-radius: 50%; right: -46px; bottom: -58px; z-index: -1; background: rgba(255, 255, 255, .08); }
.tone-0 { background: linear-gradient(135deg, #7d1711 0%, #b3261e 58%, #d6453a 100%); }
.tone-1 { background: linear-gradient(135deg, #121214 0%, #2b2b30 55%, #4a4a52 100%); }
.tone-2 { background: linear-gradient(135deg, #5e1410 0%, #a31f17 52%, #3a3a40 100%); }
.tone-3 { background: linear-gradient(135deg, #1b1b1f 0%, #8a1d17 60%, #c9342a 100%); }
.cat-mark { position: absolute; z-index: -1; width: 100px; height: 100px; left: -16px; top: -18px; color: #fff; opacity: .14; transform: rotate(-14deg); }
.cat-ico { position: absolute; top: 10px; right: 10px; width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .2); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .35), 0 3px 8px rgba(0, 0, 0, .18); display: flex; align-items: center; justify-content: center; }
.cat-ico svg { width: 27px; height: 27px; }
.cat-name { font-size: 15px; font-weight: 800; line-height: 1.15; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); padding-right: 6px; }
.cat-sub { font-size: 11px; opacity: .9; font-weight: 600; letter-spacing: .02em; }

/* ---------- Cotización ---------- */
.cat-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #fff; border-radius: var(--radius);
  padding: 20px 16px 20px 20px; box-shadow: var(--shadow); position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(135deg, var(--red-dark), var(--red) 70%, #d6453a);
}
.cat-header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 12% 0%, rgba(255,255,255,.22), transparent 50%), radial-gradient(rgba(255,255,255,.13) 1.1px, transparent 1.3px) 0 0 / 11px 11px; }
.cat-header.black { background: linear-gradient(135deg, #0c0c0e, #26262b 70%, #3b3b42); box-shadow: var(--shadow), inset 0 0 0 1.5px var(--gold); }
.ch-text { min-width: 0; }
.ch-logo { flex: 0 0 auto; background: #fff; border-radius: 14px; padding: 8px 10px; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.ch-logo img { display: block; height: 52px; width: auto; }
.ch-shields { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.ch-shield { background: rgba(255,255,255,.18); border: 2px solid #fff; border-radius: 10px 10px 18px 18px; font-weight: 800; font-size: 14px; padding: 3px 10px 6px; }
.cat-header.black .ch-shield { border-color: var(--gold); }
.cat-header h2 { margin: 0; font-size: 21px; line-height: 1.15; }
.cat-header p { margin: 6px 0 0; font-size: 14px; opacity: .92; }
.breadcrumb { font-size: 13px; color: var(--ink-soft); }
.breadcrumb a { color: var(--red-dark); font-weight: 600; text-decoration: none; }
.crumb-sep { margin: 0 6px; }
.selected-row { margin-bottom: 16px; }
.chip-cat { display: inline-block; background: var(--red-soft); color: var(--red-dark); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; }
.selected-name { margin: 6px 0 0; font-size: 17px; font-weight: 700; }
.price-field { display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: 12px; padding: 0 8px 0 16px; gap: 8px; }
.price-field:focus-within { border-color: var(--red); }
.price-prefix { font-size: 22px; font-weight: 700; color: var(--ink-soft); }
.price-field input[type=text] { border: 0; padding: 14px 0; border-radius: 0; font-size: 24px; font-weight: 700; flex: 1; min-width: 0; }
.price-clear { border: 0; background: var(--bg); border-radius: 50%; width: 32px; height: 32px; cursor: pointer; color: var(--ink-soft); }
.msg-card { border-left: 5px solid var(--danger); font-size: 14px; line-height: 1.5; }
.msg-card p { margin: 0 0 6px; }
.msg-card p:last-child { margin: 0; }

/* Selector de programa */
.prog-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--bg); padding: 5px; border-radius: 14px; margin-bottom: 12px; }
.prog-btn { display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: transparent; border-radius: 10px; padding: 11px 8px; font: inherit; font-size: 14px; font-weight: 700; color: var(--ink-soft); cursor: pointer; }
.prog-btn[aria-checked=true] { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.prog-btn[disabled] { opacity: .45; cursor: not-allowed; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-red { background: var(--red); }
.dot-black { background: var(--black); box-shadow: 0 0 0 2px var(--gold); }

/* Opciones */
.res-options { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.res-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; color: inherit; background: #fff; border: 1.5px solid var(--border); border-radius: 14px; padding: 10px 12px; cursor: pointer; }
.res-shield { flex: 0 0 auto; min-width: 46px; text-align: center; background: var(--red); color: #fff; font-weight: 800; font-size: 18px; padding: 6px 10px 9px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--red); border-radius: 10px 10px 20px 20px; }
.black .res-shield { background: var(--black); box-shadow: 0 0 0 1px var(--gold); }
.res-txt { flex: 1; font-size: 13px; font-weight: 600; color: var(--ink-soft); line-height: 1.25; }
.res-price { flex: 0 0 auto; font-size: 17px; font-weight: 800; }
.res-row.selected { background: var(--red-soft); border-color: var(--red); border-width: 3px; padding: 9px 11px; box-shadow: 0 0 0 3px rgba(179, 38, 30, .2); }
.black .res-row.selected { background: var(--gold-soft); border-color: var(--black); box-shadow: 0 0 0 3px rgba(201, 162, 39, .35); }
.res-row.selected .res-txt, .res-row.selected .res-price { color: var(--red-dark); }
.black .res-row.selected .res-txt, .black .res-row.selected .res-price { color: var(--black); }
.res-row.selected .res-txt { font-weight: 800; }
.res-row.selected .res-shield::after { content: " \2713"; font-size: 14px; }

/* Recomendación (tarjeta tocable para subir de plazo) */
.nudge { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 10px; padding: 14px 16px; border-radius: 14px; border: 1.5px solid #e9c46a; background: linear-gradient(135deg, #fffaea 0%, #fbefc8 100%); cursor: pointer; }
.nudge-tag { align-self: flex-start; background: var(--gold); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; }
.nudge-monto { font-size: 20px; font-weight: 800; color: #6e5400; line-height: 1.15; }
.nudge-det { font-size: 13px; color: var(--ink-soft); line-height: 1.35; }
.nudge-cta { font-size: 13px; font-weight: 700; color: var(--red-dark); margin-top: 2px; }

.result-total { display: flex; justify-content: space-between; align-items: center; font-size: 18px; font-weight: 800; border-top: 1px solid var(--border); margin-top: 14px; padding-top: 14px; color: var(--red-dark); }
.result-total strong { font-size: 28px; }
.plan-line { margin: 4px 0 0; font-size: 12px; color: var(--ink-soft); }

/* ---------- Información ---------- */
.info-wrap { display: flex; flex-direction: column; gap: 10px; }
.info-card { background: var(--red); color: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; background-image: radial-gradient(rgba(255, 255, 255, .13) 1.1px, transparent 1.3px); background-size: 11px 11px; }
.info-card.black { background-color: var(--black); border: 1.5px solid var(--gold); }
.info-title { margin: 0; font-size: 18px; font-weight: 800; }
.info-lema { margin: 2px 0 12px; font-size: 13px; font-style: italic; opacity: .95; }
.info-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.info-list li { font-size: 14px; font-weight: 600; padding-left: 22px; position: relative; line-height: 1.35; }
.info-list li::before { content: "\2713"; position: absolute; left: 0; font-weight: 800; }
.fold { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 4px 16px; }
.fold summary { cursor: pointer; font-weight: 700; font-size: 14px; padding: 12px 0; color: var(--ink); }
.fold > div, .fold > ul, .fold > p { padding-bottom: 12px; margin: 0; }
.fold dl { margin: 0; display: grid; gap: 10px; padding-bottom: 12px; }
.fold dt { font-weight: 800; font-size: 13px; color: var(--red-dark); }
.fold dd { margin: 2px 0 0; font-size: 13px; color: var(--ink-soft); line-height: 1.45; }
.fold ul { margin: 0; padding: 0 0 12px 18px; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 12px; }
.tag { background: var(--bg); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 600; }
.tag.r { background: var(--red-soft); color: var(--red-dark); }
.tag.p { background: #ecebea; color: var(--black); }
.legend { font-size: 11px; color: var(--ink-soft); padding-bottom: 8px; }
.disclaimer { font-size: 11px; color: var(--ink-soft); text-align: center; line-height: 1.5; margin-top: 6px; }

/* ---------- Modales ---------- */
.modal { position: fixed; inset: 0; background: rgba(15, 8, 8, .55); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 20; }
.modal-card { background: #fff; border-radius: var(--radius); padding: 28px 18px 20px; max-width: 420px; width: 100%; text-align: center; position: relative; box-shadow: var(--shadow); }
.modal-card h3 { margin: 4px 40px 10px; font-size: 18px; }
.modal-card p { font-size: 13px; color: var(--ink-soft); margin: 0 0 14px; }
.modal-close { position: absolute; top: 12px; right: 12px; }
.qr-holder { display: flex; justify-content: center; margin-bottom: 10px; }
.qr-url { font-size: 11px; word-break: break-all; color: var(--ink-soft); }
.guide-card { max-height: 86vh; display: flex; flex-direction: column; text-align: left; }
.guide-card h3 { text-align: center; }
.guide-body { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 2px; }
.guide-body .fold { box-shadow: none; border: 1px solid var(--border); }
.steps { counter-reset: s; list-style: none; padding: 0 0 12px; margin: 0; display: grid; gap: 8px; }
.steps li { counter-increment: s; position: relative; padding-left: 34px; font-size: 13px; color: var(--ink-soft); line-height: 1.4; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.steps b { color: var(--ink); }
.tbl { width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 10px; }
.tbl th, .tbl td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--border); }
.tbl th { color: var(--red-dark); }
.phone { font-weight: 800; color: var(--red-dark); }

/* Pie informativo con logo del programa */
.info-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.info-logo { background: #fff; border-radius: 12px; padding: 6px 8px; flex: 0 0 auto; }
.info-logo img { display: block; height: 40px; width: auto; }
