/* =====================================================
   ONTIMECHECK – SaaS UI KIT
   ===================================================== */

/* ===== VARIABLES ===== */
:root {
  --primary: #2563EB;
  --secondary: #38BDF8;
  --light-blue: #E0F2FE;
  --background: #F8FAFC;
  --text-main: #0F172A;
  --text-muted: #64748B;
  --success: #22C55E;
  --warning: #F59E0B;
  --danger: #EF4444;
  --white: #FFFFFF;
  --border: #E5E7EB;
}

/* ===== RESET ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--background);
  font-family: 'Inter', 'Segoe UI', sans-serif;
  color: var(--text-main);
  line-height: 1.6;
}

/* ===== BRAND / LOGO ===== */
.brand-otc{
  position:relative;
  display:flex;
  align-items:center;
  gap:12px;
}



/* CONTENEDOR PRINCIPAL */
.main-container {
    min-height: 80vh;
    padding-bottom: 40px;
}

/* FOOTER */
.footer-app {
    background: #f1f5f9;
    padding: 20px;
    color: #64748b;
}

/* OFFCANVAS MÁS MODERNO */
.offcanvas {
    border-right: none;
}

.offcanvas .btn {
    border-radius: 10px;
    padding: 10px;
}


/* ===== CONTAINERS ===== */
.container {
  max-width: 1200px;
  margin: auto;
  padding: 40px 20px;
}

/* ===== CARDS ===== */
.card {
  background: var(--white);
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  margin-bottom: 25px;
}

.card-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 15px;
}

/* ===== BOTONES ===== */
.btn {
  padding: 12px 18px;
  border-radius: 15px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: 0.25s;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: #1e4ed8;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--secondary);
  color: white;
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

/* ===== FORMULARIOS ===== */
.form-group {
  margin-bottom: 18px;
}

label {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-muted);
}

input, select {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-top: 6px;
  font-size: 15px;
  transition: 0.2s;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(56,189,248,0.2);
}

/* ===== TABLAS ===== */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  background: white;
  border-radius: 12px;
  overflow: hidden;
}

th {
  background: var(--light-blue);
  padding: 14px;
  text-align: left;
  font-weight: 600;
  color: var(--text-main);
}

td {
  padding: 14px;
  border-bottom: 1px solid var(--border);
}

tr:hover {
  background: #f1f5f9;
}

.table td {
  vertical-align: middle;
}

/* ===== DASHBOARD STATS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.stat-number {
  font-size: 30px;
  font-weight: 700;
}

.stat-label {
  opacity: 0.9;
  margin-top: 5px;
}

/* ===== LOGIN / AUTH ===== */
.auth-container {
  max-width: 420px;
  margin: 80px auto;
}

.auth-title {
  text-align: center;
  margin-bottom: 25px;
  font-size: 28px;
  font-weight: 700;
}

.auth-link {
  text-align: center;
  margin-top: 15px;
}

.auth-link a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

