/* Написано Codex для Димы: GRONN / Precision UI, 12.11.2026.
   Единый визуальный слой поверх исходной разметки Димы. Не изменяет права,
   значения форм и обработчики. Селекторы ограничены экраном: печать прежняя.
   Токены переопределяют старое стекло, поэтому AJAX-экраны и iframe совпадают.
   Откат: убрать подключения gronn-precision.css/js из pwa_head.php. */
@media screen {
html[data-gronn-theme]{--gg-text:#172b49;--gg-muted:#63748d;--gg-blue:#1644d5;--gg-solid:#fff;--gg-glass:#fff;--gg-field:#fff;--gg-head:#f3f6fb;--gg-line:#dce4ef;--gg-border:#e0e7f0;--gg-shadow:0 3px 12px #152d4e06;--gg-accent:linear-gradient(120deg,#1644d5,#2468ed);--gp-bg:#f3f6fb;--gp-hover:#eef3ff}
html[data-gronn-theme=dark]{--gg-text:#e5edf9;--gg-muted:#a2b1c7;--gg-blue:#91b3ff;--gg-solid:#152238;--gg-glass:#152238;--gg-field:#101c30;--gg-head:#1b2c45;--gg-line:#30405a;--gg-border:#2a3b54;--gg-shadow:0 3px 14px #0002;--gp-bg:#0e1829;--gp-hover:#223757}
html[data-gronn-theme] body{background:var(--gp-bg)!important;color:var(--gg-text)!important}
html[data-gronn-theme] body.gronn-shell .home-frame2{background:transparent!important;box-shadow:none!important;border:0!important;backdrop-filter:none!important}
html[data-gronn-theme] body.gronn-shell .content-area{border-radius:14px!important;padding:22px 24px 70px}
html[data-gronn-theme] body.gronn-shell .mobile-sidebar{border-radius:16px!important;background:var(--gg-solid)!important;box-shadow:0 2px 8px #152d4e05!important;backdrop-filter:none!important}
html[data-gronn-theme] body.gronn-shell .mobile-sidebar .workspace-nav-link{min-height:42px;border-radius:9px;font-size:12.5px}
html[data-gronn-theme] body.gronn-shell .mobile-sidebar .workspace-nav-link.gronn-nav-active{box-shadow:0 3px 9px #1644d51c;border-color:transparent}
html[data-gronn-theme] body :is(h1,h2,h3,.section-title,.header-title){letter-spacing:-.035em;color:var(--gg-text)}
html[data-gronn-theme] body :is(.content-area,.ix,.request-form) :is(button,.btn,.ix-btn){font-family:inherit;font-size:13px;line-height:1.4;border-radius:9px!important;min-height:36px;transition:background .16s,border-color .16s,box-shadow .16s,transform .16s;box-shadow:none!important}
html[data-gronn-theme] body :is(.content-area,.ix,.request-form) :is(button,.btn):not(:disabled):hover{filter:brightness(.97);box-shadow:0 3px 9px #1644d512!important}
html[data-gronn-theme] body :is(button,a,input,select,textarea):focus-visible{outline:3px solid #5b8aff88!important;outline-offset:3px}
html[data-gronn-theme] body :is(button,input,select):disabled{opacity:.55;cursor:not-allowed}
html[data-gronn-theme] body :is(.content-area,.ix) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea){border-radius:9px!important;border-color:var(--gg-line)!important;background-color:var(--gg-field)!important;color:var(--gg-text)!important;font-size:13px;box-shadow:none!important}
html[data-gronn-theme] body :is(.ix-panel,.card,.report-header,.filter-container,.table-responsive,.df-header,.df-panel,.warehouse-report-header,.warehouse-report-filters,.warehouse-compact-hero){border:1px solid var(--gg-line)!important;border-radius:13px!important;background:var(--gg-solid)!important;box-shadow:var(--gg-shadow)!important}
html[data-gronn-theme] body :is(.warehouse-compact-hero,.df-header,.report-header){padding:18px 20px!important;margin-bottom:16px!important}
html[data-gronn-theme] body :is(.warehouse-compact-hero .header-title,.df-header h1,.report-header h2){font-size:22px!important}
html[data-gronn-theme] body :is(.top-buttons-container,.switch-report-btns,.df-tabs){border:1px solid var(--gg-line)!important;border-radius:11px!important;box-shadow:none!important;background:var(--gg-solid)!important;padding:5px!important;gap:5px!important}
html[data-gronn-theme] body .content-container:has(#content-movement) :is(.info-block,.warehouse-report-meta){border-radius:12px!important;box-shadow:none!important}
html[data-gronn-theme] body .content-container:has(#content-movement) :is(.block-header,.warehouse-report-table th){background:var(--gg-head)!important;border-radius:0!important;min-height:44px!important;color:var(--gg-muted)!important}
html[data-gronn-theme] body :is(.ix,.content-area) table{font-size:13px}
html[data-gronn-theme] body :is(.ix,.content-area) :is(th,td){border-color:var(--gg-line)!important}
html[data-gronn-theme] body :is(.ix,.content-area) th{font-size:11px!important;font-weight:650;background:var(--gg-head)!important;color:var(--gg-muted)!important;padding:12px 14px!important}
html[data-gronn-theme] body :is(.ix,.content-area) td{padding:12px 14px!important;color:var(--gg-text)}
html[data-gronn-theme] body :is(.ix,.content-area) tbody tr:hover{background:var(--gp-hover)!important}
/* Заявки: полезная информация компактнее, статусы читаются как метки.
   Не скрываем даты, фотографии и действия; высота растёт от содержания. */
html[data-gronn-theme] body .requests-container{padding:0!important;max-width:none!important;background:transparent!important}
html[data-gronn-theme] body .requests-title{font-size:23px!important;margin:20px 0 16px!important}
html[data-gronn-theme] body .request-card{padding:20px!important;margin-bottom:14px!important;border:1px solid var(--gg-line)!important;border-radius:13px!important;background:var(--gg-solid)!important;box-shadow:var(--gg-shadow)!important}
html[data-gronn-theme] body .request-header{display:flex!important;align-items:center!important;flex-wrap:wrap;gap:12px;padding-bottom:14px!important;margin-bottom:13px!important;border-bottom:1px solid var(--gg-line)!important;min-height:0!important}
html[data-gronn-theme] body .request-id{font-size:16px!important;font-weight:650;letter-spacing:-.025em;color:var(--gg-text)!important;white-space:nowrap}
html[data-gronn-theme] body .request-info{margin-left:auto;display:flex!important;flex-wrap:wrap;gap:7px!important;align-items:center!important;font-size:11px!important}
html[data-gronn-theme] body .request-info>div{margin:0!important;padding:6px 9px;background:var(--gg-head);border-radius:7px;line-height:1.35;font-size:11px!important}
html[data-gronn-theme] body .request-info .info-label{font-size:10px;color:var(--gg-muted);margin-right:3px}
html[data-gronn-theme] body .request-status.в-ожидании{background:#fff4d8!important;color:#886014!important}
html[data-gronn-theme] body .request-status.в-работе{background:#e6eeff!important;color:#1749aa!important}
html[data-gronn-theme] body .request-status.выполнена{background:#e2f4ec!important;color:#19664c!important}
html[data-gronn-theme] body .request-status.отменена{background:#fbe9ec!important;color:#aa354d!important}
html[data-gronn-theme] body .request-card :is(.dates-info,.client-info,.machine-info){padding:8px 0!important;border:0!important;background:transparent!important;font-size:13px!important;margin:0!important;line-height:1.6!important}
html[data-gronn-theme] body .request-card :is(.dates-info,.client-info,.machine-info) strong{font-size:12px!important;font-weight:500;color:var(--gg-muted)!important}
html[data-gronn-theme] body .request-card .dates-info{font-size:11px!important;color:var(--gg-muted)!important;padding-top:0!important}
html[data-gronn-theme] body .request-card .request-text{padding:12px 14px!important;margin:10px 0!important;background:var(--gg-head);border-radius:8px;font-size:13px!important;line-height:1.6;color:var(--gg-text)!important}
html[data-gronn-theme] body .request-card .executor-comment{border:1px solid var(--gg-line)!important;border-left:3px solid #86aaff!important;background:var(--gg-head)!important;border-radius:8px!important;padding:12px 14px!important;font-size:13px!important;margin-top:12px!important}
html[data-gronn-theme] body .request-card .executor-comment strong{color:var(--gg-muted)!important;font-size:11px}
html[data-gronn-theme] body .request-card .executor-comment p{margin:7px 0 0!important}
html[data-gronn-theme] body .request-card .action-buttons{gap:8px!important;margin-top:14px!important}
html[data-gronn-theme] body .request-card :is(.execute-btn,.complete-btn,.cancel-btn){width:auto!important;min-width:105px;padding:9px 15px!important;font-size:12px!important;border-radius:8px!important}
html[data-gronn-theme] body .request-card .cancel-btn{background:var(--gg-solid)!important;color:#c23851!important;border:1px solid #e9c7ce!important}
html[data-gronn-theme] body [data-start-complaint]{background:var(--gg-head)!important;border:1px solid var(--gg-line)!important;color:var(--gg-blue)!important;font-size:11px!important;padding:7px 10px!important;min-height:30px!important}
/* Создание заявки: сетка полей, широкое описание и удобные вложения. */
html[data-gronn-theme] body .request-form{max-width:900px!important;width:auto!important;margin:0 auto!important;padding:26px!important;border:1px solid var(--gg-line)!important;border-radius:14px!important;background:var(--gg-solid)!important;box-shadow:var(--gg-shadow)!important}
html[data-gronn-theme] body .request-form h2{font-size:23px!important;text-align:left!important;margin:0 0 24px!important}
html[data-gronn-theme] body #createRequestForm{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 20px}
html[data-gronn-theme] body #createRequestForm .form-group{margin:0!important;min-width:0}
html[data-gronn-theme] body #createRequestForm .form-group:has(textarea),html[data-gronn-theme] body #createRequestForm>button,html[data-gronn-theme] body #progressBarContainer{grid-column:1/-1}
html[data-gronn-theme] body #createRequestForm label{font-size:12px!important;font-weight:550!important;color:var(--gg-muted)!important;margin-bottom:7px!important}
html[data-gronn-theme] body #createRequestForm :is(select,textarea,input[type=file]){width:100%!important;box-sizing:border-box;min-height:42px;padding:10px 12px!important;font-size:13px!important}
html[data-gronn-theme] body #createRequestForm textarea{min-height:130px!important;resize:vertical}
html[data-gronn-theme] body #createRequestForm .submit-btn{justify-self:end;max-width:none!important;width:auto!important;padding:11px 24px!important;margin:4px 0 0!important;text-transform:none!important;font-size:13px!important}
html[data-gronn-theme] body input[type=file]::file-selector-button{padding:7px 12px;border:0;border-radius:6px;background:var(--gg-head);color:var(--gg-blue);font:inherit;cursor:pointer;margin-right:12px}
/* Документация: фиксированный разумный размер плиток даже у одного каталога. */
html[data-gronn-theme] body .documentation-container{background:transparent!important;padding:0!important;color:var(--gg-text)!important}
html[data-gronn-theme] body :is(.documentation-menu,.catalogs-menu,.group-catalogs-container,.operating-manuals-section){padding:0!important;background:transparent!important}
html[data-gronn-theme] body :is(.documentation-title,.section-title){text-align:left!important;font-size:23px!important;margin:0!important}
html[data-gronn-theme] body .documentation-title{margin-bottom:20px!important}
html[data-gronn-theme] body :is(.documentation-sections,.catalog-groups,.group-catalogs-grid,.files-grid){display:grid!important;grid-template-columns:repeat(auto-fill,minmax(220px,1fr))!important;gap:14px!important;max-width:none!important;margin:0!important}
html[data-gronn-theme] body .documentation-sections{grid-template-columns:repeat(3,minmax(0,1fr))!important}
html[data-gronn-theme] body :is(.section-item,.catalog-group,.catalog-item,.subgroup-item,.file-item){min-height:0!important;width:auto!important;max-width:none!important;padding:18px!important;border:1px solid var(--gg-line)!important;border-radius:12px!important;background:var(--gg-solid)!important;box-shadow:var(--gg-shadow)!important;transition:border-color .18s,transform .18s!important}
html[data-gronn-theme] body :is(.section-item,.catalog-group,.catalog-item,.subgroup-item,.file-item):not([aria-disabled=true]):hover{border-color:#779eff!important;transform:translateY(-2px)!important}
html[data-gronn-theme] body .section-item{display:flex!important;gap:14px!important;align-items:center!important;text-align:left!important;min-height:108px!important}
/* Написано Codex для Димы: современные линейные SVG возвращают визуальные пиктограммы на плитки и сохраняют компактную сетку. */
html[data-gronn-theme] body .documentation-sections .section-item{display:flex!important;align-items:center!important;gap:12px!important;padding:11px 14px!important}
/* Написано Codex для Димы: документационные плитки компактнее, чтобы список рос вниз без крупных пустых карточек. */
html[data-gronn-theme] body .documentation-sections .section-item{min-height:76px!important;height:auto!important;padding:11px 14px!important;border-radius:13px!important}
html[data-gronn-theme] body #custom-documentation-sections{margin-top:10px!important}
html[data-gronn-theme] body .documentation-sections .section-name{font-size:13px!important}
html[data-gronn-theme] body .documentation-sections .section-name{display:block!important;flex:1 1 auto!important;min-width:0!important;margin:0!important;line-height:1.35!important}
html[data-gronn-theme] body .docs-tile-icon{display:grid!important;place-items:center!important;flex:0 0 42px!important;width:42px!important;height:42px!important;border:1px solid #d9e4fb!important;border-radius:12px!important;background:linear-gradient(145deg,#f5f8ff,#e8efff)!important;color:#2456d9!important}
html[data-gronn-theme] body .docs-tile-icon svg{width:25px!important;height:25px!important;stroke:currentColor!important;stroke-width:1.7!important;stroke-linecap:round!important;stroke-linejoin:round!important}
html[data-gronn-theme] body .docs-tile-icon img{width:28px!important;height:28px!important;object-fit:contain!important}
html[data-gronn-theme] body .documentation-management-action{margin-top:20px!important;padding-top:16px!important;border-top:1px solid var(--gg-line)!important}
html[data-gronn-theme] body .documentation-management-action[hidden]{display:none!important}
html[data-gronn-theme] body .management-caption{display:block!important;margin-bottom:8px!important;color:var(--gg-muted)!important;font-size:10px!important;font-weight:700!important;text-transform:uppercase!important;letter-spacing:.12em!important}
html[data-gronn-theme] body .documentation-manage-link{display:flex!important;align-items:center!important;gap:12px!important;width:100%!important;max-width:440px!important;padding:10px 12px!important;border:0!important;background:transparent!important;color:var(--gg-muted)!important;text-align:left!important;cursor:pointer!important}
html[data-gronn-theme] body .management-symbol{font-size:19px!important;color:var(--gg-blue)!important}
html[data-gronn-theme] body .management-arrow{margin-left:auto!important;color:var(--gg-muted)!important}

html[data-gronn-theme] body :is(.section-icon,.catalog-icon){height:auto!important;margin:0!important}
html[data-gronn-theme] body .section-icon{flex:0 0 38px!important;width:38px!important}
html[data-gronn-theme] body .section-icon-image{width:34px!important;height:34px!important}
html[data-gronn-theme] body :is(.section-name,.catalog-name,.group-name,.subgroup-name){font-size:13px!important;font-weight:600!important;color:var(--gg-text)!important;line-height:1.45}
html[data-gronn-theme] body :is(.catalog-image,.group-image,.subgroup-image){width:100%!important;height:108px!important;max-width:200px!important;max-height:108px!important;object-fit:contain!important;margin:0 auto 14px!important;border-radius:8px!important}
html[data-gronn-theme] body .catalog-group{min-height:172px!important}
html[data-gronn-theme] body .catalog-item{min-height:165px!important}
html[data-gronn-theme] body .section-header{gap:16px!important;margin:0 0 20px!important;padding:0!important;flex-wrap:wrap}
html[data-gronn-theme] body .spare-parts-search{max-width:720px!important;margin:0 0 24px!important}
html[data-gronn-theme] body .spare-parts-search .search-container{padding:10px!important;box-shadow:none!important;border:1px solid var(--gg-line);border-radius:12px!important;background:var(--gg-solid)!important}
html[data-gronn-theme] body .catalog-pending{border-style:dashed!important;display:flex!important;align-items:center;justify-content:center;flex-direction:column;gap:12px;cursor:default!important}
.gp-soon{font-size:11px;color:var(--gg-muted);background:var(--gg-head);padding:5px 9px;border-radius:6px}
.gp-placeholder-icon{font-size:29px;color:var(--gg-blue);font-weight:300}
html[data-gronn-theme] body .workspace-menu-action{min-height:160px!important;border-radius:13px!important;padding:20px!important}
/* Длинные справочники: поиск живёт рядом с оригинальным select. Сам select
   остаётся источником значения и событий change для кода Димы. */
.gp-select-host{display:inline-block;position:relative;min-width:0;flex:1;width:100%}
.gp-select-original{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important;overflow:hidden!important;clip-path:inset(50%)!important}
html[data-gronn-theme] body button.gp-select-trigger{width:100%;height:auto;min-height:38px;padding:9px 30px 9px 12px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left;background:var(--gg-field)!important;border:1px solid var(--gg-line)!important;color:var(--gg-text)!important;font-size:12px!important;position:relative}
.gp-select-trigger::after{content:'⌄';position:absolute;right:12px;color:var(--gg-blue)}
.gp-select-popup{position:fixed;z-index:100000;background:var(--gg-solid);border:1px solid var(--gg-line);border-radius:12px;box-shadow:0 14px 40px #132d5524;padding:9px;box-sizing:border-box;color:var(--gg-text)}
.gp-select-popup input{box-sizing:border-box;width:100%;padding:10px 12px;border:1px solid var(--gg-line);border-radius:7px;background:var(--gg-field);color:var(--gg-text);font:13px GronnGolos,Arial,sans-serif}
.gp-select-options{max-height:220px;overflow:auto;margin-top:7px}
.gp-select-options [role=option]{font:12px/1.5 GronnGolos,Arial,sans-serif;padding:9px 10px;border-radius:6px;cursor:pointer;overflow-wrap:anywhere}
.gp-select-options [role=option]:is(:hover,[aria-selected=true]){background:var(--gp-hover);color:var(--gg-blue)}
.gp-select-note{padding:8px 10px 2px;color:var(--gg-muted);font-size:11px}
@media(max-width:700px){html[data-gronn-theme] body .documentation-sections{grid-template-columns:1fr!important}html[data-gronn-theme] body #createRequestForm{grid-template-columns:1fr}html[data-gronn-theme] body .request-info{margin-left:0;width:100%}html[data-gronn-theme] body .request-form{padding:18px!important}html[data-gronn-theme] body :is(.catalog-groups,.group-catalogs-grid){grid-template-columns:repeat(auto-fill,minmax(155px,1fr))!important}html[data-gronn-theme] body.gronn-shell .content-area{padding:16px 12px 70px}}
@media(prefers-reduced-motion:reduce){html[data-gronn-theme] body *{transition:none!important;animation:none!important;scroll-behavior:auto!important}}
}

/* Написано Codex: нейтральный рабочий фон вместо крупных цветовых пятен. */
@media screen {
html[data-gronn-theme] body::before{background:linear-gradient(135deg,var(--gp-bg),var(--gp-bg))!important}
html[data-gronn-theme] body::after{background:none!important;animation:none!important}
html[data-gronn-theme] body :is(.section-item,.card,.bloki,.directories-container,.directory-content,.filter-panel,.filters-container,.stats-card,.stat-card,.chart-container,.report-container,.table-container,.sqcdp-card){border-radius:13px!important;backdrop-filter:none!important}
html[data-gronn-theme] body .section-item{flex-direction:row!important;justify-content:flex-start!important;min-height:108px!important;height:108px!important}
html[data-gronn-theme] body :is(.documentation-sections,.group-catalogs-grid,.catalog-groups){align-items:stretch!important;align-content:start!important}
html[data-gronn-theme] body :is(.documentation-menu,.group-catalogs-container,.catalogs-menu){border-bottom:0!important;min-height:0!important;max-height:none!important}
html[data-gronn-theme] body .back-to-groups-btn{background:var(--gg-solid)!important;color:var(--gg-muted)!important;border:1px solid var(--gg-line)!important;padding:9px 13px!important;font-size:12px!important}
html[data-gronn-theme] body .documentation-container{height:auto!important;overflow:visible!important}
html[data-gronn-theme] body .catalog-pending{height:auto!important}
html[data-gronn-theme] body tbody tr:nth-child(even){background-color:var(--gg-head)!important}
html[data-gronn-theme] body .section-name small{display:inline-block;margin-top:5px;font-weight:400}
}
@media screen {
html[data-gronn-theme] body .request-info{flex-direction:row!important;text-align:left!important}
html[data-gronn-theme] body .request-status.В-ожидании{background:#fff4d8!important;color:#886014!important}
html[data-gronn-theme] body .request-status.В-работе{background:#e6eeff!important;color:#1749aa!important}
html[data-gronn-theme] body .request-status.Выполнена{background:#e2f4ec!important;color:#19664c!important}
html[data-gronn-theme] body .request-status.Отменена{background:#fbe9ec!important;color:#aa354d!important}
html[data-gronn-theme] body .content-area::-webkit-scrollbar{width:6px;height:6px}
html[data-gronn-theme] body .content-area::-webkit-scrollbar-thumb{background:#b8c7df;border-radius:8px}
html[data-gronn-theme] body .content-area::-webkit-scrollbar-button{display:none}
html[data-gronn-theme] body .request-media-gallery :is(img,video){max-height:180px!important;object-fit:contain}
}
@media screen {
html[data-gronn-theme] body :is(#client-report-block,#machine-report-block,#executor-report-block) .card-body:has(canvas){height:270px!important;max-height:270px!important;padding:16px!important;position:relative}
html[data-gronn-theme] body :is(#client-report-block,#machine-report-block,#executor-report-block) canvas{max-height:238px!important}
html[data-gronn-theme] body #createRequestForm{gap:14px 20px}
html[data-gronn-theme] body #createRequestForm textarea{min-height:110px!important}
html[data-gronn-theme] body .request-form h2{margin-bottom:18px!important}
}
