/* ========================================
   DASHBOARD STYLES
======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* CUSTOM SCROLLBAR */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 10, 31, 0.5);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  border-radius: 5px;
  border: 2px solid rgba(15, 10, 31, 0.5);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #a78bfa, #8b5cf6);
}

body {
  font-family: 'Inter', sans-serif;
  color: #fff;
  background: #0a0118;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  display: flex;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 20% 30%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 70%, rgba(109, 40, 217, 0.15) 0%, transparent 50%),
              radial-gradient(ellipse at 50% 50%, rgba(167, 139, 250, 0.1) 0%, transparent 50%);
  animation: gradientMove 20s ease infinite;
  z-index: -2;
  pointer-events: none;
}

@keyframes gradientMove {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -30px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

/* ========================================
   SIDEBAR
======================================== */

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 280px;
  height: 100vh;
  background: rgba(15, 10, 31, 0.95);
  backdrop-filter: blur(10px);
  border-right: 1px solid rgba(139, 92, 246, 0.15);
  padding: 1.5rem;
  overflow-y: auto;
  z-index: 900;
  display: flex;
  flex-direction: column;
  transition: all 0.4s ease;
}

html, body {
  min-height: 100%;
}

/* collapsed state reduces width */
.sidebar.collapsed {
  width: 92px;
  padding: 1.1rem 0.6rem;
  align-items: center;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
  height: auto;
  padding: 0.9rem 0.75rem;
  background: rgba(139, 92, 246, 0.08);
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.sidebar-header .sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
  justify-content: center;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.2rem;
  color: white;
  transition: all 0.3s ease;
}

.sidebar-logo img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.sidebar.collapsed .sidebar-logo span {
  display: none;
}

.sidebar.collapsed .sidebar-logo img {
  width: 38px;
  height: 38px;
  margin: 0 auto;
}

/* SIDEBAR NAV */
.sidebar-nav {
  flex: 1;
  margin-bottom: 2rem;
}

.sidebar.collapsed .sidebar-nav {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.nav-section {
  margin-bottom: 2.5rem;
}

.nav-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #8b5cf6;
  margin-bottom: 1rem;
  letter-spacing: 0.1em;
  padding: 0 0.5rem;
  opacity: 0.8;
}

.sidebar.collapsed .nav-label {
  display: none;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  border-radius: 10px;
  color: #cbd5e1;
  text-decoration: none;
  transition: all 0.3s ease;
  margin-bottom: 0.6rem;
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-link:hover {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
  padding-left: 1.3rem;
}

.nav-link.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.35) 0%, rgba(109, 40, 217, 0.25) 100%);
  color: #fff;
  border-left: 4px solid #a78bfa;
  padding-left: calc(1.1rem - 4px);
  box-shadow: inset -3px 0 10px rgba(139, 92, 246, 0.2);
}

.nav-link i {
  font-size: 1.2rem;
  min-width: 22px;
  text-align: center;
  transition: all 0.3s ease;
}

.nav-link:hover i {
  color: #a78bfa;
}

.nav-link.active i {
  color: #c4b5fd;
}

.admin-nav-link {
  margin-top: 0.5rem;
  border-top: 1px solid rgba(245, 158, 11, 0.2);
  padding-top: 0.85rem !important;
  color: #f59e0b !important;
}

.admin-nav-link i {
  color: #f59e0b !important;
}

.admin-nav-link:hover {
  background: rgba(245, 158, 11, 0.12) !important;
  color: #fbbf24 !important;
}

.admin-nav-link:hover i {
  color: #fbbf24 !important;
}

.sidebar.collapsed .nav-link {
  width: 56px;
  height: 56px;
  padding: 0;
  justify-content: center;
  margin: 0.6rem auto;
  border-radius: 16px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.18);
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.04);
}

.sidebar.collapsed .nav-link span {
  display: none;
}

.sidebar.collapsed .nav-link:hover {
  background: rgba(139, 92, 246, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(20, 10, 40, 0.25);
}

.sidebar.collapsed .nav-link i {
  margin: 0;
  font-size: 1.35rem;
}

.sidebar.collapsed .nav-link.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.45) 0%, rgba(109, 40, 217, 0.3) 100%);
  border: 1px solid rgba(167, 139, 250, 0.5);
  box-shadow: 0 12px 22px rgba(76, 29, 149, 0.35);
}

.sidebar.collapsed .admin-nav-link {
  border-top: none;
  margin-top: 0.8rem;
}

/* SIDEBAR USER */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(139, 92, 246, 0.12);
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.25);
  transition: all 0.3s ease;
}

.sidebar-user:hover {
  background: rgba(139, 92, 246, 0.18);
  border-color: rgba(139, 92, 246, 0.35);
}

.user-avatar {
  display: flex;
  align-items: center;
}

.user-avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.user-plan {
  font-size: 0.8rem;
  color: #a78bfa;
}

.sidebar.collapsed .user-info {
  display: none;
}

.sidebar.collapsed .sidebar-user {
  width: 60px;
  height: 60px;
  margin: 0.6rem auto 1rem;
  padding: 0;
  justify-content: center;
  align-items: center;
  border-radius: 18px;
  background: rgba(139, 92, 246, 0.16);
  border: 1.5px solid rgba(139, 92, 246, 0.35);
  flex-shrink: 0;
  flex-direction: column;
  transition: all 0.3s ease;
  cursor: pointer;
}

.sidebar.collapsed .sidebar-user:hover {
  background: rgba(139, 92, 246, 0.22);
  border-color: rgba(139, 92, 246, 0.5);
  transform: translateY(-1px);
}

.sidebar.collapsed .user-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar.collapsed .user-avatar img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

/* SCROLLBAR */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.3);
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.5);
}

/* Hide console for selected tabs */
.console-panel.hidden-console {
  display: none !important;
}

.content-wrapper.full-width {
  gap: 0;
}

/* ========================================
   MAIN CONTAINER
======================================== */

.main-container {
  flex: 1;
  margin-left: 280px;
  display: flex;
  flex-direction: column;
  transition: all 0.4s ease;
  min-height: 100vh;
}

/* when the sidebar collapses we must reduce the left margin so content doesn't shift excessively */
.sidebar.collapsed ~ .main-container {
  margin-left: 80px;
}

overlay {
  /* ensure any absolutely positioned content doesn't drift */
}

/* ========================================
   TOP BAR
======================================== */

.topbar {
  background: rgba(15, 10, 31, 0.6);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(139, 92, 246, 0.15);
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: 70px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #a78bfa;
  cursor: pointer;
  font-size: 1.3rem;
}

.topbar-toggle-mobile {
  display: none;
}
.sidebar-header .topbar-toggle {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid rgba(139, 92, 246, 0.25);
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.05);
  transition: all 0.25s ease;
}

.sidebar-toggle-below {
  width: 100%;
  height: 52px;
  padding: 0 1rem;
  border-radius: 12px;
  font-size: 1.15rem;
  color: #cbd5e1;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.18);
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.04);
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: flex-start;
}

.sidebar-toggle-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1.4rem;
  width: 100%;
  padding: 0 0.35rem;
}

.sidebar-toggle-below:hover {
  background: rgba(139, 92, 246, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(20, 10, 40, 0.25);
  color: #c4b5fd;
}

.sidebar-toggle-below:active {
  transform: translateY(0);
}

.sidebar.collapsed .sidebar-toggle-below {
  width: 56px;
  height: 56px;
  padding: 0;
  justify-content: center;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.45) 0%, rgba(109, 40, 217, 0.3) 100%);
  border: 1px solid rgba(167, 139, 250, 0.5);
  color: #fff;
  box-shadow: 0 12px 22px rgba(76, 29, 149, 0.35);
}

.sidebar-toggle-below span {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.sidebar.collapsed .sidebar-toggle-below span {
  display: none;
}

.sidebar-header .topbar-toggle:hover {
  background: rgba(139, 92, 246, 0.22);
  transform: translateY(-1px);
}

.sidebar.collapsed .sidebar-header .topbar-toggle {
  width: 40px;
  height: 40px;
  border-radius: 14px;
}

.topbar-content {
  flex: 1;
  min-width: 0;
}

.topbar-content h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.topbar-btn {
  background: none;
  border: none;
  color: #cbd5e1;
  cursor: pointer;
  font-size: 1.1rem;
  position: relative;
  transition: all 0.3s ease;
  padding: 0.5rem;
  border-radius: 8px;
}

.topbar-btn:hover {
  color: #a78bfa;
  background: rgba(139, 92, 246, 0.1);
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ef4444;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
}

/* USER MENU */
.user-menu {
  position: relative;
}

.user-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  transition: all 0.3s ease;
}

.user-menu-btn.active {
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
}

.user-menu-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-menu-btn:hover {
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

.user-dropdown {
  position: absolute;
  right: 0;
  top: 110%;
  background: rgba(15, 10, 31, 0.95);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 12px;
  min-width: 200px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000;
}

.user-menu.open .user-dropdown {
  display: flex;
}

.user-dropdown-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: rgba(139, 92, 246, 0.08);
  border-bottom: 1px solid rgba(139, 92, 246, 0.15);
}

.user-dropdown-profile img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
}

.user-dropdown-name {
  font-weight: 700;
  color: #f8fafc;
}

.user-dropdown-plan {
  font-size: 0.85rem;
  color: #cbd5e1;
}

.user-dropdown a {
  padding: 0.75rem 1rem;
  color: #cbd5e1;
  text-decoration: none;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-dropdown a:hover {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}

.user-dropdown hr {
  border: none;
  height: 1px;
  background: rgba(139, 92, 246, 0.15);
  margin: 0.5rem 0;
}

.user-dropdown a.danger:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

/* ========================================
   CONTENT WRAPPER
======================================== */

.content-wrapper {
  flex: 1;
  display: flex;
  gap: 2rem;
  padding: 2rem;
  overflow: visible;
  align-items: stretch;
}

/* CONSOLE PANEL */
.console-panel {
  flex: 0 0 35%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  max-height: calc(100vh - 160px);
  height: 100%;
}

.console-header {
  padding: 1.25rem;
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.console-header h3 {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
}

.console-header i {
  color: #a78bfa;
}

.console-menu-btn {
  background: none;
  border: none;
  color: #a78bfa;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.5rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.console-menu-btn:hover {
  background: rgba(139, 92, 246, 0.15);
}

.console-menu {
  position: absolute;
  right: 0;
  top: 100%;
  background: rgba(15, 10, 31, 0.95);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 8px;
  min-width: 180px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 500;
}

.console-menu-btn:hover ~ .console-menu,
.console-menu:hover {
  display: flex;
}

.console-menu button {
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  color: #cbd5e1;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
  font-size: 0.9rem;
}

.console-menu button:hover {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}

.console-menu button.danger {
  color: #fca5a5;
}

.console-menu button.danger:hover {
  background: rgba(239, 68, 68, 0.2);
}

.console-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem;
  font-family: 'Fira Code', monospace;
  font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-height: 0;
}

.console-content::-webkit-scrollbar {
  width: 8px;
}

.console-content::-webkit-scrollbar-track {
  background: transparent;
}

.console-content::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.5);
  border-radius: 4px;
  border: 2px solid rgba(0, 0, 0, 0.3);
}

.console-content::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.7);
}

.console-line {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
  color: #cbd5e1;
  line-height: 1.6;
  padding: 0.5rem 0;
  border-left: 3px solid transparent;
  padding-left: 0.75rem;
  transition: all 0.2s ease;
}

.console-line.info {
  color: #a78bfa;
  border-left-color: rgba(167, 139, 250, 0.4);
}

.console-line.success {
  color: #86efac;
  border-left-color: rgba(134, 239, 172, 0.4);
}

.console-line.warning {
  color: #fbbf24;
}

.console-line.error {
  color: #f87171;
  border-left-color: rgba(248, 113, 113, 0.4);
  font-weight: 600;
}

.timestamp {
  color: #6b7280;
  min-width: 75px;
  flex-shrink: 0;
}

.console-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  border-top: 1px solid rgba(139, 92, 246, 0.2);
  background: rgba(0, 0, 0, 0.2);
}

.prompt {
  color: #a78bfa;
  font-weight: 700;
  font-family: 'Fira Code', monospace;
}

#consoleInput {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  outline: none;
}

#consoleInput::placeholder {
  color: #6b7280;
}

/* ========================================
   MAIN CONTENT
======================================== */

.main-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: visible;
  padding-right: 0.5rem;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
  min-width: 0;
}

.main-content::-webkit-scrollbar {
  width: 6px;
}

.main-content::-webkit-scrollbar-track {
  background: transparent;
}

.main-content::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.3);
  border-radius: 3px;
}

.tab-content {
  display: block;
  animation: fadeIn 0.3s ease;
}

.tab-content.hidden {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* STATS GRID */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.dashboard-announcements {
  margin-bottom: 2rem;
}

.announcement-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.18) 0%, rgba(76, 29, 149, 0.12) 100%);
  border: 1px solid rgba(139, 92, 246, 0.3);
  box-shadow: 0 12px 24px rgba(20, 10, 40, 0.2);
}

.announcement-card.success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(139, 92, 246, 0.12) 100%);
  border-color: rgba(16, 185, 129, 0.3);
}

.announcement-card.warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(139, 92, 246, 0.12) 100%);
  border-color: rgba(245, 158, 11, 0.35);
}

.announcement-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 92, 246, 0.22);
  color: #ede9fe;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.announcement-content {
  flex: 1;
  min-width: 0;
}

.announcement-title {
  font-size: 1rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 0.2rem;
}

.announcement-message {
  font-size: 0.9rem;
  color: #cbd5e1;
}

.announcement-close {
  background: transparent;
  border: none;
  color: #cbd5e1;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.25rem;
}

/* ========================================
   YAML VSCODE EDITOR
======================================== */

.yaml-vscode {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: calc(100vh - 190px);
  height: 100%;
}

.yaml-editor-page .main-content {
  min-height: calc(100vh - 160px);
  display: flex;
  flex-direction: column;
}

.yaml-editor-page .yaml-vscode {
  flex: 1;
}

.yaml-vscode-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(15, 10, 31, 0.7);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 12px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.yaml-toolbar-left {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.yaml-toolbar-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.yaml-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #e2e8f0;
}

.yaml-pill.muted {
  opacity: 0.7;
}

.yaml-source-badge,
.yaml-modified-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #e2e8f0;
}

.yaml-source-badge.jar {
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.5);
  color: #fcd34d;
}

.yaml-source-badge.yaml {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.yaml-modified-badge {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.yaml-vscode-body {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 280px;
  gap: 1.25rem;
  align-items: stretch;
}

.yaml-vscode-sidebar,
.yaml-vscode-panel {
  background: rgba(15, 10, 31, 0.6);
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: 14px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-height: calc(100vh - 200px);
  overflow: auto;
}

.yaml-sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.yaml-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.yaml-sidebar-header h3 {
  font-size: 0.95rem;
  margin: 0;
  color: #f8fafc;
}

.yaml-sidebar-stats {
  font-size: 0.75rem;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.yaml-source-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 260px;
  overflow: auto;
}

.yaml-file-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 240px;
  overflow: auto;
}

.yaml-file-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(139, 92, 246, 0.08);
  color: #e2e8f0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.yaml-file-item.active {
  border-color: rgba(139, 92, 246, 0.5);
  background: rgba(139, 92, 246, 0.16);
}

.yaml-file-item:hover {
  border-color: rgba(139, 92, 246, 0.35);
}

.yaml-file-name {
  font-size: 0.8rem;
  font-weight: 600;
}

.yaml-file-meta {
  font-size: 0.7rem;
  color: #94a3b8;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.plugin-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.4rem 0.5rem;
  align-items: center;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(139, 92, 246, 0.08);
  cursor: pointer;
  transition: all 0.2s ease;
  color: #e2e8f0;
}

.plugin-item i {
  color: #a78bfa;
}

.plugin-item-text {
  font-size: 0.8rem;
  color: #e2e8f0;
}

.plugin-item-tag {
  font-size: 0.65rem;
  padding: 0.15rem 0.35rem;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
}

.plugin-item-tag.muted {
  opacity: 0.7;
}

.plugin-item-tag.origin {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

.plugin-item-tag.origin.uploaded {
  background: rgba(251, 191, 36, 0.2);
  color: #fcd34d;
}

.plugin-item.active {
  border-color: rgba(139, 92, 246, 0.5);
  background: rgba(139, 92, 246, 0.18);
}

.plugin-item:hover {
  border-color: rgba(139, 92, 246, 0.35);
}

.plugin-item-loader {
  font-size: 0.8rem;
  color: #94a3b8;
  padding: 0.5rem;
}

.yaml-empty {
  font-size: 0.85rem;
  color: #94a3b8;
  padding: 0.5rem 0.25rem;
}

.yaml-vscode-editor {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: rgba(12, 12, 24, 0.9);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 14px;
  padding: 1rem;
  min-height: 560px;
}

.yaml-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.yaml-file-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #e2e8f0;
  font-size: 0.9rem;
}

.yaml-file-meta-detail {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-left: 0.5rem;
}

