/* The daily desk uses the existing palette and controls, with one context at a time. */
.quarters-app[data-current-view="today"] .detail-rail { display:none; }
.quarters-app[data-current-view="today"] { grid-template-columns:var(--sidebar-width, 220px) minmax(0,1fr); }
.quarters-app[data-current-view="today"][data-sidebar-collapsed="true"] { grid-template-columns:64px minmax(0,1fr); }
.quarters-app[data-current-view="today"] .view-pane { padding:0; overflow:hidden; }
/* The overview scrolls as a page; the conversation desk owns its inner scrollers. */
.quarters-app[data-current-view="today"] .view-pane:has(> [data-dashboard]) { overflow-y:auto; }
.desk { display:grid; grid-template-columns:minmax(230px, .85fr) minmax(330px,1.6fr) minmax(220px,.75fr); height:100%; min-height:0; color:var(--ink, #211f1a); background:var(--paper,#faf9f5); }
.desk:has(.desk-welcome) { grid-template-columns:minmax(240px,.85fr) minmax(0,2.35fr); }
.desk button,.desk input,.desk select,.desk textarea { font:inherit; }
.desk button { cursor:pointer; }
.desk button:disabled { cursor:wait; opacity:.6; }
.desk :focus-visible { outline:2px solid var(--vermillion,#48623d); outline-offset:3px; }
.desk-queue,.desk-context { padding:22px 18px; overflow:auto; min-height:0; }
.desk-queue { border-right:1px solid var(--line,#dedbd3); display:flex; flex-direction:column; }
.desk h2 { font-family:Newsreader,Georgia,serif; font-size:26px; font-weight:500; line-height:1.15; margin:8px 0; }
.desk p { font-size:13px; line-height:1.6; color:var(--muted,#716e64); }
.desk-eyebrow { font-size:10px; text-transform:uppercase; letter-spacing:.12em; color:var(--muted,#716e64); }
.desk-tabs { display:flex; border-bottom:1px solid var(--line,#dedbd3); margin:14px 0; gap:12px; }
.desk-tabs button { background:transparent; border:0; border-bottom:2px solid transparent; padding:8px 0; font-size:12px; color:inherit; }
.desk-tabs button[aria-selected=true] { border-color:var(--vermillion,#48623d); font-weight:600; }
.desk input:not([type=checkbox]),.desk select,.desk textarea { width:100%; box-sizing:border-box; color:inherit; border:1px solid var(--line,#dedbd3); border-radius:7px; padding:9px 10px; background:var(--paper,#fffefa); font-size:12px; }
.desk-records { overflow:auto; flex:1; margin:12px -10px 0; }
.desk-record { display:flex; align-items:center; text-align:left; gap:10px; width:100%; padding:13px 10px; color:inherit; background:transparent; border:0; border-radius:9px; }
.desk-record:hover,.desk-record.is-selected { background:var(--selected,#eeeee3); }
.desk-record strong { display:block; font-size:13px; font-weight:600; }
.desk-record small { display:block; font-size:11px; color:var(--muted,#716e64); margin-top:4px; overflow-wrap:anywhere; }
.desk-avatar { display:grid; place-items:center; flex-shrink:0; width:30px; height:30px; border-radius:50%; background:var(--line,#e3e3d6); font-size:10px; }
.desk-due { margin-left:auto; font-size:10px; color:#9d512b; white-space:nowrap; }
.desk-conversation { min-width:0; min-height:0; display:flex; flex-direction:column; }
.desk-conversation-head { padding:20px 24px 12px; border-bottom:1px solid var(--line,#dedbd3); }
.desk-conversation-head p { margin:4px 0 12px; }
.desk-filters { display:flex; flex-wrap:wrap; gap:7px; align-items:center; }
.desk-filters button { font-size:11px; padding:6px 9px; }
.desk-filters [aria-pressed=true] { background:var(--vermillion,#48623d); color:#fff; }
.desk-history { display:flex; align-items:center; gap:7px; font-size:11px; margin-top:12px; }
.desk-messages { overflow:auto; flex:1; min-height:80px; padding:18px 24px; }
.desk-message { margin-bottom:18px; padding:14px; border:1px solid var(--line,#dedbd3); border-radius:10px; background:var(--paper,#fffefa); }
.desk-message.is-outbound { border-left:3px solid var(--vermillion,#48623d); }
.desk-message-meta { display:flex; justify-content:space-between; gap:10px; font-size:11px; color:var(--muted,#716e64); }
.desk-message-meta strong { color:var(--ink,#211f1a); }
.desk-message h3 { font-size:13px; margin:12px 0 6px; }
.desk-message p { color:inherit; white-space:pre-wrap; overflow-wrap:anywhere; max-height:420px; overflow:auto; }
.desk-assignment { display:flex; align-items:center; gap:8px; border-top:1px solid var(--line,#dedbd3); padding-top:9px; font-size:10px; color:var(--muted,#716e64); }
.desk-assignment select { max-width:200px; margin-left:auto; padding:5px; font-size:10px; }
.desk-compose { padding:14px 24px; border-top:1px solid var(--line,#dedbd3); display:grid; gap:8px; }
.desk-compose label { font-size:12px; font-weight:600; }
.desk-compose textarea { resize:vertical; min-height:70px; max-height:220px; }
.desk-compose-actions { display:flex; flex-wrap:wrap; gap:8px; }
.desk-compose-actions select { flex:1; min-width:120px; }
.desk-compose small { font-size:10px; color:var(--muted,#716e64); }
.desk-context { border-left:1px solid var(--line,#dedbd3); }
.desk-context section { padding-bottom:22px; margin-bottom:22px; border-bottom:1px solid var(--line,#dedbd3); }
.desk-context h2 { font-size:22px; }
.desk-context label { display:block; font-size:11px; margin:12px 0 5px; }
.desk-context select,.desk-context input { display:block; margin:6px 0 10px; }
.desk-context button { margin-top:10px; font-size:11px; }
.desk-context form { margin-bottom:10px; }
.desk-empty { padding:28px 12px; font-size:13px; }
.desk-empty button { margin:8px 0; }
.desk-welcome { margin:auto; max-width:420px; padding:40px; }
.desk-welcome h2 { font-size:38px; }
.desk-error,.desk-notice { padding:10px 24px; font-size:12px; }
.desk-error { color:#9c3421; background:#fff0e8; }
.desk-notice { color:#34512c; background:#eff3e9; }
.desk-back { display:none; }
@media (max-width:1150px) and (min-width:761px) { .desk { grid-template-columns:210px minmax(280px,1fr); } .desk-context { grid-column:2; max-height:260px; border-top:1px solid var(--line,#dedbd3); display:flex; gap:24px; } .desk-context section { min-width:180px; flex:1; } .desk-queue { grid-row:1 / span 2; } }
@media (max-width:760px) { .quarters-app[data-current-view="today"],.quarters-app[data-current-view="today"][data-sidebar-collapsed="true"] { display:flex; } .desk,.desk:has(.desk-welcome) { display:flex; flex-direction:column; height:100%; } .desk-queue { flex:1; border:0; } .desk-conversation { flex:1; min-height:400px; } .desk[data-mobile=queue] .desk-conversation,.desk[data-mobile=queue] .desk-context { display:none; } .desk[data-mobile=conversation] .desk-queue { display:none; } .desk-back { display:block; margin-bottom:12px; } .desk-context { flex-shrink:0; max-height:250px; border-top:1px solid var(--line,#dedbd3); } .desk-messages,.desk-conversation-head,.desk-compose { padding-left:16px; padding-right:16px; } }
[data-mode=dark] .desk { --ink:#e7e4db; --paper:#1c201b; --muted:#aaa99d; --line:#373d34; --selected:#30392b; }

.sidebar-tools { margin:16px 0; }
.sidebar-tools summary { padding:10px 18px; cursor:pointer; color:var(--fg-secondary,#716e64); font-size:12px; }
.desk-conversation-head,.desk-compose { flex-shrink:0; }
body:has(.quarters-app[data-current-view="today"]) #mobileDock .qm-fab-ask,
body:has(.quarters-app[data-current-view="today"]) #askDock { display:none; }
.lists-seed-label { display:block; font-size:12px; margin-bottom:8px; }
#listSeedContact { width:100%; max-width:550px; padding:10px; margin-bottom:14px; border:1px solid var(--rule,#ddd); border-radius:7px; color:inherit; background:var(--bg-card,#fffefa); }
@media (max-width:760px) {
  .desk { overflow-y:auto; }
  .desk-conversation { flex:0 0 auto; height:calc(100dvh - 100px); min-height:640px; }
  .desk-context { max-height:none; overflow:visible; padding-bottom:90px; }
  .desk-message-meta { flex-wrap:wrap; }
  .desk-assignment { flex-wrap:wrap; }
  .desk-compose-actions button { min-height:40px; }
  body:has(.desk-compose:focus-within) #mobileDock { visibility:hidden; }
}
/* Keep the composer inside its row when a docked inspector narrows the app. */
.desk-conversation-head h2,.desk-context h2 { overflow-wrap:anywhere; }
@media (max-width:1150px) and (min-width:761px) {
  .desk { grid-template-rows:minmax(480px,1fr) auto; overflow-y:auto; }
  .desk-context { min-width:0; }
}

/* Conversation first: compact bubbles and quiet, always-accessible deal links. */
.desk-conversation-head { padding:16px 22px 12px; }
.desk-conversation-head .desk-eyebrow { font-size:9px; }
.desk-conversation-head h2 { font-size:25px; margin:5px 0; }
.desk-conversation-head p { font-size:12px; margin-bottom:12px; }
.desk-filters { gap:3px; }
.desk-filters button { border-radius:6px; min-height:30px; }
.desk-filters [data-desk-refresh] { margin-left:auto; color:var(--muted,#716e64); }
.desk-messages { padding:12px 22px 20px; }
.desk-day { display:flex; align-items:center; gap:12px; margin:16px 0; font-size:10px; color:var(--muted,#716e64); text-align:center; }
.desk-day::before,.desk-day::after { content:''; height:1px; flex:1; background:var(--line,#dedbd3); }
.desk-message { width:fit-content; max-width:86%; box-sizing:border-box; margin:0 auto 10px 0; padding:10px 13px 6px; border:0; border-radius:12px 12px 12px 3px; background:var(--selected,#eeeee3); }
.desk-message.is-outbound { margin-left:auto; margin-right:0; border-left:0; border-radius:12px 12px 3px 12px; background:#e6edf2; }
.desk-message.is-email { width:100%; max-width:94%; border:1px solid var(--line,#dedbd3); background:var(--paper,#fffefa); }
.desk-message-meta { gap:14px; flex-wrap:wrap; font-size:10px; line-height:1.5; }
.desk-message-meta span { font-size:9px; }
.desk-message h3 { margin:8px 0 4px; }
.desk-message p { margin:5px 0 7px; font-size:13px; line-height:1.5; color:var(--ink,#211f1a); }
.desk-assignment { border:0; padding:0; gap:2px; justify-content:flex-end; }
.desk .desk-assignment select { width:auto; min-width:100px; max-width:210px; margin:0; padding:3px 20px 3px 3px; border:0; border-radius:4px; font-size:10px; color:var(--muted,#716e64); background-color:transparent; cursor:pointer; }
.desk .desk-assignment select:hover { background-color:var(--paper,#fffefa); }
.desk-compose { padding:12px 22px 14px; gap:7px; background:var(--paper,#fffefa); }
.desk-compose-top { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; }
.desk-compose-top label { font-size:11px; }
.desk-compose-modes { display:flex; gap:2px; padding:2px; border:1px solid var(--line,#dedbd3); border-radius:7px; }
.desk-compose-modes button { border:0; background:transparent; color:var(--muted,#716e64); padding:5px 9px; border-radius:4px; font-size:10px; }
.desk-compose-modes [aria-pressed=true] { color:var(--ink,#211f1a); background:var(--selected,#eeeee3); font-weight:600; }
.desk-compose textarea { min-height:58px; }
.desk-compose-actions { align-items:center; justify-content:flex-end; }
.desk-compose-actions button { padding:8px 13px; font-size:12px; border-radius:6px; }
.desk-compose-actions select { max-width:260px; margin-right:auto; }
.desk-compose small { overflow-wrap:anywhere; }
[data-mode=dark] .desk-message.is-outbound { background:#293c47; }
[data-mode=dark] .desk-message.is-email { background:var(--paper); }
@media (max-width:760px) {
  .desk-conversation { min-height:520px; }
  .desk-conversation-head,.desk-compose { padding:12px 16px; }
  .desk-messages { padding:8px 16px 16px; }
  .desk-message { max-width:94%; }
  .desk-compose-modes button { min-height:32px; }
}

.desk { --line:var(--border-soft); --selected:var(--accent-soft); }
.desk-queue { background:var(--bg-base); }
.desk-record { border-radius:10px; transition:background-color 120ms ease; }
.desk-record.is-selected { background:var(--bg-surface); box-shadow:0 1px 4px rgb(22 20 15 / .06); }
.desk-record.is-selected strong { color:var(--accent); }
.desk-context { background:var(--bg-surface); }
.desk-context section { border-bottom-color:var(--border-soft); padding-bottom:18px; margin-bottom:18px; }
.desk-context h2 { font-size:21px; }
.desk-compose { background:var(--bg-surface); }
.desk .desk-filters [aria-pressed=true] { background:var(--accent-soft); color:var(--ink); font-weight:600; }
.desk-compose-modes [aria-pressed=true] { background:var(--accent-soft); }
@media (prefers-reduced-motion:reduce) { .desk-record { transition:none; } }
