html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin: 0;
  background: #0f172a; /* slate-900 */
  color: #e5e7eb; /* gray-200 */
}

/* Sidebar layout */
.devportal-sidebar {
  width: 260px;
  height: 100vh;
  background: linear-gradient(180deg, #111827 0%, #0b1220 100%);
  border-right: 1px solid rgba(255,255,255,0.06);
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1000;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width 0.3s ease, left 0.25s ease;
}
.sidebar-brand { color: #c7d2fe; padding: 11px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.sidebar-brand .brand-text { color: #c7d2fe; text-decoration: none; font-weight: 600; }
.sidebar-nav { padding: 12px 8px; }
.sidebar-nav .nav-link { color: #cbd5e1; border-radius: 10px; padding: 10px 12px; display: flex; align-items: center; background: transparent; border: 0; }
.sidebar-nav .nav-link:hover { background: rgba(99,102,241,0.12); color: #e0e7ff; }
.sidebar-footer { border-top: 1px solid rgba(255,255,255,0.06); }

/* Content */
.devportal-content { 
  margin-left: 260px; 
  min-height: 100vh; 
  display: flex; 
  flex-direction: column; 
  background: #0f172a;
  transition: margin-left 0.3s ease;
}
.content-header { 
  height: 58px; 
  border-bottom: 1px solid rgba(255,255,255,0.06); 
  padding: 0 16px; 
  background: rgba(255,255,255,0.02); 
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  position: relative;
  z-index: 100;
}
.content-main { 
  padding: 20px; 
  flex: 1;
}

/* Cards / panels */
.card-soft { background: #111827; border: 1px solid rgba(255,255,255,0.06); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,0.35); }
.card-soft .card-header { border-bottom: 1px solid rgba(255,255,255,0.06); background: transparent; color: #e5e7eb; }
.card-soft .card-body { color: #e5e7eb; }

/* Estilos para cards de issues en estimación */
#estimationContainer .issue-card {
  background-color: #1f2937;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #e5e7eb;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#estimationContainer .issue-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

#estimationContainer .issue-card .card-body {
  background-color: transparent;
  color: #e5e7eb;
  padding: 0.75rem 1rem;
}

#estimationContainer .issue-card .card-title {
  color: #f1f5f9;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0;
}

#estimationContainer .issue-card .card-text {
  color: #cbd5e1;
  font-size: 0.875rem;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

#estimationContainer .issue-card .form-label {
  color: #9ca3af;
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

#estimationContainer .issue-card .btn-group .btn {
  border-color: rgba(255,255,255,0.2);
  color: #e5e7eb;
  background-color: transparent;
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
  min-width: 45px;
}

#estimationContainer .issue-card .btn-group .btn:hover {
  background-color: rgba(99, 102, 241, 0.2);
  border-color: #6366f1;
  color: #e5e7eb;
}

#estimationContainer .issue-card .btn-group .btn.active {
  background-color: #6366f1;
  border-color: #6366f1;
  color: #fff;
}

#estimationContainer .issue-card .btn-group .btn:focus {
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

#estimationContainer .issue-card small.text-muted {
  color: #9ca3af;
  font-size: 0.75rem;
}

#estimationContainer .issue-card .issue-detail-btn-participant {
  border-color: rgba(59, 130, 246, 0.5);
  color: #60a5fa;
  background-color: transparent;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  transition: all 0.15s ease-in-out;
}

#estimationContainer .issue-card .issue-detail-btn-participant:hover {
  background-color: rgba(59, 130, 246, 0.1);
  border-color: #3b82f6;
  color: #93c5fd;
}

#estimationContainer .issue-card .issue-detail-btn-participant:focus {
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

/* Estilos para cards de revisión de estimación */
.review-issue-card {
  background-color: #1f2937;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #e5e7eb;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  width: 100%;
}

.review-issue-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.review-issue-card.border-success {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.25);
}

.review-issue-content {
  padding: 0.75rem 1rem;
}

.review-issue-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.review-issue-key {
  color: #60a5fa;
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0;
}

