/* ========== DESIGN TOKENS — Light Theme ========== */
:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-light: #3b82f6;
  --color-primary-bg: #eff6ff;
  --color-success: #16a34a;
  --color-warning: #d97706;
  --color-danger: #dc2626;
  --color-info: #0284c7;

  /* Chart palette — consumed at runtime by dashboard.controller.js via
     getComputedStyle so a theme override (e.g. dark mode) recolors charts
     without touching JS. Order matters: status chart reads slots 1..7. */
  --chart-series-primary: #4f46e5;
  --chart-series-revenue: #10b981;
  --chart-status-1: #3b82f6;
  --chart-status-2: #f59e0b;
  --chart-status-3: #8b5cf6;
  --chart-status-4: #10b981;
  --chart-status-5: #06b6d4;
  --chart-status-6: #ef4444;
  --chart-status-7: #6b7280;

  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-input: #f1f5f9;
  --bg-hover: #f1f5f9;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --border-color: #e2e8f0;
  --border-radius: 8px;
  --border-radius-lg: 12px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .07), 0 2px 4px -2px rgba(0, 0, 0, .05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, .08), 0 4px 6px -4px rgba(0, 0, 0, .04);

  --sidebar-width: 240px;
  --navbar-height: 60px;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: all 0.2s ease;
}

/* ========== RESET & BASE ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  /* 100% respects the user's browser preference (default 16px, but some
     users scale up for accessibility). Hard-coding 14px was an a11y
     regression. Components use rem units; if a layout looks too roomy
     at 16px, fix the component's rem sizing rather than the root. */
  font-size: 100%;
}

body {
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--color-primary-dark);
}

/* ========== NAVBAR ========== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--navbar-height);
  padding: 0 24px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary) !important;
}

.logo-icon {
  font-size: 1.5rem;
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar-end {
  display: flex;
  align-items: center;
  gap: 16px;
}

.navbar-balances {
  display: flex;
  gap: 8px;
}

.balance-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 12px;
  border-radius: 8px;
  background: var(--bg-secondary, #f3f4f6);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
  cursor: pointer;
  min-width: 100px;
}

.balance-badge:hover {
  background: var(--bg-hover, #e5e7eb);
}

.balance-badge .balance-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted, #6b7280);
}

.balance-badge .balance-amount {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary, #111827);
}

.balance-badge--cod .balance-amount {
  color: #059669;
}

/* Price list cheapest cell */
.price-cheapest {
  background-color: #d1fae5;
  font-weight: 600;
  color: #065f46;
}

.user-name {
  font-weight: 500;
  color: var(--text-secondary);
}

/* ========== LANGUAGE SWITCHER ========== */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-input);
  border-radius: 20px;
  padding: 4px 8px;
  border: 1px solid var(--border-color);
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-family);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 14px;
  transition: var(--transition);
  letter-spacing: 0.5px;
}

.lang-btn:hover {
  color: var(--text-primary);
}

.lang-btn.lang-active {
  background: var(--color-primary);
  color: white;
  box-shadow: 0 1px 3px rgba(37, 99, 235, .3);
}

.lang-divider {
  color: var(--border-color);
  font-size: 0.75rem;
  user-select: none;
}

/* ========== SIDEBAR ========== */
.sidebar {
  position: fixed;
  top: var(--navbar-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  padding: 16px 0;
  z-index: 90;
}

.sidebar-menu {
  list-style: none;
}

.sidebar-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  color: var(--text-secondary);
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.sidebar-item a:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.sidebar-item.active a {
  background: var(--color-primary-bg);
  color: var(--color-primary);
  border-left-color: var(--color-primary);
  font-weight: 500;
}

.sidebar-icon {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
}

/* ========== LAYOUT ========== */
.app-container {
  display: flex;
  margin-top: var(--navbar-height);
  min-height: calc(100vh - var(--navbar-height));
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 28px 36px;
}

/* ========== CARDS ========== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
}

a.stat-card--clickable {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

a.stat-card--clickable:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.stat-icon {
  font-size: 2rem;
}

.stat-body h3 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--text-primary);
}

.stat-body p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.stat-warning .stat-body h3 {
  color: var(--color-warning);
}

.stat-danger .stat-body h3 {
  color: var(--color-danger);
}

/* ========== DASHBOARD GRID ========== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--border-radius);
  font-family: var(--font-family);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

.btn-primary:hover:not(:disabled) {
  background: var(--color-primary-dark);
  box-shadow: 0 1px 3px rgba(37, 99, 235, .3);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-bg);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-block {
  width: 100%;
}

/* ========== FORMS ========== */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
  background: #ffffff;
}

