:root {
    --primary: #21ac50;
    --dark: #1a1a1a;
    --gray: #f5f5f5;
    --text: #333;
    --white: #ffffff;
    --danger: #e74c3c;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body { 
    background-color: var(--gray); 
    color: var(--text); 
    padding-bottom: 80px; 
    overflow-x: hidden; 
}

/* Barra Superior */
.top-bar {
    background-color: var(--white);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}
.top-bar h1 { font-size: 1.2rem; color: var(--dark); }
.user-avatar {
    width: 35px; height: 35px;
    background-color: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold;
}

/* Contenido */
.content { padding: 20px; width: 100%; }
.vista { display: none; animation: fadeIn 0.3s; }
.vista.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Dashboard */
.welcome-card {
    background: linear-gradient(135deg, var(--primary), #1b8a40);
    color: var(--white);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
}
.stats-grid { 
    display: flex; 
    justify-content: space-between;
    gap: 15px; 
    margin-bottom: 20px; 
    width: 100%;
}
.stat-card {
    flex: 1;
    background: var(--white);
    padding: 15px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.stat-card h3 { font-size: 1.5rem; margin: 5px 0; color: var(--primary); }
.stat-card p { color: #777; font-size: 0.9rem; }

/* Listas */
.section-title { margin-bottom: 10px; font-size: 1.1rem; }
.list-item {
    background: var(--white);
    padding: 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    width: 100%;
}
.list-icon {
    width: 45px; height: 45px;
    background: var(--gray);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold;
    color: var(--primary);
    margin-right: 15px;
    flex-shrink: 0;
}
.list-info h4 { font-size: 1rem; }
.list-info p { font-size: 0.85rem; color: #777; }

/* Botones */
.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    width: 100%;
    font-size: 1rem;
    margin-bottom: 20px;
    cursor: pointer;
    font-weight: bold;
}
.btn-secondary {
    background-color: #e74c3c;
    color: var(--white);
    border: none;
    padding: 12px;
    border-radius: 10px;
    width: 100%;
    font-size: 1rem;
    margin-top: 20px;
    font-weight: bold;
}

/* Perfil */
.profile-card { text-align: center; background: var(--white); padding: 30px 20px; border-radius: 15px; }
.profile-avatar {
    width: 80px; height: 80px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; font-weight: bold;
    margin: 0 auto 15px;
}

/* Barra de Navegación Inferior (Ajustada para 5 elementos) */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; width: 100%;
    background: var(--white);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 100;
}
.nav-item {
    display: flex; flex-direction: column; align-items: center;
    text-decoration: none; color: #aaa; font-size: 0.7rem;
    gap: 4px; transition: color 0.2s;
    flex: 1;
}
.nav-item.active { color: var(--primary); font-weight: bold; }

/* MODAL (Ventana Emergente) */
.modal-overlay {
    display: none; 
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    justify-content: center;
    align-items: center;
}
.modal-overlay.active { display: flex; }
.modal-content {
    background: var(--white);
    padding: 25px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    animation: slideUp 0.3s ease-out;
}
@keyframes slideUp { from { transform: translateY(50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.input-group { margin-bottom: 15px; width: 100%; }
.input-group label { display: block; margin-bottom: 5px; font-weight: bold; font-size: 0.9rem; }
.input-group input, .input-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    background: var(--white);
}
.input-group input:focus, .input-group select:focus { border-color: var(--primary); }
.modal-buttons { display: flex; gap: 10px; margin-top: 20px; }
.btn-cancelar {
    flex: 1; padding: 12px; border: none; border-radius: 10px; 
    background: #eee; color: #333; font-size: 1rem; cursor: pointer; font-weight: bold;
}
.btn-guardar {
    flex: 1; padding: 12px; border: none; border-radius: 10px; 
    background: var(--primary); color: white; font-size: 1rem; cursor: pointer; font-weight: bold;
}