/* ══════════════════════════════════════════
   DISPATCHER TAB — Portal Layout
   ══════════════════════════════════════════ */

.dispatcher-layout { display: flex; height: calc(100vh - 110px); }

/* Sidebar */
.dp-sidebar {
  width: 230px; min-width: 230px; background: #034381;
  color: #fff; display: flex; flex-direction: column; overflow-y: auto;
}
.dp-sidebar-header {
  padding: 20px 18px 14px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.dp-sidebar-header h4 { font-size: 14px; font-weight: 700; color: #11afbf; }
.dp-sidebar-header p { font-size: 10px; opacity: .5; margin-top: 2px; }
.dp-nav { padding: 8px 0; flex: 1; }
.dp-nav-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 18px; cursor: pointer;
  font-size: 13px; font-weight: 500; color: rgba(255,255,255,.6); transition: all .15s;
  border-left: 3px solid transparent; position: relative;
}
.dp-nav-item:hover { color: #fff; background: rgba(255,255,255,.05); }
.dp-nav-item.active {
  color: #fff; background: rgba(17,175,191,.08); border-left-color: #11afbf;
}
.dp-nav-item .nav-icon { font-size: 17px; width: 22px; text-align: center; }
.dp-nav-item .nav-badge {
  position: absolute; right: 14px; background: #e74c3c; color: #fff; font-size: 10px;
  font-weight: 700; padding: 1px 7px; border-radius: 10px; min-width: 20px; text-align: center;
}
.dp-nav-item .nav-badge.green { background: #27ae60; }
.dp-nav-item .nav-badge.orange { background: #e67e22; }
.dp-nav-divider { height: 1px; background: rgba(255,255,255,.06); margin: 6px 18px; }
.dp-sidebar-footer {
  padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.08);
  font-size: 10px; opacity: .35;
}

/* Content area */
.dp-content {
  flex: 1; overflow-y: auto; padding: 24px 28px; background: #f5f5f5;
}
.dp-page { display: none; }
.dp-page.active { display: block; }
.dp-page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.dp-page-header h2 { font-size: 20px; font-weight: 700; color: #034381; }
.dp-page-header p { font-size: 12px; color: #888; margin-top: 2px; }

/* ── Delay alert ─────────────────────────── */
.delay-alert {
  background: #fff3e0; border: 1px solid #ffcc80; border-radius: 10px;
  padding: 12px 16px; margin-bottom: 12px; display: flex; align-items: flex-start; gap: 10px;
}
.delay-alert .alert-icon { font-size: 20px; flex-shrink: 0; }
.delay-alert .alert-text { font-size: 12px; }
.delay-alert .alert-text strong { display: block; font-size: 13px; color: #e65100; }

/* ── Pallet ──────────────────────────────── */
.pallet-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 13px; border-bottom: 1px solid #f0f0f0; }
.pallet-row:last-child { border-bottom: none; }

/* ── Invoice ─────────────────────────────── */
.invoice-box { border: 2px solid #034381; border-radius: 12px; padding: 18px; background: #fafbfc; }
.invoice-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; }
.invoice-row.total { border-top: 2px solid #034381; margin-top: 6px; padding-top: 8px; font-weight: 700; font-size: 15px; }

/* ── Working hours ───────────────────────── */
.hours-bar { display: flex; align-items: center; gap: 6px; margin: 3px 0; }
.hours-fill { height: 8px; border-radius: 4px; background: #11afbf; }
.break-fill { height: 8px; border-radius: 4px; background: #e74c3c; }

/* ── Map ──────────────────────────────────── */
.map-container {
  background: #f0f7fa; border-radius: 10px;
  height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 2px dashed #b0bec5; position: relative; overflow: hidden; margin: 8px 0;
}
.map-dot {
  width: 12px; height: 12px; background: #e74c3c; border-radius: 50%;
  border: 2px solid #fff; box-shadow: 0 0 0 2px #e74c3c; position: absolute; animation: pulse 2s infinite;
}
.map-route-line {
  position: absolute; width: 55%; height: 2px; background: #034381; top: 50%; transform: rotate(-12deg); opacity: .4;
}
.map-route-line::before, .map-route-line::after {
  content: ''; position: absolute; width: 10px; height: 10px; border-radius: 50%; top: -4px;
}
.map-route-line::before { left: 0; background: #27ae60; }
.map-route-line::after { right: 0; background: #e74c3c; }
.traffic-warn {
  position: absolute; bottom: 6px; left: 8px; background: rgba(243,156,18,.9); color: #fff;
  font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 6px;
}

/* ── Responsive ──────────────────────────── */
@media (max-width: 900px) {
  .dp-sidebar { width: 56px; min-width: 56px; }
  .dp-sidebar .nav-label, .dp-sidebar-header p, .dp-sidebar-footer { display: none; }
  .dp-sidebar-header h4 { font-size: 11px; }
  .dp-nav-item { padding: 11px 16px; justify-content: center; }
  .dp-nav-item .nav-icon { margin: 0; }
}
