/**
 * =========================================================
 * RAYADOS THEME - Diseño Moderno Estilo MASV
 * =========================================================
 * 
 * Paleta de colores:
 * - Azul principal: #0f1f3f
 * - Azul secundario: #1a2f5a  
 * - Acento dorado: #FFC107
 * - Fondo claro: #f8f9fa
 * - Blanco puro: #ffffff
 * 
 * Filosofía de diseño:
 * - Diseño flat y limpio
 * - Más espacio en blanco
 * - Sombras sutiles
 * - Tablas modernas
 * - Sin gradientes excesivos
 * 
 * =========================================================
 */

/* ================== LAYOUT GENERAL ================== */
body {
    background-color: #f8f9fa !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #2c3e50;
}

.main-content {
    background: #f8f9fa !important;
    position: relative;
    z-index: 1;
}

/* Solo para admin con sidebar - agregar padding arriba */
body[data-sidebar="dark"] .main-content {
    padding-top: 68px !important;
}

.page-content {
    padding: 1.5rem !important;
    position: relative;
}

/* Fix z-index issues */
.main-content,
#layout-wrapper {
    position: relative;
}

/* ================== SIDEBAR - Diseño plano ================== */
#page-topbar,
.vertical-menu {
    background: #0f1f3f !important;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
}

.vertical-menu {
    position: fixed !important;
    left: 0;
    top: 56px; /* altura sincronizada con topbar */
    bottom: 0;
    width: 250px;
    z-index: 1001;
}

.navbar-brand-box {
    background: #0f1f3f !important;
    border-bottom: 0 !important; /* sin línea bajo el logo */
}

#page-topbar {
    position: fixed !important;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1002;
    height: 56px; /* aumentado ligeramente */
}

body[data-sidebar="dark"] .main-content {
    margin-left: 250px !important;
}

/* Menú sidebar - texto limpio */
.vertical-menu #sidebar-menu .menu-title {
    display: none !important;
}

.vertical-menu #sidebar-menu a {
    color: rgba(255, 255, 255, 0.85) !important;
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.vertical-menu #sidebar-menu a:hover {
    color: #FFC107 !important;
    background: rgba(255, 193, 7, 0.08) !important;
    padding-left: 1.75rem;
}

.vertical-menu #sidebar-menu .mm-active > a {
    color: #FFC107 !important;
    background: rgba(255, 193, 7, 0.12) !important;
    border-left: 3px solid #FFC107;
    padding-left: calc(1.5rem - 3px);
}

.vertical-menu #sidebar-menu li a {
    background-color: transparent !important;
}

.vertical-menu #sidebar-menu a i {
    color: inherit !important;
    font-size: 1.1rem;
}

/* ================== TOPBAR/HEADER - Limpio ================== */
#page-topbar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.header-item {
    color: rgba(255, 255, 255, 0.9) !important;
}

.header-item:hover {
    color: #FFC107 !important;
}

/* ================== PAGE TITLE - Header simple ================== */
.page-title-box {
    background: #ffffff !important;
    padding: 1.5rem !important;
    margin: -1.5rem -1.5rem 1.5rem -1.5rem;
    border-bottom: 1px solid #e9ecef;
    border-radius: 0;
}

.page-title-box h4,
.page-title-box .page-title {
    color: #0f1f3f !important;
    font-weight: 700;
    font-size: 1.75rem;
    margin-bottom: 0;
}

.breadcrumb {
    background: transparent !important;
    padding: 0.5rem 0 0 0;
}

.breadcrumb-item {
    color: #6c757d;
    font-size: 0.875rem;
}

.breadcrumb-item.active {
    color: #0f1f3f;
}

/* ================== CARDS - Diseño limpio MASV ================== */
.card {
    border: 1px solid #e9ecef !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    border-radius: 8px !important;
    overflow: hidden;
    background: #ffffff;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-2px);
}

.card-header {
    background: #ffffff !important;
    color: #0f1f3f !important;
    border-bottom: 2px solid #f8f9fa !important;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.card-body {
    padding: 1.5rem;
}

/* ================== TABLAS - Estilo MASV ================== */
.table {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background: #f8f9fa !important;
    color: #495057 !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #dee2e6 !important;
    padding: 1rem;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f8f9fa !important;
}

.table td {
    padding: 1rem;
    vertical-align: middle;
    color: #495057;
    font-size: 0.9rem;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.01) !important;
}

