/* =============================================================
   Huapi-Trek — Sistema visual del módulo de trekking (público)
   Parque Nacional Nahuel Huapi
   ============================================================= */

:root {
  /* Paleta — bosque andino / Nahuel Huapi */
  --tk-forest-900:   #0f2f22;
  --tk-forest-800:   #163c2b;
  --tk-forest-700:   #1e4d38;
  --tk-forest-600:   #276149;
  --tk-forest-500:   #2f7a5a;
  --tk-moss-400:     #4a9c73;
  --tk-moss-300:     #7ebd97;

  --tk-lake-600:     #1d6b7a;
  --tk-lake-400:     #3f97a8;

  --tk-sun-500:      #e8a13a;   /* amarillo mirasol, de la foto de referencia */
  --tk-sun-600:      #cf8a24;

  --tk-stone-50:     #f7f8f4;
  --tk-stone-100:    #eef1ea;
  --tk-stone-200:    #e2e6dd;
  --tk-bark-700:     #4a4234;
  --tk-bark-600:     #6b6152;

  --tk-danger:       #c1432e;
  --tk-warning:      #cf8a24;
  --tk-success:      #2f7a5a;
  --tk-info:         #1d6b7a;

  --tk-font:         'Outfit', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --tk-font-display: 'Outfit', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --tk-radius-lg:    1.25rem;
  --tk-radius-md:    0.85rem;
  --tk-radius-sm:    0.55rem;

  --tk-shadow-soft:  0 10px 30px rgba(15, 47, 34, 0.10);
  --tk-shadow-card:  0 4px 18px rgba(15, 47, 34, 0.08);
  --tk-shadow-lift:  0 18px 40px rgba(15, 47, 34, 0.18);
}

/* ─────────────────────────────────────────────────────────────
   Base
   ───────────────────────────────────────────────────────────── */
.tk-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--tk-font);
  background: var(--tk-stone-50);
  color: var(--tk-bark-700);
  -webkit-font-smoothing: antialiased;
}

.tk-body h1, .tk-body h2, .tk-body h3 {
  font-family: var(--tk-font-display);
  font-weight: 600;
  color: var(--tk-forest-900);
  letter-spacing: -0.01em;
}

.tk-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--tk-moss-400);
}

/* ─────────────────────────────────────────────────────────────
   Botones
   ───────────────────────────────────────────────────────────── */
.tk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: 0;
  border-radius: var(--tk-radius-sm);
  padding: .72rem 1.5rem;
  font-weight: 600;
  font-size: .92rem;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
  text-decoration: none;
}
.tk-btn:active { transform: translateY(1px); }

.tk-btn-primary {
  background: linear-gradient(135deg, var(--tk-forest-600), var(--tk-forest-800));
  color: #fff;
  box-shadow: 0 8px 20px rgba(22, 60, 43, 0.28);
}
.tk-btn-primary:hover {
  box-shadow: 0 10px 26px rgba(22, 60, 43, 0.36);
  color: #fff;
  transform: translateY(-1px);
}

.tk-btn-sun {
  background: linear-gradient(135deg, var(--tk-sun-500), var(--tk-sun-600));
  color: var(--tk-forest-900);
  box-shadow: 0 8px 20px rgba(207, 138, 36, 0.3);
}
.tk-btn-sun:hover {
  color: var(--tk-forest-900);
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(207, 138, 36, 0.4);
}

