/**
 * Admin Dashboard Styles
 * Dynamic dashboard matching mobile admin design
 * The Journeyman - Admin Panel
 */

/* ========================================
   DASHBOARD LAYOUT
   ======================================== */

.admin-dashboard-wrap {
  max-width: 1400px;
}

.admin-header--minimal {
  margin-bottom: 16px;
  padding-bottom: 12px;
}

.admin-header--minimal .admin-header-top {
  align-items: center;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ========================================
   HERO STATS CARD
   ======================================== */

.dash-hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--admin-accent) 0%, #C9561B 50%, #8B3A10 100%);
  padding: 32px;
  margin-bottom: 24px;
}

.dash-hero-bg {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.dash-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.dash-hero-greeting {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dash-greeting-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}

.dash-user-name {
  font-family: 'Cinzel', serif;
  font-size: 28px;
  font-weight: 600;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dash-hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 20px 28px;
}

.dash-hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.dash-hero-stat.main {
  align-items: flex-start;
  text-align: left;
  padding-right: 16px;
}

.dash-hero-value {
  font-size: 32px;
  font-weight: 700;
  color: white;
  line-height: 1;
}

.dash-hero-stat.main .dash-hero-value {
  font-size: 42px;
}

.dash-hero-value.success {
  color: #86efac;
}

.dash-hero-value.accent {
  color: #fde68a;
}

.dash-hero-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dash-hero-divider {
  width: 1px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
}

/* ========================================
   QUICK ACTIONS
   ======================================== */

.dash-quick-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.dash-quick-btn {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--admin-panel);
  border: 1px solid var(--admin-line);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.dash-quick-btn:hover {
  transform: translateY(-2px);
  border-color: var(--admin-accent);
  box-shadow: 0 8px 24px rgba(255, 107, 43, 0.15);
}

.dash-quick-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 106, 26, 0.15);
  border-radius: 12px;
  color: var(--admin-accent);
  font-size: 20px;
  flex-shrink: 0;
}

.dash-quick-icon.purple {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
}

.dash-quick-icon.blue {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.dash-quick-icon.cyan {
  background: rgba(6, 182, 212, 0.15);
  color: #06b6d4;
}

.dash-quick-btn span {
  font-size: 14px;
  font-weight: 600;
  color: var(--admin-text);
}

/* ========================================
   DASHBOARD GRID
   ======================================== */

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.dash-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dash-card {
  background: var(--admin-panel);
  border: 1px solid var(--admin-line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--admin-glow);
}

/* ========================================
   SECTION HEADERS
   ======================================== */

.dash-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--admin-line);
}

.dash-section-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--admin-text);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.dash-section-header h3 i {
  color: var(--admin-accent);
  font-size: 14px;
}

/* View More Button */
.dash-view-more-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 106, 26, 0.1);
  border: 1px solid rgba(255, 106, 26, 0.2);
  border-radius: 8px;
  color: var(--admin-accent);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.dash-view-more-btn:hover {
  background: rgba(255, 106, 26, 0.2);
  border-color: rgba(255, 106, 26, 0.4);
}

.dash-view-more-btn i {
  font-size: 11px;
}

.dash-see-all {
  font-size: 13px;
  color: var(--admin-accent);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}

.dash-see-all:hover {
  opacity: 0.8;
}

/* ========================================
   ATTENTION SECTION
   ======================================== */

.dash-attention {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 16px;
  padding: 20px;
}

.dash-attention .dash-section-header {
  border-bottom-color: rgba(239, 68, 68, 0.2);
}

.dash-attention .dash-section-header h3 {
  color: #ef4444;
}

.dash-attention .dash-section-header h3 i {
  color: #ef4444;
}

.dash-attention-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-attention-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
}

.dash-attention-item:hover {
  background: rgba(0, 0, 0, 0.3);
}

.dash-attention-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 68, 68, 0.2);
  border-radius: 10px;
  color: #ef4444;
  font-size: 16px;
  flex-shrink: 0;
}

