/* Global styles and CSS reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Login Screen Styles */
.login-screen {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #356866 0%, #2d5a57 50%, #1a3d3a 100%);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.login-screen::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
  pointer-events: none;
}

.login-container {
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 1;
}

.login-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 48px 40px;
  border-radius: 20px;
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #356866 0%, #3C736D 50%, #356866 100%);
}

.login-header {
  text-align: center;
  margin-bottom: 36px;
}

.login-logo {
  width: 96px;
  height: 96px;
  margin-bottom: 28px;
  filter: drop-shadow(0 6px 12px rgba(53, 104, 102, 0.3));
  object-fit: contain;
}

.login-header h2 {
  color: #2d225a;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.login-header p {
  color: #64748b;
  font-size: 15px;
  line-height: 1.5;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 8px;
  color: #374151;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.025em;
}

.form-control {
  padding: 16px 20px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: #f9fafb;
  color: #374151;
  font-weight: 500;
}

.form-control:focus {
  outline: none;
  border-color: #356866;
  background: white;
  box-shadow: 0 0 0 3px rgba(53, 104, 102, 0.1);
  transform: translateY(-1px);
}

.form-control::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

.login-btn {
  padding: 16px 24px;
  background: linear-gradient(135deg, #356866 0%, #3C736D 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(53, 104, 102, 0.3);
  letter-spacing: 0.025em;
  position: relative;
  overflow: hidden;
}

.login-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(53, 104, 102, 0.4);
}

.login-btn:hover::before {
  left: 100%;
}

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

.login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 4px 12px rgba(53, 104, 102, 0.2);
}

.error-message {
  color: #dc2626;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  margin-top: 12px;
  padding: 12px;
  background: rgba(220, 38, 38, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(220, 38, 38, 0.2);
}

/* Sidebar Logout Button */
.logout-btn-sidebar {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  width: 100%;
}

.logout-btn-sidebar:hover {
  background: rgba(30, 64, 175, 0.3);
  border-color: rgba(30, 64, 175, 0.4);
  color: #60a5fa;
}


/* Animations */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

html, body {
  height: 100vh;
  min-height: 0;
  width: 100vw;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
  margin: 0;
  padding: 0;
}

/* App Layout */
.app-container {
  height: 100vh;
  min-height: 0;
  display: flex;
  flex-direction: row;
}

/* Sidebar */
.sidebar {
  width: 100px;
  background: #356866;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 20px 8px 15px 8px;
  position: relative;
  z-index: 10;
  box-sizing: border-box;
  height: 100vh;
}

.sidebar-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  margin-bottom: 0;
  width: 100%;
}

.logo {
  width: 84px;
  height: 84px;
  background: white;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.logo-img {
  width: 84px !important;
  height: 84px !important;
  object-fit: contain;
  border-radius: 16px;
}

.sidebar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: white;
  font-size: 12px;
}

.item-number {
  font-weight: 600;
  font-size: 14px;
}

.item-icon {
  font-size: 16px;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  align-items: center;
  justify-content: flex-start;
  margin-top: 20px;
  margin-bottom: 20px;
  padding-top: 10px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 4px 8px 4px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  text-align: center;
  width: 88px;
  margin: 0 auto;
}

.nav-item.active, .nav-item:hover {
  background: rgba(255,255,255,0.13);
  color: #fff;
}