.tk-btn-ghost {
  background: transparent;
  color: var(--tk-forest-700);
  border: 1.5px solid var(--tk-forest-700);
}
.tk-btn-ghost:hover { background: var(--tk-forest-700); color: #fff; }

.tk-btn-outline-light {
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.55);
}
.tk-btn-outline-light:hover { background: rgba(255,255,255,.22); color: #fff; }

.tk-btn-danger {
  background: var(--tk-danger);
  color: #fff;
}
.tk-btn-danger:hover { color: #fff; filter: brightness(1.08); }

.tk-btn-sm { padding: .45rem 1rem; font-size: .82rem; }
.tk-btn-block { width: 100%; }

/* ─────────────────────────────────────────────────────────────
   Cards / superficies
   ───────────────────────────────────────────────────────────── */
.tk-card {
  background: #fff;
  border-radius: var(--tk-radius-lg);
  box-shadow: var(--tk-shadow-card);
  border: 1px solid rgba(15, 47, 34, 0.06);
}

.tk-card-header {
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--tk-stone-200);
  font-weight: 600;
  color: var(--tk-forest-900);
}

.tk-card-body { padding: 1.5rem; }

/* ─────────────────────────────────────────────────────────────
   Formularios
   ───────────────────────────────────────────────────────────── */
.tk-label {
  font-weight: 600;
  font-size: .82rem;
  color: var(--tk-forest-800);
  margin-bottom: .35rem;
  display: block;
}

.tk-input,
.tk-select,
.tk-textarea {
  width: 100%;
  border: 1.5px solid var(--tk-stone-200);
  border-radius: var(--tk-radius-sm);
  padding: .7rem .9rem;
  font-size: .92rem;
  font-family: var(--tk-font);
  background: var(--tk-stone-50);
  color: var(--tk-bark-700);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.tk-input:focus,
.tk-select:focus,
.tk-textarea:focus {
  outline: none;
  border-color: var(--tk-moss-400);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(74, 156, 115, 0.16);
}

.tk-field { margin-bottom: 1.15rem; }

/* ─────────────────────────────────────────────────────────────
   Navbar pública
   ───────────────────────────────────────────────────────────── */
.tk-nav {
  background: var(--tk-forest-900);
  padding: .85rem 0;
  position: sticky;
  top: 0;
  z-index: 40;
}
.tk-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.tk-nav-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: #fff;
  text-decoration: none;
  line-height: 1.1;
}
.tk-nav-brand strong {
  font-family: var(--tk-font-display);
  font-size: 1.15rem;
  font-weight: 700;
  display: block;
}
.tk-nav-brand span {
  font-size: .65rem;
  letter-spacing: .1em;
  color: var(--tk-moss-300);
  text-transform: uppercase;
}
.tk-nav-links {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}
.tk-nav-links a {
  color: rgba(255,255,255,.82);
  font-weight: 500;
  font-size: .86rem;
  text-decoration: none;
}
.tk-nav-links a:hover,
.tk-nav-links a.tk-nav-active { color: #fff; }

/* ─────────────────────────────────────────────────────────────
   Navegación inferior — patrón app / PWA (solo mobile)

   Antes era position:fixed con un padding-bottom "adivinado" (o incluso
   medido en JS) en el contenido para no taparlo. Eso nunca termina de
   ser confiable: con navegadores móviles la altura de viewport (100vh)
   cambia según se oculte/muestre la barra de direcciones, y cualquier
   cálculo de padding puede quedar corto según el contenido dinámico de
   cada pantalla.

   Ahora en mobile TODO el body es un flex column de altura 100dvh
   (dynamic viewport height — sigue el tamaño real visible, no el
   nominal): el nav de arriba y el de abajo son filas normales del
   flujo (flex-shrink:0, nunca position:fixed), y .tk-scroll-area en
   el medio es la única que scrollea (overflow-y:auto). No hay ningún
   padding que calcular: el bottom-nav ocupa su lugar real como
   cualquier otro elemento, así que jamás puede superponerse a nada.
   ───────────────────────────────────────────────────────────── */
.tk-bottom-nav {
  display: flex;
  flex-shrink: 0;
  background: #fff;
  border-top: 1px solid var(--tk-stone-200);
  box-shadow: 0 -6px 20px rgba(15,47,34,.08);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.tk-bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
  padding: .55rem .25rem .5rem;
  color: var(--tk-bark-600);
  text-decoration: none;
  font-size: .64rem;
  font-weight: 600;
  text-align: center;
}
.tk-bottom-nav a.active { color: var(--tk-forest-700); }
.tk-bottom-icon { font-size: 1.15rem; line-height: 1; }

@media (max-width: 767px) {
  .tk-body.tk-app-shell {
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .tk-body.tk-app-shell .tk-nav { flex-shrink: 0; }
  .tk-body.tk-app-shell .tk-scroll-area {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ─────────────────────────────────────────────────────────────
   Hero (login / register)
   ───────────────────────────────────────────────────────────── */
.tk-auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
@media (max-width: 900px) {
  .tk-auth-wrap { grid-template-columns: 1fr; }
  .tk-auth-visual { display: none; }
}

.tk-auth-visual {
  position: relative;
  background: linear-gradient(180deg, rgba(15,47,34,.15), rgba(15,47,34,.78)), var(--tk-img, none);
  background-size: cover;
  background-position: center;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
}
.tk-auth-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15,47,34,.9) 0%, rgba(15,47,34,0) 45%);
  pointer-events: none;
}
.tk-auth-visual > * { position: relative; z-index: 1; }

.tk-auth-quote {
  max-width: 26rem;
  font-family: var(--tk-font-display);
  font-size: 1.5rem;
  line-height: 1.35;
}

.tk-auth-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
}
.tk-auth-box { width: 100%; max-width: 26rem; }

.tk-logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--tk-shadow-soft);
  overflow: hidden;
}

