/* ==================== VARIABLES DE COLOR ==================== */
:root {
    --color-primary: #CD5E77;
    --color-primary-dark: #AA336A;
    --color-primary-light: #F4819F;
    --color-primary-softer: #FFB6C1;
    --color-primary-ultrasoft: #FFE5EB;
    
    --color-bg-main: #f4c2c2;
    --color-bg-secondary: #fff2f7;
    --color-bg-card: rgba(255, 255, 255, 0.95);
    --color-bg-sidebar: #fff5f8;
    
    --color-text-primary: #4e2734;
    --color-text-secondary: #8c4a63;
    --color-text-muted: #a5647d;
    --color-text-light: #b8748c;
    
    --color-border: rgba(205, 94, 119, 0.15);
    --color-border-light: rgba(205, 94, 119, 0.08);
    --color-shadow: 0 10px 30px rgba(170, 51, 106, 0.12);
    --color-shadow-sm: 0 4px 12px rgba(170, 51, 106, 0.08);
    
    --color-success: #48a55a;
    --color-danger: #d63031;
    --color-warning: #f39c12;
    --color-info: #3498db;
    
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-pill: 25px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
    height: 100%;
    font-family: 'Mynerve', cursive, sans-serif;
    font-weight: 600;
    color: var(--color-text-primary);
    background: #F8F3F5;
    background-attachment: fixed;
    line-height: 1.6;
}

body {
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    text-decoration: none;
}

img, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input, select, textarea {
    font-family: 'Mynerve', cursive, sans-serif;
    font-weight: 600;
}
/* ==================== LAYOUT PRINCIPAL ==================== */
.app-layout {
    display: flex;
    flex: 1;
    margin-top: 70px;
}

.sidebar {
    width: 250px;
    background: var(--color-bg-sidebar);
    border-right: 1px solid var(--color-border);
    padding: 1.5rem 0;
    position: fixed;
    left: 0;
    top: 70px;
    height: calc(100vh - 70px);
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(170, 51, 106, 0.05);
}

.sidebar-menu {
    list-style: none;
    padding: 0;
}

.sidebar-menu li {
    margin: 0;
}

.sidebar-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--color-text-secondary);
    transition: var(--transition);
    position: relative;
}

.sidebar-menu-item:hover,
.sidebar-menu-item.active {
    color: var(--color-primary-dark);
    background: rgba(205, 94, 119, 0.08);
    border-left: 4px solid var(--color-primary);
    padding-left: 16px;
}

.sidebar-menu-item i {
    font-size: 1.3rem;
    min-width: 24px;
    text-align: center;
}

.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 2rem;
}

@media (max-width: 1024px) {
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        margin-left: 200px;
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -250px;
        z-index: 1000;
        transition: var(--transition);
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
}

/* ==================== NAVBAR ==================== */
.navbar-custom {
    background: linear-gradient(90deg, var(--color-primary) 0%, #D36484 50%, var(--color-primary-light) 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(170, 51, 106, 0.15);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    height: 70px;
    display: flex;
    align-items: center;
}

.navbar-custom .container-fluid {
    display: flex;
    align-items: center;
    width: 100%;
}

.navbar-custom .navbar-brand {
    color: #fff !important;
    font-size: 1.5rem;
    font-weight: 700;
    margin-right: 2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-custom .nav-link,
.navbar-custom .nav-item span {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.navbar-custom .nav-link:hover {
    color: #fff !important;
    transform: translateY(-2px);
}

.navbar-custom .nav-item span {
    cursor: default;
    padding: 0.5rem 0 !important;
}

.navbar-custom .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
}

.navbar-custom .navbar-toggler-icon {
    filter: invert(1);
}

/* ==================== PÁGINA HEADER ==================== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.page-title-group h1 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    color: var(--color-primary-dark);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.page-title-group p {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin: 0;
}

.page-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ==================== CARDS DE RESUMEN ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--color-shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--color-shadow);
    border-color: var(--color-primary-softer);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
}

.stat-card-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-lg);
    background: rgba(205, 94, 119, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--color-primary);
}

.stat-card-label {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card-value {
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-weight: 700;
    color: var(--color-primary-dark);
    margin-bottom: 0.5rem;
}

.stat-card-trend {
    font-size: 0.85rem;
    color: var(--color-success);
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-card-trend.negative {
    color: var(--color-danger);
}


/* ==================== PANELES Y TARJETAS ==================== */
.panel-card,
.card-panel,
.hover-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--color-shadow-sm);
    transition: var(--transition);
}

.panel-card:hover,
.card-panel:hover,
.hover-card:hover {
    border-color: var(--color-primary-softer);
    box-shadow: var(--color-shadow);
}

.panel-card h4,
.panel-card h5,
.card-panel h5 {
    color: var(--color-primary-dark);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

/* ==================== FORMULARIOS ==================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
}

.form-control,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-bg-card);
    color: var(--color-text-primary);
    font-family: 'Mynerve', cursive, sans-serif;
    font-weight: 600;
    transition: var(--transition);
    font-size: 0.95rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--color-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(205, 94, 119, 0.1);
    outline: none;
}

.form-control::placeholder {
    color: var(--color-text-muted);
}

.form-control-soft {
    background-color: rgba(205, 94, 119, 0.05);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* ==================== BOTONES ==================== */
.btn {
    padding: 0.65rem 1.4rem;
    border: none;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Mynerve', cursive, sans-serif;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary,
.btn-primary-soft {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: #fff;
    box-shadow: 0 6px 20px rgba(205, 94, 119, 0.25);
}

.btn-primary:hover,
.btn-primary-soft:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(205, 94, 119, 0.35);
}

.btn-secondary,
.btn-soft {
    background: var(--color-bg-card);
    color: var(--color-primary-dark);
    border: 1.5px solid var(--color-primary-softer);
}

.btn-secondary:hover,
.btn-soft:hover {
    background: var(--color-primary-ultrasoft);
    border-color: var(--color-primary);
}

.btn-danger,
.btn-ver,
.btn-editar,
.btn-eliminar {
    background: linear-gradient(135deg, #d63031, #e74c3c);
    color: #fff;
}

.btn-danger:hover,
.btn-ver:hover,
.btn-editar:hover,
.btn-eliminar:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(214, 48, 49, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, var(--color-success), #27ae60);
    color: #fff;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 0.85rem 1.8rem;
    font-size: 1.1rem;
}

.btn-icon {
    padding: 0.65rem;
    min-width: 40px;
    justify-content: center;
}
/* ==================== TABLAS ==================== */
.table-responsive {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--color-shadow-sm);
}

.table-modern,
.reportes-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-bg-card);
}