.yaml-editor-tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.editor-tab {
  border: 1px solid rgba(139, 92, 246, 0.2);
  background: rgba(139, 92, 246, 0.08);
  color: #e2e8f0;
  padding: 0.35rem 0.6rem;
  font-size: 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.editor-tab.active {
  border-color: rgba(139, 92, 246, 0.5);
  background: rgba(139, 92, 246, 0.2);
}

.tab-close {
  font-size: 0.8rem;
  color: #94a3b8;
}

.tab-close:hover {
  color: #fca5a5;
}

.yaml-editor-container {
  flex: 1;
  background: #0f0f1a;
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 12px;
  overflow: hidden;
  min-height: 460px;
}

.yaml-editor-container .CodeMirror {
  height: 100%;
  font-family: 'Fira Code', monospace;
  font-size: 0.95rem;
  background: #0f0f1a;
}

.yaml-editor-container .CodeMirror-gutters {
  background: #0f0f1a;
  border-right: 1px solid rgba(139, 92, 246, 0.15);
}

.yaml-editor-container .CodeMirror-linenumber {
  color: #6b7280;
}

.yaml-editor-container .CodeMirror-cursor {
  border-left: 2px solid #a78bfa;
}

.yaml-editor-container .CodeMirror-selected {
  background: rgba(139, 92, 246, 0.25);
}

.yaml-editor-container .CodeMirror-activeline-background {
  background: rgba(139, 92, 246, 0.08);
}

.yaml-statusbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.75rem;
  color: #cbd5e1;
  padding-top: 0.25rem;
}

.yaml-preview-count {
  margin-left: auto;
}

.yaml-panel-section h3 {
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
  color: #f8fafc;
}

.yaml-insight-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.yaml-insight-card {
  padding: 0.65rem;
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.25);
  font-size: 0.75rem;
  color: #cbd5e1;
}

.yaml-insight-card strong {
  display: block;
  font-size: 1rem;
  color: #fff;
  margin-top: 0.2rem;
}

.yaml-placeholder-list,
.yaml-catalog-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 200px;
  overflow: auto;
}

.yaml-preview {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: rgba(10, 10, 20, 0.8);
  border-radius: 12px;
  padding: 0.75rem;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.sidebar.collapsed .sidebar-header {
  justify-content: center;
  padding: 0.6rem;
  margin-bottom: 2rem;
  width: 100%;
}
.yaml-preview-chat,
.yaml-preview-actionbar,
.yaml-preview-title {
  font-size: 0.8rem;
  color: #e2e8f0;
}

.yaml-preview-title #yamlPreviewTitle {
  font-weight: 700;
}

.yaml-preview-title #yamlPreviewSubtitle {
  font-size: 0.75rem;
  color: #cbd5e1;
}

@media (max-width: 1200px) {
  .yaml-vscode-body {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .yaml-vscode-panel {
    display: none;
  }
}

@media (max-width: 1100px) {
  .yaml-vscode-body {
    grid-template-columns: 1fr;
  }

  .yaml-vscode-sidebar {
    order: 2;
    max-height: none;
  }
}

.stat-box {
  padding: 1.5rem !important;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
}

.stat-box:hover {
  transform: translateY(-5px);
  border-color: rgba(139, 92, 246, 0.4);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-icon.success {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

.stat-icon.info {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

.stat-icon.warning {
  background: rgba(251, 191, 36, 0.2);
  color: #fcd34d;
}

.stat-icon.primary {
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
}

.stat-label {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

/* RECENT TRANSLATIONS */
.recent-translations {
  margin-top: 2rem;
}

.top-translations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.top-card {
  padding: 1.5rem;
  border-radius: 16px;
  background: rgba(15, 10, 35, 0.6);
  border: 1px solid rgba(139, 92, 246, 0.2);
  box-shadow: 0 12px 24px rgba(20, 10, 40, 0.25);
}

.top-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 1rem;
}

.top-card-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.top-card-sub {
  font-size: 0.85rem;
  color: #9ca3af;
}

.top-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.top-row {
  display: grid;
  grid-template-columns: 32px 44px 1fr auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.6rem 0.75rem;
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.15);
  will-change: transform;
  transition: transform 0.45s ease;
}

.top-rank {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #f8fafc;
  background: rgba(139, 92, 246, 0.25);
  border: 1px solid rgba(139, 92, 246, 0.35);
}

.top-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #f8fafc;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.4), rgba(59, 130, 246, 0.25));
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.2);
}

.top-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: cover;
}

.top-info {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.top-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
}

.top-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #8b5cf6, #60a5fa);
}

.top-count {
  font-size: 0.9rem;
  font-weight: 700;
  color: #e9d5ff;
}

.top-empty {
  text-align: center;
  padding: 1.5rem;
  color: #94a3b8;
  border: 1px dashed rgba(139, 92, 246, 0.2);
  border-radius: 12px;
}

.top-user-rank {
  margin-top: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.25);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.top-user-rank .rank-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(139, 92, 246, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f8fafc;
  font-weight: 700;
}

.top-user-rank .rank-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-user-rank .rank-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.top-user-rank .rank-name {
  font-weight: 600;
  color: #e2e8f0;
}

.top-user-rank .rank-meta {
  font-size: 0.85rem;
  color: #cbd5e1;
}



.recent-translations h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: white;
}

.table-responsive {
  overflow-x: auto;
}

.translations-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 12px;
  overflow: hidden;
}

.translations-table thead {
  background: rgba(139, 92, 246, 0.15);
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.translations-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 700;
  color: #a78bfa;
  font-size: 0.9rem;
}

.translations-table td {
  padding: 1rem;
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
  color: #cbd5e1;
}

.translations-table tbody tr:hover {
  background: rgba(139, 92, 246, 0.1);
}

.badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge.success {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

.action-btn {
  background: none;
  border: none;
  color: #a78bfa;
  cursor: pointer;
  padding: 0.5rem;
  transition: all 0.2s ease;
}

.action-btn:hover {
  color: #c4b5fd;
  transform: scale(1.2);
}

/* PAGINATION CONTROLS */
.pagination-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0;
  gap: 15px;
  flex-wrap: wrap;
  padding: 16px 0;
  border-top: 1px solid var(--border-color);
  background: var(--surface-secondary);
  border-radius: 0 0 8px 8px;
}

.pagination-info {
  font-size: 0.9rem;
  color: var(--text-secondary);
  min-width: 120px;
}

.pagination-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.pagination-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--surface-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  border-color: #8b5cf6;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn:active:not(:disabled) {
  transform: translateY(0);
}

.page-numbers {
  display: flex;
  gap: 5px;
  align-items: center;
}

.page-number-btn {
  min-width: 36px;
  height: 36px;
  padding: 0;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.2);
  color: #ffffff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.page-number-btn:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: #8b5cf6;
  color: #a78bfa;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

.page-number-btn.active {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  border-color: #8b5cf6;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
}

.page-ellipsis {
  color: var(--text-secondary);
  padding: 0 4px;
  font-weight: 500;
}

/* ========================================
   METRICS SECTION - Vercel/Linear Style
======================================== */

.metrics-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 32px;
}

.metrics-card {
  background: rgba(15, 10, 31, 0.6);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 12px;
  padding: 24px;
  backdrop-filter: blur(10px);
}

.metrics-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

/* Cycle Grid */
.metrics-cycle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.metric-cycle-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.metric-cycle-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric-cycle-label {
  font-size: 0.85rem;
  color: #a0aec0;
  font-weight: 500;
}

.metric-change {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
}

.metric-change.positive {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.metric-change.negative {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.metric-change.neutral {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}

.metric-cycle-value {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metric-big-number {
  font-size: 1.75rem;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.02em;
}

.metric-sublabel {
  font-size: 0.8rem;
  color: #64748b;
}

.metric-progress-bar {
  height: 6px;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}

.metric-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #8b5cf6, #a78bfa);
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.metric-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.metric-progress-fill.storage {
  background: linear-gradient(90deg, #22c55e, #4ade80);
}

.metric-progress-fill.processing {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

/* Cycle Bars */
.metrics-cycle-bars {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid rgba(139, 92, 246, 0.1);
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
  margin-bottom: 16px;
}

.cycle-bar-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cycle-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #cbd5e1;
}

.cycle-bar-label span:last-child {
  color: #94a3b8;
  font-weight: 500;
}

.cycle-bar-track {
  height: 8px;
  background: rgba(139, 92, 246, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.cycle-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #8b5cf6, #a78bfa);
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.cycle-bar-fill.processing {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.cycle-bar-fill.storage {
  background: linear-gradient(90deg, #22c55e, #4ade80);
}

.metrics-reset-notice {
  font-size: 0.85rem;
  color: #64748b;
}

.metrics-link {
  color: #a78bfa;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.metrics-link:hover {
  color: #c4b5fd;
}

/* Overview Header */
.metrics-overview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.metrics-date-selector {
  display: flex;
  align-items: center;
  gap: 12px;
}

.date-selector-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.date-selector-btn:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.3);
}

.date-selector-btn i {
  color: #a78bfa;
}

.date-compared {
  font-size: 0.85rem;
  color: #64748b;
}

.date-compare-select {
  padding: 8px 12px;
  background: rgba(15, 10, 31, 0.8);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
}

.date-compare-select:hover,
.date-compare-select:focus {
  border-color: rgba(139, 92, 246, 0.4);
}

/* Overview Grid */
.metrics-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.metric-overview-item {
  background: rgba(15, 10, 31, 0.4);
  border: 1px solid rgba(139, 92, 246, 0.1);
  border-radius: 10px;
  padding: 16px;
  transition: all 0.2s;
}

.metric-overview-item:hover {
  border-color: rgba(139, 92, 246, 0.25);
  background: rgba(15, 10, 31, 0.6);
}

.metric-overview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.metric-overview-label {
  font-size: 0.85rem;
  color: #a0aec0;
  font-weight: 500;
}

.metric-overview-value {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
}

.metric-from {
  font-size: 0.8rem;
  color: #64748b;
}

.metric-chart-container {
  height: 60px;
  position: relative;
}

.metric-chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}

/* Responsive */
@media (max-width: 1024px) {
  .metrics-cycle-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .metrics-overview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .topbar-toggle-mobile {
    display: inline-flex;
  }
  .metrics-cycle-grid {
    grid-template-columns: 1fr;
  }
  
  .metrics-overview-grid {
    grid-template-columns: 1fr;
  }
  
  .metrics-overview-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .metrics-date-selector {
    flex-wrap: wrap;
  }
}

/* UPLOAD CONTAINER */
.upload-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  padding: 2rem;
}

.upload-zone {
  padding: 3rem !important;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.upload-zone:hover {
  border-color: rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.08);
}

.upload-icon {
  font-size: 3rem;
  color: #a78bfa;
  margin-bottom: 1rem;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.upload-zone h2 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.upload-zone p {
  color: #9ca3af;
  margin-bottom: 1.5rem;
}

.upload-options {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.option-card {
  padding: 1.5rem !important;
}

.option-card h3 {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #e5e7eb;
  font-size: 0.9rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 8px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s ease;
}

.form-input:hover {
  border-color: rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.12);
}

.form-input:focus {
  outline: none;
  border-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.15);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Custom Dropdown para Idiomas */
.custom-dropdown {
  position: relative;
  width: 100%;
}

.dropdown-header {
  width: 100%;
  padding: 0.875rem 1.25rem;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(99, 102, 241, 0.08) 100%);
  border: 2px solid rgba(139, 92, 246, 0.3);
  border-radius: 10px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
}

.dropdown-header:hover {
  border-color: #8b5cf6;
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.25);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.13) 0%, rgba(99, 102, 241, 0.11) 100%);
}

.dropdown-header.active {
  border-color: #8b5cf6;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(99, 102, 241, 0.12) 100%);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.3);
}

.dropdown-arrow {
  transition: transform 0.3s ease;
  color: #a78bfa;
  font-size: 0.8rem;
}

.dropdown-header.active .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-content {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #16213e 0%, #1a0a2e 100%);
  border: 2px solid rgba(139, 92, 246, 0.3);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(139, 92, 246, 0.2);
  max-height: 360px;
  overflow-y: auto;
  z-index: 1000;
  backdrop-filter: blur(10px);
  opacity: 1;
  visibility: visible;
  transition: all 0.3s ease;
}

.dropdown-content.hidden {
  opacity: 0;
  visibility: hidden;
  top: calc(100% - 10px);
  pointer-events: none;
}

.dropdown-item {
  padding: 14px 18px;
  color: #cbd5e1;
  cursor: pointer;
  font-size: 1.05rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 14px;
  border-left: 3px solid transparent;
  letter-spacing: 0.5px;
}

.dropdown-item:hover {
  background: rgba(139, 92, 246, 0.2);
  color: #fff;
  border-left-color: #8b5cf6;
  padding-left: 20px;
  transform: translateX(2px);
}

.dropdown-item[data-selected="true"] {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.25) 0%, transparent 100%);
  color: #a78bfa;
  font-weight: 600;
  border-left-color: #8b5cf6;
  font-size: 1.08rem;
}

.dropdown-item[data-selected="true"]:hover {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.35) 0%, rgba(139, 92, 246, 0.1) 100%);
  color: #c4b5fd;
}

#languageSelect {
  display: none;
}

.form-group input[type="checkbox"] {
  margin-right: 0.5rem;
  cursor: pointer;
  accent-color: #8b5cf6;
  width: 18px;
  height: 18px;
  transition: all 0.2s ease;
}

.form-group input[type="checkbox"]:hover {
  accent-color: #a78bfa;
  transform: scale(1.1);
}

.form-group input[type="checkbox"]:checked {
  accent-color: #8b5cf6;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #cbd5e1;
  cursor: pointer;
  margin-bottom: 0.75rem;
}

.checkbox-label input {
  cursor: pointer;
  accent-color: #8b5cf6;
}

.btn-primary {
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  color: white;
  padding: 1rem 2rem;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(139, 92, 246, 0.4);
}

.btn-primary.btn-large {
  width: 100%;
  justify-content: center;
  padding: 1.25rem;
  font-size: 1rem;
}

.btn-secondary {
  background: transparent;
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #a78bfa;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-secondary:hover {
  border-color: rgba(139, 92, 246, 0.6);
  background: rgba(139, 92, 246, 0.1);
  color: #c4b5fd;
}

