/* QUINCA+ v60 — aperçu Proforma inspiré du modèle papier fourni */

.proforma-preview-card-v60{
  width:min(980px,96vw)!important;
  max-height:94vh!important;
  overflow:auto!important;
  padding:14px!important;
}

.proforma-sheet-v60{
  background:#fff;
  color:#111;
  font-family:Arial,Helvetica,sans-serif;
  width:100%;
  max-width:900px;
  margin:0 auto;
  border:1px solid #555;
  padding:10px;
  box-sizing:border-box;
}

.proforma-top-v60{
  display:grid;
  grid-template-columns:42% 58%;
  border:1px solid #555;
}

.proforma-logo-cell-v60,
.proforma-title-cell-v60{
  min-height:88px;
  padding:8px 10px;
  box-sizing:border-box;
}

.proforma-logo-cell-v60{
  border-right:1px solid #555;
}

.proforma-brand-v60{
  display:flex;
  gap:9px;
  align-items:center;
  height:100%;
}

.proforma-brand-v60 img{
  width:70px;
  height:58px;
  object-fit:contain;
  flex:0 0 auto;
}

.proforma-brand-v60 strong{
  display:block;
  font-size:19px;
  line-height:1.05;
  text-transform:uppercase;
}

.proforma-brand-v60 span{
  display:block;
  font-size:8px;
  margin-top:5px;
}

.proforma-title-cell-v60{
  display:grid;
  grid-template-rows:1fr auto auto;
  text-align:center;
}

.proforma-system-v60{
  font-size:9px;
  font-weight:800;
  display:flex;
  align-items:center;
  justify-content:center;
}

.proforma-main-title-v60{
  border-top:1px solid #555;
  border-bottom:1px solid #555;
  padding:5px;
  font-size:12px;
  font-weight:900;
}

.proforma-code-v60{
  padding-top:4px;
  font-size:8px;
}

.proforma-info-row-v60{
  display:grid;
  grid-template-columns:42% 58%;
  gap:8px;
  margin-top:10px;
}

.proforma-company-tax-v60{
  padding:5px 7px;
  font-size:9px;
  line-height:1.8;
}

.proforma-company-tax-v60 span{
  display:inline-block;
  min-width:112px;
}

.proforma-datebox-v60{
  display:grid;
  grid-template-columns:1fr 1.7fr;
  border:1px solid #555;
}

.pf-box-title-v60,
.pf-box-value-v60{
  padding:6px 7px;
  border-right:1px solid #555;
  border-bottom:1px solid #555;
  text-align:center;
  font-size:9px;
}

.proforma-datebox-v60>*:nth-child(2n){
  border-right:0;
}

.proforma-datebox-v60>*:nth-last-child(-n+2){
  border-bottom:0;
}

.pf-box-title-v60{
  font-weight:900;
}

.proforma-middle-v60{
  display:grid;
  grid-template-columns:42% 58%;
  gap:8px;
  margin-top:10px;
  align-items:start;
}

.proforma-reference-v60{
  padding:4px 6px;
}

.proforma-ref-title-v60{
  font-weight:900;
  font-size:10px;
  margin-bottom:9px;
}

.proforma-contact-v60{
  display:inline-block;
  min-width:70%;
  padding:7px 8px;
  background:#efefef;
  font-size:9px;
  line-height:1.45;
}

.proforma-client-v60{
  border:1px solid #555;
}

.pf-client-row-v60{
  display:grid;
  grid-template-columns:105px 1fr;
  min-height:28px;
  border-bottom:1px solid #555;
}

.pf-client-row-v60:last-child{
  border-bottom:0;
}

.pf-client-row-v60 span,
.pf-client-row-v60 strong{
  padding:6px 7px;
  font-size:9px;
}

.pf-client-row-v60 span{
  border-right:1px solid #555;
  font-weight:900;
}

.pf-client-row-v60 strong{
  text-align:center;
}

.proforma-table-v60{
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;
  margin-top:10px;
  font-size:8.5px;
}

.proforma-table-v60 th,
.proforma-table-v60 td{
  border:1px solid #555;
  padding:5px 4px;
  vertical-align:top;
}

.proforma-table-v60 th{
  text-align:center;
  font-weight:900;
  background:#f5f5f5;
}

.proforma-table-v60 th:nth-child(1){width:5%}
.proforma-table-v60 th:nth-child(2){width:38%}
.proforma-table-v60 th:nth-child(3){width:9%}
.proforma-table-v60 th:nth-child(4){width:10%}
.proforma-table-v60 th:nth-child(5){width:12%}
.proforma-table-v60 th:nth-child(6){width:12%}
.proforma-table-v60 th:nth-child(7){width:14%}

.proforma-table-v60 tbody tr{
  min-height:28px;
}

.pf-num-v60,
.pf-qty-v60,
.pf-unit-v60,
.pf-money-v60{
  text-align:right;
}

.pf-unit-v60{
  text-align:center;
}

.pf-designation-v60{
  text-align:left;
}

.proforma-bottom-v60{
  display:grid;
  grid-template-columns:1fr 330px;
  gap:12px;
  margin-top:0;
  align-items:start;
}

.proforma-left-bottom-v60{
  padding-top:10px;
}

.proforma-words-v60{
  min-height:34px;
  font-size:9px;
  font-weight:700;
  font-style:italic;
  line-height:1.45;
}

.proforma-visas-v60{
  display:grid;
  grid-template-columns:1fr 1fr;
  border:1px solid #555;
  margin-top:7px;
  width:min(380px,100%);
}

.proforma-visas-v60>div:first-child{
  border-right:1px solid #555;
}

.proforma-visas-v60 span{
  display:block;
  text-align:center;
  border-bottom:1px solid #555;
  padding:4px;
  font-size:8px;
}

.proforma-visas-v60>div>div{
  min-height:44px;
}

.proforma-totals-v60{
  border-left:1px solid #555;
  border-right:1px solid #555;
}

.proforma-totals-v60>div{
  display:grid;
  grid-template-columns:145px 1fr;
  border-bottom:1px solid #555;
  min-height:27px;
}

.proforma-totals-v60 span,
.proforma-totals-v60 strong{
  padding:6px 7px;
  font-size:9px;
}

.proforma-totals-v60 span{
  border-right:1px solid #555;
  font-weight:900;
}

.proforma-totals-v60 strong{
  text-align:right;
}

.proforma-net-v60 span,
.proforma-net-v60 strong{
  font-size:11px;
  font-weight:900;
}

.proforma-footer-v60{
  border-top:1px solid #777;
  margin-top:14px;
  padding-top:7px;
  text-align:center;
  font-size:7.5px;
  line-height:1.5;
}

.proforma-preview-actions-v60{
  position:sticky;
  bottom:-14px;
  background:var(--card,#fff);
  padding-top:10px;
  z-index:5;
}

body.dark-ui .proforma-sheet-v60{
  background:#fff!important;
  color:#111!important;
}

@media(max-width:700px){
  .proforma-preview-card-v60{
    width:100%!important;
    padding:8px!important;
  }

  .proforma-sheet-v60{
    min-width:760px;
  }

  .proforma-preview-card-v60{
    overflow:auto!important;
  }
}

@media print{
  .proforma-sheet-v60{
    border:0;
    max-width:none;
    padding:0;
  }
}
