/* styles.css */
body {
  font-family: 'Roboto', sans-serif;
  background: #f5f8fa;
  margin: 0;
  padding: 0;
  color: #222;
  min-height: 100vh;
}




/* Language Selector - Compact Toggle Top Right */
.language-selector {
  position: fixed;
  top: 15px;
  right: 20px;
  z-index: 1000;
  display: flex;
  background: #f0f8ff;
  border: 2px solid #007ACC;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  padding: 0;
  gap: 0;
  height: 36px; /* ✅ ADDED: Fixed height */
  align-items: center; /* ✅ ADDED: Center content */
}

.lang-toggle-btn {
  padding: 0 20px; /* ✅ CHANGED: Remove vertical padding */
  border: none;
  background: transparent;
  color: #007ACC;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
  margin: 0;
  height: 100%; /* ✅ ADDED: Fill parent height */
  display: flex; /* ✅ ADDED: Flexbox */
  align-items: center; /* ✅ ADDED: Center text */
}

.notification-selector {
  position: fixed;
  top: 15px;
  right: 170px;
  z-index: 1000;
  display: flex;
  background: #f0f8ff;
  border: 2px solid #007ACC;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  padding: 0;
  gap: 0;
  height: 36px;
  align-items: center;
}

.notification-toggle-btn {
  padding: 0 20px;
  border: none;
  background: transparent;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
  margin: 0;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.notification-toggle-btn:hover {
  background: rgba(0, 122, 204, 0.1);
}

#notificationContainer {
  position: fixed;
  top: 130px;
  right: 20px;
  z-index: 10000;
  max-width: 350px;
}




.lang-toggle-btn:hover:not(.active) {
  background: rgba(0, 122, 204, 0.1);
}

.lang-toggle-btn.active {
  background: #007ACC;
  color: white;
}


/* Main Layout with Sidebar - Flexible */
.main-layout {
  display: flex;
  min-height: calc(100vh - 120px);
  gap: 25px;
  padding: 25px;
  background: transparent;
  width: 100%;  /* ✅ ADDED */
  box-sizing: border-box;  /* ✅ ADDED */
}

/* Authentication Sidebar - Improved responsive behavior */
.auth-sidebar {
  width: clamp(280px, 25vw, 350px);  /* ✅ Responsive width */
  min-width: 280px;
  max-width: 350px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: width 0.3s ease, transform 0.3s ease;
  position: relative;
  overflow: hidden;  /* ✅ CRITICAL: allows logos to extend edge-to-edge */
  flex-shrink: 0;
  margin: 20px;
  padding: 20px;
}

/* Optional hover lift effect (for aesthetics) */
.auth-sidebar:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}
.sidebar-content {
  padding: 60px 10px 25px; /* reduce side padding since parent has it */
}

.auth-sidebar.collapsed {
  width: 60px;
  min-width: 60px;
}

.auth-sidebar.collapsed .sidebar-content {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.toggle-sidebar-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #007ACC;
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background 0.3s;
  z-index: 10;
}

.toggle-sidebar-btn:hover {
  background: #004080;
}

.sidebar-content {
  padding: 0;  /* ✅ Let logo banner handle spacing */
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.auth-sidebar h2 {
  color: #004080;
  margin-top: 0;
  margin-bottom: 20px;
  text-align: center;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
}

.auth-sidebar label {
  display: block;
  margin-top: 15px;
  font-weight: 500;
  color: #333;
  font-size: clamp(0.85rem, 1.5vw, 0.9rem);
}

.auth-sidebar input,
.auth-sidebar select {
  width: 100%;
  padding: 8px 10px;
  margin-top: 6px;
  border: 1.8px solid #ccc;
  border-radius: 5px;
  font-size: clamp(0.85rem, 1.5vw, 0.95rem);
  box-sizing: border-box;
}

.auth-sidebar input:focus,
.auth-sidebar select:focus {
  border-color: #007ACC;
  outline: none;
  box-shadow: 0 0 8px rgba(0, 122, 204, 0.4);
}

.auth-sidebar button#authBtn {
  margin-top: 20px;
  background-color: #007ACC;
  color: white;
  border: none;
  padding: 10px 0;
  width: 100%;
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.auth-sidebar button#authBtn:hover {
  background-color: #004080;
}

/* Auth Status Indicator */
.auth-status {
  margin-top: 20px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #e0e0e0;
}

.status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #dc3545;
  flex-shrink: 0;
}

.status-indicator.connected {
  background: #28a745;
}

.status-text {
  font-size: clamp(0.75rem, 1.2vw, 0.85rem);
  color: #555;
  font-weight: 500;
}

/* Token Status Display */
.token-status-container {
  margin-top: 20px;
  padding: 15px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 8px;
  border: 2px solid #dee2e6;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.token-status-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  display: block;
}

.token-status-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.token-status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #6c757d;
  flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}

.token-status-indicator.valid {
  background: #28a745;
}

.token-status-indicator.refresh {
  background: #ffc107;
}

.token-status-indicator.expired {
  background: #dc3545;
}

.token-status-indicator.none {
  background: #6c757d;
}

.token-status-text {
  font-size: clamp(0.85rem, 1.3vw, 0.9rem);
  color: #333;
  font-weight: 600;
  flex: 1;
}

@keyframes pulse-dot {
  0%, 100% { 
    opacity: 1;
    transform: scale(1);
  }
  50% { 
    opacity: 0.6;
    transform: scale(1.2);
  }
}

