/* TEM FILAS V2 — INÍCIO */

.modal.queue-v2-modal{
  width:min(1120px,calc(100vw - 24px));
  max-width:1120px;
  max-height:calc(100vh - 20px);
}

.queue-v2-modal .modal-head{
  min-height:52px;
  padding:10px 15px;
}

.queue-v2-modal .modal-body{
  padding:0;
  overflow:auto;
}

.queue-v2-form{
  display:grid;
  gap:11px;
  min-width:0;
  padding:12px;
  background:#f5f7fa;
}

.queue-v2-card,
.queue-v2-advanced{
  min-width:0;
  border:1px solid #dce4ee;
  border-radius:12px;
  background:#fff;
  box-shadow:0 2px 9px rgba(24,48,77,.05);
}

.queue-v2-card{
  padding:11px 12px;
}

.queue-v2-card-head,
.queue-v2-subcard-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.queue-v2-card-head{
  margin-bottom:10px;
  padding-bottom:8px;
  border-bottom:1px solid #edf1f5;
}

.queue-v2-card-head h3,
.queue-v2-subcard h4{
  margin:0;
  color:#df7b16;
  font-size:13px;
}

.queue-v2-card-head p,
.queue-v2-subcard-head p{
  margin:3px 0 0;
  color:#7c8998;
  font-size:10px;
  line-height:1.4;
}

.queue-v2-code-pill{
  padding:6px 10px;
  border:1px solid #bfdaf5;
  border-radius:999px;
  background:#edf6ff;
  color:#1c72bb;
  font-size:12px;
  font-weight:850;
}

.queue-v2-main-grid{
  display:grid;
  grid-template-columns:
    minmax(180px,1fr)
    minmax(150px,.7fr)
    minmax(140px,.6fr)
    minmax(260px,1.3fr);
  gap:9px;
  align-items:start;
}

.queue-v2-main-bottom{
  margin-top:9px;
  grid-template-columns:
    minmax(190px,.75fr)
    minmax(320px,1.5fr);
}

.queue-v2-span-2{
  grid-column:span 2;
}

.queue-v2-numbers,
.queue-v2-advanced-grid,
.queue-v2-code-grid{
  display:grid;
  grid-template-columns:
    repeat(4,minmax(0,1fr));
  gap:9px;
  align-items:start;
  margin-top:9px;
}

.queue-v2-advanced-grid{
  grid-template-columns:
    repeat(3,minmax(0,1fr));
}

.queue-v2-code-grid{
  grid-template-columns:
    repeat(3,minmax(0,1fr));
}

.queue-v2-field{
  display:block;
  min-width:0;
}

.queue-v2-field>span,
.queue-v2-dual-title{
  display:block;
  margin-bottom:4px;
  color:#354960;
  font-size:10.5px;
  font-weight:750;
}

.queue-v2-field input,
.queue-v2-field select,
.queue-v2-field textarea,
.queue-v2-dual select{
  width:100%;
  min-width:0;
  border:1px solid #cad5e2;
  border-radius:7px;
  background:#fff;
  color:#20364d;
  font-size:11px;
}

.queue-v2-field input,
.queue-v2-field select{
  height:33px;
  min-height:33px;
  padding:0 8px;
}

.queue-v2-field textarea{
  min-height:54px;
  padding:7px 8px;
  resize:vertical;
}

.queue-v2-field input[readonly]{
  background:#f1f4f8;
  color:#68778a;
  cursor:not-allowed;
}

.queue-v2-field small{
  display:block;
  margin-top:4px;
  color:#8794a3;
  font-size:9px;
  line-height:1.35;
}

.queue-v2-strategy-help{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:8px;
  align-items:center;
  margin-top:8px;
  padding:8px 10px;
  border:1px solid #dce9f6;
  border-radius:8px;
  background:#f6faff;
  color:#61768d;
  font-size:9.5px;
}

.queue-v2-strategy-help strong{
  color:#246fa9;
  white-space:nowrap;
}

.queue-v2-strategy-help small{
  color:#79899b;
}

.queue-v2-strategy-help em{
  grid-column:1/-1;
  color:#a15e19;
  font-size:9px;
  font-style:normal;
}

