/*
 * Dashboard Page Styles
 * Functional, grid-based design for services
 */

/* ========================================
   Dashboard Hero
   ======================================== */

.dashboard-hero {
  padding: calc(var(--space-32) + 60px) 0 var(--space-12);
  background: var(--gradient-subtle);
  border-bottom: 1px solid var(--color-border);
}

.hero-content {
  max-width: 700px;
}

.hero-tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

.hero-title {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-4);
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

/* ========================================
   Section Labels
   ======================================== */

.section-label {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  margin-top: var(--space-10);
}

.section-label:first-of-type {
  margin-top: 0;
}

.label-text {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.label-line {
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* ========================================
   Services Grid
   ======================================== */

.services-section {
  padding: var(--space-12) 0 var(--space-16);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
}

/* ========================================
   Service Card
   ======================================== */

.service-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: var(--space-5);
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  text-decoration: none;
  transition: all var(--duration-base) var(--ease-smooth);
}

.service-card:hover {
  border-color: var(--color-border-emphasis);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.service-card-external {
  background: var(--color-bg-tertiary);
}

/* Service Icons */
.service-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  flex-shrink: 0;
  transition: transform var(--duration-base) var(--ease-smooth);
}

.service-card:hover .service-icon {
  transform: scale(1.05);
}

.service-icon svg {
  width: 28px;
  height: 28px;
}

/* Monochrome icons (same as archive report icons) */
.service-icon {
  background: var(--color-accent-subtle);
  color: var(--color-accent);
}

/* Service Info */
.service-info {
  flex: 1;
  min-width: 0;
}

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

.service-name {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
}

.service-status {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.service-status.online {
  color: var(--color-accent);
  background: var(--color-accent-subtle);
}

.service-status.offline {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.service-status.external {
  color: var(--color-text-secondary);
  background: var(--color-bg-tertiary);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s ease-in-out infinite;
}

.service-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-2);
}

.service-url {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--color-text-muted);
}

.service-arrow {
  position: absolute;
  bottom: var(--space-4);
  right: var(--space-4);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  opacity: 0;
  transform: translate(-4px, -4px);
  transition: all var(--duration-base) var(--ease-smooth);
}

.service-arrow svg {
  width: 16px;
  height: 16px;
}

.service-card:hover .service-arrow {
  opacity: 1;
  transform: translate(0, 0);
}

/* ========================================
   Infrastructure Section
   ======================================== */

.infra-section {
  padding-bottom: var(--space-24);
}

.infra-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  padding: var(--space-10);
}

.infra-header {
  margin-bottom: var(--space-8);
}

.infra-header .section-tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.infra-title {
  font-size: var(--text-3xl);
}

.infra-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.infra-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-xl);
  transition: all var(--duration-base) var(--ease-smooth);
}

.infra-item:hover {
  background: var(--color-bg-elevated);
}

.infra-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-subtle);
  border-radius: var(--radius-lg);
  color: var(--color-accent);
  flex-shrink: 0;
}

.infra-icon svg {
  width: 24px;
  height: 24px;
}

.infra-content h3 {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-1);
}

.infra-content p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* ========================================
   Responsive Styles
   ======================================== */

@media (max-width: 1100px) {
  .infra-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .dashboard-hero {
    padding: calc(var(--space-20) + 60px) 0 var(--space-10);
  }

  .hero-title {
    font-size: var(--text-3xl);
  }

  .service-card {
    flex-direction: column;
    align-items: stretch;
  }

  .service-arrow {
    display: none;
  }

  .service-icon {
    width: 40px;
    height: 40px;
  }

  .service-icon svg {
    width: 22px;
    height: 22px;
  }

  .infra-card {
    padding: var(--space-6);
  }

  .infra-item {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .dashboard-hero {
    padding: calc(var(--space-16) + 60px) 0 var(--space-8);
  }

  .hero-title {
    font-size: var(--text-2xl);
  }

  .hero-subtitle {
    font-size: var(--text-base);
  }

  .services-section {
    padding: var(--space-8) 0 var(--space-12);
  }

  .service-card {
    padding: var(--space-4);
    gap: var(--space-3);
  }

  .service-name {
    font-size: var(--text-base);
  }

  .service-desc {
    font-size: var(--text-sm);
  }

  .service-header {
    flex-wrap: wrap;
  }

  .service-status {
    order: -1;
    width: 100%;
    justify-content: flex-start;
    margin-bottom: var(--space-2);
  }

  .section-label {
    margin-top: var(--space-6);
    margin-bottom: var(--space-4);
  }

  .infra-section {
    padding-bottom: var(--space-16);
  }

  .infra-card {
    padding: var(--space-4);
  }

  .infra-title {
    font-size: var(--text-2xl);
  }

  .infra-item {
    padding: var(--space-4);
  }

  .infra-icon {
    width: 40px;
    height: 40px;
  }
}
