/* Shared Mesper workspace chrome. Module workflows retain their own structure. */
.work-app-shell,
.tasks-app-shell,
.docs-app-shell {
  --paper: #EEF1F7;
  --bg: #EEF1F7;
  --paper-2: #E9ECF3;
  --surface: #FFFFFF;
  --surface-2: #F6F7FA;
  --ink: #202638;
  --ink-2: #424B61;
  --ink-3: #5D6577;
  --ink-4: #5D6577;
  --line: #E3E6ED;
  --line-2: #D5DBE8;
  --accent: #5A58E7;
  --accent-ink: #4644C7;
  --accent-soft: #EEEDFC;
  --st-approved: #236A4E;
  --st-approved-soft: #EAF5EF;
  --st-pending: #855713;
  --st-pending-soft: #FFF4DF;
  --st-declined: #A82D43;
  --st-declined-soft: #FBEDEF;
  --font-display: "Montserrat", system-ui, sans-serif;
  --font-body: "Montserrat", system-ui, sans-serif;
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-pill: 6px;
  --sh-sm: 0 2px 5px rgba(32, 38, 56, .05);
  --sh-md: 0 4px 14px rgba(32, 38, 56, .08);
  --sh-lg: 0 12px 32px rgba(32, 38, 56, .14);
  --sh-pop: 0 14px 38px rgba(32, 38, 56, .18);
  color: var(--ink);
  font-family: var(--font-body);
  background: var(--paper);
}

