/* =========================================================
   REDSALVA GERENCIAL - PANEL.CSS
   Diseño principal y componentes
   El responsive se maneja en responsive.css
   ========================================================= */

*{
    box-sizing:border-box;
}

html,
body{
    margin:0;
    padding:0;
    min-height:100%;
}

body{
    font-family:'Poppins',sans-serif;
    background:#ffffff;
    color:#111827;
}

/* =========================================================
   CONTENIDO PRINCIPAL
   ========================================================= */

.main{
    margin-left:260px;
    margin-top:0;
    min-height:100vh;
    transition:margin-left .30s ease;
}

.content{
    padding:30px 40px;
}

.main-content{
    margin-left:260px;
    margin-top:0;
    padding:30px 40px;
    min-height:100vh;
    background:#ffffff;
    transition:margin-left .30s ease;
}

body.sidebar-collapsed .main{
    margin-left:70px;
}

body.sidebar-collapsed .main-content{
    margin-left:70px;
}

/* =========================================================
   SIDEBAR
   ========================================================= */

.sidebar{
    width:260px;
    height:100vh;
    position:fixed;
    top:0;
    left:0;
    display:flex;
    flex-direction:column;
    background:linear-gradient(180deg,#35c1bc,#0f7887);
    color:#ffffff;
    padding:22px 0;
    box-sizing:border-box;
    transition:width .30s ease, transform .30s ease;
    z-index:1000;
}

/* =========================================================
   LOGOS
   ========================================================= */

.sidebar-logo{
    width:100%;
    display:flex;
    justify-content:center;
    align-items:center;
    padding:5px 20px 28px 20px;
    box-sizing:border-box;
    overflow:hidden;
}

.sidebar-logo-full{
    display:block;
    width:175px;
    height:auto;
    max-width:none;
    filter:brightness(0) invert(1);
}

.sidebar-logo-mini{
    display:none;
    width:42px;
    height:auto;
    max-width:none;
    filter:brightness(0) invert(1);
}

/* =========================================================
   BOTÓN CONTRAER SIDEBAR
   ========================================================= */

.sidebar-toggle{
    position:absolute;
    top:25px;
    right:12px;
    width:30px;
    height:30px;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:0;
    border:none;
    border-radius:8px;
    background:rgba(255,255,255,.12);
    color:#ffffff;
    cursor:pointer;
    transition:all .25s ease;
    z-index:1100;
}

.sidebar-toggle:hover{
    background:rgba(255,255,255,.22);
}

.sidebar-toggle svg{
    width:17px;
    height:17px;
    stroke-width:2.5;
}

/* =========================================================
   MENÚ PRINCIPAL
   ========================================================= */

.menu-item{
    display:flex;
    align-items:center;
    gap:14px;
    margin:3px 12px;
    padding:11px 18px;
    border-radius:10px;
    color:#ffffff;
    text-decoration:none;
    font-size:15px;
    font-weight:500;
    transition:.25s;
}

.menu-item i{
    width:18px;
    height:18px;
    flex-shrink:0;
}

.menu-item:hover{
    background:rgba(255,255,255,.14);
    transform:translateX(4px);
}

.menu-item.active{
    background:rgba(255,255,255,.20);
}

/* =========================================================
   REPORTE GERENCIAL
   ========================================================= */

.menu-group{
    margin:4px 12px;
    border-radius:10px;
    transition:.25s;
}

.menu-group.active{
    background:rgba(255,255,255,.06);
}

.menu-title{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:11px 18px;
    cursor:pointer;
    border-radius:10px;
    transition:.25s;
}

.menu-title:hover{
    background:rgba(255,255,255,.14);
}

.menu-left{
    display:flex;
    align-items:center;
    gap:14px;
}

.menu-left span{
    font-size:15px;
    font-weight:500;
}

.menu-left i{
    width:18px;
    height:18px;
    flex-shrink:0;
}

.arrow{
    width:16px;
    height:16px;
    flex-shrink:0;
    transition:.30s;
}

.menu-group.active .arrow{
    transform:rotate(180deg);
}

/* =========================================================
   SUBMENÚ
   ========================================================= */

.submenu{
    display:none;
    flex-direction:column;
    margin:6px 0 10px 30px;
    padding-left:12px;
    border-left:2px solid rgba(255,255,255,.22);
}

.menu-group.active .submenu{
    display:flex;
}

.submenu a{
    display:flex;
    align-items:center;
    min-height:38px;
    padding:7px 10px;
    margin:2px 0;
    color:rgba(255,255,255,.90);
    text-decoration:none;
    font-size:13px;
    font-weight:400;
    border-radius:7px;
    transition:all .20s ease;
    white-space:nowrap;
}

.submenu a:hover{
    background:rgba(255,255,255,.12);
    color:#ffffff;
    transform:translateX(4px);
}

.submenu a.active{
    background:rgba(255,255,255,.16);
    color:#ffffff;
}

.submenu-separador{
    height:1px;
    background:rgba(255,255,255,.25);
    margin:12px 15px;
}

/* =========================================================
   SIDEBAR COLAPSADO
   ========================================================= */

.sidebar.collapsed{
    width:70px;
}

.sidebar.collapsed .sidebar-logo{
    width:70px;
    padding-left:0;
    padding-right:0;
    justify-content:center;
}

.sidebar.collapsed .sidebar-logo-full{
    display:none;
}

.sidebar.collapsed .sidebar-logo-mini{
    display:block;
    width:42px;
    height:auto;
}

.sidebar.collapsed .sidebar-toggle{
    right:11px;
}

.sidebar.collapsed .menu-left span{
    display:none;
}

.sidebar.collapsed .menu-title > .arrow{
    display:none;
}

.sidebar.collapsed .menu-left{
    justify-content:center;
    width:100%;
}

.sidebar.collapsed .menu-title{
    justify-content:center;
    padding:11px 0;
}

.sidebar.collapsed .submenu{
    display:none !important;
}

.sidebar.collapsed .menu-group{
    margin-left:8px;
    margin-right:8px;
}

.sidebar.collapsed .menu-left i{
    width:20px;
    height:20px;
}

/* =========================================================
   TÍTULOS / CABECERA
   ========================================================= */

.page-title{
    font-size:26px;
    font-weight:600;
    color:#1c3d5a;
    margin:0;
}

.content-header{
    display:flex;
    flex-direction:column;
    gap:15px;
    margin-bottom:20px;
}

/* =========================================================
   CARDS
   ========================================================= */

.card{
    background:#ffffff;
    border-radius:16px;
    padding:20px;
    margin-top:20px;
    box-shadow:0 8px 20px rgba(0,0,0,.05);
}

/* =========================================================
   BOTONES
   ========================================================= */

button{
    border:none;
    border-radius:10px;
    padding:10px 18px;
    font-family:'Poppins',sans-serif;
    font-weight:500;
    cursor:pointer;
}

.btn{
    padding:10px 16px;
    border-radius:8px;
    text-decoration:none;
    font-size:14px;
    font-weight:500;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    cursor:pointer;
}

.btn-primary{
    background:linear-gradient(90deg,#28b3a6,#1c8fa3);
    color:#ffffff;
    padding:10px 18px;
    border-radius:10px;
}

.btn-secondary{
    background:#eef2f6;
    color:#4b5563;
    padding:10px 18px;
    border-radius:10px;
}

.btn-light{
    background:#eef2f6;
    color:#555555;
}

.btn-edit{
    background:#1fb6a6;
    color:#ffffff;
    padding:6px 10px;
    border-radius:6px;
    text-decoration:none;
    font-size:13px;
}

.btn-delete{
    background:#eef2f6;
    color:#555555;
    padding:6px 10px;
    border-radius:6px;
    text-decoration:none;
    font-size:13px;
}

.btn-toggle{
    background:#e9ecef;
    color:#555555;
    padding:6px 10px;
    border-radius:6px;
}

.btn-playlist{
    background:#1fb6a6;
    color:#ffffff;
    padding:6px 12px;
    border-radius:6px;
    text-decoration:none;
    font-size:13px;
}

.actions,
.toolbar{
    display:flex;
    gap:12px;
}

.toolbar{
    margin-bottom:20px;
}

/* =========================================================
   TABLAS
   ========================================================= */

table{
    width:100%;
    border-collapse:collapse;
    margin-top:20px;
    background:#ffffff;
    border-radius:10px;
    overflow:hidden;
}

.table-panel{
    width:100%;
    border-collapse:collapse;
}

.table-panel th,
th{
    text-align:left;
    padding:14px;
    background:#f3f6fa;
    font-weight:500;
    color:#5a6b7b;
}

.table-panel td,
td{
    padding:14px;
    border-bottom:1px solid #eeeeee;
}

tr:hover{
    background:#f9fbfd;
}

/* =========================================================
   DRAG / ORDEN
   ========================================================= */

.drag{
    display:flex;
    align-items:center;
    gap:6px;
    color:#888888;
    cursor:grab;
    opacity:.7;
}

.drag:active{
    cursor:grabbing;
}

tr.sortable-chosen{
    background:#e6f7f6;
}

tr.sortable-ghost{
    opacity:.4;
}

/* =========================================================
   ESTADOS / BADGES
   ========================================================= */

.estado{
    padding:5px 10px;
    border-radius:20px;
    font-size:12px;
}

.estado.on{
    background:#d4f7e6;
    color:#1b9c6d;
}

.estado.off{
    background:#eeeeee;
    color:#777777;
}

.codigo{
    background:#eef2f6;
    padding:6px 10px;
    border-radius:8px;
    font-weight:500;
}

.duracion-badge{
    background:#eef3f7;
    padding:6px 10px;
    border-radius:8px;
    font-size:13px;
}

.empty{
    text-align:center;
    padding:20px;
    color:#888888;
}

/* =========================================================
   ARCHIVOS / PANTALLAS
   ========================================================= */

.file-info{
    display:flex;
    align-items:center;
    gap:10px;
}

.file-thumb{
    width:40px;
    height:40px;
    object-fit:cover;
    border-radius:8px;
    background:#dddddd;
}

.video-thumb{
    width:42px;
    height:42px;
    border-radius:10px;
    background:linear-gradient(135deg,#1fb6a6,#0f6d7c);
    display:flex;
    align-items:center;
    justify-content:center;
    color:#ffffff;
    font-size:18px;
}

.archivo{
    font-weight:500;
}

.pantalla-nombre{
    display:flex;
    align-items:center;
    gap:8px;
    font-weight:500;
}

.badge-tv{
    background:#eef3f7;
    padding:6px 12px;
    border-radius:8px;
    font-weight:600;
    margin-right:8px;
}

/* =========================================================
   SWITCH
   ========================================================= */

.switch{
    position:relative;
    display:inline-block;
    width:42px;
    height:22px;
}

.switch input{
    display:none;
}

.slider{
    position:absolute;
    cursor:pointer;
    top:0;
    left:0;
    right:0;
    bottom:0;
    background:#cccccc;
    border-radius:20px;
    transition:.3s;
}

.slider:before{
    position:absolute;
    content:"";
    height:18px;
    width:18px;
    left:2px;
    bottom:2px;
    background:#ffffff;
    border-radius:50%;
    transition:.3s;
}

input:checked + .slider{
    background:#2ecc71;
}

input:checked + .slider:before{
    transform:translateX(20px);
}

/* =========================================================
   MODAL
   ========================================================= */

.modal{
    display:none;
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,.4);
    backdrop-filter:blur(4px);
    justify-content:center;
    align-items:center;
    z-index:9999;
}

.modal-content{
    background:#ffffff;
    padding:25px;
    border-radius:16px;
    width:380px;
    box-shadow:0 25px 60px rgba(0,0,0,.15);
    animation:fadeIn .25s ease;
}

.modal-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:20px;
}

.modal-header h3{
    margin:0;
    font-size:18px;
    font-weight:600;
}

.close{
    cursor:pointer;
    font-size:22px;
    opacity:.6;
    transition:.2s;
}

.close:hover{
    opacity:1;
    transform:scale(1.1);
}

.modal input,
.modal select{
    width:100%;
    padding:12px;
    margin-top:5px;
    margin-bottom:15px;
    border-radius:10px;
    border:1px solid #dddddd;
    font-family:'Poppins',sans-serif;
    transition:.2s;
}

.modal input:focus,
.modal select:focus{
    outline:none;
    border-color:#25c3b5;
    box-shadow:0 0 0 2px rgba(37,195,181,.2);
}

.modal .btn{
    width:100%;
    margin-top:10px;
}

.modal label{
    font-size:13px;
    font-weight:500;
    color:#555555;
}

@keyframes fadeIn{
    from{
        transform:translateY(-10px);
        opacity:0;
    }
    to{
        transform:translateY(0);
        opacity:1;
    }
}

/* =========================================================
   NAVBAR / LEGACY - NO SE USA EN EL NUEVO INICIO
   ========================================================= */

.navbar{
    height:70px;
    background:#ffffff;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 25px;
    box-shadow:0 5px 20px rgba(0,0,0,.05);
    position:fixed;
    top:0;
    left:0;
    right:0;
    z-index:1000;
}

.logo-text{
    font-weight:600;
    font-size:18px;
    color:#1b6b7a;
}

.menu a{
    margin:0 12px;
    text-decoration:none;
    color:#444444;
    font-weight:500;
}

.menu a:hover{
    color:#1fb6a6;
}

.user{
    display:flex;
    align-items:center;
    gap:15px;
}

.logout{
    background:#1fb6a6;
    padding:8px 14px;
    border-radius:8px;
    color:#ffffff;
    text-decoration:none;
}

.sidebar-user{
    margin-top:auto;
    margin-bottom:25px;
    margin-left:12px;
    margin-right:12px;
    padding:12px;
    background:rgba(0,0,0,.20);
    border-radius:10px;
}

.sidebar-user i{
    width:18px;
    height:18px;
}



