@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Poppins:wght@500;600;700&display=swap');

:root {
    /* VIP Color Palette - Dark Mode Fixes */
    --bg-main: #0C0F14;       /* Fundo principal bem escuro */
    --bg-card: #1E2736;       /* Fundo dos cards um pouco mais claro para destacar */
    --bg-gray: #293447;       /* Cinza para chips, abas inativas e wrappers */
    
    --primary: #2ECC71;       /* Verde bem vibrante para contraste (títulos, ícones ativos) */
    --primary-light: #27AE60; /* Verde secundário para gradientes */
    --vip-gold: #D69E2E;      /* Dourado Ouro ajustado para destaque premium */
    
    --text-main: #FFFFFF;     /* Texto sólido branco */
    --text-muted: #A0ABC0;    /* Cinza azulado para descrições e textos secundários */
    --border-color: #2D3748;  /* Borda sutil */
    
    /* Shadows - Premium */
    --shadow-sm: 0 4px 14px rgba(0,0,0,0.4);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.6);
    --shadow-gold: 0 8px 24px rgba(245, 176, 65, 0.15); 
    
    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-text: 'Inter', sans-serif;
    
    /* Layout */
    --header-height: 0px; /* Será substituído por banner e padding na home */
    --bottom-nav-height: 70px;
    --radius-sm: 12px;
    --radius-md: 20px; /* VIP rounded corners */
    --radius-lg: 30px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-text);
    overflow-x: hidden;
    padding-bottom: calc(var(--bottom-nav-height) + 20px);
}

/* Typography */
h1, h2, h3, h4, h5 { font-family: var(--font-heading); color: var(--text-main); line-height: 1.3; }
p { line-height: 1.5; color: var(--text-muted); font-family: var(--font-text); }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.text-center { text-align: center; }

/* -------------------------------------
   LOGIN SCREEN (Auth Overlay)
------------------------------------- */
#login-screen {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    background: linear-gradient(135deg, #0B0E14 0%, #151A22 100%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: opacity 0.4s ease;
}

#login-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.login-card {
    background: var(--bg-card);
    width: 100%;
    max-width: 400px;
    padding: 40px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    text-align: center;
}

.login-card h2 {
    color: var(--primary);
    margin-bottom: 8px;
    font-size: 1.6rem;
}

.login-card p { margin-bottom: 24px; }

.login-input {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: var(--font-text);
    margin-bottom: 16px;
    outline: none;
    transition: border-color 0.3s;
    background-color: var(--bg-main);
    color: var(--text-main);
}

.login-input:focus { border-color: var(--primary); }

/* -------------------------------------
   BOTÕES VIP
------------------------------------- */
.btn-primary {
    display: block;
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
}

.btn-primary:active {
    transform: scale(0.98);
}
.btn-primary:hover {
    background: #256658; /* slightly darker primary */
    box-shadow: 0 4px 12px rgba(46, 125, 107, 0.2);
}

.btn-logout {
    background: #e74c3c;
    margin-top: 30px;
}
.btn-logout:hover { background: #c0392b; }

/* -------------------------------------
   APP LAYOUT & BOTTOM NAV
------------------------------------- */
.app-container {
    max-width: 600px; /* Mobile first */
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg-main);
    position: relative;
    padding-bottom: 60px;
}

#views-container {
    /* Animates view changes */
    position: relative;
}

.view {
    display: none;
    animation: fadeInVIP 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 20px;
}

.view.active { display: block; }

@keyframes fadeInVIP {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Bottom App Bar */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    height: var(--bottom-nav-height);
    background: var(--bg-card);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.04);
    z-index: 100;
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
    padding: 0 10px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.bottom-nav.hidden-nav {
    transform: translate(-50%, 150%);
}

.nav-item {
    background: none;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 0.7rem;
    font-family: var(--font-text);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
    height: 100%;
}

.nav-item i { transition: transform 0.3s, color 0.3s; }

.nav-item.active { color: var(--primary); font-weight: 600; }
.nav-item.active i { transform: translateY(-3px); color: var(--primary); }

/* Top Header dinâmico para views não-home */
.view-header {
    margin-bottom: 24px;
    text-align: center;
}
.view-header h2 {
    font-size: 1.5rem;
    color: var(--primary);
}

/* -------------------------------------
   HOME (BANNER E CARDS)
------------------------------------- */
.view-home-wrapper { padding: 0 !important; }

.vip-banner {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    padding: 50px 20px 40px;
    border-bottom-left-radius: 40px;
    border-bottom-right-radius: 40px;
    color: white;
    box-shadow: var(--shadow-md);
    text-align: center;
    margin-bottom: -20px; /* Puxa os cards para cima do banner */
    position: relative;
    z-index: 1;
}

.vip-banner h1 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.vip-banner p { color: rgba(255,255,255,0.9); font-size: 0.95rem; }

.home-content {
    position: relative;
    z-index: 2;
    padding: 0 20px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 40px;
}

.dash-card {
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-md);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.dash-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.dash-card span {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    color: #FFFFFF;
    text-align: center;
}

.icon-wrapper {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--bg-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    transition: background 0.3s;
}