.btn-secondary.danger {
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.btn-secondary.danger:hover {
  border-color: rgba(239, 68, 68, 0.6);
  background: rgba(239, 68, 68, 0.1);
}

/* HISTORY CONTAINER */
.history-container {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.history-header {
  margin-bottom: 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.history-title-section h2 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.history-subtitle {
  color: #9ca3af;
  font-size: 0.95rem;
}

.history-filters {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

/* SEARCH WRAPPER */
.search-wrapper {
  position: relative;
  flex: 1;
  min-width: 280px;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(139, 92, 246, 0.2);
  border-radius: 0.6rem;
  transition: all 0.3s ease;
  padding: 0 1rem;
}

.search-wrapper:focus-within {
  border-color: rgba(139, 92, 246, 0.6);
  background: rgba(139, 92, 246, 0.08);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

.search-wrapper i:first-child {
  color: #a78bfa;
  margin-right: 0.75rem;
  font-size: 0.95rem;
  pointer-events: none;
}

.history-search {
  flex: 1;
  background: transparent;
  border: none;
  color: #f3f4f6;
  padding: 0.85rem 0;
  font-size: 0.95rem;
  outline: none;
}

.history-search::placeholder {
  color: #9ca3af;
}

.search-clear {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.search-clear:hover {
  color: #a78bfa;
}

/* FILTER WRAPPER */
.filter-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(139, 92, 246, 0.2);
  border-radius: 0.6rem;
  padding: 0 0.9rem;
  transition: all 0.3s ease;
  min-width: 180px;
  overflow: visible;
}

.filter-wrapper.language-filter-custom {
  overflow: visible;
  z-index: 100;
  min-width: 220px;
}

.filter-wrapper.status-filter-custom {
  min-width: 200px;
}

.filter-wrapper:focus-within {
  border-color: rgba(139, 92, 246, 0.6);
  background: rgba(139, 92, 246, 0.08);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

.filter-wrapper i:first-child {
  color: #a78bfa;
  margin-right: 0.6rem;
  font-size: 0.95rem;
  pointer-events: none;
}

.filter-wrapper i:last-child {
  position: absolute;
  right: 0.9rem;
  color: #a78bfa;
  font-size: 0.8rem;
  pointer-events: none;
}

.history-filter-select {
  flex: 1;
  background: transparent;
  border: none;
  color: #f3f4f6;
  padding: 0.85rem 0;
  font-size: 0.95rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 1.8rem;
}

.history-filter-select option {
  background: #1f2937;
  color: #f3f4f6;
  padding: 0.5rem;
}

.history-filter-select option:checked {
  background: linear-gradient(#8b5cf6, #8b5cf6);
  background-color: #8b5cf6;
}

.history-filter-select:hover {
  color: #a78bfa;
}

/* CUSTOM LANGUAGE FILTER DROPDOWN */
.language-filter-custom {
  min-width: 200px;
}

.language-filter-btn {
  flex: 1;
  position: relative;
  background: transparent;
  border: none;
  color: #f3f4f6;
  padding: 0.85rem 2.5rem 0.85rem 1rem;
  font-size: 0.95rem;
  cursor: pointer;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  text-align: left;
  white-space: nowrap;
}

.language-filter-btn span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  margin-right: 0;
}

.language-filter-btn i {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.2s ease;
}

.language-filter-btn.active i {
  transform: translateY(-50%) rotate(180deg);
}

.status-filter-btn i {
  transition: transform 0.2s ease;
}

.status-filter-btn.active i {
  transform: rotate(180deg);
}

.language-filter-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  min-width: 200px;
  background: #1f2937;
  border: 1.5px solid rgba(139, 92, 246, 0.3);
  border-radius: 0.6rem;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1001;
  display: none;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.language-filter-dropdown.active {
  display: block;
  pointer-events: auto;
  animation: slideDown 0.2s ease-out;
}

.status-filter-dropdown.active {
  display: block;
  pointer-events: auto;
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.language-filter-item {
  padding: 0.75rem 1rem;
  color: #f3f4f6;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.language-filter-item:hover {
  background: rgba(139, 92, 246, 0.15);
  border-left-color: #8b5cf6;
  padding-left: calc(1rem - 3px);
}

.language-filter-item[data-value=""] {
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
  margin-bottom: 0.5rem;
  color: #9ca3af;
}

.language-filter-item .flag-icon-img {
  font-size: 1.3rem;
  line-height: 1.3rem;
  height: 1.1rem;
  width: 1.46rem;
  flex-shrink: 0;
}

.language-filter-item.active {
  background: rgba(139, 92, 246, 0.2);
  border-left-color: #a78bfa;
  font-weight: 500;
}

/* STATUS FILTER DROPDOWN */
.status-filter-custom {
  min-width: 180px;
}

.status-filter-btn {
  flex: 1;
  position: relative;
  background: transparent;
  border: none;
  color: #f3f4f6;
  padding: 0.85rem 2.5rem 0.85rem 1rem;
  font-size: 0.95rem;
  cursor: pointer;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  text-align: left;
  white-space: nowrap;
}

.status-filter-btn span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  margin-right: 0;
}

.status-filter-btn i {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.2s ease;
}

.status-filter-btn.active i {
  transform: translateY(-50%) rotate(180deg);
}

.status-filter-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  min-width: 200px;
  background: #1f2937;
  border: 1.5px solid rgba(139, 92, 246, 0.3);
  border-radius: 0.6rem;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1001;
  display: none;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.status-filter-dropdown.active {
  display: block;
  pointer-events: auto;
  animation: slideDown 0.2s ease-out;
}



.status-filter-item {
  padding: 0.75rem 1rem;
  color: #f3f4f6;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.status-filter-item:hover {
  background: rgba(139, 92, 246, 0.15);
  border-left-color: #8b5cf6;
  padding-left: calc(1rem - 3px);
}

.status-filter-item[data-value=""] {
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
  margin-bottom: 0.5rem;
  color: #9ca3af;
}

.status-filter-item i {
  font-size: 0.95rem;
  flex-shrink: 0;
}

.status-filter-item.active {
  background: rgba(139, 92, 246, 0.2);
  border-left-color: #a78bfa;
  font-weight: 500;
}

/* HISTORY STATS */
.history-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.stat-box {
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(59, 130, 246, 0.15));
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
}

.stat-box:hover {
  border-color: rgba(139, 92, 246, 0.5);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(59, 130, 246, 0.25));
}

.stat-box i {
  font-size: 1.5rem;
  color: #a78bfa;
}

.stat-label {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-bottom: 0.3rem;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: #f3f4f6;
}

/* HISTORY LIST - GRID CARDS */
.history-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* HISTORY CARD */
.history-card {
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 0.75rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  cursor: pointer;
}

.history-card:hover {
  border-color: rgba(139, 92, 246, 0.5);
  background: rgba(17, 24, 39, 0.8);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.15);
}

.history-card-header {
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(59, 130, 246, 0.15));
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.history-card-icon {
  font-size: 1.6rem;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.35) 0%, rgba(76, 29, 149, 0.25) 100%);
  border-radius: 16px;
  color: #ede9fe;
  border: 1px solid rgba(167, 139, 250, 0.45);
  box-shadow: 0 10px 18px rgba(20, 10, 40, 0.3), inset 0 0 0 1px rgba(139, 92, 246, 0.15);
  flex-shrink: 0;
}

.history-card[data-status="success"] .history-card-icon {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.25) 0%, rgba(139, 92, 246, 0.25) 100%);
  border-color: rgba(74, 222, 128, 0.3);
}

.history-card[data-status="pending"] .history-card-icon {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(139, 92, 246, 0.25) 100%);
  border-color: rgba(251, 191, 36, 0.35);
}

.history-card[data-status="error"] .history-card-icon {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25) 0%, rgba(139, 92, 246, 0.25) 100%);
  border-color: rgba(248, 113, 113, 0.35);
}

.history-card-status {
  padding: 0.35rem 0.75rem;
  border-radius: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.history-card-status.success {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.history-card-status.pending {
  background: rgba(251, 191, 36, 0.2);
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.4);
}

.history-card-status.error {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.history-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.history-card-title {
  font-weight: 600;
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #9ca3af;
}

.history-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.history-meta-item i {
  color: #a78bfa;
  min-width: 16px;
}

.history-card-language {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(139, 92, 246, 0.15);
  padding: 0.4rem 0.8rem;
  border-radius: 0.35rem;
  font-size: 0.9rem;
  font-weight: 500;
  width: fit-content;
}

.history-card-language .flag-icon-img {
  font-size: 1.2rem;
  line-height: 1.2rem;
  height: 1rem;
  width: 1.33rem;
}

.history-card-language i.fas {
  font-size: 1rem;
  width: auto;
}

.history-card-progress {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.history-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.history-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #a78bfa, #8b5cf6);
  border-radius: 3px;
  transition: width 0.3s ease;
  animation: progressPulse 2s ease-in-out infinite;
}

@keyframes progressPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

.history-progress-text {
  font-size: 0.8rem;
  color: #9ca3af;
  text-align: right;
}

.history-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.history-tag {
  padding: 0.3rem 0.6rem;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 0.25rem;
  font-size: 0.75rem;
  color: #a78bfa;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.history-card-footer {
  padding: 1.5rem;
  border-top: 1px solid rgba(139, 92, 246, 0.2);
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.history-btn {
  flex: 1;
  padding: 0.65rem 1rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 100px;
}

.history-btn.primary {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  border: 1px solid rgba(139, 92, 246, 0.5);
}

.history-btn.primary:hover {
  background: linear-gradient(135deg, #a78bfa, #8b5cf6);
  border-color: rgba(139, 92, 246, 0.8);
  box-shadow: 0 5px 15px rgba(139, 92, 246, 0.3);
}

.history-btn.secondary {
  background: rgba(139, 92, 246, 0.1);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.history-btn.secondary:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.6);
}

.history-btn.danger {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.history-btn.danger:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.6);
}

.history-btn i {
  font-size: 0.9rem;
}

/* EMPTY STATE */
.history-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
}

.history-empty.hidden {
  display: none;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: 400px;
  margin: 0 auto;
}

.empty-state i {
  font-size: 4rem;
  color: rgba(139, 92, 246, 0.3);
}

.empty-state h3 {
  font-size: 1.3rem;
  margin: 0;
}

.empty-state p {
  color: #9ca3af;
  margin: 0;
  font-size: 0.95rem;
}

.empty-state .btn-primary {
  margin-top: 1rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .history-header {
    flex-direction: column;
    align-items: stretch;
  }

  .history-filters {
    width: 100%;
    flex-direction: column;
  }

  .search-wrapper {
    min-width: auto;
    width: 100%;
  }

  .filter-wrapper {
    min-width: auto;
    width: 100%;
  }

  .history-list {
    grid-template-columns: 1fr;
  }

  .history-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .history-container {
    padding: 1rem;
  }

  .history-stats {
    grid-template-columns: 1fr;
  }

  .history-card-footer {
    flex-direction: column;
  }

  .history-btn {
    width: 100%;
  }
}

.history-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.status {
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status.success {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

/* SETTINGS CONTAINER */
.settings-container {
  padding: 2rem;
}

.settings-container h2 {
  font-size: 1.3rem;
  margin-bottom: 2rem;
}

.settings-section {
  padding: 2rem !important;
  margin-bottom: 2rem;
}

.settings-section h3 {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: white;
}

/* DOCUMENTATION SECTION */
.documentation-section {
  margin-top: 3rem;
}

.doc-header {
  margin-bottom: 2.5rem;
}

.doc-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
}

.doc-header h2 {
  font-size: 1.5rem;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
}

.btn-doc-explorer {
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  white-space: nowrap;
}

.btn-doc-explorer:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(139, 92, 246, 0.3);
}

.btn-doc-explorer:active {
  transform: translateY(-1px);
}

.doc-header p {
  color: #cbd5e1;
  font-size: 0.95rem;
}

.doc-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.doc-card {
  padding: 2rem !important;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.doc-card:hover {
  transform: translateY(-8px);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 15px 40px rgba(139, 92, 246, 0.2);
}

.doc-icon {
  font-size: 2.5rem;
  color: #a78bfa;
  margin-bottom: 1rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 12px;
}

.doc-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: #fff;
}

.doc-card p {
  color: #cbd5e1;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  flex: 1;
}

.doc-link {
  color: #a78bfa;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
}

.doc-link:hover {
  color: #c4b5fd;
  gap: 0.5rem;
}

/* DOCUMENTATION MODAL */
.doc-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.doc-modal.active {
  display: flex;
}

.doc-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  cursor: pointer;
}

.doc-modal-content {
  position: relative;
  z-index: 1001;
  background: rgba(15, 10, 31, 0.95);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 24px;
  width: 90%;
  max-width: 1000px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px rgba(139, 92, 246, 0.3);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.doc-modal-header {
  padding: 2rem;
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.doc-modal-header h2 {
  font-size: 1.8rem;
  color: #fff;
  margin: 0;
}

.doc-modal-close {
  background: none;
  border: none;
  color: #a78bfa;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.doc-modal-close:hover {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  transform: scale(1.1);
}

.doc-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
}

.doc-section-content {
  color: #cbd5e1;
  line-height: 1.8;
}

.doc-section-content h3 {
  font-size: 1.5rem;
  color: #c4b5fd;
  margin-bottom: 1rem;
}

.doc-section-content p {
  margin-bottom: 1rem;
  font-size: 1rem;
}

.doc-section-content ul {
  list-style: none;
  padding-left: 2rem;
  margin-bottom: 1rem;
}

.doc-section-content li {
  margin-bottom: 0.75rem;
  position: relative;
}

.doc-section-content li:before {
  content: "→";
  position: absolute;
  left: -1.5rem;
  color: #a78bfa;
  font-weight: bold;
}

.doc-section-content code {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-family: 'Fira Code', monospace;
  color: #c4b5fd;
}

.doc-section-content pre {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 8px;
  padding: 1.5rem;
  overflow-x: auto;
  margin-bottom: 1rem;
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
}

.doc-modal-toc {
  border-top: 1px solid rgba(139, 92, 246, 0.2);
  padding: 1.5rem;
  background: rgba(139, 92, 246, 0.05);
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
}

.doc-modal-toc h4 {
  font-size: 1rem;
  color: #a78bfa;
  margin-bottom: 1rem;
  margin-top: 0;
}

.doc-toc-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.doc-toc-list li {
  flex: 1;
  min-width: 150px;
}

.doc-toc-list a {
  color: #cbd5e1;
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 6px;
}

.doc-toc-list a:hover {
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.1);
  padding-left: 1rem;
}

.doc-toc-list a.active {
  color: #a78bfa;
  background: rgba(139, 92, 246, 0.2);
  border-left: 3px solid #a78bfa;
  padding-left: 1rem;
  font-weight: 600;
}

.doc-toc-list a.active i {
  color: #a78bfa;
}

/* BILLING CONTAINER */
.billing-container {
  padding: 2rem;
}

.billing-container h2 {
  font-size: 1.3rem;
  margin-bottom: 2rem;
}

.plan-info {
  padding: 2rem !important;
  margin-bottom: 2rem;
  text-align: center;
}

.plan-info h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.plan-info > p:nth-child(2) {
  font-size: 2rem;
  font-weight: 800;
  color: #a78bfa;
  margin-bottom: 0.5rem;
}

.plan-desc {
  color: #9ca3af;
  margin-bottom: 1.5rem;
}

.invoices {
  margin-top: 2rem;
}

.invoices h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.invoice-item {
  padding: 1.5rem !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.invoice-item:hover {
  border-color: rgba(139, 92, 246, 0.4);
}

.invoice-number {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.invoice-date {
  font-size: 0.85rem;
  color: #9ca3af;
}

.invoice-amount {
  font-size: 1.2rem;
  font-weight: 700;
  color: #a78bfa;
}

/* API CONTAINER */
.api-container {
  padding: 2rem;
}

.api-container h2 {
  font-size: 1.3rem;
  margin-bottom: 2rem;
}

.api-key-section {
  padding: 2rem !important;
  margin-bottom: 2rem;
}

.api-key-section h3 {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.api-key-display {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-family: 'Fira Code', monospace;
}

.api-key-display code {
  flex: 1;
  overflow-x: auto;
  color: #a78bfa;
}

.api-docs {
  padding: 2rem !important;
}

.api-docs h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.api-docs p {
  color: #cbd5e1;
  margin-bottom: 1rem;
}

.api-link {
  color: #8b5cf6;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  display: inline-block;
}

.api-link:hover {
  color: #a78bfa;
  text-decoration: underline;
}

/* GLASS CARD */
.glass-card {
  background: rgba(139, 92, 246, 0.05);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 16px;
  padding: 1.5rem;
}

/* YAML EDITOR STYLES */

.yaml-container {
  padding: 2rem;
}

.yaml-header {
  margin-bottom: 2rem;
}

.yaml-header h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: white;
}

.yaml-header p {
  color: #9ca3af;
  font-size: 0.95rem;
}

.yaml-editor-wrapper {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.file-selector {
  padding: 1.5rem;
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 16px;
  height: fit-content;
}

.file-selector h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: white;
  font-weight: 600;
}

.yaml-editor-box {
  display: flex;
  flex-direction: column;
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 16px;
  overflow: hidden;
}

.editor-toolbar {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  background: rgba(139, 92, 246, 0.1);
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
  flex-wrap: wrap;
}

.toolbar-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #a78bfa;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.toolbar-btn:hover {
  background: rgba(139, 92, 246, 0.3);
  border-color: rgba(139, 92, 246, 0.5);
  color: #c4b5fd;
}

.yaml-editor {
  flex: 1;
  background: #0f0a1f;
  color: #cbd5e1;
  border: none;
  padding: 1.5rem;
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  resize: vertical;
  min-height: 400px;
  outline: none;
}

.yaml-editor::selection {
  background: rgba(139, 92, 246, 0.4);
}

.yaml-editor::placeholder {
  color: #6b7280;
}

.yaml-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.yaml-actions .btn-primary,
.yaml-actions .btn-secondary {
  flex: 1;
}

/* ========================================
   CONSOLA MEJORADA
======================================== */

.console-content {
  height: 100%;
  overflow-y: auto !important;
  overflow-x: hidden;
  padding: 1rem;
}

.console-panel {
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 246, 0.3) transparent;
}

.console-panel::-webkit-scrollbar {
  width: 6px;
}

.console-panel::-webkit-scrollbar-track {
  background: transparent;
}

.console-panel::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.3);
  border-radius: 3px;
}

.console-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.5);
}

/* ========================================
   UPLOAD MEJORADO
======================================== */

.upload-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.upload-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.upload-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* UPLOAD ZONE */
.upload-zone {
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 3rem 2rem;
  text-align: center;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-zone:hover {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-2px);
}

.upload-state-idle,
.upload-state-uploading,
.upload-state-processing,
.upload-state-complete {
  width: 100%;
}

.upload-state-idle {
  animation: fadeIn 0.3s ease;
}

.upload-state-uploading {
  animation: fadeIn 0.3s ease;
}

.upload-state-processing {
  animation: fadeIn 0.3s ease;
}

.upload-state-complete {
  animation: fadeIn 0.3s ease;
}

.upload-icon,
.uploading-spinner,
.processing-spinner,
.complete-icon {
  font-size: 3rem;
  color: #a78bfa;
  margin-bottom: 1rem;
}

.complete-icon {
  color: #10b981;
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(139, 92, 246, 0.2);
  border-radius: 4px;
  overflow: hidden;
  margin: 1.5rem 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #8b5cf6, #a78bfa);
  border-radius: 4px;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

#uploadPercentage {
  font-size: 1.2rem;
  font-weight: 700;
  color: #a78bfa;
  margin-top: 0.75rem;
}

/* LANGUAGE HOTBAR */
.upload-options {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2rem;
}

.upload-options h3 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.language-hotbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1.5rem;
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 12px;
  align-items: center;
}

.lang-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  background: rgba(139, 92, 246, 0.05);
  border: 2px solid rgba(139, 92, 246, 0.2);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 80px;
  text-align: center;
}

.lang-btn:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-4px);
}

