/* Workspace refinement: the login's quiet typography and neutral surfaces.
   Loaded after legacy panels. Important colors only override the older theme
   compatibility rules; all colors continue to come from the selected theme. */
.app-shell { --workspace-heading: 'Stack Sans Notch', var(--font); }
.app-shell .sidebar {
  background: var(--rail) !important;
  color: var(--rail-foreground) !important;
  padding: 28px 14px 14px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.app-shell .brand { color: var(--ink) !important; font-size: 28px; gap: 8px; }
.app-shell .brand .badge { font: 500 10px var(--font); letter-spacing: 0; color: var(--ink-secondary); background: var(--surface-subtle); border: 1px solid var(--line); border-radius: 4px; }
.app-shell .workspace-label { margin: 10px 10px 28px; font-size: 12px; }
.app-shell .nav-link { min-height: 38px; gap: 11px; font-size: 13px; border-radius: 5px; }
.app-shell .sidebar .nav-link[aria-current="page"] { box-shadow: none !important; font-weight: 600; }
.app-shell .nav-link .icon { width: 17px; height: 17px; opacity: .8; }
.app-shell .sidebar .nav-count { background: var(--surface-subtle) !important; color: var(--ink-secondary) !important; font-size: 10px; }
.app-shell .sidebar-bottom { border-top: 1px solid var(--line); margin-top: auto; padding-top: 12px; }
.app-shell .account-dock { width: 100%; margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); gap: 4px; }
.app-shell .account-pill-wrap, .app-shell .account-dock-btn {
  background: transparent !important;
  border-color: transparent !important;
  border-radius: 5px !important;
  box-shadow: none !important;
}
.app-shell .account-pill-wrap { padding: 6px !important; }
.app-shell .account-pill-wrap:hover, .app-shell .account-dock-btn:hover { background: var(--hover) !important; }
.app-shell .account-pill-user { color: var(--ink) !important; font-size: 12px !important; font-weight: 600 !important; }
.app-shell .account-pill-tenant { color: var(--ink-muted) !important; }
.app-shell .account-dock-btn, .app-shell .account-pill-chevron { color: var(--ink-secondary) !important; }
.app-shell .account-pill-avatar { box-shadow: none; width: 28px; height: 28px; }
.app-shell .topbar { height: 64px; padding: 0 32px; border-bottom-color: var(--line); }
.app-shell .breadcrumb { font-size: 12px; gap: 12px; }
.app-shell .breadcrumb strong { color: var(--ink-secondary); font-weight: 500; }
.app-shell .topbar .btn { min-height: 32px; font-size: 12px; }
.app-shell .date-label { display: none; }
.app-shell .content { padding: 36px 40px 48px; max-width: 1600px; }
.workspace-page-header { display: flex; align-items: center; gap: 20px; margin-bottom: 28px; }
.workspace-page-header .topbar-search-wrap { margin-left: auto; }
.workspace-page-header .topbar-search-wrap input { min-height: 38px; width: 270px; }
.workspace-page-header .feature-page-tools { margin-left: auto; padding: 0; }
.workspace-page-header h1, .app-shell #settings-title {
  font-family: var(--workspace-heading);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.2;
}
.app-shell h2 { font-size: 15px; font-weight: 600; letter-spacing: -.015em; }
.app-shell h3 { font-size: 14px; font-weight: 600; }
.app-shell :is(.panel, .feature-panel, .op-card, .op-split-master, .op-split-detail) {
  border-radius: 8px;
  box-shadow: none;
}
.app-shell :is(.panel-head, .feature-panel-heading) {
  padding: 20px;
  background: var(--surface) !important;
  align-items: center;
}
.app-shell :is(.panel-head p, .feature-panel-heading p) { font-size: 12px; line-height: 1.6; max-width: 72ch; margin-top: 5px; }
.app-shell :is(.panel-body, .dialog-head, .dialog-footer) { background: var(--surface) !important; }
.app-shell :is(.toolbar, .attendance-filter-row) { background: var(--surface) !important; padding: 14px 18px; gap: 10px; }
.app-shell .toolbar > .inline { flex-wrap: wrap; min-width: 0; max-width: 100%; }
.app-shell :is(.data-table th, .stock-table th, .feature-grid-head, .project-task-header-row, .template-task-header, .tree-header) {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}
.app-shell :is(.data-table td, .stock-table td) { font-size: 13px; padding-top: 15px; padding-bottom: 15px; }
.app-shell .cell-title { font-weight: 500; }
.app-shell .cell-sub { font-size: 12px; line-height: 1.5; margin-top: 4px; }
.app-shell .cell-sub:empty { display: none; }
.app-shell :is(.btn, .tab) { border-radius: 5px; font-weight: 500; }
.app-shell .btn { min-height: 36px; font-size: 13px; }
.app-shell .btn--small { min-height: 32px; font-size: 12px; }
.app-shell .btn:hover { transform: none; }
.app-shell .btn.btn--primary { background: var(--ink) !important; color: var(--ink-contrast) !important; border-color: var(--ink) !important; }
.app-shell .btn.btn--primary:hover { opacity: .85; }
.app-shell :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), select, textarea) { border-radius: 5px; font-size: 13px; }
.app-shell :is(input, textarea, select):focus-visible, .dialog :is(input, textarea, select):focus-visible { outline: 2px solid var(--ink-secondary); outline-offset: 2px; box-shadow: none; }
.app-shell .topbar-search-wrap input#project-search:focus { width: 250px; box-shadow: none; }
.app-shell .badge { font-weight: 400; font-size: 11px; }
.app-shell .badge-project { background: transparent !important; border: 0; color: var(--ink-secondary) !important; padding-left: 0; white-space: normal; text-align: left; }
.app-shell .badge-independent { background: transparent !important; border: 0; }
.app-shell .notice { background: transparent; border: 0; border-left: 2px solid var(--line-strong); color: var(--ink-secondary); font-size: 12px; line-height: 1.65; padding: 8px 14px; }
.app-shell .empty, .app-shell .feature-empty { padding: 32px 24px; font-size: 13px; line-height: 1.6; }