.dash-card:hover .icon-wrapper {
    background: var(--primary);
    color: white;
}

.premium-card {
    grid-column: span 2;
    background: linear-gradient(135deg, var(--vip-gold), #B8860B);
    color: white;
    box-shadow: var(--shadow-gold);
    flex-direction: row;
    padding: 20px;
    justify-content: flex-start;
}

.premium-card span { color: white; font-size: 1.1rem; margin-left: 10px; }
.premium-card .icon-wrapper { background: rgba(255,255,255,0.2); color: white; }
.premium-card:hover .icon-wrapper { background: rgba(255,255,255,0.3); }

/* -------------------------------------
   TAB & INFO CARDS (RECEITAS ETC)
------------------------------------- */
.tabs-container {
    display: flex;
    overflow-x: auto;
    padding-bottom: 16px;
    margin-bottom: 16px;
    gap: 10px;
    scrollbar-width: none;
}
.tabs-container::-webkit-scrollbar { display: none; }

.tab-btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.content-list { display: flex; flex-direction: column; gap: 16px; }

.info-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: box-shadow 0.3s;
}

.info-card:hover { box-shadow: var(--shadow-md); }

.info-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center; /* better alignment */
    cursor: pointer;
}

.info-card h3 {
    font-size: 1.1rem;
    color: var(--text-main); /* Mudado para branco conforme pedido */
    margin-bottom: 6px;
}

.info-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-gray);
    color: var(--primary);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 12px;
    font-family: var(--font-heading);
}

.info-card-body {
    display: none;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed var(--border-color);
    animation: fadeInVIP 0.3s ease;
}

.info-card.open .info-card-body { display: block; }
.info-card.open svg.chevron { transform: rotate(180deg); color: var(--primary); }

svg.chevron { transition: transform 0.3s, color 0.3s; color: var(--text-muted); }

ul.bullet-list { list-style: none; }
ul.bullet-list li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: var(--text-muted);
}
ul.bullet-list li::before {
    content: "•";
    color: var(--vip-gold);
    font-size: 1.5rem;
    line-height: 1;
    position: absolute;
    left: 0;
    top: -2px;
}

/* -------------------------------------
   LISTAS ALIMENTOS
------------------------------------- */
.section-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 16px;
    color: var(--primary);
}

.list-group { margin-bottom: 24px; }
.list-group-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
}

.list-item {
    background: var(--bg-card);
    padding: 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--vip-gold);
}
.list-item strong {
    font-family: var(--font-heading);
    display: block;
    font-size: 1rem;
    color: var(--text-main);
    margin-bottom: 4px;
}
.list-item span { font-size: 0.9rem; color: var(--text-muted); }

.chips-container { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
    background: var(--bg-gray);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
}

/* -------------------------------------
   ROTINA E HÁBITOS
------------------------------------- */
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeInVIP 0.3s; }
.tab-desc { margin-bottom: 20px; font-size: 1rem; text-align: center; }

.routine-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
    border-top: 5px solid var(--vip-gold);
}
.routine-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.routine-header h4 { font-size: 1.2rem; color: var(--primary); }

.checklist-container { display: flex; flex-direction: column; gap: 14px; }
.check-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    padding: 16px 20px;
    border-radius: var(--radius-md); /* VIP Round */
    border: 1px solid var(--border-color);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}
.check-item:hover { transform: translateX(4px); border-color: var(--primary-light); }
.check-circle {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.check-item.checked .check-circle {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.1);
}
.check-item.checked span, .check-item.checked .check-text {
    text-decoration: line-through;
    color: #999;
}
.check-text { flex-grow: 1; font-size: 0.95rem; line-height: 1.4; font-weight: 500; }

/* -------------------------------------
   PROGRESSO (DASHBOARD VIP)
------------------------------------- */
.progress-header {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 40px 20px;
    text-align: center;
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
}
.progress-header h3 { margin-bottom: 24px; font-size: 1.4rem; color: var(--primary); }

.progress-circle-container {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto;
}
.progress-circle { width: 100%; height: 100%; transform: rotate(-90deg); }
.progress-circle circle { fill: none; stroke-width: 10; stroke-linecap: round; }
.progress-circle .bg { stroke: var(--bg-gray); }
.progress-circle .fg {
    stroke: var(--vip-gold);
    stroke-dasharray: 283; 
    stroke-dashoffset: 283; 
    transition: stroke-dashoffset 1.5s cubic-bezier(0.16, 1, 0.3, 1); /* Smoother */
}
.progress-text {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%); text-align: center;
}
.progress-text span {
    display: block; font-size: 2.5rem; font-weight: 700;
    font-family: var(--font-heading); color: var(--primary);
}
.progress-text small { color: var(--text-muted); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 2px;}

/* -------------------------------------
   PERFIL VIP
------------------------------------- */
.profile-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-md);
}
.profile-avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: var(--bg-gray);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
    font-size: 2rem;
}
#user-email-display { font-family: var(--font-heading); font-size: 1.1rem; color: var(--text-main); margin-bottom: 24px; font-weight: 600; }