.review-issue-badge {
  background-color: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.review-issue-summary {
  color: #cbd5e1;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.review-issue-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
}

.review-issue-stats {
  display: flex;
  align-items: center;
  color: #9ca3af;
  font-size: 0.875rem;
}

.review-issue-stats strong {
  color: #e5e7eb;
}

.review-issue-select {
  flex-shrink: 0;
}

.review-issue-select .form-label {
  color: #9ca3af;
  font-size: 0.75rem;
  margin-bottom: 0.25rem;
}

.review-issue-select .form-select-sm {
  background-color: #111827;
  border: 1px solid rgba(255,255,255,0.1);
  color: #e5e7eb;
  font-size: 0.875rem;
}

.review-issue-select .form-select-sm:focus {
  background-color: #111827;
  border-color: rgba(99, 102, 241, 0.5);
  color: #e5e7eb;
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

.review-issue-select .form-select-sm option {
  background-color: #1f2937;
  color: #e5e7eb;
}

/* Dashboard específico */
.welcome-hero {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.welcome-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 80px;
  height: 80px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 50%;
  margin: 0 auto;
}

.welcome-main-icon {
  width: 40px;
  height: 40px;
  color: #6366f1;
}

.welcome-title {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-subtitle {
  font-size: 1.2rem;
  color: #94a3b8;
  font-weight: 400;
}

/* Tech cards */
.tech-card {
  background: #1e293b;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
  height: 100%;
}

.tech-card:hover {}

.tech-icon {
  width: 60px;
  height: 60px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.tech-icon i {
  width: 30px;
  height: 30px;
  color: #6366f1;
}

.tech-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 8px;
}

.tech-desc {
  font-size: 0.9rem;
  color: #94a3b8;
  margin-bottom: 16px;
  line-height: 1.5;
}

.tech-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tech-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 6px;
  color: #c7d2fe;
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.tech-link:hover {
  background: rgba(99, 102, 241, 0.2);
  color: #e0e7ff;
  text-decoration: none;
}

.tech-link i {
  width: 14px;
  height: 14px;
}

/* Skill cards */
.skill-card {
  background: #1e293b;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
  height: 100%;
}

.skill-card:hover {}

.skill-icon {
  width: 50px;
  height: 50px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.skill-icon i {
  width: 24px;
  height: 24px;
  color: #10b981;
}

.skill-title {
  font-size: 1rem;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 8px;
}

.skill-desc {
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.5;
}

/* Resource lists */
.resource-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.resource-list li {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.resource-list li:last-child {
  border-bottom: none;
}

.resource-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.2s ease;
}

.resource-list a:hover {
  color: #e0e7ff;
  text-decoration: none;
}

.resource-list i {
  width: 18px;
  height: 18px;
  color: #6366f1;
  flex-shrink: 0;
}

/* Links */
a { color: #93c5fd; }
a:hover { color: #bfdbfe; }

/* Submenús dropdown */
/* Limpieza de estilos tipo dropdown antiguos (evitar fondos blancos) */
.sidebar-nav .dropdown-menu { background: transparent; border: 0; box-shadow: none; margin: 0; padding: 0; }
.sidebar-nav .dropdown-item { background: transparent; }
.sidebar-nav .dropdown-header, .sidebar-nav .dropdown-divider { display: none; }

.sidebar-nav .dropdown-toggle::after {
  margin-left: auto;
  border-top: 4px solid;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  border-bottom: 0;
}

/* Responsive sidebar */
@media (max-width: 768px) {
  .devportal-sidebar { 
    position: fixed; 
    left: -260px; 
    transition: left 0.25s ease; 
    z-index: 1030; 
  }
  .devportal-sidebar.open { 
    left: 0; 
  }
  .devportal-content { 
    margin-left: 0; 
  }
  .sidebar-nav .dropdown-menu {
    position: static !important;
    transform: none !important;
    box-shadow: none;
    border: none;
    background: rgba(0,0,0,0.2);
    margin-left: 20px;
  }
}

/* Estado colapsado en escritorio */
.devportal-sidebar.collapsed { width: 64px; }
.devportal-content.sidebar-collapsed { margin-left: 64px; }
.devportal-sidebar .nav-text { display: inline; }
.devportal-sidebar.collapsed button.nav-link .nav-text { display: none; }
.devportal-sidebar .dropdown-chevron { transition: transform 0.2s ease; }
/* Rotación del chevron cuando el acordeón está expandido */
.sidebar-nav .nav-link[aria-expanded="true"] .dropdown-chevron { transform: rotate(180deg); }
/* En colapsado, no rotar chevron para evitar inconsistencias visuales */
.devportal-sidebar.collapsed .sidebar-nav .nav-link .dropdown-chevron { transform: none !important; }
/* Estado colapsado: centrar iconos y ocultar submenús */
.devportal-sidebar.collapsed .sidebar-brand { justify-content: center; }
.devportal-sidebar.collapsed .sidebar-brand .brand-text { display: none; }
.devportal-sidebar.collapsed .sidebar-nav .nav-link { justify-content: center; padding: 10px; }
.devportal-sidebar.collapsed .sidebar-nav .nav-link i { margin-right: 0 !important; }
.devportal-sidebar.collapsed .nav-item .collapse { display: none !important; }
.devportal-sidebar.collapsed .dropdown-chevron { display: none; }

/* Activo y hover */
.sidebar-nav .nav-link.active { background: rgba(99,102,241,0.15); color: #e0e7ff; font-weight: 600; }
.sidebar-nav .nav-link { color: #cbd5e1; border-radius: 10px; padding: 10px 12px; display: flex; align-items: center; }
.sidebar-nav .nav-link:hover { background: rgba(99,102,241,0.12); color: #e0e7ff; }

/* Tooltip nativo deshabilitado: evitamos duplicar info con títulos de flyout */
.devportal-sidebar.collapsed .sidebar-nav .nav-link { pointer-events: auto; }

/* Flyout lateral para submenús en colapsado */
.sidebar-flyout {
  position: fixed;
  top: 0;
  left: 64px; /* alineado al borde del sidebar; sin gap para evitar parpadeo */
  min-width: 240px;
  max-height: calc(100vh - 16px);
  background: #0b1220;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.2s ease;
  z-index: 1040;
  overflow-y: auto;
}
.sidebar-flyout .flyout-header { font-weight: 600; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.06); color: #cbd5e1; }
.sidebar-flyout .flyout-body .nav .nav-link { padding: 8px 12px; display: block; color: #e5e7eb; border-radius: 8px; font-weight: 500; }
.sidebar-flyout .flyout-body .nav .nav-link:hover { background: rgba(99,102,241,0.22); color: #ffffff; }

/* Mejora de contraste para enlaces generados con clase .flyout-link */
.sidebar-flyout .flyout-link { display:block; padding: 8px 12px; color: #e5e7eb; border-radius: 8px; }
.sidebar-flyout .flyout-link:hover { background: rgba(99,102,241,0.22); color: #ffffff; }
.sidebar-flyout.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.sidebar-flyout[inert] { pointer-events: none; }
.sidebar-flyout.open { transform: translateX(0); }
.sidebar-flyout .flyout-header { padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.06); color: #cbd5e1; }
.sidebar-flyout .nav .nav-link { padding: 8px 12px; }


/* Dropdown del usuario en header */
.content-header .dropdown-menu {
  z-index: 1050;
  background: #1e293b;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.content-header .dropdown-menu .dropdown-item {
  color: #cbd5e1;
}

.content-header .dropdown-menu .dropdown-item:hover {
  background: rgba(99,102,241,0.15);
  color: #e0e7ff;
}

/* Estilos para botón de logout en dropdown */
.content-header .dropdown-menu form {
  margin: 0;
  padding: 0;
}

.content-header .dropdown-menu form button.dropdown-item {
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0.5rem 1rem;
  font-size: inherit;
  font-family: inherit;
}

.content-header .dropdown-menu .dropdown-header {
  color: #e5e7eb;
}

.content-header .dropdown-menu .dropdown-divider {
  border-color: rgba(255,255,255,0.1);
}

/* Toasts */
.toast-container {
  z-index: 1080;
}

.toast {
  background-color: #1e293b !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #e5e7eb !important;
}

.toast.text-bg-success {
  background-color: #065f46 !important;
  border-color: #10b981 !important;
  color: #fff !important;
}

.toast.text-bg-info {
  background-color: #1e3a8a !important;
  border-color: #3b82f6 !important;
  color: #fff !important;
}

.toast.text-bg-warning {
  background-color: #78350f !important;
  border-color: #f59e0b !important;
  color: #fff !important;
}

.toast.text-bg-danger {
  background-color: #7f1d1d !important;
  border-color: #ef4444 !important;
  color: #fff !important;
}

.toast.text-bg-primary {
  background-color: #3730a3 !important;
  border-color: #6366f1 !important;
  color: #fff !important;
}

.toast-body {
  color: inherit !important;
}

.toast-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  background-color: rgba(0, 0, 0, 0.2) !important;
  color: inherit !important;
}

/* Estilos para tema oscuro - Componentes Bootstrap */
/* Modales */
.modal-content {
  background-color: #1e293b;
  border: 1px solid rgba(255,255,255,0.1);
  color: #e5e7eb;
}

.modal-header {
  border-bottom: 1px solid rgba(255,255,255,0.1);
  background-color: transparent;
}

.modal-title {
  color: #e5e7eb;
}

.modal-body {
  background-color: transparent;
  color: #e5e7eb;
}

.modal-footer {
  border-top: 1px solid rgba(255,255,255,0.1);
  background-color: transparent;
}

.btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* Formularios */
.form-control {
  background-color: #374151;
  border: 1px solid rgba(255,255,255,0.1);
  color: #e5e7eb;
}

.form-control:focus {
  background-color: #374151;
  border-color: #6366f1;
  color: #e5e7eb;
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

.form-control::placeholder {
  color: #9ca3af;
}

.form-control[readonly] {
  background-color: #1f2937 !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  color: #9ca3af !important;
  cursor: not-allowed;
}

.form-select {
  background-color: #374151;
  border: 1px solid rgba(255,255,255,0.1);
  color: #e5e7eb;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23e5e7eb' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
}

.form-select:disabled {
  background-color: #1f2937 !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  color: #6b7280 !important;
  cursor: not-allowed;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}

.form-select:focus {
  background-color: #374151;
  border-color: #6366f1;
  color: #e5e7eb;
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23e5e7eb' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}

#projectDropdownContainer {
  position: relative;
}

#projectKeyInput {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23e5e7eb' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
  padding-right: 2.5rem;
}

#boardInput {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23e5e7eb' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
  padding-right: 2.5rem;
}

#projectDropdown {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  margin-top: 0.25rem;
  background-color: #1e293b;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.375rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  min-width: 100%;
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
}

#projectDropdown::-webkit-scrollbar {
  width: 18px !important;
}

#projectDropdown::-webkit-scrollbar-track {
  background: #1f2937 !important;
  border-radius: 8px !important;
}

#projectDropdown::-webkit-scrollbar-thumb {
  background: #4b5563 !important;
  border-radius: 8px !important;
  border: 4px solid #1f2937 !important;
  min-height: 50px !important;
}

#projectDropdown::-webkit-scrollbar-thumb:hover {
  background: #6b7280 !important;
}

#projectDropdown::-webkit-scrollbar-thumb:active {
  background: #9ca3af !important;
}

#projectDropdown .dropdown-item {
  padding: 0.5rem 0.75rem;
  color: #e5e7eb;
  text-decoration: none;
  display: block;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background-color 0.15s ease-in-out;
}

#projectDropdown .dropdown-item:last-child {
  border-bottom: none;
}

#projectDropdown .dropdown-item:hover {
  background-color: #374151;
  color: #e5e7eb;
}

#projectDropdown .dropdown-item .fw-semibold {
  margin-bottom: 0.25rem;
}

#projectDropdown .dropdown-item .small {
  font-size: 0.875rem;
  opacity: 0.8;
}

