/* Apple minimal visual language for operational work surfaces. */
:root {
  --apple-ink: #1d1d1f;
  --apple-muted: #6e6e73;
  --apple-subtle: #86868b;
  --apple-canvas: #f5f5f7;
  --apple-surface: #ffffff;
  --apple-line: #d2d2d7;
  --apple-blue: #0071e3;
  --apple-blue-soft: #e8f2fc;
  --apple-sidebar: #f2f2f4;
  --apple-chooser: #f1f2f4;
  --apple-green: #2f735f;
  --apple-red: #d70015;
  --apple-shadow: 0 12px 30px rgba(0, 0, 0, .06);
  --apple-radius: 8px;
  --apple-control: 44px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--apple-canvas); }
body {
  color: var(--apple-ink);
  background: var(--apple-canvas);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(0, 113, 227, .28);
  outline-offset: 2px;
}

/* Gateway login and module chooser. */
section.login-page {
  min-height: 100svh;
  grid-template-columns: minmax(0, 1.15fr) minmax(390px, .85fr);
  gap: 0;
  background: var(--apple-canvas);
}
section.login-page .login-brand {
  position: relative;
  isolation: isolate;
  justify-content: space-between;
  padding: clamp(42px, 6vw, 88px) clamp(28px, 7vw, 112px);
  background: #1d1d1f;
  color: #f5f5f7;
}
section.login-page .login-brand::before { display: none; }
section.login-page .brand-logo { width: 166px; }
section.login-page .brand-message { max-width: 720px; }
section.login-page .system-name h1,
section.login-page .slogan h2 { font-family: inherit; letter-spacing: 0; }
section.login-page .system-name h1 { font-size: clamp(36px, 4vw, 58px); font-weight: 650; line-height: 1.12; }
section.login-page .system-name p { color: #a1a1a6; letter-spacing: .14em; }
section.login-page .slogan { margin-top: clamp(42px, 8vh, 96px); }
section.login-page .slogan h2 { font-size: clamp(25px, 2.4vw, 36px); font-weight: 600; }
section.login-page .slogan p { color: #a1a1a6; letter-spacing: .16em; }
section.login-page .login-form {
  width: min(430px, calc(100% - 48px));
  margin: auto;
  padding: 40px;
  background: var(--apple-surface);
  border: 1px solid var(--apple-line);
  border-radius: var(--apple-radius);
  box-shadow: var(--apple-shadow);
}
section.login-page .login-form > img { display: block; width: 112px; margin: 0 0 36px; }
section.login-page .login-form > small { color: var(--apple-subtle); letter-spacing: .16em; }
section.login-page .login-form h2 { margin: 12px 0 8px; color: var(--apple-ink); font-size: 30px; font-weight: 650; }
section.login-page .login-form > p { color: var(--apple-muted); margin-bottom: 30px; }
section.login-page .login-form label { color: var(--apple-ink); font-size: 13px; font-weight: 600; }
section.login-page .login-form input {
  min-height: var(--apple-control);
  margin-top: 8px;
  border: 1px solid var(--apple-line);
  border-radius: 6px;
  background: var(--apple-surface);
  color: var(--apple-ink);
  box-shadow: none;
}
section.login-page .login-form input:focus { border-color: var(--apple-blue); box-shadow: 0 0 0 3px rgba(0, 113, 227, .12); }
section.login-page .login-form button[type="submit"] {
  min-height: var(--apple-control);
  margin-top: 8px;
  border: 0;
  border-radius: 6px;
  background: var(--apple-blue);
  box-shadow: none;
  font-weight: 600;
}
section.login-page .login-form .login-tip { color: var(--apple-subtle); margin-top: 34px; }
section.login-page .password-field { min-height: var(--apple-control); }
section.login-page #togglePassword,
section.login-page .toggle-password {
  width: 28px !important;
  height: 28px !important;
  right: 10px;
  top: 50%;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 6px;
  background: transparent !important;
  box-shadow: none !important;
  transform: translateY(-50%);
}
section.login-page #togglePassword:hover,
section.login-page .toggle-password:hover { background: var(--apple-blue-soft) !important; }
section.login-page #togglePassword img,
section.login-page .toggle-password img { width: 18px; height: 18px; object-fit: contain; }

#homeView.home { min-height: 100svh; background: var(--apple-canvas); }
#homeView.home > header {
  height: 72px;
  padding: 0 clamp(20px, 5vw, 72px);
  background: rgba(255, 255, 255, .86);
  border-bottom: 1px solid var(--apple-line);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .02);
  backdrop-filter: saturate(180%) blur(18px);
}
#homeView .brand strong { color: var(--apple-ink); font-weight: 600; }
#homeView .brand small, #homeView .user small { color: var(--apple-muted); }
#homeView .user button { color: var(--apple-muted); }
#homeView .home-body { width: min(1180px, calc(100% - 48px)); padding: clamp(48px, 8vh, 92px) 0 72px; }
#homeView .welcome p { color: var(--apple-subtle); letter-spacing: .12em; }
#homeView .welcome h1 { color: var(--apple-ink); font-size: clamp(34px, 4vw, 52px); font-weight: 650; letter-spacing: 0; }
#homeView .welcome > span { color: var(--apple-muted); }
#homeView .modules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-top: 38px;
  overflow: hidden;
  border: 1px solid var(--apple-line);
  border-radius: 12px;
  background: var(--apple-surface);
}
#homeView .module {
  min-height: 190px;
  border: 0;
  border-right: 1px solid var(--apple-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition: background-color .2s ease;
}
#homeView .module:last-child { border-right: 0; }
#homeView .module:hover { background: #f8f8fa; box-shadow: none; transform: none; }
#homeView .module:focus-visible { background: #f5f8fc; box-shadow: inset 0 0 0 2px rgba(0, 113, 227, .34); outline: none; }
#homeView .module .module-icon { color: var(--module-accent, var(--apple-blue)); background: transparent; }
#homeView .module.fast { --module-accent: var(--apple-green); }
#homeView .module.quality { --module-accent: var(--apple-blue); }
#homeView .module p { color: var(--apple-subtle); letter-spacing: .1em; }
#homeView .module h2 { color: var(--apple-ink); font-weight: 650; }
#homeView .module span { color: var(--apple-muted); }
#homeView .module > b { color: var(--apple-blue); }
#homeView aside { border-color: var(--apple-line); background: rgba(255, 255, 255, .62); color: var(--apple-muted); }
#homeView .home-workspace, #homeView .todo-panel { border-color: var(--apple-line); background: var(--apple-surface); box-shadow: none; }
#homeView .encouragement-box { background: var(--apple-canvas); border-color: var(--apple-line); color: var(--apple-ink); }
#homeView .encouragement-box span, #homeView .todo-state span { color: var(--apple-muted); }

