/* Shared rhythm, legible labels and a single visual hierarchy. */
:root{--muted:#6c7e72}
[hidden]{display:none!important}
.eyebrow{display:none}
main{padding-top:26px}
.heading{gap:16px;margin-bottom:22px}.heading-actions{flex-wrap:wrap;justify-content:flex-end}
.heading .muted,.muted{line-height:1.7}
.form-section-title{font-size:15px;font-weight:650;padding:14px 0 9px;border-bottom:1px solid var(--line);color:#355d48}
.form-section-title:first-of-type{padding-top:0}
.ux-required,.required-mark{color:#a66e42;font-weight:600}
.formgrid>label,.formgrid>div>label{line-height:1.7}
.formgrid input,.formgrid select{width:100%}
.formgrid input[type=checkbox],.formgrid input[type=radio]{width:auto}
.formgrid .wide{min-width:0}
.formgrid>button{align-self:end;justify-self:start;min-width:132px}
.formgrid>small,.formgrid>p.muted{font-size:12px;color:#718477}
input::placeholder,textarea::placeholder{color:#8c9a91}
input.ux-invalid,select.ux-invalid,textarea.ux-invalid{border-color:#bd815a;background:#fffdf9}
button:focus-visible,a:focus-visible,summary:focus-visible{outline:2px solid #539b78;outline-offset:3px}
summary{cursor:pointer}details>summary{list-style-position:inside}
.searchbar{flex-wrap:wrap}.searchbar input:not([type=hidden]){flex-basis:200px}
.customer-tile-main,.product-tile-main{min-width:0}.customer-tile-main strong,.product-tile-main strong{overflow-wrap:anywhere}
body[data-page=customers] .list-heading small{display:none}
body[data-page=stock_new] form.card,body[data-page=new_intake] form.card,body[data-page=edit_customer] form.card{max-width:1000px;margin-left:auto;margin-right:auto}
body[data-page=stock_new] h1,body[data-page=new_intake] h1{max-width:1000px;margin:0 auto 18px}
.finance-amounts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin:18px 0;padding:16px;background:#f5f8f5;border-radius:10px}
.finance-amounts small{display:block;color:#74887b;font-size:12px}.finance-amounts strong{display:block;margin-top:6px;font-size:18px;overflow-wrap:anywhere}
body[data-page="operating"] .daily-workspace .day-work{position:relative;padding:18px 22px;border-left-color:#c8d4cb}
body[data-page="operating"] .daily-workspace .day-work.q1{border-left-color:#c48065;background:#fffaf6}
body[data-page="operating"] .daily-workspace .day-work.q2{border-left-color:#438e6a;background:#fcfefc}
body[data-page="operating"] .daily-workspace .day-work.q3{border-left-color:#c8ac60;background:#fffef8}
body[data-page="operating"] .daily-workspace .day-work.q4{border-left-color:#b6c1b9;background:white}
.day-work.q2 .day-priority.high{background:#e4f1e9;color:#316c4d}
body[data-page="operating"] .daily-workspace .day-work h2{margin:9px 0 5px;font-size:16px}body[data-page="operating"] .daily-workspace .day-owner{margin:0 0 8px;color:#6c8273}
body[data-page="operating"] .daily-workspace .day-finish{font-size:12px;margin:6px 0;color:#6c8273}.assistant-basis{margin:8px 0}
body[data-page="operating"] .daily-workspace .day-result>summary{background:#e4f1e9;color:#296747;border:1px solid #c5ddcd;border-radius:8px;font-size:13px}
body[data-page="operating"] .daily-workspace .day-result[open]>summary{background:#f3f8f4}
body[data-page=procurement] .heading-actions{max-width:440px}
@media(max-width:900px){.heading{align-items:flex-start}.heading-actions{justify-content:flex-start}.searchbar{gap:8px}.finance-amounts{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){main{padding:20px 16px 36px}.heading{flex-wrap:wrap}.heading-actions{width:100%}.heading-actions .btn{min-height:42px}.formgrid>button{justify-self:stretch;width:100%}.formgrid>label{min-width:0}.card{padding:18px}.finance-amounts strong{font-size:16px}.day-quadrants>a{min-width:0}.day-quadrants small{font-size:11px}body[data-page="operating"] .daily-workspace .day-work{padding:16px}.searchbar>button,.searchbar>.btn{min-height:38px}.searchbar input:not([type=hidden]){flex-basis:100%}.profile-nav{gap:14px;overflow-x:auto;white-space:nowrap}}

.source-platform-head>div:first-child{margin-right:auto}.source-add-channel{font-size:12px;padding:6px 10px;min-height:34px}.source-platform-head{flex-wrap:wrap;gap:12px}

.collaboration-history>summary{padding:16px 4px;color:#446f53;font-weight:600}.collaboration-history[open]>summary{margin-bottom:12px}.collaboration-results>summary{font-size:13px;font-weight:600;color:#547560}.collaboration-results[open]>summary{margin-bottom:16px}

@media(max-width:600px){
 main .metrics,main .metrics.three,main .metrics.four{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible;gap:10px}
 main .metrics>.metric,main .metrics>.card{min-width:0;width:auto;padding:14px;flex:initial}
 main .metrics.three>.metric:last-child{grid-column:1/-1;display:block}
 main .metrics strong{font-size:20px;white-space:normal;overflow-wrap:anywhere;letter-spacing:-.4px}
 main .metrics.three>.metric:last-child strong{margin-top:8px;grid-column:auto;grid-row:auto}
 main .metrics p,main .metric p{display:block;font-size:11px}
 .heading-actions{max-width:none!important}
}

/* Phone acceptance: comfortably tappable controls and wrapping document tools. */
@media(max-width:650px){
 body main button,body main .btn,body .topbar button,body .topbar .btn,body .sidebar button{min-height:44px!important;white-space:normal;max-width:100%}
 body main input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),body main select,body main textarea{font-size:16px;min-height:44px}
 body main details>summary{min-height:44px;padding-top:10px;padding-bottom:10px;line-height:24px;overflow-wrap:anywhere}
 body main .billing-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 body main .billing-tools #bill-download{grid-column:1/-1}
 body main .billing-tools button{width:100%;margin:0}
 body main .billing-workspace,body main .billing-layout,body main .billing-preview{min-width:0;max-width:100%}
 body main .billing-preview canvas{max-width:100%}
 body main .finance-amounts strong{font-size:16px}
 .topbar-right{flex-wrap:wrap;justify-content:flex-end;gap:6px}
}
@media(max-height:500px) and (max-width:1000px){.sidebar{padding-top:12px}.sidebar .brand{padding-bottom:12px}.sidebar-user{margin-top:16px}.sidebar{overscroll-behavior:contain}}

.bill-image-dialog{width:min(96vw,1000px);max-height:92vh;max-height:92dvh;padding:18px;border:1px solid #dce7df;border-radius:14px;overflow:auto}.bill-image-dialog::backdrop{background:#17372a80}.bill-image-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:-18px;padding:10px 0;background:white}.bill-image-heading h2{margin:0}.bill-image-dialog p{font-size:13px;color:#617d6c}.bill-image-dialog img{display:block;width:100%;height:auto}.bill-image-heading button{min-height:44px}
@media(max-width:650px){body main #bill-print{display:none}.bill-image-dialog{padding:12px}.bill-image-heading{top:-12px}.bill-image-heading h2{font-size:16px}}
@media(max-width:650px){
 body main select{min-height:44px!important}
 body[data-page=dashboard] .recent-row{display:grid;grid-template-columns:32px minmax(0,1fr) auto;gap:6px 10px;align-items:center}
 body[data-page=dashboard] .recent-row>div{min-width:0;overflow-wrap:anywhere}
 body[data-page=dashboard] .recent-row>.mini-item{width:32px;height:32px}
 body[data-page=dashboard] .recent-row>b{grid-column:2;grid-row:2;min-width:0;text-align:left;overflow-wrap:anywhere}
 body[data-page=dashboard] .recent-row>span:last-child{grid-column:3;grid-row:2;justify-self:end}
}
@media(max-height:500px) and (max-width:1000px){
 body main button,body main .btn,body .topbar button,body .topbar .btn,body .sidebar button{min-height:44px!important;white-space:normal;max-width:100%}
 body main input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),body main select,body main textarea{font-size:16px;min-height:44px!important}
 body main details>summary{min-height:44px;padding-top:10px;padding-bottom:10px;line-height:24px}
}
