/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&family=Nunito:wght@700&display=swap');

/* CSS Variables from globals.css */
:root {
    --background: #f8fdf8;
    --foreground: #1a3629;
    --card: #ffffff;
    --card-foreground: #1a3629;
    --primary: #2d5741;
    --primary-foreground: #ffffff;
    --secondary: #e8f5e8;
    --secondary-foreground: #1a3629;
    --muted: #f0f9f0;
    --muted-foreground: #5a7063;
    --accent: #d1ebe1;
    --accent-foreground: #1a3629;
    --destructive: #d4183d;
    --destructive-foreground: #ffffff;
    --border: rgba(42, 87, 65, 0.15);
    --ring: #4a9960;
    --radius: 0.625rem;
    --sidebar: #f0f9f0;
    --sidebar-foreground: #1a3629;
    --sidebar-accent: #e8f5e8;
    --sidebar-border: rgba(42, 87, 65, 0.15);
}

/* Basic Reset */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: var(--font-body);
    background-color: var(--background);
    color: var(--foreground);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Main Layout */
.app-container { display: flex; height: 100vh; }
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* Sidebar */
.sidebar {
    width: 256px;
    background-color: var(--sidebar);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    transition: width 300ms ease-in-out;
}
.sidebar.closed { width: 80px; }
.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid var(--sidebar-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.sidebar-header-content { display: flex; align-items: center; gap: 0.5rem; overflow: hidden; }
.sidebar.closed .sidebar-header-content { display: none; }
.app-title { font-family: var(--font-heading); font-size: 1.25rem; white-space: nowrap; }
.sidebar-nav { flex: 1; padding: 0.5rem; }
.sidebar-nav ul { list-style: none; }
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--sidebar-border);
    font-size: 0.75rem;
    color: var(--muted-foreground);
    text-align: center;
}
.sidebar.closed .sidebar-footer { display: none; }

