/* vendor-dashboard.unified.css */

/* =========================
   Base / Section
========================= */
/* .vd-section {
  padding: 0;
}

.vd-container {
  width: 100%;
} */

.vd-account {
  padding: 40px 20px;
  background-color: #f9f9f9;
  /* font-family: "Segoe UI", Tahoma, Arial, sans-serif; */
}

.vd-layout {
  align-items: flex-start;
}

/* =========================
   Sidebar
========================= */
.vd-sidebar {
  position: sticky;
  top: 90px;
  align-self: flex-start;
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  height: fit-content;
}

.vd-navlink {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 15px;
  margin-bottom: 8px;
  color: #444;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.vd-navlink i {
  font-size: 16px;
}

.vd-sidebar .nav-link.active,
.vd-sidebar .nav-link:hover {
  background: linear-gradient(45deg, var(--main-color), var(--secondary-color));
  color: #fff;
}

/* logout icon direction */
html[dir="ltr"] #logout-btn i {
  transform: rotate(180deg);
}

html[dir="rtl"] #logout-btn i {
  transform: rotate(0deg);
}

/* =========================
   Panel / Tab Content
========================= */
.vd-panel {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* tab transitions (scope inside my-account to keep bootstrap behavior) */
.my-account .tab-pane {
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.3s ease-in-out;
}

.my-account .tab-pane.active.show {
  opacity: 1;
  transform: translateX(0);
}

html[dir="rtl"] .my-account .tab-pane {
  transform: translateX(-30px);
}

/* =========================
   Header blocks
========================= */


.vd-header {
  background: #ffffff;
  padding: 22px 28px;
  border-radius: 16px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
  margin-bottom: 25px;
  border-left: 5px solid #0d6efd; /* Bootstrap primary */
  transition: 0.3s ease;
}

.vd-header:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.vd-title {
  font-size: 18px !important;
  font-weight: 700;
  color: #1e293b; /* dark slate */
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

.vd-subtitle {
  font-size: 16px !important;
  color: #64748b; /* soft gray */
  margin: 0;
  font-weight: 500;
}

/* RTL support */
html[dir="rtl"] .vd-header {
  border-left: none;
  border-right: 5px solid #0d6efd;
}


.vd-block {
  margin-bottom: 18px;
}

.vd-block-title {
  font-size: 16px;
  margin-bottom: 10px;
  color: #333;
  font-weight: 500;
}

/* =========================
   Unified Card System
========================= */
.vd-card {
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  padding: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vd-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
}

.vd-surface {
  background: linear-gradient(135deg, #ffffff, #f8fafc);
}

/* KPI grid (used in Products/Offers/Orders/Accounts/Statistics/Sales) */
.vd-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.vd-kpi-card {
  text-align: center;
  white-space: nowrap;
}

.vd-kpi-label {
  font-size: 0.9rem;
  color: #6c757d;
  margin-bottom: 6px;
  font-weight: 600;
}

.vd-kpi-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
}

/* Optional variants for stats */
.vd-kpi-success {
  border-color: rgba(16, 185, 129, 0.35);
}

.vd-kpi-revenue {
  border-color: rgba(25, 135, 84, 0.25);
}

.vd-kpi-orders {
  border-color: rgba(13, 110, 253, 0.25);
}

.vd-kpi-customers {
  border-color: rgba(253, 126, 20, 0.25);
}

/* Charts cards */
.vd-chart-card .vd-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #212529;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.vd-chart-card .vd-card-title::before {
  content: "📊";
  font-size: 1rem;
}

.vd-chart {
  max-height: 350px;
}

/* =========================
   Forms / Inputs (soft unify)
========================= */
.vd-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: #0f172a;
  margin-bottom: 6px;
}

.vd-input {
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  padding: 10px 12px;
  font-size: 0.95rem;
  box-shadow: none;
}

.vd-input:focus {
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

/* Buttons */
.vd-btn {
  border-radius: 12px;
  font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.vd-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(2, 6, 23, 0.08);
}

/* Helper text */
.vd-muted {
  color: var(--danger-color);
  font-size: 0.85rem;
  font-weight: 600;
}

/* Password eye */
.vd-toggle-password {
  position: absolute;
  top: 35%;
  transform: translateY(-50%);
  cursor: pointer;
  user-select: none;
  font-size: 1.1rem;
}

html[dir="ltr"] .vd-toggle-password {
  right: 10px;
  left: auto;
}

html[dir="rtl"] .vd-toggle-password {
  left: 10px;
  right: auto;
}

/* Switches (reuses your markup) */
.vd-switches {
  display: flex;
}

.vd-switches label {
  display: flex;
  gap: 12px;
  align-items: center;
  border-radius: 10px;
  margin-inline-end: 1rem;
  font-size: 0.95rem;
}

/* =========================
   Unified Tables
========================= */
.vd-table-wrap {
  margin-top: 20px;
  border-radius: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.06);
  background: #fff;
  -webkit-overflow-scrolling: touch;
}

