/* DraveX · Turno: la app de fichar. Oscura, de cristal y pensada para el pulgar. */
:root {
  --fondo: #050505;
  --texto: #f5efe6;
  --texto-2: rgba(245, 239, 230, .68);
  --texto-3: rgba(245, 239, 230, .42);
  --linea: rgba(245, 239, 230, .09);
  --verde: #34d17a;
  --verde-2: #8ff0b0;
  --rojo: #ff8f80;
  --curva: cubic-bezier(.32, .72, 0, 1);
  --muelle: cubic-bezier(.34, 1.45, .55, 1);
  --fuente: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Inter, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--fondo); color: var(--texto); font: 16px/1.4 var(--fuente); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
body { min-height: 100dvh; overscroll-behavior-y: none; }
button { font: inherit; color: inherit; }
.fondo { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.fondo i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; animation: flota 18s ease-in-out infinite alternate; }
.fondo i:first-child { width: 70vw; height: 70vw; left: -20vw; top: -18vw; background: radial-gradient(circle, rgba(233, 200, 155, .28), transparent 70%); }
.fondo i:last-child { width: 80vw; height: 80vw; right: -30vw; bottom: -20vw; background: radial-gradient(circle, rgba(52, 209, 122, .14), transparent 70%); animation-delay: -6s; }
@keyframes flota { to { transform: translate(6vw, 4vh) scale(1.08); } }

.app { width: 100%; max-width: 520px; margin: 0 auto; padding: calc(18px + env(safe-area-inset-top)) 18px calc(28px + env(safe-area-inset-bottom)); min-height: 100dvh; display: flex; flex-direction: column; }
.entra { animation: entra .7s var(--curva) both; }
@keyframes entra { from { opacity: 0; transform: translateY(14px) scale(.985); } }

.vidrio, .tarjeta, .cifra, .bloque, .pista { background: linear-gradient(180deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .025)), rgba(18, 16, 14, .55); -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 0 0 1px rgba(255, 255, 255, .05), 0 24px 60px -34px rgba(0, 0, 0, .9); }

