body {
    font-family: 'Inter', sans-serif;
    background-color: #f1f5f9; /* slate-100 */
}

/* --- BUTTONS (Restored from Original) --- */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background-color: #2563eb; /* blue-600 */
    border-radius: 0.5rem;
    transition: background-color 0.2s, transform 0.2s;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    text-decoration: none;
}
.cta-button:hover {
    background-color: #1d4ed8; /* blue-700 */
    transform: translateY(-2px);
}
.cta-button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #1e3a8a; /* blue-800 */
    background-color: white;
    border: 1px solid #d1d5db; /* gray-300 */
    border-radius: 0.5rem;
    transition: background-color 0.2s, color 0.2s, transform 0.2s;
}
.cta-button-secondary:hover {
    background-color: #f9fafb; /* gray-50 */
    transform: translateY(-2px);
}

/* --- DASHBOARD (Restored from Original) --- */
.dashboard-card {
    background-color: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}
.trend-arrow {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}
.trend-up { background-color: #fecaca; color: #b91c1c; }
.trend-down { background-color: #d1fae5; color: #065f46; }
.trend-stable { background-color: #e5e7eb; color: #374151; }
.trend-uturn { background-color: #fee2e2; color: #991b1b; }
.filter-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    background-color: white;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    font-weight: 500;
    cursor: pointer;
}
.filter-btn.active {
    background-color: #1e3a8a; /* A darker blue for contrast */
    color: white;
    border-color: #1e3a8a;
}
.filter-btn.concerns {
    border-color: #d97706;
    color: #92400e;
}
.filter-btn.concerns.active {
    background-color: #d97706;
    color: white;
    border-color: #d97706;
}
.data-row {
    transition: background-color 0.2s;
    cursor: pointer;
}

/* --- MODAL (Restored & Verified) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 0.75rem;
    max-width: 500px;
    width: 90%;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}
.modal-overlay.visible .modal-content {
    transform: scale(1);
}

/* --- TOOLTIP (Restored & Verified) --- */
.tooltip {
    position: relative;
    display: inline-block;
}
.tooltip .tooltiptext {
    visibility: hidden;
    width: 220px;
    background-color: #1f2937;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -110px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.75rem;
    font-weight: 400;
}
.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* --- HABIT & GOAL CARDS (Restored from Original) --- */
.habit-card {
    border-radius: 0.5rem;
    padding: 1rem;
    height: 100%;
}
.habit-card.good {
    background-color: #f0fdf4; /* green-50 */
    border: 1px solid #bbf7d0; /* green-200 */
}
.habit-card.ok {
    background-color: #fffbeb; /* amber-50 */
    border: 1px solid #fde68a; /* amber-200 */
}
.habit-card.bad {
    background-color: #fff1f2; /* red-50 */
    border: 1px solid #fecaca; /* red-200 */
}
.habit-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937; /* gray-800 */
}
.habit-list {
    list-style-position: inside;
    list-style-type: disc;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: #4b5563; /* gray-600 */
    /* Spacing between list items is handled by Tailwind classes on the parent */
}
.habit-text {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #4b5563; /* gray-600 */
}

/* --- DETAILED LOG PAGE (Restored & Verified) --- */
.day-card-header {
    cursor: pointer;
    transition: background-color 0.2s;
}
.day-card-header:hover {
    background-color: #f8fafc; /* slate-50 */
}
.day-card-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, padding 0.5s ease-in-out;
    padding-top: 0;
    padding-bottom: 0;
}
.day-card-details.open {
    max-height: 4000px; /* Large enough to fit any content */
    /* Padding is applied by the inner div for better animation */
}
.log-entry {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    /* Spacing handled by parent */
}
.analysis-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}
.good-point {
    background-color: #f0fdf4;
    border-left: 4px solid #22c55e;
    padding: 0.75rem;
}
.improvement-point {
    background-color: #fffbeb;
    border-left: 4px solid #f59e0b;
    padding: 0.75rem;
}