.lang-btn.active {
  background: rgba(139, 92, 246, 0.15);
  border-color: #8b5cf6;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.lang-btn .flag-icon-img {
  font-size: 2rem;
  line-height: 2rem;
  height: 1.75rem;
  width: 2.33rem;
}

.lang-label {
  font-size: 0.75rem;
  color: #cbd5e1;
  font-weight: 600;
  text-transform: uppercase;
}

.lang-btn.active .lang-label {
  color: #a78bfa;
}

.upload-form-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.upload-form-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #a78bfa;
}

.upload-form-group label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  margin: 0;
  flex: 1;
}

.btn-large {
  width: 100%;
  padding: 1rem 2rem;
  font-size: 1.05rem;
}

/* UPLOAD CONSOLE SECTION */

/* RECENT TRANSLATIONS CARDS */
.upload-recent-section {
  padding-top: 2rem;
  border-top: 1px solid rgba(139, 92, 246, 0.2);
}

.upload-recent-section h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.upload-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.upload-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 2rem;
  color: #a0aec0;
  background: rgba(139, 92, 246, 0.05);
  border-radius: 12px;
  border: 2px dashed rgba(139, 92, 246, 0.2);
}

.upload-empty-state i {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
  opacity: 0.5;
}

.upload-card {
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.upload-card:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.15);
}

.upload-card-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.upload-card-icon {
  width: 50px;
  height: 50px;
  background: rgba(139, 92, 246, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #a78bfa;
  flex-shrink: 0;
}

.upload-card-info {
  flex: 1;
  min-width: 0;
}

.upload-card-name {
  font-weight: 700;
  color: #a78bfa;
  word-break: break-word;
  margin-bottom: 0.25rem;
}

.upload-card-date {
  font-size: 0.85rem;
  color: #cbd5e1;
}

.upload-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.upload-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.upload-badge.lang {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.upload-badge.status {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.upload-badge.status.completed {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.upload-card-size {
  font-size: 0.9rem;
  color: #a0aec0;
}

.upload-card-actions {
  display: flex;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(139, 92, 246, 0.1);
}

.upload-card-btn {
  flex: 1;
  padding: 0.6rem 1rem;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  color: #a78bfa;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.upload-card-btn:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: #a78bfa;
}

.upload-card-btn.danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.upload-card-btn.danger:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #fca5a5;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ========================================
   API DOCS MEJORADA
======================================== */

.api-container {
  max-width: 1200px;
  margin: 0 auto;
}

.api-header {
  text-align: center;
  margin-bottom: 3rem;
}

.api-header h1 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.api-header p {
  color: #cbd5e1;
  font-size: 1.1rem;
}

.api-section {
  margin-bottom: 2rem;
  padding: 2rem;
}

.api-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.api-section h2 i {
  color: #a78bfa;
}

.api-subsection {
  margin-bottom: 2rem;
}

.api-subsection h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: #a78bfa;
}

.code-block {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 8px;
  padding: 1.25rem;
  overflow-x: auto;
  position: relative;
  margin: 1rem 0;
}

.code-block code {
  font-family: 'Fira Code', monospace;
  font-size: 0.85rem;
  color: #a78bfa;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.btn-copy {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(139, 92, 246, 0.2);
  border: none;
  color: #a78bfa;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.btn-copy:hover {
  background: rgba(139, 92, 246, 0.4);
  color: #fff;
}

.endpoint {
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.endpoint-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.method {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: #fff;
}

.method.get {
  background: #3b82f6;
}

.method.post {
  background: #10b981;
}

.method.put {
  background: #f59e0b;
}

.method.delete {
  background: #ef4444;
}

.endpoint-path {
  font-family: 'Fira Code', monospace;
  color: #a78bfa;
  font-weight: 600;
}

.endpoint-desc {
  color: #cbd5e1;
  margin-bottom: 1rem;
}

.endpoint-subsection {
  margin-top: 1.5rem;
}

.endpoint-subsection h4 {
  color: #a78bfa;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.params-table,
.errors-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.params-table th,
.errors-table th {
  background: rgba(139, 92, 246, 0.1);
  padding: 1rem;
  text-align: left;
  font-weight: 700;
  color: #a78bfa;
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.params-table td,
.errors-table td {
  padding: 1rem;
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
  color: #cbd5e1;
}

.params-table td:first-child,
.errors-table td:first-child {
  font-family: 'Fira Code', monospace;
  color: #a78bfa;
  font-weight: 600;
}

.params-table tr:hover,
.errors-table tr:hover {
  background: rgba(139, 92, 246, 0.05);
}

.rate-limits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.rate-limit-item {
  background: rgba(139, 92, 246, 0.05);
  border-left: 4px solid rgba(139, 92, 246, 0.3);
  padding: 1.5rem;
  border-radius: 8px;
}

.rate-limit-item.premium {
  border-left-color: #10b981;
  background: rgba(16, 185, 129, 0.05);
}

.rate-limit-item h3 {
  margin-bottom: 1rem;
  color: #a78bfa;
}

.rate-limit-item.premium h3 {
  color: #10b981;
}

.limit {
  margin-bottom: 0.75rem;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.limit strong {
  color: #a78bfa;
}

.rate-limit-item.premium .limit strong {
  color: #10b981;
}

.rate-limits-info {
  background: rgba(139, 92, 246, 0.05);
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 1.5rem;
}

.rate-limits-info p {
  margin-bottom: 1rem;
}

.auth-info {
  background: rgba(139, 92, 246, 0.05);
  padding: 1.5rem;
  border-radius: 8px;
  margin: 1.5rem 0;
  border-left: 4px solid #a78bfa;
}

.info-item {
  margin-bottom: 1rem;
  color: #cbd5e1;
}

.info-item:last-child {
  margin-bottom: 0;
}

.info-item strong {
  color: #a78bfa;
}

.info-item code {
  background: rgba(0, 0, 0, 0.4);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: 'Fira Code', monospace;
  color: #10b981;
}

.sdks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.sdk-card {
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.2);
  padding: 1.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.sdk-card:hover {
  background: rgba(139, 92, 246, 0.1);
  transform: translateY(-4px);
  border-color: #a78bfa;
}

.sdk-card h3 {
  margin-bottom: 1rem;
  color: #a78bfa;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sdk-card code {
  background: rgba(0, 0, 0, 0.4);
  padding: 0.75rem;
  border-radius: 6px;
  display: block;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: #10b981;
  font-family: 'Fira Code', monospace;
}

.sdk-card p {
  color: #cbd5e1;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.sdk-card a {
  color: #a78bfa;
  text-decoration: none;
  display: inline-block;
  margin-top: 0.5rem;
  transition: all 0.3s ease;
}

.sdk-card a:hover {
  transform: translateX(4px);
}

.support-channels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.support-link {
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.2);
  padding: 1.25rem;
  border-radius: 8px;
  color: #a78bfa;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.support-link:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: #a78bfa;
  transform: translateY(-4px);
}

.support-link i {
  font-size: 1.5rem;
}

/* ========================================
   FACTURACIÓN MEJORADA
======================================== */

.billing-header {
  text-align: center;
  margin-bottom: 2rem;
}

.billing-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.plan-badge {
  display: inline-block;
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.plan-pricing {
  font-size: 2.5rem;
  font-weight: 700;
  color: #a78bfa;
  margin-bottom: 0.5rem;
}

.plan-pricing span {
  font-size: 1.2rem;
  color: #cbd5e1;
}

.plan-features {
  list-style: none;
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feature {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #cbd5e1;
}

.feature i {
  color: #10b981;
  font-size: 1.1rem;
}

.invoices-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.invoice-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  padding: 1.5rem;
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 8px;
  gap: 1rem;
}

.invoice-left {
  flex: 1;
}

.invoice-number {
  font-weight: 700;
  color: #a78bfa;
  margin-bottom: 0.25rem;
}

.invoice-date {
  font-size: 0.9rem;
  color: #cbd5e1;
}

.invoice-middle {
  flex: 0 0 auto;
}

.invoice-status {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-block;
}

.invoice-status.paid {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.invoice-right {
  text-align: right;
  flex: 0 0 auto;
}

.invoice-amount {
  font-weight: 700;
  font-size: 1.1rem;
  color: #a78bfa;
}

.btn-icon {
  background: rgba(139, 92, 246, 0.1);
  border: none;
  color: #a78bfa;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  margin-left: 1rem;
}

.btn-icon:hover {
  background: rgba(139, 92, 246, 0.2);
  color: #fff;
}

/* ========================================
   HIDDEN ELEMENTS
======================================== */

.hidden {
  display: none !important;
}

/* ========================================
   HISTORIAL MEJORADO
======================================== */

.history-item {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.05);
  transition: all 0.3s ease;
}

.history-item:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-2px);
}

.history-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.history-item-name {
  font-weight: 700;
  color: #a78bfa;
  font-size: 1.1rem;
  word-break: break-word;
}

.history-item-date {
  color: #cbd5e1;
  font-size: 0.9rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.history-item-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.history-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
}

.history-badge.language {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.history-badge.status {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.history-badge.status.completed {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.history-badge.status.processing {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.history-size {
  color: #a0aec0;
  font-size: 0.85rem;
  margin-left: auto;
}

.history-item-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.btn-history-action {
  flex: 1;
  padding: 0.7rem 1rem;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  color: #a78bfa;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-history-action:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: #a78bfa;
  color: #fff;
}

.btn-history-action.secondary {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.btn-history-action.secondary:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #fca5a5;
  color: #fff;
}

@media (max-width: 768px) {
  .history-item {
    padding: 1rem;
  }
  
  .history-item-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .history-item-date {
    align-self: flex-start;
  }
  
  .history-item-details {
    width: 100%;
  }
  
  .history-size {
    margin-left: 0;
    width: 100%;
  }
  
  .history-item-actions {
    flex-direction: column;
  }
}

/* ========================================
   ADVANCED YAML EDITOR STYLES
======================================== */

.yaml-editor-container {
  display: flex;
  background: #0f0a1f;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
  flex: 1;
  min-height: 400px;
  position: relative;
}

.editor-gutter {
  width: 60px;
  background: rgba(0, 0, 0, 0.4);
  border-right: 1px solid rgba(139, 92, 246, 0.2);
  padding: 12px 8px;
  font-family: 'Fira Code', monospace;
  font-size: 14px;
  color: #6b7280;
  text-align: right;
  user-select: none;
  line-height: 1.6;
}

.editor-content {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
}

.yaml-editor {
  flex: 1;
  background: transparent;
  color: #e5e7eb;
  font-family: 'Fira Code', monospace;
  font-size: 14px;
  line-height: 1.6;
  padding: 12px 16px;
  border: none;
  outline: none;
  resize: none;
  overflow-y: auto;
  white-space: pre;
  word-wrap: break-word;
  position: relative;
  z-index: 2;
  tab-size: 2;
}

.editor-highlight {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px;
  font-family: 'Fira Code', monospace;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre;
  word-wrap: break-word;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

/* Syntax Highlighting */
.editor-highlight .yaml-key {
  color: #60a5fa;
  font-weight: 500;
}

.editor-highlight .yaml-value {
  color: #34d399;
}

.editor-highlight .yaml-string {
  color: #fbbf24;
}

.editor-highlight .yaml-number {
  color: #f87171;
}

.editor-highlight .yaml-boolean {
  color: #c084fc;
  font-weight: 600;
}

.editor-highlight .yaml-comment {
  color: #6b7280;
  font-style: italic;
}

.editor-highlight .yaml-placeholder {
  color: #fb923c;
  background: rgba(251, 146, 60, 0.1);
  padding: 1px 3px;
  border-radius: 3px;
}

.editor-highlight .yaml-error {
  background: rgba(239, 68, 68, 0.2);
  border-bottom: 2px wavy #ef4444;
}

/* Autocomplete */
.editor-autocomplete {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 3;
}

.autocomplete-popup {
  position: absolute;
  background: rgba(15, 10, 31, 0.95);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  pointer-events: all;
  backdrop-filter: blur(10px);
}

.autocomplete-item {
  padding: 8px 12px;
  cursor: pointer;
  color: #e5e7eb;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
}

.autocomplete-item-icon {
  width: 16px;
  text-align: center;
  color: #a78bfa;
}

.autocomplete-item-desc {
  color: #9ca3af;
  font-size: 11px;
  margin-left: auto;
}

/* Search and Replace Panel */
.yaml-search-panel {
  background: rgba(139, 92, 246, 0.08);
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
  padding: 12px 16px;
  display: none;
  animation: slideDown 0.3s ease;
}

.yaml-search-panel.active {
  display: block;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.replace-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 6px;
  padding: 6px 12px;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #e5e7eb;
  font-size: 13px;
}

.search-input-wrapper i {
  color: #a78bfa;
  font-size: 12px;
}

.search-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.search-nav-btn {
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #a78bfa;
  border-radius: 4px;
  padding: 4px 6px;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.2s ease;
}

.search-nav-btn:hover {
  background: rgba(139, 92, 246, 0.3);
}

.search-count {
  color: #9ca3af;
  font-size: 11px;
  padding: 0 8px;
}

.search-options {
  display: flex;
  gap: 12px;
}

.search-option {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #9ca3af;
  font-size: 12px;
  cursor: pointer;
}

.search-option input {
  margin: 0;
}

.replace-controls {
  display: flex;
  gap: 6px;
}

.replace-btn {
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #a78bfa;
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.2s ease;
}

.replace-btn:hover {
  background: rgba(139, 92, 246, 0.3);
}

/* Enhanced Toolbar */
.toolbar-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.toolbar-separator {
  width: 1px;
  height: 20px;
  background: rgba(139, 92, 246, 0.3);
  margin: 0 4px;
}

.toolbar-btn {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  color: #a78bfa;
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
}

.toolbar-btn:hover:not(:disabled) {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.4);
  color: #c4b5fd;
}

.toolbar-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.toolbar-btn.active {
  background: rgba(139, 92, 246, 0.3);
  border-color: #a78bfa;
  color: #c4b5fd;
}

/* Status Bar */
.editor-status-bar {
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(139, 92, 246, 0.2);
  padding: 6px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #9ca3af;
}

.status-left,
.status-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-btn {
  background: transparent;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 3px;
  transition: all 0.2s ease;
}

.status-btn:hover {
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
}

/* Enhanced Badges */
.yaml-validation-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  animation: fadeIn 0.3s ease;
}

.yaml-validation-badge.valid {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.yaml-validation-badge.invalid {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.yaml-validation-badge.warning {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Enhanced Insights Panel */
.insights-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.insights-header h3 {
  margin: 0;
  color: #a78bfa;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-toggle {
  background: transparent;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.panel-toggle:hover {
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
}

.insights-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.yaml-insight-card {
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.yaml-insight-card:hover {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.3);
}

.insight-icon {
  width: 32px;
  height: 32px;
  background: rgba(139, 92, 246, 0.2);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a78bfa;
  font-size: 14px;
}

.insight-content {
  flex: 1;
}

.insight-label {
  display: block;
  color: #9ca3af;
  font-size: 11px;
  margin-bottom: 2px;
}

.insight-content strong {
  color: #e5e7eb;
  font-size: 16px;
  font-weight: 600;
}

/* Validation Section */
.yaml-validation-section {
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 8px;
  padding: 16px;
}

.yaml-validation-section h4 {
  margin: 0 0 12px 0;
  color: #a78bfa;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.validation-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.validation-status.valid {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.validation-status.invalid {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.validation-icon {
  font-size: 14px;
}

.validation-icon.valid {
  color: #22c55e;
}

.validation-icon.invalid {
  color: #ef4444;
}

.validation-text {
  color: #e5e7eb;
  font-size: 13px;
}

.validation-errors {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 6px;
  padding: 12px;
}

.validation-error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  color: #fca5a5;
  font-size: 12px;
}

.validation-error:last-child {
  margin-bottom: 0;
}

.validation-error i {
  color: #ef4444;
  margin-top: 2px;
  flex-shrink: 0;
}

/* Enhanced Actions */
.yaml-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px;
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 12px;
}

.actions-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-sm {
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #a78bfa;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-sm:hover {
  background: rgba(139, 92, 246, 0.3);
  border-color: rgba(139, 92, 246, 0.4);
  color: #c4b5fd;
}

.form-input-sm {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(139, 92, 246, 0.2);
  color: #e5e7eb;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  outline: none;
}

.form-input-sm:focus {
  border-color: #a78bfa;
  box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.2);
}

.yaml-layout-container {
  display: grid;
  grid-template-columns: 300px 1fr 300px;
  gap: 0;
  height: calc(100vh - 140px);
  min-height: 600px;
  background: linear-gradient(135deg, rgba(15, 10, 31, 0.95) 0%, rgba(20, 15, 40, 0.95) 100%);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.2);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

.yaml-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  max-height: 100%;
  overflow-y: auto;
}

.yaml-sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.yaml-sidebar-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.yaml-sidebar-actions {
  display: flex;
  gap: 0.5rem;
}

.toolbar-btn.compact {
  width: 36px;
  min-width: 36px;
  padding: 0.55rem;
}

.yaml-stats-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.yaml-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: rgba(139, 92, 246, 0.12);
  color: #ddd6fe;
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
}

.yaml-sidebar-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #a78bfa;
  margin: 0;
}

.plugin-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.plugin-item {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 8px;
  cursor: pointer;
  color: #cbd5e1;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  word-break: break-word;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
}

.plugin-item-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plugin-item-tag {
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: rgba(139, 92, 246, 0.16);
  color: #c4b5fd;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.2rem 0.45rem;
}

.plugin-item-tag.muted {
  color: #d1d5db;
  border-color: rgba(209, 213, 219, 0.25);
  background: rgba(15, 23, 42, 0.35);
}

.plugin-item-tag.origin {
  color: #93c5fd;
  border-color: rgba(147, 197, 253, 0.3);
  background: rgba(37, 99, 235, 0.14);
}

.plugin-item-tag.origin.uploaded {
  color: #6ee7b7;
  border-color: rgba(110, 231, 183, 0.3);
  background: rgba(5, 150, 105, 0.16);
}

.plugin-item i {
  color: #a78bfa;
  flex-shrink: 0;
}

.plugin-item:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.4);
  color: #a78bfa;
}

.plugin-item.active {
  background: rgba(139, 92, 246, 0.2);
  border-color: #a78bfa;
  color: #a78bfa;
}

.plugin-item-loader {
  text-align: center;
  padding: 2rem 0;
  color: #a0aec0;
}

.plugin-item-loader i {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 0.75rem;
}

.yaml-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  /* allow internal panels to scroll if they overflow */
  overflow: auto;
  height: 100%;
}

.yaml-editor-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 12px;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

.editor-header {
  padding: 1.25rem;
  background: rgba(139, 92, 246, 0.08);
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.editor-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.file-name {
  color: #a78bfa;
  font-weight: 700;
  word-break: break-word;
}

.file-size {
  color: #cbd5e1;
  font-size: 0.9rem;
}

.yaml-source-badge {
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: rgba(139, 92, 246, 0.12);
  color: #ddd6fe;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.yaml-source-badge.jar {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(14, 116, 144, 0.18);
  color: #7dd3fc;
}

.yaml-source-badge.yaml {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(6, 95, 70, 0.18);
  color: #6ee7b7;
}

.yaml-modified-badge {
  border: 1px solid rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.12);
  color: #fcd34d;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.editor-toolbar {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.toolbar-btn {
  padding: 0.65rem 1rem;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  color: #a78bfa;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.toolbar-btn:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: #a78bfa;
}

.yaml-editor {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  color: #a78bfa;
  border: none;
  padding: 1.5rem;
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  resize: none;
  outline: none;
  min-height: 300px;
  overflow-y: auto;
}

.yaml-editor::selection {
  background: rgba(139, 92, 246, 0.4);
}

.yaml-editor::placeholder {
  color: #6b7280;
}

.yaml-editor::-webkit-scrollbar {
  width: 6px;
}

.yaml-editor::-webkit-scrollbar-track {
  background: transparent;
}

.yaml-editor::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.3);
  border-radius: 3px;
}

.yaml-editor::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.5);
}

