:root {
    /* PALETA ATUALIZADA (BRANCO GELO) */
    --bg: #f4f7f9;         /* Branco Gelo (Ice White) */
    --primary: #ff8a41;    /* Laranja (Ação/Botões/Destaques) - Mantido */
    --secondary: #9cafcc;  /* Verde (Detalhes secundários) - Mantido */
    --surface: #FFFFFF;    /* Branco (Cards/Menu) */
    
    /* CORES DE TEXTO */
    --text-main: #2b4c7e;  /* Azul Profundo - Mantido */
    --text-sec: #e67e22;   /* Laranja Escuro - Mantido */
    
    --radius: 20px;
    
    /* FONTES - Alterado para Raleway conforme solicitado */
    --font-main: 'Raleway', sans-serif; 
    --font-logo: 'Playfair Display', serif;
    
    --success: #2ecc71;
    --red: #e74c3c;
    --border: #edf2f7;
    --shadow: 0 8px 25px rgba(43, 76, 126, 0.08); /* Sombra mais suave para o fundo claro */
    --nav-height: 85px; /* Altura ajustada do menu */
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body { 
    margin: 0; 
    padding: 0; 
    font-family: var(--font-main); 
    background-color: var(--bg); 
    color: var(--text-main); 
    width: 100vw;
    height: 100vh;
    height: 100dvh; 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
}

h1, h2, h3, h4, strong { font-weight: 700; letter-spacing: -0.5px; color: var(--text-main); /* Títulos em azul para contraste no fundo gelo */ }

/* --- RESTAURAÇÃO DOS LOGOS --- */
.logo-container-large {
    margin-bottom: 20px;
    text-align: center;
}
.logo-were {
    font-family: 'Major Mono Display', monospace;
    font-size: 30px;
    color: #ff66c4; 
    letter-spacing: -2px;
    -webkit-text-stroke: 1px #dbffae;
}
.logo-nuts {
    font-family: 'Cormorant Garamond', serif;
    font-size: 130px;
    color: #dbffae;
    text-transform: lowercase; /* Força minúsculas para o logo */
    font-weight: 300; 
    font-style: normal;
    letter-spacing: -3px; 
}

/* Logo Pequeno (Header) */
.logo-container-small {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 0.9;
}
.logo-were-small {
    font-family: 'Major Mono Display', monospace;
    font-size: 14px;
    color: #ff66c4;
    font-weight: 600;
}
.logo-nuts-small {
    font-family: 'Cormorant Garamond', serif;
    font-size: 40px;
    color: #dbffae;
    font-weight: 600;
}

/* SCREENS */
.screen { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background-color: var(--bg); 
    display: none; 
    flex-direction: column; 
    z-index: 10; 
    padding-top: env(safe-area-inset-top);
    padding-bottom: 0; 
}

#view-app.screen {
    display: none;
    padding-top: 0;
}
#view-app.screen.active {
    display: flex;
}

.screen.active { display: flex; animation: fadeIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
.screen.full-screen { z-index: 200; background: var(--bg); padding-top: env(safe-area-inset-top); padding-bottom: 0; }
.screen.detail-view { z-index: 150; background: var(--bg); padding-bottom: 0; }

#view-admin.screen.full-screen.active {
    overflow: hidden; 
    display: flex;
    flex-direction: column;
    background: #f8fafc; 
}

/* HEADER PRINCIPAL DO APP */
.app-header {
    padding: 10px 20px;
    padding-top: max(15px, env(safe-area-inset-top)); 
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #9cafcc; 
    position: sticky;
    top: 0;
    z-index: 50;
}

#main-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: calc(var(--nav-height) + 20px); 
    -webkit-overflow-scrolling: touch;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.input-group { margin-bottom: 20px; width: 100%; }
