#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: auto !important;
    min-height: 70px;
    background: var(--color-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding-top: env(safe-area-inset-top);
}

.header-inner {
    width: 100%;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1002;
}

.main-content {
    flex: 1;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding-top: 185px !important; 
    padding-bottom: 80px;
    position: relative;
    z-index: 1;
}


.main-content-profile {
    flex: 1;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding-top: 70px !important; 
    padding-bottom: 80px;
}

.logo-container { display: flex; align-items: center; cursor: pointer; }
.logo-container img { height: 40px; width: auto; }


.desktop-nav { display: none; }
@media (min-width: 769px) {
    .bottom-nav { display: none !important; }
    .desktop-nav { 
        display: flex; gap: 20px; position: absolute; 
        left: 50%; transform: translateX(-50%); 
    }
    .main-content { padding-top: 200px !important; } 
}

.d-nav-item { font-weight: 700; cursor: pointer; opacity: 0.9; }
.d-nav-item:hover { opacity: 1; text-decoration: underline; }


.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: 60px; background: white;
    border-top: 1px solid #eee;
    display: flex; justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 1100;
}
.nav-item {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center; color: #999;
}
.nav-item.active { color: var(--color-primary); }

.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 10px 15px 30px;
}
@media (min-width: 600px) { .profile-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .profile-grid { grid-template-columns: repeat(4, 1fr); } }

.app-footer {
    padding: 40px 20px 90px;
    background: #f8fafc; text-align: center;
    border-top: 1px solid #e2e8f0;
}
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; margin-bottom: 20px; }
.footer-link { color: #64748b; font-size: 0.8rem; text-decoration: none; }

#toast-container { position: fixed; top: 80px; right: 20px; z-index: 9999; }
.toast { background: white; padding: 12px; margin-bottom: 10px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); border-left: 4px solid var(--color-primary); display: flex; align-items: center; gap: 10px; }
.landing-page, .payment-page { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: white; z-index: 5000; overflow-y: auto; }

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: var(--color-primary);
    color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: var(--z-header);
    display: flex;
    flex-direction: column;
    padding-top: env(safe-area-inset-top);
}

.header-top-row {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    position: relative;
    z-index: 1002;
    background: var(--color-primary); 
}

.header-controls {
    background: #f8fafc;
    width: 100%;
}

.main-content {
    flex: 1;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding-top: var(--padding-top-dashboard-mobile);
    padding-bottom: 80px;
    position: relative;
    z-index: 1;
}

.main-content.inner-page {
    padding-top: 120px !important;
}

@media (min-width: 769px) {
    .main-content {
        padding-top: var(--padding-top-dashboard-desktop);
    }
    .main-content.inner-page {
        padding-top: 80px !important;
    }
}

.logo-container {
    display: flex;
    align-items: center;
    height: 100%;
    cursor: pointer;
}
.logo-container img {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.desktop-nav { display: none; }
@media (min-width: 769px) {
    .bottom-nav { display: none !important; }
    .desktop-nav { 
        display: flex; gap: 25px; 
        position: absolute; left: 50%; transform: translateX(-50%); 
        height: 100%; align-items: center;
    }
}

.d-nav-item {
    display: flex; align-items: center; gap: 6px;
    font-weight: 700; font-size: 0.9rem; cursor: pointer; opacity: 0.9;
    color: white; transition: opacity 0.2s;
}
.d-nav-item:hover { opacity: 1; }

.nav-badge-count {
    background: white; color: var(--color-primary);
    font-size: 10px; font-weight: 800;
    height: 16px; min-width: 16px; padding: 0 4px;
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
    margin-left: 4px;
}

.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: var(--nav-height); background: white;
    border-top: 1px solid #e2e8f0;
    display: flex; justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 1100;
}
.nav-item {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    color: #94a3b8; font-size: 0.7rem; font-weight: 600;
}
.nav-item .material-icons-round { font-size: 24px; margin-bottom: 2px; }
.nav-item.active { color: var(--color-primary); }

.badge {
    position: absolute; top: 10px; right: 30%;
    background: var(--color-error); width: 8px; height: 8px;
    border-radius: 50%; border: 1px solid white;
}


.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 10px 12px 30px;/
}
@media (min-width: 600px) { .profile-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .profile-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; } }

.landing-page, .payment-page {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: white; z-index: 5000; overflow-y: auto;
}

.app-footer {
    padding: 30px 20px 90px;
    background: #f8fafc; text-align: center;
    border-top: 1px solid #e2e8f0;
}
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; margin-bottom: 15px; }
.footer-link { color: #64748b; font-size: 0.75rem; text-decoration: none; }
.copyright { color: #94a3b8; font-size: 0.7rem; }

#toast-container { position: fixed; top: 80px; right: 20px; z-index: 9999; }
.toast { background: white; padding: 12px; margin-bottom: 10px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.15); border-left: 4px solid var(--color-primary); display: flex; align-items: center; gap: 10px; min-width: 250px; }