.yaml-actions {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  flex-wrap: wrap;
}

.yaml-actions .btn-primary,
.yaml-actions .btn-secondary {
  flex: 1 1 180px;
}

.yaml-insights-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(100px, 1fr));
  gap: 0.75rem;
  align-items: stretch;
  /* allow internal scrolling when many cards are visible */
  overflow: auto;
}

.yaml-insight-card {
  border: 1px solid rgba(139, 92, 246, 0.25);
  background: rgba(139, 92, 246, 0.08);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.yaml-insight-card span {
  color: #94a3b8;
  font-size: 0.76rem;
}

.yaml-insight-card strong {
  color: #f8fafc;
  font-size: 1.1rem;
}

.yaml-placeholder-list {
  grid-column: 1 / -1;
  border: 1px dashed rgba(139, 92, 246, 0.3);
  background: rgba(30, 41, 59, 0.35);
  border-radius: 10px;
  min-height: 44px;
  padding: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.yaml-placeholder-empty {
  color: #94a3b8;
  font-size: 0.8rem;
}

.yaml-placeholder-chip {
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: rgba(139, 92, 246, 0.16);
  color: #ddd6fe;
  border-radius: 999px;
  font-size: 0.72rem;
  font-family: 'Fira Code', monospace;
  padding: 0.2rem 0.5rem;
}

.yaml-catalog-panel {
  grid-column: 1 / -1;
  border: 1px solid rgba(139, 92, 246, 0.25);
  background: rgba(30, 41, 59, 0.35);
  border-radius: 10px;
  padding: 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.yaml-catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.yaml-catalog-toolbar strong {
  color: #e2e8f0;
  font-size: 0.82rem;
}

.yaml-catalog-toolbar .form-input {
  max-width: 260px;
  min-height: 36px;
  font-size: 0.8rem;
}

.yaml-catalog-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.45rem;
  max-height: 210px;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.yaml-catalog-item {
  border: 1px solid rgba(139, 92, 246, 0.25);
  background: rgba(139, 92, 246, 0.08);
  color: #ddd6fe;
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.25s ease;
}

.yaml-catalog-item:hover {
  border-color: rgba(139, 92, 246, 0.45);
  background: rgba(139, 92, 246, 0.16);
}

.yaml-catalog-item.detected {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(21, 128, 61, 0.2);
}

.yaml-catalog-token {
  font-size: 0.75rem;
  font-family: 'Fira Code', monospace;
  font-weight: 700;
}

.yaml-catalog-meta {
  color: #94a3b8;
  font-size: 0.72rem;
}

.yaml-minecraft-preview {
  border: 1px solid rgba(139, 92, 246, 0.25);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.75), rgba(15, 23, 42, 0.5));
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.yaml-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.yaml-preview-header h3 {
  margin: 0;
  font-size: 1rem;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.yaml-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.yaml-preview-card {
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(2, 6, 23, 0.55);
  border-radius: 10px;
  padding: 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 150px;
}

.yaml-preview-card h4 {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: #93c5fd;
  text-transform: uppercase;
}

.minecraft-chat-box,
.minecraft-actionbar-box,
.minecraft-title-box {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 8px;
  padding: 0.55rem;
  min-height: 100px;
}

.minecraft-chat-box {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.minecraft-chat-line {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.45rem;
  align-items: start;
  font-family: 'Fira Code', monospace;
  font-size: 0.8rem;
  line-height: 1.35;
}

.minecraft-chat-index {
  color: #94a3b8;
  font-size: 0.7rem;
}

.minecraft-chat-message {
  color: #f8fafc;
  word-break: break-word;
}

.minecraft-actionbar-box {
  display: flex;
  align-items: center;
  justify-content: center;
}

.minecraft-actionbar-message {
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  text-align: center;
  width: 100%;
}

.minecraft-title-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.55rem;
  text-align: center;
}

.minecraft-title-line {
  font-size: 1.1rem;
  font-weight: 700;
}

.minecraft-subtitle-line {
  font-size: 0.88rem;
  color: #cbd5e1;
}

.minecraft-preview-empty {
  color: #94a3b8;
  font-size: 0.8rem;
  text-align: center;
}

.minecraft-format-segment {
  white-space: pre-wrap;
}

.yaml-lab-section {
  border-top: 1px dashed rgba(139, 92, 246, 0.2);
  padding-top: 1rem;
}

.yaml-lab-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.yaml-lab-grid .toolbar-btn {
  justify-content: flex-start;
  font-size: 0.8rem;
  padding: 0.55rem 0.7rem;
}

@media (max-width: 1024px) {
  .yaml-layout-container {
    grid-template-columns: 200px 1fr;
    gap: 1.5rem;
  }
  .yaml-info-section {
    display: none;
  }
  
  .yaml-sidebar {
    padding: 1rem;
  }
  
  .editor-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .editor-toolbar {
    width: 100%;
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  
  .toolbar-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  .yaml-insights-panel {
    grid-template-columns: repeat(2, minmax(100px, 1fr));
  }

  .yaml-preview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .yaml-layout-container {
    grid-template-columns: 1fr;
    height: auto;
  }
  .yaml-info-section {
    display: none;
  }
  
  .yaml-sidebar {
    max-height: 300px;
  }
  
  .yaml-editor {
    min-height: 250px;
  }
  
  .yaml-actions {
    flex-direction: column;
  }

  .yaml-lab-grid {
    grid-template-columns: 1fr;
  }

  .yaml-insights-panel {
    grid-template-columns: 1fr 1fr;
  }

  .yaml-catalog-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .yaml-catalog-toolbar .form-input {
    max-width: 100%;
  }

  .yaml-catalog-list {
    grid-template-columns: 1fr;
    max-height: 180px;
  }
}

@media (max-width: 768px) {
  .yaml-container {
    padding: 1.5rem;
  }
  
  .editor-toolbar {
    flex-direction: column;
  }
  
  .toolbar-btn {
    width: 100%;
  }
  
  .yaml-editor {
    min-height: 300px;
  }
  
  .yaml-actions {
    flex-direction: column;
  }
}

@media (max-width: 1400px) {
  .content-wrapper {
    gap: 1.5rem;
    padding: 1.5rem;
  }

  .console-panel {
    width: 30%;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1200px) {
  .sidebar {
    width: 220px;
  }

  .main-container {
    margin-left: 220px;
  }

  .content-wrapper {
    flex-direction: column;
  }

  .console-panel {
    width: 100%;
    height: 300px;
  }

  .topbar-toggle {
    display: block;
  }

  .topbar-toggle-mobile {
    display: none;
  }

  .doc-categories {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sidebar {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 950;
    width: 250px;
    transform: translateX(-100%);
    transition: transform 0.4s ease;
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .main-container {
    margin-left: 0;
  }

  .topbar {
    padding: 1rem;
  }

  .topbar-content h1 {
    font-size: 1.2rem;
  }

  .content-wrapper {
    padding: 1rem;
    gap: 1rem;
  }

  .console-panel {
    height: 250px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .upload-container {
    grid-template-columns: 1fr;
  }

  .doc-categories {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .topbar {
    padding: 0.75rem;
    gap: 0.5rem;
  }

  .topbar-content h1 {
    font-size: 1rem;
  }

  .topbar-actions {
    gap: 0.75rem;
  }

  .content-wrapper {
    padding: 0.75rem;
  }

  .console-panel {
    height: 200px;
  }

  .main-content {
    padding-right: 0.25rem;
  }

  .option-card {
    padding: 1rem !important;
  }

  .btn-primary {
    padding: 0.75rem 1.5rem;
  }

  /* Modal responsive */
  .doc-modal-content {
    width: 95% !important;
    max-height: 90vh !important;
  }

  .doc-modal-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .doc-modal-header h2 {
    font-size: 1.3rem;
  }

  .doc-modal-close {
    align-self: flex-end;
    margin-top: -2rem;
  }

  .doc-title-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-doc-explorer {
    width: 100%;
    justify-content: center;
  }

  .doc-toc-list {
    flex-direction: column;
    gap: 0.5rem;
  }

  /* Confirm modal responsive */
  .confirm-modal-content {
    width: 95% !important;
    max-width: none !important;
  }

  .confirm-modal-title {
    font-size: 1.3rem;
  }

  .confirm-modal-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }

  .confirm-modal-btn {
    width: 100%;
  }
}

/* FLAG ICONS STYLING */
.flag-icon-img {
  width: 1.4rem;
  height: 1rem;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
}

/* Base flag styling for fi class */
.fi {
  vertical-align: middle;
}

/* Flags in upload badges */
.upload-badge .flag-icon-img,
.upload-badge .fi {
  width: 1.2rem;
  height: 0.9rem;
  margin-right: 0.3rem;
}

/* Flags in translations table */
.translations-table .flag-icon-img,
.translations-table .fi {
  width: 1.4rem;
  height: 1rem;
  margin-right: 0.4rem;
  vertical-align: middle;
}

/* Flags in history cards */
.history-card-language .fi {
  font-size: 1.3rem;
  margin-right: 0.5rem;
}

/* ========================================
   UPLOAD MEJORADO - ESTILOS AVANZADOS
======================================== */

.upload-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.upload-option-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.upload-option-group h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #a78bfa;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.upload-option-group i {
  font-size: 1.1rem;
}

.quality-selector {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.quality-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(139, 92, 246, 0.05);
  border: 2px solid rgba(139, 92, 246, 0.2);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.quality-option input[type="radio"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #8b5cf6;
  flex-shrink: 0;
}

.quality-label {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.quality-label strong {
  color: #a78bfa;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.quality-label small {
  color: #9ca3af;
  font-size: 0.8rem;
}

.quality-option:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.4);
}

.quality-option.active,
.quality-option input[type="radio"]:checked + .quality-label {
  border-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.15);
}

.upload-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.upload-actions .btn-secondary {
  padding: 1rem 2rem;
}

.upload-actions .btn-primary {
  flex: 1;
  min-width: 200px;
}

@media (max-width: 1024px) {
  .upload-options-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .upload-action {
    flex-direction: column;
  }

  .upload-actions .btn-secondary,
  .upload-actions .btn-primary {
    width: 100%;
  }
}

/* ========================================
   IMPROVED CONSOLE STYLES
======================================== */

.console-title-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.console-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6b7280;
  animation: none;
}

.console-status-dot.active {
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.2); }
}

.console-live-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  border-radius: 4px;
  letter-spacing: 0.5px;
  animation: badge-glow 2s infinite;
}

@keyframes badge-glow {
  0%, 100% { box-shadow: 0 0 5px rgba(34, 197, 94, 0.3); }
  50% { box-shadow: 0 0 15px rgba(34, 197, 94, 0.6); }
}

.console-header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.console-action-btn {
  background: none;
  border: none;
  color: #a78bfa;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.4rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  opacity: 0.7;
}

.console-action-btn:hover {
  background: rgba(139, 92, 246, 0.2);
  opacity: 1;
}

.console-action-btn.active {
  background: rgba(139, 92, 246, 0.3);
  opacity: 1;
  color: #c4b5fd;
}

.console-line .line-number {
  color: #4b5563;
  min-width: 30px;
  text-align: right;
  font-size: 0.75rem;
  user-select: none;
}

.console-line .log-type {
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  min-width: 70px;
  text-align: center;
}

.console-line.system .log-type {
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
}

.console-line.info .log-type {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.console-line.success .log-type {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

.console-line.warning .log-type {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

.console-line.error .log-type {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.console-line.debug .log-type {
  background: rgba(236, 72, 153, 0.2);
  color: #f472b6;
}

.console-footer {
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(139, 92, 246, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.console-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  color: #6b7280;
}

.console-stat {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.console-stat.status-online {
  color: #22c55e;
}

.console-stat.status-offline {
  color: #ef4444;
}

.console-stat i {
  font-size: 0.5rem;
}

/* ========================================
   CONFIRMATION MODAL STYLES
======================================== */

.confirm-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.confirm-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.confirm-modal-overlay-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.confirm-modal-content {
  background: linear-gradient(145deg, rgba(30, 20, 50, 0.98), rgba(15, 10, 30, 0.98));
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 20px;
  padding: 2rem;
  max-width: 550px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(139, 92, 246, 0.1);
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s ease;
  overflow: hidden;
}

.confirm-modal-overlay.active .confirm-modal-content {
  transform: scale(1) translateY(0);
}

.confirm-modal-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
  background: rgba(139, 92, 246, 0.15);
  border: 2px solid rgba(139, 92, 246, 0.3);
  color: #a78bfa;
}

.confirm-modal-icon.danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.confirm-modal-icon.warning {
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.3);
  color: #fbbf24;
}

.confirm-modal-icon.info {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}

.confirm-modal-icon.success {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.confirm-modal-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
}

.confirm-modal-message {
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.confirm-modal-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.confirm-modal-btn {
  flex: 1;
  padding: 0.875rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
}

.confirm-modal-btn.cancel {
  background: rgba(100, 116, 139, 0.2);
  border: 1px solid rgba(100, 116, 139, 0.3);
  color: #94a3b8;
}

.confirm-modal-btn.cancel:hover {
  background: rgba(100, 116, 139, 0.3);
  color: #fff;
}

.confirm-modal-btn.confirm {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #fff;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.confirm-modal-btn.confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.confirm-modal-btn.confirm.danger {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.confirm-modal-btn.confirm.danger:hover {
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

.confirm-modal-sub {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: -0.5rem;
  margin-bottom: 0.5rem;
}

/* ========================================
   NOTIFICATIONS MODAL STYLES
======================================== */

.notifications-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: none;
  justify-content: center;
  align-items: center;
}

.notifications-modal.active {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.notifications-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}

.notifications-modal-content {
  position: relative;
  width: 90%;
  max-width: 700px;
  max-height: 85vh;
  background: linear-gradient(135deg, rgba(25, 15, 45, 0.98), rgba(15, 10, 31, 0.98));
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 20px;
  box-shadow: 0 25px 80px rgba(139, 92, 246, 0.25),
              0 0 60px rgba(139, 92, 246, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.notifications-modal-header {
  padding: 1.5rem 2rem;
  background: rgba(139, 92, 246, 0.1);
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.notifications-modal-header .notif-count {
  margin-left: 0.5rem;
}
/* legacy tabs UI should remain hidden */
.notifications-tabs { display: none !important; }

.notifications-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.notifications-header-left i {
  font-size: 1.5rem;
  color: #a78bfa;
}

.notifications-header-left h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
}

.notifications-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mark-all-read {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #a78bfa;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mark-all-read:hover {
  background: rgba(139, 92, 246, 0.25);
  border-color: rgba(139, 92, 246, 0.5);
}

.notifications-modal-close {
  background: none;
  border: none;
  color: #a78bfa;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.notifications-modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.notifications-tabs {
  display: flex;
  padding: 0.5rem 1rem;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
  overflow-x: auto;
}

.notif-tab {
  background: none;
  border: none;
  color: #9ca3af;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.notif-tab:hover {
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.1);
}

.notif-tab.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(109, 40, 217, 0.25));
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.notif-count {
  background: rgba(139, 92, 246, 0.3);
  color: #c4b5fd;
  padding: 0.1rem 0.5rem;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
}

.notif-tab.active .notif-count {
  background: #8b5cf6;
  color: white;
}

.notifications-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 400px;
}

.notification-item {
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  display: flex;
  gap: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.notification-item:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateX(5px);
}

.notification-item.unread {
  border-left: 3px solid #8b5cf6;
  background: rgba(139, 92, 246, 0.1);
}

.notif-delete-btn {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.notification-item:hover .notif-delete-btn {
  opacity: 1;
}

.notif-delete-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.notif-empty-icon {
  font-size: 3rem;
  color: rgba(139, 92, 246, 0.3);
  margin-bottom: 1rem;
}

.notification-icon {
  width: 45px;
  height: 45px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notification-icon.update {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.2));
  color: #60a5fa;
}

.notification-icon.announcement {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(109, 40, 217, 0.2));
  color: #a78bfa;
}

.notification-icon.system {
  background: linear-gradient(135deg, rgba(107, 114, 128, 0.2), rgba(75, 85, 99, 0.2));
  color: #9ca3af;
}

.notification-icon.success {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(22, 163, 74, 0.2));
  color: #4ade80;
}

.notification-icon.warning {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.2));
  color: #fbbf24;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.notification-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: #e2e8f0;
}

.notification-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.notification-badge.new {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: white;
}

.notification-badge.important {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.notification-message {
  font-size: 0.85rem;
  color: #9ca3af;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.notification-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  color: #6b7280;
}

.notification-meta i {
  margin-right: 0.25rem;
}

.notification-action {
  color: #a78bfa;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease;
}

.notification-action:hover {
  color: #c4b5fd;
}

.notifications-empty {
  text-align: center;
  padding: 3rem;
  color: #6b7280;
}

.notifications-empty i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.notifications-empty h4 {
  font-size: 1.1rem;
  color: #9ca3af;
  margin-bottom: 0.5rem;
}

.notifications-modal-footer {
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(139, 92, 246, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notifications-info {
  font-size: 0.8rem;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.clear-all-btn {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.clear-all-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
}

@media (max-width: 768px) {
  .notifications-modal-content {
    width: 95%;
    max-height: 90vh;
  }

  .notifications-modal-header {
    padding: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .notifications-header-left h2 {
    font-size: 1.1rem;
  }

  .mark-all-read span {
    display: none;
  }

  .notifications-tabs {
    padding: 0.5rem;
  }

  .notif-tab {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  .notif-tab span:not(.notif-count) {
    display: none;
  }

  .notification-item {
    padding: 0.75rem;
  }
}

/* ========================================
   TOAST STYLES
======================================== */

.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: rgba(30, 30, 50, 0.95);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transform: translateX(120%);
  transition: transform 0.3s ease;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast.show {
  transform: translateX(0);
}

.toast-success i { color: #10b981; }
.toast-error i { color: #ef4444; }
.toast-warning i { color: #f59e0b; }
.toast-info i { color: #8b5cf6; }

/* ========================================
   CONFIRM MODAL STYLES
======================================== */

.confirm-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.confirm-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.confirm-modal-content {
  background: linear-gradient(145deg, rgba(30, 20, 50, 0.98), rgba(15, 10, 30, 0.98));
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 20px;
  padding: 2rem;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(139, 92, 246, 0.1);
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s ease;
}

.confirm-modal-overlay.active .confirm-modal-content {
  transform: scale(1) translateY(0);
}

.confirm-modal-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
  background: rgba(139, 92, 246, 0.15);
  border: 2px solid rgba(139, 92, 246, 0.3);
  color: #a78bfa;
}

.confirm-modal-icon.danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.confirm-modal-icon.warning {
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.3);
  color: #fbbf24;
}

.confirm-modal-icon.info {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}

.confirm-modal-icon.success {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.confirm-modal-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
}

.confirm-modal-message {
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.confirm-modal-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.confirm-modal-btn {
  flex: 1;
  padding: 0.875rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
}

.confirm-modal-btn.cancel {
  background: rgba(100, 116, 139, 0.2);
  border: 1px solid rgba(100, 116, 139, 0.3);
  color: #94a3b8;
}

.confirm-modal-btn.cancel:hover {
  background: rgba(100, 116, 139, 0.3);
  color: #fff;
}

.confirm-modal-btn.confirm {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #fff;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.confirm-modal-btn.confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}


/* ========================================
   ENHANCED MINECRAFT PREVIEW
======================================== */

.yaml-minecraft-preview {
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 12px;
  padding: 20px;
  overflow: hidden;
}

.yaml-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.yaml-preview-header h3 {
  margin: 0;
  color: #a78bfa;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.yaml-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.yaml-preview-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 8px;
  padding: 16px;
  transition: all 0.3s ease;
}

.yaml-preview-card:hover {
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.1);
}

.preview-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.preview-card-header h4 {
  margin: 0;
  color: #e5e7eb;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.preview-options {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #9ca3af;
  font-size: 11px;
  cursor: pointer;
}

.checkbox-label input {
  margin: 0;
}

/* Chat Preview */
.minecraft-chat-box {
  background: linear-gradient(to bottom, #2e3440, #3b4252);
  border: 2px solid #4c566a;
  border-radius: 8px;
  padding: 12px;
  min-height: 120px;
  max-height: 200px;
  overflow-y: auto;
  font-family: "Fira Code", monospace;
  font-size: 13px;
  line-height: 1.4;
}

.minecraft-chat-message {
  margin-bottom: 6px;
  padding: 2px 0;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  animation: chatSlideIn 0.3s ease;
}

@keyframes chatSlideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.chat-timestamp {
  color: #88c0d0;
  font-size: 11px;
  opacity: 0.8;
  white-space: nowrap;
}

.chat-sender {
  color: #8fbcbb;
  font-weight: 600;
  white-space: nowrap;
}

.chat-message {
  color: #eceff4;
  word-wrap: break-word;
  flex: 1;
}

/* Minecraft Color Codes */
.mc-color-0 { color: #000000; }
.mc-color-1 { color: #0000aa; }
.mc-color-2 { color: #00aa00; }
.mc-color-3 { color: #00aaaa; }
.mc-color-4 { color: #aa0000; }
.mc-color-5 { color: #aa00aa; }
.mc-color-6 { color: #ffaa00; }
.mc-color-7 { color: #aaaaaa; }
.mc-color-8 { color: #555555; }
.mc-color-9 { color: #5555ff; }
.mc-color-a { color: #55ff55; }
.mc-color-b { color: #55ffff; }
.mc-color-c { color: #ff5555; }
.mc-color-d { color: #ff55ff; }
.mc-color-e { color: #ffff55; }
.mc-color-f { color: #ffffff; }
.mc-color-l { font-weight: bold; }
.mc-color-m { text-decoration: line-through; }
.mc-color-n { text-decoration: underline; }
.mc-color-o { font-style: italic; }
.mc-color-r { color: #eceff4; }

/* Action Bar Preview */
.minecraft-actionbar-box {
  background: linear-gradient(to right, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6));
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 6px;
  padding: 8px 12px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Fira Code", monospace;
  font-size: 14px;
  color: #ffffff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  position: relative;
  overflow: hidden;
}

.actionbar-animation {
  animation: actionBarPulse 2s ease-in-out infinite;
}

@keyframes actionBarPulse {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 1; }
}

/* Title Preview */
.minecraft-title-box {
  background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.1), transparent);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 8px;
  padding: 20px;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
}

.minecraft-title-line {
  font-family: "Fira Code", monospace;
  font-size: 24px;
  font-weight: bold;
  color: #ffffff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  margin-bottom: 8px;
  animation: titleFadeIn 1s ease;
}

.minecraft-subtitle-line {
  font-family: "Fira Code", monospace;
  font-size: 16px;
  color: #cccccc;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  animation: subtitleFadeIn 1.5s ease;
}

@keyframes titleFadeIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes subtitleFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Boss Bar Preview */
.minecraft-bossbar-box {
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 8px;
  padding: 12px;
}

.bossbar-container {
  position: relative;
  height: 20px;
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid #4c566a;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bossbar-progress {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(90deg, #ff5555, #ffaa00);
  border-radius: 8px;
  transition: width 0.5s ease;
  z-index: 1;
}

.bossbar-text {
  position: relative;
  z-index: 2;
  color: #ffffff;
  font-family: "Fira Code", monospace;
  font-size: 12px;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  text-align: center;
  padding: 0 8px;
}

/* Sign Preview */
.minecraft-sign-box {
  background: linear-gradient(135deg, #8b6914, #654321);
  border: 3px solid #4a3018;
  border-radius: 4px;
  padding: 16px;
  min-height: 100px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.sign-lines {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sign-line {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 2px;
  padding: 4px 8px;
  font-family: "Fira Code", monospace;
  font-size: 12px;
  color: #000000;
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.3);
  min-height: 16px;
  text-align: center;
}

/* Book Preview */
.minecraft-book-box {
  background: linear-gradient(135deg, #f4e4c1, #e8d4a1);
  border: 2px solid #8b6914;
  border-radius: 4px;
  padding: 20px;
  min-height: 150px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  position: relative;
}

.minecraft-book-box::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(139, 105, 20, 0.3);
}

.book-content {
  font-family: Georgia, serif;
  font-size: 13px;
  color: #2c1810;
  line-height: 1.6;
  text-align: justify;
  padding-left: 30px;
  min-height: 100px;
}

/* Preview Empty State */
.minecraft-preview-empty {
  color: #6b7280;
  font-style: italic;
  text-align: center;
  padding: 20px;
  font-size: 13px;
}

/* Animation Classes */
.preview-fade-in {
  animation: previewFadeIn 0.5s ease;
}

@keyframes previewFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   YAML EDITOR V2 - PREMIUM DESIGN
   Modern IDE-like experience
======================================== */

/* Main Layout - VS Code inspired */
.yaml-layout-container {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0;
  height: calc(100vh - 140px);
  min-height: 600px;
  background: linear-gradient(135deg, rgba(15, 10, 31, 0.95) 0%, rgba(20, 15, 40, 0.95) 100%);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.2);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

/* Sidebar - Sleek file explorer */
.yaml-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: linear-gradient(180deg, rgba(20, 15, 35, 0.98) 0%, rgba(15, 10, 30, 0.98) 100%);
  border-right: 1px solid rgba(139, 92, 246, 0.15);
  max-height: 100%;
  /* sidebar may grow tall; enable scrolling */
  overflow-y: auto;
  padding: 0;
}

.yaml-sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

.yaml-sidebar-section:last-child {
  border-bottom: none;
  flex: 1;
  /* make final section scroll if content exceeds space */
  overflow-y: auto;
}

.yaml-sidebar-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.yaml-sidebar-section h3 {
  font-size: 0.7rem;
  font-weight: 700;
  color: #8b5cf6;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.yaml-sidebar-actions {
  display: flex;
  gap: 0.25rem;
}

.yaml-stats-pills {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.yaml-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(139, 92, 246, 0.08));
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: #c4b5fd;
  border-radius: 20px;
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.yaml-pill:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.4);
}

.yaml-pill strong {
  color: #a78bfa;
}

/* Search inputs in sidebar */
.yaml-sidebar .form-input {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  font-size: 0.8rem;
  color: #e5e7eb;
  transition: all 0.2s ease;
}

.yaml-sidebar .form-input:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
  background: rgba(0, 0, 0, 0.4);
}

.yaml-sidebar .form-input::placeholder {
  color: #6b7280;
}

/* Plugin list with hover effects */
.plugin-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.plugin-list::-webkit-scrollbar {
  width: 4px;
}

.plugin-list::-webkit-scrollbar-track {
  background: transparent;
}

.plugin-list::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.3);
  border-radius: 2px;
}

.plugin-item {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  color: #94a3b8;
  transition: all 0.2s ease;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-align: left;
  position: relative;
  overflow: hidden;
}

/* ========================================
   🎨 YAML EDITOR PRO - PREMIUM REDESIGN
======================================== */

/* Main Layout Container */
.yaml-layout-container {
  display: grid;
  grid-template-columns: 280px 1fr 320px;
  gap: 0;
  height: calc(100vh - 120px);
  min-height: 650px;
  background: linear-gradient(145deg, 
    rgba(10, 5, 25, 0.98) 0%, 
    rgba(15, 10, 35, 0.98) 50%,
    rgba(20, 12, 45, 0.98) 100%);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.25);
  box-shadow: 
    0 0 0 1px rgba(139, 92, 246, 0.1),
    0 25px 100px rgba(0, 0, 0, 0.6),
    0 10px 40px rgba(139, 92, 246, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
}

.yaml-layout-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(139, 92, 246, 0.5), 
    rgba(167, 139, 250, 0.8),
    rgba(139, 92, 246, 0.5), 
    transparent);
  z-index: 10;
}

/* Left Sidebar - File Browser */
.yaml-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: linear-gradient(180deg, 
    rgba(15, 10, 30, 0.95) 0%, 
    rgba(12, 8, 25, 0.98) 100%);
  border-right: 1px solid rgba(139, 92, 246, 0.15);
  padding: 0;
  height: 100%;
  overflow: hidden;
}

.yaml-sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(139, 92, 246, 0.12);
}

.yaml-sidebar-section:last-child {
  border-bottom: none;
  flex: 1;
  overflow: hidden;
}

.yaml-sidebar-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.yaml-sidebar-header-row h3 {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #a78bfa;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.yaml-sidebar-header-row h3::before {
  content: '';
  width: 3px;
  height: 12px;
  background: linear-gradient(180deg, #a78bfa, #8b5cf6);
  border-radius: 2px;
}

/* Compact Sidebar Buttons */
.yaml-sidebar-actions {
  display: flex;
  gap: 0.35rem;
}

.yaml-sidebar-actions .toolbar-btn {
  width: 28px;
  min-width: 28px;
  height: 28px;
  padding: 0;
  font-size: 0.7rem;
  border-radius: 6px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.yaml-sidebar-actions .toolbar-btn:hover {
  background: rgba(139, 92, 246, 0.2);
  transform: scale(1.05);
}

/* Stats Pills */
.yaml-stats-pills {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.yaml-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(109, 40, 217, 0.15) 100%);
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: #c4b5fd;
  border-radius: 20px;
  padding: 0.2rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 600;
  backdrop-filter: blur(5px);
  transition: all 0.2s ease;
}

.yaml-pill:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25) 0%, rgba(109, 40, 217, 0.25) 100%);
  border-color: rgba(139, 92, 246, 0.4);
}

.yaml-pill strong {
  color: #fff;
  font-weight: 700;
}

/* Sidebar Inputs */
.yaml-sidebar .form-input {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  color: #e5e7eb;
  transition: all 0.25s ease;
}

.yaml-sidebar .form-input:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15), 0 0 20px rgba(139, 92, 246, 0.1);
  background: rgba(0, 0, 0, 0.5);
}

.yaml-sidebar select.form-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a78bfa' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

/* Plugin List */
.plugin-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  overflow-y: auto;
  padding-right: 0.25rem;
  padding-bottom: 0.5rem;
}

.plugin-list::-webkit-scrollbar {
  width: 4px;
}

.plugin-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #8b5cf6, #6d28d9);
  border-radius: 4px;
}

.plugin-item {
  padding: 0.6rem 0.75rem;
  background: rgba(139, 92, 246, 0.04);
  border: 1px solid transparent;
  border-radius: 8px;
  color: #94a3b8;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.plugin-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  transition: width 0.25s ease;
}

.plugin-item:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.3);
  color: #c4b5fd;
  transform: translateX(3px);
}

.plugin-item:hover::before {
  width: 3px;
}

.plugin-item.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(109, 40, 217, 0.15) 100%);
  border-color: rgba(139, 92, 246, 0.4);
  color: #e0d6ff;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.15);
}

.plugin-item.active::before {
  width: 3px;
}

.plugin-item i {
  color: #a78bfa;
  font-size: 0.85rem;
  transition: transform 0.2s ease;
}

.plugin-item:hover i {
  transform: scale(1.15);
}

.plugin-item-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.plugin-item-tag {
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #c4b5fd;
  border-radius: 12px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.15rem 0.4rem;
  text-transform: uppercase;
}

/* Main Editor Area */
.yaml-main {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(8, 5, 18, 0.95) 0%, rgba(10, 6, 22, 0.98) 100%);
}

/* Editor Wrapper */
.yaml-editor-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Editor Header / Tabs Area */
.editor-header {
  padding: 0;
  background: rgba(15, 10, 30, 0.9);
  border-bottom: 1px solid rgba(139, 92, 246, 0.15);
  display: flex;
  flex-direction: column;
}

.editor-tab-bar {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0.5rem 0.75rem 0;
  overflow-x: auto;
  min-height: 38px;
}

.editor-tab-bar::-webkit-scrollbar {
  height: 3px;
}

.editor-tab-bar::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.3);
  border-radius: 3px;
}

.editor-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  position: relative;
  margin-bottom: -1px;
}

.editor-tab:hover {
  background: rgba(139, 92, 246, 0.1);
  color: #c4b5fd;
}

.editor-tab.active {
  background: rgba(8, 5, 18, 0.95);
  border-color: rgba(139, 92, 246, 0.2);
  color: #e0d6ff;
}

.editor-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

.editor-tab.modified .tab-name::after {
  content: '●';
  margin-left: 0.3rem;
  color: #fbbf24;
  font-size: 0.6rem;
}

.editor-tab .tab-close {
  background: transparent;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 0.15rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.15s ease;
  font-size: 0.65rem;
}

.editor-tab:hover .tab-close {
  opacity: 1;
}

.editor-tab .tab-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* Editor Title Bar */
.editor-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  gap: 1rem;
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
  background: rgba(10, 6, 22, 0.5);
}

.editor-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1;
  min-width: 0;
}

.file-name {
  color: #e0d6ff;
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.file-name i {
  color: #a78bfa;
  font-size: 0.9rem;
}

.file-size {
  color: #6b7280;
  font-size: 0.72rem;
}

/* Status Badges */
.yaml-source-badge,
.yaml-modified-badge,
.yaml-validation-badge,
.yaml-autosave-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 20px;
  padding: 0.2rem 0.55rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: all 0.2s ease;
}

.yaml-source-badge {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(109, 40, 217, 0.15) 100%);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #c4b5fd;
}