/* código */
.tarjeta { margin: auto 0; padding: 34px 24px 26px; border-radius: 30px; }
.centro { text-align: center; }
.logo img { display: block; margin: 0 auto 14px; width: 72px; height: 72px; border-radius: 18px; box-shadow: 0 14px 40px -12px rgba(0, 0, 0, .9); }
h1 { margin: 0 0 6px; font-size: 30px; font-weight: 700; letter-spacing: -.025em; }
.sub { margin: 0 auto 22px; max-width: 300px; color: var(--texto-2); font-size: 15px; }
.codigo { display: grid; gap: 12px; }
.codigo input { width: 100%; height: 58px; border: 0; border-radius: 16px; background: rgba(0, 0, 0, .4); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); color: var(--texto); font: 600 26px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .32em; text-align: center; outline: 0; transition: box-shadow .25s; }
.codigo input:focus { box-shadow: inset 0 0 0 2px rgba(245, 239, 230, .55); }
.codigo input::placeholder { color: rgba(245, 239, 230, .18); }
.boton { height: 54px; border: 0; border-radius: 999px; background: linear-gradient(180deg, #fffdf9, #e4ded4 55%, #c9c2b7); color: #0b0a09; font-weight: 650; font-size: 16px; cursor: pointer; box-shadow: inset 0 1px 0 #fff, 0 14px 30px -14px rgba(255, 255, 255, .5); transition: transform .3s var(--muelle); }
.boton:active { transform: scale(.96); }
.error { min-height: 20px; margin: 12px 0 0; color: var(--rojo); font-size: 14px; text-align: center; }

/* PIN */
.pin { margin: auto 0; display: flex; flex-direction: column; align-items: center; }
.negocio { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 18px; padding: 6px 14px 6px 6px; border-radius: 999px; background: rgba(255, 255, 255, .07); color: var(--texto-2); font-size: 14px; font-weight: 560; }
.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 92%, #fff), color-mix(in srgb, var(--c) 70%, #000)); color: #0b0a09; font-size: 13px; font-weight: 750; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5); }
.puntos { display: flex; gap: 18px; margin: 18px 0 4px; }
.puntos i { width: 15px; height: 15px; border-radius: 50%; box-shadow: inset 0 0 0 1.6px rgba(245, 239, 230, .55); transition: background .2s, box-shadow .2s, transform .35s var(--muelle); }
.puntos i.lleno { background: var(--texto); box-shadow: 0 0 14px rgba(245, 239, 230, .55); transform: scale(1.08); }
.puntos.pensando i { animation: late 1s ease-in-out infinite; }
.puntos.pensando i:nth-child(2) { animation-delay: .1s; } .puntos.pensando i:nth-child(3) { animation-delay: .2s; } .puntos.pensando i:nth-child(4) { animation-delay: .3s; } .puntos.pensando i:nth-child(5) { animation-delay: .4s; }
@keyframes late { 50% { opacity: .35; transform: scale(.8); } }
.puntos.mal { animation: tiembla .45s cubic-bezier(.36, .07, .19, .97); }
@keyframes tiembla { 15%, 85% { transform: translateX(-3px); } 30%, 70% { transform: translateX(7px); } 45%, 55% { transform: translateX(-9px); } }
.teclado { display: grid; grid-template-columns: repeat(3, 78px); gap: 16px 26px; margin-top: 18px; }
.teclado button { width: 78px; height: 78px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); font-size: 32px; font-weight: 400; cursor: pointer; transition: background .5s; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.teclado button.pulsada { animation: tecla .45s ease-out; }
@keyframes tecla { 0% { background: rgba(255, 255, 255, .42); } 100% { background: rgba(255, 255, 255, .1); } }
.teclado .tecla-suave { background: none; box-shadow: none; font-size: 13px; line-height: 1.15; color: var(--texto-2); }
.teclado .tecla-suave[data-borrar] { font-size: 26px; }
.teclado .tecla-suave.pulsada { animation: none; opacity: .5; }

/* inicio */
.inicio { display: grid; gap: 14px; }
.cab { display: flex; align-items: center; gap: 11px; padding: 2px 2px 6px; }
.cab .avatar { width: 42px; height: 42px; font-size: 15px; }
.cab-t { flex: 1; min-width: 0; display: grid; }
.cab-neg { font-size: 12.5px; color: var(--texto-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cab-t b { font-size: 19px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.salir { height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .08); color: var(--texto-2); font-size: 14px; cursor: pointer; }

.reloj { position: relative; width: min(78vw, 300px); aspect-ratio: 1; margin: 6px auto 0; transition: transform .5s var(--muelle); }
.aro { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.aro circle { fill: none; stroke-width: 9; }
.aro-fondo { stroke: rgba(255, 255, 255, .08); }
.aro-luz { stroke: var(--texto-3); stroke-linecap: round; transition: stroke-dashoffset 1s linear, stroke .6s; }
.reloj.dentro .aro-luz { stroke: var(--verde); }
.fichar { position: absolute; inset: 18px; display: grid; place-content: center; justify-items: center; gap: 4px; border: 0; border-radius: 50%; cursor: pointer; background: radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, .16), rgba(255, 255, 255, .03) 60%), rgba(20, 18, 16, .7); -webkit-backdrop-filter: blur(26px) saturate(170%); backdrop-filter: blur(26px) saturate(170%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), inset 0 -12px 30px rgba(0, 0, 0, .35), 0 30px 70px -30px rgba(0, 0, 0, .95); transition: transform .45s var(--muelle), box-shadow .5s; touch-action: manipulation; }
.fichar:active { transform: scale(.955); }
.reloj.dentro .fichar { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), inset 0 -12px 30px rgba(0, 0, 0, .35), 0 0 0 1px rgba(52, 209, 122, .25), 0 30px 80px -30px rgba(52, 209, 122, .55); }
.fichar-estado { font-size: 13px; color: var(--texto-2); }
.fichar-tiempo { font-size: clamp(38px, 12vw, 50px); font-weight: 300; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.reloj:not(.dentro) .fichar-tiempo { color: var(--texto-3); }
.fichar-accion { margin-top: 8px; padding: 9px 18px; border-radius: 999px; font-size: 15px; font-weight: 650; color: #062612; background: linear-gradient(180deg, var(--verde-2), var(--verde)); box-shadow: 0 10px 24px -10px rgba(52, 209, 122, .9), inset 0 1px 0 rgba(255, 255, 255, .5); }
.reloj.dentro .fichar-accion { color: #2b0b06; background: linear-gradient(180deg, #ffc1b6, #ff7d6b); box-shadow: 0 10px 24px -10px rgba(255, 125, 107, .9), inset 0 1px 0 rgba(255, 255, 255, .5); }
.reloj.ocupado .fichar { animation: respira 1.2s ease-in-out infinite; }
@keyframes respira { 50% { transform: scale(.97); filter: brightness(1.15); } }
.reloj.hecho { animation: hecho .6s var(--muelle); }
@keyframes hecho { 40% { transform: scale(1.05); } }
.estado-ubi { min-height: 20px; margin: 0; text-align: center; font-size: 13.5px; color: var(--texto-2); }
.estado-ubi .mal { color: var(--rojo); }

.cifras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cifra { display: grid; gap: 2px; padding: 13px 14px; border-radius: 20px; }
.cifra span { font-size: 12px; color: var(--texto-3); }
.cifra b { font-size: 18px; font-weight: 650; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.bloque { padding: 16px; border-radius: 24px; }
.bloque h2 { margin: 0 0 12px; font-size: 15px; font-weight: 650; color: var(--texto-2); }
.barras { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 130px; align-items: end; }
.barra { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 5px; }
.barra-v { width: 100%; max-width: 30px; height: var(--h); min-height: 4px; border-radius: 8px; background: linear-gradient(180deg, rgba(245, 239, 230, .5), rgba(245, 239, 230, .18)); transform-origin: bottom; animation: crece .9s var(--curva) both; }
.barra.hoy .barra-v { background: linear-gradient(180deg, var(--verde-2), var(--verde)); box-shadow: 0 0 16px rgba(52, 209, 122, .45); }
@keyframes crece { from { transform: scaleY(0); } }
.barra-l { font-size: 12px; color: var(--texto-3); }
.barra.hoy .barra-l { color: var(--texto); font-weight: 700; }
.barra-n { min-height: 14px; font-size: 10.5px; color: var(--texto-3); font-variant-numeric: tabular-nums; }
.lista { list-style: none; margin: 0; padding: 0; display: grid; }
.lista li { display: flex; align-items: baseline; gap: 10px; padding: 10px 0; border-top: 1px solid var(--linea); font-size: 15px; }
.lista li:first-child { border-top: 0; padding-top: 2px; }
.lista-d { flex: 1; min-width: 0; }
.lista-h { font-variant-numeric: tabular-nums; font-weight: 600; }
.lista-h em { font-style: normal; color: var(--verde); }
.lista-n { font-size: 12.5px; color: var(--texto-3); }
.vacio { margin: 0; color: var(--texto-3); font-size: 14px; }
.pista { position: relative; display: grid; gap: 2px; padding: 14px 44px 14px 16px; border-radius: 20px; font-size: 14px; }
.pista span { color: var(--texto-2); }
.pista button { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .08); cursor: pointer; }
.pie { margin: 6px 4px 0; font-size: 12px; line-height: 1.5; color: var(--texto-3); text-align: center; }

@media (max-height: 700px) { .teclado { grid-template-columns: repeat(3, 68px); gap: 12px 24px; } .teclado button { width: 68px; height: 68px; font-size: 28px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
