/* ============================================================
   VENDOR DASHBOARD — Dashboard Layout & Components
   Extracted from vendor-dashboard.html (S1 fix)
   Uses site tokens from variables.css
   ============================================================ */

/* ── Dashboard design tokens (override) ── */
:root {
  --sidebar-w:   240px;
  --topbar-h:    64px;
}

/* ── Dashboard layout ── */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.dashboard-sidebar {
  width: var(--sidebar-w);
  background: var(--color-charcoal);
  color: var(--color-white);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-header {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.sidebar-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-white);
  text-decoration: none;
  display: block;
  letter-spacing: .04em;
}

.sidebar-vendor-name {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-vendor-name span {
  font-size: .85rem;
  font-weight: 500;
  color: rgba(255,255,255,.9);
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent);
  border-radius: 50%;
  width: 16px; height: 16px;
  flex-shrink: 0;
}

.verified-badge i { width: 10px; height: 10px; color: #fff; }

/* Sidebar nav */
.sidebar-nav {
  list-style: none;
  padding: 16px 0;
  flex: 1;
}

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  text-decoration: none;
  color: rgba(255,255,255,.65);
  font-size: .875rem;
  font-weight: 400;
  border-left: 3px solid transparent;
  transition: color .15s, background .15s, border-color .15s;
}

.sidebar-nav li a:hover {
  color: var(--color-white);
  background: rgba(255,255,255,.06);
}

.sidebar-nav li.active a {
  color: var(--color-accent);
  border-left-color: var(--color-accent);
  background: rgba(201,168,124,.08);
  font-weight: 500;
}

.sidebar-nav li a i { width: 18px; height: 18px; flex-shrink: 0; }

.nav-badge {
  margin-left: auto;
  background: var(--color-accent);
  color: var(--color-charcoal);
  font-size: .7rem;
  font-weight: 700;
  border-radius: 10px;
  padding: 2px 6px;
  line-height: 1.2;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-footer a {
  color: rgba(255,255,255,.7);
  text-decoration: none;
  font-size: .8rem;
  transition: color .15s;
}

.sidebar-footer a:hover { color: var(--color-white); }

.sidebar-footer__link-icon {
  width: 13px;
  height: 13px;
  display: inline;
  vertical-align: middle;
  margin-right: 4px;
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.7);
  font-family: 'DM Sans', sans-serif;
  font-size: .8rem;
  padding: 8px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .15s, color .15s;
  width: 100%;
}

.btn-logout:hover { background: rgba(255,255,255,.14); color: var(--color-white); }
.btn-logout i { width: 15px; height: 15px; }

/* ── Main content ── */
.dashboard-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Top bar ── */
.dashboard-topbar {
  height: var(--topbar-h);
  background: var(--color-white);
  border-bottom: 1px solid rgba(0,0,0,.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-charcoal);
}

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

.notif-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-mid-grey);
  padding: 6px;
  border-radius: var(--radius);
  transition: background .15s;
}

.notif-btn:hover { background: var(--color-champagne); }
.notif-btn i { width: 22px; height: 22px; display: block; }

.notif-badge {
  position: absolute;
  top: 2px; right: 2px;
  background: #E53E3E;
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  border-radius: 50%;
  width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center;
}

.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--color-blush);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  font-size: .85rem;
  color: var(--color-charcoal);
  cursor: pointer;
}

/* ── Content area ── */
.dashboard-content {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  flex: 1;
}

