/* Assistent: Vandaag en Mail */
.as-quick { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.as-quick-in { flex: 1 1 320px; min-width: 0; border: 1px solid var(--field-line); border-radius: 10px; padding: 11px 14px; background: var(--field); font-size: 15px; }
.as-quick-area { border: 1px solid var(--field-line); border-radius: 10px; padding: 8px 10px; background: var(--field); }
.as-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.as-sec { margin-bottom: 20px; }
.as-sec h2 { font-size: 16px; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.as-sec.late h2 { color: var(--bad); }
.as-count { background: var(--soft); color: var(--text); border-radius: 999px; padding: 0 8px; font-size: 12.5px; }
.as-list { display: flex; flex-direction: column; gap: 6px; }
.as-row { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 9px 12px; }
.as-row.wait { background: var(--hover); }
.as-row.done { opacity: .7; }
.as-row.done .as-title span { text-decoration: line-through; }
.as-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--field-line); background: transparent; cursor: pointer; flex: none; padding: 0; }
.as-check:hover { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 15%, transparent); }
.as-check.on { background: var(--ok); border-color: var(--ok); }
.as-main { flex: 1; min-width: 0; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.as-title { display: block; line-height: 1.5; }
.as-title > * { margin-right: 6px; vertical-align: middle; }
.as-title .as-dot { margin-right: 8px; position: relative; top: -1px; }
.as-title .as-due, .as-title .as-tag { display: inline-block; white-space: nowrap; }
.as-title strong { font-weight: 600; overflow-wrap: anywhere; }
.as-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-mi { color: var(--muted); font-size: 13px; }
.as-tag { font-size: 12px; color: var(--muted); background: var(--soft); border-radius: 999px; padding: 1px 8px; }
.as-due { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--soft); }
.as-due.today { background: #fff1d6; color: #8a5a00; }
.as-due.late { background: var(--bad); color: #fff; }
.as-done summary { cursor: pointer; font-weight: 600; margin: 6px 0 8px; }
.as-quickdates { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.as-quickdates .chip { font-size: 12.5px; padding: 3px 10px; }
.as-areas .chip { display: inline-flex; align-items: center; gap: 4px; }

.as-mail { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
.as-mlist { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 10px; max-height: calc(100vh - 140px); overflow-y: auto; padding-right: 4px; }
.as-mlist input[type=search] { border: 1px solid var(--field-line); border-radius: 8px; padding: 8px 10px; background: var(--field); margin-bottom: 4px; }
.as-mlist .chips { margin-bottom: 4px; }
.as-mitem { text-align: left; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 8px; padding: 8px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.as-mitem:hover { background: var(--hover); }
.as-mitem.on { outline: 2px solid var(--blue-d); }
.as-mitem.unread .as-msubj, .as-mitem.unread strong { font-weight: 800; }
.as-mtop { display: flex; justify-content: space-between; gap: 8px; }
.as-mtop strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-msubj { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-msnip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-err { color: var(--bad); }
.as-thread { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; min-width: 0; }
.as-thread.as-none { background: transparent; border-style: dashed; }
.as-subject { font-size: 19px; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; overflow-wrap: anywhere; }
.as-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.as-linked { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.as-msgs { display: flex; flex-direction: column; gap: 8px; }
.as-msg { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.as-msg.mine { background: var(--soft); }
.as-msg summary { cursor: pointer; }
.as-msg-meta { font-size: 12px; color: var(--muted); margin: 4px 0 8px; overflow-wrap: anywhere; }
.as-msg-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; }
.as-files { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.as-compose { border-top: 2px solid var(--line); margin-top: 14px; padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.as-compose-head { display: flex; justify-content: space-between; align-items: center; }
.as-cf { display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 8px; font-size: 13.5px; }
.as-cf input, .as-cf select { border: 1px solid var(--field-line); border-radius: 8px; padding: 7px 10px; background: var(--field); min-width: 0; }
.as-from { color: var(--muted); }
.as-ai { display: flex; gap: 8px; flex-wrap: wrap; }
.as-ai input { flex: 1 1 260px; min-width: 0; border: 1px solid var(--field-line); border-radius: 8px; padding: 7px 10px; background: var(--field); }
.as-body { border: 1px solid var(--field-line); border-radius: 8px; padding: 10px 12px; background: var(--field); font: inherit; line-height: 1.5; resize: vertical; width: 100%; }
.as-sig { margin: 0; font: inherit; font-size: 13px; color: var(--muted); white-space: pre-wrap; border-left: 3px solid var(--line); padding-left: 10px; }
.as-send { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.as-backlist { margin-bottom: 10px; }
html[data-theme=dark] .as-due.today { background: #4a3a10; color: #ffd98a; }
@media (max-width: 900px) {
  .as-mail { grid-template-columns: 1fr; }
  .as-mlist { position: static; max-height: none; }
  .as-cf { grid-template-columns: 1fr; gap: 3px; }
  .as-thread { padding: 12px; }
}

/* Prioriteit (matrix) */
.qm-first { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--bad); border-radius: var(--r); padding: 10px 14px; margin-bottom: 14px; }
.qm-first.ok { border-left-color: var(--ok); }
.qm-first ol { margin: 6px 0 0; padding-left: 20px; }
.qm-first li { margin: 2px 0; font-weight: 600; }
.qm-first li small { font-weight: 400; }
.qm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.qm-q { background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--line); border-radius: var(--r); padding: 12px 14px; min-width: 0; }
.qm-q header { margin-bottom: 8px; }
.qm-q h2 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.qm-q.q-nu { border-top-color: var(--bad); } .qm-q.q-nu h2 { color: var(--bad); }
.qm-q.q-plan { border-top-color: var(--blue-d); }
.qm-q.q-over { border-top-color: #d97706; }
.qm-q.q-later { border-top-color: #9aa3b5; } .qm-q.q-later .qm-row { opacity: .8; }
.qm-list { display: flex; flex-direction: column; }
.qm-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); }
.qm-row:first-child { border-top: 0; }
.qm-main { flex: 1; min-width: 0; cursor: pointer; }
.qm-main small { color: var(--muted); }
.qm-move { border: 1px solid var(--field-line); border-radius: 8px; background: var(--field); padding: 3px 4px; width: 40px; flex: none; }
.qm-empty { color: var(--muted); font-size: 13px; margin: 4px 0; }
/* Alle taken */
.tk-bar { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.tk-search { border: 1px solid var(--field-line); border-radius: 8px; padding: 9px 12px; background: var(--field); max-width: 420px; }
.tk-sep { width: 1px; background: var(--line); margin: 0 4px; }
.tk-group { margin-bottom: 18px; }
.tk-group h2 { font-size: 16px; display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.tk-table { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.tk-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) 150px 190px; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--line); }
.tk-row:first-child { border-top: 0; }
.tk-row.done .tk-title { text-decoration: line-through; color: var(--muted); }
.tk-title { cursor: pointer; overflow-wrap: anywhere; }
.tk-title small { color: var(--muted); }
.tk-q { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 9px; justify-self: start; background: var(--soft); }
.tk-q.q-nu { background: var(--bad); color: #fff; }
.tk-q.q-plan { background: #dbeafe; color: #1e40af; }
.tk-q.q-over { background: #fde7c7; color: #8a4b00; }
.tk-q.q-later { background: var(--soft); color: var(--muted); }
html[data-theme=dark] .tk-q.q-plan { background: #1e3a8a; color: #dbeafe; }
html[data-theme=dark] .tk-q.q-over { background: #5a3a10; color: #ffd98a; }
@media (max-width: 900px) {
  .qm-grid { grid-template-columns: 1fr; }
  .tk-row { grid-template-columns: 30px minmax(0, 1fr); }
  .tk-row .tk-due, .tk-row .tk-q { grid-column: 2; }
}
