/* Refero handoff 2026-10-28. Presentation only; print/PDF documents keep their layout. */
@media screen {
  :root {
    --glass-ink: #25313d; --glass-muted: #697582; --glass-line: #dce3e9;
    --glass-paper: linear-gradient(150deg,#fff,#f8fafc);
    --glass-shadow: inset 0 1px 0 #fff, 0 0 0 1px #dce3e8, 0 7px 22px #253f5110, 0 1px 3px #253f5108;
  }
  body.crm-glass {
    font-family: Manrope, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.5;
    color: var(--glass-ink); background: radial-gradient(ellipse at 90% 0%,#f8fbf5 0,#edf1f4 60%);
    --ink: #25313d; --muted: #697582; --line: #dce3e9; --surface: #fff;
    --accent: #527c35; --accent-dark: #355820; --accent-soft: #eaf3e0;
    --green: #527c35; --brand-green: #85c83f; --rail: #353e48;
    --shadow: var(--glass-shadow);
  }
  .crm-glass button, .crm-glass input, .crm-glass select, .crm-glass textarea { font-family: inherit; }
  .crm-glass .mono, .crm-glass .amount { font-family: inherit; font-variant-numeric: tabular-nums; }
  .crm-glass button, .crm-glass .input, .crm-glass select, .crm-glass textarea { transition: background .18s, border-color .18s, box-shadow .18s, transform .18s; }
  body.crm-glass:not([data-ui-primitives="v1"]) :is(input,select,textarea,
  button,a):focus-visible { outline: 2px solid #8198aa; outline-offset: 3px; }
  .crm-glass .app-rail { width: 108px; padding: 16px 10px 0; background: linear-gradient(165deg,rgba(61,75,88,.84),rgba(45,59,72,.82)); color: #f3f6f8; border-right: 1px solid #ffffff4d; box-shadow: inset -1px 0 #ffffff16,6px 0 20px #2338490d; backdrop-filter: blur(18px) saturate(125%); -webkit-backdrop-filter: blur(18px) saturate(125%); overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; }
  .crm-glass .brand { width: 82px; height: 88px; flex-shrink: 0; margin: 0 0 24px; padding: 6px; border: 1px solid #ffffffab; border-radius: 11px; background: #fffffff2; box-shadow: 0 2px 10px #1f34491c; }
  .crm-glass .brand img { display: block; width: 100%; height: 100%; object-fit: contain; }
  .crm-glass .rail-button { width: 88px; min-height: 76px; flex-shrink: 0; border-radius: 13px; padding: 12px 4px; margin-bottom: 10px; color: #f3f6f8; font-size: 13px; }
  .crm-glass .rail-symbol { color: inherit; font-size: 26px; line-height: 29px; margin-bottom: 5px; }
  .crm-glass .app-rail .rail-symbol svg { width: 28px; height: 28px; margin: 0 auto; }
  .crm-glass .rail-button:hover { color: #fff; background: #46525f; }
  .crm-glass .rail-button.active { background: linear-gradient(135deg,#b4ed7d,#8bd14c); color: #243c1c; box-shadow: inset 0 1px 0 #dcf7bf,0 4px 16px #93d34b28; }
  .crm-glass .rail-button.active .rail-symbol { color: inherit; }
  .crm-glass .rail-button.active::before { display: none; }
  .crm-glass .rail-bottom small { color: #c1ccd7; font-size: 11px; }
  .crm-glass .rail-bottom .avatar { background: #4a5664; color: #f4f7fa; font-size: 12px; }
  .crm-glass .workspace { margin-left: 108px; }
  .crm-glass .app-header { min-height: 77px; padding: 0 26px; }
  .crm-glass .app-header, .crm-glass .workspace-tabs { background: linear-gradient(180deg,#fff,#f7f9fb); border-color: #dbe3e9; box-shadow: inset 0 1px 0 #fff; }
  .crm-glass .workspace-title { color: #25313d; font-size: 18px; font-weight: 800; }
  .crm-glass .workspace-title strong { font-size: 14px; font-weight: 500; }
  .crm-glass .workspace-tabs { min-height: 57px; padding: 0 26px; }
  .crm-glass .workspace-tabs > button { font-size: 14px; font-weight: 650; color: #697582; }
  .crm-glass .workspace-tabs > button.active { color: #527c35; }
  .crm-glass .workspace-tabs > button.active::after { background: #85c83f; height: 3px; border-radius: 3px; }
  .crm-glass .demo-user-picker { display: flex; flex-direction: column-reverse; gap: 1px; }
  .crm-glass .demo-user-picker .input { appearance: none; -webkit-appearance: none; border: 0; background: transparent; background-image: none; box-shadow: none; width: 225px; height: auto; min-height: 26px; padding: 0; font-size: 16px; font-weight: 650; color: #344552; opacity: 1; }
  .crm-glass .server-session-label { font-size: 14px; color: #697582; }
  .crm-glass #server-logout { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 14px; background: linear-gradient(180deg,#fff,#f3f6f8); border: 1px solid #d9e1e7; border-radius: 10px; color: #526672; font-size: 14px; font-weight: 650; box-shadow: inset 0 1px 0 #fff,0 2px 4px #253b4e08; }
  .crm-glass #server-logout:hover { background: #edf4e6; border-color: #bccdb4; }
  .crm-glass #main { padding: 25px 26px 32px; max-width: 2100px; }
  .crm-glass .page-heading { margin-bottom: 23px; align-items: flex-start; }
  .crm-glass h1, .crm-glass .page-heading h1 { font-size: 30px; line-height: 1.25; letter-spacing: -.9px; font-weight: 750; color: #25313d; }
  .crm-glass h2, .crm-glass .card-heading h2 { font-size: 19px; font-weight: 750; color: #344552; }
  .crm-glass h3 { font-size: 16px; font-weight: 700; }
  .crm-glass .card, .crm-glass .kanban-filter-panel, .crm-glass .production-filters,
  .crm-glass .summary-card, .crm-glass .financial-summary, .crm-glass .deal-tabs,
  .crm-glass .crm-data-list, .crm-glass .production-list { background: var(--glass-paper); border: 1px solid #fff; border-radius: 14px; box-shadow: var(--glass-shadow); }
  .crm-glass .card-heading { padding: 19px 20px; border-color: #e4eaf0; }
  .crm-glass .card-body { padding: 20px; }
  .crm-glass .card-heading p, .crm-glass .help, .crm-glass .muted { color: #697582; font-size: 13px; }
  .crm-glass .button, .crm-glass .button.secondary, .crm-glass .kanban-open-filter {
    background: linear-gradient(180deg,#fff,#f3f6f8); border: 1px solid #d9e1e7; border-radius: 10px;
    color: #526672; padding: 9px 14px; min-height: 42px; font-size: 14px; font-weight: 650;
    box-shadow: inset 0 1px 0 #fff,0 2px 4px #253b4e08;
  }
  .crm-glass .button:hover, .crm-glass .kanban-open-filter:hover { background: linear-gradient(180deg,#fff,#edf4e6); box-shadow: inset 0 1px 0 #fff,0 5px 13px #253b4e15; transform: translateY(-1px); }
  .crm-glass .button.primary { background: linear-gradient(145deg,#bceb82,#86c93f); color: #243c1d; border-color: #9dce70; box-shadow: inset 0 1px 0 #d9f5b4,0 4px 11px #69a72d26; }
  .crm-glass .button.primary:hover { background: linear-gradient(145deg,#c5ee91,#7dbc37); }
  .crm-glass .button:active { transform: translateY(0); }
  .crm-glass button:disabled { opacity: 1; color: #8995a0; background: #eef1f4; border-color: #e1e6eb; box-shadow: none; transform: none; }
  .crm-glass .icon-button { border-radius: 8px; color: #768895; }
  .crm-glass .icon-button:hover { color: #355820; background: #edf4e5; }
  .crm-glass .input, .crm-glass textarea.input, .crm-glass select.input { background-color: #fff; border: 1px solid #d9e3e8; border-radius: 9px; min-height: 42px; padding: 9px 11px; font-size: 14px; color: #344955; box-shadow: inset 0 1px 2px #24374604; }
  .crm-glass .input:hover { border-color: #b7c8ce; }
  .crm-glass .field > span { color: #647580; font-size: 14px; }
  .crm-glass .view-switcher { display: inline-flex; padding: 4px; gap: 3px; border: 1px solid #dce3e8; background: #fff; border-radius: 11px; }
  .crm-glass .view-switcher .button { min-height: 34px; padding: 7px 13px; background: transparent; border: 0; box-shadow: none; border-radius: 7px; font-size: 13px; }
  .crm-glass .view-switcher .button[aria-pressed=true] { background: #e8f3dc; color: #527c35; box-shadow: 0 1px 3px #37542c0a; }
  .crm-glass .funnel-tabs { gap: 9px; margin-bottom: 18px; }
  .crm-glass .funnel-tabs button { border: 1px solid #d8e4cc; padding: 9px 13px; border-radius: 9px; background: #f8faf7; color: #657860; font-size: 13px; }
  .crm-glass .funnel-tabs button.active { background: linear-gradient(130deg,#eef9df,#e2f1d0); color: #527736; border-color: #adce8d; box-shadow: 0 2px 6px #6d903a0c; }
  .crm-glass .kanban-filter-panel { padding: 18px 20px; margin-bottom: 24px; }
  .crm-glass .kanban-saved-filters > span, .crm-glass .kanban-saved-empty { font-size: 13px; }
  .crm-glass .kanban-filter-panel .kanban-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
  .crm-glass .kanban-filter-panel .kanban-search { flex: 1 1 var(--kanban-search-min,180px); min-width: min(100%,var(--kanban-search-min,180px)); max-width: none; }
  .crm-glass .kanban-filter-panel .kanban-toolbar-narrow .kanban-search { flex-basis: 100%; width: 100%; min-width: 0; }
  .crm-glass .kanban-filter-panel .kanban-search .input { width: 100%; min-width: 0; }
  .crm-glass .kanban-filter-panel .kanban-filter-tools { display: contents; }
  .crm-glass .kanban-filter-panel #kanban-count { display: flex; flex: 0 0 auto; align-items: center; align-self: end; min-height: 42px; margin: 0; font-size: 14px; line-height: 1.5; font-variant-numeric: tabular-nums; white-space: nowrap; overflow-wrap: normal; }
  .crm-glass .kanban-filter-panel .kanban-open-filter,
  .crm-glass .kanban-filter-panel .kanban-filter-tools > button { flex: 0 0 auto; white-space: nowrap; overflow-wrap: normal; }
  .crm-glass .kanban-filter-panel [data-action="reset-kanban-filters"],
  .crm-glass .kanban-filter-panel .kanban-preset-actions .link-button {
    display: inline-flex; align-items: center; justify-content: center; min-height: 42px; min-width: 0; max-width: 100%;
    padding: 9px 14px; border: 1px solid #ced8e1; border-radius: 9px; background: #e7ecf1; color: #455b6b;
    font-size: 14px; font-weight: 650; line-height: 1.5; text-align: center; text-decoration: none; white-space: normal; overflow-wrap: anywhere;
    box-shadow: inset 0 1px 0 #ffffffb3,0 2px 4px #253b4e08;
  }
  .crm-glass .kanban-filter-panel [data-action="reset-kanban-filters"]:hover,
  .crm-glass .kanban-filter-panel .kanban-preset-actions [data-action="rename-kanban-filter"]:hover { background: #dce4eb; border-color: #b9c8d4; color: #344b5c; }
  .crm-glass .kanban-filter-panel .kanban-preset-actions { gap: 8px; }
  .crm-glass .kanban-filter-panel .kanban-preset-actions [data-action="delete-kanban-filter"] { background: #fbe9e7; border-color: #edc4bf; color: #963b34; }
  .crm-glass .kanban-filter-panel .kanban-preset-actions [data-action="delete-kanban-filter"]:hover { background: #f6d8d3; border-color: #e0aaa3; color: #80302a; }
  .crm-glass .kanban-filter-panel [data-action="save-kanban-filter"] { white-space: normal; }
  .crm-glass .kanban, .crm-glass .kanban.stage-board, .crm-glass .production-board {
    --stage-column-width: 258px; display: grid; grid-template-columns: none; grid-auto-flow: column;
    grid-auto-columns: 258px; align-items: stretch; gap: 15px; overflow-x: auto; overflow-y: hidden;
    width: 100%; max-width: 100%; min-width: 0; padding: 4px 2px 20px; scrollbar-color: #b2c3cc #e6edf1;
  }
  .crm-glass .kanban-column, .crm-glass .production-lane {
    position: relative; padding: 0 11px 12px; min-width: 0; width: 100%; min-height: 580px;
    border: 1px solid #e0e7ec; border-radius: 16px; background: linear-gradient(180deg,#f0f3f6,#eaf0f3);
    box-shadow: inset 0 1px 0 #f9fbfc,0 3px 11px #35495708;
  }
  .crm-glass .kanban-stage-header {
    height: auto; min-height: var(--deal-stage-header-height,190px); display: grid; grid-template-rows: 56px auto; gap: 6px;
    padding: 14px 13px; margin: -1px -12px 12px; min-width: 0; border: 1px solid color-mix(in srgb,var(--stage-color) 32%,#cdd8e1);
    border-radius: 15px;
    background: linear-gradient(145deg,color-mix(in srgb,var(--stage-color) 36%,#e3eaf0),color-mix(in srgb,var(--stage-color) 28%,#e7edf2));
    box-shadow: inset 0 1px 0 #ffffff55,0 2px 6px #35495706;
  }
  .crm-glass .kanban-column .kanban-heading { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: start; padding: 0; margin: 0; min-width: 0; color: #475766; background: transparent; clip-path: none; }
  .crm-glass .kanban-heading h3 { min-width: 0; max-height: 56px; overflow: hidden; line-height: 1.4; font-size: 13px; font-weight: 750; white-space: normal; overflow-wrap: anywhere; }
  .crm-glass .kanban-heading > span { background: #eef3f6; color: #607381; border-radius: 6px; min-width: 23px; padding: 2px 6px; font-size: 12px; text-align: center; }
  .crm-glass .kanban-stage-summary { display: grid; grid-template-rows: 28px auto; align-content: start; gap: 6px; margin: 0; padding: 0; min-width: 0; justify-content: stretch; }
  .crm-glass .kanban-stage-total { margin: 0; padding: 0; background: transparent; max-width: 100%; font-size: 21px; font-weight: 750; line-height: 28px; text-align: left; letter-spacing: -.6px; color: #263441; overflow-wrap: anywhere; }
  .crm-glass .kanban-stage-profit { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-content: start; justify-content: stretch; gap: 8px; font-size: 15px; color: #697a86; line-height: 1.4; }
  .crm-glass .kanban-stage-profit > span { display: flex; flex-direction: column; min-width: 0; gap: 4px; }
  .crm-glass .kanban-stage-profit b { display: block; min-width: 0; font-weight: 650; color: inherit; overflow-wrap: anywhere; }
  .crm-glass .kanban-stage-profit .is-positive b { color: var(--green,#527c35); }
  .crm-glass .kanban-stage-profit .is-negative b { color: var(--red,#b64545); }
  .crm-glass .kanban .deal-tile {
    display: flex; flex-direction: column; align-items: stretch; gap: 8px; width: 100%; min-width: 0;
    min-height: var(--deal-card-height,320px);
    margin: 0 0 13px; padding: 16px 14px; text-align: left; background: linear-gradient(140deg,#fff,#fafbfd);
    border: 1px solid #fff; border-radius: 13px; box-shadow: inset 0 1px 0 #fff,0 0 0 1px #dce4e9,0 4px 12px #1f3d4b0b;
    color: #344d3a; cursor: grab; transition: transform .18s,box-shadow .18s;
  }
  .crm-glass .deal-tile-shell, .crm-glass .production-card { position: relative; }
  .crm-glass .deal-tile-shell .deal-tile h3, .crm-glass .production-card h3 { padding-right: 23px; }
  .crm-glass .funnel-move-handle { position: absolute; right: 11px; top: 12px; width: 25px; height: 28px; border: 0; border-radius: 6px; padding: 0; background: transparent; color: #8798a4; cursor: grab; font-size: 19px; touch-action: none; z-index: 2; }
  .crm-glass .funnel-move-handle:hover, .crm-glass .funnel-move-handle[aria-pressed=true] { background: #e7efdf; color: #527c35; }
  .crm-glass .funnel-move-handle:active { cursor: grabbing; }
  .crm-glass .glass-drag-source { background: #e3eaf0 !important; border: 1px dashed #b7c6d2 !important; box-shadow: inset 0 2px 6px #304b5a0b !important; transform: none !important; }
  .crm-glass .glass-drag-source > * { visibility: hidden; }
  .crm-glass .glass-drag-ghost { z-index: 100; pointer-events: none; opacity: 1; display: grid; gap: 8px; padding: 16px 14px; border: 1px solid #c9d7df; border-radius: 13px; margin: 0; background: linear-gradient(145deg,#fff,#f2f6fa); box-shadow: 0 20px 45px #1c344435,0 5px 13px #1c34441a; text-align: left; color: #344d3a; transition: none; }
  .crm-glass .glass-drag-ghost * { pointer-events: none !important; min-width: 0; }
  .crm-glass .glass-drag-ghost h3 { font-size: 15px; }
  .crm-glass .glass-drag-ghost .deal-tile-amount { font-size: 22px; }
  .crm-glass .glass-drag-ghost small, .crm-glass .glass-drag-ghost p { font-size: 13px; }
  .crm-glass .glass-drop-target { background: #e5f0db; box-shadow: inset 0 0 0 2px #9bc57b; }
  .crm-glass .glass-drop-blocked { background: #f6e8e6; box-shadow: inset 0 0 0 2px #cf9b91; }
  .crm-glass .glass-drop-prompt { background: #e4edf8; box-shadow: inset 0 0 0 2px #96b4d8; }
  .crm-glass .glass-drop-hint { position: absolute; top: 128px; left: 9px; right: 9px; max-height: 50px; overflow: hidden; padding: 5px 8px; border-radius: 7px; font-size: 12px; line-height: 1.4; background: #eef5e6; color: #526f37; pointer-events: none; z-index: 2; }
  .crm-glass .glass-drop-blocked .glass-drop-hint { background: #f8ece9; color: #885246; }
  .crm-glass .glass-drop-prompt .glass-drop-hint { background: #e8f0fa; color: #4e7099; }
  .crm-glass .production-lane .glass-drop-hint { top: 43px; max-height: 43px; }
  .crm-glass .glass-drop-target .kanban-stage-profit { visibility: hidden; }
  .crm-glass .kanban .deal-tile:hover, .crm-glass .production-card:hover { transform: translateY(-3px); box-shadow: inset 0 1px 0 #fff,0 0 0 1px #bfd1b4,0 9px 19px #1f3d4b17; }
  .crm-glass .deal-tile > * { min-width: 0; }
  .crm-glass .kanban .deal-tile h3 { font-size: 15px; font-weight: 750; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
  .crm-glass .kanban .deal-tile > .deal-repeat-badge { align-self: flex-start; width: fit-content; max-width: 100%; padding: 4px 10px; border: 1px solid #c8ddcc; border-radius: 20px; background: #eaf4ed; color: #356047; font-size: 13px; line-height: 1.5; font-weight: 650; }
  .crm-glass .kanban .deal-tile-client { color: #697e88; font-size: 13px; white-space: normal; overflow-wrap: anywhere; }
  .crm-glass .kanban .deal-tile .deal-tile-amount { align-self: stretch; font-size: 22px; font-weight: 750; line-height: 1.3; color: #263441; margin: 7px 0 0; white-space: normal; overflow-wrap: anywhere; }
  .crm-glass .kanban .deal-tile .deal-tile-meta { align-self: stretch; max-width: none; text-align: left; font-size: 12px; color: #697582; white-space: normal; }
  .crm-glass .kanban .deal-tile .deal-tile-profit { font-size: 12px; line-height: 1.6; gap: 0 5px; }
  .crm-glass .kanban .deal-tile .tile-next { border-top: 1px solid #e2e9ed; margin-top: auto; padding-top: 12px; font-size: 13px; line-height: 1.6; color: #697c86; }
  .crm-glass .kanban .deal-tile .tile-next small { font-size: 12px; white-space: normal; }
  .crm-glass .kanban .deal-tile .tile-next.tile-task-overdue,
  .crm-glass .kanban .deal-tile .tile-next.tile-task-today { border: 1px solid #efd8d4; border-radius: 12px; padding: 9px 10px; background: #fff4f1; color: #77534e; }
  .crm-glass .kanban .deal-tile .tile-next.tile-task-today { border-color: #eadfbf; background: #fff8e7; color: #7a602d; }
  .crm-glass .kanban .deal-tile .tile-task-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 7px; overflow: visible; line-height: 1.5; }
  .crm-glass .kanban .deal-tile .tile-task-status { display: inline-flex; align-items: center; margin: 0; padding: 3px 9px; border-radius: 20px; font-size: 13px; font-weight: 650; line-height: 1.5; background: #f9dce1; color: #91283e; }
  .crm-glass .kanban .deal-tile .tile-task-today .tile-task-status { background: #ffebcb; color: #79551b; }
  .crm-glass .kanban .deal-tile .tile-task-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; font-size: 13px; line-height: 1.5; }
  .crm-glass .kanban-empty, .crm-glass .production-empty { padding: 24px 5px; text-align: center; font-size: 13px; color: #74848e; }
  .crm-glass .production-filters { padding: 18px 20px; gap: 14px; grid-template-columns: minmax(220px,1fr) minmax(220px,1fr) 170px auto; align-items: end; }
  .crm-glass .production-filters .field > span { font-size: 13px; }
  .crm-glass .production-filters .button { height: 42px; }
  .crm-glass .production-lane { border-top-width: 1px !important; }
  .crm-glass .production-lane h2 { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; height: 85px; min-height: 85px; margin: -1px -12px 12px; padding: 14px 13px; border: 1px solid color-mix(in srgb,var(--stage-color,#bfc5cd) 32%,#cdd8e1); border-radius: 15px; background: linear-gradient(145deg,color-mix(in srgb,var(--stage-color,#bfc5cd) 36%,#e3eaf0),color-mix(in srgb,var(--stage-color,#bfc5cd) 28%,#e7edf2)); box-shadow: inset 0 1px 0 #ffffff55,0 2px 6px #35495706; font-size: 13px; color: #475766; align-items: start; }
  .crm-glass .production-lane h2 .badge { margin: 0; font-size: 12px; background: #eef3f6; color: #607381; }
  .crm-glass .production-card { background: linear-gradient(140deg,#fff,#fafbfd); border: 1px solid #fff; border-radius: 13px; box-shadow: inset 0 1px 0 #fff,0 0 0 1px #dce4e9,0 4px 12px #1f3d4b0b; padding: 16px 14px; height: 272px; margin-bottom: 13px; gap: 10px; }
  .crm-glass .production-card h3 { height: 68px; min-height: 68px; font-size: 16px; }
  .crm-glass .production-card h3 a { line-height: 23px; color: #415e3e; }
  .crm-glass .production-card p, .crm-glass .production-card-deal { font-size: 13px; color: #697d88; }
  .crm-glass .production-card-deal { max-height: 42px; min-height: 42px; }
  .crm-glass .production-card p:last-child { border-top: 1px solid #e2e9ed; padding-top: 12px; }
  .crm-glass .production-filter-options, .crm-glass .inline-product-list, .crm-glass .inline-supplier-list { border: 1px solid #d7e1e8; border-radius: 11px; background: #fff; box-shadow: 0 12px 35px #223e501f; z-index: 25; }
  .crm-glass .production-filter-options [role=option] { padding: 11px 13px; font-size: 14px; background: #fff; }
  .crm-glass .production-filter-options [role=option]:hover, .crm-glass .production-filter-options [role=option].is-active { background: #edf4e5; }
  .crm-glass .deal-stage-ribbon { gap: 5px; height: auto; padding: 3px 2px 7px; margin: 19px 0 17px; }
  .crm-glass .deal-stage-ribbon__stage, .crm-glass .deal-stage-ribbon__stage:first-child { clip-path: none; border-radius: 11px; border: 1px solid #e1e7e5; background: linear-gradient(150deg,#eef2ed,#e7ece7); color: #5d7166; min-height: 52px; height: auto; padding: 10px 8px; box-shadow: inset 0 1px 0 #f7faf5,0 2px 6px #35495708; }
  .crm-glass .deal-stage-ribbon__stage.is-current { background: linear-gradient(130deg,#ecf9df,#d4edb7); color: #3d6826; border-color: #a7cd84; }
  .crm-glass .deal-stage-ribbon__stage.is-current::after { height: 2px; }
  .crm-glass .deal-tabs { padding: 5px; margin: 18px 0 22px; }
  .crm-glass .deal-tabs [role=tab] { min-height: 45px; padding: 12px 10px; color: #647579; font-size: 14px; border-radius: 9px; }
  .crm-glass .deal-tabs [aria-selected=true] { background: linear-gradient(135deg,#edf8e2,#e1f0cd); color: #527e2f; box-shadow: inset 0 -2px #8ebc55; }
  .crm-glass .deal-heading-left .deal-name-input { font-family: inherit; font-size: 30px; font-weight: 750; letter-spacing: -.8px; color: #25313d; }
  .crm-glass .summary-card strong, .crm-glass .financial-summary .summary-metric > strong, .crm-glass .financial-summary .payment-summary-value > strong { font-family: inherit; font-size: 24px; font-weight: 750; }
  .crm-glass .financial-summary .payment-summary-detail { font-size: 13px; line-height: 1.5; }
  .crm-glass .financial-summary .payment-summary-detail > strong { font-size: 14px; font-weight: 600; line-height: 1.5; }
  .crm-glass .financial-summary .summary-metric-label { font-size: 13px; }
  .crm-glass .offer-price { font-family: inherit; }
  .crm-glass .external-links > button, .crm-glass .external-contact-links [data-external-linked] { font-size: 14px; line-height: 1.5; }
  .crm-glass .financial-summary > * { padding: 18px; }
  .crm-glass .sales-table-wrap { border: 1px solid #dce3e8; border-radius: 14px; box-shadow: var(--glass-shadow); background: #fff; overflow-x: auto; }
  .crm-glass .sales-table { min-width: 1400px; }
  .crm-glass .sales-table > thead > tr > th:nth-child(4) { width: 145px; }
  .crm-glass .sales-table > thead > tr > th:nth-child(5) { width: 360px; }
  .crm-glass .sales-table > thead > tr > th:nth-child(6) { width: 270px; }
  .crm-glass .sales-table .item-row > td[data-column="Цена клиенту"] .sales-inline-value { width: auto; grid-template-columns: var(--measure-number-width) minmax(0,1fr); }
  .crm-glass .sales-table > thead th { background: #f5f8fa; color: #647780; padding-top: 15px; padding-bottom: 15px; }
  .crm-glass .sales-table > .sale-position > tr > td,
  .crm-glass .sales-table > .sale-position.is-excluded > tr > td { background: #eff6f1; border-color: #dce8e0; }
  .crm-glass .sales-table .sale-position > .item-row > td { padding-top: 8px; padding-bottom: 4px; }
  .crm-glass .sales-table .sale-name-line > input[data-field="name"],
  .crm-glass .sales-table .sale-name-line > [data-product-search] { grid-column: auto; }
  .crm-glass .sales-table .sale-amount-values { display: flex; align-items: center; gap: 16px; white-space: nowrap; }
  .crm-glass .sales-table .sale-amount-values > small { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; margin: 0; }
  .crm-glass .sales-table .technical-spec-summary { display: flex; align-items: center; gap: 10px; min-height: 36px; white-space: nowrap; }
  .crm-glass .sales-table .sale-spec-layout { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 10px; }
  .crm-glass .sales-table .technical-spec-summary > .technical-spec-state,
  .crm-glass .sales-table .technical-spec-unneeded { margin: 0; }
  .crm-glass .sales-table .sale-position-compact-toolbar { align-items: center; flex-wrap: nowrap; gap: 8px 16px; padding: 0 12px 8px 42px; }
  .crm-glass .sales-table .sale-position-context { display: flex; flex: 1 1 auto; align-items: center; flex-wrap: nowrap; gap: 6px 14px; min-width: 0; }
  .crm-glass .sales-table .sale-position-context .item-source { flex: 1 1 auto; min-width: 0; margin: 0; padding: 0; color: #536772; font-size: 14px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .crm-glass .sales-table .sale-position-context .item-source > strong { font-weight: 700; }
  .crm-glass .sales-table .sale-position-context .sale-production-state { display: grid; grid-template-columns: max-content max-content; flex: 0 0 auto; column-gap: 14px; margin: 0; }
  .crm-glass .sales-table .sale-production-state > .link-button { grid-area: 1 / 1; }
  .crm-glass .sales-table .sale-production-state > .production-stage-badge { grid-area: 1 / 2; justify-self: start; white-space: nowrap; }
  .crm-glass .sales-table .production-stage-reserve { display: grid; grid-area: 1 / 2; padding-right: 16px; visibility: hidden; pointer-events: none; }
  .crm-glass .sales-table .production-stage-reserve > .production-stage-badge { grid-area: 1 / 1; justify-self: start; white-space: nowrap; }
  .crm-glass .sales-table .sale-position-context .excluded-note { flex: 0 0 auto; margin: 0; }
  .crm-glass .sales-table .sale-position-compact-toolbar > .purchase-toggle-button { flex: 0 0 auto; margin-left: 0; min-height: 36px; max-width: 100%; padding: 6px 10px; white-space: normal; }
  .crm-glass .sales-table .sale-position-compact-toolbar > .position-lead-time,
  .crm-glass .sales-table .sale-position-compact-toolbar > .lead-time-break { display: none; }
  .crm-glass .sales-table .input { min-height: 36px; height: 36px; border-radius: 7px; padding: 6px 8px; font-size: 14px; }
  .crm-glass .sales-table .unit-picker { border-radius: 7px; }
  .crm-glass .sales-table .purchase-toggle, .crm-glass .sales-table .sale-production-state .link-button,
  .crm-glass .production-modal-links .link-button { border-radius: 8px; padding: 7px 10px; }
  .crm-glass .sales-table .purchase-toggle { background: linear-gradient(180deg,#f7fafc,#eaf0f5); border-color: #cfdce5; color: #476170; }
  .crm-glass .production-stage-badge { border-radius: 8px; background: #e9eff7; border-color: #d5dfed; color: #596f8d; padding: 6px 10px; }
  .crm-glass .component-purchase-row { background: var(--glass-paper); border-color: #dce4eb; }
  .crm-glass .component-supplier-row > td { background: #f9fbfd; }
  .crm-glass .sales-table .purchase-supplier-block { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
  .crm-glass .sales-table .purchase-supplier-block > .component-supplier-line { flex: 1 1 260px; grid-template-columns: auto minmax(0,1fr) auto; gap: 8px; padding: 0 8px; }
  .crm-glass .sales-table .purchase-supplier-block .supplier-name-link { white-space: nowrap; }
  .crm-glass .sales-table .purchase-supplier-block :is(.supplier-name-link,.supplier-change-button,.supplier-cancel-button) { min-height: 32px; line-height: 20px; padding: 6px 0; }
  .crm-glass .sales-table .purchase-supplier-block > .purchase-routing { display: flex; flex: 3 1 660px; flex-wrap: wrap; align-items: center; gap: 8px 12px; width: auto; padding: 0; }
  .crm-glass .sales-table .purchase-supplier-block .purchase-routing-field { display: flex; flex: 1 1 320px; align-items: center; gap: 8px; }
  .crm-glass .sales-table .purchase-supplier-block .purchase-routing-field > label { flex: 1 1 220px; grid-template-columns: auto minmax(0,1fr); gap: 8px; text-align: left; }
  .crm-glass .sales-table .purchase-supplier-block .purchase-routing-detail { flex: 1 1 160px; align-items: center; gap: 4px; margin: 0; }
  .crm-glass .sales-table .purchase-supplier-block .purchase-routing-detail[data-supplier-detail="phone"] { flex: 0 0 auto; }
  .crm-glass .sales-table .purchase-supplier-block .purchase-routing-value { padding: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .crm-glass .sales-table .purchase-supplier-block .supplier-routing-empty { font-size: 13px; }
  .crm-glass .component-purchase-row.is-excluded, .crm-glass .component-supplier-row.is-excluded { opacity: 1; background: #f1f4f7; color: #788995; }
  .crm-glass dialog { border: 1px solid #fff; border-radius: 20px !important; background: linear-gradient(145deg,#fff,#f7f9fc); color: #344552; box-shadow: inset 0 1px 0 #fff,0 0 0 1px #d1dce4,0 22px 65px #223d4b35; max-height: 92vh; }
  .crm-glass dialog::backdrop { background: #33445280; }
  .crm-glass dialog .card-heading, .crm-glass .production-modal-head { background: linear-gradient(180deg,#fff,#f8fafc); border-bottom: 1px solid #e1e7ed; }
  .crm-glass .production-cost-dialog { width: min(1380px,96vw); }
  .crm-glass .production-modal-body { padding: 20px 24px 28px; }
  .crm-glass .production-modal-table .item-detail { border-radius: 12px; }
  .crm-glass .production-modal-head h2 { font-size: 21px; }
  .crm-glass #toast { background: #fff; border: 1px solid #dce6eb; border-left: 4px solid #85af61; color: #354955; padding: 15px 20px; border-radius: 13px; box-shadow: 0 9px 27px #203a4c24; font-size: 14px; max-width: min(540px,calc(100vw - 110px)); white-space: normal; }
  .crm-glass .kanban-column.is-drop-target, .crm-glass .production-lane.is-drop-target { background: #e5f0db; box-shadow: inset 0 0 0 2px #9bc57b; }
  .crm-glass .deal-tile.is-drag-source, .crm-glass .production-card.is-dragging { opacity: 1; background: #e3eaf0; border: 1px dashed #b7c6d2; box-shadow: inset 0 2px 6px #304b5a0b; transform: none; }
  @media(min-width:1101px) {
    .crm-glass #deal-production-board .production-filters { grid-template-columns: minmax(220px,1fr) minmax(170px,.65fr) auto; }
  }
  @media(max-width:1100px) {
    .crm-glass .production-filters { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
    .crm-glass .production-filters .button { justify-self: start; }
  }
  @media(max-width:700px) {
    .crm-glass #main { padding: 18px 12px; }
    .crm-glass .app-header { padding: 0 14px; }
    .crm-glass .workspace-tabs { padding: 0 14px; gap: 18px; }
    .crm-glass .production-filters { grid-template-columns: minmax(0,1fr); }
    .crm-glass .workspace-title { font-size: 15px; }
    .crm-glass .header-tools { gap: 10px; }
    .crm-glass .demo-user-picker .input { width: 145px; }
  }
  @media(max-width:600px) {
    .crm-glass .kanban-filter-panel .kanban-search { flex: 1 1 100%; width: 100%; min-width: 0; }
    .crm-glass .kanban-filter-panel #kanban-count { flex: 0 1 auto; min-width: 0; white-space: normal; }
    .crm-glass .kanban-filter-panel .kanban-filter-tools { display: flex; flex: 1 1 100%; flex-wrap: wrap; justify-content: flex-start; gap: 12px; margin-left: 0; }
    .crm-glass .kanban-filter-panel .kanban-filter-tools > button { flex: 0 1 auto; min-width: 0; white-space: normal; }
  }
  @media(prefers-reduced-motion:reduce) {
    .crm-glass *, .crm-glass *::before, .crm-glass *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  }
}

/* A warning occupies the existing second line; product row density stays compact. */
@media screen { .crm-glass .sales-table .sale-position-context .purchase-check { display:inline-flex; align-items:center; flex:0 0 auto; gap:8px; margin:0; min-height:28px; max-width:none; padding:3px 10px; border:1px solid #e4d4ae; border-radius:8px; color:#7c6237; background:#fff8e9; font-size:13px; font-weight:500; line-height:20px; white-space:nowrap; box-sizing:border-box; } .crm-glass .sales-table .sale-position-context .purchase-check::before { content:"!"; display:inline-flex; align-items:center; justify-content:center; flex:0 0 16px; width:16px; height:16px; border:1px solid currentColor; border-radius:50%; font-size:12px; font-weight:700; line-height:1; } .crm-glass .sales-table .sale-position-context .purchase-check[hidden] { display:none; } .crm-glass .sales-table .sale-position-context .purchase-check.is-loss { color:#a3635b; border-color:#e4c8c1; background:#fff4f0; } }

/* The purchasing editor has its own table, never the full sales-table minimum. */
@media screen {
 .crm-glass :is(.production-cost-dialog,.production-purchases-card) .sales-table { min-width:0; width:100%; table-layout:fixed; }
 .crm-glass .production-cost-dialog .production-modal-body { padding:12px 16px 16px; }
 .crm-glass .production-cost-dialog .production-modal-head { padding:14px 16px; }
 .crm-glass .production-purchases-card > .card-body { padding:16px; }
 body#crm-ui-root[data-ui-primitives="v1"] #production-cost-dialog .production-modal-body { padding:12px 16px 16px; }
 body#crm-ui-root[data-ui-primitives="v1"] #production-cost-dialog .production-modal-head { padding:14px 16px; }
}

/* One sale position contains its purchases, the add action and their totals. */
@media screen {
  .crm-glass .sales-table > .sale-position { position: relative; --position-tint: #eff6f1; background: #eff6f1; }
  .crm-glass .sales-table > .sale-position > .item-row { background: #eff6f1; }
  .crm-glass .sales-table > .sale-position::after {
    content: ""; display: block; position: absolute; inset: 0;
    border: 2px solid #789184; border-radius: 10px; pointer-events: none;
  }
  .crm-glass .sales-table > .sale-position + .sale-position::after { top: 5px; }
  .crm-glass .sales-table > .sale-position + .sale-position > .item-row > td { border-top-color: #fff; }
  .crm-glass .sales-table > .sale-position > .expanded-row > td { padding: 0; }
  .crm-glass .sales-table .item-detail.component-section { background: #fff; }
  .crm-glass .sales-table .component-heading { margin: 0; padding: 6px 12px; background: #eff6f1; }
  .crm-glass .sales-table .purchase-disclosure-body .component-heading { background: #fff; }
  .crm-glass .sales-table .component-table .component-purchase-row,
  .crm-glass .sales-table .component-table .component-supplier-row,
  .crm-glass .sales-table .component-table .component-purchase-row > td,
  .crm-glass .sales-table .component-table .component-supplier-row > td { background: #fff; }
  .crm-glass .sales-table .component-table .component-purchase-row { padding-left: 12px; padding-right: 12px; border-top: 1px solid #9baea3; }
  .crm-glass .sales-table .component-table .component-supplier-row { border-bottom: 0; }
  .crm-glass .sales-table .component-table .component-supplier-row > td { padding: 0 12px 12px; border-bottom: 0; }
  .crm-glass .sales-table .component-add-row { padding: 12px; border-top: 1px solid #9baea3; background: #fff; }
  .crm-glass .sales-table .component-totals { padding: 10px 12px; border-top: 1px solid #9baea3; background: #fff; }
  .crm-glass .sales-table .purchase-commercial { border-top: 0; }
  .crm-glass .sales-table .component-empty { margin: 0; padding: 12px; }
  @container sale-lines (max-width: 760px) {
    .crm-glass .sales-table > .sale-position + .sale-position > .item-row > td { border-top: 0; }
  }
}

/* The disclosure and totals stay together below the purchasing content. */
@media screen {
  .crm-glass .sales-table > .sale-position > .sale-purchase-footer > td,
  .crm-glass .sales-table > .sale-position.is-excluded > .sale-purchase-footer > td { padding: 0; border-top: 1px solid #9baea3; }
  .crm-glass .sales-table > .sale-position.is-open > .sale-purchase-footer > td { background: #fff; }
  .crm-glass .sales-table .purchase-disclosure {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px 28px;
    width: 100%; min-width: 0; min-height: 52px; margin: 0; padding: 12px;
    border: 0; border-radius: 0; box-shadow: none; background: transparent;
    color: #536772; font: inherit; text-align: left; cursor: pointer;
    transition: background-color 160ms ease;
  }
  .crm-glass .sales-table .purchase-disclosure:hover:not(:disabled) .purchase-disclosure-action { color: #425d33; }
  .crm-glass .sales-table .purchase-disclosure:focus-visible { outline: 2px solid #70984e; outline-offset: -3px; }
  .crm-glass .sales-table .purchase-disclosure:disabled { cursor: default; opacity: .6; }
  .crm-glass .sales-table .purchase-disclosure-action { display: inline-flex; align-items: center; gap: 8px; min-width: 120px; font-weight: 600; }
  .crm-glass .sales-table .purchase-disclosure-chevron { flex: 0 0 16px; transition: transform 220ms cubic-bezier(.2,0,0,1); }
  .crm-glass .sales-table .purchase-disclosure[aria-expanded=true] .purchase-disclosure-chevron { transform: rotate(180deg); }
  .crm-glass .sales-table .purchase-disclosure-stat { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
  .crm-glass .sales-table .purchase-disclosure-stat b { white-space: nowrap; }
  .crm-glass .sales-table .purchase-disclosure-body.is-animating { overflow: hidden; overflow: clip; }
  .crm-glass .sales-table .purchase-details-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
  .crm-glass .sales-table > .sale-position:has(.purchase-disclosure-body.is-animating) { overflow-anchor: none; }
  @container sale-lines (max-width: 760px) {
    .crm-glass .sales-table > .sale-position > .sale-purchase-footer,
    .crm-glass .sales-table > .sale-position > .sale-purchase-footer > td { display: block; width: 100%; }
    .crm-glass .sales-table .purchase-disclosure { gap: 8px 18px; }
  }
  @media(prefers-reduced-motion: reduce) {
    .crm-glass .sales-table .purchase-disclosure,
    .crm-glass .sales-table .purchase-disclosure-chevron { transition: none; }
  }
}