.nav-icon {
  font-size: 30px;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-label {
  font-weight: 600;
  line-height: 1.2;
  font-size: 15px;
  letter-spacing: 0.01em;
  padding-left: 2px;
}

.sidebar-footer {
  width: 100%;
  padding: 0 0 18px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.profile-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 0 0 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  text-align: center;
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.2s ease;
}

.profile-section:hover {
  background: rgba(255, 255, 255, 0.13);
  color: white;
}

.profile-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

/* Main Content */
.main-content {
  flex: 1 1 0%;
  min-width: 0;
  height: 100vh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  overflow-y: auto;
}

/* Header */
.app-header {
  background: white;
  border-bottom: 1px solid #e5e7eb;
  padding: 20px 24px;
  flex-shrink: 0;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.header-title h1 {
  text-align: left;
  font-size: 24px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 8px;
}

.header-subtitle {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
  max-width: 600px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  font-size: 13px;
  color: #15803d;
  font-weight: 500;
}

.connection-status::before {
  content: "●";
  color: #22c55e;
  font-size: 10px;
}


.menu-btn {
  padding: 8px;
  background: none;
  border: none;
  font-size: 18px;
  color: #6b7280;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.menu-btn:hover {
  background: #f3f4f6;
}

.header-toolbar {
  display: flex;
  gap: 12px;
}

.toolbar-btn {
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid #d1d5db;
  background: white;
  color: #374151;
}

.toolbar-btn:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.toolbar-btn.primary {
  background: #356866;
  color: white;
  border-color: #356866;
}

.toolbar-btn.primary:hover {
  background: #2d5654;
  border-color: #2d5654;
}

/* Header Buttons */
.header-btn {
  transition: all 0.3s ease;
  background: white !important;
}

.header-btn:hover {
  background: #356866 !important;
  color: white !important;
  border-color: #356866 !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(53, 104, 102, 0.3);
}

.header-btn:hover svg {
  stroke: white;
}

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

/* Content Area */
.content-area {
  flex: 1 1 0%;
  min-height: 0;
  display: flex;
  flex-direction: row;
  height: calc(100vh - 100px);
  background: #e5e7eb;
  overflow-y: auto;
}

/* Modeler Container */
.modeler-container {
  flex: 1 1 0%;
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  border-radius: 0;
  position: relative;
  overflow-y: auto;
}

.diagram-container, #canvas {
  flex: 1 1 0%;
  min-height: 0;
  height: 100%;
  position: relative;
  background: #f8fafc;
  overflow-y: auto;
}


.bjs-powered-by,
[class="bjs-powered-by"],
a[href*="bpmn.io"] {
  color: #f8fafc !important;
  opacity: 0 !important;
}

/* BPMN Palette customization to make it vertical */
.djs-palette {
  position: absolute !important;
  top: 10px !important;
  left: 10px !important;
  bottom: 10px !important;
  right: auto !important;
  width: 48px !important;
  height: auto !important;
  background: white !important;
  border: 1px solid #E7E8EC !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  z-index: 1000 !important;
  display: flex !important;
}

.djs-palette-entries {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  justify-content: flex-start !important;
  align-items: center !important;
  padding: 8px 4px !important;
  gap: 2px !important;
}

.djs-palette-entry {
  width: 40px !important;
  height: 40px !important;
  margin: 0 !important;
  border-radius: 6px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
}

.djs-palette-entry:hover {
  background: #f3f4f6 !important;
  transform: translateX(2px) !important;
}

.djs-palette-separator {
  width: 32px !important;
  height: 1px !important;
  background: #E7E8EC !important;
  margin: 4px 0 !important;
}

/* Chat Container */
.chatbot-container {
  width: 400px;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0;
  flex-shrink: 0;
  overflow-y: auto;
}

#chatbot-window.chatbot-container {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.chat-header {
  padding: 16px 20px;
  background: white;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.chat-title {
  font-weight: 600;
  font-size: 16px;
  color: #1f2937;
}

.chat-close {
  background: none;
  border: none;
  font-size: 18px;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s ease;
}

.chat-close:hover {
  color: #6b7280;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  scroll-behavior: smooth;
  background: #fafafa;
}

.welcome-message {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 8px;
  background: rgba(53, 104, 102, 0.08);
  border: 1px solid rgba(53, 104, 102, 0.2);
}

.welcome-message .message-content {
  flex: 1;
}

.welcome-message p {
  margin: 0 0 8px 0;
  color: #6b7280;
  font-size: 15px;
  line-height: 1.6;
}

.welcome-message ul {
  margin: 8px 0 0 0;
  padding-left: 20px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.6;
}

.welcome-message li {
  margin-bottom: 4px;
  /* Remove font-style override for Hub */
}

.message-header {
  margin-bottom: 8px;
}

.bot-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-info {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.bot-avatar-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: contain;
  background: white;
  padding: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 2px solid #f1f5f9;
}

.user-avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.user-avatar-icon {
  width: 40px;
  height: 40px;
  color: #612E6E;
  background: white;
  border-radius: 50%;
  padding: 6px;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 2px solid #f1f5f9;
}

.bot-name, .user-name {
  font-weight: 600;
  font-size: 14px;
  color: #1f2937;
}

.message-time {
  font-size: 12px;
  color: #9ca3af;
}

.message {
  margin-bottom: 20px;
}

.user-message {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.bot-message {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.user-message .message-content {
  background: #356866;
  color: white;
  padding: 12px 16px;
  border-radius: 18px 18px 4px 18px;
  margin-left: auto;
  max-width: 80%;
  display: inline-block;
}

.bot-message .message-content {
  background: white;
  color: #1f2937;
  padding: 12px 16px;
  border-radius: 18px 18px 18px 4px;
  max-width: 80%;
  display: inline-block;
  border: 1px solid #e5e7eb;
}

.message-text {
  line-height: 1.5;
  word-wrap: break-word;
  margin: 0;
}

.processing-message .message-content {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
  padding: 12px 16px;
  border-radius: 18px 18px 18px 4px;
  max-width: 80%;
  display: inline-block;
}

.error-message .message-content {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  padding: 12px 16px;
  border-radius: 18px 18px 18px 4px;
  max-width: 80%;
  display: inline-block;
}

.diagram-update-message .message-content {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  padding: 12px 16px;
  border-radius: 18px 18px 18px 4px;
  max-width: 80%;
  display: inline-block;
}

.message-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.action-btn {
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.action-btn.primary {
  background: #356866;
  color: white;
}

.action-btn.primary:hover {
  background: #2d5654;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(53, 104, 102, 0.25);
}

.action-btn.secondary {
  background: #f5f5f5;
  color: #666;
  border: 1px solid #e0e0e0;
}

.action-btn.secondary:hover {
  background: #e5e5e5;
  border-color: #d0d0d0;
}

.btn-icon {
  font-size: 12px;
}

.processing-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { 
    transform: rotate(0deg); 
  }
  to { 
    transform: rotate(360deg); 
  }
}

.chat-input-container {
  padding: 20px 24px;
  background: white;
  border-top: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.input-group {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.input-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid #d1d5db;
  border-radius: 20px;
  background: white;
  width: 100%;
  overflow: hidden;
}

.input-wrapper:focus-within {
  border-color: #356866;
  box-shadow: 0 0 0 1px #356866;
}

.input-wrapper:has(.chat-input:disabled) {
  background: #f3f4f6;
}

.chat-input {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 20px;
  resize: none;
  min-height: 20px;
  max-height: 120px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  background: transparent;
  outline: none;
}

.chat-input:disabled {
  background: #f3f4f6;
  color: #9ca3af;
}

.attachment-btn {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  transition: color 0.2s ease;
}

.attachment-btn:hover {
  color: #6b7280;
}

/* Attachment popup styles */
.attachment-popup {
  position: fixed;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  padding: 8px;
  z-index: 1000;
  min-width: 120px;
}

.attachment-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color 0.2s;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
}

.attachment-option:hover {
  background-color: #f3f4f6;
}

.attachment-option svg {
  flex-shrink: 0;
}

.voice-btn {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  transition: all 0.2s ease;
  font-size: 16px;
}

.voice-btn:hover {
  color: #6b7280;
}

.voice-btn.recording {
  color: #ef4444;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.send-button {
  background: linear-gradient(135deg, #356866 0%, #2d5a57 100%);
  color: white;
  border: none;
  padding: 12px 16px;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 500;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(53, 104, 102, 0.3);
}

.send-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #2d5a57 0%, #1f4b48 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(53, 104, 102, 0.4);
}

.send-button:disabled {
  background: #d1d5db;
  cursor: not-allowed;
}

.loading-spinner {
  animation: spin 1s linear infinite;
}

.input-hint {
  font-size: 12px;
  color: #6c757d;
  margin-top: 8px;
}

.connection-warning {
  color: #dc3545;
  font-weight: 500;
}

/* Compatibility with existing JavaScript classes */
.message.user {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-bottom: 20px;
}

.message.user .message-content {
  background: #356866;
  color: white;
  padding: 12px 16px;
  border-radius: 18px 18px 4px 18px;
  margin-left: auto;
  max-width: 80%;
  display: inline-block;
}

.message.bot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 20px;
}

.message.bot .message-content {
  background: white;
  color: #1f2937;
  padding: 12px 16px;
  border-radius: 18px 18px 18px 4px;
  max-width: 80%;
  display: inline-block;
  border: 1px solid #e5e7eb;
}

/* Loading animation for existing code */
.loading-dots {
  display: inline-flex;
  gap: 4px;
  margin-left: 8px;
}

.loading-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #356866;
  animation: loading-dots 1.4s infinite ease-in-out;
}

.loading-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0s;
}