#boardDropdownContainer {
  position: relative;
}

#boardDropdown {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  margin-top: 0.25rem;
  background-color: #1e293b;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.375rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  min-width: 100%;
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
}

#boardDropdown::-webkit-scrollbar {
  width: 18px !important;
}

#boardDropdown::-webkit-scrollbar-track {
  background: #1f2937 !important;
  border-radius: 8px !important;
}

#boardDropdown::-webkit-scrollbar-thumb {
  background: #4b5563 !important;
  border-radius: 8px !important;
  border: 4px solid #1f2937 !important;
  min-height: 50px !important;
}

#boardDropdown::-webkit-scrollbar-thumb:hover {
  background: #6b7280 !important;
}

#boardDropdown::-webkit-scrollbar-thumb:active {
  background: #9ca3af !important;
}

#boardDropdown .dropdown-item {
  padding: 0.5rem 0.75rem;
  color: #e5e7eb;
  text-decoration: none;
  display: block;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background-color 0.15s ease-in-out;
}

#boardDropdown .dropdown-item:last-child {
  border-bottom: none;
}

#boardDropdown .dropdown-item:hover {
  background-color: #374151;
  color: #e5e7eb;
}

#boardDropdown .dropdown-item .fw-semibold {
  margin-bottom: 0.25rem;
}

