/* ============================================================
   YORRO COMMAND CENTER — mockup component styles
   Built on tokens.css. Brand rules: off-white canvas, white cards,
   navy headings (Domine), Manrope body, amber as a single rare accent,
   the "/" slash motif, Lucide thin-outline icons. No dark/purple.
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg2);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: var(--font-body); cursor: pointer; border: none; background: none; color: inherit; }
img, svg { display: block; }
svg { stroke-width: 1.75; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d4d3cd; border-radius: 8px; border: 3px solid var(--bg); }

/* ---------------- App frame ---------------- */
.app { display: grid; grid-template-columns: 250px 1fr; height: 100vh; }

/* ---------------- Sidebar (navy) ---------------- */
.sidebar {
  background: var(--color-navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 16px;
  position: relative;
  overflow: hidden;
}
/* faint slash watermark, brand motif */
.sidebar::after {
  content: '/';
  position: absolute;
  right: -40px; bottom: -70px;
  font-family: var(--font-headline);
  font-size: 320px;
  line-height: 1;
  color: rgba(255,255,255,.035);
  pointer-events: none;
}
.side-logo { height: 30px; width: auto; align-self: flex-start; object-fit: contain; margin: 6px 8px 26px; }
.side-section { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.38); padding: 0 12px; margin: 18px 0 8px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius-btn);
  color: rgba(255,255,255,.72); font-size: 14.5px; font-weight: 500;
  position: relative; transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  margin-bottom: 2px;
}
.nav-item svg { width: 18px; height: 18px; opacity: .85; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: rgba(255,255,255,.09); color: #fff; }
.nav-item.active::before {
  content: ''; position: absolute; left: -16px; top: 8px; bottom: 8px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--color-amber);
}
.nav-item.soon { color: rgba(255,255,255,.32); cursor: default; }
.nav-item.soon:hover { background: transparent; color: rgba(255,255,255,.32); }
.nav-badge { margin-left: auto; font-size: 11px; font-weight: 600;
  background: var(--color-amber); color: var(--color-navy); border-radius: 20px; padding: 1px 7px; }
.nav-badge.ghost { background: rgba(255,255,255,.12); color: rgba(255,255,255,.6); }

