:root {
  --navy: #283238;
  --blue: #2f755c;
  --blue-soft: #e9f1ed;
  --teal: #2f755c;
  --green: #2f7d5a;
  --green-soft: #e5f1e9;
  --amber: #b87524;
  --amber-soft: #fff0d8;
  --red: #b44343;
  --red-soft: #fbe7e7;
  --ink: #20292e;
  --muted: #68747a;
  --line: #d9dfdc;
  --border: #d9dfdc;
  --surface: #ffffff;
  --surface-soft: #f7f8f5;
  --background: #f3f3ef;
  --accent: #2f755c;
  --crm-red: #c73532;
  --crm-red-dark: #9f2526;
  --crm-sidebar: #182228;
  --shadow: 0 6px 18px rgba(40, 50, 56, 0.07);
}

* { box-sizing: border-box; }
html { font-family: Inter, "Segoe UI", Arial, sans-serif; color: var(--ink); background: var(--background); }
body { margin: 0; min-width: 320px; }
a { color: inherit; }
button, input, select { font: inherit; }
input[type="date"],input[type="time"] { cursor: pointer; }
.date-picker-native { position:absolute!important; width:1px!important; height:1px!important; margin:0!important; padding:0!important; opacity:0!important; pointer-events:none!important; clip-path:inset(50%)!important; }
.date-picker-trigger { display:flex; width:100%; min-height:42px; align-items:center; justify-content:space-between; gap:10px; padding:10px 38px 10px 12px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--ink); cursor:pointer; font-weight:650; text-align:left; position:relative; }
.date-picker-trigger::after { content:'▦'; position:absolute; right:12px; color:var(--muted); font-size:14px; }
.date-picker-trigger:hover { border-color:#aab7b0; background:#fbfcfa; }
.date-picker-trigger:focus-visible { outline:2px solid rgba(45,135,93,.2); border-color:var(--green); }
.date-picker-trigger.invalid { border-color:var(--red); box-shadow:0 0 0 2px var(--red-soft); }
.date-picker-dialog { width:min(380px,calc(100vw - 28px)); padding:0; border:0; border-radius:14px; background:#fff; color:var(--ink); box-shadow:0 24px 65px rgba(24,34,40,.28); }
.date-picker-dialog::backdrop { background:rgba(24,34,40,.38); backdrop-filter:blur(2px); }
.date-picker-shell { padding:16px; }
.date-picker-header { display:grid; grid-template-columns:42px 1fr 42px; align-items:center; gap:8px; margin-bottom:13px; }
.date-picker-header strong { text-align:center; font-size:16px; text-transform:capitalize; }
.date-picker-nav,.date-picker-today,.date-picker-close { border:1px solid var(--line); border-radius:8px; background:#f7f8f5; color:var(--ink); cursor:pointer; font-weight:750; }
.date-picker-nav { width:42px; height:38px; font-size:17px; }
.date-picker-nav:hover,.date-picker-today:hover,.date-picker-close:hover { border-color:#b7c1bc; background:#eef2ef; }
.date-picker-weekdays,.date-picker-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:4px; }
.date-picker-weekdays { margin-bottom:5px; }
.date-picker-weekdays span { padding:5px 0; color:var(--muted); font-size:11px; font-weight:800; text-align:center; }
.date-picker-day { display:grid; width:100%; aspect-ratio:1; place-items:center; border:1px solid transparent; border-radius:8px; background:transparent; color:var(--ink); cursor:pointer; font-size:13px; font-weight:700; }
.date-picker-day.outside { color:#9ca6a1; }
.date-picker-day:hover:not(:disabled) { border-color:#c7d4cc; background:#eef6f1; }
.date-picker-day.today { border-color:#a9c7b6; }
.date-picker-day.selected { border-color:var(--green); background:var(--green); color:#fff; }
.date-picker-day:focus-visible { outline:2px solid rgba(47,125,90,.28); outline-offset:1px; }
.date-picker-day:disabled { color:#c8cecb; cursor:not-allowed; text-decoration:line-through; }
.date-picker-footer { display:flex; justify-content:space-between; gap:10px; margin-top:13px; padding-top:13px; border-top:1px solid var(--line); }
.date-picker-today,.date-picker-close { min-height:38px; padding:8px 13px; }
.date-picker-today { border-color:#b8d2c3; background:#edf6f0; color:var(--green); }
.skip-link { position: fixed; top: 10px; left: 50%; z-index: 30; padding: 9px 14px; border-radius: 8px; background: var(--ink); color: #fff; font-weight: 800; text-decoration: none; transform: translate(-50%, -160%); transition: transform .14s ease; }
.skip-link:focus { transform: translate(-50%, 0); }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 232px; padding: 28px 16px 20px; background: linear-gradient(180deg, #202c32 0%, var(--crm-sidebar) 72%); color: #fff; display: flex; flex-direction: column; z-index: 10; border-right: 1px solid #303c42; box-shadow: 8px 0 28px rgba(16,25,29,.08); }
.sidebar-backdrop { display: none; position: fixed; inset: 0; z-index: 9; border: 0; background: rgba(24,31,34,.52); cursor: pointer; }
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; margin: 0 5px 34px; }
.brand-mark { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: linear-gradient(135deg, #df4c45, var(--crm-red-dark)); color: #fff; font-weight: 850; letter-spacing: .04em; box-shadow: 0 8px 20px rgba(141,28,30,.28); }
.brand strong { display: block; font-size: 19px; }
.brand small { display: block; margin-top: 2px; color: #bcd0e5; font-size: 12px; }
.side-nav { display: grid; align-content:start; gap: 10px; flex: 1 1 auto; min-width:0; min-height: 0; overflow-x:hidden; overflow-y: auto; scrollbar-width: thin; }
.side-nav a { display: flex; min-width:0; min-height:58px; align-items: center; gap: 12px; padding: 10px 11px; border: 1px solid transparent; border-radius: 10px; text-decoration: none; color: #d6dfe2; font-size: 13px; font-weight: 750; line-height: 1.25; transition: background .14s ease,border-color .14s ease; }
.side-nav a .crm-nav-icon { display: inline-grid; flex:0 0 34px; width:34px; height:34px; place-items: center; border:1px solid rgba(255,255,255,.11); border-radius:9px; background:rgba(255,255,255,.045); color:#bdc8cc; font-size:15px; }
.side-nav a:hover { color:#fff; background:rgba(255,255,255,.06); }
.side-nav a.active { color:#fff; border-color:rgba(225,83,77,.34); background:linear-gradient(135deg,rgba(199,53,50,.34),rgba(131,34,36,.18)); box-shadow:inset 3px 0 var(--crm-red); }
.side-nav a.active .crm-nav-icon { border-color:rgba(255,255,255,.2); background:var(--crm-red); color:#fff; }
.sidebar-footer { margin-top:auto; padding:18px 7px 0; border-top:1px solid rgba(255,255,255,.09); }
.logout-form { flex: 0 0 auto; margin:0 0 8px; }
.link-button { display:flex; gap:8px; align-items:center; border: 0; background: transparent; color: #e4e9eb; cursor: pointer; padding: 9px 0; font-weight: 700; }
.link-button:hover { color: #fff; }
.read-only-note { margin:5px 0 11px; font-size: 10px; line-height: 1.45; color: #8fa0a7; }
.local-address { color:#aebbc0; font-size:11px; font-variant-numeric:tabular-nums; }
.main-column { width: calc(100% - 232px); min-width: 0; margin-left: 232px; }
.content { max-width: 1540px; margin: 0 auto; padding: 24px 32px 50px; }
.mobile-header { display: none; }
.crm-workspace-nav { display:flex; align-items:center; margin-bottom:24px; padding:0 0 15px; border-bottom:1px solid var(--line); }
.crm-subnav { display:flex; flex-wrap:wrap; gap:9px; align-items:center; }
.crm-subnav a { display:inline-flex; min-height:36px; align-items:center; padding:8px 14px; border:1px solid #e2e5e3; border-radius:8px; background:#f5f6f4; color:#4d595e; text-decoration:none; font-size:12px; font-weight:750; box-shadow:0 2px 7px rgba(40,50,56,.04); transition:background .14s ease,color .14s ease,border-color .14s ease,transform .14s ease; }
.crm-subnav a:hover { border-color:#d4b0ae; background:#fff; color:var(--crm-red-dark); transform:translateY(-1px); }
.crm-subnav a.active { border-color:var(--crm-red); background:var(--crm-red); color:#fff; box-shadow:0 5px 13px rgba(159,37,38,.2); }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: 30px; line-height: 1.15; letter-spacing: -.02em; }
h2 { margin-bottom: 0; font-size: 20px; }
.eyebrow { margin-bottom: 7px; color: var(--teal); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.muted, .source-caption { color: var(--muted); }
.source-caption { margin: 0; font-size: 13px; }
.freshness { min-width: 270px; display: flex; gap: 11px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow); }
.freshness small { display: block; margin-top: 3px; color: var(--muted); }
.status-dot { flex: 0 0 auto; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.freshness-warning .status-dot { background: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }
.freshness-danger .status-dot { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.section-block { margin-bottom: 24px; padding: 22px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: var(--shadow); }
.section-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 18px; }
.section-title .eyebrow { margin-bottom: 5px; }
.section-title-copy .source-caption { margin-top: 7px; }
.section-actions { display: flex; align-items: center; gap: 14px; }
.metric-grid { display: grid; gap: 14px; }
.metric-grid-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric-card { min-height: 138px; padding: 17px; border: 1px solid var(--line); border-left: 4px solid #a6b5c5; border-radius: 9px; background: #fcfcfa; }
.metric-card > span { display: block; min-height: 36px; color: var(--muted); font-size: 13px; font-weight: 700; }
.metric-card strong { display: block; margin: 5px 0 7px; font-size: 30px; line-height: 1; }
.metric-card small { color: var(--muted); line-height: 1.35; }
.accent-blue { border-left-color: #55747f; }
.accent-green { border-left-color: var(--green); }
.accent-amber { border-left-color: var(--amber); }
.accent-red { border-left-color: var(--red); }
.technical-note { margin: 15px 0 0; color: var(--muted); font-size: 12px; }
.technical-note span { overflow-wrap: anywhere; }
.two-column-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 24px; }
.compact-block { margin: 0; }
.run-badge { padding: 5px 9px; border-radius: 999px; background: var(--blue-soft); color: var(--navy); font-size: 12px; font-weight: 800; }
.outcome-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.outcome-list div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 12px; border-radius: 9px; background: var(--background); }
.outcome-list span { color: var(--muted); }
.text-link { color: var(--blue); font-weight: 700; text-decoration: none; }
.procurement-highlight { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 17px; }
.procurement-highlight div { padding: 15px; border-radius: 11px; background: var(--green-soft); }
.procurement-highlight strong { display: block; font-size: 28px; }
.procurement-highlight span { color: #397055; font-size: 13px; }
.primary-button, .secondary-button, .danger-button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; border-radius: 9px; border: 1px solid transparent; text-decoration: none; cursor: pointer; font-weight: 750; line-height: 1.15; transition: transform .12s ease, box-shadow .12s ease, filter .12s ease; }
.primary-button { padding: 11px 18px; background: var(--green); color: #fff; box-shadow: 0 4px 11px rgba(47,125,90,.18); }
.secondary-button { padding: 10px 16px; background: #354147; color: #fff; box-shadow: 0 4px 11px rgba(40,50,56,.15); }
.danger-button { padding: 10px 16px; border-color: #e5b6b6; background: var(--red-soft); color: #8e3030; }
.primary-button:hover, .secondary-button:hover, .danger-button:hover { filter: brightness(.97); transform: translateY(-1px); }
.primary-button:focus-visible, .secondary-button:focus-visible, .danger-button:focus-visible, .quiet-button:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid rgba(47,117,92,.28); outline-offset: 2px; }
.download-button { flex: 0 0 auto; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 12px 16px; border-bottom: 3px solid transparent; color: var(--muted); text-decoration: none; font-weight: 750; }
.tabs a.active { color: var(--blue); border-bottom-color: var(--blue); }
.tabs span { margin-left: 5px; padding: 2px 7px; border-radius: 999px; background: var(--blue-soft); font-size: 11px; }
.review-counters { display: flex; flex-wrap: wrap; gap: 8px; padding: 11px 0 0; color: var(--muted); font-size: 12px; }
.review-counters span { padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.filters { display: grid; grid-template-columns: minmax(220px, 2fr) minmax(180px, 1.2fr) minmax(155px, 1fr) 110px auto; gap: 12px; align-items: end; margin: 18px 0 13px; }
.filters label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 700; }
.filters input, .filters select, .login-form input { width: 100%; min-width: 0; padding: 10px 11px; border: 1px solid #c9d5e2; border-radius: 8px; background: #fff; color: var(--ink); }
.filters input:focus, .filters select:focus, .login-form input:focus { outline: 3px solid rgba(47,117,92,.16); border-color: var(--green); }
.results-bar { display: flex; flex-wrap:wrap; justify-content: space-between; gap: 10px 15px; margin: 14px 0 10px; color: var(--muted); font-size: 13px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.table-wrap table thead th { position: sticky; top: 0; z-index: 3; box-shadow: inset 0 -1px rgba(255,255,255,.14); }
.sticky-table-header { position:fixed; top:0; z-index:8; display:none; overflow:hidden; border-radius:0 0 10px 10px; pointer-events:none; box-shadow:0 8px 20px rgba(24,34,40,.18); }
.sticky-table-header.visible { display:block; }
.sticky-table-header table { margin:0; border-collapse:collapse; table-layout:fixed; transform-origin:left top; }
.sticky-table-header th { padding:11px 10px; background:var(--navy); color:#fff; text-align:left; line-height:1.25; }
.sticky-table-header table thead th { position:static; }
.comparison-table { width: 100%; min-width: 980px; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
.comparison-table th { padding: 12px 10px; background: var(--navy); color: #fff; text-align: left; line-height: 1.25; }
.comparison-table td { padding: 11px 10px; border-bottom: 1px solid rgba(180,195,210,.55); vertical-align: top; line-height: 1.35; overflow-wrap: anywhere; }
.comparison-table th:nth-child(1), .comparison-table th:nth-child(2) { width: 23%; }
.comparison-table th:nth-child(n+3):nth-child(-n+6) { width: 11%; }
.comparison-table th:nth-child(7) { width: 10%; }
.no-candidate-table { min-width: 900px; }
.no-candidate-table th:nth-child(1) { width: 28%; }
.no-candidate-table th:nth-child(2) { width: 18%; }
.no-candidate-table th:nth-child(3), .no-candidate-table th:nth-child(4) { width: 12%; }
.no-candidate-table th:nth-child(5) { width: 14%; }
.no-candidate-table th:nth-child(6) { width: 16%; }
.row-exact { background: var(--green-soft); }
.row-probable { background: var(--amber-soft); }
.row-review-danger { background: var(--red-soft); }
.row-review-warning { background: var(--amber-soft); }
.review-status { display: inline-block; margin-top: 7px; padding: 4px 7px; border-radius: 7px; font-size: 11px; font-weight: 750; line-height: 1.35; }
.review-status-danger { background: #f4caca; color: #8e3030; }
.review-status-warning { background: #ffe9a3; color: #7f5a06; }
.review-status-good { background: #cfead8; color: #24633f; }
.compact-action { display: block; width: fit-content; margin-top: 7px; color: var(--blue); font-size: 12px; font-weight: 750; text-decoration: none; }
.inline-decision-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 9px; }
.inline-decision-form { margin: 0; }
.inline-approve-button, .inline-reject-button, .inline-details-link { display: inline-flex; min-height: 31px; align-items: center; justify-content: center; border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 11px; font-weight: 750; line-height: 1.15; cursor: pointer; text-decoration: none; transition: transform .12s ease, box-shadow .12s ease, filter .12s ease; }
.inline-approve-button { border: 1px solid #66af82; background: var(--green); color: #fff; box-shadow: 0 3px 8px rgba(46,139,87,.16); }
.inline-reject-button { border: 1px solid #dfa4a4; background: #fff7f7; color: #983838; }
.inline-details-link { border: 1px solid #b7cbe1; background: #fff; color: var(--navy); }
.inline-approve-button:hover, .inline-reject-button:hover, .inline-details-link:hover { filter: brightness(.97); transform: translateY(-1px); box-shadow: 0 4px 9px rgba(21,52,93,.12); }
.inline-approve-button:focus-visible, .inline-reject-button:focus-visible, .inline-details-link:focus-visible { outline: 3px solid rgba(37,116,199,.2); outline-offset: 2px; }
.inline-conflict-note { display: block; margin-top: 7px; color: #8e3030; font-size: 11px; line-height: 1.35; }
.link-audit { display: block; margin-top: 6px; color: var(--muted); line-height: 1.35; }
.review-product-card { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 24px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.review-product-card h2 { max-width: 920px; line-height: 1.35; }
.review-product-facts, .candidate-facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; color: var(--muted); font-size: 13px; }
.review-product-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; min-width: 245px; }
.candidate-list { display: grid; gap: 14px; }
.candidate-list > h2 { margin-bottom: 3px; }
.manual-pair-search { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto; gap:12px; align-items:end; margin-bottom:18px; padding:16px; border:1px solid var(--line); border-radius:14px; background:#fff; box-shadow:var(--shadow); }
.manual-pair-search label { display:grid; gap:6px; }
.manual-pair-search label > span { color:var(--muted); font-size:12px; font-weight:800; }
.manual-pair-columns { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.manual-search-panel { min-width:0; padding:18px; border:1px solid var(--line); border-radius:16px; background:#fff; box-shadow:var(--shadow); }
.manual-search-panel header { margin-bottom:12px; }
.manual-search-results { display:grid; gap:8px; max-height:520px; overflow:auto; padding-right:3px; }
.manual-search-result { display:grid; gap:5px; padding:12px; border:1px solid var(--line); border-radius:10px; color:var(--text); text-decoration:none; }
.manual-search-result:hover { border-color:var(--crm-red); background:var(--crm-red-soft); }
.manual-search-result.selected { border-color:var(--crm-red); box-shadow:0 0 0 2px rgba(199,53,50,.13); background:var(--crm-red-soft); }
.manual-search-result small { color:var(--muted); line-height:1.35; }
.manual-pair-preview { margin-top:18px; padding:20px; border:1px solid #b9ddca; border-left:4px solid var(--green); border-radius:16px; background:#fff; box-shadow:var(--shadow); }
.manual-pair-preview.manual-pair-conflict { border-color:#efb8b5; border-left-color:var(--crm-red); }
.manual-pair-preview-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.manual-pair-preview-grid article { padding:14px; border-radius:10px; background:var(--background); }
.manual-pair-preview-grid h3 { margin:5px 0 7px; line-height:1.35; }
.manual-pair-assessment { margin:14px 0; }
.manual-pair-assessment .reason-list { margin-top:8px; }
.manual-pair-confirm { display:grid; gap:10px; max-width:760px; }
.conflict-confirm-danger { color:#a02525; }
.candidate-card { padding: 19px; border: 1px solid var(--line); border-left: 5px solid var(--green); border-radius: 13px; background: #fff; box-shadow: var(--shadow); }
.candidate-card header { display: flex; justify-content: space-between; gap: 18px; }
.candidate-card h3 { margin: 0; font-size: 16px; line-height: 1.4; }
.candidate-conflict { border-left-color: var(--red); background: #fffafa; }
.candidate-rejected { border-left-color: #9aa8b6; opacity: .8; }
.row-rejected { background: #fff5f5; }
.rejected-table .cost-note-known { background: #f4e8e8; color: #704040; }
.reason-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; font-size: 12px; }
.reason-list strong { width: 100%; color: var(--muted); }
.reason-list span { padding: 4px 7px; border-radius: 7px; background: var(--green-soft); color: #24633f; }
.conflict-list span { background: var(--red-soft); color: #8e3030; }
.candidate-actions { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.candidate-actions form { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 9px; }
.conflict-confirm { max-width: 330px; color: #8e3030; font-size: 12px; font-weight: 700; }
.skip-form { display: flex; justify-content: flex-end; margin-top: 20px; }
.skip-button { min-width: 250px; }
.money { white-space: nowrap; text-align: right; }
.cost-note { display: block; margin-top: 7px; padding: 5px 7px; width: fit-content; border-radius: 7px; font-size: 11px; font-weight: 700; }
.cost-note-known { color: #245b3a; background: var(--green-soft); }
.cost-note-missing { color: #87601c; background: #fff1c9; }
.price-guidance { display: block; margin-top: 7px; max-width: 205px; padding: 7px 8px; border-radius: 8px; white-space: normal; text-align: left; font-size: 10px; font-weight: 700; line-height: 1.45; }
.price-guidance strong { font-size: 11px; }
.price-guidance-good { color: #245b3a; background: var(--green-soft); }
.price-guidance-neutral { color: var(--muted); background: #eef3f7; }
.price-guidance-danger { color: var(--red); background: var(--red-soft); }
.availability { display: inline-block; padding: 4px 7px; border-radius: 999px; font-weight: 750; font-size: 11px; }
.availability-low { background: #ffe9a3; color: #7f5a06; }
.availability-sufficient, .availability-many { background: #cfead8; color: #24633f; }
.availability-out_of_stock { background: #f4caca; color: #8e3030; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 24px; margin-top: 18px; }
.pagination a { color: var(--blue); font-weight: 750; text-decoration: none; }
.pagination span { color: #a0aabb; }
.empty-state { padding: 50px 25px; border: 1px dashed #b9c8d7; border-radius: 14px; background: var(--surface); text-align: center; }
.empty-state strong { font-size: 19px; }
.empty-state p { margin: 8px 0 18px; color: var(--muted); }
.error-state { margin-top: 90px; }
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: radial-gradient(circle at 15% 10%, #fff 0, #f1f2f0 38%, #e8ebea 100%); }
.login-shell { display:grid; grid-template-columns:minmax(0,1.08fr) minmax(380px,.82fr); width:min(100%,980px); min-height:590px; overflow:hidden; border:1px solid #d9dddb; border-radius:24px; background:#fff; box-shadow:0 30px 80px rgba(24,34,40,.17); }
.login-identity { position:relative; display:flex; flex-direction:column; padding:48px; overflow:hidden; background:linear-gradient(145deg,#232f35 0%,#172127 68%,#301f22 100%); color:#fff; }
.login-identity::before { content:""; position:absolute; width:360px; height:360px; right:-190px; top:-170px; border:70px solid rgba(199,53,50,.13); border-radius:50%; }
.login-identity::after { content:""; position:absolute; width:180px; height:5px; left:48px; bottom:47px; border-radius:999px; background:linear-gradient(90deg,var(--crm-red),transparent); }
.login-identity-brand { position:relative; z-index:1; display:flex; gap:13px; align-items:center; }
.login-identity-brand strong,.login-identity-brand small { display:block; }
.login-identity-brand strong { font-size:20px; }
.login-identity-brand small { margin-top:2px; color:#aebbc0; font-size:11px; }
.login-identity-copy { position:relative; z-index:1; margin:auto 0; max-width:500px; padding:70px 0; }
.login-identity-copy h1 { max-width:520px; margin-bottom:20px; font-size:39px; line-height:1.14; letter-spacing:-.035em; }
.login-identity-copy > p:last-child { max-width:440px; color:#b9c4c8; font-size:15px; line-height:1.65; }
.login-card { display:flex; flex-direction:column; justify-content:center; width:100%; padding:54px 48px; background:#fff; }
.login-card-heading h2 { margin:0 0 9px; font-size:29px; letter-spacing:-.025em; }
.login-card-heading .muted { font-size:13px; }
.login-form { display: grid; gap: 9px; margin-top: 28px; }
.login-form label { color: var(--muted); font-size: 13px; font-weight: 700; }
.login-form input { min-height:46px; border-color:#d5dada; border-radius:9px; background:#fafbfa; }
.login-form input:focus { outline:3px solid rgba(199,53,50,.13); border-color:var(--crm-red); background:#fff; }
.login-submit { min-height:46px; margin-top:14px; border:1px solid var(--crm-red); border-radius:9px; background:linear-gradient(180deg,#d9443f,var(--crm-red)); color:#fff; cursor:pointer; font-weight:800; box-shadow:0 8px 18px rgba(159,37,38,.22); transition:filter .14s ease,transform .14s ease; }
.login-submit:hover { filter:brightness(.96); transform:translateY(-1px); }
.login-submit:focus-visible { outline:3px solid rgba(199,53,50,.22); outline-offset:2px; }
.login-security-note { display:flex; gap:8px; align-items:center; margin:22px 0 0; color:#68757a; font-size:11px; }
.login-security-note span { color:var(--crm-red); font-size:8px; }
.alert { margin: 18px 0 0; padding: 11px 13px; border-radius: 9px; font-size: 13px; }
.alert-danger { background: var(--red-soft); color: #872f2f; }
.alert-warning { background: var(--amber-soft); color: #6e5208; }
.alert-success { background: var(--green-soft); color: #24633f; }
.update-actions-grid { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(500px, 1.6fr); gap: 24px; margin-bottom: 24px; }
.confirm-form { display: grid; gap: 16px; }
.confirmation { display: flex; gap: 9px; align-items: flex-start; color: var(--ink); font-size: 13px; }
.confirmation input { margin-top: 2px; }
.refresh-schedule-block { overflow:hidden; padding:0; border-radius:16px; }
.refresh-schedule-title { margin:0; padding:24px 24px 12px; align-items:center; }
.refresh-schedule-lead { max-width:850px; margin:0; padding:0 24px; color:var(--muted); font-size:14px; line-height:1.55; }
.refresh-schedule-meta { margin:8px 24px 0; color:#718087; font-size:11px; }
.refresh-schedule-block > .alert { margin:16px 24px 0; }
.refresh-schedule-form { display:grid; gap:18px; padding:20px 24px 24px; }
.refresh-schedule-switch { display:grid; grid-template-columns:auto minmax(0,1fr); gap:12px; align-items:center; padding:14px 16px; border:1px solid #d7e8de; border-radius:12px; background:#f4faf6; cursor:pointer; }
.refresh-schedule-switch input { width:18px; height:18px; margin:0; accent-color:var(--green); }
.refresh-schedule-switch strong,.refresh-schedule-switch small { display:block; }
.refresh-schedule-switch strong { font-size:14px; }
.refresh-schedule-switch small { margin-top:3px; color:var(--muted); font-size:11px; line-height:1.4; }
.refresh-schedule-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.refresh-schedule-card { min-width:0; padding:17px; border:1px solid var(--line); border-radius:13px; background:#fafbf9; }
.refresh-schedule-card header { display:flex; gap:11px; align-items:center; margin-bottom:16px; }
.refresh-schedule-card header strong,.refresh-schedule-card header small { display:block; }
.refresh-schedule-card header strong { font-size:15px; }
.refresh-schedule-card header small { margin-top:2px; color:var(--muted); font-size:11px; }
.refresh-service-mark { display:grid; flex:0 0 36px; width:36px; height:36px; place-items:center; border-radius:10px; background:#dceee4; color:#24633f; font-size:15px; font-weight:900; }
.refresh-service-mark-sirius { background:#e7edf4; color:#35536c; }
.refresh-schedule-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; }
.refresh-schedule-fields label { display:grid; min-width:0; gap:6px; color:var(--muted); font-size:11px; font-weight:750; }
.refresh-schedule-fields label > strong { display:flex; min-height:43px; align-items:center; padding:10px 11px; border:1px solid #d8dfdc; border-radius:9px; background:#fff; color:var(--ink); font-size:13px; }
.refresh-schedule-fields select { width:100%; min-width:0; min-height:43px; padding:9px 32px 9px 11px; border:1px solid #cbd7d2; border-radius:9px; background:#fff; color:var(--ink); font:inherit; font-size:13px; font-weight:700; }
.refresh-schedule-fields select:focus { outline:3px solid rgba(47,117,92,.16); border-color:var(--green); }
.refresh-custom-dates { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px 14px; align-items:center; margin-top:13px; padding:13px; border:1px solid #cfe0d6; border-radius:10px; background:#f2f8f4; }
.refresh-custom-dates[hidden] { display:none; }
.refresh-custom-dates > div:first-of-type strong,.refresh-custom-dates > div:first-of-type small { display:block; }
.refresh-custom-dates > div:first-of-type strong { font-size:12px; }
.refresh-custom-dates > div:first-of-type small { margin-top:3px; color:var(--muted); font-size:11px; line-height:1.4; }
.refresh-custom-dates-open { min-height:39px; padding:8px 12px; white-space:nowrap; }
.refresh-custom-dates.invalid { border-color:var(--red); box-shadow:0 0 0 2px var(--red-soft); }
.refresh-custom-dates-count { min-height:20px; margin:10px 0 0; color:var(--muted); font-size:12px; text-align:center; }
.refresh-custom-dates-dialog .date-picker-day.selected { box-shadow:inset 0 0 0 1px #fff; }
.refresh-schedule-note { display:grid; grid-template-columns:auto minmax(0,1fr); gap:5px 12px; padding:13px 15px; border-left:3px solid #9badb6; border-radius:8px; background:#f3f6f7; color:#53636a; font-size:12px; line-height:1.45; }
.refresh-schedule-note strong { color:var(--ink); }
.refresh-schedule-footer { display:flex; gap:18px; align-items:center; justify-content:space-between; padding-top:2px; }
.refresh-schedule-confirm { margin:0; line-height:1.45; }
.refresh-schedule-confirm input { flex:0 0 auto; width:17px; height:17px; accent-color:var(--green); }
.refresh-schedule-footer .primary-button { min-width:150px; }
.selection-actions { display: flex; gap: 14px; }
.text-button { padding: 0; border: 0; background: transparent; color: var(--blue); cursor: pointer; font-weight: 750; }
.category-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; max-height: 560px; overflow-y: auto; padding-right: 5px; }
.category-groups fieldset { min-width: 0; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 11px; }
.category-groups legend { padding: 0 5px; color: var(--navy); font-weight: 800; font-size: 13px; }
.category-check { display: flex; gap: 8px; padding: 7px 3px; font-size: 12px; }
.category-check input { flex: 0 0 auto; margin-top: 2px; }
.category-check strong, .category-check small { display: block; overflow-wrap: anywhere; }
.category-check small { margin-top: 2px; color: var(--muted); }
.progress-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin: 18px 0; }
.progress-step { padding: 10px; border: 1px solid var(--line); border-left: 4px solid #a6b5c5; border-radius: 8px; background: #fbfcfe; }
.progress-step span, .progress-step strong, .progress-step small { display: block; }
.progress-step span { color: var(--muted); font-size: 11px; }
.progress-step strong { margin-top: 3px; font-size: 12px; }
.progress-step small { margin-top: 4px; color: var(--red); }
.progress-success { border-left-color: var(--green); background: var(--green-soft); }
.progress-running { border-left-color: var(--blue); background: var(--blue-soft); }
.progress-failed { border-left-color: var(--red); background: var(--red-soft); }
.compact-progress-table table, .history-table table { width: 100%; border-collapse: collapse; font-size: 12px; }
.compact-progress-table th, .history-table th { padding: 10px; background: var(--navy); color: #fff; text-align: left; }
.compact-progress-table td, .history-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.status-success { background: var(--green-soft); color: var(--green); }
.status-failed, .status-ambiguous { background: var(--red-soft); color: var(--red); }
button:disabled { cursor: not-allowed; opacity: .55; }

.notice { margin: 14px 0; padding: 13px 15px; border-radius: 9px; font-size: 13px; line-height: 1.5; }
.notice-warning { border-left: 4px solid var(--amber); background: var(--amber-soft); color: #694a18; }
.quiet-button { min-height: 38px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); cursor: pointer; font-weight: 750; }
.filter-reset { display:inline-flex; align-items:center; justify-content:center; align-self:end; color:var(--muted); text-decoration:none; }
.price-control-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.price-control-summary a { padding: 13px; border: 1px solid var(--line); border-top: 4px solid #84928b; border-radius: 9px; background: #fff; color: inherit; text-decoration: none; box-shadow: 0 3px 10px rgba(40,50,56,.04); }
.price-control-summary span, .price-control-summary strong { display: block; }
.price-control-summary span { min-height: 32px; color: var(--muted); font-size: 11px; font-weight: 750; }
.price-control-summary strong { margin-top: 5px; font-size: 24px; }
.price-control-summary .summary-good { border-top-color: var(--green); }
.price-control-summary .summary-warning { border-top-color: var(--amber); }
.price-control-summary .summary-danger { border-top-color: var(--red); }
.price-control-filters { grid-template-columns: minmax(210px, 1.6fr) repeat(4, minmax(155px, 1fr)) 105px auto; }
.price-control-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin: 15px 0 12px; }
.price-control-toolbar > div:first-child span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.price-control-toolbar-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.price-control-list { display: grid; gap: 12px; }
.price-control-card { overflow: hidden; border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 11px; background: var(--surface); box-shadow: var(--shadow); }
.price-control-card-below_cost { border-left-color: var(--red); }
.price-control-card-missing_data { border-left-color: var(--amber); }
.price-control-card-no_change { border-left-color: #84928b; }
.price-control-product { display: grid; grid-template-columns: 90px minmax(260px, 1fr) minmax(260px, 1fr); gap: 16px; align-items: start; padding: 16px; border-bottom: 1px solid var(--line); }
.price-control-product small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; font-weight: 750; }
.price-control-product h2, .price-control-product h3 { margin: 0 0 8px; font-size: 14px; line-height: 1.4; }
.price-control-check { display: flex; gap: 7px; align-items: center; color: var(--green); font-size: 12px; font-weight: 800; cursor: pointer; }
.price-control-check input { width: 17px; height: 17px; accent-color: var(--green); }
.cost-value { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.cost-value strong { color: var(--ink); }
.price-control-state { display: inline-block; margin-top: 8px; padding: 5px 8px; border-radius: 7px; background: #eef1ef; color: var(--muted); font-size: 10px; font-weight: 800; }
.price-control-state-can_reduce { background: var(--green-soft); color: #245b3a; }
.price-control-state-below_cost { background: var(--red-soft); color: var(--red); }
.price-control-state-missing_data { background: var(--amber-soft); color: #725506; }
.price-control-prices { padding: 4px 16px 12px; }
.price-control-line { display: grid; grid-template-columns: 80px repeat(3, minmax(125px, .8fr)) minmax(220px, 1.3fr); gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid #edf0ee; font-size: 12px; }
.price-control-line:last-child { border-bottom: 0; }
.price-control-line > span small, .price-control-line label small { display: block; margin-bottom: 3px; color: var(--muted); font-size: 10px; }
.price-control-input { width: 100%; padding: 8px 9px; border: 1px solid #bdcbc4; border-radius: 7px; background: #fff; }
.price-control-result { padding: 8px 10px; border-radius: 7px; font-size: 11px; font-weight: 750; line-height: 1.35; }
.price-control-result-good { background: var(--green-soft); color: #245b3a; }
.price-control-result-warning { background: var(--amber-soft); color: #725506; }
.price-control-result-danger { background: var(--red-soft); color: var(--red); }
.price-control-result-muted { background: #eef1ef; color: var(--muted); }
.price-control-hint { grid-column: 2 / -1; color: var(--muted); font-size: 10px; }
.price-control-hint-consider { color: #245b3a; }
.price-control-hint-below_cost { color: var(--red); }
.price-preview-summary { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.price-preview-summary span { min-width: 190px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--muted); }
.price-preview-summary strong { display: block; margin-bottom: 3px; color: var(--ink); font-size: 22px; }
.price-preview-list { display: grid; gap: 14px; }
.price-preview-card { overflow: hidden; border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 11px; background: var(--surface); box-shadow: var(--shadow); }
.price-preview-products { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 16px; border-bottom: 1px solid var(--line); }
.price-preview-products small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.price-preview-products strong { line-height: 1.4; }
.price-preview-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.price-preview-table th, .price-preview-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.price-preview-table th { background: #eef1ef; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.price-preview-table tr:last-child td { border-bottom: 0; }
.price-preview-table tr.preview-warning { background: var(--amber-soft); }
.price-preview-table tr.preview-danger { background: var(--red-soft); }
.preview-warning-label { display: block; margin-top: 4px; color: var(--red); font-weight: 700; }
.price-preview-table tr.preview-warning .preview-warning-label { color: #725506; }
.price-preview-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.price-preview-footer p { margin: 0; color: var(--muted); }
.warehouse-heading { margin-bottom: 18px; }
.warehouse-tabs { gap: 2px 4px; margin-bottom: 16px; }
.warehouse-tabs a { padding: 9px 10px; font-size: 12px; }
.warehouse-filters { grid-template-columns: minmax(240px, 1.8fr) minmax(180px, 1.2fr) repeat(4, minmax(125px, .8fr)) auto; margin-top: 0; }
.warehouse-filters input[type="hidden"] { display: none; }
.warehouse-table-wrap { max-width: 100%; }
.warehouse-table { width: 100%; min-width: 860px; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
.warehouse-table th { padding: 11px 9px; background: var(--navy); color: #fff; text-align: left; line-height: 1.25; }
.warehouse-table td { padding: 10px 9px; border-bottom: 1px solid rgba(180,195,210,.55); vertical-align: top; line-height: 1.35; overflow-wrap: anywhere; }
.warehouse-table tbody tr:nth-child(even) { background: var(--pale-gray, #f7f9fb); }
.warehouse-table th:first-child { width: 28%; }
.warehouse-table .number-cell { text-align: right; white-space: nowrap; }
.warehouse-table-period { min-width:1080px; table-layout:auto; }
.warehouse-table-period th:first-child { width:30%; min-width:280px; }
.warehouse-table-period th:not(:first-child) { min-width:105px; }
.warehouse-period-guide { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:14px 0; }
.warehouse-period-guide article { padding:12px 14px; border:1px solid var(--line); border-left:4px solid var(--green); border-radius:9px; background:#fbfcfa; }
.warehouse-period-guide strong,.warehouse-period-guide span { display:block; }
.warehouse-period-guide strong { margin-bottom:4px; font-size:12px; }
.warehouse-period-guide span,.warehouse-movement-note { color:var(--muted); font-size:11px; line-height:1.45; }
.warehouse-movement-note { margin:12px 0 0; }
.warehouse-movement-note a { color:var(--green); font-weight:800; }
.warehouse-value-negative { color:#a62f2f; background:#fff2f2; font-weight:800; }
.warehouse-cost-warning { color:#76510a; background:#fff4df; font-weight:800; }
.warehouse-cell-note { display:block; margin-top:4px; white-space:normal; color:inherit; font-size:9px; font-weight:700; line-height:1.3; }
.warehouse-empty { margin-top: 12px; }
.warehouse-help { margin-top: 18px; }
.definition-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0 0; }
.definition-grid div { padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--background); }
.definition-grid dt { color: var(--navy); font-weight: 800; }
.definition-grid dd { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.period-switch { display: flex; gap: 6px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.period-switch a { padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight: 800; text-decoration: none; }
.period-switch a.active { background: var(--navy); color: #fff; }
.summary-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.summary-metric { min-height: 145px; padding: 15px; border: 1px solid var(--line); border-top: 4px solid var(--teal); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.summary-metric > span, .summary-metric small { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; }
.summary-metric strong { display: block; margin: 8px 0; font-size: 25px; line-height: 1.1; }
.summary-metric .metric-note { margin-top: 7px; color: #725506; }
.summary-tables { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.summary-list { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow); }
.summary-list h2 { margin-bottom: 12px; }
.summary-list ol { margin: 0; padding: 0; list-style-position: inside; }
.summary-list li { display: flex; justify-content: space-between; gap: 15px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.summary-list li span { min-width: 0; overflow-wrap: anywhere; }
.summary-list li strong { flex: 0 0 auto; }
.procurement-explanation { margin: 12px 0 16px; padding: 11px 14px; border-radius: 9px; background: var(--blue-soft); color: var(--muted); font-size: 13px; }
.procurement-filters { grid-template-columns: minmax(220px, 1.7fr) repeat(4, minmax(130px, 1fr)) auto; }
.procurement-table { width: 100%; min-width: 940px; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
.procurement-table th { position: sticky; top: 0; z-index: 2; padding: 10px 8px; background: var(--navy); color: #fff; text-align: left; }
.procurement-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.procurement-table th:first-child { width: 35%; }
.procurement-table td > small, .procurement-table td > strong { display: block; }
.procurement-table details { margin-top: 7px; }
.procurement-table summary { color: var(--blue); cursor: pointer; font-weight: 750; }
.procurement-detail { display: grid; gap: 7px; margin-top: 8px; padding: 10px; border-radius: 9px; background: var(--background); }
.procurement-action-form { display: grid; grid-template-columns: 120px minmax(220px, 1fr) 145px auto; gap: 8px; align-items: end; }
.procurement-action-form label { display: grid; gap: 3px; color: var(--muted); font-size: 11px; }
.procurement-action-form input, .procurement-action-form select { width: 100%; min-width: 0; padding: 7px; border: 1px solid var(--line); border-radius: 7px; }
.procurement-status { display: inline-block; padding: 4px 7px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.status-planned, .status-need { background: var(--blue-soft); color: var(--navy); }
.status-ordered { background: var(--amber-soft); color: #725506; }
.status-received { background: var(--green-soft); color: #24633f; }
.status-cancelled { background: var(--red-soft); color: #8e3030; }
.status-manual { background: #eee8ff; color: #56408a; }
.warning-text { color: #8b6204; }

/* Рабочий CRM-интерфейс: периоды, расчёт закупки и переходы с главной. */
[hidden] { display: none !important; }
.dashboard-metric-link { position: relative; color: inherit; text-decoration: none; transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease; }
.dashboard-metric-link:hover { transform: translateY(-2px); border-color: #b9c7c0; box-shadow: 0 9px 22px rgba(40,50,56,.11); }
.dashboard-metric-link em { display: block; margin-top: 13px; color: var(--green); font-size: 12px; font-style: normal; font-weight: 800; }
.crm-page-heading { margin-bottom: 22px; }
.dashboard-actions { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-bottom: 24px; }
.dashboard-actions > a { display: grid; grid-template-columns: 34px 1fr; gap: 3px 10px; align-items: center; min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: inherit; text-decoration: none; box-shadow: 0 3px 10px rgba(40,50,56,.045); transition: transform .14s ease,border-color .14s ease; }
.dashboard-actions > a:hover { transform: translateY(-2px); border-color: #aebdb6; }
.dashboard-actions > a > span:nth-child(2) { min-width: 0; }
.dashboard-actions strong,.dashboard-actions small { display: block; }
.dashboard-actions strong { font-size: 12px; }
.dashboard-actions small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.dashboard-actions em { grid-column: 2; color: var(--green); font-size: 10px; font-style: normal; font-weight: 800; }
.action-icon { grid-row: 1 / 3; display: grid; width: 32px; height: 32px; place-items: center; border-radius: 8px; background: #edf0ee; color: #48545a; font-weight: 900; }
.action-success { background: var(--green-soft); color: var(--green); }
.action-warning { background: var(--amber-soft); color: #805818; }
.action-danger { background: var(--red-soft); color: var(--red); }

.assortment-gap-filters { grid-template-columns: minmax(220px,1.5fr) minmax(190px,1fr) minmax(160px,.8fr) 110px auto auto; }
.reverse-gap-filters { grid-template-columns: minmax(220px,1.35fr) minmax(190px,1fr) minmax(145px,.7fr) minmax(160px,.8fr) 105px auto auto; }
.gap-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:0 0 18px; }
.gap-summary article { padding:16px 18px; border:1px solid var(--line); border-top:4px solid var(--green); border-radius:10px; background:var(--surface); box-shadow:var(--shadow); }
.gap-summary article.gap-summary-alert { border-top-color:var(--amber); }
.gap-summary span,.gap-summary strong,.gap-summary small { display:block; }
.gap-summary span,.gap-summary small { color:var(--muted); }
.gap-summary strong { margin:5px 0; font-size:28px; }
.category-counts-card { margin:14px 0 18px; border:1px solid var(--line); border-radius:10px; background:var(--surface); }
.category-counts-card > summary { padding:13px 16px; cursor:pointer; font-weight:800; }
.category-counts-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; padding:0 14px 14px; }
.category-counts-grid a { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:3px 10px; padding:10px; border-radius:8px; background:var(--background); color:inherit; text-decoration:none; }
.category-counts-grid span { overflow-wrap:anywhere; }
.category-counts-grid small { grid-column:1/-1; color:var(--muted); }
.assortment-gap-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.assortment-gap-card { padding: 16px; border: 1px solid var(--line); border-left: 5px solid var(--amber); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.assortment-gap-card.gap-definite { border-left-color: var(--red); }
.assortment-gap-card.gap-moysklad { border-left-color:var(--amber); }
.assortment-gap-card h2 { margin: 12px 0 4px; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.gap-heading,.gap-prices { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.gap-prices { margin: 13px 0; }
.gap-prices span,.gap-prices strong { display: block; }
.gap-prices span { color: var(--muted); font-size: 11px; }
.gap-prices strong { margin-top: 3px; color: var(--ink); font-size: 14px; }
.gap-candidate { padding: 11px; border-radius: 8px; background: var(--surface-soft); }
.gap-candidate small,.gap-candidate strong,.gap-candidate span { display: block; }
.gap-candidate small,.gap-candidate span { color: var(--muted); font-size: 10px; }
.gap-candidate strong { margin: 4px 0; font-size: 12px; }
.gap-identifiers { display:flex; flex-wrap:wrap; gap:8px 18px; color:var(--muted); font-size:11px; }
.gap-explanation { margin:12px 0 0; color:var(--muted); font-size:11px; }
.stock-pill { display:inline-block; padding:5px 8px; border-radius:999px; font-size:10px; font-weight:850; }
.stock-positive { background:var(--green-soft); color:var(--green); }
.stock-zero,.stock-negative { background:var(--red-soft); color:var(--red); }
.stock-unknown { background:var(--surface-soft); color:var(--muted); }
.status-pill { display: inline-block; padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 850; }
.status-danger { background: var(--red-soft); color: var(--red); }
.status-warning { background: var(--amber-soft); color: #76520d; }

.period-workspace { margin-bottom: 20px; padding: 18px; border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.quick-periods { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 15px; }
.quick-periods a { padding: 7px 12px; border: 1px solid var(--line); border-radius: 7px; background: #f9faf8; color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 800; }
.quick-periods a.active { border-color: var(--green); background: var(--green-soft); color: #235f45; }
.summary-period-form { display: grid; grid-template-columns: repeat(2, minmax(145px, .8fr)) minmax(190px, 1.1fr) repeat(2, minmax(145px, .8fr)) auto; gap: 11px; align-items: end; }
.summary-period-form label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 750; }
.summary-period-form input, .summary-period-form select { width: 100%; padding: 10px 11px; border: 1px solid #cbd4cf; border-radius: 7px; background: #fff; color: var(--ink); }
.summary-period-form input:focus, .summary-period-form select:focus { outline: 3px solid rgba(47,117,92,.14); border-color: var(--green); }
.comparison-period-note { margin: 13px 0 0; padding: 10px 12px; border-radius: 7px; background: #f4f6f3; color: var(--muted); font-size: 12px; }
.warehouse-period-tops { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-top:16px; }
.warehouse-period-comparison { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-top:12px; }
.warehouse-period-comparison article { padding:12px 14px; border-radius:9px; background:var(--background); }
.warehouse-period-comparison span,.warehouse-period-comparison strong,.warehouse-period-comparison small { display:block; }
.warehouse-period-comparison span,.warehouse-period-comparison small { color:var(--muted); }
.warehouse-period-comparison strong { margin:5px 0; font-size:20px; }
.warehouse-period-tops article { padding:14px 16px; border:1px solid var(--line); border-radius:10px; background:var(--surface); }
.warehouse-period-tops h3 { margin:0 0 10px; font-size:14px; }
.warehouse-period-tops ol { margin:0; padding-left:22px; }
.warehouse-period-tops li { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; padding:5px 0; }
.warehouse-period-tops li span { overflow-wrap:anywhere; }
.metric-action { display: inline-block; margin-top: 10px; color: var(--green); font-size: 12px; font-weight: 800; text-decoration: none; }

.procurement-formula-card { margin: 0 0 18px; padding: 18px; border: 1px solid #e3d2b5; border-left: 5px solid var(--amber); border-radius: 10px; background: #fffaf1; }
.procurement-formula-card h2 { margin-bottom: 7px; }
.procurement-formula-card > p { margin-bottom: 14px; color: var(--muted); font-size: 13px; }
.formula-title { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 13px; }
.formula-title span { font-size: 18px; font-weight: 800; }
.formula-title strong { color: #71501d; }
.formula-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.formula-steps > div { display: grid; grid-template-columns: 25px 1fr; gap: 3px 8px; padding: 12px; border: 1px solid #eadfc9; border-radius: 8px; background: rgba(255,255,255,.72); }
.formula-steps b { grid-row: 1 / 3; display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: var(--amber); color: #fff; font-size: 12px; }
.formula-steps span, .formula-steps small { display: block; }
.formula-steps span { color: #71501d; font-size: 12px; font-weight: 800; }
.formula-steps small { color: var(--muted); font-size: 11px; line-height: 1.4; }

.procurement-records { display: grid; gap: 10px; }
.procurement-record-header { position:sticky; top:0; z-index:3; display: grid; grid-template-columns: minmax(260px, 2.4fr) repeat(5, minmax(86px, .65fr)) minmax(130px, .8fr); gap: 14px; padding: 11px 16px; border-radius: 8px; background: var(--navy); color: #fff; font-size: 11px; font-weight: 800; box-shadow:0 5px 12px rgba(24,34,40,.12); }
.procurement-record { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); box-shadow: 0 3px 10px rgba(40,50,56,.045); }
.procurement-record[open] { border-color: #bdcbc4; box-shadow: 0 7px 18px rgba(40,50,56,.08); }
.procurement-record > summary { display: grid; grid-template-columns: minmax(260px, 2.4fr) repeat(5, minmax(86px, .65fr)) minmax(130px, .8fr); gap: 14px; align-items: center; padding: 14px 16px; cursor: pointer; list-style: none; }
.procurement-record > summary::-webkit-details-marker { display: none; }
.procurement-record > summary:hover { background: #f8faf7; }
.procurement-product strong, .procurement-product small, .procurement-product em { display: block; }
.procurement-product small { margin-top: 4px; color: var(--muted); }
.procurement-product em { margin-top: 4px; color: var(--red); font-size: 11px; font-style: normal; }
.procurement-record > summary > span:not(.procurement-product) { font-size: 13px; }
.procurement-record > summary > span:not(.procurement-product) small { display: block; margin-top: 4px; color: var(--green); font-size: 10px; font-weight: 800; }
.procurement-record-body { display: grid; grid-template-columns: minmax(360px, 1.2fr) minmax(460px, 1.5fr); gap: 18px; padding: 18px; border-top: 1px solid var(--line); background: #fafbf9; }
.calculation-breakdown { padding: 15px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.calculation-breakdown h3 { margin: 0 0 11px; font-size: 15px; }
.calculation-sales { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.calculation-sales div { padding: 9px; border-radius: 7px; background: var(--background); }
.calculation-sales span, .calculation-sales b { display: block; }
.calculation-sales span { color: var(--muted); font-size: 10px; }
.calculation-sales b { margin-top: 4px; color: var(--ink); font-size: 14px; }
.calculation-equation { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 0; padding: 11px; border-radius: 7px; background: var(--amber-soft); color: #694a18; font-size: 12px; line-height: 1.5; }
.calculation-equation span { min-width: 90px; }
.calculation-equation small, .calculation-equation strong { display: block; }
.calculation-result { padding: 7px 9px; border-radius: 6px; background: #fff; }
.success-note { color: #24633f; }
.procurement-decision-panel { min-width: 0; }
.procurement-decision-panel h3 { margin: 0 0 11px; font-size: 15px; }
.procurement-action-form { grid-template-columns: minmax(120px, .7fr) minmax(170px, .9fr) minmax(220px, 1.3fr) auto; }
.procurement-action-form button { min-width: 145px; }
.procurement-history-link, .history-link { display: inline-block; margin-top: 10px; color: var(--green); font-size: 12px; font-weight: 800; text-decoration: none; }

/* Компактное рабочее место аналитики: результаты слева, управление справа. */
.analytics-workspace { display:grid; grid-template-columns:minmax(0,1fr) minmax(285px,320px); gap:22px; align-items:start; }
.analytics-main { min-width:0; }
.analytics-control-panel { position:sticky; top:18px; display:grid; gap:14px; min-width:0; max-height:calc(100vh - 36px); max-height:calc(100dvh - 36px); padding-right:4px; overflow-x:hidden; overflow-y:auto; overscroll-behavior-y:contain; scrollbar-gutter:stable; scrollbar-width:thin; }
.analytics-control-card { min-width:0; padding:18px; border:1px solid var(--line); border-radius:13px; background:var(--surface); box-shadow:var(--shadow); }
.analytics-control-card h2 { margin:2px 0 8px; font-size:18px; line-height:1.25; overflow-wrap:anywhere; }
.analytics-control-card .quick-periods { margin:12px 0 15px; }
.analytics-control-card .quick-periods a { flex:1 1 104px; padding:7px 9px; text-align:center; }
.analytics-control-form { display:grid!important; grid-template-columns:1fr!important; gap:11px; align-items:stretch; margin:0!important; }
.analytics-control-form > label,.analytics-advanced-fields label { display:grid; gap:5px; min-width:0; color:var(--muted); font-size:11px; font-weight:750; }
.analytics-control-form input:not([type="hidden"]),.analytics-control-form select { width:100%; min-width:0; padding:10px 11px; border:1px solid #cbd4cf; border-radius:8px; background:#fff; color:var(--ink); }
.analytics-control-form input:focus,.analytics-control-form select:focus { outline:3px solid rgba(47,117,92,.14); border-color:var(--green); }
.analytics-control-form .primary-button,.analytics-control-form .secondary-button,.analytics-control-form .quiet-button { width:100%; min-width:0; text-align:center; }
.analytics-control-note { margin:12px 0 0; padding:10px 11px; border-radius:8px; background:var(--background); color:var(--muted); font-size:11px; line-height:1.45; }
.analytics-advanced { border:1px solid var(--line); border-radius:8px; background:#fafbf9; }
.analytics-advanced > summary { padding:10px 11px; cursor:pointer; color:var(--ink); font-size:11px; font-weight:800; list-style:none; }
.analytics-advanced > summary::-webkit-details-marker { display:none; }
.analytics-advanced > summary::after { content:'+'; float:right; color:var(--green); font-size:15px; line-height:1; }
.analytics-advanced[open] > summary::after { content:'−'; }
.analytics-advanced-fields { display:grid; gap:10px; padding:0 11px 11px; }
.analytics-explainer-card { margin:0 0 16px; border:1px solid var(--line); border-radius:10px; background:var(--surface); }
.analytics-explainer-card > summary { display:flex; justify-content:space-between; gap:14px; align-items:center; padding:13px 15px; cursor:pointer; color:var(--ink); font-size:14px; font-weight:850; list-style:none; }
.analytics-explainer-card > summary::-webkit-details-marker { display:none; }
.analytics-explainer-card > summary::after { content:'Показать'; margin-left:auto; color:var(--green); font-size:10px; font-weight:800; text-transform:uppercase; }
.analytics-explainer-card[open] > summary::after { content:'Скрыть'; }
.analytics-explainer-card > :not(summary) { margin-left:15px; margin-right:15px; }
.analytics-explainer-card > :last-child { margin-bottom:15px; }
.procurement-formula-card.analytics-explainer-card { padding:0; }
.procurement-formula-card.analytics-explainer-card > summary strong { color:#71501d; font-size:12px; }
.abc-explainer-card .abc-guide { margin-top:2px; }

.warehouse-view-switcher { display:flex; gap:6px; margin:0 0 10px; padding:5px; border:1px solid var(--line); border-radius:10px; background:var(--surface); overflow-x:auto; scrollbar-width:thin; }
.warehouse-view-switcher a { display:inline-flex; flex:1 1 0; min-width:max-content; min-height:38px; align-items:center; justify-content:center; padding:8px 13px; border-radius:7px; color:#4f5b60; text-decoration:none; font-size:12px; font-weight:800; }
.warehouse-view-switcher a:hover { background:var(--background); color:var(--crm-red-dark); }
.warehouse-view-switcher a.active { background:var(--crm-red); color:#fff; box-shadow:0 4px 10px rgba(159,37,38,.16); }
.warehouse-report-tabs { margin:0 0 18px; padding:0 4px 10px; border-bottom:1px solid var(--line); }
.warehouse-report-tabs nav { display:flex; flex-wrap:wrap; gap:7px; }
.warehouse-report-tabs a { display:inline-flex; min-height:32px; align-items:center; padding:6px 10px; border:1px solid transparent; border-radius:7px; background:var(--background); color:#4f5b60; text-decoration:none; font-size:11px; font-weight:800; }
.warehouse-report-tabs a:hover { border-color:#d4b0ae; background:#fff; color:var(--crm-red-dark); }
.warehouse-report-tabs a.active { border-color:#e7c2c0; background:var(--red-soft); color:var(--crm-red-dark); }
.warehouse-sort-summary { padding:3px 8px; border-radius:999px; background:var(--blue-soft); color:#315f50; font-weight:750; }

.employee-filter-card { margin:0 0 18px; padding:18px; border:1px solid var(--line); border-radius:12px; background:var(--surface); box-shadow:var(--shadow); }
.employee-date-form { display:grid; grid-template-columns:minmax(180px,260px) minmax(180px,260px) auto; gap:12px; align-items:end; }
.employee-date-form label { display:grid; gap:6px; color:var(--muted); font-size:11px; font-weight:800; }
.employee-date-form input { width:100%; min-height:42px; padding:9px 11px; border:1px solid #cbd4cf; border-radius:8px; background:#fff; color:var(--ink); }
.employee-date-form input:focus { outline:3px solid rgba(47,117,92,.14); border-color:var(--green); }
.employee-filter-card > p { margin:11px 0 0; color:var(--muted); font-size:11px; }
.employee-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:0 0 18px; }
.employee-summary article { padding:15px; border:1px solid var(--line); border-left:4px solid var(--green); border-radius:10px; background:var(--surface); box-shadow:var(--shadow); }
.employee-summary span,.employee-summary strong,.employee-summary small { display:block; }
.employee-summary span { min-height:30px; color:var(--muted); font-size:11px; font-weight:750; }
.employee-summary strong { margin:4px 0; font-size:24px; line-height:1.1; }
.employee-summary small { color:var(--muted); font-size:10px; line-height:1.4; }
.employee-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(360px,1fr)); gap:14px; }
.employee-card { min-width:0; padding:18px; border:1px solid var(--border); border-radius:12px; background:var(--surface); box-shadow:var(--shadow); }
.employee-card-idle { box-shadow:none; background:#fafbf9; }
.employee-card-heading { display:flex; align-items:center; gap:11px; padding-bottom:14px; border-bottom:1px solid var(--line); }
.employee-card-heading h2 { margin:0 0 4px; font-size:17px; }
.employee-avatar { display:grid; flex:0 0 40px; width:40px; height:40px; place-items:center; border-radius:10px; background:linear-gradient(135deg,#d74d47,var(--crm-red-dark)); color:#fff; font-size:16px; font-weight:900; box-shadow:0 5px 12px rgba(159,37,38,.17); }
.employee-status { display:inline-flex; padding:3px 7px; border-radius:999px; background:#eef0ef; color:var(--muted); font-size:9px; font-weight:850; text-transform:uppercase; }
.employee-status.is-active { background:var(--green-soft); color:#286543; }
.employee-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; margin:13px 0; }
.employee-metrics div { min-width:0; padding:10px; border-radius:8px; background:var(--surface-soft); }
.employee-metrics dt { min-height:27px; color:var(--muted); font-size:9px; font-weight:750; line-height:1.35; }
.employee-metrics dd { margin:3px 0 0; font-size:17px; font-weight:850; overflow-wrap:anywhere; }
.employee-operation-summary { display:flex; flex-wrap:wrap; gap:6px; margin:0 0 14px; }
.employee-operation-summary span { padding:5px 8px; border-radius:7px; background:var(--blue-soft); color:#315f50; font-size:10px; font-weight:750; }
.employee-operation-summary strong { margin-left:3px; }
.employee-activity-section h3 { margin:15px 0 5px; font-size:12px; }
.activity-list { list-style:none; padding:0; margin:0; display:grid; }
.activity-list li { display:grid; grid-template-columns:92px 1fr; gap:10px; align-items:start; padding:9px 0; border-bottom:1px solid var(--border); }
.activity-list li:last-child { border-bottom:0; }
.activity-time { color:var(--muted); font-size:10px; font-variant-numeric:tabular-nums; font-weight:750; }
.activity-list li div > strong { display:block; font-size:12px; }
.activity-list small { display:block; margin-top:3px; color:var(--muted); font-size:10px; }
.activity-list .activity-warning { color:#936119; font-weight:750; }
.employee-events { margin-top:11px; border-top:1px solid var(--line); }
.employee-events > summary { padding:12px 0 3px; cursor:pointer; color:var(--ink); font-size:12px; font-weight:850; list-style:none; }
.employee-events > summary::-webkit-details-marker { display:none; }
.employee-events > summary::after { content:'−'; float:right; color:var(--green); font-size:15px; }
.employee-events:not([open]) > summary::after { content:'+'; }
.employee-events > summary span { margin-left:4px; padding:2px 6px; border-radius:999px; background:var(--blue-soft); color:#315f50; font-size:9px; }
.employee-idle-note { margin:14px 0 0; color:var(--muted); font-size:11px; }

@media (max-width:980px) {
  .employee-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width:680px) {
  .employee-date-form,.employee-summary,.employee-grid { grid-template-columns:1fr; }
  .employee-date-form .primary-button { width:100%; }
  .employee-card { padding:15px; }
  .employee-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .employee-metrics div:last-child { grid-column:1/-1; }
  .activity-list li { grid-template-columns:78px 1fr; }
}

.abc-guide { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:0 0 18px; }
.abc-guide article { padding:15px; border:1px solid var(--line); border-left:5px solid #84928b; border-radius:10px; background:var(--surface); box-shadow:var(--shadow); }
.abc-guide strong { display:block; margin-bottom:5px; font-size:23px; }
.abc-guide span,.abc-guide small { display:block; }
.abc-guide span { font-weight:800; }
.abc-guide small { margin-top:5px; color:var(--muted); line-height:1.4; }
.abc-a { border-left-color:var(--green)!important; }
.abc-b { border-left-color:var(--amber)!important; }
.abc-c { border-left-color:var(--red)!important; }
.abc-summary { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; margin:16px 0; }
.abc-summary > * { padding:13px; border:1px solid var(--line); border-left:4px solid #84928b; border-radius:9px; background:var(--surface); color:inherit; text-decoration:none; }
.abc-summary span,.abc-summary strong { display:block; }
.abc-summary span { min-height:31px; color:var(--muted); font-size:11px; font-weight:750; }
.abc-summary strong { margin-top:5px; font-size:24px; }
.abc-filters { grid-template-columns:repeat(3,minmax(145px,1fr)); }
.abc-filters label { display:grid; gap:5px; color:var(--muted); font-size:11px; font-weight:750; }
.abc-table { width:100%; min-width:1180px; border-collapse:collapse; table-layout:fixed; font-size:12px; }
.abc-table th { padding:11px 9px; background:var(--navy); color:#fff; text-align:left; }
.abc-table td { padding:11px 9px; border-bottom:1px solid var(--line); vertical-align:top; overflow-wrap:anywhere; }
.abc-table th:nth-child(1) { width:9%; }.abc-table th:nth-child(2) { width:27%; }.abc-table th:nth-child(8) { width:19%; }
.abc-table td small,.abc-table td em { display:block; margin-top:5px; }
.abc-table td small { color:var(--muted); }.abc-table td em { color:#8b6204; font-style:normal; }
.abc-badge { display:inline-grid; place-items:center; min-width:43px; padding:6px 8px; border-radius:999px; font-weight:900; }
.abc-badge.abc-a { background:var(--green-soft); color:#24633f; }.abc-badge.abc-b { background:var(--amber-soft); color:#725506; }.abc-badge.abc-c { background:var(--red-soft); color:#8e3030; }
.abc-work-tabs { margin:16px 0; }
.abc-work-tabs a { font-size:12px; }
.abc-work-tabs a span { margin-left:4px; padding:2px 6px; border-radius:999px; background:var(--blue-soft); font-size:10px; }
.abc-transition { display:inline-block; margin-top:6px; padding:3px 6px; border-radius:6px; background:#eee8ff; color:#56408a; font-size:10px; }
.transfer-summary { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; margin:18px 0; }
.transfer-summary article { background:var(--surface); border:1px solid var(--border); border-top:4px solid var(--accent); border-radius:14px; padding:16px; }
.transfer-summary span { display:block; color:var(--muted); font-size:.82rem; }
.transfer-summary strong { display:block; margin-top:8px; font-size:1.55rem; }
.transfer-filters { grid-template-columns:repeat(4,minmax(170px,1fr)); }
.transfer-table small { display:block; color:var(--muted); margin-top:4px; }
.employee-chip { display:inline-block; background:#edf5ef; color:#25633d; border-radius:999px; padding:4px 8px; margin:2px; font-size:.82rem; }
.transfer-documents { margin-top:32px; }
.transfer-documents .section-heading { align-items:flex-end; margin-bottom:14px; }
.transfer-documents-table td:first-child { white-space:nowrap; }
.transfer-view-tabs { grid-column:1/-1; display:flex; gap:8px; flex-wrap:wrap; }
.transfer-view-tabs a { padding:10px 16px; border:1px solid var(--border); border-radius:10px; color:var(--muted); font-weight:700; text-decoration:none; background:var(--surface); }
.transfer-view-tabs a.active { color:#fff; background:var(--ink); border-color:var(--ink); }
@media (max-width:1100px) { .transfer-summary { grid-template-columns:repeat(2,minmax(0,1fr)); } .transfer-filters { grid-template-columns:repeat(2,minmax(170px,1fr)); } }

.notification-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.notification-summary a { padding:16px; border:1px solid var(--line); border-radius:10px; color:inherit; text-decoration:none; background:var(--surface); }
.notification-summary span,.notification-summary strong,.notification-summary small { display:block; }
.notification-summary span { color:var(--muted); font-size:12px; font-weight:800; }
.notification-summary strong { margin:7px 0; font-size:28px; }
.notification-summary small { color:var(--muted); line-height:1.4; }
.telegram-test-form { display:flex; flex-wrap:wrap; gap:14px; align-items:center; }
.telegram-test-form label { display:flex; gap:8px; align-items:center; font-weight:700; }
.notification-schedule-card { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-bottom:16px; }
.notification-schedule-card div { padding:14px; border:1px solid var(--line); border-radius:9px; background:var(--background); }
.notification-schedule-card strong,.notification-schedule-card span { display:block; }
.notification-schedule-card span { margin-top:4px; color:var(--muted); font-size:12px; line-height:1.45; }
.notification-divider { margin:20px 0; border:0; border-top:1px solid var(--line); }
.notification-tabs { margin:18px 0; }
.notification-list { display:grid; gap:10px; }
.notification-card { padding:16px; border:1px solid var(--line); border-left:5px solid var(--amber); border-radius:10px; background:var(--surface); }
.notification-card.notification-critical { border-left-color:var(--red); background:#fff8f7; }
.notification-title { display:flex; justify-content:space-between; gap:24px; align-items:flex-start; }
.notification-title h3 { margin:7px 0 4px; font-size:16px; }
.notification-title small { color:var(--muted); }
.notification-title > strong { max-width:290px; color:#873232; text-align:right; font-size:12px; }
.notification-badge { display:inline-block; padding:4px 8px; border-radius:999px; background:var(--amber-soft); color:#70520b; font-size:10px; font-weight:900; text-transform:uppercase; }
.notification-critical .notification-badge { background:var(--red-soft); color:#8e3030; }
.notification-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-top:14px; }
.notification-metrics div { padding:10px; border-radius:8px; background:rgba(255,255,255,.78); }
.notification-metrics span,.notification-metrics b { display:block; }
.notification-metrics span { color:var(--muted); font-size:10px; }
.notification-metrics b { margin-top:4px; font-size:13px; }

.price-history-summary { display:flex; justify-content:space-between; gap:16px; margin:18px 0 12px; color:var(--muted); }
.price-history-summary strong { color:var(--ink); font-size:18px; }
.price-history-table td { vertical-align:middle; }
.price-history-status { display:inline-flex; padding:6px 9px; border-radius:999px; background:var(--blue-soft); color:#275977; font-size:11px; font-weight:850; }
.price-history-status-stale { background:var(--amber-soft); color:#725506; }
.price-history-status-applied { background:var(--green-soft); color:#24633f; }
.price-history-status-failed { background:var(--red-soft); color:#8e3030; }
.price-history-warnings { display:flex; flex-wrap:wrap; gap:7px; margin:12px 0 0; }
.price-history-warnings span { padding:5px 8px; border-radius:7px; background:var(--amber-soft); color:#725506; font-size:11px; font-weight:750; }

.calendar-heading { align-items:center; }
.calendar-source-badge { min-width:220px; padding:13px 16px; border:1px solid var(--line); border-radius:10px; background:var(--surface); text-align:right; box-shadow:var(--shadow); }
.calendar-source-badge strong,.calendar-source-badge span { display:block; }
.calendar-source-badge span { margin-top:4px; color:#8a620c; font-size:11px; font-weight:750; }
.calendar-mock-notice { margin:18px 0; }
.calendar-toolbar { display:flex; justify-content:space-between; align-items:center; gap:18px; margin:18px 0 14px; }
.calendar-month-controls { display:flex; align-items:center; gap:10px; }
.calendar-month-controls h2 { min-width:210px; margin:0; text-align:center; text-transform:capitalize; }
.calendar-month-controls .secondary-button { display:inline-grid; place-items:center; min-width:42px; padding:10px 13px; text-decoration:none; }
.calendar-counters { display:flex; gap:8px; }
.calendar-counters span { padding:9px 12px; border:1px solid var(--line); border-radius:999px; background:var(--surface); color:var(--muted); font-size:12px; }
.calendar-counters strong { color:var(--ink); }
.calendar-layout { display:grid; grid-template-columns:minmax(640px,1.7fr) minmax(340px,.75fr); gap:18px; align-items:start; }
.calendar-board,.calendar-create-card,.calendar-day-agenda { border:1px solid var(--line); border-radius:12px; background:var(--surface); box-shadow:var(--shadow); overflow:hidden; }
.calendar-weekdays,.calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); }
.calendar-weekdays { background:var(--ink); color:#fff; }
.calendar-weekdays span { padding:10px; text-align:center; font-size:11px; font-weight:850; }
.calendar-day { min-height:118px; padding:9px; border-right:1px solid var(--line); border-bottom:1px solid var(--line); color:inherit; text-decoration:none; background:#fff; overflow:hidden; }
.calendar-day:nth-child(7n) { border-right:0; }
.calendar-day:hover { background:#f7faf7; }
.calendar-day-muted { background:#f5f6f4; color:#9aa29e; }
.calendar-day-selected { box-shadow:inset 0 0 0 2px var(--green); background:#f4faf6; }
.calendar-day-number { display:grid; place-items:center; width:27px; height:27px; border-radius:50%; font-size:12px; font-weight:850; }
.calendar-day-today .calendar-day-number { background:var(--green); color:#fff; }
.calendar-day-tasks { display:grid; gap:4px; margin-top:6px; }
.calendar-day-tasks > small { color:var(--muted); font-size:10px; }
.calendar-task-dot { display:block; padding:4px 6px; border-radius:5px; background:#e9f2ed; color:#285f40; font-size:10px; font-weight:750; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.calendar-priority-normal { background:var(--red-soft)!important; color:#8e3030!important; }
.calendar-priority-urgent { background:#eee2f5!important; color:#5f2778!important; }
.calendar-task-dot.completed { background:#fff!important; color:#68736e!important; opacity:1; text-decoration:line-through; border:1px solid var(--line); }
.calendar-side-panel { display:grid; gap:18px; }
.calendar-create-card,.calendar-day-agenda { padding:18px; }
.calendar-day-agenda-wide { margin-top:18px; overflow:visible; }
.calendar-create-card h2,.calendar-day-agenda h2 { margin:4px 0 14px; font-size:21px; }
.calendar-task-form { display:grid; gap:11px; }
.calendar-task-form label { display:grid; gap:5px; color:var(--muted); font-size:11px; font-weight:800; }
.calendar-task-form input,.calendar-task-form select,.calendar-task-form textarea { width:100%; padding:10px 11px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--ink); font-family:inherit; font-size:14px; font-weight:400; line-height:1.35; resize:vertical; }
.calendar-task-form input[type="date"],.calendar-task-form input[type="time"] { cursor:pointer; }
.calendar-task-form input::placeholder,.calendar-task-form textarea::placeholder { color:#8d9792; font-weight:400; opacity:1; }
.calendar-task-form input:focus,.calendar-task-form select:focus,.calendar-task-form textarea:focus { outline:2px solid rgba(45,135,93,.18); border-color:var(--green); }
.calendar-form-row { display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.calendar-agenda-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.calendar-assignee-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; margin:0 0 14px; }
.calendar-assignee-tab { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:44px; padding:9px 12px; border:1px solid var(--line); border-radius:9px; background:#fff; color:var(--ink); text-decoration:none; font-size:12px; font-weight:800; transition:border-color .15s ease,background .15s ease,box-shadow .15s ease; }
.calendar-assignee-tab:hover { border-color:#a9bbb1; background:#f7faf8; }
.calendar-assignee-tab.active { border-color:var(--green); background:#eef7f1; box-shadow:inset 0 -3px 0 var(--green); }
.calendar-assignee-tab strong { display:grid; place-items:center; min-width:25px; height:25px; padding:0 6px; border-radius:999px; background:var(--background); color:var(--muted); font-size:11px; }
.calendar-assignee-tab.active strong { background:var(--green); color:#fff; }
.calendar-agenda-item { padding:13px; border:1px solid var(--line); border-left:5px solid #7e9a8b; border-radius:9px; background:#fff; }
.calendar-agenda-item.completed { opacity:1; background:#fff; border-color:#d8dfdb; }
.calendar-agenda-item.completed h3 { text-decoration:line-through; }
.calendar-priority-border-normal { border-left-color:var(--red); }.calendar-priority-border-urgent { border-left-color:#7b3f92; }
.calendar-agenda-title { display:flex; justify-content:space-between; gap:10px; align-items:flex-start; }
.calendar-agenda-title time { color:var(--green); font-size:11px; font-weight:900; }
.calendar-agenda-title h3 { margin:3px 0 0; font-size:15px; line-height:1.35; }
.calendar-priority-label { flex:0 0 auto; padding:4px 7px; border-radius:999px; font-size:9px; font-weight:900; text-transform:uppercase; }
.calendar-assignee,.calendar-description { margin:8px 0 0; color:var(--muted); font-size:12px; line-height:1.45; }
.calendar-description { white-space:pre-wrap; }
.calendar-task-actions { display:flex; flex-wrap:wrap; gap:7px; align-items:flex-start; margin-top:12px; }
.calendar-task-actions button { padding:8px 10px; font-size:11px; }
.calendar-edit-details { position:relative; }
.calendar-edit-details > summary { padding:8px 10px; border:1px solid var(--line); border-radius:7px; cursor:pointer; color:var(--ink); font-size:11px; font-weight:800; list-style:none; }
.calendar-edit-details > summary::-webkit-details-marker { display:none; }
.calendar-edit-details[open] { flex:1 0 100%; }
.calendar-edit-details[open] > summary { margin-bottom:9px; background:var(--background); }
.calendar-task-form.compact { padding:12px; border-radius:8px; background:var(--background); }
.empty-state.compact { min-height:0; padding:24px 12px; }

@media (max-width: 1180px) {
  .analytics-workspace { grid-template-columns:1fr; }
  .analytics-main { grid-column:1; grid-row:2; }
  .analytics-control-panel { position:static; grid-column:1; grid-row:1; grid-template-columns:repeat(2,minmax(0,1fr)); max-height:none; padding-right:0; overflow:visible; overscroll-behavior-y:auto; scrollbar-gutter:auto; }
  .abc-analytics-workspace .analytics-control-panel { grid-template-columns:1fr; }
  .metric-grid-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters { grid-template-columns: 2fr 1fr 1fr; }
  .filters .compact-filter { grid-column: 1; }
  .warehouse-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .summary-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .procurement-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .summary-period-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .formula-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .procurement-record > summary { grid-template-columns: minmax(250px, 2fr) repeat(3, minmax(80px, .65fr)); }
  .procurement-record-header { display: none; }
  .procurement-record-body { grid-template-columns: 1fr; }
  .price-control-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .price-control-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .abc-guide,.abc-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .abc-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .dashboard-actions { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .assortment-gap-filters,.reverse-gap-filters { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .calendar-agenda-list { grid-template-columns:1fr; }
  .calendar-assignee-tabs { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

.sidebar-user {
  display: grid;
  gap: 2px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
}

.sidebar-user strong { color: #fff; }
.sidebar-user span { color: #aebbc1; font-size: 0.78rem; }

.user-admin-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.user-create-panel { position: sticky; top: 18px; }
.stacked-form, .inline-security-form { display: grid; gap: 12px; }
.stacked-form label, .user-profile-form label, .inline-security-form label {
  display: grid;
  gap: 6px;
  font-weight: 700;
  color: var(--text-muted);
}

.user-list { display: grid; gap: 14px; }
.user-card { display: grid; gap: 14px; }
.user-card > header, .user-card > footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.user-card h2 { margin: 0; }
.user-card.is-disabled { opacity: 0.72; }
.user-profile-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(150px, 220px) auto auto;
  gap: 12px;
  align-items: end;
}
.checkbox-line { display: flex !important; align-items: center; padding-bottom: 10px; }
.user-security-actions { border-top: 1px solid var(--border); padding-top: 10px; }
.user-security-actions summary { cursor: pointer; font-weight: 800; }
.inline-security-form {
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
  margin: 12px 0;
}
.user-card footer { color: var(--text-muted); font-size: 0.82rem; }

.audit-filter-panel .filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto auto;
  gap: 12px;
  align-items: end;
}
.audit-filter-panel label { display: grid; gap: 6px; font-weight: 700; }
.audit-table td small { display: block; margin-top: 4px; color: var(--text-muted); }

@media (max-width: 1100px) {
  .user-admin-layout { grid-template-columns: 1fr; }
  .user-create-panel { position: static; }
  .user-profile-form, .inline-security-form, .audit-filter-panel .filter-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .user-profile-form, .inline-security-form, .audit-filter-panel .filter-grid {
    grid-template-columns: 1fr;
  }
  .user-card > header, .user-card > footer { flex-direction: column; }
}

@media (max-width: 900px) {
  .login-shell { grid-template-columns:1fr; width:min(100%,560px); }
  .login-identity { min-height:235px; padding:30px; }
  .login-identity-copy { margin:38px 0 0; padding:0; }
  .login-identity-copy h1 { margin-bottom:0; font-size:29px; }
  .login-identity-copy > p:last-child,.login-identity::after { display:none; }
  .login-card { padding:38px 34px; }
}

@media (max-width: 760px) {
  .analytics-control-panel { grid-template-columns:1fr; }
  .analytics-control-card { padding:15px; }
  .analytics-explainer-card > summary { align-items:flex-start; flex-wrap:wrap; }
  .analytics-explainer-card > summary::after { width:100%; margin-left:0; }
  .warehouse-view-switcher a { flex:0 0 auto; }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 12px 0 30px rgba(0,0,0,.2); }
  .sidebar.open { transform: translateX(0); }
  .menu-open { overflow: hidden; }
  .menu-open .sidebar-backdrop { display: block; }
  .main-column { width:100%; margin-left: 0; }
  .mobile-header { display: flex; align-items: center; gap: 14px; height: 58px; padding: 0 18px; background: var(--navy); color: #fff; }
  .menu-button { border: 0; background: transparent; color: #fff; font-size: 22px; cursor: pointer; }
  .content { padding: 24px 16px 38px; }
  .crm-workspace-nav { margin-bottom:20px; }
  .crm-subnav { display:flex; flex-wrap:nowrap; width:calc(100vw - 32px); padding-bottom:5px; overflow-x:auto; scrollbar-width:thin; }
  .crm-subnav a { flex:0 0 auto; }
  .page-heading, .section-title { align-items: flex-start; flex-direction: column; }
  .review-product-card { flex-direction: column; }
  .review-product-actions { align-items: stretch; min-width: 0; }
  .freshness { width: 100%; min-width: 0; }
  .metric-grid-four, .two-column-grid, .outcome-list, .procurement-highlight { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr; }
  .update-actions-grid, .category-groups, .progress-grid { grid-template-columns: 1fr; }
  .warehouse-filters, .definition-grid { grid-template-columns: 1fr; }
  .summary-metrics, .summary-tables, .procurement-filters, .summary-period-form, .formula-steps { grid-template-columns: 1fr; }
  .procurement-record > summary { grid-template-columns: 1fr 1fr; }
  .procurement-record-title { grid-column: 1 / -1; }
  .procurement-record-body { grid-template-columns: 1fr; padding: 13px; }
  .procurement-action-form { grid-template-columns: 1fr; }
  .comparison-heading .download-button { width: 100%; }
  .price-control-toolbar { align-items: stretch; flex-direction: column; }
  .price-control-summary { grid-template-columns: 1fr 1fr; }
  .price-control-toolbar-actions { justify-content: stretch; }
  .price-control-toolbar-actions button { flex: 1 1 100%; }
  .price-control-product { grid-template-columns: 1fr; }
  .price-control-line { grid-template-columns: 1fr 1fr; }
  .price-control-line > strong, .price-control-result, .price-control-hint { grid-column: 1 / -1; }
  .price-preview-products { grid-template-columns: 1fr; }
  .manual-pair-search, .manual-pair-columns, .manual-pair-preview-grid { grid-template-columns:1fr; }
  .price-preview-footer { align-items: stretch; flex-direction: column; }
  .abc-guide,.abc-summary,.abc-filters { grid-template-columns:1fr; }
  .notification-summary,.notification-metrics,.notification-schedule-card { grid-template-columns:1fr; }
  .notification-title { flex-direction:column; gap:8px; }
  .notification-title > strong { max-width:none; text-align:left; }
  .dashboard-actions,.assortment-gap-grid,.assortment-gap-filters,.reverse-gap-filters,.gap-summary { grid-template-columns:1fr; }
  .category-counts-grid { grid-template-columns:1fr; }
  .warehouse-period-tops { grid-template-columns:1fr; }
  .warehouse-period-comparison { grid-template-columns:1fr; }
  .calendar-layout { grid-template-columns:1fr; }
  .calendar-toolbar,.calendar-heading { align-items:stretch; flex-direction:column; }
  .calendar-source-badge { text-align:left; }
  .calendar-month-controls { flex-wrap:wrap; }
  .calendar-month-controls h2 { order:-1; width:100%; text-align:left; }
  .calendar-day { min-height:78px; padding:5px; }
  .calendar-task-dot { max-width:70px; font-size:0; }
  .calendar-task-dot::before { content:'•'; font-size:16px; }
  .login-body { padding:14px; }
  .login-shell { min-height:0; border-radius:17px; }
  .login-identity { min-height:184px; padding:24px; }
  .login-identity-copy { margin-top:28px; }
  .login-identity-copy h1 { font-size:24px; }
  .login-card { padding:30px 24px; }
}

/* Profi history */
.profi-demand-overview { margin-bottom:18px; }
.profi-demand-overview .metric-card > strong { font-size:30px; }
.profi-demand-explainer { display:grid; grid-template-columns:auto minmax(0,1.25fr) minmax(0,1fr); gap:12px 18px; align-items:center; margin:0 0 24px; padding:15px 18px; border:1px solid #d7e8de; border-left:5px solid var(--green); border-radius:10px; background:#f3faf6; color:#3e5148; font-size:13px; line-height:1.5; }
.profi-demand-explainer strong { color:var(--ink); white-space:nowrap; }
.profi-demand-explainer b { color:#8e3030; }
.profi-demand-controls { padding-bottom:18px; }
.profi-demand-filters { grid-template-columns:minmax(240px,1.5fr) minmax(190px,1fr) minmax(150px,.8fr) minmax(190px,1fr) minmax(110px,.45fr) auto; }
.profi-demand-filters button { align-self:end; }
.profi-demand-layout { display:grid; gap:24px; }
.profi-demand-ranking { min-width:0; }
.profi-demand-table { width:100%; min-width:1080px; border-collapse:separate; border-spacing:0; font-size:12px; }
.profi-demand-table th { padding:10px 9px; background:var(--navy); color:#fff; text-align:left; line-height:1.3; }
.profi-demand-table th:first-child { border-radius:9px 0 0; }
.profi-demand-table th:last-child { border-radius:0 9px 0 0; }
.profi-demand-table td { padding:11px 9px; border-bottom:1px solid var(--line); vertical-align:middle; line-height:1.35; }
.profi-demand-table tbody tr { transition:background .15s ease,box-shadow .15s ease; }
.profi-demand-table tbody tr:hover { background:#f6faf7; }
.profi-demand-table tbody tr.is-selected { background:#edf7f0; box-shadow:inset 4px 0 var(--green); }
.profi-demand-table td:first-child { width:36px; color:var(--muted); font-weight:800; text-align:center; }
.profi-demand-table td:nth-child(n+4):nth-child(-n+6) { text-align:center; }
.profi-demand-table td small { display:block; margin-top:4px; color:var(--muted); font-size:10px; }
.profi-demand-product-link { display:block; min-width:250px; color:var(--ink); text-decoration:none; }
.profi-demand-product-link:hover strong { color:var(--green); text-decoration:underline; }
.profi-demand-signal { display:inline-flex; align-items:center; justify-content:center; min-width:78px; padding:5px 8px; border-radius:999px; font-size:10px; font-weight:900; letter-spacing:.02em; }
.profi-demand-signal.signal-strong { background:#f4caca; color:#8e3030; }
.profi-demand-signal.signal-medium { background:#ffe9a3; color:#7f5a06; }
.profi-demand-signal.signal-weak { background:#dce9f0; color:#3e6171; }
.profi-demand-signal.signal-none { background:#edf0ee; color:#64716b; }
.profi-demand-signal.signal-insufficient { background:#f0edf5; color:#655873; }
.profi-demand-product { min-width:0; padding:20px; border:1px solid var(--line); border-radius:12px; background:#fcfcfa; box-shadow:0 8px 24px rgba(24,48,37,.06); }
.profi-demand-product-heading { display:flex; justify-content:space-between; gap:20px; align-items:flex-start; margin-bottom:16px; }
.profi-demand-product-heading h2 { margin:2px 0 5px; font-size:21px; line-height:1.25; }
.profi-demand-product-heading p { margin:0; color:var(--muted); font-size:12px; }
.profi-demand-product-metrics { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; margin-bottom:18px; }
.profi-demand-product-metrics > div { display:grid; gap:5px; padding:11px 12px; border-radius:9px; background:var(--surface-soft); }
.profi-demand-product-metrics span { color:var(--muted); font-size:10px; font-weight:700; }
.profi-demand-product-metrics strong { font-size:18px; }
.profi-demand-timeline { min-width:0; margin:0; }
.profi-demand-timeline figcaption { display:grid; gap:4px; margin-bottom:10px; }
.profi-demand-timeline figcaption strong { font-size:16px; }
.profi-demand-timeline figcaption span { color:var(--muted); font-size:12px; }
.profi-demand-timeline-scroll { overflow-x:auto; border:1px solid var(--line); border-radius:10px; background:#fff; }
.profi-demand-timeline-canvas { min-width:680px; min-height:350px; }
.profi-demand-timeline-svg { display:block; width:100%; height:auto; min-height:350px; }
.profi-demand-timeline-svg text { fill:var(--muted); font-family:Inter,"Segoe UI",Arial,sans-serif; font-size:11px; }
.profi-demand-timeline-svg .demand-lane-label { fill:var(--ink); font-weight:800; }
.profi-demand-timeline-svg .demand-lane { stroke:#e4e8e5; stroke-width:1; }
.profi-demand-timeline-svg .demand-path { fill:none; stroke:#90a29a; stroke-width:3; }
.profi-demand-timeline-svg .demand-path-gap { stroke-dasharray:5 5; opacity:.62; }
.profi-demand-timeline-svg .demand-point { stroke:#fff; stroke-width:3; cursor:pointer; outline:none; }
.profi-demand-timeline-svg .demand-hit { fill:transparent; cursor:pointer; }
.profi-demand-timeline-svg .demand-hit:focus-visible { fill:rgba(24,48,37,.09); stroke:var(--ink); stroke-width:2; outline:none; }
.profi-demand-timeline-svg .demand-point.is-active { stroke:var(--ink); stroke-width:4; }
.profi-demand-timeline-svg .status-many { fill:#2f755c; }
.profi-demand-timeline-svg .status-sufficient { fill:#69a77f; }
.profi-demand-timeline-svg .status-low { fill:#dca342; }
.profi-demand-timeline-svg .status-out_of_stock { fill:#c85b59; }
.profi-demand-timeline-svg .status-not_observed,.profi-demand-timeline-svg .status-not_yet_seen,.profi-demand-timeline-svg .status-unknown { fill:#a9b1ad; }
.profi-demand-event-detail,.profi-demand-matrix-detail { display:grid; grid-template-columns:minmax(230px,1.2fr) minmax(360px,1fr); gap:18px; align-items:center; margin-top:12px; padding:14px 16px; border-radius:10px; background:var(--navy); color:#fff; }
.profi-demand-event-detail > div,.profi-demand-matrix-detail > div { display:grid; gap:5px; }
.profi-demand-event-detail > div > span,.profi-demand-matrix-detail > div > span { color:#b9cdc3; font-size:11px; }
.profi-demand-event-detail > div > strong,.profi-demand-matrix-detail > div > strong { line-height:1.4; }
.profi-demand-event-detail dl,.profi-demand-matrix-detail dl { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin:0; }
.profi-demand-event-detail dl div,.profi-demand-matrix-detail dl div { display:grid; gap:3px; }
.profi-demand-event-detail dt,.profi-demand-matrix-detail dt { color:#b9cdc3; font-size:9px; font-weight:700; text-transform:uppercase; }
.profi-demand-event-detail dd,.profi-demand-matrix-detail dd { margin:0; font-size:12px; font-weight:800; }
.profi-demand-matrix-table { width:100%; min-width:980px; border-collapse:separate; border-spacing:4px; font-size:11px; }
.profi-demand-matrix-table th { min-width:108px; padding:7px; color:var(--muted); text-align:center; vertical-align:bottom; }
.profi-demand-matrix-table th:first-child { position:sticky; left:0; z-index:2; min-width:240px; background:var(--surface); color:var(--ink); text-align:left; }
.profi-demand-matrix-table th small { display:block; margin-top:4px; font-size:9px; font-weight:500; }
.profi-demand-matrix-table tbody th { vertical-align:middle; }
.profi-demand-matrix-table tbody th a { color:var(--ink); text-decoration:none; }
.profi-demand-matrix-table tbody th a:hover { color:var(--green); text-decoration:underline; }
.profi-demand-matrix-table td { padding:0; }
.profi-demand-matrix-cell { position:relative; display:flex; min-height:48px; padding:6px; align-items:center; justify-content:center; border:2px solid transparent; border-radius:8px; color:inherit; text-align:center; text-decoration:none; transition:transform .12s ease,border-color .12s ease; }
.profi-demand-matrix-cell:hover,.profi-demand-matrix-cell:focus-visible,.profi-demand-matrix-cell.is-selected { z-index:1; border-color:var(--ink); transform:translateY(-1px); outline:none; }
.profi-demand-matrix-cell span { font-size:10px; font-weight:900; }
.profi-demand-matrix-cell i { position:absolute; top:5px; right:5px; width:7px; height:7px; border:2px solid currentColor; border-radius:50%; background:#fff; }
.profi-demand-matrix-cell.matrix-many { background:#bfe0ca; color:#185139; }
.profi-demand-matrix-cell.matrix-sufficient { background:#d7ecde; color:#2b6948; }
.profi-demand-matrix-cell.matrix-low { background:#ffe8a0; color:#725506; }
.profi-demand-matrix-cell.matrix-out_of_stock { background:#f3c8c6; color:#842d2d; }
.profi-demand-matrix-cell.matrix-not_observed,.profi-demand-matrix-cell.matrix-not_yet_seen,.profi-demand-matrix-cell.matrix-unknown { background:#edf0ee; color:#68736e; }
.profi-demand-matrix-detail { grid-template-columns:minmax(230px,1.2fr) minmax(360px,1fr) auto; }
.profi-demand-matrix-detail .secondary-button { white-space:nowrap; }
.profi-demand-technical { padding:0; overflow:hidden; }
.profi-demand-technical > summary { display:flex; justify-content:space-between; gap:18px; padding:18px 20px; cursor:pointer; list-style-position:inside; color:var(--ink); font-weight:900; }
.profi-demand-technical > summary small { color:var(--muted); font-size:11px; font-weight:500; }
.profi-demand-technical[open] > summary { border-bottom:1px solid var(--line); background:var(--surface-soft); }
.profi-demand-technical-body { display:grid; gap:28px; padding:20px; }
.availability-unknown { background:#edf0ee; color:#64716b; }
.profi-history-overview,.profi-history-comparison { margin-bottom:24px; }
.profi-history-overview .metric-card > strong { font-size:22px; line-height:1.2; }
.profi-history-controls { padding-bottom:18px; }
.profi-run-filters { grid-template-columns:minmax(320px,2fr) minmax(220px,1fr) minmax(120px,.45fr) auto; }
.profi-run-filters button { align-self:end; }
.profi-run-summary { margin:18px 0 12px; }
.profi-run-meta { margin:0 0 16px; padding:11px 13px; border-radius:8px; background:var(--surface-soft); color:var(--muted); font-size:12px; line-height:1.5; }
.profi-run-status { font-size:22px!important; }
.profi-history-filters { grid-template-columns:minmax(250px,1.45fr) minmax(250px,1.45fr) minmax(180px,1fr) minmax(180px,1fr); }
.profi-history-filters label:nth-child(5) { grid-column:span 2; }
.profi-history-filters button { align-self:end; }
.profi-history-scope-note { margin:14px 0 0; padding:12px 14px; border-left:4px solid var(--green); border-radius:8px; background:var(--blue-soft); color:#40534a; font-size:13px; line-height:1.45; }
.profi-history-chart-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
.profi-history-chart { min-width:0; margin:0; }
.profi-history-chart figcaption { display:grid; gap:4px; margin-bottom:12px; }
.profi-history-chart figcaption strong { font-size:16px; }
.profi-history-chart figcaption span { color:var(--muted); font-size:12px; }
.profi-history-chart-canvas { min-height:300px; border:1px solid var(--line); border-radius:10px; background:#fcfcfa; overflow:hidden; }
.profi-history-chart-svg { display:block; width:100%; height:auto; min-height:300px; }
.profi-history-chart-svg text { fill:var(--muted); font-family:Inter,"Segoe UI",Arial,sans-serif; font-size:11px; }
.profi-history-chart-svg .history-axis-label-strong { fill:var(--ink); font-weight:800; }
.profi-history-chart-svg .history-grid-line { stroke:#e4e8e5; stroke-width:1; }
.profi-history-chart-svg .history-axis-line { stroke:#aeb9b3; stroke-width:1; }
.profi-history-chart-svg .history-segment-low { fill:#dca342; }
.profi-history-chart-svg .history-segment-sufficient { fill:#69a77f; }
.profi-history-chart-svg .history-segment-many { fill:#2f755c; }
.profi-history-chart-svg .history-segment-out { fill:#c85b59; }
.profi-history-chart-svg .history-segment-unknown { fill:#a9b1ad; }
.profi-history-chart-svg .history-line-retail { fill:none; stroke:#55747f; stroke-width:3; }
.profi-history-chart-svg .history-line-wholesale { fill:none; stroke:#b87524; stroke-width:3; }
.profi-history-chart-svg .history-line-availability { fill:none; stroke:#b44343; stroke-width:3; }
.profi-history-chart-svg .history-point-retail { fill:#55747f; }
.profi-history-chart-svg .history-point-wholesale { fill:#b87524; }
.profi-history-chart-svg .history-point-availability { fill:#b44343; }
.profi-history-chart-svg .history-partial-marker { fill:#fff; stroke:var(--amber); stroke-width:2; }
.profi-history-legend { display:flex; flex-wrap:wrap; gap:8px 15px; margin-top:10px; color:var(--muted); font-size:11px; }
.profi-history-legend span { display:inline-flex; align-items:center; gap:6px; }
.profi-history-legend span::before { content:""; width:10px; height:10px; border-radius:3px; background:#a9b1ad; }
.profi-history-legend .legend-low::before { background:#dca342; }
.profi-history-legend .legend-sufficient::before { background:#69a77f; }
.profi-history-legend .legend-many::before { background:#2f755c; }
.profi-history-legend .legend-out::before { background:#c85b59; }
.profi-history-legend .legend-retail::before { background:#55747f; }
.profi-history-legend .legend-wholesale::before { background:#b87524; }
.profi-history-legend .legend-availability::before { background:#b44343; }
.profi-history-exact-values,.profi-history-raw { margin-top:20px; }
.profi-history-exact-values > summary,.profi-history-raw > summary { width:fit-content; margin-bottom:12px; color:var(--blue); cursor:pointer; font-size:13px; font-weight:800; }
.profi-history-generation-table,.profi-history-product-table,.profi-history-raw-table,.profi-history-comparison-table,.profi-run-results-table { width:100%; border-collapse:collapse; font-size:12px; }
.profi-history-generation-table { min-width:940px; }
.profi-history-product-table { min-width:860px; }
.profi-history-raw-table { min-width:800px; }
.profi-history-comparison-table { min-width:1260px; }
.profi-run-results-table { min-width:940px; }
.profi-history-generation-table th,.profi-history-product-table th,.profi-history-raw-table th,.profi-history-comparison-table th,.profi-run-results-table th { padding:11px 10px; background:var(--navy); color:#fff; text-align:left; line-height:1.3; }
.profi-history-generation-table td,.profi-history-product-table td,.profi-history-raw-table td,.profi-history-comparison-table td,.profi-run-results-table td { padding:11px 10px; border-bottom:1px solid var(--line); vertical-align:top; line-height:1.4; }
.profi-history-generation-table td small,.profi-history-product-table td small,.profi-history-comparison-table td small,.profi-run-results-table td small { display:block; margin-top:4px; color:var(--muted); }
.profi-history-product .section-title { align-items:flex-start; }
.profi-history-transition-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.profi-history-transition-list div { display:flex; justify-content:space-between; gap:12px; padding:12px 14px; border-radius:8px; background:var(--surface-soft); }
.profi-history-transition-list span { color:var(--muted); }
.profi-history-change-labels { display:flex; flex-wrap:wrap; gap:5px; }
.profi-history-change-labels span,.profi-presence-not-observed,.profi-presence-not-yet { display:inline-block; padding:4px 7px; border-radius:7px; background:var(--amber-soft); color:#725506; font-size:10px; font-weight:800; line-height:1.35; }
.profi-presence-not-observed { background:var(--red-soft); color:#8e3030; }
.profi-presence-not-yet { background:#edf0ee; color:#64716b; }
.profi-history-row-new { background:#f3faf5; }
.profi-history-row-missing { background:#fff8f2; }
.profi-history-results .pagination { margin-top:16px; }

@media (max-width:1180px) {
  .profi-demand-explainer { grid-template-columns:1fr; }
  .profi-demand-explainer strong { white-space:normal; }
  .profi-demand-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .profi-demand-product-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .profi-demand-event-detail,.profi-demand-matrix-detail { grid-template-columns:1fr; }
  .profi-run-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .profi-history-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .profi-history-filters label:nth-child(5) { grid-column:auto; }
  .profi-history-chart-grid { grid-template-columns:1fr; }
  .profi-history-transition-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width:760px) {
  .profi-demand-filters,.profi-demand-product-metrics { grid-template-columns:1fr; }
  .profi-demand-product { padding:15px; }
  .profi-demand-product-heading { flex-direction:column; }
  .profi-demand-timeline-canvas,.profi-demand-timeline-svg { min-height:310px; }
  .profi-demand-event-detail dl,.profi-demand-matrix-detail dl { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .profi-demand-technical > summary { align-items:flex-start; flex-direction:column; }
  .profi-run-filters,.profi-history-filters,.profi-history-transition-list { grid-template-columns:1fr; }
  .profi-history-chart-canvas,.profi-history-chart-svg { min-height:260px; }
}

/* Public OAuth information and privacy pages. Keep these isolated from the cabinet shell. */
.public-info-body { min-height:100vh; margin:0; background:#f3f5f2; color:var(--ink); }
.public-info-header { display:flex; width:min(1120px,calc(100% - 40px)); margin:0 auto; padding:24px 0; align-items:center; justify-content:space-between; gap:24px; }
.public-info-brand { display:inline-flex; align-items:center; gap:11px; color:var(--ink); text-decoration:none; }
.public-info-brand > span:last-child { display:grid; gap:1px; }
.public-info-brand strong { font-size:17px; }
.public-info-brand small { color:var(--muted); font-size:10px; letter-spacing:.04em; text-transform:uppercase; }
.public-info-header nav { display:flex; align-items:center; gap:8px; }
.public-info-header nav a { padding:9px 12px; border-radius:8px; color:var(--muted); font-size:13px; font-weight:800; text-decoration:none; }
.public-info-header nav a:hover,.public-info-header nav a:focus-visible { background:#e7ebe7; color:var(--ink); outline:none; }
.public-info-header nav .public-login-link { border:1px solid var(--line-strong); background:#fff; color:var(--ink); }
.public-info-main { display:grid; width:min(1120px,calc(100% - 40px)); margin:0 auto; gap:24px; }
.public-info-hero,.public-policy { border:1px solid var(--line); border-radius:18px; background:#fff; box-shadow:0 14px 40px rgba(24,42,34,.06); }
.public-info-hero { padding:clamp(32px,7vw,76px); background:linear-gradient(135deg,#fff 0%,#f5faf6 62%,#e7f3eb 100%); }
.public-info-hero h1 { max-width:760px; margin:8px 0 18px; font-size:clamp(34px,5vw,64px); line-height:1.02; letter-spacing:-.045em; }
.public-info-hero > p:not(.eyebrow) { max-width:690px; margin:0 0 28px; color:var(--muted); font-size:17px; line-height:1.65; }
.public-info-hero .primary-button { display:inline-flex; width:auto; text-decoration:none; }
.public-policy a { color:#176c4d; font-weight:800; }
.public-info-footer { display:flex; width:min(1120px,calc(100% - 40px)); margin:0 auto; padding:28px 0 38px; justify-content:space-between; gap:20px; color:var(--muted); font-size:12px; }
.public-policy { padding:clamp(28px,6vw,64px); }
.public-policy-heading { max-width:760px; margin-bottom:44px; }
.public-policy-heading h1 { margin:8px 0 14px; font-size:clamp(32px,5vw,54px); line-height:1.05; letter-spacing:-.04em; }
.public-policy-heading > p:last-child { color:var(--muted); }
.public-policy section { max-width:820px; padding:24px 0; border-top:1px solid var(--line); }
.public-policy section h2 { margin:0 0 10px; font-size:20px; }
.public-policy section p { margin:0 0 10px; color:#425049; font-size:15px; line-height:1.72; }
.public-policy section p:last-child { margin-bottom:0; }
.public-policy-back { margin:30px 0 0; }

@media (max-width:760px) {
  .public-info-header { align-items:flex-start; flex-direction:column; }
  .public-info-header nav { width:100%; flex-wrap:wrap; }
  .public-info-header nav a { flex:1 1 auto; text-align:center; }
  .public-info-footer { flex-direction:column; }
}

@media (max-width:760px) {
  .refresh-schedule-title { padding:20px 18px 10px; flex-direction:row; align-items:center; }
  .refresh-schedule-title h2 { font-size:19px; }
  .refresh-schedule-lead { padding:0 18px; font-size:13px; }
  .refresh-schedule-meta { margin:8px 18px 0; line-height:1.45; }
  .refresh-schedule-block > .alert { margin:14px 18px 0; }
  .refresh-schedule-form { padding:18px; }
  .refresh-schedule-grid { grid-template-columns:1fr; }
  .refresh-schedule-footer { align-items:stretch; flex-direction:column; gap:13px; }
  .refresh-schedule-footer .primary-button { width:100%; }
}

@media (max-width:460px) {
  .refresh-schedule-title { align-items:flex-start; }
  .refresh-schedule-fields { grid-template-columns:1fr; }
  .refresh-custom-dates { grid-template-columns:1fr; }
  .refresh-custom-dates-open { width:100%; }
  .refresh-schedule-note { grid-template-columns:1fr; }
}