.yaml-source-badge.jar {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15) 0%, rgba(14, 165, 233, 0.15) 100%);
  border-color: rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
}

.yaml-source-badge.yaml {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(22, 163, 74, 0.15) 100%);
  border-color: rgba(34, 197, 94, 0.3);
  color: #86efac;
}

.yaml-modified-badge {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(245, 158, 11, 0.15) 100%);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fcd34d;
  animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.yaml-autosave-badge {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(22, 163, 74, 0.15) 100%);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
}

.yaml-autosave-badge.saving {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.15) 100%);
  border-color: rgba(59, 130, 246, 0.3);
  color: #93c5fd;
  animation: saving-pulse 1s ease-in-out infinite;
}

@keyframes saving-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.02); }
}

.yaml-validation-badge.valid {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(22, 163, 74, 0.15) 100%);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
}

.yaml-validation-badge.invalid {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.15) 100%);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

/* Editor Toolbar */
.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  background: rgba(15, 10, 30, 0.5);
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
  flex-wrap: wrap;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.toolbar-separator {
  width: 1px;
  height: 20px;
  background: linear-gradient(180deg, transparent, rgba(139, 92, 246, 0.4), transparent);
  margin: 0 0.4rem;
}

.toolbar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.15);
  color: #94a3b8;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.toolbar-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.3) 0%, rgba(109, 40, 217, 0.3) 100%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.toolbar-btn:hover:not(:disabled) {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.35);
  color: #c4b5fd;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.toolbar-btn:hover:not(:disabled)::before {
  opacity: 1;
}

