:root:not([data-theme=dark]){--bg:#f7f8fa;--line:#e4e5e8;--accent:#7045bf;--muted:#79808a;--text:#21222a}.shell:has(#orders:not([hidden])) .top{background:#17181f;color:white;height:auto;min-height:52px}.shell:has(#orders:not([hidden])) .content{max-width:none;padding:18px}.shell:has(#orders:not([hidden])) #identity{display:none}
#orders .jrHead,#orders .jrFooter,.jrTools{display:flex;align-items:center;gap:8px}.jrHead{margin-bottom:12px}.jrHead>div:first-child,.jrFooter small{margin-right:auto}.jrHead h2{font-size:20px;line-height:1.1;margin:0}.jrHead small,.jrFooter small{color:var(--muted)}#orders #newOrder,#journalStages button[aria-pressed=true],#journalSubs button[aria-pressed=true],.jrFooter b{background:#6941bf;color:#fff}.jrCard{background:var(--panel);padding:16px;border:1px solid var(--line);border-radius:9px;box-shadow:0 1px 3px #15182212}.jrCard button,.jrHead button,.jrCard summary,.jrHead summary{font-size:13px}.jrHead details,.jrTools details{position:relative}.jrHead summary,.jrTools summary{background:var(--panel);list-style:none;border:1px solid var(--line);border-radius:7px;padding:7px 11px;cursor:pointer;white-space:nowrap}.jrPop{display:grid;position:absolute;right:0;z-index:2;min-width:155px;padding:10px;background:var(--panel);border:1px solid var(--line);border-radius:6px;box-shadow:0 4px 16px #0002}.jrPop label:has([type=checkbox]){display:flex!important;align-items:center}
#journalStages{display:flex;gap:12px;overflow:auto}#journalStages button{flex:1;white-space:nowrap;min-width:88px;font-weight:600}#journalStages button:nth-child(7):not([aria-pressed=true]){background:#f9eded;color:#ad4249}.jrTools{margin:12px 0;background:var(--bg);padding:9px;flex-wrap:wrap;border-radius:7px}#journalSearch{flex:1;min-width:180px!important}#journalSubs{display:flex;overflow:auto}#journalSubs button{white-space:nowrap;border-radius:3px;font-size:12px;padding:6px}.jrStats{display:grid;grid-template-columns:repeat(4,1fr);border:1px solid var(--line);border-radius:7px}.jrStats div{padding:8px 16px;font-size:11px;color:var(--muted);border-right:1px solid var(--line)}.jrStats strong{display:block;font-size:19px;line-height:1.2;color:var(--text)}.jrStats div:last-child strong{color:#ca424b}#orderList{overflow:auto;border:1px solid var(--line);border-radius:6px;margin-top:12px}#orderList small{display:block;max-width:220px;text-overflow:ellipsis;overflow:hidden;color:var(--muted)}#orderList button{width:auto;border:0;background:transparent;margin:0;padding:0;font-weight:600;color:inherit}#orderList .orderLink{color:#7041bd}.statusBadge{border-radius:20px;background:var(--bg);padding:3px 8px;font-size:12px}.jrFooter{margin-top:12px}.jrFooter b{padding:4px 9px;border-radius:6px}#orderMessage:empty{display:none}@media(max-width:700px){.jrStats{grid-template-columns:1fr 1fr}.jrCard{padding:8px}.jrFooter{flex-wrap:wrap}.jrHead small{display:none}}
.jrShort,.nav summary svg{display:none}.shell:has(#orders:not([hidden])) .jrShort{display:flex;gap:clamp(4px,2vw,35px)}.jrShort button{color:#d6d7dc;background:transparent;border:0;padding:6px}.jrShort svg,.nav summary svg{width:19px;height:19px;vertical-align:middle}.jrShort button:hover{color:white;background:#3b3548;border-radius:4px}@media(max-width:850px){.shell:has(#orders:not([hidden])) .jrShort{display:none}}
#journalFilters{display:grid;gap:6px}.jrTools summary{min-height:34px;font-size:14px}.jrTools .jrPop{min-width:min(265px,88vw);max-height:65vh;overflow:auto;z-index:5}.jrPop select{width:100%}#journalIntervals{display:flex;gap:3px;flex-wrap:wrap;margin-block:6px}#orderList th{font-size:12.5px;font-weight:600}.jrCard :focus-visible{outline:2px solid #7045bf;outline-offset:2px}#journalSubs[hidden]{display:none}
#journalColumns{max-height:65vh;overflow:auto;z-index:6;width:245px}.jrColumn{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:3px}.jrColumn button{padding:2px 6px}.jrStats[hidden]{display:none}#orderList .jrSpacious td{padding-block:18px}#orderList tbody tr:hover{background:var(--bg)}#journalIntervals button{padding:3px 6px}
#orders{font-family:Inter,system-ui,"Segoe UI",sans-serif;font-size:14px}
#orders .jrCard{padding:16px;border-radius:9px}.jrCard .jrTools{margin:12px 0 8px;padding:8px 12px;min-height:50px;background:#f1f1f5}
#orders .jrTools :is(summary,button),#orders .jrHead :is(summary,button),#orders #journalStages button,#orders .jrActions button{width:auto;height:34px;min-height:34px;border:1px solid var(--line);border-radius:6px;padding:0 14px;align-content:center;font:400 14px/1.25 inherit;font-family:inherit;font-size:14px;font-weight:400}
#orders #journalSearch{height:34px;margin:0;min-width:140px!important}
#orders #journalSubs button{min-height:28px;height:28px;border:0;border-radius:4px;padding:0 9px;font-size:12px}
#orders #journalStages{gap:16px}#orders #journalStages button{flex:1;font-weight:600}
#orders #journalFilterCaption[aria-expanded=true]{border-color:#6844b8;color:#56319b}
#orders #journalFilterPanel{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px 10px;background:var(--panel);border:1px solid var(--line);border-radius:7px;padding:10px 16px;margin:8px 0 12px;box-shadow:0 1px 3px #1718210c}
#orders #journalFilterPanel[hidden]{display:none}#journalFilters{display:contents}
#journalFilterPanel label,#journalFilterPanel fieldset{min-width:0;margin:0;padding:0;border:0;font:500 12px/1.3 inherit;font-family:inherit;font-size:12px;color:var(--muted)}
#journalFilterPanel label{display:flex;flex-direction:column;gap:3px}
#journalFilters label:nth-child(4){grid-column:5;grid-row:1}#journalFilters label:nth-child(5){grid-column:1;grid-row:2}
#journalFilterPanel .jrDates{grid-column:4;grid-row:1}#journalFilterPanel legend{padding:0;margin:0 0 3px}
#journalFilterPanel select,#journalFilterPanel .jrDates>div{border:1px solid var(--line);border-radius:6px;background:var(--panel);width:100%;height:34px;margin:0;padding:0 8px;color:var(--text);font:inherit;font-size:14px}
.jrDates>div{display:flex;align-items:center}.jrDates input[type=date]{min-width:0;width:46%;margin:0;border:0;padding:0;font-size:11px;background:transparent;color:inherit}
#journalFilterPanel .jrDebt{grid-column:2 / 4;grid-row:2}#journalFilterPanel .jrDebt span{display:flex;align-items:center;gap:7px;color:var(--text);height:34px}.jrDebt input[type=checkbox]{width:16px;height:16px;margin:0}
.jrActions{grid-column:4 / 6;grid-row:2;display:flex;align-items:end;justify-content:end;gap:8px}#journalApply{background:#6941bf;color:white}
#orders .jrStats{margin-top:10px}.jrStats div{padding:8px 16px}
#orderList{max-height:65vh;overflow:auto}#orderList table{width:max-content;min-width:100%;border-collapse:separate;border-spacing:0}
#orderList th{position:sticky;top:0;background:var(--bg);z-index:1;height:53px;text-align:left;font-size:12.5px;padding:8px;color:var(--text)}#orderList td{vertical-align:middle;padding:10px 8px;line-height:1.45;font-size:14px;height:78px;border-bottom:1px solid var(--line)}
#orderList th[data-column="1"]{min-width:225px}#orderList th:is([data-column="2"],[data-column="3"]){min-width:140px}#orderList th[data-column="4"]{min-width:215px}
#orderList td:has(.orderLink) details{display:inline-block;vertical-align:middle;position:relative;margin-left:6px}#orderList td details summary{list-style:none;cursor:pointer;color:var(--muted);display:inline-block}
#orderList td details[open]>:is(button,ul){display:block;margin:4px 0}
#orderList tr.jrAged{background:#fdf6f6}#orderList .jrAged .jrAge{font-size:12px;font-weight:600;color:#ab363e}
#orderList .statusBadge{font-size:12px;padding:3px 9px;border-radius:20px;white-space:nowrap}.statusBadge::before{content:'•';margin-right:4px;color:#737985}
@media(max-width:900px){#orders #journalFilterPanel{grid-template-columns:repeat(2,minmax(0,1fr))}#journalFilterPanel :is(.jrDates,.jrDebt,.jrActions),#journalFilters label:nth-child(n){grid-column:auto;grid-row:auto}}
@media(max-width:500px){#orders #journalFilterPanel{grid-template-columns:1fr}}
[data-theme=dark] #orderList tr.jrAged{background:#33282c}[data-theme=dark] #orderList .jrAge{color:#ff939a}
@media(min-width:901px){.shell:has(#orders:not([hidden])) .content{padding-inline:10px}.shell:has(#orders:not([hidden])) .content{padding-top:12px}}
#orders #journalApply{background:#6941bf;color:#fff;border-color:#6941bf}#journalFilterPanel select{font-weight:400}
#orderList th[data-column="1"]{min-width:252px}#orderList th[data-column="4"]{min-width:233px}#orderList th[data-column="2"],#orderList th[data-column="3"]{min-width:142px}
#orderList .orderLink{display:inline-block;width:auto!important;color:#6546a7;font-size:14px}#orderList time{font-size:11px;color:var(--muted)}
#orderList td details .jrRowActions{display:grid;gap:5px;padding:8px;border:1px solid var(--line);background:var(--panel)}
#orderList td details:not([open]) .jrRowActions{display:none}.jrPrintBatch{max-height:80vh;overflow:auto;padding:24px;border:1px solid var(--line);border-radius:8px}.jrPrintBatch th,.jrPrintBatch td{padding:6px;text-align:left}
@media print{body:has(dialog.jrPrintBatch[open])>:not(.jrPrintBatch){display:none!important}dialog.jrPrintBatch[open]{position:static;max-height:none;overflow:visible;border:0}dialog.jrPrintBatch button{display:none}}
@media(min-width:1100px){#orders #journalSearch{flex:0 1 340px}#orders #journalPeriod{margin-left:auto}}
#orderList tr.jrAged td:first-child{border-left:2px solid #d78f94}#orderList tbody td:has(.orderLink){color:var(--text)}
#orders #orderList .orderLink{font-family:inherit;font-size:14px;font-weight:600}.jrTools summary:before,#journalFilterCaption:before{display:inline-block;width:15px;height:15px;vertical-align:-2px;margin-right:6px;background:currentColor;content:'';mask:center/contain no-repeat var(--jrIcon)}
#journalPeriod summary{--jrIcon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M7 2v6m10-6v6M3 11h18'/%3E%3C/svg%3E")}
#journalFilterCaption{--jrIcon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7'%3E%3Cpath d='M3 4h18l-7 8v7l-4 2v-9z'/%3E%3C/svg%3E")}
@media(min-width:901px){
 .shell:has(#orders:not([hidden]) #orderForm[hidden]){height:100dvh;min-height:0;overflow:hidden}
 .shell:has(#orders:not([hidden]) #orderForm[hidden]) .content{min-height:0;overflow:auto}
}
#journalBulk{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-height:44px;margin:8px 0;padding:8px 14px;border-radius:8px;background:#6a3fc7;color:white;font-size:14px}
#journalBulk[hidden],#journalBulkNotice:empty{display:none}#journalBulk>strong{margin-right:6px}#journalBulk>span{position:relative}
#orders #journalBulk button{background:#ffffff24;color:white;height:28px;width:auto;border:1px solid #ffffff30;border-radius:5px;padding:0 12px;margin:0;font-size:13px;font-weight:500}#orders #journalBulk button:hover{background:#ffffff38}#orders #journalBulk button:disabled{opacity:.55}
#orders #journalBulk #journalClearSelection{margin-left:auto}#orders #jbRefuse{background:#ac3b69}
.jbMenu{position:absolute;top:calc(100% + 4px);left:0;z-index:12;background:var(--panel);border:1px solid var(--line);box-shadow:0 6px 20px #25213425;border-radius:7px;padding:4px;min-width:190px}
#orders #journalBulk .jbMenu button{display:block;width:100%;text-align:left;height:auto;min-height:32px;background:var(--panel);border:0;color:var(--text)}
.jbDialog{width:min(500px,94vw);border:0;border-radius:10px;padding:20px;background:var(--panel);color:var(--text);box-shadow:0 12px 36px #17141d30}.jbDialog::backdrop{background:#0006}.jbDialog header,.jbDialog footer{display:flex;align-items:center;gap:8px}.jbDialog header{justify-content:space-between}.jbDialog footer{justify-content:flex-end}.jbDialog select,.jbDialog textarea{width:100%;margin:6px 0}.jbDialog footer button:last-child{background:#6a3fc7;color:white}.jbDialog button:disabled{opacity:.5}
.jbDialog{margin:clamp(16px,10vh,96px) auto auto}.jbDialog select:focus-visible{outline:2px solid #7755c6}
@supports (appearance:base-select){
 .jbDialog select,.jbDialog select::picker(select){appearance:base-select}
 .jbDialog select::picker(select){border:1px solid var(--line);border-radius:6px;background:var(--panel);color:var(--text);max-height:min(45vh,360px);overflow:auto}
 .jbDialog select option{min-height:28px;padding:4px 10px}
}
#journalBulk>strong{font-size:13px;font-weight:600}
#orders #journalBulk button{border-color:transparent;font-weight:600;font-size:12px}
#orders #journalBulk #jbRefuse{margin-left:14px;position:relative}
#jbRefuse:before{content:"";position:absolute;left:-13px;top:4px;bottom:4px;border-left:1px solid #ffffff40}
#orders #journalBulk #journalClearSelection{background:transparent;border:0;width:28px;padding:0;font-size:16px}
#orderList tr.jrSelected>td{background:#f4efff} .jrRelated label{display:flex;align-items:center;gap:.5rem;padding:.4rem} .jrRelated>div{max-height:45vh;overflow:auto} .jrRelated button{margin:.2rem} #orderList th select{max-width:7rem}
.jrDrawer{position:fixed;inset:0 0 0 auto;margin:0;width:min(460px,95vw);height:100dvh;max-height:100dvh;border:0;padding:20px;box-shadow:-4px 0 22px #24203826;color:#211f28}.jrDrawer::backdrop{background:#20202744}.jrDrawer header,.jrDrawer nav{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.jrDrawer header{justify-content:space-between}.jrDrawer dl{display:grid;grid-template-columns:40% auto;row-gap:9px}.jrDrawer dd{margin:0}.jrDrawer dt{color:#646370}
.jbDialog.jrRelated{width:min(1240px,92vw);max-width:92vw;max-height:86vh;padding:0;border:0;overflow:auto}.jbDialog.jrRelated>header{display:flex;justify-content:space-between;align-items:center;background:#6842bf;color:white;padding:14px 22px;margin:0}.jrRelated>header h3{margin:0;font-size:17px}.jrRelated>section,.jrRelated>nav,.jrRelated>footer{margin:14px 24px}.jrGroupSummary{padding:12px;background:#f6f2fb;border:1px solid #e2d8f3;border-radius:7px}.jrGroupSummary header,.jrGroupSummary p,.jrRelated footer{display:flex;justify-content:space-between;align-items:center}.jrGroupSummary header{font-size:12px;color:#673caf}.jrGroupSummary p{padding:8px;background:white}.jrRelated nav{display:flex;border-bottom:1px solid #eee}.jrRelated nav button{border:0;background:white}.jrRelated nav [aria-current]{color:#6742b7;border-bottom:2px solid}.jrGroupList{max-height:27vh;overflow:auto;margin:6px 0}.jrRelated label[hidden]{display:none}.jrRelated footer button,.jrRelated footer button:hover{background:#6941ba;color:white}.jrRelated footer button:disabled{opacity:.5}.jrSplitCols{display:grid;grid-template-columns:1fr 1fr;gap:16px}.jrSplitCols>div{border:1px solid #dedbe5;border-radius:6px;padding:10px}.jrClip{position:relative;vertical-align:middle;width:23px;height:24px}.jrClip:before{content:'';display:inline-block;width:6px;height:13px;border:1.4px solid currentColor;border-radius:5px;transform:rotate(40deg)}.jrClip.linked{color:#6542b1}.jrStats{grid-template-columns:repeat(6,minmax(0,1fr))!important}
.jrGroupTotals{width:100%;border-collapse:collapse;background:white;font-size:13px}.jrGroupTotals td{padding:8px;border-bottom:1px solid #eee;text-align:right;white-space:nowrap}.jrGroupTotals td:first-child{text-align:left}.jrGroupTotals tr:first-child{color:#686177;font-size:12px}.jrGroupTotals tr:nth-child(2){background:#f1edf9;font-weight:600}.jrDrawer>section button{margin:2px}.jrDrawer>div section{border-top:1px solid #e9e6eb;padding:12px 0}.jrRelated nav button[aria-current="false"]{color:inherit;border-bottom:0}

.jrDrawer{box-sizing:border-box;width:min(800px,96vw);padding:0 24px 24px;font-family:Arial,sans-serif}
.jrDrawer::backdrop{background:#0006;backdrop-filter:blur(2px)}
.jrDrawer>header{height:66px;border-bottom:1px solid #eee;justify-content:flex-start;flex-wrap:nowrap;gap:10px}
.jrDrawer>header h3{font-size:15px;font-weight:600}.jrDrawer>header nav{margin-left:auto;gap:5px}
.jrDrawer>header button{width:36px;height:36px;background:white;border:0;border-radius:5px;color:#38353c}
.jrDrawer>header button:hover{background:#f1edf8}.jrDrawer>header button:focus-visible{outline:2px solid #6842bf}
.jrDrawer>header svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.jrRelated input[type=search]{width:min(520px,100%);height:34px;border:1px solid #dedbe5;border-radius:5px;padding:0 10px}
.jrGroupTotals tr:nth-child(2){background:#effbf2}.jrGroupTotals td:first-child{width:56%}.jrGroupSummary{background:#f3f0fa}
.jrRelated>header small{display:block;margin-top:3px;color:white;font-size:12px}.jrRelated>header button{border:0;background:transparent;color:white;font-size:20px}

.jrDrawer .jrDetailGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:20px 0 12px}
.jrDrawer .jrDetailGrid section{border:1px solid #d9d8dc;border-radius:10px;padding:14px;min-width:0}
.jrDetailGrid h4{font-size:14px;margin:0 0 10px}.jrDetailGrid p,.jrDetailGrid ul{margin:0;padding:0;list-style:none;font-size:13px;line-height:1.6}.jrDrawer .jrDetailGrid dl{margin:0;grid-template-columns:auto 1fr;font-size:13px;gap:4px 8px}.jrDetailGrid li+li{border-top:1px solid #eee}.jrDetailGrid section:nth-child(n+5){min-height:145px}
.jrGroupChoices{border:1px solid #e7e5e9;border-radius:6px;padding:12px 16px;min-height:90px}.jrRelated .jrGroupList label{border-bottom:1px solid #eee}
.jrSplitCols>div{min-height:145px}.jrSplitCols h4{padding:8px;margin:0;background:#f1edf9;color:#544174}.jrSplitCols>div+div h4{background:#eef9f1;color:#385942}.jrSplitDialog section>select{min-height:34px}.jrSplitDialog .jrSplitCols{margin-top:14px}
@media(max-width:600px){.jrDrawer .jrDetailGrid,.jrSplitCols{grid-template-columns:1fr}.jrDrawer>header{height:auto;min-height:64px;flex-wrap:wrap}}
.jrBehindSplit{visibility:hidden}.jrBehindSplit::backdrop{background:transparent;backdrop-filter:none}
.jrDrawer .jrDetailGrid{gap:14px;padding:28px 12px 14px}
.jrDrawer .jrDetailGrid section:nth-child(n+5){min-height:210px}
.jrDrawer>section{display:flex;flex-wrap:wrap;gap:8px;padding:0 12px}
.jrDrawer>section button{flex:1;min-height:44px;margin:0;border:1px solid #d5cde3;border-radius:8px;background:white;text-align:start;padding:10px 14px;font:600 13px Arial,sans-serif}
.jrDrawer>section button:enabled:hover,.jrDrawer>section button:focus-visible{background:#f5f1fa;border-color:#7654aa}
.jrDrawer>div:not(.jrDetailGrid){padding:0 12px}
.jrSplitDialog .jrSplitCols>div{min-height:194px}

#journalBulk,.jbDialog{font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif}
#orders #journalBulk button{border-radius:6px}
#orders #journalBulk .jbMenu{min-width:148px;padding:4px}
#orders #journalBulk .jbMenu button{font-size:13px;font-weight:400;min-height:29px;padding:4px 12px}
.jbDialog ul{max-height:32vh;overflow:auto;margin-block:8px;padding-inline-start:24px}

@media (pointer:coarse){#orders #orderList .orderLink{min-height:44px;min-width:48px;padding:4px 8px;touch-action:manipulation}}
