.section {
  margin-bottom: var(--space-6);
}
.upload-privacy-note {
  margin-top: var(--space-4);
  margin-bottom: var(--space-1);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-align: left;
}
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);

  @media (min-width: 640px) {
    grid-template-columns: 1fr 1fr;
  }
}
.actions {
  margin-top: var(--space-6);
}
.error-msg {
  color: var(--color-danger-500);
  font-size: 0.875rem;
  margin-top: var(--space-2);
  text-align: center;
}

.viewer-wrapper {
  position: relative;
  margin-bottom: var(--space-4);
}

/* Grid Layout for Files */
.items-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-top: var(--space-4);
  margin-bottom: var(--space-4);

  @media (min-width: 640px) {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
  }
}

.file-card {
  padding: var(--space-3);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  position: relative;
  min-width: 0;

  &:hover {
    border-color: var(--color-neutral-300);
    box-shadow: 0 4px 10px rgba(10, 20, 30, 0.07);
  }
  &.active {
    border-color: var(--color-brand);
    background: rgba(250, 207, 10, 0.08);
    box-shadow: 0 0 0 1px var(--color-brand);
  }
}

.card-header {
  overflow: hidden;
  padding-right: 28px;
  margin-bottom: 0;
}

.file-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-text);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-body {
  display: flex;
  align-items: center;
  padding-top: 0;
}

.card-controls {
  display: flex;
  align-items: flex-end;
  gap: var(--space-4);
  width: 100%;
}

.qty-group,
.color-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;

  label {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 600;
    margin-bottom: 0;
  }
}

.color-group {
  align-items: flex-start;

  ::ng-deep .color-selector-container {
    margin-left: 0;
  }
}

.qty-input {
  width: 54px;
  padding: 4px 6px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  background: white;
  height: 34px;
  &:focus {
    outline: none;
    border-color: var(--color-brand);
  }
}

.btn-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 0.9rem;

  &:hover {
    background: var(--color-danger-100);
    color: var(--color-danger-500);
  }
}

/* Prominent Add Button */
.add-more-container {
  margin-top: var(--space-2);
}

.btn-add-more {
  width: 100%;
  padding: 0.75rem var(--space-3);
  background: var(--color-neutral-800);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);

  &:hover {
    background: var(--color-neutral-900);
    transform: translateY(-1px);
  }
  &:active {
    transform: translateY(0);
  }
}

.easy-global-controls {
  margin-top: var(--space-4);
  margin-bottom: var(--space-1);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);

  @media (min-width: 640px) {
    grid-template-columns: 1fr 1fr;
  }
}

.easy-global-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);

  span {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--color-text-muted);
  }

  select {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.55rem 0.75rem;
    background: var(--color-bg-card);
    font-size: 0.96rem;
    font-weight: 600;
    color: var(--color-text);

    &:focus {
      outline: none;
      border-color: var(--color-brand);
      box-shadow: 0 0 0 2px rgba(250, 207, 10, 0.25);
    }
  }
}

.sync-settings {
  margin-top: var(--space-4);
  margin-bottom: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-neutral-50);
  padding: var(--space-3);
}

.sync-settings-toggle {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  cursor: pointer;

  input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--color-brand);
    flex-shrink: 0;
  }
}

.sync-settings-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sync-settings-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
}

.sync-settings-subtitle {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-muted);
  line-height: 1.35;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  height: 100%;
  padding-top: var(--space-4);

  input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--color-brand);
  }
  label {
    font-weight: 500;
    cursor: pointer;
  }
}

.sync-all-row {
  margin-top: var(--space-2);
  margin-bottom: var(--space-4);
  padding-top: 0;
}

/* Progress Bar */
.progress-container {
  margin-bottom: var(--space-3);
  text-align: center;
  width: 100%;
}
.progress-bar {
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0;
  position: relative;
  width: 100%;
}
.progress-fill {
  height: 100%;
  background: var(--color-brand);
}

.step-warning {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 300px;
  background: var(--color-neutral-100);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  text-align: center;
  color: var(--color-text-muted);
  font-weight: 500;
}

.item-settings-panel {
  margin-top: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-card);
}

.item-settings-title {
  margin: 0 0 var(--space-4);
  font-size: 1.05rem;
  color: var(--color-text);
}

.item-settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-3);

  @media (min-width: 640px) {
    grid-template-columns: 1fr 1fr;
  }
}

.item-settings-grid label,
.item-settings-checkbox {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
}

.item-settings-grid input,
.item-settings-grid select {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  background: var(--color-bg-card);
  font-size: 1rem;
  color: var(--color-text);

  &:focus {
    outline: none;
    border-color: var(--color-brand);
    box-shadow: 0 0 0 2px rgba(250, 207, 10, 0.25);
  }
}

.item-settings-checkbox {
  flex-direction: row;
  align-items: center;
  gap: var(--space-2);

  input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--color-brand);
  }
}

.item-settings-checkbox--top {
  margin-top: var(--space-4);
  margin-bottom: var(--space-4);
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 500;
}
