* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #f9f6f0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #2c2c2c;
  line-height: 1.7;
  min-height: 100vh;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #f7f6f2;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #AA8A62, #c4a97d);
  border-radius: 10px;
}

/* ---------- CONTENEDOR PRINCIPAL ---------- */
.sop-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ---------- HEADER ---------- */
.sop-header {
  text-align: center;
  margin-bottom: 2rem;
}

.sop-logo-link {
  display: inline-block;
}

.sop-logo {
  max-height: 60px;
  width: auto;
}

/* ---------- CONTENIDO ---------- */
.sop-content {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e8ddd0;
  padding: 2.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.sop-titulo {
  font-size: 1.5rem;
  color: #b9975b;
  text-align: center;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.sop-subtitulo {
  text-align: center;
  color: #8a7a66;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.sop-descripcion {
  font-size: 0.925rem;
  color: #444;
  margin-bottom: 1rem;
  line-height: 1.7;
}

/* ---------- NOTA ---------- */
.sop-nota-box {
  background: #fdf8f0;
  border: 1px solid #e8ddd0;
  border-left: 4px solid #b9975b;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
}

.sop-nota-box p {
  font-size: 0.875rem;
  color: #6b5e4e;
  line-height: 1.6;
}

.sop-nota-box strong {
  color: #3a3a3a;
}

/* ---------- FORMULARIO ---------- */
.sop-formulario {
  max-width: 640px;
  margin: 0 auto;
}

.sop-campo {
  margin-bottom: 1.25rem;
}

.sop-campo label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #3a3a3a;
  margin-bottom: 0.35rem;
}

.sop-campo label .sop-obligatorio {
  color: #c0392b;
  margin-left: 2px;
}

.sop-campo input[type="text"],
.sop-campo input[type="email"],
.sop-campo select,
.sop-campo textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-size: 0.9rem;
  font-family: inherit;
  color: #2c2c2c;
  background: #fdfcfa;
  border: 1px solid #e0d8cc;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.sop-campo input:focus,
.sop-campo select:focus,
.sop-campo textarea:focus {
  border-color: #b9975b;
  box-shadow: 0 0 0 3px rgba(185, 151, 91, 0.12);
}

.sop-campo textarea {
  min-height: 160px;
  resize: vertical;
}

.sop-campo select {
  appearance: none;
  -webkit-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='%236b5e4e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* ---------- ARCHIVOS ADJUNTOS ---------- */
.sop-adjunto {
  margin-bottom: 1.5rem;
}

.sop-adjunto label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #3a3a3a;
  margin-bottom: 0.35rem;
}

.sop-adjunto-hint {
  font-size: 0.8rem;
  color: #8a7a66;
  margin-bottom: 0.5rem;
  font-style: italic;
}

.sop-adjunto-input {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sop-adjunto-input input[type="file"] {
  display: none;
}

.sop-adjunto-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  font-family: inherit;
  color: #6b5e4e;
  background: #fdfcfa;
  border: 1px dashed #d4c5b0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.sop-adjunto-btn:hover {
  border-color: #b9975b;
  color: #b9975b;
  background: rgba(185, 151, 91, 0.04);
}

.sop-adjunto-btn svg {
  width: 16px;
  height: 16px;
}

.sop-adjunto-nombre {
  font-size: 0.85rem;
  color: #6b5e4e;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 300px;
}

.sop-adjunto-preview {
  display: none;
  margin-top: 0.5rem;
  position: relative;
}

.sop-adjunto-preview img {
  max-width: 200px;
  max-height: 120px;
  border-radius: 6px;
  border: 1px solid #e0d8cc;
  object-fit: cover;
}

.sop-adjunto-preview .sop-adjunto-quitar {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  background: #c0392b;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 0.7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ---------- BOTON ENVIAR ---------- */
.sop-enviar-wrap {
  text-align: center;
  margin-top: 1.5rem;
}

.sop-enviar-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2.5rem;
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #AA8A62, #b9975b);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 2px 8px rgba(185, 151, 91, 0.25);
}

.sop-enviar-btn:hover {
  background: linear-gradient(135deg, #9a7d58, #a88a52);
  box-shadow: 0 4px 16px rgba(185, 151, 91, 0.35);
  transform: translateY(-1px);
}

.sop-enviar-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.sop-enviar-btn svg {
  width: 18px;
  height: 18px;
}

/* ---------- TIEMPO RESPUESTA ---------- */
.sop-tiempo-respuesta {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.82rem;
  color: #8a7a66;
  font-style: italic;
}

/* ---------- TOAST / MENSAJES ---------- */
.sop-toast {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  padding: 0.85rem 1.25rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-family: inherit;
  color: #fff;
  z-index: 9999;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s;
  pointer-events: none;
  max-width: 380px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.sop-toast.sop-toast-exito {
  background: #27ae60;
}

.sop-toast.sop-toast-erroro {
  background: #c0392b;
}

.sop-toast.sop-toast-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ---------- CONFIRMACION POST-ENVIO ---------- */
.sop-confirmacion {
  display: none;
  text-align: center;
  padding: 2rem 1rem;
}

.sop-confirmacion-activo {
  display: block;
}

.sop-confirmacion-icono {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  background: #f0faf4;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sop-confirmacion-icono svg {
  width: 32px;
  height: 32px;
  color: #27ae60;
}

.sop-confirmacion h2 {
  font-size: 1.25rem;
  color: #27ae60;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.sop-confirmacion .sop-caso-numero {
  font-size: 1.1rem;
  color: #b9975b;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.sop-confirmacion p {
  font-size: 0.9rem;
  color: #6b5e4e;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.sop-confirmacion-volver {
  display: inline-block;
  margin-top: 1rem;
  color: #b9975b;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.sop-confirmacion-volver:hover {
  text-decoration: underline;
}

/* ---------- FOOTER ---------- */
.sop-footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e8ddd0;
  font-size: 0.8rem;
  color: #8a7a66;
}

.sop-footer .sop-back-home {
  display: inline-block;
  margin-bottom: 0.5rem;
  color: #b9975b;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
}

.sop-footer .sop-back-home:hover {
  text-decoration: underline;
}

.sop-footer p {
  margin-bottom: 0;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 640px) {
  .sop-container {
    padding: 1rem 0.75rem;
  }
  .sop-content {
    padding: 1.5rem;
  }
  .sop-titulo {
    font-size: 1.25rem;
  }
  .sop-campo input,
  .sop-campo select,
  .sop-campo textarea {
    font-size: 16px;
  }
  .sop-enviar-btn {
    width: 100%;
    justify-content: center;
  }
  .sop-adjunto-preview img {
    max-width: 140px;
  }
}
