/* =====================================================
   SISTEMA CONTROL DE CUADRILLAS HSM
   UX/UI PROFESIONAL RESPONSIVE
===================================================== */

:root{

    --primary:#7b001c;
    --primary-hover:#950022;

    --success:#198754;
    --danger:#dc3545;
    --warning:#ffc107;
    --info:#0dcaf0;

    --bg:#f4f6f9;

    --card:#ffffff;

    --text:#2f3542;
    --text-light:#6c757d;

    --shadow:
    0 10px 25px rgba(0,0,0,.08);

    --radius:18px;

}

/* =====================================================
   RESET
===================================================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{

    background:var(--bg);

    font-family:
    "Segoe UI",
    Tahoma,
    Geneva,
    Verdana,
    sans-serif;

    color:var(--text);

    overflow-x:hidden;

}

/* =====================================================
   SCROLLBAR
===================================================== */

::-webkit-scrollbar{
    width:8px;
}

::-webkit-scrollbar-track{
    background:#eee;
}

::-webkit-scrollbar-thumb{
    background:var(--primary);
    border-radius:20px;
}

/* =====================================================
   LOGIN
===================================================== */

.login-body{

    min-height:100vh;

    display:flex;

    justify-content:center;
    align-items:center;

    padding:20px;

    background:
    linear-gradient(
        135deg,
        #7b001c,
        #4b0010
    );

}

.login-container{

    width:100%;
    max-width:420px;

}

.login-card{

    background:white;

    border-radius:30px;

    padding:40px;

    box-shadow:
    0 20px 40px rgba(0,0,0,.15);

}

.login-card h2{

    font-weight:800;

    color:var(--primary);

}

/* =====================================================
   SIDEBAR
===================================================== */

.sidebar{

    width:260px;

    height:100vh;

    background:
    linear-gradient(
        180deg,
        #7b001c,
        #4d0012
    );

    position:fixed;

    left:0;
    top:0;

    z-index:999;

    overflow-y:auto;

    box-shadow:
    4px 0 20px rgba(0,0,0,.15);

}

.logo-container{

    display:flex;

    justify-content:center;
    align-items:center;

    padding:20px;

}

.logo-sidebar{

    width:95px;
    height:95px;

    object-fit:contain;

    background:white;

    border-radius:20px;

    padding:8px;

    box-shadow:
    0 10px 20px rgba(0,0,0,.2);

}

.sidebar a{

    display:flex;

    align-items:center;

    color:white;

    text-decoration:none;

    padding:16px 25px;

    transition:.3s;

    font-size:16px;

    font-weight:600;

}

.sidebar a:hover{

    background:
    rgba(255,255,255,.12);

    padding-left:35px;

}

/* =====================================================
   MAIN CONTENT
===================================================== */

.main-content{

    margin-left:260px;

    width:calc(100% - 260px);

    min-height:100vh;

    padding:30px;

}

.content{

    margin-left:260px;

    padding:30px;

}

/* =====================================================
   TITULOS
===================================================== */

.page-title{

    font-size:38px;

    font-weight:800;

    color:#222;

    margin-bottom:25px;

}

h1,h2,h3,h4,h5{

    font-weight:700;

}

/* =====================================================
   CARDS
===================================================== */

.card-panel,
.card-box{

    background:white;

    border-radius:25px;

    padding:25px;

    margin-bottom:25px;

    box-shadow:var(--shadow);

}

.card{

    border:none !important;

    border-radius:25px !important;

    box-shadow:var(--shadow);

}

/* =====================================================
   KPI DASHBOARD
===================================================== */

.kpi-card{

    background:white;

    border-radius:25px;

    padding:25px;

    box-shadow:var(--shadow);

    transition:.3s;

    height:100%;

}

.kpi-card:hover{

    transform:translateY(-5px);

}

.kpi-title{

    color:#777;

    text-transform:uppercase;

    font-size:14px;

    font-weight:700;

}

.kpi-number{

    font-size:40px;

    font-weight:900;

    color:var(--primary);

    margin-top:10px;

}

.dashboard-grid{

    display:grid;

    grid-template-columns:
    repeat(auto-fit,minmax(280px,1fr));

    gap:20px;

}

/* =====================================================
   FORMULARIOS
===================================================== */

.form-control,
.form-select{

    min-height:50px;

    border-radius:14px;

    border:1px solid #ddd;

}

.form-control:focus,
.form-select:focus{

    border-color:var(--primary);

    box-shadow:
    0 0 0 .25rem
    rgba(123,0,28,.15);

}

label{

    font-weight:600;

    margin-bottom:6px;

}

/* =====================================================
   BOTONES
===================================================== */

.btn{

    border-radius:14px;

    min-height:50px;

    font-weight:700;

}

.btn-primary{

    background:var(--primary);

    border:none;

}

.btn-primary:hover{

    background:var(--primary-hover);

}

.btn-success{

    font-weight:700;

}

.btn-danger{

    font-weight:700;

}

.btn-action{

    min-width:110px;

    height:44px;

    border-radius:12px;

    font-size:14px;

}

/* =====================================================
   TABLAS
===================================================== */

.table-responsive{

    overflow-x:auto;

    border-radius:20px;

}

.table{

    background:white;

    margin-bottom:0;

}

