/* Luc & Roel — Taken
   Tim redesign: TWBA tokens via design-tokens.css */

/* === RESET & BASE === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* TWBA-kleuren, gemapped naar bestaande variabele-namen */
    --blue: #2C2C2C;
    --blue-light: #EAE7E1;
    --blue-hover: #444444;
    --green: #4A7C59;
    --red: #A0453E;
    --orange: #B8860B;
    --grey-50: #F5F2ED;
    --grey-100: #EFECE7;
    --grey-200: #E0DDD7;
    --grey-300: #C8C5BF;
    --grey-400: #9A9A9A;
    --grey-500: #9A9A9A;
    --grey-600: #6B6B6B;
    --grey-700: #6B6B6B;
    --grey-800: #2C2C2C;
    --grey-900: #2C2C2C;
    --sidebar-bg: #EFECE7;
    --content-bg: #F5F2ED;
    --font: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --radius: 6px;
    --radius-sm: 4px;
    --shadow: none;
    --shadow-lg: none;
}

html, body {
    height: 100%;
    font-family: var(--font);
    font-size: 15px;
    color: var(--grey-900);
    background: var(--content-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === LAYOUT === */
.app {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* === SIDEBAR === */
.sidebar {
    width: 240px;
    min-width: 240px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--grey-200);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    user-select: none;
}

.sidebar-header {
    padding: 20px 20px 28px;
    text-align: center;
}

.sidebar-logo {
    max-width: 80px;
    height: auto;
    opacity: 0.85;
}

.sidebar-nav {
    padding: 0 8px 20px;
    flex: 1;
}

.sidebar-divider {
    height: 1px;
    background: var(--grey-300);
    margin: 8px 12px;
}

/* Nav items */
.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--grey-800);
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s;
}

.nav-item:hover {
    background: var(--grey-200);
}

.nav-item.active {
    background: var(--blue);
    color: #F5F2ED;
    font-weight: 500;
}

.nav-icon {
    font-size: 16px;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.nav-icon-svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.7;
}

.nav-item.active .nav-icon-svg {
    opacity: 1;
}

.nav-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-badge {
    background: #EF4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    margin-left: auto;
}

.nav-count {
    font-size: 11px;
    color: var(--grey-500);
    background: var(--grey-200);
    padding: 1px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.nav-count:empty {
    display: none;
}

/* Area groups */
.area-group {
    margin-top: 16px;
}

.area-toggle {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--grey-600) !important;
    padding: 8px 12px 4px !important;
}

.area-toggle:hover {
    color: var(--grey-800) !important;
}

.area-toggle .nav-icon {
    font-size: 14px;
}

.area-toggle .toggle-arrow {
    font-size: 10px;
    color: var(--grey-400);
    transition: transform 0.2s;
}

.area-group.collapsed .toggle-arrow {
    transform: rotate(-90deg);
}

.area-items {
    overflow: hidden;
    transition: max-height 0.3s ease;
    max-height: 1000px;
}

.area-group.collapsed .area-items {
    max-height: 0;
}

.nav-subitem {
    padding-left: 20px !important;
    font-size: 13px;
    font-weight: 400;
}

/* Status-groepen binnen Projecten */
.status-label {
    padding: 6px 12px 4px 20px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--grey-400);
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-label:hover {
    color: var(--grey-600);
}

.status-items {
    overflow: hidden;
    transition: max-height 0.3s ease;
    max-height: 500px;
}

.status-group.collapsed .status-items {
    max-height: 0;
}

.nav-subitem .progress-ring-container {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.nav-dot {
    width: 18px;
    text-align: center;
    color: var(--grey-400);
    font-size: 8px;
    flex-shrink: 0;
}

/* === MAIN CONTENT === */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 48px;
}

.loading {
    color: var(--grey-500);
    padding: 40px;
    text-align: center;
}

/* View header */
.view-header {
    margin-bottom: 40px;
    position: relative;
}

.weer-widget {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 24px;
    color: var(--grey-800);
    font-weight: 600;
}

.view-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--grey-900);
    letter-spacing: -0.5px;
}

.view-header .view-subtitle {
    font-size: 13px;
    color: var(--grey-500);
    margin-top: 4px;
}

