/* WWLogix Staff Operations Panel */
.wwl-staff-app { background: #f1f5f9; min-height: 100vh; }

.wwl-staff-sidebar { background: linear-gradient(180deg, #0a1628 0%, #060c18 100%); }

.wwl-manual-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 0.82rem;
  color: #64748b;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px dashed #cbd5e1;
}

.wwl-manual-steps span { font-weight: 600; color: #475569; }

.wwl-optional { font-weight: 400; color: #94a3b8; font-size: 0.85em; }

.wwl-add-awb-form {
  margin-top: 16px;
  padding: 16px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 12px;
}

.wwl-add-awb-form label { display: block; font-weight: 600; margin-bottom: 8px; }

.wwl-add-awb-form input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 10px;
}

.wwl-add-awb-form .btn { margin-right: 8px; }

.wwl-staff-logout {
  width: 100%;
  text-align: center;
  display: block;
  padding: 8px;
  color: var(--gray-400);
  border-color: rgba(255,255,255,0.15);
}

.wwl-staff-main { background: #f1f5f9; }

.wwl-staff-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 24px;
}

.wwl-staff-topbar h1 { margin-bottom: 4px; }

.wwl-staff-subtitle {
  margin: 0;
  font-size: 0.88rem;
  color: #64748b;
}

.wwl-staff-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.wwl-stat-card {
  background: #fff;
  border-radius: 14px;
  padding: 20px 22px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 16px rgba(15,23,42,0.04);
}

.wwl-stat-num {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
}

.wwl-stat-label {
  font-size: 0.82rem;
  color: #64748b;
  margin-top: 4px;
}

.wwl-stat-pending .wwl-stat-num { color: #d97706; }
.wwl-stat-transit .wwl-stat-num { color: #2563eb; }
.wwl-stat-delivered .wwl-stat-num { color: #16a34a; }

.wwl-staff-card {
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 24px rgba(15,23,42,0.05);
  border-radius: 16px;
  overflow: hidden;
}

.wwl-staff-card .card-header {
  background: #fff;
  border-bottom: 1px solid #f1f5f9;
  padding: 18px 24px;
}

.wwl-staff-card .card-header h3 {
  margin: 0;
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  color: #0f172a;
}

.wwl-booking-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}

.wwl-wizard-steps {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.wwl-wizard-step {
  flex: 1;
  min-width: 120px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  transition: all 0.2s;
}

.wwl-wizard-step span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.wwl-wizard-step.active {
  border-color: #f97316;
  color: #c2410c;
  background: #fff7ed;
}

.wwl-wizard-step.active span {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
}

.wwl-wizard-step.done {
  border-color: #bbf7d0;
  color: #15803d;
}

.wwl-wizard-step.done span { background: #dcfce7; color: #15803d; }

.wwl-wizard-panel { display: none; }
.wwl-wizard-panel.active { display: block; }

.wwl-wizard-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.wwl-topbar-actions { display: flex; align-items: center; gap: 12px; }
.wwl-wallet-badge {
  display: flex; flex-direction: column; align-items: flex-end;
  padding: 8px 14px; border-radius: 10px; background: #0a1628; color: #fff; min-width: 120px;
}
.wwl-wallet-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.75; }
.wwl-wallet-amount { font-size: 1.05rem; font-weight: 700; }
.wwl-wallet-amount.negative { color: #fca5a5; }
.role-badge.franchise { background: linear-gradient(135deg, #7c3aed, #5b21b6); }
.wwl-radio-row { display: flex; gap: 20px; flex-wrap: wrap; }
.wwl-radio-row label { display: flex; align-items: center; gap: 6px; font-weight: 500; }
.wwl-invoice-items { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.wwl-invoice-item { display: grid; grid-template-columns: 2fr 1fr 0.6fr 0.8fr auto auto; gap: 8px; align-items: center; }
.wwl-invoice-item input { width: 100%; padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 8px; }
.inv-line-total { font-size: 0.85rem; font-weight: 600; white-space: nowrap; }
.wwl-remove-item { background: #fee2e2; color: #b91c1c; border: none; border-radius: 6px; width: 28px; height: 28px; cursor: pointer; }
.wwl-invoice-total { margin-top: 12px; }
.wwl-franchise-apply-page { min-height: 100vh; background: #f1f5f9; }
.wwl-franchise-apply-wrap { max-width: 720px; margin: 0 auto; padding: 100px 20px 60px; }
.wwl-franchise-apply-card { background: #fff; border-radius: 16px; padding: 32px; box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08); }
.wwl-franchise-apply-card h1 { margin: 0 0 8px; }

.wwl-mode-notice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border-radius: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  margin: 20px 0;
}

.wwl-mode-notice .wwl-icon { color: #2563eb; flex-shrink: 0; margin-top: 2px; }
.wwl-mode-notice p { margin: 4px 0 0; font-size: 0.88rem; color: #475569; }

.wwl-submit-btn { width: 100%; margin-top: 8px; }

.wwl-review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 8px;
}

.wwl-review-block {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
}

.wwl-review-block h4 {
  margin: 0 0 10px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.wwl-review-block p {
  margin: 0 0 6px;
  font-size: 0.9rem;
  color: #334155;
  line-height: 1.5;
}

.wwl-aside-card { position: sticky; top: 100px; }

.wwl-guide-list {
  padding-left: 18px;
  color: #475569;
  line-height: 1.9;
  font-size: 0.9rem;
  margin: 0 0 20px;
}

.wwl-aside-tip {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  font-size: 0.85rem;
  color: #9a3412;
}

.wwl-aside-tip .wwl-icon { color: #f97316; flex-shrink: 0; }

.wwl-alert {
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 0.92rem;
  line-height: 1.6;
}

.wwl-alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.wwl-alert-warning {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #92400e;
}

.wwl-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.wwl-table-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.wwl-table-filters input,
.wwl-table-filters select {
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.88rem;
}

.wwl-table-filters input { min-width: 220px; }

.wwl-status-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.wwl-status-pending { background: #fef3c7; color: #92400e; }
.wwl-status-booked { background: #dbeafe; color: #1e40af; }
.wwl-status-transit { background: #e0e7ff; color: #3730a3; }
.wwl-status-delivered { background: #dcfce7; color: #166534; }
.wwl-status-cancelled { background: #f1f5f9; color: #64748b; }
.wwl-status-failed { background: #fee2e2; color: #991b1b; }

.wwl-ref { color: #c2410c; }

.wwl-staff-track-form input {
  flex: 1;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

/* Modal */
.wwl-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.wwl-modal.open { display: flex; }

.wwl-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,0.55);
  backdrop-filter: blur(4px);
}

.wwl-modal-dialog {
  position: relative;
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,0.2);
}

.wwl-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #f1f5f9;
}

.wwl-modal-header h3 { margin: 0; font-family: 'Outfit', sans-serif; }

.wwl-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #64748b;
  line-height: 1;
}

.wwl-modal-body { padding: 24px; }

.wwl-modal-footer {
  display: flex;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #f1f5f9;
  align-items: center;
}

.wwl-modal-footer select {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.wwl-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.wwl-detail-block {
  background: #f8fafc;
  border-radius: 10px;
  padding: 14px;
  border: 1px solid #e2e8f0;
}

.wwl-detail-block.full { grid-column: 1 / -1; }

.wwl-detail-block label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 4px;
  font-weight: 600;
}

.wwl-detail-block p { margin: 0; font-size: 0.92rem; color: #0f172a; }

@media (max-width: 1024px) {
  .wwl-staff-stats { grid-template-columns: repeat(2, 1fr); }
  .wwl-booking-layout { grid-template-columns: 1fr; }
  .wwl-aside-card { position: static; }
  .grid-3, .grid-4, .wwl-review-grid, .wwl-detail-grid { grid-template-columns: 1fr; }
  .wwl-invoice-item { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .wwl-staff-stats { grid-template-columns: 1fr; }
  .wwl-wizard-step { min-width: 100%; }
}
