* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #e8f7f0, #eef4ff);
    color: #1f2937;
}

/* HEADER */

.header {
    background: rgba(255, 255, 255, 0.92);
    padding: 18px 45px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 10;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #15803d;
}

nav a {
    margin-left: 24px;
    text-decoration: none;
    color: #374151;
    font-weight: bold;
}

#toggle-bmi-calc {
    font-size: 16px;
    color: black;
    background: rgba(255, 255, 255, 0.82);
}

#toggle-bmi-calc:hover {
    color: #15803d;
    background-color: rgba(255, 255, 255, 0.82);
}


nav a:hover {
    color: #15803d;
}

/* MAIN */

main {
    padding: 35px 45px;
}

/* HERO */

.hero {
    background: linear-gradient(135deg, #15803d, #22c55e);
    color: white;
    border-radius: 28px;
    padding: 35px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    margin-bottom: 30px;
    box-shadow: 0 12px 30px rgba(34, 197, 94, 0.3);
}

.hero h1 {
    font-size: 38px;
    margin-bottom: 12px;
}

.hero p {
    font-size: 17px;
    line-height: 1.6;
}

.profile-card {
    background: rgba(255, 255, 255, 0.18);
    padding: 22px;
    border-radius: 22px;
    backdrop-filter: blur(8px);
}

.small-text {
    font-size: 14px;
    opacity: 0.95;
}

/* GRID */

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    align-items: start;
  }
  
  .health-widget,
  .calendar-widget {
    grid-column: 1 / 2;
  }
  
  .mood-widget,
  .daily-quote-widget,
  .food-widget,
  .bmi-widget {
    grid-column: 2 / 3;
  }

/* WIDGETS */

.widget {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 18px;
    min-height: 220px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: 0.2s ease;
}

.widget:hover {
    transform: translateY(-4px);
}

.widget h2 {
    font-size: 18px;
    color: #166534;
}

.widget p {
    font-size: 14px;
    margin-top: 8px;
    line-height: 1.5;
}

.widget-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.number {
    font-size: 28px;
    font-weight: bold;
}

/* BADGES */

.badge {
    background: #dcfce7;
    color: #166534;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
}

/* BUTTONS */

button {
    padding: 8px 12px;
    border: none;
    border-radius: 12px;
    background: #15803d;
    color: white;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s ease;
}

button:hover {
    background: #166534;
}

/* CONTROLS */

.controls {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.quick-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.quick-actions button {
    flex: 1;
    background: #ecfdf5;
    color: #166534;
    font-size: 12px;
}

/* INPUT */

input {
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
}

/* PROGRESS */

.progress {
    background: #dbeafe;
    border-radius: 30px;
    height: 20px;
    overflow: hidden;
    margin-top: 14px;
}

.fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    color: white;
    text-align: center;
    font-size: 12px;
    line-height: 20px;
    font-weight: bold;
}

/* SUCCESS */

.success {
    margin-top: 12px;
    font-weight: bold;
    color: #15803d;
    background: #dcfce7;
    padding: 10px;
    border-radius: 12px;
}

/* HEALTH OVERVIEW */

.summary-widget {
    grid-column: 1 / 2;
}

.summary-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.summary-item {
    background: #f0fdf4;
    padding: 18px;
    border-radius: 18px;
    text-align: center;
}

.summary-item span {
    display: inline-block;
    background: #dcfce7;
    color: #166534;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.summary-item h3 {
    margin-top: 10px;
    font-size: 22px;
}

.summary-item p {
    opacity: 0.7;
    font-size: 13px;
}

/* MODAL */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.modal-box {
    background: white;
    width: 420px;
    border-radius: 24px;
    padding: 24px;
    animation: popup 0.2s ease;
}

@keyframes popup {

    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }

}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close-btn {
    background: #ef4444;
}

.modal-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-content label {
    font-weight: bold;
}

/* RESPONSIVE */

@media screen and (max-width: 1200px) {

    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
    }

}

@media screen and (max-width: 900px) {

    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .summary-widget {
        grid-column: span 2;
    }

    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero {
        grid-template-columns: 1fr;
    }

}

