/* =====================
   TOAST / إشعارات
===================== */
#toast-host {
  position: fixed;
  bottom: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
}
.toast {
  background: var(--navy);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-success { border-right: 4px solid var(--green); }
.toast-error   { border-right: 4px solid var(--red); }

/* =====================
   نافذة الدفع
===================== */
.pay-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 27, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
.pay-modal {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  width: 360px;
  max-width: 90vw;
  box-shadow: var(--shadow-md);
  text-align: center;
}
.pay-title  { font-size: 16px; font-weight: 700; }
.pay-desc   { font-size: 12px; color: var(--gray-4); margin-top: 4px; }
.pay-amount { font-size: 30px; font-weight: 800; color: var(--orange); margin: 14px 0; }
.pay-amount span { font-size: 14px; font-weight: 600; }
.pay-test {
  font-size: 11px; color: var(--gray-4);
  background: var(--gray-1); border-radius: 6px;
  padding: 6px; margin-bottom: 14px;
}
#pay-body { text-align: right; }

/* =====================
   BUTTONS
===================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  transition: all 0.15s;
}

.btn-primary { background: var(--orange); color: white; }
.btn-primary:hover { background: var(--orange-light); }

.btn-ghost {
  background: transparent;
  color: var(--gray-4);
  border: 1px solid var(--gray-2);
}
.btn-ghost:hover { background: var(--gray-1); }

.btn-teal { background: var(--teal); color: white; }
.btn-danger { background: #fee2e2; color: var(--red); }

.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn-full { width: 100%; justify-content: center; padding: 12px; }

/* =====================
   CARD
===================== */
.card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--gray-2);
  overflow: hidden;
  margin-bottom: 16px;
}

.card-header {
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--gray-2);
}

.card-title  { font-size: 13px; font-weight: 700; }

.card-action {
  font-size: 12px;
  color: var(--orange);
  font-weight: 600;
  border: none;
  background: none;
}

.card-body { padding: 16px; }

/* =====================
   KPI CARD
===================== */
.kpi-card {
  background: white;
  border-radius: var(--radius);
  padding: 18px;
  border: 1px solid var(--gray-2);
  position: relative;
  overflow: hidden;
}