/* === SECTIONS === */
.section {
    margin-bottom: 28px;
}

.section-header {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--grey-500);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--grey-200);
    margin-bottom: 8px;
}

/* === TASK LIST === */
.task-list {
    list-style: none;
}

.task-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 4px;
    border-bottom: 1px solid var(--grey-100);
    transition: background 0.15s;
}

.task-item:hover {
    background: var(--grey-50);
    border-radius: var(--radius-sm);
}

.task-item.done .task-text {
    color: var(--grey-400);
    text-decoration: line-through;
}

.task-item.sub-task {
    padding-left: 28px;
}

/* Checkbox */
.task-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid var(--grey-300);
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 1px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.task-checkbox:hover {
    border-color: var(--blue);
    background: var(--blue-light);
}

.task-item.done .task-checkbox {
    border-color: var(--grey-300);
    background: var(--grey-300);
}

.task-item.done .task-checkbox::after {
    content: "✓";
    font-size: 11px;
    color: white;
    font-weight: 700;
}

/* High priority checkbox */
.task-item.priority-high .task-checkbox {
    border-color: var(--orange);
}

.task-item.priority-high .task-checkbox:hover {
    background: #FFF3E0;
}

/* Task content */
.task-content {
    flex: 1;
    min-width: 0;
}

.task-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--grey-800);
    word-break: break-word;
}

.task-meta {
    display: flex;
    gap: 8px;
    margin-top: 3px;
    flex-wrap: wrap;
}

.task-tag {
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 500;
}

.tag-project {
    background: var(--blue-light);
    color: var(--blue);
}

/* Projectbadge staat inline achter de taaktekst — netjes uitlijnen op de regel */
.task-text .tag-project {
    display: inline-block;
    margin-left: 6px;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

.tag-deadline {
    background: #FFF3E0;
    color: var(--orange);
}

.tag-deadline.overdue {
    background: #FFEBEE;
    color: var(--red);
}

.tag-recurring {
    background: #E8F5E9;
    color: #2E7D32;
}

.tag-supplier {
    background: #FFF3E0;
    color: var(--orange);
}

.tag-section {
    background: var(--grey-100);
    color: var(--grey-600);
}

/* Wikilinks */
.wikilink {
    color: var(--blue);
    cursor: pointer;
    text-decoration: none;
    border-bottom: 1px dotted var(--blue);
}

.wikilink:hover {
    border-bottom-style: solid;
}

/* === DAGSTART === */
.dagstart-section {
    margin-bottom: 120px;
}

.agenda-day-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--grey-500);
    padding: 8px 0 4px;
    margin-top: 8px;
}

.agenda-day {
    margin-bottom: 20px;
}

.agenda-day-header {
    font-size: 14px;
    font-weight: 600;
    color: var(--grey-800);
    padding: 10px 0 6px;
    border-bottom: 1px solid var(--grey-200);
    margin-bottom: 4px;
    text-transform: capitalize;
}

.dagstart-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--grey-800);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dagstart-section h3 .section-icon {
    font-size: 18px;
}

/* Inbox */
.inbox-legend {
    font-size: 11px;
    color: var(--grey-500);
    margin-bottom: 12px;
}

.inbox-submit-btn {
    background: var(--blue);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 16px;
    transition: background 0.15s;
}

.inbox-submit-btn:hover {
    background: var(--blue-hover);
}

.inbox-account {
    margin-bottom: 16px;
}

.inbox-account-header {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--grey-500);
    padding: 6px 0;
    border-bottom: 1px solid var(--grey-200);
}

.inbox-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.inbox-table thead th {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--grey-500);
    text-align: left;
    padding: 6px 8px;
    border-bottom: 1px solid var(--grey-200);
}

.inbox-col-mail {
    width: 40%;
}

.inbox-col-suggestie {
    width: 20%;
}

.inbox-col-feedback {
    width: 15%;
    text-align: center !important;
}

.inbox-col-opmerking {
    width: 25%;
}

.inbox-opmerking {
    width: 100%;
    border: 1px solid var(--grey-200);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    font-size: 12px;
    font-family: var(--font);
    color: var(--grey-800);
    background: white;
    outline: none;
    transition: border-color 0.15s;
}

