/* Nubo · estilos compartidos (Grafito + dorado) */
:root {
  --bg: var(--k-121212); --panel: var(--k-1C1C1E); --panel2: var(--k-232326); --line: var(--k-2E2E31); --line2: var(--k-3A3A3F);
  --ink: var(--k-F5F5F2); --muted: var(--k-A1A1A6); --faint: var(--k-6A6A70);
  --gold: var(--k-D4B483); --ok: var(--k-7CC79A); --bad: var(--k-E07A6F); --bad2: var(--k-FF9F8F);
  --r: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: Inter, system-ui, -apple-system, sans-serif; font-size: 15px; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.mono { font-family: Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.noscroll { scrollbar-width: none; } .noscroll::-webkit-scrollbar { display: none; }

/* Marca */
.marca { display: flex; align-items: center; gap: 12px; }
.sello { width: 52px; height: 52px; flex: none; border-radius: 15px; background: var(--panel); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--gold); }
.sello svg { width: 34px; height: 34px; }
.sello.chico { width: 38px; height: 38px; border-radius: 11px; } .sello.chico svg { width: 24px; height: 24px; }
.marca b { font-family: Nunito, Inter, sans-serif; font-size: 32px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.marca.chica b { font-size: 22px; }

/* Controles */
.campo { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.in { height: 48px; width: 100%; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-size: 16px; outline: none; }
.in:focus { border-color: var(--line2); }
textarea.in { height: auto; min-height: 64px; padding: 12px 14px; resize: vertical; line-height: 1.4; font-size: 15px; }
.btn { text-decoration: none; height: 48px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 15px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.oro { background: var(--gold); border-color: var(--gold); color: var(--k-141414); font-weight: 700; }
.btn.claro { background: var(--ink); border-color: var(--ink); color: var(--k-141414); font-weight: 700; }
.btn.chico { height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.peligro { border-color: var(--k-3A2220); color: var(--bad2); }
.btn.linea { border-style: dashed; color: var(--muted); }
.chip { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 13px; font-weight: 600; white-space: nowrap; }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--k-141414); }
.switch { width: 40px; height: 24px; flex: none; border-radius: 12px; border: 0; padding: 2px; background: var(--line2); display: flex; justify-content: flex-start; }
.switch::after { content: ''; width: 20px; height: 20px; border-radius: 10px; background: #fff; }
.switch[aria-checked="true"] { background: var(--ok); justify-content: flex-end; }
.tarjeta { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.titulo { font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--muted); }

/* Avisos */
#aviso { position: fixed; left: 50%; top: calc(12px + var(--arriba)); transform: translateX(-50%) translateY(-16px); opacity: 0; pointer-events: none; z-index: 10000; text-align: center;
  background: var(--ink); color: var(--k-141414); padding: 12px 18px; border-radius: 14px; font-size: 14px; font-weight: 600; transition: .2s; max-width: calc(100% - 32px); box-shadow: 0 10px 30px rgba(0,0,0,.4); }
#aviso.ver { opacity: 1; transform: translateX(-50%); }
#aviso.mal { background: var(--bad); color: var(--k-141414); }
.cargando { display: flex; align-items: center; justify-content: center; min-height: 100vh; color: var(--muted); }

/* Pestañas compartidas */
.pestanas { display: flex; padding: 4px; gap: 4px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.pestanas button { flex: 1; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-weight: 600; font-size: 14px; }
.pestanas button[aria-selected="true"] { background: var(--panel2); color: var(--ink); }
.pestanas button:disabled { opacity: .35; }
.form { display: flex; flex-direction: column; gap: 14px; }

/* Mapa oscuro (OpenStreetMap con filtro) */
.mapa-oscuro { filter: invert(.9) hue-rotate(180deg) brightness(1.12) contrast(.86) saturate(.35); }

.relleno { flex: 1; }

/* Pantalla "Añade a inicio" */
.instalar { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: calc(24px + var(--arriba)) 24px calc(24px + env(safe-area-inset-bottom)); background: radial-gradient(120% 60% at 50% 30%, #1E1B16 0%, var(--bg) 70%); }
.i-centro { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; }
.i-logo { width: 112px; height: 112px; border-radius: 30px; background: var(--panel); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--gold); box-shadow: 0 20px 50px rgba(0,0,0,.45); }
.i-logo svg { width: 70px; height: 70px; }
.i-nombre { font-family: Nunito, Inter, sans-serif; font-size: 44px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.i-lema { color: var(--muted); font-size: 15px; max-width: 280px; line-height: 1.45; }
.i-abajo { display: flex; flex-direction: column; gap: 14px; }
.i-pasos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.i-pasos li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); font-size: 14px; }
.i-ico { width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--panel2); display: flex; align-items: center; justify-content: center; }
.i-mini { width: 26px; height: 26px; color: var(--gold); display: flex; } .i-mini svg { width: 26px; height: 26px; }
.enlace { border: 0; background: none; color: var(--muted); font-size: 13px; text-decoration: underline; padding: 6px 0; align-self: center; }

/* Aceptación de términos */
.acepto { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--muted); line-height: 1.45; cursor: pointer; }
.acepto input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--gold); }
.acepto a { color: var(--gold); }
.enlace-rojo { background: none; border: 0; padding: 0; color: var(--bad, var(--k-E07A6F)); font: inherit; cursor: pointer; text-decoration: underline; }
.ligas-legal a { color: var(--gold); }
/* Franja para activar avisos */
.franja-avisos { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin: 8px 0; border-radius: 14px; background: rgba(212,180,131,.12); border: 1px solid rgba(212,180,131,.4); font-size: 13px; }
.franja-avisos span { flex: 1; }

