/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  background: #f5f5f5;
}

.container {
  max-width: 100%;
  padding: 20px;
  min-height: 100vh;
}

/* Header */
.header {
  margin-bottom: 24px;
}

.header h1 {
  font-size: 18px;
  font-weight: 600;
  color: #11324d;
  margin-bottom: 4px;
}

.product-info {
  font-size: 13px;
  color: #666;
}

.product-info .sku {
  font-weight: 600;
  color: #9452ba;
}

/* Sections */
.section {
  margin-bottom: 20px;
}

.section label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #11324d;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Select */
select {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  color: #333;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

select:focus {
  outline: none;
  border-color: #9452ba;
  box-shadow: 0 0 0 2px rgba(148, 82, 186, 0.2);
}

select:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
}

/* Buttons */
.actions {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-icon {
  font-size: 16px;
}

.btn-primary {
  background: #9452ba;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #7d3fa3;
}

.btn-secondary {
  background: white;
  color: #333;
  border: 1px solid #ddd;
}

.btn-secondary:hover:not(:disabled) {
  background: #f5f5f5;
  border-color: #ccc;
}

/* Status */
.status {
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 20px;
}

.status.success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.status.error {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ef9a9a;
}

.status.info {
  background: #e3f2fd;
  color: #1565c0;
  border: 1px solid #90caf9;
}

.hidden {
  display: none !important;
}

/* Preview Container */
.preview-container {
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: #f5f5f5;
  border-bottom: 1px solid #ddd;
  font-weight: 500;
  font-size: 13px;
}

.btn-close {
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  font-size: 20px;
  color: #666;
  cursor: pointer;
  border-radius: 4px;
}

.btn-close:hover {
  background: #e0e0e0;
}

.pdf-viewer {
  width: 100%;
  height: 500px;
  border: none;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #9452ba;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-overlay p {
  color: #666;
  font-size: 14px;
}

/* Responsive */
@media (max-width: 400px) {
  .actions {
    flex-direction: column;
  }
}