.dash-attention-icon.warning {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.dash-attention-info {
  flex: 1;
  min-width: 0;
}

.dash-attention-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--admin-text);
}

.dash-attention-meta {
  font-size: 12px;
  color: var(--admin-text-muted);
  margin-top: 2px;
}

/* ========================================
   PIPELINE CHART
   ======================================== */

.dash-pipeline-chart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 140px;
  padding-top: 12px;
}

.dash-pipe-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
}

.dash-pipe-fill {
  width: 100%;
  min-height: 10px;
  background: linear-gradient(180deg, var(--admin-accent), #C9561B);
  border-radius: 8px 8px 0 0;
  transition: height 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dash-pipe-bar[data-phase="P5"] .dash-pipe-fill {
  background: linear-gradient(180deg, #22c55e, #16a34a);
}

.dash-pipe-bar[data-phase="P4"] .dash-pipe-fill {
  background: linear-gradient(180deg, #3b82f6, #2563eb);
}

.dash-pipe-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--admin-text-muted);
}

.dash-pipe-count {
  font-size: 16px;
  font-weight: 700;
  color: var(--admin-text);
}

/* ========================================
   NAVIGATION GRID
   ======================================== */

.dash-nav-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.dash-nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 14px;
  background: var(--admin-card);
  border: 1px solid var(--admin-line);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.dash-nav-item:hover {
  transform: translateY(-2px);
  border-color: var(--admin-accent);
  box-shadow: 0 8px 20px rgba(255, 107, 43, 0.1);
}

.dash-nav-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 106, 26, 0.15);
  border-radius: 12px;
  color: var(--admin-accent);
  font-size: 18px;
}

.dash-nav-icon.green {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.dash-nav-icon.yellow {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.dash-nav-icon.blue {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.dash-nav-icon.purple {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
}

.dash-nav-icon.cyan {
  background: rgba(6, 182, 212, 0.15);
  color: #06b6d4;
}

.dash-nav-icon.pink {
  background: rgba(236, 72, 153, 0.15);
  color: #ec4899;
}

.dash-nav-icon.orange {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
}

.dash-nav-icon.red {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.dash-nav-icon.slate {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}

.dash-nav-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--admin-text);
}

.dash-nav-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-nav-badge.warning {
  background: #f59e0b;
  color: white;
}

.dash-nav-badge.danger {
  background: #ef4444;
  color: white;
}

/* ========================================
   ACTIVITY LIST
   ======================================== */

.dash-activity-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}

.dash-activity-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.dash-activity-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.dash-activity-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 106, 26, 0.15);
  border-radius: 10px;
  color: var(--admin-accent);
  font-size: 14px;
  flex-shrink: 0;
}

