:root {
  --bg: #f3f5f3;
  --card: #fff;
  --text: #1d2927;
  --muted: #697774;
  --line: #dfe6e2;
  --accent: #176b5b;
  --accent-dark: #105448;
  --accent-soft: #e5f1ed;
  --danger: #a63f48;
  --warning: #986016;
  --shadow: 0 12px 34px rgba(26, 48, 41, .06);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 "Aptos", "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
.topbar { min-height: 72px; display: flex; align-items: center; gap: 28px; padding: 12px max(28px, calc((100vw - 1240px) / 2)); background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; box-shadow: 0 2px 12px rgba(28,46,40,.035); }
.brand { font-size: 18px; font-weight: 750; white-space: nowrap; }
.brand:first-letter { color: var(--accent); }
.topbar-actions { display: flex; gap: 9px; align-items: center; }
.search { display: flex; gap: 8px; max-width: 500px; width: 100%; margin-left: auto; }
.search input { flex: 1; min-width: 0; }
.search button { padding: 9px 14px; color: var(--text); background: #fff; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.search button:hover { background: var(--accent-soft); border-color: #bfd8ce; }
.container { max-width: 1240px; min-height: calc(100vh - 170px); margin: 36px auto; padding: 0 28px; }
footer { margin-top: 52px; border-top: 1px solid var(--line); padding: 24px; color: var(--muted); font-size: 12px; text-align: center; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin: 10px 0 30px; }
.page-heading h1, .form-card h1 { margin: 0; font-size: 32px; line-height: 1.2; font-weight: 700; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 7px; color: var(--accent); font-size: 11px; font-weight: 750; letter-spacing: 1.3px; }
.button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 9px 14px; color: #fff; background: var(--accent); border: 1px solid var(--accent); border-radius: 6px; font-size: 13px; font-weight: 650; cursor: pointer; white-space: nowrap; transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.button:hover { background: var(--accent-dark); border-color: var(--accent-dark); transform: translateY(-1px); }
.button-light { color: var(--text); background: #fff; border-color: var(--line); }
.button-light:hover { background: #f6f8f6; border-color: #cbd6d0; }
.button-light.is-enabled { color: var(--accent-dark); background: var(--accent-soft); border-color: #c8dfd6; }
.button-danger { background: var(--danger); border-color: var(--danger); }
.signal-link { gap: 8px; }
.signal-count[hidden] { display: none; }
.signal-count { display: inline-grid; min-width: 20px; height: 20px; place-items: center; padding: 0 5px; color: #fff; background: var(--danger); border-radius: 999px; font-size: 11px; font-weight: 750; line-height: 1; }
.signal-link.has-signals .signal-count { animation: signal-pulse 1.6s ease-in-out infinite; }
@keyframes signal-pulse { 50% { box-shadow: 0 0 0 5px rgba(166,63,72,.14); transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .signal-link.has-signals .signal-count { animation: none; } }
input, textarea, select { width: 100%; padding: 10px 12px; color: var(--text); background: #fff; border: 1px solid #d2ddd7; border-radius: 6px; outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(23,107,91,.12); }
textarea { resize: vertical; line-height: 1.6; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin: 0 0 36px; }
.stat { display: flex; flex-direction: column; gap: 5px; padding: 17px 19px; background: var(--card); border: 1px solid var(--line); border-radius: 7px; box-shadow: var(--shadow); }
.stat span { color: var(--muted); font-size: 12px; font-weight: 600; }
.stat strong { font-size: 27px; line-height: 1.1; }
.stat-alert strong { color: var(--danger); }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 30px 0 14px; }
.section-heading h2 { margin: 0; font-size: 18px; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.project-card { min-width: 0; padding: 18px 19px 15px; background: var(--card); border: 1px solid var(--line); border-radius: 7px; box-shadow: var(--shadow); transition: border-color .15s ease, transform .15s ease; }
.project-card:hover { border-color: #a9c9bd; transform: translateY(-2px); }
.project-icon { display: inline-grid; place-items: center; width: 32px; height: 32px; color: var(--accent); background: var(--accent-soft); border-radius: 6px; font-size: 17px; }
.project-card h3 { margin: 12px 0 4px; font-size: 17px; }
.project-card p { margin: 0; }
.clamp { min-height: 25px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-bottom { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 12px; color: var(--muted); border-top: 1px solid var(--line); font-size: 12px; }
.panel { overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 7px; box-shadow: var(--shadow); }
.list-row { display: flex; align-items: center; gap: 13px; min-height: 65px; padding: 12px 17px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: #f8faf8; }
.status-dot { flex: 0 0 9px; width: 9px; height: 9px; background: #c88a3f; border-radius: 50%; }
.status-dot.done { background: #4f907d; }
.status-dot.late { background: var(--danger); }
.row-main { display: flex; flex: 1; min-width: 0; flex-direction: column; }
.row-main strong { overflow: hidden; text-overflow: ellipsis; }
.row-main small { color: var(--muted); }
.time-total { color: var(--muted); font-size: 12px; white-space: nowrap; }
.issue-edit-button { flex: 0 0 auto; min-height: 32px; padding: 5px 9px; font-size: 11px; }
.arrow { color: var(--accent); font-size: 18px; }
.date-box { display: grid; flex: 0 0 43px; place-content: center; height: 43px; text-align: center; background: #f2f6f3; border: 1px solid var(--line); border-radius: 5px; }
.date-box strong { line-height: 1.05; }
.date-box small { color: var(--muted); font-size: 9px; }
.pill { display: inline-flex; align-items: center; padding: 4px 9px; color: #4a5b55; background: #edf1ee; border-radius: 4px; font-size: 11px; font-weight: 650; white-space: nowrap; }
.pill.danger { color: #8d3039; background: #fae9e9; }
.pill.warning { color: #80520e; background: #fbf1dd; }
.empty { padding: 34px 22px; background: #fff; border: 1px dashed #cbd8d1; border-radius: 7px; text-align: center; }
.empty h3 { margin: 0 0 4px; }
.empty p { margin: 0 0 17px; color: var(--muted); }
.back { display: inline-block; margin-bottom: 16px; color: var(--muted); font-size: 13px; }
.back:hover, .side-link:hover { color: var(--accent); }
.actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.badges { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; }
.detail-grid { display: grid; grid-template-columns: minmax(0,1fr) 290px; align-items: start; gap: 18px; }
.main-column, .side-column { display: grid; gap: 16px; min-width: 0; }
.content-card, .form-card { min-width: 0; padding: 21px 23px; background: var(--card); border: 1px solid var(--line); border-radius: 7px; box-shadow: var(--shadow); }
.content-card h2 { margin: 0 0 14px; font-size: 17px; }
.content-card h3 { margin: 0 0 13px; font-size: 15px; }
.prose { overflow-wrap: anywhere; line-height: 1.75; }
.prose a { color: var(--accent); text-decoration: underline; }
.prose ul, .prose ol { padding-left: 24px; }
.prose img { max-width: 100%; height: auto; border-radius: 5px; }
.meta-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.meta-row:last-child { border-bottom: 0; }
.meta-row span { color: var(--muted); }
.meta-row strong { text-align: right; }
.side-link { display: block; padding: 8px 0; color: var(--muted); font-size: 13px; }
.delete-form { margin-top: 22px; }
.text-danger { padding: 0; color: var(--danger); background: none; border: 0; cursor: pointer; font-size: 13px; }
.project-delete summary { display: inline-block; list-style: none; }
.project-delete summary::-webkit-details-marker { display: none; }
.project-delete form { display: grid; gap: 10px; max-width: 460px; margin-top: 10px; padding: 14px; border: 1px solid var(--danger); border-radius: 8px; }
.project-delete p { margin: 0; font-size: 13px; }
.project-delete label { display: grid; gap: 6px; font-size: 13px; }
.project-delete .button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.time-summary { display: grid; grid-template-columns: auto 1fr auto 1fr; align-items: baseline; gap: 8px 10px; margin-bottom: 16px; }
.time-summary strong { font-size: 18px; }
.time-summary span { color: var(--muted); font-size: 12px; }
.time-form { display: grid; grid-template-columns: minmax(150px,.7fr) minmax(200px,1.3fr) auto; align-items: end; gap: 10px; }
.time-form label, .stack label { display: grid; gap: 6px; font-size: 13px; font-weight: 650; }
.entries { margin-top: 16px; border-top: 1px solid var(--line); }
.entry { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.entry small { display: block; color: var(--muted); }
.form-card { max-width: 690px; margin: 0 auto; padding: 28px; }
.form-card.wide { max-width: 1200px; }
.form-card h1 { margin-bottom: 22px; }
.stack { display: grid; gap: 18px; }
.stack small { color: var(--muted); font-size: 11px; font-weight: 400; }
.two-col { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.messages { display: grid; gap: 8px; margin-bottom: 18px; }
.flash { padding: 11px 14px; border: 1px solid var(--line); border-radius: 5px; background: #fff; font-size: 13px; }
.flash.success { color: #145b4d; background: #e9f4ef; border-color: #c8e2d6; }
.flash.error { color: #8d3039; background: #fbebeb; border-color: #efcece; }
.search-large { max-width: 700px; margin: 0 0 20px; }
.rich-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -10px; }
.rich-toolbar button { padding: 7px 10px; color: var(--text); background: #fff; border: 1px solid var(--line); border-radius: 5px; font-size: 12px; cursor: pointer; }
.rich-toolbar button:hover { color: var(--accent-dark); background: var(--accent-soft); border-color: #bfd8ce; }
.toolbar-control { display: inline-flex; align-items: center; gap: 6px; padding: 4px 7px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 5px; font-size: 11px; }
.toolbar-control input[type="color"] { width: 27px; height: 25px; padding: 2px; border: 0; background: transparent; cursor: pointer; }
.toolbar-control select { width: auto; min-width: 82px; padding: 4px 22px 4px 6px; border: 0; font-size: 11px; }
.table-builder[hidden] { display: none; }
.table-builder { display: flex; flex: 1 0 100%; align-items: end; gap: 8px; padding: 9px; background: #f7f9f7; border: 1px solid var(--line); border-radius: 5px; }
.table-builder label { display: grid; gap: 4px; color: var(--muted); font-size: 11px; }
.table-builder input[type="number"] { width: 78px; padding: 6px 8px; }
.table-builder .table-header-toggle { display: flex; align-items: center; gap: 6px; min-height: 34px; }
.table-builder .table-header-toggle input { width: auto; }
.table-builder .table-insert { min-height: 34px; }
.rich-editor { min-height: 380px; max-height: 80vh; overflow: auto; resize: vertical; padding: 13px; background: #fff; border: 1px solid #d2ddd7; border-radius: 6px; line-height: 1.7; overflow-wrap: anywhere; }
.rich-editor:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(23,107,91,.12); }
.rich-editor img { max-width: 100%; height: auto; cursor: pointer; }
.rich-editor table, .prose table { width: 100%; margin: 8px 0; border-collapse: collapse; table-layout: auto; }
.rich-editor th, .rich-editor td, .prose th, .prose td { min-width: 70px; padding: 8px; border: 1px solid #cbd6d0; vertical-align: top; overflow-wrap: anywhere; }
.rich-editor th, .prose th { background: var(--accent-soft); text-align: left; }
.ai-assistant { display: grid; gap: 13px; padding: 19px; background: #f7f9f7; border: 1px solid var(--line); border-radius: 7px; }
.ai-assistant h2 { margin: 0; font-size: 17px; }
.ai-privacy, .ai-status { margin: 0; color: var(--muted); font-size: 12px; }
.ai-controls { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: 12px; }
.ai-controls label, .ai-result label, .ai-insert-row label { display: grid; gap: 6px; font-size: 12px; font-weight: 650; }
.ai-result { display: grid; gap: 11px; }
.ai-result[hidden] { display: none; }
.ai-insert-row { display: flex; align-items: end; gap: 10px; }
.ai-insert-row label { min-width: 160px; }
.issue-copy-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; padding: 0 17px 17px 39px; }
.issue-copy { min-width: 0; padding: 12px 14px; background: #f7f9f7; border-left: 2px solid #c9dcd3; border-radius: 0 5px 5px 0; }
.issue-copy h4 { margin: 0 0 5px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .7px; }
.issue-copy .prose { font-size: 13px; line-height: 1.55; }
.issue-copy .prose > :first-child { margin-top: 0; }
.issue-copy .prose > :last-child { margin-bottom: 0; }
.issue-copy .prose img { max-height: 180px; object-fit: contain; object-position: left; }
.subject-filter-row { display: flex; align-items: center; gap: 14px; margin: 0 0 12px; }
.subject-filter-row input { max-width: 420px; }
.topic-list { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); align-items: start; gap: 12px; overflow: visible; padding: 0; background: transparent; border: 0; box-shadow: none; }
.subject-group { min-width: 0; padding: 0 12px; background: var(--card); border: 1px solid var(--line); border-radius: 7px; box-shadow: var(--shadow); }
.subject-group[open] { grid-column: 1 / -1; }
.subject-group:last-child { border-bottom: 1px solid var(--line); }
.subject-group[hidden] { display: none; }
.subject-group-summary { display: flex; align-items: center; min-height: 64px; padding: 11px 3px; cursor: pointer; list-style: none; }
.subject-group-summary::-webkit-details-marker { display: none; }
.subject-group-summary::after { content: "+"; width: 25px; color: var(--accent); font-size: 21px; text-align: center; }
.subject-group[open] > .subject-group-summary::after { content: "-"; }
.subject-items { margin: 0 0 12px 16px; padding-left: 12px; border-left: 2px solid var(--accent-soft); }
.topic-item { border-bottom: 1px solid var(--line); }
.topic-item:last-child { border-bottom: 0; }
.topic-item[hidden], #subject-empty[hidden] { display: none; }
.topic-summary { display: flex; align-items: center; gap: 13px; min-height: 62px; padding: 10px 3px; cursor: pointer; list-style: none; }
.topic-summary::-webkit-details-marker { display: none; }
.topic-summary::after { content: "+"; width: 25px; color: var(--accent); font-size: 20px; text-align: center; }
.topic-item[open] > .topic-summary::after { content: "-"; }
.topic-heading { display: flex; flex: 1; min-width: 0; flex-direction: column; }
.topic-heading strong { overflow: hidden; text-overflow: ellipsis; }
.topic-heading small { color: var(--muted); }
.topic-content { padding: 0 0 14px 22px; }
.topic-content .issue-copy-grid { padding: 0; }
.topic-actions { display: flex; align-items: center; gap: 12px; padding: 10px 0 0; }
.inline-delete { margin: 0; }
.action-card .section-heading { margin: 0 0 14px; }
.action-form { display: grid; grid-template-columns: minmax(150px,1fr) minmax(170px,1.2fr) minmax(140px,.8fr); align-items: end; gap: 11px; }
.action-form label { display: grid; gap: 6px; font-size: 12px; font-weight: 650; }
.action-form .reminder-check { display: flex; grid-column: 1 / 3; align-items: center; gap: 8px; color: var(--muted); font-weight: 500; }
.action-form .reminder-check input { width: auto; }
.action-form > button { justify-self: end; }
.action-list { margin-top: 16px; border-top: 1px solid var(--line); }
.action-row { display: grid; grid-template-columns: 76px minmax(0,1fr) auto auto; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.action-row > form { margin: 0; }
.action-status { min-width: 76px; padding: 6px 8px; color: var(--accent-dark); background: var(--accent-soft); border: 1px solid #c8dfd6; border-radius: 5px; cursor: pointer; font-size: 11px; font-weight: 650; }
.action-row.is-complete .action-status { color: var(--muted); background: #f1f3f1; border-color: var(--line); }
.action-row.is-complete .action-main { opacity: .65; text-decoration: line-through; }
.action-main { display: grid; min-width: 0; }
.action-main strong, .action-main small { overflow-wrap: anywhere; }
.action-main small { color: var(--muted); font-size: 12px; }
.action-row .text-danger { white-space: nowrap; }
.action-edit { min-width: 95px; }
.action-edit summary { color: var(--accent-dark); cursor: pointer; font-size: 12px; white-space: nowrap; }
.action-edit[open] { grid-column: 1 / -1; width: 100%; min-width: 0; padding: 12px; background: #f7f9f7; border-radius: 5px; }
.action-edit-form { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: end; gap: 10px; min-width: 0; margin-top: 10px; }
.action-edit-form label { display: grid; gap: 5px; font-size: 11px; font-weight: 650; }
.action-edit-form input { min-width: 0; }
.action-edit-form .reminder-check { display: flex; align-items: center; gap: 7px; }
.action-edit-form .reminder-check input { width: auto; }
.reminder-list { padding: 0 15px; }
.reminder-row { display: grid; grid-template-columns: 145px minmax(0,1fr) auto 24px; align-items: center; gap: 14px; min-height: 68px; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.reminder-row:last-child { border-bottom: 0; }
.reminder-row:hover { background: #f8faf8; }
.reminder-kind { width: fit-content; padding: 5px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.deadline-reminder { color: #80520e; background: #fbf1dd; }
.action-reminder { color: #145b4d; background: #e9f4ef; }
.reminder-copy { display: grid; min-width: 0; }
.reminder-copy strong { overflow-wrap: anywhere; }
.reminder-copy small, .reminder-date { color: var(--muted); font-size: 12px; }
.reminder-date { white-space: nowrap; }
.agenda-heading { align-items: center; }
.agenda-nav { display: flex; align-items: center; gap: 8px; }
.agenda-nav strong { min-width: 132px; text-align: center; text-transform: capitalize; }
.calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 1px; overflow: hidden; background: var(--line); border: 1px solid var(--line); border-radius: 7px; box-shadow: var(--shadow); }
.calendar-weekday { padding: 8px 10px; color: var(--muted); background: #f7f9f7; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.calendar-day { min-width: 0; min-height: 142px; padding: 7px; background: #fff; }
.calendar-day.outside-month { background: #f7f9f7; }
.calendar-day.is-today { box-shadow: inset 0 0 0 2px #82b8a4; }
.calendar-day.is-selected { background: #f0f7f3; }
.calendar-date { display: inline-grid; min-width: 27px; height: 27px; place-items: center; margin-bottom: 4px; border-radius: 50%; font-size: 12px; font-weight: 700; }
.calendar-date:hover, .calendar-day.is-selected .calendar-date { color: #fff; background: var(--accent); }
.outside-month .calendar-date { color: #a5b0ac; }
.calendar-events { display: grid; gap: 4px; }
.calendar-event { display: grid; min-width: 0; gap: 1px; padding: 4px 5px; background: #f1f6f3; border-left: 2px solid var(--accent); border-radius: 3px; }
.calendar-event.deadline { background: #fbf3e5; border-left-color: var(--warning); }
.calendar-event.action { background: #eaf3f6; border-left-color: #477f96; }
.calendar-event.completed { opacity: .55; }
.calendar-event span { color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.calendar-event strong { display: -webkit-box; overflow: hidden; font-size: 10px; line-height: 1.25; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.calendar-event small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.calendar-more, .calendar-mobile-count { color: var(--muted); font-size: 10px; }
.calendar-mobile-count { display: none; }
.agenda-day-detail { margin-top: 30px; }
.agenda-day-list { margin-bottom: 18px; }
.agenda-event-row { display: grid; grid-template-columns: 130px minmax(0,1fr) 24px; align-items: center; gap: 12px; min-height: 58px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.agenda-event-row:last-child { border-bottom: 0; }
.agenda-event-row:hover { background: #f8faf8; }
.agenda-create { margin-top: 16px; }
.agenda-create h2 { margin: 0 0 14px; font-size: 17px; }
.agenda-action-form { display: grid; grid-template-columns: minmax(180px,1.2fr) minmax(170px,1fr) minmax(170px,1fr); align-items: end; gap: 12px; }
.agenda-action-form label { display: grid; gap: 6px; font-size: 12px; font-weight: 650; }
.agenda-action-form .reminder-check { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 500; }
.agenda-action-form .reminder-check input { width: auto; }
.agenda-note { display: block; margin-top: 10px; color: var(--muted); font-size: 11px; }
.calendar-day[data-href] { cursor: pointer; }
.calendar-day[data-href]:hover { background: #f6faf8; }
.calendar-event.appointment { background: #f3eefa; border-left-color: #7a5aa6; }
.appointment-reminder { color: #5b3f86; background: #f3eefa; }
.appointment-form .appointment-title { grid-column: span 2; }
.appointment-row { grid-template-columns: 130px minmax(0,1fr) auto; }
.appointment-row:hover { background: transparent; }
.appointment-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.appointment-tools form { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.appointment-tools .action-edit[open] { flex-basis: 100%; order: 2; }
.appointment-tools .appointment-form { margin-top: 10px; }
.scope-choice { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.scope-choice input { width: auto; }
@media (max-width: 900px) {
  .topic-list { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .project-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .detail-grid { grid-template-columns: minmax(0,1fr) 250px; }
  .time-form { grid-template-columns: 1fr 1fr; }
  .time-form button { grid-column: 1 / -1; justify-self: start; }
  .time-total { max-width: 160px; text-align: right; white-space: normal; }
  .calendar-day { min-height: 108px; padding: 5px; }
  .agenda-action-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .agenda-action-form button { justify-self: start; }
}
@media (max-width: 640px) {
  .topbar { position: static; flex-wrap: wrap; gap: 10px 14px; padding: 12px 16px; }
  .brand { flex: 1; }
  .topbar-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); order: 2; width: 100%; }
  .topbar-actions .button { flex: 1; min-width: 0; padding: 8px 6px; font-size: 11px; line-height: 1.25; white-space: normal; text-align: center; }
  .search { order: 3; max-width: none; margin: 0; }
  .container { margin: 25px auto; padding: 0 16px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 22px; }
  .page-heading h1, .form-card h1 { font-size: 27px; }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin-bottom: 28px; }
  .stat { padding: 13px; }
  .stat strong { font-size: 23px; }
  .project-grid { grid-template-columns: 1fr; gap: 10px; }
  .list-row { gap: 9px; padding: 11px 12px; }
  .date-box { flex-basis: 38px; height: 40px; }
  .list-row > .pill { white-space: normal; text-align: center; }
  .reminder-list { padding: 0 10px; }
  .reminder-row { grid-template-columns: minmax(0,1fr) auto 20px; gap: 8px; }
  .reminder-kind { grid-column: 1; grid-row: 1; }
  .reminder-copy { grid-column: 1; grid-row: 2; }
  .reminder-date { grid-column: 2; grid-row: 1 / 3; }
  .reminder-row .arrow { grid-column: 3; grid-row: 1 / 3; }
  .time-total { display: none; }
  .topic-list { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .subject-group { padding: 0 8px; }
  .topic-summary { gap: 8px; }
  .topic-content { padding-left: 17px; }
  .subject-filter-row input { max-width: none; }
  .detail-grid { grid-template-columns: 1fr; }
  .side-column { grid-row: 1; }
  .content-card, .form-card { padding: 17px; }
  .two-col, .issue-copy-grid { grid-template-columns: 1fr; gap: 12px; }
  .issue-copy-grid { padding: 0 12px 14px 33px; }
  .action-form { grid-template-columns: 1fr 1fr; }
  .action-form .reminder-check { grid-column: 1 / 2; }
  .action-form > button { grid-column: 2; }
  .action-edit-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .action-edit-form button { grid-column: 1 / -1; justify-self: start; }
  .action-row { grid-template-columns: 68px minmax(0,1fr) auto; align-items: start; gap: 8px; }
  .action-row > form:last-child { grid-column: 2 / -1; justify-self: start; }
  .agenda-nav { width: 100%; justify-content: space-between; }
  .agenda-nav strong { min-width: 0; }
  .calendar-weekday { padding: 6px 1px; text-align: center; font-size: 9px; }
  .calendar-day { min-height: 62px; padding: 3px; text-align: center; }
  .calendar-date { min-width: 24px; height: 24px; margin: 0 auto; font-size: 11px; }
  .calendar-events { display: none; }
  .calendar-mobile-count { display: block; font-size: 8px; }
  .agenda-action-form { grid-template-columns: 1fr; }
  .appointment-form .appointment-title { grid-column: auto; }
  .appointment-row .appointment-tools { grid-column: 1 / -1; justify-content: flex-start; }
  .agenda-event-row { grid-template-columns: minmax(0,1fr) 20px; gap: 7px; }
  .agenda-event-row .reminder-kind { grid-column: 1; grid-row: 1; }
  .agenda-event-row .reminder-copy { grid-column: 1; grid-row: 2; }
  .agenda-event-row .arrow { grid-column: 2; grid-row: 1 / 3; }
  .ai-controls { grid-template-columns: 1fr; }
  .ai-insert-row { align-items: stretch; flex-direction: column; }
  .time-form { grid-template-columns: 1fr; }
  .time-form button { grid-column: auto; }
  .time-summary { grid-template-columns: auto 1fr; }
  .form-card { margin: 0; }
  .section-heading { margin-top: 25px; }
}
@media (max-width: 430px) {
  .topic-list { grid-template-columns: 1fr; }
}

/* Open acties direct onder een subonderwerp */
.open-actions { margin: 0 0 14px; padding: 10px 14px; background: #fff; border: 1px solid var(--line); border-radius: 5px; }
.open-actions h4 { margin: 0 0 6px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .7px; }
.open-actions .muted { margin: 0; font-size: 13px; }
.open-actions ul { margin: 0; padding: 0; list-style: none; }
.open-actions li { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; }
.open-actions li:first-child { border-top: 0; }
.open-actions form { margin: 0; }
.open-action-date { flex: 0 0 82px; color: var(--muted); font-size: 12px; }
.open-actions li.is-late .open-action-date { color: var(--danger); font-weight: 650; }
.open-actions li.is-today .open-action-date { color: var(--warning); font-weight: 650; }
.open-action-main { min-width: 0; }
.open-action-main small { display: block; color: var(--muted); font-size: 12px; }

/* Afbeeldingen in originele grootte bekijken */
.prose img { cursor: zoom-in; }
.image-viewer { position: fixed; inset: 0; z-index: 50; display: flex; overflow: auto; padding: 24px; background: rgba(15, 25, 22, .86); cursor: zoom-out; }
.image-viewer[hidden] { display: none; }
.image-viewer img { max-width: none; height: auto; margin: auto; background: #fff; border-radius: 4px; box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.image-viewer-close { position: fixed; top: 14px; right: 18px; width: 38px; height: 38px; color: #fff; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.35); border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer; }

/* Inloggen */
.login-card { max-width: 380px; margin: 40px auto 0; }
.topbar-actions form { margin: 0; }
.rich-editor.is-drop-target { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px rgba(23,107,91,.15); }
.subject-move { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.subject-move label { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 600; }
.subject-move select { width: auto; min-width: 220px; }
.subject-change { margin: 0; }
.subject-change select { width: auto; max-width: 260px; padding: 6px 8px; font-size: 12px; }

/* Korte melding rechtsonder, o.a. na Ctrl+S */
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 60; max-width: min(420px, calc(100vw - 32px)); padding: 11px 16px; color: #fff; background: var(--accent); border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.18); font-size: 14px; font-weight: 650; opacity: 0; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; pointer-events: none; }
.toast.is-visible { opacity: 1; transform: none; }
.toast.info { background: #44524f; }
.toast.error { background: var(--danger); }

/* Extra tekstblokken in het subonderwerp-formulier */
#text-blocks { display: grid; gap: 18px; }
#text-blocks:empty { display: none; }
.text-block { display: grid; gap: 14px; padding: 14px; background: #f7f9f7; border: 1px solid var(--line); border-left: 3px solid #c9dcd3; border-radius: 6px; }
.text-block .rich-toolbar { margin-top: 0; }
.text-block-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.text-block-head input { flex: 1 1 260px; font-weight: 600; }
.text-block-head .button { padding: 6px 11px; }
.block-editor { min-height: 220px; }

/* AI-vraag op het dashboard */
.ai-ask { margin: 22px 0 6px; }
.ai-ask-form { display: grid; gap: 10px; }
.ai-ask-form textarea { width: 100%; resize: vertical; }
.ai-ask-options { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.ai-ask-options label { display: grid; gap: 6px; font-size: 12px; font-weight: 650; }
.ai-ask-options .reminder-check { display: flex; align-items: center; gap: 8px; padding-bottom: 11px; font-weight: 500; }
.ai-ask-options .reminder-check input { width: auto; }
.ai-answer { padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 6px; white-space: pre-wrap; line-height: 1.65; overflow-wrap: anywhere; max-height: 70vh; overflow: auto; }

/* ==========================================================================
   Thema: kleurrijkere look. Alles hieronder overschrijft de basisstijl;
   verwijder dit blok om terug te gaan naar de oorspronkelijke witte look.
   ========================================================================== */
:root {
  --bg: #edf3f0;
  --line: #d9e4df;
  --accent: #157262;
  --accent-dark: #0e5448;
  --accent-soft: #dcefe8;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16,60,50,.06), 0 10px 28px rgba(16,60,50,.08);
  --tone-1: #157262; --tone-1-soft: #dcefe8;
  --tone-2: #2f6fb5; --tone-2-soft: #e1ecf8;
  --tone-3: #7a52b3; --tone-3-soft: #ece4f7;
  --tone-4: #c07a1c; --tone-4-soft: #fbeedb;
  --tone-5: #b84a6b; --tone-5-soft: #f8e3ea;
  --tone-6: #2e8a8f; --tone-6-soft: #dcf0f1;
}
body {
  background:
    radial-gradient(1100px 520px at -10% -10%, rgba(21,114,98,.16), transparent 60%),
    radial-gradient(900px 480px at 110% 0%, rgba(122,82,179,.12), transparent 60%),
    radial-gradient(900px 600px at 50% 120%, rgba(192,122,28,.10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

/* Bovenbalk in diep groen met lichte knoppen */
.topbar { background: linear-gradient(110deg, #0c4a40 0%, #157262 55%, #1f8a73 100%); border-bottom: 0; box-shadow: 0 6px 20px rgba(12,74,64,.25); }
.topbar .brand { color: #fff; }
.topbar .brand:first-letter { color: #9be3c9; }
.topbar .button-light, .search button { color: #fff; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.28); }
.topbar .button-light:hover, .search button:hover { color: #fff; background: rgba(255,255,255,.24); border-color: rgba(255,255,255,.45); }
.topbar .button-light.is-enabled { color: #0c4a40; background: #c9f0e1; border-color: #c9f0e1; }
.topbar .button:not(.button-light) { color: #0c4a40; background: #fff; border-color: #fff; }
.topbar .button:not(.button-light):hover { background: #e6f7f0; }
.search input { color: #fff; background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.28); }
.search input::placeholder { color: rgba(255,255,255,.75); }
.search input:focus { background: rgba(255,255,255,.22); border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.18); }
.topbar .signal-count { box-shadow: 0 0 0 2px #157262; }

/* Koppen en knoppen */
.page-heading h1, .form-card h1 { background: linear-gradient(90deg, #0c4a40, #157262 60%, #7a52b3); -webkit-background-clip: text; background-clip: text; color: transparent; }
.section-heading h2 { display: flex; align-items: center; gap: 10px; }
.section-heading h2::before { content: ""; width: 6px; height: 20px; background: linear-gradient(180deg, var(--tone-1), var(--tone-3)); border-radius: 3px; }
.button { border-radius: 8px; background: linear-gradient(135deg, #1a8471, #157262); box-shadow: 0 2px 6px rgba(21,114,98,.25); }
.button:hover { background: linear-gradient(135deg, #157262, #0e5448); }
.button-light { background: #fff; box-shadow: none; }
.button-light:hover { background: var(--accent-soft); }
.button-danger { background: var(--danger); }

/* Kaarten: ronder, met zachte schaduw */
.stat, .project-card, .panel, .content-card, .form-card, .subject-group, .empty, .calendar-grid { border-radius: var(--radius); border-color: rgba(21,114,98,.12); }
.content-card, .form-card { position: relative; overflow: hidden; }
.content-card::before, .form-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--tone-1), var(--tone-2), var(--tone-3)); }

/* Tellers op het dashboard: elk een eigen kleur */
.stat { position: relative; overflow: hidden; border-left: 5px solid var(--tone, var(--tone-1)); background: linear-gradient(135deg, var(--tone-soft, var(--tone-1-soft)) 0%, #fff 70%); }
.stat strong { color: var(--tone, var(--tone-1)); }
.stats .stat:nth-child(1) { --tone: var(--tone-1); --tone-soft: var(--tone-1-soft); }
.stats .stat:nth-child(2) { --tone: var(--tone-2); --tone-soft: var(--tone-2-soft); }
.stats .stat:nth-child(3) { --tone: var(--tone-4); --tone-soft: var(--tone-4-soft); }
.stats .stat:nth-child(4) { --tone: var(--danger); --tone-soft: #f9e2e4; }

/* Projectkaarten: afwisselende kleuren */
.project-card { --tone: var(--tone-1); --tone-soft: var(--tone-1-soft); border-top: 4px solid var(--tone); }
.project-card:nth-child(6n+2) { --tone: var(--tone-2); --tone-soft: var(--tone-2-soft); }
.project-card:nth-child(6n+3) { --tone: var(--tone-3); --tone-soft: var(--tone-3-soft); }
.project-card:nth-child(6n+4) { --tone: var(--tone-4); --tone-soft: var(--tone-4-soft); }
.project-card:nth-child(6n+5) { --tone: var(--tone-5); --tone-soft: var(--tone-5-soft); }
.project-card:nth-child(6n+6) { --tone: var(--tone-6); --tone-soft: var(--tone-6-soft); }
.project-card:hover { border-color: var(--tone); box-shadow: 0 14px 34px rgba(16,60,50,.14); transform: translateY(-3px); }
.project-icon { color: var(--tone); background: var(--tone-soft); border-radius: 9px; }
.project-card .card-bottom span:last-child { color: var(--tone); font-weight: 650; }

/* Lijsten en labels */
.list-row:hover, .reminder-row:hover, .agenda-event-row:hover { background: var(--accent-soft); }
.date-box { color: var(--tone-2); background: var(--tone-2-soft); border-color: #c6dbf1; border-radius: 8px; }
.pill { border-radius: 999px; color: var(--accent-dark); background: var(--accent-soft); }

/* Onderwerpen op de projectpagina: gekleurde rand per onderwerp */
.subject-group { --tone: var(--tone-1); --tone-soft: var(--tone-1-soft); border-left: 4px solid var(--tone); }
.subject-group:nth-child(6n+2) { --tone: var(--tone-2); --tone-soft: var(--tone-2-soft); }
.subject-group:nth-child(6n+3) { --tone: var(--tone-3); --tone-soft: var(--tone-3-soft); }
.subject-group:nth-child(6n+4) { --tone: var(--tone-4); --tone-soft: var(--tone-4-soft); }
.subject-group:nth-child(6n+5) { --tone: var(--tone-5); --tone-soft: var(--tone-5-soft); }
.subject-group:nth-child(6n+6) { --tone: var(--tone-6); --tone-soft: var(--tone-6-soft); }
.subject-group[open] { background: linear-gradient(180deg, var(--tone-soft) 0, #fff 90px); }
.subject-group-summary::after, .topic-summary::after { color: var(--tone, var(--accent)); }
.subject-items { border-left-color: var(--tone-soft, var(--accent-soft)); }
.issue-copy { background: #f4f8f6; border-left: 3px solid var(--tone, #c9dcd3); }
.text-block { background: linear-gradient(180deg, var(--tone-3-soft) 0, #f7f9f7 70px); border-left-color: var(--tone-3); }

/* AI-assistent: paars-groen accent */
.ai-assistant { background: linear-gradient(135deg, #f1ebfa 0%, #e6f4ef 100%); border: 1px solid #d8cdeb; border-radius: var(--radius); box-shadow: var(--shadow); }
.ai-assistant .eyebrow { color: var(--tone-3); }
.ai-assistant .button:not(.button-light) { background: linear-gradient(135deg, #8a62c4, #6a45a3); border-color: #6a45a3; box-shadow: 0 2px 6px rgba(106,69,163,.3); }
.ai-assistant .button:not(.button-light):hover { background: linear-gradient(135deg, #7a52b3, #5a378f); }
.ai-answer { border-color: #d8cdeb; }

/* Overig */
.flash { border-radius: 8px; }
footer { color: #5f7570; border-top-color: rgba(21,114,98,.15); }
.toast { border-radius: 9px; }
.rich-toolbar { align-items: center; }
.stack .rich-toolbar .toolbar-control { display: inline-flex; flex-direction: row; min-height: 34px; align-items: center; gap: 6px; font-weight: 500; }
.rich-toolbar button, .toolbar-control { border-radius: 7px; }
.ai-files-check { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
.ai-files-check input { width: auto; }
.ai-files-check small { color: var(--muted); font-size: 11px; }

/* Links naar HiDrive-bestanden in teksten krijgen een wolkje ervoor (ook al bestaande links). */
a[href*="/hidrive/file?"]::before { content: ""; display: inline-block; width: 1.15em; height: 1.15em; margin-right: .3em; vertical-align: -.2em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23f08c00' d='M19.35 10.04A7.49 7.49 0 0 0 12 4C9.11 4 6.6 5.64 5.35 8.04A5.99 5.99 0 0 0 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z'/%3E%3Cpath fill='%23fff' d='M12 9.5l-3.5 3.5H11v3.5h2V13h2.5z'/%3E%3C/svg%3E") center / contain no-repeat; }

/* HiDrive-bestandsbeheerder */
.fm [hidden], .fm-menu[hidden], .fm-preview[hidden] { display: none !important; }
.fm { display: flex; flex-direction: column; height: calc(100vh - 230px); min-height: 460px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius, 8px); box-shadow: var(--shadow); overflow: hidden; }
.fm-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: #f8faf9; }
.fm-tool { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--text); font: inherit; font-size: .92em; cursor: pointer; }
.fm-tool:hover { background: var(--accent-soft); border-color: var(--line); }
.fm-search { margin-left: auto; width: 220px; max-width: 100%; padding: 7px 10px; }
.fm-body { display: grid; grid-template-columns: 230px minmax(0, 1fr); flex: 1; min-height: 0; }
.fm-tree { overflow: auto; padding: 8px 0; border-right: 1px solid var(--line); font-size: .93em; }
.fm-node { display: flex; align-items: center; gap: 4px; padding: 5px 8px; cursor: pointer; white-space: nowrap; border-radius: 0 6px 6px 0; margin-right: 6px; }
.fm-node:hover { background: #f1f5f3; }
.fm-node.is-current { background: var(--accent-soft); font-weight: 600; }
.fm-node-name { overflow: hidden; text-overflow: ellipsis; }
.fm-toggle { width: 18px; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: .9em; }
.fm-main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.fm-pathbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.fm-up { padding: 3px 9px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; font-size: 1.05em; }
.fm-up:disabled { opacity: .4; cursor: default; }
.fm-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fm-count { font-size: .9em; }
.fm-sort, .fm-views { display: flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.fm-sort { margin-left: auto; }
.fm-sort button, .fm-views button { padding: 5px 10px; border: 0; border-right: 1px solid var(--line); background: #fff; font: inherit; font-size: .88em; cursor: pointer; color: var(--text); }
.fm-sort button:last-child, .fm-views button:last-child { border-right: 0; }
.fm-sort button.is-active, .fm-views button.is-active { background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; }
.fm-items { flex: 1; overflow: auto; padding: 14px; outline: none; user-select: none; }
.fm-items.is-loading { opacity: .55; }
.fm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); align-content: start; gap: 10px; }
.fm-item { border: 1px solid transparent; border-radius: 8px; cursor: default; }
.fm-grid .fm-item { display: flex; flex-direction: column; align-items: center; padding: 8px 6px; text-align: center; }
.fm-item:hover { background: #f4f8f6; }
.fm-item.is-selected { background: var(--accent-soft); border-color: var(--accent); }
.fm-item.is-cut { opacity: .5; }
.fm-item.is-drop, .fm-node.is-drop, .fm-crumbs .is-drop { outline: 2px dashed var(--accent); outline-offset: -2px; background: var(--accent-soft); }
.fm-visual { display: grid; place-items: center; width: 100%; height: 96px; margin-bottom: 6px; }
.fm-thumb { max-width: 100%; max-height: 96px; border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,.15); object-fit: contain; background: #fff; }
.fm-grid .fm-name { width: 100%; font-size: .86em; line-height: 1.3; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fm-meta { font-size: .74em; margin-top: 2px; }
.fm-icon { position: relative; flex: none; }
.fm-folder { width: 64px; height: 48px; border-radius: 4px 6px 6px 6px; background: linear-gradient(#f6c453, #e9a92a); box-shadow: inset 0 -2px 0 rgba(0,0,0,.08); position: relative; margin-top: 8px; }
.fm-folder::before { content: ""; position: absolute; left: 0; top: -7px; width: 26px; height: 9px; border-radius: 4px 4px 0 0; background: #e9a92a; }
.fm-folder-small { width: 18px; height: 13px; margin: 3px 4px 0 0; flex: none; }
.fm-folder-small::before { top: -3px; width: 8px; height: 4px; }
.fm-file { display: grid; place-items: end center; width: 52px; height: 66px; border-radius: 4px; background: #fff; border: 1px solid #d5dedb; box-shadow: 0 1px 2px rgba(0,0,0,.08); clip-path: polygon(0 0, 72% 0, 100% 20%, 100% 100%, 0 100%); }
.fm-file span { margin-bottom: 9px; padding: 2px 5px; border-radius: 3px; background: var(--type); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.fm-list { display: block; padding: 4px 8px; }
.fm-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 110px 140px; align-items: center; gap: 10px; padding: 5px 8px; font-size: .92em; }
.fm-head { position: sticky; top: -4px; background: var(--card); color: var(--muted); font-size: .8em; font-weight: 600; border-bottom: 1px solid var(--line); border-radius: 0; z-index: 1; }
.fm-list .fm-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-list .fm-folder { width: 22px; height: 16px; margin: 4px 0 0; }
.fm-list .fm-folder::before { top: -4px; width: 10px; height: 5px; }
.fm-list .fm-file { width: 22px; height: 28px; place-items: center; }
.fm-list .fm-file span { margin: 6px 0 0; padding: 0 2px; font-size: 7px; }
.fm-empty { grid-column: 1 / -1; padding: 40px 10px; text-align: center; }
.fm-drop { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(229, 241, 237, .88); border: 3px dashed var(--accent); border-radius: 6px; color: var(--accent-dark); font-weight: 700; font-size: 1.1em; pointer-events: none; }
.fm-status { padding: 6px 12px; border-top: 1px solid var(--line); background: #f8faf9; font-size: .84em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm-menu { position: fixed; z-index: 1000; min-width: 220px; padding: 5px 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.fm-menu button { display: flex; justify-content: space-between; gap: 18px; width: 100%; padding: 7px 14px; border: 0; background: none; font: inherit; font-size: .92em; text-align: left; cursor: pointer; color: var(--text); }
.fm-menu button.text-danger { color: var(--danger); }
.fm-menu button:hover:not(:disabled) { background: var(--accent-soft); }
.fm-menu button:disabled { opacity: .4; cursor: default; }
.fm-menu hr { margin: 4px 0; border: 0; border-top: 1px solid var(--line); }
.fm-preview { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 24px; background: rgba(15, 30, 26, .6); }
.fm-preview-box { display: flex; flex-direction: column; width: min(1100px, 100%); height: min(88vh, 100%); background: #fff; border-radius: 10px; overflow: hidden; }
.fm-preview-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.fm-preview-body { flex: 1; display: grid; place-items: center; min-height: 0; background: #f3f5f4; }
.fm-preview-body img { max-width: 100%; max-height: 100%; object-fit: contain; }
.fm-preview-body iframe { width: 100%; height: 100%; border: 0; background: #fff; }
@media (max-width: 760px) {
  .fm { height: auto; min-height: 70vh; }
  .fm-body { grid-template-columns: 1fr; }
  .fm-tree { display: none; }
  .fm-tool span { display: none; }
  .fm-search { width: 100%; margin-left: 0; }
  .fm-sort { margin-left: 0; }
  .fm-row { grid-template-columns: 30px minmax(0, 1fr) 80px; }
  .fm-row > :last-child { display: none; }
}

/* F1-helpvenster met sneltoetsen */
.shortcut-help { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(20, 30, 27, .45); }
.shortcut-help[hidden] { display: none; }
.shortcut-card { position: relative; width: min(520px, 100%); max-height: 90vh; overflow: auto; padding: 22px 26px; background: #fff; border-radius: 10px; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.shortcut-card h2 { margin: 0 0 10px; }
.shortcut-card table { width: 100%; border-collapse: collapse; }
.shortcut-card th { padding: 12px 0 4px; text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.shortcut-card td { padding: 5px 0; vertical-align: top; }
.shortcut-card td:first-child { width: 48%; white-space: nowrap; }
.shortcut-card kbd { padding: 1px 6px; font: inherit; font-size: 12px; background: #f1f5f3; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; }
.shortcut-close { position: absolute; top: 8px; right: 12px; font-size: 24px; line-height: 1; background: none; border: 0; cursor: pointer; color: var(--muted); }
