/* Board-centered business workspace; existing financial and workflow views stay intact. */
/* The palette lives in styles.css. This file declared its own :root at the
   same specificity, so load order decided the app's colours instead of the
   palette; 15 tokens removed from here. */
.sidebar { padding-top: 20px; }
.brand { padding-bottom: 20px; }
.brand-word { font-size: 27px; }
.company-switch { margin-bottom: 16px; padding: 12px 8px; }
.company-arrow { display: none; }
.nav-link { min-height: 36px; padding: 8px 12px; margin-bottom: 2px; }
.nav-link .icon { width: 16px; height: 16px; }
.workforce-label { margin-top: 20px; }
.sidebar-bottom { padding-top: 20px; }
.topbar { height: 60px; background: var(--surface); }
.runtime-indicator small { line-height: 1.4; }
.page-footer { background: var(--surface); }
main.board-surface { padding: 24px 32px; background: var(--surface); min-height: calc(100vh - 112px); }
.board-page { min-width: 0; }
.board-heading { display: flex; justify-content: space-between; gap: 24px; align-items: center; margin-bottom: 24px; }
.board-location { color: var(--muted); font-size: 10px; letter-spacing: .08em; font-weight: 500; }
.board-location span { margin: 0 8px; color: var(--line-strong); }
.board-heading h1 { font-size: 27px; font-weight: 600; letter-spacing: -.03em; line-height: 1.2; margin-top: 8px; }
.board-heading p { color: var(--muted); font-size: 13px; margin-top: 8px; }
.board-heading-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.board-members { display: flex; align-items: center; margin-right: 12px; }
.board-members .person-avatar { width: 32px; height: 32px; border: 2px solid var(--surface); border-radius: 50%; margin-right: -8px; font-size: 11px; background: var(--accent-soft); color: var(--accent); }
.board-members .person-avatar:nth-child(2) { background: var(--blue-soft); color: var(--blue); }
.members-count { display: grid; place-items: center; min-width: 32px; height: 32px; font-size: 11px; border-radius: 50%; background: var(--sidebar); border: 2px solid var(--surface); }
.board-view-bar { display: flex; gap: 20px; align-items: center; border-bottom: 1px solid var(--line); }
.board-tabs { display: flex; margin-right: auto; align-self: stretch; }
.board-tabs button { display: flex; gap: 8px; align-items: center; color: var(--muted); padding: 12px 16px; font-size: 13px; border-radius: 0; border-bottom: 2px solid transparent; }
.board-tabs button:first-child { padding-left: 4px; }
.board-tabs button.selected { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.board-tabs .icon { width: 16px; height: 16px; }
.board-view-bar>.text-button { color: var(--muted); white-space: nowrap; }
.board-toolbar { display: flex; gap: 16px; align-items: center; padding: 16px 0; flex-wrap: wrap; }
.board-search { display: flex; align-items: center; border: 1px solid var(--line-strong); padding: 0 12px; height: 36px; border-radius: 4px; gap: 8px; width: 240px; }
.board-search .icon { color: var(--muted); width: 16px; }
.board-search input { border: 0; background: none; padding: 0; min-width: 0; width: 100%; font-size: 13px; color: var(--ink); }
.board-filter { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.board-filter select { padding: 6px 8px; min-height: 36px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 12px; max-width: 192px; }
.board-item-count { font-size: 12px; color: var(--muted); margin-left: auto; }
.board-pulse { display: flex; align-items: center; gap: 24px; font-size: 12px; color: var(--muted); background: var(--surface-subtle); border: 1px solid var(--line); padding: 8px 12px; border-radius: 4px; margin-bottom: 24px; }
.board-pulse>span,.board-pulse>button { display: inline-flex; align-items: center; gap: 6px; }
.board-pulse .icon { width: 16px; height: 16px; }
.board-pulse>button { color: var(--amber); font-size: 12px; padding: 0; }
.board-pulse .board-demo-note { margin-left: auto; font-size: 11px; }
.board-layout { display: grid; grid-template-columns: minmax(0,1fr); min-width: 0; align-items: start; gap: 20px; }
.board-layout.has-details { grid-template-columns: minmax(0,1fr) minmax(320px,400px); }
.board-main-view { min-width: 0; }
.board-groups { display: grid; gap: 24px; }
.work-group { min-width: 0; --group: var(--muted); }
.work-group.amber,.board-lane.amber { --group: var(--amber); }
.work-group.blue,.board-lane.blue { --group: var(--blue); }
.work-group.green,.board-lane.green { --group: var(--green); }
.work-group-heading { display: flex; align-items: center; width: 100%; gap: 8px; text-align: left; padding: 0 0 12px; color: var(--group); }
.work-group-heading h2 { font-size: 15px; font-weight: 600; }
.work-group-heading>span { font-size: 12px; color: var(--muted); margin-left: 4px; }
.work-group-heading .icon { width: 16px; height: 16px; transform: rotate(90deg); }
.work-group-heading[aria-expanded="false"] .icon { transform: none; }
.work-group .table-wrap { border: 1px solid var(--line); border-left: 4px solid var(--group); border-radius: 4px; }
.work-table { width: 100%; min-width: 940px; table-layout: fixed; }
.work-table th { text-transform: none; font-size: 12px; letter-spacing: 0; padding: 8px 12px; background: var(--surface-subtle); border-right: 1px solid var(--line); }
.work-table td { padding: 12px; font-size: 13px; border-right: 1px solid var(--line); vertical-align: middle; }
.work-table th:last-child,.work-table td:last-child { border-right: 0; }
.work-table th:first-child { width: 29%; }
.work-table th:nth-child(2) { width: 13%; }
.work-table th:nth-child(3) { width: 15%; }
.work-table th:nth-child(4) { width: 9%; }
.work-table th:nth-child(5) { width: 9%; }
.work-table th:nth-child(6) { width: 9%; }
.work-table th:nth-child(7) { width: 16%; }
.work-table .row-selected { background: var(--accent-soft); }
.work-title { display: flex; align-items: center; text-align: left; width: 100%; gap: 8px; padding: 0; font-size: 13px; font-weight: 500; }
.work-title>span { min-width: 0; }
.work-title>.icon:first-child { color: var(--muted); width: 16px; height: 16px; }
.work-title>.icon:last-child { width: 12px; height: 12px; margin-left: auto; color: var(--muted); }
.work-title:hover { color: var(--accent); }
.work-assignee { display: flex; align-items: center; gap: 8px; text-align: left; }
.work-assignee>span:last-child { font-size: 12px; line-height: 1.4; }
.work-assignee small { display: block; color: var(--muted); font-size: 10px; }
.work-assignee .avatar { border-radius: 50%; }
.work-status { display: inline-flex; align-items: center; justify-content: center; padding: 6px 8px; border-radius: 2px; font-size: 11px; line-height: 1.4; background: var(--sidebar); color: var(--muted); font-weight: 500; }
.work-status.amber { background: var(--amber-soft); color: var(--amber); }
.work-status.blue { background: var(--blue-soft); color: var(--blue); }
.work-status.green { background: var(--green-soft); color: var(--green); }
.work-table .work-status { width: 100%; }
.work-priority { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 11px; }
.work-priority.high { color: var(--accent); }
.work-priority .icon { width: 12px; height: 12px; }
.work-date { font-variant-numeric: tabular-nums; white-space: nowrap; }
.work-table .work-next { font-size: 11px; color: var(--muted); line-height: 1.4; }
.work-progress { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.work-progress progress { width: 100%; height: 6px; border: 0; background: var(--line); border-radius: 2px; appearance: none; }
.work-progress progress::-webkit-progress-bar { background: var(--line); border-radius: 2px; }
.work-progress progress::-webkit-progress-value { background: var(--green); border-radius: 2px; }
.work-progress progress::-moz-progress-bar { background: var(--green); }
.work-progress>span { min-width: 24px; white-space: nowrap; }
.board-kanban { display: grid; grid-template-columns: repeat(4,minmax(220px,1fr)); gap: 16px; overflow-x: auto; align-items: start; padding-bottom: 8px; }
.board-lane { --group: var(--muted); border-top: 2px solid var(--group); background: var(--surface-subtle); border-radius: 4px; padding: 12px; min-height: 320px; }
.board-lane h2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--group); margin-bottom: 16px; }
.board-lane h2 b { font-size: 11px; background: var(--surface); color: var(--muted); min-width: 20px; text-align: center; border: 1px solid var(--line); border-radius: 4px; }
.lane-cards { display: grid; gap: 12px; }
.work-card { background: var(--surface); border: 1px solid var(--line); padding: 16px; text-align: left; display: flex; flex-direction: column; gap: 12px; width: 100%; min-width: 0; }
.work-card:hover,.work-card.selected { border-color: var(--accent); }
.work-card>strong { font-size: 13px; line-height: 1.4; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-kind { font-size: 10px; color: var(--muted); }
.card-next { font-size: 12px; color: var(--muted); line-height: 1.4; }
.work-card>.work-status { align-self: flex-start; }
.card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.card-bottom>span:last-child { font-size: 11px; white-space: nowrap; color: var(--muted); }
.lane-empty { border: 1px dashed var(--line-strong); text-align: center; padding: 24px 12px; color: var(--muted); font-size: 12px; border-radius: 4px; }
.board-caption { margin-top: 12px; color: var(--muted); font-size: 11px; }
.board-empty { padding: 40px 24px; text-align: center; border: 1px dashed var(--line-strong); border-radius: 4px; }
.board-empty>.icon { color: var(--green); width: 24px; height: 24px; }
.board-empty h2 { font-size: 15px; margin: 12px 0 8px; }
.board-empty p { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.board-workforce { display: grid; grid-template-columns: 1.2fr repeat(4,1fr); margin-top: 32px; border: 1px solid var(--line); border-radius: 4px; padding: 16px; gap: 16px; background: var(--surface-subtle); }
.board-workforce>div { display: grid; align-content: center; }
.board-workforce strong { font-size: 12px; font-weight: 600; }
.board-workforce small { display: block; color: var(--muted); font-size: 11px; line-height: 1.4; }
.board-workforce>button { display: flex; align-items: center; gap: 8px; padding: 0; text-align: left; }
.board-workforce>button>.icon { width: 16px; height: 16px; margin-left: auto; color: var(--muted); }
.board-workforce>button:hover strong { color: var(--accent); }
.board-dashboard-grid { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(280px,1fr); gap: 20px; margin-bottom: 20px; }
.workload-list { padding: 0 20px 20px; display: grid; gap: 12px; }
.workload-list button { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 0; text-align: left; }
.workload-list button>span:nth-child(2) { flex: 1; }
.workload-list progress { width: 64px; height: 6px; accent-color: var(--accent); }
.workload-list b { font-size: 12px; min-width: 16px; }
.work-drawer { position: sticky; top: 20px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); min-width: 0; max-height: calc(100vh - 40px); overflow-y: auto; }
.work-drawer-top { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px 0 20px; }
.work-drawer-top>span { font-size: 10px; font-weight: 600; letter-spacing: .08em; color: var(--muted); }
.work-drawer-heading { padding: 8px 20px 16px; }
.work-drawer-heading h2 { font-size: 19px; line-height: 1.4; margin-top: 12px; letter-spacing: -.02em; overflow-wrap: anywhere; }
.work-drawer-tabs { display: flex; border-bottom: 1px solid var(--line); padding: 0 20px; gap: 20px; }
.work-drawer-tabs button { font-size: 12px; color: var(--muted); border-radius: 0; padding: 8px 0; border-bottom: 2px solid transparent; }
.work-drawer-tabs button.selected { color: var(--accent); border-color: var(--accent); }
.work-drawer-body { padding: 20px; }
.work-description { font-size: 12px; line-height: 1.6; color: var(--muted); margin-bottom: 20px; }
.work-detail-fields { display: grid; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.work-detail-fields>div { display: grid; grid-template-columns: 80px minmax(0,1fr); align-items: center; gap: 12px; font-size: 12px; }
.work-detail-fields>div>span:first-child { color: var(--muted); }
.work-detail-fields select,.work-detail-fields input { width: 100%; min-height: 32px; padding: 4px 8px; font-size: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.work-execution { margin-top: 20px; }
.execution-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.execution-title h3,.handoff-heading { font-size: 13px; }
.execution-title>span { color: var(--muted); font-size: 11px; }
.work-execution ol { list-style: none; padding: 0; margin: 16px 0 20px; }
.work-execution li { display: flex; align-items: flex-start; gap: 12px; padding: 0 0 16px; position: relative; }
.work-execution li:not(:last-child)::after { content: ''; position: absolute; left: 12px; top: 24px; bottom: 0; width: 1px; background: var(--line); }
.execution-marker { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); color: var(--muted); font-size: 11px; background: var(--surface); }
.execution-marker .icon { width: 12px; height: 12px; }
.work-execution li.completed .execution-marker { color: var(--green); background: var(--green-soft); border-color: var(--green-soft); }
.work-execution li.running .execution-marker { color: var(--blue); background: var(--blue-soft); border-color: var(--blue); }
.work-execution li strong { font-size: 12px; line-height: 1.4; display: block; }
.work-execution li small { font-size: 11px; color: var(--muted); }
.work-output { padding: 12px; background: var(--green-soft); border: 1px solid var(--line); border-radius: 4px; margin-bottom: 16px; }
.work-output strong { color: var(--green); font-size: 12px; }
.work-output p { font-size: 12px; margin-top: 8px; }
.work-routine-start { padding-top: 20px; font-size: 13px; }
.work-routine-start p { font-size: 12px; color: var(--muted); margin: 8px 0 16px; }
.work-evidence { display: flex; gap: 8px; align-items: center; font-size: 11px; color: var(--muted); margin-top: 20px; }
.work-evidence .icon { width: 16px; }
.board-conversation { padding: 20px; }
.board-chat-context { display: flex; align-items: center; gap: 8px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.board-chat-context strong { font-size: 13px; }
.board-chat-context small { display: block; font-size: 11px; color: var(--muted); }
.board-chat-history { max-height: 320px; overflow-y: auto; padding: 16px 0; display: grid; gap: 12px; }
.board-chat-history .chat-message { max-width: 100%; }
.board-chat-history .chat-welcome { padding: 20px 0; }
.board-chat-history .chat-welcome p { font-size: 12px; }
#board-chat textarea,#board-comment textarea { display: block; width: 100%; resize: vertical; font-size: 13px; padding: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); }
#board-chat>div { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
#board-chat>div>span { font-size: 11px; color: var(--muted); }
#board-comment { margin-bottom: 20px; }
#board-comment label { font-size: 12px; display: block; margin-bottom: 8px; }
#board-comment button { margin-top: 8px; }
.work-notes article { padding: 16px 0; border-top: 1px solid var(--line); }
.work-notes article>div { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.work-notes strong { font-size: 12px; }
.work-notes time { font-size: 10px; color: var(--muted); }
.work-notes p { font-size: 12px; margin-top: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.handoff-heading { padding-top: 20px; margin-bottom: 16px; }
.work-drawer .activity-list { padding: 0; }
.routine-dialog>p { font-size: 13px; color: var(--muted); line-height: 1.6; }
.routine-feature { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px; margin: 20px 0; background: var(--surface-subtle); border: 1px solid var(--line); border-radius: 4px; }
.routine-feature .icon { color: var(--accent); margin-right: 8px; }
.routine-feature strong { font-size: 13px; }
.routine-feature p { font-size: 12px; color: var(--muted); margin-top: 8px; }
.routine-feature>.button { flex-shrink: 0; }
.routine-list article { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.routine-list article>div { flex: 1; }
.routine-list strong { display: block; font-size: 13px; }
.routine-list small { font-size: 11px; color: var(--muted); }
.routine-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 20px 0; font-size: 12px; }
.routine-controls>span { margin-right: auto; }
@media(min-width:1500px) { .board-layout.has-details .work-table { min-width: 860px; } }
@media(max-width:1250px) {
  .board-members { display: none; }
  .board-heading { align-items: flex-start; }
  .board-layout.has-details { grid-template-columns: minmax(0,1fr) 340px; }
  .board-workforce { grid-template-columns: repeat(4,1fr); }
  .board-workforce>div { grid-column: 1/-1; display: flex; gap: 12px; align-items: center; }
  .board-dashboard-grid { grid-template-columns: minmax(0,1fr); }
  .board-layout.has-details .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width:1000px) {
  .board-heading { flex-wrap: wrap; gap: 16px; }
  .board-pulse { flex-wrap: wrap; gap: 8px 20px; }
  .board-pulse .board-demo-note { width: 100%; margin-left: 0; }
  .board-view-bar { flex-wrap: wrap; gap: 8px 20px; padding-bottom: 8px; }
  .board-tabs { width: 100%; }
  .board-layout.has-details { grid-template-columns: minmax(0,1fr); }
  .board-layout.has-details .board-main-view { display: none; }
  .work-drawer { position: relative; top: 0; max-height: none; }
}
@media(min-width:601px) and (max-width:1020px) { :root { --sidebar-width:76px; } }
@media(max-width:760px) {
  main.board-surface { padding: 20px 16px; }
  .board-toolbar { gap: 12px; }
  .board-search { width: 100%; }
  .board-filter { flex: 1; min-width: 0; flex-direction: column; align-items: flex-start; gap: 4px; }
  .board-filter select { width: 100%; max-width: 100%; }
  .board-item-count { margin-left: 0; }
  .board-kanban { grid-template-columns: minmax(0,1fr); }
  .board-lane { min-height: 0; }
  .board-workforce { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
  .board-workforce>div { display: block; }
  .board-workforce>button>.icon { display: none; }
  .board-heading-actions { width: 100%; }
  .board-tabs button { flex: 1; justify-content: center; padding: 12px 8px; }
  .board-tabs button:first-child { padding-left: 8px; }
  .routine-feature { flex-direction: column; align-items: flex-start; }
  .routine-list article { flex-wrap: wrap; }
  .routine-list article>.button { margin-left: 40px; }
}
@media(prefers-reduced-motion:reduce) { .board-page * { scroll-behavior: auto; } }
