﻿/* â”€â”€ VendeDO Dashboard / Admin shared styles â”€â”€ */

/* Layout â€” true split-pane: only main scrolls, sidebar is fixed */
.dash-page {
  background: #F1F5F9;
  height: 100vh;
  overflow: hidden;
}
.dash-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.dash-sidebar {
  background: var(--dark); color: #fff;
  display: flex; flex-direction: column;
  height: 100vh; overflow-y: auto;
  /* Custom scrollbar so it blends with dark bg */
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.15) transparent;
}
.dash-sidebar::-webkit-scrollbar { width: 4px; }
.dash-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 4px; }
.dash-sidebar-header { padding: 24px 20px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.dash-sidebar-header img { height: 36px; border-radius: 6px; margin-bottom: 14px; display: block; }

/* Admin-style user chip */
.dash-user-chip { display: flex; align-items: center; gap: 10px; }
.dash-user-av {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); display: flex; align-items: center;
  justify-content: center; font-size: .9rem; font-weight: 800; flex-shrink: 0;
}
.dash-user-nm { font-size: .88rem; font-weight: 700; color: #fff; }
.dash-user-rl { font-size: .72rem; color: rgba(255,255,255,.5); margin-top: 2px; }

/* Agent dashboard user block */
.dash-user-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; margin: 0 auto 10px; flex-shrink: 0;
}
.dash-user-name { font-size: .95rem; font-weight: 700; color: #fff; text-align: center; }
.dash-user-role { font-size: .75rem; color: rgba(255,255,255,.5); text-align: center; margin-top: 2px; }

/* Nav */
.dash-nav { padding: 12px 0; flex: 1; }
.dash-nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px; font-size: .87rem; color: rgba(255,255,255,.65);
  cursor: pointer; transition: all .15s; text-decoration: none;
  border-left: 3px solid transparent;
}
.dash-nav-link:hover  { background: rgba(255,255,255,.06); color: #fff; }
.dash-nav-link.active { background: rgba(255,255,255,.1); color: #fff; border-left-color: #64B5F6; }
.dash-nav-link i { width: 16px; text-align: center; flex-shrink: 0; }
.dash-nav-divider { height: 1px; background: rgba(255,255,255,.08); margin: 8px 20px; }
.nav-badge {
  margin-left: auto; background: var(--accent); color: #fff;
  border-radius: 10px; padding: 1px 7px; font-size: .68rem; font-weight: 800;
}
.nav-badge.green { background: #1F7A3A; }

/* Main area â€” scrolls independently */
.dash-main {
  padding: 28px 32px;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--gray-300) transparent;
}
.dash-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.dash-title { font-size: 1.4rem; font-weight: 800; color: var(--dark); }
.dash-sub   { font-size: .85rem; color: var(--gray-500); margin-top: 2px; }

/* Stat cards */
.dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.dash-stat-card {
  background: #fff; border-radius: var(--radius-md); padding: 18px 20px;
  border: 1px solid var(--gray-200); display: flex; align-items: center; gap: 14px;
}
/* Admin-style stat card inner */
.stat-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0;
}
.stat-num { font-size: 1.6rem; font-weight: 800; color: var(--dark); line-height: 1; }
.stat-lbl { font-size: .75rem; color: var(--gray-500); margin-top: 3px; }
/* Agent dashboard stat card inner */
.dash-stat-card .icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0;
}
.dash-stat-card .num { font-size: 1.6rem; font-weight: 800; color: var(--dark); line-height: 1; }
.dash-stat-card .lbl { font-size: .75rem; color: var(--gray-500); margin-top: 3px; }