/* Overview: a brief of current work rather than a row of dashboard cards. */
.app-shell .overview { font-family: var(--font); }
.app-shell .overview-metrics { gap: 0; margin-bottom: 8px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.app-shell .overview-metric, .app-shell .overview-metric:first-child {
  padding: 0 22px;
  min-height: 90px;
  background: transparent !important;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  transition: none;
}
.app-shell .overview-metric:first-child { padding-left: 0; border-left: 0; }
.app-shell .overview-metric:hover { transform: none; box-shadow: none; }
.app-shell .overview-metric dt { font-size: 12px; font-weight: 400; }
.app-shell .overview-metric strong { font-family: var(--workspace-heading); font-size: 36px; font-weight: 500; }
.app-shell .overview-metric dd span { font-size: 11px; font-weight: 400; }
.app-shell .overview-primary { gap: 26px; }
.app-shell .overview-layout { grid-template-columns: minmax(0, 1fr) 250px; gap: 32px; }
.app-shell .overview-section-heading { margin-bottom: 14px; }
.app-shell :is(.overview-attention, .overview-projects) { border-radius: 6px; }
.app-shell .overview-priority { padding: 17px 18px; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 12px; }
.app-shell .overview-priority-icon { width: 20px; height: 24px; border-radius: 0; background: transparent !important; }
.app-shell .overview-priority-icon .icon { width: 16px; height: 16px; }
.app-shell .overview-count { border-radius: 4px; font-size: 11px; min-width: 20px; height: 20px; }
.app-shell .overview-project-table .link-button, .app-shell .overview-priority .link-button { font-weight: 500; }
.app-shell .overview-project-table td { padding-top: 17px; padding-bottom: 17px; }
.app-shell .overview-more { font-size: 12px; padding: 12px 18px; }

/* Project/task rows: preserve the tree and actions, remove decorative stamps. */
.app-shell .project-worklist { border-radius: 6px; box-shadow: none; min-width: 0; grid-template-columns: minmax(0, 1fr); }
.app-shell .project-drop { min-width: 0; }
.app-shell .project-drop > summary { gap: 14px; position: relative; }
.app-shell .project-drop-name strong { font-weight: 600; font-size: 14px; }
.app-shell .project-drop-name small { font-size: 12px; margin-top: 2px; }
.app-shell .project-drop--independent { border-left-color: var(--line-strong); background: var(--surface) !important; }
.app-shell .project-task-list { background: var(--surface) !important; }
.app-shell .project-task-item, .app-shell .project-task-header-row { grid-template-columns: 22px minmax(150px, 1fr) 126px 156px 200px 100px; gap: 10px; }
.app-shell .project-task-item { min-height: 68px; border-radius: 0; }
.app-shell .project-completed-badge { border: 0; background: transparent !important; color: var(--ink-secondary); padding: 3px 0; border-radius: 0; box-shadow: none; font-weight: 500; text-transform: none; letter-spacing: 0; font-size: 12px; }
.app-shell .project-completed-badge svg { stroke: var(--success); }
.app-shell .task-stamp-toggle, .app-shell .task-stamp-toggle:hover {
  min-height: 32px;
  padding: 6px 9px;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-secondary);
  font: 500 12px var(--font);
  border-radius: 5px;
  opacity: 1;
  transform: none;
  filter: none;
  transition: background 120ms ease;
}
.app-shell .task-stamp-toggle.is-approved { color: var(--success); border-color: transparent; background: transparent; }
.app-shell .task-stamp-toggle:hover { background: var(--hover); }
.app-shell .task-stamp-toggle .icon { width: 14px; height: 14px; }
.app-shell .task-tree-tool-btn { font-size: 11px; min-height: 28px; border-style: solid; border-color: transparent; color: var(--ink-secondary); background: transparent; }
.app-shell .task-tree-tool-btn:hover { background: var(--hover); border-color: var(--line); }
.app-shell .task-tree-dropdown { border-top-style: solid; background: var(--surface-subtle); }
.app-shell .tree-header { text-transform: none; letter-spacing: 0; font-size: 12px; }
.app-shell .project-task-card.task-card--highlighted { animation: none; outline: 2px solid var(--ink-secondary); outline-offset: -2px; border-radius: 4px; }
.app-shell .template-task-header-row { font: 500 12px var(--font); text-transform: none; letter-spacing: 0; }
.app-shell .template-task-list { background: var(--surface); }

/* Inventory needs a real minimum width: keep its rail out of request rows. */
.app-shell .stock-workspace-layout { grid-template-columns: minmax(0, 1fr) 270px; gap: 28px; }
.app-shell .stock-workspace-main { min-width: 0; container-type: inline-size; }
.app-shell .stock-rail { min-width: 0; gap: 24px; }
.app-shell .stock-rail .feature-panel { border: 0; border-left: 1px solid var(--line); border-radius: 0; padding-left: 18px; background: transparent !important; overflow: visible; }
.app-shell .stock-rail-head { padding: 0 0 14px; }
.app-shell .stock-value-hero { margin: 0; padding: 0; background: transparent; border: 0; border-radius: 0; }
.app-shell .stock-value-label { font-size: 12px; font-weight: 400; text-transform: none; letter-spacing: 0; }
.app-shell .stock-value-hero-num { font-size: 26px; font-weight: 600; }
.app-shell .stock-value-split { display: grid; font-size: 12px; gap: 4px; }
.app-shell .stock-value-meter i { background: var(--ink); }
.app-shell .stock-actions-panel .stock-action-grid { display: grid; grid-template-columns: 1fr 1fr; padding: 0; gap: 8px; }
.app-shell .stock-actions-panel .stock-action-grid .btn { white-space: normal; }
.app-shell .stock-avatar { background: var(--ink-secondary); border-radius: 6px; }
.app-shell .stock-line-qty { font-size: 16px; font-weight: 600; }
.app-shell .stock-req-card .tree-leaf { flex-wrap: wrap; gap: 8px; }
.app-shell .stock-req-detail { padding-left: 34px; }
.app-shell .stock-req-card .tree-children { margin-left: 34px; }
.app-shell .stock-table thead th { font-weight: 500; text-transform: none; letter-spacing: 0; }
@container (max-width: 1000px) {
  .stock-workspace-main .project-drop > summary { grid-template-columns: minmax(0, 1fr) auto; }
  .stock-workspace-main .project-drop-count { display: none; }
  .stock-workspace-main .project-status-actions { flex-wrap: wrap; justify-content: flex-end; }
  .stock-workspace-main .project-task-header-row { display: none; }
  .stock-workspace-main .project-task-item { grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; }
  .stock-workspace-main .project-task-item > .project-task-copy { grid-column: 2; grid-row: 1; }
  .stock-workspace-main .project-task-item > .task-col-assigned { grid-column: 2; grid-row: 2; }
  .stock-workspace-main .project-task-item > .task-col-status-group { grid-column: 2; grid-row: 3; }
  .stock-workspace-main .project-task-item > .project-task-files { grid-column: 2; grid-row: 4; }
  .stock-workspace-main .project-task-item > .project-task-stamp-slot { grid-column: 3; grid-row: 1 / span 3; }
}

