/*
 * Fichadiez - estilo propio sobre Tabler 1.8
 * Colores y tipografía tomados de la plantilla iLanding:
 *   acento #0d83fd, títulos #2d465e, fondo claro #f3f9ff.
 */

/* ---------- Fuentes alojadas en el propio proyecto ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url("../fonts/nunito-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url("../fonts/nunito-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Variables de marca ---------- */
:root {
  --ch-acento: #0d83fd;
  --ch-titulos: #2d465e;
  --ch-fondo-claro: #f3f9ff;
  --ch-lateral: #2d465e;

  /* Estados del fichaje */
  --ch-entrada: var(--tblr-success);
  --ch-pausa: var(--tblr-warning);
  --ch-salida: var(--tblr-danger);

  --tblr-primary: #0d83fd;
  --tblr-primary-rgb: 13, 131, 253;
  --tblr-font-sans-serif: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ch-font-titulos: "Nunito", "Inter", system-ui, sans-serif;
}

:root:not([data-bs-theme="dark"]) {
  --tblr-body-bg: var(--ch-fondo-claro);
}

body {
  font-feature-settings: "cv03", "cv04", "cv11";
}

h1, h2, h3, .h1, .h2, .h3, .page-title, .card-title, .navbar-brand {
  font-family: var(--ch-font-titulos);
}

:root:not([data-bs-theme="dark"]) :is(h1, h2, h3, .h1, .h2, .h3, .page-title) {
  color: var(--ch-titulos);
}

/* ---------- Menú lateral ---------- */
.navbar-vertical.ch-lateral {
  background: var(--ch-lateral);
}

.ch-lateral .navbar-brand {
  font-weight: 800;
  letter-spacing: -0.01em;
}

.ch-lateral .nav-link.active,
.ch-lateral .nav-item.active > .nav-link {
  color: #fff;
  background: rgba(13, 131, 253, 0.28);
  border-radius: var(--tblr-border-radius);
}

.ch-lateral .nav-link.disabled {
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- Pantalla de fichaje ---------- */
.ch-reloj {
  font-variant-numeric: tabular-nums;
  font-size: clamp(3rem, 12vw, 5.5rem);
  font-weight: 700;
  line-height: 1;
  color: var(--ch-titulos);
  letter-spacing: -0.03em;
}

[data-bs-theme="dark"] .ch-reloj {
  color: var(--tblr-body-color);
}

.ch-horas {
  font-variant-numeric: tabular-nums;
}

.ch-boton-fichar {
  min-height: 4.5rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.ch-boton-fichar .ti {
  font-size: 1.6rem;
}

.ch-estado {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.ch-estado::before {
  content: "";
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: currentColor;
}

.ch-estado-entrada { color: var(--ch-entrada); }
.ch-estado-pausa   { color: var(--ch-pausa); }
.ch-estado-justificada { color: var(--tblr-cyan); }
.ch-estado-salida  { color: var(--ch-salida); }

.ch-tramo {
  height: 0.6rem;
  border-radius: 999px;
}

/* ---------- Login ---------- */
.ch-login {
  background:
    radial-gradient(circle at 15% 10%, rgba(13, 131, 253, 0.12), transparent 40%),
    var(--ch-fondo-claro);
}

[data-bs-theme="dark"] .ch-login {
  background: var(--tblr-body-bg);
}

.ch-marca {
  font-family: var(--ch-font-titulos);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--ch-titulos);
}

[data-bs-theme="dark"] .ch-marca {
  color: var(--tblr-body-color);
}

.ch-marca .ti {
  color: var(--ch-acento);
}

/* Primera letra en mayúscula (fechas largas) */
.ch-mayuscula::first-letter { text-transform: uppercase; }

/* ---------- Logotipo ---------- */
.ch-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  line-height: 1;
}

.ch-logo svg { flex: none; }

.ch-logo-texto {
  font-family: var(--ch-font-titulos);
  font-weight: 800;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.ch-logo-ficha { color: var(--ch-titulos); }
.ch-logo-diez { color: var(--ch-acento); }
.ch-logo-blanco .ch-logo-ficha { color: #fff; }
.ch-logo-blanco .ch-logo-diez { color: #5fb0ff; }

[data-bs-theme="dark"] .ch-logo-color .ch-logo-ficha { color: var(--tblr-body-color); }

.ch-marca .ch-logo { font-size: 1.6rem; }

/* Campo trampa de los formularios públicos (anti-bots) */
.ch-trampa { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* Botón enviando: spinner bien visible aunque esté desactivado */
.btn.btn-loading:disabled { opacity: .85; }

/* Selector de empresa activa del superadministrador (cabecera) */
.ch-empresa-activa .form-select { max-width: 22rem; min-width: 12rem; font-weight: 500; }
@media (max-width: 575.98px) { .ch-empresa-activa .form-select { max-width: 11rem; min-width: 0; } }
