/* v17: shared visual system. Local geometry and saved workspaces stay authoritative. */
body.portal-modern{--portal-bg:#f2f4f9;--portal-surface:#fff;--portal-ink:#253148;--portal-muted:#66738a;--portal-line:#e1e6f0;--portal-accent:#5662b6;--portal-accent-soft:#e9edff;--ui-bg:var(--portal-bg);--ui-surface:var(--portal-surface);--ui-surface-subtle:#f7f8fc;--ui-border:var(--portal-line);--ui-border-strong:#cdd5e5;--ui-text:var(--portal-ink);--ui-muted:var(--portal-muted);--ui-muted-2:#78849b;--ui-accent:var(--portal-accent);--ui-accent-hover:#4754a5;--ui-focus:#7a88d1;--ui-glass-bg:rgba(255,255,255,.78);--ui-glass-bg-strong:rgba(255,255,255,.91);--ui-glass-border:rgba(199,209,230,.75);--ui-glass-shadow:0 10px 30px #34477710,0 2px 8px #34477708,inset 0 1px 0 #ffffff;background:radial-gradient(ellipse at 4% 0%,#dfe5f8 0,transparent 42%),radial-gradient(ellipse at 96% 0%,#e9e5f7 0,transparent 38%),var(--portal-bg)!important;background-attachment:fixed!important;color:var(--portal-ink);font:14px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}
body.portal-modern>header{background:rgba(249,250,255,.82)!important;backdrop-filter:blur(24px) saturate(1.15);-webkit-backdrop-filter:blur(24px) saturate(1.15);border-bottom:1px solid #ffffffc9!important;box-shadow:0 3px 16px #354a7810,inset 0 1px #fff;color:var(--portal-ink)}
body.portal-modern .brand{letter-spacing:.01em;font-weight:650}body.portal-modern .header-greeting{font-weight:500}body.portal-modern .header-greeting-meta{color:var(--portal-muted)}
body.portal-modern :is(.portal-nav-panel,.mobile-nav-panel,.weather-dialog,.dashboard-modal,.avatar-qr-dialog){background:rgba(250,251,255,.96)!important;backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);border:1px solid #fff!important;box-shadow:0 20px 70px #24375e28,0 4px 18px #24375e14!important;border-radius:14px!important;color:var(--portal-ink)}
body.portal-modern :is(.portal-nav-drawer-links,.desktop-nav-links) a{border-radius:7px}body.portal-modern :is(.portal-nav-drawer-links,.desktop-nav-links) a:hover{background:var(--portal-accent-soft);color:var(--portal-accent)}
body.portal-modern :is(.dashboard-card,.profile-card,.profile-form,.role-editor-card,.form,.purchase-overview-card,.purchase-workflow-card,.contract-command-card,.contract-delivery-card,.procurement-card,.inventory-object-card,.personal-stock-card){background:rgba(255,255,255,.96)!important;border-color:var(--portal-line)!important;border-radius:12px!important;box-shadow:0 6px 22px #3447770a,0 1px 4px #34477706!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;color:var(--portal-ink)}
body.portal-modern :is(.dashboard-card,.inventory-object-card,.personal-stock-card):hover{box-shadow:0 9px 26px #34477712,0 2px 7px #34477708!important;border-color:#ccd5e9!important}
body.portal-modern :is(.page-head,.wf-heading,.skud-page-head) h1{font-size:26px!important;font-weight:650!important;letter-spacing:-.02em;line-height:1.2}body.portal-modern :is(.page-head,.skud-page-head){margin-bottom:18px}body.portal-modern :is(.page-head,.skud-page-head) p{color:var(--portal-muted)}
body.portal-modern :is(button,.button){font-weight:550;border-radius:8px}body.portal-modern button:disabled{cursor:not-allowed;opacity:.55}body.portal-modern :is(.button,button[type=submit]):not(.secondary):not(.wf-remove):not(.link-danger):not(.danger-light):not(.danger):not(.inline-link):not(.s7-icon-button){background-color:var(--portal-accent);color:#fff}
body.portal-modern :is(.secondary,button.secondary){background:#edf0f8;color:#465571;border-color:#dce2ef}
body.portal-modern :is(input,select,textarea){accent-color:var(--portal-accent)}body.portal-modern :is(input[type=text],input[type=email],input[type=tel],input[type=number],input[type=password],input[type=search],input[type=date],input[type=time],select,textarea){background-color:#fff;color:var(--portal-ink);border-color:#dce2ed;border-radius:8px}
body.portal-modern :is(input,select,textarea):focus-visible{outline:2px solid #8391d3;outline-offset:2px}body.portal-modern :is(a,button,summary):focus-visible{outline:2px solid #8391d3;outline-offset:3px}
body.portal-modern .role-editor-card :is(input[type=text],textarea){max-width:560px}body.portal-modern .role-editor-card input[type=text]{max-width:380px}
body.portal-modern :is(.inventory-toolbar,.procurement-toolbar,.personal-stock-toolbar,.contract-prep-shell,.contract-reference-shell,.procurement-reference-shell){border-color:var(--portal-line);color:var(--portal-ink)}
body.portal-modern :is(.inventory-final-toolbar,.inventory-workbench-toolbar,.procurement-toolbar,.personal-stock-toolbar){background:#f7f8fc!important;border-color:var(--portal-line)!important;border-radius:10px!important;box-shadow:0 3px 12px #34477706!important}
body.portal-modern :is(.inventory-final-card-title,.inventory-card-filter-line,.inventory-card-core-line) :is(a,button):hover{background:transparent!important;box-shadow:none!important;color:var(--portal-accent)!important;text-decoration:underline;text-underline-offset:3px}
body.portal-modern :is(.procurement-table,.contract-spec-table,.contract-spec-edit-table,.contract-prep-table,.wf-table){background:#fff;color:var(--portal-ink)}body.portal-modern :is(.procurement-table,.contract-spec-table,.contract-spec-edit-table,.contract-prep-table) th{background:#f4f6fb;color:#5e6b83;border-color:var(--portal-line)}body.portal-modern :is(.procurement-table,.contract-spec-table,.contract-spec-edit-table,.contract-prep-table) td{border-color:#e6eaf2}body.portal-modern :is(.procurement-table,.contract-spec-table,.contract-spec-edit-table,.contract-prep-table) tbody tr:hover{background:#f7f8fd}
body.portal-modern :is(.dashboard-section-icon,.today-icon){background:#eef1fc!important;color:var(--portal-accent)!important;border-color:#e3e8f7!important;box-shadow:none!important;border-radius:10px!important}
body.portal-modern :is(.notification-item,.notification-thread){border-color:var(--portal-line);background-color:#fff}body.portal-modern .portal-flash-toast{background:#fff;border:1px solid var(--portal-line);box-shadow:0 8px 26px #34477716}
body.portal-modern .portal-chat{--chat-accent:#5662b6;--chat-accent-soft:#e9edff;--chat-panel:#f8f9fd;--chat-card:#fff;--chat-card-strong:#fff;--chat-line:#e1e6f0;--chat-text:#253148;--chat-muted:#66738a;--chat-own:#edf0fd}
body.portal-modern :is(.warehouse-shell,.personal-warehouse-v2){--pw-card:#fff;--pw-border:#e1e6f0;--pw-text:#253148;--pw-muted:#66738a}
body.portal-modern .s7-app{--s7-bg:#f2f4f9;--s7-panel:#fff;--s7-card:#fff;--s7-border:#e1e6f0;--s7-text:#253148;--s7-muted:#66738a;--s7-accent:#5662b6;--s7-blue:#5662b6;--s7-green:#2c8061;--s7-violet:#7270b8;background:#f2f4f9;color:#253148}
body.portal-modern :is(.s7-dialog-shell,.personal-dialog-shell,.oz-tool-shell,.contract-prep-shell){background:#fff;color:var(--portal-ink);border-color:var(--portal-line);border-radius:13px}
body.portal-modern.portal-embed{background:var(--portal-bg)!important}
@media(max-width:760px){body.portal-modern>header{padding:9px 12px}body.portal-modern :is(.page-head,.wf-heading,.skud-page-head) h1{font-size:22px!important}body.portal-modern :is(input,select,textarea){font-size:16px}body.portal-modern :is(.wf-shell,.skud-shell) button{min-height:40px}}
@media(prefers-reduced-motion:reduce){body.portal-modern *,body.portal-modern *:before,body.portal-modern *:after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
@media(prefers-reduced-transparency:reduce){body.portal-modern>header,body.portal-modern :is(.portal-nav-panel,.mobile-nav-panel,.weather-dialog,.dashboard-modal){background:#f9faff!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}}
@media print{body.portal-modern{background:#fff!important;color:#000!important}body.portal-modern .wf-panel{box-shadow:none!important}.wf-form-actions,.wf-row-actions,.wf-personnel-upload{display:none!important}}
/* Sklad 7 uses the same light surfaces, including dialogs mounted outside its app. */
body.portal-modern :is(.s7-sidebar,.s7-toolbar,.s7-mobile-dock){background:rgba(249,250,255,.94);border-color:var(--portal-line);box-shadow:0 6px 24px #34477712}
body.portal-modern :is(.s7-product-card,.s7-order-card,.s7-cart-row,.s7-batch-card,.s7-filter-menu,.s7-toast){background:#fff;border-color:var(--portal-line);color:var(--portal-ink);box-shadow:0 4px 16px #3447770d}
body.portal-modern :is(.s7-brand,.s7-article,.s7-product-copy strong,.s7-order-counts b,.s7-cart-total b,.s7-help h3){color:var(--portal-ink)}
body.portal-modern :is(.s7-brand,.s7-stock-metrics,.s7-stock-metrics>div,.s7-pack-pill,.s7-order-counts span,.s7-stat-summary>div,.s7-stat-table,.s7-stat-table>div,.s7-detail-location,.s7-movements,.s7-movement,.s7-fulfill-head>div,.s7-fulfill-product,.s7-meta-editor,.s7-form-grid,.s7-dialog-shell>header){border-color:var(--portal-line)}
body.portal-modern :is(.s7-manufacturer,.s7-photo-empty,.s7-pack-pill,.s7-stat-summary>div,.s7-stat-head,.s7-name-preview,.s7-segment,.s7-meta-editor,.s7-form-grid,.s7-detail-location,.s7-fulfill-product){background:#f3f5fb;color:var(--portal-muted)}
body.portal-modern :is(.s7-side-nav button,.s7-side-nav a,.s7-side-bottom>a,.s7-side-bottom small,.s7-filter-menu label,.s7-help,.s7-product-copy>small,.s7-product-copy em,.s7-order-mini-items span,.s7-order-card time,.s7-order-counts span){color:var(--portal-muted)}
body.portal-modern :is(.s7-side-nav button,.s7-side-nav a):hover,body.portal-modern .s7-side-nav .active,body.portal-modern .s7-mobile-dock button.active,body.portal-modern .s7-segment button.active{background:var(--portal-accent-soft);color:var(--portal-accent);box-shadow:none}
body.portal-modern :is(.s7-filter>button,.s7-card-actions button,.s7-cart-qty button,.s7-remove,.s7-pencil,.s7-sleep,.s7-mobile-menu,.s7-side-collapse,.s7-admin-card-foot button,.s7-segment button,.s7-mobile-dock button,.s7-detail-summary button,.s7-dialog-actions>button:first-child,.s7-order-card footer a,.s7-back-top){background:#edf0f8;color:#465571;border-color:#dce2ef}
body.portal-modern :is(.s7-primary,.s7-order-card footer button,.s7-brand-seven,.s7-unit-toggle button.active){background:var(--portal-accent);border-color:var(--portal-accent);color:#fff}
body.portal-modern :is(.s7-search input,.s7-card-actions input,.s7-batch-card input,.s7-admin-location-filters select,.s7-stat-controls select,.s7-stat-controls input,.s7-list-toolbar input,.s7-orders-toolbar input,.s7-meta-editor input,.s7-meta-editor textarea,.s7-meta-editor select,.s7-form-grid input,.s7-fulfill-product input){background:#fff;color:var(--portal-ink);border-color:var(--portal-line)}
body.portal-modern .s7-product-copy strong{font-size:12px;min-height:32px}body.portal-modern .s7-article{font-size:14px}
body.portal-modern :is(.s7-product-copy>small,.s7-manufacturer,.s7-pack-pill small,.s7-stock-metrics small,.s7-admin-card-foot span,.s7-admin-card-foot small,.s7-order-card time,.s7-order-counts span,.s7-order-mini-items>div,.s7-order-status,.s7-batch-card label,.s7-stat-summary small,.s7-stat-table .s7-stat-head,.s7-meta-editor label,.s7-form-grid label,.s7-detail h3,.s7-photo-slot b,.s7-photo-slot input,.s7-photo-slot button,.s7-detail-location small,.s7-detail-location span,.s7-movement,.s7-fulfill-head small,.s7-fulfill-product small,.s7-fulfill-product header span,.s7-fulfill-product>p,.s7-fulfill-product label em,.s7-fulfill-product footer){font-size:11px;color:var(--portal-muted)}
body.portal-modern :is(.s7-stock-metrics b,.s7-order-card>strong,.s7-order-card footer a,.s7-order-card footer button,.s7-name-preview b,.s7-fulfill-product label span b){font-size:12px}
body.portal-modern .s7-order-status{background:#fff3d8;color:#89601d}body.portal-modern .archive-order .s7-order-status{background:#e2f4ec;color:#286b50}
body.portal-modern :is(.s7-movement .plus,.s7-fulfill-product footer.ok){color:#287553}body.portal-modern :is(.s7-remove,.s7-movement .minus,.s7-photo-slot button,.s7-empty.error){color:#ae414b}
body.portal-modern .s7-stock-metrics .has-reserve b{color:#946719}body.portal-modern .s7-dialog-shell{box-shadow:0 20px 65px #34477726}
body.portal-modern :is(.s7-dialog,.s7-lightbox)::backdrop{background:#25314860;backdrop-filter:blur(8px)}
body.portal-modern .s7-product-photo{background:#edf0f8}body.portal-modern .s7-app:before{display:none}