.work-identity { display: inline-flex; align-items: center; gap: 16px; position: relative; flex: 0 0 auto; min-width: 0; }
.work-logo { display: inline-flex; align-items: center; border: 0; padding: 0; background: transparent; cursor: pointer; border-radius: 4px; flex: 0 0 auto; }
.work-identity-divider { width: 1px; height: 26px; background: var(--line); }
.work-switcher { display: inline-flex; align-items: center; gap: 9px; padding: 8px 4px; border: 0; background: transparent; border-radius: 6px; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; }
.work-switcher:hover { background: var(--accent-soft); color: var(--accent-ink); }
.work-app-menu { position: absolute; z-index: 250; top: calc(100% + 10px); left: 0; width: 224px; max-width: calc(100vw - 32px); padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--sh-lg); }
.work-app-menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 9px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-2); font-size: 13px; font-weight: 500; cursor: pointer; text-align: left; }
.work-app-menu button > span { flex: 1; }
.work-app-menu button:hover, .work-app-menu button:focus-visible, .work-app-menu button[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); outline-offset: -2px; }
.work-app-menu .work-all-apps { margin-top: 6px; border-top: 1px solid var(--line); border-top-left-radius: 0; border-top-right-radius: 0; }
:is(.work-app-shell, .tasks-app-shell, .docs-app-shell) :is(button, input, select, textarea, [tabindex]):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
:is(.work-app-shell, .tasks-app-shell, .docs-app-shell) input:disabled,
:is(.work-app-shell, .tasks-app-shell, .docs-app-shell) button:disabled { cursor: not-allowed; }
.work-app-header { height: 60px; min-height: 60px; max-height: 60px; flex: 0 0 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 24px; border-bottom: 1px solid var(--line); background: var(--surface); position: relative; z-index: 50; min-width: 0; }
.work-header-start, .work-header-actions, .work-header-widgets { display: flex; align-items: center; min-width: 0; gap: 10px; }
.work-header-start { flex: 0 0 auto; }
.work-header-actions { margin-left: auto; flex: 0 0 auto; }
.work-header-widgets { flex: 0 1 auto; }
.work-header-account, .work-header-notifications { flex: 0 0 auto; }
.work-app-header .work-logo { min-height: 0; }
.work-app-header .work-switcher { min-height: 0; font-family: var(--font-body); font-size: 14px; font-weight: 600; line-height: normal; }
.work-app-header .work-app-menu button { min-height: 40px; font-family: var(--font-body); font-size: 13px; font-weight: 500; line-height: normal; }
.work-header-notifications > div > button, .work-header-account > div > button { min-height: 0; }
.work-app-header .work-logo img { height: 28px !important; max-height: 28px; }
.work-app-header .lang-toggle { height: 32px; }
.work-app-header .lang-toggle button { padding: 0 10px !important; min-height: 30px; height: 30px; font-size: 12px !important; }
.work-app-header .account-meta { max-width: 170px; }
.work-app-header .account-meta > div { max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.work-sidebar-toggle, .work-app-shell .work-sidebar-toggle { width: 32px; height: 32px; min-width: 32px; min-height: 32px; flex: 0 0 32px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--ink-3); cursor: pointer; }
.work-sidebar-toggle:hover { background: var(--paper-2); color: var(--ink); }
.work-sidebar-heading { display: flex; align-items: center; gap: 8px; min-height: 44px; flex: 0 0 auto; padding: 0 0 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.work-sidebar-heading > span { font-size: 12px; font-weight: 600; color: var(--ink); min-width: 0; }
.work-sidebar-rail { display: flex; flex: 0 0 56px; width: 56px; padding: 20px 12px; align-items: flex-start; background: var(--surface-2); border-right: 1px solid var(--line); }
.work-sidebar-rail[hidden] { display: none; }
.work-sidebar-rail.is-mobile { flex: 0 0 56px; width: 100%; height: 56px; padding: 12px; align-items: flex-start; gap: 8px; border-right: 0; border-bottom: 1px solid var(--line); }
.work-sidebar-rail.is-mobile.is-open > * { visibility: hidden; }
.work-sidebar-rail > span { font-size: 12px; font-weight: 600; line-height: 32px; color: var(--ink-3); }
.work-sidebar-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.tasks-sidebar-scroll { display: flex; flex-direction: column; gap: 18px; }
.work-header-status { display: flex; align-items: center; justify-content: flex-end; padding: 6px 24px; border-bottom: 1px solid var(--line); background: var(--surface); flex: 0 0 auto; }
.tasks-sidebar-wrap { display: flex; flex: 0 0 224px; min-height: 0; }
.tasks-sidebar-wrap[hidden] { display: none; }
.work-mobile-sidebar { position: absolute; inset: 0; display: flex; z-index: 45; }
.work-sidebar-backdrop { flex: 1; min-width: 48px; background: rgba(32,38,56,.3); border: 0; padding: 0; cursor: pointer; }
@media (max-width: 1100px) { .work-app-header .account-meta { display: none !important; } }
@media (max-width: 819px) {
  .work-app-header { height: 56px; min-height: 56px; max-height: 56px; flex-basis: 56px; padding: 0 12px; gap: 8px; }
  .work-header-start, .work-header-actions, .work-header-widgets { gap: 6px; }
  .work-app-header .work-identity { gap: 8px; }
  .work-app-header .work-logo img { height: 24px !important; max-height: 24px; }
  .work-app-header .work-switcher { font-size: 12px; min-height: 40px; padding-left: 0; padding-right: 0; }
  .work-app-header .lang-toggle button { padding: 0 7px !important; font-size: 11px !important; }
  .work-app-header .work-header-account > div > button { padding: 3px !important; }
  .work-header-status { padding: 6px 12px; }
  .tasks-shell-body { position: relative; }
  .tasks-app-shell .work-mobile-sidebar .tasks-sidebar { flex: 0 0 280px !important; width: min(280px, calc(100vw - 48px)) !important; max-width: calc(100vw - 48px); flex-direction: column !important; overflow: hidden !important; padding-top: 12px !important; border-right: 1px solid var(--line); }
  .tasks-app-shell .work-mobile-sidebar .tasks-workspace-nav, .tasks-app-shell .work-mobile-sidebar .tasks-projects-scroll { flex-direction: column !important; overflow: visible !important; }
  .tasks-app-shell .work-mobile-sidebar .task-nav-item { width: 100% !important; }
}
@media (max-width: 360px) {
  .work-app-header { padding-left: 8px; padding-right: 8px; gap: 4px; }
  .work-app-header .work-identity { gap: 4px; }
  .work-app-header .work-identity-divider { display: none; }
  .work-app-header .work-logo img { height: 22px !important; max-height: 22px; }
  .work-header-start, .work-header-actions, .work-header-widgets { gap: 4px; }
}
@media (max-width: 820px) {
  .work-identity { gap: 9px; }
  .work-logo img { max-height: 25px; }
  .work-identity-divider { height: 22px; }
  .work-switcher { gap: 4px; font-size: 13px; min-height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  :is(.tasks-app-shell, .docs-app-shell) *,
  :is(.tasks-app-shell, .docs-app-shell) *::before,
  :is(.tasks-app-shell, .docs-app-shell) *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print { .work-floating-panel, .work-app-header, .work-header-status, .work-sidebar-rail { display: none !important; } }
