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

:root {
    /* DALLCEL Premium Palette */
    --bg-main: #FAF8FC;         /* Soft almost-white lilac */
    --bg-card: #FFFFFF;         /* Pure white for cards */
    --bg-gray: #F3F0F5;         /* Very light gray for backgrounds/inputs */
    
    --primary: #9B72CF;         /* Elegant Soft Purple */
    --primary-light: #C4A7E7;   /* Lighter Lilac */
    --secondary: #E0B0FF;       /* Pale Mauve */
    --accent: #D25E8D;          /* Soft Magenta for highlights/calls to action */
    
    --text-main: #2D2736;       /* Deep slate/purple for high contrast */
    --text-muted: #837B8E;      /* Soft grayish-purple for descriptions */
    --border-color: #EAE5F0;    /* Soft borders */
    
    /* Shadows - Premium & Soft */
    --shadow-sm: 0 4px 14px rgba(155, 114, 207, 0.08);
    --shadow-md: 0 10px 30px rgba(155, 114, 207, 0.12);
    --shadow-glow: 0 8px 24px rgba(210, 94, 141, 0.25); 
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-text: 'Inter', sans-serif;
    
    /* Layout */
    --bottom-nav-height: 75px;
    --radius-sm: 16px;
    --radius-md: 24px; 
    --radius-lg: 32px;
}

* {
    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);
    -webkit-font-smoothing: antialiased;
}

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

/* -------------------------------------
   ONBOARDING
------------------------------------- */
#onboarding-screen {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    background: var(--bg-main);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    transition: opacity 0.5s ease;
}

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

.onboarding-slide {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: fadeInSlide 0.5s ease;
}

.onboarding-slide.active {
    display: flex;
}

@keyframes fadeInSlide {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.onboarding-icon-wrapper {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bg-card), var(--bg-gray));
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    color: var(--primary);
}

.onboarding-slide h2 { font-size: 1.8rem; margin-bottom: 12px; }
.onboarding-slide p { font-size: 1rem; padding: 0 20px; }

.onboarding-dots {
    display: flex;
    gap: 8px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--border-color);
    transition: all 0.3s ease;
}
.dot.active {
    background: var(--primary);
    width: 24px;
    border-radius: 5px;
}

/* -------------------------------------
   LOGIN SCREEN
------------------------------------- */
#login-screen {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    background: linear-gradient(135deg, var(--bg-main) 0%, var(--bg-gray) 100%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    transition: opacity 0.5s ease;
}

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

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

.login-logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.login-card h2 { font-size: 1.4rem; margin-bottom: 12px; }
.login-card p { margin-bottom: 30px; font-size: 0.95rem; }

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

.login-input:focus {
    background-color: var(--bg-card);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(155, 114, 207, 0.1);
}

/* -------------------------------------
   BOTÕES PREMIUM
------------------------------------- */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    box-shadow: var(--shadow-glow);
    transition: all 0.3s;
}

.btn-primary:active { transform: scale(0.98); }
.btn-primary:hover { box-shadow: 0 10px 30px rgba(210, 94, 141, 0.4); }

.btn-secondary {
    background: var(--bg-gray);
    color: var(--primary);
    box-shadow: none;
    border: 1px solid var(--border-color);
}
.btn-secondary:hover { background: var(--border-color); }

