/* Dashboard */
.dashboard { 
  padding: 24px 32px; 
  max-width: 1400px; 
  margin: 0 auto; 
}

/* Welcome Section */
.dash-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.welcome-text h1 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}
.welcome-text .muted {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.welcome-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* KPI Cards */
.dash-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}
.kpi {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all 0.2s ease;
}
.kpi:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.kpi-icon svg {
  width: 24px;
  height: 24px;
}
.kpi-icon-contacts {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}
.kpi-icon-worksheets {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}
.kpi-icon-team {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
}
.kpi-icon-clients {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}
.kpi-content {
  flex: 1;
  min-width: 0;
}
.kpi-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
}
.kpi-value {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}

/* Section Title */
.dash-section {
  margin-bottom: 32px;
}
.section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 16px;
}

/* Quick Actions */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.quick-action {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.quick-action:hover {
  border-color: var(--primary);
  background: var(--panel-2);
  transform: translateY(-2px);
}
.qa-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(186, 163, 97, 0.12);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.qa-text {
  flex: 1;
  min-width: 0;
}
.qa-title {
  display: block;
  font-weight: 600;
  color: var(--text);
  font-size: 15px;
  margin-bottom: 3px;
}
.qa-desc {
  display: block;
  font-size: 13px;
  color: var(--muted);
}
.qa-arrow {
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.quick-action:hover .qa-arrow {
  transform: translateX(4px);
  color: var(--primary);
}

/* Main Content Grid */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 20px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.panel-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.panel-link {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}
.panel-link:hover {
  text-decoration: underline;
}
.panel-body {
  padding: 16px 20px;
  color: var(--muted);
  min-height: 180px;
}

/* Activity Row */
.activity-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.activity-row:last-child {
  border-bottom: none;
}
.activity-row .icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.activity-row .info {
  flex: 1;
  min-width: 0;
}
.activity-row .title {
  display: block;
  font-weight: 500;
  color: var(--text);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.activity-row .meta {
  font-size: 12px;
  color: var(--muted);
}
.activity-row .date {
  font-size: 12px;
  color: var(--muted);
  flex-shrink: 0;
}

/* Worksheet Row */
.ws-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.ws-row:last-child {
  border-bottom: none;
}
.ws-row .name {
  font-weight: 500;
  color: var(--text);
  font-size: 14px;
}
.ws-row .meta {
  font-size: 12px;
  color: var(--muted);
  background: var(--panel-2);
  padding: 4px 10px;
  border-radius: 6px;
}

/* Team Member Row */
.team-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.team-row:last-child {
  border-bottom: none;
}
.team-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-700));
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}
.team-info {
  flex: 1;
  min-width: 0;
}
.team-name {
  display: block;
  font-weight: 500;
  color: var(--text);
  font-size: 14px;
}
.team-role {
  font-size: 12px;
  color: var(--muted);
}

/* Tables */
.table-responsive { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; color: var(--text); background: transparent; }
.table thead th { text-align: left; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 10px 12px; border-bottom: 1px solid var(--border); font-weight: 500; }
.table tbody td { padding: 12px; border-bottom: 1px solid var(--border); color: var(--text); }
.table tbody tr:hover { background: rgba(255,255,255,0.02); }
.table-compact thead th, .table-compact tbody td { padding-top: 8px; padding-bottom: 8px; }

/* Badges */
.badge { display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 500; line-height: 1.2; background: var(--panel-2); color: var(--muted); }
.badge-role { color: var(--primary); background: rgba(186, 163, 97, 0.12); }

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  text-align: center;
  color: var(--muted);
}
.empty-state svg {
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  opacity: 0.5;
}
.empty-state p {
  margin: 0;
  font-size: 14px;
}

/* Responsive */
@media (max-width: 1200px) {
  .dash-kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .dashboard { padding: 20px 16px; }
  .dash-welcome { flex-direction: column; align-items: flex-start; gap: 16px; }
  .dash-grid { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .dash-kpis { grid-template-columns: 1fr; }
}

