/* ============================================================
   Bitácora de Flota — base + login tematizado.
   Mismo sistema visual que Control de Flota: la app interna se
   estiliza inline en app.jsx con el objeto THEME; aquí solo van
   el reset, las variables del tema y el login.
   — Eduardo Luna · 2026
   ============================================================ */

/* ---- Tokens del tema Rojo Corporativo (los usa el login y el fondo) ---- */
:root,
[data-theme="rojo"] {
  --page: #eef1f5;
  --page-grad:
    radial-gradient(1100px 600px at 85% -10%, #ffe6e6 0%, transparent 55%),
    radial-gradient(900px 600px at -10% 110%, #fde7ea 0%, transparent 50%);
  --card: #ffffff;
  --card-line: #e6eaf0;
  --line: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #cc2129;
  --accent-ink: #ffffff;
  --accent-soft: rgba(204, 33, 41, 0.12);
  --shadow: 0 30px 80px -40px rgba(15, 23, 42, 0.35);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--page-grad), var(--page);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
#root { width: 100%; }
input, select, button, textarea { font-family: inherit; }

/* Barra de gradiente animada (misma firma visual del ecosistema Unibot) */
@keyframes cf-grad-shift {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.cf-grad-bar {
  background-size: 200% 100%;
  animation: cf-grad-shift 4s linear infinite;
}

/* Spinner del visor de PDF. — Eduardo Luna · 2026 */
@keyframes cf-spin { to { transform: rotate(360deg); } }
.cf-spin { animation: cf-spin 0.8s linear infinite; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(120, 170, 220, 0.30); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================ LOGIN ============================ */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 34px 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  text-align: center;
}
.login-logo {
  height: 70px;
  width: auto;
  object-fit: contain;
  margin: 0 auto 4px;
  display: block;
}
.login-card h1 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.login-sub {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: -6px;
  margin-bottom: 6px;
}
.login-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
}
.login-card input {
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.login-card input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.login-card button {
  margin-top: 8px;
  padding: 12px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--accent-ink);
  background: var(--accent);
  transition: filter .15s, transform .05s;
}
.login-card button:hover { filter: brightness(1.06); }
.login-card button:active { transform: translateY(1px); }
.login-msg {
  font-size: 12.5px;
  color: var(--muted);
  min-height: 16px;
}

/* ============================ TABLET ============================ */
/* Optimizado para tabletas (768–1200px), pantalla táctil */
@media (max-width: 1200px) {
  .cf-outer { padding: 0 !important; }
  .cf-outer > div { border-radius: 0 !important; border-left: none !important; border-right: none !important; }
  .cf-card { border-radius: 0 !important; border-left: none !important; border-right: none !important; }

  input:not([type="checkbox"]),
  select,
  textarea {
    min-height: 48px !important;
    font-size: 15px !important;
    padding: 12px 14px !important;
  }
  .cf-outer h1 { font-size: 17px !important; }
  .login-card { max-width: 480px; padding: 40px 36px 32px; }
  .login-card input { min-height: 48px; font-size: 15px; }
  .login-card button { min-height: 52px; font-size: 16px; }
}

/* La tabla de la bitácora hace scroll dentro de su tarjeta en pantallas
   angostas; la página nunca desplaza horizontal. — Eduardo Luna · 2026 */
.cf-scroll-x { overflow-x: auto; }
