/* These styles are generated from project.scss. */

.alert-debug {
  color: black;
  background-color: white;
  border-color: #d6e9c6;
}

.alert-error {
  color: #b94a48;
  background-color: #f2dede;
  border-color: #eed3d7;
}

/* ===========================================
   CUSTOM ADMIN STYLES FOR REPCOS
   =========================================== */

/* Mejorar la apariencia de los fieldsets */
.fieldset {
  background: #fafafa;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.fieldset h2 {
  color: #2c3e50;
  font-size: 1.1em;
  font-weight: 600;
  margin: 0 0 15px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #3498db;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fieldset .description {
  color: #6c757d;
  font-size: 0.9em;
  margin-bottom: 15px;
  padding: 10px;
  background: #f8f9fa;
  border-left: 4px solid #3498db;
  border-radius: 4px;
}

/* Mejorar los campos de formulario */
.form-row {
  margin-bottom: 20px;
}

.form-row label {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 5px;
  display: block;
}

.form-row input[type="text"],
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e1e5e9;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-row input[type="text"]:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
  outline: none;
}

.form-row .help {
  color: #6c757d;
  font-size: 0.85em;
  margin-top: 5px;
  font-style: italic;
}

/* Campos de solo lectura */
.form-row .readonly {
  background-color: #f8f9fa;
  color: #6c757d;
  cursor: not-allowed;
}

/* Mejorar la lista de acuerdos */
.results table {
  border-collapse: collapse;
  width: 100%;
}

.results th {
  background-color: #f8f9fa;
  color: #2c3e50;
  font-weight: 600;
  padding: 12px;
  text-align: left;
  border-bottom: 2px solid #e1e5e9;
}

.results td {
  padding: 12px;
  border-bottom: 1px solid #e1e5e9;
  vertical-align: top;
}

.results tr:hover {
  background-color: #f8f9fa;
}

/* Botones mejorados */
.default {
  background: linear-gradient(135deg, #3498db, #2980b9);
  border: none;
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
}

.default:hover {
  background: linear-gradient(135deg, #2980b9, #1f618d);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(52, 152, 219, 0.4);
}

.deletelink {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(231, 76, 60, 0.3);
}

.deletelink:hover {
  background: linear-gradient(135deg, #c0392b, #a93226);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(231, 76, 60, 0.4);
}

/* Mejorar el display del operador */
.operator-display {
  line-height: 1.4;
}

.operator-display strong {
  color: #2c3e50;
  font-size: 1em;
}

.operator-display .text-muted {
  color: #6c757d;
  font-size: 0.85em;
}

/* Iconos de emoji en los fieldsets */
.fieldset h2::before {
  font-size: 1.2em;
}

/* Mejorar la navegación breadcrumb */
.breadcrumbs {
  background: #f8f9fa;
  padding: 10px 15px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.breadcrumbs a {
  color: #3498db;
  text-decoration: none;
  font-weight: 500;
}

.breadcrumbs a:hover {
  color: #2980b9;
  text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
  .fieldset {
    padding: 15px;
    margin-bottom: 15px;
  }

  .form-row input[type="text"],
  .form-row select,
  .form-row textarea {
    font-size: 16px; /* Evita zoom en móviles */
  }
}

/* Estados de validación */
.form-row .errorlist {
  color: #e74c3c;
  background: #fdf2f2;
  border: 1px solid #fecaca;
  border-radius: 4px;
  padding: 8px 12px;
  margin-top: 5px;
  font-size: 0.85em;
}

.form-row .errorlist li {
  list-style: none;
  margin: 0;
}

/* Mejorar la apariencia de los filtros */
#changelist-filter {
  background: #f8f9fa;
  border: 1px solid #e1e5e9;
  border-radius: 6px;
  padding: 15px;
}

#changelist-filter h3 {
  color: #2c3e50;
  font-size: 1em;
  font-weight: 600;
  margin-bottom: 10px;
}

#changelist-filter ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#changelist-filter li {
  margin-bottom: 5px;
}

#changelist-filter a {
  color: #3498db;
  text-decoration: none;
  padding: 5px 8px;
  border-radius: 4px;
  display: block;
  transition: background-color 0.3s ease;
}

#changelist-filter a:hover,
#changelist-filter a.selected {
  background-color: #e3f2fd;
  color: #1976d2;
}

/* ===========================================
   UPLOAD FORM STYLES - MEJORAR INTERFAZ DE CARGA
   =========================================== */

/* Mejorar el campo de archivo */
input[type="file"] {
  display: none; /* Ocultar el input nativo */
}

.file-upload-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
  margin-bottom: 20px;
}

.file-upload-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 25px;
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
  width: 100%;
  justify-content: center;
  text-align: center;
}

.file-upload-button:hover {
  background: linear-gradient(135deg, #2980b9, #1f618d);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(52, 152, 219, 0.4);
}

.file-upload-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.file-upload-icon {
  font-size: 20px;
}

.file-upload-text {
  flex: 1;
}

.file-name-display {
  margin-top: 10px;
  padding: 10px 15px;
  background: #f8f9fa;
  border: 2px dashed #dee2e6;
  border-radius: 6px;
  color: #495057;
  font-size: 14px;
  text-align: center;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-name-display.has-file {
  background: #d4edda;
  border-color: #28a745;
  color: #155724;
}

.file-name-display.has-file::before {
  content: "✓ ";
  color: #28a745;
  font-weight: bold;
  margin-right: 5px;
}

/* Mejorar los campos de solo lectura */
.readonly-field {
  background: #f8f9fa !important;
  border: 2px solid #e9ecef !important;
  color: #6c757d !important;
  font-weight: 500;
  padding: 12px 15px;
  border-radius: 6px;
  position: relative;
}

.readonly-field::before {
  content: "📄";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
}

.readonly-field input {
  padding-left: 35px !important;
  background: transparent !important;
  border: none !important;
  color: #6c757d !important;
  font-weight: 500;
}

/* Mejorar el fieldset de información de carga */
.fieldset .description {
  background: #e3f2fd;
  border-left: 4px solid #2196f3;
  color: #1565c0;
  font-weight: 500;
}

/* Estilos específicos para el admin de upload */
.fieldset h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fieldset h2::before {
  font-size: 1.3em;
}

/* Mejorar el botón de submit */
input[type="submit"] {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

input[type="submit"]:hover {
  background: linear-gradient(135deg, #20c997, #17a2b8);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}

/* Mejorar la visualización del resumen */
.upload-summary {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 15px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.4;
  white-space: pre-line;
  max-height: 200px;
  overflow-y: auto;
}

.upload-summary.success {
  background: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
}

.upload-summary.error {
  background: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

/* Estados de carga */
.upload-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.upload-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Mejorar la sección de archivo actual */
.current-file-info {
  background: #e8f5e8;
  border: 1px solid #c3e6cb;
  border-radius: 6px;
  padding: 12px 15px;
  margin-bottom: 15px;
  color: #155724;
  font-weight: 500;
}

.current-file-info::before {
  content: "📁 ";
  margin-right: 8px;
}

/* Responsive para móviles */
@media (max-width: 768px) {
  .file-upload-button {
    padding: 12px 20px;
    font-size: 14px;
  }

  .file-upload-icon {
    font-size: 18px;
  }

  .readonly-field {
    padding: 10px 12px;
  }
}