.table thead{

    background:var(--primary);

    color:white;

}

.table th{

    white-space:nowrap;

    vertical-align:middle;

}

.table td{

    vertical-align:middle;

}

/* =====================================================
   FOTOS
===================================================== */

.foto-usuario{

    width:70px;
    height:70px;

    object-fit:cover;

    border-radius:50%;

    border:3px solid var(--primary);

}

.foto-preview{

    width:160px;
    height:160px;

    object-fit:cover;

    border-radius:50%;

    border:5px solid var(--primary);

    box-shadow:
    0 10px 20px rgba(0,0,0,.15);

}

/* =====================================================
   BADGES
===================================================== */

.badge-activo{

    background:#198754;

    color:white;

    padding:8px 14px;

    border-radius:30px;

    font-size:12px;

}

.badge-inactivo{

    background:#dc3545;

    color:white;

    padding:8px 14px;

    border-radius:30px;

    font-size:12px;

}

/* =====================================================
   SCANNER DNI
===================================================== */

#scanner-container{

    width:100%;

    max-width:700px;

    height:420px;

    margin:auto;

    overflow:hidden;

    border-radius:25px;

    border:4px solid var(--primary);

    background:black;

    box-shadow:
    0 15px 30px rgba(0,0,0,.15);

}

#scanner-container video{

    width:100%;

    height:100%;

    object-fit:cover;

}

.estado-scan{

    text-align:center;

    font-size:22px;

    font-weight:800;

    color:var(--primary);

    margin-top:15px;

}

/* =====================================================
   TARJETA USUARIO ESCANEADO
===================================================== */

.usuario-card{

    background:white;

    border-radius:25px;

    padding:25px;

    margin-top:25px;

    box-shadow:
    0 15px 30px rgba(0,0,0,.1);

}

.usuario-foto{

    width:170px;

    height:170px;

    object-fit:cover;

    border-radius:50%;

    border:5px solid var(--primary);

}

/* =====================================================
   EXPORT CARD
===================================================== */

.export-card{

    background:
    linear-gradient(
        135deg,
        #7b001c,
        #990022
    );

    color:white;

    border-radius:25px;

    padding:25px;

    box-shadow:var(--shadow);

}

.export-card label{

    color:white;

}

.export-card .form-control,
.export-card .form-select{

    border:none;

}

/* =====================================================
   MOBILE CARDS
===================================================== */

.mobile-card{

    background:white;

    border-radius:20px;

    padding:20px;

    margin-bottom:15px;

    box-shadow:var(--shadow);

}

/* =====================================================
   TABLET
===================================================== */

@media(max-width:992px){

    .sidebar{

        width:220px;

    }

    .main-content,
    .content{

        margin-left:220px;

        width:calc(100% - 220px);

        padding:20px;

    }

    .page-title{

        font-size:30px;

    }

}

/* =====================================================
   MOBILE
===================================================== */

@media(max-width:768px){

    .sidebar{

        width:100%;

        height:auto;

        position:relative;

        display:flex;

        flex-wrap:wrap;

        justify-content:center;

        padding:15px;

    }

    .logo-container{

        width:100%;

    }

    .logo-sidebar{

        width:75px;
        height:75px;

    }

    .sidebar a{

        padding:10px 14px;

        font-size:14px;

        border-radius:10px;

        margin:3px;

    }

    .main-content,
    .content{

        width:100%;

        margin-left:0;

        padding:15px;

    }

    .page-title{

        text-align:center;

        font-size:28px;

    }

    .card-panel,
    .card-box{

        padding:18px;

    }

    .kpi-number{

        font-size:34px;

    }

    .btn{

        width:100%;

        margin-bottom:10px;

    }

    .btn-action{

        width:100% !important;

        max-width:none !important;

    }

    .row > div{

        margin-bottom:12px;

    }

    #scanner-container{

        height:320px;

    }

    .usuario-foto{

        width:120px;
        height:120px;

        margin-bottom:15px;

    }

}

/* =====================================================
   SMALL MOBILE
===================================================== */

@media(max-width:480px){

    .login-card{

        padding:25px;

    }

    .page-title{

        font-size:24px;

    }

    .kpi-number{

        font-size:30px;

    }

    .estado-scan{

        font-size:18px;

    }

    .usuario-card h3{

        font-size:22px;

    }

}

.foto-col{
    width:70px;
    min-width:70px;
    text-align:center;
}

.foto-usuario{

    width:50px;
    height:50px;

    border-radius:50%;

    object-fit:cover;

    border:2px solid #e5e7eb;

    display:block;
    margin:auto;

}

.avatar-default{

    width:50px;
    height:50px;

    border-radius:50%;

    background:#7b001c;
    color:#fff;

    display:flex;
    align-items:center;
    justify-content:center;

    font-weight:700;
    font-size:18px;

    margin:auto;

}

#scanner-container{

    width:100%;
    min-height:350px;

    border-radius:20px;
    overflow:hidden;

    background:#000;

    position:relative;

}

#scanner-container video{

    width:100%;
    height:auto;

    object-fit:cover;

}

#scanner-container{

    width:100%;
    min-height:350px;

    background:#000;

    border-radius:20px;

    overflow:hidden;

}

#scanner-container video{

    width:100% !important;

    height:auto !important;

    object-fit:cover;

}