/* Estilos globales de la aplicación web */

:root {
    --primary-color: #2F3193;
    --secondary-color: #525990;
    --success-color: #4CAF50;
    --error-color: #F44336;
    --warning-color: #FF9800;
    --info-color: #2196F3;
    --text-color: #212121;
    --text-secondary: #757575;
    --background: #F5F5F5;
    --card-background: #FFFFFF;
    --border-color: #E0E0E0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-color);
    line-height: 1.6;
    padding-bottom: 80px; /* Espacio para el menú inferior (se ajusta automáticamente) */
}

body.no-bottom-nav {
    padding-bottom: 16px; /* Sin espacio extra si no hay menú */
}

/* Contenedor principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

/* Títulos */
h1 {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 24px;
    text-align: center;
}

h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 16px;
}

h3 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 12px;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    width: 100%;
    margin-bottom: 12px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-danger {
    background-color: var(--error-color);
    color: white;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Formularios */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Cards */
.card {
    background: var(--card-background);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 12px;
}

/* Menú inferior (navegación móvil) */
.bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: white !important;
    border-top: 1px solid var(--border-color) !important;
    display: flex !important;
    justify-content: space-around !important;
    padding: 8px 0 !important;
    z-index: 1000 !important;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1) !important;
    width: 100% !important;
    max-width: 100% !important;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: color 0.3s ease;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 12px;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item svg {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
}

/* Loading spinner */
.spinner {
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utilidades */
.text-center {
    text-align: center;
}

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

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

/* Responsive */
@media (min-width: 768px) {
    .container {
        padding: 24px;
    }
    
    .btn {
        width: auto;
        min-width: 200px;
    }
    
    .bottom-nav {
        display: none; /* Ocultar en desktop si prefieres otro tipo de navegación */
    }
}

/* Ocultar elementos */
.hidden {
    display: none !important;
}

