/* Familiar dense registry/card shell inspired by the working patterns managers use in MySklad. */
:root{--ms-green:#0b9568;--ms-green-dark:#087653;--ms-blue:#2676a8;--ms-shadow:0 3px 14px #182d3817}
.sheet-state-actions{display:flex;align-items:center;gap:8px}
.address-lookup{position:relative;display:block}.address-results{top:calc(100% + 2px)}.address-results button{font:inherit;color:#263740}
body{background:#f5f6f7;font-size:13px}.topbar{height:48px;padding:0 16px;gap:18px;box-shadow:0 1px 4px #1d313d20}.brand{min-width:auto;font-size:16px}.brand-mark{width:27px;height:27px;border-radius:4px}.main-nav{display:flex;align-items:stretch;height:100%;gap:1px}.main-nav>a,.main-nav summary{display:flex;align-items:center;height:100%;padding:0 13px;color:#273740;cursor:pointer;list-style:none}.main-nav summary::-webkit-details-marker{display:none}.main-nav>a:hover,.main-nav summary:hover,.main-nav details[open] summary{background:#edf2f3;color:var(--ms-green-dark)}.main-nav details{position:relative}.nav-menu{position:absolute;top:45px;left:0;z-index:50;display:grid;min-width:230px;padding:6px;background:#fff;border:1px solid #ced8dd;border-radius:3px;box-shadow:var(--ms-shadow)}.nav-menu a{padding:8px 10px;color:#263740;border-radius:3px}.nav-menu a:hover{background:#e9f5f0;color:var(--ms-green-dark)}.layout{display:block;min-height:0}.content{width:100%;max-width:none;padding:14px 18px 28px}.page-head{margin-bottom:9px}.page-head h1,.record-head h1{font-size:21px}.panel,.filter-panel,.record-head{border-radius:3px;box-shadow:0 1px 2px #1c31380a}.filter-panel{padding:8px 10px}.filter-main>input{height:31px}.primary{background:var(--ms-green);border-color:var(--ms-green-dark);border-radius:3px}.primary:hover{background:var(--ms-green-dark)}.button{display:inline-block;padding:7px 13px;border:1px solid #bbc8ce;border-radius:3px;background:#fff;color:#273740}.table-wrap table{font-size:13px}th,td{padding:6px 9px}th{background:#f1f4f5;color:#4f6069}.status{border-radius:3px}.record-head{padding:10px 13px}.editor-toolbar{position:sticky;top:48px;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:-14px -18px 12px;padding:8px 18px;background:#fff;border-bottom:1px solid #ccd7dc;box-shadow:0 2px 7px #1d313d12}.editor-toolbar>div{display:flex;align-items:center;gap:8px}.editor-actions{display:flex;gap:7px}.document-sheet{max-width:1420px;margin:0 auto;background:#fff;border:1px solid #ccd7dc;border-radius:3px;box-shadow:var(--ms-shadow)}.compact-sheet{max-width:900px}.sheet-title{display:flex;align-items:flex-start;justify-content:space-between;padding:14px 18px 10px;border-bottom:1px solid #e0e6e9}.sheet-title h1{margin:2px 0 0;font-size:21px}.conducted{display:flex;grid-template-columns:auto 1fr;align-items:center;gap:6px;padding:7px 10px;background:#edf7f3;border-radius:3px;color:#1f483b}.sheet-fields{display:grid;grid-template-columns:repeat(4,minmax(170px,1fr));gap:9px 13px;padding:13px 18px}.wide-field{grid-column:span 2}.extra-fields{border-top:1px solid #e3e9eb;border-bottom:1px solid #e3e9eb}.extra-fields summary{width:max-content;margin:9px 18px;color:var(--ms-blue);cursor:pointer}.extra-fields[open] summary{margin-bottom:0}.required{color:#c13e31}.positions-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:11px 18px 7px}.positions-head h2{margin:0;font-size:16px}.position-search{width:min(520px,48vw)}.position-search>input{width:100%}.positions-table th,.positions-table td{padding:6px 8px}.positions-table input{height:29px;padding:4px 6px}.cell-number{width:78px;text-align:right}.cell-money{width:110px;text-align:right}.icon-button{width:28px;height:28px;padding:0;border:0;background:transparent;font-size:20px}.icon-button.danger{color:#af4038}.document-bottom{display:grid;grid-template-columns:minmax(0,1fr) 240px;gap:15px;padding:13px 18px;border-top:1px solid #e3e9eb}.tax-options{display:grid;align-content:start;gap:8px}.lookup-field{position:relative}.lookup-results{position:absolute;top:100%;left:0;right:0;z-index:80;max-height:300px;overflow:auto;background:#fff;border:1px solid #b9c7cd;box-shadow:var(--ms-shadow)}.lookup-results[hidden]{display:none}.lookup-results button{display:block;width:100%;padding:7px 9px;border:0;border-bottom:1px solid #e8edef;border-radius:0;text-align:left}.lookup-results button:hover{background:#edf7f3}.lookup-results b,.lookup-results small{display:block}.lookup-results small{color:#718089}.lookup-wait{padding:10px;color:#718089}.card-actions-block{display:grid;gap:8px;padding:14px}.card-actions-block .primary{justify-self:start}.card-actions-block small{color:#6a7982}
@media(max-width:1000px){.main-nav>a,.main-nav summary{padding:0 8px}.sheet-fields{grid-template-columns:repeat(2,minmax(160px,1fr))}}
@media(max-width:720px){.topbar{height:auto;min-height:48px;flex-wrap:wrap}.main-nav{order:3;width:100%;overflow:auto}.user-menu span{display:none}.content{padding:10px}.editor-toolbar{top:0;margin:-10px -10px 10px;padding:8px 10px}.sheet-fields{grid-template-columns:1fr}.wide-field{grid-column:auto}.document-bottom{grid-template-columns:1fr}.position-search{width:100%}}
.positions-title{display:flex;align-items:center;gap:18px}.reserve-toggle{display:flex;grid-template-columns:auto 1fr;align-items:center;gap:6px;padding:5px 9px;border:1px solid #9dcaba;border-radius:3px;background:#edf8f4;color:#166247;cursor:pointer}.basis-line{padding:8px 18px;border-top:1px solid #e3e9eb;background:#f8fafb;color:#60717a}.compact-check{align-self:end;min-height:32px}.filter-caption{margin-top:8px;padding-top:8px;border-top:1px solid #e1e7ea;color:#53656e;font-weight:600}.always-open .filter-grid{margin-top:6px}.position-product,.lookup-row{display:flex;align-items:center;gap:8px}.line-thumb{width:34px;height:34px;flex:none;object-fit:contain;border:1px solid #dce3e7;border-radius:3px;background:#fff}.line-thumb.placeholder{display:grid;place-items:center;color:#91a0a8;background:#f1f4f5}.lookup-row>span:last-child{min-width:0}.lookup-results button{min-height:44px}.positions-table td:first-child{min-width:280px}
.product-record-title{display:flex;align-items:center;gap:12px}.record-thumb{width:54px;height:54px;flex:none;object-fit:contain;border:1px solid #dbe3e7;border-radius:4px;background:#fff}.record-thumb.placeholder{display:grid;place-items:center;color:#91a0a8;background:#f1f4f5;font-size:22px}
.document-totals{display:flex;flex-wrap:wrap;gap:6px;padding:8px 18px;border-top:1px solid #e3e9eb;background:#fbfcfc}.document-totals span{padding:5px 8px;border:1px solid #dbe3e6;border-radius:3px;color:#687780}.document-totals b{margin-left:4px;color:#25363f}
.directory-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:10px}.directory-card{display:flex;align-items:center;gap:11px;padding:14px;background:#fff;border:1px solid #d8e1e5;border-radius:3px;color:#263740;box-shadow:0 1px 2px #1c31380a}.directory-card:hover{border-color:#78bca5;background:#f6fcf9}.directory-card b,.directory-card small{display:block}.directory-card small{margin-top:3px;color:#75848c}.directory-icon{display:grid;place-items:center;width:36px;height:36px;flex:none;border-radius:4px;background:#e3f4ed;color:#087653;font-size:17px;font-weight:700}.description-cell{max-width:480px;overflow:hidden;text-overflow:ellipsis}.directory-fields{grid-template-columns:1fr 1fr}.directory-properties{padding:10px 18px}

/* Dense workspace: keep the familiar structure while fitting materially more data onscreen. */
body{font-size:12px;line-height:1.25}
.topbar{height:40px;padding:0 10px;gap:9px}
.brand{gap:5px;font-size:14px}.brand-mark{width:23px;height:23px;font-size:12px}
.main-nav>a,.main-nav summary{padding:0 9px}.nav-menu{top:38px;min-width:195px;padding:3px}.nav-menu a{padding:5px 7px}
.user-menu{gap:7px}.topbar-note{font-size:10px}
.content{padding:8px 10px 14px}
.page-head{gap:10px;margin-bottom:5px;min-height:27px}.page-head>div{display:flex;align-items:baseline;gap:8px}.page-head h1,.record-head h1{font-size:18px}.page-head p,.record-head p{margin:0;font-size:11px}
button,.primary,.button{min-height:26px;padding:4px 9px;border-radius:3px;line-height:1.15}
input:not([type="checkbox"]):not([type="radio"]),select{min-height:26px;padding:3px 6px;border-radius:3px}
textarea{padding:4px 6px;border-radius:3px;line-height:1.3}
label{gap:2px;font-size:11px}label input,label select,label textarea{font-size:12px}
.panel-head{gap:7px;padding:6px 9px}.panel h2,.panel-head h2{font-size:14px}
.filter-panel{position:relative;margin-bottom:6px;padding:5px 7px}.filter-panel.is-searching::after{content:"";position:absolute;top:8px;right:8px;width:11px;height:11px;border:2px solid #cbd8d3;border-top-color:var(--ms-green);border-radius:50%;animation:dense-search-spin .65s linear infinite}.filter-main{gap:5px}.filter-main>input{height:27px;width:min(560px,50vw)}
@keyframes dense-search-spin{to{transform:rotate(360deg)}}
.filter-panel details{margin-top:3px}.filter-panel summary{font-size:11px}.filter-caption{margin-top:4px;padding-top:4px;font-size:11px}
.filter-grid{grid-template-columns:repeat(auto-fit,minmax(125px,1fr));gap:5px 7px;margin-top:5px;padding-top:5px}.always-open .filter-grid{margin-top:4px}
.table-wrap table{font-size:12px}th,td,.positions-table th,.positions-table td{padding:3px 6px;line-height:1.2}th{font-size:10px}
td small{margin-top:0;font-size:10px}.entity-cell{gap:6px;min-width:215px}.table-thumb{width:30px;height:30px}.table-thumb.placeholder{font-size:13px}
.stock-value{min-width:34px;padding:2px 5px;border-radius:8px}.status{padding:2px 5px;font-size:10px}.status.large{font-size:11px}.check-state{font-size:11px}
.empty-cell,.empty-card{padding:15px}.pagination{gap:8px;margin:7px}.pagination a,.pagination span{padding:4px 7px}
.metrics{gap:6px;margin:7px 0}.metrics a{padding:8px 10px;border-radius:3px}.metrics b{font-size:20px;line-height:1}.metrics span{font-size:11px}
.sync-card{gap:10px;padding:6px 9px;border-radius:3px}.sync-card div{min-width:220px}.sync-card small{margin-top:1px;font-size:10px}progress{height:7px}
.empty-banner,.flash{margin-bottom:7px;padding:6px 9px;border-radius:3px}.flash.inside{margin:6px}
.breadcrumbs{gap:5px;margin-bottom:5px;font-size:11px}.record-head{gap:10px;margin-bottom:7px;padding:7px 9px}.record-type{margin-bottom:1px;font-size:10px}.record-actions{gap:5px}
.record-grid,.document-layout{grid-template-columns:minmax(0,1fr) 280px;gap:7px}.record-main,.record-side{gap:7px}
.product-record-title{gap:7px}.record-thumb{width:40px;height:40px}.record-thumb.placeholder{font-size:16px}
.gallery{gap:5px;padding:7px}.gallery-item img{width:72px;height:72px}.text-block{padding:8px;line-height:1.35}
.properties{padding:3px 8px}.properties>div{grid-template-columns:105px minmax(0,1fr);gap:7px;padding:4px 0}.properties.wide>div{grid-template-columns:125px minmax(0,1fr)}
.edit-card form,.record-form{gap:6px;padding:8px}.form-row{gap:6px}.permission-note{padding:7px}.small-button{padding:3px 6px}
.settings-grid{grid-template-columns:repeat(2,minmax(300px,1fr));gap:7px}.settings-card{padding:10px}.settings-card h2{margin-bottom:6px}.settings-card p{margin:5px 0}.settings-card form{gap:6px;margin-top:8px}.connection{padding:5px}
.sync-card.compact{padding:6px}.sync-card.compact progress{margin-top:5px}.permission-list>div{gap:6px;padding:4px 6px}.permission-list span{font-size:10px}
.directory-grid{grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:6px}.directory-card{gap:7px;padding:7px}.directory-card small{margin-top:1px;font-size:10px}.directory-icon{width:28px;height:28px;font-size:13px}.directory-properties{padding:5px 9px}
.editor-toolbar{top:40px;gap:7px;margin:-8px -10px 6px;padding:5px 10px}.editor-toolbar>div,.editor-actions{gap:5px}
.document-sheet{max-width:none}.compact-sheet{max-width:760px}.sheet-title{padding:7px 10px 6px}.sheet-title h1{margin-top:1px;font-size:17px}.sheet-state-actions{gap:4px}.conducted,.reserve-toggle{gap:4px;padding:4px 6px}
.sheet-fields{grid-template-columns:repeat(5,minmax(130px,1fr));gap:5px 8px;padding:7px 10px}.extra-fields summary{margin:5px 10px}.extra-fields[open] summary{margin-bottom:0}
.positions-head{gap:8px;padding:6px 10px 4px}.positions-head h2{font-size:14px}.positions-title{gap:8px}.position-search{width:min(420px,42vw)}
.positions-table input{height:24px;padding:2px 4px}.cell-number{width:66px}.cell-money{width:90px}.icon-button{width:23px;height:23px;font-size:17px}
.positions-table td:first-child{min-width:235px}.position-product,.lookup-row{gap:5px}.line-thumb{width:27px;height:27px}.lookup-results{max-height:240px}.lookup-results button{min-height:34px;padding:4px 6px}.lookup-wait{padding:6px}
.document-totals{gap:4px;padding:4px 10px}.document-totals span{padding:3px 5px}.basis-line{padding:5px 10px}.compact-check{min-height:26px}
.document-bottom{grid-template-columns:minmax(0,1fr) 190px;gap:8px;padding:7px 10px}.tax-options{gap:4px}.card-actions-block{gap:5px;padding:8px}
.auth-card{gap:8px;padding:18px}.auth-logo{width:40px;height:40px;border-radius:7px;font-size:19px}
@media(max-width:1100px){.sheet-fields{grid-template-columns:repeat(3,minmax(145px,1fr))}.record-grid,.document-layout{grid-template-columns:minmax(0,1fr) 250px}}
@media(max-width:760px){.topbar{height:auto;min-height:40px}.content{padding:6px}.editor-toolbar{top:0;margin:-6px -6px 6px;padding:5px 6px}.sheet-fields{grid-template-columns:repeat(2,minmax(135px,1fr))}.record-grid,.document-layout{grid-template-columns:1fr}.document-bottom{grid-template-columns:1fr}.page-head>div{display:block}.filter-main>input{width:100%}}
.filter-product-search{width:min(560px,50vw)}.filter-product-search>input{width:100%;height:27px}.document-product-suggestions{top:calc(100% + 2px);max-height:330px}.document-product-suggestions b,.document-product-suggestions small{white-space:normal}.document-product-suggestions .lookup-row>span:last-child{min-width:0}
@media(max-width:680px){.filter-product-search{width:100%}}
.customer-order-registry{width:100%;min-width:1180px;table-layout:fixed;font-size:10.5px}.customer-order-registry th,.customer-order-registry td{height:28px;padding:3px 4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.customer-order-registry th{color:#2874a0;font-size:9.5px;font-weight:500}.customer-order-registry th:nth-child(1){width:25px}.customer-order-registry th:nth-child(2){width:48px}.customer-order-registry th:nth-child(3){width:100px}.customer-order-registry th:nth-child(4){width:145px}.customer-order-registry th:nth-child(5){width:76px}.customer-order-registry th:nth-child(6){width:108px}.customer-order-registry th:nth-child(7){width:72px}.customer-order-registry th:nth-child(8){width:145px}.customer-order-registry th:nth-child(9){width:116px}.customer-order-registry th:nth-child(10){width:66px}.customer-order-registry th:nth-child(11){width:92px}.customer-order-registry th:nth-child(12){width:86px}.customer-order-registry th:nth-child(13){width:78px}.customer-order-registry th:nth-child(14){width:72px}.customer-order-registry .select-column{width:25px;min-width:25px;padding-left:4px;padding-right:2px;text-align:center}.customer-order-registry .select-column input{width:14px;height:14px;margin:0}.customer-order-registry .comment-cell{overflow:hidden;text-overflow:ellipsis}.customer-order-registry .order-state{display:block;min-width:0;max-width:100%;padding:2px 3px;overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap;font-size:9px;font-weight:700;text-transform:uppercase}.customer-order-registry .center{text-align:center}.printed-mark{display:inline-grid;place-items:center;width:16px;height:16px;border-radius:3px;background:#dff5e9;color:#08754f;font-weight:700}
.filter-grid>*{min-width:0}.filter-grid input:not([type="checkbox"]):not([type="radio"]),.filter-grid select,.filter-grid textarea{width:100%;min-width:0;max-width:100%}.filter-grid .lookup-field{min-width:0}.filter-grid .lookup-results{max-width:100%}
.editor-actions .danger,.confirm-dialog .danger{background:#a64036;border-color:#8e342c;color:#fff}.confirm-dialog{width:min(440px,calc(100vw - 32px));padding:0;border:1px solid #cbd5da;border-radius:6px;box-shadow:0 18px 60px #1d313d40}.confirm-dialog::backdrop{background:#17212b66}.confirm-dialog form{padding:18px}.confirm-dialog h3{margin:0 0 8px}.confirm-dialog p{line-height:1.45}.dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}
