:root {
    --bg: #f3f4f6;
    --sidebar-bg: #111827;
    --sidebar-text: #9ca3af;
    --sidebar-active: #ffffff;

    --primary: #2563eb;
    --primary-hover: #1d4ed8;

    --text: #111827;
    --muted: #6b7280;

    --card-bg: #ffffff;
    --border: #e5e7eb;

    --radius: 14px;
    --transition: 0.2s ease;
}

/* =========================
   Reset
========================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

/* =========================
   Layout
========================= */

.app {
    display: flex;
    min-height: 100vh;
}

/* =========================
   Sidebar
========================= */

.sidebar {
    width: 240px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
}

.logo {
    font-weight: 700;
    font-size: 18px;
    color: #fff;
    margin-bottom: 40px;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav a {
    text-decoration: none;
    color: var(--sidebar-text);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    transition: var(--transition);
}

.nav a:hover {
    background: rgba(255,255,255,0.08);
}

.nav a.active {
    background: rgba(255,255,255,0.15);
    color: var(--sidebar-active);
}

/* =========================
   Main
========================= */

.main {
    flex: 1;
    padding: 40px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.topbar h1 {
    font-size: 24px;
    font-weight: 600;
}

.week-range {
    font-size: 14px;
    color: var(--muted);
}

/* =========================
   Grids
========================= */

.week-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.week-edit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

/* =========================
   Cards
========================= */

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.day-name {
    font-weight: 600;
}

.day-date {
    font-size: 13px;
    color: var(--muted);
}

/* =========================
   Section Color Brackets
========================= */

.day-section {
    position: relative;
    padding-left: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.day-section::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 4px;
    border-radius: 4px;
}

.section-agenda::before { background: #3b82f6; }
.section-meal::before { background: #10b981; }
.section-tasks::before { background: #f59e0b; }

.section-header {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 6px;
}
.section-agenda {
    background: rgba(37, 99, 235, 0.04);
    padding: 8px 10px;
    border-radius: 10px;
}

.section-meal {
    background: rgba(16, 185, 129, 0.05);
    padding: 8px 10px;
    border-radius: 10px;
}

.section-tasks {
    background: rgba(245, 158, 11, 0.05);
    padding: 8px 10px;
    border-radius: 10px;
}

/* Agenda */
.section-agenda .section-header {
    color: #2563eb;
}

/* Dagmenu */
.section-meal .section-header {
    color: #10b981;
}

/* Taken */
.section-tasks .section-header {
    color: #f59e0b;
}


.section-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

/* =========================
   Today Highlight
========================= */

.today-highlight {
    border: 2px solid var(--primary);
}

/* =========================
   Tags & Clickable
========================= */

.tag {
    font-size: 13px;
    padding: 6px 10px;
    border-radius: 8px;
    width: fit-content;
}

.tag.green {
    background: rgba(16,185,129,0.1);
    color: #047857;
}

.clickable {
    cursor: pointer;
    transition: 0.15s ease;
}

.clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

/* =========================
   Forms
========================= */

input,
textarea,
select {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 14px;
    transition: var(--transition);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37,99,235,0.1);
}

textarea {
    resize: vertical;
    min-height: 90px;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--primary-hover);
}
/* =========================
   Week Navigation Buttons
========================= */

.btn-nav {
    background: var(--sidebar-bg);
    color: #fff;
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    display: inline-block;
}

.btn-nav:hover {
    background: #1f2937; /* iets lichter dan sidebar */
    text-decoration: none;
}

/* =========================
   Tasks
========================= */

.task-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    padding: 6px 0;
}

.task-item:hover {
    opacity: 0.8;
}


..task-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.task-item.done .task-checkbox {
    background: var(--primary);
    border-color: var(--primary);
}

.task-checkbox::after {
    content: "";
    position: absolute;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    top: 2px;
    left: 5px;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.task-item.done .task-checkbox::after {
    opacity: 1;
}


.task-item.done .task-checkbox {
    background: var(--primary);
}

.task-item.done span {
    text-decoration: line-through;
    opacity: 0.6;
}

@keyframes pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

.task-item.animate {
    animation: pop 0.4s ease;
}
/* =========================
   Fancy Task Styling
========================= */

.task-item {
    position: relative;
    padding: 10px 12px;
    border-radius: 10px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.task-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 4px;
    border-radius: 4px;
    background: var(--member-color);
}

.task-content {
    display: flex;
    flex-direction: column;
}

.task-title {
    font-size: 14px;
    font-weight: 500;
}

.task-member {
    font-size: 12px;
    margin-top: 2px;
    color: var(--member-color);
    font-weight: 500;
}


.task-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.task-item.done .task-checkbox {
    background: var(--primary);
    border-color: var(--primary);
}

.task-checkbox::after {
    content: "";
    position: absolute;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    top: 2px;
    left: 5px;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.task-item.done .task-checkbox::after {
    opacity: 1;
}


.task-item.done {
    opacity: 0.6;
}

.task-item.done .task-checkbox {
    background: var(--member-color);
}

.task-item.done .task-title {
    text-decoration: line-through;
}

/* =========================
   Modal
========================= */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.45);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #fff;
    width: 480px;
    max-width: 92%;
    border-radius: 16px;
    padding: 32px;
    position: relative;
    animation: modalIn 0.2s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.modal-content h2 {
    font-size: 20px;
    margin-bottom: 6px;
}

.modal-date {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 18px;
}

.modal-details {
    background: #f9fafb;
    padding: 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.6;
}

.close {
    position: absolute;
    top: 18px;
    right: 20px;
    font-size: 20px;
    cursor: pointer;
    color: var(--muted);
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================
   Misc
========================= */

.muted {
    color: var(--muted);
}

/* =========================
   Responsive
========================= */

@media (max-width: 900px) {

    .sidebar {
        display: none;
    }

    .main {
        padding: 20px;
    }
}
.agenda-item {
    background: rgba(0,0,0,0.03);
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 13px;
}
.month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 14px;
}

.month-day {
    background: white;
    border-radius: 14px;
    padding: 12px;
    min-height: 140px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: 1px solid var(--border);
}

.month-day-header {
    font-weight: 600;
    font-size: 14px;
}

.month-events {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.month-event {
    font-size: 12px;
    padding: 4px 6px;
    border-radius: 6px;
    color: white;
    cursor: pointer;
}

.muted-day {
    opacity: 0.4;
}

.add-event-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
}
/* =========================
   Calendar Month View
========================= */

.calendar-header {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:30px;
}

.calendar-title {
    font-size:22px;
    font-weight:600;
}

.calendar-nav {
    display:flex;
    gap:10px;
}

.nav-btn {
    background:var(--primary);
    color:white;
    padding:8px 14px;
    border-radius:8px;
    text-decoration:none;
    font-size:14px;
}

.calendar-wrapper {
    background:white;
    border-radius:16px;
    padding:20px;
    border:1px solid var(--border);
}

.calendar-weekdays {
    display:grid;
    grid-template-columns:repeat(7,1fr);
    margin-bottom:10px;
    font-weight:600;
    font-size:13px;
    color:var(--muted);
}

.calendar-grid {
    display:grid;
    grid-template-columns:repeat(7,1fr);
    grid-auto-rows:140px;
    gap:8px;
}

.calendar-day {
    border:1px solid var(--border);
    border-radius:12px;
    padding:8px;
    display:flex;
    flex-direction:column;
    position:relative;
    background:#fff;
}

.calendar-date {
    font-size:13px;
    font-weight:600;
    margin-bottom:6px;
}

.calendar-events {
    display:flex;
    flex-direction:column;
    gap:4px;
    overflow:hidden;
}

.calendar-event {
    font-size:11px;
    padding:4px 6px;
    border-radius:6px;
    color:white;
    cursor:pointer;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.other-month {
    background:#f9fafb;
    opacity:0.5;
}

.today {
    border:2px solid var(--primary);
}
.calendar-add {
    position:absolute;
    top:6px;
    right:6px;
    width:22px;
    height:22px;
    border-radius:50%;
    background:var(--primary);
    color:white;
    font-size:14px;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
}

.calendar-add:hover {
    background:var(--primary-hover);
}
.section-add {
    width:18px;
    height:18px;
    border-radius:50%;
    background: var(--primary);
    color:white;
    font-size:14px;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    transition:0.15s ease;
}

.section-add:hover {
    background: var(--primary-hover);
}
