@use 'sass:color';

$surface: #ffffff;
$bg: #f7f9fc;
$border: #e5e7eb;
$primary: #1b64f2;
$success: #10b981;
$info: #0ea5e9;
$warning: #f97316;
$text: #0f172a;
$muted: #6b7280;

:host {
  display: block;
}

.overview-panel {
  background: $surface;
  border-radius: 24px;
  padding: 2rem;
  margin: 1.5rem auto;
  max-width: 1400px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 25px 70px rgba(15, 23, 42, 0.12);

  @media (max-width: 768px) {
    padding: 1.5rem;
    border-radius: 18px;
  }
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;

  h2 {
    margin: 0;
    font-size: 1.5rem;
    color: $text;
  }

  p {
    margin: 0.25rem 0 0;
    color: $muted;
  }

  .cta {
    border: none;
    border-radius: 999px;
    padding: 0.75rem 1.25rem;
    background: rgba(16, 185, 129, 0.12);
    color: $success;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    transition: all 0.2s ease;

    svg {
      width: 18px;
      height: 18px;
    }

    &:hover {
      background: rgba(16, 185, 129, 0.2);
    }
  }

  @media (max-width: 640px) {
    flex-direction: column;
    align-items: flex-start;
  }
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  border-radius: 18px;
  padding: 1.25rem;
  background: $bg;
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid rgba(226, 232, 240, 0.9);

  .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.05);
  }

  .stat-content {
    p {
      margin: 0;
      color: $muted;
    }

    h3 {
      margin: 0.2rem 0 0;
      font-size: 1.75rem;
      color: $text;
    }
  }

  &.primary .stat-icon {
    background: rgba($primary, 0.12);
    color: $primary;
  }

  &.success .stat-icon {
    background: rgba($success, 0.12);
    color: $success;
  }

  &.info .stat-icon {
    background: rgba($info, 0.12);
    color: $info;
  }

  &.warning .stat-icon {
    background: rgba($warning, 0.12);
    color: $warning;
  }
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.action-card {
  border-radius: 18px;
  border: 1px solid $border;
  padding: 1rem 1.25rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: $surface;

  &:hover {
    border-color: rgba($primary, 0.4);
    box-shadow: 0 20px 35px rgba(15, 23, 42, 0.1);
    transform: translateY(-3px);
  }

  .action-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba($primary, 0.1);
    color: $primary;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  h4 {
    margin: 0;
    font-size: 1rem;
    color: $text;
  }

  p {
    margin: 0.15rem 0 0;
    color: $muted;
    font-size: 0.9rem;
  }
}

