.kitchen-dashboard {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0;

  &__header {
    margin-bottom: 2rem;

    h1 {
      margin: 0 0 0.5rem;
      font-size: 2rem;
      font-weight: 600;
    }

    p {
      margin: 0;
      color: var(--theme-elevation-500);
    }
  }

  &__controls {
    background: var(--theme-elevation-50);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
  }

  &__form {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-end;
  }

  &__field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;

    label {
      font-weight: 500;
      font-size: 0.875rem;
      color: var(--theme-elevation-700);
    }
  }

  &__input,
  &__select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--theme-elevation-200);
    border-radius: 4px;
    font-size: 1rem;
    min-width: 200px;
    background: var(--theme-elevation-0);
    color: var(--theme-text);

    &:focus {
      outline: none;
      border-color: var(--theme-success-500);
      box-shadow: 0 0 0 2px var(--theme-success-100);
    }
  }

  &__button {
    padding: 0.75rem 1.5rem;
    background: var(--theme-success-500);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;

    &:hover:not(:disabled) {
      background: var(--theme-success-600);
    }

    &:disabled {
      opacity: 0.6;
      cursor: not-allowed;
    }
  }

  &__error {
    background: var(--theme-error-100);
    color: var(--theme-error-600);
    padding: 1rem 1.5rem;
    border-radius: 4px;
    margin-bottom: 2rem;
    border-left: 4px solid var(--theme-error-500);
  }

  &__report {
    background: var(--theme-elevation-0);
    border: 1px solid var(--theme-elevation-100);
    border-radius: 8px;
    overflow: hidden;
  }

  &__report-header {
    background: var(--theme-elevation-50);
    padding: 1.5rem;
    border-bottom: 1px solid var(--theme-elevation-100);

    h2 {
      margin: 0 0 1rem;
      font-size: 1.25rem;
      font-weight: 600;
    }
  }

  &__report-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
  }

  &__meta-item {
    font-size: 0.875rem;

    strong {
      color: var(--theme-elevation-600);
      margin-right: 0.25rem;
    }

    &--highlight {
      background: var(--theme-success-100);
      padding: 0.25rem 0.75rem;
      border-radius: 4px;
      color: var(--theme-success-700);

      strong {
        color: var(--theme-success-700);
      }
    }
  }

  &__empty {
    padding: 3rem;
    text-align: center;
    color: var(--theme-elevation-500);

    p {
      margin: 0;
    }
  }

  &__portion-sizes {
    padding: 1.5rem;
    border-bottom: 1px solid var(--theme-elevation-100);

    h3 {
      margin: 0 0 1rem;
      font-size: 1rem;
      font-weight: 600;
      color: var(--theme-elevation-700);
    }
  }

  &__portion-grid {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
  }

  &__portion-item {
    background: var(--theme-elevation-50);
    padding: 1rem 1.5rem;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
  }

  &__portion-label {
    font-size: 0.875rem;
    color: var(--theme-elevation-600);
    margin-bottom: 0.25rem;
  }

  &__portion-count {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--theme-text);
  }

  &__ingredients {
    padding: 1.5rem;

    h3 {
      margin: 0 0 1rem;
      font-size: 1rem;
      font-weight: 600;
      color: var(--theme-elevation-700);
    }
  }

  &__no-ingredients {
    color: var(--theme-elevation-500);
    margin: 0;
  }

  &__table {
    width: 100%;
    border-collapse: collapse;

    th, td {
      padding: 0.875rem 1rem;
      text-align: left;
      border-bottom: 1px solid var(--theme-elevation-100);
    }

    th {
      background: var(--theme-elevation-50);
      font-weight: 600;
      font-size: 0.875rem;
      color: var(--theme-elevation-700);
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }

    tbody tr:nth-child(even) {
      background: var(--theme-elevation-25);
    }

    tbody tr:hover {
      background: var(--theme-elevation-50);
    }

    tfoot {
      td {
        background: var(--theme-elevation-50);
        border-top: 2px solid var(--theme-elevation-200);
      }
    }
  }

  &__count {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
  }

  &__form-images {
    padding: 1.5rem;
    border-top: 1px solid var(--theme-elevation-100);

    h3 {
      margin: 0 0 0.5rem;
      font-size: 1rem;
      font-weight: 600;
      color: var(--theme-elevation-700);
    }
  }

  &__form-images-desc {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    color: var(--theme-elevation-500);
  }

  &__images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
  }

  &__image-card {
    background: var(--theme-elevation-50);
    border: 1px solid var(--theme-elevation-100);
    border-radius: 8px;
    overflow: hidden;
  }

  &__image-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--theme-elevation-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;

    strong {
      font-size: 0.875rem;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    span {
      font-size: 0.75rem;
      color: var(--theme-elevation-500);
      white-space: nowrap;
    }
  }

  &__image-link {
    display: block;
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;

    &:hover {
      .kitchen-dashboard__image-overlay {
        opacity: 1;
      }
    }
  }

  &__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;

    &:hover {
      transform: scale(1.05);
    }
  }

  &__image-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.2s;
  }

  &__image-status {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    color: var(--theme-elevation-600);
    border-top: 1px solid var(--theme-elevation-100);

    .status-pending {
      color: var(--theme-warning-500);
    }

    .status-preparing {
      color: var(--theme-warning-600);
    }

    .status-prepared {
      color: var(--theme-success-500);
    }
  }
}

// Dark theme adjustments
@media (prefers-color-scheme: dark) {
  .kitchen-dashboard {
    &__table tbody tr:nth-child(even) {
      background: var(--theme-elevation-100);
    }
  }
}
