/* reset */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
font-family: 'Segoe UI', sans-serif;
display: flex;
min-height: 100vh;
}

/* left menu */
.sidebar {
width: 220px;
padding: 24px 16px;
display: flex;
flex-direction: column;
gap: 24px;
}
.logo { font-size: 26px; }
nav { display: flex; flex-direction: column; gap: 8px; }
.nav-btn {
padding: 12px 14px;
border: none;
border-radius: 12px;
text-align: left;
font-size: 15px;
cursor: pointer;
}

/* main area */
.content { flex: 1; padding: 32px; }
.page { display: none; }
.page.active { display: block; }
h2 { margin-bottom: 16px; }
/* ---------- colours (pastel) ---------- */
:root {
--bg: #fdf6f0;
--card: #ffffff;
--text: #4a4458;
--accent: #f7c6d9;
--accent-dark: #e89ab8;
--soft: #e8dff5;
}

body { background: var(--bg); color: var(--text); }
.sidebar { background: var(--soft); }
.logo span { color: var(--accent-dark); }

.nav-btn { background: transparent; color: var(--text); transition: 0.2s; }
.nav-btn:hover { background: var(--card); }
.nav-btn.active { background: var(--accent); font-weight: 600; }

.page {
background: var(--card);
border-radius: 20px;
padding: 28px;
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

/* buttons and inputs used everywhere */
button.btn {
background: var(--accent-dark);
color: white;
border: none;
padding: 10px 18px;
border-radius: 12px;
cursor: pointer;
font-size: 15px;
}
button.btn:hover { opacity: 0.85; }

input, select, textarea {
padding: 10px 12px;
border: 2px solid var(--soft);
border-radius: 12px;
font-family: inherit;
font-size: 15px;
background: var(--card);
color: var(--text);
}
/* ---------- timer ---------- */
.timer-box { text-align: center; padding: 20px; }
#timerDisplay {
font-size: 80px;
font-weight: 700;
margin-bottom: 20px;
color: var(--accent-dark);
}
.timer-buttons { display: flex; gap: 10px; justify-content: center; }

.mode-buttons { display: flex; gap: 8px; justify-content: center; margin-bottom: 20px; }
.mode-btn {
padding: 8px 16px;
border: none;
border-radius: 20px;
background: var(--soft);
color: var(--text);
cursor: pointer;
}
.mode-btn.active { background: var(--accent); font-weight: 600; }

