/* Shared visual treatment for the web workspace and standalone work views. */
html:root {
  --work-bg: #f7f6f2;
  --work-sidebar: #f0eee8;
  --work-surface: #fffefb;
  --work-surface-soft: #f3f2ed;
  --work-canvas: #fffdf8;
  --work-border: #e1ded5;
  --work-selected: #e9ede3;
  --work-text: #252823;
  --work-text-secondary: #474e46;
  --work-text-muted: #62675e;
  --work-accent: #3d684d;
  --work-accent-hover: #2c5239;
  --work-success: #386040;
  --work-success-bg: #e9efe4;
  --work-panel-shadow: 0 16px 48px rgb(45 40 28 / 10%);
  color-scheme: light;
}

body, #app .main-area { background: var(--work-bg); color: var(--work-text); }
#app .sidebar,
#app .sidebar > nav.sidebar-settings { background: var(--work-sidebar); }
#app .sidebar nav button:hover { background: #eae7de; }
#app .sidebar nav button.selected {
  background: var(--work-surface);
  color: var(--work-text);
  box-shadow: 0 1px 4px rgb(46 41 28 / 8%);
}
#app .topbar { background: var(--work-bg); }
#app .sidebar-toggle {
  background: var(--work-surface);
  color: var(--work-text-muted);
  border-color: var(--work-border);
}
#app .sidebar-toggle:hover { background: var(--work-surface-soft); }
#app :is(.top-avatar,.user-avatar,.comment-avatar) {
  background: var(--work-selected);
  color: var(--work-success);
  border-radius: 50%;
}
#app :is(.sidebar,.topbar) svg { stroke-width: 1.6; }
#app :is(.surface,.document-paper,.work-board .work-project,.usage-page .members-table) {
  background-color: var(--work-surface);
  border-color: var(--work-border);
  box-shadow: none;
}
#app .work-board .work-project > header { background: var(--work-surface-soft); }
#app .work-board button.work-row,
#app .project-flow .flow-list article { border-bottom-color: var(--work-border); }
#app .work-board .work-row:hover,
#app .project-flow .flow-list article:hover,
#app .collection-row:hover { background: var(--work-surface-soft); }
#app :is(.work-board .work-status,.project-flow .list-state,.status.open,.status.draft) {
  border-radius: 8px;
}
#app :is(.project-view-tabs,.usage-view-tabs,.reports-heading > nav,.collection-tabs,.workbench-head > nav),
.collection-sheet .report-phase {
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--work-border);
  border-radius: 12px;
  background: var(--work-surface-soft);
}
#app :is(.project-view-tabs,.usage-view-tabs,.reports-heading > nav,.collection-tabs,.workbench-head > nav) :is(button,a),
.collection-sheet .report-phase > button {
  border-radius: 8px;
}
#app :is(.project-view-tabs,.usage-view-tabs,.reports-heading > nav,.collection-tabs,.workbench-head > nav) :is(button.active,button[aria-pressed="true"]),
.collection-sheet .report-phase > button[aria-pressed="true"] {
  background: var(--work-surface);
  color: var(--work-text);
  font-weight: 650;
  box-shadow: 0 1px 4px rgb(46 41 28 / 8%);
}
#app .work-entry {
  background: var(--work-surface-soft);
  border-color: var(--work-border);
  box-shadow: 0 3px 12px rgb(46 41 28 / 6%);
}
#app .work-entry-heading { color: var(--work-text); }
#app .work-entry :is(textarea,.material-input) { background-color: var(--work-surface); }
#app .document-paper .toolbar { background: var(--work-surface-soft); }
#app .profile-card input[readonly] {
  background: var(--work-surface-soft);
  color: var(--work-text-secondary);
}
#app .profile-page { display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
#app .profile-page .page-heading { margin-bottom: 0; }
#app .profile-page .profile-card {
  width: 100%;
  max-width: 680px;
  align-self: center;
  border-radius: 18px;
}
#app .profile-page .feishu-source-panel { width: 100%; max-width: 680px; align-self: center; }
#app .profile-card .feishu-identity { text-align: center; }
#app .profile-card .feishu-identity > header { justify-content: center; flex-wrap: wrap; }
#app .profile-card .identity-person { flex-direction: column; gap: 8px; }
#app .profile-card .identity-avatar {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 1px solid var(--work-border);
  background: radial-gradient(circle at 35% 25%, #f7f7ed, #e5ede0);
  color: var(--work-success);
  font-size: 28px;
}
#app .profile-card .identity-person strong { font-size: 21px; color: var(--work-text); }
#app .profile-card .identity-person small { justify-content: center; }
#app .profile-card .identity-linked { padding: 2px 7px; border-radius: 12px; background: var(--work-success-bg); }
.collection-overlay { background: rgb(31 28 23 / 36%); }
.collection-sheet, .collection-modal {
  background: var(--work-surface);
  border-color: var(--work-border);
  box-shadow: var(--work-panel-shadow);
}
.collection-sheet > :is(header,footer),
.collection-modal > header { background: var(--work-surface); border-color: var(--work-border); }
.collection-sheet .report-items article {
  background: var(--work-canvas);
  border-color: var(--work-border);
}
@media (max-width: 620px) {
  #app .profile-page { gap: 10px; }
  #app .profile-page .profile-card { border-radius: 12px; }
  #app .profile-card .identity-avatar { width: 60px; height: 60px; }
  #app :is(.project-view-tabs,.usage-view-tabs,.reports-heading > nav,.collection-tabs) {
    max-width: 100%;
    flex-wrap: wrap;
  }
}

#app .profile-page .feishu-source-panel > header {
  background: var(--work-surface-soft);
  border-radius: 9px 9px 0 0;
}
#app .profile-page .feishu-source-panel > header button {
  background: var(--work-selected);
  color: var(--work-success);
}
body:has(.joint-page) { background: var(--work-bg); color: var(--work-text); }
#app .joint-page :is(.presentation-header,.report-bar,.paper) {
  background-color: var(--work-surface);
  border-color: var(--work-border);
}
#app .joint-page :is(.project-reader-nav,.meeting-toolbar select,.report-table-body th) {
  background-color: var(--work-surface-soft);
  border-color: var(--work-border);
}
#app .joint-page :is(.paper,.project-reader-nav) { box-shadow: none; }