@keyframes loading-dots {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Hidden chat state */
.chatbot-container.hidden {
  display: none !important;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .chatbot-container {
    width: 350px;
  }
}

@media (max-width: 1000px) {
  .chatbot-container {
    width: 300px;
  }
  
  .sidebar {
    width: 70px;
  }
}

/* --- Responsive pour laptop (1000px à 1440px) --- */
@media (max-width: 1440px) and (min-width: 1000px) {
  .sidebar {
    width: 100px;
    padding: 32px 0 24px 0;
  }
  .logo {
    width: 110px;
    height: 110px;
    border-radius: 22px;
    margin-bottom: 8px;
  }
  .logo-img {
    width: 110px !important;
    height: 110px !important;
    border-radius: 22px;
  }
  .sidebar-header {
    gap: 28px;
    margin-bottom: 0;
  }
  .sidebar-nav {
    gap: 20px;
    margin-top: 15px;
    margin-bottom: 15px;
    padding-top: 8px;
  }
  .nav-item {
    font-size: 14px;
    padding: 12px 0 8px 0;
    border-radius: 12px;
    width: 92%;
    gap: 6px;
  }
  .nav-icon {
    font-size: 26px;
  }
  .nav-label {
    font-size: 14px;
    padding-left: 1px;
  }
  .sidebar-footer {
    padding-bottom: 10px;
  }
  .profile-section {
    font-size: 12px;
    gap: 7px;
    padding-top: 10px;
  }
  .profile-img {
    width: 32px;
    height: 32px;
  }
  .main-content {
    padding: 0;
  }
  .app-header {
    padding: 12px 10px;
  }
  .header-title h1 {
    font-size: 18px;
  }
  .header-subtitle {
    font-size: 12px;
    max-width: 400px;
  }
  .header-toolbar {
    gap: 6px;
  }
  .toolbar-btn {
    padding: 7px 10px;
    font-size: 12px;
  }
  .chatbot-container {
    width: 320px;
    min-width: 220px;
    font-size: 13px;
  }
  .chat-header, .chatbot-header {
    padding: 10px 12px;
  }
  .chat-messages, .chatbot-messages {
    padding: 12px;
  }
  .chat-input-container, .chatbot-input {
    padding: 10px 12px;
  }
  .send-button, .chatbot-input button {
    width: 36px;
    height: 36px;
    font-size: 18px;
    padding: 8px 10px;
  }
  .input-hint {
    font-size: 11px;
  }
  .modeler-container, .diagram-container {
    min-width: 0;
    min-height: 0;
  }
}

/* BPMN specific note styles */
.diagram-note {
  background-color: rgba(66, 180, 21, 0.7);
  color: White;
  border-radius: 5px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 12px;
  padding: 5px;
  min-height: 16px;
  width: 50px;
  text-align: center;
}

.needs-discussion:not(.djs-connection) .djs-visual > :nth-child(1) {
  stroke: rgba(66, 180, 21, 0.7) !important;
}

/* Spinner animation for loading */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Documents tree styling */
#tree-root li {
  margin: 8px 0;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#tree-root li:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateX(4px);
}

