
:root {
  --sidebar-blue: #0d47a1;
  --sidebar-blue-dark: #08306b;
  --sidebar-blue-hover: rgba(255,255,255,.16);
}

body { background: #f4f6f9; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 260px; min-height: 100vh; position: fixed; left: 0; top: 0; z-index: 10; }
.sidebar-blue { background: linear-gradient(180deg, var(--sidebar-blue) 0%, var(--sidebar-blue-dark) 100%); }
.sidebar-border { border-color: rgba(255,255,255,.20) !important; }
.sidebar-divider { border-color: rgba(255,255,255,.25); opacity: 1; }
.sidebar .nav-link { border-radius: .5rem; margin-bottom: .25rem; font-weight: 500; transition: background .15s ease-in-out; }
.sidebar .nav-link:hover, .sidebar .nav-link:focus { background: var(--sidebar-blue-hover); }
.content { margin-left: 260px; width: calc(100% - 260px); }
.card-kpi { border: 0; border-radius: 1rem; box-shadow: 0 .25rem 1rem rgba(0,0,0,.06); }
.video-box { width: 100%; max-width: 480px; border-radius: 1rem; overflow: hidden; background: #111; }
.video-box video, .video-box canvas { width: 100%; display: block; }
@media (max-width: 767px) {
  .sidebar { transform: translateX(-100%); transition: .2s; }
  .sidebar.open { transform: translateX(0); }
  .content { margin-left: 0; width: 100%; }
}

.dashboard-table { max-height: 62vh; overflow: auto; }
.dashboard-list { max-height: 38vh; overflow: auto; }
.table td, .table th { vertical-align: middle; }

.avatar-empleado {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(0,0,0,.12);
  flex: 0 0 34px;
  display: inline-block;
}
.dashboard-list .avatar-empleado {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
}
.table .avatar-empleado {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
}
.avatar-empleado-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e9ecef;
  color: #495057;
  font-weight: 700;
  font-size: .85rem;
}
.sidebar-nav { overflow-y: auto; }
.sidebar-user-photo {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,.35);
  flex: 0 0 38px;
  display: inline-block;
}
.sidebar-user-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.18);
  color: #fff;
  font-weight: 700;
}
.sidebar-user-name,
.sidebar-user-role {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 168px;
}

/* AJUSTE: fuerza fotos compactas en dashboard/sidebar */
img.avatar-empleado,
.avatar-empleado {
  width: 34px !important;
  height: 34px !important;
  max-width: 34px !important;
  max-height: 34px !important;
  object-fit: cover !important;
  display: inline-block !important;
  border-radius: 8px !important;
}
.table img.avatar-empleado,
.table .avatar-empleado {
  width: 32px !important;
  height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
}
.dashboard-list img.avatar-empleado,
.dashboard-list .avatar-empleado {
  width: 34px !important;
  height: 34px !important;
  max-width: 34px !important;
  max-height: 34px !important;
}
img.sidebar-user-photo,
.sidebar-user-photo {
  width: 38px !important;
  height: 38px !important;
  max-width: 38px !important;
  max-height: 38px !important;
  object-fit: cover !important;
  display: inline-block !important;
}

