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

:root {
    /* Palet Warna Modern */
    --primary-color: #4A90E2; /* Biru cerah, profesional */
    --primary-dark: #357ABD; /* Biru lebih gelap untuk hover */
    --secondary-color: #6C757D; /* Abu-abu netral */
    --background-color: #EFF2F5; /* Background utama */
    --background-light: #F8F9FA; /* Sangat terang, untuk background */
    --background-medium: #EFF2F5; /* Sedikit lebih gelap dari background-light */
    --text-dark: #343A40; /* Teks gelap */
    --text-light: #F8F9FA; /* Teks terang */
    --card-bg: #FFFFFF; /* Latar belakang card putih bersih */
    --shadow-light: rgba(0, 0, 0, 0.08); /* Shadow halus */
    --shadow-medium: rgba(0, 0, 0, 0.15); /* Shadow sedikit lebih jelas */
    --success-color: #28A745;
    --warning-color: #FFC107;
    --danger-color: #DC3545;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    background-color: var(--background-medium);
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.6;
}

/* --- General Container for index.html --- */
.container-center {
    max-width: 550px;
    margin: auto;
    padding: 40px;
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 8px 30px var(--shadow-light);
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

.container-center h1 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 600;
}

.container-center p {
    font-size: 1.1em;
    color: var(--secondary-color);
    margin-bottom: 30px;
}

.role-selection button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 35px;
    margin: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.role-selection button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}


/* --- Navbar Styling --- */
.navbar {
    background-color: var(--card-bg);
    color: var(--text-dark);
    padding: 18px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 15px var(--shadow-light);
    z-index: 1000;
    border-bottom: 1px solid var(--background-light);
}

.navbar-brand {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--primary-color);
}

.navbar-user {
    display: flex;
    align-items: center;
    font-size: 1.05em;
    font-weight: 500;
    color: var(--secondary-color);
}

.navbar-user i {
    margin-right: 12px;
    font-size: 22px;
    color: var(--primary-color);
}

.navbar-user .logout-btn {
    background-color: var(--danger-color);
    color: white;
    margin-left: 25px;
    padding: 9px 18px;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 500;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.navbar-user .logout-btn:hover {
    background-color: #c82333;
}

/* --- Main Layout (Sidebar + Content) --- */
.main-layout {
    display: flex;
    flex: 1;
}

/* --- Sidebar Styling --- */
.sidebar {
    width: 280px;
    background-color: var(--card-bg);
    padding: 25px 0;
    box-shadow: 2px 0 15px var(--shadow-light);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--background-light);
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-item {
    padding: 18px 30px;
    color: var(--secondary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 1.05em;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 5px solid transparent; /* Untuk indikator aktif */
}

.sidebar-item i {
    margin-right: 18px;
    font-size: 20px;
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

.sidebar-item:hover {
    background-color: var(--background-light);
    color: var(--primary-color);
}

.sidebar-item:hover i {
    color: var(--primary-color);
}

.sidebar-item.active {
    background-color: var(--primary-color);
    color: white;
    border-left-color: var(--primary-dark); /* Border kiri yang lebih tebal */
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}

.sidebar-item.active i {
    color: white;
}

/* --- Content Area Styling --- */
.content-area {
    flex: 1;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    overflow-y: auto; /* Agar bisa discroll jika konten terlalu panjang */
}

.content-section {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.content-section.active-section {
    display: block;
}

/* --- Card Styling (general) --- */
.card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow-light);
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow-medium);
}

.card h2 {
    color: var(--primary-dark);
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 1.8em;
    font-weight: 600;
    border-bottom: 1px solid var(--background-medium);
    padding-bottom: 15px;
}

/* Mood Check-In */
.mood-emojis {
    display: flex;
    justify-content: space-around;
    margin-bottom: 25px;
    gap: 10px; /* Jarak antar emoji */
}

.emoji {
    font-size: 48px;
    cursor: pointer;
    padding: 12px;
    border-radius: 50%; /* Bentuk lingkaran */
    transition: all 0.2s ease;
    border: 2px solid transparent;
    background-color: var(--background-light); /* Latar belakang emoji */
}

.emoji:hover {
    background-color: #E6F3FF; /* Light blue on hover */
    transform: scale(1.15);
}

.emoji.selected {
    background-color: var(--primary-color);
    transform: scale(1.15);
    border-color: var(--primary-dark);
    box-shadow: 0 0 15px rgba(74, 144, 226, 0.5); /* Glowing effect */
}

textarea {
    width: calc(100% - 24px); /* Kurangi padding dari lebar */
    padding: 12px;
    margin-bottom: 25px;
    border: 1px solid #D1D9E6; /* Warna border halus */
    border-radius: 8px;
    resize: vertical;
    font-size: 1em;
    color: var(--text-dark);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

button {
    background-color: var(--success-color); /* Green for primary action */
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.05em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

button:hover {
    background-color: #218838; /* Darker green */
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Smart Feedback */
.smart-feedback p {
    background-color: #FFF8E1; /* Soft yellow background */
    border-left: 6px solid var(--warning-color);
    padding: 20px;
    border-radius: 8px;
    font-size: 1.05em;
    line-height: 1.7;
    color: #8D6E00; /* Darker yellow text */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Reflection Content */
#personalReflectionContent, #weeklyReflectionContent {
    background-color: var(--background-light);
    border: 1px solid #E0E6F0;
    padding: 20px;
    border-radius: 10px;
    line-height: 1.7;
    color: var(--text-dark);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05) inset; /* Shadow ke dalam */
}

#personalReflectionContent h3, #weeklyReflectionContent h3 {
    color: var(--primary-dark);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.4em;
    font-weight: 600;
}


/* Anonymous Notes List */
#anonymousNotesList {
    list-style: none;
    padding: 0;
    margin-top: 25px;
}

#anonymousNotesList li {
    background-color: var(--background-light);
    border: 1px solid #E0E6F0;
    padding: 15px;
    margin-bottom: 12px;
    border-radius: 8px;
    font-size: 1.0em;
    color: var(--text-dark);
    box-shadow: 0 1px 5px rgba(0,0,0,0.03);
    transition: all 0.2s ease;
}

#anonymousNotesList li:hover {
    background-color: #EBF4F8; /* Light blue tint on hover */
    transform: translateX(5px);
}


/* Chart Height Control */
.card canvas {
    max-height: 300px; /* Sedikit lebih tinggi untuk visibilitas */
    width: 100% !important;
    height: 300px !important;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#moodCommentHistory {
    list-style: none;
    padding: 0;
    margin-top: 20px;
    border-top: 1px dashed #E0E6F0; /* Garis pemisah */
    padding-top: 20px;
}

#moodCommentHistory li {
    background-color: var(--card-bg); /* Latar belakang item komentar */
    border: 1px solid #E0E6F0;
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    font-size: 0.95em;
    color: var(--text-dark);
    box-shadow: 0 1px 5px rgba(0,0,0,0.03);
}

#moodCommentHistory li strong {
    color: var(--primary-dark);
}