.estimate-main-button{
  color:#fff;
  border-color:transparent;
  background:linear-gradient(125deg,#075bb8,#0793bf 58%,#079a76);
  box-shadow:0 9px 22px rgba(5,91,184,.2);
}
.estimate-main-button:hover{
  background:linear-gradient(125deg,#064a96,#087eaa 58%,#078366);
  transform:translateY(-1px);
}
.estimate-card{background:#f5fbfe}
.estimate-form{padding-bottom:34px}
.estimate-general-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:15px;
}
.estimate-general-grid label{
  display:flex;
  flex-direction:column;
  gap:7px;
  min-width:0;
}
.estimate-general-grid label>span{
  color:#234d68;
  font-size:14px;
  font-weight:900;
}
.estimate-general-grid input,
.estimate-general-grid textarea{
  width:100%;
  min-height:49px;
  padding:11px 13px;
  border:1px solid #c8dce5;
  border-radius:13px;
  outline:none;
  color:#153f56;
  background:#fbfdfe;
  font:900 14px/1.55 Arial,"Tahoma",sans-serif;
  transition:border-color .16s ease,box-shadow .16s ease,background .16s ease;
}
.estimate-general-grid textarea{min-height:76px;resize:vertical}
.estimate-general-grid input:focus,
.estimate-general-grid textarea:focus{
  border-color:#0795b7;
  background:#fff;
  box-shadow:0 0 0 4px rgba(7,149,183,.11);
}
.estimate-general-grid .estimate-wide-field{grid-column:span 2}
.estimate-general-grid .estimate-title-field{grid-column:span 2}
.estimate-rows-editor{min-width:0}
.estimate-entry-table-wrap{
  width:100%;
  overflow-x:auto;
  border:2px solid #78adbf;
  border-radius:18px;
  background:#fff;
  box-shadow:0 8px 22px rgba(5,64,103,.07);
  scrollbar-color:#77aec4 #eaf4f7;
  scrollbar-width:thin;
}
.estimate-entry-table{
  display:table!important;
  width:100%;
  min-width:1020px!important;
  border:0;
  border-collapse:separate;
  border-spacing:0;
  table-layout:fixed;
  direction:rtl;
  color:#173f56;
  background:#fff;
  font-family:Arial,"Tahoma",sans-serif;
}
.estimate-entry-table thead{display:table-header-group!important}
.estimate-entry-table tbody{
  display:table-row-group!important;
  width:auto!important;
}
.estimate-entry-table tr{
  display:table-row!important;
  height:auto!important;
  overflow:visible!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
}
.estimate-entry-table th,
.estimate-entry-table td{
  display:table-cell!important;
  padding:9px;
  border:0;
  border-inline-start:1.5px solid #96bdca;
  border-bottom:1.5px solid #96bdca;
  text-align:center;
  vertical-align:middle;
}
.estimate-entry-table tbody td:nth-child(n){
  display:table-cell!important;
  width:auto!important;
  grid-template-columns:none!important;
  gap:0!important;
  text-align:center!important;
  border-inline-start:1.5px solid #96bdca!important;
  border-bottom:1.5px solid #96bdca!important;
}
.estimate-entry-table tbody td::before{display:none!important;content:none!important}
.estimate-entry-table th:last-child,
.estimate-entry-table td:last-child{border-inline-start:0!important}
.estimate-entry-table thead th{
  height:56px;
  padding:10px 7px;
  color:#fff;
  background:linear-gradient(135deg,#0757a7,#087fad 64%,#07856a);
  font-size:14px;
  font-weight:900;
  line-height:1.45;
}
.estimate-entry-table thead th:first-child{border-start-start-radius:17px}
.estimate-entry-table thead th:last-child{border-start-end-radius:17px}
.estimate-entry-table tbody tr:nth-child(odd){background:#fff!important}
.estimate-entry-table tbody tr:nth-child(even){background:#e9f5f9!important}
.estimate-entry-table tbody tr:last-child th,
.estimate-entry-table tbody tr:last-child td{border-bottom:0!important}
.estimate-entry-table tbody th{
  color:#07579a;
  background:#e8f5fb;
  font-size:17px;
  font-weight:900;
}
.estimate-entry-table th:nth-child(1){width:5.5%}
.estimate-entry-table th:nth-child(2){width:31%}
.estimate-entry-table th:nth-child(3){width:8.5%}
.estimate-entry-table th:nth-child(4){width:14%}
.estimate-entry-table th:nth-child(5){width:10%}
.estimate-entry-table th:nth-child(6){width:15.5%}
.estimate-entry-table th:nth-child(7){width:15.5%}
.estimate-table-control{
  display:block;
  width:100%;
  min-height:48px;
  padding:9px 10px;
  border:1px solid #c5dbe4;
  border-radius:10px;
  outline:none;
  color:#153f56;
  background:rgba(255,255,255,.95);
  font:800 14px/1.5 Arial,"Tahoma",sans-serif;
  text-align:right;
  transition:border-color .16s ease,box-shadow .16s ease,background .16s ease;
}
textarea.estimate-table-control{min-height:66px;resize:vertical}
.estimate-table-control:focus{
  border-color:#078aaf;
  background:#fff;
  box-shadow:0 0 0 3px rgba(7,138,175,.12);
}
.estimate-invalid{
  border-color:#d63838!important;
  background:#fff6f6!important;
  box-shadow:0 0 0 4px rgba(214,56,56,.1)!important;
}
.estimate-totals-preview{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin:0 0 20px;
}
.estimate-total-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:72px;
  padding:14px 16px;
  border:1px solid #d2e6ec;
  border-radius:17px;
  background:#fff;
  box-shadow:0 7px 19px rgba(5,64,103,.05);
}
.estimate-total-card span{color:#587684;font-size:13px;font-weight:800}
.estimate-total-card strong{color:#07579a;font-size:20px;font-weight:900;direction:ltr}
.estimate-total-card:last-child{
  border-color:#a9dcca;
  background:linear-gradient(135deg,#f3fbff,#eefbf5);
}
.estimate-total-card:last-child strong{color:#08745a}
.estimate-print-sheet{display:none}

@media(max-width:1080px){
  .estimate-general-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:680px){
  .estimate-general-grid{grid-template-columns:1fr}
  .estimate-general-grid .estimate-wide-field,
  .estimate-general-grid .estimate-title-field{grid-column:1}
  .estimate-entry-table{min-width:920px!important}
  .estimate-entry-table th,
  .estimate-entry-table td{padding:6px}
  .estimate-totals-preview{grid-template-columns:1fr}
}

@media print{
  @page{size:A4 portrait;margin:8mm}
  body.printing-estimate{background:#fff!important}
  body.printing-estimate>*{display:none!important}
  body.printing-estimate>#estimatePrintArea{
    display:block!important;
    width:100%!important;
    max-width:none!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    color:#111!important;
    background:#fff!important;
    direction:rtl!important;
    font-family:Arial,"Tahoma",sans-serif!important;
  }
  body.printing-estimate>#estimatePrintArea *{
    box-sizing:border-box!important;
    font-family:Arial,"Tahoma",sans-serif!important;
  }
  .estimate-document-header{
    position:relative!important;
    display:flex!important;
    align-items:flex-start!important;
    justify-content:center!important;
    min-height:24mm!important;
    padding:2mm 32mm 0!important;
  }
  .estimate-document-header h1{
    margin:3mm 0 0!important;
    color:#111!important;
    text-align:center!important;
    font-size:22px!important;
    font-weight:700!important;
    line-height:1.35!important;
  }
  .estimate-print-logo{
    position:absolute!important;
    top:0!important;
    right:1mm!important;
    display:block!important;
    width:27mm!important;
    height:18mm!important;
    overflow:hidden!important;
    background:#fff!important;
  }
  .estimate-print-logo img{
    display:block!important;
    width:27mm!important;
    height:auto!important;
    margin:0!important;
    transform:translateY(-1.5mm)!important;
  }
  .estimate-vendor-lines{
    display:grid!important;
    gap:3.2mm!important;
    margin:0 5mm 4mm!important;
    color:#111!important;
    font-size:16px!important;
    font-weight:700!important;
  }
  .estimate-vendor-line{
    display:grid!important;
    grid-template-columns:max-content minmax(0,1fr)!important;
    align-items:end!important;
    gap:2mm!important;
    min-height:6mm!important;
  }
  .estimate-vendor-value{
    display:block!important;
    min-height:5mm!important;
    padding:0 1.5mm 1mm!important;
    border-bottom:1px dotted #555!important;
    color:#000!important;
    font-size:16px!important;
    font-weight:700!important;
    line-height:1.25!important;
    white-space:pre-wrap!important;
    overflow-wrap:anywhere!important;
  }
  .estimate-address-line{
    display:grid!important;
    gap:2.2mm!important;
    min-height:15mm!important;
    margin:0 5mm 4mm!important;
    color:#111!important;
    font-size:16px!important;
    font-weight:700!important;
    line-height:1.6!important;
  }
  .estimate-address-row{
    display:grid!important;
    align-items:end!important;
    gap:1.5mm!important;
    min-height:6.5mm!important;
  }
  .estimate-address-row-main{
    grid-template-columns:max-content minmax(48mm,1fr) max-content minmax(22mm,.45fr) max-content minmax(20mm,.38fr)!important;
  }
  .estimate-address-row-secondary{
    grid-template-columns:max-content minmax(40mm,1fr) max-content minmax(34mm,.75fr) max-content minmax(27mm,.6fr)!important;
  }
  .estimate-address-value{
    display:block!important;
    min-width:18mm!important;
    min-height:5.5mm!important;
    padding:0 1mm .7mm!important;
    border-bottom:1.3px dotted #333!important;
    color:#000!important;
    font-weight:700!important;
    overflow-wrap:anywhere!important;
  }
  .estimate-address-title{min-width:48mm!important}
  .estimate-address-vehicle{min-width:24mm!important}
  .estimate-address-employee{min-width:40mm!important}
  .estimate-meter-value{
    display:block!important;
    min-height:5.5mm!important;
    padding:0 1mm .7mm!important;
    border-bottom:1.3px dotted #333!important;
    text-align:center!important;
  }
  .estimate-print-table{
    display:table!important;
    width:calc(100% - 6mm)!important;
    margin:0 3mm!important;
    border:1.6px solid #222!important;
    border-collapse:collapse!important;
    table-layout:fixed!important;
    direction:rtl!important;
    font-size:16px!important;
    font-weight:700!important;
  }
  .estimate-print-table thead{display:table-header-group!important}
  .estimate-print-table tbody{display:table-row-group!important}
  .estimate-print-table tfoot{display:table-row-group!important}
  .estimate-print-table tr{display:table-row!important;break-inside:avoid!important}
  .estimate-print-table thead tr{height:15.5mm!important}
  .estimate-print-table tbody tr{height:15.5mm!important}
  .estimate-print-table tfoot tr{height:8.5mm!important}
  .estimate-print-table th,
  .estimate-print-table td{
    display:table-cell!important;
    padding:1.8mm 1.5mm!important;
    border:1.35px solid #333!important;
    color:#111!important;
    background:#fff!important;
    vertical-align:middle!important;
    text-align:center!important;
    font-size:16px!important;
    font-weight:700!important;
    line-height:1.45!important;
    white-space:pre-wrap!important;
    overflow-wrap:anywhere!important;
  }
  .estimate-print-table tbody td:nth-child(2){text-align:right!important}
  .estimate-print-table th:nth-child(1),
  .estimate-print-table td:nth-child(1){width:5%!important}
  .estimate-print-table th:nth-child(2),
  .estimate-print-table td:nth-child(2){width:34%!important}
  .estimate-print-table th:nth-child(3),
  .estimate-print-table td:nth-child(3){width:8%!important}
  .estimate-print-table th:nth-child(4),
  .estimate-print-table td:nth-child(4){width:12%!important}
  .estimate-print-table th:nth-child(5),
  .estimate-print-table td:nth-child(5){width:10%!important}
  .estimate-print-table th:nth-child(6),
  .estimate-print-table td:nth-child(6){width:15%!important}
  .estimate-print-table th:nth-child(7),
  .estimate-print-table td:nth-child(7){width:16%!important}
  .estimate-total-label{text-align:center!important;font-weight:700!important}
  .estimate-total-value{
    direction:ltr!important;
    text-align:center!important;
    white-space:nowrap!important;
    font-weight:700!important;
  }
  .estimate-words-label{width:10%!important;text-align:center!important}
  .estimate-words-value{text-align:center!important;min-height:8mm!important}
  .estimate-signatures{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:24mm!important;
    margin:11mm 7mm 0!important;
    color:#111!important;
    font-size:16px!important;
    font-weight:700!important;
    line-height:1.55!important;
    text-align:center!important;
  }
  .estimate-signature-box{
    display:block!important;
    min-height:24mm!important;
    font-weight:700!important;
  }
}
