/* ============================================================
   WahKart Seller Dashboard — shared shell + component styles
   ============================================================ */

.wksd { background: #f9fafb; }
.wksd * { box-sizing: border-box; }

/* ---------- Topbar ---------- */
.wksd-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 16px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.wksd-topbar-left { display: flex; align-items: center; gap: 12px; }

.wksd-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #4b5563;
  cursor: pointer;
  padding: 4px;
}

.wksd-topbar-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #9333ea, #2563eb);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wksd-topbar-titles h1 { font-size: 1rem; font-weight: 800; color: #111827; margin: 0; line-height: 1.2; }
.wksd-topbar-titles p { font-size: 0.75rem; color: #6b7280; margin: 0; }

.wksd-topbar-right { display: flex; align-items: center; gap: 16px; }

.wksd-bell {
  position: relative;
  background: none;
  border: none;
  color: #4b5563;
  cursor: pointer;
  padding: 4px;
  display: flex;
}

.wksd-bell:hover { color: #111827; }

.wksd-bell-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wksd-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #9333ea, #2563eb);
  color: #fff;
  font-weight: 700;
  font-size: 0.8125rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Body / Sidebar / Main ---------- */
.wksd-body { display: flex; position: relative; min-height: calc(100vh - 64px - 260px); }

.wksd-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 45;
}

.wksd-sidebar {
  width: 256px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid #e5e7eb;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}

.wksd-nav { padding: 16px 12px; display: flex; flex-direction: column; gap: 2px; }

.wksd-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  color: #4b5563;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.wksd-nav-link:hover { background: #f9fafb; color: #111827; text-decoration: none; }

.wksd-nav-link.active {
  background: linear-gradient(90deg, #9333ea, #2563eb);
  color: #fff;
  box-shadow: 0 4px 10px rgba(147, 51, 234, 0.25);
}

.wksd-nav-link-main { display: flex; align-items: center; gap: 12px; }

.wksd-nav-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
  background: #f3e8ff;
  color: #7c3aed;
}

.wksd-nav-link.active .wksd-nav-badge { background: rgba(255, 255, 255, 0.25); color: #fff; }

.wksd-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wksd-main-inner { flex: 1; padding: 24px; }

@media (min-width: 992px) {
  .wksd-main-inner { padding: 32px; }
}

.wksd-footer {
  border-top: 1px solid #e5e7eb;
  background: #fff;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.75rem;
  color: #9ca3af;
}

.wksd-footer-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; }
.wksd-footer-links a { color: #9ca3af; text-decoration: none; }
.wksd-footer-links a:hover { color: #7c3aed; }
.wksd-footer-links span { color: #e5e7eb; }

@media (min-width: 576px) {
  .wksd-footer { flex-direction: row; }
}

@media (max-width: 991.98px) {
  .wksd-menu-btn { display: flex; }
  .wksd-sidebar {
    position: fixed;
    top: 64px;
    left: 0;
    z-index: 46;
    height: calc(100vh - 64px);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .wksd-sidebar.open { transform: translateX(0); }
  .wksd-overlay.show { display: block; }
}

/* ---------- Page header ---------- */
.wksd-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.wksd-page-header h1 { font-size: 1.5rem; font-weight: 800; color: #111827; margin: 0; }
.wksd-page-header p { color: #6b7280; margin: 4px 0 0; font-size: 0.9375rem; }

.wksd-select {
  padding: 10px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  background: #fff;
  outline: none;
}

.wksd-select:focus { border-color: #a855f7; box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15); }

/* ---------- Buttons ---------- */
.wksd-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.15s;
  font-family: var(--wk-font, 'Inter', sans-serif);
}

.wksd-btn:hover { text-decoration: none; }

.wksd-btn-primary { background: linear-gradient(90deg, #9333ea, #2563eb); color: #fff; }
.wksd-btn-primary:hover { box-shadow: 0 10px 20px rgba(147, 51, 234, 0.28); color: #fff; transform: translateY(-1px); }

.wksd-btn-outline { background: #fff; border: 1px solid #e5e7eb; color: #374151; }
.wksd-btn-outline:hover { background: #f9fafb; color: #111827; }

.wksd-btn-danger { background: #fee2e2; color: #dc2626; }
.wksd-btn-danger:hover { background: #fecaca; }

.wksd-btn-success { background: #16a34a; color: #fff; }
.wksd-btn-success:hover { background: #15803d; color: #fff; }

.wksd-btn-sm { padding: 6px 12px; font-size: 0.75rem; border-radius: 8px; }
.wksd-btn-block { width: 100%; justify-content: center; }

.wksd-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}
.wksd-icon-btn:hover { background: #f3f4f6; color: #111827; }

/* ---------- Cards ---------- */
.wksd-card {
  background: #fff;
  border: 1px solid #f3f4f6;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.wksd-card-sm { padding: 16px; border-radius: 12px; }

.wksd-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wksd-card-title svg { flex-shrink: 0; }

.wksd-grid { display: grid; gap: 16px; }
.wksd-grid-2 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.wksd-grid-3 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.wksd-grid-4 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

@media (min-width: 992px) {
  .wksd-grid-cols-2 { grid-template-columns: 2fr 1fr; }
  .wksd-grid-cols-2-even { grid-template-columns: 1fr 1fr; }
  .wksd-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Stat cards ---------- */
.wksd-stat {
  background: #fff;
  border: 1px solid #f3f4f6;
  border-radius: 16px;
  padding: 20px;
  transition: box-shadow 0.15s;
}
.wksd-stat:hover { box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06); }

.wksd-stat-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }

.wksd-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.wksd-stat-trend { display: flex; align-items: center; gap: 4px; font-size: 0.8125rem; font-weight: 700; }
.wksd-stat-trend.up { color: #16a34a; }
.wksd-stat-trend.down { color: #dc2626; }

.wksd-stat h3 { font-size: 1.5rem; font-weight: 800; color: #111827; margin: 0 0 2px; }
.wksd-stat p { font-size: 0.8125rem; color: #6b7280; margin: 0; }

.wksd-stat-simple {
  background: #fff;
  border: 1px solid #f3f4f6;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wksd-stat-simple h3 { font-size: 1.375rem; font-weight: 800; color: #111827; margin: 4px 0 0; }
.wksd-stat-simple p { font-size: 0.8125rem; color: #6b7280; margin: 0; }
.wksd-stat-simple .wksd-stat-icon { width: 44px; height: 44px; }

/* Gradient icon presets */
.grad-green { background: linear-gradient(135deg, #22c55e, #059669); }
.grad-blue { background: linear-gradient(135deg, #3b82f6, #0891b2); }
.grad-purple { background: linear-gradient(135deg, #a855f7, #db2777); }
.grad-orange { background: linear-gradient(135deg, #f97316, #d97706); }
.grad-red { background: linear-gradient(135deg, #ef4444, #e11d48); }
.grad-indigo { background: linear-gradient(135deg, #6366f1, #2563eb); }
.grad-violet { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.grad-amber { background: linear-gradient(135deg, #fbbf24, #f97316); }
.grad-cyan { background: linear-gradient(135deg, #22d3ee, #6366f1); }
.grad-emerald { background: linear-gradient(135deg, #34d399, #0d9488); }

.wksd-purple-soft { background: #f3e8ff; color: #7c3aed; }
.wksd-green-soft { background: #dcfce7; color: #16a34a; }
.wksd-orange-soft { background: #ffedd5; color: #ea580c; }
.wksd-red-soft { background: #fee2e2; color: #dc2626; }
.wksd-blue-soft { background: #dbeafe; color: #2563eb; }

/* ---------- Forms ---------- */
.wksd-label { display: block; font-size: 0.875rem; font-weight: 600; color: #374151; margin-bottom: 8px; }
.wksd-hint { font-size: 0.75rem; color: #9ca3af; margin: 4px 0 0; }

.wksd-input, .wksd-textarea, select.wksd-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: var(--wk-font, 'Inter', sans-serif);
  color: #111827;
  background: #fff;
}

.wksd-input:focus, .wksd-textarea:focus, select.wksd-input:focus {
  border-color: #a855f7;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

.wksd-input:disabled, .wksd-textarea:disabled { background: #f9fafb; color: #6b7280; }

.wksd-textarea { resize: vertical; }

.wksd-input-icon-wrap { position: relative; }
.wksd-input-icon-wrap svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #9ca3af; pointer-events: none; }
.wksd-input-icon-wrap .wksd-input { padding-left: 42px; }

.wksd-input-prefix { position: relative; }
.wksd-input-prefix span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #6b7280; font-weight: 700; font-size: 0.875rem; }
.wksd-input-prefix .wksd-input { padding-left: 28px; }

.wksd-search-box { position: relative; flex: 1; }
.wksd-search-box svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #9ca3af; }
.wksd-search-box .wksd-input { padding-left: 44px; }

/* ---------- Badges ---------- */
.wksd-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.wksd-badge-green { background: #dcfce7; color: #15803d; }
.wksd-badge-red { background: #fee2e2; color: #dc2626; }
.wksd-badge-orange { background: #ffedd5; color: #c2410c; }
.wksd-badge-amber { background: #fef3c7; color: #b45309; }
.wksd-badge-purple { background: #f3e8ff; color: #7c3aed; }
.wksd-badge-blue { background: #dbeafe; color: #1d4ed8; }
.wksd-badge-gray { background: #f3f4f6; color: #4b5563; }

/* ---------- Table ---------- */
.wksd-table-wrap { overflow-x: auto; }
.wksd-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.wksd-table thead tr { background: #f9fafb; border-bottom: 1px solid #e5e7eb; }
.wksd-table th { text-align: left; padding: 14px 20px; font-weight: 600; color: #374151; white-space: nowrap; }
.wksd-table td { padding: 14px 20px; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
.wksd-table tbody tr:hover { background: #f9fafb; }
.wksd-table tbody tr:last-child td { border-bottom: none; }

.wksd-table-product { display: flex; align-items: center; gap: 14px; }
.wksd-table-product img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.wksd-table-product h4 { font-size: 0.875rem; font-weight: 600; color: #111827; margin: 0; }
.wksd-table-product p { font-size: 0.8125rem; color: #6b7280; margin: 2px 0 0; }

.wksd-table-actions { display: flex; align-items: center; gap: 4px; }

/* ---------- Tabs (pill style) ---------- */
.wksd-tabs { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.wksd-tab-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 0.875rem;
  white-space: nowrap;
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #4b5563;
  cursor: pointer;
  transition: all 0.15s;
}
.wksd-tab-pill:hover { border-color: #d8b4fe; }
.wksd-tab-pill.active { border: 2px solid #ddd6fe; color: #7c3aed; box-shadow: 0 4px 10px rgba(147, 51, 234, 0.12); }
.wksd-tab-pill .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.wksd-tab-pill .count { background: #f3f4f6; color: #4b5563; padding: 1px 8px; border-radius: 999px; font-size: 0.75rem; }

/* Segmented tabs (used in settings sidebar / role toggle) */
.wksd-seg-tabs { display: flex; gap: 4px; background: #f3f4f6; padding: 4px; border-radius: 12px; }
.wksd-seg-tabs button {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--wk-font, 'Inter', sans-serif);
}
.wksd-seg-tabs button.active { background: linear-gradient(90deg, #9333ea, #2563eb); color: #fff; }

/* ---------- Toggle switch ---------- */
.wksd-toggle { background: none; border: none; cursor: pointer; color: #d1d5db; padding: 0; display: inline-flex; transition: color 0.15s; }
.wksd-toggle.on { color: #9333ea; }

/* ---------- Progress bar ---------- */
.wksd-progress { width: 100%; background: #e5e7eb; border-radius: 999px; height: 8px; overflow: hidden; }
.wksd-progress > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #9333ea, #2563eb); }
.wksd-progress.thin { height: 6px; }

/* ---------- Modal ---------- */
.wksd-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}
.wksd-modal-backdrop.show { display: flex; }

.wksd-modal {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  margin: auto;
  box-sizing: border-box;
  overflow: hidden;
}
.wksd-modal.wksd-modal-lg { max-width: 640px; }

@media (max-width: 575.98px) {
  .wksd-modal-backdrop { padding: 0; align-items: flex-end; }
  .wksd-modal { max-width: 100%; max-height: calc(100vh - 24px); border-radius: 20px 20px 0 0; }
}

.wksd-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
  gap: 12px;
}
.wksd-modal-header h2 { font-size: 1.25rem; font-weight: 800; color: #111827; margin: 0; }
.wksd-modal-close { background: none; border: none; color: #9ca3af; cursor: pointer; flex-shrink: 0; }
.wksd-modal-close:hover { color: #4b5563; }
.wksd-modal-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; flex: 1; min-height: 0; }
.wksd-modal-footer { display: flex; gap: 12px; padding: 16px 24px; border-top: 1px solid #f3f4f6; flex-shrink: 0; flex-wrap: wrap; }
.wksd-modal-footer .wksd-btn { min-width: 0; }

@media (max-width: 480px) {
  .wksd-modal-body { padding: 16px; }
  .wksd-modal-header { padding: 16px; }
  .wksd-modal-footer { padding: 12px 16px; }
}

/* ---------- Empty state ---------- */
.wksd-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 80px 24px; color: #6b7280; }
.wksd-empty .wksd-empty-icon { width: 64px; height: 64px; border-radius: 20px; background: linear-gradient(135deg, #9333ea, #7c3aed); display: flex; align-items: center; justify-content: center; color: #fff; margin-bottom: 16px; }

/* ---------- Chat (Messages page) ---------- */
.wksd-chat-shell { display: flex; flex-direction: column; min-height: 560px; border: 1px solid #f3f4f6; border-radius: 16px; overflow: hidden; background: #fff; }
@media (min-width: 768px) { .wksd-chat-shell { flex-direction: row; height: 640px; } }

.wksd-chat-list { width: 100%; border-bottom: 1px solid #f3f4f6; display: flex; flex-direction: column; }
@media (min-width: 768px) { .wksd-chat-list { width: 340px; flex-shrink: 0; border-bottom: none; border-right: 1px solid #f3f4f6; } }
.wksd-chat-list.hide-mobile { display: none; }
@media (min-width: 768px) { .wksd-chat-list.hide-mobile { display: flex; } }

.wksd-chat-list-header { padding: 16px; border-bottom: 1px solid #f3f4f6; }
.wksd-chat-list-header h2 { font-size: 1.0625rem; font-weight: 700; margin: 0 0 12px; }
.wksd-chat-list-items { flex: 1; overflow-y: auto; }

.wksd-chat-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border: none;
  border-bottom: 1px solid #f9fafb;
  border-left: 4px solid transparent;
  background: #fff;
  cursor: pointer;
}
.wksd-chat-item:hover { background: #f9fafb; }
.wksd-chat-item.active { background: #faf5ff; border-left-color: #9333ea; }
.wksd-chat-item img { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; }
.wksd-chat-item-body { flex: 1; min-width: 0; }
.wksd-chat-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wksd-chat-item-top h4 { font-size: 0.875rem; font-weight: 600; margin: 0; color: #111827; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wksd-chat-item-top span { font-size: 0.75rem; color: #9ca3af; flex-shrink: 0; }
.wksd-chat-item-body p { font-size: 0.8125rem; color: #6b7280; margin: 2px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wksd-chat-item-order { display: flex; align-items: center; gap: 4px; font-size: 0.75rem; color: #9333ea; margin-top: 2px; }
.wksd-chat-unread { width: 22px; height: 22px; border-radius: 50%; background: #9333ea; color: #fff; font-size: 0.6875rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

.wksd-chat-window { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.wksd-chat-window.hide-mobile { display: none; }
@media (min-width: 768px) { .wksd-chat-window.hide-mobile { display: flex; } }

.wksd-chat-window-header { padding: 14px 16px; border-bottom: 1px solid #f3f4f6; display: flex; align-items: center; justify-content: space-between; }
.wksd-chat-window-header-left { display: flex; align-items: center; gap: 10px; }
.wksd-chat-window-header img { width: 38px; height: 38px; border-radius: 50%; }
.wksd-chat-window-header h3 { font-size: 0.9375rem; font-weight: 700; margin: 0; }
.wksd-chat-back { display: none; background: none; border: none; font-size: 1.1rem; cursor: pointer; color: #4b5563; }

.wksd-chat-messages { flex: 1; overflow-y: auto; padding: 16px; background: #f9fafb; display: flex; flex-direction: column; gap: 12px; }
.wksd-chat-bubble-row { display: flex; }
.wksd-chat-bubble-row.seller { justify-content: flex-end; }
.wksd-chat-bubble { max-width: 75%; padding: 10px 14px; border-radius: 16px; font-size: 0.875rem; }
.wksd-chat-bubble-row.buyer .wksd-chat-bubble { background: #fff; border: 1px solid #e5e7eb; border-bottom-left-radius: 4px; color: #111827; }
.wksd-chat-bubble-row.seller .wksd-chat-bubble { background: linear-gradient(90deg, #9333ea, #2563eb); color: #fff; border-bottom-right-radius: 4px; }
.wksd-chat-bubble span { display: block; font-size: 0.6875rem; margin-top: 4px; opacity: 0.75; }

.wksd-chat-input-row { padding: 14px 16px; border-top: 1px solid #f3f4f6; display: flex; align-items: flex-end; gap: 10px; background: #fff; }
.wksd-chat-input-row textarea { flex: 1; border: 1px solid #e5e7eb; border-radius: 12px; padding: 10px 14px; resize: none; font-size: 0.875rem; outline: none; font-family: var(--wk-font, 'Inter', sans-serif); }
.wksd-chat-input-row textarea:focus { border-color: #a855f7; }
.wksd-chat-send-btn { width: 42px; height: 42px; border-radius: 12px; border: none; background: linear-gradient(90deg, #9333ea, #2563eb); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.wksd-chat-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Dark theme (AI Optimizer) ---------- */
.wksd-main-inner { overflow-x: hidden; }
.wksd-dark { background: #0a0a0f; border-radius: 20px; padding: 24px; margin: -24px; max-width: calc(100% + 48px); overflow-x: hidden; }
@media (min-width: 992px) { .wksd-dark { margin: -32px; padding: 32px; max-width: calc(100% + 64px); } }
.wksd-dark-card { background: #111113; border: 1px solid #27272a; border-radius: 16px; padding: 24px; min-width: 0; }
.wksd-dark h1, .wksd-dark h2 { color: #fff; }
.wksd-dark p { color: #9ca3af; }
.wksd-dark img { max-width: 100%; }

/* ---------- Misc helpers ---------- */
.wksd-flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.wksd-gap-6 { gap: 24px; }
.wksd-stack { display: flex; flex-direction: column; gap: 24px; }
.wksd-stack-sm { display: flex; flex-direction: column; gap: 12px; }
.wksd-muted { color: #6b7280; }
.wksd-text-sm { font-size: 0.875rem; }
.wksd-text-xs { font-size: 0.75rem; }
.wksd-fw-600 { font-weight: 600; }
.wksd-fw-800 { font-weight: 800; }
.wksd-mb-0 { margin-bottom: 0 !important; }

.wksd-timeline { display: flex; align-items: center; justify-content: space-between; padding: 0 12px; margin: 20px 0; }
.wksd-timeline-step { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.wksd-timeline-circle { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #d1d5db; color: #fff; }
.wksd-timeline-circle.done { background: #22c55e; }
.wksd-timeline-step span { font-size: 0.75rem; color: #6b7280; }
.wksd-timeline-line { flex: 1; height: 3px; background: #d1d5db; margin: 0 8px; }
.wksd-timeline-line.done { background: #22c55e; }

/* ---------- Vertical timeline (Order Details) ---------- */
.wksd-vtimeline { display: flex; flex-direction: column; }
.wksd-vtimeline-item { display: flex; gap: 14px; }
.wksd-vtimeline-track { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.wksd-vtimeline-icon { width: 32px; height: 32px; border-radius: 50%; background: #e5e7eb; color: #9ca3af; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.wksd-vtimeline-icon.done { background: #22c55e; color: #fff; }
.wksd-vtimeline-line { width: 2px; flex: 1; min-height: 22px; background: #e5e7eb; }
.wksd-vtimeline-line.done { background: #22c55e; }
.wksd-vtimeline-content { padding-bottom: 22px; flex: 1; min-width: 0; }
.wksd-vtimeline-item:last-child .wksd-vtimeline-content { padding-bottom: 0; }
.wksd-vtimeline-content h4 { margin: 0 0 2px; font-size: 0.875rem; font-weight: 600; color: #111827; }
.wksd-vtimeline-content h4.pending-text { color: #9ca3af; font-weight: 500; }
.wksd-vtimeline-content p { margin: 0; font-size: 0.75rem; color: #6b7280; }

/* ---------- Order details summary rows ---------- */
.wksd-summary-row { display: flex; align-items: center; justify-content: space-between; font-size: 0.875rem; color: #4b5563; padding: 6px 0; }
.wksd-summary-row.total { border-top: 1px solid #e5e7eb; margin-top: 6px; padding-top: 14px; font-size: 1rem; font-weight: 800; color: #111827; }
.wksd-order-line { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid #f3f4f6; }
.wksd-order-line:last-child { border-bottom: none; }
.wksd-order-line img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.wksd-order-line-body { flex: 1; min-width: 0; }
.wksd-order-line-body h4 { margin: 0; font-size: 0.9375rem; font-weight: 600; color: #111827; }
.wksd-order-line-body p { margin: 2px 0 0; font-size: 0.8125rem; color: #6b7280; }
.wksd-order-line-price { text-align: right; flex-shrink: 0; }
.wksd-order-line-price p { margin: 0; font-weight: 700; color: #111827; }
.wksd-order-line-price span { font-size: 0.75rem; color: #9ca3af; }

.wksd-info-row { display: flex; align-items: flex-start; gap: 10px; font-size: 0.875rem; color: #374151; margin-bottom: 10px; }
.wksd-info-row:last-child { margin-bottom: 0; }
.wksd-info-row svg { color: #9ca3af; flex-shrink: 0; margin-top: 2px; }

.wksd-spin { animation: wksd-spin 0.8s linear infinite; }
@keyframes wksd-spin { to { transform: rotate(360deg); } }

.d-none { display: none !important; }

/* ---------- Modal & Toggle Switch Styles ---------- */
.wksd-modal-backdrop.show { animation: wksdFadeIn 0.2s ease-out; }
@keyframes wksdFadeIn { from { opacity: 0; } to { opacity: 1; } }

.wksd-toggle-cb:checked + .wksd-toggle-slider { background: #10b981 !important; }
.wksd-toggle-cb:checked + .wksd-toggle-slider::before { transform: translateX(16px); }
.wksd-toggle-slider::before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