/* POST 013: sidebar/icons/modal/foto definitiva */
.sidebar .nav-link i { width: 1.25rem; text-align: center; }
.sidebar-user { overflow: hidden; }
.sidebar-user-row { min-width: 0; max-width: 100%; }
.sidebar-user img.sidebar-user-photo,
.sidebar-user .sidebar-user-photo,
aside.sidebar img.sidebar-user-photo {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  min-height: 38px !important;
  max-width: 38px !important;
  max-height: 38px !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  display: inline-flex !important;
  border-radius: 8px !important;
  flex: 0 0 38px !important;
}
.checador-status-inline { min-height: 42px; }
.modal-resultado-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}
.modal-resultado-ok { background: #d1e7dd; color: #0f5132; }
.modal-resultado-error { background: #f8d7da; color: #842029; }


/* POST 015: checador continuo sin recargar, cámara visible */
.video-box video {
  min-height: 150px;
  max-height: 260px;
  object-fit: cover;
  background: #111;
}

/* POST 016: dashboard por sucursal y semáforo */
.semaforo-dot {
  width: .85rem;
  height: .85rem;
  border-radius: 999px;
  display: inline-block;
  vertical-align: middle;
  margin-right: .35rem;
  border: 1px solid rgba(0,0,0,.12);
}
.semaforo-green { background: #198754; }
.semaforo-yellow { background: #ffc107; }
.semaforo-red { background: #dc3545; }
.dashboard-employee-table tbody tr.dashboard-row-green > td { background: rgba(25,135,84,.08); }
.dashboard-employee-table tbody tr.dashboard-row-yellow > td { background: rgba(255,193,7,.18); }
.dashboard-employee-table tbody tr.dashboard-row-red > td { background: rgba(220,53,69,.10); }
.dashboard-sucursales .accordion-button { background: #fff; }
.dashboard-sucursales .accordion-button:not(.collapsed) { background: #f8fbff; box-shadow: none; }
.chart-row { margin-bottom: .85rem; }
.chart-track {
  width: 100%;
  height: 14px;
  background: #e9ecef;
  border-radius: 999px;
  overflow: hidden;
}
.chart-bar { height: 100%; border-radius: 999px; }
.chart-green { background: #198754; }
.chart-yellow { background: #ffc107; }
.chart-red { background: #dc3545; }
.top-absence-card {
  border: 1px solid #dee2e6;
  border-radius: 14px;
  padding: 1rem;
  background: #fff;
  height: 100%;
}
.top-absence-rank {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  background: #f8d7da;
  color: #842029;
  margin-bottom: .5rem;
}


.biometria-panel{border-color:#d8e0ea!important}
.biometria-foto-base{width:46px!important;height:46px!important;max-width:46px!important;max-height:46px!important;object-fit:cover!important;border-radius:10px!important;border:1px solid #cfd8e3!important;flex:0 0 46px!important;background:#fff}
.biometria-foto-placeholder{display:inline-flex;align-items:center;justify-content:center;color:#dc3545;background:#fff5f5!important}

/* POST 019: login biométrico */
.login-bio-panel {
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 1rem;
  background: #f8f9fa;
  padding: .75rem;
}
.login-bio-video {
  width: 100%;
  max-height: 230px;
  object-fit: cover;
  border-radius: .75rem;
  background: #111;
  display: block;
}

/* POST 020: login alineado al estilo del sistema */
.login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.18), transparent 32%),
    linear-gradient(135deg, var(--sidebar-blue-dark) 0%, var(--sidebar-blue) 48%, #1976d2 100%);
}
.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.login-card {
  width: 100%;
  max-width: 430px;
  border-radius: 1.5rem;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
}
.login-logo {
  width: 210px;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto .65rem;
}
.login-title {
  font-weight: 800;
  color: #12213f;
}
.login-subtitle {
  color: #64748b;
  font-size: .95rem;
}
.login-input-group .input-group-text {
  background: #fff;
  color: var(--sidebar-blue);
  border-right: 0;
}
.login-input-group .form-control {
  border-left: 0;
}
.login-input-group .form-control:focus {
  box-shadow: none;
  border-color: #86b7fe;
}
.login-bio-panel {
  border: 1px solid rgba(13,71,161,.18);
  border-radius: 1rem;
  background: #f8fbff;
  padding: .75rem;
}
.login-bio-video {
  width: 100%;
  max-height: 230px;
  object-fit: cover;
  border-radius: .75rem;
  background: #111;
  display: block;
}


/* POST 021: cámara de checador con tamaño controlado */
.checador-video-box {
  width: 360px !important;
  max-width: 100% !important;
  height: 220px !important;
  max-height: 220px !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
  overflow: hidden !important;
  background: #111 !important;
  border-radius: 1rem !important;
}
.checador-video-box video#video,
.checador-video-box .checador-video {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 220px !important;
  object-fit: cover !important;
  display: block !important;
  position: static !important;
  transform: none !important;
  inset: auto !important;
}
.checador-video-box canvas {
  max-width: 100% !important;
  max-height: 220px !important;
}
@media (max-width: 575.98px) {
  .checador-video-box {
    width: 100% !important;
    height: 210px !important;
    max-height: 210px !important;
  }
}


/* POST 022: foto/evidencia de checador compacta; la cámara conserva su tamaño */
.checador-foto-evidencia,
img.checador-foto-evidencia {
  width: 72px !important;
  height: 54px !important;
  max-width: 72px !important;
  max-height: 54px !important;
  object-fit: cover !important;
  border-radius: 8px !important;
  border: 1px solid #d8dee6 !important;
  display: inline-block !important;
  background: #f8f9fa !important;
}
.checador-foto-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  text-decoration: none !important;
}
.checador-foto-preview,
img.checador-foto-preview {
  width: 100% !important;
  max-width: 360px !important;
  max-height: 260px !important;
  object-fit: contain !important;
  border-radius: 12px !important;
  border: 1px solid #d8dee6 !important;
  background: #f8f9fa !important;
  display: block !important;
}


/* POST 023: login compacto definitivo */
body.login-page{min-height:100vh;margin:0;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#0f4c97 0%,#1458ad 55%,#1976d2 100%)!important;overflow-x:hidden;}
.login-page .login-shell{width:100%;min-height:100vh;display:flex!important;align-items:center!important;justify-content:center!important;padding:24px!important;}
.login-page .login-card{width:100%!important;max-width:430px!important;border-radius:24px!important;background:#fff!important;box-shadow:0 18px 46px rgba(15,76,151,.28)!important;overflow:hidden!important;}
.login-page .login-card .card-body{padding:32px!important;}
.login-page .login-logo{width:150px!important;max-width:150px!important;height:auto!important;max-height:86px!important;object-fit:contain!important;display:block!important;margin:0 auto 12px!important;}
.login-page .login-title{font-size:1.35rem!important;font-weight:800!important;color:#12213f!important;}
.login-page .login-subtitle{font-size:.9rem!important;color:#64748b!important;}
.login-page .login-input-group .form-control,.login-page .login-input-group .input-group-text{height:48px!important;font-size:.95rem!important;}
.login-page .login-bio-panel{display:none;border:1px solid rgba(13,71,161,.18);border-radius:14px;background:#f8fbff;padding:10px;margin-bottom:12px;}
.login-page .login-bio-panel.is-active{display:block!important;}
.login-page .login-bio-video{width:100%!important;height:190px!important;max-height:190px!important;object-fit:cover!important;border-radius:12px!important;background:#111!important;display:block!important;}
.login-page #btnBioLogin,.login-page #btnPasswordLogin{height:48px!important;font-weight:700!important;}
.login-page #btnMostrarPassword{height:38px!important;}
@media(max-width:575px){.login-page .login-shell{padding:14px!important}.login-page .login-card .card-body{padding:24px 18px!important}.login-page .login-logo{width:128px!important;max-width:128px!important}.login-page .login-bio-video{height:170px!important}}


/* POST 024: fix definitivo de foto base del expediente en checador */
.checador-foto-base-expediente,
img.checador-foto-base-expediente,
.biometria-panel .biometria-foto-base,
.biometria-panel img.biometria-foto-base {
  width: 46px !important;
  height: 46px !important;
  min-width: 46px !important;
  max-width: 46px !important;
  min-height: 46px !important;
  max-height: 46px !important;
  object-fit: cover !important;
  border-radius: 10px !important;
  flex: 0 0 46px !important;
  display: block !important;
}
.biometria-panel { overflow: hidden !important; }
.biometria-panel .d-flex { align-items: center !important; }
.checador-camara-error-action { display: inline-flex; align-items: center; gap: .35rem; }


/* POST 025 - credenciales */
.sidebar-nav .nav-link i{width:18px;text-align:center;}
@media print{
  .sidebar,.navbar,.app-shell>.content>.container-fluid>nav{display:none!important;}
}

/* POST 026 - Checador visual mejorado */
.checador-page-head{
  display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;
}
.checador-live-pill{
  display:inline-flex;align-items:center;gap:.5rem;background:#e8f1ff;color:#0f4c97;border:1px solid #bfdbfe;border-radius:999px;padding:.45rem .75rem;font-weight:700;font-size:.86rem;
}
.checador-main-card{border:0!important;border-radius:22px!important;box-shadow:0 14px 34px rgba(15,76,151,.10)!important;overflow:hidden;}
.checador-main-card .card-body{padding:1.15rem!important;}
.checador-hero{display:grid;grid-template-columns:1fr 210px;gap:1rem;align-items:stretch;margin-bottom:1rem;}
.checador-hero-main{display:flex;align-items:center;gap:.85rem;padding:1rem;border-radius:18px;background:linear-gradient(135deg,#f8fbff,#edf5ff);border:1px solid #dbeafe;}
.checador-hero-icon{width:52px;height:52px;border-radius:16px;background:#0f4c97;color:#fff;display:flex;align-items:center;justify-content:center;font-size:1.35rem;box-shadow:0 10px 20px rgba(15,76,151,.24);}
.checador-live-card{border-radius:18px;background:linear-gradient(135deg,#0f4c97,#1976d2);color:#fff;padding:1rem;display:flex;flex-direction:column;justify-content:center;box-shadow:0 14px 28px rgba(15,76,151,.22);}
.checador-clock{font-size:1.65rem;line-height:1;font-weight:800;letter-spacing:.02em;}
.checador-date{font-size:.82rem;opacity:.9;text-transform:capitalize;margin-top:.25rem;}
.checador-location{font-size:.78rem;margin-top:.65rem;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.20);border-radius:999px;padding:.35rem .55rem;white-space:normal;}
.checador-location.is-ok{background:rgba(25,135,84,.25);}
.checador-camera-panel{display:grid;grid-template-columns:360px 1fr;gap:1rem;align-items:stretch;border:1px solid #dbeafe;border-radius:18px;background:#f8fbff;padding:.85rem;}
.checador-camera-panel .checador-video-box{margin:0!important;}
.checador-camera-panel .biometria-panel{margin:0!important;height:100%;display:flex;flex-direction:column;justify-content:center;border-radius:16px!important;background:#fff!important;}
.checador-info-strip{display:flex;align-items:flex-start;gap:.65rem;border-radius:14px;background:#e7f8ff;border:1px solid #9ee7ff;color:#055160;padding:.85rem 1rem;font-size:.93rem;}
.checador-info-strip i{margin-top:.15rem;}
.checador-action-card{height:100%;border:1px solid #dce6f2;border-radius:18px;background:#fff;padding:1rem;box-shadow:0 6px 20px rgba(15,23,42,.045);transition:.18s ease;position:relative;overflow:hidden;}
.checador-action-card:before{content:"";position:absolute;inset:0 0 auto 0;height:4px;background:#0d6efd;}
.checador-action-card:hover{transform:translateY(-1px);box-shadow:0 10px 24px rgba(15,23,42,.075);}
.checador-action-title{display:flex;align-items:center;gap:.65rem;font-weight:800;margin-bottom:.55rem;color:#172033;}
.checador-action-icon{width:38px;height:38px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;background:#e8f1ff;color:#0f4c97;font-size:1.05rem;}
.checador-action-yellow:before{background:#ffc107}.checador-action-yellow .checador-action-icon{background:#fff7db;color:#946200;}
.checador-action-cyan:before{background:#0dcaf0}.checador-action-cyan .checador-action-icon{background:#dff9ff;color:#087990;}
.checador-action-red:before{background:#dc3545}.checador-action-red .checador-action-icon{background:#fff0f1;color:#b02a37;}
.checador-action-card .btn{border-radius:11px;font-weight:700;min-width:142px;}
.checador-status-inline .alert{border-radius:14px;margin-bottom:0;}
.checador-side-card{border:0!important;border-radius:18px!important;box-shadow:0 10px 26px rgba(15,23,42,.07)!important;}
.checador-side-card .card-body{padding:1rem!important;}
@media(max-width:991.98px){.checador-hero{grid-template-columns:1fr}.checador-live-card{min-height:110px}.checador-camera-panel{grid-template-columns:1fr}.checador-camera-panel .checador-video-box{width:100%!important}}
@media(max-width:575.98px){.checador-main-card .card-body{padding:.85rem!important}.checador-hero-main{align-items:flex-start}.checador-clock{font-size:1.35rem}.checador-action-card{padding:.85rem}.checador-action-card .btn{width:100%;}}


/* POST 029: privacidad login y no traducción */
.login-autofill-decoy{position:absolute!important;left:-9999px!important;top:-9999px!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important;}
input[data-lpignore="true"]::-ms-reveal,input[data-lpignore="true"]::-ms-clear{display:none!important;}
.notranslate{translate:no;}

/* POST 030: usuarios/números siempre en mayúsculas */
#loginUsuario, .login-input-uppercase { text-transform: uppercase !important; }
