/* Reset y configuración base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    line-height: 1.6;
    color: #ffffff;
    background: linear-gradient(135deg, #000000 0%, #1f2937 50%, #374151 100%);
    min-height: 100vh;
}

/* Efectos especiales */
.glass-effect {
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.3);
    transform: translateY(-2px);
}

/* Animaciones personalizadas */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

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

.slide-up {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gradientes personalizados */
.gradient-text {
    background: linear-gradient(135deg, #60a5fa 0%, #c084fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-border {
    position: relative;
    background: linear-gradient(135deg, #1f2937, #111827);
    border-radius: 12px;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: inherit;
    mask-image: linear-gradient(to right, #fff 0%, #fff 100%);
    mask-origin: content-box;
    mask-clip: content-box;
    mask-composite: exclude;
    -webkit-mask-composite: xor;
}

/* Estados de botones */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    padding: 12px 24px;
    color: #60a5fa;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
}

/* Cards personalizadas */
.tool-card {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border: 1px solid #374151;
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #3b82f6, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-card:hover {
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-4px);
}

/* Selectores personalizados */
.custom-select {
    appearance: none;
    background: linear-gradient(135deg, #1f2937, #111827);
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 12px 16px 12px 12px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    width: 100%;
}

.custom-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.custom-select option {
    background: #1f2937;
    color: #ffffff;
    padding: 8px;
}

/* Badges de estado */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-configured {
    background: rgba(249, 115, 22, 0.2);
    color: #fb923c;
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.status-ready {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.status-online {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

/* Tags y etiquetas */
.tag {
    display: inline-block;
    padding: 4px 8px;
    background: rgba(139, 92, 246, 0.2);
    color: #c084fc;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    margin: 2px;
}

.tag-blue {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.tag-purple {
    background: rgba(139, 92, 246, 0.2);
    color: #c084fc;
}

.tag-green {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

.grid-2-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.btn-top-right {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
}


/* Tarjetas */
.project-card {
  border: 0;
  border-radius: 1rem;
  overflow: hidden;
  min-height: fit-content;
  height: auto;
  display: flex;
  flex-direction: column;
}
.project-card-header {
  background: #6c757d;  /* gris oscuro tipo bg-secondary */
  color: #fff;
  font-weight: 600;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
  padding: 0.75rem 1rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.project-card .card-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.project-card .btn {
  border-radius: .75rem;
  word-wrap: break-word;
}

/* Spinner un poco más grande */
#loading-spinner .spinner-border { width: 3rem; height: 3rem; }



:root{
  --input-h: 44px;          /* altura del input */
}

/* Contenedor del buscador */
.search{
  position: relative;
  display: inline-block;    /* evita efectos raros de línea */
  height: var(--input-h);   /* = a la altura del input */
  width: clamp(220px, 40vw, 380px);
}

/* Icono dentro del input, centrado SIEMPRE */
.search .icon{
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%); /* centra vertical */
  pointer-events: none;
  line-height: 1;
  font-size: 1rem;
}

/* Espacio para el icono y altura del input */
.search input{
  height: var(--input-h);
  padding-left: 2.2rem;      /* deja hueco para la lupa */
}

/* En móvil: que el buscador ocupe toda la fila si hace falta */
@media (max-width: 640px){
  .search{ width: 100%; }
}


.upload-dropzone{
  border:2px dashed #cbd5e1; border-radius:16px; padding:28px; text-align:center;
  transition: background-color .15s ease, border-color .15s ease, transform .1s;
  color:#0f172a; background:#ffffff;
}
.upload-dropzone svg{ display:block; margin:0 auto 10px; opacity:.9 }
.upload-title{ font-weight:600; font-size:1.125rem; margin-bottom:.25rem }
.upload-subtitle{ font-size:.95rem }
.upload-subtitle a{ text-decoration:underline; cursor:pointer }
.upload-help{ margin-top:.75rem; font-size:.85rem; color:#64748b }

.upload-dropzone:hover{ border-color:#94a3b8; background:#f8fafc }
.upload-dropzone:focus{ outline:0; box-shadow:0 0 0 3px rgba(59,130,246,.35) }
.upload-dropzone.dragover{ border-color:#3b82f6; background:#eff6ff }
.upload-selection{ margin-top:.5rem; font-size:.9rem }

.visually-hidden{
  position:absolute !important;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);
  white-space:nowrap;border:0;
}



.upload-dropzone-wrap{ position:relative; }
.upload-input-overlay{
  position:absolute; inset:0;
  width:100%; height:100%;
  opacity:0; cursor:pointer;           /* 👈 recibe click y drag&drop nativos */
}
.upload-dropzone{
  border:2px dashed #cbd5e1; border-radius:16px; padding:28px; text-align:center;
  transition: background-color .15s, border-color .15s;
  background:#fff; color:#0f172a;
}
.upload-dropzone .u-underline{ text-decoration:underline; }
.upload-dropzone-wrap:has(.upload-input-overlay:focus) .upload-dropzone{ box-shadow:0 0 0 3px rgba(59,130,246,.35); }

.upload-selection{ margin-top:.5rem; font-size:.9rem; color:#334155 }
.d-none{ display:none }

.d-none{display:none}
.dz-counter{
  display:inline-block; margin-top:10px; padding:6px 10px; border-radius:999px;
  font-weight:600; font-size:.95rem; background:#eef2ff; color:#1e293b;
}
.dz-list{
  margin:8px auto 0; max-height:120px; overflow:auto; text-align:left;
  width:min(680px, 92%); font-size:.9rem; line-height:1.3; color:#334155;
  list-style:disc; padding-left:1.25rem;
}

/* El contenedor debe crear contexto de posicionamiento */
.upload-dropzone-wrap{ position: relative; }

/* El input ocupa TODA el área, invisible pero clicable y recibe drop nativo */
.upload-input-overlay{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0; cursor: pointer;
  z-index: 10;                 /* 👈 por encima del dropzone */
}

/* Capa visual (puede quedarse con z-index menor) */
.upload-dropzone{ position: relative; z-index: 1; }

/* (Opcional) estilo cuando hay dragover */
.upload-dropzone.dragover{ border-color:#3b82f6; background:#eff6ff; }

