/* AquaControl V79.17.6 - Corte de repartidor en ventana flotante
   Capa visual aislada: no modifica formulas, persistencia ni reglas del corte. */

#deliveryDriverCutsView .driver-cut-launch-panel {
  min-height: 190px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 26px 30px;
  border: 1px solid #d8e2ed;
  background: linear-gradient(135deg, #ffffff 0%, #f5f9fd 100%);
}

.driver-cut-launch-copy { max-width: 820px; }
.driver-cut-launch-kicker,
.driver-cut-modal-kicker {
  display: block;
  margin-bottom: 5px;
  color: #48627c;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}
.driver-cut-launch-copy h4 { margin: 0 0 7px; font-size: 22px; color: #0a294d; }
.driver-cut-launch-copy p { margin: 0; color: #5b6b7c; line-height: 1.55; }
.driver-cut-launch-benefits { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.driver-cut-launch-benefits span {
  border: 1px solid #d5e1ed;
  border-radius: 999px;
  background: #fff;
  padding: 7px 10px;
  color: #29445f;
  font-size: 12px;
  font-weight: 700;
}
.driver-cut-launch-button { min-width: 220px; min-height: 44px; white-space: nowrap; }

.corporate-theme .driver-cut-capture-dialog {
  width: min(1500px, 96vw);
  max-width: 1500px;
  height: min(900px, 92vh);
  max-height: 92vh;
  padding: 0;
  overflow: hidden;
  border: 1px solid #cbd8e6;
  border-radius: 16px;
  background: #edf3f8;
}
.corporate-theme .driver-cut-capture-dialog::backdrop {
  background: rgba(7, 29, 55, .54);
  backdrop-filter: blur(3px);
}
.driver-cut-modal-shell {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.driver-cut-modal-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 20px;
  background: #fff;
  border-bottom: 1px solid #d8e2ed;
  box-shadow: 0 4px 14px rgba(7,29,55,.06);
  z-index: 5;
}
.driver-cut-modal-header h3 { margin: 0; color: #0a294d; font-size: 20px; }
.driver-cut-modal-header p { margin: 4px 0 0; color: #66788a; font-size: 13px; }
.driver-cut-modal-header-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.driver-cut-modal-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(430px, .86fr) minmax(560px, 1.14fr);
  gap: 12px;
  padding: 12px;
  overflow: hidden;
}
.driver-cut-modal-pane {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #d8e2ed;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(7,29,55,.06);
}
.driver-cut-pane-heading {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px 14px;
  background: linear-gradient(90deg, #0b355f, #124a7c);
  color: #fff;
  border-bottom: 1px solid #082845;
}
.driver-cut-pane-heading > div { min-width: 0; }
.driver-cut-pane-heading strong { display: block; font-size: 14px; line-height: 1.2; }
.driver-cut-pane-heading small { display: block; margin-top: 3px; color: rgba(255,255,255,.78); font-size: 11px; }
.driver-cut-pane-step {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.26);
  font-weight: 900;
}
.driver-cut-pane-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.driver-cut-form-scroll { background: #fbfcfe; }
.driver-cut-preview-scroll { padding: 12px; background: #f4f7fa; }
.driver-cut-modal-form {
  position: relative;
  min-height: 100%;
  padding: 14px 14px 0;
  gap: 11px;
}
.driver-cut-modal-form label { min-width: 0; }
.driver-cut-modal-form input,
.driver-cut-modal-form select,
.driver-cut-modal-form textarea { width: 100%; }
.driver-cut-modal-form .form-grid { gap: 10px; }
.driver-cut-modal-form .three-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.driver-cut-date-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.driver-cut-date-actions button { width: 100%; white-space: normal; min-height: 38px; }
.driver-cut-note-field { grid-column: 1 / -1; }
.driver-cut-modal-form .driver-debt-payment-box { padding: 12px; border-radius: 11px; }
.driver-cut-modal-form .compact-table-wrap { max-height: 150px; }
.driver-cut-form-spacer { height: 72px; }
.driver-cut-sticky-actions {
  position: sticky;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  margin: 0 -14px;
  padding: 10px 14px;
  background: rgba(255,255,255,.97);
  border-top: 1px solid #d8e2ed;
  box-shadow: 0 -8px 18px rgba(7,29,55,.08);
  backdrop-filter: blur(6px);
}
.driver-cut-sticky-actions button { min-width: 120px; }
.driver-cut-preview-pane .driver-cut-format { min-width: 0; }
.driver-cut-preview-pane .driver-cut-window { margin: 0; }
.driver-cut-preview-pane .driver-cut-head { grid-template-columns: repeat(3, minmax(0,1fr)); }
.driver-cut-preview-pane .driver-cut-boxes { grid-template-columns: repeat(2, minmax(180px,1fr)); }
.driver-cut-preview-pane .driver-cut-orders-wrap { max-height: 220px; }

@media (max-width: 1180px) {
  .driver-cut-modal-grid { grid-template-columns: minmax(390px, .95fr) minmax(460px, 1.05fr); }
  .driver-cut-modal-form .three-cols { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .driver-cut-modal-form .three-cols label:last-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  #deliveryDriverCutsView .driver-cut-launch-panel { flex-direction: column; align-items: flex-start; padding: 20px; }
  .driver-cut-launch-button { width: 100%; }
  .corporate-theme .driver-cut-capture-dialog { width: 98vw; height: 96vh; max-height: 96vh; }
  .driver-cut-modal-header { align-items: flex-start; padding: 12px; }
  .driver-cut-modal-grid { grid-template-columns: 1fr; overflow: auto; }
  .driver-cut-modal-pane { min-height: 68vh; }
  .driver-cut-capture-pane { order: 1; }
  .driver-cut-preview-pane { order: 2; }
  .driver-cut-modal-form .three-cols { grid-template-columns: 1fr; }
  .driver-cut-modal-form .three-cols label:last-child { grid-column: auto; }
  .driver-cut-date-actions { grid-template-columns: 1fr; }
}
