/* Margonaut / Financial Navigation D3 — nine live workspace views.
   Pure CSS presentation. No data, state, role, API, auth or payment alterations.
   Layered after D2's financial-navigation.css. Keep real DOM and app.js untouched. */

/* 00. Editorial grammar shared by all nine modules */
.app-content {
  --fm-line: #d7d5cb;
  --fm-soft: #f8f6f1;
  --fm-paper: #fffdf9;
  --fm-haze: #edf0e9;
  --fm-ink: #1b292e;
  --fm-accent: #df6843;
  --fm-blue: #335a64;
  --fm-focus: #235c67;
}
.shell > section[data-ui-view] { min-width: 0; }
.shell .view-intro { margin: 4px 0 22px; padding: 0 0 22px; border-bottom: 1px solid var(--fm-line); }
.shell .view-intro .eyebrow { font-size: 10px; letter-spacing: .2em; color: var(--fm-blue); }
.shell .view-intro h2 { font: 500 clamp(27px, 3.15vw, 43px)/1.12 var(--fn-serif); letter-spacing: -.044em; color: var(--fm-ink); margin: 9px 0 7px; }
.shell .view-intro p.muted { max-width: 760px; font-size: 13px; line-height: 1.75; color: #697577; }
.shell section.card[data-ui-view],
.shell .team-workspace .team-panel,
.shell .analytics-page .analytics-report-card,
.shell .telegram-page :is(.telegram-hero-card,.telegram-reports-card,.telegram-settings-card) {
  border: 1px solid var(--fm-line); border-radius: 3px;
  box-shadow: 0 8px 25px rgba(24,43,49,.025); background: var(--fm-paper);
}
.shell .section-heading { align-items: flex-start; gap: 20px; margin-bottom: 21px; }
.shell .section-heading h2 { font-weight: 600; letter-spacing: -.045em; font-size: clamp(22px, 2vw, 31px); line-height: 1.15; color: var(--fm-ink); }
.shell .section-heading h3 { color: var(--fm-ink); }
.shell .eyebrow, .shell .report-kicker, .shell .telegram-overline { color: var(--fm-blue); letter-spacing: .165em; font-size: 10px; font-weight: 780; }
.shell :is(.section-copy,.footnote,.team-inline-note) { color: #6c7777; line-height: 1.7; }
.shell .badge { background: #e8ede8; border: 1px solid #d8ded8; border-radius: 2px; color: #415552; font-weight: 700; letter-spacing: .005em; }
.shell .empty-state, .shell .empty, .shell .analytics-empty-state {
  border: 1px dashed #c5cec9; border-radius: 2px; background: #f6f7f2;
  padding: 24px; color: #657774; line-height: 1.65;
}
.shell .empty-state strong, .shell .analytics-empty-state strong { display: block; color: var(--fm-ink); font-weight: 680; margin-bottom: 4px; }
.shell :is(.flash,.assessment,.status-pill) { border-radius: 2px; }
.shell .assessment-danger, .shell .severity-critical .dashboard-action-severity { color: #973e31; background: #faeae5; }
.shell .assessment-safe { color: #2d6b56; background: #e7f1e9; }
.shell .assessment-neutral { color: #345c69; background: #eaf0f0; }
.shell :is(a.external-link,.billing-legal-links a,.legal-links a) { color: #225b68; text-decoration: underline; text-underline-offset: 3px; }
.shell :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea) {
  border: 1px solid #cbd4d0; border-radius: 2px; background: #fffefa;
  min-height: 42px; color: var(--fm-ink);
}
.shell :is(input,select,textarea):focus-visible { outline: 2px solid var(--fm-focus); outline-offset: 2px; }
.shell :is(input[type="checkbox"],input[type="radio"]) { accent-color: #245e60; }
.shell label span { color: #667675; letter-spacing: .005em; }
.shell :is(.form-grid,.team-invite-form,.wb-connection-form,.snapshot-form,.competitor-form) { background: #f8f8f4; border-color: #dcded6; border-radius: 3px; }
.shell .form-grid { padding: clamp(14px,2vw,23px); }
.shell :is(.table-wrap,.competitor-table-wrap,.team-table-wrap) { overflow-x: auto; border: 1px solid var(--fm-line); border-radius: 2px; background: var(--fm-paper); }
.shell table { border-collapse: collapse; min-width: 100%; }
.shell table th { background: #eaece6; color: #4b5d5c; text-transform: uppercase; letter-spacing: .09em; font-size: 10px; font-weight: 750; }
.shell table th, .shell table td { border-bottom: 1px solid #e1e2da; padding: 13px 15px; text-align: left; }
.shell table tbody tr:hover { background: #f9f8f2; }
.shell :is(.list-item,.product-card,.competitor-card,.history-row,.event-card) { border-radius: 2px; border-color: #d7dbd5; background: #fffefa; }
.shell :is(.list-item,.product-card,.competitor-card):hover { border-color: #7d9a94; background: #f4f7f2; }
.shell :is(.list-item.active,.product-card.selected,.competitor-card.selected) { background: #eaf1ec; border-color: #547e74; box-shadow: inset 3px 0 0 var(--fn-orange); }
.shell .metric, .shell .meta-grid>div { border: 1px solid var(--fm-line); border-radius: 2px; background: var(--fm-soft); padding: 16px 18px; }
.shell .metric strong, .shell .meta-grid strong { color: var(--fm-ink); font-size: 21px; font-variant-numeric: tabular-nums; letter-spacing: -.045em; }
.shell .metric span, .shell .meta-grid span { font-size: 11px; color: #667371; }
.shell :is(.history-panel,.analytics-report-card,.product-analytics-panel,.economics-panel) { border-radius: 2px; border-color: var(--fm-line); background: var(--fm-paper); }
.shell .chart-line { stroke: #376a6c; }
.shell .chart-point { fill: #e56741; }
.shell .chart-axis { stroke: #d7dad3; }
.shell .price-chart-wrap { background: #fcfbf6; border-radius: 2px; }
.shell .footnote code { background: #eaece7; color: #445a59; border-radius: 2px; }
.shell .button { letter-spacing: -.01em; }
.shell .button:disabled, .shell .button[disabled] { cursor: not-allowed; opacity: .56; }

/* 01. Overview — decision board, not a generic dashboard */
.shell .overview-kpi-strip { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1px; background: #cbd2cb; border: 1px solid #cbd2cb; margin: 0 0 23px; border-radius: 3px; overflow: hidden; }
.shell .overview-kpi-card { min-width: 0; min-height: 152px; text-align: left; padding: 21px 21px 22px; border: 0; border-radius: 0; box-shadow: none; background: #fffdfa; display: flex; flex-direction: column; gap: 8px; justify-content: flex-start; }
.shell .overview-kpi-card:first-child { background: #20343c; color: #fffdfa; }
.shell .overview-kpi-card:first-child :is(span,small) { color: #b6c9c4; }
.shell .overview-kpi-card:hover { background: #eef3ed; transform: none; }
.shell .overview-kpi-card:first-child:hover { background: #29454c; }
.shell .overview-kpi-card span { text-transform: uppercase; letter-spacing: .11em; font-size: 10px; font-weight: 780; color: #6b7b78; }
.shell .overview-kpi-card strong { font-family: var(--fn-serif); font-size: clamp(28px, 2.7vw, 43px); line-height: 1; font-weight: 500; letter-spacing: -.04em; color: var(--fm-ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.shell .overview-kpi-card:first-child strong { color: #fffdfa; }
.shell .overview-kpi-card small { margin-top: auto; color: #788580; font-size: 11px; line-height: 1.5; }
.shell .dashboard-command-center { padding: clamp(20px,2.4vw,34px); margin-bottom: 22px; }
.shell .dashboard-command-heading { border-bottom: 1px solid var(--fm-line); padding-bottom: 16px; }
.shell .dashboard-health-grid { gap: 1px; background: #d7ddd5; border: 1px solid #d7ddd5; border-radius: 2px; margin: 22px 0; overflow: hidden; }
.shell .dashboard-health-grid>div { border: 0; border-radius: 0; background: #f4f6f1; padding: 18px; }
.shell .dashboard-health-grid span { letter-spacing: .02em; text-transform: uppercase; font-size: 10px; }
.shell .dashboard-health-grid strong { color: #243b41; font-size: 15px; }
.shell .dashboard-action { border-radius: 2px; grid-template-columns: minmax(65px,85px) minmax(0,1fr) 17px; gap: 14px; }
.shell .dashboard-action:hover { transform: none; box-shadow: inset 0 0 0 1px #96b5a9; }
.shell .dashboard-action.severity-critical { border-left-color: #b94738; }
.shell .dashboard-action.severity-warning { border-left-color: var(--fn-orange); }
.shell .decision-history-card, .shell .overview-card, .shell .onboarding-card { padding: clamp(19px,2.4vw,30px); margin-bottom: 20px; }
.shell .onboarding-progress { border-radius: 0; height: 4px; background: #dbe0d9; }
.shell .onboarding-progress>span { background: #df6843; border-radius: 0; }
.shell .onboarding-current { background: #f4f6ef; border: 1px solid #d8ddd3; border-radius: 2px; }
.shell .overview-metrics { gap: 1px; background: #d5dbd4; border: 1px solid #d5dbd4; border-radius: 2px; overflow: hidden; }
.shell .overview-metric { background: #fbfaf5; border: 0; border-radius: 0; padding: 19px; }
.shell .overview-metric-money strong { font-family: var(--fn-serif); font-weight: 500; font-size: clamp(26px,3vw,42px); }

/* 02. Analytics — quantitative editorial report */
.shell .analytics-page { margin-top: 0; }
.shell .analytics-page-toolbar { padding: 24px 28px; margin: 0 0 1px; border: 1px solid var(--fm-line); border-radius: 3px 3px 0 0; background: #fffdfa; }
.shell .analytics-page-toolbar h2 { font-size: 27px; letter-spacing: -.04em; font-weight: 620; margin: 0 0 7px; }
.shell .analytics-page-toolbar .muted { max-width: 500px; font-size: 12px; line-height: 1.65; }
.shell .analytics-controls { gap: 12px; }
.shell .analytics-kpi-grid { gap: 1px; background: #d1d8d1; border: 1px solid #d1d8d1; border-top: 0; padding: 0; margin: 0 0 25px; border-radius: 0 0 3px 3px; overflow: hidden; }
.shell .analytics-kpi { background: #f5f6f0; border: 0; border-radius: 0; padding: 21px; min-height: 139px; }
.shell .analytics-kpi:first-child { background: #264b53; color: #f8f6f0; }
.shell .analytics-kpi:first-child :is(span,small) { color: #cedbd6; }
.shell .analytics-kpi span { font-size: 10px; letter-spacing: .09em; text-transform: uppercase; }
.shell .analytics-kpi strong { color: #1c333b; font: 500 clamp(29px,3vw,44px)/1.03 var(--fn-serif); font-variant-numeric: tabular-nums; }
.shell .analytics-kpi:first-child strong { color: #fffdfa; }
.shell .analytics-kpi small { line-height: 1.4; }
.shell .analytics-report-grid { gap: 19px; }
.shell .analytics-report-card { padding: clamp(19px,2.4vw,30px); }
.shell .analytics-report-card .report-heading { padding-bottom: 15px; border-bottom: 1px solid #e4e2d9; margin-bottom: 20px; }
.shell .report-heading h3 { font: 500 clamp(24px,2.5vw,33px)/1.15 var(--fn-serif); letter-spacing: -.04em; color: #24363c; }
.shell .organization-analytics-chart { background-color: #fcfbf7; background-image: linear-gradient(#eceee8 1px, transparent 1px); background-size: 100% 52px; border: 1px solid #e5e5dc; border-radius: 2px; }
.shell .analytics-funnel-grid { gap: 1px; background: #d9ddd5; border: 1px solid #d9ddd5; border-radius: 2px; }
.shell .analytics-funnel-step { border: 0; border-radius: 0; background: #f8f8f3; position: relative; }
.shell .analytics-funnel-step::before { content: ''; display: block; position: absolute; top: 0; left: 0; width: 28px; border-top: 3px solid #d86c45; }
.shell .analytics-funnel-step strong { font-family: var(--fn-serif); font-size: clamp(23px,2.35vw,34px); font-weight: 500; }
.shell .analytics-cancel-strip { border-radius: 2px; background: #f3f5ef; }
.shell .analytics-report-card table th { white-space: nowrap; }

/* 03. Products — stores, catalog, unit economics */
.shell .product-import-card, .shell .detail-card { padding: clamp(18px,2.5vw,30px); margin-bottom: 22px; }
.shell .product-import-card { border-top: 3px solid #476c70; }
.shell .wb-connection-form { padding: 15px; gap: 12px; border: 1px solid #dedfd7; background: #f7f7f2; border-radius: 2px; }
.shell .wb-catalog-summary { border-radius: 2px; background: #e9efea; border: 1px solid #d0dbd3; }
.shell .wb-import-toolbar { border-radius: 2px; background: #f6f6f0; }
.shell .wb-catalog-list { gap: 10px; }
.shell .workspace[data-ui-view="products"] { display: grid; grid-template-columns: minmax(228px, 300px) minmax(0,1fr); align-items: start; gap: 18px; margin-top: 0; }
.shell .workspace[data-ui-view="products"]>.panel { min-height: 0; padding: clamp(18px,2.2vw,28px); }
.shell .workspace[data-ui-view="products"]>.main-panel { min-height: 480px; }
.shell .products-refresh-action { border: 1px solid #d7ded7; border-radius: 2px; background: #f4f5ef; padding: 8px 10px; color: #3f5d5d; }
.shell .product-grid { gap: 11px; grid-template-columns: repeat(auto-fill,minmax(min(230px,100%),1fr)); }
.shell .product-card { padding: 20px; position: relative; border-top: 2px solid #94a9a0; }
.shell .product-card strong { color: #263b3e; font-size: 15px; letter-spacing: -.025em; }
.shell .product-card button { border-radius: 2px; }
.shell .product-analytics-panel { background: #fbfaf5; }
.shell .detail-card .detail-layout { gap: 24px; }
.shell .detail-card h3 { font: 500 25px/1.2 var(--fn-serif); letter-spacing: -.038em; }
.shell .economics-grid, .shell .analytics-metrics { gap: 12px; }
.shell .economics-panel { border-left: 3px solid #d66b43; }
.shell .expense-breakdown { color: #425552; }
.shell .stock-watch-panel { background: #f3f6f1; border-radius: 2px; }

/* 04. Competitors — landscape of competing prices */
.shell .competitor-workspace-card, .shell .competitors-card, .shell .competitor-detail { padding: clamp(20px,2.5vw,31px); margin-bottom: 19px; }
.shell .competitor-workspace-card { border-top: 3px solid #e27752; }
.shell .competitor-workspace-toolbar { gap: 13px; }
.shell .competitor-workspace-summary { gap: 10px; }
.shell .competitor-workspace-summary .overview-metric { border: 1px solid #d9e0d9; border-radius: 2px; background: #f6f7f2; }
.shell .competitor-workspace-search { border-radius: 2px; }
.shell .competitor-table-wrap { border: 1px solid #d3d9d3; border-radius: 2px; }
.shell .competitor-table thead th { position: sticky; top: 0; z-index: 1; background: #e8ebe5; }
.shell .competitor-table td { font-variant-numeric: tabular-nums; }
.shell .competitor-table tbody tr:hover td { background: #f3f6f0; }
.shell .competitor-form { border: 1px solid #dce0d8; background: #f8f8f4; padding: 20px; border-radius: 2px; }
.shell .competitor-card { border-top: 2px solid #c4866c; padding: 19px; }
.shell .competitor-price-row>div { border-radius: 2px; background: #f6f7f2; }
.shell .competitor-price-row strong { font-family: var(--fn-serif); font-weight: 500; font-size: 25px; }
.shell .competitor-detail-layout { gap: 22px; }
.shell .alert-financial-panel { border-radius: 2px; border-left: 3px solid #d76542; }
.shell .assessment { max-width: 100%; }

/* 05. Events — legible signal history and task queue */
.shell .alerts-card, .shell .decision-workflow-card { padding: clamp(20px,2.4vw,30px); margin-bottom: 19px; }
.shell .alerts-card { border-top: 3px solid #526c72; }
.shell .alerts-toolbar, .shell .decision-workflow-toolbar { border-radius: 2px; padding: 13px; background: #f5f6f0; border: 1px solid #dedfd7; }
.shell .alert-center-list { gap: 10px; }
.shell .event-card { border-left-width: 3px; padding: 17px 20px; line-height: 1.55; }
.shell .event-card-header strong { color: #273a3e; }
.shell .decision-workflow-stats { gap: 1px; background: #d9e0d9; border: 1px solid #d9e0d9; border-radius: 2px; }
.shell .decision-workflow-stats>div { background: #f7f8f2; border-radius: 0; border: 0; }
.shell .decision-history-list { gap: 9px; }
.shell .decision-history-list>div, .shell .decision-history-list>button { border-radius: 2px; }

/* 06. Telegram — notification console rather than chat imitation */
.shell .telegram-page { display: grid; gap: 18px; }
.shell .telegram-hero-card { padding: clamp(20px,2.5vw,33px); background: #233d45 !important; color: #fffdfa; border-color: #34545b !important; }
.shell .telegram-hero-card :is(h2,h3,strong) { color: #fffdfa; }
.shell .telegram-hero-card :is(p,.muted,small) { color: #cadad6; }
.shell .telegram-hero-card .telegram-overline { color: #b4d4ca; }
.shell .telegram-hero-card .button { background: #f3f2e9; color: #213b41; }
.shell .telegram-hero-card .button:hover { background: #e2e7dd; }
.shell .telegram-reports-card, .shell .telegram-settings-card { padding: clamp(19px,2.4vw,30px); }
.shell .telegram-card-heading { border-bottom: 1px solid #dfe2da; padding-bottom: 17px; margin-bottom: 22px; }
.shell .telegram-report-grid { gap: 13px; }
.shell .telegram-report-option { background: #f6f7f2; border: 1px solid #d9dfd8; border-radius: 2px; }
.shell .telegram-report-option:has(input:checked) { border-color: #3e7871; background: #eaf1ea; }
.shell .telegram-toggle-list { border-color: #dadfd8; }
.shell .telegram-toggle { accent-color: #2e7067; }
.shell .telegram-settings-grid>div { border-radius: 2px; }
.shell .telegram-link-box { border-radius: 2px; border: 1px solid #cbd6cf; background: #f4f6f0; }
.shell .text-danger-button { color: #a04937; }

/* 07. Subscription — accurate recurring consent / pricing status */
.shell .view-intro[data-ui-view="subscription"] { margin-bottom: 20px; }
.shell #subscription-card { padding: clamp(20px,2.8vw,38px); }
.shell .subscription-meta, .shell .meta-grid { gap: 11px; }
.shell #subscription-card .meta-grid>div { background: #f6f7f3; border: 1px solid #d8dcd6; }
.shell #subscription-card .meta-grid strong { font-size: 16px; font-family: inherit; font-weight: 750; }
.shell .billing-clarity { background: #f1f5f0; border-color: #d3ded5; border-radius: 2px; margin-top: 24px; }
.shell .billing-clarity-heading h3 { font: 500 27px/1.2 var(--fn-serif); letter-spacing: -.03em; }
.shell .billing-terms-grid { gap: 10px; }
.shell .billing-terms-grid>div { background: #fffefa; border: 1px solid #d8ded8; border-radius: 2px; }
.shell .billing-review-panel { border: 1px solid #d8dfd8; border-radius: 2px; padding: clamp(16px,2vw,24px); background: #fffefa; }
.shell .billing-review-heading h3 { font: 500 27px/1.15 var(--fn-serif); }
.shell .subscription-legal-check { border-radius: 2px; background: #f7f8f4; border: 1px solid #d9dfd8; }
.shell .subscription-legal-check input[type="checkbox"] { min-width: 17px; min-height: 17px; }
.shell .billing-cancel-panel { border: 1px solid #d3ddd5; background: #f7f9f4; border-radius: 2px; }
.shell .billing-consent-history { border: 1px solid #d9dfd9; background: #fafaf6; border-radius: 2px; }
.shell .plan-grid { gap: 11px; }
.shell .plan-grid > :is(div,article,section) { border-radius: 2px; }
.shell .plan-grid .selected, .shell .plan-grid [aria-current="true"] { border-color: #4a7d70; }
.shell .usage-grid { gap: 1px; background: #d8ded7; border: 1px solid #d8ded7; border-radius: 2px; }
.shell .usage-item { border: 0; border-radius: 0; background: #f5f6f0; padding: 19px; }
.shell .usage-item strong { font-family: var(--fn-serif); font-size: 26px; font-weight: 500; }
.shell .usage-item.at-limit { background: #fff0ea; }

/* 08. Team — security / invite panels and sortable-looking, real tables */
.shell .team-workspace { gap: 18px; }
.shell .team-hero-panel { padding: 27px 29px; border: 1px solid #36515a; background: #20343c; color: #fffdfa; border-radius: 3px; }
.shell .team-hero-panel :is(h2,strong) { color: #fffdfa; }
.shell .team-hero-panel :is(.muted,p:not(.eyebrow)) { color: #c4d3d1; }
.shell .team-hero-panel .eyebrow { color: #b4cfc8; }
.shell .team-role-badge { background: #d8e4d9; color: #2b5e53; }
.shell .team-summary-grid { gap: 1px; background: #d3dad3; border: 1px solid #d3dad3; border-radius: 2px; overflow: hidden; }
.shell .team-summary-card { border: 0; border-radius: 0; background: #f7f8f2; padding: 21px 24px; }
.shell .team-summary-card strong { font: 500 29px/1.1 var(--fn-serif); color: #223c41; }
.shell .team-panel { padding: clamp(20px,2.4vw,29px); }
.shell .team-panel-heading { border-bottom: 1px solid #e0e1d9; padding-bottom: 15px; margin-bottom: 18px; }
.shell .team-panel-heading h3 { font: 500 27px/1.14 var(--fn-serif); letter-spacing: -.03em; }
.shell .team-invite-form { padding: 17px; background: #f5f7f1; }
.shell .team-invitations { gap: 9px; }
.shell .team-lower-grid { gap: 18px; }
.shell .team-table-wrap table { width: 100%; }
.shell .audit-list { border-left: 2px solid #d4ddd5; padding-left: 13px; }

/* 09. Settings — secure integrations, account, privacy */
.shell .settings-card { padding: clamp(20px,2.4vw,32px); margin-bottom: 19px; }
.shell .wb-connection-card { border-top: 3px solid #4b7874; }
.shell .wb-connection-result { gap: 1px; background: #d6dfd7; border: 1px solid #d6dfd7; border-radius: 2px; }
.shell .wb-connection-result>div { border: 0; border-radius: 0; background: #f3f6f0; }
.shell .account-settings-grid { gap: 11px; }
.shell .account-setting-panel { border: 1px solid #d8ded7; border-radius: 2px; background: #f7f8f3; padding: 21px; }
.shell .setting-label { color: #516f6b; letter-spacing: .1em; }
.shell .privacy-points { gap: 11px; }
.shell .privacy-points>div { border: 1px solid #d6ded6; border-radius: 2px; background: #f5f7f1; padding: 20px; }
.shell .technical-disclosure { border-radius: 2px; border: 1px solid #e1e2d9; background: #f7f7f3; }
.shell .danger-zone { border: 1px solid #e3b9af; border-left: 3px solid #b85b46; border-radius: 2px; background: #fcf3ef; }
.shell .danger-zone>summary { font-weight: 730; color: #933d32; }
.shell .button-danger { background: #a44635; }

/* Responsive: the live tables still scroll rather than hiding columns or dropping actions. */
@media (max-width: 1200px) {
  .shell .overview-kpi-strip, .shell .analytics-kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .shell .overview-kpi-card { min-height: 139px; }
  .shell .dashboard-health-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 940px) {
  .shell .workspace[data-ui-view="products"] { grid-template-columns: 1fr; }
  .shell .analytics-report-grid, .shell .team-lower-grid { grid-template-columns: 1fr; }
  .shell .analytics-page-toolbar { padding: 20px; }
  .shell .analytics-controls { flex-wrap: wrap; }
  .shell .competitor-detail-layout, .shell .detail-card .detail-layout { grid-template-columns: 1fr; }
  .shell .telegram-page { grid-template-columns: minmax(0,1fr); }
  .shell .settings-card .form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 620px) {
  .shell .overview-kpi-strip, .shell .analytics-kpi-grid, .shell .dashboard-health-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .shell .overview-kpi-card { min-height: 138px; padding: 15px; }
  .shell .overview-kpi-card strong, .shell .analytics-kpi strong { font-size: clamp(23px,6.5vw,30px); }
  .shell .overview-kpi-card small { font-size: 10px; }
  .shell .analytics-kpi { padding: 15px; min-height: 122px; }
  .shell .analytics-page-toolbar { flex-direction: column; align-items: stretch; padding: 16px; }
  .shell .analytics-controls { justify-content: stretch; }
  .shell .analytics-controls label { flex: 1; }
  .shell .analytics-report-card, .shell .dashboard-command-center, .shell .product-import-card,
  .shell .competitor-workspace-card, .shell .competitors-card, .shell .competitor-detail,
  .shell .alerts-card, .shell .decision-workflow-card, .shell .telegram-reports-card,
  .shell .telegram-settings-card, .shell .team-panel, .shell .settings-card,
  .shell #subscription-card { padding: 17px; }
  .shell .analytics-funnel-grid, .shell .billing-terms-grid, .shell .team-summary-grid,
  .shell .settings-card .form-grid, .shell .account-settings-grid { grid-template-columns: 1fr; }
  .shell .team-hero-panel { padding: 20px; }
  .shell .team-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .shell .team-summary-card { padding: 15px; }
  .shell .competitor-workspace-toolbar, .shell .decision-workflow-toolbar,
  .shell .alerts-toolbar, .shell .wb-import-toolbar { flex-wrap: wrap; gap: 9px; }
  .shell .competitor-workspace-toolbar .button, .shell .wb-import-actions .button { max-width: 100%; }
  .shell table { min-width: 560px; }
  .shell .competitor-table { min-width: 1100px; }
  .shell .section-heading { flex-wrap: wrap; }
  .shell .view-intro h2 { font-size: 29px; }
  .shell .metric-grid, .shell .competitor-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 390px) {
  .shell .overview-kpi-strip, .shell .analytics-kpi-grid { grid-template-columns: 1fr; }
  .shell .overview-kpi-card { min-height: 110px; }
  .shell .team-summary-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion:reduce) {
  .shell .dashboard-action, .shell .overview-kpi-card { transition: none; }
}
/* Prevent intrinsic table width from expanding the entire team view on narrow phones. */
.shell .team-workspace { min-width: 0; width: 100%; grid-template-columns: minmax(0,1fr); }
.shell .team-workspace > *, .shell .team-panel, .shell .team-members-panel { min-width: 0; max-width: 100%; }
.shell .team-table-wrap { max-width: 100%; overflow-x: auto; }


/* Financial Navigation D5 · editorial polish / presentation only.
   Never hide real controls, do not modify analytics measurements. */

/* Funnel: four clear steps, no circular arrow overlays on numeric values. */
.shell .analytics-funnel-step:not(:last-child)::after,
.shell .analytics-funnel-step::after { content: none !important; display: none !important; }
.shell .analytics-funnel-grid { gap: 1px; overflow: hidden; align-items: stretch; }
.shell .analytics-funnel-step { isolation: isolate; padding: 22px clamp(14px, 1.65vw, 24px) 20px; min-width: 0; }
.shell .analytics-funnel-step::before { top: 0; left: 0; height: 3px; width: 100%; border: 0; background: #d3dfd6; }
.shell .analytics-funnel-step:nth-child(1)::before { background: #ce674b; }
.shell .analytics-funnel-step:nth-child(2)::before { background: #d98b6d; }
.shell .analytics-funnel-step:nth-child(3)::before { background: #b0bfb5; }
.shell .analytics-funnel-step:nth-child(4)::before { background: #557d76; }
.shell .analytics-funnel-step span { font-size: 11px; line-height: 1.45; letter-spacing: .005em; color: #4f6665; }
.shell .analytics-funnel-step strong { display: block; margin: 8px 0 4px; font-variant-numeric: tabular-nums; line-height: 1.13; overflow-wrap: anywhere; }
.shell .analytics-funnel-step small { font-size: 11px; color: #6e817c; min-height: 1.3em; }

/* Shared spacing and affordances across all nine workspace views. */
.shell > section[data-ui-view], .shell .workspace { min-width: 0; }
.shell :is(.section-heading,.analytics-report-card .report-heading,.team-panel-heading) { row-gap: 10px; }
.shell :is(.table-wrap,.competitor-table-wrap,.team-table-wrap) { scrollbar-width: thin; scrollbar-color: #9daea8 #f2f2ed; max-width: 100%; }
.shell :is(.table-wrap,.competitor-table-wrap,.team-table-wrap) th,
.shell :is(.table-wrap,.competitor-table-wrap,.team-table-wrap) td { vertical-align: middle; }
.shell :is(.table-wrap,.competitor-table-wrap,.team-table-wrap) tbody tr:last-child td { border-bottom: 0; }
.shell :is(.button,button,a,input,select,textarea):focus-visible { outline: 2px solid #467c73; outline-offset: 3px; }
.shell :is(.empty-state,.analytics-empty-state) { min-width: 0; max-width: 100%; padding: clamp(20px, 2vw, 28px); line-height: 1.55; }
.shell :is(.metric,.overview-metric,.analytics-kpi,.usage-item) strong { font-variant-numeric: tabular-nums; }
.shell :is(.badge,.status-pill,.assessment) { max-width: 100%; overflow-wrap: anywhere; }

/* Overview: clearer decision/health summaries. */
.shell .dashboard-health-grid > div { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.shell .dashboard-action { min-width: 0; }
.shell .dashboard-action :is(strong,small,span) { overflow-wrap: anywhere; }
.shell .overview-metric { min-width: 0; }

/* Analytics and product economics: steady typography and readable empty charts. */
.shell .analytics-report-card :is(.report-heading h3,.muted) { overflow-wrap: anywhere; }
.shell .analytics-report-card .organization-analytics-chart { overflow: hidden; }
.shell .product-card { transition: border-color .16s ease, background-color .16s ease; }
.shell .product-grid > * { min-width: 0; }
.shell :is(.product-card,.detail-card,.economics-panel) :is(small,.muted) { line-height: 1.55; }

/* Competitors and event feed: quieter navigation, more legible states. */
.shell .competitor-table td { line-height: 1.5; }
.shell .competitor-workspace-toolbar, .shell .alerts-toolbar { row-gap: 12px; }
.shell .event-card { overflow-wrap: anywhere; }
.shell .event-card .muted { line-height: 1.6; }

/* Telegram and subscriptions: selected controls, payment language stay intact. */
.shell .telegram-report-option { transition: background-color .16s ease, border-color .16s ease; }
.shell .telegram-report-option:focus-within { outline: 2px solid #467c73; outline-offset: 2px; }
.shell .telegram-hero-card .button:focus-visible { outline-color: #e6e6dd; }
.shell .subscription-legal-check { line-height: 1.6; }
.shell :is(.billing-review-panel,.billing-cancel-panel,.billing-consent-history) { min-width: 0; }
.shell .billing-terms-grid > * { min-width: 0; }

/* Team & settings: keep tables scrollable and form labels comfortably spaced. */
.shell .team-summary-card { min-width: 0; }
.shell .team-table-wrap { max-width: 100%; }
.shell .team-table-wrap table { min-width: max(630px, 100%); }
.shell .team-invite-form :is(input,select), .shell .settings-card :is(input,select,textarea) { min-width: 0; }
.shell .account-setting-panel { min-width: 0; }
.shell .technical-disclosure > summary { cursor: pointer; }

@media(max-width: 940px) {
  .shell .analytics-funnel-step { padding: 19px 17px; }
  .shell .analytics-funnel-step strong { font-size: clamp(23px, 3.5vw, 30px); }
}
@media(max-width: 620px) {
  .shell .analytics-funnel-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .shell .analytics-funnel-step { padding: 17px 13px; }
  .shell .analytics-funnel-step strong { font-size: 26px; }
  .shell .analytics-funnel-step span, .shell .analytics-funnel-step small { font-size: 10px; }
  .shell .analytics-page-toolbar .analytics-controls { gap: 9px; }
  .shell .event-card { padding: 15px; }
  .shell .team-hero-panel { padding: 21px 18px; }
  .shell .team-summary-card { padding: 17px 15px; }
  .shell .account-setting-panel { padding: 17px; }
}
@media(max-width: 360px) {
  .shell .analytics-funnel-step strong { font-size: 23px; }
  .shell .analytics-funnel-step { padding: 16px 10px; }
}
@media(prefers-reduced-motion:reduce) {
  .shell .product-card, .shell .telegram-report-option { transition: none; }
}


/* Financial Navigation D6: controls must remain inside cards, panels and toolbars. */
.shell, .shell > section[data-ui-view], .shell .workspace, .shell .panel, .shell .card { min-width:0; max-width:100%; }
.shell :is(.form-actions,.toolbar,.analytics-page-toolbar,.analytics-controls,.competitor-workspace-toolbar,.alerts-toolbar,.telegram-report-toolbar,.telegram-workspace-toolbar,.team-actions,.settings-actions,.dashboard-actions,.subscription-actions,.product-actions) { min-width:0; max-width:100%; }
.shell :is(.form-actions,.analytics-controls,.competitor-workspace-toolbar,.alerts-toolbar,.dashboard-actions,.subscription-actions,.product-actions) { flex-wrap:wrap; row-gap:9px; }
.shell :is(.form-actions,.analytics-controls,.competitor-workspace-toolbar,.alerts-toolbar,.telegram-report-toolbar,.team-actions,.settings-actions,.product-actions) > :is(button,a,input,select) { min-width:0; max-width:100%; }
.shell :is(.button,.icon-button) { box-sizing:border-box; max-width:100%; }
.shell .button:not(.icon-button) { overflow-wrap:break-word; white-space:normal; }
.shell :is(.meta-grid,.form-grid,.metric-grid,.dashboard-health-grid,.telegram-report-grid,.analytics-report-grid,.team-workspace) > * { min-width:0; }
.shell :is(.table-wrap,.competitor-table-wrap,.team-table-wrap,.admin-table-wrap) { max-width:100%; overscroll-behavior-x:contain; }
@media(max-width:900px) {
  .shell :is(.analytics-page-toolbar,.competitor-workspace-toolbar,.alerts-toolbar,.telegram-report-toolbar) { max-width:100%; gap:10px; }
}
@media(max-width:620px) {
  .shell :is(.form-actions,.analytics-controls,.competitor-workspace-toolbar,.alerts-toolbar,.product-actions,.team-actions,.settings-actions) { gap:8px; }
  .shell :is(.form-actions,.analytics-controls,.competitor-workspace-toolbar,.alerts-toolbar,.telegram-report-toolbar,.team-actions,.settings-actions,.product-actions) > :is(button,a,select,input) { flex:0 1 auto; max-width:100%; }
  .shell .table-wrap, .shell .competitor-table-wrap, .shell .team-table-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; }
}