/* Shared module chrome. */
.app, .app-shell { background: var(--apple-canvas); color: var(--apple-ink); }
.app header, .app-shell .topbar {
  background: rgba(255, 255, 255, .86);
  border-bottom: 1px solid var(--apple-line);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .02);
  backdrop-filter: saturate(180%) blur(18px);
}
.app .module-context a, .app-shell .module-context a { color: var(--apple-muted); }
.app .module-context b, .app-shell .module-context b { color: var(--apple-ink); }
.app .sidebar, .app-shell .sidebar { background: #1d1d1f; color: #f5f5f7; }
.app .sidebar .brand, .app-shell .sidebar .logo-row { border-color: rgba(255, 255, 255, .14); }
.app .sidebar nav button, .app-shell .sidebar nav button { color: #a1a1a6; border-radius: 6px; }
.app .sidebar nav button:hover, .app .sidebar nav button.active,
.app-shell .sidebar nav button:hover, .app-shell .sidebar nav button.active { background: #2d2d2f; color: #fff; }
.app .sidebar nav button.active::before, .app-shell .sidebar nav button.active::before { background: var(--apple-blue); }
.app .sidebar .side-foot, .app-shell .sidebar .sidebar-bottom { border-color: rgba(255, 255, 255, .14); }
.app .sidebar .side-foot button, .app-shell .sidebar .user-block { color: #a1a1a6; }
.app .content, .app-shell .content { max-width: 1480px; }
.app .page-head h2, .app-shell .section-heading h2 { color: var(--apple-ink); font-weight: 650; letter-spacing: 0; }
.app .page-head p, .app-shell .section-heading p, .app .panel-head p, .app-shell .panel-head p { color: var(--apple-muted); }
.app .button, .app-shell .btn { min-height: var(--apple-control); border-radius: 6px; box-shadow: none; font-weight: 600; }
.app .button.primary, .app-shell .btn.primary { border-color: var(--apple-blue); background: var(--apple-blue); }
.app .button.secondary, .app .button.module-switch, .app-shell .btn.ghost, .app-shell .btn.module-switch { border-color: var(--apple-line); background: var(--apple-surface); color: var(--apple-ink); }
.app .button.secondary:hover, .app .button.module-switch:hover, .app-shell .btn.ghost:hover, .app-shell .btn.module-switch:hover { border-color: var(--apple-blue); color: var(--apple-blue); background: var(--apple-blue-soft); }
.app .panel, .app-shell .panel,
.app .metric, .app-shell .metric-card,
.app-shell .knowledge-card, .app-shell .member-list article,
.app-shell .member-summary > div {
  border: 1px solid var(--apple-line);
  border-radius: var(--apple-radius);
  background: var(--apple-surface);
  box-shadow: none;
}
.app .panel:hover, .app-shell .panel:hover { box-shadow: var(--apple-shadow); }
.app .metric strong, .app-shell .metric-card strong { color: var(--apple-ink); }
.app .filters > label, .app .filters > select, .app-shell .filter-bar select, .app-shell .search-box,
.app .filters input, .app-shell .section-heading select {
  min-height: var(--apple-control);
  border: 1px solid var(--apple-line);
  border-radius: 6px;
  background: var(--apple-surface);
  color: var(--apple-ink);
}
.app .table-panel, .app-shell .table-panel { overflow: hidden; }
.app th, .app-shell th { background: #fafafa; color: var(--apple-muted); border-color: var(--apple-line); }
.app td, .app-shell td { border-color: #e8e8ed; }
.app tbody tr:hover, .app-shell tbody tr:hover { background: #fafafa; }
.app .row-button, .app-shell .row-action, .app-shell .text-btn { color: var(--apple-blue); }

/* Fast Response. */
.app.meeting-display .metric, .app.meeting-display .panel { border-radius: var(--apple-radius); }
.app.meeting-display .metric { min-height: 112px; }
.app.meeting-display .kanban-col { background: #fafafa; border-top-color: var(--apple-green); border-radius: 6px; }
.app.meeting-display .issue-card { border-radius: 6px; box-shadow: none; }
.app.meeting-display .meeting-clock { background: #1d1d1f; border-radius: 6px; }
.app.meeting-display .agenda article { background: #2d2d2f; border-radius: 6px; }
.app.meeting-display .dialog, .app.meeting-display .modal-dialog { border-radius: var(--apple-radius); box-shadow: 0 24px 64px rgba(0, 0, 0, .18); }
.app.meeting-display .dialog-head, .app.meeting-display .modal-head { border-color: var(--apple-line); }
.app.meeting-display .tabs { background: #fafafa; border-color: var(--apple-line); }
.app.meeting-display .tabs button { min-height: 48px; color: var(--apple-muted); }
.app.meeting-display .tabs button.active { color: var(--apple-blue); border-color: var(--apple-blue); box-shadow: inset 0 2px 0 var(--apple-blue); }
.app.meeting-display .form-grid input, .app.meeting-display .form-grid select, .app.meeting-display .form-grid textarea,
.app.meeting-display .risk-scores select { min-height: var(--apple-control); border-color: var(--apple-line); border-radius: 6px; }
.app.meeting-display .risk-builder { background: #fafafa; border-color: var(--apple-line); border-radius: 6px; }
.app.meeting-display .risk-result { background: #1d1d1f; border-radius: 6px; }

/* Quality 8D. */
.app-shell.meeting-display .metric-card::after { display: none; }
.app-shell.meeting-display .method-card { background: #2d2d2f; border-color: rgba(255,255,255,.14); border-radius: 6px; }
.app-shell.meeting-display .method-card:hover { background: #3a3a3c; }
.app-shell.meeting-display .stage-bar, .app-shell.meeting-display .stage-col.active .stage-bar { background: var(--apple-blue); }
.app-shell.meeting-display .standard-intro { background: #1d1d1f; border-radius: 6px; }
.app-shell.meeting-display .knowledge-featured { background: #1d1d1f; border-radius: 6px; }
.app-shell.meeting-display .form-tabs { background: #fafafa; border-color: var(--apple-line); }
.app-shell.meeting-display .form-tabs button { color: var(--apple-muted); }
.app-shell.meeting-display .form-tabs button.active { color: var(--apple-blue); border-color: var(--apple-blue); box-shadow: inset 0 2px 0 var(--apple-blue); }
.app-shell.meeting-display .form-tabs button.locked, .app-shell.meeting-display .form-tabs button.stage-locked { color: var(--apple-subtle); }
.app-shell.meeting-display .modal-dialog, .app-shell.meeting-display .dialog { border-radius: var(--apple-radius); box-shadow: 0 24px 64px rgba(0, 0, 0, .18); }
.app-shell.meeting-display .modal-backdrop, .app-shell.meeting-display .backdrop { background: rgba(29, 29, 31, .55); backdrop-filter: blur(8px); }
.app-shell.meeting-display .form-grid input, .app-shell.meeting-display .form-grid select, .app-shell.meeting-display .form-grid textarea,
.app-shell.meeting-display .problem-grid input, .app-shell.meeting-display .problem-grid textarea,
.app-shell.meeting-display .risk-scores select { border-color: var(--apple-line); border-radius: 6px; background: var(--apple-surface); }
.app-shell.meeting-display .phase-intro { background: #f5f5f7; border-left-color: var(--apple-blue); border-radius: 0 6px 6px 0; }
.app-shell.meeting-display .quality-review, .app-shell.meeting-display .quality-gate-card { border-color: var(--apple-line); border-radius: 6px; background: #fafafa; }
.app-shell.meeting-display .quality-score-ring, .app-shell.meeting-display .quality-review-summary b { color: var(--apple-blue); }
.app-shell.meeting-display .attachment-preview { border-radius: 6px; }

/* Keep dense operational tables usable without widening the viewport. */
.table-wrap, .d3-table-wrap, .wi-steps-wrap { max-width: 100%; overflow-x: auto; }
@media (max-width: 760px) {
  section.login-page { grid-template-columns: 1fr; }
  section.login-page .login-brand { display: none; }
  section.login-page .login-form { width: min(430px, calc(100% - 32px)); padding: 30px 22px; }
  #homeView.home .home-body { width: min(100% - 32px, 680px); padding-top: 44px; }
  #homeView .modules { grid-template-columns: 1fr; border-radius: 10px; }
  #homeView .module { min-height: 148px; border-right: 0; border-bottom: 1px solid var(--apple-line); }
  #homeView .module:last-child { border-bottom: 0; }
  .app .content, .app-shell .content { padding: 22px 14px 42px; }
  .app .page-head, .app-shell .section-heading { align-items: flex-start; gap: 14px; }
  .app .page-head h2, .app-shell .section-heading h2 { font-size: 22px; }
  .app-shell.meeting-display .dashboard-grid { grid-template-columns: minmax(0, 1fr); min-width: 0; }
  .app-shell.meeting-display .dashboard-grid > *, .app-shell.meeting-display .wide-panel,
  .app-shell.meeting-display .stage-chart { min-width: 0; max-width: 100%; }
  .app-shell.meeting-display .risk-list, .app-shell.meeting-display .risk-item,
  .app-shell.meeting-display .risk-item > * { min-width: 0; max-width: 100%; }
  .app-shell.meeting-display .risk-item strong, .app-shell.meeting-display .risk-item small { overflow-wrap: anywhere; white-space: normal; }
  .app .top-actions .secondary, .app-shell .top-actions .ghost { display: none; }
  .app-shell.meeting-display .top-actions .module-switch,
  .app-shell.meeting-display .top-actions [data-new] {
    position: relative;
    flex: 0 0 40px;
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0;
    font-size: 0;
  }
  .app-shell.meeting-display .top-actions .module-switch::before,
  .app-shell.meeting-display .top-actions [data-new]::before {
    display: block;
    font-size: 20px;
    line-height: 1;
  }
  .app-shell.meeting-display .top-actions .module-switch::before { content: "↗"; }
  .app-shell.meeting-display .top-actions [data-new]::before { content: "+"; }
  .software-rights-notice {
    padding: 4px 8px;
    border: 1px solid var(--apple-line);
    border-radius: 5px;
    background: rgba(245, 245, 247, .94);
  }
  .app .dialog, .app .modal-dialog, .app-shell .dialog, .app-shell .modal-dialog { border-radius: 0; }
  .app .dialog-body, .app-shell .modal-body { padding: 18px 14px; }
  .app .form-grid, .app-shell .form-grid { grid-template-columns: 1fr; }
  .app .span-2, .app-shell .span-2 { grid-column: span 1; }
  .app .tabs, .app-shell .form-tabs { justify-content: flex-start; overflow-x: auto; }
  .app .tabs button, .app-shell .form-tabs button { flex: 0 0 auto; min-height: 48px; font-size: 13px; }
}

/* Apple-light authentication surface and compact chooser greeting. */
section.login-page.apple-light-login { grid-template-columns: minmax(0, 1.08fr) minmax(380px, .92fr); background: var(--apple-chooser); }
section.login-page.apple-light-login .login-brand { justify-content: space-between; padding: clamp(42px, 7vw, 96px) clamp(28px, 8vw, 120px); background: var(--apple-surface); color: var(--apple-ink); border-right: 1px solid rgba(29,29,31,.09); }
section.login-page.apple-light-login .brand-logo { width: 166px; }
section.login-page.apple-light-login .brand-message { max-width: 680px; }
section.login-page.apple-light-login .system-name h1, section.login-page.apple-light-login .slogan h2 { color: var(--apple-ink); }
section.login-page.apple-light-login .system-name h1 { font-size: clamp(34px, 4vw, 56px); line-height: 1.1; }
section.login-page.apple-light-login .system-name p, section.login-page.apple-light-login .slogan p { color: var(--apple-subtle); }
section.login-page.apple-light-login .slogan { margin-top: clamp(36px, 8vh, 88px); }
section.login-page.apple-light-login .slogan h2 { font-size: clamp(24px, 2.6vw, 34px); }
section.login-page.apple-light-login .login-form { width: min(430px, calc(100% - 52px)); padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
section.login-page.apple-light-login .login-form > img { width: 106px; margin-bottom: 30px; }
section.login-page.apple-light-login .login-form > small { color: var(--apple-blue); font-weight: 700; }
section.login-page.apple-light-login .login-form h2 { margin-top: 12px; font-size: 32px; }
section.login-page.apple-light-login .login-form input { background: rgba(255,255,255,.78); }
section.login-page.apple-light-login .login-form button[type="submit"] { background: var(--apple-blue); }
section.login-page.apple-light-login .login-form .login-tip { margin-top: 28px; }
#homeView.home[data-scope="problem-management"] .welcome h1 { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: clamp(26px, 3.6vw, 48px); }
#homeView.home[data-scope="problem-management"] #userName { display: block; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) {
  section.login-page.apple-light-login { grid-template-columns: 1fr; }
  section.login-page.apple-light-login .login-brand { display: none; }
  section.login-page.apple-light-login .login-form { width: min(430px, calc(100% - 32px)); padding: 28px 22px; }
  #homeView.home[data-scope="problem-management"] .welcome h1 { font-size: clamp(22px, 7vw, 32px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; animation-duration: 0s !important; animation-iteration-count: 1 !important; }
}

/* Refined system chooser: two quiet workspaces on an Apple-light canvas. */
#homeView.home[data-scope="problem-management"] { background: var(--apple-chooser); }
#homeView.home[data-scope="problem-management"] > header { height: 76px; padding-inline: clamp(22px, 6vw, 88px); background: rgba(255,255,255,.9); border-bottom-color: rgba(29,29,31,.1); }
#homeView.home[data-scope="problem-management"] .home-body { width: min(1160px, calc(100% - 48px)); padding: clamp(52px, 9vh, 104px) 0 80px; }
#homeView.home[data-scope="problem-management"] .welcome { max-width: 760px; }
#homeView.home[data-scope="problem-management"] .welcome p { margin-bottom: 16px; color: var(--apple-blue); font-size: 11px; font-weight: 700; letter-spacing: .16em; }
#homeView.home[data-scope="problem-management"] .welcome h1 { margin-bottom: 10px; font-size: clamp(38px, 5vw, 60px); line-height: 1.08; letter-spacing: -.02em; }
#homeView.home[data-scope="problem-management"] .welcome > span { font-size: 16px; }
#homeView.home[data-scope="problem-management"] .modules { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 44px; overflow: visible; border: 0; border-radius: 0; background: var(--apple-surface); }
#homeView.home[data-scope="problem-management"] .module { min-height: 212px; padding: 28px 30px; border: 1px solid rgba(29,29,31,.1); border-radius: 14px; background: var(--apple-surface); box-shadow: 0 1px 2px rgba(29,29,31,.04); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background-color .2s ease; }
#homeView.home[data-scope="problem-management"] .module:last-child { border-right: 1px solid rgba(29,29,31,.1); }
#homeView.home[data-scope="problem-management"] .module:hover { transform: translateY(-2px); border-color: rgba(0,113,227,.28); background: #fff; box-shadow: 0 12px 28px rgba(29,29,31,.08); }
#homeView.home[data-scope="problem-management"] .module:focus-visible { box-shadow: inset 0 0 0 2px rgba(0,113,227,.35), 0 8px 22px rgba(29,29,31,.06); }
#homeView.home[data-scope="problem-management"] .module .module-icon { width: 42px; height: 42px; margin-bottom: 28px; border-radius: 12px; background: #f5f5f7; }
#homeView.home[data-scope="problem-management"] .module.fast .module-icon { background: #edf6f1; }
#homeView.home[data-scope="problem-management"] .module.quality .module-icon { background: var(--apple-blue-soft); }
#homeView.home[data-scope="problem-management"] .module h2 { margin-bottom: 10px; font-size: 25px; }
#homeView.home[data-scope="problem-management"] .module span { max-width: 330px; line-height: 1.7; }
#homeView.home[data-scope="problem-management"] .module > b { margin-top: 24px; }
#homeView.home[data-scope="problem-management"] aside { margin-top: 18px; padding: 14px 16px; border: 1px solid rgba(29,29,31,.08); border-radius: 10px; background: rgba(255,255,255,.72); }
#homeView.home[data-scope="problem-management"] .home-workspace { margin-top: 36px; padding: 22px; border: 1px solid rgba(29,29,31,.09); border-radius: 14px; background: rgba(255,255,255,.82); }
#homeView.home[data-scope="problem-management"] .todo-panel { border-radius: 10px; }
@media (max-width: 760px) {
  #homeView.home[data-scope="problem-management"] .home-body { width: min(100% - 32px, 680px); padding-top: 44px; }
  #homeView.home[data-scope="problem-management"] .modules { grid-template-columns: 1fr; gap: 12px; }
  #homeView.home[data-scope="problem-management"] .module { min-height: 178px; padding: 22px; }
  #homeView.home[data-scope="problem-management"] .module .module-icon { margin-bottom: 20px; }
  #homeView.home[data-scope="problem-management"] .module:last-child { border-bottom: 1px solid rgba(29,29,31,.1); }
  #homeView.home[data-scope="problem-management"] .home-workspace { padding: 16px; }
}

/* White workspace refinement: color belongs to actions and status, not large chrome. */
.app .sidebar, .app-shell .sidebar{background:var(--apple-surface);color:var(--apple-ink);border-right:1px solid var(--apple-line)}
.app .sidebar .brand, .app-shell .sidebar .logo-row{border-color:var(--apple-line)}
.app .sidebar .brand img, .app-shell .sidebar .logo-row img{filter:none}
.app .sidebar nav button, .app-shell .sidebar nav button{background:transparent;color:var(--apple-ink)}
.app .sidebar nav button:hover, .app .sidebar nav button.active, .app-shell .sidebar nav button:hover, .app-shell .sidebar nav button.active{background:#f2f2f7;color:var(--apple-ink)}
.app .sidebar .side-foot, .app-shell .sidebar .sidebar-bottom{border-color:var(--apple-line)}
.app .sidebar .side-foot button, .app-shell .sidebar .user-block{color:var(--apple-muted)}
.app.meeting-display .metric::after{display:none}
.app.meeting-display .metric, .app-shell.meeting-display .metric-card{box-shadow:0 1px 2px rgba(0,0,0,.03)}
.app.meeting-display .kanban-col{background:#fff;border-top:1px solid var(--apple-line);border-radius:var(--apple-radius)}
.app.meeting-display .meeting-clock, .app.meeting-display .agenda article{background:#fff;color:var(--apple-ink);border:1px solid var(--apple-line)}
.app.meeting-display .risk-result{background:#fff;color:var(--apple-ink);border:1px solid var(--apple-line)}
.app-shell.meeting-display .method-card, .app-shell.meeting-display .standard-intro, .app-shell.meeting-display .knowledge-featured{background:#fff;color:var(--apple-ink);border:1px solid var(--apple-line)}
.app-shell.meeting-display .method-card:hover{background:#f2f2f7}
.app-shell.meeting-display .standard-intro strong, .app-shell.meeting-display .knowledge-featured strong{color:var(--apple-ink)}
.app-shell.meeting-display .standard-intro p, .app-shell.meeting-display .knowledge-featured p{color:var(--apple-muted)}

/* Light navigation material: the sidebar is structure, blue is reserved for state. */
.app .sidebar, .app-shell .sidebar{background:#f5f5f7;color:#515154;border-right:1px solid #dfe1e5}
.app .sidebar .brand, .app-shell .sidebar .logo-row{border-color:#dfe1e5}
.app .sidebar nav button, .app-shell .sidebar nav button{background:transparent;color:#515154;border-radius:6px}
.app .sidebar nav button:hover, .app-shell .sidebar nav button:hover{background:#eef1f5;color:#3a3a3c}
.app .sidebar nav button.active, .app-shell .sidebar nav button.active{background:#e9eef8;color:#315dab}
.app .sidebar nav button.active::before, .app-shell .sidebar nav button.active::before{background:#315dab}
.app .sidebar .side-foot, .app-shell .sidebar .sidebar-bottom{border-color:#dfe1e5}
.app .sidebar .side-foot button, .app-shell .sidebar .user-block{color:#6e6e73}

/* Refined navigation rail: quiet Apple material with a clear active state. */
.app-shell.meeting-display .sidebar{background:var(--apple-sidebar);color:var(--apple-ink);border-right:1px solid rgba(29,29,31,.09);box-shadow:1px 0 0 rgba(255,255,255,.72)}
.app-shell.meeting-display .logo-row{padding:22px 14px 24px;border-color:rgba(29,29,31,.09)}
.app-shell.meeting-display .logo-row>div{border-left-color:rgba(29,29,31,.12)}
.app-shell.meeting-display .logo-row strong{color:var(--apple-ink);font-weight:650}
.app-shell.meeting-display .logo-row small{color:var(--apple-subtle)}
.app-shell.meeting-display .sidebar nav{gap:4px;margin-top:12px}
.app-shell.meeting-display .sidebar nav button{position:relative;min-height:44px;padding:0 14px;color:#5d6067;border-radius:8px;font-weight:600;transition:background-color .18s ease,color .18s ease,transform .18s ease}
.app-shell.meeting-display .sidebar nav button span{color:#7b7f87}
.app-shell.meeting-display .sidebar nav button:hover{background:#e9e9ec;color:#303238;transform:translateX(2px)}
.app-shell.meeting-display .sidebar nav button.active{background:#e8eef8;color:var(--apple-blue);box-shadow:inset 0 0 0 1px rgba(0,113,227,.09)}
.app-shell.meeting-display .sidebar nav button.active span{color:var(--apple-blue)}
.app-shell.meeting-display .sidebar nav button.active::before{left:6px;width:2px;height:22px;border-radius:2px;background:var(--apple-blue)}
.app-shell.meeting-display .sidebar nav button b{background:#e1e4e9;color:#626771;border-radius:10px}
.app-shell.meeting-display .sidebar nav button.active b{background:#d8e5f7;color:var(--apple-blue)}
.app-shell.meeting-display .sidebar-bottom{padding-top:16px;border-color:rgba(29,29,31,.09)}
.app-shell.meeting-display .method-card{background:#ffffff;color:var(--apple-ink);border-color:rgba(29,29,31,.09);border-radius:10px;box-shadow:0 1px 2px rgba(29,29,31,.04);transition:background-color .18s ease,box-shadow .18s ease,transform .18s ease}
.app-shell.meeting-display .method-card:hover{background:#fafafa;box-shadow:0 8px 20px rgba(29,29,31,.07);transform:translateY(-1px)}
.app-shell.meeting-display .method-card small,.app-shell.meeting-display .method-tip-summary{color:var(--apple-subtle)}
.app-shell.meeting-display .method-card strong{color:var(--apple-ink)}
.app-shell.meeting-display .method-card-foot i{color:var(--apple-blue)}
.app-shell.meeting-display .tip-progress{background:#e6e7ea}
.app-shell.meeting-display .tip-progress i{background:var(--apple-blue)}
.app-shell.meeting-display .user-block{color:var(--apple-muted)}
.app-shell.meeting-display .user-block strong{color:var(--apple-ink)}
.app-shell.meeting-display .user-block small,.app-shell.meeting-display .user-block i{color:var(--apple-subtle)}

/* Final compact greeting guard: keep the chooser identity on one readable line. */
#homeView.home[data-scope="problem-management"] .welcome h1 { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: clamp(26px, 3.6vw, 48px); }
#homeView.home[data-scope="problem-management"] #userName { display: block; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) {
  #homeView.home[data-scope="problem-management"] .welcome h1 { font-size: clamp(22px, 7vw, 32px); }
}
