/* ==========================================================================
   C2R REALTY - DASHBOARDS & WORKSPACE CSS
   Customer, Owner, Builder/Developer, Channel Partner, Agent, Admin
   ========================================================================== */

.dashboard-layout {
  display: flex;
  min-height: 0;
  min-width: 0;
  background-color: #C5D4E4;
}

/* Sidebar */
.dashboard-sidebar {
  width: 260px;
  background: var(--c2r-navy-primary);
  color: var(--c2r-white);
  padding: var(--space-6) 0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.dashboard-user-profile {
  padding: 0 var(--space-6) var(--space-6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.dashboard-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  background: var(--c2r-gold-metallic);
  color: var(--c2r-navy-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-base);
}

.dashboard-user-info {
  display: flex;
  flex-direction: column;
}

.dashboard-user-name {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--c2r-white);
}

.dashboard-user-role {
  font-size: 12px;
  color: var(--c2r-gold-champagne);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dashboard-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 var(--space-3);
  flex: 1;
}

.dashboard-nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  color: #F4F7FB;
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.dashboard-nav-item:hover,
.dashboard-nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--c2r-gold-champagne);
}

.dashboard-nav-item.active {
  background: var(--c2r-gold-metallic);
  color: var(--c2r-navy-primary);
  font-weight: 600;
}

.dashboard-nav-badge {
  margin-left: auto;
  font-size: 12px;
  padding: 2px 6px;
  background: var(--c2r-blue-royal);
  color: var(--c2r-white);
  border-radius: var(--radius-pill);
}

/* Main Dashboard Area */
.dashboard-main {
  flex: 1;
  min-width: 0;
  padding: var(--space-8);
  overflow-x: hidden;
  overflow-y: auto;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-8);
}

.dashboard-title {
  font-size: var(--text-3xl);
  color: var(--c2r-navy-primary);
}

.dashboard-subtitle {
  font-size: var(--text-sm);
  color: var(--c2r-text-secondary);
}

/* Metric / Stat Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

.stat-card {
  background: var(--c2r-white);
  border: 1px solid var(--c2r-border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
  text-decoration: none;
  color: inherit;
}

.stat-hint,
.buyer-empty {
  margin: 8px 0 0;
  color: #4A6480;
  font-size: 14px;
  line-height: 1.4;
}

.buyer-panel {
  padding: 14px 16px 16px;
}

.buyer-home-list {
  margin: 0;
  padding-left: 18px;
}

.buyer-home-list a {
  color: #163A5F;
  font-weight: 700;
  text-decoration: none;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.stat-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--c2r-text-muted);
  letter-spacing: 0.05em;
}

.stat-icon {
  font-size: 1.25rem;
  color: var(--c2r-gold-metallic);
}

.stat-value {
  font-size: var(--text-3xl);
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--c2r-navy-primary);
  line-height: 1.2;
}

.stat-growth {
  font-size: var(--text-xs);
  color: var(--c2r-success);
  margin-top: var(--space-2);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Data Tables */
.c2r-table-card {
  background: var(--c2r-white);
  border: 1px solid var(--c2r-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: var(--space-8);
}

.c2r-table-header {
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--c2r-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.c2r-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.c2r-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.c2r-table th {
  background: #F8FAFC;
  padding: 0.85rem 1rem;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--c2r-text-secondary);
  border-bottom: 1px solid var(--c2r-border);
  letter-spacing: 0.05em;
}

.c2r-table td {
  padding: 1rem;
  font-size: var(--text-sm);
  color: var(--c2r-text-primary);
  border-bottom: 1px solid var(--c2r-border-subtle);
  vertical-align: middle;
}

.c2r-table tr:hover td {
  background: #FAFBFC;
}

/* Pipeline Stages */
.pipeline-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  overflow-x: auto;
}

.pipeline-col {
  background: #EDF1F5;
  border-radius: var(--radius-md);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 240px;
}

.pipeline-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--c2r-navy-primary);
}

.pipeline-card {
  background: var(--c2r-white);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--c2r-gold-metallic);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Responsive Dashboard */
@media (max-width: 1024px) {
  .dashboard-layout {
    flex-direction: column;
  }
  .dashboard-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: var(--space-4);
  }
  .dashboard-nav {
    flex-direction: row;
    overflow-x: auto;
  }
  .pipeline-board {
    grid-template-columns: 1fr;
  }
}