/* ---------- to-do ---------- */
.add-row { display: flex; gap: 10px; margin-bottom: 16px; }
.add-row input { flex: 1; }
#todoList { list-style: none; }
#todoList li {
display: flex;
align-items: center;
gap: 10px;
padding: 12px;
background: var(--bg);
border-radius: 12px;
margin-bottom: 8px;
}
#todoList li span { flex: 1; }
#todoList li.done span { text-decoration: line-through; opacity: 0.5; }
.del-btn { background: none; border: none; cursor: pointer; font-size: 16px; }
input[type="checkbox"] { width: 18px; height: 18px; padding: 0; accent-color: var(--accent-dark); }
/* ---------- notes ---------- */
.notes-layout { display: flex; gap: 20px; }
.notes-side { width: 220px; display: flex; flex-direction: column; gap: 10px; }
#noteList { list-style: none; }
#noteList li {
padding: 10px 12px;
border-radius: 10px;
background: var(--bg);
margin-bottom: 6px;
cursor: pointer;
}
#noteList li.active { background: var(--accent); }
.notes-editor { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.notes-editor textarea { flex: 1; min-height: 300px; resize: vertical; }
/* ---------- subjects & chapters ---------- */
.planner-layout { display: flex; gap: 20px; align-items: flex-start; }
.subject-panel { width: 260px; }
.hint { opacity: 0.6; font-size: 14px; margin-top: 8px; }
.subject-box { background: var(--bg); border-radius: 14px; padding: 12px; margin-top: 12px; }
.subject-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.chapter-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.chapter-chip { padding: 8px 10px; border-radius: 10px; font-size: 14px; }
.add-row.small { margin-bottom: 0; }
.add-row.small input { min-width: 0; padding: 6px 10px; }
.add-row.small .btn { padding: 6px 12px; }
/* ---------- weekly planner ---------- */
.week-panel { flex: 1; }
.week-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
#weekBoard { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.day-col { background: var(--bg); border-radius: 14px; padding: 10px; min-height: 160px; }
.day-col h4 { font-size: 14px; margin-bottom: 8px; }
.day-col small { opacity: 0.6; font-weight: normal; }
.day-col.drag-over { outline: 2px dashed var(--accent-dark); }
.plan-card { padding: 8px; border-radius: 10px; font-size: 13px; margin-bottom: 6px; }
.chapter-chip[draggable="true"] { cursor: grab; }

/* completed chapters */
.plan-card { display: flex; align-items: center; gap: 6px; }
.plan-card span { flex: 1; }
.plan-card.done span, .chapter-chip.done { text-decoration: line-through; opacity: 0.6; }

/* ---------- progress ---------- */
.stat-row { display: flex; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.stat-card { flex: 1; min-width: 140px; background: var(--bg); border-radius: 16px; padding: 16px; text-align: center; }
.stat-card h3 { font-size: 28px; color: var(--accent-dark); }
.bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.bar-name { width: 110px; }
.bar-track { flex: 1; height: 14px; background: var(--bg); border-radius: 10px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 10px; transition: width 0.5s; }

.chart-box { position: relative; height: 300px; margin-top: 24px; }

/* ---------- calendar ---------- */
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
#calendarGrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dayname { text-align: center; font-weight: 600; font-size: 13px; opacity: 0.7; }
.cal-cell { min-height: 70px; background: var(--bg); border-radius: 10px; padding: 6px; font-size: 13px; cursor: pointer; }
.cal-cell.empty { background: transparent; cursor: default; }
.cal-cell.today { outline: 2px solid var(--accent-dark); }

.cal-cell.selected { background: var(--accent); }
.cal-dot {
font-size: 10px;
border-radius: 6px;
padding: 1px 4px;
margin-top: 3px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
#dayDetails { margin-top: 16px; }
#dayDetails p { margin: 6px 0; }
.chart-title { margin-top: 28px; }
/* ---------- themes ---------- */
[data-theme="mint"] {
--bg: #f1faf5; --text: #3f524a; --accent: #bfe8d4; --accent-dark: #6fbf9c; --soft: #dcf0e6;
}
[data-theme="lavender"] {
--bg: #f6f2fc; --text: #4b4561; --accent: #d9c9f3; --accent-dark: #a68bd9; --soft: #e9e0f7;
}
[data-theme="sky"] {
--bg: #f0f7fd; --text: #3d4f61; --accent: #bcdcf5; --accent-dark: #6aa9d8; --soft: #dcebf8;
}
[data-theme="night"] {
--bg: #2b2a3a; --card: #383752; --text: #ece9f7; --accent: #6c5fa8; --accent-dark: #b9a8f0; --soft: #34334a;
}
[data-theme="night"] button.btn { color: #2b2a3a; }

/* smooth colour change */
body, .sidebar, .page, .nav-btn { transition: background 0.4s, color 0.4s; }

.theme-box { margin-top: auto; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.theme-box select { width: 100%; }

/* ---------- final polish ---------- */
body { font-family: 'Poppins', 'Segoe UI', sans-serif; }

/* pages fade in */
.page.active { animation: fadeIn 0.4s ease; }
@keyframes fadeIn {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: none; }
}

/* little hover effects */
.stat-card, .subject-box { transition: transform 0.2s, box-shadow 0.2s; }
.stat-card:hover, .subject-box:hover {
transform: translateY(-3px);
box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}
button.btn:active { transform: scale(0.96); }

/* phone / small screens */
@media (max-width: 800px) {
body { flex-direction: column; }
.sidebar { width: 100%; padding: 12px; gap: 12px; }
nav { flex-direction: row; flex-wrap: wrap; }
.content { padding: 12px; }
.planner-layout, .notes-layout { flex-direction: column; }
.subject-panel, .notes-side { width: 100%; }
#timerDisplay { font-size: 56px; }
}