.inbox-opmerking:focus {
    border-color: var(--blue);
}

.inbox-opmerking::placeholder {
    color: var(--grey-400);
}

.inbox-row {
    border-bottom: 1px solid var(--grey-100);
    transition: background 0.15s, opacity 0.15s;
}

.inbox-row:hover {
    background: var(--grey-50);
}

.inbox-row td {
    padding: 6px 8px;
    vertical-align: top;
}

.inbox-from {
    font-size: 13px;
    font-weight: 600;
    color: var(--grey-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
}

.inbox-subject {
    font-size: 12px;
    color: var(--grey-600);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    display: block;
}

.inbox-suggestie {
    font-size: 12px;
    color: var(--grey-600);
    font-style: italic;
}

/* Account-tag rechts naast afzender (kleine context-hint) */
.inbox-account-tag {
    font-size: 10px;
    color: var(--grey-500);
    background: var(--grey-100);
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 6px;
    font-weight: 400;
    text-transform: lowercase;
}

/* Drie buckets — Urgent / Relevant / Niet relevant */
.inbox-bucket {
    margin-bottom: 16px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.inbox-bucket-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--grey-100);
    cursor: pointer;
    user-select: none;
    font-weight: 600;
    font-size: 13px;
    border-left: 3px solid var(--grey-300);
}

.inbox-bucket.bucket-urgent .inbox-bucket-header {
    background: #fff1f0;
    border-left-color: #d4380d;
}

.inbox-bucket.bucket-relevant .inbox-bucket-header {
    background: #fffbe6;
    border-left-color: #d4b106;
}

.inbox-bucket.bucket-niet_relevant .inbox-bucket-header {
    background: var(--grey-100);
    border-left-color: var(--grey-400);
    color: var(--grey-600);
}

.inbox-bucket-header:hover {
    filter: brightness(0.97);
}

.bucket-icon {
    font-size: 14px;
}

.bucket-count {
    color: var(--grey-600);
    font-weight: 400;
    font-size: 12px;
}

.bucket-toggle {
    margin-left: auto;
    transition: transform 0.15s;
    font-size: 12px;
    color: var(--grey-500);
}

.inbox-bucket.collapsed .bucket-toggle {
    transform: rotate(-90deg);
}

.inbox-bucket.collapsed .inbox-table {
    display: none;
}

/* Feedback knoppen */
.inbox-feedback-btns {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.fb-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--grey-300);
    background: white;
    color: var(--grey-600);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fb-btn:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.fb-btn.active {
    color: white;
    border-color: transparent;
}

.fb-btn[data-code="L"].active {
    background: var(--blue);
}

.fb-btn[data-code="V"].active {
    background: var(--red);
}

.fb-btn[data-code="A"].active {
    background: var(--green);
}

.fb-btn[data-code="F"].active {
    background: var(--orange);
}

/* Rij-feedback visueel */
.inbox-row.fb-V {
    opacity: 0.4;
    text-decoration: line-through;
}

.inbox-row.fb-A {
    opacity: 0.6;
}

/* Agenda cards */
.agenda-list {
    list-style: none;
}

.agenda-item {
    display: flex;
    gap: 12px;
    padding: 8px 12px;
    background: var(--grey-50);
    border-radius: var(--radius);
    margin-bottom: 6px;
    border-left: 3px solid var(--blue);
}

.agenda-time {
    font-size: 13px;
    font-weight: 600;
    color: var(--blue);
    min-width: 120px;
    flex-shrink: 0;
}

.agenda-title {
    font-size: 13px;
    color: var(--grey-800);
}

.agenda-location {
    font-size: 11px;
    color: var(--grey-500);
}

/* Project progress cards */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.project-card {
    background: var(--grey-50);
    border-radius: var(--radius);
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--grey-200);
}

.project-card:hover {
    border-color: var(--blue);
    box-shadow: var(--shadow);
}

.project-card .project-info {
    flex: 1;
}

.project-card .project-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--grey-800);
}

.project-card .project-progress-text {
    font-size: 11px;
    color: var(--grey-500);
    margin-top: 2px;
}