.form-control::placeholder {
  color: var(--text-muted);
}

/* ========== BADGES ========== */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-admin {
  background: var(--color-primary-bg);
  color: var(--color-primary);
}

.badge-new,
.badge-pending {
  background: #e0f2fe;
  color: var(--color-info);
}

.badge-processing,
.badge-dispatched {
  background: #fef3c7;
  color: var(--color-warning);
}

.badge-shipped,
.badge-delivered {
  background: #dcfce7;
  color: var(--color-success);
}

.badge-cancelled,
.badge-failed {
  background: #fee2e2;
  color: var(--color-danger);
}

/* ========== ALERTS ========== */
.alert {
  padding: 10px 16px;
  border-radius: var(--border-radius);
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--color-danger);
}

/*
 * Persistent error banner (sp-error-banner). Stays in the DOM until the
 * controller clears the message — distinguishes a failed fetch from an
 * empty list. Toasts are still emitted on top of this for the moment-of-
 * failure hint; the banner is the durable signal.
 */
.sp-error-banner {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sp-error-banner__icon { font-size: 1rem; }
.sp-error-banner__message { flex: 1; }
.sp-error-banner__close {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  opacity: 0.7;
}
.sp-error-banner__close:hover { opacity: 1; }

/* Inline per-field validation messages (ng-messages). */
.form-error {
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--color-danger);
  line-height: 1.3;
}

/* ========== NOTIFICATIONS ========== */
.notifications-container {
  position: fixed;
  top: 70px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
}

.notification {
  padding: 12px 20px;
  border-radius: var(--border-radius);
  cursor: pointer;
  animation: slideIn 0.3s ease;
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
}

.notification-success {
  background: var(--color-success);
  color: white;
}

.notification-error {
  background: var(--color-danger);
  color: white;
}

.notification-warning {
  background: var(--color-warning);
  color: white;
}

.notification-info {
  background: var(--color-info);
  color: white;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ========== AUTH PAGES ========== */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 50%, #dbeafe 100%);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-primary);
}

.auth-subtitle {
  color: var(--text-muted);
  margin-top: 8px;
  font-size: 0.95rem;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ========== PAGE HEADERS ========== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
}

.text-muted {
  color: var(--text-muted);
}

/* ========== DATA TABLES ========== */
.table-card,
.alert-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 20px 24px;
  margin-top: 20px;
  box-shadow: var(--shadow-sm);
}

.table-card h3,
.alert-card h3 {
  margin-bottom: 16px;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border-color);
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-primary);
}

.data-table tr:hover td {
  background: var(--bg-hover);
}

.data-table code {
  padding: 2px 8px;
  background: var(--color-primary-bg);
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--color-primary);
}

/* ========== FORM ROWS ========== */
.form-card {
  margin-bottom: 20px;
}

.form-card h3 {
  margin-bottom: 16px;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.form-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.form-row .form-group {
  flex: 1;
  min-width: 200px;
}

textarea.form-control {
  resize: vertical;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2394a3b8'%3E%3Cpath d='M7 7l3-3 3 3m0 6l-3 3-3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

/* ========== BUTTON VARIANTS ========== */
.btn-success {
  background: var(--color-success);
  color: white;
}

.btn-success:hover:not(:disabled) {
  background: #15803d;
  box-shadow: 0 1px 3px rgba(22, 163, 74, .3);
}

.btn-danger {
  background: var(--color-danger);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: #b91c1c;
  box-shadow: 0 1px 3px rgba(220, 38, 38, .3);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
  background: var(--bg-hover);
}

/* ========== INTEGRATION CARDS ========== */
.integration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.integration-card {
  padding: 24px;
}

.integration-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.integration-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.integration-body p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.integration-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

/* ========== EMPTY STATE ========== */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state p {
  font-size: 1rem;
}

/* ========== STATUS COLORS ========== */
.text-danger {
  color: var(--color-danger);
}

.text-success {
  color: var(--color-success);
}

.text-warning {
  color: var(--color-warning);
}

/* ========== LOADING ========== */
.loading-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  color: var(--text-muted);
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border-color);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .main-content {
    margin-left: 0;
    padding: 16px;
  }

  .auth-card {
    margin: 16px;
    padding: 24px;
  }

  .form-row {
    flex-direction: column;
  }

  .integration-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-charts-grid,
  .dashboard-map-row {
    grid-template-columns: 1fr;
  }
}

