/* styles.css - Estilos unificados y mejorados */
:root {
    --primary-blue: #1E88E5;
    --secondary-blue: #42A5F5;
    --light-blue: #BBDEFB;
    --dark-blue: #1565C0;
    --accent-blue: #0D47A1;
    --white: #FFFFFF;
    --light-gray: #f8f9fa;
    --success-green: #4CAF50;
    --warning-orange: #FF9800;
    --error-red: #F44336;
    --sidebar-width: 250px;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

/* Reset y estilos base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    background-color: var(--light-gray);
    min-height: 100vh;
}


/* Reducir tamaño de títulos */
h1 {
    font-size: 1.8rem !important;
}

h2 {
    font-size: 1.5rem !important;
}

h3 {
    font-size: 1.2rem !important;
}


h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-blue);
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-blue);
    transition: var(--transition);
}

a:hover {
    color: var(--accent-blue);
}

img {
    max-width: 100%;
    height: auto;
}

/* Estructura general */
.container-fluid {
    padding: 0 15px;
    width: 100%;
}

/* Páginas públicas */
.public-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--accent-blue) 100%);
    padding: 1rem;
    background-attachment: fixed;
}

.card-form {
    background: rgba(255, 255, 255, 0.98);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 500px;
    animation: fadeInUp 0.4s ease-out;
}

.login-logo {
    height: 80px;
    margin-bottom: 1rem;
}

.login-title {
    font-size: 1.8rem;
    color: var(--dark-blue);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    font-size: 1.1rem;
    color: #555;
}

/* Formularios */
.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    font-size: 0.9rem;
    padding: 0.375rem 0.75rem; 
    border: 2px solid #ddd;
    border-radius: 6px;
    width: 100%;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(30, 136, 229, 0.2);
    outline: none;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-blue);
}

/* Botones */
.btn {
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: white;
}

.btn-primary:hover {
    background-color: var(--dark-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}

/* Alertas */
.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border-left: 4px solid transparent;
}

.alert.success {
    background-color: #e8f5e9;
    border-left-color: var(--success-green);
    color: #1b5e20;
}

.alert.warning {
    background-color: #fff8e1;
    border-left-color: var(--warning-orange);
    color: #e65100;
}

.alert.error {
    background-color: #ffebee;
    border-left-color: var(--error-red);
    color: #b71c1c;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: white;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--dark-blue);
}

.close-modal {
    font-size: 1.8rem;
    color: #777;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
    background: none;
    border: none;
}

.close-modal:hover {
    color: #333;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #eee;
    text-align: right;
}

/* Sidebar admin */
.sidebar-desktop {
    width: 250px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: linear-gradient(180deg, var(--dark-blue) 0%, var(--accent-blue) 100%);
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
    overflow-y: auto;
    transition: var(--transition);
}

.user-info {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: white;
}

.user-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
    color: white;
}

.user-info p {
    font-size: 0.9rem;
    color: var(--light-blue);
    margin-bottom: 0;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li a {
    padding: 0.8rem 1.5rem;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition);
    border-left: 4px solid transparent;
}

.sidebar-nav li a:hover,
.sidebar-nav li.active a {
    background-color: rgba(255,255,255,0.1);
    border-left: 4px solid var(--secondary-blue);
}

.sidebar-nav li a i {
    width: 20px;
    text-align: center;
}

.logout-item {
    margin-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 0.5rem;
}

.main-content-desktop {
    margin-left: 250px;
    transition: var(--transition);
    min-height: 100vh;
    padding: 1.5rem;
}

/* Navbar móvil */
.navbar-mobile {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(90deg, var(--dark-blue) 0%, var(--accent-blue) 100%);
    z-index: 1100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    align-items: center;
    padding: 0 15px;
}

.navbar-brand {
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    flex-grow: 1;
}

.mobile-menu-btn {
    color: white;
    font-size: 1.5rem;
    background: none;
    border: none;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.mobile-menu {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background: var(--accent-blue);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
    z-index: 1050;
}

.mobile-menu.show {
    max-height: 100vh;
}

.mobile-menu-item {
    display: block;
    color: white;
    padding: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-decoration: none;
    font-size: 1.1rem;
}

.mobile-menu-item i {
    width: 25px;
    text-align: center;
    margin-right: 10px;
}

/* Contenido del dashboard */
.content-header {
    background: white;
    padding: 1.25rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    box-shadow: var(--box-shadow);
}

/* Tarjetas de estadísticas */
.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border-top: 4px solid var(--primary-blue);
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.stat-card h3 {
    font-size: 1rem;
    color: #7f8c8d;
    margin-bottom: 0.75rem;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.stat-card .label {
    font-size: 0.9rem;
    color: #95a5a6;
    margin-bottom: 1rem;
}

.stat-card a {
    color: var(--secondary-blue);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-card a:hover {
    text-decoration: underline;
}

/* Secciones del dashboard */
.dashboard-section {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    box-shadow: var(--box-shadow);
}

.section-title {
    color: var(--dark-blue);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 0.5rem;
}

/* Tablas */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 0.5rem;
    font-size: 0.9rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.data-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: var(--dark-blue);
}

.data-table tr:hover {
    background-color: #f8f9fa;
}

.badge-age {
    background-color: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.5rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
}


        .badge {
            display: inline-block;
            padding: 0.2rem 0.4rem;
            border-radius: 50px;
            font-size: 0.7rem;
            font-weight: 600;
        }
        
        .badge-success {
            background-color: #d4edda;
            color: #155724;
        }
        
        .badge-danger {
            background-color: #f8d7da;
            color: #721c24;
        }


/* Badges para roles */
.badge-admin {
    background-color: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.badge-editor {
    background-color: #fff3cd;
    color: #664d03;
    border: 1px solid #ffecb5;
}

.badge-asistente {
    background-color: #cfe2ff;
    color: #084298;
    border: 1px solid #b6d4fe;
}

.badge-social {
    background-color: #e2d4f0;
    color: #4a1f8a;
    border: 1px solid #d1c2e1;
}

.badge-turismo {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.badge-bienestar {
    background-color: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

.badge-salud {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.badge-pagos {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* Grid responsive */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-md-4, .col-md-6 {
    padding: 0 15px;
    flex: 0 0 100%;
    max-width: 100%;
}

/* Responsive */
@media (max-width: 991px) {
    .navbar-mobile {
        display: flex;
    }
    
    .sidebar-desktop {
        transform: translateX(-100%);
    }
    
    .sidebar-desktop.show {
        transform: translateX(0);
    }
    
    .main-content-desktop {
        margin-left: 0;
        padding-top: 80px;
    }
}

@media (min-width: 768px) {
    .col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
    
    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Utilidades */
.text-center {
    text-align: center;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.me-2 {
    margin-right: 0.5rem;
}

.w-100 {
    width: 100%;
}

.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

.flex-wrap {
    flex-wrap: wrap;
}

.text-link {
    color: var(--secondary-blue);
    font-size: 0.9rem;
}

.text-link:hover {
    text-decoration: underline;
}