.side-foot { margin-top: auto; }
.side-status {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 12px; border-radius: var(--radius-btn);
  background: rgba(255,255,255,.05); margin-bottom: 10px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot.ok { background: #3fbf83; box-shadow: 0 0 0 3px rgba(63,191,131,.18); }
.dot.warn { background: var(--color-amber); box-shadow: 0 0 0 3px rgba(240,164,34,.18); }
.side-status .lbl { font-size: 12.5px; color: rgba(255,255,255,.85); font-weight: 500; }
.side-status .sub { font-size: 11px; color: rgba(255,255,255,.45); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
.side-user .av { width: 30px; height: 30px; border-radius: 50%; background: var(--color-amber);
  color: var(--color-navy); font-weight: 700; font-family: var(--font-headline);
  display: grid; place-items: center; font-size: 14px; flex: none; }
.side-user .nm { font-size: 13.5px; color: #fff; font-weight: 500; line-height: 1.2; }
.side-user .rl { font-size: 11px; color: rgba(255,255,255,.45); }

/* ---------------- Main + topbar ---------------- */
.main { display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }
.topbar {
  height: 62px; flex: none; display: flex; align-items: center; gap: 16px;
  padding: 0 28px; border-bottom: 1px solid var(--border); background: rgba(240,239,237,.85);
  backdrop-filter: blur(10px);
  /* backdrop-filter creates a stacking context; without an explicit z-index
     the open werkmap dropdown paints UNDER the page content, which silently
     swallowed every click on it (the "kan geen map selecteren" bug). */
  position: relative; z-index: 100;
}
.crumb { font-family: var(--font-headline); font-weight: 700; color: var(--fg1); font-size: 17px; }
.ctx-picker {
  display: inline-flex; align-items: center; gap: 8px; margin-left: 6px;
  padding: 6px 12px; border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--radius-btn); font-size: 13px; color: var(--fg2); font-weight: 500;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.ctx-picker:hover { border-color: #cfceca; box-shadow: var(--shadow-card); }
.ctx-picker .sl { color: var(--color-amber); font-weight: 600; }
.ctx-picker svg { width: 15px; height: 15px; color: var(--fg3); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 38px; height: 38px; border-radius: var(--radius-btn); display: grid; place-items: center;
  color: var(--fg2); transition: background var(--dur-fast); }
.icon-btn:hover { background: rgba(28,35,64,.05); }
.icon-btn svg { width: 19px; height: 19px; }

.view { flex: 1; overflow-y: auto; }
.view[hidden] { display: none; }
.pad { padding: 30px 32px 40px; max-width: 1180px; }

/* ---------------- Shared bits ---------------- */
.t-section-label { /* from tokens */ margin-bottom: 10px; }
.view-head { margin-bottom: 26px; }
.view-head h1 { font-family: var(--font-headline); font-weight: 700; color: var(--fg1);
  font-size: 30px; letter-spacing: -.02em; line-height: 1.1; }
.view-head p { color: var(--fg3); font-size: 15px; margin-top: 6px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 20px; }
.pill.live { background: #e7f6ee; color: #1e8a56; }
.pill.soon { background: var(--color-amber-tint); color: #a8730c; }
.pill.muted { background: #efeeeb; color: var(--fg3); }
.delta { font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.delta.up { color: #1e8a56; }
.delta.down { color: #c0492f; }
.note-strip { display:flex; align-items:center; gap:9px; font-size:13px; color:#a8730c;
  background: var(--color-amber-tint); border:1px solid #f2e3c4; border-radius: var(--radius-btn);
  padding: 9px 13px; margin-bottom: 22px; }
.note-strip svg { width:16px; height:16px; flex:none; }

/* ---------------- Dashboard ---------------- */
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 26px; }
.metric { padding: 18px 18px 14px; position: relative; }
.metric .mlabel { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: var(--fg3); display: flex; align-items: center; gap: 8px; }
.metric .mlabel .src { margin-left: auto; }
.metric .mlabel svg { width: 15px; height: 15px; }
.metric .mval { font-family: var(--font-headline); font-weight: 700; color: var(--fg1);
  font-size: 34px; letter-spacing: -.02em; margin: 12px 0 4px; line-height: 1; }
.metric .mfoot { display: flex; align-items: center; gap: 8px; }
.metric .spark { margin-top: 12px; width: 100%; height: 34px; }
.src-tag { font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--fg3); background: #f4f3f0; border-radius: 5px; padding: 2px 6px; }

.group-label { font-family: var(--font-headline); font-weight: 700; color: var(--fg1); font-size: 18px;
  margin: 6px 0 14px; display: flex; align-items: center; gap: 10px; }
.group-label .t-section-label { margin: 0; }
.panel-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-bottom: 26px; }
.panel { padding: 20px; }
.panel h3 { font-family: var(--font-headline); font-weight: 700; color: var(--fg1); font-size: 16px; margin-bottom: 14px; }
.li-post { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; padding: 12px 0; border-top: 1px solid var(--border); }
.li-post:first-of-type { border-top: none; }
.li-post .txt { font-size: 13.5px; color: var(--fg2); }
.li-post .met { display: flex; gap: 16px; align-items: center; }
.li-post .met b { font-family: var(--font-headline); color: var(--fg1); font-size: 15px; }
.li-post .met span { font-size: 11px; color: var(--fg3); display:block; }

/* ---------------- Chat ---------------- */
.chat-wrap { height: 100%; display: flex; flex-direction: column; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 26px 0 12px; }
.chat-inner { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.chat-empty { max-width: 760px; margin: 6vh auto 0; padding: 0 24px; text-align: center; }
.chat-empty .mark { font-family: var(--font-headline); font-size: 46px; font-weight: 700; color: var(--fg1); }
.chat-empty .mark .sl { color: var(--color-amber); }
.chat-empty h2 { font-family: var(--font-headline); font-weight: 700; color: var(--fg1);
  font-size: 30px; letter-spacing: -.02em; margin: 18px 0 8px; }
.chat-empty p { color: var(--fg3); font-size: 15px; }
.suggests { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; margin-top: 26px; text-align: left; }
.suggest { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 14px 16px; transition: border-color var(--dur-fast), box-shadow var(--dur-fast), transform var(--dur-fast); }
.suggest:hover { border-color: #cfceca; box-shadow: var(--shadow-card); transform: translateY(-1px); }
.suggest .st { font-weight: 600; color: var(--fg1); font-size: 14px; }
.suggest .ss { color: var(--fg3); font-size: 12.5px; margin-top: 2px; }

.msg { display: flex; gap: 14px; margin-bottom: 24px; }
.msg .av { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-family: var(--font-headline); font-weight: 700; font-size: 15px; }
.msg.ai .av { background: var(--color-navy); color: #fff; }
.msg.ai .av .sl { color: var(--color-amber); }
.msg.me { justify-content: flex-end; }
.msg.me .bubble { background: var(--color-navy); color: #fff; border-radius: 14px 14px 4px 14px;
  padding: 12px 16px; font-size: 14.5px; line-height: 1.6; max-width: 78%; }
.msg.ai .body { font-size: 14.5px; line-height: 1.75; color: var(--fg2); }
.msg.ai .body strong { color: var(--fg1); }
.msg.ai .body p { margin-bottom: 10px; }
.file-chip { display: inline-flex; align-items: center; gap: 9px; margin-top: 10px;
  border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-btn); padding: 9px 13px; }
.file-chip svg { width: 17px; height: 17px; color: var(--color-amber); }
.file-chip .fn { font-size: 13px; font-weight: 600; color: var(--fg1); }
.file-chip .fs { font-size: 11px; color: var(--fg3); }
.file-chip .dl { margin-left: 8px; color: var(--fg3); }

.composer-wrap { flex: none; padding: 14px 24px 22px; }
.composer { max-width: 760px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 12px 12px 10px; }
.composer textarea { width: 100%; border: none; outline: none; resize: none; font-family: var(--font-body);
  font-size: 15px; color: var(--fg1); background: transparent; line-height: 1.6; padding: 6px 6px 4px; }
.composer textarea::placeholder { color: var(--fg3); }
.composer-bar { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.chip { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 500;
  color: var(--fg2); border: 1px solid var(--border); border-radius: 20px; padding: 6px 11px;
  transition: border-color var(--dur-fast), background var(--dur-fast); }
.chip:hover { border-color: #cfceca; background: #faf9f7; }
.chip svg { width: 14px; height: 14px; color: var(--fg3); }
.chip .sl { color: var(--color-amber); font-weight: 700; }
.model-chip .m { font-weight: 600; color: var(--fg1); }
.mic { margin-left: auto; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  color: var(--fg2); border: 1px solid var(--border); transition: background var(--dur-fast), border-color var(--dur-fast); }
.mic:hover { background: #faf9f7; border-color: #cfceca; }
.mic svg { width: 18px; height: 18px; }
.send { width: 40px; height: 40px; border-radius: 10px; background: var(--color-amber);
  color: var(--color-navy); display: grid; place-items: center; transition: background var(--dur-fast), transform var(--dur-fast); }
.send:hover { background: var(--color-amber-press); transform: translateY(-1px); }
.send svg { width: 19px; height: 19px; stroke-width: 2.2; }
.composer-hint { max-width: 760px; margin: 8px auto 0; text-align: center; font-size: 11.5px; color: var(--fg3); }

/* ---------------- Inbox ---------------- */
.inbox-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 20px;
  border: 1px solid var(--border); font-size: 13.5px; font-weight: 500; color: var(--fg2); background: var(--surface); }
.tab:hover { border-color: #cfceca; }
.tab.active { background: var(--color-navy); color: #fff; border-color: var(--color-navy); }
.tab .ct { font-size: 11px; font-weight: 700; background: rgba(28,35,64,.08); color: var(--fg2);
  border-radius: 20px; padding: 1px 7px; }
.tab.active .ct { background: rgba(255,255,255,.18); color: #fff; }
.tab.amber.active { background: var(--color-amber); color: var(--color-navy); border-color: var(--color-amber); }
.tab.amber.active .ct { background: rgba(28,35,64,.14); color: var(--color-navy); }

.mail { padding: 0; margin-bottom: 12px; overflow: hidden; }
.mail-head { display: grid; grid-template-columns: 34px 1fr auto; gap: 14px; align-items: center; padding: 15px 18px; }
.mail-head:hover { background: #faf9f7; }
.mail .av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-family: var(--font-headline); font-size: 14px; background: #ecebe7; color: var(--fg2); }
.mail .from { font-weight: 600; color: var(--fg1); font-size: 14px; }
.mail .subj { color: var(--fg2); font-size: 13.5px; }
.mail .subj .snippet { color: var(--fg3); }
.mail .rgt { display: flex; align-items: center; gap: 12px; }
.mail .time { font-size: 12px; color: var(--fg3); white-space: nowrap; }
.mail-draft { border-top: 1px solid var(--border); padding: 16px 18px 18px; background: #faf9f7; }
.mail-draft[hidden] { display: none; }
.draft-label { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: var(--color-amber); display: inline-flex; align-items: center; gap: 7px; margin-bottom: 10px; }
.draft-label .sl { font-weight: 700; }
.draft-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 14px 16px; font-size: 14px; line-height: 1.7; color: var(--fg2); }
.draft-box p { margin-bottom: 9px; }
.draft-actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.btn { font-size: 13.5px; font-weight: 600; padding: 10px 18px; border-radius: var(--radius-btn);
  display: inline-flex; align-items: center; gap: 8px; transition: background var(--dur-fast), transform var(--dur-fast), border-color var(--dur-fast); line-height: 1; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--color-navy); color: #fff; }
.btn-primary:hover { background: var(--color-navy-lift); transform: translateY(-1px); }
.btn-ghost { border: 1px solid var(--border); color: var(--fg1); background: var(--surface); }
.btn-ghost:hover { border-color: #cfceca; }
.draft-actions .safe { margin-left: auto; font-size: 12px; color: var(--fg3); display: inline-flex; align-items: center; gap: 6px; }
.draft-actions .safe svg { width: 14px; height: 14px; }

/* ---------------- Modules + Sources ---------------- */
.mod-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.mod { padding: 18px 20px; display: flex; gap: 15px; align-items: flex-start; }
.mod .ico { width: 42px; height: 42px; border-radius: var(--radius-md); flex: none; display: grid; place-items: center;
  background: var(--color-amber-tint); color: #b9800f; }
.mod .ico svg { width: 20px; height: 20px; }
.mod .mtitle { font-family: var(--font-headline); font-weight: 700; color: var(--fg1); font-size: 15.5px;
  display: flex; align-items: center; gap: 10px; }
.mod .mdesc { font-size: 13px; color: var(--fg2); margin: 4px 0 9px; line-height: 1.5; }
.mod .mmeta { font-size: 12px; color: var(--fg3); display: flex; align-items: center; gap: 8px; }
.mod .mmeta svg { width: 13px; height: 13px; }

.src-list { padding: 6px 4px; }
.src-row { display: grid; grid-template-columns: 40px 1fr auto auto; gap: 14px; align-items: center;
  padding: 15px 18px; border-bottom: 1px solid var(--border); }
.src-row:last-child { border-bottom: none; }
.src-row .ico { width: 40px; height: 40px; border-radius: var(--radius-md); display: grid; place-items: center;
  background: #f4f3f0; color: var(--fg2); }
.src-row .ico svg { width: 19px; height: 19px; }
.src-row .snm { font-weight: 600; color: var(--fg1); font-size: 14.5px; }
.src-row .ssub { font-size: 12.5px; color: var(--fg3); }
.src-row .recs { font-size: 12.5px; color: var(--fg3); text-align: right; }
.src-row .recs b { display: block; font-family: var(--font-headline); color: var(--fg1); font-size: 14px; }

/* ---------------- Settings ---------------- */
.set-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.set-card { padding: 20px 22px; }
.set-card h3 { font-family: var(--font-headline); font-weight: 700; color: var(--fg1); font-size: 16px;
  display: flex; align-items: center; gap: 9px; margin-bottom: 4px; }
.set-card h3 svg { width: 17px; height: 17px; color: var(--fg3); }
.set-card .sc-sub { font-size: 13px; color: var(--fg3); margin-bottom: 16px; }
.kv { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-top: 1px solid var(--border); }
.kv:first-of-type { border-top: none; }
.kv .k { font-size: 13px; color: var(--fg3); }
.kv .v { font-size: 13.5px; color: var(--fg1); font-weight: 500; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-btn); overflow: hidden; }
.seg button { padding: 7px 14px; font-size: 13px; font-weight: 500; color: var(--fg2); }
.seg button.on { background: var(--color-navy); color: #fff; }
.soon-list { display: flex; flex-direction: column; gap: 2px; }
.soon-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); color: var(--fg3); }
.soon-item:first-child { border-top: none; }
.soon-item svg { width: 17px; height: 17px; }
.soon-item .si-t { font-size: 14px; color: var(--fg2); font-weight: 500; }
.soon-item .si-d { font-size: 12px; }
.soon-item .pill { margin-left: auto; }

/* ---------------- Work-folder picker dropdown ---------------- */
.ctx-wrap { position: relative; }
.ctx-menu { position: absolute; top: 46px; left: 0; width: 320px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-hover);
  padding: 8px; z-index: 90; }
.ctx-menu[hidden] { display: none; }
.ctx-group { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--fg3); padding: 8px 10px 4px; }
.ctx-opt { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 8px;
  font-size: 13.5px; color: var(--fg2); width: 100%; text-align: left; }
.ctx-opt:hover { background: #faf9f7; }
.ctx-opt svg { width: 16px; height: 16px; color: var(--fg3); flex: none; }
.ctx-opt .sl { color: var(--color-amber); font-weight: 700; }
.ctx-opt .on { margin-left: auto; color: var(--color-amber); }
.ctx-opt .on svg { color: var(--color-amber); }
.ctx-opt .oc { font-size: 11px; color: var(--fg3); margin-left: auto; }
.ctx-opt.add { color: var(--fg1); font-weight: 600; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 12px; border-radius: 0 0 8px 8px; }
.ctx-opt.add svg { color: var(--color-navy); }

/* ---------------- Inbox: Gmail-style, no rail, single full-width pane ----------------
   Root-cause fix baked in below: .maillist and .reader both set an explicit
   `display: flex` (needed for their own layout). Author CSS beats the
   browser's built-in `[hidden] { display: none }` on a specificity tie, so
   without the `[hidden]` overrides a few lines down, toggling the `hidden`
   attribute from app.js did nothing visually — list and reader rendered
   stacked on top of each other. That was the "unreadable inbox" bug. */
.inbox-view { display: flex; flex-direction: column; height: 100%; padding: 16px 28px 22px; min-height: 0; }
.inbox-view .inbox-label { display: block; margin-bottom: 10px; }

/* Persistent top bar: account switch, compose, category tabs, folder
   dropdown. Never hidden while browsing — opening a mail swaps out only the
   list/reader content beneath it, so this row stays put as your anchor. */
.mail-toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; flex: none; margin-bottom: 14px; }

.compose { display: inline-flex; align-items: center; justify-content: center; gap: 9px; background: var(--color-navy);
  color: #fff; font-weight: 600; font-size: 13.5px; padding: 9px 15px; border-radius: var(--radius-btn); flex: none; }
.compose:hover { background: var(--color-navy-lift); }
.compose svg { width: 16px; height: 16px; }

/* Gmail-style category tabs — also the way back into the inbox once a
   dropdown folder (Verzonden, Archief, …) is active: clicking any tab
   resets the "Meer ▾" dropdown to its default state. */
.mail-tabs { display: flex; align-items: center; gap: 6px; flex: none; }
.mtab { padding: 8px 15px; border-radius: 20px; font-size: 13px; font-weight: 600; color: var(--fg3);
  border: 1px solid transparent; }
.mtab:hover { background: rgba(28,35,64,.05); color: var(--fg2); }
.mtab.active { background: var(--color-navy); color: #fff; }

/* "Meer ▾" folder/label dropdown — replaces the old left rail entirely.
   Reuses the app's .ctx-menu/.ctx-opt dropdown chrome (same shell as the
   werkmap picker in the top bar). Doubles as the active-folder indicator:
   shows the folder/label name plus a clear "×" once selected, "Meer"
   while an inbox category tab is active instead. */
.mail-folder-wrap { margin-left: auto; flex: none; }
.mail-folder-btn { margin-left: 0; }
.mail-folder-btn.active { background: var(--color-amber-tint); border-color: var(--color-amber); color: var(--fg1); }
.mail-folder-clear { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px;
  border-radius: 50%; color: var(--fg3); margin-left: 1px; }
.mail-folder-clear:hover { background: rgba(28,35,64,.1); color: var(--fg1); }
.mail-folder-clear svg { width: 11px; height: 11px; }
.mail-folder-menu { left: auto; right: 0; width: 280px; max-height: 70vh; overflow-y: auto; }
.mail-folder-menu .ctx-opt.active { background: var(--color-amber-tint); color: var(--fg1); }
.mail-folder-menu .fdot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.mail-folder-menu .oc { font-weight: 600; }
.fold-sep { height: 1px; background: var(--border); margin: 8px 4px; }
.label-fold { font-size: 13px; }

.needs-reply-meta { display: flex; align-items: center; gap: 10px; flex: none; font-size: 12px; color: var(--fg3); margin-bottom: 10px; }
.needs-reply-meta .nr-refresh { font-weight: 600; color: var(--color-navy); border-bottom: 1px solid transparent; }
.needs-reply-meta .nr-refresh:hover { border-bottom-color: var(--color-navy); }
.needs-reply-meta .nr-refresh:disabled { color: var(--fg3); cursor: default; }

/* List and reader occupy the same full-width area below the top bar — only
   one is ever visible at a time (toggled via the `hidden` attribute). */
.maillist { display: flex; flex-direction: column; overflow: hidden; flex: 1; min-height: 0; }
.maillist[hidden] { display: none; }
.maillist-scroll { overflow-y: auto; }
.mailrow { display: grid; grid-template-columns: 36px 1fr; gap: 14px; padding: 12px 18px;
  border-bottom: 1px solid var(--border); cursor: pointer; position: relative; }
.mailrow:hover { background: #faf9f7; }
.mailrow.active { background: var(--color-amber-tint); }
.mailrow.active::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--color-amber); }
.mailrow.unread .from { font-weight: 700; }
.mailrow .av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-family: var(--font-headline); font-size: 14px; background: #ecebe7; color: var(--fg2); }
.mailrow .l1 { display: flex; align-items: baseline; gap: 8px; }
.mailrow .from { font-weight: 600; color: var(--fg1); font-size: 14px; min-width: 160px; }
.mailrow .time { margin-left: auto; font-size: 12px; color: var(--fg3); white-space: nowrap; }
.mailrow .subj { font-size: 13.5px; color: var(--fg2); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mailrow .subj .snippet { color: var(--fg3); }
.mailrow .tags { margin-top: 6px; display: flex; gap: 6px; }

.reader { display: flex; flex-direction: column; overflow: hidden; flex: 1; min-height: 0; }
.reader[hidden] { display: none; }
.reader-tools { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.tool-btn { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: var(--radius-btn);
  font-size: 13px; font-weight: 500; color: var(--fg2); border: 1px solid transparent; }
.tool-btn:hover { background: rgba(28,35,64,.05); }
.tool-btn svg { width: 16px; height: 16px; }
.tool-btn.back { font-weight: 600; color: var(--fg1); border-right: 1px solid var(--border); border-radius: 0;
  padding-right: 14px; margin-right: 4px; }
.reader-tools .sp { margin-left: auto; }
.reader-body { overflow-y: auto; padding: 22px 28px; flex: 1; }
.reader-subj { font-family: var(--font-headline); font-weight: 700; color: var(--fg1); font-size: 21px;
  letter-spacing: -.01em; margin-bottom: 16px; }
.reader-from { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; width: 100%; text-align: left; background: none; border: none; }
.reader-from .av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-family: var(--font-headline); font-size: 16px; background: #ecebe7; color: var(--fg2); }
.reader-from-txt { min-width: 0; }
.reader-from .nm { font-weight: 600; color: var(--fg1); font-size: 14px; }
/* Expanded messages show name + email; collapsed ones swap the email for a
   one-line snippet — both are always in the DOM, CSS just picks which one
   shows, so a click-to-expand (a pure class toggle) swaps them live. */
.reader-from .em { font-size: 12.5px; color: var(--fg3); display: none; }
.reader-from .collapsed-snippet { display: none; font-size: 12.5px; color: var(--fg3); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 420px; }
.reader-from .time { margin-left: auto; font-size: 12px; color: var(--fg3); }
.reader-text { font-size: 14.5px; line-height: 1.75; color: var(--fg2); }
.reader-text p { margin-bottom: 12px; }

/* Sandboxed HTML mail body: no scripts (no allow-scripts token), links open
   in a new tab via the injected <base target="_blank">, height is measured
   and applied on load so the frame never scrolls internally. */
.mail-html-frame { width: 100%; border: none; min-height: 120px; display: block; }

.mail-attachments { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.mail-attachments .file-chip { text-decoration: none; }
.mail-attachments .file-chip:hover { border-color: #cfceca; background: #faf9f7; }

.reader-reply { flex: none; border-top: 1px solid var(--border); background: #faf9f7; padding: 14px 18px 16px; }
.reply-composer { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); }
.reply-tab { display: flex; align-items: center; gap: 8px; padding: 10px 14px 8px; }

/* Antwoord / Allen beantwoorden + editable recipient rows */
.reply-mode { display: inline-flex; gap: 2px; background: rgba(28,35,64,.06); border-radius: 8px; padding: 2px; }
.reply-mode .rmode { font-size: 11.5px; font-weight: 600; color: var(--fg3); padding: 3px 10px; border-radius: 6px; }
.reply-mode .rmode.on { background: var(--surface); color: var(--fg1); box-shadow: var(--shadow-card); }
.reply-recipients { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 0 14px 6px; }
.reply-recipients .rr-row { display: flex; align-items: center; gap: 8px; flex: 1 1 100%; }
.reply-recipients .rr-row span { font-size: 11.5px; font-weight: 600; color: var(--fg3); width: 28px; flex: none; }
.reply-recipients .rr-row input { flex: 1; border: none; outline: none; background: transparent;
  font-size: 13px; color: var(--fg1); padding: 4px 0; border-bottom: 1px solid var(--border); }
.reply-recipients .rr-row input:focus { border-bottom-color: var(--color-amber); }
.reply-recipients .rr-ccbcc { font-size: 11.5px; font-weight: 600; color: var(--fg3); padding: 2px 6px; border-radius: 6px; }
.reply-recipients .rr-ccbcc:hover { background: rgba(28,35,64,.06); color: var(--fg1); }
.ccbcc-toggle { align-self: flex-start; font-size: 12px; font-weight: 600; color: var(--fg3);
  padding: 2px 6px; border-radius: 6px; margin: -6px 0 2px; }
.ccbcc-toggle:hover { background: rgba(28,35,64,.06); color: var(--fg1); }
.ccbcc-toggle[hidden] { display: none; }
.field[hidden] { display: none; }
.reply-recipients .rr-row[hidden] { display: none; }
.draft-label { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: var(--color-amber); display: inline-flex; align-items: center; gap: 7px; }
.draft-label .sl { font-weight: 700; }
.reply-composer textarea { width: 100%; min-height: 160px; max-height: 50vh; overflow-y: auto;
  border: none; outline: none; resize: vertical;
  font-family: var(--font-body); font-size: 14px; line-height: 1.7; color: var(--fg1); background: transparent;
  padding: 4px 14px 8px; }
.reply-scope-note { font-size: 12.5px; color: #c0492f; background: #fbe9e6; border-radius: var(--radius-btn);
  padding: 8px 12px; margin: 0 14px 8px; }
.reply-scope-note[hidden] { display: none; }
.reply-actions { display: flex; align-items: center; gap: 10px; padding: 8px 12px 12px; flex-wrap: wrap; }
.reply-actions .discard { color: #c0492f; }
.reply-actions .discard:hover { border-color: #f0c4b8; background: #fbe9e6; }
.reply-actions .safe { margin-left: auto; font-size: 11.5px; color: var(--fg3); display: inline-flex; align-items: center; gap: 6px; }
.reply-actions .safe svg { width: 13px; height: 13px; }

/* ---------------- Agenda: 7-day week grid ----------------
   Root-cause fix for the header/all-day/body misalignment: previously
   .cal-body scrolled on its own (overflow-y here) while .cal-head and
   .cal-allday-row were separate non-scrolling grids sized against the full
   container width. A scrollbar eats width from whichever element owns the
   scroll, so .cal-body's repeat(7,1fr) columns ended up narrower than
   .cal-head's identical repeat(7,1fr) columns by (scrollbar width / 7) px
   each. Now only .cal-scroll scrolls; .cal-head/.cal-allday-row/.cal-body
   are plain sibling grids inside it (never individually scrolling), so all
   three always compute their column widths against the exact same
   available width. The header and all-day row use position: sticky to
   stay pinned while the hour body scrolls underneath. scrollbar-gutter:
   stable reserves the scrollbar's width up front so nothing shifts when a
   week/month with more rows suddenly needs to scroll. */
.cal { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-card); }
.cal-scroll { max-height: calc(100vh - 300px); overflow-y: auto; scrollbar-gutter: stable; }
.cal-head { display: grid; grid-template-columns: 54px repeat(7, 1fr); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 3; background: var(--surface); }
.cal-head .ch { padding: 10px 6px; text-align: center; border-left: 1px solid var(--border); }
.cal-head .ch:first-child { border-left: none; }
.cal-head .ch .dn { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--fg3); }
.cal-head .ch .dd { font-family: var(--font-headline); font-weight: 700; color: var(--fg1); font-size: 19px; margin-top: 2px; }
.cal-head .ch.today .dd { color: var(--color-navy); background: var(--color-amber); border-radius: 8px; display: inline-block; min-width: 30px; padding: 0 6px; }
.cal-body { display: grid; grid-template-columns: 54px repeat(7, 1fr); }
.cal-times { display: flex; flex-direction: column; }
.cal-times .h { height: 46px; font-size: 11px; color: var(--fg3); text-align: right; padding: 0 8px; transform: translateY(-6px); }
.cal-col { position: relative; border-left: 1px solid var(--border); cursor: pointer; }
.cal-col .hr { height: 46px; border-bottom: 1px solid #f4f3f0; }
.cal-col.today { background: #fefbf4; }
.cal-ev { position: absolute; left: 4px; right: 4px; border-radius: 6px; padding: 4px 7px; overflow: hidden;
  font-size: 11px; line-height: 1.3; border-left: 3px solid; cursor: pointer; }
.cal-ev .evt { font-weight: 600; color: var(--fg1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev .evtm { color: var(--fg3); font-size: 10px; }

/* legacy today+week (kept for reference, unused) */
.agenda-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; }
.agenda-panel { padding: 20px 22px; }
.agenda-panel h3 { font-family: var(--font-headline); font-weight: 700; color: var(--fg1); font-size: 16px;
  display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.agenda-panel .sub { font-size: 12.5px; color: var(--fg3); margin-bottom: 16px; }
.ev { display: grid; grid-template-columns: 62px 1fr; gap: 14px; padding: 12px 0; border-top: 1px solid var(--border); }
.ev:first-of-type { border-top: none; }
.ev .etime { font-size: 12.5px; color: var(--fg3); font-weight: 600; padding-top: 2px; }
.ev .ebody { border-left: 3px solid var(--color-border); padding-left: 14px; }
.ev.now .ebody { border-left-color: var(--color-amber); }
.ev.mtg .ebody { border-left-color: var(--color-navy); }
.ev .et { font-weight: 600; color: var(--fg1); font-size: 14px; }
.ev .es { font-size: 12.5px; color: var(--fg3); margin-top: 2px; }
.ev .tag-now { font-size: 10.5px; font-weight: 700; color: #a8730c; background: var(--color-amber-tint);
  border-radius: 5px; padding: 1px 7px; margin-left: 8px; }
.day-block { padding: 12px 0; border-top: 1px solid var(--border); }
.day-block:first-of-type { border-top: none; }
.day-block .dl { font-size: 12px; font-weight: 700; color: var(--fg1); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.day-block .di { font-size: 13px; color: var(--fg2); padding: 4px 0; display: flex; gap: 10px; }
.day-block .di .dt { color: var(--fg3); font-variant-numeric: tabular-nums; min-width: 42px; }

/* ---------------- Taken / Kanban ---------------- */
/* No H1 on this view (the amber "/ Taken" section label already names it):
   tighten the head so the toolbar and board sit higher on the page. */
.view[data-view="taken"] .view-head { margin-bottom: 12px; }
.task-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
/* Column count is dynamic (his real Todoist sections, plus one "no section"
   column per project); auto-fit so it never squeezes columns unreadably
   narrow, and wraps to fewer per row instead. */
.kanban { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.kcol { background: #ebeae6; border-radius: var(--radius-lg); padding: 12px; }
.kcol-head { display: flex; align-items: center; gap: 8px; padding: 4px 8px 12px; font-family: var(--font-headline);
  font-weight: 700; color: var(--fg1); font-size: 14.5px; }
.kcol-head .kc { font-size: 11px; font-weight: 700; color: var(--fg3); background: rgba(28,35,64,.07);
  border-radius: 20px; padding: 1px 8px; }
.task { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--shadow-card); }
.task:last-child { margin-bottom: 0; }
.task .tt { font-weight: 600; color: var(--fg1); font-size: 13.5px; line-height: 1.4; }
.task .tmeta { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.task-tag { font-size: 11px; font-weight: 600; border-radius: 5px; padding: 2px 7px; }
.task-tag.p1 { background: #fbe9e6; color: #c0492f; }
.task-tag.p2 { background: var(--color-amber-tint); color: #a8730c; }
.task .tdue { font-size: 11.5px; color: var(--fg3); display: inline-flex; align-items: center; gap: 5px; }
.task .tdue svg { width: 12px; height: 12px; }
.task.done .tt { color: var(--fg3); text-decoration: line-through; }
.task[draggable] { cursor: grab; }
.task.dragging { opacity: .35; }
.kcol.drop-target { outline: 2px dashed var(--color-amber); outline-offset: -2px; background: #f2efe8; }
.ktasks-empty { font-size: 12.5px; color: var(--fg3); opacity: .7; text-align: center; padding: 10px 4px; }

/* Meetings (tl;dv) */
.meet-list { display: flex; flex-direction: column; gap: 8px; }
.meet-row { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 14px 16px; box-shadow: var(--shadow-card); }
.meet-row:hover { border-color: #cfceca; }
.meet-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: none;
  border-radius: 9px; background: var(--color-amber-tint); color: #a8730c; }
.meet-icon svg { width: 18px; height: 18px; }
.meet-main { min-width: 0; flex: 1; }
.meet-name { font-weight: 600; color: var(--fg1); font-size: 14px; }
.meet-sub { font-size: 12.5px; color: var(--fg3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meet-chev { width: 16px; height: 16px; color: var(--fg3); flex: none; }
.meet-back { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--fg3);
  padding: 4px 8px 4px 4px; border-radius: 7px; margin-bottom: 12px; }
.meet-back:hover { background: rgba(28,35,64,.06); color: var(--fg1); }
.meet-back svg { width: 15px; height: 15px; }
.meet-detail-head h2 { font-family: var(--font-headline); font-weight: 700; color: var(--fg1); font-size: 21px; }
.meet-detail-sub { font-size: 13px; color: var(--fg3); margin-top: 4px; }
.meet-detail-sub a { color: #a8730c; }
.meet-tabs { display: inline-flex; margin: 16px 0; }
.meet-pane { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px 24px; }
.meet-notes { font-size: 14px; line-height: 1.7; color: var(--fg2); }
.meet-notes h2 { font-size: 16px; color: var(--fg1); margin: 16px 0 8px; }
.meet-notes ul { margin: 8px 0 8px 18px; }
.meet-notes li { margin-bottom: 4px; }
.meet-transcript { display: flex; flex-direction: column; gap: 14px; max-height: 60vh; overflow-y: auto; }
.tr-seg { font-size: 13.5px; }
.tr-meta { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.tr-speaker { font-weight: 600; color: var(--fg1); font-size: 12.5px; }
.tr-time { font-size: 11px; color: var(--fg3); }
.tr-text { color: var(--fg2); line-height: 1.6; }

/* Pipeline (Brevo deals) — reuses .kanban/.kcol/.task; these are the extras. */
.pipeline-name { font-family: var(--font-headline); font-weight: 700; color: var(--fg1); font-size: 15px; }
.kcol-head .kc-amount { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--fg3); }
.task.deal { cursor: pointer; }
.task.deal .deal-amount { font-size: 12.5px; font-weight: 700; color: var(--color-navy, var(--fg1)); }
.task.deal .deal-contacts { font-size: 11.5px; color: var(--fg3); display: inline-flex; align-items: center; gap: 4px; }
.task.deal .deal-contacts svg { width: 12px; height: 12px; }
#dealDeleteBtn.confirming { border-color: #c0492f; background: #fbe9e6; }
#dealForm select { width: 100%; font: inherit; color: var(--fg1); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
.deal-contact { display: inline-flex; align-items: center; gap: 8px; background: var(--color-amber-tint);
  border-radius: 8px; padding: 5px 6px 5px 10px; font-size: 13px; color: var(--fg1); }
.deal-contact-clear { display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center;
  border-radius: 5px; color: var(--fg3); }
.deal-contact-clear:hover { background: rgba(28,35,64,.1); color: var(--fg1); }
.deal-contact-clear svg { width: 12px; height: 12px; }
.deal-contact-results { border: 1px solid var(--border); border-radius: 8px; margin-top: 4px; overflow: hidden; }
.deal-contact-results[hidden] { display: none; }
.deal-contact-opt { display: flex; align-items: baseline; gap: 8px; width: 100%; text-align: left;
  padding: 8px 10px; font-size: 13px; }
.deal-contact-opt:hover { background: #faf9f7; }
.deal-contact-opt .dc-name { font-weight: 600; color: var(--fg1); }
.deal-contact-opt .dc-co { font-size: 11.5px; color: var(--fg3); }
.deal-newcontact { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.deal-newcontact[hidden] { display: none; }
.deal-newcontact input { flex: 1; font: inherit; color: var(--fg1); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
.kadd { display: flex; align-items: center; gap: 8px; padding: 9px 10px; font-size: 13px; color: var(--fg3); border-radius: 8px; }
.kadd:hover { background: rgba(28,35,64,.04); }
.kadd svg { width: 15px; height: 15px; }

/* ---------------- Mogelijkheden (skills + commands catalog) ---------------- */
.cap-search { display: flex; align-items: center; gap: 10px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-btn); padding: 11px 15px; margin-bottom: 24px; max-width: 460px; }
.cap-search svg { width: 17px; height: 17px; color: var(--fg3); }
.cap-search input { border: none; outline: none; font-family: var(--font-body); font-size: 14px;
  color: var(--fg1); background: transparent; width: 100%; }
.cap-block { margin-bottom: 30px; }
.cap-block > .t-section-label { margin-bottom: 4px; }
.cap-block .bh { font-family: var(--font-headline); font-weight: 700; color: var(--fg1); font-size: 18px; margin: 4px 0 16px; }
.cap-block .bh .ct { font-size: 13px; font-weight: 400; color: var(--fg3); font-family: var(--font-body); }
.cap-sub { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--fg3); margin: 18px 0 10px; }
.cap-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.cap { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 13px 15px; transition: border-color var(--dur-fast), box-shadow var(--dur-fast), transform var(--dur-fast); }
.cap:hover { border-color: #cfceca; box-shadow: var(--shadow-card); transform: translateY(-1px); }
.cap .ci { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: var(--color-amber-tint); color: #b9800f; }
.cap.cmd .ci { background: #eef0f6; color: #4a5478; }
.cap .ci svg { width: 17px; height: 17px; }
.cap .cn { font-weight: 600; color: var(--fg1); font-size: 14px; }
.cap .cn .mono { font-family: var(--font-mono); font-size: 13px; color: var(--color-navy); }
.cap .cd { font-size: 12.5px; color: var(--fg2); line-height: 1.5; margin-top: 3px; }

@media (max-width: 1180px) {
  .kanban { grid-template-columns: 1fr; }
  .cap-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1080px) {
  .metric-grid { grid-template-columns: repeat(2,1fr); }
  .panel-row, .mod-grid, .set-grid, .agenda-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   LIVE WIRING — additions on top of the mockup for the real app
   (login, empty/error states, chat activity, mic, conv panel,
   calendar nav, kanban quick-add, powers filtering, markdown)
   ============================================================ */

/* ---------------- Login overlay ---------------- */
.login-overlay {
  position: fixed; inset: 0; z-index: 1000; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.login-overlay[hidden] { display: none; }
.login-card {
  width: 100%; max-width: 360px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-hover); padding: 36px 32px 30px;
  text-align: center;
}
.login-logo { height: 34px; width: auto; margin: 0 auto 26px; object-fit: contain; }
.login-card form { display: flex; flex-direction: column; gap: 12px; }
.login-input {
  width: 100%; font-family: var(--font-body); font-size: 14.5px; color: var(--fg1);
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-btn);
  padding: 11px 14px; outline: none; transition: border-color var(--dur-fast) var(--ease);
}
.login-input:focus { border-color: var(--color-amber); }
.login-btn { justify-content: center; width: 100%; }
.login-error {
  font-size: 12.5px; color: #c0492f; background: #fbe9e6; border-radius: var(--radius-btn);
  padding: 8px 12px; text-align: left;
}
.login-error[hidden] { display: none; }

/* ---------------- Generic empty / error states ---------------- */
.state-empty, .state-error {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 8px; padding: 40px 24px; color: var(--fg3); font-size: 13.5px;
}
.state-empty svg, .state-error svg { width: 26px; height: 26px; color: var(--fg3); opacity: .7; margin-bottom: 4px; }
.state-empty .st-title, .state-error .st-title { font-weight: 600; color: var(--fg2); font-size: 14.5px; }
.state-error { color: #c0492f; }
.state-error .st-title { color: #c0492f; }
.inline-error {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #c0492f;
  background: #fbe9e6; border-radius: var(--radius-btn); padding: 8px 12px; margin: 10px 0;
}
.inline-error svg { width: 14px; height: 14px; flex: none; }

/* ---------------- Chat: recent conversations + activity + markdown ---------------- */
.chat-topbar { display: flex; align-items: center; gap: 8px; max-width: 760px; margin: 0 auto; padding: 12px 24px 0; }
.chat-topbar .spacer { margin-left: auto; }

/* Chat tabs (meerdere gesprekken tegelijk, Cursor-stijl) */
.chat-tabs { display: flex; align-items: center; gap: 6px; max-width: 760px; margin: 0 auto;
  padding: 10px 24px 0; width: 100%; overflow-x: auto; scrollbar-width: thin; }
.chat-tab { display: inline-flex; align-items: center; gap: 7px; padding: 6px 8px 6px 12px;
  border: 1px solid var(--border); border-radius: 9px 9px 0 0; border-bottom: none;
  background: transparent; font-size: 12.5px; font-weight: 500; color: var(--fg3);
  cursor: pointer; max-width: 200px; flex: none; user-select: none; }
.chat-tab .tab-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-tab.on { background: var(--surface); color: var(--fg1); font-weight: 600; box-shadow: var(--shadow-card); }
.chat-tab:hover:not(.on) { background: #faf9f7; }
.chat-tab .tab-close { display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 5px; color: var(--fg3); flex: none; }
.chat-tab .tab-close:hover { background: rgba(28,35,64,.08); color: var(--fg1); }
.chat-tab .tab-close svg { width: 12px; height: 12px; }
.chat-tab .tab-spin { display: none; width: 8px; height: 8px; border-radius: 50%; background: var(--color-amber);
  flex: none; animation: tabPulse 1.1s ease-in-out infinite; }
.chat-tab.busy .tab-spin { display: inline-block; }
@keyframes tabPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.75); } }
.chat-tab .tab-rename { font: inherit; font-weight: 600; color: var(--fg1); background: transparent;
  border: none; outline: none; border-bottom: 1.5px solid var(--color-amber); width: 130px; padding: 0; }
.tab-add { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px;
  border-radius: 8px; color: var(--fg3); flex: none; }
.tab-add:hover { background: rgba(28,35,64,.06); color: var(--fg1); }
.tab-add svg { width: 15px; height: 15px; }
.chat-inner.pane[hidden] { display: none; }
.conv-panel {
  position: absolute; top: 96px; left: 50%; transform: translateX(-50%); width: 420px; max-width: calc(100% - 48px);
  max-height: 60vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-hover); z-index: 80; padding: 8px;
}
.conv-panel[hidden] { display: none; }
.conv-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px; width: 100%; text-align: left; cursor: pointer; }
.conv-item:hover { background: #faf9f7; }
.conv-item .conv-main { min-width: 0; }
.conv-item .cn { font-size: 13.5px; font-weight: 600; color: var(--fg1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-item .cm { font-size: 11.5px; color: var(--fg3); margin-top: 1px; }
.conv-item .cc { font-size: 11px; color: var(--fg3); white-space: nowrap; }
.conv-item .conv-rename { display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 6px; color: var(--fg3); margin-left: auto; flex: none;
  opacity: 0; transition: opacity var(--dur); }
.conv-item:hover .conv-rename { opacity: 1; }
.conv-item .conv-rename:hover { background: rgba(28,35,64,.08); color: var(--fg1); }
.conv-item .conv-rename svg { width: 13px; height: 13px; }
.conv-rename-input { font-size: 13.5px; font-weight: 600; color: var(--fg1); background: transparent;
  border: none; outline: none; border-bottom: 1.5px solid var(--color-amber); width: 100%; padding: 0; }

.msg.ai .activity { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--fg3);
  margin-bottom: 8px; }
.msg.ai .activity .aico { width: 13px; height: 13px; border: 2px solid var(--border); border-top-color: var(--color-amber);
  border-radius: 50%; animation: spin .7s linear infinite; flex: none; }
.msg.ai .activity.done .aico { border: none; width: auto; height: auto; animation: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.msg.ai .body .md-h { font-family: var(--font-headline); font-weight: 700; color: var(--fg1); font-size: 16px; margin: 12px 0 6px; }
.msg.ai .body .md-list { margin: 4px 0 10px 20px; }
.msg.ai .body .md-list li { margin-bottom: 4px; }
.msg.ai .body .md-inline-code { font-family: var(--font-mono); font-size: 13px; background: #f4f3f0;
  border-radius: 4px; padding: 1px 5px; }
.msg.ai .body .md-code { font-family: var(--font-mono); font-size: 12.5px; background: #1C2340; color: #eef0f6;
  border-radius: var(--radius-md); padding: 12px 14px; overflow-x: auto; margin: 8px 0 10px; line-height: 1.5; }
.msg.ai .body a { color: var(--color-navy); text-decoration: underline; text-underline-offset: 2px; }
.msg.error .bubble { background: #fbe9e6; color: #c0492f; border-radius: 14px; padding: 12px 16px; font-size: 13.5px; }

/* mic recording state */
.mic.recording { background: #fbe9e6; border-color: #c0492f; color: #c0492f; animation: mic-pulse 1.4s ease-in-out infinite; }
@keyframes mic-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(192,73,47,.28); } 50% { box-shadow: 0 0 0 6px rgba(192,73,47,0); } }
.chip[disabled], .mic[disabled], .send[disabled] { opacity: .5; cursor: not-allowed; }
.folder-chip-label { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- Agenda: toolbar, nav + all-day chips ---------------- */
.agenda-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.agenda-toolbar .btn-primary { margin-left: auto; }
.seg button[disabled] { opacity: .45; cursor: not-allowed; }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-nav button { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500;
  color: var(--fg2); border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-btn);
  padding: 6px 12px; }
.cal-nav button:hover { border-color: #cfceca; }
.cal-allday-row { display: grid; grid-template-columns: 54px repeat(7, 1fr); border-bottom: 1px solid var(--border);
  position: sticky; z-index: 2; background: var(--surface); }
.cal-allday-row[hidden] { display: none; }
.cal-allday-row .aca { padding: 6px; border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; }
.cal-allday-row .aca:first-child { border-left: none; }
.cal-allday-chip { font-size: 10.5px; font-weight: 600; border-radius: 5px; padding: 3px 6px; border-left: 3px solid;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; color: var(--fg1); }

/* ---------------- Taken: quick add + optimistic remove ---------------- */
.kadd-form { display: flex; gap: 6px; padding: 2px 0 10px; }
.kadd-form input { flex: 1; min-width: 0; font-family: var(--font-body); font-size: 13px; color: var(--fg1);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-btn); padding: 8px 10px; outline: none; }
.kadd-form input:focus { border-color: var(--color-amber); }
.kadd-form button { font-size: 12.5px; font-weight: 600; color: #fff; background: var(--color-navy);
  border-radius: var(--radius-btn); padding: 0 12px; }
.task-check { width: 17px; height: 17px; border-radius: 5px; border: 1.5px solid var(--border); flex: none;
  display: inline-flex; align-items: center; justify-content: center; margin-right: 8px; color: transparent; }
.task-check:hover { border-color: var(--color-amber); }
.task-head { display: flex; align-items: flex-start; }
.task.removing { opacity: 0; transform: translateY(-4px); transition: opacity var(--dur), transform var(--dur); }

/* ---------------- Powers: filtered-out items ---------------- */
.cap.hide, .mod.hide, .src-row.hide { display: none; }

/* ---------------- Inbox: suggest button + connect states ---------------- */
.suggest-btn { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600;
  color: #a8730c; background: var(--color-amber-tint); border-radius: var(--radius-btn); padding: 7px 12px; margin-bottom: 10px; }
.suggest-btn svg { width: 14px; height: 14px; }
.suggest-btn[disabled] { opacity: .6; cursor: default; }

/* chip dropdown menu (model / effort pickers in the composer) */
.chip-menu { position: absolute; bottom: 46px; min-width: 190px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-hover);
  padding: 6px; z-index: 95; }

/* ---------------- Agenda: month grid ---------------- */
/* Root cause of the wobbly column lines this replaces: the header and each
   week were separate grid instances (.cal-month-head, .cal-month-row × N),
   each independently resolving repeat(7, 1fr) tracks. Independent grids can
   round fractional pixel widths differently even at an identical container
   width, so vertical borders drifted a hair between week rows. Fix: a single
   .cal-month-grid holds the weekday header cells AND every day cell as flat
   children, so the 7 column tracks are computed once for the whole month —
   every row, header included, shares exact column geometry. First-column /
   last-row border suppression now comes from explicit .col-first / .row-last
   classes (set from the row/col index in JS) instead of :nth-child math,
   since the old math relied on the header being a separate row. */
.cal-month { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow-card); }
.cal-month-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-month-grid .mh { padding: 10px 6px; text-align: center; font-size: 11px; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase; color: var(--fg3); border-bottom: 1px solid var(--border); }
.cal-month-day { min-height: 108px; border-left: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 6px; cursor: pointer; transition: background var(--dur-fast); }
.cal-month-day:hover { background: #faf9f7; }
.cal-month-day.col-first { border-left: none; }
.cal-month-day.row-last { border-bottom: none; }
.cal-month-day.out { background: #faf9f7; }
.cal-month-day.out .mdn { color: var(--fg3); }
.cal-month-day .mdn { font-family: var(--font-headline); font-weight: 700; color: var(--fg1); font-size: 13.5px; margin-bottom: 4px; }
.cal-month-day.today .mdn { color: var(--color-navy); background: var(--color-amber); border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 5px; }
.mchips { display: flex; flex-direction: column; gap: 3px; }
.cal-month-chip { font-size: 10.5px; font-weight: 600; color: var(--fg1); border-radius: 5px; padding: 2px 6px;
  border-left: 3px solid; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.cal-month-chip .mt { color: var(--fg3); font-weight: 500; margin-right: 4px; }
.mchips-extra { display: flex; flex-direction: column; gap: 3px; margin-top: 3px; }
.mchips-extra[hidden] { display: none; }
.cal-month-more { text-align: left; font-size: 10.5px; font-weight: 600; color: var(--fg3); padding: 2px 4px; margin-top: 2px; }
.cal-month-more:hover { color: var(--fg1); text-decoration: underline; }

/* ---------------- Agenda: event modal (create/edit) ---------------- */
.modal-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(28,35,64,.32);
  display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-overlay[hidden] { display: none; }
.modal-card { width: 100%; max-width: 460px; max-height: calc(100vh - 48px); overflow-y: auto;
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-hover); }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 20px 22px 4px; }
.modal-head h3 { font-family: var(--font-headline); font-weight: 700; color: var(--fg1); font-size: 19px; letter-spacing: -.01em; }
.modal-close { margin-left: auto; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  color: var(--fg3); transition: background var(--dur-fast); flex: none; }
.modal-close:hover { background: rgba(28,35,64,.06); color: var(--fg1); }
.modal-close svg { width: 16px; height: 16px; }
.modal-body { display: flex; flex-direction: column; gap: 14px; padding: 14px 22px 22px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--fg3); flex: 1; }
.field input, .field textarea { font-family: var(--font-body); font-size: 14px; color: var(--fg1); font-weight: 400;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-btn); padding: 9px 12px; outline: none;
  resize: vertical; transition: border-color var(--dur-fast); }
.field input:focus, .field textarea:focus { border-color: var(--color-amber); }
.field-row { display: flex; gap: 14px; align-items: flex-end; }
.field-row .field { flex: 1; }
.check-field { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; color: var(--fg2); }
.check-field input { width: 16px; height: 16px; accent-color: var(--color-amber); }
#evTimeRow[hidden] { display: none; }
.modal-error { font-size: 12.5px; color: #c0492f; background: #fbe9e6; border-radius: var(--radius-btn); padding: 8px 12px; }
.modal-error[hidden] { display: none; }
.modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 4px; }

/* ---------------- Agenda: event detail popover ---------------- */
.ev-popover { position: fixed; z-index: 210; width: 320px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-hover); padding: 16px 18px; }
.ev-popover[hidden] { display: none; }
.evp-head { display: flex; align-items: center; gap: 10px; }
.evp-color { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.evp-head h4 { font-family: var(--font-headline); font-weight: 700; color: var(--fg1); font-size: 15.5px; line-height: 1.3; }
.evp-when { font-size: 12.5px; color: var(--fg3); margin: 8px 0 10px; }
.evp-row { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; color: var(--fg2); margin-bottom: 8px; }
.evp-row svg { width: 15px; height: 15px; color: var(--fg3); flex: none; margin-top: 1px; }
.evp-row a { color: var(--color-navy); text-decoration: underline; text-underline-offset: 2px; }
.evp-desc { font-size: 12.5px; color: var(--fg2); line-height: 1.5; background: #faf9f7; border-radius: var(--radius-btn);
  padding: 9px 11px; margin-bottom: 8px; white-space: pre-wrap; }
.evp-actions { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.btn-ghost.danger { color: #c0492f; }
.btn-ghost.danger:hover { border-color: #f0c4b8; background: #fbe9e6; }

/* ---------------- Inbox: threads ---------------- */
.thread-count { font-size: 10.5px; font-weight: 700; color: var(--fg3); background: rgba(28,35,64,.07);
  border-radius: 20px; padding: 0 6px; line-height: 15px; }
.mailrow.unread .thread-count { color: #a8730c; background: var(--color-amber-tint); }

.thread-messages { display: flex; flex-direction: column; gap: 4px; }
.thread-msg { border: 1px solid transparent; border-radius: var(--radius-md); }
.thread-msg.collapsed { border-color: var(--border); }
.thread-msg.collapsed .reader-from { cursor: pointer; }
.thread-msg.collapsed .reader-text { display: none; }
.thread-msg.collapsed .reader-from { margin-bottom: 0; padding: 10px 12px; }
.thread-msg.collapsed .reader-from .collapsed-snippet { display: block; }
.thread-msg.open { padding: 4px 2px 14px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.thread-msg.open:last-child { border-bottom: none; }
.thread-msg.open .reader-from .em { display: block; }
.thread-msg.collapsed:hover { background: #faf9f7; }
.thread-chevron { width: 14px; height: 14px; color: var(--fg3); flex: none; transition: transform var(--dur-fast); }
.thread-msg.open .thread-chevron { transform: rotate(180deg); }
.thread-msg.collapsed .thread-chevron { transform: rotate(0deg); }

/* inline connect-folder row in the werkmap dropdown */
.ctx-connect-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 10px 10px; }
.ctx-connect-row input { flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-btn);
  padding: 9px 11px; font-family: var(--font-body); font-size: 13px; color: var(--fg1); outline: none; }
.ctx-connect-row input:focus { border-color: #cfceca; }
.ctx-connect-row .btn { padding: 9px 14px; font-size: 13px; }

/* answer meta row + copy button */
.msg-meta { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.copy-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500;
  color: var(--fg3); border: 1px solid var(--border); border-radius: 6px; padding: 4px 9px;
  background: var(--surface); transition: color var(--dur-fast), border-color var(--dur-fast); }
.copy-btn:hover { color: var(--fg1); border-color: #cfceca; }
.copy-btn svg { width: 13px; height: 13px; }

/* right-align the numbers in the LinkedIn activity panel (4 / 19 alignment) */
.li-post .met { margin-left: auto; }
.li-post .met > div { text-align: right; min-width: 64px; }

/* collapsed reply state: give the thread the reading space */
.reply-collapsed { display: flex; gap: 10px; padding: 12px 4px; }
.reply-start-row, .reply-draft-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; width: 100%; }
.reply-start-row[hidden], .reply-draft-row[hidden] { display: none; }
.reply-draft-kept { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--fg3); }
.reply-draft-kept svg { width: 14px; height: 14px; color: var(--color-amber); }
.reply-composer .reply-tab { display: flex; align-items: center; justify-content: space-between; }
.reply-collapse-btn { color: var(--fg3); padding: 4px; border-radius: 6px; }
.reply-collapse-btn:hover { color: var(--fg1); background: rgba(28,35,64,.05); }
.reply-collapse-btn svg { width: 16px; height: 16px; }

/* point-and-click folder browser in the werkmap dropdown */
.ctx-browse { padding: 4px 6px 8px; }
.ctx-browse-head { display: flex; align-items: center; gap: 8px; padding: 6px 4px; }
.ctx-browse-up { color: var(--fg2); padding: 5px; border-radius: 6px; }
.ctx-browse-up:hover { background: rgba(28,35,64,.05); }
.ctx-browse-up:disabled { opacity: .3; cursor: default; }
.ctx-browse-up svg { width: 15px; height: 15px; }
.ctx-browse-path { font-family: var(--font-mono); font-size: 11.5px; color: var(--fg3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: rtl; text-align: left; }
.ctx-browse-list { max-height: 240px; overflow-y: auto; border: 1px solid var(--border);
  border-radius: var(--radius-btn); margin: 2px 0 8px; }
.ctx-browse-dir { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  padding: 8px 11px; font-size: 13px; color: var(--fg2); }
.ctx-browse-dir:hover { background: #faf9f7; color: var(--fg1); }
.ctx-browse-dir svg { width: 15px; height: 15px; color: var(--fg3); flex: none; }
.ctx-browse-foot { display: flex; gap: 8px; padding: 0 2px; }
.ctx-browse-foot .btn { padding: 8px 14px; font-size: 13px; }

/* folder rows: chevron on browse dirs, X on connected folders, pinned AIOS */
.ctx-browse-dir .dir-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctx-browse-dir .dir-chevron { width: 14px; height: 14px; color: var(--fg3); flex: none; }
.ctx-opt.folder-row { cursor: pointer; }
.folder-remove { margin-left: auto; padding: 4px; border-radius: 5px; color: var(--fg3); flex: none; }
.folder-remove:hover { color: #c0492f; background: rgba(192,73,47,.08); }
.folder-remove svg { width: 13px; height: 13px; }
.ctx-opt.folder-row .on { margin-left: 8px; }

/* ---------------- Taken: quick-add (title + date/recurrence + more options) ---------------- */
.kadd-form { display: flex; flex-direction: column; gap: 6px; padding: 2px 0 10px; }
.kadd-form input { width: 100%; font-family: var(--font-body); font-size: 13px; color: var(--fg1);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-btn);
  padding: 8px 10px; outline: none; transition: border-color var(--dur-fast); }
.kadd-form input:focus { border-color: var(--color-amber); }
.kadd-hint { font-size: 11px; color: var(--fg3); padding: 0 2px; }
.kadd-actions { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.kadd-actions .btn { padding: 7px 14px; font-size: 12.5px; }
.kadd-more { font-size: 12.5px; font-weight: 600; color: var(--fg3); padding: 4px 2px; }
.kadd-more:hover { color: var(--fg1); text-decoration: underline; }

/* .kadd now sits above .ktasks (top of column) instead of below it */
.kcol .kadd { margin-bottom: 6px; }

/* recurring glyph next to the due badge */
.trec { font-size: 12px; color: var(--fg3); margin-right: 1px; }

/* ---------------- Taken: task detail / create modal ---------------- */
.field-hint { font-size: 11px; color: var(--fg3); margin-top: -2px; }
.pseg button { flex: 1; }
.subtasks-field[hidden] { display: none; }
.subtask-list { display: flex; flex-direction: column; gap: 2px; }
.subtask-row { display: flex; align-items: center; padding: 6px 2px; }
.subtask-row .subtask-title { font-size: 13.5px; color: var(--fg1); font-weight: 500; }
.subtask-empty { padding: 4px 2px 2px; }
.subtask-add-row { display: flex; gap: 8px; margin-top: 6px; }
.subtask-add-row input { flex: 1; min-width: 0; font-family: var(--font-body); font-size: 13px; color: var(--fg1);
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-btn); padding: 8px 10px; outline: none;
  transition: border-color var(--dur-fast); }
.subtask-add-row input:focus { border-color: var(--color-amber); }
.subtask-add-row .btn { padding: 8px 14px; font-size: 12.5px; }
#taskDeleteBtn.confirming { border-color: #c0492f; background: #fbe9e6; }

/* collapsed completed-tasks list per kanban lane */
.kdone { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 6px; }
.kdone summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--fg3);
  padding: 6px 8px; border-radius: 6px; list-style: none; display: flex; align-items: center; gap: 8px; }
.kdone summary::before { content: '▸'; font-size: 10px; transition: transform var(--dur-fast) var(--ease); }
.kdone[open] summary::before { transform: rotate(90deg); }
.kdone summary:hover { background: rgba(28,35,64,.04); color: var(--fg1); }
.kdone-task { display: flex; align-items: center; gap: 8px; padding: 6px 8px; }
.kdone-name { flex: 1; font-size: 12.5px; color: var(--fg3); text-decoration: line-through;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kdone-restore { font-size: 11.5px; font-weight: 600; color: var(--fg2); border: 1px solid var(--border);
  border-radius: 6px; padding: 3px 9px; background: var(--surface); flex: none; }
.kdone-restore:hover { color: var(--fg1); border-color: #cfceca; }