/* Main Header */
.main-header {
    background-color: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.main-title { font-size: 1.25rem; font-family: var(--font-heading); }
.current-date { font-size: 0.875rem; color: var(--muted-foreground); }
.content-wrapper { flex: 1; overflow-y: auto; padding: 1.5rem; }
#content-area { max-width: 56rem; margin: 0 auto; }

/* Generic Components */
.icon { height: 1em; width: 1em; }
.text-primary { color: var(--primary); }
.text-muted { color: var(--muted-foreground); }
.text-center { text-align: center; }
.w-full { width: 100%; }
.hidden { display: none !important; }

.button {
    padding: 0.5rem 1rem; border-radius: var(--radius); font-weight: 600;
    border: 1px solid var(--border); cursor: pointer; display: inline-flex;
    align-items: center; gap: 0.5rem; background-color: var(--card); transition: background-color 0.2s;
}
.button.button-sm { padding: 0.25rem 0.5rem; font-size: 0.875rem; }
.button.button-primary { background-color: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
.button.button-primary:hover { background-color: #254a38; }
.button.button-primary:disabled { background-color: var(--muted); color: var(--muted-foreground); border-color: var(--border); cursor: not-allowed; }
.button.button-outline { background-color: transparent; }
.button.button-outline:hover { background-color: var(--accent); }

.icon-button { background: none; border: none; cursor: pointer; padding: 0.25rem; border-radius: 6px; }
.icon-button:hover { background-color: var(--accent); }
.nav-button {
    width: 100%; display: flex; align-items: center; padding: 0.75rem;
    border-radius: 6px; font-size: 0.9rem; font-weight: 600; background-color: transparent;
    border: none; cursor: pointer; text-align: left; white-space: nowrap;
}
.nav-button .nav-label { margin-left: 0.75rem; }
.sidebar.closed .nav-button { justify-content: center; }
.sidebar.closed .nav-label { display: none; }
.nav-button:hover { background-color: var(--sidebar-accent); }
.nav-button.active { background-color: var(--primary); color: var(--primary-foreground); }

.input-field, .textarea {
    width: 100%; padding: 0.6rem; border: 1px solid var(--border); border-radius: var(--radius);
    font-family: var(--font-body); background-color: var(--background);
}
.input-field:focus, .textarea:focus { outline: none; box-shadow: 0 0 0 2px var(--ring); }
.input-group { display: flex; gap: 0.5rem; }
.textarea { resize: vertical; min-height: 80px; }

.card { background-color: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.card-header { padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.card-title { font-size: 1.125rem; font-family: var(--font-heading); }
.card-title-group { display: flex; align-items: center; gap: 0.5rem; }
.card-content { padding: 1.5rem; }
.counter-chip { font-size: 0.8rem; background-color: var(--muted); padding: 0.25rem 0.5rem; border-radius: 99px; }
.item-list { display: flex; flex-direction: column; gap: 0.75rem; max-height: 60vh; overflow-y: auto; padding-right: 0.5rem;}
.add-item-form { display: flex; flex-direction: column; gap: 0.75rem; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); margin-top: 1.5rem; background-color: var(--muted); }
.form-title { font-family: var(--font-heading); font-size: 1rem; margin-bottom: 0.5rem;}
.form-actions { display: flex; gap: 0.5rem; }

/* View Specific Styles */

/* Calendar */
.calendar-nav { display: flex; align-items: center; gap: 0.5rem; }
.month-year-label { font-size: 1.125rem; font-weight: 600; text-align: center; min-width: 150px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.25rem; }
.calendar-day-header { text-align: center; font-size: 0.8rem; font-weight: 600; color: var(--muted-foreground); padding: 0.5rem; }
.calendar-day { 
    text-align: center; font-size: 0.875rem; padding: 0.5rem; border-radius: 6px; 
    cursor: pointer; transition: background-color 0.2s; position: relative;
}
.calendar-day:hover { background-color: var(--accent); }
.calendar-day.not-current-month { color: var(--muted-foreground); }
.calendar-day.today { font-weight: 600; border: 1px solid var(--primary); }
.calendar-day.selected { background-color: var(--primary); color: var(--primary-foreground); }
.calendar-day .event-dot {
    position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
    width: 5px; height: 5px; background-color: var(--primary); border-radius: 50%;
}
.calendar-day.selected .event-dot { background-color: var(--primary-foreground); }
.calendar-details { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.calendar-details h4 { font-family: var(--font-heading); margin-bottom: 1rem; }
.day-event-item { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem; border-radius: 6px; }
.day-event-item:hover { background-color: var(--muted); }
.day-event-item-info { display: flex; align-items: center; gap: 0.5rem; }
.event-type-icon { font-size: 0.8rem; }

/* ToDo List & Priorities */
.list-item { display: flex; align-items: center; gap: 0.75rem; background-color: var(--card); padding: 0.75rem; border: 1px solid var(--border); border-radius: var(--radius); transition: background-color 0.2s; }
.list-item:hover { background-color: var(--muted); }
.list-item.completed { opacity: 0.7; }
.list-item.completed .item-text { text-decoration: line-through; }
.item-checkbox { width: 1.15rem; height: 1.15rem; accent-color: var(--primary); flex-shrink: 0;}
.item-text { flex: 1; }
.delete-btn { background: none; border: none; cursor: pointer; color: var(--destructive); }
.delete-btn:hover { color: #a5122f; }
.priority-number { width: 2rem; height: 2rem; border-radius: 50%; background-color: var(--primary); color: var(--primary-foreground); display: flex; align-items: center; justify-content: center; font-size: 0.875rem; font-weight: 600; flex-shrink: 0; }
.empty-state { text-align: center; padding: 2rem; color: var(--muted-foreground); }
.empty-state .icon { font-size: 2rem; margin-bottom: 0.5rem; }

/* Remember List */
.remember-item { background-color: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; transition: all 0.2s; }
.remember-item.important { background-color: #fffbeb; border-color: #fde68a; }
.remember-item-header { display: flex; justify-content: space-between; align-items: flex-start; }
.remember-item-title { font-weight: 600; }
.remember-item-content { font-size: 0.9rem; color: var(--muted-foreground); margin: 0.5rem 0; }
.remember-item-actions { display: flex; gap: 0.25rem; }
.important-btn { color: var(--primary); }

/* Brain Dump */
.braindump-item { background-color: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.braindump-content { white-space: pre-wrap; margin-bottom: 0.5rem; }
.braindump-timestamp { font-size: 0.75rem; color: var(--muted-foreground); }

/* Daily Mood */
.mood-selector { display: flex; justify-content: center; gap: 0.5rem; margin: 1rem 0; }
.mood-button { background: none; border: none; cursor: pointer; padding: 0.5rem; border-radius: 50%; transition: all 0.2s; }
.mood-button:hover { background-color: var(--accent); transform: scale(1.1); }
.mood-button.selected { background-color: var(--accent); box-shadow: 0 0 0 2px var(--ring); }
.mood-button span { font-size: 2rem; }
.mood-feedback { margin-top: 1rem; display: flex; flex-direction: column; align-items: center; gap: 0.5rem;}

/* Utility */
.templates { display: none; }