/* ================== BOTONES - Diseño plano moderno ================== */
.btn {
    font-weight: 600;
    padding: 0.625rem 1.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.btn-primary,
button[type="submit"],
.btn-primary:not(:disabled):not(.disabled) {
    background: #FFC107 !important;
    border: none !important;
    color: #0f1f3f !important;
    box-shadow: none !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: #FFB300 !important;
    color: #0f1f3f !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.25) !important;
}

.btn-success {
    background: #FFC107 !important;
    border: none !important;
    color: #0f1f3f !important;
}

.btn-success:hover {
    background: #FFB300 !important;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d !important;
    border: none !important;
    color: #ffffff !important;
}

.btn-secondary:hover {
    background: #5a6268 !important;
}

.btn-outline-primary {
    border: 2px solid #FFC107 !important;
    color: #FFC107 !important;
    background: transparent !important;
}

.btn-outline-primary:hover {
    background: #FFC107 !important;
    color: #0f1f3f !important;
}

/* Botones pequeños */
.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

/* ================== FORMS - Inputs modernos ================== */
.form-control,
.form-select,
select.form-control {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 0.625rem 0.875rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #FFC107;
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.15);
}

.form-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

/* ================== BADGES - Etiquetas de estado ================== */
.badge {
    padding: 0.375rem 0.75rem;
    font-weight: 600;
    font-size: 0.75rem;
    border-radius: 4px;
}

.badge-success {
    background: #28a745 !important;
    color: #ffffff;
}

.badge-warning {
    background: #FFC107 !important;
    color: #0f1f3f;
}

.badge-danger {
    background: #dc3545 !important;
    color: #ffffff;
}

.badge-info {
    background: #17a2b8 !important;
    color: #ffffff;
}

/* ================== ICONOS DE ESTADO (estilo MASV) ================== */
.status-icon {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-icon.success {
    background-color: #28a745;
}

.status-icon.warning {
    background-color: #FFC107;
}

.status-icon.danger {
    background-color: #dc3545;
}

.status-icon.info {
    background-color: #17a2b8;
}

/* ================== MODALS - Diálogos limpios ================== */
.modal-header {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    padding: 1.25rem 1.5rem;
}

.modal-title {
    color: #0f1f3f;
    font-weight: 700;
    font-size: 1.25rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

/* ================== ALERTS - Notificaciones modernas ================== */
.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1) !important;
    color: #155724 !important;
    border-left: 4px solid #28a745 !important;
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.1) !important;
    color: #856404 !important;
    border-left: 4px solid #FFC107 !important;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1) !important;
    color: #721c24 !important;
    border-left: 4px solid #dc3545 !important;
}

.alert-info {
    background-color: rgba(23, 162, 184, 0.1) !important;
    color: #0c5460 !important;
    border-left: 4px solid #17a2b8 !important;
}

/* ================== PAGINACIÓN - Limpia y moderna ================== */
.pagination {
    gap: 0.25rem;
}

.page-link {
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 0.5rem 0.875rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.page-link:hover {
    background-color: #f8f9fa;
    color: #0f1f3f;
}

.page-item.active .page-link {
    background-color: #FFC107 !important;
    border-color: #FFC107 !important;
    color: #0f1f3f !important;
}

/* ================== DROPDOWN - Menús desplegables ================== */
.dropdown-menu {
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
    color: #495057;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #0f1f3f;
}

.dropdown-divider {
    border-color: #e9ecef;
}

/* ================== UTILIDADES ================== */
.text-primary {
    color: #0f1f3f !important;
}

.text-secondary {
    color: #6c757d !important;
}

.text-success {
    color: #28a745 !important;
}

.text-warning {
    color: #FFC107 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.bg-primary {
    background-color: #0f1f3f !important;
}

.bg-light {
    background-color: #f8f9fa !important;
}

/* ================== BACKPACK ESPECÍFICOS ================== */
/* Ocultar elementos innecesarios */
.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
}

.navbar-nav .nav-link:hover {
    color: #FFC107 !important;
}

/* Mejoras en formularios de Backpack */
.bp-section {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-bottom: 1.5rem;
}

/* ================== RESPONSIVE ================== */
@media (max-width: 768px) {
    .page-title-box {
        margin: -1rem -1rem 1rem -1rem;
        padding: 1rem !important;
    }
    
    .page-title-box h4 {
        font-size: 1.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table {
        font-size: 0.85rem;
    }
}