.queue-v2-agent-tabs{
  display:flex;
  gap:6px;
}

.queue-v2-agent-copy{
  margin-bottom:8px;
}

.queue-v2-agent-copy strong,
.queue-v2-agent-copy small{
  display:block;
}

.queue-v2-agent-copy strong{
  color:#344a62;
  font-size:11px;
}

.queue-v2-agent-copy small{
  margin-top:2px;
  color:#8390a0;
  font-size:9px;
}

.queue-v2-dual{
  display:grid;
  grid-template-columns:
    minmax(230px,1fr)
    50px
    minmax(230px,1fr)
    42px;
  gap:8px;
  align-items:center;
}

.queue-v2-dual select{
  min-height:168px;
  padding:6px;
}

.queue-v2-dual select option{
  padding:7px 8px;
  border-radius:5px;
}

.queue-v2-dual-move,
.queue-v2-dual-order{
  display:grid;
  gap:7px;
}

.queue-v2-dual-move .btn,
.queue-v2-dual-order .btn{
  min-width:38px;
  min-height:35px;
  padding:5px;
  font-weight:850;
}

.queue-v2-priority{
  display:flex;
  align-items:end;
  gap:8px;
  margin-top:8px;
}

.queue-v2-priority .queue-v2-field{
  width:min(330px,100%);
}

.queue-v2-priority .btn{
  height:33px;
}

.queue-v2-destination{
  display:grid;
  grid-template-columns:
    minmax(210px,.75fr)
    minmax(300px,1.3fr);
  gap:9px;
}

.queue-v2-static-destination{
  min-height:33px;
  display:flex;
  align-items:center;
  padding:0 9px;
  border:1px solid #dce4ed;
  border-radius:7px;
  background:#f1f4f7;
  color:#748194;
  font-size:9.5px;
}

.queue-v2-advanced{
  overflow:hidden;
}

.queue-v2-advanced>summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  cursor:pointer;
  user-select:none;
  list-style:none;
}

.queue-v2-advanced>summary::-webkit-details-marker{
  display:none;
}

.queue-v2-advanced>summary strong,
.queue-v2-advanced>summary small{
  display:block;
}

.queue-v2-advanced>summary strong{
  color:#344a62;
  font-size:11.5px;
}

.queue-v2-advanced>summary small{
  margin-top:2px;
  color:#8793a2;
  font-size:9.5px;
}

.queue-v2-advanced>summary b{
  width:25px;
  height:25px;
  display:grid;
  place-items:center;
  border-radius:7px;
  background:#edf4fb;
  color:#3177b4;
  font-size:14px;
}

.queue-v2-advanced-body{
  display:grid;
  gap:10px;
  padding:0 12px 12px;
}

.queue-v2-subcard{
  padding:10px;
  border:1px solid #e0e7ef;
  border-radius:10px;
  background:#fafbfd;
}

.queue-v2-subcard h4{
  margin-bottom:9px;
}

.queue-v2-switch-grid{
  display:grid;
  grid-template-columns:
    repeat(2,minmax(0,1fr));
  gap:7px;
  margin-top:10px;
}

.queue-v2-switch{
  display:flex;
  align-items:flex-start;
  gap:8px;
  min-width:0;
  padding:7px 8px;
  border:1px solid #e0e7ef;
  border-radius:8px;
  background:#fff;
  cursor:pointer;
}

.queue-v2-switch>input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

.queue-v2-switch-ui{
  position:relative;
  width:30px;
  height:17px;
  flex:0 0 30px;
  margin-top:1px;
  border-radius:20px;
  background:#b8c2ce;
}

.queue-v2-switch-ui::after{
  content:"";
  position:absolute;
  top:2px;
  left:2px;
  width:13px;
  height:13px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 1px 3px rgba(0,0,0,.2);
  transition:transform .16s;
}

.queue-v2-switch>input:checked
+.queue-v2-switch-ui{
  background:#2787df;
}

.queue-v2-switch>input:checked
+.queue-v2-switch-ui::after{
  transform:translateX(13px);
}

.queue-v2-switch strong,
.queue-v2-switch small{
  display:block;
}

.queue-v2-switch strong{
  color:#31465e;
  font-size:10px;
}