.dash-activity-icon.success {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.dash-activity-icon.info {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.dash-activity-icon.warning {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.dash-activity-icon.purple {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
}

.dash-activity-icon.error {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.dash-activity-info {
  flex: 1;
  min-width: 0;
}

.dash-activity-text {
  font-size: 14px;
  color: var(--admin-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-activity-time {
  font-size: 12px;
  color: var(--admin-text-muted);
  margin-top: 2px;
}

.dash-activity-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 32px;
  color: var(--admin-text-muted);
  text-align: center;
}

.dash-activity-empty i {
  font-size: 28px;
  opacity: 0.3;
}

.dash-activity-empty span {
  font-size: 14px;
}

/* ========================================
   ANIMATED NUMBERS
   ======================================== */

@keyframes count-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.dash-hero-value,
.dash-pipe-count {
  animation: count-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
  .dash-grid {
    grid-template-columns: 1fr;
  }
  
  .dash-hero-content {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .dash-hero-stats {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 768px) {
  .dash-quick-actions {
    flex-wrap: wrap;
  }
  
  .dash-quick-btn {
    flex: 1 1 calc(50% - 8px);
    min-width: 140px;
  }
  
  .dash-hero-stats {
    flex-wrap: wrap;
    gap: 16px;
  }
  
  .dash-hero-divider {
    display: none;
  }
  
  .dash-hero-stat {
    flex: 1 1 auto;
    min-width: 80px;
  }
  
  .dash-nav-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========================================
   ACTIVITY HISTORY MODAL
   ======================================== */

.activity-history-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.activity-history-modal.open {
  opacity: 1;
  visibility: visible;
}

.activity-history-content {
  width: 100%;
  max-width: 800px;
  max-height: 85vh;
  background: var(--admin-panel);
  border-radius: 16px;
  border: 1px solid var(--admin-line);
  display: flex;
  flex-direction: column;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.25s ease;
  overflow: hidden;
}

.activity-history-modal.open .activity-history-content {
  transform: translateY(0) scale(1);
}

.activity-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--admin-line);
  flex-shrink: 0;
}

.activity-history-header h3 {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--admin-text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.activity-history-header h3 i {
  color: var(--admin-accent);
}

.activity-history-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--admin-line);
  border-radius: 10px;
  color: var(--admin-text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.activity-history-close:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

/* Filters */
.activity-history-filters {
  padding: 16px 24px;
  border-bottom: 1px solid var(--admin-line);
  background: rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.activity-filter-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.activity-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 140px;
}

.activity-filter-group.search {
  flex: 1;
  min-width: 200px;
}

.activity-filter-group label {
  font-size: 11px;
  font-weight: 600;
  color: var(--admin-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.activity-filter-group select,
.activity-filter-group input {
  padding: 10px 12px;
  background: var(--admin-panel);
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  color: var(--admin-text);
  font-size: 13px;
  transition: all 0.2s;
}

.activity-filter-group select:focus,
.activity-filter-group input:focus {
  outline: none;
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 3px rgba(255, 106, 26, 0.1);
}

.activity-filter-group input::placeholder {
  color: var(--admin-text-muted);
}

.activity-filter-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--admin-line);
}

.activity-filter-summary span {
  font-size: 13px;
  color: var(--admin-text-muted);
}

.activity-filter-clear {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--admin-line);
  border-radius: 6px;
  color: var(--admin-text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.activity-filter-clear:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

/* Activity List in Modal */
.activity-history-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.activity-history-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 48px;
  color: var(--admin-text-muted);
  font-size: 14px;
}

.activity-history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px;
  color: var(--admin-text-muted);
  text-align: center;
}

.activity-history-empty i {
  font-size: 32px;
  opacity: 0.3;
}

.activity-history-empty span {
  font-size: 14px;
}

/* Activity Item in Modal (larger version) */
.activity-history-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.activity-history-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--admin-line);
}

.activity-history-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 106, 26, 0.15);
  border-radius: 12px;
  color: var(--admin-accent);
  font-size: 16px;
  flex-shrink: 0;
}

.activity-history-icon.success {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.activity-history-icon.info {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.activity-history-icon.warning {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.activity-history-icon.purple {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
}

.activity-history-icon.error {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.activity-history-info {
  flex: 1;
  min-width: 0;
}

.activity-history-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--admin-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-history-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--admin-text-muted);
}

.activity-history-type {
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
}

.activity-history-date {
  font-size: 12px;
  color: var(--admin-text-muted);
  white-space: nowrap;
}

/* Date Separator */
.activity-date-separator {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  margin-top: 8px;
}

.activity-date-separator:first-child {
  margin-top: 0;
}

.activity-date-separator span {
  font-size: 11px;
  font-weight: 600;
  color: var(--admin-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.activity-date-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--admin-line);
}

/* ========================================
   TODAY'S TASKS (v54.0)
   ======================================== */

.dash-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-tasks-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px;
  color: var(--admin-text-muted);
  text-align: center;
}

.dash-tasks-empty i {
  font-size: 24px;
  color: #34d399;
}

.dash-task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--admin-line);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dash-task-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--admin-accent);
}