/* Settings: keep theme choices and previews, improve their reading size. */
.app-shell .settings-layout { max-width: 980px; }
.app-shell .settings-panel { border-radius: 8px; box-shadow: none; }
.app-shell .theme-list { max-height: 400px; gap: 10px; }
.app-shell .theme-card { background: var(--surface); border-radius: 6px; padding: 14px; gap: 10px; }
.app-shell .theme-card:hover { transform: none; }
.app-shell .theme-card.is-active { box-shadow: none; border-color: var(--ink); }
.app-shell .theme-card-copy p, .app-shell .theme-column-head, .app-shell .theme-column-head span { font-size: 11px; line-height: 1.5; }
.app-shell .theme-card-title strong { font-size: 13px; font-weight: 600; }
.app-shell .theme-card-footer, .app-shell .theme-default-btn, .app-shell .theme-active-mark { font-size: 11px; text-transform: none; letter-spacing: 0; }
.app-shell .theme-card-footer { border: 0; padding-top: 0; }
.app-shell .theme-swatches { height: 28px; border-radius: 4px; }
.app-shell .theme-system-row { border-radius: 5px; background: var(--surface); }
.app-shell .settings-option-desc { font-size: 12px; }
.app-shell .settings-option-label { font-size: 13px; }
.app-shell .attendance-filter-row label { font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: 0; }
.app-shell .op-card:hover { transform: none; box-shadow: none; }
.app-shell .op-kpi-ribbon { background: transparent !important; gap: 8px; }
.app-shell .op-kpi-pill { border-color: var(--line); border-radius: 5px; }
.app-shell .op-command-tabs { background: transparent !important; }
.app-shell .op-command-tabs { flex-wrap: wrap; row-gap: 0; }
.app-shell .op-command-tab { text-transform: none; letter-spacing: 0; font-weight: 500; }
.app-shell [data-page="admin"] .metrics-grid .panel { background: transparent !important; border: 0; border-radius: 0; border-bottom: 1px solid var(--line); padding: 0 0 22px !important; }
.app-shell [data-page="admin"] .metrics-grid .muted { text-transform: none !important; letter-spacing: 0 !important; font-weight: 400 !important; }
.app-shell .ai-hero-title { font-family: var(--workspace-heading); font-weight: 500; font-size: 30px; letter-spacing: -.035em; }
.app-shell .ai-prompt-wrap { border-radius: 10px; box-shadow: none; }
.app-shell .ai-history-label { text-transform: none; letter-spacing: 0; font-size: 12px; }
.app-shell .ai-history-item:hover { transform: none; }
.app-shell .chat-notif-banner { border-radius: 5px; background: var(--surface-subtle); }
.app-shell .chat-security-note { background: var(--surface-subtle); color: var(--ink-secondary); }
html[data-wallpaper="solid"] .app-shell .chat-messages { background: var(--surface-subtle) !important; background-image: none !important; }