.table-modern thead,
.reportes-table thead {
    background: linear-gradient(90deg, rgba(205, 94, 119, 0.95), rgba(255, 159, 179, 0.95));
    color: #fff;
}

.table-modern th,
.reportes-table th {
    padding: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    text-align: left;
    border: none;
}

.table-modern td,
.reportes-table td {
    padding: 1rem;
    border-top: 1px solid var(--color-border-light);
    color: var(--color-text-primary);
    font-size: 0.95rem;
}

.table-modern tbody tr,
.reportes-table tbody tr {
    transition: var(--transition);
}

.table-modern tbody tr:hover,
.reportes-table tbody tr:hover {
    background: rgba(205, 94, 119, 0.05);
}

.table-modern tbody tr:hover td {
    color: var(--color-primary-dark);
}

.table-striped tbody tr:nth-child(odd) {
    background: rgba(255, 224, 233, 0.5);
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--color-text-muted) !important;
}

.text-positive {
    color: var(--color-primary-dark) !important;
    font-weight: 700;
}

.text-negative {
    color: var(--color-danger) !important;
    font-weight: 700;
}

/* ==================== FILTROS ==================== */
.filter-section {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 2rem;
    box-shadow: var(--color-shadow-sm);
}

.filter-section h5 {
    color: var(--color-primary-dark);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* ==================== BADGES Y ETIQUETAS ==================== */
.badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.badge-primary {
    background: rgba(205, 94, 119, 0.15);
    color: var(--color-primary-dark);
}

.badge-success {
    background: rgba(72, 165, 90, 0.15);
    color: var(--color-success);
}

.badge-danger {
    background: rgba(214, 48, 49, 0.15);
    color: var(--color-danger);
}

.badge-warning {
    background: rgba(243, 156, 18, 0.15);
    color: var(--color-warning);
}

/* ==================== MODAL Y OVERLAYS ==================== */
.modal-content {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(170, 51, 106, 0.2);
}

.modal-header {
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    color: #fff;
    border: none;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-header .btn-close {
    filter: invert(1);
}

.modal-title {
    font-weight: 700;
    font-size: 1.3rem;
}

/* ==================== ALERTAS ==================== */
.alert {
    border: none;
    border-radius: var(--radius-lg);
    padding: 1.2rem 1.5rem;
    border-left: 4px solid;
    margin-bottom: 1.5rem;
}

.alert-primary {
    background: rgba(205, 94, 119, 0.1);
    border-left-color: var(--color-primary);
    color: var(--color-primary-dark);
}

.alert-success {
    background: rgba(72, 165, 90, 0.1);
    border-left-color: var(--color-success);
    color: var(--color-success);
}

.alert-danger {
    background: rgba(214, 48, 49, 0.1);
    border-left-color: var(--color-danger);
    color: var(--color-danger);
}

.alert-warning {
    background: rgba(243, 156, 18, 0.1);
    border-left-color: var(--color-warning);
    color: var(--color-warning);
}

/* ==================== UTILITIES ==================== */
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 2.5rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 2.5rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
.p-5 { padding: 2.5rem; }

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.text-primary { color: var(--color-primary-dark); }
.text-secondary { color: var(--color-text-secondary); }
.text-success { color: var(--color-success); }
.text-danger { color: var(--color-danger); }
.text-warning { color: var(--color-warning); }

.text-bold { font-weight: 700; }
.text-semibold { font-weight: 600; }

.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

.cursor-pointer { cursor: pointer; }
.user-select-none { user-select: none; }

/* ==================== SPINNER Y LOADING ==================== */
.spinner-border {
    border-color: rgba(205, 94, 119, 0.3);
    border-right-color: var(--color-primary);
}

.spinner-grow {
    background-color: var(--color-primary);
}

/* ==================== SCROLLBAR PERSONALIZADA ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(205, 94, 119, 0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(205, 94, 119, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(205, 94, 119, 0.5);
}

/* ==================== PÁGINA DE LOGIN ==================== */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.login-box {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 3rem 2.5rem;
    box-shadow: 0 20px 60px rgba(170, 51, 106, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    color: var(--color-primary-dark);
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.login-box p {
    text-align: center;
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
}

/* ==================== FOOTER ==================== */
.footer {
    background: rgba(255, 255, 255, 0.6);
    border-top: 1px solid var(--color-border);
    padding: 1.5rem;
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    margin-top: auto;
}

/* ==================== ANIMACIONES ==================== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-slide-in {
    animation: slideIn 0.3s ease-out;
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* ==================== PRINT STYLES ==================== */
@media print {
    .navbar-custom,
    .sidebar,
    .page-actions,
    .filter-section,
    .btn-group,
    .btn {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .main-content {
        margin-left: 0;
    }
}


