/* Reset basico */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
}

body {
  background: linear-gradient(135deg, #0b1019, #121c2b 55%, #1a2540);
  color: #d7e3f5;
  line-height: 1.5;
  min-height: 100vh;
}

.container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2.5rem;
  background: rgba(18, 26, 40, 0.92);
  border-radius: 16px;
  border: 1px solid rgba(110, 170, 255, 0.15);
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(6px);
}

h1 {
  font-size: 1.8rem;
  margin-bottom: 1.8rem;
  text-align: center;
  color: #86c5ff;
  letter-spacing: 0.04em;
}

form .field {
  margin-bottom: 1.2rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.45rem;
  color: #e4ebf8;
  letter-spacing: 0.01em;
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(134, 197, 255, 0.18);
  border-radius: 10px;
  background: rgba(12, 20, 32, 0.92);
  color: #f1f5ff;
  font-size: 1rem;
  transition: border 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

textarea {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

input::placeholder,
select::placeholder,
textarea::placeholder {
  color: rgba(209, 223, 245, 0.5);
}

input:focus,
select:focus,
textarea:focus {
  border-color: #63b3ff;
  box-shadow: 0 0 0 3px rgba(99, 179, 255, 0.2);
  outline: none;
  transform: translateY(-1px);
}

/* Estilos para el selector de fecha */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.8);
  cursor: pointer;
}

/* Grupo de input con prefijo */
.input-group {
  display: flex;
  align-items: stretch;
}

.input-prefix {
  display: flex;
  align-items: center;
  padding: 0.7rem 0.85rem;
  background: rgba(73, 128, 255, 0.15);
  border: 1px solid rgba(134, 197, 255, 0.18);
  border-right: none;
  border-radius: 10px 0 0 10px;
  color: #90c9ff;
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
}

.input-group input {
  border-radius: 0 10px 10px 0 !important;
  flex: 1;
}

.input-group input:focus {
  border-left-color: rgba(134, 197, 255, 0.18);
}

fieldset {
  border: 1px solid rgba(134, 197, 255, 0.2);
  border-radius: 12px;
  padding: 1.2rem;
  margin-bottom: 1.4rem;
  background: rgba(16, 24, 38, 0.7);
}

legend {
  font-weight: 600;
  padding: 0 0.6rem;
  color: #90c9ff;
  letter-spacing: 0.02em;
}

.req {
  color: #ff7f7f;
  margin-left: 0.25rem;
}

.help {
  font-size: 0.82rem;
  color: rgba(220, 234, 255, 0.64);
}

hr {
  border: none;
  border-top: 1px solid rgba(134, 197, 255, 0.16);
  margin: 1.8rem 0;
}

.actions {
  text-align: center;
  margin-top: 1.8rem;
}

button {
  background: linear-gradient(135deg, #2967f8, #4980ff);
  color: #f6f9ff;
  border: none;
  padding: 0.85rem 1.6rem;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 12px 24px rgba(41, 103, 248, 0.35);
}

button:disabled {
  background: #3a455a;
  color: rgba(230, 237, 255, 0.5);
  cursor: not-allowed;
  box-shadow: none;
}

button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(73, 128, 255, 0.4);
}

button:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 10px 20px rgba(73, 128, 255, 0.35);
}

output#msg {
  display: block;
  text-align: center;
  margin-top: 1.2rem;
  font-weight: 500;
  color: #9bd1ff;
}

/* Botones de agencia */
.agencia-buttons-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.agencia-btn {
  flex: 1 1 200px;
  min-width: 150px;
  max-width: 300px;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(12, 20, 32, 0.92);
  border: 2px solid rgba(134, 197, 255, 0.18);
  color: #d7e3f5;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.agencia-btn:hover {
  border-color: #63b3ff;
  color: #f1f5ff;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(99, 179, 255, 0.25);
}

.agencia-btn.active {
  background: linear-gradient(135deg, #2967f8, #4980ff);
  border-color: #63b3ff;
  color: #f6f9ff;
  box-shadow: 0 12px 24px rgba(41, 103, 248, 0.35);
}

.agencia-btn.active:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(73, 128, 255, 0.4);
}

/* File upload styles */
.file-upload-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.file-upload-container input[type="file"] {
  display: none;
}

.btn-file {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #f6f9ff;
  border: none;
  padding: 0.7rem 1.2rem;
  border-radius: 10px;
  font-size: 0.95rem;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3);
}

.btn-file:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(16, 185, 129, 0.4);
}

.btn-file:active {
  transform: translateY(0);
  box-shadow: 0 6px 12px rgba(16, 185, 129, 0.35);
}

.file-name {
  color: rgba(220, 234, 255, 0.64);
  font-size: 0.88rem;
  font-style: italic;
  flex: 1;
}

.preview-container {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(16, 24, 38, 0.5);
  border: 1px solid rgba(134, 197, 255, 0.18);
  border-radius: 12px;
  text-align: center;
}

.preview-image {
  max-width: 100%;
  max-height: 300px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  margin-bottom: 0.75rem;
  border: 2px solid rgba(134, 197, 255, 0.25);
}

.btn-delete-photo {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 12px rgba(220, 38, 38, 0.3);
}

.btn-delete-photo:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(220, 38, 38, 0.4);
}

.btn-delete-photo:active {
  transform: translateY(0);
  box-shadow: 0 4px 8px rgba(220, 38, 38, 0.35);
}

/* Animación suave para mostrar datos del vehículo */
#datosVehiculo {
  animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsivo */
@media (max-width: 600px) {
  .container {
    padding: 1.4rem;
  }
  h1 {
    font-size: 1.45rem;
  }
  .agencia-btn {
    min-width: 120px;
    font-size: 0.8rem;
    padding: 0.65rem 0.85rem;
  }
  .file-upload-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .btn-file {
    width: 100%;
  }
  .preview-image {
    max-height: 200px;
  }
}