/* ─────────────────────────────────────────────────────────────
   Alerts
   ───────────────────────────────────────────────────────────── */
.tk-alert {
  border-radius: var(--tk-radius-sm);
  padding: .85rem 1.1rem;
  font-size: .88rem;
  font-weight: 500;
  margin-bottom: 1rem;
  border: 1px solid transparent;
}
.tk-alert-danger  { background: #fdeceb; color: #8a2d1c; border-color: #f6c9c1; }
.tk-alert-success { background: #e9f6ef; color: #1c5c40; border-color: #bfe4d0; }
.tk-alert-info    { background: #e8f3f5; color: #14515c; border-color: #bcdde3; }

/* ─────────────────────────────────────────────────────────────
   Badges de estado
   ───────────────────────────────────────────────────────────── */
.tk-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .7rem;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.tk-badge::before {
  content: '';
  width: .45rem;
  height: .45rem;
  border-radius: 50%;
  background: currentColor;
}
.tk-badge-pending { background: #fdf3e2; color: var(--tk-sun-600); }
.tk-badge-done    { background: #e9f6ef; color: var(--tk-success); }
.tk-badge-cancel  { background: #fdeceb; color: var(--tk-danger); }

/* ─────────────────────────────────────────────────────────────
   KPI banda de kms
   ───────────────────────────────────────────────────────────── */
.tk-kms-banner {
  background: linear-gradient(120deg, var(--tk-forest-800), var(--tk-forest-600) 60%, var(--tk-moss-400));
  color: #fff;
  border-radius: var(--tk-radius-lg);
  padding: 1.5rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: var(--tk-shadow-soft);
}
.tk-kms-banner .tk-kms-value {
  font-family: var(--tk-font-display);
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1;
}
.tk-kms-banner .tk-kms-label {
  font-size: .82rem;
  color: rgba(255,255,255,.85);
}

/* ─────────────────────────────────────────────────────────────
   Tabla de registros
   ───────────────────────────────────────────────────────────── */
.tk-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 .6rem;
}
.tk-table thead th {
  text-transform: uppercase;
  font-size: .7rem;
  letter-spacing: .06em;
  color: var(--tk-bark-600);
  font-weight: 700;
  padding: 0 1rem .4rem;
  text-align: left;
}
.tk-table tbody tr {
  background: #fff;
  box-shadow: var(--tk-shadow-card);
}
.tk-table tbody td {
  padding: 1rem;
  vertical-align: middle;
  font-size: .88rem;
}
.tk-table tbody tr td:first-child { border-radius: var(--tk-radius-md) 0 0 var(--tk-radius-md); }
.tk-table tbody tr td:last-child  { border-radius: 0 var(--tk-radius-md) var(--tk-radius-md) 0; }

/* ─────────────────────────────────────────────────────────────
   Footer
   ───────────────────────────────────────────────────────────── */
.tk-footer {
  background: var(--tk-forest-900);
  color: rgba(255,255,255,.75);
  padding: 1.5rem 0;
  text-align: center;
  font-size: .82rem;
  margin-top: 3rem;
}
.tk-footer a { color: #fff; text-decoration: none; font-weight: 600; }
.tk-footer a:hover { text-decoration: underline; }

/* ─────────────────────────────────────────────────────────────
   Utilidades
   ───────────────────────────────────────────────────────────── */
.tk-container { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }
.tk-mt-lg { margin-top: 2rem; }
.tk-fade-in { animation: tkFadeIn .5s ease both; }
@keyframes tkFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