.dash-task-item.overdue {
  border-left: 3px solid #ef4444;
}

.dash-task-item.today {
  border-left: 3px solid #f59e0b;
}

.dash-task-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  color: var(--admin-text-muted);
  flex-shrink: 0;
}

.dash-task-item.overdue .dash-task-icon {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.dash-task-item.today .dash-task-icon {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.dash-task-info {
  flex: 1;
  min-width: 0;
}

.dash-task-company {
  font-weight: 600;
  color: var(--admin-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-task-action {
  font-size: 12px;
  color: var(--admin-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-task-due {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--admin-text-muted);
  flex-shrink: 0;
}

.dash-task-item.overdue .dash-task-due {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.dash-task-item.today .dash-task-due {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

/* ========================================
   RECENTLY VIEWED (v54.0)
   ======================================== */

.dash-recent-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-recent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--admin-line);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dash-recent-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--admin-accent);
}

.dash-recent-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--admin-accent), #C9561B);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
}

.dash-recent-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dash-recent-info {
  flex: 1;
  min-width: 0;
}

.dash-recent-name {
  font-weight: 600;
  color: var(--admin-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-recent-phase {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 106, 26, 0.15);
  color: var(--admin-accent);
  flex-shrink: 0;
}

/* ========================================
   PENDING TJM ACTIONS (v55.0)
   ======================================== */

.dash-pending-actions-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(251, 191, 36, 0.03));
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.dash-pending-actions-card .dash-section-header h3 {
  color: #f59e0b;
}

.dash-pending-actions-card .dash-section-header h3 i {
  color: #f59e0b;
}

.dash-pending-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  background: #f59e0b;
  color: #000;
  font-size: 12px;
  font-weight: 700;
  border-radius: 12px;
}

.dash-pending-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-pending-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--admin-panel);
  border: 1px solid var(--admin-line);
  border-radius: 10px;
  transition: all 0.2s ease;
  cursor: pointer; /* v56.0: Click to open contact in CRM */
}

.dash-pending-item:hover {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.03);
}

.dash-pending-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border-radius: 10px;
  font-size: 16px;
  flex-shrink: 0;
}

.dash-pending-icon.automation_message {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
}

.dash-pending-icon.manual_task {
  background: rgba(139, 92, 246, 0.12);
  color: #8b5cf6;
}

.dash-pending-icon.phase_advance {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.dash-pending-icon.add_note {
  background: rgba(236, 72, 153, 0.12);
  color: #ec4899;
}

.dash-pending-info {
  flex: 1;
  min-width: 0;
}

.dash-pending-company {
  font-size: 14px;
  font-weight: 600;
  color: var(--admin-text);
  text-decoration: none;
  display: block;
}

.dash-pending-company:hover {
  color: var(--admin-accent);
}

.dash-pending-preview {
  font-size: 12px;
  color: var(--admin-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.dash-pending-meta {
  font-size: 10px;
  color: var(--admin-text-muted);
  opacity: 0.7;
  margin-top: 4px;
}

.dash-pending-actions-btns {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.dash-pending-actions-btns button {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-approve-action {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.btn-approve-action:hover {
  background: #10b981;
  color: #fff;
}

.btn-dismiss-action {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.btn-dismiss-action:hover {
  background: #ef4444;
  color: #fff;
}

/* Responsive */
@media (max-width: 640px) {
  .activity-history-modal {
    padding: 16px;
  }
  
  .activity-history-content {
    max-height: 90vh;
  }
  
  .activity-history-header {
    padding: 16px 20px;
  }
  
  .activity-history-filters {
    padding: 12px 20px;
  }
  
  .activity-filter-row {
    flex-direction: column;
    gap: 12px;
  }
  
  .activity-filter-group {
    min-width: 100%;
  }
  
  .activity-history-list {
    padding: 12px 20px;
  }
}
