/* Shared CRM styles; unused legacy component selectors removed. */
:root{--yellow:#ffd400;--yellow-soft:#fff8cc;--ink:#17191c;--muted:#667085;--bg:#f3f5f7;--card:#fff;--line:#e2e6ea;--green:#067647;--red:#b42318;--blue:#175cd3;--radius:18px;--shadow:0 1px 2px #10182808,0 8px 24px #10182809}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);font:14px/1.5 Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif}
button,input,select,textarea{font:inherit}
button,a,input,select,textarea{outline-offset:3px}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #d6b300}
button{cursor:pointer}
button:disabled{opacity:.45;cursor:not-allowed}
a{color:var(--blue);text-decoration:none}
h1,h2,h3,p{margin-top:0}
h1{font-size:29px;letter-spacing:-.8px;margin-bottom:4px;line-height:1.2}
h2{font-size:17px;letter-spacing:-.3px;margin-bottom:16px}
h3{font-size:14px;margin-bottom:12px}
.muted{color:var(--muted)}
.small{font-size:12px}
.strong{font-weight:650}
.num{font-variant-numeric:tabular-nums;white-space:nowrap}
.green{color:var(--green)}
.red{color:var(--red)}
.shell{display:grid;grid-template-columns:232px minmax(0,1fr);min-height:100vh}
.nav{display:flex;flex-direction:column;gap:4px;overflow:auto}
.nav button{display:flex;align-items:center;gap:11px;width:100%;background:transparent;border:0;text-align:left;color:#bfc3cb;padding:11px 13px;border-radius:11px;font-weight:550}
.nav button:hover{background:#25282e;color:white}
.nav button.active{background:var(--yellow);color:#17191c;font-weight:700}
.icon{width:18px;height:18px;flex-shrink:0;vertical-align:middle}
.nav .count{margin-left:auto;background:#ffffff15;border-radius:6px;padding:1px 6px;font-size:11px}
.nav .active .count{background:#00000012}
.dot{width:7px;height:7px;background:#64d49a;border-radius:50%;display:inline-block}
.workspace{min-width:0}
.database{font-size:11px;background:var(--yellow-soft);border:1px solid #f0e3a1;border-radius:7px;padding:5px 9px;color:#705b00}
.role{font-size:10px;color:var(--muted)}
main{padding:29px 32px 40px;max-width:1700px;margin:auto}
.eyebrow{font-size:10px;font-weight:800;letter-spacing:1.6px;color:#8a6500;margin-bottom:8px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:1px solid var(--line);background:#fff;color:var(--ink);border-radius:10px;padding:10px 15px;min-height:42px;font-size:12px;font-weight:650;white-space:nowrap}
.btn:hover{background:#f7f8fa}
.btn.primary{background:var(--yellow);border-color:var(--yellow)}
.btn.primary:hover{background:#edc600}
.btn.dark{background:#202329;color:white;border-color:#202329}
.btn.small{min-height:32px;padding:6px 10px;font-size:11px;border-radius:8px}
.btn.danger{color:var(--red);border-color:#fecaca}
.btn.ghost{border:0;background:transparent;padding:4px 6px;min-height:28px;color:var(--blue)}
.btn.icon-only{padding:8px;min-width:36px}
.button-row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.card{background:white;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:22px;min-width:0}
.card.no-pad{padding:0;overflow:hidden}
.card-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:17px;gap:8px}
.card-title h2{margin:0}
.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin-bottom:20px}
.stat-icon{background:#f2f4f7;border-radius:8px;width:29px;height:29px;display:grid;place-items:center;color:#727c8c}
.grid-2{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(290px,1fr);gap:20px;margin-bottom:20px}
.grid-equal{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.notice{background:#fff9df;border:1px solid #f4e6b0;color:#7b6012;padding:11px 15px;border-radius:11px;font-size:12px;margin-bottom:18px}
.notice.info{background:#eff6ff;border-color:#dbeafe;color:#175cd3}
.notice.neutral{background:#f8fafc;border-color:var(--line);color:var(--muted)}
.notice.error{background:#fff1f0;border-color:#fecaca;color:var(--red)}
.toolbar{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:17px 20px;border-bottom:1px solid var(--line)}
.toolbar input.search{min-width:180px;flex:1;max-width:330px}
.toolbar select{width:auto;min-width:130px}
.toolbar input[type=date]{width:146px}
.toolbar .result-count{margin-left:auto;color:var(--muted);font-size:11px}
table{border-collapse:collapse;width:100%;font-size:12px;text-align:left}
th{background:#f8fafc;color:#748092;font-weight:550;padding:12px 18px;white-space:nowrap;font-size:10px;letter-spacing:.3px;border-bottom:1px solid var(--line)}
td{padding:15px 18px;border-bottom:1px solid #eef0f3;vertical-align:middle}
tr:last-child td{border-bottom:0}
tbody tr:hover{background:#fcfcfd}
.row-link{border:0;background:none;padding:0;font-weight:750;color:var(--ink);cursor:pointer;text-align:left}
.row-link:hover{color:#a28100}
.subline{color:var(--muted);font-size:11px;margin-top:3px;max-width:250px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.badge{display:inline-flex;gap:5px;align-items:center;white-space:nowrap;font-size:10px;font-weight:600;padding:4px 8px;border-radius:6px;background:#eef0f3;color:#667085}
.badge.yellow{background:#fff5c2;color:#8a6500}
.badge.blue{background:#eff6ff;color:#175cd3}
.badge.green{background:#ecfdf3;color:#067647}
.badge.red{background:#fff1f0;color:#b42318}
.progress{height:4px;background:#edf0f2;border-radius:4px;overflow:hidden;margin-top:6px;width:100%;min-width:75px}
.progress i{height:100%;background:#56b38a;display:block;border-radius:4px}
.empty{text-align:center;padding:54px 22px;color:var(--muted)}
.empty h3{color:#344054;font-size:16px;margin:12px 0 6px}
.empty .icon{width:34px;height:34px;color:#a1a9b5}
.empty p{font-size:12px;max-width:340px;margin:0 auto 18px}
.summary-line{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 0;border-bottom:1px solid #eef0f3;font-size:12px}
.summary-line:last-child{border:0}
.activity{display:flex;gap:10px;padding:12px 0;border-bottom:1px solid #eef0f3}
.activity:last-child{border:0}
.activity .bullet{width:8px;height:8px;margin-top:6px;border-radius:50%;background:#ffd400;flex-shrink:0}
.activity p{margin:0;font-size:12px}
.activity small{color:var(--muted);font-size:10px}
.chart-row{display:grid;grid-template-columns:100px 1fr 96px;align-items:center;gap:12px;font-size:11px;padding:10px 0}
.chart-track{height:13px;background:#f0f2f5;border-radius:4px;overflow:hidden}
.chart-fill{height:100%;background:var(--yellow);border-radius:4px}
.chart-fill.dark{background:#7f8b9a}
.task-actions select{width:165px}
.pill{padding:7px 13px;border:1px solid var(--line);border-radius:20px;background:white;font-size:11px}
.pill.active{background:#202329;color:white;border-color:#202329}
input,select,textarea{width:100%;min-height:40px;border:1px solid #dfe3e9;border-radius:9px;background:white;color:var(--ink);padding:9px 11px;font-size:12px}
input[type=checkbox]{width:16px;height:16px;min-height:0;accent-color:#d3b000}
input[readonly]{background:#f8fafc;color:var(--muted)}
textarea{resize:vertical;min-height:76px}
label{display:block;color:#475467;font-size:11px;font-weight:650}
label input,label select,label textarea{display:block;margin-top:6px;font-weight:400}
label .help{display:block;font-weight:400;color:var(--muted);font-size:10px;margin-top:4px}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}
.form-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.form-grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}
.full{grid-column:1/-1}
.check-label{display:flex;align-items:center;gap:8px;font-weight:500;font-size:12px}
.check-label input{margin:0}
.checks{display:flex;gap:12px;flex-wrap:wrap;margin-top:9px}
.section-gap{margin-top:22px}
.form-section{padding:20px;background:white;border:1px solid var(--line);border-radius:13px;margin-bottom:15px}
.form-section h3{font-size:13px}
.modal-header{display:flex;align-items:center;justify-content:space-between;padding:22px 25px;border-bottom:1px solid var(--line);gap:12px;background:white}
.modal-header h2{font-size:20px;margin:0;letter-spacing:-.5px}
.modal-header p{margin:4px 0 0;font-size:11px;color:var(--muted)}
dialog{border:1px solid var(--line);border-radius:18px;padding:0;width:650px;max-width:calc(100vw - 35px);max-height:92vh;box-shadow:0 30px 100px #0003;color:var(--ink);background:#f6f7f9}
dialog.wide{width:1100px}
dialog::backdrop{background:#11182770;backdrop-filter:blur(3px)}
.modal-body{padding:22px 25px;max-height:calc(92vh - 165px);overflow:auto}
.modal-footer{padding:16px 25px;border-top:1px solid var(--line);display:flex;gap:9px;align-items:center;justify-content:flex-end;background:white}
.modal-footer .left{margin-right:auto}
.close{background:#f2f4f7;border:0;border-radius:8px;width:32px;height:32px;font-size:21px;color:#667085}
.component-sale{font-size:11px;font-weight:700;min-height:37px;display:flex;align-items:center}
.order-totals{display:flex;justify-content:flex-end;gap:30px;padding:17px 20px;background:#202329;border-radius:12px;color:white}
.order-totals label{color:#b8c0cc;font-size:10px;margin-bottom:4px}
.order-totals strong{font-size:19px}
.order-totals .total{color:var(--yellow)}
.contact-row{display:grid;grid-template-columns:1fr 1fr 1fr 28px;gap:8px;margin-bottom:8px}
.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#202329;color:white;padding:13px 20px;border-radius:11px;box-shadow:0 10px 35px #0002;z-index:100;font-size:13px;max-width:90vw}
.toast.error{background:#b42318}
.footer-note{color:#8c94a1;font-size:10px;margin-top:22px;display:flex;justify-content:space-between}
.overdue{color:var(--red)}
.strike{text-decoration:line-through;opacity:.6}
.mobile-menu{display:none}
.alert-strip{padding:10px 20px;background:#fff5c2;font-size:12px;text-align:center}
.invoice-preview{background:#fff8cc;padding:15px;border-radius:10px;margin-bottom:16px}
.invoice-preview strong{font-size:20px}
@media(min-width:1500px){main{padding:35px 42px}
}
@media(max-width:1150px){.shell{grid-template-columns:195px minmax(0,1fr)}
main{padding:25px 22px}
.stats{gap:10px}
.grid-2{grid-template-columns:1fr}
.grid-equal{grid-template-columns:1fr}
.form-grid.four{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:760px){.shell{display:block}
.mobile-menu{display:inline-flex}
.database{font-size:9px}
main{padding:22px 15px}
.stats{grid-template-columns:repeat(2,1fr)}
.btn{font-size:11px;padding:9px 11px}
.card{padding:16px}
.toolbar{padding:12px}
.toolbar input.search{max-width:none}
.toolbar .result-count{display:none}
.grid-2{gap:15px}
.form-grid,.form-grid.three,.form-grid.four{grid-template-columns:1fr 1fr}
.modal-body{padding:16px}
.modal-header{padding:17px}
.modal-footer{padding:13px 16px;flex-wrap:wrap}
.modal-header h2{font-size:18px}
.contact-row{grid-template-columns:1fr 1fr}
.order-totals{gap:16px;justify-content:space-between}
.order-totals strong{font-size:15px}
.form-section{padding:15px}
.footer-note{display:block}
.chart-row{grid-template-columns:80px 1fr 85px;gap:8px}
}
@media print{.toolbar,.modal-footer,.footer-note{display:none!important}
.shell{display:block}
body{background:white}
main{padding:0}
.card{box-shadow:none}
dialog{position:static;max-height:none;max-width:none;width:100%;border:0}
.modal-body{max-height:none}
}
.nav button{padding-top:9px;padding-bottom:9px;font-size:12px}
#order-page{max-width:1250px;margin:0 auto}
#order-page .page-head{margin-bottom:24px}
#order-page .position-content{padding:0 23px 23px}
#order-page .form-section{padding:23px}
#order-page .position-box>summary{padding:19px 23px}
@media(max-width:760px){#order-page .position-content{padding:0 13px 15px}
#order-page .form-section{padding:16px}
#order-page .page-head{gap:10px}
}

/* Shared CRM styles; unused legacy component selectors removed. */
:root{--b: #111}
*{box-sizing: border-box}
.app{display: grid}
.side{position: sticky;top: 0;height: 100vh}
.logo{font-weight: 900}
.logo small{display: block}
.nav button{text-align: left;cursor: pointer}
.top{display: flex;justify-content: space-between;gap: 12px}
.top h1{margin: 0}
.muted{color: var(--muted);font-size: 13px}
.grid{display: grid;align-items: start}
.fields{display: grid;grid-template-columns: repeat(2, minmax(0, 1fr))}
input,select{width: 100%;padding: 10px 12px;border: 1px solid var(--line);background: #fff;font-size: 14px}
.check{display: flex;gap: 8px;align-items: center;padding: 10px 12px;border: 1px solid var(--line);border-radius: 11px}
.check input{width: auto}
.btn{font-weight: 800;cursor: pointer}
.hidden{display: none !important}
.badge{display: inline-block;border-radius: 999px}
.row{display: flex;justify-content: space-between;gap: 12px;padding: 9px 0;border-bottom: 1px dashed #ddd}
.row.total{font-size: 19px;font-weight: 900;border: 0;padding-top: 14px}
.ok{padding: 10px 12px;border-radius: 11px;font-size: 13px;margin-bottom: 10px}
table{width: 100%;border-collapse: collapse;font-size: 13px}
th,td{padding: 9px 7px;border-bottom: 1px solid var(--line);text-align: left}
th{color: var(--muted);font-size: 11px;text-transform: uppercase}
.tabs{margin-bottom: 14px}
.small{font-size: 12px;color: var(--muted);line-height: 1.45}
.actions{display: flex;gap: 8px;flex-wrap: wrap}
.settings-pane{display: none}
.settings-pane.active{display: block}
@media (max-width: 1000px){.app{grid-template-columns: 1fr}
.side{height: auto;position: static}
.grid{grid-template-columns: 1fr}
.summary{position: static}
}
@media (max-width: 650px){.fields,.fields.three{grid-template-columns: 1fr}
.main{padding: 12px}
}
.modal{background: #fff}
.modal h2{margin-top: 0}
.modal-actions{display: flex;justify-content: flex-end;gap: 8px;margin-top: 16px}
.tag{background: #eef2f6}
.tag.form{background: #fff5cc;color: #6b5400}
.tech-switch{display: grid;grid-template-columns: repeat(3, minmax(0, 1fr))}
.tech-btn{border-radius: 12px;padding: 12px;font-weight: 800;cursor: pointer}
.tech-btn.active{border-color: #d8b400}
@media (max-width: 760px){.tech-switch{grid-template-columns: 1fr 1fr}
}
.modal{max-height: 92vh;padding: 0;overflow: hidden}
.modal-shell{display: flex;flex-direction: column;max-height: 92vh}
.modal-head{display: flex;align-items: flex-start;justify-content: space-between;gap: 18px;border-bottom: 1px solid var(--line)}
.modal-head h2{margin: 0}
.modal-head p{margin: 5px 0 0;color: var(--muted)}
.modal-body{overflow: auto}
.modal-actions{margin: 0;border-top: 1px solid var(--line);position: sticky;bottom: 0}
.editor-section h3{margin: 0 0 5px}
.equipment-subpane{display: block}
.equipment-subpane.hidden{display: none}
@media (max-width: 800px){.modal{max-height: 96vh;border-radius: 16px}
.modal-shell{max-height: 96vh}
.modal-head,.modal-body,.modal-actions{padding-left: 14px;padding-right: 14px}
}
.settings-pane.card{overflow: hidden}
.settings-pane > .tabs,.settings-pane > .equipment-tabs{margin: 0;padding: 14px 16px;background: #fafafa;border: 0;border-bottom: 1px solid var(--line);border-radius: 0}
.settings-pane > .binding-subpane,.settings-pane > .equipment-subpane,.settings-pane#materialsPane,.settings-pane#postpressPane{padding: 18px}
.settings-toolbar .muted{max-width: 720px}
.status-dot{display: inline-flex;align-items: center;gap: 6px;font-weight: 800}
.status-dot:before{content: "";width: 7px;height: 7px;border-radius: 50%;background: #12b76a}
.status-dot.off:before{background: #f04438}
@media (max-width: 850px){.settings-toolbar{flex-direction: column}
.settings-toolbar .btn{width: 100%}
}
.check-chip{border: 1px solid var(--line);background: #fff;font-size: 12px}
.info{margin-top: 8px;padding: 9px 11px;border-radius: 10px;font-size: 12px}
:root{--danger: #b42318;--success: #067647;--radius-sm: 10px;--radius-md: 14px;--radius-lg: 18px;--shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.06);--shadow-md: 0 8px 28px rgba(16, 24, 40, 0.09)}
button,input,select{font-family: inherit}
input:disabled,select:disabled{background: #f2f4f7;color: #98a2b3;cursor: not-allowed;border-color: #e4e7ec}
.tabs{display: flex !important;flex-wrap: nowrap;overflow: auto;margin: 0 0 16px !important}
.tabs button{white-space: nowrap;border: 0 !important;background: transparent !important;cursor: pointer;box-shadow: none !important}
.settings-pane.card{padding: 0 !important}
.settings-pane > .equipment-tabs,.settings-pane > .binding-settings-tabs,.settings-pane > .material-settings-tabs{margin: 0 !important;border: 0 !important;border-bottom: 1px solid var(--border) !important;border-radius: 0 !important}
.settings-toolbar{display: flex;justify-content: space-between;gap: 14px}
.settings-toolbar h2{margin: 0 0 4px}
.settings-toolbar .muted{line-height: 1.45}
.editor-section{border: 1px solid var(--border);margin-bottom: 14px;box-shadow: none}
label{margin-bottom: 6px}
input,select{min-height: 40px;border-radius: 10px}
.check-chip{min-height: 40px;border-radius: 10px}
.check-chip input{flex: none}
.settings-table-wrap{border: 1px solid var(--border);overflow: auto;background: #fff}
.settings-table{min-width: 860px}
.settings-table td{vertical-align: middle}
.settings-table tbody tr:last-child td{border-bottom: 0}
.table-actions{display: flex;justify-content: flex-end}
.tag{display: inline-flex;align-items: center;min-height: 24px;padding: 4px 8px;border-radius: 999px;font-size: 10px;font-weight: 800;margin: 2px}
.tag.print{background: #ecfdf3;color: #067647}
.tag.none{background: #fff1f0;color: #b42318}
.modal{width: min(980px, calc(100vw - 32px))}
.modal-actions .btn{min-width: 110px}
.btn{border-radius: 10px;min-height: 40px;padding: 10px 14px}
@media (max-width: 760px){.settings-toolbar{flex-direction: column}
.settings-toolbar .btn{width: 100%}
.tabs{flex-wrap: nowrap}
.modal{width: calc(100vw - 18px)}
.modal-head,.modal-body,.modal-actions{padding-left: 14px;padding-right: 14px}
}
.check-grid{display: grid;grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));gap: 8px;width: 100%}
.check-chip{display: flex !important;align-items: center !important;justify-content: flex-start !important;gap: 9px !important;min-width: 0;width: 100%;padding: 10px 11px !important;line-height: 1.25;white-space: normal}
.check-chip input[type="checkbox"]{width: 16px !important;height: 16px !important;min-width: 16px !important;min-height: 16px !important;max-width: 16px !important;max-height: 16px !important;margin: 0 !important;padding: 0 !important;flex: 0 0 16px !important;appearance: auto}
.check-chip span{display: block;min-width: 0;overflow-wrap: anywhere}
.search-select-trigger{position: relative}
.search-select-trigger.disabled{background: #f2f4f7;color: #98a2b3;cursor: not-allowed}
.search-select.open .search-select-menu{display: block}
.search-select-search{padding-bottom: 7px}
.search-select-option:hover,.search-select-option.active{background: #fffbeb;border-color: #f5d65b}
.search-select-empty{padding: 16px;text-align: center;color: #98a2b3;font-size: 12px}
.search-select{position: relative !important;display: block !important;width: 100% !important}
.search-select-trigger{display: block !important;width: 100% !important;border: 1px solid #d0d5dd !important;background: #fff !important;text-align: left !important;cursor: pointer !important;box-shadow: none !important;color: #111827 !important}
.search-select-trigger:disabled{background: #f2f4f7 !important;color: #98a2b3 !important;cursor: not-allowed !important}
.search-select-value{font-weight: 800;line-height: 1.2;color: #111827;white-space: nowrap;overflow: hidden;text-overflow: ellipsis}
.search-select-meta{line-height: 1.2;color: #667085;margin-top: 3px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis}
.search-select-menu{display: none;position: absolute;z-index: 99999;left: 0;right: 0;top: calc(100% + 5px);max-height: 360px;overflow: auto;background: #fff;border: 1px solid #d0d5dd;padding: 8px}
.search-select.open > .search-select-menu{display: block !important}
.search-select-search{position: sticky;top: -8px;z-index: 5;background: #fff;padding: 8px 0 7px}
.search-select-search input{width: 100% !important}
.search-select-option{cursor: pointer;border: 1px solid transparent}
.search-select-option-meta{margin-top: 3px}
.search-select-option{display: flex !important;flex-direction: column !important;align-items: flex-start !important;gap: 3px !important;padding: 9px 10px !important}
.search-select-option-title{display: block !important;width: 100% !important;font-size: 12px !important;font-weight: 800 !important;line-height: 1.25 !important;color: #111827 !important;white-space: normal !important}
.search-select-option-meta{display: block !important;width: 100% !important;font-size: 10px !important;font-weight: 500 !important;line-height: 1.3 !important;color: #667085 !important;white-space: normal !important}
.search-select-option-meta:empty:after{content: "Материал";color: #98a2b3}
.search-select-trigger .search-select-meta{display: block !important}
.directory-name{line-height: 1.3 !important;color: #111827 !important}
.directory-subline{font-weight: 400 !important;color: #667085 !important;margin-top: 3px !important}
:is(#calcProduct, #wideProduct, #flatProduct) .product-main-row{display: grid;align-items: end}
:is(#calcProduct, #wideProduct, #flatProduct) .product-main-row.row-2{grid-template-columns: repeat(2, minmax(0, 1fr))}
:is(#calcProduct, #wideProduct, #flatProduct) .product-main-row.row-3{grid-template-columns: repeat(3, minmax(0, 1fr))}
:is(#calcProduct, #wideProduct, #flatProduct) .product-main-row > div{min-width: 0}
:is(#calcProduct, #wideProduct, #flatProduct) .product-main-row label{display: flex;margin: 0 0 6px}
:is(#calcProduct, #wideProduct, #flatProduct) .product-main-row input,:is(#calcProduct, #wideProduct, #flatProduct) .product-main-row select{width: 100%;margin: 0}
@media (max-width: 760px){:is(#calcProduct, #wideProduct, #flatProduct) .product-main-row.row-2,:is(#calcProduct, #wideProduct, #flatProduct) .product-main-row.row-3{grid-template-columns: 1fr}
}
@container layout-card (max-width: 400px){
  .layout-specs-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
  }
  .layout-specs-pair {
    justify-content: space-between;
  }
}
:root{--y: #ffd400;--yellow: #ffd400;--accent: #ffd400;--accent-soft: #fff8cc;--ink: #17191c;--ink-2: #344054;--muted: #667085;--muted-2: #667085;--bg: #f3f5f7;--card: #fff;--surface: #fff;--surface-2: #f8fafc;--line: #e2e6ea;--border: #e2e6ea;--line-strong: #cfd5dc;--red: #b42318;--red-soft: #fff1f0;--green: #067647;--green-soft: #ecfdf3;--amber: #8a6500;--amber-soft: #fff9df;--blue: #175cd3;--blue-soft: #eff6ff;--control-h: 40px;--radius-control: 11px;--radius-card: 18px;--shadow-card:
    0 1px 2px rgba(16, 24, 40, 0.035), 0 8px 24px rgba(16, 24, 40, 0.045);--shadow-float: 0 18px 54px rgba(16, 24, 40, 0.18)}
html{scroll-behavior: smooth}
body{margin: 0;background: var(--bg);color: var(--ink);font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;font-size: 14px;line-height: 1.45;-webkit-font-smoothing: antialiased}
button,input,select,textarea{font: inherit}
button{touch-action: manipulation}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline: 3px solid rgba(255, 212, 0, 0.32) !important;outline-offset: 2px}
.app{grid-template-columns: 252px minmax(0, 1fr);min-height: 100vh}
.side{padding: 20px 18px;background: #151618;color: #fff;border-right: 1px solid #24262a;display: flex;flex-direction: column;gap: 0;z-index: 30}
.logo{padding: 16px;border-radius: 15px;background: var(--y);color: #141414;font-size: 20px;line-height: 1.08;letter-spacing: -0.025em;box-shadow: none}
.logo small{font-size: 10.5px;line-height: 1.35;margin-top: 7px;font-weight: 700;opacity: 0.72;letter-spacing: 0}
.nav{display: grid;gap: 7px;margin-top: 18px}
.nav button{min-height: 44px;padding: 11px 13px;border: 1px solid transparent;border-radius: 11px;background: transparent;color: #d8dadd;font-size: 13px;font-weight: 700;transition: 0.16s ease}
.nav button:hover{background: #222429;color: #fff}
.nav button.active{background: #fff;color: #171717;border-color: #fff;box-shadow: 0 5px 18px rgba(0, 0, 0, 0.18)}
.side > .small{margin-top: 18px !important;color: #9fa4ad !important;font-size: 11.5px;line-height: 1.55}
.main{min-width: 0;padding: 26px clamp(18px, 2.4vw, 36px) 48px;max-width: 1780px;width: 100%;margin: 0 auto}
.top{align-items: flex-start;margin-bottom: 20px;padding: 2px 0 18px;border-bottom: 1px solid var(--line)}
.top-copy{min-width: 260px}
.page-eyebrow{margin-bottom: 4px;color: #8a6b00;font-size: 10px;font-weight: 800;letter-spacing: 0.09em;text-transform: uppercase}
.top h1{font-size: 28px;line-height: 1.12;letter-spacing: -0.035em;font-weight: 800;color: #101114}
.top .muted{margin-top: 7px;max-width: 780px;font-size: 12px;line-height: 1.5}
.btn,.tech-btn{min-height: var(--control-h);border-radius: var(--radius-control);padding: 10px 14px;font-size: 12.5px;font-weight: 750;line-height: 1.2;transition:
    border-color 0.16s,
    background 0.16s,
    transform 0.16s,
    box-shadow 0.16s}
.btn:hover,.tech-btn:hover{transform: translateY(-1px)}
.btn:active,.tech-btn:active{transform: translateY(0)}
.btn{border: 1px solid #e0bd00;background: var(--y);color: #171717;box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04)}
.btn:hover{background: #ffdc2f;border-color: #d0ad00}
.btn.light{background: #fff;border: 1px solid var(--line-strong);color: #344054}
.btn.light:hover{background: #f8fafc;border-color: #aeb6c1}
.btn.dark{background: #202225;border: 1px solid #202225;color: #fff}
.btn.dark:hover{background: #000;border-color: #000}
.btn.red{background: #fff;border: 1px solid #f4c7c3;color: #b42318}
.btn.red:hover{background: var(--red-soft);border-color: #e9aaa4}
.grid{grid-template-columns: minmax(580px, 1.55fr) minmax(330px, 0.78fr);gap: 20px}
.card{padding: 20px;margin-bottom: 16px;border: 1px solid var(--line);border-radius: var(--radius-card);background: #fff;box-shadow: var(--shadow-card)}
.card h2{margin: 0 0 16px;font-size: 17px;line-height: 1.25;letter-spacing: -0.012em;font-weight: 760;color: #17191c}
.card h3{margin: 18px 0 10px;font-size: 13px;line-height: 1.3;font-weight: 750;color: #344054}
.fields{gap: 14px 12px}
.fields.three{grid-template-columns: repeat(3, minmax(0, 1fr))}
.fields > div{min-width: 0}
label{display: block;margin: 0 0 6px;color: #475467;font-size: 11px;font-weight: 700;line-height: 1.3}
input:not([type="checkbox"]):not([type="radio"]),select,textarea{width: 100%;min-height: var(--control-h);padding: 10px 12px;border: 1px solid var(--line-strong);border-radius: var(--radius-control);background: #fff;color: #17191c;font-size: 13px;line-height: 1.2;box-shadow: 0 1px 1px rgba(16, 24, 40, 0.025);transition:
    border-color 0.15s,
    box-shadow 0.15s,
    background 0.15s}
input:not([type="checkbox"]):not([type="radio"]):hover,select:hover,textarea:hover{border-color: #aeb6c1}
input:not([type="checkbox"]):not([type="radio"]):focus,select:focus,textarea:focus{border-color: #c5a400;box-shadow: 0 0 0 3px rgba(255, 212, 0, 0.18);outline: 0}
input:disabled,select:disabled,textarea:disabled{background: #f2f4f7 !important;color: #8f98a7 !important;border-color: #e2e6ea !important;box-shadow: none;opacity: 1}
.check,.check-chip{min-height: var(--control-h);padding: 10px 11px !important;border: 1px solid var(--line) !important;border-radius: var(--radius-control) !important;background: #fff !important;color: #344054;font-size: 11.5px !important;font-weight: 650 !important}
.check:hover,.check-chip:hover{border-color: #b6bdc7 !important;background: #fbfcfd !important}
.tech-switch{gap: 8px;padding: 5px;border: 1px solid var(--line);border-radius: 14px;background: #f0f2f4}
.tech-btn{border: 0;background: transparent;color: #667085;box-shadow: none}
.tech-btn.active{background: #fff;border: 0;color: #17191c;box-shadow: 0 1px 4px rgba(16, 24, 40, 0.12)}
.tabs{gap: 5px !important;padding: 5px !important;border: 1px solid var(--line) !important;border-radius: 13px !important;background: #f0f2f4 !important}
.tabs button{min-height: 38px;padding: 9px 13px !important;border-radius: 9px !important;color: #667085 !important;font-size: 12px !important;font-weight: 700 !important}
.tabs button.active{background: #fff !important;color: #17191c !important;box-shadow: 0 1px 4px rgba(16, 24, 40, 0.1) !important}
:is(#calcProduct, #wideProduct, #flatProduct){border-top: 3px solid var(--y);padding-top: 18px}
:is(#calcProduct, #wideProduct, #flatProduct) .product-main-row{gap: 14px 12px !important}
:is(#calcProduct, #wideProduct, #flatProduct) .product-main-row:first-of-type{margin-top: 0}
:is(#calcProduct, #wideProduct, #flatProduct) .product-main-row label{min-height: auto;align-items: initial;margin-bottom: 6px;line-height: 1.3}
.ok,.info{border-radius: 11px !important;padding: 10px 12px !important;font-size: 11.5px !important;line-height: 1.45 !important;box-shadow: none !important}
.ok{background: var(--green-soft) !important;border: 1px solid #a9e8c5 !important;color: var(--green) !important}
.info{background: var(--blue-soft) !important;border: 1px solid #bfd4ff !important;color: #264f96 !important}
.postpress-operation-number{display: inline-flex;align-items: center;justify-content: center;flex: 0 0 24px;width: 24px;height: 24px;border-radius: 7px;background: var(--y);color: #171717;font-size: 12px;font-weight: 700;line-height: 1;font-variant-numeric: tabular-nums;box-shadow: inset 0 0 0 1px rgba(23, 23, 23, 0.06)}
@container postpress (max-width: 540px){
  .postpress-work-row.has-target.has-counter,
  .postpress-material-row.has-target.has-counter {
    grid-template-columns: minmax(0, 1fr) var(--pp-counter-width);
  }
  .postpress-work-row.has-target > .pp-name-field,
  .postpress-material-row.has-target > .pp-name-field {
    grid-column: 1 / -1;
  }
  .postpress-work-row.has-target:not(.has-counter) {
    grid-template-columns: minmax(0, 1fr);
  }
  .postpress-extra-fields {
    grid-template-columns: minmax(0, 1fr);
  }
}
@container postpress (max-width: 340px){
  .postpress-work-row.has-counter,
  .postpress-material-row.has-counter,
  .postpress-work-row.has-target.has-counter,
  .postpress-material-row.has-target.has-counter {
    grid-template-columns: minmax(0, 1fr);
  }
  .postpress-item .pp-counter {
    width: min(100%, var(--pp-counter-width));
    justify-self: end;
  }
}
@container pp-editor (max-width: 620px){
  .pp-editor .pp-multiplier-grid {
    grid-template-columns: minmax(0, 1fr) 160px;
  }
  .pp-multiplier-grid > .pp-field:first-child {
    grid-column: 1 / -1;
  }
  .pp-editor .pp-size-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@container pp-editor (max-width: 380px){
  .pp-editor-grid,
  .pp-editor .pp-name-grid,
  .pp-editor .pp-multiplier-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .pp-editor .pp-size-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.summary{position: static;top: auto;padding: 18px;background: #f9fafb;border-color: #dbe0e5;box-shadow: 0 8px 28px rgba(16, 24, 40, 0.07)}
.badge{padding: 5px 9px;border: 1px solid #ecd04b;background: #fff8cc;color: #624f00;font-size: 10px;font-weight: 750}
.summary > .divider{margin: 16px 0}
.summary > h3{margin: 0 0 9px;color: #475467;font-size: 11px;font-weight: 800;letter-spacing: 0.055em;text-transform: uppercase}
.settings-pane.card{border-radius: 16px !important;box-shadow: var(--shadow-card)}
.settings-pane > .equipment-tabs,.settings-pane > .binding-settings-tabs,.settings-pane > .material-settings-tabs{padding: 12px 14px !important;background: #f8fafc !important}
.settings-pane > .binding-subpane,.settings-pane > .equipment-subpane{padding: 20px !important}
.settings-toolbar{align-items: center;margin-bottom: 16px}
.settings-toolbar h2{font-size: 18px;letter-spacing: -0.015em}
.settings-toolbar .muted{font-size: 11.5px}
.settings-table-wrap{border-radius: 13px;border-color: var(--line)}
.settings-table th{padding: 10px 12px;background: #f5f7f9;color: #667085;font-size: 9.5px;letter-spacing: 0.055em}
.settings-table td{padding: 11px 12px;font-size: 12px}
.settings-table tbody tr:hover{background: #fffcf0}
.directory-name{font-size: 13px !important;font-weight: 700 !important}
.directory-subline{font-size: 10.5px !important;line-height: 1.4 !important}
.status-dot{font-size: 10.5px}
.editor-section{padding: 17px;border-radius: 14px;background: #fff}
.editor-section h3{font-size: 14px}
.search-select-trigger{border-color: var(--line-strong) !important}
.search-select-trigger:hover{border-color: #aeb6c1 !important}
.search-select-value{font-size: 12px}
.search-select-meta{font-size: 9.5px}
.search-select-menu{border-color: var(--line-strong);border-radius: 12px;box-shadow: var(--shadow-float)}
.search-select-option{min-height: 50px !important;border-radius: 8px}
.search-select-option:hover{background: #fffbea;border-color: #ead36c}
.search-select-option.selected{background: #fff8cc;border-color: #dfbd1a}
.modal{border-radius: 19px;border: 1px solid rgba(255, 255, 255, 0.55);box-shadow: 0 30px 100px rgba(0, 0, 0, 0.34)}
.modal-head{padding: 19px 22px 15px;background: #fff}
.modal-head h2{font-size: 20px;letter-spacing: -0.02em}
.modal-head p{font-size: 11.5px;line-height: 1.5}
.modal-body{padding: 18px 22px 22px;background: #f7f8fa}
.modal-actions{padding: 13px 22px;background: #fff}
@media (max-width: 1180px){.app{grid-template-columns: 218px minmax(0, 1fr)}
.main{padding-left: 20px;padding-right: 20px}
.grid{grid-template-columns: minmax(500px, 1fr) minmax(310px, 0.72fr);gap: 16px}
.fields.three{grid-template-columns: repeat(2, minmax(0, 1fr))}
}
@media (max-width: 980px){.app{grid-template-columns: 1fr;grid-template-rows: auto 1fr}
.side{position: static;height: auto;padding: 14px 16px;display: grid;grid-template-columns: auto 1fr auto;gap: 12px;align-items: center}
.logo{min-width: 150px;padding: 12px 14px;font-size: 17px}
.logo small{display: none}
.nav{display: flex;margin: 0;justify-content: center}
.nav button{min-width: 116px;text-align: center}
.side > .small{display: none}
.grid{grid-template-columns: 1fr}
.summary{position: static}
}
@media (max-width: 720px){.main{padding: 16px 12px 34px}
.top{flex-direction: column;gap: 14px}
.top .actions{width: 100%;justify-content: flex-start}
.top .actions > *{flex: 1 1 auto}
.top h1{font-size: 24px}
.card{padding: 16px;border-radius: 15px}
.fields,.fields.three,:is(#calcProduct, #wideProduct, #flatProduct) .product-main-row.row-2,:is(#calcProduct, #wideProduct, #flatProduct) .product-main-row.row-3{grid-template-columns: 1fr !important}
.side{grid-template-columns: 1fr}
.logo{text-align: center}
.nav{justify-content: stretch}
.nav button{flex: 1}
}
@media (max-width: 460px){.top .actions > *{flex-basis: calc(50% - 4px)}
}
select,input:not([type="number"]):not([type="checkbox"]):not([type="radio"]),.search-select-value,.search-select-meta,.directory-name,.tag{white-space: nowrap !important;overflow: hidden !important;text-overflow: ellipsis !important}
select option{white-space: nowrap}
.directory-name{max-width: 100%}
.tag{max-width: 100%}
:is(#calcProduct, #wideProduct, #flatProduct) .form-group{padding: 15px 0;border-top: 1px solid var(--line)}
:is(#calcProduct, #wideProduct, #flatProduct) .form-group:first-of-type{padding-top: 0;border-top: 0}
:is(#calcProduct, #wideProduct, #flatProduct) .form-group:last-of-type{padding-bottom: 0}
:is(#calcProduct, #wideProduct, #flatProduct) .product-main-row{margin-top: 0 !important}
:is(#calcProduct, #wideProduct, #flatProduct) .product-main-row.row-2,:is(#calcProduct, #wideProduct, #flatProduct) .product-main-row.row-3,:is(#calcProduct, #wideProduct, #flatProduct) .product-main-row.row-4{grid-template-columns: repeat(auto-fit, minmax(155px, 1fr))}
.editor-section .fields{align-items: end}
.editor-section .fields > div{min-width: 0}
@media (max-width: 720px){:is(#calcProduct, #wideProduct, #flatProduct) .product-main-row.row-2,:is(#calcProduct, #wideProduct, #flatProduct) .product-main-row.row-3,:is(#calcProduct, #wideProduct, #flatProduct) .product-main-row.row-4{grid-template-columns: 1fr !important}
}
@media (prefers-reduced-motion: reduce){*{scroll-behavior: auto !important;transition: none !important}
}
.side-header,.mobile-menu-panel{display: contents}
.mobile-menu-toggle{display: none}
@media (max-width: 980px){.side{position: sticky !important;top: 0;z-index: 100;height: auto !important;display: block !important;padding: 10px 12px !important;border-right: 0;border-bottom: 1px solid #2a2c30;background: #151618}
.side-header{display: flex;align-items: center;justify-content: space-between;gap: 12px}
.side .logo{flex: 0 0 auto;min-width: 0;width: auto;max-width: max-content;padding: 10px 13px;font-size: 17px;line-height: 1.2;text-align: left;white-space: nowrap}
.side .logo small{display: none !important}
.mobile-menu-toggle{display: inline-flex;flex: 0 0 44px;width: 44px;height: 44px;padding: 0;border: 1px solid #34373c;border-radius: 12px;background: #222428;align-items: center;justify-content: center;flex-direction: column;gap: 5px;color: #fff;cursor: pointer;transition:
      background 0.18s ease,
      border-color 0.18s ease}
.mobile-menu-toggle:hover{background: #2b2e33;border-color: #44484f}
.mobile-menu-toggle:focus-visible{outline: 3px solid rgba(255, 212, 0, 0.3);outline-offset: 2px}
.mobile-menu-toggle span{display: block;width: 20px;height: 2px;border-radius: 2px;background: currentColor;transform-origin: center;transition:
      transform 0.18s ease,
      opacity 0.18s ease}
.side.menu-open .mobile-menu-toggle span:nth-child(1){transform: translateY(7px) rotate(45deg)}
.side.menu-open .mobile-menu-toggle span:nth-child(2){opacity: 0}
.side.menu-open .mobile-menu-toggle span:nth-child(3){transform: translateY(-7px) rotate(-45deg)}
.mobile-menu-panel{display: none;margin-top: 10px;padding: 12px;border: 1px solid #303238;border-radius: 14px;background: #1b1d20;box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);max-height: calc(100vh - 84px);overflow: auto;overscroll-behavior: contain}
.side.menu-open .mobile-menu-panel{display: block}
.side .nav{display: grid !important;grid-template-columns: repeat(2, minmax(0, 1fr));gap: 8px;margin: 0 !important}
.side .nav button{min-width: 0 !important;min-height: 42px;padding: 10px 12px;text-align: center;border: 1px solid #33363b;border-radius: 10px;background: #23262a;color: #e5e7eb;font-size: 13px;font-weight: 750}
.side .nav button:hover{background: #2a2d31}
.side .nav button.active{border-color: #d5b313;background: var(--y);color: #171717}
}
.modal:has(.product-size-editor){width: min(740px, calc(100vw - 32px))}
#settingsPage #coefficientsPane .coefficient-settings-table{min-width: 0}
#settingsPage #coefficientsPane .directory-col-name{width: auto}
@container directory (max-width:640px){
  #settingsPage #coefficientsPane .coefficient-settings-table tr {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  #settingsPage #coefficientsPane .coefficient-settings-table td {
    grid-column: 1 / -1;
  }
  #settingsPage #coefficientsPane .coefficient-control {
    max-width: none;
    margin: 0;
  }
  #settingsPage #coefficientsPane .coefficient-control input {
    text-align: left;
  }
}
.fields.print-parameters-grid{grid-template-columns: repeat(2, minmax(0, 1fr)) !important;align-items: start}
@media (max-width: 600px){.fields.print-parameters-grid,.fields.print-coverage-row{grid-template-columns: minmax(0, 1fr) !important}
}
#settingsPage,:is(#settingsPage, #savedPage) .settings-pane,:is(#settingsPage, #savedPage) .equipment-subpane,:is(#settingsPage, #savedPage) .material-subpane,:is(#settingsPage, #savedPage) .binding-subpane{min-width: 0}
:is(#settingsPage, #savedPage) .compact-directory-wrap{width: 100%;min-width: 0;box-sizing: border-box;container-type: inline-size;container-name: directory}
:is(#settingsPage, #savedPage) .compact-directory-table{width: 100%;min-width: 0;table-layout: fixed}
:is(#settingsPage, #savedPage) .compact-directory-table .directory-col-name{width: 46%}
:is(#settingsPage, #savedPage) .directory-columns-3 .directory-col-name{width: 60%}
:is(#settingsPage, #savedPage) .compact-directory-table .directory-col-actions{width: calc(2 * var(--icon-button-size) + 36px)}
:is(#settingsPage, #savedPage) .compact-directory-table th{white-space: normal;overflow-wrap: anywhere}
:is(#settingsPage, #savedPage) .compact-directory-table td{vertical-align: middle}
:is(#settingsPage, #savedPage) .directory-cell{min-width: 0;max-width: 100%}
:is(#settingsPage, #savedPage) .directory-value{display: block;min-width: 0;max-width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis}
:is(#settingsPage, #savedPage) .directory-record-heading{display: flex;align-items: center;gap: 8px;min-width: 0}
:is(#settingsPage, #savedPage) .directory-record-heading .directory-name{min-width: 0;flex: 1 1 auto}
:is(#settingsPage, #savedPage) .directory-inactive{flex: 0 0 auto;padding: 2px 5px;border-radius: 5px;background: #f2f4f7;color: #667085;font-size: 10px;white-space: nowrap}
:is(#settingsPage, #savedPage) .directory-actions .table-actions{flex-wrap: nowrap}
.directory-sr-only{position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip-path: inset(50%);white-space: nowrap}
:is(#settingsPage, #savedPage) .directory-empty td{text-align: center;white-space: normal;padding: 24px 12px}
:is(#settingsPage, #savedPage) .settings-toolbar{flex-wrap: wrap;gap: 12px}
:is(#settingsPage, #savedPage) .settings-toolbar > div{min-width: 0;flex: 1 1 260px}
:is(#settingsPage, #savedPage) .settings-toolbar > .btn{flex: 0 1 auto;max-width: 100%;white-space: normal}
@media (max-width: 850px){:is(#settingsPage, #savedPage) .settings-toolbar{align-items: stretch}
:is(#settingsPage, #savedPage) .settings-toolbar > div{flex: 0 1 auto}
}
@container directory (max-width:640px){
  :is(#settingsPage, #savedPage) .compact-directory-table,
  :is(#settingsPage, #savedPage) .compact-directory-table tbody {
    display: block;
  }
  :is(#settingsPage, #savedPage) .compact-directory-table colgroup,
  :is(#settingsPage, #savedPage) .compact-directory-table thead {
    display: none;
  }
  :is(#settingsPage, #savedPage) .compact-directory-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 16px;
    padding: 14px;
    border-bottom: 1px solid var(--line, #e2e6eb);
  }
  :is(#settingsPage, #savedPage) .compact-directory-table tr:last-child {
    border-bottom: 0;
  }
  :is(#settingsPage, #savedPage) .compact-directory-table td {
    display: block;
    min-width: 0;
    padding: 0;
    border: 0;
  }
  :is(#settingsPage, #savedPage)
    .compact-directory-table
    td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: #667085;
    font-size: 11px;
  }
  :is(#settingsPage, #savedPage) .compact-directory-table td:first-child {
    grid-column: 1 / -1;
  }
  :is(#settingsPage, #savedPage)
    .compact-directory-table
    td:first-child::before {
    display: none;
  }
  :is(#settingsPage, #savedPage) .compact-directory-table .directory-actions {
    grid-column: 1 / -1;
    padding-top: 10px;
    border-top: 1px solid var(--line, #e2e6eb);
  }
}
@container directory (max-width:360px){
  :is(#settingsPage, #savedPage) .compact-directory-table tr {
    grid-template-columns: minmax(0, 1fr);
  }
}
#modalRoot .unified-editor{width: min(900px, calc(100vw - 32px));max-height: calc(100dvh - 32px);padding: 0;border-radius: 18px;overflow: hidden}
#modalRoot .unified-editor .modal-shell{display: flex;flex-direction: column;max-height: calc(100dvh - 32px);min-height: 0}
#modalRoot .unified-editor .modal-head{flex: none;padding: 20px 24px 16px;border-bottom: 1px solid var(--line, #e2e6eb)}
#modalRoot .unified-editor .modal-head h2{font-size: 20px;line-height: 1.3}
#modalRoot .unified-editor .modal-head p{font-size: 12px;line-height: 1.5;color: #667085}
#modalRoot .unified-editor .modal-body{min-height: 0;overflow-y: auto;padding: 0 24px 24px;background: #f8fafc}
#modalRoot .unified-editor .modal-actions{flex: none;display: flex;justify-content: flex-end;gap: 10px;padding: 16px 24px;border-top: 1px solid var(--line, #e2e6eb)}
#modalRoot .unified-editor .editor-tabs{position: sticky;top: 0;z-index: 2;display: flex;flex-wrap: wrap !important;gap: 4px;margin: 0 -24px 20px;padding: 12px 24px;background: #fff;border: 0;border-bottom: 1px solid var(--line, #e2e6eb);border-radius: 0;overflow: visible}
#modalRoot .unified-editor .editor-tab{min-height: 40px;padding: 9px 13px !important;font-size: 13px;font-weight: 500;border: 1px solid transparent;border-radius: 8px;background: transparent;color: #667085}
#modalRoot .unified-editor .editor-tab.active{background: #fff5cc;border-color: #e8d690;color: #403711}
#modalRoot .unified-editor .editor-tab:focus-visible{outline: 2px solid #8a6b08;outline-offset: 2px}
#modalRoot .unified-editor .editor-section{margin: 0 0 16px;padding: 18px;border: 1px solid var(--line, #e2e6eb);border-radius: 12px;background: #fff;box-shadow: none}
#modalRoot .unified-editor .modal-body > .editor-section:first-child,#modalRoot .unified-editor .modal-body > .fields:first-child,#modalRoot .unified-editor .modal-body > .editor-pane:first-child{margin-top: 20px}
#modalRoot .unified-editor .editor-section:last-child{margin-bottom: 0}
#modalRoot .unified-editor .editor-section-title{margin: 0 0 14px;gap: 12px}
#modalRoot .unified-editor h3{font-size: 14px;font-weight: 600;line-height: 1.4}
#modalRoot .unified-editor .fields,#modalRoot .unified-editor .pp-editor-grid{display: grid;grid-template-columns: repeat(2, minmax(0, 1fr)) !important;gap: 16px;align-items: start}
#modalRoot .unified-editor .fields > *,#modalRoot .unified-editor .pp-editor-grid > *{min-width: 0}
#modalRoot .unified-editor .fields > div:has(> label[for$="_name"]),#modalRoot .unified-editor .pp-name-grid > :first-child,#modalRoot .unified-editor .pp-multiplier-grid > :first-child{grid-column: 1 / -1}
#modalRoot .unified-editor label{display: block;margin-bottom: 6px;font-size: 12px !important;font-weight: 500;line-height: 1.45;letter-spacing: 0;text-transform: none;white-space: normal}
#modalRoot .unified-editor input:not([type="checkbox"]),#modalRoot .unified-editor select{width: 100%;max-width: 100%;min-width: 0;border: 1px solid var(--line-strong, #cfd5dd);background: #fff;text-overflow: ellipsis}
#modalRoot .unified-editor input:focus{text-overflow: clip}
#modalRoot .unified-editor input:not([type="checkbox"]),#modalRoot .unified-editor select:not([multiple]){box-sizing: border-box}
#modalRoot .unified-editor .fields > div:has(> #m_sell){grid-column: 1 / -1}
#modalRoot .unified-editor select[multiple]{min-height: 150px !important}
#modalRoot .unified-editor select:not([multiple]){white-space: nowrap}
#modalRoot .unified-editor input:disabled,#modalRoot .unified-editor select:disabled{background: #f2f4f7;color: #667085}
#modalRoot .unified-editor .muted,#modalRoot .unified-editor .small{font-size: 12px !important;line-height: 1.5;color: #667085}
#modalRoot .unified-editor .editor-note{padding: 12px 14px;margin: 0 0 16px;border: 1px solid #e2e6eb;border-radius: 10px;background: #f2f4f7;font-size: 12px;line-height: 1.5}
#modalRoot .unified-editor :is(.pp-editor-grid, .fields, .check-grid) + .editor-note{margin-top: 12px}
#modalRoot .unified-editor .pp-editor-grid + .muted,#modalRoot .unified-editor .check-grid + .muted{margin-top: 8px}
#modalRoot .unified-editor :is(input, select, textarea) + :is(.muted, .small),#modalRoot .unified-editor label:has(input) + :is(.muted, .small),#modalRoot .unified-editor .fields + :is(.muted, .small){margin-top: 8px}
#modalRoot .unified-editor .editor-explanation{margin: 0 0 16px;padding: 12px 14px;border: 1px solid #e2e6eb;border-radius: 10px;background: #f8fafc;font-size: 12px;line-height: 1.5;color: #667085}
#modalRoot .unified-editor .editor-explanation summary{cursor: pointer;font-weight: 500;color: #475467}
#modalRoot .unified-editor .editor-explanation p{margin: 10px 0 0}
#modalRoot .unified-editor .availability-grid,#modalRoot .unified-editor .check-grid{display: grid;grid-template-columns: repeat(2, minmax(0, 1fr));gap: 8px}
#modalRoot .unified-editor .availability-grid label,#modalRoot .unified-editor .check-chip,#modalRoot .unified-editor label.check,#modalRoot .unified-editor .wide-ink{display: flex;align-items: center;gap: 8px;min-height: 42px;margin: 0;padding: 10px !important;border: 1px solid #e2e6eb;border-radius: 9px;background: #f8fafc}
#modalRoot .unified-editor input[type="checkbox"]{width: 16px;height: 16px;min-width: 16px;flex: 0 0 16px;margin: 0}
#modalRoot .unified-editor #f_ops .check-chip span{min-width: 0;white-space: nowrap;overflow: hidden;text-overflow: ellipsis}
#modalRoot .unified-editor .pp-editor-group{margin: 16px 0;padding: 16px;border: 1px solid #e2e6eb;border-radius: 10px}
#modalRoot .unified-editor .pp-editor-group legend{padding: 0 6px;font-size: 12px;font-weight: 600}
#modalRoot .unified-editor .service-price-fields{display: grid;grid-template-columns: repeat(2, minmax(0, 1fr));gap: 16px;margin-top: 16px}
#modalRoot .unified-editor .unified-tariff{padding: 16px;border: 1px solid #e2e6eb;border-radius: 12px;background: #fff;margin: 0 0 12px}
#modalRoot .unified-editor .unified-tariff-head{display: flex;align-items: center;justify-content: space-between;gap: 12px;margin-bottom: 12px;font-size: 12px;font-weight: 600;color: #667085}
#modalRoot .unified-editor .unified-tariff .tariff-grid{display: grid;grid-template-columns: repeat(2, minmax(0, 1fr)) !important;gap: 16px}
#modalRoot .unified-editor .editor-field-error,#modalRoot .unified-editor .modal-validation{margin-top: 6px;color: #b42318;font-size: 12px;line-height: 1.5}
#modalRoot .unified-editor .modal-validation{padding: 12px;margin: 16px 0;border: 1px solid #fecdca;background: #fff5f4;border-radius: 10px}
#modalRoot .unified-editor [aria-invalid="true"]{border-color: #d92d20 !important}
@media (max-width: 600px){#modalRoot .unified-editor{width: calc(100vw - 16px);max-height: calc(100dvh - 16px)}
#modalRoot .unified-editor .modal-shell{max-height: calc(100dvh - 16px)}
#modalRoot .unified-editor .modal-head,#modalRoot .unified-editor .modal-actions{padding: 14px}
#modalRoot .unified-editor .modal-body{padding: 0 14px 14px}
#modalRoot .unified-editor .editor-tabs{margin: 0 -14px 14px;padding: 10px 14px;gap: 3px}
#modalRoot .unified-editor .editor-tab{padding: 8px 10px !important;font-size: 12px}
#modalRoot .unified-editor .editor-section{padding: 14px}
#modalRoot .unified-editor .fields,#modalRoot .unified-editor .pp-editor-grid,#modalRoot .unified-editor .service-price-fields,#modalRoot .unified-editor .unified-tariff .tariff-grid,#modalRoot .unified-editor .availability-grid,#modalRoot .unified-editor .check-grid{grid-template-columns: minmax(0, 1fr) !important}
}
#settingsPage #printSectionsPane .compact-directory-table{min-width: 0}
#settingsPage #printSectionsPane .directory-col-name{width: 65%}
#settingsPage #printSectionsPane .directory-col-actions{width: 76px}
@container directory (max-width:640px){
  #settingsPage #printSectionsPane .compact-directory-table tr {
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 8px 12px;
  }
  #settingsPage #printSectionsPane .compact-directory-table td:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
    align-self: center;
  }
  #settingsPage
    #printSectionsPane
    .compact-directory-table
    td:nth-child(2)::before {
    display: none;
  }
  #settingsPage #printSectionsPane .compact-directory-table .directory-actions {
    grid-column: 2;
    grid-row: 2;
    padding: 0;
    border: 0;
  }
}
#settingsPage .settings-workspace{display: grid;grid-template-columns: 210px minmax(0, 1fr);gap: 20px;align-items: start}
#settingsPage .settings-content{min-width: 0}
#settingsPage .settings-sections-nav{padding: 10px;border: 1px solid var(--line, #e2e6eb);border-radius: 14px;background: #fff;box-shadow: var(--shadow-card)}
#settingsPage .settings-nav-group + .settings-nav-group{margin-top: 8px;padding-top: 8px;border-top: 1px solid var(--line, #e2e6eb)}
#settingsPage .settings-nav-heading{margin: 0;padding: 7px 9px 5px;color: #667085;font-size: 11px;font-weight: 650;line-height: 1.5;letter-spacing: 0.035em;text-transform: uppercase}
#settingsPage .settings-nav-item{display: block;width: 100%;min-width: 0;min-height: 38px;margin: 0;padding: 8px 9px;border: 1px solid transparent;border-radius: 8px;background: transparent;box-shadow: none;color: #344054;font-size: 12px;font-weight: 500;line-height: 1.5;text-align: left;white-space: normal;cursor: pointer}
#settingsPage .settings-nav-item:hover{background: #f5f7f9}
#settingsPage .settings-nav-item.is-current{background: #fff8d4;border-color: #e8d690;color: #403711;font-weight: 650}
#settingsPage .settings-nav-item:focus-visible{outline: 2px solid #8a6b08;outline-offset: 1px}
#settingsPage .settings-mobile-navigation{display: none}
#settingsPage .settings-mobile-navigation label{margin-bottom: 6px;color: #667085;font-size: 12px;font-weight: 500}
#settingsPage .settings-section-path{margin: 0 0 10px;color: #667085;font-size: 12px;line-height: 1.5;overflow-wrap: anywhere}
#settingsPage .settings-content .compact-directory-table{min-width: 0}
#settingsPage .settings-content > .settings-pane{margin: 0}
@media (max-width: 1180px){#settingsPage .settings-workspace{grid-template-columns: 196px minmax(0, 1fr);gap: 16px}
}
@media (max-width: 980px){#settingsPage .settings-workspace{grid-template-columns: minmax(0, 1fr);gap: 0}
#settingsPage .settings-sections-nav{display: none}
#settingsPage .settings-mobile-navigation{display: block;margin-bottom: 16px}
#settingsPage .settings-mobile-navigation select{width: 100%;min-height: 44px}
}
@media (pointer: coarse){#settingsPage .settings-nav-item{min-height: 44px}
}
#settingsPage .material-directory-category{display: flex;align-items: baseline;gap: 5px;min-width: 0;max-width: 100%;margin-top: 5px;color: #667085;font-size: 12px;font-weight: 400;line-height: 1.5}
#settingsPage .material-directory-category > span:first-child{flex: 0 0 auto}
#settingsPage .material-directory-category .directory-value{flex: 1 1 auto;min-width: 0;color: #475467}
:root{--icon-button-size: 32px;--icon-button-radius: 8px;--icon-size: 18px}
.ui-icon{display: block;width: var(--icon-size);height: var(--icon-size);flex: none;pointer-events: none}
.ui-icon-button{box-sizing: border-box;display: inline-flex;align-items: center;justify-content: center;flex: 0 0 var(--icon-button-size);width: var(--icon-button-size);height: var(--icon-button-size);min-width: var(--icon-button-size);min-height: var(--icon-button-size);padding: 0;border: 1px solid #e2e6eb;border-radius: var(--icon-button-radius);background: #fff;color: #667085;font: inherit;line-height: 1;vertical-align: middle}
.ui-icon-button{appearance: none;position: static;cursor: pointer;touch-action: manipulation;transition:
    background-color 0.15s,
    border-color 0.15s,
    color 0.15s}
.ui-icon-button:hover:not(:disabled){background: #f2f4f7;border-color: #b9c0c9;color: #344054}
.ui-icon-button:active:not(:disabled){background: #e4e7ec}
.ui-icon-button--danger:hover:not(:disabled),.ui-icon-button--danger:active:not(:disabled){background: #fff1f0;border-color: #f3b5ae;color: #b42318}
.ui-icon-button[aria-expanded="true"]{background: #fffae5;border-color: #dec45d;color: #695500}
.ui-icon-button:focus-visible{outline: 2px solid #b38f00;outline-offset: 2px}
.ui-icon-button:disabled{opacity: 0.45;cursor: not-allowed}
.table-actions{gap: 8px}
@media (pointer: coarse), (max-width: 600px){:root{--icon-button-size: 44px}
}

/* Shared CRM styles; unused legacy component selectors removed. */
.cloud-account{display: flex;flex-direction: column;gap: 12px;margin-top: auto;padding: 16px;border: 1px solid #34363b;border-radius: 12px;background: #222428;font-size: 14px}
.cloud-account > span{min-width: 0;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;font-weight: 600}
.cloud-account .btn{display: flex;align-items: center;justify-content: flex-start;gap: 8px;padding: 10px 12px;min-height: 44px;background: #2c2f34;color: #f2f4f7;border: 1px solid #484c53}
.cloud-account .btn:hover{background: #393d43;border-color: #636973}
.cloud-account svg{width: 18px;height: 18px;flex: 0 0 auto}
@media (min-width: 981px){#appSidebar{height: 100dvh;overflow-y: auto}
#mobileMenuPanel{display: flex;flex-direction: column;flex: 1;gap: 20px}
}
@media (max-width: 980px){.cloud-account{margin-top: 16px}
}
.search-select-option[aria-disabled="true"]{opacity: 0.5;cursor: not-allowed}
.search-select-option:focus-visible{outline: 2px solid #b58e00;outline-offset: -2px}
body:has(.cloud-status.is-error).cloud-loading:after{display: none}
#settingsPage #usersPane{padding: 20px !important}
@media (max-width: 600px){#settingsPage #usersPane{padding: 14px !important}
}
[hidden]{display: none !important}

/* Shared typography follows the calculator and CRM directories. */
/* Unified methods add two balance columns; keep the calculator table proportions readable. */
/* All KPI cards use the order-list reference component. */
:root{--crm-type-body:12px;--crm-type-name:13px;--crm-type-label:11px;--crm-type-secondary:10.5px;--crm-type-button:12.5px;--crm-weight-label:700;--crm-weight-medium:600;--crm-weight-button:750}
.nav{overflow:visible}
.nav button{display:block;width:100%}
.cloud-account{flex-shrink:0}
.cloud-account select{background:#2c2f34;color:#f2f4f7;border-color:#484c53}
.crm-account-note{font-size:10.5px;line-height:1.5;color:#adb3bc}
.button-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:normal}
.btn .ui-icon{flex-shrink:0}
.stats,.grid-2,.grid-equal{gap:20px;margin-bottom:20px}
.stats>.card,.grid-2>.card,.grid-equal>.card{margin-bottom:0}
.stat-icon{background:#f2f4f7}
.card-title{margin-bottom:16px}
.card-title h2{margin:0}
.card.no-pad{padding:20px;overflow:visible}
.toolbar{padding:12px;gap:8px;border:1px solid var(--line);border-radius:13px;background:#f8fafc;margin-bottom:16px}
.toolbar input.search{max-width:360px}
.toolbar select{min-width:140px}
.toolbar .result-count{font-size:11px}
.settings-table-wrap.crm-table-wrap{overflow:auto;border:1px solid var(--line);border-radius:13px}
.crm-table{min-width:620px}
.crm-table th{padding:10px 12px;background:#f5f7f9;color:#667085;font-size:9.5px;letter-spacing:.055em;font-weight:700}
.crm-table td{padding:11px 12px;font-size:var(--crm-type-body);border-bottom:1px solid var(--line)}
.crm-table tbody tr:hover{background:#fffcf0}
.directory-name{font-size:var(--crm-type-name);font-weight:var(--crm-weight-label)}
.directory-subline{font-size:var(--crm-type-secondary);line-height:1.4}
.order-position-list{list-style:none;margin:0;padding:0;min-width:220px;max-width:360px;display:grid;gap:6px;line-height:1.5}
.order-position-list li{overflow-wrap:anywhere}
.order-position-quantity,.order-position-unit-price{white-space:nowrap;font-variant-numeric:tabular-nums;font-weight:var(--crm-weight-label)}
@media(max-width:720px){.order-position-list{min-width:0;max-width:100%}
}
.crm-table .btn{white-space:nowrap}
.crm-table tr:last-child td{border-bottom:0}
.badge{display:inline-flex;align-items:center;font-size:10px;padding:4px 8px;line-height:1.45}
.badge.yellow{background:var(--accent-soft);color:var(--amber)}
.badge.blue{background:var(--blue-soft);color:var(--blue)}
.badge.green{background:var(--green-soft);color:var(--green)}
.badge.red{background:var(--red-soft);color:var(--red)}
label{margin-bottom:0}
label input,label select,label textarea{margin-top:6px}
.form-grid{gap:14px 12px}
.form-section h3{margin-top:0}
.component-sale{min-height:44px;font-size:13px}
.contact-row{grid-template-columns:1fr 1fr 1fr 44px}
#order-page{max-width:none;margin:0}
#order-page .form-section{padding:20px}
#order-page .position-box{padding:0;border-radius:18px}
#order-page .position-box>summary{padding:20px}
#order-page .position-content{padding:0 20px 20px}
.order-totals{border-radius:18px;padding:20px;background:#202225}
.notice{line-height:1.5}
.footer-note{gap:12px}
.close{cursor:pointer}
.modal-body{max-height:calc(92vh - 180px)}
.modal-footer{flex-wrap:wrap}
@media(max-width:1180px){.stats{gap:14px}
}
@media(max-width:980px){.side .nav{overflow:visible}
.cloud-account select{max-width:100%}
.main{min-width:0}
.stats{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:720px){.top-copy{min-width:0}
.top .button-row{width:100%}
.stats,.grid-2,.grid-equal{gap:12px;margin-bottom:16px}
.card.no-pad{padding:16px}
.stat-icon{display:none}
.form-grid,.form-grid.three,.form-grid.four{grid-template-columns:1fr}
.contact-row{grid-template-columns:1fr 1fr}
.form-section h3{margin:0 0 12px}
#order-page .form-section{padding:16px}
#order-page .position-box{border-radius:15px}
#order-page .position-box>summary{padding:16px;flex-wrap:wrap}
#order-page .position-content{padding:0 16px 16px}
.order-totals{gap:12px;flex-wrap:wrap;padding:16px}
.order-totals strong{font-size:16px}
.toolbar input.search{min-width:0;width:100%;max-width:none}
.toolbar select{flex:1}
.footer-note{display:grid}
.chart-row{grid-template-columns:90px 1fr 78px}
.modal-body{padding:16px}
.crm-table,.crm-table tbody,.crm-table tr,.crm-table td{display:block;min-width:0;width:100%}
.crm-table thead{display:none}
.crm-table tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px;padding:14px;border-bottom:1px solid var(--line)}
.crm-table tr:last-child{border-bottom:0}
.crm-table td{padding:0;border:0;overflow-wrap:anywhere}
.crm-table td:before{content:attr(data-label);display:block;color:var(--muted);font-size:10px;margin-bottom:4px}
.crm-table td:first-child{grid-column:1/-1}
.crm-table td:first-child:before{display:none}
.crm-table td .num{white-space:normal}
.crm-table .subline{max-width:100%;white-space:normal}
.crm-table td:has(>.btn){grid-column:1/-1}
.crm-table td:has(>.btn):before{display:none}
.crm-table td:has(>.btn)>.btn{width:100%}
}
@media print{.side,.top .button-row{display:none!important}
.app{display:block}
.main{padding:0}
}
.nav button{gap:normal}
.badge.blue{border-color:#bfdbfe}
.badge.green{border-color:#bbf7d0}
.badge.red{border-color:#fecaca}
.party-role-tags{display:flex;flex-wrap:wrap;gap:5px;margin-top:7px}
.party-entry{padding:16px;border:1px solid var(--line);border-radius:13px;background:var(--surface-2);margin-top:14px}
.party-entry .contact-row{grid-template-columns:repeat(3,minmax(0,1fr)) var(--icon-button-size);align-items:end;gap:12px;margin:0}
.party-entry .ui-icon-button{margin-bottom:6px}
.party-entry-actions{display:flex;justify-content:flex-end;margin-top:12px}
.party-save{justify-content:flex-end;margin-bottom:20px}
@media(max-width:720px){.party-entry{padding:12px}
.party-entry .contact-row{grid-template-columns:1fr}
.party-entry .ui-icon-button{justify-self:end;margin:0}
.party-save .btn{width:100%}
}
.party-tabs.tech-switch{display:flex;align-items:center;justify-content:flex-start;gap:8px;min-width:0;margin:0 0 16px;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
.party-tabs .tech-btn{display: inline-flex;align-items: center;justify-content: center;min-width: 0;min-height: 42px;padding: 10px 15px;border: 1px solid #dfe3e8;border-radius: 12px;background: #fff;color: #25282d;font-size: 12px;font-weight: 750;line-height: 1.2;white-space: nowrap;box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);transform: none}
.party-tabs .tech-btn::before{content: none}
.party-tabs .tech-btn:hover{transform: none;background: #f8fafc;border-color: #cfd5dc;color: #17191c}
.party-tabs .tech-btn.active{background: var(--y);border-color: #dfbd24;color: #17191c;box-shadow: 0 2px 5px rgba(117, 90, 0, 0.13)}
.party-tabs .tech-btn.active:hover{background: #ffd91f;border-color: #d7b51b}
@media(max-width:520px){.party-tabs.tech-switch{gap:6px}
.party-tabs .tech-btn{flex:0 0 auto;min-height:39px;padding:9px 12px;font-size:11px}
}
.party-basics-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.party-note-field{grid-column:span 2}
.party-basics-grid textarea{height:44px;min-height:44px}
.party-role-choice{border:0;padding:0;margin:0;min-width:0}
.party-role-choice legend{padding:0;font-size:11px;font-weight:700;line-height:1.3;color:#475467}
.party-role-choice .checks{margin-top:6px;gap:16px}
.party-basics-grid>.party-role-choice .checks{min-height:44px;align-items:center}
@media(max-width:720px){.party-basics-grid{grid-template-columns:1fr}
.party-note-field{grid-column:auto}
}
.party-money-section{margin-bottom:20px}
.party-money-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.party-money-heading h2{margin:0;font-size:17px;line-height:1.25;font-weight:760;letter-spacing:-.012em}
.party-money-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.card.party-money-card{margin:0;padding:16px 18px}
.party-money-card.balance{background:var(--accent-soft);border-color:#ecd04b}
.party-money-label{font-size:11px;line-height:1.3;font-weight:700;color:#475467}
.balance .party-money-label{color:#624f00}
.party-money-value{display:block;margin:7px 0 5px;font-size:27px;line-height:1.15;letter-spacing:-.035em;font-weight:750;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.party-money-value.has-debt{color:var(--red)}
.party-money-note{font-size:10.5px;line-height:1.4;color:var(--muted)}
.balance .party-money-note{color:#7a6827}
@media(max-width:720px){.party-money-heading{flex-wrap:wrap}
.party-money-grid{gap:8px}
.card.party-money-card{padding:12px}
.party-money-value{font-size:21px}
.party-money-label{font-size:10px}
.party-money-note{font-size:10px}
}
@media(max-width:520px){.party-money-grid{grid-template-columns:1fr}
.card.party-money-card{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:12px;align-items:center}
.party-money-value{grid-column:2;grid-row:1 / 3;margin:0}
.party-money-note{grid-column:1;margin-top:4px}
.party-money-heading .button-row{width:100%}
.party-money-heading .btn{flex:1}
}
.party-manager-row{grid-column:1 / -1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
@media(max-width:720px){.party-manager-row{grid-template-columns:1fr}
}
.party-balance-actions{margin-top:14px;gap:8px}
.party-balance-actions .btn{flex:1 1 110px}
@media(max-width:520px){.party-balance-actions{grid-column:1 / -1;grid-row:3;margin-top:12px}
}
.party-money-label{display:flex;align-items:center;justify-content:space-between;gap:8px}
.party-money-label .stat-icon{flex-shrink:0}
.party-identity{display:flex;align-items:center;justify-content:space-between;gap:14px}
.party-identity-name{min-width:110px;max-width:180px}
.party-identity-name .row-link{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.party-identity .party-role-tags{margin:0;flex-wrap:nowrap;flex-shrink:0}
.party-inline{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.party-inline-secondary{color:var(--muted);font-size:10.5px}
.party-list-card .crm-table td{white-space:nowrap}
@media(max-width:720px){.party-list-card .crm-table td{grid-column:1 / -1;max-width:100%;overflow-x:auto}
.party-identity-name{min-width:0;flex:1}
.party-identity{gap:8px}
.party-identity .party-role-tags{gap:4px}
}
@media(min-width:721px){.party-list-card .crm-table th{white-space:normal}
.party-list-card .crm-table th:nth-child(3){max-width:130px}
}
.party-list-card .party-role-tags{margin:0;flex-wrap:nowrap;align-items:center}
#settingsPage .crm-settings-block{padding:0 0 18px;margin:0 0 18px;border-bottom:1px solid var(--line)}
#settingsPage .crm-settings-block h3{margin:0 0 8px;font-size:14px;font-weight:600;line-height:1.4}
#settingsPage .crm-settings-block p,#settingsPage .crm-settings-note{font-size:12px;line-height:1.5}
#settingsPage .crm-settings-block p{margin:0 0 12px}
#settingsPage .crm-settings-block p:last-child,#settingsPage .crm-settings-note:last-child{margin-bottom:0}
#settingsPage .crm-settings-note{margin-top:16px}
#modalRoot dialog.unified-editor{max-width:calc(100vw - 32px);background:#fff}
#modalRoot .unified-editor .modal-body{max-height:none}
#modalRoot .unified-editor form.editor-section{margin-top:20px}
#modalRoot .unified-editor label:has(>input),#modalRoot .unified-editor label:has(>select),#modalRoot .unified-editor label:has(>textarea){margin-bottom:0}
#modalRoot .unified-editor .modal-close{flex-shrink:0}
@media(max-width:600px){#modalRoot dialog.unified-editor{max-width:calc(100vw - 16px)}
}
#settingsPage .settings-table th{font-weight:700}
#settingsPage .settings-toolbar>.btn{gap:normal}
.party-duplicate-notice{padding:16px;margin:16px 0;border:1px solid #e8d690;border-radius:13px;background:#fff8d4;font-size:12px;line-height:1.5}
.party-duplicate-notice>p{margin:12px 0 0}
.party-duplicate-match{display:flex;gap:14px;align-items:center;justify-content:space-between;padding:12px 0;border-bottom:1px solid #e8d690}
.party-duplicate-match>div{min-width:0;overflow-wrap:anywhere}
.party-duplicate-match .btn{flex-shrink:0}
#party-duplicate-exception{margin:12px 0 20px}
.party-merge-review{padding:16px;margin:18px 0;border:1px solid var(--line);border-radius:13px;background:#fff}
.party-merge-review h3{margin:0 0 12px}
.party-merge-review p{margin:12px 0 0}
.party-merge-counts{display:flex;flex-wrap:wrap;gap:12px 24px;font-size:12px}
.party-merge-history>summary{cursor:pointer;font-size:13px;font-weight:650}
.party-merge-history-item{padding-top:16px;font-size:12px}
.party-merge-history-item details{margin-top:10px}
.party-merge-history dl{display:grid;grid-template-columns:140px 1fr;gap:6px 12px}
.party-merge-history dt{color:var(--muted)}
.party-merge-history dd{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:600px){.party-duplicate-match{align-items:stretch;flex-direction:column}
.party-merge-history dl{grid-template-columns:1fr}
.party-merge-history dd{margin-bottom:6px}
}
label .duplicate-field-hint{color:#8a6b08;white-space:normal;overflow-wrap:anywhere}
#settingsPage .directory-columns-5 .directory-col-name{width:32%}
#settingsPage .directory-columns-5 .directory-col-actions{width:60px}
#settingsPage .directory-columns-5 th{overflow-wrap:normal}
.stats{gap:12px}
.party-money-value small{font-size:15px;font-weight:550;letter-spacing:normal;color:var(--muted)}
.balance .party-money-value small{color:#7a6827}
.party-money-label .stat-icon{display:grid}
@media(max-width:720px){.stats{gap:8px}
}
@media(max-width:520px){.stats{grid-template-columns:1fr}
}

/* Shared return link for full-page cards. */
.detail-list-nav{display:flex;justify-content:space-between;gap:16px;margin:0 0 20px}

/* Compact completion checklist: one rule and its explanation per row. */
#settingsPage .completion-rules{display:grid;gap:20px;max-width:660px;min-width:0;margin:0;padding:0;border:0}
#settingsPage .completion-rules legend{padding:0;margin-bottom:16px;font-size:13px;font-weight:600;line-height:1.5;color:var(--text,#20242a)}
#settingsPage .completion-rule-label{display:flex;align-items:flex-start;gap:10px;margin:0;font-size:13px;font-weight:600;line-height:1.5;cursor:pointer}
#settingsPage .completion-rule-label input{flex:0 0 16px;width:16px;height:16px;margin:2px 0 0;padding:0}
#settingsPage .completion-rule p{margin:5px 0 0 26px;font-size:12px;font-weight:400;line-height:1.5;color:#667085}
#settingsPage .completion-rules-note{max-width:720px;margin:24px 0 0;font-size:12px;line-height:1.5;color:#667085}

/* CRM component styles; redundant declarations consolidated. */
#orderPositions{scroll-margin-top:22px}
#orderPositions>.card-title{gap:16px}
#orderPositions>.card-title h2{margin:0}
#orderPositions .form-group{padding:20px 0;border-top:1px solid var(--line)}
#orderPositions .form-group:first-of-type{border-top:0}
#orderPositions .form-group:last-of-type{padding-bottom:0}
.position-row-actions{display:flex;align-items:center}
.position-row-actions .ui-icon-button{width:32px;height:32px;min-height:32px;box-shadow:none}
.position-danger{color:#a15555!important}
.position-row-actions{gap:5px}
.position-component-total{display:flex;justify-content:space-between;align-items:center;padding:14px;background:var(--yellow-soft,#fff7cb);border-radius:11px;font-size:13px}
.position-component-total strong{font-size:20px}
.position-assignment-section h3{margin:0 0 12px!important}
#modalRoot .unified-editor .position-assignment-section>.check-grid{display:flex;flex-wrap:wrap;gap:8px}
#modalRoot .unified-editor .position-assignment-section>.check-grid>.check-chip{width:auto;max-width:100%;flex:0 0 auto;margin:0}
.position-assignment{display:grid;grid-template-columns:125px minmax(0,1fr);gap:12px;align-items:center;padding:8px 0;border-top:1px solid var(--line)}
.position-assignment>span{font-size:12px;color:var(--muted)}
.position-assignment .check-grid{margin:0}
@media(max-width:720px){#orderPositions>.card-title{align-items:flex-start;flex-wrap:wrap}
.position-assignment{grid-template-columns:1fr;gap:8px}
}
#orderPositions>.card-title{margin-bottom:24px}
#orderPositions{--positions-module-padding:20px;padding-bottom:0;overflow:hidden}
#orderPositions>.positions-table-item:last-of-type{margin-bottom:0}
#orderPositions>.order-totals{margin:20px calc(-1 * var(--positions-module-padding)) 0;border-radius:0;padding:17px var(--positions-module-padding);align-items:center;flex-wrap:wrap;gap:14px 24px;background:#fff;color:var(--ink);border-top:1px solid var(--line)}
#orderPositions>.order-totals label{color:#475467;font-size:14px}
#orderPositions>.order-totals strong{color:var(--ink)}
#orderPositions>.order-totals>div:has(>label){text-align:right;font-variant-numeric:tabular-nums}
.positions-payment-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;width:100%}
.positions-payment-actions:empty{display:none}
.order-header-fields{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(160px,1fr) minmax(180px,1fr);gap:14px 18px;align-items:start}
.order-header-fields.is-new{grid-template-columns:repeat(2,minmax(0,1.3fr)) repeat(2,minmax(150px,1fr))}
.order-header-fields>*{min-width:0}
.order-status-field select{background-color:var(--yellow-soft);border-color:#dfc447;font-weight:700;color:#624f00}
.order-status-field label{color:#624f00}
.order-payment-buttons{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.order-payment-summary{width:100%;border-top:1px solid var(--line);padding-top:12px}
.order-payment-state{display:flex;justify-content:flex-end;gap:24px;font-size:12px;color:var(--muted)}
.order-payment-state b{color:var(--ink);margin-left:6px;white-space:nowrap}
.payment-indicator::after{content:"";display:block;height:3px;margin-top:7px;border-radius:3px;background:var(--line)}
.payment-indicator.is-paid::after{background:var(--green,#067647)}
.payment-indicator.has-debt::after{background:var(--red,#b42318)}
@media(max-width:900px){.order-header-fields.is-new{grid-template-columns:1fr 1fr}
}
@media(max-width:720px){.order-header-fields,.order-header-fields.is-new{grid-template-columns:1fr}
.positions-payment-actions{flex-wrap:wrap;justify-content:flex-start}
.order-payment-buttons{justify-content:flex-end;width:100%}
.order-payment-state{justify-content:flex-start;flex-wrap:wrap;gap:8px 16px}
}
.positions-payment-actions .btn{min-height:38px;padding:8px 12px;font-size:12px;box-shadow:none}
.positions-payment-actions [data-action="order-pay"]{background:var(--yellow,#ffdf48);border-color:var(--yellow,#ffdf48);color:#17191c}
.positions-payment-actions [data-action="order-refund"]{background:#fff;border-color:var(--line-strong);color:var(--ink)}
@media(max-width:1100px){#orderPositions>.order-totals{gap:14px;justify-content:space-between}
.positions-payment-actions{width:100%;margin:0 0 2px}
}
#orderMethods>.card-title,#orderPayments>.card-title{margin-bottom:16px}
#orderMethods h2,#orderPayments h2{margin:0}
#orderMethods .check-grid{display:flex;flex-wrap:wrap;gap:10px}
#orderMethods .check-chip{display:inline-flex;align-items:center;gap:8px;width:auto;max-width:100%;flex:0 0 auto;margin:0;padding:10px 14px;border:1px solid var(--line);border-radius:11px;background:#fff;font-size:12px;font-weight:600;cursor:pointer}
#orderMethods .check-chip:has(input:checked){background:var(--yellow-soft);border-color:#dfc447;color:#624f00}
#orderMethods .check-chip input{margin:0;accent-color:#d4ad00}
.payment-help{margin:12px 0 0;line-height:1.5}
#orderPayments .settings-table-wrap{border:0;border-radius:0;box-shadow:none}
#orderPayments table{width:100%;min-width:0}
#orderPayments th{background:transparent;color:#475467;font-family:inherit;font-weight:700;line-height:1.3;letter-spacing:normal;text-transform:none;white-space:normal}
#orderPayments th,#orderPayments td{padding:12px;border:0;text-align:left;font-size:12px;overflow-wrap:anywhere}
#orderPayments th{font-size:11px}
#orderPayments tbody tr+tr{border-top:1px solid var(--line)}
#orderPayments td:last-child,#orderPayments th:last-child{text-align:right}
#orderPayments td:nth-child(3){white-space:nowrap}
#orderPayments td:last-child .btn{white-space:nowrap;font-size:11px;min-height:34px;padding:7px 10px}
#orderPayments [data-action="cancel-transaction"]{background:#202225;border-color:#202225;color:#fff}
#orderPayments [data-action="cancel-transaction"]:hover{background:#36383c;border-color:#36383c;color:#fff}
#orderPayments [data-action="cancel-transaction"]:focus-visible{outline-color:#667085}
.payment-cancelled{font-size:11px;color:var(--muted);margin-top:5px}
@media(max-width:720px){#orderPayments .crm-table td{padding:0;text-align:left}
#orderPayments .crm-table td:last-child{grid-column:1/-1}
#orderPayments .crm-table td:last-child:before{display:none}
#orderPayments .crm-table tr{padding:14px}
}
@media(max-width:720px){#orderPositions{--positions-module-padding:16px}
}
#modalRoot .unified-editor .position-pricing-fields{display:grid;grid-template-columns:0.8fr 0.8fr 1.2fr 1.2fr;gap:12px;align-items:end}
#modalRoot .unified-editor .position-pricing-fields>label{min-width:0;margin:0}
#modalRoot .unified-editor .position-product-picker .search-select-option{width:100%;text-align:left;background:#fff;font-family:inherit}
#modalRoot .unified-editor .position-product-picker .search-select-option:hover{background:#fffbeb}
#modalRoot .unified-editor .position-product-picker .search-select-option:focus-visible{outline:2px solid #cfad23;outline-offset:-2px}
@media(max-width:600px){#modalRoot .unified-editor .position-pricing-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Order card — approved sequential modules, using the CRM design tokens. */
/* Payment agreement is separate from the production deadline. */
#order-page .top{align-items:center;padding-bottom:18px;margin-bottom:18px;gap:16px}
#order-page .top h1{font-size:28px}
#order-page .top .button-row{flex-wrap:nowrap;gap:8px}
#order-page .top-copy>.muted{font-size:13px;font-weight:600;color:var(--ink-2)}
#order-page .card{margin-bottom:14px;box-shadow:var(--shadow-card)}
#order-page .refresh-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px;min-height:30px}
#order-page .refresh-section-title{display:flex;align-items:center;gap:9px;min-width:0}
#order-page .refresh-section-title h2,#order-page .refresh-section-title h3{margin:0;font-size:17px;font-weight:760;letter-spacing:-.012em;line-height:1.3;color:var(--ink)}
.refresh-section-icon{width:30px;height:30px;border-radius:9px;display:flex;align-items:center;justify-content:center;background:var(--surface-2);border:1px solid var(--line);color:#667085;flex-shrink:0}
.refresh-section-icon .ui-icon{width:16px;height:16px}
.refresh-section-title .refresh-count{min-width:22px;height:22px;padding:0 6px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:6px;background:var(--surface-2);color:#667085;font-size:11px;font-weight:600}
.refresh-created{font-size:11px;color:var(--muted);line-height:1.4;text-align:right}
#order-page .order-header-fields,#order-page .order-header-fields.is-new{grid-template-columns:minmax(155px,1.2fr) minmax(105px,.85fr) minmax(135px,1.15fr) minmax(170px,1.1fr) minmax(125px,.9fr);gap:12px}
#order-page .order-header-fields label{font-size:var(--crm-type-label);font-weight:var(--crm-weight-label);color:#667085}
#order-page .order-header-fields select,#order-page .order-header-fields input{height:40px}
#order-page .order-client-picker .search-select-trigger,#order-page .order-deadline-picker>summary{height:40px;min-height:40px}
#order-page .order-client-picker .search-select-trigger:disabled{opacity:1;background:var(--surface-2);color:#667085;cursor:default}
#order-page .order-client-picker .search-select-trigger:disabled:after{display:none}
#orderPositions>.refresh-section-heading{padding-bottom:14px;margin-bottom:12px;border-bottom:1px solid var(--line)}
#orderPositions>.order-totals{margin:12px calc(-1 * var(--positions-module-padding)) 0;border-radius:0}
#order-page .order-methods-line{display:flex;align-items:center;flex-wrap:wrap;gap:14px 24px}
#orderMethods .check-grid{display:flex;flex-wrap:wrap;gap:8px;margin:0;flex:0 1 auto}
#orderMethods .check-chip{min-height:40px;padding:8px 12px;font-size:var(--crm-type-body);border-radius:10px}
#orderMethods .order-payment-deadline{flex:0 1 310px;margin:0;padding:0 0 0 24px;border:0;border-left:1px solid var(--line)}
#orderMethods .order-payment-deadline>label{display:flex;align-items:center;gap:12px;flex:1;min-width:0;margin:0;font-size:var(--crm-type-label);color:#667085}
#orderMethods .order-payment-deadline input{width:150px;min-width:140px;height:40px;flex:0 0 auto}
#orderPayments .refresh-section-heading{margin-bottom:8px}
#orderPayments .order-payments-table{margin:0;overflow:auto}
#orderPayments table{min-width:800px}
#orderPayments th,#orderPayments td{padding:10px 12px;text-align:left;vertical-align:middle;font-size:var(--crm-type-body)}
#orderPayments th{font-size:var(--crm-type-label);font-weight:var(--crm-weight-label);color:#667085}
#orderPayments:not(.group-payments) th:nth-child(3),#orderPayments.group-payments th:nth-child(4),#orderPayments td:has(>.num){text-align:right;font-variant-numeric:tabular-nums}
#orderPayments td:first-child b{font-weight:600;font-size:var(--crm-type-body);white-space:nowrap}
#orderPayments td:last-child,#orderPayments th:last-child{text-align:right}
#orderPayments tr>td:first-child,#orderPayments tr>th:first-child{padding-left:10px}
#orderPayments tbody tr:hover{background:var(--yellow-soft,#fffbeb)}
#order-page .refresh-documents .refresh-section-heading{flex-wrap:wrap;justify-content:flex-start}
#order-page .refresh-documents .form-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
#order-page .refresh-documents .form-grid>div{min-width:0}
#order-page .refresh-documents label{font-size:var(--crm-type-secondary);line-height:1.4;min-height:28px;margin-bottom:5px;color:#667085}

#order-page .refresh-note textarea{min-height:74px;resize:vertical;margin:0;line-height:1.6;background:#fff;font-size:var(--crm-type-body)}
.refresh-note label{font-size:0;margin:0}
#order-page .order-context-help{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important}
@media(max-width:1280px){#order-page .refresh-documents .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
#order-page .refresh-documents label{min-height:0}
#order-page .refresh-note textarea{min-height:138px}
}
@media(max-width:1180px){#order-page .top{align-items:flex-start;flex-wrap:wrap}
}
@media(max-width:1100px){#order-page .order-header-fields,#order-page .order-header-fields.is-new{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:900px){#orderMethods .order-payment-deadline{padding-left:0;border-left:0}
}
@media(max-width:720px){#order-page .top h1{font-size:24px}
#order-page .top .button-row{flex-wrap:wrap}
#order-page .refresh-section-title h2,#order-page .refresh-section-title h3{font-size:15px}
.refresh-created{font-size:10px;max-width:140px}
#order-page .order-header-fields,#order-page .order-header-fields.is-new{grid-template-columns:1fr}
#orderMethods .check-grid{flex-basis:100%}
#orderPayments table{min-width:0}
#orderPayments .crm-table td{padding:0;text-align:left;white-space:normal}
#orderPayments .crm-table td:last-child{grid-column:1/-1}
#orderPayments .crm-table tr{padding:14px}
#order-page .refresh-note textarea{min-height:90px}
}
.order-deadline-controls{display:grid;grid-template-columns:minmax(135px,1.35fr) minmax(105px,1fr);gap:6px}
.order-deadline-controls input{width:100%;min-width:0}
.order-delete-actions{display:flex;justify-content:flex-end;margin-top:18px}
.order-closed-notice{margin-bottom:16px}
.delete-order-operations{padding-left:20px;line-height:1.6}
.delete-order-operations li{margin-bottom:12px}
.completion-rules{display:grid;gap:12px;margin-bottom:20px}
.completion-rules .check-chip{justify-content:flex-start}
.completion-rules p{margin:0 0 12px}
.order-payment-deadline{display:flex;align-items:flex-end;gap:16px;flex-wrap:wrap;margin-top:16px;padding-top:16px;border-top:1px solid var(--line)}
.order-payment-deadline>label{flex:0 1 220px;min-width:180px}
.order-payment-deadline>p{flex:1 1 240px;margin:0 0 8px;max-width:560px}
.order-deadline-field>label{display:block;margin-bottom:6px}
.order-deadline-picker{position:relative;min-width:0}
.order-deadline-picker>summary{list-style:none;height:44px;box-sizing:border-box;border:1px solid var(--line-strong,#d0d5dd);border-radius:var(--radius-control,12px);background:#fff;padding:0 11px;display:flex;align-items:center;justify-content:space-between;gap:8px;cursor:pointer;font-size:12px}
.order-deadline-picker>summary::-webkit-details-marker{display:none}
.order-deadline-picker>summary span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.order-deadline-picker>summary .icon{width:15px;height:15px;flex-shrink:0;color:#667085}
.order-deadline-picker>summary:focus-visible{outline:2px solid #cfad23;outline-offset:2px}
.order-deadline-popup{position:absolute;top:calc(100% + 6px);right:0;z-index:60;width:300px;max-width:calc(100vw - 48px);padding:14px;border:1px solid var(--line-strong,#d0d5dd);border-radius:12px;background:#fff;box-shadow:var(--shadow-float,0 12px 30px #10182826)}
.order-deadline-popup .order-deadline-controls{grid-template-columns:minmax(0,1.3fr) minmax(0,1fr)}
.order-deadline-popup>button{display:block;margin:12px 0 0 auto}

/* Order totals live in the financial rail, with the same calculations/actions. */
#orderFinancials{display:flex;flex-direction:column;align-items:stretch;gap:0;margin:0;padding:18px 20px;background:#fff;border:1px solid var(--line);border-radius:var(--radius-card,18px);color:var(--ink)}
#orderFinancials .compact-totals-bar{display:flex;flex-direction:column;align-items:flex-end;gap:2px}
#orderFinancials .refresh-grand-total{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;white-space:nowrap;margin:0;padding:0;background:none;border:0}
#orderFinancials .refresh-grand-total label{margin:0;font-size:18px;font-weight:750;color:var(--ink)}
#orderFinancials .refresh-grand-total strong{font-size:25px;font-weight:750;letter-spacing:-.025em;font-variant-numeric:tabular-nums;color:var(--ink)}
.compact-calculation{margin:0}
.compact-calculation-toggle{display:inline-flex;align-items:center;gap:7px;cursor:pointer;font-family:inherit}
.compact-calculation-toggle:before{content:'';width:5px;height:5px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);margin:0 2px 3px}
.compact-calculation.is-open .compact-calculation-toggle:before{transform:rotate(225deg);margin-bottom:-3px}
#compact-calculation-content{width:100%;margin:8px 0 0}
#compact-calculation-content[hidden]{display:none!important}
#orderFinancials .refresh-totals-numbers{display:grid;gap:8px;padding-top:10px;border-top:1px solid var(--line)}
#orderFinancials .refresh-totals-numbers>div{display:flex;align-items:center;justify-content:space-between;gap:8px}
#orderFinancials .refresh-totals-numbers label{font-size:12px;margin:0;color:var(--muted)}
#orderFinancials .refresh-totals-numbers strong{font-size:14px;color:var(--ink);font-variant-numeric:tabular-nums}
#orderFinancials .refresh-total-note{font-size:10px;color:var(--muted);line-height:1.5;margin-top:8px}
#orderFinancials .compact-payment-row{display:flex;flex-direction:column;align-items:stretch;gap:16px;border-top:1px solid var(--line);padding-top:14px;margin-top:8px}
#orderFinancials .order-payment-summary{width:100%;border:0;padding:0;margin:0}
#orderFinancials .order-payment-state{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;color:var(--muted)}
#orderFinancials .payment-indicator{display:grid;grid-template-columns:auto auto;justify-content:space-between;align-items:baseline;gap:8px 4px;min-width:0;font-size:10px}
#orderFinancials .payment-indicator b{font-size:12px;color:var(--ink);margin:0;white-space:nowrap;text-align:right;font-variant-numeric:tabular-nums}
#orderFinancials .payment-indicator:after{display:none}
#orderFinancials .compact-payment-progress{grid-column:1/-1;height:7px;margin:0;min-width:0;background:#edf0f2;border-radius:5px;overflow:hidden}
#orderFinancials .compact-payment-progress i{display:block;height:100%;border-radius:inherit;background:#56b38a;transition:width .2s ease}
#orderFinancials .remaining-progress i{background:#d97c76}
#orderFinancials .order-overpayment{grid-column:1/-1;display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;padding-top:10px;border-top:1px solid var(--line)}
#orderFinancials .positions-payment-actions,#orderFinancials .order-payment-buttons{display:flex;align-items:stretch;width:100%;margin:0}
#orderFinancials .positions-payment-actions:empty,#orderFinancials .order-payment-buttons:empty{display:none}
#orderFinancials .order-payment-buttons>[data-action="order-pay"]{width:100%!important;flex:1 1 auto!important;--action-bg:#63b47d;--action-edge:#63b47d;--action-text:#fff;--action-hover-bg:#52a46b;--action-hover-edge:#52a46b}
#orderFinancials .quote-payment-help{max-width:none;text-align:left}
@media(max-width:400px){#orderFinancials{padding:16px}
#orderFinancials .refresh-grand-total strong{font-size:23px}
}


.order-overpayment{display:flex;align-items:center;flex-wrap:wrap;gap:12px}
.overpayment-value{display:inline-flex;align-items:baseline;gap:8px;font-size:12px;white-space:nowrap}
.overpayment-value b{font-size:14px;font-weight:600}
#orderPositions .order-overpayment .btn{white-space:nowrap}
#orderPositions .compact-a-totals .order-payment-state{display:flex;align-items:center;flex-wrap:wrap;gap:20px}

/* Variant A: open rows, separate metrics and a subordinate supplier ledger. */
/* A pending supplier confirmation is a secondary action, aligned with its badge. */
#orderPositions{container-type:inline-size}
#orderPositions .rows-position{min-width:0;padding:22px 0;border-bottom:1px solid var(--line)}
#orderPositions .rows-position:first-of-type{padding-top:6px}
#orderPositions .rows-position:last-of-type{border-bottom:0;padding-bottom:4px}
.rows-row-header{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:start}
.rows-title{display:flex;gap:10px;align-items:flex-start;min-width:0}
.rows-name{min-width:0;flex:1}
.rows-name-heading{display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px;min-width:0}
.rows-name-heading .status-pill{flex:0 0 auto;max-width:100%;white-space:normal}
#orderPositions .rows-title h3{font-size:14px;font-weight:700;line-height:1.45;margin:2px 0 0;overflow-wrap:anywhere}
#orderPositions .rows-title .postpress-operation-number{position:static;flex:0 0 26px;margin:0;min-width:26px;width:26px;height:26px;font-size:11px}
.rows-spec{font-size:var(--crm-type-body);font-weight:400;line-height:1.6;color:var(--muted);margin:10px 0 0;overflow-wrap:anywhere;white-space:pre-wrap;max-width:100%}
.rows-row-icons{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:nowrap}
.rows-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:18px 0 0 36px}
.rows-metric{display:flex;flex-direction:column;gap:7px;min-width:0;font-variant-numeric:tabular-nums}
.rows-metric>span,.rows-work-labels{font-size:var(--crm-type-label);font-weight:var(--crm-weight-label);color:#667085;line-height:1.4}
.rows-metric strong{font-size:14px;font-weight:650;white-space:nowrap;line-height:1.4}
.rows-metric:first-child strong{font-weight:400}
.rows-metric:not(:first-child){text-align:right}
.rows-row-detail{margin:20px 0 0 36px;min-width:0}
.rows-responsible-stage{display:flex;align-items:center;flex-wrap:wrap;gap:10px 18px;min-width:0}
.rows-people{display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-size:var(--crm-type-label);color:var(--muted)}
.rows-people>span{margin-right:5px}
.rows-people b{font-weight:var(--crm-weight-medium);background:var(--surface-2,#f4f5f7);color:#586171;border:1px solid var(--line);border-radius:6px;padding:5px 8px}
.rows-ready-fields{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.rows-row-work{margin:20px 0 0 36px;padding-top:14px;border-top:1px solid var(--line)}
.rows-work-labels,.rows-work-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px 16px;align-items:start}
.rows-work-labels{margin-bottom:5px}
.rows-work-labels>span:first-child,.rows-work-row>div:first-child{grid-column:1 / 3}
.rows-work-row>span:nth-child(2){grid-column:3}
.rows-work-row>span:nth-child(3){grid-column:4}
.rows-supplier-row{row-gap:10px}
.rows-supplier-footer{grid-column:1 / -1;display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}
.rows-supplier-workflow{display:flex;align-items:center;min-width:0}
#orderPositions .rows-supplier-footer .workflow-supplier-state{margin:0;gap:8px;flex-wrap:wrap}
.rows-work-labels>span:not(:first-child){text-align:right}
.rows-work-row{padding:14px 0;font-size:var(--crm-type-body);font-variant-numeric:tabular-nums;line-height:1.5;min-width:0}
.rows-work-row>div:first-child{position:relative;min-width:0}
.rows-work-row b{display:block;font-size:var(--crm-type-body);font-weight:650;color:var(--ink);overflow-wrap:anywhere}
.rows-supplier-heading{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 8px;min-width:0}
.rows-supplier-heading b{min-width:0}
.rows-supplier-heading small{font-size:var(--crm-type-secondary);font-weight:400;color:var(--muted);white-space:nowrap}
.rows-supplier-description{margin-top:10px;font-size:var(--crm-type-secondary);color:var(--muted);overflow-wrap:anywhere}
.rows-work-row>span{text-align:right;white-space:nowrap}
.rows-metric:nth-child(3),.rows-work-labels>span:nth-child(2),.rows-work-row>span:nth-child(2){padding-right:32px}
.rows-work-row>span:nth-child(2){position:relative}
.rows-work-row>span:nth-child(2)>small{position:absolute;left:calc(100% - 26px);bottom:0;line-height:18px;font-size:10px;color:var(--muted);white-space:nowrap;text-align:left}
#orderPositions .rows-work-row .position-row-actions{flex:0 0 auto;gap:4px;justify-content:flex-end;padding-left:0}
.rows-own{padding:7px 0 8px}
.rows-own b{color:var(--muted);font-weight:400}
#orderPositions .rows-supplier-branch{position:absolute;left:-26px;top:0;transform:none;font-size:19px;line-height:20px;color:#a4acb8;font-weight:400}
.rows-add{display:inline-flex;align-items:center;gap:6px;margin:10px 0 0;font-family:inherit;cursor:pointer}
@container(max-width:520px){
 .rows-metrics,.rows-row-detail,.rows-row-work{margin-left:0}
 .rows-supplier-row>div:first-child{padding-left:20px}
 #orderPositions .rows-supplier-branch{left:0}
 .rows-metrics,.rows-work-labels,.rows-work-row{column-gap:12px}
}
@container(max-width:400px){
 .rows-row-header{gap:8px}
 .rows-metrics,.rows-work-labels,.rows-work-row{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:20px}
 .rows-metrics{row-gap:16px}
 .rows-work-labels>span:not(:first-child){display:none}
 .rows-work-labels>span:first-child,.rows-work-row>div:first-child{grid-column:1 / -1;grid-row:auto}
 .rows-work-row>span:nth-child(2){grid-column:1}
 .rows-work-row>span:nth-child(3){grid-column:2}
 .rows-work-row>span[data-label]:before{content:attr(data-label);display:block;font-size:10px;color:var(--muted);margin-bottom:4px}
 .rows-ready-fields{grid-template-columns:1fr}
}
#orderPositions .rows-supplier-row [data-action="workflow-confirm-component"]{margin:0;max-width:100%;--action-radius:7px;background:var(--status-amber-soft)!important;border:1px solid var(--status-amber-edge)!important;color:var(--status-amber)!important}
#orderPositions .rows-supplier-row [data-action="workflow-confirm-component"]:hover:not(:disabled){background:#ffedbd!important;color:#805b12!important}
#orderPositions .rows-supplier-row .workflow-supplier-state{min-height:28px;align-items:center}

/* CRM semantic palette. Workflow flags never depend on these colours. */
:root{--status-neutral:#667085;--status-neutral-soft:#f3f4f6;--status-neutral-edge:#e1e4e9;--status-blue:#346a9b;--status-blue-soft:#edf5fd;--status-blue-edge:#ccdef0;--status-violet:#735a9c;--status-violet-soft:#f4effa;--status-violet-edge:#dfd3ef;--status-green:#32734d;--status-green-soft:#edf7f0;--status-green-edge:#cce4d3;--status-amber:#826513;--status-amber-soft:#fff8df;--status-amber-edge:#ecdfaa;--status-red:#a24848;--status-red-soft:#fdf0f0;--status-red-edge:#efcccc;--green:var(--status-green);--green-soft:var(--status-green-soft);--red:var(--status-red);--red-soft:var(--status-red-soft);--blue:var(--status-blue);--blue-soft:var(--status-blue-soft);--amber:var(--status-amber)}
.tone-neutral,.badge{--tone:var(--status-neutral);--tone-soft:var(--status-neutral-soft);--tone-edge:var(--status-neutral-edge)}
.tone-blue,.badge.blue{--tone:var(--status-blue);--tone-soft:var(--status-blue-soft);--tone-edge:var(--status-blue-edge)}
.tone-violet{--tone:var(--status-violet);--tone-soft:var(--status-violet-soft);--tone-edge:var(--status-violet-edge)}
.tone-green,.badge.green{--tone:var(--status-green);--tone-soft:var(--status-green-soft);--tone-edge:var(--status-green-edge)}
.tone-amber,.badge.yellow{--tone:var(--status-amber);--tone-soft:var(--status-amber-soft);--tone-edge:var(--status-amber-edge)}
.tone-red,.badge.red{--tone:var(--status-red);--tone-soft:var(--status-red-soft);--tone-edge:var(--status-red-edge)}
.badge,.badge.blue,.badge.green,.badge.yellow,.badge.red{display:inline-flex;align-items:center;gap:7px;padding:5px 9px;border:1px solid var(--tone-edge);border-radius:7px;background:var(--tone-soft);color:var(--tone);font-size:11px;font-weight:600;line-height:1.4;white-space:nowrap}
.status-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--tone);flex:none}
.status-inline{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:600;line-height:1.4;color:var(--tone);white-space:nowrap}
.badge>.dot{background:currentColor;width:6px;height:6px}
#order-page .order-header-fields .order-status-field label{color:#475467}
#order-page .order-header-fields select.status-select,.task-actions select.status-select,#modalRoot select.status-select{background-color:var(--tone-soft);border-color:var(--tone-edge);color:var(--tone);font-weight:600}
select.status-select option{background:#fff;color:var(--ink)}
.chart-fill.status-chart{background:var(--tone)}
.status-color-field{border:0;margin:0;padding:0;min-width:0}
.status-color-field legend{padding:0;margin-bottom:10px;color:#475467;font-size:11px;font-weight:700}
.status-color-swatches{display:flex;flex-wrap:wrap;gap:10px;padding:3px}
#modalRoot .status-swatch{display:grid;place-items:center;width:34px;height:34px;min-width:34px;min-height:34px;padding:0;border:1px solid var(--tone-edge);border-radius:8px;background:var(--tone-soft);box-shadow:none;cursor:pointer}
.status-swatch i{width:12px;height:12px;border-radius:50%;background:var(--tone)}
#modalRoot .status-swatch[aria-pressed=true]{outline:2px solid #32363d;outline-offset:2px}
#modalRoot .status-swatch:focus-visible{outline:3px solid #9a7b15;outline-offset:3px}
.status-color-preview{margin:16px 0 10px;min-height:28px}
.status-color-field p{margin:0;line-height:1.5}
.notice.error{background:var(--red-soft);border-color:var(--status-red-edge);color:var(--red)}
.notice.info{background:var(--blue-soft);border-color:var(--status-blue-edge);color:var(--blue)}
.progress>i,#orderPositions .compact-payment-progress.paid-progress>i{background:var(--green)}
#orderPositions .compact-payment-progress.remaining-progress>i{background:var(--red)}

/* Workflow uses the calculator's tabs, form fields, badges and buttons. */
.workflow-tabs{display:flex;margin-bottom:18px;flex-wrap:wrap;gap:6px}
.workflow-tabs .tech-btn{white-space:nowrap;flex:0 1 auto}
.workflow-tabs .tech-btn span{margin-left:5px;opacity:.6;font-size:11px}
.workflow-panel{margin-bottom:18px}
.workflow-settlement-line{display:flex;justify-content:space-between;gap:12px;padding:5px 0}
.workflow-supplier-state{display:flex;align-items:center;gap:8px;margin-top:5px}
.workflow-text-button{display:inline-flex;border:0;background:transparent;color:#39729d;padding:4px 0;font-family:inherit;font-weight:600;font-size:10.5px;line-height:1.4;cursor:pointer;text-align:left}
.workflow-text-button:hover{text-decoration:underline}
.workflow-panel .crm-table td{vertical-align:middle}
@media(max-width:700px){.workflow-tabs{display:flex}
.workflow-tabs .tech-btn{padding:10px 12px}
.workflow-settlement-line{flex-wrap:wrap}
}
.quote-payment-help{display:block;max-width:280px;line-height:1.5;text-align:right}

/* Accountant workspace: calculator modules, restrained dividers and compact rows. */
/* Keep work descriptions and their order reference readable in the purpose column. */
.invoice-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
.invoice-filter-field{min-width:0}
.invoice-filter-field>label{display:block;margin-bottom:8px}
.invoice-list-table .crm-table{min-width:940px;table-layout:fixed}
.invoice-list-table .crm-table th:nth-child(1){width:auto}
.invoice-list-table .crm-table th:nth-child(2){width:14%}
.invoice-list-table .crm-table th:nth-child(3){width:22%}
.invoice-list-table .crm-table th:nth-child(4){width:21%}
.invoice-list-table .crm-table th:nth-child(5){width:210px}
.invoice-list-table .crm-table td:last-child>.button-row{flex-wrap:nowrap;align-items:center;gap:8px}
.invoice-list-table .crm-table td{vertical-align:top;overflow-wrap:anywhere}
.invoice-list-table .crm-table .btn{font-size:11px;padding:8px 10px;white-space:normal}
.invoice-list-table .subline{margin-top:5px}
.invoice-list-table .progress{margin-top:8px}
.invoice-methods{font-size:10.5px}
.invoice-calculations{display:flex;flex-direction:column;align-items:flex-start;gap:5px;min-width:0}
.invoice-calculation-line{display:flex;flex-wrap:wrap;gap:2px 6px;font-size:11px;color:var(--muted);line-height:1.5}
.invoice-calculation-line .num{white-space:nowrap}
.invoice-calculation-due{color:var(--blue);font-weight:600}
.invoice-calculation-refund{color:var(--red);font-weight:600}
.invoice-calculation-note{font-size:10.5px;color:var(--muted);overflow-wrap:anywhere}
.invoice-calculations .progress{width:100%;margin:1px 0 0}
.invoice-create-documents{border-top:1px solid var(--line);padding-top:16px}
.invoice-create-documents h3{margin:0 0 12px}
.invoice-create-documents>.check-chip{margin-bottom:14px}
@media(max-width:700px){.invoice-stats{grid-template-columns:1fr}
}
#invoicesPage .invoice-list-table{border-radius:18px}
#invoicesPage .invoice-list-table>.toolbar{padding:18px 20px 12px;border:0}
#invoicesPage .invoice-filters{padding:0 20px 18px;border-bottom:1px solid var(--line)}
#invoicesPage .invoice-list-table .crm-table-wrap{border:0;border-radius:0 0 18px 18px}
#invoicesPage .invoice-list-table .crm-table{min-width:880px}
#invoicesPage .invoice-list-table .crm-table th{background:transparent;font-size:11px;font-weight:700;text-transform:none;padding:15px 14px;color:var(--muted)}
#invoicesPage .invoice-list-table .crm-table td{padding:18px 14px;font-size:12px;border-bottom:1px solid var(--line)}
.invoice-documents-compact{display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.invoice-documents-compact>div{display:flex;flex-direction:column;gap:3px}
.invoice-documents-compact>div>span{font-size:10.5px;color:var(--muted)}
.invoice-documents-compact strong{font-size:12px;font-weight:600}
.invoice-list-table .directory-name{font-size:13px;font-weight:700;text-align:left}
.invoice-list-table .directory-name,.invoice-list-table td:first-child .subline{white-space:normal;overflow:visible;text-overflow:clip}
.invoice-list-table .progress{height:3px}
.invoice-editor .form-grid{gap:16px}
.invoice-editor form{margin-top:18px}
.invoice-history-module .crm-table-wrap{border:0}
.invoice-purpose-summary{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere;line-height:1.5}
.invoice-order-references{display:grid;gap:2px;margin-top:3px;color:var(--ink)}


.batch-meta{display:grid;grid-template-columns:1.15fr 1fr 1fr 1fr;gap:16px}
.batch-meta label{min-width:0}
.batch-module{padding:0!important;overflow:hidden;margin:20px 0}
.batch-module .card-title{padding:18px 20px;margin:0;border-bottom:1px solid var(--line)}
.batch-module h2{font-size:15px}
.batch-module .crm-table-wrap{border:0;border-radius:0}
.batch-module .crm-table{min-width:680px}
.batch-module th{background:transparent!important;text-transform:none!important;font-size:11px!important}
.batch-module td,.batch-module th{padding:14px 20px!important}
.batch-module .subline{margin-top:5px;font-size:11px}
.batch-module td:first-child{width:43%}
.batch-module td:not(:first-child),.batch-module th:not(:first-child){text-align:right;white-space:nowrap}
.batch-foot{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 20px;border-top:1px solid var(--line)}
.batch-total{display:flex;align-items:center;gap:24px}
.batch-total strong{font-size:23px}
.batch-total span{font-size:12px;font-weight:700}
.batch-allocation{width:125px!important;margin:0!important;text-align:right}
.batch-linked{display:block;font-size:10.5px;margin-top:5px}
@media(max-width:800px){.batch-meta{grid-template-columns:1fr 1fr}
.batch-foot{flex-wrap:wrap}
.batch-module .card-title{flex-wrap:wrap;gap:10px}
}


.unsaved-warning{width:min(500px,calc(100% - 32px));padding:0;border:1px solid #e1e4e8;border-radius:20px}
.unsaved-warning .modal-head h2{margin:0;font-size:20px;line-height:1.3}
.unsaved-warning .modal-body p{margin:0 0 12px;line-height:1.6}
.unsaved-warning .modal-body p:last-child{margin-bottom:0}
.unsaved-warning .modal-actions{flex-wrap:wrap;gap:10px}
.unsaved-warning::backdrop{background:rgba(18,20,24,.4)}

/* A single shared filter row; narrow screens scroll horizontally without wrapping. */
/* Orders: a single control with separate status and document groups. */
/* Material-directory reference: native selectors use the calculator's exact
   40px / 13px control. Multi-value menus preserve CRM's selection semantics. */
/* Compact, single-column order filter. Choices keep the shared menu styling. */
.filter-field{display:flex;flex-direction:column;gap:6px;min-width:0;margin:0}
.filter-label{font-size:12px;font-weight:500;color:var(--text-muted,#68707b);line-height:1.4}
.filter-field select,.filter-multi summary{width:100%;min-width:0;min-height:42px;margin:0;font-size:13px;font-weight:400}
.filter-multi{position:relative}
.filter-multi summary{display:flex;align-items:center;justify-content:space-between;gap:8px;list-style:none;cursor:pointer;border:1px solid var(--border,#e2e4e7);border-radius:10px;padding:10px 12px;background:#fff;box-sizing:border-box}
.filter-multi summary::-webkit-details-marker{display:none}
.filter-multi summary span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.filter-multi[open] summary,.filter-multi summary:focus-visible{border-color:#cbb139;outline:2px solid #f9df5733}
.filter-multi-menu{position:fixed;z-index:30;inset:auto;margin:0;width:max-content;max-width:300px;overflow:auto;background:#fff}
.filter-multi-menu>.row-link{padding:7px 10px;width:100%;text-align:left}
.filter-choice{display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:7px;cursor:pointer;font-size:13px;font-weight:400;margin:0}
.filter-choice:hover{background:#fff7ce}
.filter-choice input[type=checkbox]{width:16px;height:16px;flex:0 0 16px;margin:0;accent-color:#cfb126}
.filter-choice span{white-space:normal}
.filter-reset{white-space:nowrap}
.toolbar .filter-reset{margin-left:auto}
.toolbar.filter-strip,#invoicesPage .invoice-list-table>.toolbar.filter-strip{display:flex;flex-wrap:nowrap;align-items:flex-end;gap:8px;padding:12px;overflow-x:auto;overflow-y:hidden;max-width:100%;box-sizing:border-box}
.filter-strip>.filter-field,.filter-strip>.invoice-filter-field{flex:1 0 120px;min-width:120px;max-width:220px}
.filter-strip>.filter-search{flex:1.4 0 150px;min-width:150px;max-width:360px}
.filter-strip .filter-label,.filter-strip .invoice-filter-field>label{display:block;margin:0 0 6px;font-size:11px;font-weight:500;line-height:1.4;color:var(--muted)}
.filter-strip>.filter-field{gap:0}
.toolbar.filter-strip select,.toolbar.filter-strip input.search,.toolbar.filter-strip input[type=date]{width:100%;min-width:0;max-width:none;min-height:42px;margin:0;font-size:12px}
.filter-strip .filter-multi summary{font-size:12px}
.toolbar.filter-strip .result-count{flex:0 0 auto;max-width:240px;display:block;margin:0;align-self:center;font-size:10px;white-space:nowrap}
.toolbar.filter-strip>.check-chip,.toolbar.filter-strip>.filter-reset{flex:0 0 auto;white-space:nowrap;min-height:42px;margin:0;box-sizing:border-box}
.toolbar.filter-strip>.check-chip{width:auto;padding:8px;font-size:11px}
.toolbar.filter-strip>.filter-reset{flex:0 0 42px;width:42px;min-width:42px;height:42px;padding:11px;display:inline-flex;align-items:center;justify-content:center}
.filter-reset .ui-icon{width:18px;height:18px;flex-shrink:0}
.filter-multi-menu{box-sizing:border-box}
@media(max-width:650px){.filter-strip>.filter-field,.filter-strip>.invoice-filter-field{flex-basis:145px;min-width:145px}
.filter-multi-menu{max-width:260px}
}
#invoicesPage .filter-strip>.invoice-filter-field{flex-basis:110px;min-width:110px}
.toolbar.filter-strip :is(select,input.search),.filter-strip .filter-multi summary,.filter-strip .period-trigger{box-sizing:border-box;height:40px;min-height:40px;font-size:13px;font-weight:400;border:1px solid #cfd5dc;border-radius:11px;background:#fff;color:#17191c;box-shadow:0 1px 1px rgba(16,24,40,.024)}
.filter-strip .filter-multi summary{position:relative;padding:10px 34px 10px 12px;line-height:normal}
.filter-strip .filter-multi summary:hover{border-color:#98a2b3}
.filter-strip .filter-multi[open] summary,.filter-strip .filter-multi summary:focus-visible{border-color:#bca13a;outline:2px solid #f9df5733}
.filter-multi-menu{padding:6px;min-width:180px;border:1px solid #cfd5dc;border-radius:11px;box-shadow:0 12px 32px rgba(16,24,40,.14);max-height:min(320px,calc(100dvh - 16px))}
.filter-multi-menu .filter-choice{display:flex;align-items:center;gap:8px;min-height:30px;padding:6px 10px;border:1px solid transparent;border-radius:7px;margin:0;font-size:13px;line-height:16px;font-weight:400;box-sizing:border-box}
.filter-multi-menu .filter-choice:hover{background:#fffbeb;border-color:#f5d65b}
.filter-multi-menu .filter-choice:has(input:checked){background:#fff8df;border-color:#ecdfaa}
.filter-multi-menu .filter-choice:focus-within{outline:2px solid #bca13a;outline-offset:-2px}
.filter-multi-menu .filter-choice input{width:16px;height:16px;min-width:16px;min-height:16px;max-width:16px;max-height:16px;margin:0;padding:0;flex:0 0 16px;accent-color:#cfb126}
.filter-multi-menu .filter-choice+ .filter-choice{margin-top:2px}
.filter-multi-menu>.row-link{justify-content:flex-start!important}
.filter-strip>.order-state-filter{flex-basis:180px;min-width:180px;max-width:260px}
.order-state-menu{width:256px;max-width:calc(100vw - 16px);max-height:min(420px,calc(100dvh - 16px));padding:6px}
.order-state-sections{display:flex;flex-direction:column;gap:0}
.order-filter-section{border:0;min-width:0;margin:0;padding:0}
.order-filter-heading{padding:3px 10px;margin:0;font-size:11px;font-weight:600;line-height:14px;color:#8b939f}
.order-filter-section+ .order-filter-section{margin-top:6px;padding-top:5px;position:relative}
.order-filter-section+ .order-filter-section:before{content:'';position:absolute;left:10px;right:10px;top:0;border-top:1px solid var(--line)}
.order-state-menu .filter-choice{min-height:24px;padding:3px 10px;line-height:16px}
.order-state-menu .filter-choice+ .filter-choice{margin-top:0}
.filter-multi-menu .filter-multi-search{width:100%;min-width:210px;box-sizing:border-box;margin:0 0 6px;font-size:12px;min-height:38px}
.filter-choice[hidden],.filter-search-empty[hidden]{display:none}
.filter-search-empty{padding:10px}

/* Keep the accountant's wider set of filters in one row at desktop widths. */
.filter-strip>.filter-period{flex:0 0 200px;min-width:200px;max-width:240px}
.period-trigger{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;height:42px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);font-family:inherit;font-size:12px;font-weight:400;text-align:left;cursor:pointer}
.period-trigger>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.period-trigger .ui-icon{width:16px;height:16px;flex-shrink:0;color:var(--muted)}
.period-trigger[aria-expanded=true],.period-trigger:focus-visible{border-color:#cbb139;outline:2px solid #f9df5733}
.period-popover{position:fixed;inset:auto;margin:0;padding:12px;width:248px;max-width:calc(100vw - 24px);box-sizing:border-box;overflow:auto;background:white;color:var(--ink);border:1px solid var(--line);border-radius:14px;box-shadow:0 15px 45px #18223026;font-size:12px;z-index:40}
.period-popover.custom-period{width:550px}
.period-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:8px;font-size:13px}
.period-options{display:grid;gap:4px}
.period-options button{background:#fff;border:0;border-radius:8px;padding:9px 12px;text-align:left;color:var(--ink);font-size:12px}
.period-options button:hover,.period-options button[aria-pressed=true]{background:var(--accent-soft)}
.period-options button:focus-visible,.period-day:focus-visible{outline:2px solid #cbb139;outline-offset:-2px}
.period-arrow{width:28px;height:28px;display:grid;place-items:center;border:1px solid var(--line);background:#fff;border-radius:8px;color:var(--ink);font-size:16px}
.period-months{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.period-month-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;font-size:12px}
.period-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px}
.period-weekday{text-align:center;padding:4px 0;font-size:10px;color:var(--muted)}
.period-day{height:27px;border:0;border-radius:6px;background:#fff;color:var(--ink);font-size:11px;padding:0}
.period-day:hover,.period-day.inside{background:var(--accent-soft)}
.period-day.edge{background:var(--yellow);font-weight:700}
.period-mobile-next{visibility:hidden}
.period-manual{display:flex;gap:10px;margin-top:10px}
.period-manual label{flex:1;font-size:11px;color:var(--muted)}
.period-manual input{margin-top:4px}
.period-footer{display:flex;justify-content:space-between;align-items:center;margin-top:12px;gap:12px;padding-top:10px;border-top:1px solid var(--line)}
.period-footer .btn{min-height:34px;padding:7px 12px}
.period-footer .row-link{font-size:11px}
.period-error{color:var(--red);font-size:11px;margin:8px 0 0}
@media(max-width:580px){.period-popover.custom-period{width:310px}
.period-months{grid-template-columns:1fr}
.period-months>section+section{display:none}
.period-mobile-next{visibility:visible}
}
#invoicesPage .toolbar.filter-strip{gap:6px}
#invoicesPage .filter-strip>.invoice-filter-field{flex:1 0 92px;min-width:92px}
#invoicesPage .filter-strip>.filter-search{flex:1.3 0 135px;min-width:135px}
#invoicesPage .filter-strip>.filter-period{flex:0 0 180px;min-width:180px}
#invoicesPage .filter-strip>.check-chip{font-size:10px;padding:6px}

.analytics-global-filters .filter-strip>.filter-field{flex-basis:220px;max-width:300px}
.analytics-period-note{margin:0 0 20px;line-height:1.6}

/* Shared calculator typography: amounts lead, context stays secondary. */
.finance-note-actions{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px}
.finance-note-actions .row-link{font-size:inherit;line-height:inherit}
#modalRoot dialog.unified-editor.finance-methods-dialog{width:620px}
.finance-method-search{display:block;margin:18px 0 12px}
.finance-method-search input{margin-top:6px}
.finance-method-rows{margin-top:12px;max-height:min(440px,50vh);overflow:auto}
.finance-method-rows .crm-table{min-width:0;width:100%;table-layout:fixed}
.finance-method-rows th:last-child,.finance-method-rows td:last-child{text-align:right;white-space:nowrap}
.finance-method-rows td:first-child{overflow-wrap:anywhere}
.finance-links{display:flex;flex-direction:column;align-items:flex-start;gap:5px}
.finance-links .row-link{max-width:100%;font-size:var(--crm-type-body);font-weight:var(--crm-weight-label);line-height:1.4;overflow-wrap:anywhere}
.finance-links .directory-name{font-size:var(--crm-type-name)}
.finance-links .finance-allocation-link{font-size:10.5px;color:var(--muted)}
.finance-links .row-link:hover{text-decoration:underline;color:#927300}
.finance-number{white-space:nowrap}
.finance-method-cell{display:flex;flex-direction:column;gap:4px;overflow-wrap:anywhere}
.finance-transfer-to{color:var(--muted)}
.finance-list-card :is([data-action="cancel-transaction"],.finance-cancelled){width:104px!important}
.finance-list-card .btn.finance-cancelled:disabled{--action-bg:var(--status-neutral-soft);--action-edge:var(--status-neutral-edge);--action-text:var(--status-neutral);opacity:1!important;cursor:default!important}
.finance-comment,.finance-cancel-reason{white-space:normal;overflow-wrap:anywhere}
.finance-allocation-table{margin-top:16px}
.finance-allocation-table .directory-subline{max-width:none;white-space:normal;overflow-wrap:anywhere}
.finance-allocation-table th:last-child,.finance-allocation-table td:last-child{text-align:right}
#modalRoot .unified-editor.invoice-editor label.check-label{display:flex;align-items:center;gap:8px}
#modalRoot .unified-editor.invoice-editor label.check-label input{flex:0 0 16px;width:16px;height:16px;margin:0}
@media(min-width:721px){.finance-list-card .crm-table{table-layout:fixed;min-width:900px;width:100%}
.finance-list-card .crm-table th:nth-child(1){width:12%}
.finance-list-card .crm-table th:nth-child(2){width:20%}
.finance-list-card .crm-table th:nth-child(3){width:22%}
.finance-list-card .crm-table th:nth-child(4){width:12%;text-align:right}
.finance-list-card .crm-table th:nth-child(5){width:13%}
.finance-list-card .crm-table th:nth-child(6){width:9%}
.finance-list-card .crm-table th:nth-child(7){width:12%;text-align:right}
.finance-list-card .crm-table td{vertical-align:top;overflow-wrap:anywhere}
.finance-list-card .crm-table td:nth-child(4),.finance-list-card .crm-table td:last-child{text-align:right}
.finance-list-card .crm-table td:last-child .btn{min-height:34px;padding:8px 12px;font-size:11px;white-space:nowrap;overflow-wrap:normal}
}
.finance-list-card .crm-table td{font-size:12px;font-weight:400;line-height:1.5;padding-top:15px;padding-bottom:15px}
.finance-list-card .directory-name{font-size:12px!important;font-weight:500!important;line-height:1.5!important}
.finance-list-card td:nth-child(2)>.directory-name{font-weight:400!important}
.finance-list-card .finance-links .row-link{font-size:11px!important;font-weight:400!important;color:#667085;line-height:1.5}
.finance-list-card .finance-links .row-link.directory-name{font-size:12px!important;font-weight:500!important;color:var(--ink)}
.finance-list-card .finance-links{gap:3px}
.finance-list-card .finance-links .row-link:hover{color:#927300;text-decoration:underline}
.finance-list-card .directory-subline{font-size:10.5px;font-weight:400;line-height:1.5;color:#667085;margin-top:4px}
.finance-list-card td:nth-child(4)>.num{font-size:12px;font-weight:600;letter-spacing:0}
.finance-list-card .finance-method-cell{font-size:12px;font-weight:400}

/* Shared CRM cards and filters; quieter typography for a readable history. */
.audit-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
.audit-list .crm-table{table-layout:fixed;min-width:780px}
.audit-list .crm-table th:nth-child(1){width:125px}
.audit-list .crm-table th:nth-child(2){width:130px}
.audit-list .crm-table th:nth-child(3){width:205px}
.audit-list .crm-table td{vertical-align:top;font-size:var(--crm-type-body);font-weight:400;padding-top:15px;padding-bottom:15px;overflow-wrap:anywhere}
.audit-date,.audit-subject{font-weight:500}
.audit-content{display:grid;gap:6px;min-width:0}
.audit-links{display:flex;gap:6px 14px;flex-wrap:wrap}
.audit-links .row-link{font-size:11px;font-weight:400;color:#777;white-space:normal;text-align:left}
.audit-links .row-link:hover{color:#252525}
.audit-change{display:grid;gap:3px;padding:5px 0}
.audit-field,.audit-note{font-size:var(--crm-type-secondary);color:#858585;font-weight:400}
.audit-values{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px}
.audit-before{color:#888}
.audit-arrow{color:#9a9a9a}
.audit-more summary{cursor:pointer;font-size:11px;color:#777;width:fit-content;padding:4px 0}
.audit-more[open]>div{margin-top:4px}
.audit-list .filter-strip .filter-search{min-width:190px}
.audit-list .filter-strip>.filter-field{min-width:130px}
@media(max-width:640px){.audit-stats{grid-template-columns:1fr}
.audit-list .crm-table{min-width:0}
}
.audit-subject .row-link{font-size:var(--crm-type-body);font-weight:500}


.production-filters{margin-bottom:18px}
.production-list{display:grid;gap:14px}
.production-card{padding:0;overflow:hidden;margin:0}
.production-card-top{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:15px 20px;border-bottom:1px solid var(--line);font-size:12px}
.production-order{display:flex;flex-wrap:wrap;gap:6px 14px;align-items:center}
.production-order>span{color:var(--muted)}
.production-deadline{display:flex;gap:6px;align-items:center;font-size:11px;flex-shrink:0}
.production-deadline svg{width:15px;height:15px}
.production-work{padding:16px 20px 14px}
.production-work-title{display:flex;gap:12px;align-items:baseline;flex-wrap:wrap}
.production-work-title h2{font-size:15px;font-weight:700;margin:0;overflow-wrap:anywhere}
.production-quantity{font-size:12px;color:var(--muted);white-space:nowrap}
.production-spec{font-size:12px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--muted);margin:6px 0 0}
.production-card-bottom{display:grid;grid-template-columns:minmax(160px,1fr) minmax(190px,1fr) auto;gap:16px;padding:0 20px 16px;align-items:start}
.production-caption{font-size:11px;color:var(--muted);font-weight:500;margin:0}
.production-people,.production-current,.production-transfer{display:flex;flex-direction:column;align-items:flex-start;gap:7px;min-width:0}
.production-assignees{display:flex;flex-wrap:wrap;gap:5px}
.production-assignees>span{background:#f3f5f7;border:1px solid var(--line);border-radius:6px;padding:4px 8px;font-size:11px}
.production-last{font-size:10.5px;line-height:1.45;color:var(--muted)}
.production-transfer-empty{margin:0;line-height:1.5}
.production-transfer{align-self:center}
.production-history{border-top:1px solid var(--line)}
.production-history summary{display:flex;align-items:center;justify-content:space-between;list-style:none;padding:11px 20px;cursor:pointer;font-size:11px;font-weight:600;background:#fafbfc}
.production-history summary::-webkit-details-marker{display:none}
.production-history summary>span:first-child{display:flex;align-items:center;gap:6px}
.production-history summary svg{width:14px;height:14px}
.production-history summary:hover{background:var(--accent-soft,#fff9df)}
.production-history[open] .production-history-chevron{transform:rotate(180deg)}
.production-history-body{padding:4px 20px 16px}
.production-timeline{list-style:none;padding:0 0 0 14px;margin:10px 0 0;border-left:2px solid #e8ebef}
.production-timeline li{position:relative;padding:0 0 15px 8px}
.production-timeline li:last-child{padding-bottom:0}
.production-timeline li:before{content:'';position:absolute;left:-19px;top:5px;width:8px;height:8px;border:2px solid #fff;background:#d0b853;border-radius:50%}
.production-event-meta{display:flex;gap:6px 12px;flex-wrap:wrap;font-size:11px;color:var(--muted)}
.production-event-meta strong{color:var(--ink)}
.production-event-stages{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;font-size:12px;margin-top:5px}
.production-history-note{margin:14px 0 0}
#modal.production-comment-dialog{width:min(560px,calc(100vw - 24px))}
#modal.production-comment-dialog .editor-section{padding:0;border:0;box-shadow:none;background:none}
.production-comment-from{display:flex;flex-direction:column;align-items:flex-start;gap:7px;min-width:0}
#modal.production-comment-dialog .production-comment-label{display:flex;justify-content:space-between;gap:12px;align-items:baseline;margin-bottom:7px}
.production-comment-label span:last-child{font-size:11px;font-weight:400;color:var(--muted)}
#modal.production-comment-dialog textarea{display:block;width:100%;height:114px;min-height:94px;margin:0}
.production-comment-help{margin:8px 0 0!important;color:var(--muted);font-size:11px;line-height:1.5}
.production-comment-author{display:flex;gap:8px;align-items:center;font-size:11px;color:var(--muted);border-top:1px solid var(--line);padding-top:14px}
.production-comment-author strong{font-weight:500;color:var(--ink)}
.production-event-comment{display:flex;gap:9px;align-items:flex-start;max-width:650px;margin:10px 0 0;padding:11px 13px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2,#f8f9fb)}
.production-event-comment svg{width:16px;height:16px;flex-shrink:0;margin-top:1px;color:var(--muted)}
.production-event-comment p{margin:0;font-size:12px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:600px){.production-event-comment{padding:10px}}
@media(max-width:1100px){.production-card-bottom{grid-template-columns:1fr 1fr}
.production-transfer{grid-column:1/-1;align-items:flex-end}
}
@media(max-width:600px){.production-card-top{align-items:flex-start;flex-direction:column;gap:8px;padding:12px 14px}
.production-work{padding:14px}
.production-card-bottom{padding:0 14px 14px;grid-template-columns:1fr}
.production-transfer{align-items:flex-start}
.production-history summary{padding:11px 14px}
.production-history-body{padding:4px 14px 14px}
}
.production-card-bottom.production-readonly{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:600px){.production-card-bottom.production-readonly{grid-template-columns:1fr}
}

/* Shared group identity marker, always after the displayed name. */
.group-members-picker{max-height:320px;overflow:auto;display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}
.group-members-picker small{display:block;color:var(--muted);font-size:var(--crm-type-secondary);margin-top:3px}
.group-members-picker [hidden]{display:none!important}
.group-position-quantities>label{display:grid!important;grid-template-columns:1fr 110px;gap:16px;align-items:center;padding:8px 0;border-bottom:1px solid var(--line)}
.group-position-quantities>label input{margin-top:0!important;text-align:right}
.group-distribution .crm-table{table-layout:auto!important;min-width:850px}
.group-distribution .crm-table th{white-space:nowrap}
.group-distribution .crm-table th,.group-distribution .crm-table td{padding:12px!important}
.group-distribution .crm-table small{display:block;color:var(--muted);font-size:var(--crm-type-secondary);font-weight:400;margin-top:4px}
.group-distribution .crm-table td:first-child{min-width:170px;max-width:250px}
.group-distribution .group-qty{width:78px!important;min-width:78px!important;text-align:right}
.group-distribution .num{white-space:nowrap}
.group-distribution .group-method-link{max-width:155px;white-space:normal;text-align:left}
.group-distribution-note{margin-bottom:0}
.group-distribution .ui-icon-button{width:28px;height:28px;min-width:28px;padding:5px}
.group-distribution .crm-table td .button-row{flex-wrap:nowrap}
.production-packing{padding:0 20px 16px}
.group-distribution .refresh-section-heading{flex-wrap:wrap;gap:12px}
@media(max-width:700px){.group-members-picker{grid-template-columns:1fr}
}
.group-name-icon{display:inline-block;width:14px;height:14px;margin-left:5px;vertical-align:-2px;line-height:1;color:inherit}
.group-name-icon>.icon{display:block;width:100%;height:100%;margin:0}
#order-page .order-client-field{min-width:0;max-width:100%}
.order-client-field>label{display:block;margin-bottom:6px}
.order-client-picker{width:100%;min-width:0}
.order-client-picker .search-select-trigger{display:flex;align-items:center}
.order-client-picker .search-select-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}
.order-client-picker .search-select-meta{display:none}
.order-client-picker .search-select-menu{width:max(100%,320px);max-width:calc(100vw - 48px)}
.order-client-options{max-height:280px;overflow:auto;overscroll-behavior:contain}
.order-client-options .search-select-option{width:100%;text-align:left;background:#fff;font-family:inherit}
.order-client-options .search-select-option:hover:not(:disabled){background:#fffbeb}
.order-client-options .search-select-option:focus-visible{outline:2px solid #cfad23;outline-offset:-2px}
.order-client-options .search-select-option:disabled{opacity:.45;cursor:not-allowed}

/* Shared action-button contract. Loaded last so page-specific legacy sizes cannot
   change the 40px control, typography or semantic colours. Navigation, calendar
   cells and select options are not action buttons. */
/* Defaults also cover static buttons in date/unsaved dialogs. */
/* Text actions keep their transparent appearance and full-size hit area. */
/* Record links are inline content, not full-size action controls. Their text
   shares the cell's left edge and typography with the related client/details. */
/* Secondary supplier icons: identical geometry, quieter appearance. */
/* The close glyph is the same SVG as the rest of the application. */
/* Keep tab sizes consistent while retaining the calculator's selected state. */
:root{--action-height:40px;--action-radius:10px;--action-font:12.5px;--action-icon:18px;--icon-button-size:40px;--icon-button-radius:10px}
:is(.btn,.ui-icon-button,.rows-add,.compact-calculation-toggle,.workflow-text-button,.tech-btn,.period-arrow,.modal-header>.close,.mobile-menu-toggle){box-sizing:border-box!important;align-items:center;justify-content:center;height:var(--action-height)!important;min-height:var(--action-height)!important;padding:0 14px!important;gap:8px;border-radius:var(--action-radius)!important;font-family:inherit!important;font-size:var(--action-font)!important;font-weight:750!important;line-height:1.2!important;vertical-align:middle;box-shadow:none!important;transition:background-color .15s,border-color .15s,color .15s}
.btn{width:auto!important;min-width:0!important;flex:0 0 auto!important;white-space:nowrap!important}
:is(.btn,.ui-icon-button,.rows-add,.compact-calculation-toggle,.workflow-text-button,.tech-btn,.period-arrow,.modal-header>.close,.mobile-menu-toggle) svg{width:var(--action-icon)!important;height:var(--action-icon)!important;min-width:var(--action-icon)!important;flex:none!important}
:is(.ui-icon-button,.btn.icon-only,.period-arrow,.modal-header>.close,.mobile-menu-toggle){width:var(--action-height)!important;min-width:var(--action-height)!important;max-width:var(--action-height)!important;flex:0 0 var(--action-height)!important;padding:0!important}
:is(.btn,.rows-add,.ui-icon-button,.period-arrow,.modal-header>.close,.mobile-menu-toggle){border:1px solid var(--action-edge,#d6dbe2)!important;background:var(--action-bg,#fff)!important;color:var(--action-text,#344054)!important}
:is(.btn,.rows-add,.ui-icon-button,.period-arrow,.modal-header>.close,.mobile-menu-toggle):hover:not(:disabled){background:var(--action-hover-bg,#f5f6f8)!important;border-color:var(--action-hover-edge,#b9c1cc)!important;color:var(--action-hover-text,var(--action-text,#344054))!important}
:where(.btn:not(.light):not(.dark):not(.red):not(.danger):not(.ui-icon-button)),.btn[data-button-tone="primary"]{--action-bg:#ffd400;--action-edge:#dfbd00;--action-text:#171717;--action-hover-bg:#ffdc2f;--action-hover-edge:#cda900}
.btn[data-button-tone="secondary"]{--action-bg:#fff;--action-edge:#d6dbe2;--action-text:#344054;--action-hover-bg:#f5f6f8;--action-hover-edge:#b9c1cc}
.btn[data-button-tone="payment"]{--action-bg:var(--status-green-soft);--action-edge:var(--status-green-edge);--action-text:var(--status-green);--action-hover-bg:#dcefe3;--action-hover-edge:#abcdb6}
.rows-add,.btn[data-button-tone="supplier"]{--action-bg:var(--status-blue-soft);--action-edge:var(--status-blue-edge);--action-text:var(--status-blue);--action-hover-bg:#deecfa;--action-hover-edge:#afcbe6}
.btn.dark,.btn[data-button-tone="cancel"]{--action-bg:#202225;--action-edge:#202225;--action-text:#fff;--action-hover-bg:#36383c;--action-hover-edge:#36383c}
.btn.red,.btn.danger,.ui-icon-button--danger,.ui-icon-button.danger,.ui-icon-button.position-danger,.btn[data-button-tone="danger"]{--action-bg:#fff;--action-edge:var(--status-red-edge);--action-text:var(--status-red);--action-hover-bg:var(--status-red-soft);--action-hover-edge:#d9a9a9}
:is(.compact-calculation-toggle,.workflow-text-button){background:transparent!important;border:1px solid transparent!important;color:#667085!important;font-weight:650!important;padding:0 10px!important;text-decoration:none!important}
:is(.compact-calculation-toggle,.workflow-text-button):hover:not(:disabled){background:#f3f4f6!important;color:#344054!important}
.row-link{max-width:100%;font-family:inherit;line-height:1.4;white-space:normal;overflow-wrap:anywhere;vertical-align:baseline}
.row-link:focus-visible{outline:3px solid #80b2e7;outline-offset:3px;border-radius:3px}
.row-link:disabled{opacity:.4;cursor:not-allowed}
.row-link[hidden]{display:none!important}
:is(.btn,.ui-icon-button,.rows-add,.compact-calculation-toggle,.workflow-text-button,.tech-btn,.period-arrow,.modal-header>.close,.mobile-menu-toggle):focus-visible{outline:3px solid #80b2e7!important;outline-offset:3px!important}
:is(.btn,.ui-icon-button,.rows-add,.compact-calculation-toggle,.workflow-text-button,.tech-btn,.period-arrow):disabled{opacity:.4!important;cursor:not-allowed!important}
#orderPositions .rows-row .rows-work-row .ui-icon-button{--action-bg:#fafbfc;--action-edge:#d6dbe2;--action-text:#7d8694;--action-hover-bg:#f3f4f6;--action-hover-edge:#b9c1cc;--action-hover-text:#475467}
#orderPositions .rows-row .rows-work-row .ui-icon-button.position-danger{--action-hover-bg:var(--status-red-soft);--action-hover-edge:var(--status-red-edge);--action-hover-text:var(--status-red)}
#orderPositions .rows-row .rows-work-row .position-row-actions,.rows-row-icons{gap:8px}
.modal-header>.close{font-size:var(--action-font)!important}
.tech-btn{white-space:nowrap;flex:0 0 auto}
.toolbar.filter-strip>.filter-reset{align-self:flex-end}
:is(.btn,.ui-icon-button,.rows-add,.compact-calculation-toggle,.workflow-text-button,.tech-btn,.period-arrow,.modal-header>.close){display:inline-flex}
:is(.btn,.ui-icon-button,.rows-add,.compact-calculation-toggle,.workflow-text-button,.tech-btn,.period-arrow,.modal-header>.close,.mobile-menu-toggle)[hidden]{display:none!important}
.rows-row-work .rows-supplier-branch{top:50%;transform:translateY(-50%)}

/* Shared CRM dialog spacing. All renderers use the same outer gutters;
   editor cards retain their calculator styling inside the scrollable body. */
#modalRoot #modal,.unsaved-warning{--dialog-gutter:24px;max-height:calc(100dvh - 32px);overflow:hidden}
#modalRoot #modal:not(.unified-editor)[open]{display:flex;flex-direction:column}
#modalRoot #modal .modal-shell,.unsaved-warning .modal-shell{max-height:calc(100dvh - 34px);min-height:0}
#modalRoot #modal :is(.modal-head,.modal-header),.unsaved-warning .modal-head{flex:none;align-items:flex-start;gap:16px;padding:20px var(--dialog-gutter) 16px}
#modalRoot #modal :is(.modal-head,.modal-header)>:first-child{min-width:0;overflow-wrap:anywhere}
#modalRoot #modal :is(.modal-head,.modal-header) h2{margin:0;font-size:20px;line-height:1.3}
#modalRoot #modal :is(.modal-head,.modal-header) p{margin:6px 0 0;font-size:12px;line-height:1.5}
#modalRoot #modal .modal-body,.unsaved-warning .modal-body{flex:1 1 auto;min-height:0;max-height:none;padding:20px var(--dialog-gutter) 24px;overflow:auto;overscroll-behavior:contain}
#modalRoot #modal .modal-body>form{margin-top:0;margin-bottom:0}
#modalRoot #modal .modal-body>:first-child,
#modalRoot #modal .modal-body>[hidden]:first-child+:not([hidden]){margin-top:0}
#modalRoot #modal .modal-body>:last-child{margin-bottom:0}
#modalRoot #modal .modal-body p{line-height:1.5;overflow-wrap:anywhere}
#modalRoot #modal .modal-body .crm-table-wrap+p{margin-top:12px}
#modalRoot #modal .modal-body :is(.form-grid,.fields)>*{min-width:0}
#modalRoot #modal .modal-body form>p:first-child{margin-top:0}
#modalRoot #modal .modal-body :is(input,select,textarea){max-width:100%}
#modalRoot #modal:not(.unified-editor) .modal-body label:not(.check-chip):not(.check-label){font-size:12px;font-weight:500;line-height:1.45}

#modalRoot #modal :is(.modal-actions,.modal-footer),.unsaved-warning .modal-actions{flex:none;position:static;flex-wrap:wrap;gap:10px;margin:0;padding:16px var(--dialog-gutter)}
#modalRoot #modal :is(.modal-actions,.modal-footer) .btn,.unsaved-warning .modal-actions .btn{max-width:100%;white-space:normal!important;overflow-wrap:anywhere;height:auto!important;min-height:var(--action-height)!important;padding:9px 14px!important}
#modalRoot #modal :is(.modal-head,.modal-header) :is(.close,.modal-close){flex-shrink:0}
@media(max-width:600px){#modalRoot #modal,.unsaved-warning{--dialog-gutter:16px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}
#modalRoot #modal .modal-shell,.unsaved-warning .modal-shell{max-height:calc(100dvh - 18px)}
#modalRoot #modal :is(.modal-head,.modal-header),.unsaved-warning .modal-head{padding-top:16px;padding-bottom:14px}
#modalRoot #modal .modal-body,.unsaved-warning .modal-body{padding-top:16px;padding-bottom:16px}
#modalRoot #modal :is(.modal-actions,.modal-footer),.unsaved-warning .modal-actions{padding-top:14px;padding-bottom:14px}
}
@media print{#modalRoot #modal,#modalRoot #modal .modal-shell,#modalRoot #modal .modal-body{max-height:none;overflow:visible}
}

/* Approved reference: positions left, financial rail right, payments below. */
/* Compact row controls follow the approved reference; dialogs keep shared sizes. */
#order-page .order-workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,.54fr);gap:16px;align-items:stretch;margin-bottom:16px}
#order-page .order-workspace>#orderPositions{grid-column:1;grid-row:1;min-width:0;margin:0;padding-bottom:20px}
#order-page .order-financial-rail{grid-column:2;grid-row:1;display:flex;flex-direction:column;gap:14px;min-width:0}
#order-page .order-financial-rail>.card{margin:0;min-width:0}
#order-page .order-workspace>.group-distribution{grid-column:1/-1;grid-row:2;margin:0;min-width:0}
#order-page .order-financial-rail #orderMethods[hidden]{display:none}
#order-page .order-financial-rail .order-methods-line{display:flex;flex-direction:column;align-items:stretch;gap:12px}
#order-page .order-financial-rail #orderMethods .check-grid{flex:0 0 auto;gap:6px}
#order-page .order-financial-rail #orderMethods .check-chip{font-size:11px;padding:8px;gap:6px}
#order-page .order-financial-rail #orderMethods .order-payment-deadline{flex:0 0 auto;border:0;padding:0;margin:0}
#order-page .order-financial-rail #orderMethods .order-payment-deadline>label{display:block;flex:1 1 100%;min-width:0}
#order-page .order-financial-rail #orderMethods .order-payment-deadline input{width:100%;min-width:0}
#order-page .order-financial-rail .refresh-documents .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
#order-page .order-financial-rail .refresh-documents label{min-height:0;font-size:10.5px}
#order-page .order-financial-rail .refresh-section-title h2{font-size:15px}
#order-page .order-financial-rail .refresh-section-icon{width:26px;height:26px;border-radius:7px}
#order-page .order-financial-rail .refresh-section-heading{gap:8px}
#order-page #orderComment textarea{min-height:62px}
#order-page #orderComment .refresh-section-heading{margin-bottom:10px}
@media(max-width:1100px){#order-page .order-workspace{grid-template-columns:minmax(0,1fr)}
#order-page .order-financial-rail{grid-column:1;grid-row:2;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
#order-page .order-workspace>.group-distribution{grid-row:3}
#order-page .order-financial-rail>.refresh-documents{grid-column:1/-1}
}
@media(max-width:720px){#order-page .order-financial-rail{display:flex}
#order-page .order-workspace>#orderPositions{padding-bottom:16px}
}
#order-page .order-workspace .rows-row-icons .ui-icon-button{--action-height:32px;--action-icon:16px;--action-radius:8px}
#order-page .order-workspace .rows-work-row .ui-icon-button{--action-height:28px;--action-icon:14px;--action-radius:7px}
#order-page .order-workspace .workflow-supplier-state{margin:0;gap:4px}
#order-page .order-workspace .workflow-text-button{--action-height:28px;--action-font:11px;padding:0 6px!important}
@media(max-width:720px){#order-page .order-workspace .rows-row-icons .ui-icon-button{--action-height:40px;--action-icon:18px}
}
#order-page .order-financial-rail>#orderMethods,#order-page .order-financial-rail>#orderDocuments{padding:16px}
#order-page .order-financial-rail .refresh-section-heading{margin-bottom:12px}
#order-page .order-financial-rail .refresh-documents .form-grid{gap:10px}

/* Shared footer: existing 40px buttons and calculator-style select. */
.paged-list{min-width:0;scroll-margin-top:20px}
.paged-list:focus{outline:none}
.list-pagination{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:18px 0 0;font-size:12px;color:var(--muted)}
.list-pagination-info{display:flex;align-items:center;gap:24px;flex-wrap:wrap}
.list-pagination-range{font-variant-numeric:tabular-nums;white-space:nowrap}
.list-pagination-size{display:flex;align-items:center;gap:10px;margin:0;font-size:12px;font-weight:500;white-space:nowrap}
.list-pagination-size select{width:76px;margin:0}
.list-pagination-pages{display:flex;align-items:center;gap:6px;max-width:100%;overflow-x:auto;padding:4px;margin:-4px;scrollbar-width:thin}
.list-pagination-pages .btn[aria-current="page"]{--action-bg:#ffd400;--action-edge:#dfbd00;--action-text:#171717}
.list-pagination-gap{flex:none;width:16px;text-align:center}
@media(max-width:600px){.list-pagination{gap:14px}.list-pagination-info{width:100%;justify-content:space-between;gap:12px}.list-pagination-size{gap:8px}.list-pagination-pages{margin-left:0;margin-right:0}}

/* Invoice cards follow the order workspace: shared cards, typography and actions. */
.invoice-card-workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,.58fr);gap:16px;align-items:start;margin-bottom:16px}
.invoice-card-main{display:grid;gap:16px;min-width:0}
#invoiceDetail .card{min-width:0;margin:0}
.invoice-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:18px}
.invoice-section-title{display:flex;align-items:center;gap:9px;min-width:0}
.invoice-section-title h2{display:flex;align-items:center;gap:9px;margin:0;font-size:15px;font-weight:750;line-height:1.3;letter-spacing:-.012em}
.invoice-section-icon{width:28px;height:28px;display:flex;align-items:center;justify-content:center;flex:none;border:1px solid var(--line);border-radius:8px;background:var(--surface-2);color:#667085}
.invoice-section-icon .icon{width:16px;height:16px}
.invoice-section-title .refresh-count{font-size:11px;font-weight:600;color:var(--muted);border:1px solid var(--line);border-radius:6px;padding:3px 6px}
.invoice-read-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 24px}
.invoice-read-field{min-width:0;font-size:13px;line-height:1.5;overflow-wrap:anywhere}
.invoice-read-field>span{display:block;color:var(--muted);font-size:11px;font-weight:500;margin-bottom:6px}
.invoice-description{margin-top:20px;padding-top:16px;border-top:1px solid var(--line)}
.invoice-source-links{display:flex;flex-wrap:wrap;gap:8px 16px;margin-top:14px;font-size:12px}
.invoice-order-state{display:flex;align-items:center;gap:10px;margin-top:16px}
.invoice-order-state>span:first-child{font-size:11px;color:var(--muted)}
.invoice-document-bottom{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin-top:18px;border-top:1px solid var(--line);padding-top:14px}
.invoice-document-bottom p{flex:1 1 220px;margin:0;line-height:1.6}
.invoice-total{display:flex;align-items:baseline;justify-content:space-between;gap:16px;padding-bottom:18px;border-bottom:1px solid var(--line)}
.invoice-total>span{font-size:13px;line-height:1.4}
.invoice-total>strong{font-size:25px;line-height:1.2;font-weight:750;text-align:right;overflow-wrap:anywhere}
.invoice-payment-meters{display:grid;gap:16px;margin:18px 0}
.invoice-payment-meters>div>div:first-child{display:flex;align-items:baseline;justify-content:space-between;gap:12px;font-size:12px}
.invoice-payment-meters strong{font-size:14px;font-weight:650;text-align:right}
.invoice-payment-meters .progress{height:4px;margin-top:9px}
.invoice-remaining-progress i{background:#c98282}
.invoice-payment-panel>.small{line-height:1.6}
.invoice-primary-action{display:flex;margin-top:16px}
.invoice-primary-action>.btn{flex:1!important}
.invoice-extra-actions{position:relative;display:inline-block;margin-top:10px}
.invoice-extra-actions>summary{list-style:none;cursor:pointer}
.invoice-extra-actions>summary::-webkit-details-marker{display:none}
.invoice-extra-menu{position:absolute;left:0;top:calc(100% + 6px);z-index:5;display:grid;gap:6px;padding:8px;border:1px solid var(--line);border-radius:12px;background:#fff;box-shadow:0 8px 24px #18223018;min-width:220px}
#invoiceDetail .invoice-composition-module,#invoiceDetail .invoice-history-module{margin-top:16px}
.invoice-history-module .crm-table{min-width:860px}
.invoice-history-module .crm-table th,.invoice-composition-module .crm-table th{white-space:normal;background:transparent;text-transform:none;letter-spacing:normal;font-size:11px;font-weight:700}
.invoice-history-module .crm-table :is(th,td){vertical-align:top}
.invoice-history-module .crm-table :is(th,td):nth-child(4),.invoice-composition-module .crm-table :is(th,td):not(:first-child){text-align:right}
.invoice-history-comment{white-space:normal;overflow-wrap:anywhere;max-width:none}
.invoice-history-empty{margin:0;line-height:1.6}
.invoice-composition-module .crm-table{min-width:620px}
.invoice-composition-module p{margin-bottom:0;line-height:1.6}
.invoice-edit-section+.invoice-edit-section{margin-top:22px;border-top:1px solid var(--line);padding-top:20px}
.invoice-edit-section h3{margin:0 0 14px;font-size:14px;font-weight:750}
.invoice-edit-section>p{margin:0 0 14px}
.invoice-edit-section>.form-grid+p{margin:12px 0 0}
.invoice-edit-fieldset{min-width:0;padding:0;margin:0;border:0}
.invoice-edit-fieldset>.check-chip{margin-bottom:16px}
.invoice-composition-picker{max-height:280px;overflow:auto;border:1px solid var(--line);border-radius:12px}
.invoice-work-choice{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;padding:14px;margin:0!important;font-size:12px;font-weight:400;line-height:1.5}
.invoice-work-choice+.invoice-work-choice{border-top:1px solid var(--line)}
.invoice-work-choice:hover{background:#fffbea}
.invoice-work-choice>span{min-width:0;overflow-wrap:anywhere}
.invoice-work-choice strong{font-weight:600}
.invoice-work-choice small{display:block;color:var(--muted);margin-top:3px}
.invoice-work-choice>.num{text-align:right;white-space:nowrap}
.invoice-editor-total{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-top:14px;font-size:12px}
.invoice-editor-total strong{margin-left:8px;font-size:15px}
@media(max-width:1100px){.invoice-card-workspace{grid-template-columns:minmax(0,1fr)}}
@media(max-width:720px){.invoice-history-module .crm-table,.invoice-composition-module .crm-table{min-width:0}.invoice-composition-module .crm-table :is(th,td):not(:first-child){text-align:left}}
@media(max-width:600px){.invoice-read-grid{gap:16px}.invoice-total>strong{font-size:23px}.invoice-work-choice{grid-template-columns:auto minmax(0,1fr);gap:8px}.invoice-work-choice>.num{grid-column:2;text-align:left}.invoice-section-heading{gap:10px}.invoice-history-module .crm-table :is(th,td):nth-child(4){text-align:left}}

/* Reuses the invoice/order card primitives; only work-specific layout lives here. */
#reorderDetail .card{min-width:0;margin:0}
#reorderDetail .reorder-financial-rail{display:grid;gap:16px;min-width:0}
#reorderDetail .invoice-history-module,#reorderDetail .reorder-history{margin-top:16px}
.reorder-secondary{display:block;margin-top:4px;color:var(--muted);font-size:12px}
.reorder-work-name{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
.reorder-pricing{display:grid;grid-template-columns:1fr .65fr 1fr;gap:18px;border-top:1px solid var(--line);margin-top:20px;padding-top:18px}
.reorder-pricing>div{min-width:0;text-align:right}
.reorder-pricing>div:first-child{text-align:left}
.reorder-pricing span{display:block;color:var(--muted);font-size:11px;margin-bottom:7px}
.reorder-pricing strong{font-size:16px;font-weight:650;overflow-wrap:anywhere;white-space:normal}
.reorder-note,.reorder-confirmed-note{margin:16px 0 0;line-height:1.6}
.reorder-workflow,.reorder-document-action{margin-top:18px}
.reorder-document-action:empty{display:none}
.reorder-timeline{display:grid;gap:0}
.reorder-timeline>p{margin:0;line-height:1.6}
.reorder-timeline article+article{margin-top:16px;padding-top:16px;border-top:1px solid var(--line)}
.reorder-event-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap;font-size:12px}
.reorder-event-head strong{font-weight:600}
.reorder-event-head>span{font-size:11px;color:var(--muted)}
.reorder-timeline ul{display:grid;gap:8px;list-style:none;padding:0;margin:12px 0 0}
.reorder-timeline li{display:grid;grid-template-columns:minmax(130px,.5fr) minmax(0,1fr);gap:16px;font-size:12px;line-height:1.5;overflow-wrap:anywhere}
.reorder-timeline li>span:first-child{color:var(--muted)}
.reorder-timeline article>p{margin:10px 0 0}
.rows-supplier-heading .reorder-number-link{font-size:11px;font-weight:400!important;color:var(--muted)}
.rows-supplier-heading .reorder-number-link:hover{color:var(--blue)}
@media(max-width:600px){.reorder-pricing{gap:12px}.reorder-pricing strong{font-size:14px}.reorder-timeline li{grid-template-columns:minmax(0,1fr);gap:3px}}

/* Shared CRM fields: geometry lives here; component files keep only layout.
   The scope includes regular pages, both dialog types and the date popover.
   Textareas and list boxes retain their useful multiline height. */
:root{
 --field-height:40px;
 --field-radius:11px;
 --field-font-size:13px;
 --field-padding:9px 12px;
 --select-chevron:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23667085' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
 --select-arrow-size:14px;
 --select-arrow-inset:12px;
 --select-padding-end:38px;
}
:is(#app,#modalRoot #modal,.period-popover) :where(
 input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="color"]):not([type="range"]):not([type="button"]):not([type="submit"]):not([type="reset"]),
 select,textarea,.search-select-trigger,.filter-multi>summary,.period-trigger,.order-deadline-picker>summary
){
 box-sizing:border-box;min-width:0;
 padding:var(--field-padding);border-radius:var(--field-radius);
 font-family:inherit;font-size:var(--field-font-size);font-weight:400;line-height:20px;
 border:1px solid var(--field-border,var(--line-strong));
}
:is(#app,#modalRoot #modal,.period-popover) :where(
 input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="color"]):not([type="range"]):not([type="button"]):not([type="submit"]):not([type="reset"]),
 select:not([multiple]):not([size]),select:not([multiple])[size="1"],
 .filter-multi>summary,.period-trigger,.order-deadline-picker>summary
){height:var(--field-height);min-height:var(--field-height)}
:is(#app,#modalRoot #modal,.period-popover) textarea{line-height:1.5;resize:vertical}
:is(#app,#modalRoot #modal) select[multiple],:is(#app,#modalRoot #modal) select[size]:not([size="1"]){height:auto;min-height:150px}
/* A searchable value uses the same text weight as a native selected option.
   Its optional second line is allowed extra height instead of clipping. */
:is(#app,#modalRoot #modal) .search-select-value{font-size:var(--field-font-size);font-weight:400;line-height:20px;color:inherit}
:is(#app,#modalRoot #modal) .search-select-meta{font-size:11px;line-height:15px;margin-top:2px}
:is(#app,#modalRoot #modal) .search-select-trigger{min-height:var(--field-height)}
:is(#app,#modalRoot #modal) .order-client-picker .search-select-trigger{height:var(--field-height)}
:is(#app,#modalRoot #modal,.period-popover) :is(input,select,textarea,.search-select-trigger,.filter-multi>summary,.period-trigger,.order-deadline-picker>summary):not(:disabled):not([readonly]):hover{border-color:#aeb6c1}
:is(#app,#modalRoot #modal,.period-popover) :is(input,select,textarea,.search-select-trigger,.filter-multi>summary,.period-trigger,.order-deadline-picker>summary):focus-visible{
 border-color:var(--field-focus,#c5a400)!important;outline:0!important;
 box-shadow:0 0 0 3px rgba(255,212,0,.18)!important;
}
:is(#app,#modalRoot #modal) :is(input,select,textarea,.search-select-trigger)[aria-invalid="true"]{border-color:#d92d20!important}
:is(#app,#modalRoot #modal,.period-popover) :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea,.search-select-trigger):disabled{background-color:#f2f4f7!important;border-color:#e2e6ea!important;color:#8f98a7!important;box-shadow:none;opacity:1}
:is(#app,#modalRoot #modal) :is(input,textarea)[readonly]{background-color:var(--surface-2);color:var(--ink-2)}
:is(#app,#modalRoot #modal) select.status-select{--field-border:var(--tone-edge);font-weight:600}
.cloud-account{--field-border:#484c53}
/* One chevron and text clearance for native, searchable and multi-value selects. */
select:not([multiple]):not([size]),select:not([multiple])[size="1"]{
 -webkit-appearance:none;appearance:none;
 padding-right:var(--select-padding-end)!important;
 /* Disabled/status/dialog backgrounds may change colour, but not the arrow. */
 background-image:var(--select-chevron)!important;
 background-repeat:no-repeat!important;
 background-position:right var(--select-arrow-inset) center!important;
 background-size:var(--select-arrow-size) var(--select-arrow-size)!important;
}
.cloud-account{--select-chevron:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23d0d5dd' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")}
.search-select-trigger,.filter-multi>summary{position:relative;padding-right:var(--select-padding-end)!important}
.search-select-trigger:after,.filter-multi>summary:after{
 content:"";position:absolute;right:var(--select-arrow-inset);top:50%;
 width:var(--select-arrow-size);height:var(--select-arrow-size);
 transform:translateY(-50%);pointer-events:none;
 background:var(--select-chevron) center/contain no-repeat;
}
@media(forced-colors:active){
 select:not([multiple]):not([size]),select:not([multiple])[size="1"]{-webkit-appearance:auto;appearance:auto;background-image:none!important}
 .search-select-trigger:after,.filter-multi>summary:after{background:CanvasText;mask:var(--select-chevron) center/contain no-repeat}
}

/* Creation uses the same two-column editor and shared searchable selector. */
#modal.order-create-dialog{width:min(640px,calc(100vw - 32px));overflow:visible}
#modal.order-create-dialog .modal-shell,#modal.order-create-dialog .modal-body{overflow:visible}
#modal.order-create-dialog .order-client-picker{width:100%;min-width:0}
#modal.order-create-dialog .search-select-menu{z-index:30;max-height:320px;overflow:auto}
#modal.order-create-dialog .order-client-options{max-height:240px;overflow:auto}
#modal.order-create-dialog .order-deadline-popup{z-index:35;right:0;left:auto}
/* Dedicated service row keeps action buttons and content stable in every state. */
.order-autosave{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex:0 0 260px;width:260px;max-width:100%;height:40px;min-height:40px;font-size:12px;color:#667085;white-space:nowrap;font-variant-numeric:tabular-nums}
.detail-list-nav.has-autosave{align-items:center;min-height:40px}
.detail-list-nav.has-autosave>.row-link{min-width:0;text-align:left}
#settingsPage .settings-toolbar>.order-autosave{flex:0 0 260px;align-self:center}
#settingsPage .settings-toolbar>.order-autosave>.btn{width:auto;flex:none}
@media(max-width:850px){#settingsPage .settings-toolbar>.order-autosave{flex:0 0 40px;align-self:flex-end}}
@media(max-width:600px){.detail-list-nav.has-autosave{flex-direction:column;align-items:stretch;gap:4px}.detail-list-nav.has-autosave>.order-autosave{flex:0 0 40px;align-self:flex-end}}
.order-autosave[data-state="saved"] #order-save-state::before{content:'✓';color:#26925d;margin-right:6px}
.order-autosave[data-state="error"]{color:#b42318}
@media(max-width:600px){#modal.order-create-dialog .fields{grid-template-columns:1fr}#modal.order-create-dialog .order-deadline-popup{right:auto;left:0}}

#modal.copycenter-payment{width:min(540px,calc(100vw - 24px))}
.copycenter-entry{display:grid;grid-template-columns:minmax(0,1fr) 150px;gap:18px;margin-bottom:18px}
.copycenter-article{display:flex;align-items:center;min-height:40px;box-sizing:border-box;margin-top:6px;padding:8px 12px;background:#f4f6f8;border:1px solid var(--line,#e2e6eb);border-radius:11px;font-size:13px;font-weight:500;color:#344054;overflow-wrap:anywhere}
.copycenter-entry input{font-variant-numeric:tabular-nums}
.copycenter-meta{display:flex;justify-content:space-between;gap:12px;margin-top:22px;font-size:11px;color:#667085}
.copycenter-meta b{font-weight:500;color:#475467}
.quick-payment-option p{margin:7px 0 0 24px;line-height:1.5}
@media(max-width:600px){.copycenter-entry{grid-template-columns:1fr;gap:12px}}

.phone-field .phone-help{display:none;margin-top:5px;color:var(--muted);font-size:11px;font-weight:400;line-height:1.4}
.phone-field:focus-within .phone-help,.phone-field.phone-invalid .phone-help{display:block}
.phone-field.phone-invalid .phone-help{color:var(--status-red)}
.phone-field input[aria-invalid="true"]{border-color:var(--status-red-edge)!important;background:var(--status-red-soft)!important}

.position-production-lock{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:14px 0 0;padding:10px 12px;background:#f5f6f8;border-radius:8px;color:#667085;font-size:12px}
.position-correction{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:14px 0 0;padding:14px 16px;border:1px solid #eadbb5;border-radius:10px;background:#fffaf0;color:#554626}
.position-correction>div{min-width:0;flex:1 1 240px}.position-correction strong{font-size:13px}.position-correction p{margin:6px 0;white-space:pre-wrap;overflow-wrap:anywhere}.position-correction small{color:#796c53}
.documents-admin-note{margin:12px 0 0}
@media(max-width:600px){.position-correction>.btn{white-space:normal;height:auto;min-height:36px;text-align:left}.position-production-lock{align-items:flex-start}}

.server-login{min-height:100vh;display:grid;place-items:center;padding:24px;background:#f4f6f8}
.server-login-card{width:min(420px,100%);padding:32px}
.server-login-logo{display:inline-flex;background:#ffdc39;color:#111;padding:12px 18px;border-radius:10px;font-size:24px;font-weight:800;margin-bottom:20px}
.server-login-card h1{font-size:24px;margin:0 0 8px}
.server-login-card form{display:grid;gap:18px;margin-top:24px}
.server-login-card input{width:100%}
.server-login-card button{width:100%;margin-top:4px}
