/* ====================================================================
   Orbis · Visor de pases de satélites
   ==================================================================== */
:root {
  --bg:        #080d17;
  --bg-2:      #0d1422;
  --panel:     #121a2b;
  --panel-2:   #182135;
  --border:    #253048;
  --text:      #eef1f6;
  --muted:     #93a0bb;
  --primary:   #e2a44b;   /* ámbar de marca */
  --primary-2: #f1bf6d;
  --accent:    #f2c56d;
  --visible:   #4ade80;
  --day:       #fbbf24;
  --eclipse:   #647089;
  --danger:    #f87171;
  --radius:    14px;
  --radius-sm: 9px;
  --shadow:    0 12px 40px rgba(0,0,0,.45);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

/* El atributo hidden debe ganar siempre, aunque el elemento tenga display propio */
[hidden] { display: none !important; }

/* ---- Pantalla de carga ---- */
.loading {
  position: fixed; inset: 0; z-index: 500;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background:
    radial-gradient(1000px 700px at 80% -10%, #14204a 0%, transparent 55%),
    radial-gradient(800px 600px at 5% 110%, #101a3a 0%, transparent 50%),
    #080d17;
  transition: opacity .45s ease;
}
.loading.is-hidden { opacity: 0; pointer-events: none; }
.loading__spinner { width: 88px; height: 88px; animation: spin 1s linear infinite; }
.loading__text {
  font-family: var(--font-display); font-weight: 600; font-size: 1.3rem;
  letter-spacing: 3px; text-transform: uppercase; color: #eef1f6; margin: 0;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 800px at 80% -10%, #16224a 0%, transparent 55%),
    radial-gradient(900px 700px at 5% 110%, #101a3a 0%, transparent 50%),
    var(--bg);
}

/* Estrellas de fondo */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(1px 1px at 20% 30%, #fff 50%, transparent),
    radial-gradient(1px 1px at 70% 60%, #cfe 50%, transparent),
    radial-gradient(1px 1px at 40% 80%, #fff 50%, transparent),
    radial-gradient(2px 2px at 85% 20%, #fff 50%, transparent),
    radial-gradient(1px 1px at 55% 15%, #dce 50%, transparent),
    radial-gradient(1px 1px at 10% 70%, #fff 50%, transparent),
    radial-gradient(1.5px 1.5px at 92% 78%, #fff 50%, transparent);
  background-repeat: no-repeat;
  opacity: .55;
}

/* Por defecto ningún enlace del sitio lleva subrayado; se reactiva
   explícitamente donde se quiera (p. ej. .link-btn, .auth__back), y
   con el cursor encima para los enlaces sueltos dentro de texto. */
a { color: var(--primary-2); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
.brand:hover, .btn:hover, .topnav-link:hover { text-decoration: none; }

/* ------------------------- Botones ------------------------- */
.btn {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  cursor: pointer;
  transition: transform .06s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { border-color: var(--primary); }
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: linear-gradient(180deg, var(--primary-2), var(--primary));
  border-color: transparent;
  color: #1a1206;
}
.btn--primary:hover { filter: brightness(1.06); }
.btn--ghost { background: transparent; }
.btn--block { width: 100%; }
.btn--sm { padding: 6px 12px; font-size: .85rem; }
.btn--lg { padding: 14px 26px; font-size: 1rem; border-radius: 12px; }

/* ------------------------- Campos ------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: .82rem; color: var(--muted); }
.field input, .field select, select {
  font: inherit;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  outline: none;
}
.field input:focus, .field select:focus, select:focus { border-color: var(--primary); }
.field--inline { flex: 1; min-width: 0; }
.field input, .field select { max-width: 100%; }
.controls-row { display: flex; gap: 12px; }
#locationModal { width: min(520px, 94vw); }
.check { display: flex; align-items: center; gap: 8px; font-size: .9rem; margin: 4px 0 14px; color: var(--muted); cursor: pointer; }
.form-hint { font-size: .78rem; color: var(--muted); margin: -4px 0 12px; }
.form-msg { min-height: 18px; font-size: .85rem; margin: 0 0 10px; }
.form-msg.error { color: var(--danger); }
.form-msg.ok { color: var(--visible); }
.muted { color: var(--muted); }

/* ====================== AUTENTICACIÓN ====================== */
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
}
.auth__hero {
  display: flex;
  align-items: center;
  padding: 48px;
  background:
    radial-gradient(700px 500px at 30% 20%, rgba(226,164,75,.20), transparent 60%),
    linear-gradient(180deg, #0a1024, transparent);
}
.auth__hero-inner { max-width: 460px; }
.auth__logo { width: 96px; height: 96px; object-fit: contain; margin-left: -8px; }
.auth__hero h1 { font-family: var(--font-display); font-size: 3.6rem; font-weight: 700; margin: 4px 0 2px; letter-spacing: -.5px; }
.auth__eyebrow { font-size: .8rem; text-transform: uppercase; letter-spacing: 3px; color: var(--primary-2); margin: 0 0 14px; font-weight: 500; }
.auth__tagline { font-size: 1.1rem; color: var(--muted); line-height: 1.5; }
.auth__features { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.auth__features li { font-size: 1rem; color: var(--text); }

.auth__panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px;
  background: rgba(12,18,36,.72);
  backdrop-filter: blur(8px);
  border-left: 1px solid var(--border);
}
.auth__back {
  align-self: flex-start; color: var(--muted); text-decoration: none;
  font-size: .85rem; margin-bottom: 18px; transition: color .15s ease;
}
.auth__back:hover { color: var(--primary-2); }
.auth__tabs {
  display: flex;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 26px;
  max-width: 420px;
}
.auth__tab {
  flex: 1;
  font: inherit;
  font-weight: 600;
  padding: 10px;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 7px;
  cursor: pointer;
}
.auth__tab.is-active { background: var(--primary); color: #1a1206; }
.auth__form { display: none; max-width: 420px; }
.auth__form.is-active { display: block; }
.link-btn {
  background: none; border: none; color: var(--primary-2);
  font: inherit; font-size: .84rem; cursor: pointer; padding: 0;
  margin: -6px 0 12px; text-decoration: underline; text-underline-offset: 2px;
}
.link-btn:hover { color: var(--primary); }
.auth__divider { display: flex; align-items: center; gap: 12px; max-width: 420px; margin: 20px 0; color: var(--muted); font-size: .8rem; }
.auth__divider::before, .auth__divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.btn--google {
  max-width: 420px; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #fff; color: #1f2937; border-color: transparent; font-weight: 600;
}
.btn--google:hover { background: #f1f3f6; border-color: transparent; }

/* ====================== CABECERA ====================== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 22px;
  background: rgba(12,18,36,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand__logo { width: 40px; height: 40px; object-fit: contain; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__text strong { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; letter-spacing: .2px; }
.brand__text small { color: var(--muted); font-size: .74rem; }
.topbar__center { flex: 1; display: flex; justify-content: center; align-items: center; gap: 10px; }
.loc-select { display: flex; align-items: center; gap: 10px; }
.loc-select span { font-size: .8rem; color: var(--muted); }
.loc-select select { min-width: 200px; }
.topbar__right { display: flex; align-items: center; gap: 12px; }
.user-chip {
  font-size: .9rem;
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
}

/* ====================== LAYOUT APP (editorial) ====================== */
.app {
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: calc(100vh - 65px);
}
.stage { flex: 1 0 auto; width: 100%; max-width: 880px; padding: 34px 24px 50px; }

/* Pie de página fijo abajo */
.site-foot {
  flex-shrink: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 28px;
  border-top: 1px solid var(--border);
  background: rgba(10, 15, 26, .5);
  font-size: .78rem;
  color: var(--muted);
}
.site-foot__brand { font-family: var(--font-display); letter-spacing: .2px; }

/* ---- Barra de control ---- */
.toolbar {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
  padding-bottom: 22px; margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.toolbar__controls { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.control { display: flex; flex-direction: column; gap: 6px; }
.control label { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.control select, .control input {
  font: inherit; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 9px 12px; outline: none;
}
.control select:focus, .control input:focus { border-color: var(--primary); }
.control--sm input { width: 78px; }
.control select { max-width: 240px; }
.control--loc select { min-width: 150px; }
.toggle { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--muted); cursor: pointer; padding-bottom: 9px; }
.toolbar .btn--primary { padding: 11px 20px; }

.loc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.loc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  cursor: pointer;
}
.loc-item.is-active { border-color: var(--primary); background: rgba(226,164,75,.12); }
.loc-item__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.loc-item__name { font-weight: 600; font-size: .95rem; display: flex; align-items: center; gap: 6px; }
.loc-item__coords { font-size: .76rem; color: var(--muted); }
.loc-item__actions { display: flex; gap: 4px; flex-shrink: 0; }
.icon-btn {
  border: none; background: transparent; color: var(--muted);
  cursor: pointer; font-size: .95rem; padding: 4px; border-radius: 6px;
}
.icon-btn:hover { color: var(--text); background: var(--panel-2); }
.badge-active { font-size: .68rem; color: var(--primary-2); border: 1px solid var(--primary); border-radius: 999px; padding: 1px 7px; }
.empty-hint { font-size: .85rem; color: var(--muted); margin: 10px 0 0; }

.stage__foot { margin-top: 40px; font-size: .76rem; color: var(--muted); text-align: center; }

.tle-status { font-size: .78rem; color: var(--muted); margin: 12px 0 0; min-height: 16px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot--visible { background: var(--visible); }
.dot--day { background: var(--day); }
.dot--eclipse { background: var(--eclipse); }

/* ====================== RESULTADOS (editorial) ====================== */
.results__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin: 32px 0 20px;
}
.results__title { margin: 0; font-family: var(--font-display); font-size: 1.05rem; font-weight: 500; color: var(--muted); letter-spacing: .2px; }
.results__title b { color: var(--text); font-weight: 700; }
.legend { font-size: .78rem; color: var(--muted); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* ---- Pase destacado ---- */
.feature {
  display: grid; grid-template-columns: 1fr 240px; gap: 28px; align-items: center;
  background:
    radial-gradient(600px 300px at 85% 0%, rgba(226,164,75,.14), transparent 70%),
    var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 30px 32px;
  margin-bottom: 40px;
  cursor: pointer;
  transition: border-color .15s ease, transform .1s ease;
  position: relative; overflow: hidden;
}
.feature::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--eclipse);
}
.feature--visible::before { background: var(--visible); }
.feature--day::before { background: var(--day); }
.feature:hover { border-color: var(--primary); transform: translateY(-2px); }
.feature__eyebrow { font-size: .74rem; text-transform: uppercase; letter-spacing: 1.4px; color: var(--muted); }
.feature__eyebrow b { color: var(--accent); font-weight: 700; }
.feature__name {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.05;
  margin: 8px 0 6px; letter-spacing: -.5px;
}
.feature__when { color: var(--muted); margin: 0 0 14px; font-size: .95rem; }
.feature__stats { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 20px; }
.fstat label { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin-bottom: 3px; }
.fstat b { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; }
.fstat span { font-size: .74rem; color: var(--muted); margin-left: 5px; }
.feature__chart { justify-self: center; }
.feature__chart canvas { width: 240px; height: 240px; }

/* ---- Etiquetas de visibilidad ---- */
.tag { font-size: .74rem; padding: 4px 11px; border-radius: 999px; white-space: nowrap; font-weight: 500; display: inline-block; }
.tag--visible { background: rgba(74,222,128,.16); color: var(--visible); }
.tag--day { background: rgba(251,191,36,.16); color: var(--day); }
.tag--eclipse { background: rgba(100,116,139,.22); color: #aab8d4; }

/* ---- Lista de pases ---- */
.plist { display: flex; flex-direction: column; }
.plist__label { font-size: .74rem; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin: 0 0 6px 2px; }
.prow {
  display: grid; grid-template-columns: 10px 88px 1fr auto auto; gap: 16px; align-items: center;
  width: 100%; text-align: left;
  background: transparent; border: none; border-bottom: 1px solid var(--border);
  color: var(--text); font: inherit; padding: 16px 6px; cursor: pointer;
  transition: background .12s ease;
}
.prow:hover { background: rgba(226,164,75,.07); }
.prow__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--eclipse); }
.prow--visible .prow__dot { background: var(--visible); box-shadow: 0 0 8px rgba(74,222,128,.6); }
.prow--day .prow__dot { background: var(--day); }
.prow__time b { font-family: var(--font-display); font-size: 1.05rem; display: block; }
.prow__time small { font-size: .72rem; color: var(--muted); }
.prow__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow__dir { font-size: .82rem; color: var(--muted); white-space: nowrap; }
.prow__el { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--accent); }

/* ---- Estado vacío ---- */
.empty-state { text-align: center; padding: 80px 20px 60px; }
.empty-state__icon { font-size: 46px; margin-bottom: 14px; opacity: .9; }
.empty-state h2 { font-family: var(--font-display); font-size: 1.8rem; margin: 0 0 12px; font-weight: 600; }
.empty-state p { color: var(--muted); line-height: 1.6; margin: 0; }

.spinner {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 80px; color: var(--muted);
}
.spinner__ring {
  width: 44px; height: 44px; border-radius: 50%;
  border: 4px solid var(--border); border-top-color: var(--primary);
  animation: spin 1s linear infinite;
}
.spinner__img { width: 60px; height: 60px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ====================== MODALES ====================== */
.modal {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
  padding: 0;
  width: min(440px, 92vw);
}
.modal--wide { width: min(680px, 94vw); }
.modal::backdrop { background: rgba(3,6,15,.7); backdrop-filter: blur(3px); }
.modal__inner { padding: 24px; }
.modal__inner h2 { margin: 0 0 18px; font-size: 1.2rem; }
.modal__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.modal__head-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal__head-row h2 { margin: 0; }

/* ---- Buscador de ciudad + mapa (modal ubicación) ---- */
.geo-search { position: relative; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.geo-search__icon { position: absolute; left: 12px; pointer-events: none; opacity: .7; font-size: .9rem; }
.geo-search input {
  flex: 1; min-width: 0; font: inherit; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px 10px 34px; outline: none;
}
.geo-search .btn { flex-shrink: 0; }
.geo-search input:focus { border-color: var(--primary); }
.geo-results {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  list-style: none; margin: 0; padding: 4px;
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow);
  z-index: 30; max-height: 240px; overflow-y: auto;
}
.geo-results li {
  padding: 9px 12px; border-radius: 7px; cursor: pointer; font-size: .9rem;
  display: flex; flex-direction: column; gap: 2px;
}
.geo-results li:hover, .geo-results li.is-active { background: rgba(226,164,75,.16); }
.geo-results .geo-city { font-weight: 600; }
.geo-results .geo-sub { font-size: .76rem; color: var(--muted); }
.geo-results .geo-empty { color: var(--muted); cursor: default; }

.map-wrap { margin-bottom: 14px; }
#locMap {
  height: 220px; width: 100%;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #0a1024; z-index: 1;
}
.map-hint { font-size: .74rem; color: var(--muted); margin: 6px 2px 0; }
/* Marcador personalizado (evita depender de imágenes de Leaflet) */
.map-pin {
  width: 18px; height: 18px; border-radius: 50% 50% 50% 0;
  background: var(--primary); border: 2px solid #fff;
  transform: rotate(-45deg); box-shadow: 0 0 0 4px rgba(226,164,75,.3);
}
.leaflet-container { font-family: var(--font); }

.pass-detail__head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.pass-detail__head h2 { margin: 0 0 2px; }
.pass-detail__body { display: grid; grid-template-columns: 440px 1fr; gap: 20px; align-items: start; }
#skyCanvas { background: radial-gradient(circle at center, #0a1024, #050810); border-radius: 50%; max-width: 100%; }
.pass-detail__stats { display: flex; flex-direction: column; gap: 12px; }
.detail-row { display: flex; justify-content: space-between; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.detail-row span:first-child { color: var(--muted); font-size: .88rem; }
.detail-row span:last-child { font-weight: 600; }

/* ====================== TOAST ====================== */
.toast {
  position: fixed;
  bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--panel-2);
  border: 1px solid var(--border);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  z-index: 200;
  font-size: .9rem;
  animation: toastIn .2s ease;
}
.toast--error { border-color: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } }

/* ====================== CABECERA: reloj + perfil ====================== */
.topbar__right { display: flex; align-items: center; gap: 18px; }
.topnav-link {
  font-size: .88rem; font-weight: 600; color: var(--text); text-decoration: none;
  padding: 7px 14px; border: 1px solid var(--border); border-radius: 999px;
  transition: border-color .15s ease, background .15s ease;
}
.topnav-link:hover { border-color: var(--primary); background: var(--panel); }
.clock { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.05; }
.clock__time {
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 600;
  font-variant-numeric: tabular-nums; letter-spacing: .5px; color: var(--text);
}
.clock__tz { font-size: .64rem; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; }

.profile { position: relative; }
.profile__btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 999px; padding: 5px 14px 5px 5px; color: var(--text);
  font: inherit; cursor: pointer;
}
.profile__btn:hover { border-color: var(--primary); }
.profile__avatar {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(180deg, var(--primary-2), var(--primary));
  color: #1a1206; font-weight: 700; display: flex; align-items: center;
  justify-content: center; font-size: .82rem;
}
.profile__label { font-size: .9rem; font-weight: 600; }
.profile__caret { font-size: .7rem; color: var(--muted); }
.profile__menu {
  position: absolute; right: 0; top: calc(100% + 8px); width: 270px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px; z-index: 60;
}
.profile__id { display: flex; align-items: center; gap: 10px; padding: 8px 8px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.profile__avatar--lg { width: 40px; height: 40px; font-size: 1rem; }
.profile__avatar--xl { width: 66px; height: 66px; font-size: 1.7rem; }
.profile__idtext { display: flex; flex-direction: column; min-width: 0; }
.profile__idtext strong { font-size: .95rem; }
.profile__idtext span { font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: none; border: none; color: var(--text); font: inherit; font-size: .9rem;
  padding: 9px 10px; border-radius: 8px; cursor: pointer;
}
.dd-item:hover { background: rgba(226, 164, 75, .12); }
.dd-item__ic { width: 18px; text-align: center; opacity: .85; }
.dd-item--danger { color: #f0a3a3; }
.dd-item--danger:hover { background: rgba(248, 113, 113, .12); }
.dd-sep { height: 1px; background: var(--border); margin: 6px 0; }

/* ---- Avatares con imagen / emoji ---- */
.profile__avatar { overflow: hidden; }
.profile__avatar--emoji { background: var(--panel-2); }
.profile__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile__avatar--img { background: none; }

/* ---- Selector de avatar ---- */
.avatar-edit { margin-bottom: 4px; }
.avatar-edit__label { display: block; font-size: .82rem; color: var(--muted); margin-bottom: 10px; }
.avatar-edit__row { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.avatar-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.avatar-opt {
  width: 40px; height: 40px; border-radius: 50%; border: 2px solid transparent;
  background: var(--panel-2); cursor: pointer; display: flex; align-items: center;
  justify-content: center; font-size: 1.1rem; padding: 0; color: var(--text);
  transition: border-color .12s ease, transform .08s ease;
}
.avatar-opt:hover { transform: translateY(-1px); }
.avatar-opt.is-selected { border-color: var(--primary); }
.avatar-opt--initials { background: linear-gradient(180deg, var(--primary-2), var(--primary)); color: #1a1206; font-weight: 700; font-size: .82rem; }
.avatar-opt--img { overflow: hidden; padding: 0; }
.avatar-opt--img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }

/* ---- Modal de perfil ---- */
.profile-card { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.profile-card__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.profile-card__info strong { font-size: 1.2rem; font-family: var(--font-display); }
.profile-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.profile-stats > div { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; text-align: center; }
.profile-stats b { display: block; font-family: var(--font-display); font-size: 1.35rem; }
.profile-stats label { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }

/* ====================== RESULTADOS: lista por día ====================== */
.results__meta { font-size: .82rem; color: var(--muted); margin: -6px 0 22px; display: flex; align-items: center; gap: 8px; }
.pgroup { margin-bottom: 28px; }
.pgroup__label {
  font-family: var(--font-display); font-size: .8rem; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--primary-2); margin: 0 0 12px 2px;
  display: flex; align-items: center; gap: 12px;
}
.pgroup__label::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.pcard {
  display: grid; grid-template-columns: 118px 1fr auto; gap: 16px; align-items: center;
  width: 100%; text-align: left; background: var(--panel);
  border: 1px solid var(--border); border-left: 3px solid var(--eclipse);
  border-radius: var(--radius); color: var(--text); font: inherit;
  padding: 15px 20px; cursor: pointer; margin-bottom: 10px;
  transition: transform .08s ease, border-color .15s ease;
}
.pcard:hover { transform: translateX(3px); border-color: var(--primary); }
.pcard--visible { border-left-color: var(--visible); }
.pcard--day { border-left-color: var(--day); }
.pcard__time b { font-family: var(--font-display); font-size: 1.02rem; display: block; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.pcard__time small { font-size: .72rem; color: var(--muted); }
.pcard__body { min-width: 0; }
.pcard__name { font-weight: 600; display: flex; align-items: center; gap: 8px; margin-bottom: 5px; overflow: hidden; }
.pcard__name-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard__path { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--muted); flex-wrap: wrap; }
.pcard__path .arrow { opacity: .45; }
.pcard__path b { color: var(--text); font-weight: 600; }
.pcard__el { text-align: center; }
.pcard__el b { font-family: var(--font-display); font-size: 1.35rem; color: var(--accent); display: block; line-height: 1; }
.pcard__el small { font-size: .64rem; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.pcard__next { font-size: .6rem; background: var(--primary); color: #1a1206; padding: 2px 8px; border-radius: 999px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }

/* ---- Estado vacío mejorado ---- */
.empty-state__logo { width: 96px; height: 96px; object-fit: contain; margin-bottom: 8px; opacity: .95; }
.empty-state .btn { margin-top: 22px; }

/* ====================== DETALLE DE PASE ====================== */
.pd { position: relative; }
.pd__close { position: absolute; top: -4px; right: -4px; background: none; border: none; color: var(--muted); font-size: 1.05rem; cursor: pointer; padding: 6px 10px; border-radius: 8px; }
.pd__close:hover { color: var(--text); background: var(--panel-2); }
.pd__head { margin-bottom: 22px; padding-right: 30px; }
.pd__eyebrow { font-size: .72rem; text-transform: uppercase; letter-spacing: 1.2px; color: var(--primary-2); }
.pd__head h2 { font-family: var(--font-display); font-size: 1.7rem; margin: 4px 0 2px; }
.pd__when { color: var(--muted); margin: 0; font-size: .9rem; }
.pd__body { display: grid; grid-template-columns: 1fr 300px; gap: 30px; align-items: center; }
.pd__timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.pd__timeline::before { content: ""; position: absolute; left: 8px; top: 10px; bottom: 10px; width: 2px; background: var(--border); }
.tl-step { position: relative; padding: 0 0 24px 34px; }
.tl-step:last-child { padding-bottom: 0; }
.tl-step::before { content: ""; position: absolute; left: 2px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg-2); border: 2px solid var(--muted); }
.tl-step--rise::before { border-color: #38bdf8; }
.tl-step--peak::before { border-color: var(--accent); background: var(--accent); }
.tl-step--set::before { border-color: var(--danger); }
.tl-step time { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.tl-step b { display: block; font-size: .74rem; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin: 2px 0 3px; }
.tl-step span { font-size: .9rem; color: var(--text); }
.pd__chart { text-align: center; }
.pd__chart canvas { width: 300px; height: 300px; max-width: 100%; background: radial-gradient(circle at center, #0b1120, #070b14); border-radius: 50%; }
.pd__chart-cap { font-size: .74rem; color: var(--muted); margin: 10px 0 0; }
.pd__viewtabs { display: inline-flex; gap: 6px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 999px; padding: 4px; margin-bottom: 12px; }
.pd__viewtab { background: none; border: none; color: var(--muted); font: inherit; font-weight: 600; font-size: .8rem; padding: 5px 13px; border-radius: 999px; cursor: pointer; }
.pd__viewtab.is-active { background: var(--primary); color: #1a1206; }
#passMap { width: 300px; height: 300px; max-width: 100%; margin: 0 auto; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: #0a1024; position: relative; z-index: 0; }
.ptick { font-size: .6rem; color: #d3ddf0; background: rgba(8,13,23,.72); padding: 0 3px; border-radius: 3px; white-space: nowrap; display: inline-block; transform: translate(4px, -50%); }
.obs-marker { font-size: 18px; filter: drop-shadow(0 0 3px rgba(0,0,0,.85)); }
.pd__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.pd__stats > div { text-align: center; }
.pd__stats label { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 4px; }
.pd__stats b { font-family: var(--font-display); font-size: 1.15rem; }

/* ====================== RESPONSIVE ====================== */
@media (max-width: 820px) {
  .auth { grid-template-columns: 1fr; }
  .auth__hero { display: none; }
  .auth__panel { padding: 32px 20px; }
  .pd__body { grid-template-columns: 1fr; }
  .pd__chart { order: -1; }
  .pd__chart canvas { width: 240px; height: 240px; }
  .pd__stats { grid-template-columns: repeat(2, 1fr); }
  .stage { padding: 22px 16px 40px; }
  .pcard { grid-template-columns: 108px 1fr auto; gap: 12px; padding: 13px 15px; }
  .pcard__path { display: none; }
}
@media (max-width: 480px) {
  /* Con nombres largos, el badge "próximo pase" + la etiqueta de visibilidad
     no dejan lugar al nombre: se le da su propia línea completa. */
  .pcard__name { flex-wrap: wrap; row-gap: 4px; }
  .pcard__name-txt { flex-basis: 100%; }
}
@media (max-width: 560px) {
  .topbar { flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
  .topbar .brand__text small { display: none; }
  .clock { align-items: flex-start; }
  .toolbar { gap: 12px; }
  .profile__label { display: none; }
}
@media (max-width: 380px) {
  .topbar .brand__text { display: none; }
}
