/* Portal v1.6: eight requested UI corrections, no modification of shared v1.5 CSS. */
/* Compact status tiles: single row when the content area is wide enough. */
.stat-grid{grid-template-columns:repeat(auto-fit,minmax(162px,1fr));gap:9px}
.stat{padding:12px 13px;min-height:108px;min-width:0}
.stat>span{font-size:11px;line-height:1.25;min-height:27px;overflow-wrap:anywhere}
.stat strong{font-size:25px;margin-top:2px}
.stat small{font-size:10px;line-height:1.25;display:block;overflow-wrap:anywhere}
@media(max-width:1100px){.stat-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:800px){.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Align both authentication inputs regardless of text length. */
.credentials-grid label{min-width:0;gap:0}
.credentials-grid .field-caption{min-height:41px;display:flex;align-items:flex-end;padding-bottom:9px;gap:4px}
.credentials-grid label>input{min-height:41px}
/* Equal visual spacing above/below add-row action. */
.add-item-row{min-height:65px;display:flex;align-items:center;padding:11px 0}
/* Single-line confirmation, rejection and reason. Responsive wrapping only on narrow screens. */
.review-decision-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center;width:100%}
.review-decision-row>form{margin:0}
.review-reject-form{display:flex;flex:1 1 530px;align-items:center;gap:10px;min-width:0}
.review-reject-form .btn{flex:0 0 auto}
.review-reject-form input{flex:1 1 230px;min-width:170px;border:1px solid var(--border);border-radius:8px;padding:9px 12px;min-height:40px;background:var(--white);color:var(--ink)}
@media(max-width:720px){.review-reject-form{flex-wrap:wrap;flex-basis:100%}.review-reject-form input{flex-basis:100%;order:-1}}
/* Voice/audio recording continues to show a clear red STOP state. */
#stopVoice.recording-active{background:#cb2437!important;color:#fff!important;border-color:#f35c6c!important}
/* Default (light) view: dark readable supplier items. */
.shipment-lines>div>span{color:#172b43;font-weight:600}
.shipment-lines>div>strong{color:#173a70}
/* All blocks below use background/text consistent with dark theme.
   Covers previously hardcoded bright invoice backgrounds, file rows, messages and hints. */
:root[data-theme="dark"] :is(.invoice-upload-panel,.invoice-upload-form,.invoice-file-row,.invoices-list,.approval-actions .decision-form,.approval-actions .review-reject-form,.hint,.empty-block){background:#1b2a3e!important;color:#e8f1fd!important;border-color:#3a506d!important}
:root[data-theme="dark"] :is(.invoice-upload-panel,.invoice-upload-panel *, .invoice-file-row,.invoice-file-row *){color:#dce9fc}
:root[data-theme="dark"] .invoice-upload-panel :is(h3,strong){color:#fff}
:root[data-theme="dark"] :is(.invoice-upload-panel input,.invoice-upload-panel textarea,.review-reject-form input){background:#111e2e!important;color:#f5f8ff!important;border-color:#405676!important}
:root[data-theme="dark"] :is(.invoice-upload-panel input,.invoice-upload-panel textarea,.review-reject-form input)::placeholder{color:#9daeca!important}
:root[data-theme="dark"] :is(.invoice-file-row .doc-link,.document-links .doc-link,.invoice-upload-panel .doc-link){color:#d2e4ff!important;background:#2a4060!important}
:root[data-theme="dark"] .shipment-lines>div>span{color:#f5f8ff!important}
:root[data-theme="dark"] .shipment-lines>div>strong{color:#e9f1ff!important}
:root[data-theme="dark"] :is(.item-editor input,.item-editor input[readonly]){color:#f1f5ff!important;background:#111e2e!important;border-color:#445a75!important}
:root[data-theme="dark"] :is(.document-links .doc-link,.invoices-list .doc-link){border:1px solid #3a5272}
:root[data-theme="dark"] .approval-actions input{background:#111e2e;color:#f5f8ff;border-color:#405676}
:root[data-theme="dark"] .invoice-upload-panel :is(p,.muted,.mini,.stack label){color:#c8d9ef!important}
@media(prefers-color-scheme:dark){
:root[data-theme="system"] :is(.invoice-upload-panel,.invoice-upload-form,.invoice-file-row,.invoices-list,.hint,.empty-block){background:#1b2a3e!important;color:#e8f1fd!important;border-color:#3a506d!important}
:root[data-theme="system"] :is(.invoice-upload-panel input,.invoice-upload-panel textarea,.review-reject-form input,.item-editor input,.item-editor input[readonly]){background:#111e2e!important;color:#f5f8ff!important;border-color:#405676!important}
:root[data-theme="system"] :is(.invoice-upload-panel p,.invoice-upload-panel .muted,.invoice-upload-panel label,.invoice-file-row .mini){color:#d9e5f5!important}
:root[data-theme="system"] :is(.invoice-file-row .doc-link,.document-links .doc-link){color:#d2e4ff!important;background:#2a4060!important}
:root[data-theme="system"] .shipment-lines>div>span{color:#f5f8ff!important}
:root[data-theme="system"] .shipment-lines>div>strong{color:#e9f1ff!important}
}
/* Avoid intense white supplier containers in dark theme (including .doc-link). */
