@layer pages {

  /* Dashboard Layout */
  .navbar {
    background-color: var(--bg-card-light);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 50;
    height: 64px;
    display: flex;
    align-items: center;
  }

  .navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
  }

  .navbar-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
  }

  .navbar-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-light);
    /* Dark text for logo */
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .navbar-logo::before {
    content: '';
    display: block;
    width: 24px;
    height: 24px;
    background-color: var(--primary);
    border-radius: 4px;
    clip-path: polygon(0 0, 100% 0, 80% 100%, 20% 100%);
  }

  .navbar-logo:hover {
    color: var(--primary-hover);
  }

  .navbar-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .nav-item {
    color: var(--text-secondary-light);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
    text-decoration: none;
  }

  .nav-item:hover {
    color: var(--text-light);
    background-color: var(--color-surface-alt);
  }

  .nav-item.active {
    color: var(--text-light);
    background-color: var(--color-surface-alt);
    font-weight: 600;
  }

  .navbar-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
  }

  .credits-badge {
    font-size: 0.875rem;
    font-weight: 500;
    background-color: var(--color-white);
    border: 1px solid var(--border-light);
    color: var(--text-light);
    padding: 0.375rem 1rem;
    border-radius: 100px;
    width: fit-content;
  }

  .credits-badge strong {
    font-weight: 700;
  }

  .btn-logout {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-white);
    background-color: var(--color-error);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: background-color 0.15s ease-in-out;
  }

  .btn-logout:hover {
    background-color: var(--color-error);
  }

  /* Dashboard Content */
  .dashboard-container {
    min-height: calc(100vh - 64px - 100px - 4rem);
  }

  .dashboard-header {
    margin-bottom: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  @media (min-width: 640px) {
    .dashboard-header {
      flex-direction: row;
      justify-content: space-between;
      align-items: center;
    }
  }

  .dashboard-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-light);
  }

  .dashboard-subtitle {
    color: var(--text-secondary-light);
  }

  .dashboard-section {
    margin-bottom: var(--spacing-lg);
  }

  .section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
  }

  .grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  @media (min-width: 768px) {
    .grid-3 {
      grid-template-columns: repeat(3, 1fr);
    }
  }

  .toggle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
  }

  .footer {
    --footer-padding: 2rem;
    --footer-background: var(--color-white);
  }

  .footer-brand .logo-icon {
    width: 32px;
    height: 32px;
  }
}