/* Main Content Area - Flexible */
.main-content {
  flex: 1;  /* ✅ Takes all remaining space */
  width: 100%;  /* ✅ ADDED: Full width */
  max-width: 100%;  /* ✅ ADDED: Allow full expansion */
  padding: clamp(15px, 3vw, 30px);
  overflow-y: auto;
  overflow-x: hidden;  /* ✅ ADDED: Prevent horizontal scroll */
  min-width: 0;  /* ✅ Important for flex shrinking */
}

section#onboardingSimulator {
  background: white;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  padding: 0;  /* ✅ CHANGED: Let logo banner handle padding */
  width: 100%;
  max-width: none;
  margin: 0 auto;
  box-sizing: border-box;
  overflow: hidden;  /* ✅ CRITICAL: allows logos to extend edge-to-edge */
}

h2 { 
  color: #004080; 
  margin-top: 0; 
  text-align: center;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
}

h3 {
  color: #004080;
  margin-top: 0;
  margin-bottom: 20px;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
}

label { 
  display: block; 
  margin-top: 15px; 
  font-weight: 500; 
  color: #333;
  font-size: clamp(0.9rem, 1.5vw, 1rem);
}

input, select {
  width: 100%; 
  padding: 8px 10px; 
  margin-top: 6px; 
  border: 1.8px solid #ccc;
  border-radius: 5px; 
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  box-sizing: border-box;
}

input:focus, select:focus {
  border-color: #007ACC; 
  outline: none;
  box-shadow: 0 0 8px rgba(0, 122, 204, 0.4);
}

button {
  margin-top: 20px;
  background-color: #007ACC; 
  color: white; 
  border: none;
  padding: 12px 0; 
  width: 100%; 
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  border-radius: 6px; 
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

button:hover { 
  background-color: #004080; 
}

.response-box, pre {
  background: #e9f1fb;
  padding: 15px;
  border-radius: 6px;
  max-height: 300px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin-top: 15px;
  font-size: clamp(0.8rem, 1.5vw, 0.9rem);
  color: #222;
}

/* Tabs and SubTabs */
.tabs, .subTabs { 
  display: flex; 
  gap: 10px; 
  margin-top: 15px;
  flex-wrap: wrap;
}

.tabBtn, .subTabBtn {
  flex: 1; 
  min-width: 140px;
  padding: 10px; 
  border-radius: 6px; 
  border: none; 
  cursor: pointer;
  background: #e0e0e0; 
  font-weight: 600;
  font-size: clamp(0.85rem, 1.5vw, 0.95rem);
  transition: background 0.3s ease;
}

.tabBtn.active, .subTabBtn.active { 
  background: #007ACC; 
  color: white; 
}

/* Tab Content Visibility Control */
.tabContent { 
  margin-top: 20px;
  display: none;
}

.tabContent.active {
  display: block;
}

/* SubTab Content Visibility Control */
.subTabContent { 
  margin-top: 20px;
  display: none;
}

.subTabContent.active {
  display: block;
}

.entity-fields input {
  margin-top: 5px;
  margin-bottom: 10px;
}



/* Popup - Responsive */
#popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  min-width: min(400px, 90vw);
  max-width: min(600px, 95vw);
}

#popupText {
  font-size: 1.1rem;
  margin-bottom: 15px;
}

#popupLink {
  width: 100%;
  padding: 8px;
  font-size: 1rem;
  margin-bottom: 15px;
  display: none;
}

#closePopup {
  padding: 8px 15px;
  font-size: 1rem;
}

/* Tablet Breakpoint */
@media (max-width: 1024px) {
  .auth-sidebar {
    width: clamp(220px, 25vw, 280px);
    min-width: 220px;
  }
  
  .language-selector {
    top: 10px;
    right: 10px;
    padding: 8px 12px;
    gap: 8px;
  }
  
  .lang-btn {
    padding: 6px 12px;
    font-size: 13px;
  }
}

/* Mobile Breakpoint */
@media (max-width: 768px) { 
  .main-layout { 
    flex-direction: column;
    padding: 15px;  /* ✅ Less padding on mobile */
    gap: 15px;  /* ✅ Less gap on mobile */
  }
  
  .auth-sidebar {
    width: 100%;  /* ✅ Full width on mobile */
    min-width: 100%;
    max-width: 100%;
    margin-bottom: 20px;
  }
  
  .auth-sidebar.collapsed {
    width: 100%;
    height: 60px;
  }
  
  .toggle-sidebar-btn {
    top: 12px;
    right: 12px;
  }
  
  .resize-handle {
    display: none;
  }
  

  
 
  
  .main-content {
    padding: 15px;
    width: 100%;
  }
  
  section#onboardingSimulator {
    padding: 20px 15px;
    width: 100%;
  }
  
  .tabs, .subTabs {
    flex-direction: column;
  }
  
  .tabBtn, .subTabBtn {
    width: 100%;
    min-width: 100%;
  }
    .language-selector {
    top: 10px;
    right: 10px;
    border-radius: 18px;
  }
  
  .lang-toggle-btn {
    padding: 5px 14px;
    font-size: 12px;
  }
  
}

/* Small Mobile Breakpoint */
@media (max-width: 480px) {
    .language-selector {
    top: 8px;
    right: 8px;
  }
  
  .lang-toggle-btn {
    padding: 4px 12px;
    font-size: 11px;
  }
  

  section#onboardingSimulator {
    padding: 15px;
  }
}

/* Large Screen Optimization */
@media (min-width: 1600px) {
  .main-content {
    max-width: 1800px;  /* ✅ Limit on very large screens */
    margin: 0 auto;  /* ✅ Center the layout */
  }
  
  section#onboardingSimulator {
    padding: 40px;

  }
}