/* ── Stats row ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.stat-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--color-champagne);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.stat-icon i { width: 20px; height: 20px; color: var(--color-accent); }

.stat-trend {
  font-size: .75rem;
  font-weight: 600;
  color: #38A169;
  background: #F0FFF4;
  padding: 3px 7px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.stat-trend i { width: 12px; height: 12px; }

.stat-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--color-charcoal);
  line-height: 1.1;
  margin-top: 10px;
}

.stat-label {
  font-size: .8rem;
  color: var(--color-mid-grey);
  font-weight: 400;
}

.stat-subtext {
  font-size: .75rem;
  color: var(--color-mid-grey);
  margin-top: 4px;
}

/* ── Quick actions ── */
.quick-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Bookings table ── */
.section-card {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.section-card-header {
  padding: 18px 22px 14px;
  border-bottom: 1px solid rgba(0,0,0,.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-card-header h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 600;
}

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

.bookings-table th {
  text-align: left;
  font-size: .75rem;
  font-weight: 600;
  color: var(--color-mid-grey);
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 10px 22px;
  background: var(--color-champagne);
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.bookings-table td {
  padding: 14px 22px;
  font-size: .875rem;
  border-bottom: 1px solid rgba(0,0,0,.05);
  vertical-align: middle;
}

.bookings-table tr:last-child td { border-bottom: none; }
.bookings-table tr:hover td { background: rgba(245,239,230,.4); }

.couple-name { font-weight: 500; }
.event-date { color: var(--color-mid-grey); font-size: .825rem; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
}

.status-confirmed  { background: #F0FFF4; color: #38A169; }
.status-pending    { background: #FFFBEB; color: #D97706; }
.status-cancelled  { background: #FFF5F5; color: #E53E3E; }

.table-actions {
  display: flex;
  gap: 8px;
}

.table-actions a {
  font-size: .8rem;
  font-weight: 500;
  color: var(--color-accent);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background .15s;
}

.table-actions a:hover { background: rgba(201,168,124,.12); }

/* ── Chart container ── */
.chart-container {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
}

.chart-container h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 18px;
}

#views-chart {
  width: 100%;
  max-width: 500px;
  height: 200px;
  display: block;
}

.chart-legend {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: .78rem;
  color: var(--color-mid-grey);
}

.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* ── Reviews ── */
.recent-reviews {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
}

.recent-reviews h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 16px;
}

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

.review-card {
  background: var(--color-champagne);
  border-radius: var(--radius);
  padding: 16px;
}

.review-stars {
  color: var(--color-accent);
  font-size: 1rem;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.review-author {
  font-weight: 600;
  font-size: .875rem;
  margin-bottom: 6px;
}

.review-text {
  font-size: .8rem;
  color: var(--color-mid-grey);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Listing cards ── */
.listing-cards {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
}

.listing-cards h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.listings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.listing-item {
  border: 1px solid rgba(0,0,0,.08);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  gap: 0;
}

.listing-thumb {
  width: 80px;
  background: var(--color-blush);
  flex-shrink: 0;
}

.listing-info {
  padding: 14px 16px;
  flex: 1;
}

.listing-name {
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: 4px;
}

.listing-published {
  font-size: .75rem;
  color: #38A169;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}

.listing-meta {
  display: flex;
  gap: 14px;
  font-size: .78rem;
  color: var(--color-mid-grey);
  margin-bottom: 10px;
}

.listing-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.listing-meta i { width: 13px; height: 13px; }

.btn-sm {
  padding: 6px 14px;
  font-size: .8rem;
}

/* ── Footer ── */
.dashboard-footer {
  text-align: center;
  padding: 16px;
  font-size: .78rem;
  color: var(--color-mid-grey);
  border-top: 1px solid rgba(0,0,0,.06);
  background: var(--color-white);
}

/* ── Profile completion banner ── */
.profile-completion-banner {
  background: linear-gradient(135deg, var(--color-champagne) 0%, #fff 100%);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.profile-banner-content {
  flex: 1;
  min-width: 240px;
}

.profile-banner-content h3 {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  margin-bottom: 6px;
}

.profile-banner-content p {
  color: var(--color-mid-grey);
  font-size: var(--text-sm);
  line-height: 1.6;
  margin-bottom: 16px;
}

.profile-banner-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.profile-banner-track {
  flex: 1;
  height: 8px;
  background: var(--color-border, rgba(0,0,0,.08));
  border-radius: 4px;
  overflow: hidden;
}

.profile-banner-fill {
  height: 100%;
  background: var(--color-accent);
  border-radius: 4px;
  transition: width .4s ease;
}

.profile-banner-pct {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-accent);
}

.profile-banner-hint {
  font-size: var(--text-xs);
  color: var(--color-mid-grey);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .reviews-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .dashboard-sidebar { transform: translateX(-100%); }
  .dashboard-main { margin-left: 0; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .listings-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   FROM-INLINE: blocks migrated from vendor-dashboard.html <style>.
   Tokens normalised to css/variables.css.
   ============================================================ */

/* ── Page-local radius + shadow tokens (referenced by .btn etc.) ── */
:root {
  --radius:    var(--r-md);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.10);
}

/* ── Quick action buttons (page-local — not in components.css) ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .875rem;
  font-weight: var(--fw-medium);
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}

.btn i {
  width: var(--space-4);
  height: var(--space-4);
  flex-shrink: 0;
}

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

.btn-primary:hover {
  background: #b8966a;
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  background: var(--color-white);
  color: var(--color-charcoal);
  border: 1px solid rgba(0,0,0,.12);
}

.btn-secondary:hover {
  background: var(--color-champagne);
}
