/* Windows-inspired controls; compact keyboard/mouse workspace and roomy touch controls. */
/* Give a single queue the full work area and defer secondary role shortcuts. */
.rw-secondary-role{border:1px solid var(--line);border-radius:4px;background:var(--card);margin:10px 0}
.rw-secondary-role>summary{padding:10px 12px;cursor:pointer;min-height:44px;font-size:14px;font-weight:600}
.rw-secondary-role[open]>summary{border-bottom:1px solid var(--line)}
.rw-secondary-role>.rw-actions,.rw-secondary-role>.rw-role{padding:10px;margin:0}
@media(min-width:900px) and (pointer:fine){#rw-work-body>:only-child{grid-column:1/-1}.rw-secondary-role>summary{min-height:34px;padding:8px 10px;font-size:13px}}

:root{--primary:#0067c0;--on-primary:#fff;--bg:#f3f3f3;--card:#fff;--surface2:#e9eef5;--ink:#1f1f1f;--muted:#626262;--line:#d8d8d8;--input-line:#ababab;--ok:#107c10;--okbg:#e7f3e8;--warn:#9d5d00;--warnbg:#fff4ce;--bad:#a4262c;--badbg:#fde7e9;--info:#0067c0;--infobg:#e5f1fb;--r:4px;--r-sm:3px;--r-md:4px;--r-lg:6px;--r-xl:8px;--shadow:0 1px 3px #00000012}
body{font-family:'Segoe UI',Tahoma,Arial,sans-serif;color:var(--ink);background:var(--bg)}
button,input,select,textarea{font-family:inherit}svg.classic-svg{vertical-align:middle;flex-shrink:0}
header{background:#f9f9f9;color:var(--ink);border-bottom:1px solid var(--line)}
header button,header .langbtn{background:#fff;border:1px solid var(--line);color:var(--ink);border-radius:4px}
.btn{border-radius:4px;box-shadow:none}.btn.ghost{border-width:1px}.card,.rw-action,.rw-taskgroup,.rw-recent,.rw-request,.sh-taskbox,.sh-more-group{border-radius:6px;box-shadow:none}
input,select,textarea{border-radius:4px}.chip{border-radius:4px}.sh-total,.rw-count{background:var(--surface2);border-radius:4px}
.td-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px}.td-title h2{display:flex;align-items:center;gap:8px;font-size:21px;margin:0}.td-title p{font-size:13px;color:var(--muted);margin:3px 0 0}
.td-title .btn{width:auto}.td-invoice{background:var(--card);border:1px solid var(--line);border-radius:6px;margin-bottom:12px;overflow:clip}
.td-caption{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border-bottom:1px solid var(--line)}.td-caption h3{font-size:17px;margin:0}.td-caption h3 span{font-size:13px;font-weight:400}
.td-meta{display:flex;align-items:center;gap:16px;flex-wrap:wrap;padding:8px 12px;font-size:13px;color:var(--muted)}.td-meta span:first-child{display:flex;align-items:center;gap:5px}
.td-stages{display:flex;border-block:1px solid var(--line);background:#fafafa}.td-stages>span{flex:1;padding:7px 10px;font-size:13px;color:var(--muted);border-inline-end:1px solid var(--line)}.td-stages .current{background:var(--infobg);color:var(--primary);font-weight:700}.td-stages .done{color:var(--ok)}
.td-tools{display:flex;flex-wrap:wrap;gap:6px;padding:8px 12px}.td-tools .btn{width:auto;display:flex;align-items:center;gap:5px;font-size:13px;font-weight:400;padding:6px 9px;min-height:32px}
.td-help{font-size:13px;color:var(--muted);padding:4px 12px 10px;line-height:1.6}.td-table-wrap{overflow-x:auto}.td-table{width:100%;border-collapse:collapse;text-align:start;min-width:740px;font-size:14px}.td-table th{font-weight:600;background:#f5f5f5;padding:8px;border-block:1px solid var(--line);white-space:nowrap;text-align:start;font-size:13px}.td-table td{padding:8px;vertical-align:middle;border-bottom:1px solid #ececec}.td-table tbody tr:hover{background:#f7faff}.td-table td:first-child{min-width:200px}.td-table td:first-child>b{display:block;font-weight:600}.td-code{font:11px Consolas,monospace;color:var(--muted);display:block;margin-bottom:2px}.td-number{font-variant-numeric:tabular-nums;font-weight:600}.td-countcell{display:flex;gap:5px;align-items:center}.td-count{width:88px;min-width:64px;padding:5px 7px;height:32px;min-height:32px;font-size:14px}.td-match{border:1px solid var(--line);border-radius:4px;background:#fafafa;color:var(--ink);padding:5px 8px;font-size:12px;min-height:32px;cursor:pointer}.td-match:hover{border-color:var(--primary);background:var(--infobg)}.td-note{width:160px;font-size:13px;padding:5px 7px;min-height:32px;height:32px}.td-owner,.td-requester,.td-new{display:block;font-size:11px;color:var(--muted);margin-top:3px}.td-owner{color:var(--primary)}.td-diff{display:inline-block;font-size:12px;white-space:nowrap}.td-diff.same{color:var(--ok)}.td-diff.different{color:var(--bad);font-weight:700}.td-diff.pending{color:var(--muted)}
.td-signatures{display:flex;gap:14px;flex-wrap:wrap;background:#fafafa;padding:9px 12px;font-size:12px;color:var(--muted)}.td-signatures b{color:var(--ink)}.td-message{padding:0 12px;font-size:13px;color:var(--ok)}.td-message:not(:empty){padding-block:9px;border-top:1px solid var(--line);background:var(--okbg)}.td-message.error{color:var(--bad);background:var(--badbg)}
.td-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;background:var(--card);border-top:1px solid var(--line)}.td-footer>b,.td-footer b{font-size:13px}.td-footer p{font-size:12px;color:var(--muted);margin-top:4px;line-height:1.5}.td-footer-buttons{display:flex;gap:8px;flex-wrap:wrap}.td-footer .btn{width:auto;display:flex;gap:6px;align-items:center;font-size:14px;min-height:36px;padding:7px 12px}.td-footer .btn.ghost{font-size:12px}
.td-detail{background:var(--card);border:1px solid var(--line);border-radius:4px;margin-top:8px}.td-detail>summary{display:flex;align-items:center;gap:7px;font-size:13px;padding:10px 12px;cursor:pointer}.td-detail>summary::before{content:'›';font-size:18px}.td-detail[open]>summary::before{transform:rotate(90deg)}.td-detail-body{padding:10px 12px;border-top:1px solid var(--line)}.td-extra{border:0;border-top:1px solid var(--line);border-radius:0;margin:0}.td-extra .row{margin-top:6px}.td-clip{margin-bottom:10px}.td-clip p{font-size:13px;line-height:1.6}.td-reassign{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:13px;padding-top:8px}.td-reassign .btn{width:auto;font-size:12px;min-height:32px;padding:6px 9px}
@media(min-width:900px) and (pointer:fine){
 body{font-size:14px;line-height:1.45}header{display:flex;gap:16px;padding:8px 16px;height:56px}.sh-session{margin-inline-start:auto;flex:none;gap:8px}.sh-session .who{font-size:12px}.sh-session .langbtn{height:32px;min-width:80px;padding:4px 8px;font-size:12px}header .hb b{font-size:15px!important}header .hb img{height:28px!important}header button,.sh-back,.sh-chat{min-height:32px;padding:5px 9px;min-width:32px}.sh-head-actions{gap:6px}
 #nav{top:56px;bottom:auto;height:42px;padding:0 16px;justify-content:flex-start;border-top:0;border-bottom:1px solid var(--line);background:#fafafa;gap:4px}#nav button{flex:0 0 auto;display:flex;align-items:center;gap:6px;min-height:42px;padding:6px 14px;font-size:13px;border-radius:0}#nav button .ic{margin:0}#nav button.on{background:var(--infobg);box-shadow:inset 0 -2px var(--primary);font-weight:600}#nav .bdg{position:static;min-width:17px;height:17px}
 main,#app.sh-dashboard{max-width:1280px;padding:12px 16px 32px;margin-top:42px}main:has(>section.td-screen){max-width:1400px}.card{padding:10px;margin-bottom:8px}.btn,.btn.ghost{min-height:34px;padding:7px 12px;font-size:14px}.row{gap:8px}input,select{min-height:34px;padding:6px 8px;font-size:14px}textarea{padding:8px;font-size:14px}h2{font-size:21px}h3{font-size:17px}.step-back{min-height:32px;padding:5px 10px;font-size:13px;margin-bottom:8px}
 .sh-welcome{margin-bottom:12px}.sh-welcome h2{font-size:21px;margin-bottom:0}.sh-welcome p{display:none}.sh-sectionhead{padding:8px 10px;gap:8px}.sh-sectionhead h3,.rw-role h3,.rw-work h3{font-size:16px;margin:0}.rw-role,.rw-work,.rw-taskgroup{margin-bottom:12px}.rw-role>.sh-sectionhead{padding:0 0 8px}.rw-actions{grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:8px}.rw-action{min-height:62px;padding:10px;gap:10px}.rw-action b{font-size:14px}.rw-action small{font-size:12px;margin-top:2px;line-height:1.4}.rw-action>span:last-child{font-size:16px}.rw-action svg{width:20px;height:20px}.rw-work>.sh-sectionhead{padding:0 0 8px;margin:0}#rw-work-body{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:start}.rw-taskgroup{margin:0}.rw-taskgroup .sh-sectionhead{padding:8px 10px}.rw-taskgroup h4{font-size:14px}.rw-taskrow{min-height:54px;padding:8px 10px;gap:8px}.rw-taskrow b{font-size:13px;line-height:1.4}.rw-taskrow small{font-size:12px;margin-top:2px;line-height:1.4}.rw-row-action{font-size:12px;padding:6px 8px;border-radius:4px}.sh-empty{font-size:13px;padding:12px 10px}.rw-request,.rw-pending{padding:10px;margin-bottom:8px}.rw-request>b,.rw-pending>b{font-size:15px}.rw-request p,.rw-pending p{margin:4px 0 8px;font-size:12px}.rw-trips .btn,.rw-pending .btn{min-height:34px;font-size:14px;padding:7px 10px}.sh-alltasks{font-size:13px;min-height:34px;padding:8px 10px}.sh-alertline{margin-top:8px;min-height:34px;padding:8px;font-size:13px}.sh-more-group{margin-bottom:8px}.sh-more-group>summary{min-height:38px;padding:8px 10px;font-size:14px}.sh-more-actions{gap:8px;padding:8px}.sh-more-actions .sh-action{min-height:60px;padding:10px}.sh-action b{font-size:14px}.sh-action small{font-size:12px}.sh-action-icon{padding:6px;border-radius:4px}.sh-message-link{min-height:34px;padding:8px;margin-bottom:10px;font-size:13px}
 .wf-steps{margin:8px 0;font-size:13px}.wf-steps span{padding:5px 8px;border-radius:4px}.wf-printbar{padding:8px;margin:8px 0}.wf-printbar .btn{min-height:32px;padding:6px 10px;font-size:13px}.wf-options{margin:8px 0}.wf-options>summary{min-height:34px;padding:8px;font-size:13px}.wf-options>div{padding:0 8px 8px}.wf-sendbar{bottom:8px}.wf-sendbar .btn{min-height:36px;font-size:15px}.rw-next{padding:10px;margin:8px 0}.rw-next>b{font-size:15px}.rw-next p{font-size:13px}.rw-next .btn{min-height:34px;margin-top:6px}
 .qty button{width:36px;height:34px;font-size:21px;border-radius:4px}.qty input{height:34px;font-size:16px}.backfab,.chatfab{width:36px;height:36px;bottom:12px;font-size:18px;border-radius:4px;box-shadow:var(--shadow)}.chatfab{background:var(--primary)}
}
@media(max-width:899px),(pointer:coarse){
 .td-title{align-items:flex-start}.td-title h2{font-size:19px}.td-title p{font-size:12px}.td-meta{gap:8px}.td-caption{padding:10px}.td-stages span{font-size:12px;padding:8px}.td-footer{align-items:stretch;flex-direction:column}.td-footer-buttons{flex-direction:column}.td-footer .btn,.td-tools .btn,.td-count,.td-match,.td-note{min-height:44px;height:auto}.td-count,.td-note{font-size:16px}.td-title .btn{min-height:44px}.td-detail>summary{min-height:44px}.rw-request p{line-height:1.6}.sh-welcome{margin-bottom:14px}.sh-session{gap:6px}.sh-back,.sh-chat{min-height:40px}#app.sh-dashboard{padding-top:16px}.td-screen{padding-bottom:8px}
}
@media print{.td-title button,.td-tools,.td-footer,.td-extra,.td-audio{display:none!important}.td-table{min-width:0}.td-invoice{break-inside:avoid}.td-match{display:none}}
