
/* =========================================================
   V564 - QUOTE EDIT VISIBLE + DESKTOP/MOBILE POLISH
   ========================================================= */

/* Strong, visible edit action */
.v564-edit-quote{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  min-height:36px!important;
  padding:0 12px!important;
  border:1px solid #0a7546!important;
  border-radius:8px!important;
  background:#eef8f2!important;
  color:#07653e!important;
  font-size:11px!important;
  font-weight:900!important;
  white-space:nowrap!important;
  box-shadow:none!important;
}
.v564-edit-quote:hover{
  background:#e2f4e9!important;
  border-color:#08633c!important;
}

/* Edit mode visual state */
.v564-edit-mode .v370-quote-toolbar{
  border-color:#d6b24f!important;
  box-shadow:0 6px 20px rgba(192,145,25,.10)!important;
}
.v564-edit-mode .v370-total-box>button,
.v564-edit-mode .v437r-mobile-sticky .draft{
  background:linear-gradient(90deg,#8a6406,#c39722)!important;
  color:#fff!important;
  border-color:#a97e12!important;
}
.v563-editing-banner{
  position:relative!important;
  overflow:hidden!important;
}
.v563-editing-banner::before{
  content:"✎";
  position:absolute;
  right:18px;
  top:50%;
  transform:translateY(-50%);
  font-size:44px;
  color:rgba(174,130,18,.10);
  pointer-events:none;
}

/* History list desktop */
.v370-history-list{
  display:grid!important;
  gap:9px!important;
}
.v370-history-list article{
  display:grid!important;
  grid-template-columns:minmax(250px,1.25fr) minmax(150px,.55fr) minmax(520px,1.5fr)!important;
  align-items:center!important;
  gap:12px!important;
  padding:12px!important;
}
.v370-history-list article .main{
  min-width:0!important;
}
.v370-history-list article .main>span{
  display:block!important;
  margin-top:4px!important;
  color:#193c2a!important;
  font-size:12.5px!important;
  font-weight:800!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.v370-history-list article .value{
  min-width:0!important;
  text-align:right!important;
}
.v370-history-list article .value strong{
  display:block!important;
  color:#075f3a!important;
  font-size:14px!important;
  font-variant-numeric:tabular-nums!important;
}
.v370-history-list article .value small{
  display:block!important;
  margin-top:3px!important;
  color:#7a857e!important;
  font-size:9.5px!important;
}
.v370-history-list article .actions{
  display:grid!important;
  grid-template-columns:minmax(105px,1.1fr) repeat(5,minmax(72px,auto))!important;
  align-items:center!important;
  gap:6px!important;
}
.v370-history-list article .actions>*{
  min-height:36px!important;
  border-radius:8px!important;
  font-size:10.5px!important;
}
.v370-history-list article .actions a{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:0 10px!important;
  border:1px solid #dce5df!important;
  background:#fff!important;
  color:#173d2a!important;
  font-weight:800!important;
  text-decoration:none!important;
}
.v370-history-list article .actions button:not(.danger):not(.order):not(.edit){
  border:1px solid #dce5df!important;
  background:#fff!important;
  color:#33483c!important;
  font-weight:800!important;
}
.v370-history-list article .actions .order{
  background:#0a6a40!important;
  color:#fff!important;
  border-color:#0a6a40!important;
}
.v370-history-list article .actions .danger{
  background:#fff!important;
  color:#b42318!important;
  border:1px solid #efc7c3!important;
}

/* Last created quote actions */
.v370-created-quote>div:last-child{
  display:flex!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:7px!important;
}
.v370-created-quote>div:last-child>*{
  min-height:38px!important;
  border-radius:8px!important;
}

/* Form polish desktop */
.v370-form-grid label>span,
.v370-quote-footer label>span{
  display:block!important;
  margin-bottom:5px!important;
  color:#58665e!important;
  font-size:10.5px!important;
  font-weight:800!important;
}
.v370-lines-table .money{
  color:#075f3a!important;
  font-weight:900!important;
  font-variant-numeric:tabular-nums!important;
}
.v370-total-box{
  box-shadow:0 4px 14px rgba(15,23,42,.035)!important;
}

/* Tablet */
@media(max-width:1180px){
  .v370-history-list article{
    grid-template-columns:minmax(220px,1fr) minmax(130px,.5fr)!important;
  }
  .v370-history-list article .actions{
    grid-column:1/-1!important;
    grid-template-columns:repeat(6,minmax(0,1fr))!important;
  }
}

/* Mobile quote management */
@media(max-width:1100px){
  .v370-history-panel{
    padding:10px!important;
  }
  .v370-history-head{
    align-items:flex-start!important;
    gap:4px!important;
  }
  .v370-history-list article{
    display:block!important;
    padding:11px!important;
    border-radius:11px!important;
  }
  .v370-history-list article .main{
    padding-bottom:8px!important;
    border-bottom:1px dashed #e3e8e5!important;
  }
  .v370-history-list article .value{
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:10px!important;
    padding:8px 0!important;
    text-align:left!important;
  }
  .v370-history-list article .value strong{
    font-size:15px!important;
  }
  .v370-history-list article .actions{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:7px!important;
  }
  .v370-history-list article .actions>*{
    width:100%!important;
    min-height:42px!important;
    font-size:11px!important;
  }
  .v370-history-list article .actions select{
    grid-column:1/-1!important;
  }
  .v564-edit-quote{
    min-height:42px!important;
    font-size:11.5px!important;
  }

  .v370-created-quote{
    padding:11px!important;
  }
  .v370-created-quote>div:last-child{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:7px!important;
  }
  .v370-created-quote>div:last-child select{
    grid-column:1/-1!important;
  }
  .v370-created-quote>div:last-child>*{
    width:100%!important;
    min-height:42px!important;
  }

  /* edit mode sticky */
  .v437r-mobile-sticky{
    padding-bottom:calc(10px + env(safe-area-inset-bottom))!important;
  }
  .v564-edit-mode .v437r-mobile-sticky{
    border-top:2px solid #d6b24f!important;
  }
}

/* Small phone */
@media(max-width:430px){
  .v370-history-list article .actions{
    grid-template-columns:1fr!important;
  }
  .v370-created-quote>div:last-child{
    grid-template-columns:1fr!important;
  }
}