#tree-root li.department {
  font-weight: 600;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.15);
  margin: 16px 0 12px;
}

#tree-root li.workflow {
  margin-left: 16px;
  font-size: 10px;
  opacity: 0.9;
}

#tree-root li.version {
  margin-left: 32px;
  font-size: 13px;
  opacity: 0.8;
  background: #d9fdf9 !important;
  border: 1px solid rgba(217, 253, 249, 0.5) !important;
}

#tree-root li.version:hover {
  background: #c7f7f2 !important;
  border-color: rgba(199, 247, 242, 0.8) !important;
}

/* Remove selection background and underline for workspace tree buttons */
.soap-file, .report-file {
  outline: none !important;
  text-decoration: none !important;
  background: none !important;
}

.soap-file:focus, .report-file:focus {
  background: none !important;
  outline: none !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

.soap-file:active, .report-file:active {
  background: none !important;
  outline: none !important;
  text-decoration: none !important;
}

.soap-file:visited, .report-file:visited {
  background: none !important;
  color: #2d3748 !important;
  text-decoration: none !important;
}

.soap-file:focus-visible, .report-file:focus-visible {
  background: none !important;
  outline: none !important;
}

.soap-file:target, .report-file:target {
  background: none !important;
}

/* Prevent any button selection styles */
button.soap-file, button.report-file {
  background: none !important;
  border: none !important;
  outline: none !important;
  text-decoration: none !important;
}

button.soap-file:focus, button.report-file:focus,
button.soap-file:active, button.report-file:active,
button.soap-file:visited, button.report-file:visited,
button.soap-file:target, button.report-file:target {
  background: none !important;
  border: none !important;
  outline: none !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

/* Modal folder tree styling - change text color to match Diagram.soap color */
#modal-folder-tree {
  color: #2d3748 !important;
}

#modal-folder-tree * {
  color: #2d3748 !important;
}

