/* Shared visual language: quiet surfaces, consistent spacing, semantic colour. */
:root {
  --ink: #292b38;
  --muted: #7b7e8c;
  --line: rgba(63, 66, 88, .10);
  --canvas: #f5f6f9;
  --glass: rgba(255, 255, 255, .82);
  --surface-border: rgba(255, 255, 255, .92);
  --surface-shadow: 0 10px 36px rgba(48, 49, 76, .045), inset 0 1px 0 rgba(255, 255, 255, .8);
}
/* Weekly planning and release notes use the same quiet glass surfaces. */
.analytics-scope-switch { display: inline-flex; align-items: center; gap: 5px; padding: 5px; margin: 0 0 20px; border: 1px solid #e1dceb; border-radius: 13px; background: rgba(255,255,255,.7); box-shadow: inset 0 1px 0 #fff; }
.analytics-scope-switch button { min-width: 100px; min-height: 42px; padding: 10px 20px; border: 0; border-radius: 9px; background: transparent; color: #737183; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.analytics-scope-switch button[aria-pressed="true"] { background: #ece6fc; color: #624abf; box-shadow: 0 2px 6px rgba(83,62,140,.08); }
.analytics-scope-switch button:focus-visible { outline: 3px solid #c6b9f0; outline-offset: 1px; }
.team-analytics-status:not(:empty) { margin: 18px 0; padding: 14px 18px; border-radius: 12px; background: rgba(238,233,250,.7); color: #6a5c89; font-size: 14px; }
.forecast-layout { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(280px,1fr); align-items: start; gap: 24px; }
.forecast-layout > * { min-width: 0; }
.forecast-form { padding: 28px; }
.forecast-week-navigation { display: grid; grid-template-columns: 42px minmax(0,1fr) 42px; align-items: center; gap: 12px; margin-top: 18px; }
.forecast-week-navigation strong { text-align: center; font-size: 14px; line-height: 1.6; font-weight: 600; }
.forecast-week-navigation .button { min-height: 42px; padding: 7px; font-size: 18px; }
.forecast-product { display: grid; grid-template-columns: minmax(0,1fr) minmax(130px,.7fr); align-items: center; gap: 20px; margin-top: 24px; padding: 22px 0; border-top: 1px solid var(--line); }
.forecast-product h2 { margin: 0 0 5px; font-size: 20px; }
.forecast-product p { margin: 0; color: var(--muted); font-size: 13px; }
.forecast-product .number-field { min-width: 0; }
.forecast-product .number-field label { display: block; margin-bottom: 8px; font-size: 12px; }
.forecast-saved-status { margin: 15px 0 0; color: #7b7889; font-size: 13px; line-height: 1.5; }
.forecast-form.forecast-saved { animation: forecast-saved 1.4s ease-out both; }
@keyframes forecast-saved { 0%,100% { box-shadow: var(--surface-shadow); } 35% { box-shadow: 0 0 0 3px rgba(79,181,135,.25),0 12px 32px rgba(79,181,135,.12); } }
.forecast-summary { padding: 26px; }
.forecast-summary h2 { margin: 12px 0 22px; font-size: 21px; }
.forecast-total-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; padding: 18px 0; border-block: 1px solid var(--line); }
.forecast-total-row > div + div { border-left: 1px solid var(--line); padding-left: 18px; }
.forecast-total-row span { display: block; color: var(--muted); font-size: 13px; }
.forecast-total-row strong { display: block; margin-top: 7px; font-size: 30px; font-weight: 650; }
.forecast-summary-caption { color: var(--muted); line-height: 1.6; font-size: 13px; }
.forecast-team-list { max-height: 400px; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: #c8c1de transparent; padding-right: 6px; }
.forecast-team-row { padding: 15px 0; border-top: 1px solid var(--line); }
.forecast-team-row > strong { display: block; overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; }
.forecast-team-row > span { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }
.forecast-team-row b { color: var(--ink); }
.forecast-team-row-own > strong { color: #624abf; }
.forecast-team-row-own small { display: inline-block; margin-left: 6px; font-size: 12px; font-weight: 500; color: #81729f; }
.report-page-heading { display: flex; justify-content: space-between; width: 100%; max-width: 1000px; }
.updates-button { display: inline-flex; align-items: center; gap: 9px; flex-shrink: 0; margin-left: auto; }
#updatesBadge { padding: 3px 7px; border-radius: 6px; color: #7055c7; background: #eee8fc; font-size: 11px; }
.updates-dialog { width: min(600px,calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 40px); padding: 0; border: 1px solid rgba(255,255,255,.9); border-radius: 20px; background: #f8f8fc; color: var(--ink); box-shadow: 0 24px 90px rgba(35,27,58,.2); }
.updates-dialog::backdrop { background: rgba(38,32,57,.35); backdrop-filter: blur(6px); }
.updates-dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 24px; border-bottom: 1px solid var(--line); background: #fff; }
.updates-dialog-heading .eyebrow { display: block; color: #9184b2; font-size: 11px; margin-bottom: 7px; }
.updates-dialog-heading h2 { margin: 0; font-size: 24px; line-height: 1.3; }
.updates-dialog-heading button { font-size: 23px; flex: none; }
.updates-dialog-body { padding: 24px; overflow-y: auto; max-height: calc(100dvh - 190px); }
.update-release time { color: #827595; font-size: 13px; }
.update-release h3 { margin: 12px 0 18px; font-size: 19px; line-height: 1.4; }
.update-release ul { margin: 0; padding-left: 20px; }
.update-release li { margin-bottom: 17px; font-size: 14px; line-height: 1.75; }
.update-release li:last-child { margin-bottom: 0; }
.update-release strong { color: #5e4a85; }
.update-release + .update-release { border-top: 1px solid var(--line); margin-top: 26px; padding-top: 26px; }
.date-control { display: flex; position: relative; min-width: 0; width: 100%; align-items: center; }
.date-control input[type="date"] { position: relative; display: block; width: 100%; min-width: 0; min-height: 42px; padding-right: 42px !important; cursor: pointer; -webkit-appearance: none; appearance: none; text-align: left; }
.date-control-icon { position: absolute; width: 19px; height: 19px; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; color: #746487; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.date-control:focus-within .date-control-icon { color: #7459d6; }
.date-control input::-webkit-calendar-picker-indicator { opacity: 0; position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; cursor: pointer; }
.date-control input::-webkit-date-and-time-value { text-align: left; min-height: 1.5em; }
.date-filter > .date-control { flex: 1 1 0; }
select.locked-manager:disabled { appearance: none; -webkit-appearance: none; background-image: none; opacity: 1; color: var(--ink); -webkit-text-fill-color: var(--ink); padding-right: 14px; cursor: default; }
.content-grid.single-panel { grid-template-columns: minmax(0,1fr); }
.own-report-status { margin: 0; padding: 0 24px 18px; color: #787286; font-size: 13px; line-height: 1.5; }
body[data-role="manager"] .report-actions { display: none; }
body[data-role="manager"] .reports-panel td:first-child { padding-right: 0; }
@media (max-width:540px) {
  .date-control input[type="date"] { font-size: 16px; min-height: 46px; }
  .date-filter { display: grid; grid-template-columns: minmax(0,1fr); gap: 8px; }
  .date-filter > span { display: none; }
  .date-filter .date-control input { border: 1px solid #e4e7ef; border-radius: 9px; }
  .own-report-status { padding: 0 16px 15px; font-size: 13px; }
}
body.updates-open { overflow: hidden; }
@media (max-width:900px) { .forecast-layout { grid-template-columns: minmax(0,1fr); } }
@media (max-width:540px) {
  .forecast-form,.forecast-summary { padding: 20px; }
  .forecast-product { grid-template-columns: minmax(0,1fr); gap: 16px; margin-top: 18px; padding: 20px 0 0; }
  .forecast-product .number-input-wrap { width: 100%; }
  .forecast-week-navigation { gap: 7px; }
  .forecast-week-navigation strong { font-size: 12px; }
  .report-page-heading { flex-wrap: wrap; gap: 15px; }
  .report-page-heading .updates-button { width: auto; padding: 9px 13px; }
  .updates-dialog-heading,.updates-dialog-body { padding: 20px; }
  .updates-dialog-heading h2 { font-size: 21px; }
}
@media (prefers-reduced-motion:reduce) { .forecast-form.forecast-saved { animation: none; } }
body {
  background: radial-gradient(ellipse at 8% 0, #edeaf8 0, transparent 34rem),
    radial-gradient(ellipse at 100% 8%, #f0f3f7 0, transparent 40rem), var(--canvas);
  background-attachment: fixed;
}
.panel, .quarter-card, .stat-group, .auth-card {
  background: linear-gradient(135deg, rgba(255,255,255,.95), var(--glass));
  border: 1px solid var(--surface-border);
  border-radius: 18px;
  box-shadow: var(--surface-shadow);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
}
.sidebar { background: rgba(250,250,253,.82); border-right: 1px solid var(--line); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.topbar { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom-color: var(--line); }
.sidebar .nav-item { font-size: 14px; border-radius: 10px; }
.sidebar .nav-item.active { background: rgba(118,98,233,.09); box-shadow: inset 0 0 0 1px rgba(118,98,233,.10); }
.workspace-label { font-size: 11px; letter-spacing: .9px; }
.button { min-height: 44px; border-radius: 10px; font-size: 13px; font-weight: 600; letter-spacing: 0; }
.button.button-primary {
  background: linear-gradient(145deg, #8774ee, #7059dc); border-color: #7562e5;
  box-shadow: 0 4px 12px rgba(104,83,200,.14), inset 0 1px 0 rgba(255,255,255,.25);
  color: #fff; transform: none; transition: color .14s ease;
}
.button.button-primary:not(:disabled):hover { color: #e8e4f8; }
.button-outline { background: rgba(255,255,255,.75); border-color: var(--line); color: #656479; box-shadow: inset 0 1px 0 #fff; }
.button:disabled { opacity: .48; cursor: default; box-shadow: none; }
.icon-button, .modal-close { border-radius: 10px; background: rgba(245,246,249,.82); }
.analytics-header-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; align-self: flex-start; }
.page-heading.heading-row { align-items: flex-start; gap: 20px; }
.analytics-header-actions .button { height: 44px; padding: 10px 16px; }
#allReportsButton { text-decoration: none; white-space: nowrap; }
#allReportsButton:hover { text-decoration: underline; text-underline-offset: 3px; }
.all-reports-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 16px 20px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.all-reports-page-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.all-reports-page-controls > span { font-size: 12px; }
#allReportsView .heading-row > .button { width: auto; font-size: 13px; padding: 10px 16px; flex: none; }
.toolbar { padding: 18px 20px; border-color: var(--line); background: rgba(255,255,255,.65); box-shadow: none; border-radius: 14px; align-items: flex-start; }
.toolbar .period-filter-group { flex: 1 1 580px; }
.toolbar > .filter-group:not(.period-filter-group) { flex: 0 1 180px; }
.toolbar .select-control { height: 40px; }
.toolbar .manager-self-label { min-height: 40px; height: auto; display: flex; align-items: center; }
.filter-label, .form-field label, .number-field label, .auth-label { font-size: 12px; line-height: 1.5; color: #7e8190; }
.panel-heading h2 { font-size: 19px; }
.panel-heading p, .subtitle, .quarter-card p, .manager-page-note { font-size: 13px; line-height: 1.6; }
.breadcrumbs, .quarter-label { font-size: 12px; }
.quarter-shortcuts button { min-height: 38px; height: auto; padding: 8px 11px; font-size: 12px; border-color: var(--line); border-radius: 8px; }
.quarter-shortcuts button[aria-pressed="true"] { background: #efebfc; border-color: #d9d1f6; color: #6652c7; box-shadow: inset 0 1px 0 rgba(255,255,255,.7); }
.date-filter { height: 40px; border-color: var(--line); }
.date-filter input, .select-control { font-size: 13px; }
.analytics-period-note { margin-top: 18px; margin-bottom: 16px; font-size: 12px; }
.report-entry-note { margin: 16px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.report-day-totals { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.6; }
.report-day-totals-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: 1 0 100%; min-width: 0; }
.report-day-totals strong { color: var(--ink); font-weight: 600; }
.report-day-edit-button { flex: none; min-height: 34px; padding: 6px 11px; border: 1px solid #ded8ef; border-radius: 8px; background: rgba(255,255,255,.82); color: #6652c7; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.report-day-edit-button:hover { border-color: #c9beed; background: #f5f2fc; }
.report-edit-dialog { box-sizing: border-box; width: min(560px,calc(100% - 32px)); max-width: calc(100% - 32px); max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 1px solid rgba(255,255,255,.96); border-radius: 20px; overflow: hidden; background: #fdfcfe; color: var(--ink); box-shadow: 0 24px 90px rgba(45,34,60,.22); }
.report-edit-dialog[open] { display: block; }
.report-edit-dialog::backdrop { background: rgba(33,29,48,.38); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.report-edit-form { display: block; }
.report-edit-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 22px 24px 16px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.82); }
.report-edit-heading .eyebrow { display: block; margin-bottom: 7px; color: #8c80ad; font-size: 11px; }
.report-edit-heading h2 { margin: 0; font-size: 21px; line-height: 1.35; }
.report-edit-heading p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.report-edit-body { max-height: calc(100dvh - 270px); overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 18px 24px 22px; }
.report-edit-body > p:first-child { margin: 0 0 18px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.report-edit-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.report-edit-grid .form-field { min-width: 0; }
.report-edit-grid input { width: 100%; }
.report-edit-error { margin: 14px 0 0; color: #b45159; font-size: 13px; line-height: 1.55; }
.report-edit-footer { display: flex; justify-content: flex-end; flex: none; gap: 10px; padding: 16px 24px 22px; border-top: 1px solid var(--line); background: rgba(255,255,255,.62); }
.report-edit-footer .button { min-width: 120px; }
/* Feedback shares the form and list surfaces used throughout the workspace. */
.feedback-manager { max-width: 820px; }
.feedback-form { margin-top: 24px; padding: 28px; }
.feedback-kind { min-width: 0; margin: 0 0 24px; padding: 0; border: 0; }
.feedback-kind legend { margin-bottom: 14px; color: var(--ink); font-size: 16px; font-weight: 600; }
.feedback-kind-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.feedback-kind-option { display: flex; align-items: flex-start; gap: 11px; min-width: 0; padding: 17px 16px; border: 1px solid #e3dfec; border-radius: 12px; background: rgba(255,255,255,.65); cursor: pointer; }
.feedback-kind-option:has(input:checked) { border-color: #b4a4e8; background: rgba(239,235,252,.65); }
.feedback-kind-option:has(input:focus-visible) { outline: 3px solid #c7bbef; outline-offset: 2px; }
.feedback-kind-option input { flex: none; width: 17px; height: 17px; margin: 2px 0 0; padding: 0; accent-color: #7962d8; }
.feedback-kind-option strong { display: block; color: var(--ink); font-size: 14px; line-height: 1.5; font-weight: 600; }
.feedback-kind-option small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.feedback-form .form-field { margin-bottom: 20px; }
.feedback-form .form-field label { display: block; margin-bottom: 8px; color: #686879; font-size: 13px; font-weight: 500; }
.feedback-form .form-field select, .feedback-form textarea { display: block; width: 100%; border: 1px solid #dddfe8; border-radius: 10px; background: rgba(255,255,255,.9); color: var(--ink); font-family: inherit; font-size: 14px; }
.feedback-form .form-field select { height: 46px; padding: 0 12px; }
.feedback-form textarea { min-height: 170px; padding: 13px 14px; resize: vertical; line-height: 1.7; }
.feedback-form textarea::placeholder { color: #a3a2ae; opacity: 1; }
.feedback-form textarea:focus, .feedback-form select:focus { border-color: #aa98df; outline: 2px solid rgba(177,159,230,.14); outline-offset: 1px; }
.feedback-message-hint { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.feedback-form-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding-top: 20px; border-top: 1px solid var(--line); }
.feedback-form-footer > span { color: var(--muted); font-size: 12px; line-height: 1.6; }
.feedback-form-footer .button { min-width: 132px; }
.feedback-form-success { margin: 0 0 20px; padding: 12px 15px; border-left: 3px solid #4a9d79; border-radius: 4px; background: #edf7f1; color: #3e7b60; font-size: 13px; line-height: 1.7; }
.feedback-inbox { margin-top: 24px; padding: 0; overflow: hidden; }
.feedback-inbox-heading { margin: 0; padding: 24px 28px; gap: 16px; border-bottom: 1px solid var(--line); align-items: center; }
.feedback-inbox-heading .button { flex: none; }
.feedback-list-error { margin: 16px 28px; color: #b45b55; font-size: 13px; line-height: 1.6; }
.feedback-empty { display: grid; justify-items: center; padding: 48px 24px; text-align: center; color: var(--muted); }
.feedback-empty > svg { width: 38px; height: 38px; color: #a89bc7; margin-bottom: 16px; }
.feedback-empty h3 { margin: 0 0 9px; color: #64616f; font-size: 17px; font-weight: 600; }
.feedback-empty p { margin: 0; font-size: 13px; line-height: 1.7; }
.feedback-empty .loading-spinner { margin-bottom: 15px; color: #8b77c7; }
.feedback-item { padding: 24px 28px; border-bottom: 1px solid var(--line); }
.feedback-item:last-child { border-bottom: 0; }
.feedback-item-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; }
.feedback-item-author { min-width: 0; flex: 1; }
.feedback-item-author > strong { display: block; color: var(--ink); font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.feedback-item-author time { display: block; margin-top: 5px; }
.feedback-item-heading time { color: #9894a4; font-size: 12px; line-height: 1.6; }
.feedback-item-category { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 8px; color: #8d819f; font-size: 12px; line-height: 1.6; }
.feedback-item-category > span:first-child { color: #77688f; font-weight: 600; }
.feedback-item-message { margin: 14px 0 0; color: #50505e; font-size: 14px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.feedback-pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 18px 28px; border-top: 1px solid var(--line); }
.feedback-pagination > span { font-size: 12px; color: var(--muted); }
.feedback-pagination > div { display: flex; gap: 8px; }
.sidebar .nav-item, .sidebar .nav-item:hover { transform: none; min-width: 0; max-width: 100%; }
.sidebar .nav-icon { flex-shrink: 0; }
@media (min-width:721px) {
  .sidebar-navigation { min-width: 0; min-height: 0; max-width: 100%; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; padding: 2px; }
  .sidebar .main-nav { min-width: 0; max-width: 100%; }
  .sidebar .forecast-nav-label { min-width: 0; white-space: normal; }
}
.feedback-item-heading { align-items: flex-start; flex-wrap: nowrap; }
.feedback-delete-button { display: grid; place-items: center; width: 44px; height: 44px; flex: none; padding: 0; border: 1px solid #ece5e8; border-radius: 11px; background: rgba(255,255,255,.7); color: #b06c73; }
.feedback-delete-button > svg { width: 21px; height: 21px; }
.feedback-delete-button:hover:not(:disabled) { border-color: #dfc4c8; color: #a34650; }
.feedback-delete-button:disabled { cursor: default; opacity: .45; }
.feedback-delete-button:focus-visible { outline: 3px solid #c7bbef; outline-offset: 2px; }
body.feedback-delete-open { overflow: hidden; }
.feedback-delete-dialog { box-sizing: border-box; width: min(460px,calc(100% - 32px)); max-width: calc(100% - 32px); max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 1px solid #fff; border-radius: 20px; overflow: hidden; background: #fdfcfe; color: var(--ink); box-shadow: 0 24px 90px #2d223c33; }
.feedback-delete-dialog[open] { display: flex; flex-direction: column; }
.feedback-delete-dialog::backdrop { background: #211d3038; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.feedback-delete-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 22px 22px 0; }
.feedback-delete-heading h2 { margin: 4px 0 0; font-size: 20px; line-height: 1.4; }
.feedback-delete-body { min-height: 0; overflow-y: auto; padding: 0 22px; }
.feedback-delete-body > p:first-child { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 14px 0 20px; }
#deleteFeedbackAuthor { display: block; color: #696175; font-size: 13px; overflow-wrap: anywhere; }
.feedback-delete-preview { max-height: 140px; overflow-y: auto; overflow-x: hidden; margin: 10px 0 0; padding-left: 12px; border-left: 2px solid #e6dfee; color: #817889; font-size: 13px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.feedback-delete-error { color: #b45159; font-size: 13px; line-height: 1.6; }
.feedback-delete-footer { display: flex; justify-content: flex-end; flex: none; gap: 10px; padding: 22px; }
.feedback-delete-footer .button { flex: 1; min-width: 0; }
.button.button-danger { background: #faefef; border: 1px solid #e9c9ce; color: #a34d58; box-shadow: none; }
.button.button-danger:hover:not(:disabled) { color: #843c45; }
@media (max-width:720px) {
  .report-edit-heading { padding: 20px 18px 14px; }
  .report-edit-heading h2 { font-size: 19px; }
  .report-edit-body { padding: 16px 18px 20px; }
  .report-edit-grid { gap: 13px 10px; }
  .report-edit-footer { padding: 14px 18px 18px; }
  .report-edit-footer .button { flex: 1; min-width: 0; }
  .sidebar .nav-item { justify-content: flex-start; }
  .sidebar .forecast-nav-label { line-height: 1.2; }
  .forecast-nav-week { display: block; white-space: nowrap; }
  .feedback-form { margin-top: 20px; padding: 20px 16px; }
  .feedback-kind-options { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .feedback-kind-option { padding: 14px; }
  .feedback-form .form-field select, .feedback-form textarea { font-size: 16px; }
  .feedback-form-footer { align-items: stretch; }
  .feedback-form-footer .button { width: 100%; }
  .feedback-inbox-heading, .feedback-item { padding: 20px 16px; }
  .feedback-inbox-heading { flex-wrap: wrap; }
  .feedback-pagination { padding: 16px; }
}
@media (max-width:360px) {
  .sidebar .nav-item { padding-right: 2px; padding-left: 2px; }
  .sidebar .nav-item[data-view="report"] { flex-grow: .95; }
  .sidebar .nav-item[data-view="stats"] { flex-grow: 1.15; }
  .sidebar .nav-item[data-view="forecast"] { flex-grow: 1.45; }
  .sidebar .nav-item[data-view="managers"] { flex-grow: .8; }
  .sidebar .nav-item[data-view="feedback"] { flex-grow: .9; }
}
.analytics-heading-copy { min-width: 0; }
.stats-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; }
.stats-title-row h1 { margin-bottom: 0; }
.button.ai-launch-button { display: inline-flex; flex: none; align-items: center; gap: 9px; padding: 10px 15px; min-height: 42px; border: 1px solid #c6bbf2; border-radius: 12px; background: linear-gradient(125deg,rgba(255,255,255,.97),rgba(234,227,255,.9)); box-shadow: 0 3px 14px rgba(103,79,174,.09), inset 0 1px 0 #fff; color: #6850bf; font-size: 13px; font-weight: 700; white-space: nowrap; transform: none; transition: color .14s ease; }
.button.ai-launch-button:hover { color: #49338f; }
.ai-launch-button svg { width: 20px; height: 20px; }
.button.ai-launch-button { padding-top: 6px; padding-bottom: 6px; min-height: 44px; }
.ai-launch-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; line-height: 1.1; }
.ai-launch-copy small { color: #9683bb; font-size: 9px; font-weight: 500; letter-spacing: .1px; }
.ai-header-tools { display: flex; align-items: center; gap: 7px; }
.ai-close-button:disabled { opacity: .4; cursor: default; }
.ai-launch-dot { width: 6px; height: 6px; border-radius: 50%; background: #987fe0; }
.ai-launch-button.is-analyzing .ai-launch-dot { animation: ai-dot 1.4s ease-in-out infinite; }
.ai-launch-button.has-result .ai-launch-dot { background: #44a784; box-shadow: 0 0 0 3px #e5f5ee; }
body.ai-drawer-open { overflow: hidden; }
.ai-drawer { position: fixed; inset: 0 0 0 auto; box-sizing: border-box; width: min(600px,100%); max-width: 100%; height: 100%; height: 100dvh; max-height: 100%; margin: 0; padding: 0; overflow: hidden; border: 1px solid rgba(255,255,255,.94); border-right: 0; border-radius: 24px 0 0 24px; color: var(--ink); background: linear-gradient(155deg,rgba(251,249,255,.97),rgba(255,255,255,.97) 46%); box-shadow: -16px 0 70px rgba(38,29,64,.16); font-family: inherit; }
.ai-drawer[open] { display: flex; flex-direction: column; animation: ai-drawer-in .26s cubic-bezier(.2,.65,.3,1); }
.ai-drawer::backdrop { background: rgba(31,29,48,.22); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.ai-drawer-header { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 12px; padding: 25px 26px 20px; }
.ai-drawer-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ai-brand-mark { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 14px; background: linear-gradient(135deg,#9985f0,#7157c7); color: white; font-size: 29px; box-shadow: inset 0 1px 0 #b7a9ff,0 5px 16px #7961c621; }
.ai-drawer-header h2 { margin: 0; font-size: 21px; line-height: 1.4; letter-spacing: -.4px; }
.ai-drawer-header p { margin: 3px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.ai-drawer-header p span { color: #8b76b4; white-space: nowrap; }
.ai-close-button { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border: 1px solid #e9e5f1; border-radius: 50%; background: rgba(255,255,255,.75); color: #747080; cursor: pointer; }
.ai-close-button svg { width: 19px; height: 19px; }
.ai-close-button:hover { color: #34303f; background: white; }
.ai-scope-bar { display: flex; flex: none; flex-wrap: wrap; align-items: center; gap: 7px 12px; padding: 13px 26px; border-top: 1px solid #eeeaf6; border-bottom: 1px solid #eeeaf6; background: rgba(239,235,249,.42); font-size: 12px; line-height: 1.5; }
.ai-scope-label { color: #92899f; }
.ai-scope-bar strong { font-weight: 600; overflow-wrap: anywhere; }
#aiScopePeriod { color: #80768f; margin-left: auto; }
.ai-conversation { flex: 1 1 0; min-height: 0; padding: 28px 26px; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #c3b8e1 transparent; outline-offset: -3px; }
.ai-welcome { margin: 38px auto 24px; max-width: 370px; text-align: center; }
.ai-welcome-orbit { display: grid; position: relative; place-items: center; width: 86px; height: 86px; margin: 0 auto 24px; border: 1px solid #e2d9f5; border-radius: 50%; background: radial-gradient(circle at 35% 30%,#fff 10%,#e8e0ff 70%,#d4c6f6); box-shadow: 0 9px 26px #bca5e42e,inset 0 0 15px #fff; }
.ai-welcome-orbit > span { color: #8c72cc; font-size: 50px; line-height: 1; }
.ai-welcome-orbit i { position: absolute; top: 10px; right: -4px; width: 14px; height: 14px; border: 3px solid #faf8ff; border-radius: 50%; background: #b1a1dc; }
.ai-welcome-orbit i:last-child { top: auto; bottom: 1px; left: 9px; right: auto; width: 10px; height: 10px; background: #c9bce7; }
.ai-welcome h3 { margin: 0 0 12px; font-size: 24px; font-weight: 600; letter-spacing: -.6px; line-height: 1.3; }
.ai-welcome p { margin: 0; color: #84808f; font-size: 14px; line-height: 1.8; }
.ai-topics { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 24px; }
.ai-topics span { padding: 6px 10px; border: 1px solid #e8e2f1; border-radius: 20px; background: rgba(255,255,255,.75); color: #8b7d9b; font-size: 11px; line-height: 1.5; }
.ai-user-message { width: fit-content; max-width: 88%; margin: 0 0 25px auto; padding: 13px 16px; border: 1px solid #e2daf3; border-radius: 16px 16px 4px 16px; background: #eee9fa; color: #665579; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.ai-thinking { display: flex; align-items: flex-start; gap: 14px; padding: 8px 0 22px; }
.ai-thinking-orb { position: relative; display: grid; place-items: center; flex: none; width: 46px; height: 46px; border: 1px solid #e2d5fb; border-radius: 16px; background: conic-gradient(from 0deg,#e9defa,#bfabe9,#f9f4ff,#d3c6f1,#e9defa); box-shadow: inset 0 0 10px #ffffffa3,0 3px 15px #bca9dd36; animation: ai-orb 3s ease-in-out infinite; }
.ai-thinking-orb span { font-size: 30px; line-height: 1; color: #8564c4; }
.ai-thinking-copy { flex: 1; min-width: 0; padding-top: 2px; }
.ai-thinking-copy > strong { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: 14px; font-weight: 600; line-height: 1.5; }
.ai-thinking-copy p { margin: 5px 0 0; color: #91869d; font-size: 12px; line-height: 1.6; }
.ai-thinking-dots { display: inline-flex; gap: 3px; }
.ai-thinking-dots i { width: 3px; height: 3px; border-radius: 50%; background: #a38bc7; animation: ai-dot 1.4s ease-in-out infinite; }
.ai-thinking-dots i:nth-child(2) { animation-delay: .2s; }
.ai-thinking-dots i:nth-child(3) { animation-delay: .4s; }
.ai-thinking-lines { display: grid; gap: 9px; margin-top: 24px; }
.ai-thinking-lines i { display: block; height: 8px; width: 92%; border-radius: 5px; background: linear-gradient(90deg,#f0ebf7 15%,#dfd3f0 45%,#f0ebf7 75%); background-size: 220% 100%; animation: ai-shimmer 2.4s ease-in-out infinite; }
.ai-thinking-lines i:nth-child(2) { width: 100%; animation-delay: .15s; }
.ai-thinking-lines i:last-child { width: 66%; animation-delay: .3s; }
.ai-response-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; color: #776385; font-size: 12px; font-weight: 600; }
.ai-response-heading > span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 9px; background: #eee6f8; color: #8b70b6; font-size: 20px; }
.ai-summary { margin: 0; color: var(--ink); font-size: 15px; line-height: 1.8; white-space: pre-line; overflow-wrap: anywhere; }
.ai-insight-list { list-style: none; margin: 20px 0 0; padding: 0; }
.ai-insight { padding: 18px 0; border-top: 1px solid var(--line); }
.ai-insight-labels { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.ai-priority { padding: 4px 8px; border-radius: 6px; background: #f1eef9; color: #6f5caa; font-weight: 600; }
.ai-priority-high { background: #fff0ee; color: #b2524d; }
.ai-priority-low { background: #eaf6ef; color: #328461; }
.ai-insight h3 { margin: 12px 0 8px; color: var(--ink); font-size: 16px; line-height: 1.45; }
.ai-insight-fact, .ai-insight-action { margin: 8px 0; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.ai-insight-fact { color: var(--muted); }
.ai-insight .text-button { margin-top: 6px; font-size: 13px; }
.ai-response-meta { margin: 10px 0 0; color: #a099ab; font-size: 11px; line-height: 1.7; }
.ai-drawer-footer { flex: none; padding: 14px 26px max(18px,env(safe-area-inset-bottom)); border-top: 1px solid #ece6f4; background: rgba(255,255,255,.85); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.ai-insights-status { margin: 0 0 12px; color: #93899d; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.ai-insights-status:empty { display: none; }
.ai-status-error { color: #b05552; }
.ai-analyze-button { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.ai-analyze-button > span:first-child { font-size: 20px; line-height: 1; }
.ai-footer-note { margin: 10px 0 0; color: #a69eaf; font-size: 11px; line-height: 1.6; text-align: center; }
.ai-prompt-list { display: grid; gap: 9px; margin-top: 24px; text-align: left; }
.ai-prompt-list button { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid #e9e2f3; border-radius: 12px; background: rgba(255,255,255,.78); color: #78688f; font-size: 12px; line-height: 1.6; text-align: left; }
.ai-prompt-list button > span { color: #aa98c7; font-size: 17px; }
.ai-prompt-list button:hover:not(:disabled) { color: #58416f; border-color: #cdbde3; }
.ai-prompt-list button:disabled { opacity: .55; cursor: default; }
.ai-assistant-message { margin: 0 0 28px; padding: 0 0 24px; border-bottom: 1px solid #eee9f4; }
.ai-assistant-message:has(.ai-message-text:empty) { display: none; }
.ai-message-text { color: var(--ink); font-size: 14px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-message-text strong { color: #4e4161; font-weight: 700; }
.ai-assistant-message.is-streaming .ai-message-text::after { content: ''; display: inline-block; vertical-align: -.1em; width: 3px; height: 1em; margin-left: 3px; border-radius: 2px; background: #a289cb; animation: ai-dot 1s ease-in-out infinite; }
.ai-chat-status { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ai-chat-status .text-button { flex: none; font-size: 12px; margin-top: 1px; }
.ai-composer { display: flex; align-items: flex-end; gap: 10px; padding: 10px; border: 1px solid #dfd6ee; border-radius: 15px; background: rgba(255,255,255,.9); box-shadow: 0 3px 14px #8b70b50b; }
.ai-composer:focus-within { border-color: #b9a5d7; box-shadow: 0 0 0 3px #bba5dc16; }
.ai-composer textarea { flex: 1; min-width: 0; width: 100%; min-height: 48px; max-height: 120px; margin: 0; padding: 3px 2px; resize: vertical; border: 0; border-radius: 0; outline: none; box-shadow: none; background: transparent; color: var(--ink); font-family: inherit; font-size: 14px; line-height: 1.6; }
.ai-composer textarea:focus { border: 0; outline: none; box-shadow: none; }
.ai-composer textarea::placeholder { color: #aaa0b7; opacity: 1; }
.ai-composer .ai-send-button { display: grid; flex: none; place-items: center; padding: 0; width: 38px; min-height: 38px; height: 38px; border-radius: 11px; }
.ai-send-button svg { width: 22px; height: 22px; }
.ai-composer textarea:disabled { opacity: .6; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.ai-launch-button:focus-visible, .ai-close-button:focus-visible { outline: 3px solid #b5a2ed; outline-offset: 3px; }
@keyframes ai-drawer-in { from { transform: translateX(30px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes ai-orb { 0%,100% { border-radius: 16px; filter: hue-rotate(0deg); transform: translateY(0); } 50% { border-radius: 21px; filter: hue-rotate(18deg); transform: translateY(-3px); } }
@keyframes ai-dot { 0%,80%,100% { opacity: .4; } 40% { opacity: 1; } }
@keyframes ai-shimmer { from { background-position: 150% 0; } to { background-position: -70% 0; } }
@media (prefers-reduced-motion: reduce) { .ai-drawer[open], .ai-launch-button.is-analyzing .ai-launch-dot, .ai-thinking-orb, .ai-thinking-dots i, .ai-thinking-lines i, .ai-assistant-message.is-streaming .ai-message-text::after { animation: none; } }

/* A shared metric surface groups the three values without separate tiles. */
.stat-groups { gap: 18px; }
.stat-group { padding: 20px; border-color: rgba(119,111,153,.16); }
.stat-group-title { gap: 10px; margin-bottom: 18px; }
.stat-group-title h2 { margin: 0; font-size: 18px; color: var(--ink); }
.section-icon, .stat-icon { color: #626275; background: #f0eff5; box-shadow: inset 0 1px 0 rgba(255,255,255,.9); }
.section-icon, .stat-group-title .section-icon { width: 36px; height: 36px; border-radius: 10px; }
.product-icon { display: block; flex: none; width: 24px; height: 24px; object-fit: contain; }
.section-icon .product-icon { width: 25px; height: 25px; }
.two-gis-icon .product-icon { width: 23px; height: 23px; }
.stat-group .stat-group-cards { display: block; }
.stat-group .stat-card { padding: 0; min-height: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
.kpi-summary-row {
  --kpi-number-size: clamp(26px,2.1vw,30px);
  display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,.8fr) minmax(0,1.1fr);
  gap: 10px; align-items: start; min-height: 112px; padding: 16px 12px;
  border: 1px solid #e9e7f0; border-radius: 12px;
  background: linear-gradient(135deg,rgba(247,246,251,.95),rgba(243,243,248,.72));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95);
}
.kpi-summary-row.kpi-summary-activity { grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); }
.kpi-summary-activity .kpi-cell > span { white-space: normal; }
.legend-general-applications { display: block; width: 8px; height: 8px; border-radius: 50%; background: #315fa8; }
.kpi-cell { min-width: 0; }
.kpi-cell > span { display: block; margin-bottom: 10px; color: var(--muted); font-size: 12px; line-height: 1.5; white-space: nowrap; }
.stat-group .stat-value, .kpi-cell > .kpi-secondary-value, .kpi-cell > .conversion-value {
  margin: 0; padding: 2px 0; min-height: 0; font-size: var(--kpi-number-size); line-height: 1.25;
  font-weight: 700; letter-spacing: -.7px; font-variant-numeric: tabular-nums;
}
.stat-group .stat-value { display: flex; flex-wrap: wrap; gap: 4px; align-items: baseline; overflow-wrap: anywhere; }
.stat-group .stat-value small { color: #9293a0; font-size: 16px; font-weight: 500; letter-spacing: -.3px; }
.kpi-cell > .kpi-secondary-value { display: block; color: var(--ink); overflow-wrap: anywhere; }
.kpi-summary-row .product-funnel { display: contents; }
.conversion-value { display: inline-flex; align-items: center; justify-content: center; gap: 3px; padding: 0; border-radius: 0; background: transparent; font-weight: 650; line-height: 1.4; white-space: nowrap; }
.kpi-cell > .conversion-value { padding: 2px 0; border-radius: 0; }
.conversion-value.conversion-low { color: #b45b55; }
.conversion-value.conversion-high { color: #3b825c; }
.conversion-value.conversion-neutral { color: #8a8c98; }
.conversion-pending { grid-column: 1 / -1; color: #a17a3e; font-size: 12px; line-height: 1.5; }
.stat-group .stat-foot { margin-top: 13px; gap: 10px; }
.stat-group .stat-caption { color: var(--muted); font-size: 12px; }
.stat-group .tiny-pill { padding: 0; background: none; color: #7966bf; font-size: 16px; font-weight: 650; }
.stat-group .progress-track { height: 4px; margin-top: 12px; background: #eeedf3; border-radius: 6px; }
#ordinaryProgress, #evatorProgress, #twoGisProgress { background: #9482df; }
.team-product-rhythm { margin-top: 18px; padding-top: 18px; border-top: 2px solid #ded9ed; }
.team-rr { padding: 12px; border: 0; border-left: 3px solid currentColor; border-radius: 9px; background: #f1f1f6; grid-template-columns: minmax(0,1fr) auto auto; gap: 10px; }
.team-rr > span { font-size: 14px; }
.team-rr > span small { font-size: 11px; }
.team-rr > strong, .team-rr > b { font-size: 15px; }
.team-rr > b { padding-left: 10px; border-left: 2px solid currentColor; }
.team-rr > strong small { font-size: 12px; }
.team-rr-on-track { color: #3b825c; background: #edf7f1; }
.team-rr-behind { color: #b45b55; background: #fff0ee; }
.team-pace-details { margin-top: 14px; }
.team-pace-details > summary, .team-pace-details > p, .team-pace-grid { font-size: 12px; }
.team-pace-details > summary {
  min-height: 42px; padding: 10px 12px; border: 1px solid #ded8f1; border-radius: 9px;
  background: #f5f2fd; color: #6b56bd; font-size: 13px; font-weight: 600;
}
.disclosure-chevron { width: 20px; height: 20px; flex: none; transition: transform .18s ease; }
.disclosure-open { display: none; }
.team-pace-details[open] > summary > span { transform: none; }
.team-pace-details[open] > summary .disclosure-closed,
.plan-manager-card[open] > summary .disclosure-closed { display: none; }
.team-pace-details[open] > summary .disclosure-open,
.plan-manager-card[open] > summary .disclosure-open { display: inline; }
.team-pace-details[open] > summary .disclosure-chevron,
.plan-manager-card[open] > summary .disclosure-chevron { transform: rotate(180deg); }
.team-pace-details > summary:hover, .plan-manager-summary:hover .plan-expand-hint { background: #ece6fb; border-color: #cbbfe9; }
.team-pace-details > summary:focus-visible, .plan-manager-summary:focus-visible { outline: 2px solid #9f8bdf; outline-offset: 3px; }
.team-pace-grid { row-gap: 12px; padding: 10px 0 2px; }

/* Product panels share one style; pace values are separated by rules inside. */
.plan-list { padding: 0; }
.plan-manager-card, .plan-row-expanded { background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.plan-manager-summary { background: none; padding: 16px 0; }
.plan-manager-details { padding: 0 0 20px; }
.plan-summary-metric-top span { font-size: 12px; }
.plan-summary-metric-top strong { font-size: 13px; }
.plan-summary-metric .mini-track { margin-bottom: 0; }
.plan-expand-hint {
  display: inline-flex; justify-content: space-between; gap: 10px; padding: 9px 12px;
  min-height: 40px; min-width: 118px; border: 1px solid #ded8f1; border-radius: 9px;
  background: #f5f2fd; color: #6b56bd; font-size: 12px; font-weight: 600;
}
.plan-streams { gap: 14px; padding-top: 20px; border-top-color: var(--line); }
.plan-streams > .plan-metric, .plan-streams > .plan-metric:first-child, .plan-streams > .plan-metric:last-child {
  padding: 16px; background: #f8f8fb; border: 1px solid #e5e3ee; border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
.plan-streams > .plan-metric + .plan-metric { border-left: 1px solid #e5e3ee; }
.plan-metric-heading strong { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; }
.plan-metric-heading .product-icon { width: 20px; height: 20px; }
.plan-metric-heading span { font-size: 12px; }
.manager-funnel { align-items: center; gap: 6px 12px; font-size: 12px; line-height: 1.5; margin-top: 8px; }
.manager-funnel-item { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; white-space: nowrap; }
.manager-funnel-item > b, .manager-funnel .conversion-value { font-size: 12px; line-height: 1.5; }
.manager-funnel small { font-size: 11px; }
.plan-metric .rhythm-stat:not(.rhythm-stat-runrate) > span { font-size: 12px; }
.plan-metric .rhythm-stat:not(.rhythm-stat-runrate) { min-height: 54px; padding: 10px 9px; }
.plan-metric .rhythm-stat-runrate { border: 0; border-left: 3px solid currentColor; box-shadow: none; margin-top: 12px; }
.plan-metric .rhythm-stat-runrate.runrate-behind { color: #b45b55; }
.plan-metric .rhythm-stat-runrate.runrate-on-track { color: #3b825c; }
.plan-metric .rhythm-stat-runrate em { padding-left: 10px; border-left: 2px solid currentColor; }
.summary-track-meetings i, .summary-track-evator i, .summary-track-two-gis i,
.plan-metric .mini-track i { background: #9482df; }
.managers-setup-panel .manager-form { padding: 0; border: 0; background: none; }
.manager-item-copy span { font-size: 12px; }
.manager-item-copy strong { font-size: 14px; }
.entry-manager-metrics span { font-size: 12px; }
.entry-manager-metrics b { font-size: 13px; }
.quarter-card .entry-manager-self { background: #f3f0fc; box-shadow: none; border-color: #e5def6; }
.number-input-wrap, .form-field input, .form-field select, .auth-input { border-color: #e3e3eb; border-radius: 10px; background: rgba(255,255,255,.82); }
.number-input-wrap input:focus { outline: 0; box-shadow: none; }

/* A fixed header/footer around one scroll region prevents content bleeding. */
#editManagerModal { padding: 24px; overflow: hidden; }
.modal-card.manager-editor-card {
  display: grid; grid-template-rows: auto minmax(0,1fr) auto;
  width: min(1040px,100%); max-width: 1040px; height: min(860px,calc(100dvh - 48px));
  max-height: calc(100dvh - 48px); padding: 0; overflow: hidden;
  border: 1px solid rgba(255,255,255,.95); border-radius: 22px;
  background: #fcfcfe; box-shadow: 0 24px 80px rgba(31,30,54,.2), inset 0 1px 0 #fff;
}
.manager-editor-card > .modal-heading {
  position: static; inset: auto; z-index: auto; margin: 0; padding: 22px 28px;
  background: rgba(255,255,255,.93); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.manager-editor-card .modal-heading h2 { margin-top: 5px; font-size: 24px; line-height: 1.3; }
.manager-editor-card .eyebrow { font-size: 11px; }
.manager-editor-body { min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 18px 24px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #c4bddc transparent; background: #f4f4f8; }
.editor-section { padding: 20px; margin-bottom: 16px; border: 1px solid #e5e3ec; border-radius: 13px; background: rgba(255,255,255,.94); box-shadow: 0 2px 8px rgba(49,43,75,.025), inset 0 1px 0 #fff; }
.editor-section:last-child { margin-bottom: 0; }
.manager-editor-section-heading { margin: 0 0 18px; }
.manager-editor-section-heading h3 { margin: 0 0 5px; font-size: 17px; line-height: 1.5; }
.manager-editor-section-heading p { margin: 0; font-size: 13px; line-height: 1.6; }
.editor-name-field { margin-bottom: 18px; }
.editor-three-columns { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; align-items: end; }
#conversionForm { grid-template-columns: repeat(2,minmax(0,1fr)); }
.manager-editor-card .form-field { min-width: 0; }
.manager-editor-card .form-field label { min-height: 20px; margin-bottom: 7px; text-transform: none; font-size: 12px; letter-spacing: 0; }
.manager-editor-card .form-field input, .manager-editor-card .form-field select { width: 100%; min-width: 0; height: 48px; padding: 0 12px; font-size: 15px; border: 1px solid #e1e1e9; border-radius: 9px; background: #fff; color: var(--ink); }
.editor-reports-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.editor-reports-heading .manager-editor-section-heading { margin: 0; }
.editor-reports-heading > .form-field { flex: 0 0 220px; }
#editManagerModal .manager-stats-list { display: block; max-height: none; overflow: visible; padding: 0; margin: 0; }
.editor-report-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; align-items: start; }
.editor-report-product { min-width: 0; padding: 0; margin: 0; border: 0; background: none; }
.editor-report-product + .editor-report-product { padding-left: 20px; border-left: 2px solid #dfdce9; }
.editor-report-product legend { display: flex; align-items: center; gap: 8px; padding: 0; margin-bottom: 12px; font-size: 14px; font-weight: 600; color: #555666; }
.editor-report-product legend .product-icon { width: 21px; height: 21px; }
.editor-product-inputs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.editor-meetings-input { grid-template-columns: minmax(0,1fr); }
.editor-product-inputs label { min-width: 0; display: grid; gap: 7px; color: var(--muted); font-size: 12px; }
.editor-product-inputs input { width: 100%; min-width: 0; height: 48px; padding: 0 12px; border: 1px solid #e1e1e9; border-radius: 9px; background: #fff; color: var(--ink); font-size: 15px; }
.editor-product-inputs input[readonly] { background: #f5f5f8; color: #858592; }
.editor-product-inputs input:focus { outline: 2px solid rgba(118,98,233,.22); outline-offset: 1px; }
.manual-deals-option { margin-top: 12px; font-size: 12px; color: #787685; }
.daily-conversion-note { display: block; margin-top: 8px; font-size: 12px; line-height: 1.6; }
.manager-editor-footer { margin: 0; padding: 18px 28px; gap: 20px; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
#managerEditorStatus { color: var(--muted); font-size: 12px; line-height: 1.5; }
.editor-footer-actions { display: flex; align-items: center; gap: 10px; }
.editor-footer-actions .button { min-width: 112px; }

@media (min-width:721px) and (max-width:1100px) {
  .stat-groups { grid-template-columns: minmax(0,1fr); }
  .kpi-summary-row { grid-template-columns: minmax(0,1.25fr) minmax(0,1fr) minmax(0,1fr); }
}
@media (max-width:720px) {
  .stats-title-row { gap: 12px; justify-content: space-between; }
  .analytics-heading-copy { width: 100%; }
  .button.ai-launch-button { min-height: 40px; padding: 9px 12px; font-size: 12px; }
  .ai-drawer { border-radius: 0; border: 0; }
  .ai-drawer-header { padding: max(18px,env(safe-area-inset-top)) 18px 17px; }
  .ai-drawer-header p { font-size: 11px; }
  .ai-scope-bar { padding: 12px 18px; }
  #aiScopePeriod { flex-basis: 100%; margin-left: 0; }
  .ai-conversation { padding: 24px 18px; }
  .ai-welcome { margin-top: 24px; }
  .ai-drawer-footer { padding-right: 18px; padding-left: 18px; }
  .ai-composer textarea { font-size: 16px; }
  .ai-drawer-header { gap: 8px; }
  .ai-drawer-brand { gap: 9px; }
  .ai-drawer-header h2 { font-size: 20px; }
  .ai-drawer-header p span { display: block; }
  .sidebar { background: rgba(251,251,254,.96); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .sidebar-navigation { background: rgba(255,255,255,.86); backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%); }
  .sidebar .nav-item { font-size: 11px; }
  .analytics-header-actions { width: 100%; justify-content: flex-start; }
  .analytics-header-actions .button { flex: 1 1 auto; padding: 10px 12px; font-size: 12px; }
  .toolbar { padding: 16px; }
  .toolbar .period-filter-group, .toolbar > .filter-group:not(.period-filter-group) { flex: 1 1 100%; width: 100%; }
  .toolbar .select-control { height: 44px; }
  .quarter-shortcuts button { min-height: 40px; }
  .date-filter { height: auto; }
  .date-filter input, .form-field input, .form-field select { font-size: 16px; }
  .stat-groups { gap: 14px; }
  .stat-group { padding: 20px 18px; }
  .stat-group-title { margin-bottom: 18px; }
  .kpi-summary-row { grid-template-columns: minmax(0,1.25fr) minmax(0,.8fr) minmax(0,1fr); gap: 12px; }
  .kpi-summary-row { --kpi-number-size: 30px; grid-template-columns: minmax(0,1.1fr) minmax(0,.8fr) minmax(0,1.1fr); }
  .stat-group .tiny-pill { font-size: 16px; }
  .stat-group .stat-foot { margin-top: 8px; flex-direction: row; }
  .plan-streams { gap: 14px; }
  .plan-streams > .plan-metric, .plan-streams > .plan-metric:first-child, .plan-streams > .plan-metric:last-child { padding: 16px; }
  .plan-streams > .plan-metric + .plan-metric { border: 1px solid #e5e3ee; }
  .plan-manager-summary { padding: 16px 0; }
  .plan-metric .rhythm-stat:not(.rhythm-stat-runrate) { min-height: 68px; }
  .modal-card.manager-editor-card { height: calc(100dvh - 20px); max-height: calc(100dvh - 20px); border-radius: 18px; }
  #editManagerModal { padding: 10px; }
  .manager-editor-card > .modal-heading { padding: 16px 18px; }
  .manager-editor-card .modal-heading h2 { font-size: 22px; }
  .manager-editor-body { padding: 12px; }
  .editor-section { padding: 16px; margin-bottom: 12px; }
  .editor-three-columns { gap: 10px; }
  .manager-editor-card .form-field label { font-size: 12px; min-height: 18px; line-height: 1.5; }
  .editor-three-columns:not(#conversionForm) .form-field label { min-height: 36px; }
  .manager-editor-card .form-field input, .manager-editor-card .form-field select { padding: 0 9px; font-size: 16px; }
  #conversionForm { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .editor-report-grid { grid-template-columns: minmax(0,1fr); gap: 22px; }
  .editor-report-product + .editor-report-product { border-left: 0; border-top: 2px solid #dfdce9; padding: 20px 0 0; }
  .editor-reports-heading { flex-direction: column; gap: 16px; }
  .editor-reports-heading > .form-field { flex: none; width: 100%; }
  .editor-product-inputs input { font-size: 16px; }
  .manager-editor-footer { display: grid; grid-template-columns: minmax(0,1fr); gap: 10px; padding: 12px 18px; }
  .editor-footer-actions .button { flex: 1; min-width: 0; }
  .editor-footer-actions { width: 100%; }
  .manager-editor-footer .button { width: auto; }
}
@media (max-width:400px) {
  .stat-group { padding: 16px 12px; }
  .kpi-summary-row { --kpi-number-size: 26px; gap: 8px; padding: 14px 10px; }
  .kpi-cell > span { font-size: 11px; }
  .team-rr { gap: 7px; padding: 10px; }
  .team-rr > strong, .team-rr > b { font-size: 14px; }
  .editor-three-columns:not(#conversionForm) { grid-template-columns: minmax(0,1fr); }
  .editor-three-columns:not(#conversionForm) .form-field label { min-height: 0; }
}
/* Shared rows keep summaries and rhythm panels aligned despite wrapped notes. */
@supports (grid-template-rows: subgrid) {
  @media (min-width:1101px) {
    .stat-groups { grid-template-rows: repeat(5,auto); row-gap: 0; }
    .stat-groups > .stat-group {
      display: grid; grid-template-columns: minmax(0,1fr);
      grid-template-rows: subgrid; grid-row: span 5; row-gap: 0;
    }
    .stat-group .stat-group-cards, .stat-group .stat-card { display: contents; }
  }
}
@media (prefers-reduced-transparency: reduce) {
  .panel, .quarter-card, .stat-group, .auth-card, .sidebar-navigation { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  .button.button-primary { transition: none; }
}