.label { display: block; font-size: 11px; font-weight: 700; color: #262262; margin-bottom: 8px; letter-spacing: 1px; }
.input { width: 100%; padding: 18px; border-radius: var(--radius); border: 1px solid var(--border); background-color: #FFF; font-size: 16px; color: var(--text-main); outline: none; font-family: var(--font-main); transition: 0.2s; -webkit-appearance: none; box-shadow: var(--shadow); }
.input:focus { border-color: var(--primary); }

/* Botões */
.btn { width: 100%; padding: 18px; border-radius: var(--radius); border: none; font-size: 16px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; font-family: var(--font-main); transition: 0.2s; -webkit-user-select: none; letter-spacing: 0.5px; }
.btn-primary { background-color: var(--primary); color: #FFF; box-shadow: 0 5px 15px rgba(255, 138, 65, 0.4); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { background-color: #ccc; box-shadow: none; cursor: not-allowed; }
.btn-text { background: none; color: var(--text-sec); font-size: 14px; padding: 10px; }
.btn-danger { background-color: #ffe6e6; color: var(--red); }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }

/* CALENDÁRIO */
.calendar-wrapper { padding: 0 20px 20px; }
.calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.calendar-title { font-weight: 700; font-size: 24px; text-transform: capitalize; color: var(--text-main); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; width: 100%; }
.cal-head-day { font-size: 10px; color: var(--text-main); opacity: 0.7; text-align: center; font-weight: 700; padding-bottom: 5px; }
.cal-cell { aspect-ratio: 1/1; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 14px; font-weight: 500; color: var(--text-main); position: relative; cursor: pointer; border: 1px solid transparent; background: #FFF; box-shadow: 0 2px 5px rgba(0,0,0,0.03); }
.cal-cell.today { border: 2px solid var(--primary); color: var(--primary); font-weight: 800; }
.cal-cell.other-month { opacity: 0.4; background: rgba(255,255,255,0.5); }
.cal-dot { width: 5px; height: 5px; border-radius: 50%; margin-top: 3px; }
.cal-cell.has-workout .cal-dot { background: var(--text-sec); }
.cal-cell.done .cal-dot { background: var(--success); }
.cal-cell.done { background: #e0f7fa; color: var(--text-main); }
.cal-note-indicator { position: absolute; top: 3px; right: 3px; width: 5px; height: 5px; background: var(--primary); border-radius: 50%; }

/* CARDS */
.card { background: var(--surface); border-radius: var(--radius); padding: 25px; border: none; box-shadow: var(--shadow); margin-bottom: 20px; }

/* NEWS CARD (Atualizado para ser clicável e mostrar apenas capa) */
.news-card { overflow: hidden; padding: 0; display: flex; flex-direction: column; border: none; box-shadow: var(--shadow); border-radius: var(--radius); background: #FFF; margin-bottom: 20px; cursor: pointer; transition: transform 0.2s; }
.news-card:active { transform: scale(0.98); }
.news-img { width: 100%; height: 220px; object-fit: cover; background: #EEE; }
.news-content { padding: 25px; }
.news-date { font-size: 11px; color: var(--text-sec); margin-bottom: 8px; font-weight: 700; }
.news-title { font-size: 18px; font-weight: 700; margin: 0; line-height: 1.2; font-family: var(--font-logo); color: var(--text-main); }

/* NAV BAR (MENU INFERIOR AJUSTADO) */
.nav-bar { 
    position: fixed; 
    bottom: 0; 
    left: 0; 
    width: 100%; 
    height: auto;
    background: #9cafcc; 
    border-radius: 25px 25px 0 0; 
    display: flex; 
    justify-content: space-around; 
    align-items: center;
    padding: 12px 10px calc(12px + env(safe-area-inset-bottom));
    z-index: 300; 
    box-shadow: 0 -5px 30px rgba(43, 76, 126, 0.08);
}
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: none; border: none; color: #dce1e8; cursor: pointer; }
.nav-item i { font-size: 24px; transition: 0.3s; }
.nav-item span { display: none; } /* Removido texto */

/* ATIVO: Azul Marinho (#2b4c7e / --text-main) */
.nav-item.active { color: var(--text-main); }
.nav-item.active i { transform: translateY(-2px); color: var(--text-main); }

.hidden { display: none !important; }
.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-50px); background: var(--text-main); color: #FFF; padding: 12px 24px; border-radius: 50px; font-size: 13px; opacity: 0; transition: 0.3s; z-index: 5000; pointer-events: none; text-align: center; min-width: 200px; box-shadow: 0 5px 15px rgba(0,0,0,0.2); }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

.header-avatar { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; background: #FFF; cursor: pointer; border: 2px solid var(--text-main); display: flex; align-items: center; justify-content: center; font-weight: 600; color: var(--text-main); box-shadow: var(--shadow); }

.modal-overlay { position: fixed; top:0; left:0; width:100%; height:100%; background:rgba(255,255,255,0.6); z-index: 2000; display: none; align-items: center; justify-content: center; backdrop-filter: blur(10px); }
.modal-overlay.active { display: flex; animation: fadeIn 0.2s; }
.modal-card { width: 90%; max-width: 400px; background: #FFF; border-radius: 30px; padding: 30px; box-shadow: 0 20px 60px rgba(0,0,0,0.15); max-height: 90vh; overflow-y: auto; display: flex; flex-direction: column; gap: 15px; border: 1px solid rgba(0,0,0,0.05); }

/* ADMIN TABS */
.admin-header { background: #FFF; color: var(--text-main); padding: 20px; padding-top: max(20px, env(safe-area-inset-top)); flex-shrink: 0; border-bottom: 1px solid #EEE; }
.admin-tabs-wrapper { background: #FFF; border-bottom: 1px solid #ddd; overflow-x: auto; flex-shrink: 0; display: flex; }
.admin-content-scroll { flex: 1; overflow-y: auto; padding-bottom: 50px; background: #f8fff0; }
.admin-tab-btn { flex:1; min-width: 80px; padding:15px; border:none; background:none; cursor:pointer; font-size:12px; font-weight:600; color: var(--text-sec); border-bottom: 2px solid transparent; white-space: nowrap; }
.admin-tab-btn.active { color: var(--primary); border-color: var(--primary); }

.progress-container { 
    width: 100%; 
    background-color: rgba(255,255,255,0.6); 
    border-radius: 12px; 
    height: 14px; 
    margin-top: 20px; 
    overflow: hidden; 
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);
}
.progress-bar { 
    height: 100%; 
    background: #FFF; 
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1); 
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(255,255,255, 0.4); 
}
/* NOVA CLASSE PARA A BARRA DE PROGRESSO NO ADMIN (Fundo Branco requer cor) */
.progress-bar.colored {
    background: var(--success);
    box-shadow: none;
}

.check-toggle { width: 22px; height: 22px; accent-color: var(--primary); cursor: pointer; }

.adm-row-header { display: flex; justify-content: space-between; align-items: center; cursor: pointer; padding: 8px 0; color: var(--text-main); }
.adm-nested { display: none; padding-left: 15px; border-left: 2px solid var(--secondary); margin-left: 5px; margin-top: 5px; }
.adm-nested.open { display: block; animation: fadeIn 0.2s; }
.adm-item-box { background: #fff; border: 1px solid #eee; padding: 12px; border-radius: 12px; margin-bottom: 10px; box-shadow: 0 2px 5px rgba(0,0,0,0.02); }
.adm-btn-small { padding: 6px 12px; font-size: 11px; border-radius: 8px; border: 1px solid #ddd; background: #FFF; cursor: pointer; font-weight: 600; color: var(--text-main); }
.adm-action-btn { color: var(--text-sec); border:none; background:none; font-size:12px; padding:5px; cursor:pointer; }

