/* Shared dashboard layout */
.dash-wrapper { display: flex; min-height: 100vh; }

/* Sidebar */
.dash-sidebar {
    width: 220px; min-width: 220px; background: #1a1a2e;
    color: #ccc; padding: 20px 0; flex-shrink: 0;
}
.dash-sidebar .brand {
  padding: 10px 20px 20px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Close button inside sidebar (mobile only) */
.sidebar-close {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.sidebar-close:hover { opacity: 1; }
@media (max-width: 1024px) {
  .sidebar-close { display: block; }
}
.dash-sidebar nav a {
    display: block; padding: 10px 20px; color: #bbb;
    text-decoration: none; font-size: 0.9rem; transition: background 0.2s;
}
.dash-sidebar nav a:hover, .dash-sidebar nav a.active { background: #16213e; color: #e94560; }
.dash-sidebar nav .nav-section {
    padding: 14px 20px 4px; font-size: 0.7rem; text-transform: uppercase;
    letter-spacing: 1px; color: #555;
}

/* Brand mark */
.dash-sidebar .brand::before {
  content: "🎉 ";
}

/* Sidebar open state (mobile/tablet overlay) */
.dash-sidebar.open {
  transform: translateX(0);
}

/* Hamburger toggle button */
.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #fff;
  padding: 4px 8px;
  line-height: 1;
}

/* Sidebar overlay backdrop */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}
.sidebar-overlay.active {
  display: block;
}

/* Main content */
.dash-main { flex: 1; background: #f4f6f9; padding: 24px; overflow-y: auto; }
.dash-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.dash-topbar h1 { font-size: 1.4rem; margin: 0; color: #1a1a2e; }
.dash-topbar .user-info { font-size: 0.85rem; color: #666; }

/* Stat cards */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
    background: #fff; border-radius: 8px; padding: 18px 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08); text-align: center;
}
.stat-card .stat-value { font-size: 2rem; font-weight: 700; color: #1a1a2e; }
.stat-card .stat-label { font-size: 0.78rem; color: #888; margin-top: 4px; }
.stat-card.warn .stat-value { color: #e67e22; }
.stat-card.danger .stat-value { color: #e94560; }
.stat-card.success .stat-value { color: #27ae60; }

/* Tables */
.dash-table-wrap { background: #fff; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.08); overflow: visible; margin-bottom: 24px; }
.dash-table-wrap .table-header { padding: 14px 18px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.dash-table-wrap .table-header h3 { margin: 0; font-size: 1rem; color: #1a1a2e; }
.dash-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.dash-table th { background: #f8f9fa; padding: 10px 14px; text-align: left; font-weight: 600; color: #555; border-bottom: 1px solid #eee; }
.dash-table td { padding: 10px 14px; border-bottom: 1px solid #f0f0f0; color: #333; vertical-align: middle; }
.dash-table tr:last-child td { border-bottom: none; }
.dash-table tr:hover td { background: #fafafa; }

/* Table scroll utility */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

/* Status badges */
.badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; }
.badge-pending { background: #fff3cd; color: #856404; }
.badge-approved { background: #d1e7dd; color: #0f5132; }
.badge-rejected { background: #f8d7da; color: #842029; }
.badge-completed { background: #cfe2ff; color: #084298; }
.badge-confirmed { background: #d1e7dd; color: #0f5132; }
.badge-in-progress { background: #fff3cd; color: #856404; }
.badge-cancelled { background: #e2e3e5; color: #41464b; }

/* Buttons */
.btn-dash { padding: 6px 14px; border-radius: 5px; border: none; cursor: pointer; font-size: 0.82rem; font-weight: 600; text-decoration: none; display: inline-block; }
.btn-approve { background: #27ae60; color: #fff; }
.btn-reject  { background: #e94560; color: #fff; }
.btn-view    { background: #3498db; color: #fff; }
.btn-purple  { background: #8e44ad; color: #fff; }
.btn-orange  { background: #e67e22; color: #fff; }
.btn-dash:hover { opacity: 0.88; }

/* Quick-action button colour modifiers */
.btn-purple {
  background: #8e44ad;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: opacity 0.2s;
}
.btn-purple:hover { opacity: 0.85; }
.btn-orange {
  background: #e67e22;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: opacity 0.2s;
}
.btn-orange:hover { opacity: 0.85; }

/* Filter bar */
.filter-bar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.filter-bar a { padding: 5px 14px; border-radius: 20px; font-size: 0.8rem; text-decoration: none; background: #eee; color: #333; transition: background 0.2s, color 0.2s; }
.filter-bar a.active { background: #1a1a2e; color: #fff; border: 2px solid currentColor; }

/* Approve form */
.approve-card { background: #fff; border-radius: 8px; padding: 28px; max-width: 560px; box-shadow: 0 1px 4px rgba(0,0,0,.1); margin: 0 auto; }
.approve-card h2 { margin-top: 0; color: #1a1a2e; }
.approve-card .meta { font-size: 0.85rem; color: #666; margin-bottom: 20px; line-height: 1.8; }
.approve-card textarea { width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 5px; font-size: 0.875rem; resize: vertical; }
.approve-actions { display: flex; gap: 10px; margin-top: 16px; }

/* Message banners */
.msg-success {
  padding: 10px 14px;
  margin-bottom: 12px;
  border-radius: 6px;
  background: #d1e7dd;
  color: #0f5132;
  border-left: 4px solid #0f5132;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.msg-error {
  padding: 10px 14px;
  margin-bottom: 12px;
  border-radius: 6px;
  background: #f8d7da;
  color: #842029;
  border-left: 4px solid #842029;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.msg-dismiss {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: inherit;
  opacity: 0.7;
  padding: 0 4px;
}
.msg-dismiss:hover { opacity: 1; }

/* Vendor dashboard chart grid */
.dash-chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

/* Quote detail grid */
.quote-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

/* Quote card */
.quote-card {
  background: #fff;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 20px;
}

/* Form section wrapper */
.form-section {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
}

/* Vendor hero image */
.vendor-hero-img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
}

/* Status select */
.status-select {
  font-size: 0.8rem;
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid #ddd;
  transition: opacity 0.2s;
}
.status-select:disabled {
  opacity: 0.6;
}

/* Control buttons */
.control-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Text muted utility */
.text-muted {
  color: #777;
  font-size: 0.875rem;
}

/* Tablet breakpoint */
@media (max-width: 1024px) {
  .hamburger { display: block; }
  .dash-sidebar {
    transform: translateX(-100%);
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    z-index: 100;
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
  }
  .dash-sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.35);
  }
  .dash-wrapper { display: block; }
  .dash-main { margin-left: 0; width: 100%; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .dash-chart-grid { grid-template-columns: 1fr; }
}

/* Mobile */
@media (max-width: 768px) {
  .hamburger { display: block; }
  .dash-sidebar {
    transform: translateX(-100%);
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    z-index: 100;
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
    width: 260px;
    min-width: 260px;
  }
  .dash-sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.35);
  }
  .dash-wrapper { display: block; }
  .dash-main { margin-left: 0; padding: 12px; width: 100%; }
  .stat-cards { grid-template-columns: repeat(1, 1fr); }
  .dash-chart-grid { grid-template-columns: 1fr; }
  .quote-detail-grid { grid-template-columns: 1fr; }
  .dash-topbar { padding: 8px 12px; }
}

/* Location card panels */
.loc-panel { background: #fff; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.08); padding: 20px; }
.loc-panel-header { font-size: 1rem; font-weight: 700; color: #1a1a2e; margin: 0 0 14px; }
.loc-panel-header .count { font-weight: 400; color: #888; font-size: 0.85rem; }
