/* ========================================
   SIOPEC - ESTILOS BASE DEL LAYOUT
   ======================================== */

/* General Styles */
body {
    font-family: 'Times New Roman', Times, serif;
    background-color: #f0f2f5;
    min-height: 100vh;
}

/* Ocultar flechas de inputs numéricos */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield; /* Firefox */
}

/* Para Firefox */
input[type="number"]::-moz-number-spin-box {
    display: none;
}

/* General Layout */
.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

/* Desactivar efectos hover de tarjetas globalmente */
.card {
    transition: none !important;
}

.card:hover {
    transform: none !important;
}

.card-body,
.card-header,
.card-footer {
    transition: none !important;
}

.card-body:hover,
.card-header:hover,
.card-footer:hover {
    transform: none !important;
}

/* --- SIDEBAR --- */
#sidebar {
    width: 185px;
    min-width: 185px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: #343a40;
    color: #fff;
    z-index: 1001;
    transition: all 0.3s;
}

#sidebar.active {
    margin-left: -200px;
}

#sidebar .sidebar-header {
    padding: 15px 20px;
    background: #2c3136;
    text-align: center;
}

#sidebar .sidebar-logo {
    width: 100%;
    height: auto;
    padding-bottom: 20px;
}

#sidebar ul.components { 
    padding: 20px 0; 
}

#sidebar ul li a { 
    padding: 10px 20px; 
    font-size: 1.1em; 
    display: block; 
    color: #fff; 
    text-decoration: none; 
}

#sidebar ul li a:hover, 
#sidebar ul li.active > a { 
    background: #2c3136; 
}

#sidebar ul li a i { 
    margin-right: 10px; 
}

/* Estilos para el nombre del negocio en la navbar */
.business-name-nav {
    color: #6c757d !important;
    font-size: 1.1rem;
    font-weight: 500;
    margin-left: 15px;
    padding-left: 15px;
    border-left: 1px solid #dee2e6;
}

.business-name-nav i {
    margin-right: 5px;
    color: #495057;
}

/* --- MAIN CONTENT AREA --- */
.dashboard-flex-central {
    display: flex;
    flex-direction: row;
    margin-left: 185px;
    width: calc(100% - 185px);
    height: 100vh;
    transition: all 0.3s;
}

#sidebar.active ~ .dashboard-flex-central {
    margin-left: 0;
    width: 100%;
}

/* Excluir el módulo de contratos del layout general */
.contract-container .dashboard-flex-central {
    margin-left: 0 !important;
    width: 100% !important;
}

#sidebar.active ~ .contract-container .dashboard-flex-central {
    margin-left: 0 !important;
    width: 100% !important;
}

.widgets-sidebar {
    width: 365px;
    min-width: 365px;
    height: 100vh;
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
    padding: 10px;
    overflow-y: auto;
    flex-shrink: 0;
}

.dashboard-main-content {
    flex-grow: 1;
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    margin-bottom: 30px;
}

.navbar {
    padding: 10px 20px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    flex-shrink: 0;
}

.dashboard-flex-content {
    flex-grow: 1;
    padding: 8px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* Excepción para el módulo de contratos - permitir layout natural de Bootstrap */
.contract-container .dashboard-flex-content,
.dashboard-flex-content .contract-container {
    display: flex !important;
    flex-direction: column !important;
    overflow-y: visible !important;
}

/* Layout de filas - dejar que Bootstrap maneje naturalmente */

/* --- RESPONSIVE --- */
@media (max-width: 1200px) {
    .widgets-sidebar { 
        width: 250px; 
        min-width: 250px; 
    }
}

@media (max-width: 992px) {
    .widgets-sidebar { 
        display: none; 
    }
}

@media (max-width: 768px) {
    #sidebar { 
        margin-left: -200px; 
    }
    #sidebar.active { 
        margin-left: 0; 
    }
    .dashboard-flex-central { 
        margin-left: 0; 
        width: 100%; 
    }
    #sidebar.active ~ .dashboard-flex-central { 
        margin-left: 200px; 
    }
}
