/* Application chrome and shared work surfaces. Document previews keep their own typography. */
/* Neutral brand palette for controls; color is reserved for meaningful status indicators. */
:root {--ws-accent:var(--black-03);--ws-on-accent:var(--white);--ws-tint:var(--line);--ws-sidebar:var(--light);--ws-ui:"Segoe UI",Arial,sans-serif}
.ws-icon {width:20px;height:20px;flex:0 0 20px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round;vertical-align:middle}
.app-shell {padding:18px 30px 40px 254px;font-family:var(--ws-ui);font-size:14px;line-height:1.5}
.app-shell main {max-width:1700px}
.app-shell .topbar {top:0;min-height:60px;grid-template-columns:minmax(180px,1fr) auto;gap:16px;padding:0 0 14px;margin:0 0 14px;border:0;border-bottom:1px solid var(--line);border-radius:0;box-shadow:none;background:var(--paper);backdrop-filter:none;z-index:40}
.app-shell .brand-lockup {top:24px;left:28px}
.app-shell .brand-logo {width:159px;max-height:48px;object-fit:contain}
.app-shell .global-search {max-width:480px}
.app-shell .global-search input {height:42px;min-height:42px;border:1px solid var(--line);background:var(--white);font:14px var(--ws-ui)}
.workspace-location {display:none}
.app-shell .topbar-actions {gap:8px;min-width:0}
.app-shell .topbar-actions #newFuneralButton {display:none}
.app-shell .topbar-actions .button,.app-shell .topbar-icon-button,.app-shell .notification-button,.app-shell .theme-toggle {width:40px;height:40px;min-width:40px;min-height:40px;padding:0;display:inline-flex;align-items:center;justify-content:center;border-radius:6px;background:transparent;border:1px solid var(--line);box-shadow:none;color:var(--black-03)}
.app-shell .topbar-actions .button:hover,.app-shell .topbar-icon-button:hover {background:var(--ws-tint);color:var(--ws-accent)}
.app-shell .user-pill {padding:0 8px;max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
.app-shell .module-strip {inset:88px auto 0 0;width:226px;padding:12px 14px 22px;gap:22px;border:0;border-right:1px solid var(--line);border-radius:0;background:var(--ws-sidebar);box-shadow:none;backdrop-filter:none;scrollbar-width:thin}
.app-shell .module-group {gap:3px}
.app-shell .module-group-label {padding-left:12px;font:600 10px var(--ws-ui);color:var(--muted)}
.app-shell .module-tab {min-height:40px;padding:9px 12px;gap:12px;border-radius:6px;font:500 14px var(--ws-ui);color:var(--black-02);transition:background .14s,color .14s}
.app-shell .module-tab.is-active {background:var(--ws-tint);color:var(--ws-accent);font-weight:650}
.app-shell .module-tab:hover {background:var(--ws-tint)}
.app-shell .module-tab .workspace-nav-label {min-width:0;overflow-wrap:anywhere}
.app-shell .module-group-admin {margin-top:auto;padding-top:16px}
.workspace-account {display:none}
.app-shell .breadcrumbs {font-size:12px;color:var(--muted);margin-bottom:18px}
.app-shell .module-header {min-height:unset;align-items:center;gap:16px;margin-bottom:24px}
.app-shell .module-header h1 {font-family:var(--ws-ui);font-size:30px;line-height:1.2;letter-spacing:0;font-weight:650;overflow-wrap:anywhere}
.app-shell .module-header .eyebrow {color:var(--muted);font:600 10px var(--ws-ui);margin-bottom:6px}
.app-shell .module-intro {font-family:var(--ws-ui);font-size:13px}
.app-shell .button,.app-shell .segment,.app-shell .icon-button {min-height:40px;border-radius:6px;font-family:var(--ws-ui);font-size:14px;box-shadow:none;transition:background .14s,border-color .14s}
.app-shell .button.primary,.app-shell .segment.is-active {background:var(--ws-accent);border-color:var(--ws-accent);color:var(--ws-on-accent)}
.app-shell .button.primary:hover {filter:brightness(.93)}
.app-shell input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),.app-shell select,.app-shell textarea {font-family:var(--ws-ui);font-size:14px;min-height:42px;border-radius:6px;box-shadow:none}
.app-shell input[type="checkbox"],.app-shell input[type="radio"] {accent-color:var(--ws-accent)}
.app-shell .toolbar {padding:14px 0;margin:0 0 18px;border:0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);border-radius:0;background:transparent;box-shadow:none;gap:12px}
.app-shell .toolbar label {font:500 12px var(--ws-ui);text-align:left;min-width:0}
.app-shell .panel {border-radius:6px;box-shadow:none}
.app-shell .panel-heading {padding:16px 18px;gap:12px}
.app-shell .panel-heading h2,.app-shell .panel-heading h3 {font:600 17px var(--ws-ui);overflow-wrap:anywhere}
.app-shell .panel-heading>span {font:12px var(--ws-ui);color:var(--muted)}
.app-shell th {font:600 12px var(--ws-ui);color:var(--black-02);background:var(--light)}
.app-shell td {font-family:var(--ws-ui);font-size:13px;vertical-align:middle}
.app-shell .status {font-family:var(--ws-ui);font-size:11px;border-radius:4px;white-space:normal}
.app-shell .empty-state {font:14px/1.5 var(--ws-ui);min-height:140px;color:var(--muted)}
.app-shell .record-item {font-family:var(--ws-ui);box-shadow:none}
.app-shell .record-item.is-active,.app-shell .conversation-item.is-active {background:var(--ws-tint);color:var(--black-03);border-color:var(--ws-accent)}
.app-shell button:disabled {opacity:.5;cursor:not-allowed}
.app-shell :focus-visible,.workspace-palette :focus-visible {outline:2px solid var(--ws-accent);outline-offset:3px}
.workspace-view-status {display:flex;justify-content:space-between;align-items:center;gap:16px;padding:10px 14px;margin-bottom:16px;background:var(--ws-tint);border-left:3px solid var(--ws-accent);font-size:13px}
.workspace-view-status.has-error {background:#fff2e8;color:#713719;border-color:#bd6b31}
html[data-theme="dark"] .workspace-view-status.has-error {background:#372719;color:#f5c493}
.workspace-view-status[hidden] {display:none}

/* Start: personal shortcuts first, with a compact daily agenda alongside. */
#dashboardView .dashboard-overview {display:block}
#dashboardView .dashboard-feature-panel {display:none}
#dashboardView .dashboard-main-column {max-width:none}
#dashboardView .module-header {margin:22px 0 30px}
#dashboardView .module-header h1 {font-family:"Headland One",Georgia,serif;font-size:30px;font-weight:400}
#dashboardView .module-header .eyebrow,#dashboardIntro {display:none}
#dashboardView .dashboard-mode-actions {flex-wrap:wrap;gap:12px}
#dashboardView #dashboardModeSwitch {gap:3px;padding:3px;border:1px solid var(--line);border-radius:6px;background:transparent}
#dashboardView #dashboardModeSwitch .segment {min-height:34px;border:0;font-size:13px;padding:7px 12px;border-radius:4px}
.workspace-date {margin:8px 0 0;color:var(--muted);font-size:13px}
.workspace-date::first-letter {text-transform:uppercase}
.workspace-start-layout {display:grid;grid-template-columns:minmax(0,1fr) 254px;gap:34px;max-width:1320px}
.workspace-start-main {min-width:0}
.workspace-shortcuts {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.workspace-shortcut {position:relative;display:flex;flex-direction:column;gap:6px;align-items:flex-start;min-height:154px;min-width:0;padding:22px;border:1px solid var(--line);border-radius:7px;background:var(--white);color:var(--black-03);font-family:var(--ws-ui);text-align:left;box-shadow:0 2px 6px #00000003;transition:background .18s,border-color .18s,transform .18s;cursor:pointer}
.workspace-shortcut>.ws-icon {width:24px;height:24px;flex-basis:24px;margin-bottom:14px}
.workspace-shortcut strong {font-size:17px;line-height:1.35;font-weight:600;overflow-wrap:anywhere}
.workspace-shortcut small {font-size:13px;line-height:1.5;color:var(--muted);overflow-wrap:anywhere}
.workspace-shortcut-arrow {position:absolute;top:22px;right:20px;color:var(--muted)}
.workspace-shortcut-arrow .ws-icon {width:16px;height:16px;transform:rotate(-45deg)}
.workspace-shortcut:hover {background:var(--light);border-color:var(--line-strong);transform:translateY(-2px)}
.workspace-shortcuts>.ws-empty {grid-column:1/-1}
.workspace-more-shortcuts {margin-top:12px;min-height:40px;font:13px var(--ws-ui);text-decoration:underline}
.workspace-start-aside {min-width:0;border-left:1px solid var(--line);padding-left:26px;display:flex;flex-direction:column;gap:22px}
.workspace-date-block {display:flex;align-items:center;gap:16px;border-bottom:1px solid var(--line);padding:0 0 22px;min-height:80px}
.workspace-date-block>strong {font:400 44px/1 "Headland One",Georgia,serif}
.workspace-date-block>span {display:grid;gap:4px;font-size:13px}
.workspace-date-block small {font-size:12px;color:var(--muted)}
.workspace-date-block span::first-letter,.workspace-date-block small::first-letter {text-transform:uppercase}
.workspace-day-section {min-width:0;border:0;background:transparent;border-radius:0;padding:0;box-shadow:none}
.workspace-day-section>header {display:flex;justify-content:space-between;align-items:center;gap:12px;margin:0 0 14px;min-height:28px}
.workspace-day-section>header>span {font-size:12px;color:var(--muted)}
.workspace-day-section h2 {font:600 16px var(--ws-ui);margin:0}
.workspace-day-section .link-button {font:13px var(--ws-ui);color:var(--ws-accent);min-height:36px}
.workspace-start-aside .link-button {width:36px;display:flex;align-items:center;justify-content:center;padding:0;flex:0 0 36px}
.workspace-start-aside .link-button .ws-icon {width:17px;height:17px}
.ws-agenda-item,.ws-attention-item,.ws-task-item {display:flex;align-items:center;gap:16px;width:100%;padding:14px 0;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;color:var(--black-03);font:14px var(--ws-ui);text-align:left;cursor:pointer;box-shadow:none}
.ws-agenda-item:hover,.ws-attention-item:hover,.ws-task-item:hover {background:var(--ws-tint)}
.ws-agenda-item {display:grid;gap:6px;padding:14px 0}
.ws-agenda-item time {display:flex;gap:8px;align-items:baseline}
.ws-agenda-item time strong {font-size:13px}
.ws-agenda-item strong,.ws-task-item strong {font-weight:600;font-size:14px;overflow-wrap:anywhere}
.ws-agenda-item>span,.ws-task-item>span:first-of-type {flex:1;display:grid;gap:5px;min-width:0}
.ws-agenda-item small,.ws-task-item small {font-size:12px;color:var(--muted)}
.ws-agenda-item>.ws-icon {display:none}
.ws-attention-item>.ws-icon {width:18px;height:18px;flex-basis:18px;color:var(--muted)}
.ws-attention-item.is-warning>.ws-icon:first-child {color:#956b33}
html[data-theme="dark"] .ws-attention-item.is-warning>.ws-icon:first-child {color:#d7b27e}
.workspace-attention-section {margin-top:26px}
.ws-attention-item {gap:12px;padding:17px 0}
.ws-attention-item>span {flex:1;min-width:0;overflow-wrap:anywhere}
.ws-attention-item>strong {font-size:13px}
.ws-empty {min-height:64px;display:flex;align-items:center;gap:10px;padding:16px 0;color:var(--muted);font:13px/1.5 var(--ws-ui)}
.ws-empty .ws-icon {color:var(--ws-accent)}
.workspace-tasks-section {margin-top:26px}
.ws-task-state {font-size:11px;color:var(--ws-accent);background:var(--ws-tint);padding:5px 8px;border-radius:4px;white-space:nowrap}
.ws-task-state.waiting {color:#865815;background:#f7ebd2}
html[data-theme="dark"] .ws-task-state.waiting {color:#e4c078;background:#423922}
.workspace-news-item {display:grid;gap:8px;width:100%;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;color:var(--black-03);text-align:left;font:13px/1.5 var(--ws-ui);padding:0 0 16px;cursor:pointer}
.workspace-news-item:hover {background:var(--ws-tint)}
.workspace-news-item strong {font-weight:600;overflow-wrap:anywhere}
.workspace-news-item>span {display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.workspace-news-item small {font-size:12px;color:var(--muted)}
.workspace-palette {width:min(560px,calc(100vw - 32px));max-height:85dvh;padding:22px;border:1px solid var(--line);border-radius:8px;background:var(--white);color:var(--black-03);box-shadow:0 18px 80px #0003}
.workspace-palette::backdrop {background:#1d1d1d55;backdrop-filter:blur(3px)}
.workspace-palette>header {display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
.workspace-palette h2 {font:600 20px var(--ws-ui);margin:0}
.workspace-palette input {min-height:48px;box-shadow:none;font:16px var(--ws-ui);border-radius:6px}
.workspace-module-results {max-height:55dvh;overflow:auto;margin-top:12px}
.ws-module-result {display:flex;gap:16px;align-items:center;width:100%;padding:12px 10px;border:0;border-radius:6px;background:transparent;text-align:left;color:var(--black-03);font-family:var(--ws-ui);cursor:pointer}
.ws-module-result>span {display:grid;gap:3px;flex:1}
.ws-module-result strong {font-size:14px;font-weight:600}.ws-module-result small {font-size:11px;color:var(--muted)}
.ws-module-result:hover {background:var(--ws-tint)}
.ws-module-result>.ws-icon:first-child {color:var(--ws-accent)}
dialog:not(.workspace-palette) {border-radius:8px}
dialog .dialog-header h2 {font-family:var(--ws-ui);font-size:24px}
dialog input,dialog select,dialog textarea,dialog button {font-family:var(--ws-ui)}
@media(max-width:1200px){
  .app-shell {padding-left:238px;padding-right:22px}
  .app-shell .module-strip {width:216px}
  .app-shell .user-pill {display:none}
  .workspace-start-layout {grid-template-columns:minmax(0,1fr) 214px;gap:24px}
  .workspace-start-aside {padding-left:20px}
  .workspace-shortcut {padding:18px}
}
@media(max-width:900px){
  .app-shell {padding:10px 16px 32px}
  .app-shell .topbar {display:flex;flex-direction:row;flex-wrap:nowrap;gap:10px;padding:8px 0;min-height:58px}
  .app-shell .sidebar-toggle {display:flex;align-items:center;justify-content:center;width:42px;height:42px;min-width:42px;border-radius:6px;border:1px solid var(--line);background:var(--white);color:var(--black-03)}
  .app-shell .brand-lockup {display:none}
  .app-shell .module-strip {display:flex;inset:0 auto 0 0;width:260px;padding-top:28px;z-index:100;transform:translateX(-100%);transition:transform .18s ease;visibility:hidden}
  body.is-sidebar-open .app-shell .module-strip {transform:translateX(0);visibility:visible}
  body.is-sidebar-open .sidebar-scrim {display:block;position:fixed;inset:0;z-index:90;background:#1d1d1d55;border:0}
  .workspace-account {display:grid;border-top:1px solid var(--line);padding-top:12px;gap:8px}
  .workspace-account>span {padding:0 12px;color:var(--muted);font-size:12px;overflow-wrap:anywhere}
  .app-shell .global-search {flex:1;min-width:0}
  .app-shell .topbar-actions {display:flex;margin-left:auto;gap:6px}
  .app-shell .topbar-actions #refreshButton,.app-shell .topbar-actions #supportContactButton {display:none}
  .app-shell .module-header h1 {font-size:27px}
  .app-shell .toolbar {flex-wrap:wrap}
}
@media(max-width:760px){
  .workspace-start-layout {grid-template-columns:minmax(0,1fr)}
  .workspace-start-aside {border-left:0;border-top:1px solid var(--line);padding:22px 0 0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
  .workspace-date-block {display:none}
  #dashboardView .module-header {align-items:flex-start;flex-wrap:wrap}
}
@media(max-width:600px){
  .app-shell {padding:8px 12px 28px}
  .app-shell .global-search {display:none}
  .workspace-location {display:block;flex:1;min-width:0;font-size:14px;font-weight:600;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
  .app-shell .topbar-actions {gap:5px}
  .app-shell .topbar-actions #logoutButton {display:none}
  .app-shell .module-header {align-items:flex-start;flex-wrap:wrap;gap:14px}
  .app-shell .module-header h1 {font-size:26px}
  .app-shell .module-actions {flex-wrap:wrap;min-width:0;max-width:100%}
  .app-shell .module-actions .button {white-space:normal}
  #dashboardView .module-header {margin:20px 0}
  #dashboardView .module-header h1 {font-size:28px}
  #dashboardView .dashboard-mode-actions {width:100%;justify-content:space-between}
  #dashboardView #dashboardModeSwitch .segment {min-height:40px;padding:7px 10px}
  .workspace-shortcuts {gap:12px}
  .workspace-shortcut {padding:16px;min-height:150px}
  .workspace-shortcut strong {font-size:15px}
  .workspace-shortcut small {font-size:12px}
  .workspace-shortcut-arrow {top:16px;right:14px}
  .workspace-start-aside {grid-template-columns:1fr}
  .ws-task-state {max-width:100px;white-space:normal}
  .app-shell input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),.app-shell select,.app-shell textarea {font-size:16px;min-height:44px}
  .app-shell .button,.app-shell .segment {min-height:44px}
  .app-shell .toolbar {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .app-shell .toolbar>label {width:auto;min-width:0}
  .app-shell .toolbar>label:only-of-type {grid-column:1/-1}
  .app-shell .table-wrap {overflow-x:auto}
  .workspace-view-status {font-size:12px}
}
@media(max-width:360px){.workspace-shortcuts {grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.app-shell *,.workspace-palette *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media print {.workspace-start-layout,.workspace-view-status,.workspace-palette {display:none!important}}
