/* App del trabajador (mobile-first) */
.app { max-width: 480px; margin: 0 auto; min-height: 100dvh; padding: 0 16px calc(96px + env(safe-area-inset-bottom)); }

/* ---------- Login ---------- */
.login { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 32px 4px; }
.login .logo { width: 168px; margin-bottom: 40px; }
.login h1 { font-size: 40px; margin: 10px 0 8px; }
.login .bajada { margin-bottom: 28px; }
.login .pin { letter-spacing: .5em; font-size: 22px; font-weight: 700; }
.login .pie { margin-top: 28px; font-size: 12px; color: var(--piedra); text-align: center; }

/* ---------- Encabezado ---------- */
.top { display: flex; align-items: center; justify-content: space-between; padding: calc(14px + env(safe-area-inset-top)) 0 14px; }
.top .logo { width: 128px; display: block; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--charcoal); color: var(--amarillo);
  display: grid; place-items: center; font-weight: 700; font-size: 14px; border: 0; cursor: pointer; text-decoration: none;
}

/* ---------- Hero / reloj ---------- */
.hero { position: relative; overflow: hidden; padding: 22px 20px 20px; }
.hero::after {
  content: ''; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(254, 223, 14, .18), transparent 70%); pointer-events: none;
}
.hero .saludo { font-size: 20px; font-weight: 700; margin-top: 6px; }
.hero .reloj { font-size: clamp(52px, 17vw, 72px); font-weight: 800; letter-spacing: -.02em; line-height: 1; margin: 18px 0 4px; font-variant-numeric: tabular-nums; }
.hero .reloj .seg { color: var(--amarillo); }
.hero .fecha { color: #B9B2A0; font-weight: 500; }
.hero .fecha::first-letter { text-transform: uppercase; }
.turno-hoy { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 12px 14px; border-radius: 14px; background: var(--charcoal-2); }
.turno-hoy svg { flex: none; color: var(--amarillo); }
.turno-hoy b { display: block; font-size: 15px; }
.turno-hoy span { font-size: 12px; color: #B9B2A0; }

.marcar { margin-top: 18px; display: grid; gap: 10px; }
.boton-marcar {
  width: 100%; height: 76px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--amarillo); color: var(--tinta);
  font-weight: 800; font-size: 17px; letter-spacing: .12em; text-transform: uppercase;
  box-shadow: 0 10px 28px rgba(254, 223, 14, .28), inset 0 -4px 0 rgba(0, 0, 0, .12);
  transition: transform .08s ease;
}
.boton-marcar:active { transform: scale(.97); }
.boton-marcar:disabled { opacity: .6; }
.boton-marcar.listo { background: var(--charcoal-2); color: #B9B2A0; box-shadow: none; cursor: default; }
.geo { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: #B9B2A0; min-height: 18px; }
.geo.mal { color: #F2A99B; }
.geo.bien { color: #9FD7B0; }

/* ---------- Secciones ---------- */
.seccion { margin-top: 22px; }
.seccion > .kicker { display: block; margin: 0 4px 10px; }

.linea-tiempo { list-style: none; margin: 0; padding: 0; }
.linea-tiempo li { display: grid; grid-template-columns: 56px 18px 1fr; align-items: center; gap: 8px; padding: 9px 0; position: relative; }
.linea-tiempo .hora { font-weight: 700; font-variant-numeric: tabular-nums; }
.linea-tiempo .punto { width: 12px; height: 12px; border-radius: 50%; background: var(--amarillo); box-shadow: 0 0 0 3px var(--charcoal); justify-self: center; }
.linea-tiempo li:not(:last-child)::after { content: ''; position: absolute; left: 72px; top: calc(50% + 9px); width: 2px; height: calc(100% - 18px); background: var(--linea); }
.linea-tiempo .que { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-weight: 500; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--papel); border: 1px solid var(--linea); border-radius: 16px; padding: 14px 12px; }
.stat b { display: block; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat span { font-size: 11px; color: var(--piedra); font-weight: 500; }
.barra { height: 10px; border-radius: 999px; background: var(--linea); overflow: hidden; margin: 10px 0 6px; }
.barra i { display: block; height: 100%; background: var(--charcoal); border-radius: 999px; transition: width .6s ease; }
.barra i.sobre { background: var(--amarillo); }

/* ---------- Mis horas ---------- */
.mes-nav { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 16px; }
.mes-nav h2 { text-transform: capitalize; }
.mes-nav button { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--linea); background: var(--papel); cursor: pointer; font-size: 18px; }
.mes-nav button:disabled { opacity: .3; }
.dias { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dia { background: var(--papel); border: 1px solid var(--linea); border-radius: 16px; padding: 12px 14px; display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.dia .f { font-weight: 700; }
.dia .f::first-letter { text-transform: uppercase; }
.dia .t { font-size: 12px; color: var(--piedra); }
.dia .hrs { font-weight: 800; font-size: 18px; text-align: right; font-variant-numeric: tabular-nums; }
.dia .marcas-dia { grid-column: 1 / -1; font-size: 12px; color: var(--piedra); font-variant-numeric: tabular-nums; }

/* ---------- Solicitudes ---------- */
.tipos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tipo-btn {
  text-align: left; border: 1px solid var(--linea); background: var(--papel); border-radius: 18px; padding: 16px 14px; cursor: pointer;
  display: grid; gap: 8px; transition: transform .08s ease, border-color .15s ease;
}
.tipo-btn:hover { border-color: var(--charcoal); }
.tipo-btn:active { transform: scale(.98); }
.tipo-btn .ico { width: 36px; height: 36px; border-radius: 12px; background: var(--amarillo); display: grid; place-items: center; }
.tipo-btn b { font-size: 14px; }
.tipo-btn span { font-size: 12px; color: var(--piedra); line-height: 1.35; }
.lista-sol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sol { background: var(--papel); border: 1px solid var(--linea); border-radius: 16px; padding: 12px 14px; display: grid; gap: 4px; }
.sol .cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* ---------- Perfil ---------- */
.perfil-cab { display: flex; align-items: center; gap: 14px; margin: 6px 0 18px; }
.perfil-cab .avatar { width: 64px; height: 64px; font-size: 22px; cursor: default; }
.datos { list-style: none; margin: 0; padding: 0; }
.datos li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--linea); font-size: 14px; }
.datos li span { color: var(--piedra); }
.datos li b { font-weight: 600; text-align: right; }
.acciones-perfil { display: grid; gap: 10px; margin-top: 20px; }

/* ---------- Navegación inferior ---------- */
.nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom));
  width: min(448px, calc(100% - 32px)); background: var(--charcoal); border-radius: 22px; padding: 8px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; z-index: 50; box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
}
.nav a {
  display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border-radius: 14px; text-decoration: none;
  color: #B9B2A0; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
.nav a.activo { background: var(--amarillo); color: var(--tinta); }
.nav svg { width: 22px; height: 22px; }

/* ---------- Confirmación de marca ---------- */
.exito {
  position: fixed; inset: 0; z-index: 95; background: var(--amarillo); color: var(--tinta);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 32px;
  animation: subir .35s cubic-bezier(.2, .9, .3, 1.1);
}
.exito .check { width: 112px; height: 112px; border-radius: 50%; background: var(--tinta); display: grid; place-items: center; margin-bottom: 26px; animation: latido .5s .15s ease both; }
.exito .check svg { width: 56px; height: 56px; stroke: var(--amarillo); stroke-dasharray: 60; stroke-dashoffset: 60; animation: trazo .45s .3s ease forwards; }
.exito .kicker { color: var(--tinta); opacity: .7; }
.exito h1 { font-size: 64px; color: var(--tinta); margin: 6px 0 12px; font-variant-numeric: tabular-nums; }
.exito p { font-size: 17px; font-weight: 500; max-width: 340px; }
.exito .comp { margin-top: 26px; font-size: 12px; letter-spacing: .14em; font-weight: 600; text-transform: uppercase; opacity: .75; }
.exito .btn { margin-top: 28px; }
@keyframes subir { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes latido { 0% { transform: scale(.4); } 70% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes trazo { to { stroke-dashoffset: 0; } }

/* ---------- Demo ---------- */
.banda-demo {
  margin: 0 -16px; padding: calc(8px + env(safe-area-inset-top)) 16px 8px; background: var(--amarillo); color: var(--tinta);
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
}
.banda-demo button { border: 0; background: var(--tinta); color: var(--amarillo); border-radius: 999px; padding: 6px 12px; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.banda-demo + .top { padding-top: 14px; }
.login.demo { justify-content: flex-start; padding-top: 48px; }
.login.demo .logo { margin-bottom: 28px; }
.roles { display: grid; gap: 12px; }
.rol {
  display: grid; grid-template-columns: 48px 1fr 20px; gap: 14px; align-items: center; text-align: left; text-decoration: none; color: inherit;
  background: var(--papel); border: 1.5px solid var(--linea); border-radius: 20px; padding: 16px; cursor: pointer;
  transition: border-color .15s ease, transform .08s ease, box-shadow .15s ease;
}
.rol:hover { border-color: var(--charcoal); box-shadow: var(--sombra); }
.rol:active { transform: scale(.98); }
.rol:disabled { opacity: .5; cursor: not-allowed; }
.rol .ico { width: 48px; height: 48px; border-radius: 14px; background: var(--amarillo); display: grid; place-items: center; font-size: 22px; }
.rol .txt { display: grid; gap: 3px; }
.rol .txt b { font-size: 16px; font-weight: 800; }
.rol .txt span { font-size: 13px; color: var(--piedra); line-height: 1.4; }
.rol .txt small { font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--charcoal); margin-top: 2px; }
.rol .flecha { font-size: 20px; font-weight: 700; color: var(--piedra); }
.rol:hover .flecha { color: var(--tinta); }