#modal-folder-tree .modal-folder-selected {
  background: rgba(45, 55, 72, 0.1) !important;
  color: #1a202c !important;
}

/* Ensure workflow count badges have white text */
#modal-folder-tree span[style*="background: #3C736D"] {
  color: white !important;
}

#empty-modal-folder-tree span[style*="background: #3C736D"] {
  color: white !important;
}

/* Links styling in documents tree */
#tree-root a {
  color: #ffffff !important;
  text-decoration: none;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-block;
  margin: 2px 4px;
  transition: all 0.2s ease;
}

#tree-root a:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Specific styling for different file types */
#tree-root a[href*="diagram"] {
  background: #f5f5dc !important;
  border: 1px solid #e5e5dc;
  color: #2d3748 !important;
  font-weight: 600;
  text-shadow: none;
}

#tree-root a[href*="report"] {
  background: #ffffff !important;
  border: 1px solid #e2e8f0;
  color: #2d3748 !important;
  font-weight: 600;
  text-shadow: none;
}

#tree-root a[href*="diagram"]:hover {
  background: #f0f0e6 !important;
  border-color: #d5d5c5;
  color: #1a202c !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#tree-root a[href*="report"]:hover {
  background: #f7fafc !important;
  border-color: #cbd5e0;
  color: #1a202c !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