#boardDropdown .dropdown-item .small {
  font-size: 0.875rem;
  opacity: 0.8;
}

/* Estilos para modal de detalles de PBI estilo Jira */
.jira-issue-detail {
  color: #e5e7eb;
}

.jira-issue-detail h3 {
  color: #f1f5f9;
  font-weight: 600;
}

.jira-issue-detail label.text-muted {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
  display: block;
  margin-bottom: 0.25rem;
}

.jira-description {
  color: #e5e7eb;
  line-height: 1.6;
  font-size: 0.95rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}

.jira-description * {
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}

.jira-description code {
  background-color: #374151;
  color: #60a5fa;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
}

.jira-description strong {
  color: #f1f5f9;
  font-weight: 600;
}

.jira-description em {
  color: #cbd5e1;
  font-style: italic;
}

.modal-body::-webkit-scrollbar {
  width: 12px;
}

.modal-body::-webkit-scrollbar-track {
  background: #1f2937;
  border-radius: 6px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: #4b5563;
  border-radius: 6px;
  border: 2px solid #1f2937;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
}

/* Estilos para tabla de estimación */
.estimation-table {
  background-color: #1f2937;
  color: #e5e7eb;
  border-color: rgba(255,255,255,0.1);
}

.estimation-table thead {
  background-color: #374151;
  color: #e5e7eb;
  border-bottom: 2px solid rgba(255,255,255,0.1);
}