.queue-v2-switch small{
  margin-top:2px;
  color:#7e8b9c;
  font-size:8.8px;
  line-height:1.35;
}

.queue-v2-global-codes{
  margin-top:11px;
  padding-top:10px;
  border-top:1px solid #e3e9f0;
}

.queue-v2-global-codes>strong,
.queue-v2-global-codes>small{
  display:block;
}

.queue-v2-global-codes>strong{
  color:#344a62;
  font-size:10.5px;
}

.queue-v2-global-codes>small{
  margin:2px 0 8px;
  color:#8390a0;
  font-size:9px;
}

.queue-v2-schedules{
  display:grid;
  gap:7px;
  margin-top:9px;
}

.queue-v2-schedule-row{
  display:grid;
  grid-template-columns:
    105px
    105px
    155px
    minmax(390px,1fr)
    34px;
  gap:7px;
  align-items:end;
  padding:7px;
  border:1px solid #e1e7ef;
  border-radius:9px;
  background:#fff;
}

.queue-v2-schedule-destination{
  grid-template-columns:
    minmax(155px,.75fr)
    minmax(190px,1fr);
}

.queue-v2-schedule-row>.btn{
  width:31px;
  min-width:31px;
  height:31px;
  padding:0;
  font-size:16px;
}

.queue-v2-actions{
  position:sticky;
  bottom:0;
  z-index:15;
  display:flex;
  justify-content:flex-end;
  gap:7px;
  margin:0 -12px -12px;
  padding:9px 12px;
  border-top:1px solid #dbe3ec;
  background:rgba(255,255,255,.97);
  box-shadow:0 -4px 14px rgba(24,48,77,.07);
  backdrop-filter:blur(8px);
}

.queue-v2-actions .btn{
  min-height:34px;
  padding:0 14px;
  font-size:10.5px;
}

@media(max-width:960px){
  .queue-v2-main-grid,
  .queue-v2-numbers,
  .queue-v2-advanced-grid,
  .queue-v2-code-grid{
    grid-template-columns:
      repeat(2,minmax(0,1fr));
  }

  .queue-v2-dual{
    grid-template-columns:
      minmax(190px,1fr)
      44px
      minmax(190px,1fr)
      38px;
  }

  .queue-v2-schedule-row{
    grid-template-columns:
      repeat(3,minmax(0,1fr));
  }

  .queue-v2-schedule-destination{
    grid-column:1/-1;
  }
}

@media(max-width:720px){
  .modal.queue-v2-modal{
    width:calc(100vw - 10px);
    max-height:calc(100vh - 8px);
  }

  .queue-v2-form{
    padding:8px;
  }

  .queue-v2-main-grid,
  .queue-v2-numbers,
  .queue-v2-advanced-grid,
  .queue-v2-code-grid,
  .queue-v2-switch-grid,
  .queue-v2-destination,
  .queue-v2-dual,
  .queue-v2-schedule-row{
    grid-template-columns:1fr;
  }

  .queue-v2-span-2{
    grid-column:auto;
  }

  .queue-v2-card-head,
  .queue-v2-subcard-head{
    flex-direction:column;
    align-items:stretch;
  }

  .queue-v2-agent-tabs{
    width:100%;
  }

  .queue-v2-agent-tabs .btn{
    flex:1;
  }

  .queue-v2-dual-move,
  .queue-v2-dual-order{
    grid-template-columns:1fr 1fr;
  }

  .queue-v2-dual-move{
    transform:rotate(90deg);
    width:120px;
    margin:auto;
  }

  .queue-v2-dual select{
    min-height:145px;
  }

  .queue-v2-priority{
    align-items:stretch;
    flex-direction:column;
  }

  .queue-v2-priority .queue-v2-field,
  .queue-v2-priority .btn{
    width:100%;
  }

  .queue-v2-strategy-help{
    grid-template-columns:1fr;
  }

  .queue-v2-schedule-destination{
    grid-column:auto;
  }

  .queue-v2-schedule-row>.btn{
    width:100%;
  }

  .queue-v2-actions{
    margin:0 -8px -8px;
  }

  .queue-v2-actions .btn{
    flex:1;
  }
}

/* TEM FILAS V2 — FIM */