/* Progress ring */
.progress-ring-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring .ring-bg {
    fill: none;
    stroke: var(--grey-200);
}

.progress-ring .ring-fill {
    fill: none;
    stroke: var(--blue);
    stroke-linecap: round;
    transition: stroke-dashoffset 0.3s;
}

.progress-ring .ring-fill.complete {
    stroke: var(--green);
}

/* === ITEM VIEW (project/losse taken detail) === */
.item-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.item-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--grey-900);
}

.item-stats {
    font-size: 13px;
    color: var(--grey-500);
}

.task-section-header {
    font-size: 13px;
    font-weight: 600;
    color: var(--grey-600);
    padding: 12px 0 6px;
    border-bottom: 1px solid var(--grey-200);
    margin-top: 8px;
}

/* Show/hide completed */
.toggle-completed {
    font-size: 12px;
    color: var(--grey-500);
    cursor: pointer;
    padding: 4px 0;
    user-select: none;
}

.toggle-completed:hover {
    color: var(--blue);
}

/* === NOTE PANEL (wikilink detail) === */
.note-panel {
    width: 0;
    min-width: 0;
    background: var(--content-bg);
    border-left: 1px solid var(--grey-200);
    overflow-y: auto;
    transition: width 0.3s, min-width 0.3s;
    flex-shrink: 0;
}

.note-panel.open {
    width: 400px;
    min-width: 400px;
}

.note-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--grey-200);
    position: sticky;
    top: 0;
    background: var(--content-bg);
}

.note-header h2 {
    font-size: 16px;
    font-weight: 600;
}

.note-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--grey-500);
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.note-close:hover {
    color: var(--grey-800);
}

.note-path {
    font-size: 11px;
    color: var(--grey-400);
    margin-top: 2px;
    font-family: monospace;
}

.note-body {
    padding: 20px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--grey-700);
    word-break: break-word;
    overflow-y: auto;
}

/* Markdown in note-panel */
.note-body h1 { font-size: 18px; font-weight: 700; margin: 16px 0 8px; color: var(--grey-900); }
.note-body h2 { font-size: 15px; font-weight: 600; margin: 14px 0 6px; color: var(--grey-800); }
.note-body h3 { font-size: 13px; font-weight: 600; margin: 12px 0 4px; color: var(--grey-700); }
.note-body h4 { font-size: 13px; font-weight: 500; margin: 10px 0 4px; color: var(--grey-600); }

.note-body p { margin: 4px 0 8px; }

.note-body ul { padding-left: 18px; margin: 4px 0 8px; }
.note-body ul li { margin: 2px 0; }
.note-body ul.note-numbered { list-style: decimal; }

.note-body ul.note-checklist { list-style: none; padding-left: 4px; }
.note-body ul.note-checklist li { padding: 1px 0; }
.note-body ul.note-checklist li.checked { color: var(--grey-400); text-decoration: line-through; }

.note-body blockquote {
    border-left: 3px solid var(--blue);
    padding: 4px 12px;
    margin: 8px 0;
    background: rgba(56, 132, 255, 0.05);
    color: var(--grey-600);
    font-size: 12px;
}

.note-body pre {
    background: var(--grey-100);
    border-radius: 4px;
    padding: 10px 12px;
    overflow-x: auto;
    margin: 8px 0;
    font-size: 12px;
}

.note-body code {
    background: var(--grey-100);
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 12px;
}

.note-body pre code { background: none; padding: 0; }

.note-body hr {
    border: none;
    border-top: 1px solid var(--grey-200);
    margin: 12px 0;
}

.note-body strong { font-weight: 600; color: var(--grey-800); }
.note-body em { font-style: italic; }
.note-body del { text-decoration: line-through; color: var(--grey-400); }

.note-body .wikilink {
    color: var(--blue);
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dotted;
}
.note-body .wikilink:hover {
    text-decoration-style: solid;
}

.note-not-found, .note-error {
    color: var(--grey-400);
    font-style: italic;
}

/* === BOODSCHAPPEN / SUPPLIER GROUPS === */
.supplier-group {
    margin-bottom: 4px;
}

.supplier-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 6px;
    user-select: none;
}

.supplier-header:hover {
    background: var(--grey-100);
}