/* Entrada (fiel al diseño original: Acceso / AccesoNegocio) */
.ac { min-height: 100vh; min-height: 100dvh; width: 100%; max-width: 440px; margin: 0 auto; box-sizing: border-box; background: var(--k-121212); color: var(--k-F5F5F2); font-family: Inter, system-ui, sans-serif; display: flex; flex-direction: column; }
.ac-atras { padding: calc(20px + var(--arriba)) 20px 0; }
.ac-atras a, .ac-atras button { width: 44px; height: 44px; border-radius: 22px; background: var(--k-1C1C1E); border: 1px solid var(--k-2E2E31); display: flex; align-items: center; justify-content: center; color: var(--k-F5F5F2); padding: 0; cursor: pointer; }
.ac-cuerpo { flex: 1; padding: calc(56px + var(--arriba)) 24px 20px; display: flex; flex-direction: column; gap: 30px; }
.ac-atras + .ac-cuerpo { padding-top: 8px; gap: 18px; }
.ac-marca { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.ac-marca .lg { width: 84px; height: 84px; border-radius: 22px; background: var(--k-1C1C1E); border: 1px solid var(--k-2E2E31); display: flex; align-items: center; justify-content: center; color: var(--k-D4B483); }
.ac-marca .lg svg { width: 52px; height: 52px; }
.ac-marca b { font-family: Nunito, Inter, sans-serif; font-size: 40px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.ac-marca span.sub { font-size: 15px; color: var(--k-A1A1A6); }
.ac-marca.chica { gap: 8px; } .ac-marca.chica .lg { width: 60px; height: 60px; border-radius: 17px; } .ac-marca.chica .lg svg { width: 38px; height: 38px; } .ac-marca.chica b { font-size: 30px; }
.ac-form { display: flex; flex-direction: column; gap: 14px; }
.ac-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 12px; background: var(--k-2A2A2D); }
.ac-tabs button { height: 38px; border: 0; border-radius: 9px; background: transparent; color: var(--k-A1A1A6); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.ac-tabs button[aria-selected="true"] { background: var(--k-1C1C1E); color: var(--k-F5F5F2); }
.ac-form label.c { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--k-A1A1A6); }
.ac-form label.c input { height: 48px; box-sizing: border-box; padding: 0 14px; border-radius: 12px; border: 1px solid var(--k-2E2E31); background: var(--k-1C1C1E); color: var(--k-F5F5F2); font: inherit; font-size: 15px; outline: none; }
.ac-form label.c input:focus { border-color: var(--k-D4B483); }
.ac-form label.c input.clave { font-family: Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: .08em; text-transform: uppercase; }
.ac-cta { height: 52px; border-radius: 14px; border: 0; background: var(--k-D4B483); color: var(--k-141414); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.ac-cta:disabled { opacity: .45; }
.ac-btn { height: 52px; display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 14px; border: 1px solid var(--k-2E2E31); background: var(--k-1C1C1E); color: var(--k-F5F5F2); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; }
.ac-txt { min-height: 40px; border: 0; background: transparent; color: var(--k-F5F5F2); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; text-align: center; display: flex; align-items: center; justify-content: center; }
.ac-txt.suave { color: var(--k-A1A1A6); font-size: 13px; font-weight: 400; min-height: 36px; }
.ac-emp { min-height: 68px; display: flex; align-items: center; gap: 14px; padding: 0 16px; border-radius: 16px; border: 1px dashed var(--k-2E2E31); background: transparent; color: var(--k-F5F5F2); font: inherit; text-align: left; cursor: pointer; text-decoration: none; }
.ac-emp .ic { width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--k-2A2A2D); display: flex; align-items: center; justify-content: center; }
.ac-emp .tx { flex: 1; display: flex; flex-direction: column; gap: 2px; } .ac-emp .tx b { font-size: 15px; } .ac-emp .tx span { font-size: 12px; color: var(--k-A1A1A6); }
.ac-pie { padding: 10px 24px calc(30px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.ac-pie small, .ac-nota { font-size: 11px; color: var(--k-A1A1A6); text-align: center; line-height: 1.5; } .ac-pie small a, .ac-nota a { color: var(--k-A1A1A6); }
.ac .acepto { font-size: 13px; }
/* Pantalla de instalar con el celular acostado: logo a la izquierda y botones a la derecha */
@media (max-height: 520px) and (orientation: landscape) {
  .instalar { flex-direction: row; align-items: center; gap: 28px; padding: 16px calc(24px + env(safe-area-inset-right)) 16px calc(24px + env(safe-area-inset-left)); }
  .i-centro { gap: 8px; } .i-abajo { flex: 1; max-width: 420px; gap: 10px; }
}
/* Entrar con Google */
.ac-google { height: 52px; border-radius: 14px; border: 1px solid var(--k-3A3A3F); background: var(--k-1C1C1E); color: var(--k-F5F5F2); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; }
.ac-google:disabled { opacity: .5; }
.ac-o { display: flex; align-items: center; gap: 10px; color: var(--k-8A8A90); font-size: 12px; margin: 2px 0; }
.ac-o i { flex: 1; height: 1px; background: var(--k-2C2C30); }