/* Shared color variants */
.ic-amber, .icon-amber { background: #FEF3C7; color: #D97706; }
.ic-green, .icon-green { background: #D6F0DD; color: #1F7A3A; }
.ic-blue,  .icon-blue  { background: var(--primary-light); color: var(--primary); }
.ic-red,   .icon-red   { background: #FEE2E2; color: #DC2626; }
.ic-purple               { background: #F3E8FF; color: #7C3AED; }

/* Tabs */
.dash-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--gray-200); margin-bottom: 20px; flex-wrap: wrap; }
.dash-tab {
  padding: 10px 16px; font-size: .85rem; font-weight: 600; color: var(--gray-500);
  border: none; background: none; cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -2px; display: flex; align-items: center; gap: 6px; white-space: nowrap;
}
.dash-tab:hover { color: var(--dark); }
.dash-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-pill { background: var(--accent); color: #fff; border-radius: 10px; padding: 1px 6px; font-size: .65rem; font-weight: 800; }
.tab-pill.green { background: #1F7A3A; }
.dash-panel { display: none; }
.dash-panel.active { display: block; }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--gray-200); font-size: .84rem; }
.data-table thead th {
  background: #F8FAFC; padding: 11px 14px; text-align: left;
  font-size: .75rem; font-weight: 700; color: var(--gray-500);
  text-transform: uppercase; letter-spacing: .4px; border-bottom: 1px solid var(--gray-200);
}
.data-table tbody tr { border-bottom: 1px solid var(--gray-100); transition: background .1s; }
.data-table tbody tr:hover { background: #FAFAFA; }
.data-table tbody tr:last-child { border-bottom: none; }
.data-table td { padding: 11px 14px; color: var(--gray-700); vertical-align: middle; }
.table-img { width: 56px; height: 42px; object-fit: cover; border-radius: 4px; }
.table-title { font-weight: 600; color: var(--dark); font-size: .85rem; }
.table-sub   { font-size: .72rem; color: var(--gray-400); margin-top: 2px; }
.table-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* Status badges â€” admin sbadge style */
.sbadge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 12px; font-size: .72rem; font-weight: 700;
}
.sb-pending  { background: #FEF3C7; color: #92400E; }
.sb-approved { background: #D6F0DD; color: #1F7A3A; }
.sb-rejected { background: #FEE2E2; color: #DC2626; }
.sb-upgrade  { background: #F3E8FF; color: #7C3AED; }
.sb-featured { background: #FEF9C3; color: #713F12; }

/* Status badges â€” agent dashboard style */
.status-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 12px; font-size: .72rem; font-weight: 700;
}
.status-pending  { background: #FEF3C7; color: #92400E; }
.status-approved { background: #D6F0DD; color: #1F7A3A; }
.status-rejected { background: #FEE2E2; color: #DC2626; }

/* Filter bar */
.filter-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-bar input[type="text"] {
  flex: 1; min-width: 200px; padding: 9px 14px;
  border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm);
  font-size: .87rem; outline: none;
}
.filter-bar input[type="text"]:focus { border-color: var(--primary); }
.filter-btn {
  padding: 8px 14px; border-radius: var(--radius-sm); font-size: .82rem;
  font-weight: 600; cursor: pointer; border: 1.5px solid var(--gray-200);
  background: #fff; color: var(--gray-600); transition: all .15s;
}
.filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.filter-btn:hover:not(.active) { border-color: var(--primary); color: var(--primary); }

/* Agent request cards */
.request-card { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-md); margin-bottom: 14px; overflow: hidden; }
.request-card-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; gap: 16px; flex-wrap: wrap; }
.request-card-info { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.req-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #fff; font-size: .88rem; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.req-name  { font-size: .95rem; font-weight: 700; color: var(--dark); }
.req-email { font-size: .8rem; color: var(--gray-500); margin-top: 2px; }
.request-card-body { padding: 0 20px 18px; border-top: 1px solid var(--gray-100); }
.req-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 14px 0; }
.req-field label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--gray-400); display: block; margin-bottom: 2px; }
.req-field span  { font-size: .87rem; color: var(--dark); font-weight: 500; }
.req-bio { font-size: .85rem; color: var(--gray-600); line-height: 1.65; font-style: italic; margin: 10px 0; background: var(--gray-100); padding: 10px 14px; border-radius: var(--radius-sm); }
.request-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 20px 16px; }

/* Timeline */
.timeline { padding: 14px 0; }
.timeline-item { display: flex; gap: 12px; align-items: flex-start; padding: 6px 0; position: relative; }
.timeline-item + .timeline-item::before { content: ''; position: absolute; left: 9px; top: -8px; width: 2px; height: 16px; background: var(--gray-200); }
.tl-dot { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: .6rem; margin-top: 1px; }
.tl-dot.submitted { background: #E0E7FF; color: #4338CA; }
.tl-dot.approved  { background: #D6F0DD; color: #1F7A3A; }
.tl-dot.denied    { background: #FEE2E2; color: #DC2626; }
.tl-dot.pending   { background: #FEF3C7; color: #D97706; }
.tl-label { font-size: .82rem; font-weight: 600; color: var(--dark); }
.tl-date  { font-size: .74rem; color: var(--gray-400); margin-top: 1px; }
.tl-note  { font-size: .78rem; color: var(--gray-500); margin-top: 2px; font-style: italic; }

/* Side panel (edit listing / agent detail) */
.side-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 2000; opacity: 0; pointer-events: none; transition: opacity .2s; }
.side-overlay.open { opacity: 1; pointer-events: auto; }
.side-panel {
  position: fixed; top: 0; right: 0; width: 520px; max-width: 100%; height: 100vh;
  background: #fff; z-index: 2001; box-shadow: -8px 0 40px rgba(0,0,0,.15);
  transform: translateX(100%); transition: transform .25s ease;
  display: flex; flex-direction: column; overflow: hidden;
}
.side-panel.open { transform: translateX(0); }
.side-panel-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid var(--gray-200); background: var(--dark); color: #fff; }
.side-panel-header h3 { font-size: 1rem; font-weight: 800; margin: 0; }
.side-panel-close { background: rgba(255,255,255,.12); border: none; color: #fff; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: .9rem; display: flex; align-items: center; justify-content: center; }
.side-panel-body { flex: 1; overflow-y: auto; padding: 24px; }
.side-panel-footer { padding: 16px 24px; border-top: 1px solid var(--gray-200); display: flex; gap: 10px; background: #F8FAFC; }
.sp-group { margin-bottom: 16px; }
.sp-group label { font-size: .78rem; font-weight: 700; color: var(--gray-500); display: block; margin-bottom: 5px; text-transform: uppercase; letter-spacing: .4px; }
.sp-group input, .sp-group textarea, .sp-group select { width: 100%; padding: 9px 12px; border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm); font-size: .88rem; font-family: inherit; outline: none; transition: border .15s; }
.sp-group input:focus, .sp-group textarea:focus, .sp-group select:focus { border-color: var(--primary); }
.sp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sp-section-title { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--gray-400); margin: 20px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--gray-200); }

/* Agent detail panel */
.agent-detail-header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.agent-detail-av { width: 56px; height: 56px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 1.1rem; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.agent-listing-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--gray-100); font-size: .84rem; }
.agent-listing-row:last-child { border-bottom: none; }
.agent-listing-thumb { width: 48px; height: 36px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }

/* Empty state */
.empty-state { text-align: center; padding: 56px 24px; color: var(--gray-400); }
.empty-state i { font-size: 2.5rem; display: block; margin-bottom: 14px; }
.empty-state h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; color: var(--gray-500); }
.empty-state p  { font-size: .85rem; }

/* Activity log */
.log-item { display: flex; align-items: flex-start; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--gray-100); }
.log-item:last-child { border-bottom: none; }
.log-icon { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .8rem; flex-shrink: 0; margin-top: 1px; }
.log-text  { font-size: .87rem; color: var(--dark); font-weight: 500; }
.log-meta  { font-size: .75rem; color: var(--gray-400); margin-top: 2px; }

/* Create agent form */
.create-agent-wrap { max-width: 640px; background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 28px; }

/* Responsive â€” restore normal scrolling on mobile */
@media (max-width: 960px) {
  .dash-page   { height: auto; overflow: visible; }
  .dash-layout { grid-template-columns: 1fr; height: auto; overflow: visible; }
  .dash-sidebar { height: auto; overflow-y: visible; }
  .dash-main   { height: auto; overflow-y: visible; }
  .dash-stats  { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .dash-main { padding: 16px; }
  .dash-stats { grid-template-columns: 1fr 1fr; }
  .side-panel { width: 100%; }
}