@media screen and (max-width: 650px) {

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .summary-widget {
        grid-column: span 1;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .modal-box {
        width: 92%;
    }

    .header {
        flex-direction: column;
        gap: 14px;
    }

}

.health-message {
    margin-top: 18px;
    background: #f0fdf4;
    border-left: 4px solid #22c55e;
    padding: 14px;
    border-radius: 14px;
    line-height: 1.6;
    font-size: 14px;
    color: #1f2937;
}

.theme-toggle {
    margin-left: 20px;
    background: #111827;
    color: white;
}

.dark-mode {
    background: #313338;
    color: #f2f3f5;
}

.dark-mode .header {
    background: #1e1f22;
    box-shadow: none;
}

.dark-mode .logo {
    color: #23a559;
}

.dark-mode nav a {
    color: #dbdee1;
}

.dark-mode main {
    background: #313338;
}

.dark-mode .hero {
    background: linear-gradient(135deg, #2b2d31, #1e1f22);
    box-shadow: none;
}

.dark-mode .profile-card {
    background: #383a40;
}

.dark-mode .widget {
    background: #2b2d31;
    color: #f2f3f5;
    box-shadow: none;
}

.dark-mode .widget h2 {
    color: #23a559;
}

.dark-mode .summary-item {
    background: #383a40;
}

.dark-mode .summary-item p {
    color: #b5bac1;
}

.dark-mode .health-message,
.dark-mode .recommendation-text {
    background: #383a40;
    color: #f2f3f5;
    border-left: 4px solid #23a559;
}

.dark-mode .badge {
    background: #1f3d2b;
    color: #23a559;
}

.dark-mode input {
    background: #1e1f22;
    color: white;
    border: 1px solid #4e5058;
}

.dark-mode .modal-box {
    background: #2b2d31;
    color: white;
}

.calendar-widget {
    grid-column: 1 / 2;
}

.calendar-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 18px 0;
}

.calendar-summary div {
    background: #f0fdf4;
    border-radius: 16px;
    padding: 14px;
    text-align: center;
}

.calendar-summary h3 {
    color: #166534;
    font-size: 24px;
}

.calendar-summary p {
    font-size: 13px;
    opacity: 0.75;
}

.week-labels {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 8px;
    text-align: center;
    font-weight: bold;
    color: #64748b;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day {
    min-height: 58px;
    border-radius: 14px;
    font-weight: bold;
    color: #111827;
    background: #e5e7eb;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.calendar-day small {
    font-size: 10px;
    opacity: 0.8;
}

.calendar-day:hover {
    transform: scale(1.05);
}

.complete-day {
    background: #bbf7d0;
    color: #166534;
}

.partial-day {
    background: #fef3c7;
    color: #92400e;
}

.rest-day {
    background: #e5e7eb;
    color: #374151;
}

.empty-day {
    background: #f1f5f9;
    color: #64748b;
}

.calendar-details {
    margin-top: 18px;
    background: #f8fafc;
    border-left: 4px solid #22c55e;
    padding: 14px;
    border-radius: 14px;
}

.calendar-details h3 {
    margin-bottom: 8px;
}

.calendar-legend {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 14px;
    font-size: 13px;
}

.legend {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 4px;
    margin-right: 5px;
}

.legend.complete {
    background: #22c55e;
}

.legend.partial {
    background: #facc15;
}

.legend.rest {
    background: #cbd5e1;
}

.legend.empty {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
}

select,
textarea {
    width: 100%;
    margin-top: 8px;
    padding: 11px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    font-family: Arial, Helvetica, sans-serif;
}

textarea {
    min-height: 90px;
    resize: vertical;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.secondary-btn {
    background: #64748b;
}

/* Dark mode calendar */

.dark-mode .calendar-summary div,
.dark-mode .calendar-details {
    background: #383a40;
}

.dark-mode .calendar-day {
    color: #f2f3f5;
}

.dark-mode .complete-day {
    background: #1f3d2b;
    color: #23a559;
}

.dark-mode .partial-day {
    background: #4a3b1f;
    color: #facc15;
}

.dark-mode .rest-day {
    background: #4e5058;
}

.dark-mode .empty-day {
    background: #2b2d31;
    color: #b5bac1;
}

.dark-mode .week-labels {
    color: #b5bac1;
}

.dark-mode select,
.dark-mode textarea {
    background: #1e1f22;
    color: white;
    border: 1px solid #4e5058;
}

@media screen and (max-width: 900px) {
    .calendar-widget {
        grid-column: span 2;
    }
}

@media screen and (max-width: 650px) {
    .calendar-widget {
        grid-column: span 1;
    }
}
.daily-quote-widget {
    min-height: 230px;
    max-width: 100%;
  }
  
  .quote-box {
    background: #f0fdf4;
    padding: 16px;
    border-radius: 16px;
    border-left: 4px solid #22c55e;
    margin-top: 16px;
  }
  
  .quote-text {
    font-size: 15px;
    line-height: 1.6;
    font-style: italic;
  }
  
  .quote-author {
    margin-top: 12px;
    font-weight: bold;
    color: #166534;
  }
  
  .quote-btn {
    margin-top: 16px;
  }
  
  /* Dark mode */
  
  .dark-mode .quote-box {
    background: #383a40;
    border-left: 4px solid #23a559;
  }
  
  .dark-mode .quote-author {
    color: #23a559;
  }
  .exercise-quote-row {
    display: flex;
    gap: 24px;
    align-items: stretch;
    margin-top: 24px;
    width: fit-content;
} 
.exercise-quote-row {
    display: grid;
    grid-template-columns: 320px 500px;
    gap: 24px;
    margin-top: 24px;
}