.estimation-table thead th {
  color: #e5e7eb;
  font-weight: 600;
  border-color: rgba(255,255,255,0.1);
  padding: 0.75rem;
}

.estimation-table tbody tr {
  border-color: rgba(255,255,255,0.05);
  transition: background-color 0.15s ease-in-out;
}

.estimation-table tbody tr:hover {
  background-color: #374151;
}

.estimation-table tbody td {
  color: #e5e7eb;
  border-color: rgba(255,255,255,0.05);
  padding: 0.75rem;
  vertical-align: middle;
}

.estimation-table tbody td strong {
  color: #e5e7eb;
  font-weight: 600;
}

.estimation-row-unestimated {
  background-color: rgba(255, 255, 255, 0.02);
  border-left: 3px solid rgba(234, 179, 8, 0.4);
}

.estimation-row-unestimated:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.estimation-row-estimated {
  background-color: transparent;
}

.estimation-row-estimated:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

.estimation-table .badge {
  color: #fff;
  font-weight: 500;
}

.estimation-table .badge.bg-secondary {
  background-color: #6b7280 !important;
}

.estimation-table .badge.bg-info {
  background-color: #3b82f6 !important;
}

.estimation-table input[type="checkbox"] {
  background-color: #374151;
  border-color: rgba(255,255,255,0.2);
  cursor: pointer;
  width: 1.1em;
  height: 1.1em;
  margin-top: 0.25em;
}

.estimation-table input[type="checkbox"]:checked {
  background-color: #6366f1;
  border-color: #6366f1;
}

.estimation-table input[type="checkbox"]:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