/* ===== ALERTAS ===== */
.alert {
  padding: 14px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.alert-success { background: #DCFCE7; color: #166534; }
.alert-error { background: #FEE2E2; color: #991B1B; }
.alert-warning { background: #FEF3C7; color: #92400E; }


/* ===== dashboard ===== */
.dashboard-hero{
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
}

.today-pill{
  background:white;
  padding:10px 18px;
  border-radius:30px;
  box-shadow:0 4px 14px rgba(0,0,0,0.08);
  font-weight:600;
}
/* ===== cartas menu ===== */

.stat-card{
  background: linear-gradient(135deg, #38BDF8, #2563EB);
  color:white;
  padding:28px;
  border-radius:20px;
  box-shadow:0 12px 26px rgba(0,0,0,0.18);
  transition:.25s;
}

.stat-card:hover{
  transform:translateY(-4px);
}

.stat-number{
  font-size:34px;
  font-weight:800;
}

.stat-label{
  opacity:.9;
  margin-top:6px;
}


.quick-actions .btn{
  border-radius:40px;
  font-weight:600;
  font-size:16px;
  box-shadow:0 6px 18px rgba(0,0,0,0.12);
  transition:.25s;
}

.quick-actions .btn:hover{
  transform:translateY(-3px);
}

/* ===== grafico ===== */
.chart-card{
  border-radius:22px;
  box-shadow:0 10px 28px rgba(0,0,0,0.10);
}


/*DASBOARD QUIEN ESTA EN BAse*/
/* ===== STAFF STATUS PREMIUM ===== */

.staff-status-card{
  border-radius:24px;
  padding:28px;
  box-shadow:0 12px 32px rgba(0,0,0,0.08);
}

.staff-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  margin-bottom:20px;
  gap:15px;
}

.staff-summary{
  display:flex;
  gap:10px;
}

.badge{
  padding:6px 12px;
  border-radius:20px;
  font-size:13px;
  font-weight:600;
}

.badge-in{
  background:rgba(34,197,94,0.12);
  color:var(--success);
}

.badge-missing{
  background:rgba(239,68,68,0.12);
  color:var(--danger);
}

.badge-out{
  background:rgba(100,116,139,0.12);
  color:var(--text-muted);
}

/* Scroll elegante */
.staff-list-scroll{
  max-height:360px;
  overflow-y:auto;
  padding-right:4px;
}

/* Filas */
.staff-row{
  padding:14px 0;
  border-bottom:1px solid var(--border);
  transition:.2s;
}

.staff-row:last-child{
  border-bottom:none;
}

.staff-row:hover{
  background:#f8fafc;
  border-radius:12px;
  padding-left:10px;
}

/* Layout interno */
.staff-left{
  display:flex;
  align-items:center;
  gap:14px;
}

.status-dot{
  width:12px;
  height:12px;
  border-radius:50%;
}

.dot-in{
  background:var(--success);
}

.dot-out{
  background:var(--text-muted);
}

.dot-missing{
  background:var(--danger);
}

.staff-name{
  font-weight:600;
}

.staff-time{
  font-size:14px;
}


.kiosco-wrapper{
    height:85vh;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
}

.kiosco-header{
    display:flex;
    justify-content:space-between;
    width:600px;
    margin-bottom:20px;
}

.fullscreen-btn{
    border:none;
    background:#333;
    color:white;
    padding:10px 15px;
    border-radius:6px;
    cursor:pointer;
}

.kiosco-card{
    width:600px;
    padding:40px;
    text-align:center;
    border-radius:15px;
    box-shadow:0 10px 30px rgba(0,0,0,0.1);
}

.reloj{
    font-size:40px;
    font-weight:bold;
    margin-bottom:20px;
}

.subtitle{
    color:#666;
    margin-bottom:20px;
}

.dni-input{
    width:100%;
    padding:20px;
    font-size:32px;
    text-align:center;
    border-radius:10px;
    border:2px solid #ddd;
    margin-bottom:20px;
}

.btn-fichar{
    width:100%;
    padding:18px;
    font-size:22px;
    border:none;
    border-radius:10px;
    background:#0d6efd;
    color:white;
    cursor:pointer;
}

.mensaje{
    margin-top:30px;
    font-size:28px;
    font-weight:bold;
}

.ok{
    color:green;
}

.error{
    color:red;
}

.bg-ok{
    background:#e8ffe8;
}

.bg-error{
    background:#ffe8e8;
}

/* ================================
   📅 HORARIOS CALENDARIO
================================ */

/* cajas de cada día */
.dia-box {
    border-radius: 8px;
    padding: 6px;
    transition: all 0.2s ease;
}

/* hover suave */
.celda-dia:hover .dia-box {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* hora */
.hora {
    font-size: 11px;
    opacity: 0.8;
}

/* ================================
   🔥 TABLA BASE (CLAVE)
================================ */

.table {
    border-collapse: separate !important;
    border-spacing: 0;
}

.table-responsive {
    overflow-x: auto;
    position: relative;
}

/* ================================
   🧊 COLUMNA FIJA REAL
   (usar .col-fija en HTML)
================================ */

.col-fija {
    position: sticky;
    left: 0;
    background: white;
    z-index: 10;
    min-width: 140px;
}

/* sombra lateral profesional */
.col-fija::after {
    content: "";
    position: absolute;
    right: -6px;
    top: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.15), transparent);
}

/* header más arriba que el resto */
th.col-fija {
    z-index: 11;
}

/* ================================
   🎯 FEEDBACK VISUAL CLICK
================================ */

.active-cell .dia-box {
    outline: 2px solid #0d6efd;
}

/* ================================
   📱 MOBILE
================================ */

@media (max-width: 768px) {

    .col-fija {
        min-width: 120px;
        font-size: 12px;
    }

    .dia-box {
        padding: 10px;
        font-size: 14px;
    }

    .hora {
        font-size: 12px;
    }

    td, th {
        min-width: 60px;
    }
}

/* ========================================
   LAYOUT SaaS
======================================== */

.app-layout{
    display:flex;
    min-height:100vh;
}

/* ===== SIDEBAR ===== */

.sidebar{
    width:280px;
    background:linear-gradient(
        180deg,
        #0f172a 0%,
        #111827 100%
    );
    color:white;
    flex-direction:column;
    position:sticky;
    top:0;
    height:100vh;
    border-right:1px solid rgba(255,255,255,0.05);
    box-shadow:
        8px 0 24px rgba(0,0,0,0.08);
    overflow-y:auto;
}

.sidebar-inner{
    display:flex;
    flex-direction:column;
    height:100%;
    padding:24px 18px;
}

.sidebar-brand{
    display:flex;
    align-items:center;
    gap:14px;
    margin-bottom:30px;
}

.sidebar-brand img{
    width:52px;
    height:52px;
    border-radius:16px;
}

.sidebar-brand h4{
    margin:0;
    font-size:22px;
    font-weight:700;
}

.sidebar-user{
    background:rgba(255,255,255,0.06);
    border-radius:16px;
    padding:14px;
    margin-bottom:30px;
    display:flex;
    flex-direction:column;
    gap:4px;
}

.sidebar-user small{
    opacity:.75;
}

.sidebar-user span{
    font-size:14px;
    font-weight:600;
}

.sidebar-section{

    margin-bottom:34px;
}

.sidebar-title{

    display:block;

    margin-bottom:14px;

    color:#64748b;

    font-size:11px;

    font-weight:800;

    letter-spacing:1.4px;

    text-transform:uppercase;

    padding-left:10px;
}

.sidebar-link{

    display:flex;

    align-items:center;

    gap:12px;

    color:#cbd5e1;

    text-decoration:none;

    padding:13px 14px;

    border-radius:16px;

    margin-bottom:8px;

    transition:.22s ease;

    font-weight:500;

    position:relative;
}

.sidebar-link:hover{

    background:rgba(255,255,255,0.06);

    color:white;

    transform:translateX(4px);
}


.sidebar-bottom{
    margin-top:auto;
}

.logout-link{
    color:#fca5a5;
}

.logout-link:hover{
    background:rgba(239,68,68,0.12);
    color:#fecaca;
}

/* ===== CONTENIDO ===== */

.content-area{
    flex:1;
    min-width:0;
    background:#f8fafc;
}

/* ===== MOBILE ===== */

@media (max-width: 991px){

    .content-area{
        width:100%;
    }

}

/* ========================================
   NAVBAR MOBILE CLEAN
======================================== */

.mobile-user{
    color:white;
    font-size:13px;
    opacity:.9;
}

.navbar-toggler{
    border:none;
    box-shadow:none !important;
}

.navbar-toggler:focus{
    box-shadow:none !important;
}

/* ========================================
   MOBILE OFFCANVAS PREMIUM
======================================== */

.offcanvas{

    background:linear-gradient(
        180deg,
        #0f172a 0%,
        #111827 100%
    );

    color:white;

    border-right:none;

    width:300px;
}

.mobile-user-card{

    background:rgba(255,255,255,0.06);

    border-radius:18px;

    padding:16px;

    margin-bottom:28px;
}

.mobile-section{

    margin-bottom:30px;
}

.mobile-section-title{

    display:block;

    font-size:11px;

    letter-spacing:1.4px;

    text-transform:uppercase;

    color:#64748b;

    margin-bottom:12px;

    padding-left:10px;

    font-weight:800;
}

.mobile-link{

    display:flex;

    align-items:center;

    gap:12px;

    padding:14px 16px;

    border-radius:16px;

    text-decoration:none;

    color:#cbd5e1;

    margin-bottom:8px;

    transition:.2s ease;

    font-weight:500;
}

.mobile-link:hover{

    background:rgba(255,255,255,0.06);

    color:white;

    transform:translateX(4px);
}

.logout-mobile{

    color:#fca5a5;
}

.logout-mobile:hover{

    background:rgba(239,68,68,0.12);

    color:#fecaca;
}

/* ========================================
   CONFIG SHORTCUTS
======================================== */

.config-shortcut{

    background:white;

    border-radius:22px;

    padding:22px;

    display:flex;

    justify-content:space-between;

    align-items:center;

    text-decoration:none;

    color:inherit;

    box-shadow:0 8px 22px rgba(0,0,0,0.06);

    transition:.22s ease;

    height:100%;
}

.config-shortcut:hover{

    transform:translateY(-4px);

    box-shadow:0 14px 30px rgba(0,0,0,0.10);

    color:inherit;
}

.config-shortcut h5{

    margin-bottom:6px;

    font-weight:700;
}

.config-shortcut small{

    color:#64748b;
}

.config-shortcut span{

    font-size:26px;

    opacity:.35;
}

/* ========================================
   SUCURSALES PREMIUM
======================================== */

.security-box{

    background:#f8fafc;

    border-radius:18px;

    padding:18px;

    border:1px solid #e2e8f0;
}

.security-item{

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:10px 0;

    border-bottom:1px solid #e5e7eb;
}

.security-item:last-child{
    border-bottom:none;
}

.security-item span{

    font-weight:600;

    color:#0f172a;
}

.security-item small{

    color:#64748b;

    font-weight:500;
}

/* ========================================
   EMPLEADOS PREMIUM TABLE
======================================== */

.employee-row{

    transition:.18s ease;
}

.employee-row:hover{

    background:#f8fafc;
}

.employee-name{

    font-size:15px;

    color:#0f172a;
}

.employee-role{

    background:#E0F2FE;

    color:#2563EB;
}

.table thead th{

    border-bottom:none;

    color:#64748b;

    font-size:13px;

    text-transform:uppercase;

    letter-spacing:.4px;

    font-weight:700;

    background:transparent;
}

.table td{

    vertical-align:middle;

    padding:18px 14px;

    border-color:#eef2f7;
}

/* ========================================
   DASHBOARD HERO PREMIUM
======================================== */

.dashboard-hero{

    background:white;

    border-radius:28px;

    padding:32px;

    box-shadow:
        0 12px 34px rgba(15,23,42,0.06);
}

.dashboard-hero-top{

    display:flex;

    justify-content:space-between;

    align-items:flex-start;

    gap:20px;

    margin-bottom:24px;

    flex-wrap:wrap;
}

.dashboard-label{

    display:inline-block;

    color:#64748b;

    font-size:12px;

    font-weight:700;

    letter-spacing:1.2px;

    margin-bottom:12px;
}

.dashboard-title{

    font-size:40px;

    font-weight:800;

    margin-bottom:10px;

    color:#0f172a;
}

.dashboard-subtitle{

    color:#64748b;

    margin:0;

    font-size:16px;
}

/* KPI */

.kpi-card{

    background:#f8fafc;

    border-radius:24px;

    padding:24px;

    display:flex;

    align-items:center;

    gap:18px;

    height:100%;

    border:1px solid #eef2f7;

    transition:.2s ease;
}

.kpi-card:hover{

    transform:translateY(-4px);

    box-shadow:
        0 14px 30px rgba(15,23,42,0.08);
}

.kpi-icon{

    width:62px;

    height:62px;

    border-radius:18px;

    display:flex;

    align-items:center;

    justify-content:center;

    background:white;

    font-size:28px;

    box-shadow:
        0 8px 20px rgba(15,23,42,0.06);
}

.kpi-number{

    font-size:34px;

    font-weight:800;

    line-height:1;

    margin-bottom:6px;

    color:#0f172a;
}

.kpi-label{

    color:#64748b;

    font-weight:600;
}

/* COLORS */

.kpi-success{
    border-left:5px solid #22c55e;
}

.kpi-danger{
    border-left:5px solid #ef4444;
}

.kpi-warning{
    border-left:5px solid #f59e0b;
}

/* ========================================
   MOBILE NAVBAR CLEAN
======================================== */

.mobile-navbar{

    background:linear-gradient(
        135deg,
        #6AFC5D 0%,
        #2563eb 100%
    );

    border-bottom:none;

    padding:12px 18px;

    min-height:72px;

    box-shadow:
        0 8px 20px rgba(15,23,42,0.12);
}

.mobile-navbar-brand{

    display:flex;

    align-items:center;

    gap:14px;
}

.mobile-navbar-info{

    display:flex;

    flex-direction:column;

    line-height:1.1;
}

.mobile-navbar-info small{

    color:rgba(255,255,255,0.75);

    font-size:11px;

    font-weight:700;

    letter-spacing:.8px;
}

.mobile-navbar-info strong{

    color:white;

    font-size:15px;
}

.mobile-navbar .navbar-toggler{

    border:none;

    background:rgba(255,255,255,0.16);

    backdrop-filter:blur(6px);

    border-radius:14px;

    width:46px;

    height:46px;

    display:flex;

    align-items:center;

    justify-content:center;
}