.supplier-arrow {
    font-size: 10px;
    color: var(--grey-400);
    transition: transform 0.15s ease;
    width: 14px;
    text-align: center;
}

.supplier-group.collapsed .supplier-arrow {
    transform: rotate(-90deg);
}

.supplier-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--grey-800);
}

.supplier-header .nav-count {
    margin-left: auto;
}

.supplier-tasks {
    overflow: hidden;
    max-height: 1000px;
    transition: max-height 0.2s ease;
}

.supplier-group.collapsed .supplier-tasks {
    max-height: 0;
}

/* === SECTION GROUPS (collapsible sections in item view) === */
.section-group {
    margin-bottom: 4px;
}

.section-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 6px;
    user-select: none;
}

.section-toggle:hover {
    background: var(--grey-100);
}

.section-arrow {
    font-size: 10px;
    color: var(--grey-400);
    transition: transform 0.15s ease;
    width: 14px;
    text-align: center;
}

.section-group.collapsed .section-arrow {
    transform: rotate(-90deg);
}

.section-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--grey-600);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.section-toggle .nav-count {
    margin-left: auto;
}

.section-tasks {
    overflow: hidden;
    max-height: 5000px;
    transition: max-height 0.2s ease;
}

.section-group.collapsed .section-tasks {
    max-height: 0;
}

/* === PROJECTEN-TAB: nested step-groups === */
.projecten-status-label {
    margin-top: 28px;
}
.projecten-status-label:first-child {
    margin-top: 8px;
}
.project-group > .section-tasks > .step-group {
    margin-left: 24px;
    margin-top: 2px;
    border-left: 1px solid var(--grey-100, #eee);
    padding-left: 12px;
}
.project-group > .section-tasks > .step-group .section-name {
    font-size: 12px;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
    color: var(--grey-500);
}
.project-group > .section-tasks > .step-group .section-arrow {
    font-size: 9px;
}

/* === EMPTY STATE === */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--grey-500);
}

.empty-state .empty-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
}

/* === STATUS BADGES === */
.status-badge {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 3px;
}

.status-actief {
    background: #E8F5E9;
    color: #2E7D32;
}

.status-afgerond {
    background: var(--grey-200);
    color: var(--grey-600);
}

.status-wacht {
    background: #FFF3E0;
    color: #E65100;
}

/* === RESPONSIVE === */

/* Hamburger-knop (alleen zichtbaar op mobiel) */
.mobile-menu-btn {
    display: none;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 12px;
        left: 12px;
        width: 40px;
        height: 40px;
        background: var(--grey-800);
        color: #F5F2ED;
        border: none;
        border-radius: 50%;
        font-size: 18px;
        cursor: pointer;
        z-index: 200;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        min-width: 280px;
        height: 100vh;
        z-index: 150;
        transition: left 0.25s ease;
        box-shadow: none;
    }

    .sidebar.open {
        left: 0;
    }

    .mobile-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.3);
        z-index: 140;
    }

    .mobile-overlay.open {
        display: block;
    }

    .content {
        padding: 16px;
        padding-top: 60px;
        width: 100%;
        flex: 1;
        overflow-y: auto;
    }

    .note-panel {
        display: none;
    }

    .note-panel.open {
        display: block;
        position: fixed;
        inset: 0;
        width: 100%;
        min-width: 100%;
        z-index: 100;
    }
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--grey-300);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--grey-400);
}

/* === OVERDUE BANNER === */
.overdue-banner {
    background: #FFF3F3;
    border: 1px solid #FFCDD2;
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 16px;
}

.overdue-banner h4 {
    color: var(--red);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

/* === PRIORITY SECTIONS (Vandaag-view) === */
.priority-section {
    margin-bottom: 4px;
}

.priority-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 6px;
    user-select: none;
}

.priority-toggle:hover {
    background: var(--grey-100);
}

.priority-arrow {
    font-size: 10px;
    color: var(--grey-400);
    transition: transform 0.15s ease;
    width: 14px;
    text-align: center;
}

.priority-section.collapsed .priority-arrow {
    transform: rotate(-90deg);
}

.priority-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--grey-600);
    letter-spacing: 0.3px;
}