.toolbar-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.97);
}

.toolbar-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.toolbar-btn.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25) 0%, rgba(109, 40, 217, 0.2) 100%);
  border-color: rgba(139, 92, 246, 0.5);
  color: #e0d6ff;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

.toolbar-btn i {
  position: relative;
  z-index: 1;
}

/* CodeMirror Integration */
.yaml-editor-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #0a0612;
  position: relative;
}

.yaml-editor-container .CodeMirror {
  flex: 1;
  height: 100% !important;
  font-family: 'Fira Code', 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.7;
  background: transparent !important;
}

.yaml-editor-container .CodeMirror-gutters {
  background: rgba(15, 10, 30, 0.8) !important;
  border-right: 1px solid rgba(139, 92, 246, 0.15) !important;
  padding-right: 8px;
}

.yaml-editor-container .CodeMirror-linenumber {
  color: #4c4276 !important;
  font-size: 11px;
  padding: 0 8px 0 12px;
}

.yaml-editor-container .CodeMirror-lines {
  padding: 1rem 0;
}

.yaml-editor-container .CodeMirror-cursor {
  border-left: 2px solid #a78bfa !important;
  box-shadow: 0 0 8px rgba(167, 139, 250, 0.5);
}

.yaml-editor-container .CodeMirror-selected {
  background: rgba(139, 92, 246, 0.25) !important;
}

.yaml-editor-container .CodeMirror-activeline-background {
  background: rgba(139, 92, 246, 0.08) !important;
}

.yaml-editor-container .CodeMirror-foldgutter {
  width: 16px;
}

.yaml-editor-container .CodeMirror-foldgutter-open,
.yaml-editor-container .CodeMirror-foldgutter-folded {
  color: #6b5b95 !important;
}

/* Status Bar */
.editor-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 1rem;
  background: linear-gradient(180deg, rgba(15, 10, 30, 0.9) 0%, rgba(12, 8, 25, 0.95) 100%);
  border-top: 1px solid rgba(139, 92, 246, 0.12);
  font-size: 0.7rem;
  color: #6b7280;
}

.status-left,
.status-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.5rem;
  background: rgba(139, 92, 246, 0.05);
  border-radius: 4px;
  transition: all 0.2s ease;
}

.status-item:hover {
  background: rgba(139, 92, 246, 0.1);
  color: #a78bfa;
}

.status-item i {
  font-size: 0.65rem;
  color: #8b5cf6;
}

.status-btn {
  background: transparent;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.status-btn:hover {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}

/* Actions Panel */
.yaml-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(180deg, rgba(15, 10, 30, 0.8) 0%, rgba(12, 8, 25, 0.9) 100%);
  border-top: 1px solid rgba(139, 92, 246, 0.12);
  flex-wrap: wrap;
}

.actions-group {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.yaml-actions .btn-primary {
  padding: 0.55rem 1.1rem;
  font-size: 0.78rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  border: none;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.yaml-actions .btn-primary:hover {
  background: linear-gradient(135deg, #9f7aea 0%, #8b5cf6 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.yaml-actions .btn-secondary {
  padding: 0.5rem 0.9rem;
  font-size: 0.75rem;
  border-radius: 8px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: #c4b5fd;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.yaml-actions .btn-secondary:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-1px);
}

/* Right Panel - Info Section */
.yaml-info-section {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: linear-gradient(180deg, rgba(15, 10, 30, 0.95) 0%, rgba(12, 8, 25, 0.98) 100%);
  border-left: 1px solid rgba(139, 92, 246, 0.15);
  height: 100%;
  overflow-y: auto;
}

.yaml-info-section::-webkit-scrollbar {
  width: 4px;
}

.yaml-info-section::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #8b5cf6, #6d28d9);
  border-radius: 4px;
}

/* Insights Panel */
.yaml-insights-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-bottom: 1px solid rgba(139, 92, 246, 0.12);
}

.insights-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: rgba(139, 92, 246, 0.05);
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

.insights-header h3 {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #a78bfa;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.insights-header h3 i {
  font-size: 0.8rem;
}

.panel-toggle {
  background: transparent;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.panel-toggle:hover {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}

.insights-content {
  padding: 0.85rem;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.yaml-insight-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.75rem;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(109, 40, 217, 0.05) 100%);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 10px;
  transition: all 0.25s ease;
}

.yaml-insight-card:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.12) 0%, rgba(109, 40, 217, 0.08) 100%);
  border-color: rgba(139, 92, 246, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.1);
}

.insight-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(109, 40, 217, 0.2) 100%);
  border-radius: 8px;
  color: #a78bfa;
  font-size: 0.85rem;
}

.insight-content {
  flex: 1;
  min-width: 0;
}

.insight-label {
  display: block;
  font-size: 0.65rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.1rem;
}

.insight-content strong {
  color: #e0d6ff;
  font-size: 1rem;
  font-weight: 700;
}

/* Minecraft Preview */
.yaml-minecraft-preview {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.yaml-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: rgba(139, 92, 246, 0.05);
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

.yaml-preview-header h3 {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #a78bfa;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.preview-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.yaml-preview-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.85rem;
  overflow-y: auto;
  flex: 1;
}

.yaml-preview-card {
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.8) 0%, rgba(10, 15, 35, 0.8) 100%);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.25s ease;
}

.yaml-preview-card:hover {
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.1);
}

.preview-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.75rem;
  background: rgba(139, 92, 246, 0.08);
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

.preview-card-header h4 {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.preview-card-header h4 i {
  color: #8b5cf6;
  font-size: 0.75rem;
}

.preview-options {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.65rem;
  color: #6b7280;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 12px;
  height: 12px;
  accent-color: #8b5cf6;
}

/* Minecraft Chat Box */
.minecraft-chat-box {
  padding: 0.65rem;
  min-height: 80px;
  max-height: 150px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.minecraft-chat-line {
  font-family: 'Fira Code', monospace;
  font-size: 0.72rem;
  line-height: 1.4;
  color: #e5e7eb;
  padding: 0.2rem 0.35rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
  transition: background 0.2s ease;
}

.minecraft-chat-line:hover {
  background: rgba(139, 92, 246, 0.1);
}

.minecraft-preview-empty {
  color: #4b5563;
  font-size: 0.72rem;
  text-align: center;
  padding: 1.5rem;
  font-style: italic;
}

/* Action Bar / Title / Bossbar */
.minecraft-actionbar-box,
.minecraft-title-box {
  padding: 0.75rem;
  text-align: center;
  background: rgba(0, 0, 0, 0.4);
  min-height: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.minecraft-actionbar-message {
  font-family: 'Fira Code', monospace;
  font-size: 0.8rem;
  color: #e5e7eb;
}

.minecraft-title-line {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fbbf24;
  text-shadow: 0 2px 10px rgba(251, 191, 36, 0.3);
}

.minecraft-subtitle-line {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

.minecraft-bossbar-box {
  padding: 0.65rem;
  background: rgba(0, 0, 0, 0.4);
}

.bossbar-container {
  position: relative;
  height: 24px;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(139, 92, 246, 0.3);
  border-radius: 4px;
  overflow: hidden;
}

.bossbar-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, #8b5cf6, #a78bfa, #c4b5fd);
  transition: width 0.3s ease;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
}

.bossbar-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  z-index: 1;
}

/* Search Panel */
.yaml-search-panel {
  background: linear-gradient(180deg, rgba(25, 18, 50, 0.95) 0%, rgba(20, 14, 40, 0.98) 100%);
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
  padding: 0.75rem 1rem;
  display: none;
  animation: slideDown 0.25s ease;
}

.yaml-search-panel.active {
  display: block;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.search-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.search-row:last-child {
  margin-bottom: 0;
}

.search-input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  transition: all 0.2s ease;
}

.search-input-wrapper:focus-within {
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.15);
}

.search-input-wrapper i {
  color: #a78bfa;
  font-size: 0.75rem;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #e5e7eb;
  font-size: 0.8rem;
  outline: none;
}

.search-controls {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.search-nav-btn {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: #a78bfa;
  border-radius: 4px;
  padding: 0.25rem 0.4rem;
  cursor: pointer;
  font-size: 0.7rem;
  transition: all 0.2s ease;
}

.search-nav-btn:hover {
  background: rgba(139, 92, 246, 0.25);
}

.search-count {
  color: #6b7280;
  font-size: 0.7rem;
  padding: 0 0.5rem;
  min-width: 40px;
  text-align: center;
}

.search-options {
  display: flex;
  gap: 0.75rem;
}

.search-option {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: #6b7280;
  font-size: 0.72rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.search-option:hover {
  color: #a78bfa;
}

.replace-controls {
  display: flex;
  gap: 0.35rem;
}

.replace-btn {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: #c4b5fd;
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.replace-btn:hover {
  background: rgba(139, 92, 246, 0.25);
  border-color: rgba(139, 92, 246, 0.4);
}

/* Zaryx Lab Section */
.yaml-lab-section {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(139, 92, 246, 0.12);
}

.yaml-lab-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.yaml-lab-grid .toolbar-btn {
  width: 100%;
  justify-content: flex-start;
  gap: 0.4rem;
  font-size: 0.72rem;
  padding: 0.5rem 0.65rem;
  height: auto;
}

/* Real-time Sync Indicator */
.realtime-indicator {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(22, 163, 74, 0.1) 100%);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 20px;
  font-size: 0.65rem;
  color: #86efac;
  font-weight: 600;
}

.realtime-indicator .pulse-dot {
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

/* Responsive */
@media (max-width: 1400px) {
  .yaml-layout-container {
    grid-template-columns: 260px 1fr 280px;
  }
}

@media (max-width: 1200px) {
  .yaml-layout-container {
    grid-template-columns: 220px 1fr;
  }
  
  .yaml-info-section {
    display: none;
  }
}

@media (max-width: 900px) {
  .yaml-layout-container {
    grid-template-columns: 1fr;
    height: auto;
    min-height: auto;
  }
  
  .yaml-sidebar {
    max-height: 300px;
    border-right: none;
    border-bottom: 1px solid rgba(139, 92, 246, 0.15);
  }
  
  .yaml-main {
    min-height: 500px;
  }
}

/* ========================================
   🌟 EXTRA ANIMATIONS & EFFECTS
======================================== */

/* Glow effects for focused elements */
.yaml-editor-container:focus-within {
  box-shadow: 
    inset 0 0 30px rgba(139, 92, 246, 0.05),
    0 0 20px rgba(139, 92, 246, 0.1);
}

/* Smooth transitions for all interactive elements */
.yaml-layout-container * {
  transition-property: background-color, border-color, color, box-shadow, transform, opacity;
  transition-duration: 0.2s;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading shimmer effect */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.loading-shimmer {
  background: linear-gradient(90deg, 
    rgba(139, 92, 246, 0.1) 25%, 
    rgba(139, 92, 246, 0.2) 50%, 
    rgba(139, 92, 246, 0.1) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Floating animation for badges */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.yaml-pill:hover {
  animation: float 2s ease-in-out infinite;
}

/* Success animation */
@keyframes success-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.yaml-autosave-badge.success-animation {
  animation: success-pop 0.3s ease;
}

/* Error shake animation */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.yaml-autosave-badge.error-animation {
  animation: shake 0.4s ease;
}

/* Spotlight effect for active elements */
.plugin-item.active {
  position: relative;
  overflow: hidden;
}

.plugin-item.active::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* Typing cursor animation for empty preview */
@keyframes blink-cursor {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.minecraft-preview-empty i {
  color: #4b5563;
  margin-bottom: 0.5rem;
  display: block;
  font-size: 1.5rem;
  animation: blink-cursor 1.5s infinite;
}

.minecraft-preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 0.5rem;
}

/* Gradient text for headers */
.yaml-preview-header h3,
.insights-header h3 {
  background: linear-gradient(135deg, #a78bfa 0%, #c4b5fd 50%, #e0d6ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Card hover lift effect */
.yaml-preview-card:hover {
  transform: translateY(-2px);
}

.yaml-insight-card:hover {
  transform: translateY(-2px) scale(1.02);
}

/* Button press effect */
.btn-primary:active,
.btn-secondary:active {
  transform: translateY(0) scale(0.98) !important;
}

/* Status bar item hover glow */
.status-item:hover {
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
}

/* CodeMirror line highlight animation */
.yaml-editor-container .CodeMirror-activeline-background {
  transition: background 0.15s ease;
}

/* Scrollbar glow on hover */
.yaml-sidebar::-webkit-scrollbar-thumb:hover,
.yaml-info-section::-webkit-scrollbar-thumb:hover,
.plugin-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #a78bfa, #8b5cf6);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
}

/* Tab close button animation */
.editor-tab .tab-close:hover {
  transform: scale(1.1);
}

/* Realtime indicator pulse */
.realtime-indicator {
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { 
    box-shadow: 0 0 5px rgba(34, 197, 94, 0.2);
  }
  50% { 
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.4);
  }
}

/* Enhanced focus states */
.yaml-sidebar .form-input:focus,
.search-input-wrapper:focus-within {
  animation: focus-ring 0.3s ease;
}

@keyframes focus-ring {
  0% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4); }
  100% { box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15); }
}

/* Validation badge animations */
.yaml-validation-badge.valid {
  animation: valid-pulse 0.5s ease;
}

@keyframes valid-pulse {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.yaml-validation-badge.invalid {
  animation: invalid-shake 0.5s ease;
}

@keyframes invalid-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-3px); }
  40% { transform: translateX(3px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

.plugin-item.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(139, 92, 246, 0.08));
  border-color: rgba(139, 92, 246, 0.3);
  color: #e5e7eb;
}

.plugin-item.active::before {
  background: #8b5cf6;
}

.plugin-item i {
  color: #8b5cf6;
  font-size: 0.9rem;
  flex-shrink: 0;
  opacity: 0.8;
}

.plugin-item.active i {
  opacity: 1;
}

.plugin-item-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.plugin-item-tag {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: #a78bfa;
  border-radius: 4px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.15rem 0.4rem;
  text-transform: uppercase;
}

.plugin-item-tag.origin {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.25);
  color: #60a5fa;
}

.plugin-item-tag.origin.uploaded {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.25);
  color: #34d399;
}

/* Zaryx Lab - Snippet tools */
.yaml-lab-section {
  padding-top: 1rem;
}

.yaml-lab-section h3 {
  color: #f59e0b !important;
}

.yaml-lab-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.yaml-lab-grid .toolbar-btn {
  justify-content: flex-start;
  font-size: 0.72rem;
  padding: 0.5rem 0.6rem;
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.yaml-lab-grid .toolbar-btn:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
}

.yaml-lab-grid .toolbar-btn i {
  font-size: 0.75rem;
}

/* Main editor area */
.yaml-main {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  background: #0a0815;
}

/* Editor wrapper - IDE style */
.yaml-editor-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

/* Editor header - Sleek tab bar */
.editor-header {
  padding: 0.75rem 1rem;
  background: linear-gradient(180deg, rgba(30, 25, 50, 0.98) 0%, rgba(20, 15, 40, 0.98) 100%);
  border-bottom: 1px solid rgba(139, 92, 246, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.editor-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1;
  min-width: 0;
}

.file-name {
  color: #e5e7eb;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.file-name::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #8b5cf6;
  border-radius: 50%;
  flex-shrink: 0;
}

.file-size {
  color: #6b7280;
  font-size: 0.8rem;
}

/* Source badges */
.yaml-source-badge {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(139, 92, 246, 0.1));
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #c4b5fd;
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.yaml-source-badge.jar {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.1));
  border-color: rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

.yaml-source-badge.yaml {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.1));
  border-color: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.yaml-modified-badge {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.1));
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fcd34d;
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 700;
  animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.yaml-validation-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 700;
}