.kpi-accent {
  position: absolute;
  top: 0; right: 0;
  width: 4px; height: 100%;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.kpi-label { font-size: 11px; color: var(--gray-3); font-weight: 500; margin-bottom: 7px; }
.kpi-value { font-size: 23px; font-weight: 700; letter-spacing: -1px; }

.kpi-change {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  margin-top: 5px;
  padding: 2px 7px;
  border-radius: 20px;
}

.kpi-icon {
  position: absolute;
  top: 14px; left: 14px;
  width: 34px; height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

/* =====================
   BADGE
===================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
}

.badge::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.badge-green  { background: #dcfce7; color: #16a34a; }
.badge-orange { background: #fff3e0; color: #e65100; }
.badge-blue   { background: #e0f2fe; color: #0277bd; }
.badge-gray   { background: var(--gray-2); color: var(--gray-4); }
.badge-red    { background: #fee2e2; color: var(--red); }
.badge-teal   { background: #e0f7f6; color: #00796b; }

/* =====================
   STATUS COLORS
===================== */
.up      { background: #dcfce7; color: #16a34a; }
.down    { background: #fee2e2; color: #dc2626; }
.neutral { background: var(--gray-2); color: var(--gray-4); }

/* =====================
   TABLE
===================== */
.table { width: 100%; border-collapse: collapse; }

.table th {
  font-size: 10px;
  font-weight: 600;
  color: var(--gray-3);
  text-align: right;
  padding: 9px 14px;
  background: var(--gray-1);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.table td {
  padding: 12px 14px;
  font-size: 12px;
  border-top: 1px solid var(--gray-2);
  vertical-align: middle;
}

.table tr:hover td { background: #fafafa; }

/* =====================
   ALERT
===================== */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 12px;
}

.alert-orange { background: #fff3e0; border: 1px solid #ffe0b2; color: #e65100; }
.alert-green  { background: #dcfce7; border: 1px solid #bbf7d0; color: #16a34a; }
.alert-blue   { background: #e0f2fe; border: 1px solid #b3e5fc; color: #0277bd; }

.alert-icon  { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.alert-title { font-weight: 700; margin-bottom: 2px; }

/* =====================
   FORM
===================== */
.form-group   { margin-bottom: 12px; }
.form-row     { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.form-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-4);
  margin-bottom: 5px;
  display: block;
}

.form-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--gray-2);
  border-radius: 9px;
  font-size: 13px;
  outline: none;
  transition: border 0.15s;
  background: white;
  color: var(--navy);
}

.form-input:focus { border-color: var(--orange); }

.form-hint {
  font-size: 10px;
  color: var(--gray-3);
  margin-top: 4px;
}

/* =====================
   TABS
===================== */
.tabs {
  display: flex;
  gap: 3px;
  background: white;
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 16px;
  border: 1px solid var(--gray-2);
  width: fit-content;
}

.tab {
  padding: 6px 16px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  border: none;
  background: transparent;
  color: var(--gray-4);
  transition: all 0.15s;
}

.tab.active { background: var(--navy); color: white; font-weight: 600; }

/* =====================
   FILTER CHIPS
===================== */
.filter-chips { display: flex; gap: 7px; margin-bottom: 14px; flex-wrap: wrap; }

.chip {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid var(--gray-2);
  background: white;
  color: var(--gray-4);
  transition: all 0.15s;
}

.chip.active { background: var(--navy); color: white; border-color: var(--navy); }

/* =====================
   CHART BARS
===================== */
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  height: 110px;
  padding: 0 2px;
}

.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.bar {
  width: 100%;
  border-radius: 5px 5px 0 0;
  background: var(--gray-2);
  position: relative;
}

.bar.orange { background: linear-gradient(180deg, var(--orange-light), var(--orange)); }
.bar.teal   { background: linear-gradient(180deg, #4dd8d0, var(--teal)); }

.bar:hover::after {
  content: attr(data-val);
  position: absolute;
  top: -24px; left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: white;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.bar-label { font-size: 9px; color: var(--gray-3); }

/* =====================
   PROGRESS BAR
===================== */
.progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.progress-label { font-size: 11px; width: 80px; flex-shrink: 0; color: var(--gray-4); }

.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--gray-2);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--orange);
}

.progress-fill.teal  { background: var(--teal); }
.progress-fill.green { background: var(--green); }

.progress-val { font-size: 11px; font-weight: 700; width: 32px; text-align: left; }

/* =====================
   TOGGLE SWITCH
===================== */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--gray-2);
}
.toggle-row:last-child { border-bottom: none; }

.toggle-label { font-size: 13px; font-weight: 500; }
.toggle-sub   { font-size: 11px; color: var(--gray-3); margin-top: 1px; }

.toggle {
  width: 40px; height: 22px;
  border-radius: 11px;
  background: var(--gray-2);
  border: none;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}

.toggle::after {
  content: '';
  position: absolute;
  top: 3px; right: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: white;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle.on { background: var(--orange); }
.toggle.on::after { transform: translateX(-18px); }

/* =====================
   PRICE CALC BOX
===================== */
.price-calc {
  background: linear-gradient(135deg, var(--navy), var(--navy-3));
  border-radius: var(--radius);
  padding: 18px;
  color: white;
  margin-bottom: 14px;
}

.price-calc-title  { font-size: 11px; opacity: 0.7; margin-bottom: 10px; }
.price-calc-value  { font-size: 32px; font-weight: 700; letter-spacing: -1px; }
.price-calc-sub    { font-size: 11px; opacity: 0.6; margin-top: 3px; }

.price-calc-breakdown {
  margin-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.price-row { display: flex; justify-content: space-between; font-size: 11px; }
.price-row span:first-child { opacity: 0.7; }

/* =====================
   BOOKING REQUEST ITEM
===================== */
.booking-req {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--gray-2);
  margin-bottom: 8px;
  background: white;
}

.req-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.req-info  { flex: 1; }
.req-name  { font-size: 12px; font-weight: 700; margin-bottom: 2px; }
.req-detail { font-size: 10px; color: var(--gray-3); }
.req-amount { font-size: 14px; font-weight: 700; color: var(--orange); white-space: nowrap; }
.req-actions { display: flex; gap: 6px; margin-right: 8px; }

/* =====================
   WAREHOUSE CARD (GRID)
===================== */
.wh-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }

.warehouse-card {
  border: 1px solid var(--gray-2);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.15s;
}

.warehouse-card:hover {
  border-color: var(--orange);
  box-shadow: 0 4px 16px rgba(242,101,34,0.1);
}

.wh-thumb {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  position: relative;
}

.wh-status { position: absolute; top: 8px; right: 8px; }

.wh-body { padding: 12px; }
.wh-name { font-size: 13px; font-weight: 700; margin-bottom: 3px; }
.wh-meta { font-size: 10px; color: var(--gray-3); margin-bottom: 8px; }

.wh-occ-bar {
  height: 7px;
  border-radius: 4px;
  background: var(--gray-2);
  overflow: hidden;
  margin: 5px 0 3px;
}

.wh-occ-fill { height: 100%; border-radius: 4px; }

.wh-stats {
  display: flex;
  border-top: 1px solid var(--gray-2);
  margin: 0 -12px;
}

.wh-stat {
  flex: 1;
  padding: 8px 10px;
  text-align: center;
  border-left: 1px solid var(--gray-2);
}
.wh-stat:last-child { border-left: none; }

.wh-stat-val   { font-size: 13px; font-weight: 700; color: var(--orange); }
.wh-stat-label { font-size: 9px; color: var(--gray-3); margin-top: 1px; }

/* =====================
   TIMELINE
===================== */
.timeline { display: flex; flex-direction: column; }

.timeline-item {
  display: flex;
  gap: 12px;
  padding-bottom: 16px;
  position: relative;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
  position: relative;
  z-index: 1;
}

.timeline-item::before {
  content: '';
  position: absolute;
  right: 4px; top: 13px; bottom: 0;
  width: 1px;
  background: var(--gray-2);
}
.timeline-item:last-child::before { display: none; }

.timeline-title { font-size: 12px; font-weight: 600; margin-bottom: 2px; }
.timeline-sub   { font-size: 10px; color: var(--gray-3); }

/* =====================
   SEARCH BAR
===================== */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: white;
  border: 1px solid var(--gray-2);
  border-radius: 10px;
  font-size: 13px;
  color: var(--gray-3);
  margin-bottom: 16px;
}

/* =====================
   PAGINATION
===================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 12px 0 0;
}

.page-btn {
  width: 28px; height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--gray-2);
  background: white;
  color: var(--gray-4);
}
.page-btn.active { background: var(--orange); border-color: var(--orange); color: white; }

/* =====================
   MISC
===================== */
.stars { color: var(--yellow); font-size: 12px; }

.divider {
  border: none;
  border-top: 1px solid var(--gray-2);
  margin: 14px 0;
}

.text-orange { color: var(--orange); }
.text-green  { color: var(--green);  }
.text-gray   { color: var(--gray-3); }
.text-muted  { color: var(--gray-4); font-size: 11px; }

.mt-auto { margin-top: auto; }
