/* Readability improvement: make small labels clear across the full software. */
small,
.muted,
.card small,
.toolbar .muted,
.panel .muted,
header small,
td small,
label small,
.daily-status span,
.selection-bar span{
  color:#123f82!important;
  font-size:12px!important;
  font-weight:650!important;
  line-height:1.35!important;
}

.card small{
  display:block!important;
  margin-bottom:5px!important;
  text-transform:none!important;
  letter-spacing:0!important;
}

.card strong{
  color:#001f55!important;
  font-weight:900!important;
}

th{
  color:#123f82!important;
  font-size:11px!important;
  font-weight:900!important;
}

td,
label,
input,
select,
textarea{
  color:#001f55!important;
}

.toolbar h2,
.panel h2,
header h1{
  color:#001f55!important;
  font-weight:900!important;
}

nav button{
  font-weight:900!important;
}

.tag{
  font-weight:800!important;
}

/* Overview spacing: keep full width, reduce vertical height. */
#dashboard{
  max-width:none!important;
  margin:0!important;
}

#dashboard .cards{
  gap:8px!important;
  margin-bottom:8px!important;
}

#dashboard .card{
  min-height:62px!important;
  padding:9px 12px!important;
}

#dashboard .card small{
  margin-bottom:3px!important;
}

#dashboard .card strong{
  font-size:20px!important;
  line-height:1.1!important;
}

#dashboard .panel{
  padding:10px 14px!important;
}

#dashboard .panel h2{
  margin-bottom:6px!important;
}

#dashboard th{
  padding:6px 6px!important;
}

#dashboard td{
  padding:6px 6px!important;
  line-height:1.25!important;
}

#dashboard .tag{
  padding:2px 8px!important;
}

/* China invoice list: compact rows and visible product uploads. */
.china-invoice-table{
  margin-top:6px!important;
}

.china-invoice-table th,
.china-invoice-table td{
  padding:7px 5px!important;
  line-height:1.22!important;
  vertical-align:top!important;
}

.china-invoice-table .actions{
  display:flex!important;
  gap:5px!important;
  align-items:flex-start!important;
  flex-wrap:wrap!important;
  white-space:normal!important;
  min-width:116px!important;
}

.china-invoice-table .actions button{
  margin:0!important;
  padding:5px 7px!important;
}

.china-product-list{
  display:grid!important;
  gap:5px!important;
  min-width:260px!important;
}

.china-product-line{
  display:flex!important;
  align-items:center!important;
  gap:7px!important;
  min-height:36px!important;
}

.china-product-line strong{
  font-weight:850!important;
}

.china-product-thumb{
  width:38px!important;
  height:38px!important;
  padding:0!important;
  border:1px solid #b8d2ff!important;
  border-radius:6px!important;
  background:#fff!important;
  overflow:hidden!important;
  flex:0 0 auto!important;
}

.china-product-thumb img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  display:block!important;
}

.china-file-chip{
  padding:4px 7px!important;
  font-size:11px!important;
  flex:0 0 auto!important;
}

/* Create China Invoice form: reduce blank height and arrange product cards tightly. */
#inlineChinaInvoicePanel{
  padding:10px 12px!important;
}

#inlineChinaInvoicePanel .toolbar{
  margin-bottom:8px!important;
}

#inlineChinaInvoicePanel .toolbar h2{
  font-size:16px!important;
  margin-bottom:0!important;
}

#inlineChinaInvoicePanel #chinaRecordForm.form-grid{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:8px 10px!important;
  margin:8px 0!important;
}

#inlineChinaInvoicePanel label{
  gap:3px!important;
}

#inlineChinaInvoicePanel input,
#inlineChinaInvoicePanel select,
#inlineChinaInvoicePanel textarea{
  min-height:32px!important;
  padding:6px 8px!important;
}

#inlineChinaInvoicePanel textarea{
  min-height:54px!important;
}

#inlineChinaInvoicePanel .wide{
  grid-column:1/-1!important;
}

#inlineChinaInvoicePanel .china-products-section{
  margin:2px 0!important;
  padding:9px 10px!important;
}

#inlineChinaInvoicePanel .china-products-section h3{
  margin:0 0 7px!important;
  font-size:14px!important;
}

#inlineChinaInvoicePanel .china-products-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(260px,1fr))!important;
  gap:8px!important;
}

#inlineChinaInvoicePanel .china-product-form-card{
  margin:0!important;
  padding:8px 10px!important;
  border-radius:8px!important;
}

#inlineChinaInvoicePanel .china-product-form-card h3{
  margin:0 0 6px!important;
  font-size:13px!important;
}

#inlineChinaInvoicePanel .china-product-form-card .form-grid{
  grid-template-columns:1fr 1fr!important;
  gap:7px 8px!important;
  margin:0!important;
}

#inlineChinaInvoicePanel .china-product-form-card label{
  font-size:12px!important;
}

#inlineChinaInvoicePanel .china-product-form-card small{
  font-size:10px!important;
  line-height:1.2!important;
}

#inlineChinaInvoicePanel .dialog-actions{
  padding-top:4px!important;
}

@media(max-width:1200px){
  #inlineChinaInvoicePanel .china-products-grid{
    grid-template-columns:repeat(2,minmax(260px,1fr))!important;
  }
}

@media(max-width:760px){
  #inlineChinaInvoicePanel #chinaRecordForm.form-grid,
  #inlineChinaInvoicePanel .china-products-grid,
  #inlineChinaInvoicePanel .china-product-form-card .form-grid{
    grid-template-columns:1fr!important;
  }
}