.estimation-table thead input[type="checkbox"] {
  background-color: #374151;
  border-color: rgba(255,255,255,0.2);
  cursor: pointer;
  width: 1.1em;
  height: 1.1em;
  margin-top: 0.25em;
}

.estimation-table thead input[type="checkbox"]:checked {
  background-color: #6366f1;
  border-color: #6366f1;
}

.estimation-table thead input[type="checkbox"]:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

#issuesContainer {
  background-color: #1f2937;
  border-color: rgba(255,255,255,0.1);
}

#issuesContainer::-webkit-scrollbar {
  width: 12px;
}

#issuesContainer::-webkit-scrollbar-track {
  background: #1f2937;
  border-radius: 6px;
}

#issuesContainer::-webkit-scrollbar-thumb {
  background: #4b5563;
  border-radius: 6px;
  border: 2px solid #1f2937;
}

#issuesContainer::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
}


.form-label {
  color: #e5e7eb;
}

.form-text {
  color: #9ca3af;
}

/* Tabs */
.nav-tabs {
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.nav-tabs .nav-link {
  color: #9ca3af;
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: 0.375rem 0.375rem 0 0;
}

.nav-tabs .nav-link:hover {
  color: #e5e7eb;
  background-color: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
}

.nav-tabs .nav-link.active {
  color: #e5e7eb;
  background-color: #1e293b;
  border-color: rgba(255,255,255,0.1) rgba(255,255,255,0.1) #1e293b;
}

.nav-tabs .nav-link.active:hover {
  color: #e5e7eb;
  background-color: #1e293b;
  border-color: rgba(255,255,255,0.1) rgba(255,255,255,0.1) #1e293b;
}

.tab-content {
  background-color: transparent;
}

/* Accordion */
.accordion {
  --bs-accordion-color: #e5e7eb;
  --bs-accordion-bg: #1e293b;
  --bs-accordion-transition: color 0.15s ease-in-out,background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,box-shadow 0.15s ease-in-out,border-radius 0.15s ease;
  --bs-accordion-border-color: rgba(255,255,255,0.1);
  --bs-accordion-border-width: 1px;
  --bs-accordion-border-radius: 0.375rem;
  --bs-accordion-inner-border-radius: calc(0.375rem - 1px);
  --bs-accordion-btn-padding-x: 1.25rem;
  --bs-accordion-btn-padding-y: 1rem;
  --bs-accordion-btn-color: #e5e7eb;
  --bs-accordion-btn-bg: #1e293b;
  --bs-accordion-btn-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23e5e7eb'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  --bs-accordion-btn-icon-width: 1.25rem;
  --bs-accordion-btn-icon-transform: rotate(-180deg);
  --bs-accordion-btn-icon-transition: transform 0.2s ease-in-out;
  --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23e5e7eb'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  --bs-accordion-btn-focus-border-color: #6366f1;
  --bs-accordion-btn-focus-box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.25);
  --bs-accordion-body-padding-x: 1.25rem;
  --bs-accordion-body-padding-y: 1rem;
  --bs-accordion-active-color: #e5e7eb;
  --bs-accordion-active-bg: #374151;
}

.accordion-button {
  color: #e5e7eb;
  background-color: #1e293b;
  border: 1px solid rgba(255,255,255,0.1);
}

.accordion-button:not(.collapsed) {
  color: #e5e7eb;
  background-color: #374151;
  border-color: rgba(255,255,255,0.1);
}

.accordion-button:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.25);
}

.accordion-body {
  color: #e5e7eb;
  background-color: #1e293b;
}

.accordion-item {
  background-color: #1e293b;
  border: 1px solid rgba(255,255,255,0.1);
}

/* Lista de preguntas */
.list-group-item {
  background-color: #1e293b;
  border: 1px solid rgba(255,255,255,0.1);
  color: #e5e7eb;
}

.list-group-item:hover {
  background-color: #374151;
}

.list-group-item:first-child {
  border-top-left-radius: 0.375rem;
  border-top-right-radius: 0.375rem;
}

.list-group-item:last-child {
  border-bottom-left-radius: 0.375rem;
  border-bottom-right-radius: 0.375rem;
}