/* Forms share the same simple controls as the login. */
.dialog { border-radius: 8px; box-shadow: 0 20px 80px rgb(0 0 0 / .18); }
.dialog .dialog-head, .dialog .dialog-footer { background: var(--surface) !important; padding: 22px 24px; }
.dialog .dialog-head h2 { font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.dialog .form-grid { gap: 20px 16px; }
.dialog .field label { font-size: 13px; font-weight: 500; }
.dialog .field input, .dialog .field select, .dialog .field textarea { border-radius: 5px; font-size: 14px; }
.dialog .btn { border-radius: 5px; }
.dialog .btn--primary { background: var(--ink) !important; color: var(--ink-contrast) !important; border-color: var(--ink) !important; }
.dialog::backdrop { background: rgb(0 0 0 / .3); }

@media (max-width: 1250px) {
  .app-shell .content { padding: 28px; }
  .app-shell .overview-layout { grid-template-columns: minmax(0, 1fr) 220px; gap: 24px; }
  .app-shell .overview-metric { padding: 0 12px; }
  .app-shell .project-drop > summary { grid-template-columns: minmax(0, 1fr) auto; }
  .app-shell .project-drop-count { display: none; }
  .app-shell .project-task-header-row { display: none; }
  .app-shell .project-task-item { grid-template-columns: 22px minmax(0, 1fr) 120px; gap: 8px 12px; }
  .app-shell .project-task-item > :nth-child(2) { grid-column: 2; }
  .app-shell .project-task-item > :nth-child(3) { grid-column: 2; grid-row: 2; }
  .app-shell .project-task-item > :nth-child(4) { grid-column: 2; grid-row: 3; }
  .app-shell .project-task-item > :nth-child(5) { grid-column: 3; grid-row: 2; }
  .app-shell .project-task-item > :nth-child(6) { grid-column: 3; grid-row: 1; }
  .app-shell .project-task-item > * { min-width: 0; }
}
@media (max-width: 1000px) {
  .app-shell .stock-workspace-layout { grid-template-columns: minmax(0, 1fr); }
  .app-shell .stock-rail { display: grid; grid-template-columns: 1fr 1fr; }
  .app-shell .topbar { padding: 0 20px; }
  .app-shell .topbar-right { gap: 8px; }
  .app-shell .overview-layout { grid-template-columns: minmax(0, 1fr); }
  .app-shell .overview-aside { border-left: 0; padding-left: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
  .app-shell .overview-workload { border-bottom: 0; }
}
@media (max-width: 900px) {
  :root { --sidebar-width: 0px; }
  .app-shell .sidebar { display: none; width: 240px; top: 64px; box-shadow: var(--shadow-popover); }
  .app-shell .sidebar.is-open { display: flex; }
  .app-shell .mobile-menu { display: inline-flex; }
}
@media (max-width: 760px) {
  .app-shell .content { padding: 24px 20px 40px; }
  .app-shell .topbar { min-height: 58px; height: auto; padding: 10px 14px; gap: 8px; flex-wrap: nowrap; }
  .app-shell .topbar > .inline { flex: 0 0 32px; }
  .app-shell .topbar-right { width: auto; flex: 1; justify-content: flex-end; flex-wrap: nowrap; min-width: 0; gap: 6px; }
  .app-shell #topbar-actions { flex-wrap: nowrap; gap: 6px; }
  .app-shell #topbar-actions .btn { display: inline-flex; padding-left: 9px; padding-right: 9px; font-size: 11px; }
  .app-shell #topbar-user-badge, .app-shell #topbar-tracker-sim-btn { display: none; }
  .app-shell .topbar .icon-btn { width: 32px; min-width: 32px; padding: 6px; }
  .app-shell .sidebar { padding-top: 24px; }
  .app-shell .sidebar { top: 58px; }
  .app-shell .workspace-page-header { margin-bottom: 22px; }
  .app-shell .workspace-page-header { flex-wrap: wrap; gap: 18px; }
  .workspace-page-header .topbar-search-wrap { margin-left: 0; width: 100%; }
  .workspace-page-header .topbar-search-wrap input#project-search,
  .workspace-page-header .topbar-search-wrap input#project-search:focus,
  .workspace-page-header .topbar-search-wrap input#service-search { width: 100%; }
  .workspace-page-header h1, .app-shell #settings-title { font-size: 26px; }
  .app-shell .overview-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 0; padding-bottom: 24px; }
  .app-shell .overview-metric:nth-child(odd) { padding-left: 0; border-left: 0; }
  .app-shell .overview-metric strong { font-size: 32px; }
  .app-shell .overview-aside { grid-template-columns: minmax(0, 1fr); }
  .app-shell .overview-priority { padding: 14px 12px; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; }
  .app-shell .overview-priority > :last-child { grid-column: 2; }
  .app-shell .project-drop > summary { grid-template-columns: minmax(0, 1fr); padding: 16px 12px; gap: 12px; }
  .app-shell .stock-workspace-main .project-drop > summary { grid-template-columns: minmax(0, 1fr); }
  .app-shell .stock-workspace-main .project-status-actions { justify-content: flex-start; min-width: 0; }
  .app-shell .project-status-actions { flex-wrap: wrap; justify-content: flex-start; gap: 6px; padding-left: 22px; }
  .app-shell .project-task-list { padding: 4px 10px 12px; }
  .app-shell .project-task-item { grid-template-columns: 20px minmax(0, 1fr) 90px; padding: 12px 0; }
  .app-shell .project-task-item > :nth-child(5) { grid-column: 2 / -1; grid-row: 4; }
  .app-shell .project-task-item > :nth-child(6) { grid-column: 3; grid-row: 1; }
  .app-shell .project-task-item .task-tree-tools { flex-wrap: wrap; }
  .app-shell .project-task-copy { white-space: normal; }
  .app-shell .project-task-copy .cell-title { white-space: normal; overflow: visible; }
  .app-shell .project-task-item > .task-col-assigned { white-space: normal; }
  .app-shell .data-table--expandable { display: block; min-width: 0; width: 100%; }
  .app-shell .data-table--expandable thead { display: none; }
  .app-shell .data-table--expandable tbody { display: block; }
  .app-shell .data-table--expandable .task-row-main { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 10px; padding: 18px 14px; border-bottom: 1px solid var(--line); }
  .app-shell .data-table--expandable .task-row-main td { border: 0; padding: 0; min-width: 0; max-width: 100%; height: auto; width: auto; white-space: normal; }
  .app-shell .task-row-main td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .app-shell .task-row-main td:nth-child(2) { grid-column: 2 / -1; grid-row: 1; }
  .app-shell .task-row-main td:nth-child(3) { grid-column: 2; grid-row: 2; }
  .app-shell .task-row-main td:nth-child(4) { grid-column: 2; grid-row: 3; }
  .app-shell .task-row-main td:nth-child(5) { grid-column: 2 / -1; grid-row: 4; }
  .app-shell .task-row-main td:nth-child(6) { grid-column: 2 / -1; grid-row: 5; }
  .app-shell .task-row-main td:nth-child(7) { grid-column: 3; grid-row: 2 / span 2; align-self: center; }
  .app-shell .task-row-main .cell-title { white-space: normal; text-align: left; font-size: 14px; }
  .app-shell .task-row-main .inline { flex-wrap: wrap; gap: 8px; }
  .app-shell .task-row-main .cell-sub { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .app-shell .task-row-main .task-col-status-group { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .app-shell .task-manager-drop-row { display: block; }
  .app-shell .task-manager-drop-row:not([style*="display: none"]) { display: block !important; }
  .app-shell .task-manager-drop-row > td { display: block; padding: 0; width: 100%; height: auto; }
  .app-shell .task-manager-drop-row > td .task-tree-dropdown { padding-left: 16px; }
  .app-shell .task-manager-drop-row .task-tree-node { min-width: 0; }
  .app-shell .task-manager-drop-row .task-tree-node-header { flex-wrap: wrap; }
  .app-shell .task-manager-drop-row .task-tree-input { min-width: 0; width: 100%; flex-basis: 100%; }
  .app-shell .task-row-main .project-task-files, .app-shell .project-task-item .project-task-files { display: flex; }
  .app-shell .stock-rail { grid-template-columns: minmax(0, 1fr); }
  .app-shell .theme-columns { grid-template-columns: minmax(0, 1fr); }
  .app-shell .theme-list { max-height: 360px; }
  .app-shell .theme-system-row { grid-template-columns: minmax(0, 1fr) auto; }
  .app-shell .theme-system-row > small { grid-column: 1 / -1; }
  .app-shell .settings-option { flex-wrap: wrap; gap: 12px; }
  .app-shell :is(.toolbar, .panel-head, .feature-panel-heading) { flex-wrap: wrap; }
  .app-shell .toolbar input { min-width: 0; max-width: 100%; }
  .app-shell .feature-panel, .app-shell .panel { min-width: 0; }
  .app-shell .content--tracker { padding: 0; }
  .app-shell .content--chats, .app-shell .content--assistant { padding: 0; }
  .dialog .dialog-head, .dialog .dialog-footer { padding: 18px 20px; }
}
/* Full-height tools keep their existing layout contracts. */
.app-shell .content--tracker, .app-shell .content--chats { max-width: none; padding: 0; }
.app-shell .content--assistant { padding: 0; max-width: none; }

/* Tracking starts with a person, with the map as their location context. */
.app-shell .content--tracker { height: calc(100dvh - 64px) !important; min-height: 0 !important; }
.app-shell .tracker-workspace {
  display: grid !important;
  grid-template-columns: 370px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  height: 100% !important;
}
.tracker-toolbar { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--line); background: var(--surface); }
.tracker-toolbar h1 { font: 600 24px/1.2 'Stack Sans Notch', var(--font); letter-spacing: -.035em; }
.tracker-toolbar p { color: var(--ink-muted); font-size: 12px; margin: 5px 0 0; }
.tracker-toolbar-actions { display: flex; gap: 8px; margin-left: auto; }
.tracker-mobile-switch { display: none; }
.app-shell .tracker-workspace .planner-sidebar { grid-column: 1; grid-row: 2; width: 100% !important; border-left: 0 !important; border-right: 1px solid var(--line) !important; min-height: 0; }
.app-shell .tracker-workspace .tracker-viewport-wrap { grid-column: 2; grid-row: 2; min-height: 0 !important; }
.app-shell .tracker-panel-tabs { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 10px 12px; gap: 2px !important; }
.app-shell .tracker-panel-tabs .panel-tab { min-width: 0; font-size: 12px; padding: 9px 6px; border-radius: 4px; }
.tracker-team-search { margin-top: 16px; }
.tracker-team-search input { width: 100%; min-height: 42px; }
.tracker-team-filters { display: flex; gap: 6px; padding: 12px 0 0; }
.tracker-team-filters button, .tracker-mobile-switch button { border: 1px solid transparent; background: transparent; color: var(--ink-secondary); padding: 7px 10px; border-radius: 4px; font-size: 12px; cursor: pointer; }
.tracker-team-filters button[aria-pressed="true"], .tracker-mobile-switch button[aria-pressed="true"] { border-color: var(--line); background: var(--surface-subtle); color: var(--ink); font-weight: 600; }
.tracker-team-count { margin: 12px 0 6px; color: var(--ink-muted); font-size: 12px; }
.app-shell .tracker-workspace .tech-card { padding: 16px 0; margin: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; background: var(--surface); }
.app-shell .tracker-workspace .tech-card.is-selected { background: var(--surface-subtle); box-shadow: inset 2px 0 var(--ink); padding: 16px 12px; margin: 0 -12px; }
.tech-select { display: flex; align-items: center; width: 100%; border: 0; padding: 0; gap: 10px; background: transparent; color: var(--ink); cursor: pointer; text-align: left; }
.tech-select .tech-card-text { display: grid; gap: 3px; min-width: 0; flex: 1; }
.tech-select .tech-card-text strong { font-size: 14px; font-weight: 600; }
.tech-select .tech-card-text > span { font-size: 12px; color: var(--ink-muted); }
.tracker-status { font-size: 11px; color: var(--ink-muted); white-space: nowrap; }
.tracker-status.is-online { color: var(--success); }
.tech-card-location { display: flex; align-items: flex-start; gap: 6px; margin: 12px 0 0 38px; color: var(--ink-secondary); font-size: 12px; }
.tech-card-location .icon { width: 14px; height: 16px; }
.tech-last-report, .tech-live-meta { font-size: 12px; color: var(--ink-muted); margin: 5px 0 0 38px; }
.app-shell .tracker-workspace .tech-card-footer { margin: 12px 0 0 38px; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tracker-empty { padding: 28px 8px; text-align: left; }
.tracker-empty p { color: var(--ink-muted); font-size: 13px; margin: 8px 0 16px; }
.tracker-selection { position: absolute; z-index: 500; bottom: 40px; left: 18px; right: 18px; display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 14px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); box-shadow: 0 3px 14px rgb(0 0 0 / .08); }
.tracker-selection strong { font-size: 14px; font-weight: 600; }
.tracker-selection p { margin: 4px 0 0; color: var(--ink-muted); font-size: 12px; }
.tracker-selection .btn { flex-shrink: 0; }
.tracker-map-tool { position: absolute; top: 64px; left: 16px; right: 16px; z-index: 510; background: var(--surface); border: 1px solid var(--line); border-radius: 5px; display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 12px; font-size: 13px; color: var(--ink); }
.tracker-map-tool .btn { flex-shrink: 0; }
.tracker-map-notice { position: absolute; z-index: 450; bottom: 0; left: 0; right: 0; padding: 7px 12px; background: var(--surface); color: var(--ink-muted); font-size: 11px; border-top: 1px solid var(--line); text-align: center; }
.app-shell .tracker-workspace .map-floating-bar { top: 12px; right: 12px; }
.app-shell .tracker-workspace .map-site-focus { max-width: 200px; font-size: 12px; }
.tracker-history-label { font-size: 11px; color: var(--ink-muted); }
.tracker-history-state { margin: 16px 0; padding: 12px; background: var(--surface-subtle); color: var(--ink-secondary); font-size: 12px; line-height: 1.6; border-radius: 4px; }
.app-shell #history-time-slider { appearance: auto !important; min-height: 24px; height: 24px; padding: 0; border: 0 !important; background: transparent !important; accent-color: var(--ink); }
.app-shell .playback-clock-title, .app-shell .scrub-telemetry-label { text-transform: none; letter-spacing: 0; font: 400 12px var(--font); }
.app-shell .playback-clock-display { font: 500 18px var(--font); background: transparent; padding: 0; }
.app-shell .scrub-telemetry-grid { grid-template-columns: 1fr 1fr; }
.app-shell .playback-controls-box, .app-shell .attendx-session-banner { box-shadow: none; border-radius: 5px; }
.app-shell .playback-marker-pulse { animation: none; }
.app-shell .tech-marker-dot { box-shadow: 0 0 0 2px rgb(255 255 255 / .8) !important; }
.app-shell .tech-marker-container.is-selected .tech-nametag { outline: 3px solid var(--ink); outline-offset: 3px; }
.tracker-workspace[data-panel="attendance"] .tech-marker-wrapper { visibility: hidden; }
.app-shell .site-diamond-marker [data-site-marker] > div { box-shadow: none !important; }
.app-shell .tracker-workspace .tech-card { display: block; }

/* A delivery register with one place to review its materials and next step. */
.delivery-intro { max-width: 72ch; color: var(--ink-muted); font-size: 13px; line-height: 1.6; margin: -12px 0 24px; }
.delivery-workspace .tabs span { margin-left: 6px; color: var(--ink-muted); }
.delivery-toolbar { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.delivery-search { flex: 1 1 260px; }
.delivery-search input { width: 100%; min-height: 40px; }
.delivery-status-filter { display: grid; gap: 5px; color: var(--ink-muted); font-size: 12px; font-weight: 400; }
.delivery-status-filter select { min-height: 40px; }
.delivery-list-head, .delivery-record { display: grid; grid-template-columns: minmax(180px, 1.35fr) minmax(120px, 1fr) 145px 145px; align-items: center; gap: 20px; }
.delivery-list-head { padding: 12px 20px; background: var(--surface-subtle); color: var(--ink-muted); font-size: 12px; }
.delivery-record { padding: 20px; border-bottom: 1px solid var(--line); }
.delivery-record:last-child { border-bottom: 0; }
.delivery-record-name, .delivery-materials { display: grid; gap: 4px; min-width: 0; }
.delivery-record-name .link-button { color: var(--ink); font-size: 14px; font-weight: 600; justify-self: start; }
.delivery-record-name > strong, .delivery-materials > strong { font-size: 13px; font-weight: 400; }
.delivery-record-name > span, .delivery-materials > span { color: var(--ink-muted); font-size: 12px; overflow-wrap: anywhere; }
.delivery-record .feature-status { justify-self: start; font-size: 11px; }
.delivery-materials > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.delivery-record > .btn { white-space: normal; }
.delivery-list-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding: 14px 20px; color: var(--ink-muted); font-size: 12px; }
.delivery-empty { padding: 50px 24px; max-width: 520px; margin: 0 auto; text-align: center; }
.delivery-empty p { color: var(--ink-muted); font-size: 13px; line-height: 1.7; margin: 10px 0 22px; }
.delivery-detail-head { display: grid; justify-items: start; gap: 14px; }
.delivery-detail-head p { color: var(--ink-secondary); font-size: 14px; line-height: 1.6; }
.delivery-steps { list-style: none; display: flex; gap: 0; padding: 0; margin: 24px 0; }
.delivery-steps li { flex: 1; border-top: 2px solid var(--line); padding-top: 9px; color: var(--ink-muted); font-size: 11px; }
.delivery-steps .is-done { border-color: var(--success); }
.delivery-steps .is-current { border-color: var(--ink); color: var(--ink); font-weight: 600; }
.delivery-details { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 0 0 26px; }
.delivery-details dt { color: var(--ink-muted); font-size: 12px; margin-bottom: 5px; }
.delivery-details dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.delivery-items-title { font-size: 14px; font-weight: 600; margin: 0 0 12px; }
.delivery-line-list { border-top: 1px solid var(--line); }
.delivery-line-list > div { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.delivery-line-list > div > span { display: grid; gap: 5px; font-size: 13px; }
.delivery-line-list > div > span:last-child { text-align: right; flex-shrink: 0; }
.delivery-line-list strong { font-weight: 500; }
.delivery-line-list small { color: var(--ink-muted); font-size: 12px; }
.delivery-extra { margin: 22px 0 0; border-top: 1px solid var(--line); padding-top: 16px; }
.delivery-extra summary { cursor: pointer; font-size: 13px; color: var(--ink-secondary); }
.delivery-extra[open] summary { margin-bottom: 18px; }
.delivery-form-intro, .delivery-quantity-hint { color: var(--ink-muted); font-size: 13px; line-height: 1.6; margin: 0 0 16px; }
.delivery-request-summary { padding: 14px; border: 1px solid var(--line); border-radius: 5px; margin: 16px 0; display: grid; gap: 4px; font-size: 13px; }
.delivery-request-summary span, .delivery-request-summary p { color: var(--ink-muted); font-size: 12px; }
@media (max-width: 1200px) {
  .delivery-list-head { display: none; }
  .delivery-record { grid-template-columns: minmax(0, 1fr) 150px; gap: 14px; }
  .delivery-record .delivery-materials { grid-column: 1; grid-row: 2; }
  .delivery-record > .feature-status { grid-column: 2; grid-row: 1; justify-self: end; }
  .delivery-record > .btn { grid-column: 2; grid-row: 2; }
}
@media (max-width: 600px) {
  .delivery-toolbar { padding: 16px; gap: 12px; }
  .delivery-search { flex-basis: 100%; }
  .delivery-status-filter { flex: 1; min-width: 0; }
  .delivery-status-filter select { max-width: 100%; }
  .delivery-record { grid-template-columns: minmax(0, 1fr); padding: 18px 16px; }
  .delivery-record .delivery-materials { grid-column: 1; grid-row: 2; }
  .delivery-record > .feature-status { grid-column: 1; grid-row: 3; justify-self: start; }
  .delivery-record > .btn { grid-column: 1; grid-row: 4; justify-self: start; }
  .delivery-list-footer > span:last-child { display: none; }
  .delivery-details { grid-template-columns: minmax(0, 1fr); }
  .delivery-steps { gap: 6px; }
  .delivery-steps li { font-size: 10px; }
}
@media (max-width: 1100px) and (min-width: 761px) {
  .app-shell .tracker-workspace { grid-template-columns: 320px minmax(0, 1fr); }
  .tracker-toolbar { padding: 16px; }
  .tracker-toolbar > div:first-child { flex: 1 1 240px; }
}
@media (max-width: 760px) {
  .app-shell .content--tracker { height: calc(100dvh - 58px) !important; }
  .app-shell .tracker-workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .tracker-toolbar { padding: 16px; gap: 12px; }
  .tracker-toolbar > div:first-child { width: 100%; }
  .tracker-toolbar-actions { margin-left: 0; }
  .tracker-mobile-switch { display: flex; margin-left: auto; }
  .tracker-mobile-switch button { padding: 8px; font-size: 11px; }
  .app-shell .tracker-workspace .planner-sidebar { grid-column: 1; grid-row: 2; height: 100% !important; max-height: 100% !important; border-top: 0 !important; border-right: 0 !important; }
  .app-shell .tracker-workspace .tracker-viewport-wrap { grid-column: 1; grid-row: 2; height: 100% !important; }
  .app-shell .tracker-workspace[data-mobile-view="team"] .tracker-viewport-wrap { display: none; }
  .app-shell .tracker-workspace[data-mobile-view="map"] .planner-sidebar { display: none; }
  .tracker-toolbar h1 { font-size: 22px; }
  .tracker-toolbar-actions .btn { font-size: 11px; padding: 6px 8px; }
  .tracker-toolbar-actions .icon { display: none; }
  .tracker-selection { bottom: 54px; left: 12px; right: 12px; padding: 12px; gap: 10px; flex-wrap: wrap; }
  .tracker-selection p { max-width: 26ch; }
  .app-shell .topbar #topbar-tracker-sim-btn { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .app-shell *, .dialog * { scroll-behavior: auto; }
  .app-shell .task-card--highlighted { animation: none; outline: 2px solid var(--ink-secondary); }
}
/* Layout corrections: align page tools and keep floating controls out of clipping containers. */
.app-shell .account-switcher-menu {
  position: fixed;
  inset: auto;
  margin: 0;
  width: min(320px, calc(100vw - 24px));
  box-sizing: border-box;
  border-radius: 8px;
}
.app-shell .account-switcher-option-copy { gap: 3px; }
.app-shell .account-switcher-option-meta { white-space: normal; line-height: 1.45; }
.app-shell .workspace-page-header h1 { margin: 0; }
.app-shell .workspace-page-header .tabs[aria-label="Task view"] {
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  flex: 0 0 auto;
  gap: 8px;
}
.app-shell .workspace-page-header .tabs[aria-label="Task view"] .tab { padding: 8px 12px; }
.app-shell .topbar-search-wrap input:is(#project-search, #service-search) {
  padding-left: 36px;
  padding-right: 12px;
  box-sizing: border-box;
}
.app-shell .topbar-search-icon { left: 12px; pointer-events: none; }
.app-shell .content > .attendance-page { padding: 0; margin: 0; max-width: none; }
.app-shell .attendance-policy-form {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 20px 24px;
  padding: 20px;
  border-top: 1px solid var(--line);
}
.attendance-policy-field { display: grid; gap: 8px; flex: 0 1 250px; min-width: 0; }
.app-shell .attendance-policy-field label { font-size: 12px; line-height: 1.5; font-weight: 500; letter-spacing: 0; text-transform: none; }
.attendance-hours-input { display: flex; align-items: center; gap: 10px; }
.app-shell .attendance-hours-input input { width: 90px; min-height: 36px; padding: 7px 10px; }
.attendance-hours-input span { color: var(--ink-muted); font-size: 12px; }
.app-shell .attendance-policy-form > .btn { min-height: 36px; }
.attendance-policy-note { flex-basis: 100%; margin: 0; font-size: 12px; line-height: 1.6; }
.app-shell .attendance-page .feature-panel-heading { flex-wrap: wrap; gap: 16px; }
.app-shell .attendance-page .feature-panel-heading > div:first-child { min-width: 0; }
/* Only show the send control when it is usable, leaving the microphone at the edge. */
.app-shell .ai-prompt-wrap:not(.has-input) .ai-send-button { display: none; }
.app-shell .ai-prompt-main-controls { min-width: 0; }
.app-shell .ai-prompt-main-controls textarea { flex: 1 1 0; min-width: 0; }
.app-shell .ai-prompt-main-controls .ai-mic-button { margin-left: auto; }
.app-shell .ai-chat-log .chat-message:not(.chat-message--user):not(.error-box) {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
@media (max-width: 760px) {
  .app-shell .workspace-page-header:has(.tabs[aria-label="Task view"]) { flex-wrap: nowrap; gap: 12px; }
  .app-shell .workspace-page-header .tabs[aria-label="Task view"] { gap: 0; }
  .app-shell .workspace-page-header .tabs[aria-label="Task view"] .tab { padding: 8px; font-size: 12px; }
  .attendance-policy-field { flex-basis: 100%; }
}
.app-shell .ai-history-sidebar { background: var(--surface); border-left-color: var(--line); }
.app-shell .ai-new-chat-btn { background: var(--surface-subtle); color: var(--ink); }
.app-shell .ai-recent-row.is-active, .app-shell .ai-recent-row:hover { background: var(--hover); }
.app-shell .ai-recent-title, .app-shell .ai-recent-row.is-active .ai-recent-title { color: var(--ink); }
.app-shell .ai-recents-heading, .app-shell .ai-recents-empty { color: var(--ink-muted); }
@media (max-width: 900px) {
  .app-shell .sidebar { max-width: 240px !important; }
}
.app-shell .ai-new-chat-btn:hover { background: var(--hover); color: var(--ink); }
.app-shell .ai-chat-log .chat-message--user { background: var(--surface-subtle) !important; }

/* Assistant controls and answers use one palette in every interaction state. */
.app-shell .ai-monitor-shell .ai-effort-picker > summary,
.app-shell .ai-monitor-shell .ai-effort-picker > summary:hover,
.app-shell .ai-monitor-shell .ai-effort-picker[open] > summary {
  background: var(--surface-subtle) !important;
  color: var(--ink) !important;
  border: 1px solid transparent;
  box-shadow: none;
}
.app-shell .ai-monitor-shell .ai-effort-picker > summary:hover,
.app-shell .ai-monitor-shell .ai-effort-picker[open] > summary {
  background: var(--hover) !important;
  border-color: var(--line-strong);
}
.app-shell .ai-monitor-shell :is(.ai-effort-pill-label, .ai-effort-pill-chevron, .ai-effort-pill-chevron .icon) { color: inherit !important; }
.app-shell .ai-monitor-shell .ai-effort-popover-menu {
  background: var(--surface) !important;
  color: var(--ink) !important;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-popover);
  border-radius: 10px;
  right: 0;
  left: auto;
}
.app-shell .ai-monitor-shell .ai-popover-tier-row { color: var(--ink); }
.app-shell .ai-monitor-shell .ai-popover-arrow { color: var(--ink-muted); }
.app-shell .ai-control-slider { background: var(--line-strong); }
.app-shell .ai-control-slider-fill { background: var(--ink); }
.app-shell .ai-control-slider-knob { background: var(--surface); border: 2px solid var(--ink); }
.app-shell .ai-control-slider-dot { background: var(--ink-muted); }
.app-shell .ai-monitor-shell :is(.ai-mic-button, .ai-transcriber-close) { color: var(--ink-secondary); background: transparent; }
.app-shell .ai-monitor-shell :is(.ai-mic-button, .ai-transcriber-close):hover { color: var(--ink); background: var(--hover); }
.app-shell .ai-monitor-shell .ai-send-button { color: var(--ink-contrast) !important; background: var(--ink) !important; box-shadow: none; }
.app-shell .ai-monitor-shell .ai-send-button:disabled { opacity: .45; cursor: wait; }
.app-shell .ai-new-chat-btn .icon { color: inherit; }
.app-shell .ai-monitor-shell .ai-response { font-size: 14px; line-height: 1.75; color: var(--ink); }
.ai-response > :first-child { margin-top: 0; }
.ai-response > :last-child { margin-bottom: 0; }
.ai-response :is(p, ul, ol, blockquote, pre, .ai-table-wrap) { margin: 0 0 16px; }
.ai-response :is(ul, ol) { padding-left: 22px; }
.ai-response li { margin: 4px 0; }
.ai-response li > :is(ul, ol, p) { margin-bottom: 6px; }
.app-shell .ai-response .ai-heading { margin: 24px 0 10px; font-size: 16px; line-height: 1.45; color: var(--ink); letter-spacing: 0; }
.app-shell .ai-response :is(h4, h5, h6).ai-heading { font-size: 14px; }
.app-shell .ai-response :is(a, .ai-record-link) { color: var(--ink) !important; text-decoration: underline; text-decoration-color: var(--ink-muted); text-underline-offset: 3px; }
.app-shell .ai-response .ai-record-link {
  display: inline;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent !important;
  font: inherit;
  line-height: inherit;
  text-align: left;
  white-space: normal;
  cursor: pointer;
}
.app-shell .ai-response :is(a, .ai-record-link):hover { text-decoration-color: var(--ink); }
.app-shell .ai-response .ai-inline-code { color: var(--ink); background: var(--surface-subtle); border: 1px solid var(--line); padding: 1px 4px; border-radius: 4px; font-size: .9em; }
.app-shell .ai-response .ai-code-block { background: var(--surface-subtle); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px; overflow-x: auto; max-width: 100%; white-space: pre; }
.app-shell .ai-response .ai-code-block code { background: transparent; color: inherit; font: 12px/1.65 var(--mono, monospace); }
.app-shell .ai-response blockquote { margin-left: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line-strong); color: var(--ink-secondary); }
.app-shell .ai-response .ai-table-wrap { max-width: 100%; overflow-x: auto; background: transparent !important; border: 1px solid var(--line); border-radius: 6px; }
.app-shell .ai-response .ai-markdown-table { width: 100%; border-collapse: collapse; background: transparent; font-size: 13px; }
.app-shell .ai-response .ai-markdown-table :is(th, td) { color: var(--ink) !important; padding: 11px 14px; border: 0; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.6; min-width: 100px; max-width: 360px; white-space: normal; overflow-wrap: anywhere; }
.app-shell .ai-response .ai-markdown-table th { background: var(--surface-subtle) !important; text-transform: none; font-weight: 600; letter-spacing: 0; }
.app-shell .ai-response .ai-markdown-table tbody tr { background: transparent !important; }
.app-shell .ai-response .ai-markdown-table tbody tr:last-child td { border-bottom: 0; }
.app-shell .ai-message-sources { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.app-shell .ai-message-sources .file-chip { color: var(--ink); background: var(--surface-subtle); white-space: normal; max-width: 100%; line-height: 1.5; }
.app-shell .ai-response-meta { color: var(--ink-muted); font-size: 11px; line-height: 1.6; margin-top: 12px; }
@media (max-width: 760px) {
  .app-shell .ai-response .ai-markdown-table :is(th, td) { min-width: 110px; padding: 10px 12px; }
  .app-shell .ai-monitor-shell .ai-effort-popover-menu { right: -36px; }
}
.ai-model-field { display: grid; gap: 7px; margin-top: 18px; font-size: 12px; color: var(--ink-secondary); }
.app-shell .ai-monitor-shell .ai-model-field select { width: 100%; min-height: 36px; background: var(--surface-subtle); color: var(--ink); border: 1px solid var(--line-strong); padding: 6px 8px; font-size: 12px; }
.app-shell .ai-monitor-shell .ai-start-layout .ai-prompt-wrap:focus-within { border-color: var(--ink-muted) !important; box-shadow: none !important; }
@media (max-width: 560px) {
  .app-shell .ai-prompt-main-controls { display: grid; grid-template-columns: 28px minmax(0, 1fr) 32px 32px; gap: 6px; }
  .app-shell .ai-prompt-main-controls .ai-composer-mark { grid-column: 1; grid-row: 1; }
  .app-shell .ai-prompt-main-controls textarea { grid-column: 2 / -1; grid-row: 1; min-height: 40px; }
  .app-shell .ai-prompt-main-controls .ai-effort-picker { grid-column: 1 / 3; grid-row: 2; justify-self: start; }
  .app-shell .ai-prompt-main-controls .ai-mic-button { grid-column: 4; grid-row: 2; }
  .app-shell .ai-prompt-wrap.has-input .ai-mic-button { grid-column: 3; }
  .app-shell .ai-prompt-main-controls .ai-send-button { grid-column: 4; grid-row: 2; }
  .app-shell .ai-monitor-shell .ai-effort-popover-menu { right: auto; left: 0; width: min(290px, calc(100vw - 42px)); }
}