.yaml-validation-badge.valid {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.1));
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.yaml-validation-badge.invalid {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.1));
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

/* Enhanced Toolbar */
.editor-toolbar {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.toolbar-separator {
  width: 1px;
  height: 18px;
  background: rgba(139, 92, 246, 0.2);
  margin: 0 0.2rem;
}

.toolbar-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #9ca3af;
  border-radius: 6px;
  padding: 0.5rem;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
}

.toolbar-btn:hover:not(:disabled) {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}

.toolbar-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.toolbar-btn.active {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
}

.toolbar-btn.compact {
  padding: 0.35rem;
  min-width: 28px;
  height: 28px;
  font-size: 0.75rem;
}

/* Search Panel - Floating style */
.yaml-search-panel {
  background: linear-gradient(180deg, rgba(30, 25, 50, 0.98) 0%, rgba(25, 20, 45, 0.98) 100%);
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
  padding: 0.75rem 1rem;
  display: none;
  animation: slideDown 0.2s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.yaml-search-panel.active {
  display: block;
}

.search-row, .replace-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.replace-row {
  margin-top: 0.5rem;
}

.search-input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
  transition: all 0.2s ease;
}

.search-input-wrapper:focus-within {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.search-input-wrapper i {
  color: #6b7280;
  font-size: 0.8rem;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #e5e7eb;
  font-size: 0.85rem;
}

.search-controls {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.search-nav-btn {
  background: rgba(139, 92, 246, 0.15);
  border: none;
  color: #a78bfa;
  border-radius: 4px;
  padding: 0.3rem 0.4rem;
  cursor: pointer;
  font-size: 0.7rem;
  transition: all 0.15s ease;
}

.search-nav-btn:hover {
  background: rgba(139, 92, 246, 0.25);
}

.search-count {
  color: #6b7280;
  font-size: 0.7rem;
  padding: 0 0.5rem;
  font-weight: 600;
}

.search-options {
  display: flex;
  gap: 0.75rem;
}

.search-option {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: #6b7280;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-option:hover {
  color: #a78bfa;
}

.search-option input {
  accent-color: #8b5cf6;
}

.replace-controls {
  display: flex;
  gap: 0.3rem;
}

.replace-btn {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: #a78bfa;
  border-radius: 4px;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.replace-btn:hover {
  background: rgba(139, 92, 246, 0.25);
  border-color: rgba(139, 92, 246, 0.4);
}

/* Code Editor Container - Pro IDE feel */
.yaml-editor-container {
  display: flex;
  background: #0a0815;
  flex: 1;
  min-height: 300px;
  position: relative;
  overflow: hidden;
}

.editor-gutter {
  width: 55px;
  background: linear-gradient(180deg, rgba(15, 10, 25, 0.95) 0%, rgba(10, 8, 20, 0.95) 100%);
  border-right: 1px solid rgba(139, 92, 246, 0.1);
  padding: 12px 8px;
  font-family: 'Fira Code', monospace;
  font-size: 13px;
  color: #4b5563;
  text-align: right;
  user-select: none;
  line-height: 1.6;
  overflow: hidden;
}

.editor-gutter .line-number {
  opacity: 0.6;
  transition: opacity 0.15s ease;
}

.editor-gutter .line-number:hover {
  opacity: 1;
  color: #8b5cf6;
}

.editor-gutter .line-number.active {
  color: #8b5cf6;
  opacity: 1;
  font-weight: 600;
}

.editor-content {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.yaml-editor {
  flex: 1;
  background: transparent;
  color: #c4b5fd;
  font-family: 'Fira Code', 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
  padding: 12px 16px;
  border: none;
  outline: none;
  resize: none;
  overflow-y: auto;
  white-space: pre;
  word-wrap: normal;
  position: relative;
  z-index: 2;
  tab-size: 2;
  caret-color: #8b5cf6;
}

.yaml-editor::selection {
  background: rgba(139, 92, 246, 0.35);
}

.yaml-editor::placeholder {
  color: #4b5563;
  font-style: italic;
}

.yaml-editor::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.yaml-editor::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.yaml-editor::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.25);
  border-radius: 4px;
}

.yaml-editor::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.4);
}

.yaml-editor::-webkit-scrollbar-corner {
  background: transparent;
}

/* Syntax highlighting overlay */
.editor-highlight {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px;
  font-family: 'Fira Code', 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre;
  word-wrap: normal;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.editor-highlight .yaml-key {
  color: #60a5fa;
  font-weight: 500;
}

.editor-highlight .yaml-value {
  color: #34d399;
}

.editor-highlight .yaml-string {
  color: #fcd34d;
}

.editor-highlight .yaml-number {
  color: #f87171;
}

.editor-highlight .yaml-boolean {
  color: #c084fc;
  font-weight: 600;
}

.editor-highlight .yaml-comment {
  color: #6b7280;
  font-style: italic;
}

.editor-highlight .yaml-placeholder {
  color: #fb923c;
  background: rgba(251, 146, 60, 0.15);
  padding: 1px 4px;
  border-radius: 3px;
}

/* Status bar - Bottom info strip */
.editor-status-bar {
  background: linear-gradient(180deg, rgba(25, 20, 45, 0.98) 0%, rgba(20, 15, 40, 0.98) 100%);
  border-top: 1px solid rgba(139, 92, 246, 0.15);
  padding: 0.4rem 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  color: #6b7280;
}

.status-left, .status-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.status-item:hover {
  background: rgba(139, 92, 246, 0.1);
  color: #a78bfa;
}

.status-btn {
  background: transparent;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 0.2rem 0.3rem;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.status-btn:hover {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}

/* Insights Panel - Analytics dashboard */
.yaml-insights-panel {
  background: linear-gradient(180deg, rgba(20, 15, 35, 0.98) 0%, rgba(15, 10, 30, 0.98) 100%);
  border-top: 1px solid rgba(139, 92, 246, 0.15);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.insights-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.insights-header h3 {
  margin: 0;
  color: #a78bfa;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.panel-toggle {
  background: transparent;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.panel-toggle:hover {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}

.insights-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
}

.yaml-insight-card {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(139, 92, 246, 0.03));
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 10px;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.2s ease;
}

.yaml-insight-card:hover {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateY(-2px);
}

.insight-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(139, 92, 246, 0.1));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a78bfa;
  font-size: 0.85rem;
}

.insight-content {
  flex: 1;
}

.insight-label {
  display: block;
  color: #6b7280;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.15rem;
}

.insight-content strong {
  color: #e5e7eb;
  font-size: 1.1rem;
  font-weight: 700;
}

/* Validation Section */
.yaml-validation-section {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 10px;
  padding: 1rem;
}

.yaml-validation-section h4 {
  margin: 0 0 0.75rem 0;
  color: #a78bfa;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.validation-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
}

.validation-status.valid {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.validation-status.invalid {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.validation-icon {
  font-size: 0.9rem;
}

.validation-icon.valid {
  color: #34d399;
}

.validation-icon.invalid {
  color: #f87171;
}

.validation-text {
  color: #e5e7eb;
  font-size: 0.8rem;
}

/* Placeholder chips */
.yaml-placeholder-section {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.1);
  border-radius: 10px;
  padding: 0.75rem;
}

.yaml-placeholder-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.yaml-placeholder-section h4 {
  margin: 0;
  color: #9ca3af;
  font-size: 0.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.yaml-placeholder-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-height: 32px;
  align-items: center;
}

.yaml-placeholder-empty {
  color: #4b5563;
  font-size: 0.75rem;
  font-style: italic;
}

.yaml-placeholder-chip {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.15), rgba(251, 146, 60, 0.08));
  border: 1px solid rgba(251, 146, 60, 0.25);
  color: #fdba74;
  border-radius: 4px;
  font-size: 0.7rem;
  font-family: 'Fira Code', monospace;
  padding: 0.2rem 0.4rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.yaml-placeholder-chip:hover {
  background: rgba(251, 146, 60, 0.2);
  border-color: rgba(251, 146, 60, 0.4);
}

/* Minecraft Preview - Game-like feel */
.yaml-minecraft-preview {
  background: linear-gradient(180deg, rgba(15, 10, 25, 0.98) 0%, rgba(10, 8, 20, 0.98) 100%);
  border-top: 1px solid rgba(139, 92, 246, 0.15);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.yaml-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.yaml-preview-header h3 {
  margin: 0;
  font-size: 0.8rem;
  color: #a78bfa;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.preview-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.yaml-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  overflow-y: auto;
}

.yaml-preview-card {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 10px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 120px;
}

.preview-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.preview-card-header h4 {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: #8b5cf6;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.preview-options {
  display: flex;
  gap: 0.5rem;
}

.preview-options .checkbox-label {
  font-size: 0.65rem;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.minecraft-chat-box,
.minecraft-actionbar-box,
.minecraft-title-box {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(100, 100, 100, 0.3);
  border-radius: 6px;
  padding: 0.6rem;
  flex: 1;
  font-family: 'Fira Code', monospace;
  font-size: 0.8rem;
  overflow: hidden;
}

.minecraft-preview-empty-v2 {
  color: #4b5563;
  font-size: 0.75rem;
  text-align: center;
  font-style: italic;
  padding: 1rem;
}

.btn-sm {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: #a78bfa;
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  font-size: 0.65rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-sm:hover {
  background: rgba(139, 92, 246, 0.25);
  border-color: rgba(139, 92, 246, 0.4);
}

/* Catalog Panel */
.yaml-catalog-panel {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.1);
  border-radius: 10px;
  padding: 0.75rem;
}

.yaml-catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.yaml-catalog-toolbar strong {
  color: #a78bfa;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.yaml-catalog-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.4rem;
  max-height: 180px;
  overflow-y: auto;
}

.yaml-catalog-item {
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 6px;
  padding: 0.5rem 0.6rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.yaml-catalog-item:hover {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.3);
}

.yaml-catalog-token {
  color: #c4b5fd;
  font-family: 'Fira Code', monospace;
  font-size: 0.75rem;
  font-weight: 600;
}

.yaml-catalog-meta {
  color: #6b7280;
  font-size: 0.65rem;
  margin-top: 0.15rem;
}

/* CodeMirror integration */
.CodeMirror {
  height: 100%;
  font-family: 'Fira Code', monospace;
  font-size: 13px;
  line-height: 1.6;
  background: #0a0815;
  color: #c4b5fd;
}

/* Layout tweaks: three-column grid with right info sidebar */
.yaml-layout-container {
  display: grid;
  grid-template-columns: 300px 1fr 300px;
  gap: 0;
  height: calc(100vh - 140px);
  min-height: 600px;
  background: linear-gradient(135deg, rgba(15, 10, 31, 0.95) 0%, rgba(20, 15, 40, 0.95) 100%);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.2);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

.yaml-main {
  grid-column: 2 / 3;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow: hidden;
}

.yaml-info-section {
  grid-column: 3 / 4;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: linear-gradient(180deg, rgba(20, 15, 35, 0.98) 0%, rgba(15, 10, 30, 0.98) 100%);
  padding: 1rem;
  overflow-y: auto;
}

/* Editor tab bar (IDE-style) */
.editor-tab-bar {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  padding: 0.4rem 1rem;
  background: linear-gradient(180deg, rgba(30,25,50,0.98) 0%, rgba(20,15,40,0.98) 100%);
  border-bottom: 1px solid rgba(139,92,246,0.15);
}
.editor-tab {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.8rem;
  background: rgba(139,92,246,0.1);
  color: #e5e7eb;
  border-radius: 6px 6px 0 0;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.editor-tab.active {
  background: rgba(139,92,246,0.2);
  color: #fff;
  font-weight: 600;
}

.editor-tab .tab-close {
  font-size: 0.75rem;
  opacity: 0.6;
  cursor: pointer;
}

.editor-tab .tab-close:hover {
  opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .yaml-layout-container {
    grid-template-columns: 260px 1fr;
  }
  
  .insights-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .yaml-preview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .yaml-layout-container {
    grid-template-columns: 220px 1fr;
    height: auto;
    min-height: 500px;
  }
  
  .editor-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .editor-toolbar {
    width: 100%;
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  .yaml-layout-container {
    grid-template-columns: 1fr;
  }
  
  .yaml-sidebar {
    max-height: 250px;
    border-right: none;
    border-bottom: 1px solid rgba(139, 92, 246, 0.15);
  }
  
  .insights-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .yaml-preview-grid {
    grid-template-columns: 1fr;
  }
  
  .yaml-lab-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   YAML VSCODE OVERRIDES (Clap purple)
======================================== */

.yaml-vscode {
  --yaml-bg: #0b0718;
  --yaml-panel: #140b2b;
  --yaml-border: rgba(139, 92, 246, 0.28);
  --yaml-text: #f3f4f6;
  --yaml-muted: #a1a1aa;
  --yaml-accent: #a78bfa;
  --yaml-accent-strong: #8b5cf6;
}

.yaml-vscode-toolbar {
  background: rgba(12, 8, 24, 0.9);
  border-color: var(--yaml-border);
  backdrop-filter: blur(14px);
}

.yaml-vscode-sidebar,
.yaml-vscode-panel,
.yaml-vscode-editor {
  background: rgba(11, 7, 24, 0.82);
  border-color: var(--yaml-border);
  box-shadow: 0 18px 40px rgba(11, 5, 24, 0.45);
}

.yaml-source-badge,
.yaml-modified-badge {
  background: rgba(139, 92, 246, 0.18);
  border-color: rgba(139, 92, 246, 0.45);
  color: var(--yaml-text);
}

.yaml-source-badge.jar {
  background: rgba(251, 191, 36, 0.18);
  border-color: rgba(251, 191, 36, 0.45);
  color: #fde68a;
}

.yaml-source-badge.yaml {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.4);
  color: #86efac;
}

.yaml-file-meta-detail,
.yaml-sidebar-stats,
.yaml-breadcrumbs {
  color: var(--yaml-muted);
}

.plugin-item,
.yaml-file-item {
  background: rgba(139, 92, 246, 0.08);
  color: var(--yaml-text);
}

.plugin-item i {
  color: #c4b5fd;
}

.plugin-item-tag {
  background: rgba(139, 92, 246, 0.25);
  color: #e9d5ff;
}

.plugin-item.active,
.yaml-file-item.active {
  border-color: rgba(139, 92, 246, 0.6);
  background: rgba(139, 92, 246, 0.22);
}

.plugin-item:hover,
.yaml-file-item:hover {
  border-color: rgba(139, 92, 246, 0.4);
}

.yaml-editor-container {
  background: var(--yaml-bg);
  border-color: rgba(139, 92, 246, 0.3);
}

.yaml-editor-container .CodeMirror,
.yaml-editor-container .CodeMirror-gutters {
  background: var(--yaml-bg);
}

.yaml-editor-container .CodeMirror-gutters {
  border-right: 1px solid rgba(139, 92, 246, 0.2);
}

.yaml-editor-container .CodeMirror-linenumber {
  color: #7c7f98;
}

.yaml-editor-container .CodeMirror-cursor {
  border-left: 2px solid var(--yaml-accent);
}

.yaml-editor-container .CodeMirror-selected {
  background: rgba(167, 139, 250, 0.28);
}

.yaml-editor-container .CodeMirror-activeline-background {
  background: rgba(139, 92, 246, 0.1);
}

.yaml-statusbar {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.35), rgba(76, 29, 149, 0.35));
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: #f8fafc;
}
