@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800;900&display=swap');

:root {
    --bg-main: #0f172a; --bg-panel: #1e293b; --text-main: #f8fafc; --text-muted: #94a3b8;
    --accent-primary: #10b981; --accent-hover: #059669; --accent-danger: #ef4444; 
    --accent-warning: #f59e0b; --accent-blue: #3b82f6; --accent-purple: #8b5cf6;
    --accent-success: #10b981;
}

body {
    font-family: 'Inter', system-ui, sans-serif; background-color: var(--bg-main);
    color: var(--text-main); margin: 0; padding: 15px; 
    padding-bottom: 90px;
    display: flex; flex-direction: column; align-items: center; 
    justify-content: flex-start; min-height: 100vh;
    box-sizing: border-box; overflow-x: hidden;
}

.app-top-icon {
    width: 60px; height: 60px; border-radius: 14px; object-fit: cover;
    margin: 0 auto 10px auto; display: block; box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    border: 2px solid rgba(255,255,255,0.1);
}

.container {
    width: 100%; max-width: 500px; background: var(--bg-panel); padding: 25px;
    border-radius: 20px; box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.05); box-sizing: border-box;
    display: flex; flex-direction: column; gap: 15px; position: relative;
}

h1 { margin: 0; font-size: 1.8rem; font-weight: 900; color: #f8fafc; letter-spacing: -1px; text-transform: uppercase; text-align: center; }
h1 span { color: var(--accent-primary); }

.tab-content { display: none; animation: fadeIn 0.3s ease-in-out; }
.tab-content.active { display: flex; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card-section {
    background: rgba(0,0,0,0.2); padding: 15px; border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.05); text-align: left;
}
.card-section h3 { margin: 0 0 15px 0; font-size: 1.1rem; color: var(--accent-primary); font-weight: 800; display: flex; justify-content: space-between; align-items: center;}

.form-group { margin-bottom: 15px; text-align: left; }
label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.85rem; color: #cbd5e1; }

input {
    width: 100%; background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1);
    color: white; padding: 12px; border-radius: 10px; font-family: inherit; font-size: 1rem;
    box-sizing: border-box; outline: none; transition: border 0.2s;
}
input:focus { border-color: var(--accent-primary); }

select {
    width: 100%; background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1);
    color: white; padding: 12px; border-radius: 10px; font-family: inherit; font-size: 1rem;
    box-sizing: border-box; outline: none; transition: border 0.2s;
}
select:focus { border-color: var(--accent-primary); }

.profile-modal {
    position: fixed; inset: 0; z-index: 2000; display: none; align-items: center;
    justify-content: center; padding: 20px; background: rgba(2, 6, 23, 0.86);
}
.profile-modal.visible { display: flex; }
.profile-modal-content {
    width: min(100%, 420px); background: var(--bg-panel); padding: 25px;
    border: 1px solid rgba(16, 185, 129, 0.45); border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.55);
}
.profile-modal-content h2 { margin: 0 0 8px; color: var(--accent-primary); }
.profile-modal-content p { color: var(--text-muted); margin: 0 0 20px; font-size: 0.9rem; }

.btn-action {
    border: none; padding: 14px; font-size: 0.95rem; font-weight: 800;
    border-radius: 10px; cursor: pointer; transition: all 0.2s ease; font-family: inherit;
    width: 100%; text-transform: uppercase; letter-spacing: 0.5px; color: white;
    background: var(--accent-primary); box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    display: flex; justify-content: center; align-items: center; gap: 8px;
}
.btn-action:active { transform: scale(0.97); }
.btn-action.btn-secondary { background: var(--bg-main); border: 1px solid var(--accent-primary); color: var(--accent-primary); box-shadow: none; }

.category-selector { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cat-btn { 
    background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); 
    font-size: 1.5rem; padding: 12px; border-radius: 12px; cursor: pointer; 
    transition: all 0.2s; width: 100%; display: flex; flex-direction: column; 
    align-items: center; gap: 4px; box-sizing: border-box;
}
.cat-btn span { font-size: 0.7rem; color: var(--text-muted); font-weight: 600; }
.cat-btn.active { background: rgba(16, 185, 129, 0.1); border-color: var(--accent-primary); transform: scale(1.05); }
.cat-btn.active span { color: white; }

.cat-btn[data-val="verde"].active { border-color: var(--accent-success); background: rgba(16, 185, 129, 0.2); }
.cat-btn[data-val="amarillo"].active { border-color: var(--accent-warning); background: rgba(245, 158, 11, 0.2); }
.cat-btn[data-val="rojo"].active { border-color: var(--accent-danger); background: rgba(239, 68, 68, 0.2); }

.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; width: 100%; 
    background-color: var(--bg-panel); display: flex; justify-content: space-around; 
    padding: 10px 0; padding-bottom: max(10px, env(safe-area-inset-bottom));
    box-shadow: 0 -5px 25px rgba(0,0,0,0.6); 
    border-top: 1px solid rgba(255,255,255,0.05); z-index: 1000;
}
.nav-btn {
    background: none; border: none; color: var(--text-muted); font-size: 1.4rem;
    display: flex; flex-direction: column; align-items: center; cursor: pointer; 
    transition: all 0.2s; font-family: inherit;
}
.nav-btn span { font-size: 0.65rem; margin-top: 4px; font-weight: 700; text-transform: uppercase; }
.nav-btn.active { color: var(--accent-primary); transform: translateY(-2px); }

.nav-btn.add-btn {
    background: var(--accent-primary); color: white; border-radius: 50%;
    width: 55px; height: 55px; justify-content: center; transform: translateY(-25px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4); border: 5px solid var(--bg-main);
}
.nav-btn.add-btn.active { transform: translateY(-27px) scale(1.05); }
.nav-btn.add-btn span { display: none; }