.vd-table {
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.vd-table th,
.vd-table td {
  white-space: nowrap;
  text-align: center;
  vertical-align: middle;
}

.vd-thead th {
  background: linear-gradient(90deg, #0f172a, #1f2937);
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 12px 10px;
  border: 0;
  position: sticky;
  top: 0;
  z-index: 2;
}

.vd-table tbody td {
  padding: 12px 10px;
  font-size: 0.92rem;
  color: #0f172a;
  border-top: 1px solid #eef2f7;
}

.vd-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.06);
}

/* =========================
   Unified Image Upload
========================= */
.vd-image-upload {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.vd-image-preview {
  position: relative;
  width: 180px;
  height: 180px;
  border: 2px dashed #ccc;
  border-radius: 10px;
  overflow: hidden;
  background-color: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vd-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.vd-image-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Upload button (same logic RTL/LTR as you had) */
.vd-upload-btn {
  position: absolute;
  bottom: 8px;
  padding: 0 !important;
  width: 40px !important;
  height: 40px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  cursor: pointer;
  z-index: 5;
  transition: 0.2s;
  backdrop-filter: blur(5px);
  color: #fff;
}

html[lang="en"] .vd-upload-btn {
  left: 8px;
}

html[lang="ar"] .vd-upload-btn {
  right: 8px;
}

.vd-upload-btn i {
  font-size: 18px;
}

.vd-upload-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

/* =========================
   Direction (text align)
========================= */
html[dir="ltr"] .vd-panel {
  text-align: left;
}

html[dir="rtl"] .vd-panel {
  text-align: right;
}

/* =========================
   Responsive
========================= */
@media (max-width: 991px) {
  .vd-sidebar {
    position: relative;
    top: auto;
  }

  .my-account .row {
    flex-direction: column;
  }

  .my-account .col-md-3,
  .my-account .col-md-9 {
    max-width: 100%;
    flex: 0 0 100%;
  }

  .vd-sidebar {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
    gap: 8px;
  }

  .vd-navlink {
    margin: 0;
    flex: 1 1 auto;
    text-align: center;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .vd-kpi-value {
    font-size: 1.35rem;
  }

  .vd-image-upload {
    flex-direction: column;
  }

  .vd-table {
    min-width: 900px;
    /* keeps scroll like employees tab */
  }
}

/* =========================================================
   JS-Generated UI (Employees / Tables / Mini Buttons / Selects)
   Appended to vendor-dashboard.unified.css
   ========================================================= */

/* -------- Employees table columns widths (no inline styles) -------- */
.vd-col {
  vertical-align: middle;
}

.vd-col-person {
  min-width: 220px;
  width: 220px;
  text-align: start;
}

.vd-col-role {
  width: 110px;
  min-width: 110px;
  width: 110px;
}

.vd-col-status {
  width: 110px;
  min-width: 110px;
  width: 110px;
}

.vd-col-active {
  min-width: 110px;
  width: 110px;
}

.vd-col-actions {
  width: 120px;
  min-width: 120px;
  width: 120px;
}

/* person cell typography */
.vd-person-email {
  font-weight: 700;
  color: #111827;
}

.vd-person-name {
  font-weight: 600;
  color: #374151;
}

.vd-person-mobile {
  color: #6b7280;
  font-size: 0.9rem;
}

/* Ensure RTL/LTR alignment for the first column */
html[dir="rtl"] .vd-col-person {
  text-align: right;
}

html[dir="ltr"] .vd-col-person {
  text-align: left;
}

/* -------- Unified select style (covers custom-select in employees rows) -------- */
.vd-select {
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  padding: 8px 10px;
  font-size: 0.95rem;
  box-shadow: none;
  background-color: #fff;
}

.vd-select:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

/* -------- Actions cell -------- */
.vd-actions {
  white-space: nowrap;
  text-align: center;
}

.vd-actions .btn {
  min-width: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* -------- Mini buttons (supports old .btn-mini too) -------- */
.vd-btn-mini,
.btn.btn-mini {
  padding: 6px 10px;
  font-size: 0.88rem;
  border-radius: 10px;
  line-height: 1.1;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.vd-btn-mini:hover:not([disabled]),
.btn.btn-mini:hover:not([disabled]) {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.10);
}

.vd-btn-mini[disabled],
.btn.btn-mini[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* -------- Employees table: force horizontal scroll on small screens -------- */
@media (max-width: 768px) {
  .vd-table {
    min-width: 900px;
  }

  .vd-thead th,
  .vd-table tbody td {
    font-size: 0.85rem;
    padding: 10px 8px;
  }

  .vd-actions .btn {
    min-width: 34px;
  }
}