/* Ishbor Dostavka: Boshqaruv paneli uslublari (5-bosqich) */

/* Bo'lim sarlavhasi va ichki navigatsiya */
.dlv-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.dlv-subnav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  background: var(--surface2);
  padding: 4px;
  border-radius: 12px;
}
.dlv-subnav button {
  background: transparent;
  border: none;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  position: relative;
  transition: all .15s ease;
}
.dlv-subnav button:hover {
  color: var(--ink);
}
.dlv-subnav button.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.dlv-subnav button i {
  font-style: normal;
  background: var(--danger);
  color: #fff;
  border-radius: 99px;
  font-size: 10px;
  padding: 1px 6px;
  margin-left: 4px;
}

/* Ovoz tugmasi */
.dlv-audio-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}

/* Alert banner */
.dlv-alert-banner {
  background: #FFF2F0;
  border: 1.5px solid #FFCCC7;
  color: #CF1322;
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
}
.dlv-alert-banner button {
  background: #CF1322;
  color: #fff;
  border: none;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
}

/* Kanban ustunlari (Jonli ekran) */
.dlv-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(210px, 1fr));
  gap: 12px;
  align-items: start;
}
@media (max-width: 1100px) {
  .dlv-board {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
}
@media (max-width: 600px) {
  .dlv-board {
    grid-template-columns: 1fr;
  }
}

.dlv-col {
  background: var(--surface2);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 240px;
}
.dlv-col-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  padding: 0 4px;
}
.dlv-col-badge {
  background: var(--surface);
  border-radius: 99px;
  padding: 1px 8px;
  font-size: 12px;
  color: var(--ink);
}

/* Buyurtma kartochkasi */
.dlv-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  border: 1.5px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.dlv-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,.1);
}
.dlv-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.dlv-card-num {
  font-weight: 800;
  color: var(--ink);
}
.dlv-card-age {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.dlv-card-rest {
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}
.dlv-card-courier {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.dlv-card-sum {
  font-size: 13px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
}

/* Kechikish belgisi */
.dlv-card.late {
  border-color: #FFA39E;
  background: #FFFBFB;
}
.dlv-card.late .dlv-card-age {
  color: var(--danger);
  font-weight: 800;
}
.dlv-late-badge {
  background: #FFF1F0;
  color: #CF1322;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  display: inline-block;
  align-self: flex-start;
}

/* Xarita konteyneri */
.dlv-map {
  width: 100%;
  height: 360px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  z-index: 1;
}
.dlv-order-map {
  width: 100%;
  height: 280px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  z-index: 1;
}

/* Modal oyna */
.dlv-modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  animation: dlvfade .15s ease;
}
.dlv-modal {
  background: var(--surface);
  border-radius: 18px;
  padding: 20px;
  width: min(520px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,.2);
}
@keyframes dlvfade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Vaqt chizig'i (Timeline) */
.dlv-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  padding-left: 20px;
}
.dlv-timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--line);
}
.dlv-tl-item {
  position: relative;
  font-size: 13px;
}
.dlv-tl-item::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
}
.dlv-tl-item.bad::before {
  background: var(--danger);
}
.dlv-tl-time {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.dlv-tl-text {
  font-weight: 600;
  color: var(--ink);
}

/* Moliyaviy xulosa kartochkasi */
.dlv-finance-box {
  background: var(--surface2);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Sumka yorlig'ini chop etish (Print Label) */
.dlv-label-sheet {
  background: #fff;
  color: #000;
  padding: 30px;
  border-radius: 12px;
  max-width: 480px;
  margin: 0 auto;
  border: 2px solid #222;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.dlv-label-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin: 0;
}
.dlv-label-code {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: .12em;
  font-family: monospace;
  background: #f0f0f0;
  padding: 6px 16px;
  border-radius: 8px;
  border: 2px dashed #444;
}
.dlv-label-qr {
  display: inline-block;
  padding: 8px;
  background: #fff;
  border: 1px solid #ddd;
}
.dlv-label-hint {
  font-size: 13px;
  color: #555;
  margin: 0;
}

@media print {
  body * {
    visibility: hidden;
  }
  .dlv-printable, .dlv-printable * {
    visibility: visible;
  }
  .dlv-printable {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
    max-width: none;
    border: 3px solid #000;
    padding: 40px;
  }
}

/* Zaxira rasmlar kutubxonasi (Stock Picker) */
.dlv-stock-item {
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.dlv-stock-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
  border-color: var(--accent, #0088cc) !important;
}

/* Tarjimalar bo'limi (Stage 10 i18n) */
.dlv-translations-section {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  background: var(--surface2, #f9fafb);
  padding: 8px 12px;
  margin: 12px 0;
}
.dlv-translations-section summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent, #2563eb);
  user-select: none;
}
.dlv-translations-section[open] summary {
  margin-bottom: 8px;
}

/* Shahar chegarasi muharriri: burchak (raqamli) va ikki burchak orasidagi "+" tutqich */
.dz-pt {
  width: 20px; height: 20px; box-sizing: border-box; border-radius: 50%;
  background: #fff; border: 2px solid #14532d; color: #14532d;
  font: 700 10px/16px system-ui, sans-serif; text-align: center; cursor: move;
  box-shadow: 0 1px 3px rgba(0,0,0,.35);
}
.dz-mid {
  width: 16px; height: 16px; box-sizing: border-box; border-radius: 50%;
  background: rgba(255,255,255,.65); border: 1.5px dashed #16a34a; color: #15803d;
  font: 700 12px/12px system-ui, sans-serif; text-align: center; cursor: copy; opacity: .8;
}
.dz-mid:hover { opacity: 1; background: #fff; }
