/* Noelle walkthrough visual language, applied to the API-backed portal.
   Base component rules remain in styles.css; no authorization lives here. */
:root {
  --ink: #18312e; --muted: #566c67; --brand-700: #006b50;
  --brand-800: #00543f; --brand-600: #267c60; --brand-950: #18312e;
  --brand-50: #f1f6f1; --brand-100: #e9f3ed; --line: #d9e4de;
  --canvas: #f5f7f3; --shadow-sm: none;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 15px;
}
body { background: var(--canvas); }
button, a { touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #b46b00; outline-offset: 3px; }
.topbar { height: 88px; padding: 20px 38px; background: white; color: var(--ink); border-bottom: 1px solid var(--line); gap: 18px; }
.brand-mark { width: 40px; height: 40px; color: white; background: var(--brand-700); font-size: 24px; font-weight: 700; border-radius: 12px; }
.brand strong { font-size: 21px; letter-spacing: -.7px; }
.brand small, .user-chip small { color: var(--muted); }
.topbar-actions { gap: 18px; min-width: 0; }
.user-chip { font-size: 13px; overflow-wrap: anywhere; }
.persona-control { color: var(--muted); }
.persona-control select { color: var(--ink); border-color: var(--line); background: #f5f7f3; }
.pilot-statusbar { min-height: 38px; padding: 9px 38px; display: flex; justify-content: space-between; gap: 16px; background: #fff3d9; color: #654414; font-size: 12px; line-height: 1.6; }
.synthetic-badge { display: inline; padding: 0; border: 0; border-radius: 0; color: inherit; letter-spacing: 0; text-transform: none; font-size: inherit; font-weight: 650; }
.workspace-shell { display: grid; grid-template-columns: 225px minmax(0,1fr); flex: 1; }
.workspace-sidebar { padding: 32px 20px; border-right: 1px solid var(--line); background: white; }
.nav-label { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; margin: 0 0 18px; }
.primary-nav { display: grid; gap: 7px; padding: 0; margin: 7px 0 0; border: 0; background: none; overflow: visible; }
.primary-nav button, .company-nav { display: flex; align-items: center; gap: 12px; min-height: 48px; width: 100%; padding: 12px; border: 0; border-radius: 9px; text-align: left; color: var(--muted); background: none; font-size: 14px; font-weight: 600; }
.primary-nav button > span, .company-nav > span { width: 23px; height: 23px; flex: 0 0 23px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 400; }
.primary-nav button[aria-current="page"], .company-nav[aria-current="page"] { color: var(--brand-700); background: var(--brand-100); }
.primary-nav button[aria-current="page"]::after { display: none; }
.primary-nav button:hover, .company-nav:hover { background: #f1f6f1; }
.primary-nav [data-view="people"] { margin-top: 16px; border-top: 1px solid var(--line); border-radius: 0 0 9px 9px; }
.sidebar-note { margin: 30px 10px 0; padding-top: 22px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.65; color: var(--muted); }
.sidebar-note strong { color: var(--ink); }
.sidebar-note p { margin: 12px 0; }
.workspace-content { min-width: 0; padding: 34px 40px 0; }
main { width: 100%; max-width: 1400px; padding: 0 0 38px; margin: 0 auto; }
.context-bar { min-height: 67px; display: flex; align-items: center; gap: 20px; margin: 0 auto 25px; padding: 13px 20px; border: 1px solid var(--line); border-radius: 10px; max-width: 1400px; background: white; }
.context-bar img { width: auto; max-width: 190px; height: 32px; object-fit: contain; }
.company-context { padding-left: 20px; border-left: 1px solid var(--line); flex: 1; }
.company-context small, .company-context strong { display: block; font-size: 12px; }
.company-context small { margin-bottom: 3px; color: var(--muted); }
.context-bar .text-button { text-decoration: underline; text-underline-offset: 4px; min-height: 44px; }
.status-pill { background: var(--brand-100); color: #165c44; padding: 6px 10px; }
.page-heading { margin-bottom: 26px; }
.page-heading h1 { font-size: 34px; font-weight: 650; line-height: 1.15; letter-spacing: -1.2px; margin: 12px 0; }
.page-heading p { max-width: 760px; font-size: 16px; line-height: 1.65; }
.eyebrow { color: var(--muted); letter-spacing: 1.5px; font-weight: 700; }
.org-grid { gap: 19px; margin: 24px 0; }
.org-card { padding: 24px; border-radius: 14px; min-height: 285px; background: white; box-shadow: none; position: relative; }
.org-card:hover { transform: none; border-color: #87ac98; box-shadow: 0 7px 20px #2048370c; }
.org-card-head { display: block; }
.logo-space { display: flex; justify-content: center; align-items: center; height: 84px; padding: 6px 25px; margin: 4px 0 18px; }
.logo-space img { width: auto; max-width: min(290px,100%); max-height: 66px; object-fit: contain; }
.org-card h2 { margin: 14px 0 5px; font-size: 18px; }
.org-card > small { font-size: 12px; line-height: 1.5; }
.org-metrics { padding-top: 18px; margin: 10px 0 0; border-top: 1px solid #edf1ee; }
.org-metrics strong { color: var(--ink); font-size: 20px; font-weight: 600; }
.org-metrics span { font-size: 11px; }
.company-open { display: flex; justify-content: space-between; margin-top: 18px; color: var(--brand-700); font-size: 13px; font-weight: 650; }
.org-placeholder { display: flex; flex-direction: column; cursor: default; border-style: dashed; }
.org-placeholder:hover { border-color: var(--line); box-shadow: none; }
.org-placeholder .pending-pill { align-self: flex-start; background: #f3efe5; color: #685323; }
.pending-description { color: var(--muted); font-size: 13px; line-height: 1.65; margin: 6px 0 24px; }
.company-pending { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); color: #685323; font-size: 13px; font-weight: 650; }
.workspace-hint { padding: 20px; margin: 24px 0; border: 1px solid #d0dfd5; background: #edf4ee; border-radius: 12px; }
.workspace-hint p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.dialog-header-actions { display: flex; gap: 10px; align-items: center; }
.manager-focus { border: 1px solid var(--line); border-radius: 12px; background: #f5faf6; padding: 22px; margin: 18px 0; }
.manager-focus > label, .manager-focus [data-software-approval] > label { display: grid; gap: 8px; margin: 16px 0; }
.manager-focus .check-option { display: flex; }
.manager-extras { padding: 15px 0; }
.request-tiles { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.request-tile { padding: 26px 24px 23px 76px; border: 1px solid var(--line); border-radius: 13px; box-shadow: none; background: white; gap: 14px; }
.request-tile .tile-symbol { display: none; }
.request-tile .help-circle { left: 18px; top: 22px; }
.tile-action { min-height: 68px; }
.tile-action strong { font-size: 20px; font-weight: 650; color: var(--ink); }
.tile-action span { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.65; }
.request-tile > small { font-size: 11px; color: var(--brand-700); font-weight: 650; }
.launcher-heading h2 { font-size: 22px; font-weight: 650; }
.button { min-height: 44px; padding: 10px 17px; font-size: 13px; font-weight: 600; border-radius: 8px; }
.button.secondary { color: var(--brand-700); border-color: #cbdcd2; }
.notice { font-size: 13px; border-radius: 10px; line-height: 1.65; }
.content-grid { grid-template-columns: minmax(0,1.65fr) minmax(250px,1fr); gap: 22px; }
.panel { box-shadow: none; }
.panel-header { padding: 24px 24px 14px; }
.panel-header h2 { font-size: 20px; font-weight: 650; letter-spacing: -.4px; }
.content-grid > aside { background: #eaf0ea; border-color: #d5e2d6; }
.content-grid .freshness-card { background: #fff; }
.attention-list { padding: 0 24px 16px; }
.attention-row { padding: 16px 0; }
.operational-summary { margin: 0 0 24px; }
.operational-summary > summary { cursor: pointer; font-size: 13px; color: var(--brand-700); padding: 12px 0; font-weight: 600; }
.operational-summary .metric-grid { margin: 12px 0 0; }
.metric { padding: 16px; box-shadow: none; }
.metric strong { font-weight: 600; }
footer { border-top: 1px solid var(--line); margin: 0 auto; padding: 18px 0 24px; max-width: 1400px; text-align: left; line-height: 1.7; font-size: 11px; }

/* Sidebar-only Offshore guide; these are process steps, never completion states. */
.offshore-page { line-height: 1.65; }
.offshore-company { padding: 20px 24px; margin-bottom: 20px; }
.offshore-company label { display: block; font-weight: 650; margin-bottom: 8px; }
.offshore-company select { width: 100%; max-width: 480px; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: white; color: var(--ink); }
.offshore-company p { margin: 10px 0 0; font-size: 13px; }
.offshore-page h2 { font-size: 23px; font-weight: 650; letter-spacing: -.5px; margin: 28px 0 16px; }
.offshore-page h3 { font-size: 19px; line-height: 1.3; margin: 5px 0; }
.offshore-page p { color: var(--muted); }
.offshore-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }
.offshore-choice { padding: 24px; }
.offshore-choice-heading { display: flex; align-items: flex-start; gap: 16px; }
.offshore-choice-heading h2 { margin: 4px 0 0; }
.offshore-scope { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 18px; }
.offshore-scope p { margin: 6px 0 14px; font-size: 14px; }
.offshore-gates { padding-left: 22px; }
.offshore-gates li { margin: 12px 0; }
.offshore-page details { border-top: 1px solid var(--line); margin: 16px 0; padding-top: 12px; }
.offshore-page summary { cursor: pointer; min-height: 44px; padding: 8px 0; color: var(--brand-700); font-weight: 650; }
.offshore-page details p, .offshore-page li { font-size: 14px; }
.offshore-flow { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; list-style: none; padding: 0; }
.offshore-flow li { padding: 20px; border: 1px solid var(--line); background: white; border-radius: 12px; }
.offshore-flow h3 { font-size: 17px; margin-top: 10px; }
.offshore-flow p { margin-bottom: 0; }
.offshore-departure { margin: 28px 0; padding: 24px; border: 1px solid #cbdcd2; border-radius: 13px; background: #edf4ee; }
.offshore-departure li { margin: 9px 0; }
.offshore-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.offshore-reference { padding: 8px 24px; }
.offshore-reference details:first-child { border: 0; margin-top: 0; }
.offshore-page .button { white-space: normal; }
@media (max-width: 1150px) { .offshore-flow { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 800px) { .offshore-options { grid-template-columns: 1fr; } }
@media (max-width: 500px) {
  .offshore-flow { grid-template-columns: 1fr; }
  .offshore-choice, .offshore-departure { padding: 18px; }
  .offshore-page .button { width: 100%; }
}

/* Full workspace panels retain native dialog focus trapping and Escape behavior. */
#newCaseDialog, #caseDialog { position: fixed; inset: 126px 0 0 225px; width: auto; max-width: none; height: calc(100dvh - 126px); max-height: none; margin: 0; border-radius: 0; background: var(--canvas); box-shadow: none; color: var(--ink); }
#newCaseDialog::backdrop, #caseDialog::backdrop { background: #18312e0d; backdrop-filter: none; }
#newCaseForm, #caseDialog > .dialog-shell { display: flex; flex-direction: column; height: 100%; max-height: none; }
#newCaseDialog .dialog-header, #caseDialog .dialog-header { padding: 24px 40px 20px; background: var(--canvas); border: 0; flex-shrink: 0; }
.dialog-header h2 { font-size: 30px; font-weight: 650; margin-top: 10px; }
.dialog-company { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; font-size: 12px; }
.dialog-company img { width: auto; height: 28px; max-width: 160px; object-fit: contain; }
.dialog-company small { color: var(--muted); font-size: 11px; }
.icon-button { width: 44px; height: 44px; flex-shrink: 0; }
#newCaseDialog .dialog-body, #caseDialog .dialog-body { padding: 0 40px 28px; max-height: none; min-height: 0; flex: 1; overflow-y: auto; }
.intake-layout { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(240px,1fr); gap: 22px; align-items: start; }
.intake-fields { padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: white; min-width: 0; }
.intake-companion { background: #eaf0ea; border: 1px solid #d5e2d6; border-radius: 14px; padding: 24px; min-width: 0; }
.intake-companion h3 { font-size: 21px; font-weight: 650; letter-spacing: -.4px; margin: 10px 0 8px; }
.companion-step { display: flex; gap: 12px; padding: 17px 0; border-bottom: 1px solid #d3e0d5; }
.companion-step > span { width: 27px; height: 27px; flex: 0 0 27px; border: 1px solid #a3bbad; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: white; }
.companion-step strong { font-size: 14px; }
.companion-step p { font-size: 12px; color: var(--muted); line-height: 1.65; margin: 5px 0 0; }
.companion-note { font-size: 12px; line-height: 1.65; padding: 16px; background: #fff6e5; border: 1px solid #e6d3ac; color: #70521e; border-radius: 9px; margin: 22px 0 0; }
.intake-section { padding: 20px 0 8px; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.intake-section h3 { padding: 0; border: 0; font-size: 17px; font-weight: 650; }
.intake-intro { border: 0; border-radius: 9px; background: #f1f6f1; font-size: 13px; }
#newEmployeeFields { grid-template-columns: repeat(2,minmax(0,1fr)); }
.software-picker { padding: 0; border: 0; background: none; }
.software-option { padding: 10px; }
.form-grid input, .form-grid select, .form-grid textarea { border-color: #c8d7ce; color: var(--ink); font-size: 14px; border-radius: 7px; }
#casePersonField { display: grid; gap: 7px; }
#casePersonField > span { margin-bottom: 0; }
#directorySearchButton { justify-self: start; }
.directory-results { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #f7fbf8; }
.directory-result-list { display: grid; gap: 9px; }
.directory-result { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px; border: 1px solid #d9e6de; border-radius: 12px; background: white; }
.directory-result div { min-width: 0; display: grid; gap: 3px; }
.directory-result span, .directory-result small { overflow-wrap: anywhere; }
.directory-result span { color: var(--muted); }
.directory-result small { color: #56645d; }
#personSourceNote { display: block; }
.form-grid label > span { color: var(--ink); font-weight: 600; }
.form-note { color: var(--muted); font-size: 12px; line-height: 1.65; }
.departure-timing { border: 0; padding: 0; margin: 0; }
.departure-timing legend { font-weight: 650; margin-bottom: 10px; }
.timing-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.timing-options .software-option { align-items: flex-start; }
.timing-options small { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 4px; }
.scheduled-cutoff { display: grid; grid-template-columns: minmax(180px,.6fr) minmax(240px,1fr); gap: 14px; align-items: end; margin-top: 14px; padding: 14px; background: #f3f8f5; border: 1px solid #c8d7ce; border-radius: 9px; }
.scheduled-cutoff[hidden] { display: none; }
#newCaseDialog .dialog-actions { justify-content: space-between; padding: 16px 40px; background: white; }
.case-feedback { margin: 0 40px 12px; }
.case-receipt { padding: 12px 18px; font-size: 12px; }
.manager-view .handoff-grid { display: none; }
.manager-view .handoff-summary { padding: 16px 22px; }
.manager-view .handoff-summary p { margin-bottom: 0; }
.case-receipt br { display: none; }
.handoff-summary { padding: 24px; background: #e9f3eb; border-color: #c4dcca; }
.handoff-summary h2 { font-weight: 650; letter-spacing: -.5px; }
.handoff-summary > p { color: var(--muted); font-size: 14px; }
.handoff-grid article { border: 1px solid var(--line); padding: 20px; }
.handoff-grid article p { font-size: 13px; }
.handoff-progress { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin: 24px 0 16px; }
.handoff-progress article { border: 1px solid var(--line); border-radius: 11px; background: white; padding: 18px; }
.handoff-progress article.active { border: 2px solid #2d7a5a; background: var(--brand-100); }
.handoff-progress article.done { background: #f0f6f1; }
.handoff-progress span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 14px; }
.handoff-progress strong { font-size: 15px; font-weight: 650; }
.handoff-progress p, .progress-caption { color: var(--muted); font-size: 12px; line-height: 1.65; margin: 8px 0; }
.notification-summary { padding: 16px 20px; border: 1px solid var(--line); background: white; border-radius: 12px; }
.notification-summary h3 { margin: 0 0 8px; font-size: 16px; }
.notification-summary p { font-size: 12px; }
.resource-register { background: white; border-color: var(--line); padding: 24px; }
.resource-register > p { font-size: 14px; line-height: 1.65; color: var(--muted); }
.resource-register .transfer-card, .transfer-card:has([data-return]) { border-color: var(--line); background: white; }
.case-technical { padding: 0 24px 20px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.case-technical > summary { color: var(--brand-700); font-size: 14px; }
.task input, #managerRequirements input:not([type="checkbox"]), [data-return-evidence] { min-height: 42px; padding: 10px; border: 1px solid #c8d7ce; border-radius: 7px; font: inherit; max-width: 100%; }
.task { background: white; }
.checklist-confirm { margin-top: 18px; padding: 18px; background: #f3f8f5; border: 1px solid #c8d7ce; border-radius: 12px; }
.checklist-confirm input { display: block; width: 100%; box-sizing: border-box; min-height: 42px; padding: 10px; border: 1px solid #c8d7ce; border-radius: 7px; font: inherit; }
.checklist-confirm textarea { display: block; width: 100%; box-sizing: border-box; padding: 12px; border: 1px solid #c8d7ce; border-radius: 7px; font: inherit; resize: vertical; }
.success-box { padding: 14px 18px; margin: 14px 0; border: 1px solid #70ad88; border-radius: 10px; background: #eaf7ef; color: #155c36; }
.it-focus { margin-top: 22px; }
.checklist-confirm small { display: block; margin-top: 8px; }
.task.complete { grid-template-columns: 26px minmax(0, 1fr); align-items: start; }
.task-copy { min-width: 0; overflow-wrap: anywhere; }
.task-evidence { grid-column: 2 / -1; min-width: 0; max-width: 100%; }
.task-evidence summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.task-evidence small { white-space: pre-wrap; overflow-wrap: anywhere; }
.task strong { font-size: 14px; }
.task small { font-size: 12px; line-height: 1.5; }

/* Workspace pages are not modal. Keep the sidebar above the page surface. */
body.workspace-page-open { overflow: hidden; }
body.workspace-page-open .workspace-sidebar { position: relative; z-index: 20; height: calc(100dvh - 126px); overflow-y: auto; box-sizing: border-box; }
#newCaseDialog, #caseDialog { z-index: 10; }

@media(max-width:1150px) {
  .workspace-shell { grid-template-columns: 200px minmax(0,1fr); }
  .workspace-sidebar { padding: 28px 14px; }
  .workspace-content { padding: 26px 26px 0; }
  .content-grid, .intake-layout { grid-template-columns: 1fr; }
  #newCaseDialog, #caseDialog { left: 200px; }
  .handoff-progress { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .intake-companion { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
  .intake-companion > h3, .intake-companion > .eyebrow, .companion-note { grid-column: 1/-1; }
}
@media(max-width:700px) {
  .directory-result { align-items: stretch; flex-direction: column; }
  .directory-result .button { width: 100%; }
  .topbar { height: auto; min-height: 76px; padding: 16px 18px; align-items: center; flex-wrap: wrap; }
  .brand strong { font-size: 18px; }
  .brand small { display: block; font-size: 10px; }
  .topbar-actions { gap: 10px; flex-wrap: wrap; }
  .user-chip { display: block; min-width: 0; font-size: 11px; }
  .persona-control select { width: 140px; }
  .persona-control > span { display: none; }
  .pilot-statusbar { padding: 10px 18px; flex-direction: column; gap: 2px; font-size: 11px; }
  .workspace-shell { display: block; }
  .workspace-sidebar { padding: 12px 16px; display: flex; align-items: center; gap: 6px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .nav-label, .sidebar-note { display: none; }
  .company-nav { width: auto; flex: 0 0 auto; font-size: 12px; }
  .company-nav > span, .primary-nav button > span { display: none; }
  .primary-nav { display: flex; flex: 0 0 auto; margin: 0; gap: 5px; overflow: visible; }
  .primary-nav button { width: auto; white-space: nowrap; padding: 10px; font-size: 12px; }
  .primary-nav [data-view="people"] { margin: 0; border: 0; }
  .workspace-content { padding: 24px 18px 0; }
  .context-bar { flex-wrap: wrap; padding: 12px; gap: 12px; }
  .context-bar img { max-width: 120px; height: 30px; }
  .company-context { display: none; }
  .context-bar .text-button { margin-left: auto; }
  .page-heading h1 { font-size: 29px; }
  .page-heading p { font-size: 14px; }
  .org-grid, .request-tiles { grid-template-columns: 1fr; }
  .logo-space { padding: 6px 12px; }
  .logo-space img { max-width: min(260px,100%); }
  .org-card { padding: 20px; }
  .request-tile { padding-left: 74px; }
  body.workspace-page-open .workspace-sidebar { position: fixed; inset: 0 0 auto; height: 66px; box-sizing: border-box; background: var(--canvas); }
  #newCaseDialog, #caseDialog { inset: 66px 0 0; width: 100%; height: calc(100dvh - 66px); }
  #newCaseDialog .dialog-header, #caseDialog .dialog-header { padding: 20px 18px 16px; }
  .dialog-header h2 { font-size: 26px; }
  #newCaseDialog .dialog-body, #caseDialog .dialog-body { padding: 0 18px 20px; }
  .intake-fields, .intake-companion { padding: 18px; }
  .intake-companion { display: block; }
  #newEmployeeFields, #newCaseForm .form-grid { grid-template-columns: 1fr; }
  #newCaseDialog .dialog-actions { padding: 12px 18px; }
  .case-feedback { margin: 0 18px 10px; }
  .handoff-summary, .resource-register { padding: 18px; }
  .handoff-progress article { padding: 14px; }
  .handoff-progress strong { font-size: 14px; }
  .case-technical { padding: 0 14px 16px; }
  .task input, [data-return-evidence] { width: 100%; }
  .it-focus .dialog-actions { flex-direction: column; align-items: stretch; }
  .it-focus .dialog-actions .button { width: 100%; }
  .checkbox-grid, .software-options { grid-template-columns: 1fr; }
  .timing-options, .scheduled-cutoff { grid-template-columns: 1fr; }
}
