#piu-uploader.piu-wrapper {
  border-radius: 12px;
  background: linear-gradient(135deg, #f5f7fb, #eef3ff);
  padding: 24px;
  max-width: 1100px;
  margin: 0 auto;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.piu-header h2 {
  margin: 0 0 4px;
}

.piu-header p {
  margin: 0 0 16px;
  color: #555;
}

.piu-main-grid {
  display: grid;
  grid-template-columns: minmax(280px, 340px) 1fr;
  gap: 16px;
}

.piu-section {
  margin-bottom: 16px;
  padding: 14px 16px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  border: 1px solid #e3e6f0;
}

.piu-section h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1rem;
  color: #1f2a40;
}

.piu-field {
  margin-bottom: 10px;
}

.piu-field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.piu-field input,
.piu-field select {
  width: 100%;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #cbd2e1;
  font-size: 0.9rem;
}

.piu-field input:focus,
.piu-field select:focus {
  outline: none;
  border-color: #0073aa;
  box-shadow: 0 0 0 1px rgba(0,115,170,0.25);
}

.piu-note {
  font-size: 0.8rem;
  color: #777;
  margin-top: 4px;
}

.piu-images-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.piu-image-card {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e1e6f3;
  box-shadow: 0 3px 8px rgba(0,0,0,0.03);
  padding: 10px;
  position: relative;
}

.piu-image-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.piu-image-card-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: #222;
}

.piu-res-badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  color: #fff;
  white-space: nowrap;
}

.piu-res-ok {
  background: #28a745;
}

.piu-res-low {
  background: #dc3545;
}

.piu-res-warning {
  background: #ffc107;
  color: #333;
}

.piu-cropper-container {
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: #000;
  border-radius: 8px;
}

.piu-cropper-container img {
  max-width: 100%;
  display: block;
}

.piu-image-options {
  margin-top: 8px;
  font-size: 0.85rem;
}

.piu-image-size-controls,
.piu-image-orientation-controls {
  margin-bottom: 6px;
}

.piu-upload-label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.piu-upload-label input[type="file"] {
  display: none;
}

.piu-upload-button {
  background: #0073aa;
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.piu-upload-label.piu-upload-disabled .piu-upload-button {
  background: #a0aec0;
  cursor: not-allowed;
}

.piu-btn-primary {
  background: #00a0d2;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.95rem;
}

.piu-btn-primary:hover {
  background: #008ab5;
}

.piu-progress-wrapper {
  margin-bottom: 10px;
}

.piu-progress-bar {
  width: 100%;
  height: 10px;
  background: #e4ecf7;
  border-radius: 999px;
  overflow: hidden;
}

.piu-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0073aa, #00a0d2);
  transition: width 0.2s ease-out;
}

.piu-progress-text {
  font-size: 0.8rem;
}

.piu-status-message {
  margin-top: 8px;
  font-size: 0.9rem;
}

/* Datos del pedido: siempre en columna */
.piu-order-grid {
  display: block;
}

.piu-order-grid .piu-field {
  margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 768px) {
  .piu-main-grid {
    grid-template-columns: 1fr;
  }
}