.btn-logout { background: #FFEDF0; color: #D25E8D; box-shadow: none; border: 1px solid #FCDFE4; margin-top: 30px; }
.btn-logout:hover { background: #FCDFE4; }

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

#views-container { position: relative; }

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

.view.active { display: block; }

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

/* 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: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 30px rgba(0,0,0,0.03);
    z-index: 100;
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
    padding: 0 10px;
    border-top: 1px solid rgba(255,255,255,0.5);
}

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

.nav-item i { transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); stroke-width: 2; }

.nav-item.active { color: var(--primary); font-weight: 700; }
.nav-item.active i { transform: translateY(-4px) scale(1.1); color: var(--primary); }

/* Headers das Views */
.view-header {
    margin-bottom: 28px;
    text-align: center;
}
.view-header h2 { font-size: 1.6rem; color: var(--text-main); }
.view-header p { font-size: 1rem; color: var(--text-muted); margin-top: 4px; }

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

.dallcel-banner {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-gray) 100%);
    padding: 50px 24px 60px;
    border-bottom-left-radius: 40px;
    border-bottom-right-radius: 40px;
    box-shadow: var(--shadow-sm);
    text-align: left;
    margin-bottom: -30px;
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.banner-text h1 { font-size: 1.8rem; margin-bottom: 4px; color: var(--text-main); }
.banner-text p { color: var(--text-muted); font-size: 0.95rem; }

.streak-badge {
    background: var(--primary);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: var(--shadow-glow);
}

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

/* Card de Progresso Principal */
.main-progress-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.progress-circle-mini {
    position: relative;
    width: 80px;
    height: 80px;
}
.progress-circle-mini svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.progress-circle-mini circle { fill: none; stroke-width: 8; stroke-linecap: round; }
.progress-circle-mini .bg { stroke: var(--bg-gray); }
.progress-circle-mini .fg {
    stroke: var(--primary);
    stroke-dasharray: 201; /* 2 * pi * r (r=32) */
    stroke-dashoffset: 201; 
    transition: stroke-dashoffset 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.progress-text-mini {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.1rem; font-weight: 700;
    font-family: var(--font-heading); color: var(--primary);
}

.progress-info h3 { font-size: 1.1rem; margin-bottom: 4px; }
.progress-info p { font-size: 0.85rem; margin-bottom: 12px; }

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

.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: 14px;
    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.95rem;
    color: var(--text-main);
    text-align: center;
}

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

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

/* -------------------------------------
   LISTAS E CARDS (PLANO DIÁRIO)
------------------------------------- */
.checklist-container { display: flex; flex-direction: column; gap: 16px; }

.check-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.check-item:hover { transform: translateX(4px); box-shadow: var(--shadow-md); 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 .check-text h4, .check-item.checked .check-text p {
    text-decoration: line-through;
    color: #BDBDBD;
}

.check-icon-bg {
    width: 40px; height: 40px;
    border-radius: 12px;
    background: var(--bg-gray);
    display: flex; align-items: center; justify-content: center;
    color: var(--primary);
}
.check-item.checked .check-icon-bg { background: #F5F5F5; color: #BDBDBD; }

.check-text { flex-grow: 1; }
.check-text h4 { font-size: 1.05rem; margin-bottom: 2px; transition: color 0.3s; }
.check-text p { font-size: 0.85rem; transition: color 0.3s; }

/* -------------------------------------
   CONTEÚDO (RECEITAS E GUIA)
------------------------------------- */
.content-list { display: flex; flex-direction: column; gap: 16px; }

.info-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
    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;
    cursor: pointer;
}

.info-card-header-content { display: flex; align-items: center; gap: 16px; }

.info-icon {
    width: 48px; height: 48px;
    border-radius: 16px;
    background: var(--bg-main);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
}

.info-card h3 { font-size: 1.15rem; color: var(--text-main); margin-bottom: 4px; }
.info-tag { font-size: 0.8rem; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }

.info-card-body {
    display: none;
    margin-top: 20px;
    padding-top: 20px;
    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); }

/* -------------------------------------
   TABS
------------------------------------- */
.tabs-container {
    display: flex;
    overflow-x: auto;
    padding-bottom: 16px;
    margin-bottom: 16px;
    gap: 12px;
    scrollbar-width: none;
}
.tabs-container::-webkit-scrollbar { display: none; }

.tab-btn {
    padding: 12px 24px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

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

/* -------------------------------------
   CHECK-IN CORPORAL (SLIDERS)
------------------------------------- */
.checkin-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.checkin-header { margin-bottom: 16px; display:flex; justify-content: space-between; align-items:center; }
.checkin-header h4 { font-size: 1.1rem; }
.checkin-value { font-family: var(--font-heading); font-weight: 700; color: var(--primary); font-size: 1.2rem; }

input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    margin-top: -10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: var(--bg-gray);
    border-radius: 3px;
}

.checkin-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* -------------------------------------
   MAPA DE EVOLUÇÃO (PROGRESSO)
------------------------------------- */
.level-card {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-gray));
    border-radius: var(--radius-md);
    padding: 30px 24px;
    text-align: center;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.level-icon {
    width: 80px; height: 80px;
    margin: 0 auto 16px;
    background: var(--bg-card);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-md);
    color: var(--primary);
}

.level-card h3 { font-size: 1.5rem; margin-bottom: 8px; }
.level-card p { font-size: 1rem; color: var(--text-muted); }

.milestone-list { display: flex; flex-direction: column; gap: 12px; }

.milestone-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    opacity: 0.6;
    filter: grayscale(100%);
    transition: all 0.3s;
}

.milestone-item.unlocked {
    opacity: 1;
    filter: none;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary);
}

.milestone-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--bg-gray);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
}

.milestone-item.unlocked .milestone-icon {
    background: var(--primary-light);
    color: white;
}

/* -------------------------------------
   PERFIL
------------------------------------- */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.profile-avatar {
    width: 90px; height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
    box-shadow: var(--shadow-glow);
}

#user-email-display { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 600; }
.premium-tag {
    background: rgba(210, 94, 141, 0.1);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 8px;
    letter-spacing: 1px;
}
