:root {
    --bg: #020203;
    --card: #0E0E12;
    --border: rgba(255, 255, 255, 0.08);
    --purple: #7c3aed;
    --purple-glow: rgba(124, 58, 237, 0.5);
    --blue: #3b82f6;
    --green: #10b981;
    --red: #ef4444;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
}

body {
    background-color: var(--bg);
    -webkit-tap-highlight-color: transparent;
    font-feature-settings: "tnum";
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
}

.bg-noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.aurora-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 0;
    opacity: 0.15;
    animation: blob 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

@keyframes blob {
    0% { transform: translate(0px, 0px) scale(1); }
    33% { transform: translate(50px, -70px) scale(1.1); }
    66% { transform: translate(-40px, 40px) scale(0.9); }
    100% { transform: translate(0px, 0px) scale(1); }
}

.glass-panel {
    background: rgba(14, 14, 18, 0.7);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Hide scrollbars */
::-webkit-scrollbar {
    display: none;
}
* {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Habit Checkbox */
.habit-cb {
    appearance: none;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    background: rgba(255,255,255,0.03);
    cursor: pointer;
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 768px) {
    .habit-cb {
        width: 18px;
        height: 18px;
    }
}

.habit-cb:checked {
    background: var(--purple);
    border-color: var(--purple);
    box-shadow: 0 0 15px var(--purple-glow);
    transform: scale(1.1);
}

.habit-cb:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    font-weight: 900;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Mobile Habit Grid */
.habit-mobile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
    gap: 8px;
}

.habit-day-card {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.habit-day-card.active {
    background: rgba(124, 58, 237, 0.1);
    border-color: rgba(124, 58, 237, 0.3);
}

.habit-day-card.today {
    border-color: var(--purple);
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.2);
}


/* Category colors */
.cat-comida { color: #fca5a5; }
.cat-transporte { color: #93c5fd; }
.cat-ahorros { color: #10b981; font-weight: bold; }
.cat-subscripciones { color: #d8b4fe; }
.cat-gastos { color: #6ee7b7; }
.cat-otro { color: #d1d5db; }

.pb-safe-area {
    padding-bottom: env(safe-area-inset-bottom);
}

/* Navigation */
.nav-dock {
    background: rgba(14, 14, 18, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    padding: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.nav-btn {
    color: rgba(255, 255, 255, 0.35);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 48px;
    border-radius: 24px;
}

.nav-btn:hover {
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-btn.active i {
    color: #a78bfa;
    filter: drop-shadow(0 0 10px rgba(167, 139, 250, 0.6));
}

.nav-btn span {
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    tracking: 0.05em;
    margin-top: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-btn-main {
    width: 56px;
    height: 56px;
    border-radius: 24px;
    background: var(--purple);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-btn-main:hover {
    transform: scale(1.1) rotate(5deg);
    background: #8b5cf6;
}

.nav-btn-main:active {
    transform: scale(0.9);
}


/* Tab Content Animation */
.tab-content {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.tab-content.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .nav-btn span {
        display: none;
    }
    .nav-btn {
        width: 3.5rem;
        height: 3.5rem;
    }
}