/* Dropdowns */
.dropdown-menu {
  background-color: #1e293b;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.dropdown-item {
  color: #e5e7eb;
}

.dropdown-item:hover {
  background-color: rgba(99,102,241,0.15);
  color: #e0e7ff;
}

.dropdown-divider {
  border-color: rgba(255,255,255,0.1);
}

/* Botones */
.btn-outline-danger {
  color: #ef4444;
  border-color: #ef4444;
}

.btn-outline-danger:hover {
  background-color: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
}

.btn-outline-secondary {
  color: #9ca3af;
  border-color: #6b7280;
}

.btn-outline-secondary:hover {
  background-color: #6b7280;
  border-color: #6b7280;
  color: #ffffff;
}

.btn-outline-primary {
  color: #6366f1;
  border-color: #6366f1;
}

.btn-outline-primary:hover {
  background-color: #6366f1;
  border-color: #6366f1;
  color: #ffffff;
}

/* Alertas */
.alert {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.375rem;
}

.alert-danger {
  background-color: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.alert-warning {
  background-color: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fcd34d;
}

.alert-info {
  background-color: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

.alert-success {
  background-color: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

#promptOutput {
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  overflow-x: hidden;
}

.jira-preview {
  background-color: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  padding: 0;
  overflow: hidden;
}

.jira-preview-header {
  background-color: #0f172a;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.jira-preview-header h2 {
  color: #e5e7eb;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.5;
  margin: 0;
}

.jira-preview-content {
  padding: 20px;
  color: #e5e7eb;
  font-size: 14px;
  line-height: 1.6;
}

.jira-preview-content h3 {
  color: #e5e7eb;
  font-size: 16px;
  font-weight: 800;
  margin-top: 24px;
  margin-bottom: 8px;
  line-height: 1.5;
}

.jira-preview-content h3:first-child {
  margin-top: 0;
}

.jira-preview-content p {
  color: #e5e7eb;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.jira-preview-content p:last-child {
  margin-bottom: 0;
}

.jira-preview-content ul,
.jira-preview-content ol {
  color: #e5e7eb;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
  padding-left: 24px;
}

.jira-preview-content ul:last-child,
.jira-preview-content ol:last-child {
  margin-bottom: 0;
}

.jira-preview-content li {
  margin-bottom: 4px;
  line-height: 1.6;
}

.jira-preview-content li:last-child {
  margin-bottom: 0;
}

.json-editor-container {
  display: flex;
  position: relative;
  min-height: 400px;
  max-height: calc(100vh - 300px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.375rem;
  background-color: #1e293b;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

.json-editor {
  flex: 1 1 auto;
  min-width: 0;
  width: 0;
  padding: 0.75rem;
  margin: 0;
  border: 0;
  background: transparent;
  color: #e5e7eb;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  overflow-x: hidden;
  overflow-y: auto;
  outline: none;
  cursor: text;
  box-sizing: border-box;
}

.json-editor.json-editor-no-wrap {
  white-space: pre;
  word-wrap: normal;
  overflow-wrap: normal;
  overflow-x: auto;
}

.json-editor:empty:before {
  content: attr(data-placeholder);
  color: #6b7280;
  pointer-events: none;
}

.json-editor.json-editor-empty:before {
  content: attr(data-placeholder);
  color: #6b7280;
  pointer-events: none;
}

.json-editor::selection {
  background-color: rgba(59, 130, 246, 0.5);
}

.json-editor .json-key {
  color: #7dd3fc;
}

.json-editor .json-string {
  color: #86efac;
}

.json-editor .json-number {
  color: #fbbf24;
}

.json-editor .json-boolean {
  color: #a78bfa;
}

.json-editor .json-null {
  color: #f87171;
}

.spinning {
  animation: spin 1s linear infinite;
  display: inline-block;
}

.btn-spinner {
  position: absolute;
  left: 50%;
  top: 50%;
  animation: spin-absolute 1s linear infinite;
}

.btn-loading {
  position: relative;
}

.btn-loading-icon-only {
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-loading-text-hidden {
  opacity: 0;
  pointer-events: none;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes spin-absolute {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}