/* ============================================================
   CLEARROUTE UK — DASHBOARD STYLES
   ============================================================ */

.dashboard-header {
  background: var(--white);
  border-bottom: 1px solid var(--border-light);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.dashboard-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-brand {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--teal-dark);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.dashboard-user-menu {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 42px;
  height: 42px;
  background: var(--teal);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.1rem;
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 600;
  color: var(--teal-dark);
  font-size: 0.95rem;
}

.user-email {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.dashboard-header .btn-secondary {
  background: var(--teal);
  color: var(--white);
  border: 2px solid var(--teal);
  padding: 8px 16px;
  font-size: 0.85rem;
}

.dashboard-header .btn-secondary:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: var(--white);
}

.dashboard-main {
  background: #F9FAFB;
  min-height: calc(100vh - 73px);
  padding: 32px 0;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}

.dashboard-sidebar {
  background: var(--white);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  position: sticky;
  top: 105px;
}

.dashboard-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-item:hover {
  background: var(--bg-off-white);
  color: var(--teal-dark);
}

.nav-item.active {
  background: var(--teal);
  color: var(--white);
}

.nav-item i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.dashboard-content {
  background: var(--white);
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  min-height: 600px;
}

.dashboard-section {
  display: none;
}

.dashboard-section.active {
  display: block;
}

.section-header {
  margin-bottom: 32px;
}

.section-header h1 {
  color: var(--teal-dark);
  font-size: 2rem;
  margin-bottom: 8px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-off-white);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--white);
}

.stat-icon-teal {
  background: var(--teal);
}

.stat-icon-copper {
  background: var(--copper);
}

.stat-icon-green {
  background: #22c55e;
}

.stat-icon-purple {
  background: #8b5cf6;
}

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--teal-dark);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Applications List */
.recent-applications {
  margin-top: 32px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card-header h2 {
  color: var(--teal-dark);
  font-size: 1.4rem;
}

.view-all {
  color: var(--copper);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.view-all:hover {
  text-decoration: underline;
}

.applications-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.application-card {
  background: var(--bg-off-white);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition: all 0.2s ease;
}

.application-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.app-info {
  flex: 1;
}

.app-service {
  font-weight: 600;
  color: var(--teal-dark);
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.app-id {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.app-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-pending {
  background: rgba(212,115,94,0.15);
  color: var(--copper-dark);
}

.status-in-review {
  background: rgba(59, 130, 246, 0.15);
  color: #2563eb;
}

.status-approved {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
}

.status-rejected {
  background: rgba(220, 38, 38, 0.15);
  color: #dc2626;
}

.app-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.app-actions {
  display: flex;
  gap: 8px;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 3rem;
  color: var(--border-light);
  margin-bottom: 16px;
  display: block;
}

.empty-state p {
  font-size: 1.1rem;
  margin-bottom: 24px;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-select-card {
  background: var(--bg-off-white);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.service-select-card:hover {
  border-color: var(--copper);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  transform: translateY(-4px);
}

.service-icon {
  width: 64px;
  height: 64px;
  background: var(--teal);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.8rem;
  color: var(--white);
}

.service-select-card h3 {
  color: var(--teal-dark);
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.service-select-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
  line-height: 1.5;
}

.service-meta {
  margin-bottom: 20px;
}

.service-meta .badge {
  background: rgba(212,115,94,0.15);
  color: var(--copper-dark);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Profile Form */
.profile-card {
  background: var(--bg-off-white);
  border-radius: 12px;
  padding: 32px;
  max-width: 600px;
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-form label {
  color: var(--teal-dark);
  font-weight: 600;
  font-size: 0.9rem;
}

.profile-form input {
  padding: 12px 16px;
  border: 2px solid var(--border-light);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: inherit;
}

.profile-form input:focus {
  outline: none;
  border-color: var(--copper);
  box-shadow: 0 0 0 3px rgba(212,115,94,0.1);
}

.profile-form input:disabled {
  background: var(--border-light);
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 1024px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
  
  .dashboard-sidebar {
    position: static;
    margin-bottom: 24px;
  }
  
  .dashboard-nav {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 8px;
  }
  
  .nav-item {
    white-space: nowrap;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .dashboard-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .dashboard-user-menu {
    width: 100%;
    justify-content: space-between;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .application-card {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .app-actions {
    width: 100%;
    justify-content: flex-start;
  }
}