/* Dashboard Charts */
.dashboard-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

/*
 * Turkey map + order-status row.
 *
 * Same 1fr 1fr split as the orders/revenue row above so the column gutters
 * line up vertically across both chart rows — visually consistent dashboard.
 * align-items:start lets each card own its own height; the map's 2.5:1 box
 * and the status (doughnut + legend) panel have different intrinsic heights,
 * and stretching them to the taller one is what produced the dead space
 * inside the map card on the earlier attempt.
 */
.dashboard-map-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}

.dashboard-map-card .turkey-map-container {
  width: 100%;
}
.dashboard-map-card .turkey-map {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1000 / 400;
  position: relative;
}
.dashboard-map-card .turkey-map__svg {
  width: 100%;
  height: 100%;
  display: block;
}

/*
 * Status panel — doughnut on top, vertical legend list underneath. The
 * doughnut is capped to 220px so the panel doesn't blow past a sensible
 * card height when the column is wide. Legend rows are tabular for the
 * count column so digits align.
 */
.dashboard-status-card__chart {
  position: relative;
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1 / 1;
  margin: 0 auto 16px;
}
.dashboard-status-card__legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.875rem;
}
.dashboard-status-card__legend li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dashboard-status-card__swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}
.dashboard-status-card__label {
  flex: 1;
  color: var(--text-secondary, #4b5563);
}
.dashboard-status-card__count {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary, #111827);
}


.dashboard-charts-single {
  grid-template-columns: 1fr;
  max-width: 600px;
}

.chart-card {
  padding: 24px;
}

.chart-card h3 {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.chart-container {
  position: relative;
  height: 300px;
}

.chart-container-sm {
  height: 250px;
}

.stat-card.stat-success {
  border-left: 4px solid #10b981;
}

/* Bulk Operations */
.bulk-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-secondary, #f8fafc);
  border-radius: 8px;
  margin-bottom: 16px;
}

.bulk-toolbar .bulk-count {
  font-weight: 500;
  color: var(--text-secondary);
}

.bulk-toolbar .btn {
  padding: 6px 16px;
  font-size: 13px;
}

.data-table .checkbox-col {
  width: 40px;
  text-align: center;
}

.data-table input[type="checkbox"] {
  cursor: pointer;
  width: 16px;
  height: 16px;
}

/* Notification Templates */
.template-card {
  padding: 20px;
  margin-bottom: 16px;
  border-radius: 8px;
  border: 1px solid var(--border-color, #e2e8f0);
}

.template-card .template-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.template-card .template-meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

.template-preview {
  background: var(--bg-secondary, #f8fafc);
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
  border: 1px dashed var(--border-color, #e2e8f0);
}

.variable-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.variable-buttons .btn-var {
  padding: 4px 10px;
  font-size: 12px;
  background: var(--bg-secondary, #f0f4f8);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 4px;
  cursor: pointer;
}

.variable-buttons .btn-var:hover {
  background: var(--primary-color, #4f46e5);
  color: white;
}

.tab-nav {
  display: flex;
  border-bottom: 2px solid var(--border-color, #e2e8f0);
  margin-bottom: 24px;
}

.tab-nav .tab-item {
  padding: 10px 20px;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.tab-nav .tab-item.active {
  color: var(--primary-color, #4f46e5);
  border-bottom-color: var(--primary-color, #4f46e5);
}

/* Finance Dashboard */
.finance-period-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.finance-period-selector .btn-period {
  padding: 6px 16px;
  border-radius: 6px;
  border: 1px solid var(--border-color, #e2e8f0);
  background: white;
  cursor: pointer;
  font-size: 13px;
}

.finance-period-selector .btn-period.active {
  background: var(--primary-color, #4f46e5);
  color: white;
  border-color: var(--primary-color, #4f46e5);
}

/* Manual Order Form */
.form-section {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.form-section:last-child {
  border-bottom: none;
}

.form-section h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
  margin-bottom: 12px;
}

.product-picker {
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
}

.product-pick-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  transition: background 0.15s;
}

.product-pick-item:last-child {
  border-bottom: none;
}

.product-pick-item:hover {
  background: var(--bg-tertiary, #f1f5f9);
}

.product-pick-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.product-pick-info strong {
  font-size: 13px;
}

.product-pick-info .text-muted {
  font-size: 12px;
  color: var(--text-secondary, #64748b);
}

.empty-state-sm {
  padding: 16px;
  text-align: center;
  color: var(--text-secondary, #64748b);
  font-size: 13px;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
}

.order-summary {
  flex: 1;
  font-size: 14px;
  color: var(--text-secondary, #64748b);
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.page-header h1 {
  margin: 0;
}
/* ========== Confirm Modal (ConfirmModalService) ========== */
.sp-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.sp-confirm-dialog {
  background: var(--bg-surface, #ffffff);
  border-radius: var(--radius-md, 8px);
  box-shadow: var(--shadow-lg, 0 10px 25px rgba(0,0,0,.15));
  padding: 24px 28px;
  max-width: 420px;
  width: 90%;
}

.sp-confirm-message {
  font-size: 15px;
  color: var(--text-primary, #0f172a);
  margin: 0 0 20px;
  line-height: 1.5;
}

.sp-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ==========================================
   Stepper
   ========================================== */
.stepper-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 24px;
  padding: 16px 0;
}

.stepper-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: default;
  transition: background .15s;
}
.stepper-step.completed { cursor: pointer; }
.stepper-step.completed:hover { background: var(--bg-hover, #f1f5f9); }

.stepper-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  background: var(--bg-tertiary, #e2e8f0);
  color: var(--text-secondary, #64748b);
  transition: background .2s, color .2s;
}
.stepper-step.active .stepper-number {
  background: var(--primary, #3b82f6);
  color: #fff;
}
.stepper-step.completed .stepper-number {
  background: var(--success, #10b981);
  color: #fff;
}

.stepper-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary, #64748b);
}
.stepper-step.active .stepper-label { color: var(--text-primary, #0f172a); }
.stepper-step.completed .stepper-label { color: var(--success, #10b981); }

.stepper-line {
  flex: 0 0 40px;
  height: 2px;
  background: var(--bg-tertiary, #e2e8f0);
  transition: background .2s;
}
.stepper-line.completed { background: var(--success, #10b981); }

/* ==========================================
   Cargo Quote Cards
   ========================================== */
.cargo-quotes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.cargo-quote-card {
  border: 2px solid var(--border, #e2e8f0);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.cargo-quote-card:hover {
  border-color: var(--primary, #3b82f6);
}
.cargo-quote-card.selected {
  border-color: var(--primary, #3b82f6);
  background: var(--primary-bg, #eff6ff);
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

.cargo-quote-company {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
}
.cargo-quote-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary, #3b82f6);
}

/* ==========================================
   Confirmation Summary
   ========================================== */
.confirm-block {
  margin-bottom: 20px;
}
.confirm-block h5 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.confirm-row {
  display: flex;
  gap: 8px;
  padding: 4px 0;
  font-size: 14px;
}
.confirm-label {
  font-weight: 600;
  min-width: 140px;
  color: var(--text-secondary, #64748b);
}
.confirm-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--bg-secondary, #f8fafc);
  border-radius: 8px;
  font-size: 16px;
  margin-top: 16px;
}
.confirm-total strong {
  font-size: 20px;
  color: var(--primary, #3b82f6);
}

/* Error row in bulk import preview */
.table-row-error {
  background: rgba(239, 68, 68, 0.06);
}
.table-row-error td {
  color: var(--danger, #ef4444);
}
