/* Convite · base compartida (mobile-first) */
:root {
  --pri: #00657D;
  --t1: #E0F1F6;
  --t2: #F2F9FB;
  --lt: #DCEFF5;
  --yl: #FFE58A;
  --k1: #6AAEF0;
  --ink: #1F2A33;
  --txt: #3E4E5C;
  --bd: #7A8A94;
  --line: #ECEEF5;
  --coral: #E8473A;
  --ok: #1E7A57;
  --crema: #FFF6DB;
  --rosa: #FFE8E5;
  --lila: #EFE8FF;
  --serif: 'DM Serif Display', serif;
  --sans: 'Karla', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --sombra: 0 8px 30px rgba(0, 55, 75, 0.12);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #FFFFFF; color: var(--pri); font-family: var(--sans); font-size: 18px; }
body.no-scroll { overflow: hidden; }
a { color: #3A2E4F; }
a:hover { color: #3A2E4F; }
summary { cursor: pointer; }
img { max-width: 100%; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--k1); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
.serif { font-family: var(--serif); font-weight: 400; }
.muted { color: var(--txt); }
[hidden] { display: none !important; }

/* ---------- encabezado ---------- */
.cab { position: relative; z-index: 3; padding: 16px 24px 0; }
.nav { max-width: 1276px; margin: 0 auto; padding: 10px 12px 10px 24px; border-radius: 999px; background: #FFFFFF; box-shadow: var(--sombra); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.logo { display: flex; align-items: baseline; text-decoration: none; font-family: var(--serif); font-size: 38px; line-height: 1; color: var(--pri); }
.logo:hover { color: var(--pri); }
.logo-i { position: relative; display: inline-block; }
.logo-i svg { position: absolute; left: 50%; bottom: 76%; transform: translateX(-50%); }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; font-size: 17px; font-weight: 700; }
.nav-links a { text-decoration: none; }
.nav-links a:not(.nav-cta):not(.keep) { display: none; }
.nav-cta { min-height: 48px; display: inline-flex; align-items: center; padding: 0 22px; border-radius: 999px; background: var(--pri); color: #FFFFFF; }
.nav-cta:hover { color: #FFFFFF; }

/* ---------- pie ---------- */
.pie { background: var(--pri); color: var(--lt); }
.pie-in { max-width: 1288px; margin: 0 auto; padding: 56px 24px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; font-size: 16px; font-weight: 700; }
.pie-logo { font-family: var(--serif); font-size: 40px; font-weight: 400; color: #FFFFFF; }
.pie-links { display: flex; flex-wrap: wrap; gap: 24px; }
.pie-links a { color: var(--lt); text-decoration: none; }

/* ---------- botones ---------- */
.btn { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 28px; border: 2px solid var(--pri); border-radius: 999px; background: var(--pri); color: #FFFFFF; font: inherit; font-weight: 800; font-size: 17px; text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.btn:hover { color: #FFFFFF; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 55, 75, 0.18); }
.btn.ghost { background: transparent; color: var(--pri); }
.btn.sun { background: var(--yl); border-color: var(--yl); color: var(--pri); }
.btn.coral { background: var(--coral); border-color: var(--coral); }
.btn.sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.link { background: none; border: 0; padding: 0; font: inherit; font-weight: 800; color: #3A2E4F; text-decoration: underline; cursor: pointer; }

/* ---------- formularios ---------- */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 800; min-width: 0; }
.field input, .field select, .field textarea, .chat-form input { width: 100%; min-height: 52px; border-radius: 26px; border: 2px solid var(--bd); padding: 0 18px; font: inherit; font-size: 17px; font-weight: 500; color: var(--pri); background: #FFFFFF; }
.field textarea { padding: 14px 18px; min-height: 110px; resize: vertical; }
.field input[type="file"] { padding: 12px 18px; }
.field small, .hint { font-size: 14px; font-weight: 500; color: var(--txt); }
.grid2 { display: grid; gap: 14px; }
.form { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; font-weight: 500; color: var(--txt); }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--pri); }

/* ---------- etiquetas ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 14px; font-weight: 800; white-space: nowrap; background: var(--line); color: var(--txt); }
.pill.gris { background: #E7EAEE; color: #4A5863; }
.pill.ambar { background: var(--crema); color: #7A5200; }
.pill.azul { background: var(--t1); color: var(--pri); }
.pill.verde { background: #DDF3E8; color: var(--ok); }
.pill.rojo { background: var(--rosa); color: #A3203A; }
.pill.lila { background: var(--lila); color: #6B3FC4; }
.stars { color: #E8A200; letter-spacing: 1px; }
.stars i { font-style: normal; color: #D5DBE0; }
.glyph { flex: none; }

/* ---------- barra de confeti ---------- */
.confeti-bar { display: flex; gap: 5px; align-items: center; height: 22px; }
.confeti-bar i { flex: 1 1 0; height: 10px; border-radius: 3px; border: 1.5px solid var(--bd); }
.confeti-bar i.on { border: 0; }
.confeti-bar.dark i:not(.on) { border-color: var(--lt); }

/* ---------- portada de proveedor ---------- */
.cover { position: relative; overflow: hidden; aspect-ratio: 4 / 3; border-radius: 18px; background: var(--t1); }
.cover img, .cover video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover.gen i { position: absolute; }
.cover.gen .glyph { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }

/* ---------- ventana modal y avisos ---------- */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(0, 40, 55, 0.55); display: flex; align-items: flex-end; justify-content: center; overflow-y: auto; }
.modal-box { position: relative; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: #FFFFFF; border-radius: 26px 26px 0 0; padding: 28px 22px; display: flex; flex-direction: column; gap: 16px; }
.modal-box.wide { max-width: 780px; }
.modal-box h2 { font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.05; padding-right: 40px; }
.modal-x { position: absolute; right: 14px; top: 14px; width: 44px; height: 44px; border: 0; border-radius: 999px; background: var(--t1); color: var(--pri); font-size: 26px; line-height: 1; cursor: pointer; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, 140%); max-width: calc(100% - 32px); padding: 14px 22px; border-radius: 999px; background: var(--ink); color: #FFFFFF; font-size: 16px; font-weight: 700; transition: transform .25s; }
.toast.on { transform: translate(-50%, 0); }
.toast.bad { background: #A3203A; }

/* ---------- calendario ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 18px; }
.cal-head button { width: 44px; height: 44px; border: 0; border-radius: 999px; background: var(--t1); color: var(--pri); font-size: 24px; cursor: pointer; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font-size: 13px; font-weight: 800; color: var(--txt); padding: 4px 0; }
.cal-day { position: relative; aspect-ratio: 1; min-height: 38px; border: 0; border-radius: 12px; background: var(--t2); color: var(--ink); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.cal-day sup { position: absolute; right: 4px; top: 3px; font-size: 10px; }
.cal-day.hoy { box-shadow: inset 0 0 0 2px var(--pri); }
.cal-day.evento { background: var(--pri); color: #FFFFFF; }
.cal-day.tentativo { background: #C9D0D6; color: var(--ink); }
.cal-day.bloqueado { background: repeating-linear-gradient(45deg, #E7EAEE 0 6px, #FFFFFF 6px 12px); color: var(--bd); }
.cal-day.pago { background: var(--yl); }
.cal-day.pasado { background: #DDF3E8; color: var(--ok); }
.cal-key { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; font-size: 14px; font-weight: 700; color: var(--txt); }
.cal-key span { display: inline-flex; align-items: center; gap: 6px; }
.cal-key i { width: 16px; height: 16px; border-radius: 5px; }

/* ---------- ticket ---------- */
.ticket { border: 2px dashed var(--bd); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 8px; font-size: 16px; color: var(--ink); }
.tk-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 800; }
.tk-top .logo { font-size: 30px; }
.tk-folio { font-size: 14px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--txt); }
.tk-row { display: flex; justify-content: space-between; gap: 14px; }
.tk-row span:first-child { color: var(--txt); }
.tk-row span:last-child { font-weight: 700; text-align: right; }
.tk-row.strong { font-size: 20px; font-weight: 800; color: var(--pri); }
.tk-row.strong span { color: var(--pri); }
.ticket hr { width: 100%; border: 0; border-top: 1px solid var(--line); }
.tk-note { font-size: 13px; color: var(--txt); }

/* En teléfonos, el encabezado de las páginas internas se compacta para caber en una línea. */
@media (max-width: 480px) {
  #cab .nav { padding: 8px 8px 8px 16px; gap: 8px; flex-wrap: nowrap; }
  #cab .logo { font-size: 30px; }
  #cab .logo-i svg { width: 19px; height: 13px; }
  #cab .nav-links { gap: 12px; font-size: 15px; flex-wrap: nowrap; }
  #cab .nav-cta { min-height: 44px; padding: 0 14px; white-space: nowrap; }
}

@media (min-width: 761px) {
  .nav-links a:not(.nav-cta):not(.keep) { display: inline; }
  .nav-links { gap: clamp(14px, 1.6vw, 24px); }
  .grid2 { grid-template-columns: 1fr 1fr; }
  .modal { align-items: center; padding: 24px; }
  .modal-box { border-radius: 26px; padding: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

@media print {
  body > *:not(.modal) { display: none !important; }
  .modal { position: static; background: none; }
  .modal-box { max-height: none; box-shadow: none; }
  .modal-x, .no-print { display: none !important; }
}

/* ---------- barra de bienvenida (solo con sesión activa) ---------- */
.bienvenida { position: relative; z-index: 3; max-width: 1276px; margin: 10px 24px 0; padding: 10px 24px; border-radius: 999px; background: var(--t1); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.bienvenida a { font-weight: 800; }
@media (min-width: 1324px) { .bienvenida { margin-left: auto; margin-right: auto; } }
@media (min-width: 761px) { .bienvenida a { display: none; } }

/* ---------- pie siempre al fondo ---------- */
html, body { min-height: 100%; }
body { min-height: 100vh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; width: 100%; }
body > footer { margin-top: auto; }
.pie-marca { display: flex; flex-direction: column; gap: 4px; }
.pie-logo { display: inline-flex; align-items: flex-start; gap: 6px; }
.pie-lema { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 20px; color: var(--yl); }
.pie-nota { max-width: 1288px; margin: 0 auto; padding: 18px 24px 28px; border-top: 1px solid rgba(255, 255, 255, 0.18); font-size: 14px; line-height: 1.5; font-weight: 500; color: var(--lt); }
.pie-nota a { color: #FFFFFF; }

/* ---------- listas desplegables con el mismo estilo en todos los navegadores ---------- */
select { -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%2300657D' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important; background-repeat: no-repeat !important; background-position: right 16px center !important; padding-right: 40px !important; text-overflow: ellipsis; }

/* ---------- explosión de confeti ---------- */
.boom { position: fixed; left: 50%; top: 42%; z-index: 80; pointer-events: none; }
.boom i { position: absolute; left: 0; top: 0; opacity: 0; animation: boom 1.9s cubic-bezier(.12, .75, .3, 1) forwards; }
@keyframes boom { 0% { transform: translate(0, 0) rotate(0deg); opacity: 1; } 75% { opacity: 1; } 100% { transform: translate(var(--x), calc(var(--y) + 300px)) rotate(var(--r)); opacity: 0; } }

/* Botón de subir archivo: un recuadro punteado con botón redondo, en vez del control del sistema. */
.field input[type="file"] { min-height: 0; padding: 14px; border: 2px dashed #B9CBD3; border-radius: 20px; background: var(--t2); font-size: 15px; color: var(--txt); cursor: pointer; transition: border-color .15s, background .15s; }
.field input[type="file"]:hover { border-color: var(--k1); background: #FFFFFF; }
.field input[type="file"]::file-selector-button { margin-right: 14px; min-height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--pri); color: #FFFFFF; font: inherit; font-size: 14.5px; font-weight: 800; cursor: pointer; }
/* «Pool» siempre a la vista, también en el teléfono (Proveedores ya está en la barra de abajo). */
.nav-links a.pool-link { display: inline-flex !important; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--crema); color: var(--pri); font-weight: 800; }

/* ---------- menús y calendario propios ---------- */
.ns-hide { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; overflow: hidden; }
.ns-btn { width: 100%; min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 16px 0 18px; border: 2px solid var(--bd); border-radius: 26px; background: #FFFFFF; font: inherit; font-size: 17px; font-weight: 500; color: var(--pri); text-align: left; cursor: pointer; }
.ns-btn > span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ns-btn:hover { border-color: var(--k1); }
.ns-btn:disabled { opacity: .55; cursor: not-allowed; }
.ns-btn .ns-chev { flex: none; color: var(--pri); opacity: .7; }
.ns-btn > .ico { width: 18px; height: 18px; flex: none; color: var(--pri); }
.ns-btn .ns-ph { color: #8795A0; }
.ns-btn.mini { min-height: 38px; padding: 0 10px 0 12px; border-width: 1.5px; border-radius: 12px; font-size: 14.5px; width: auto; }
.ns-btn.ns-err { border-color: var(--coral); animation: nsShake .4s; }
@keyframes nsShake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.ns-pop { position: fixed; z-index: 90; max-height: 320px; overflow-y: auto; padding: 6px; border-radius: 18px; background: #FFFFFF; box-shadow: 0 18px 44px rgba(0, 55, 75, .22); border: 1px solid var(--line); }
.ns-pop > button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 44px; padding: 8px 14px; border: 0; border-radius: 12px; background: none; font: inherit; font-size: 16px; color: var(--ink); text-align: left; cursor: pointer; }
.ns-pop > button:hover, .ns-pop > button:focus { background: var(--t2); outline: none; }
.ns-pop > button[aria-selected="true"] { color: var(--pri); font-weight: 800; background: var(--t1); }
.ns-pop > button .ico { width: 18px; height: 18px; color: var(--pri); }
.ns-pop > button:disabled { color: #A9B5BD; cursor: default; }
.ns-pop.ns-sheet { left: 0 !important; right: 0; bottom: 0; top: auto !important; min-width: 0 !important; max-height: 70vh; padding: 12px 12px calc(16px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; box-shadow: 0 -10px 40px rgba(0, 40, 55, .3); }
.ns-pop.ns-sheet > button { min-height: 52px; font-size: 17px; }
.ns-cal { width: 300px; max-height: none; padding: 14px; }
.ns-cal.ns-sheet { width: auto; }
.nc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.nc-head b { font-size: 16px; color: var(--ink); }
.nc-head button { width: 38px; height: 38px; border: 0; border-radius: 999px; background: var(--t2); color: var(--pri); font-size: 20px; cursor: pointer; }
.nc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.nc-grid span { text-align: center; font-size: 12px; font-weight: 800; color: var(--txt); padding: 4px 0; }
.nc-grid button { aspect-ratio: 1; border: 0; border-radius: 12px; background: none; font: inherit; font-size: 15px; color: var(--ink); cursor: pointer; }
.nc-grid button:hover, .nc-grid button:focus { background: var(--t1); outline: none; }
.nc-grid button.today { box-shadow: inset 0 0 0 2px var(--k1); }
.nc-grid button.on { background: var(--pri); color: #FFFFFF; font-weight: 800; }
.nc-grid button:disabled { color: #C9D0D6; cursor: default; background: none; }
.nc-clear { margin-top: 8px; width: 100%; min-height: 38px; border: 0; border-radius: 12px; background: var(--t2); font: inherit; font-size: 14px; font-weight: 700; color: var(--txt); cursor: pointer; }
/* En la barra de búsqueda, sin caja: se ve como texto */
.sbar .ns-btn { min-height: 26px; padding: 0; border: 0; border-radius: 0; background: transparent; font-size: 16px; color: var(--txt); }
.sbar .ns-btn > .ico { display: none; }
/* En los paneles, el mismo tamaño que los campos */
.panel .ns-btn { min-height: 46px; border-width: 1.5px; border-color: #C9D6DD; border-radius: 14px; font-size: 16px; }
.role-pick .ns-btn { min-height: 40px; padding: 0 8px; border: 0; background: transparent; font-size: 14.5px; font-weight: 800; color: inherit; width: auto; }
.role-pick .ns-btn .ns-chev { color: inherit; }
.start-form .ns-btn { height: 56px; border-radius: 999px; padding: 0 18px 0 20px; color: var(--ink); }
/* Coopa en el menú: sin el contorno amarillo, como los demás enlaces */
.nav-links a.pool-link { display: inline !important; padding: 0; border-radius: 0; background: none; color: #3A2E4F; font-weight: inherit; }
@media (max-width: 760px) { .nav-links a.pool-link { display: inline !important; } }

/* ---------- pie de página ---------- */
.pie { padding: 0; }
.pie-top { max-width: 1240px; margin: 0 auto; padding: 56px 24px 36px; display: grid; gap: 36px; }
.pie-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; max-width: 360px; }
.pie-brand p { font-size: 15.5px; line-height: 1.55; color: var(--lt); }
.pie-mail { display: inline-flex; align-items: center; gap: 8px; color: #FFFFFF; font-weight: 700; text-decoration: none; }
.pie-mail .ico { width: 18px; height: 18px; }
.pie-col { display: flex; flex-direction: column; gap: 10px; }
.pie-col b { margin-bottom: 4px; font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--yl); }
.pie-col a { color: var(--lt); text-decoration: none; font-size: 15.5px; font-weight: 600; }
.pie-col a:hover, .pie-mail:hover { color: #FFFFFF; text-decoration: underline; }
.pie .city-pick { display: inline-flex; align-items: center; gap: 8px; color: var(--lt); }
.pie .city-pick .ico { width: 18px; height: 18px; }
.pie .city-pick .ns-btn { min-height: 40px; width: auto; padding: 0 12px 0 14px; border: 1.5px solid rgba(255, 255, 255, .35); background: transparent; color: #FFFFFF; font-size: 15px; }
.pie .city-pick .ns-btn .ns-chev { color: #FFFFFF; }
.pie-mid { max-width: 1240px; margin: 0 auto; padding: 0 24px 28px; }
.pie-mid .opina { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-radius: 22px; background: rgba(255, 255, 255, .08); }
.pie-mid .opina label { color: #FFFFFF; font-size: 15.5px; }
.pie-mid .opina .row { flex: 1 1 320px; max-width: 520px; flex-wrap: nowrap; }
.pie-mid .opina input { flex: 1; min-width: 0; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; font: inherit; font-size: 15px; }
.pie-bottom { border-top: 1px solid rgba(255, 255, 255, .15); }
.pie-bottom { max-width: 1240px; margin: 0 auto; padding: 18px 24px 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 13.5px; color: var(--lt); }
.pie-bottom p { max-width: 720px; line-height: 1.5; }
.pie-bottom a { color: #FFFFFF; }
@media (min-width: 900px) { .pie-top { grid-template-columns: 1.5fr 1fr 1fr 1fr; } }
@media (min-width: 600px) and (max-width: 899px) { .pie-top { grid-template-columns: 1fr 1fr; } .pie-brand { grid-column: 1 / -1; max-width: none; } }
@media (max-width: 760px) { .pie-top { padding: 40px 16px 28px; } .pie-mid, .pie-bottom { padding-left: 16px; padding-right: 16px; } .pie-bottom { padding-bottom: calc(28px + 64px); } }
