/* Internal workspace only. The approved login and printed proposal are unchanged.
   Navy anchors navigation; white, mist and solar accents carry the working area. */
.app-shell .dashboard-analysis-grid { align-items: start; }
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("./assets/brand-v2/fonts/manrope-variable.ttf") format("truetype");
}
@media screen {
  .app-shell {
    --sio-body: "Manrope", "Segoe UI Variable Text", sans-serif;
    --sio-display: "Manrope", "Segoe UI Variable Display", sans-serif;
    --ws-canvas: #f3f6f8;
    --ws-white: #ffffff;
    --ws-ink: #163043;
    --ws-muted: #586d7d;
    --ws-line: #e0e8ee;
    --ws-petroleum: #124b60;
    --ws-solar-wash: #fff6df;
    --ws-shadow: 0 2px 4px #18364a02, 0 10px 26px #18364a05;
    --sio-sidebar-width: 242px;
    --bg: var(--ws-canvas);
    --panel: var(--ws-white);
    --ink: var(--ws-ink);
    --muted: var(--ws-muted);
    --line: var(--ws-line);
    --shadow: var(--ws-shadow);
    background: var(--ws-canvas);
    padding: 0;
    font-family: var(--sio-body);
  }

  /* An independent navigation rail, without a dark perimeter around the page. */
  .app-shell .sidebar {
    margin: 10px 0 10px 10px;
    padding: 22px 12px 18px;
    gap: 24px;
    border-radius: 18px;
    border-color: #b8dbe315;
    background: radial-gradient(ellipse at 0 0, #18465880, transparent 48%), #081d2a;
    box-shadow: inset 0 1px #e2f4f41a;
    scrollbar-width: thin;
    scrollbar-gutter: auto;
    scrollbar-color: #3a5b6b transparent;
    overflow: hidden;
  }
  .app-shell .sidebar-header { padding-bottom: 22px; border-bottom: 1px solid #b5d2df16; flex-shrink: 0; }
  .app-shell .sidebar .brand { gap: 14px; padding-inline: 10px; min-width: 0; }
  .app-shell .sidebar .brand-logo { width: 170px; height: 56px; max-width: 100%; }
  .app-shell .sidebar .brand small { color: #bdd0dc; font-size: .72rem; line-height: 1.5; overflow-wrap: anywhere; }
  .app-shell .nav-list { gap: 22px; flex: 1; min-height: 0; align-content: start; overflow-y: auto; overflow-x: hidden; padding: 3px 4px 4px; scrollbar-width: thin; scrollbar-color: #3a5b6b transparent; }
  .app-shell .nav-group { gap: 3px; }
  .app-shell .nav-group-label { color: #88a6b8; font-weight: 600; letter-spacing: .12em; margin-bottom: 6px; padding-inline: 13px; }
  .app-shell .nav-item { gap: 11px; min-height: 44px; padding: 10px 12px; border-radius: 10px; color: #c4d5df; font-weight: 500; font-size: .78rem; }
  .app-shell .nav-item > span:last-child { min-width: 0; text-align: left; }
  .app-shell .nav-icon { width: 17px; height: 17px; flex-basis: 17px; opacity: .7; }
  .app-shell .nav-item.active { background: #ffbd1815; border-color: #ffce512b; color: #ffcf66; font-weight: 700; box-shadow: inset 2px 0 var(--yellow), inset 0 1px #ffe39a0a; }
  .app-shell .nav-item.active .nav-icon { opacity: 1; }
  .app-shell .nav-item.active::after { width: 4px; height: 4px; background: var(--yellow); }
  .app-shell .nav-item:hover { background: #c4e1e80c; border-color: #c4e1e812; color: #fff; transform: translateX(1px); }
  .app-shell .nav-item.active:hover { background: #ffbd1820; color: #ffcf66; border-color: #ffce5138; }

  .app-shell .main { background: var(--ws-canvas); }
  .app-shell .topbar {
    min-height: 82px;
    margin: 0;
    padding: 17px 32px;
    background: var(--ws-white);
    border: 0;
    border-bottom: 1px solid var(--ws-line);
    box-shadow: none;
  }
  .app-shell .topbar h1 { color: var(--ws-ink); font-weight: 600; }
  /* Preserve the manually fitted workflow labels within their original geometry. */
  .app-shell .stage-chip-label { font-family: "Inter", "Segoe UI", sans-serif; }
  .app-shell .topbar .eyebrow { color: var(--ws-muted); letter-spacing: .1em; }
  .app-shell .topbar .profile-summary { color: var(--ws-ink); background: #f8fafb; border: 1px solid #e2eaf0; border-radius: 12px; padding: 6px 12px 6px 6px; box-shadow: inset 0 1px #fff; }
  .app-shell .topbar .profile-avatar { background: var(--ws-solar-wash); color: #77520b; border: 1px solid #f3d99980; border-radius: 9px; flex-shrink: 0; min-width: 2.25em; min-height: 2.25em; }
  .app-shell .topbar .profile-copy strong, .app-shell .topbar .profile-copy span { white-space: normal; overflow-wrap: break-word; }
  .app-shell .topbar .profile-copy span { color: var(--ws-muted); }
  .app-shell .profile-popover { border-radius: 16px; border-color: var(--ws-line); box-shadow: 0 14px 44px #17374b17; }
  .app-shell .main-scroll { background: var(--ws-canvas); border-radius: 0; padding: 28px 32px 36px; scroll-padding-block: 24px; }
  .app-shell .view { gap: 22px; grid-template-columns: minmax(0, 1fr); }
  .app-shell .view > * { min-width: 0; }
  .app-shell .page-header, .app-shell .flow-header { gap: 20px; }
  .app-shell .page-header > div:first-child { max-width: 920px; }
  .app-shell .eyebrow { color: var(--ws-petroleum); letter-spacing: .12em; }
  .app-shell .page-header p:not(.eyebrow), .app-shell .flow-header p:not(.eyebrow) { line-height: 1.65; font-size: .88rem; max-width: 85ch; }
  .app-shell h2 { color: var(--ws-ink); }

  /* Surface hierarchy: white summaries, a quiet filter tray, precise data panels. */
  .app-shell .panel, .app-shell .card { border-radius: 16px; border: 1px solid #e3eaf0b3; box-shadow: var(--ws-shadow); }
  .app-shell .panel { padding: 22px; }
  .app-shell .panel > h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
  .app-shell .panel > h2::before { content: ""; width: 3px; height: 15px; border-radius: 3px; flex: 0 0 3px; background: #216179; }
  .app-shell .grid { gap: 16px; }
  .app-shell .metric, .app-shell .metric-card {
    position: relative;
    align-content: space-between;
    gap: 15px;
    min-height: 118px;
    padding: 20px 22px;
    background: var(--ws-white);
    border: 1px solid #e3eaf0b3;
    border-radius: 15px;
    box-shadow: var(--ws-shadow);
  }
  .app-shell .metric > span, .app-shell .metric-card > span { color: var(--ws-muted); font-size: .77rem; line-height: 1.5; font-weight: 500; }
  .app-shell .metric > strong, .app-shell .metric-card > strong { color: var(--ws-ink); font-size: clamp(1.45rem, 2.1vw, 1.85rem); font-weight: 600; letter-spacing: -.035em; line-height: 1.2; }
  .app-shell .view > .grid > .metric:first-child { border-color: #edcf8599; background: linear-gradient(115deg, #fff9eb, #fff 78%); }
  .app-shell .view[data-view="dashboard"] > .grid.four:first-of-type { padding: 0; gap: 16px; background: none; border-radius: 0; box-shadow: none; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10em), 1fr)); }
  .app-shell .view[data-view="dashboard"] > .grid.four:first-of-type .metric { background: var(--ws-white); border: 1px solid #e3eaf0b3; box-shadow: var(--ws-shadow); color: var(--ws-ink); }
  .app-shell .view[data-view="dashboard"] > .grid.four:first-of-type .metric span { color: var(--ws-muted); }
  .app-shell .view[data-view="dashboard"] > .grid.four:first-of-type .metric strong { color: var(--ws-ink); }
  .app-shell .view[data-view="dashboard"] > .grid.four:first-of-type .metric:first-child { background: linear-gradient(115deg, #fff5dc, #fffaf0); border-color: #edcf8599; }
  .app-shell .summary-list { grid-template-columns: minmax(0, 1fr); }
  .app-shell .summary-row { padding-block: 12px; border-color: #e9eef2; gap: 16px; align-items: center; flex-wrap: wrap; }
  .app-shell .summary-row > * { min-width: 0; max-width: 100%; }
  .app-shell .summary-row > span { color: var(--ws-muted); }
  .app-shell .summary-row > strong { color: var(--ws-ink); }
  .app-shell .summary-row:last-child { border-bottom: 0; }
  .app-shell .toolbar.compact, .app-shell .dashboard-period-form { padding: 16px; border-radius: 14px; background: #fafdff; border: 1px solid #dce6ed; box-shadow: inset 0 1px #fff; }
  .app-shell .dashboard-period-form, .app-shell .dashboard-period-form:has([name="startDate"]:enabled) { grid-template-columns: repeat(auto-fit, minmax(min(100%, 10em), 1fr)); }
  .app-shell .toolbar.compact { margin-bottom: 0; }
  .app-shell .filter-grid { padding: 14px; border-radius: 12px; background: #f4f7f9; border: 1px solid #e8eef2; gap: 12px; }
  .app-shell :is(.filter-grid, .dashboard-period-form, .toolbar-fields) label { color: #3f596b; font-weight: 500; font-size: .76rem; }
  .app-shell :is(.field, .form-grid > label) { color: #3f596b; }
  .app-shell :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { border-radius: 9px; border-color: #d7e2e9; background: #fff; box-shadow: inset 0 1px 2px #0b344a03; }
  .app-shell :is(input, select, textarea):focus { border-color: #29667d; box-shadow: 0 0 0 3px #2161790d; }
  .app-shell :is(input, textarea)::placeholder { color: #718493; opacity: 1; }
  .app-shell :is(input, select, textarea):disabled { background: #f2f5f7; color: #637988; }
  .app-shell :focus-visible { outline-color: #17617b; outline-offset: 3px; }
  .app-shell .sidebar :focus-visible { outline-color: #ffcf66; }

  .app-shell .btn { border: 1px solid #d499052b; border-radius: 11px; background: var(--yellow); color: #283018; font-weight: 700; box-shadow: inset 0 1px #fff5, 0 3px 7px #c38d0010; }
  .app-shell .btn.secondary { color: var(--ws-petroleum); background: #fff; border-color: #dce6ec; box-shadow: inset 0 1px #fff; }
  .app-shell .btn.danger { background: #b42318; border-color: #b42318; color: #fff; }
  .app-shell .btn.warning { background: #fff0c4; border-color: #edd8a3; color: #674b08; }
  .app-shell .btn:disabled { transform: none; opacity: .55; box-shadow: none; cursor: not-allowed; }
  .app-shell .icon-btn, .app-shell .back-button { border-radius: 10px; border-color: var(--ws-line); color: var(--ws-petroleum); }
  .app-shell .segmented, .app-shell .entity-tab-list, .app-shell .settings-nav { padding: 4px; gap: 4px; border: 1px solid #e0e8ee; background: #edf2f5; border-radius: 12px; }
  .app-shell .entity-tab-list, .app-shell .settings-nav { width: fit-content; max-width: 100%; }
  .app-shell .segment, .app-shell .entity-tab, .app-shell .settings-nav-button { min-height: 44px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: #506979; font-weight: 600; font-size: .79rem; }
  .app-shell .segment.active, .app-shell .entity-tab.active, .app-shell .settings-nav-button.active { background: #fff; color: var(--ws-ink); border-color: #dbe4eb; box-shadow: 0 2px 4px #16304306, inset 0 -2px #f5c458; }

  .app-shell .data-table { border-radius: 12px; border-color: #e0e8ee; }
  .app-shell .data-table table { font-size: .86rem; }
  .app-shell .data-table th { background: #eef3f6; color: #465f70; font-size: .78rem; letter-spacing: 0; font-weight: 600; padding-block: 12px; border-color: #dfe8ef; text-transform: none; }
  .app-shell .data-table td { padding-block: 13px; border-color: #e9eef2; line-height: 1.5; vertical-align: middle; }
  .app-shell .data-table .stacked-cell strong { font-weight: 600; color: #173e53; }
  .app-shell .status { display: inline-flex; align-items: center; width: fit-content; max-width: 100%; min-height: 24px; padding: 3px 8px; border-radius: 7px; font-weight: 600; font-size: .71rem; line-height: 1.25; }
  .app-shell .status.good { color: #146345; background: #edf8f2; border-color: #cce8da; }
  .app-shell .status.info { color: #24589e; background: #eef4ff; border-color: #d6e3f7; }
  .app-shell .status.warn { color: #845b08; background: #fff5d9; border-color: #ecd99f; }
  .app-shell .status.bad { color: #aa332f; background: #fff0ee; border-color: #f0d4d0; }
  .app-shell .progress-track { background: #e8eef1; border-radius: 99px; }
  .app-shell .empty-state { border-color: #d8e4eb; background: #f7fafb; color: #5a7080; border-radius: 12px; }
  .app-shell .kanban-column { background: #eaf0f4; border-color: #dce6ed; border-radius: 14px; }
  .app-shell .kanban-column > header { color: var(--ws-ink); }
  .app-shell .kanban-card, .app-shell .mobile-record { border-color: #dce6ed; border-radius: 13px; box-shadow: var(--ws-shadow); }
  .app-shell .project-mobile-record .mobile-record-facts .execution-progress { min-width: 0; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 0; border: 0; }
  .app-shell .project-mobile-record .mobile-record-facts .progress-track { display: block; width: 100%; height: 6px; padding: 0; border: 0; }
  .app-shell .notice { border-radius: 12px; }
  .app-shell .record-header { background: #fff; border-color: var(--ws-line); box-shadow: var(--ws-shadow); }
  .app-shell .record-stage-card { background: #f1f6f8; border-color: #dce6ed; }
  .app-shell .record-next-action-card { background: #fffbef; border-color: #ede0b9; }
  .app-shell .drawer-panel { border: 1px solid #e0e8ee; background: #fff; box-shadow: -12px 0 48px #0e2c4314; }
  .app-shell .drawer-header { background: #f5f8fa; border-bottom-color: #e0e8ee; }
  .app-shell .drawer-footer { background: #fafdff; border-top-color: #e0e8ee; }

  /* Card typography responds to the available card width, not the viewport. */
  .app-shell .metric-card { min-width: 0; container-type: inline-size; padding: 16px; }
  .app-shell .metric-card > strong { font-size: clamp(1.15rem, 14cqi, 1.65rem); line-height: 1.3; word-break: normal; }
  .app-shell .metric-card--text > strong { font-size: 1rem; line-height: 1.5; letter-spacing: -.015em; overflow-wrap: normal; }
  .app-shell .metric-card .metric-unit { display: block; margin-top: 3px; color: var(--ws-muted); font-size: .78rem; font-weight: 500; letter-spacing: 0; white-space: nowrap; }
  .app-shell .qualification-form-stack { container: qualification / inline-size; }
  .app-shell .qualification-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-top: 14px; }
  .app-shell .qualification-summary .metric-card { min-height: 120px; align-content: start; gap: 16px; }
  .app-shell .accordion-body > .notice { margin-top: 14px; }
  .app-shell .notice { gap: 7px; line-height: 1.55; }
  .app-shell .notice > strong { font-size: .88rem; }
  .app-shell .notice > span { font-size: .84rem; }
  .app-shell .qualification-side .summary-row { display: grid; grid-template-columns: minmax(65px, .65fr) minmax(0, 1.35fr); gap: 12px; align-items: start; font-size: .8rem; line-height: 1.5; }
  .app-shell .qualification-side .summary-row strong { text-align: left; }
  .app-shell .invoice-workflow { grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 12px; padding-top: 14px; }
  .app-shell .invoice-workflow article { align-content: start; gap: 8px; padding: 14px; border-radius: 10px; }
  .app-shell .invoice-workflow strong { font-size: .9rem; line-height: 1.45; word-break: normal; overflow-wrap: normal; }
  .app-shell .invoice-workflow small { font-size: .77rem; line-height: 1.55; overflow-wrap: break-word; }
  @container qualification (max-width: 460px) {
    .app-shell .qualification-summary { grid-template-columns: minmax(0, 1fr); }
    .app-shell .qualification-summary .metric-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 76px; gap: 12px; align-items: center; }
    .app-shell .qualification-summary .metric-card > strong { text-align: right; font-size: 1.3rem; }
    .app-shell .qualification-summary .metric-card--text > strong { font-size: 1rem; }
  }

  .app-shell .kanban-board { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 280px; gap: 14px; width: 100%; min-width: 0; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; padding: 14px 14px 18px; border: 1px solid #e0e8ee; border-radius: 14px; background: #f5f8fa; scrollbar-width: auto; scrollbar-color: #8ba5b5 #e8eff3; scroll-padding-inline: 14px; }
  .app-shell .kanban-column { min-height: 220px; padding: 14px; }
  .app-shell .kanban-column header { min-height: 32px; }
  .app-shell .kanban-column header strong { font-size: .85rem; }
  .app-shell .kanban-column header span { color: var(--ws-petroleum); background: #dce8ed; font-size: .75rem; }
  .app-shell .kanban-card { padding: 14px; gap: 7px; }
  .app-shell .kanban-card strong { line-height: 1.45; overflow-wrap: break-word; }
  .app-shell .kanban-card span, .app-shell .kanban-card small { font-size: .79rem; line-height: 1.5; }
  .app-shell .kanban-items > .muted { padding-block: 12px; font-size: .78rem; }
  @media (min-width: 641px) and (max-width: 1100px) {
    .app-shell .view[data-view="opportunities"] .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }

  .app-shell .instruction-intro { color: var(--ws-muted); font-size: .85rem; line-height: 1.65; max-width: 90ch; margin: -4px 0 20px; }
  .app-shell .instruction-steps { display: grid; list-style: none; gap: 0; margin: 0; padding: 0; }
  .app-shell .instruction-steps li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: start; gap: 16px; padding: 18px 0; border-top: 1px solid #e5edf2; }
  .app-shell .instruction-number { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #edf4f7; color: var(--ws-petroleum); font-size: .72rem; font-weight: 700; }
  .app-shell .instruction-copy h3 { margin: 0 0 5px; font-size: .9rem; line-height: 1.45; font-weight: 600; color: var(--ws-ink); }
  .app-shell .instruction-copy p { margin: 0; font-size: .8rem; line-height: 1.6; color: var(--ws-muted); max-width: 75ch; }
  .app-shell .instruction-state { justify-self: end; padding: 6px 10px; border-radius: 7px; background: #f3f6f8; color: #486576; font-size: .73rem; line-height: 1.5; font-variant-numeric: tabular-nums; }
  @media (max-width: 640px) {
    .app-shell .kanban-board { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: minmax(0, 1fr); overflow-x: visible; padding: 10px; }
    .app-shell .kanban-column { min-height: 0; }
    .app-shell .instruction-steps li { grid-template-columns: 28px minmax(0, 1fr); gap: 8px 12px; padding-block: 16px; }
    .app-shell .instruction-number { width: 28px; height: 30px; border-radius: 8px; }
    .app-shell .instruction-state { grid-column: 2; justify-self: start; }
  }

  /* Dashboard graphics share a real zero baseline and visible numeric labels. */
  .app-shell .dashboard-analysis-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: stretch; }
  .app-shell .dashboard-analysis-grid > .panel { min-width: 0; }
  .app-shell .dash-chart-intro { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -6px 0 20px; }
  .app-shell .dash-chart-intro p { margin: 0; color: var(--ws-muted); font-size: .77rem; line-height: 1.5; }
  .app-shell .dash-tag { display: inline-flex; flex-shrink: 0; padding: 5px 9px; color: #31576a; background: #edf4f7; border-radius: 7px; font-size: .7rem; font-weight: 600; font-variant-numeric: tabular-nums; }
  .app-shell .dash-funnel-steps, .app-shell .dash-stage-list, .app-shell .dash-alert-list { list-style: none; margin: 0; padding: 0; }
  .app-shell .dash-funnel-steps { display: grid; gap: 18px; }
  .app-shell .dash-funnel-step { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; position: relative; }
  .app-shell .dash-funnel-step:not(:last-child)::before { content: ""; position: absolute; width: 1px; background: #dfe8ed; top: 30px; bottom: -18px; left: 14px; }
  .app-shell .dash-step-number { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid #dce6eb; border-radius: 10px; font-size: .66rem; font-weight: 700; color: var(--ws-petroleum); background: #f4f8fa; }
  .app-shell .dash-chart-label { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; color: #345365; font-size: .8rem; line-height: 1.45; }
  .app-shell .dash-chart-label > span:last-child { display: flex; align-items: baseline; gap: 12px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
  .app-shell .dash-chart-label strong { color: var(--ws-ink); font-size: 1.05rem; font-weight: 600; }
  .app-shell .dash-chart-label small { color: var(--ws-muted); font-size: .72rem; min-width: 48px; text-align: right; }
  .app-shell .dash-bar { height: 16px; margin-top: 8px; border-radius: 4px; background: repeating-linear-gradient(90deg, transparent 0, transparent calc(25% - 1px), #cad8e440 calc(25% - 1px), #cad8e440 25%), #edf3f6; overflow: hidden; }
  .app-shell .dash-bar > span { display: block; width: var(--bar-size, 0%); height: 100%; background: var(--stage-color, #174f67); border-radius: inherit; transform-origin: left center; }
  .app-shell .dash-tone-capture { --stage-color: #7397a9; }
  .app-shell .dash-tone-qualified { --stage-color: #397a93; }
  .app-shell .dash-tone-budget { --stage-color: #174f67; }
  .app-shell .dash-tone-project { --stage-color: #e3aa22; }
  .app-shell .dash-tone-project .dash-step-number { background: #fff6df; border-color: #f1dda7; color: #846011; }
  .app-shell .dash-chart-note { margin: 16px 0 0; color: var(--ws-muted); font-size: .72rem; line-height: 1.65; }
  .app-shell .dash-chart-note strong { font-weight: 600; }
  .app-shell .dash-chart-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 20px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #e5ecf1; font-size: .76rem; line-height: 1.6; color: var(--ws-muted); }
  .app-shell .dash-chart-footer strong { text-align: right; color: var(--ws-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
  .app-shell .dash-distribution { display: flex; height: 12px; overflow: hidden; border-radius: 5px; background: #edf3f6; margin: 0 0 18px; }
  .app-shell .dash-distribution span { height: 100%; }
  .app-shell .dash-stage-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .app-shell .dash-stage-list .dash-bar { height: 5px; margin-top: 7px; margin-left: 17px; background: #edf3f6; }
  .app-shell .dash-stage-name { display: flex; gap: 9px; align-items: center; min-width: 0; }
  .app-shell .dash-stage-name i { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 3px; background: var(--stage-color); }
  .app-shell .dash-stage-list .dash-chart-label strong { font-size: .85rem; }
  .app-shell .dash-alert-list { display: grid; gap: 6px; }
  .app-shell .dash-alert-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: #f7f9fa; }
  .app-shell .dash-alert-symbol { display: grid; place-items: center; flex: 0 0 28px; height: 28px; border-radius: 9px; color: #527786; background: #eaf1f4; font-size: .85rem; font-weight: 600; }
  .app-shell .dash-alert-copy { flex: 1; display: grid; gap: 3px; min-width: 0; font-size: .8rem; color: #345365; }
  .app-shell .dash-alert-copy small { color: var(--ws-muted); font-size: .68rem; }
  .app-shell .dash-alert-count { font-size: 1.05rem; font-weight: 600; font-variant-numeric: tabular-nums; }
  .app-shell .dash-alert-danger { --alert-ink: #aa332f; --alert-wash: #ffebe7; }
  .app-shell .dash-alert-warning { --alert-ink: #835b0b; --alert-wash: #fff0c4; }
  .app-shell .dash-alert-info { --alert-ink: #24589e; --alert-wash: #e6efff; }
  .app-shell .dash-alert-list .has-value { box-shadow: inset 2px 0 var(--alert-ink); }
  .app-shell .has-value .dash-alert-symbol { background: var(--alert-wash); color: var(--alert-ink); }
  .app-shell .has-value .dash-alert-count { color: var(--alert-ink); }
  .app-shell .dash-finance-bars { display: grid; gap: 22px; margin: 0; }
  .app-shell .dash-finance-bars > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .app-shell .dash-finance-bars dt { display: flex; align-items: center; gap: 9px; color: #345365; font-size: .8rem; }
  .app-shell .dash-finance-bars dd { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0; font-variant-numeric: tabular-nums; }
  .app-shell .dash-finance-bars dd strong { font-size: 1.3rem; font-weight: 600; letter-spacing: -.035em; }
  .app-shell .dash-finance-bars dd > span { font-size: .71rem; color: var(--ws-muted); }
  .app-shell .dash-finance-bars .dash-bar { height: 12px; margin: 0; }
  .app-shell .dash-finance-in { --stage-color: #16836c; }
  .app-shell .dash-finance-out { --stage-color: #bc8a20; }
  .app-shell .dash-direction { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: #edf6f2; color: #15725e; font-size: 1rem; }
  .app-shell .dash-finance-out .dash-direction { color: #8b6413; background: #fff5df; }
  .app-shell .dash-balance { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; padding: 18px; margin-top: 20px; border: 1px solid #dce9ee; border-radius: 12px; background: linear-gradient(120deg, #eff6f8, #f9fcfd); }
  .app-shell .dash-balance > span { color: #345365; font-size: .75rem; }
  .app-shell .dash-balance { container-type: inline-size; }
  .app-shell .dash-balance strong { color: #194b60; font-size: clamp(1rem, 7.5cqi, 1.65rem); font-weight: 600; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
  .app-shell .dash-balance small { color: var(--ws-muted); font-size: .7rem; }
  .app-shell .dash-balance.is-negative { background: #fff6f2; border-color: #efdbd2; }
  .app-shell .dash-balance.is-negative strong { color: #a6442b; }
  .app-shell .dash-restricted p { color: var(--ws-muted); font-size: .85rem; line-height: 1.65; }

  @media (max-width: 1100px) {
    .app-shell .dashboard-analysis-grid { grid-template-columns: minmax(0, 1fr); }
  }
  @media (max-width: 640px) {
    .app-shell .dash-chart-intro { flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
    .app-shell .dash-funnel-step { grid-template-columns: 26px minmax(0, 1fr); gap: 8px; }
    .app-shell .dash-step-number { width: 26px; height: 28px; }
    .app-shell .dash-funnel-step:not(:last-child)::before { left: 12px; }
    .app-shell .dash-chart-label { font-size: .75rem; gap: 8px; }
    .app-shell .dash-chart-label > span:last-child { gap: 7px; }
    .app-shell .dash-chart-label small { min-width: 42px; font-size: .68rem; }
    .app-shell .dash-chart-footer { gap: 12px; }
    .app-shell .dash-finance-bars dd { flex-wrap: wrap; gap: 5px 12px; }
    .app-shell .dash-finance-bars dd strong { font-size: 1.2rem; }
    .app-shell .dash-alert-list li { padding: 10px; gap: 9px; }
  }

  @media (prefers-reduced-motion: no-preference) {
    .app-shell :is(input, select, textarea) { transition: border-color 180ms ease, box-shadow 180ms ease; }
    .app-shell :is(.segment, .entity-tab, .settings-nav-button) { transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease; }
    .app-shell .data-table tbody tr { transition: background-color 160ms ease, box-shadow 160ms ease; }
  }

  @media (hover: hover) and (pointer: fine) {
    .app-shell .btn:not(:disabled):hover { transform: translateY(-1px); box-shadow: inset 0 1px #ffffff60, 0 5px 14px #62491114; }
    .app-shell .btn.secondary:not(:disabled):hover { background: #f4f8fa; border-color: #b7cdd9; }
    .app-shell .data-table tbody tr:hover { background: #f6fafc; box-shadow: inset 2px 0 #dcac39; }
    .app-shell .segment:not(.active):hover, .app-shell .entity-tab:not(.active):hover { background: #ffffff80; color: var(--ws-petroleum); }
  }
  .app-shell .btn:not(:disabled):active { transform: translateY(0) scale(.98); }
  @media (min-width: 1600px) {
    .app-shell .main-scroll { padding: 32px 44px 44px; }
    .app-shell .topbar { padding-inline: 44px; }
  }
  @media (min-width: 901px) {
    .app-shell .view[data-view="projects"] .data-table th:last-child,
    .app-shell .view[data-view="projects"] .data-table td:last-child {
      position: sticky;
      right: 0;
      background: #fff;
      box-shadow: -6px 0 12px #1b425509;
      min-width: 145px;
    }
    .app-shell .view[data-view="projects"] .data-table th:last-child { background: #eef3f6; }
  }
  @media (max-width: 1100px) and (min-width: 901px) {
    .app-shell { --sio-sidebar-width: 218px; }
    .app-shell .sidebar { padding-inline: 10px; }
    .app-shell .sidebar .brand-logo { width: 152px; }
    .app-shell .main-scroll { padding: 22px; }
    .app-shell .topbar { padding-inline: 22px; }
  }
  @media (max-width: 900px) {
    .app-shell { padding: 0; }
    .app-shell .sidebar { margin: 8px; padding-top: 18px; width: min(300px, calc(100vw - 32px)); }
    .app-shell .sidebar-header { padding-bottom: 18px; }
    .app-shell .sidebar .brand-logo { width: 162px; height: 52px; }
    .app-shell .topbar { padding: 14px 18px; min-height: 0; }
    .app-shell .main-scroll { padding: 22px 18px; }
    .app-shell .topbar-menu-toggle { background: #f5f8fa; border-color: #dce6ed; }
    .app-shell .topbar-menu-toggle span { background: #264b60; }
  }
  @media (max-width: 640px) {
    .app-shell .topbar { padding: 12px 14px; gap: 10px; }
    .app-shell .main-scroll { padding: 20px 14px; border-radius: 0; }
    .app-shell .view { gap: 16px; }
    .app-shell .page-header p:not(.eyebrow), .app-shell .flow-header p:not(.eyebrow) { font-size: .875rem; line-height: 1.6; }
    .app-shell .panel { padding: 16px; border-radius: 14px; }
    .app-shell .grid { gap: 12px; }
    .app-shell .view[data-view="projects"] > .grid.three:has(> .metric) { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; background: #fff; border: 1px solid #e3eaf0; border-radius: 13px; overflow: hidden; }
    .app-shell .view[data-view="projects"] > .grid.three > .metric { padding: 14px 12px; min-height: 100px; border: 0; border-right: 1px solid #e3eaf0; border-radius: 0; box-shadow: none; }
    .app-shell .view[data-view="projects"] > .grid.three > .metric:last-child { border-right: 0; }
    .app-shell .view[data-view="projects"] > .grid.three > .metric > span { font-size: .75rem; }
    .app-shell .view[data-view="dashboard"] > .grid.four:first-of-type { gap: 12px; }
    .app-shell .metric, .app-shell .metric-card { min-height: 108px; padding: 16px; gap: 12px; border-radius: 12px; }
    .app-shell .metric > strong, .app-shell .metric-card > strong { font-size: 1.45rem; }
    .app-shell .toolbar.compact, .app-shell .dashboard-period-form, .app-shell .filter-grid { padding: 12px; gap: 10px; }
    .app-shell :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { font-size: 1rem; }
    .app-shell .data-table.table-cards td { padding-block: 9px; }
    .app-shell .data-table.table-cards tr { border-color: #dce6ed; border-radius: 12px; }
    .app-shell .status { font-size: .75rem; }
    .app-shell .entity-tab-list, .app-shell .settings-nav { width: 100%; }
  }

  /* Monetary values, explanatory rows and guides need different reading widths. */
  .app-shell .metric--money { container-type: inline-size; }
  .app-shell .metric--money > strong { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 6px; font-size: clamp(1rem, 14cqi, 1.85rem); overflow-wrap: normal; line-height: 1.3; }
  @media (max-width: 767px) { .app-shell .view[data-view="dashboard"] .metric--money > strong { font-size: clamp(1rem, 8cqi, 1.85rem); } }
  .app-shell .metric--money .metric-amount { font: inherit; color: inherit; white-space: nowrap; }
  .app-shell .metric--money .metric-currency { font-size: .68em; font-weight: 500; letter-spacing: 0; white-space: nowrap; }
  .app-shell .budget-result-card { align-content: start; gap: 10px; }
  .app-shell .budget-result-status { font-size: .78rem; line-height: 1.5; }
  .app-shell .budget-result-status .status { white-space: normal; }
  .app-shell .summary-list--instructions .summary-row { display: grid; grid-template-columns: 140px minmax(0, 1fr); align-items: start; gap: 12px 20px; padding-block: 13px; font-size: .82rem; line-height: 1.6; }
  .app-shell .summary-list--instructions .summary-row > span { font-weight: 600; color: #345365; }
  .app-shell .summary-list--instructions .summary-row > strong { text-align: left; font-weight: 400; line-height: inherit; }
  .app-shell .compact-analysis-row { gap: 8px; padding-block: 13px; }
  .app-shell .compact-analysis-row p, .app-shell .compact-analysis-note { text-align: left; font-size: .79rem; line-height: 1.6; }
  .app-shell .compact-analysis-main span { font-size: .83rem; line-height: 1.5; }
  .app-shell :is(.catalog-import-workflow-steps, .catalog-import-lifecycle-steps, .catalog-import-quality-strip, .catalog-import-review-lanes, .supplier-source-lifecycle-grid) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .app-shell :is(.catalog-import-workflow-steps, .catalog-import-lifecycle-steps, .catalog-import-quality-strip, .catalog-import-review-lanes, .supplier-source-lifecycle-grid) article { padding: 14px; align-content: start; gap: 8px; border-radius: 10px; }
  .app-shell :is(.catalog-import-workflow-steps, .supplier-source-lifecycle-grid) strong { font-size: .9rem; line-height: 1.5; overflow-wrap: break-word; }
  .app-shell :is(.catalog-import-workflow-steps, .catalog-import-lifecycle-steps, .catalog-import-quality-strip, .catalog-import-review-lanes, .supplier-source-lifecycle-grid) :is(small, p) { font-size: .77rem; line-height: 1.6; }
  .app-shell :is(.catalog-import-lifecycle-steps, .catalog-import-quality-strip, .catalog-import-review-lanes) .status { max-width: 100%; white-space: normal; }
  @media (min-width: 1440px) {
    .app-shell :is(.catalog-import-workflow-steps, .catalog-import-lifecycle-steps, .catalog-import-quality-strip, .catalog-import-review-lanes) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  }
  @media (min-width: 641px) and (max-width: 1250px) {
    .app-shell .view:is([data-view="payables"], [data-view="revenues"], [data-view="cashflow"]) .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 640px) {
    .app-shell :is(.catalog-import-workflow-steps, .catalog-import-lifecycle-steps, .catalog-import-quality-strip, .catalog-import-review-lanes, .supplier-source-lifecycle-grid) { grid-template-columns: minmax(0, 1fr); }
    .app-shell .metric--wide { grid-column: 1 / -1; }
    .app-shell .summary-list--instructions .summary-row { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  }

  /* Registration shares the same reading order in the page and contextual panel. */
  .app-shell .registration-fields { display: grid; gap: 26px; min-width: 0; container-type: inline-size; }
  .app-shell .registration-group { min-inline-size: 0; width: 100%; margin: 0; padding: 0; border: 0; }
  .app-shell .registration-group > legend { width: 100%; padding: 0 0 10px; margin-bottom: 14px; border-bottom: 1px solid var(--ws-line); color: var(--ws-ink); font-size: .92rem; font-weight: 600; line-height: 1.5; }
  .app-shell .registration-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 14px 16px; }
  .app-shell .registration-field { min-width: 0; gap: 6px; align-content: start; }
  .app-shell .registration-label { color: #466275; font-size: .82rem; line-height: 1.5; }
  .app-shell .registration-required { color: #946300; }
  .app-shell .registration-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; align-self: end; }
  .app-shell .registration-group > .registration-actions { margin: 12px 0 16px; }
  .app-shell .registration-actions > .btn { min-height: 44px; white-space: normal; }
  .app-shell .registration-help { margin: 0 0 8px; color: var(--ws-muted); font-size: .8rem; line-height: 1.6; }
  .app-shell .registration-status { margin: 0 0 12px; padding: 10px 12px; color: #255b62; background: #edf6f5; border-radius: 9px; font-size: .8rem; line-height: 1.6; overflow-wrap: break-word; }
  .app-shell .registration-grid > .registration-status { margin: 0; }
  .app-shell .registration-error { color: #a13227; font-size: .78rem; line-height: 1.5; }
  .app-shell .registration-status.is-error, .app-shell .registration-save-feedback { color: #962e25; background: #fff3ef; }
  .app-shell .registration-save-feedback { padding: 12px 14px; margin: 0; border-radius: 9px; font-size: .82rem; line-height: 1.6; }
  .app-shell .registration-field > input[aria-invalid="true"] { border-color: #b34134; }
  .app-shell :is(.registration-error, .registration-status, .registration-save-feedback)[hidden] { display: none; }
  .app-shell .opportunity-registration-form > .actions { padding-top: 8px; }
  .app-shell .opportunity-registration-form .field { min-width: 0; }
  .app-shell .drawer-panel > .drawer-header { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: center; gap: 12px; }
  .app-shell .drawer-panel > .drawer-header .icon-btn { width: 44px; min-width: 44px; height: 44px; padding: 0; }
  @container (max-width: 420px) {
    .app-shell .registration-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .app-shell .registration-grid > .registration-actions { margin-top: -5px; }
    .app-shell .registration-actions > .btn { width: 100%; }
  }

  /* Arrows describe movement direction; balances retain their signed values. */
  .app-shell { --flow-in: #15744f; --flow-out: #b43b37; --flow-in-wash: #eaf6ee; --flow-out-wash: #fdf0ed; --flow-up: url('./assets/brand-v2/icons/arrow-up.svg'); --flow-down: url('./assets/brand-v2/icons/arrow-down.svg'); }
  .app-shell .flow-direction { display: inline-grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; border-radius: 9px; vertical-align: middle; }
  .app-shell .flow-direction::before { content: ""; display: block; width: 17px; height: 17px; background: currentColor; mask: var(--flow-up) center / contain no-repeat; }
  .app-shell .flow-direction--income { color: var(--flow-in); background: var(--flow-in-wash); }
  .app-shell .flow-direction--expense { color: var(--flow-out); background: var(--flow-out-wash); }
  .app-shell .flow-direction--expense::before { mask-image: var(--flow-down); }
  .app-shell .metric--income { border-color: #cde5d6; background: linear-gradient(120deg, #f3faf5, #fff); }
  .app-shell .metric--expense { border-color: #efd6d1; background: linear-gradient(120deg, #fff6f3, #fff); }
  .app-shell .metric--income > strong { color: var(--flow-in); }
  .app-shell .metric--expense > strong { color: var(--flow-out); }
  .app-shell .metric-label { display: flex; align-items: center; gap: 9px; }
  .app-shell .metric .flow-direction { width: 26px; height: 26px; flex-basis: 26px; }
  .app-shell .cashflow-reading .summary-row { align-items: center; min-height: 55px; font-size: .8rem; }
  .app-shell .cashflow-reading .summary-row:not(:last-child) > strong { display: grid; place-items: center; min-width: 32px; height: 30px; padding-inline: 7px; border-radius: 8px; background: #eff4f7; font-size: .94rem; }
  .app-shell .cashflow-reading .summary-row:last-child { align-items: start; line-height: 1.6; }
  .app-shell .cashflow-period { display: grid; gap: 10px; }
  .app-shell .cashflow-movement { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 13px; border-radius: 11px; font-size: .8rem; }
  .app-shell .cashflow-movement--income { background: #f2f9f4; }
  .app-shell .cashflow-movement--expense { background: #fff5f2; }
  .app-shell .cashflow-movement > strong { font-size: .98rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .app-shell .cashflow-movement--income > strong { color: var(--flow-in); }
  .app-shell .cashflow-movement--expense > strong { color: var(--flow-out); }
  .app-shell .cashflow-net { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 18px; margin-top: 3px; padding: 16px 13px; border-top: 1px solid #e0e8ee; }
  .app-shell .cashflow-net > span { font-size: .78rem; color: var(--ws-muted); }
  .app-shell .cashflow-net > strong { color: var(--ws-petroleum); font-size: 1.4rem; font-weight: 600; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
  .app-shell .cashflow-net.is-negative > strong { color: var(--flow-out); }
  .app-shell .cashflow-period-note { margin: -4px 13px 0; color: var(--ws-muted); font-size: .74rem; line-height: 1.5; }
  .app-shell .cashflow-amount, .app-shell .cashflow-type { display: inline-flex; align-items: center; gap: 7px; font-variant-numeric: tabular-nums; }
  .app-shell .cashflow-amount { white-space: nowrap; font-weight: 600; }
  .app-shell .cashflow-amount > span:last-child { color: inherit; }
  .app-shell .cashflow-amount--income { color: var(--flow-in); }
  .app-shell .cashflow-amount--expense { color: var(--flow-out); }
  .app-shell .cashflow-amount .flow-direction { width: 21px; height: 24px; flex-basis: 21px; background: transparent; }
  .app-shell .cashflow-amount .flow-direction::before { width: 15px; height: 15px; }
  .app-shell .cashflow-project-table th:is(:nth-child(2), :nth-child(3))::before { content: ""; display: inline-block; width: 15px; height: 15px; margin-right: 6px; vertical-align: -3px; background: var(--flow-in); mask: var(--flow-up) center / contain no-repeat; }
  .app-shell .cashflow-project-table th:nth-child(3)::before { background: var(--flow-out); mask-image: var(--flow-down); }
  .app-shell .cashflow-mobile-breakdown { display: grid; gap: 9px; margin-block: 4px 12px; padding-block: 10px; border-top: 1px solid var(--ws-line); border-bottom: 1px solid var(--ws-line); }
  .app-shell .cashflow-mobile-breakdown > div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; }
  .app-shell .cashflow-mobile-breakdown > div > strong { color: var(--ws-ink); }
  .app-shell .dash-finance-out { --stage-color: var(--flow-out); }
  @media (max-width: 640px) {
    .app-shell .metric-label:has(.flow-direction) { align-items: start; flex-direction: column; gap: 8px; }
    .app-shell .cashflow-movement { grid-template-columns: 28px minmax(0, 1fr); padding: 12px; gap: 5px 10px; }
    .app-shell .cashflow-movement > .flow-direction { grid-row: 1 / 3; }
    .app-shell .cashflow-movement > strong { grid-column: 2; white-space: normal; overflow-wrap: break-word; }
    .app-shell .cashflow-compact .compact-analysis-main { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .app-shell .cashflow-compact .compact-analysis-value { justify-self: start; text-align: left; }
  }
}

/* Shared table and settings contract. No overrides of opportunity workflow. */
@media screen {
  .app-shell { --ws-space-xs: 4px; --ws-space-sm: 8px; --ws-space-md: 16px; --ws-space-lg: 24px; }
  .app-shell .semantic-table { min-width: 0; max-width: 100%; overflow: visible; }
  .app-shell .semantic-table .table-wrap { max-width: 100%; border-radius: 11px; scrollbar-width: thin; scrollbar-color: #8ba1af #edf2f5; overscroll-behavior-x: contain; }
  .app-shell .semantic-table table { width: 100%; min-width: var(--table-min-width, 0); table-layout: auto; }
  .app-shell .semantic-table th, .app-shell .semantic-table td { vertical-align: middle; word-break: normal; }
  .app-shell .semantic-table :is(.cell-description, .cell-identity) { white-space: normal; text-align: left; overflow-wrap: break-word; min-width: 110px; }
  .app-shell .semantic-table :is(.cell-money, .cell-quantity) { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
  .app-shell .semantic-table .cell-date { white-space: nowrap; text-align: left; font-variant-numeric: tabular-nums; }
  .app-shell .semantic-table .cell-status { white-space: normal; text-align: left; }
  .app-shell .semantic-table .cell-action { text-align: right; white-space: nowrap; }
  .app-shell .semantic-table .cell-action .table-actions { justify-content: flex-end; }
  .app-shell .semantic-table .cell-top { vertical-align: top; }
  .app-shell .semantic-table .cell-nowrap { white-space: nowrap; overflow-wrap: normal; }
  .app-shell .semantic-table .status { display: inline-flex; width: fit-content; max-width: 100%; align-items: center; justify-content: center; white-space: normal; }
  .app-shell .semantic-table :is(.btn, button, select, input) { min-height: 44px; }
  .app-shell .semantic-table td :is(a, small) { overflow-wrap: anywhere; }
  .app-shell .semantic-table .cell-money :is(a, small) { overflow-wrap: normal; }
  .app-shell .finance-inline-money { white-space: nowrap; font-variant-numeric: tabular-nums; }
  .app-shell [data-table-id="payables"] .cell-identity,
  .app-shell [data-table-id="revenues"] .cell-identity { min-width: 210px; max-width: 280px; }
  .app-shell [data-table-id="payables"] .stacked-cell > strong,
  .app-shell [data-table-id="revenues"] .stacked-cell > strong { white-space: nowrap; }
  .app-shell [data-table-id="payables"] .stacked-cell > small,
  .app-shell [data-table-id="revenues"] .stacked-cell > small { white-space: normal; overflow-wrap: break-word; }
  .app-shell .view[data-view="projects"] .semantic-table :is(th, td):last-child { position: static; box-shadow: none; }
  .app-shell .sr-only { position: absolute; top: 0; left: 0; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
  .app-shell .payment-condition { min-width: 0; margin: 0 0 16px; padding: 16px; border: 1px solid var(--ws-line); border-radius: 12px; }
  .app-shell .payment-condition legend { padding-inline: 6px; font-weight: 600; }
  .app-shell .page-header h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  .app-shell .context-help { display: inline-flex; margin-left: auto; flex: 0 0 44px; vertical-align: middle; }
  .app-shell .help-button, .app-shell .help-close { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--ws-line); border-radius: 10px; background: #f7fafb; color: var(--ws-petroleum); cursor: pointer; font: 600 1rem var(--sio-body); }
  .app-shell .help-button:hover, .app-shell .help-close:hover { background: #eaf1f5; }
  .app-shell .context-help-dialog { position: fixed; width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); box-sizing: border-box; margin: auto; padding: 24px; border: 1px solid #dbe5ec; border-radius: 18px; color: var(--ws-ink); background: #fff; box-shadow: 0 20px 70px #0d2c3b2e; overscroll-behavior: contain; }
  .app-shell .context-help-dialog::backdrop { background: #102d4159; }
  .app-shell .help-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; color: var(--ws-muted); font-size: .8rem; }
  .app-shell .context-help-dialog h2 { margin: 0 0 14px; font-size: 1.2rem; line-height: 1.4; }
  .app-shell .help-copy p { margin: 0 0 12px; color: #435f70; font-size: .92rem; line-height: 1.7; }
  .app-shell .settings-field { align-content: start; }
  .app-shell .settings-error { color: #a13227; font-size: .8rem; line-height: 1.5; font-weight: 400; }
  .app-shell .settings-error[hidden], .app-shell #settings-dirty[hidden] { display: none; }
  .app-shell .settings-help { color: var(--ws-muted); font-size: .8rem; line-height: 1.5; font-weight: 400; }
  .app-shell .settings-form [aria-invalid="true"] { border-color: #b94538; }
  .app-shell .settings-form input { min-width: 0; width: 100%; }
  .app-shell .settings-ranges { padding: 16px; margin: 0; border: 1px solid var(--ws-line); border-radius: 12px; min-width: 0; }
  .app-shell .settings-ranges legend { padding: 0 6px; color: var(--ws-ink); font-weight: 600; }
  .app-shell .settings-range-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 14px 20px; }
  .app-shell .settings-range-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 10px; }
  .app-shell .settings-range-row label { display: grid; gap: 7px; min-width: 0; }
  .app-shell .settings-range-label { font-size: .84rem; }
  .app-shell .settings-range-row > button { margin-top: 26px; min-height: 44px; }
  .app-shell [data-setting-range-add] { margin-top: 16px; }
  .app-shell .settings-form .sticky-actions { position: static; background: transparent; flex-wrap: wrap; gap: 10px; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .app-shell .settings-nav-button:disabled { opacity: .6; cursor: wait; }
  @media (max-width: 640px) {
    .app-shell .context-help-dialog { padding: 20px; }
    .app-shell .settings-layout, .app-shell .settings-form { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; }
    .app-shell .settings-form .field { grid-column: 1; }
    .app-shell .settings-nav { width: 100%; display: flex; flex-wrap: wrap; }
    .app-shell .settings-nav-button { flex: 1 1 130px; }
    .app-shell .semantic-table :is(th, td) { padding: 11px 10px; }
  }
  @media (prefers-reduced-motion: no-preference) {
    .app-shell .context-help-dialog[open] { animation: help-appear 160ms cubic-bezier(.32,.72,0,1); }
    @keyframes help-appear { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
  }
}
.app-shell .company-logo-panel { margin-top: 22px; }
.app-shell .company-logo-preview { display:flex; flex-wrap:wrap; align-items:center; gap:20px; min-height:120px; padding:20px; border:1px solid #dce6eb; border-radius:12px; margin:18px 0; background:#fafcfd; }
.app-shell .company-logo-preview img { display:block; max-width:min(240px,100%); max-height:110px; width:auto; height:auto; object-fit:contain; }
.app-shell .drawer-panel-opportunity-legacy-proposal { width:min(100vw,1100px); max-width:100%; }
.app-shell .workspace-leave-dialog { width:min(540px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); padding:28px; border:1px solid #dce6eb; border-radius:18px; color:var(--ink,#123142); background:white; box-shadow:0 20px 65px #12314230; }
.app-shell .workspace-leave-dialog::backdrop { background:#0b263955; }
.app-shell .workspace-leave-dialog h2 { margin:0 0 14px;font-size:1.2rem;line-height:1.4; }
.app-shell .workspace-leave-dialog p { line-height:1.6; }
.app-shell .workspace-leave-dialog .actions { display:flex;flex-wrap:wrap;gap:10px;margin-top:24px; }
.app-shell .workspace-leave-dialog .btn { white-space:normal;line-height:1.4; }
@media(max-width:600px){.app-shell .workspace-leave-dialog {padding:20px;}.app-shell .workspace-leave-dialog .btn{width:100%;}}
