/* =========================================================
   VLR DEV SUITE · Barra de Ecosistema & Lanzador Global
   Diseñada para unificar todos los proyectos clínicos y software
   de Vicente Lincoqueo Roa.
   ========================================================= */

:root {
  --vlr-suite-bg: #090d16;
  --vlr-suite-border: rgba(255, 255, 255, 0.08);
  --vlr-suite-text: #94a3b8;
  --vlr-suite-text-bold: #f8fafc;
  --vlr-suite-accent: #38bdf8;
  --vlr-suite-emerald: #34d399;
  --vlr-suite-amber: #fbbf24;
  --vlr-suite-card-bg: #0f172a;
  --vlr-suite-card-hover: #1e293b;
}

/* Barra Superior Principal */
.vlr-suite-bar {
  background: var(--vlr-suite-bg);
  color: var(--vlr-suite-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 12.5px;
  line-height: 1.4;
  height: 42px;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid var(--vlr-suite-border);
  position: relative;
  z-index: 99999;
  flex-shrink: 0;
  user-select: none;
}

.vlr-suite-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.vlr-suite-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--vlr-suite-text-bold);
  text-decoration: none;
  cursor: pointer;
}
.vlr-suite-brand-icon {
  font-size: 15px;
  line-height: 1;
}
.vlr-suite-brand-tag {
  background: linear-gradient(135deg, #0284c7, #0d9488);
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Botón de Lanzador de Proyectos */
.vlr-suite-launcher-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--vlr-suite-text-bold);
  border: 1px solid var(--vlr-suite-border);
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  font-family: inherit;
}
.vlr-suite-launcher-btn:hover,
.vlr-suite-launcher-btn.active {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.4);
  color: var(--vlr-suite-accent);
}
.vlr-suite-count-badge {
  background: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 9999px;
  font-weight: 700;
}

/* Carril Central de Proyectos Rápidos */
.vlr-suite-center {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 10px;
  flex: 1;
  max-width: 820px;
}
.vlr-suite-center::-webkit-scrollbar {
  display: none;
}

.vlr-suite-pill {
  color: var(--vlr-suite-text);
  background: transparent;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}
.vlr-suite-pill:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--vlr-suite-text-bold);
}
.vlr-suite-pill.active {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-weight: 600;
}
.vlr-suite-pill-icon {
  font-size: 13px;
  line-height: 1;
}

/* Lado Derecho: Acciones */
.vlr-suite-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.vlr-suite-btn-action {
  background: transparent;
  color: var(--vlr-suite-text);
  border: 1px solid var(--vlr-suite-border);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  transition: all 0.15s ease;
  font-family: inherit;
  white-space: nowrap;
}
.vlr-suite-btn-action:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--vlr-suite-text-bold);
  border-color: rgba(255, 255, 255, 0.16);
}
.vlr-suite-btn-cred {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.25);
  background: rgba(251, 191, 36, 0.05);
}
.vlr-suite-btn-cred:hover {
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.45);
  color: #fef08a;
}
.vlr-suite-btn-cv {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.25);
  background: rgba(56, 189, 248, 0.05);
}
.vlr-suite-btn-cv:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.45);
  color: #bae6fd;
}

/* =========================================================
   OVERLAYS / MODALES / MENÚS DESPLEGABLES
   ========================================================= */

.vlr-suite-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 12, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999998;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px 24px;
  box-sizing: border-box;
  animation: vlrFadeIn 0.18s ease-out;
}

.vlr-suite-modal {
  background: var(--vlr-suite-card-bg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.06);
  width: 100%;
  max-width: 900px;
  max-height: 88vh;
  overflow-y: auto;
  box-sizing: border-box;
  color: #e2e8f0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  animation: vlrSlideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

@keyframes vlrFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes vlrSlideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

.vlr-suite-modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--vlr-suite-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: inherit;
  z-index: 2;
}
.vlr-suite-modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.vlr-suite-modal-subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  color: #94a3b8;
}
.vlr-suite-modal-close {
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: #94a3b8;
  font-size: 16px;
  line-height: 1;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.vlr-suite-modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.vlr-suite-modal-body {
  padding: 20px 22px;
  overflow-y: auto;
}

/* Secciones de Proyectos */
.vlr-suite-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #64748b;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.vlr-suite-section-title span {
  color: #38bdf8;
}

.vlr-suite-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.vlr-suite-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  position: relative;
}
.vlr-suite-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.4);
}
.vlr-suite-card.is-current {
  border-color: rgba(56, 189, 248, 0.6);
  background: rgba(56, 189, 248, 0.07);
}

.vlr-suite-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.vlr-suite-card-icon {
  font-size: 24px;
  line-height: 1;
}
.vlr-suite-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}
.vlr-suite-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
}
.vlr-suite-tag.tech {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
}
.vlr-suite-tag.active {
  color: #34d399;
  background: rgba(52, 211, 153, 0.1);
}

.vlr-suite-card-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.vlr-suite-card-desc {
  margin: 0;
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.45;
}

.vlr-suite-card-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}
.vlr-suite-card-cred {
  color: #fbbf24;
  font-family: monospace;
  font-size: 10.5px;
}
.vlr-suite-card-open {
  color: #38bdf8;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Tabla de Credenciales en Modal Claves */
.vlr-suite-cred-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 10px;
}
.vlr-suite-cred-table th {
  text-align: left;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #64748b;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--vlr-suite-border);
}
.vlr-suite-cred-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}
.vlr-suite-cred-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}
.vlr-suite-copy-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
  transition: all 0.12s ease;
}
.vlr-suite-copy-btn:hover {
  background: #38bdf8;
  color: #04121d;
  border-color: #38bdf8;
}

/* Toast de Copiado */
.vlr-suite-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0284c7;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 9999999;
  opacity: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  font-family: inherit;
}
.vlr-suite-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Adaptación Responsive */
@media (max-width: 860px) {
  .vlr-suite-center {
    display: none;
  }
  .vlr-suite-brand-tag {
    display: none;
  }
}