.priority-heading {
    font-weight: 600;
    font-size: 14px;
    color: var(--grey-600);
    margin: 24px 0 8px 0;
    padding: 0;
}

.priority-section:first-child .priority-heading {
    margin-top: 8px;
}

.priority-toggle .nav-count {
    margin-left: auto;
}

.priority-tasks {
    overflow: hidden;
    max-height: 2000px;
    transition: max-height 0.2s ease;
    padding-left: 4px;
}

.priority-section.collapsed .priority-tasks {
    max-height: 0;
}

/* === PAGE LAYOUT === */
.taken-page {
    max-width: 900px;
    margin: 0 auto;
    min-height: 100vh;
}

/* Tab bar */
.tab-bar {
    display: flex;
    gap: 0;
    padding: 40px 28px 0;
    border-bottom: 1px solid var(--grey-200);
    position: sticky;
    top: 0;
    background: var(--content-bg);
    z-index: 10;
}

.tab-bar .tab {
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    color: var(--grey-500);
    transition: all 0.25s ease;
}

.tab-bar .tab:hover {
    color: var(--grey-800);
}

.tab-bar .tab.active {
    color: var(--grey-900);
    border-bottom-color: var(--grey-900);
}

.taken-page > .content {
    padding: 32px 48px 120px;
}

/* Legacy tile styles (unused, kept for compat) */
.landing {
    display: none;
}

.detail-page {
    display: none;
}

.back-link-unused {
    max-width: 720px;
    margin: 0 auto;
    padding: 48px 24px;
}

.landing-header {
    margin-bottom: 40px;
}

.landing-header h1 {
    font-size: 1.4rem;
    font-weight: 600;
}

.tile-section-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--grey-500);
    margin-bottom: 8px;
    margin-top: 24px;
}

.tile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px 16px;
    background: white;
    border: 1px solid var(--grey-200);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--grey-900);
    transition: border-color 0.25s ease;
    cursor: pointer;
}

.tile:hover {
    border-color: var(--grey-300);
}

.tile:active {
    background: var(--grey-100);
}

.tile-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 8px;
    opacity: 0.45;
    transition: opacity 0.25s ease;
}

.tile:hover .tile-icon {
    opacity: 0.7;
}

.tile-name {
    font-size: 0.9rem;
    font-weight: 500;
}

.tile-hero {
    grid-column: 1 / -1;
    padding: 32px 24px;
    margin-bottom: 16px;
}

.tile-hero .tile-name {
    font-size: 1rem;
}

.tile-grid-compact {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.tile-grid-compact .tile {
    padding: 12px 8px;
}

.tile-grid-compact .tile-name {
    font-size: 0.8rem;
}

.tile-count {
    font-size: 0.7rem;
    color: var(--grey-500);
    margin-top: 2px;
}

.back-to-taken {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 500;
    color: var(--grey-800);
    text-decoration: none;
    margin-bottom: 24px;
}

.back-to-taken:hover {
    color: var(--grey-600);
}

.gebieden-nav {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--grey-200);
}

/* Projecten als tekstlijst */
.project-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 8px;
}

.project-list-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--grey-800);
    font-size: 0.85rem;
    font-weight: 500;
    border-bottom: 1px solid var(--grey-200);
    width: 50%;
    transition: background 0.15s ease;
}

.project-list-item:hover {
    background: var(--grey-100);
}

.project-list-name {
    flex: 1;
}

.project-list-count {
    font-size: 0.75rem;
    color: var(--grey-500);
    font-weight: 400;
}

/* Detail page */
.detail-page {
    display: flex;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.detail-page .content {
    max-width: 900px;
}

.back-link {
    position: fixed;
    top: 16px;
    left: 16px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 500;
    color: var(--grey-900);
    text-decoration: none;
    z-index: 100;
    cursor: pointer;
    transition: color 0.25s ease;
}

.back-link:hover {
    color: var(--grey-600);
}

.hidden {
    display: none !important;
}

@media (max-width: 600px) {
    .landing { padding: 24px 16px; }
    .tile-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .tile-grid-compact { grid-template-columns: repeat(3, 1fr); }
    .detail-page .content { padding: 16px; padding-top: 48px; }
}
