/* Modern Professional Dashboard CSS */

/* Font imports */
  @import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

  :root {
    --primary-color: #25D366;
    --secondary-color: #128C7E;
    --accent-color: #34B7F1;
    --background-color: #ffffff;
    --surface-color: #f9fafb;
    --border-color: #e5e7eb;
    --text-primary: #111827;
    --text-secondary: #374151;
    --text-muted: #6b7280;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 0.75rem;
    --transition: all 0.2s ease-in-out;
    /* Modern font stack with fallbacks */
    --font-primary: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Space Grotesk', var(--font-primary);
    /* Font size system */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    /* Font weight system */
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    /* Line height system */
    --leading-none: 1;
    --leading-tight: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.75;
  }
  
  /* Very small device styles */
  @media (max-width: 400px) {
    .navbar-brand {
      font-size: 0.85rem;
    }
    
    .stat-card h3 {
      font-size: 1.25rem;
    }
    
    .stat-card .stat-icon {
      width: 40px;
      height: 40px;
      font-size: 1rem;
    }
    
    .quick-actions .btn {
      height: 70px;
      font-size: 0.7rem;
    }
    
    .quick-actions .btn i {
      font-size: 1.25rem;
    }
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: var(--font-primary);
    background: linear-gradient(135deg, #f6f8ff 0%, #f0f3ff 100%);
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
    line-height: 1.5;
    min-height: 100vh;
  }

  body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(79, 70, 229, 0.15), transparent 50%);
    pointer-events: none;
    z-index: 0;
  }
  
  .main-content {
    position: relative;
    z-index: 1;
    padding: 1rem;
    margin-left: 280px;
    margin-top: 76px;
    min-height: calc(100vh - 56px);
    background: url('../assets/bg.jpeg') center/contain repeat fixed!important;
  }

  .main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.92), rgba(255,255,255,0.85));
    z-index: -1;
  }

  .container-fluid {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
  }

  h2 {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
  }

  h2 i {
    color: var(--primary-color);
    font-size: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
  }
  
  @keyframes backgroundShift {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(180deg); }
  }

  .row {
    margin: 0 -1rem;
  }

  .col-md-3 {
    padding: 0 1rem;
  }
  
  /* Card Effects */
  .card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    overflow: hidden;
    position: relative;
  }

  .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(120deg, rgba(255,255,255,0.3), rgba(255,255,255,0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .card:hover::before {
    opacity: 1;
  }

  /* Stat Cards */
  .stat-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(20px);
  }

  .stat-card .card-body {
    padding: 2rem;
    position: relative;
    z-index: 1;
  }

  .stat-card h6 {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
  }

  .stat-card h3 {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
    font-family: var(--font-display);
  }

  .stat-card small {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .stat-card .text-success {
    color: #059669 !important;
    background: rgba(5, 150, 105, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
  }

  .stat-card .stat-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 1.75rem;
    box-shadow: 0 10px 20px -5px rgba(79, 70, 229, 0.3);
    position: relative;
    overflow: hidden;
    min-width: 56px; /* Ensure minimum width for proper display */
  }

  .stat-card .stat-icon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255,255,255,0.2), rgba(255,255,255,0));
    transform: translateY(100%);
    transition: transform 0.3s ease;
  }

  .stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
  }

  .stat-card:hover .stat-icon::before {
    transform: translateY(0);
  }

  .stat-card:hover .stat-icon {
    transform: scale(1.1);
  }

  .card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
  }

  .card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(to right, var(--surface-color), var(--background-color));
  }

  .card-header h5 {
    font-size: 30px;
    margin: 0;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-weight: var(--font-semibold);
    line-height: var(--leading-tight);
    letter-spacing: -0.025em;
  }

  .card-header h5 i {
    color: var(--primary-color);
    font-size: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
  }

  .card-body {
    padding: 0 1.5rem;
  }

  /* Quick Actions */
  .quick-actions .btn {
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-weight: var(--font-medium);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: var(--text-sm);
    border: none;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
  }

  .quick-actions .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .quick-actions .btn:hover::before {
    opacity: 1;
  }

  .quick-actions .btn i {
    font-size: 2rem;
    transition: transform 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    min-height: 2rem;
  }

  .quick-actions .btn:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
  }

  .quick-actions .btn:hover i {
    transform: scale(1.2);
  }

  .quick-actions .btn span {
    font-weight: var(--font-semibold);
  }

  .quick-actions .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: 1px solid rgba(255,255,255,0.1);
  }

  .quick-actions .btn-success {
    background: linear-gradient(135deg, #059669, #047857);
    border: 1px solid rgba(255,255,255,0.1);
  }

  .quick-actions .btn-info {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    border: 1px solid rgba(255,255,255,0.1);
  }

  .quick-actions .btn-warning {
    background: linear-gradient(135deg, #d97706, #b45309);
    border: 1px solid rgba(255,255,255,0.1);
  }
  
  /* Navigation Bar */
  .navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 76px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    z-index: 1000;
  }

  .navbar-brand {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }

  .navbar-brand i {
    color: var(--primary-color);
    font-size: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
  }

  .navbar .nav-link {
    color: var(--text-secondary);
    font-weight: var(--font-medium);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
  }

  .navbar .nav-link:hover {
    color: var(--primary-color);
    background: rgba(79, 70, 229, 0.1);
  }

  .navbar .dropdown-menu {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
  }

  .navbar .dropdown-item {
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
  }

  .navbar .dropdown-item:hover {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
  }

  .navbar .dropdown-item i {
    font-size: 1.25rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
  }

  .navbar .dropdown-item:hover i {
    color: var(--primary-color);
  }
 
#formTitle{
  color: white;
}
  .navbar .menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition);
  }

  .navbar .menu-toggle:hover {
    color: var(--primary-color);
  }

  @media (max-width: 768px) {
    .navbar .menu-toggle {
      display: block;
    }
    
    .navbar-brand {
      font-size: 1.1rem;
      display: flex;
      align-items: center;
      gap: 0.75rem;
    }
    
    .navbar-brand img {
      height: 50px !important;
    }
    
    .sidebar-toggle {
      display: block !important;
      padding: 0.75rem;
      margin-right: 0.75rem;
      border-radius: 0.5rem;
      background: rgba(37, 211, 102, 0.1);
      border: 1px solid rgba(37, 211, 102, 0.2);
      transition: all 0.3s ease;
      position: relative;
      overflow: hidden;
    }
    
    .sidebar-toggle::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;
    }
    
    .sidebar-toggle:hover::before {
      left: 100%;
    }
    
    .sidebar-toggle:hover {
      background: rgba(37, 211, 102, 0.2);
      transform: scale(1.05);
      box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    }
    
    .sidebar-toggle .navbar-toggler-icon {
      width: 24px;
      height: 24px;
      background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2837, 211, 102, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
      transition: transform 0.3s ease;
    }
    
    .sidebar-toggle:hover .navbar-toggler-icon {
      transform: rotate(90deg);
    }
  }

  .navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.025em;
  }

  .navbar-nav .nav-link {
    font-weight: 500;
    color: var(--text-secondary) !important;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
  }

  .navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    background-color: var(--surface-color);
  }

  /* Responsive Sidebar */
  .sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    height: 100%;
    width: 250px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    transition: var(--transition);
    z-index: 1020;
  }
  
  /* Mobile navbar toggle button */
  .sidebar-toggle {
    display: none;
    position: relative;
    z-index: 1050;
    margin-left: auto;
  }
  
  /* Extra small device styles */
  @media (max-width: 576px) {
    .navbar-brand {
      font-size: 0;
      display: flex;
      align-items: center;
      gap: 0;
      text-indent: -9999px;
      overflow: hidden;
      white-space: nowrap;
    }
    
    .navbar-brand img {
      height: 60px !important;
      position: relative;
      z-index: 1;
      text-indent: 0;
    }
    
    .navbar {
      padding: 0.5rem 1rem;
      min-height: 80px;
    }
    
    .sidebar-toggle {
      display: block !important;
      padding: 0.5rem;
      margin-right: 0.5rem;
      border-radius: 0.375rem;
      background: rgba(37, 211, 102, 0.1);
      border: 1px solid rgba(37, 211, 102, 0.2);
      transition: all 0.2s ease;
    }
    
    .sidebar-toggle:hover {
      background: rgba(37, 211, 102, 0.2);
      transform: scale(1.05);
    }
    
    .sidebar-toggle .navbar-toggler-icon {
      width: 20px;
      height: 20px;
      background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2837, 211, 102, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }
    
    .navbar > .container-fluid {
      padding: 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: nowrap;
    }
    
    .navbar-nav {
      display: none;
    }
    
    .stat-card .card-body {
      padding: 1rem;
    }
    
    .stat-card h3 {
      font-size: 1.5rem;
    }
    
    .stat-card .stat-icon {
      width: 45px;
      height: 45px;
      font-size: 1.25rem;
      display: none;
    }
    
    .col-md-3 {
      width: 50% !important;
      flex: 0 0 50% !important;
      max-width: 50% !important;
      padding-left: 0.5rem !important;
      padding-right: 0.5rem !important;
    }
    
    .quick-actions .btn {
      height: 80px;
      font-size: 0.75rem;
    }
    
    .quick-actions .btn i {
      font-size: 1.5rem;
    }
    
    h2 {
      font-size: 1.25rem;
    }
    
    .card-header {
      padding: 1rem;
    }
    
    .card-body {
      padding: 0 1rem;
    }
    
    .table {
      font-size: 0.75rem;
    }
    
    .btn-sm {
      padding: 0.25rem 0.5rem;
      font-size: 0.75rem;
    }
    
    .modal-dialog {
      margin: 0.5rem;
    }
    
    .modal-header {
      padding: 0.75rem 1rem;
    }
    
    .modal-body {
      padding: 1rem;
    }
    
    .modal-footer {
      padding: 0.75rem 1rem;
    }
  }

  @media (max-width: 768px) {
    .sidebar {
      transform: translateX(-100%);
      width: 100%;
      top: 76px;
      z-index: 1030;
    }

    .sidebar.active {
      transform: translateX(0);
    }

    .main-content {
      margin-left: 0 !important;
      width: 100% !important;
      padding: 0.5rem;
      margin-top: 76px;
    }
    
    .container-fluid {
      padding: 0 1rem;
    }
    
    .col-md-3 {
      margin-bottom: 1rem;
      width: 50% !important;
      flex: 0 0 50% !important;
      max-width: 50% !important;
      padding-left: 0.5rem !important;
      padding-right: 0.5rem !important;
    }
    
    .stat-card .card-body {
      padding: 1.5rem;
    }
    
    .quick-actions .btn {
      height: 100px;
      margin-bottom: 1rem;
    }
    
    h2 {
      font-size: 1.5rem;
      margin-bottom: 1.5rem;
    }
    
    h2 i {
      font-size: 1.5rem;
    }
    
    .card-header h5 {
      font-size: 1.25rem;
    }
    
    .sidebar-toggle {
      display: block;
      background: none;
      border: none;
      font-size: 1.5rem;
      cursor: pointer;
      color: var(--text-primary);
      margin-right: 1rem;
      padding: 0.25rem 0.75rem;
      border-radius: 0.25rem;
    }
    
    .navbar-brand {
      font-size: 1.25rem;
      flex-grow: 1;
    }
    
    .navbar > .container-fluid {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    
    .row {
      margin: 0;
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
    }
    
    .g-4 {
      --bs-gutter-x: 0.5rem;
      --bs-gutter-y: 0.5rem;
    }
    
    .card {
      margin-bottom: 1rem;
    }
  }

  /* Template Cards */
  .template-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(37, 211, 102, 0.1);
    background: rgba(255, 255, 255, 0.95);
  }

  .template-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.2);
    border-color: rgba(37, 211, 102, 0.3);
  }

  .template-card .card-header {
    background: rgba(37, 211, 102, 0.05);
    border-bottom: 1px solid rgba(37, 211, 102, 0.1);
    padding: 1rem 1.25rem;
  }

  .template-card .card-header h6 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.25rem;
  }

  .template-card .card-header small {
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .template-card .card-text {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.9rem;
  }

  .template-stats {
    border-top: 1px solid rgba(37, 211, 102, 0.1);
    padding-top: 0.75rem;
  }

  .template-stats small {
    color: var(--text-muted);
    font-size: 0.75rem;
  }

  .template-stats i {
    color: var(--accent-color);
    margin-right: 0.25rem;
  }

  /* Template Image Section */
  .template-image-section {
    background: var(--glass-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
  }

  .image-upload-container {
    border: 2px dashed var(--glass-border);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
  }

  .image-upload-container:hover {
    border-color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
  }

  .image-preview {
    max-width: 100%;
    height: auto;
    margin-top: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-glow);
  }
  
  .navbar-brand {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.025em;
  }
  
  .navbar-brand:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
  }
  
  .navbar-nav .nav-link {
    color: var(--text-primary) !important;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
  }
  
  .navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: var(--accent-gradient);
    transition: var(--transition);
  }
  
  .navbar-nav .nav-link:hover::before {
    left: 0;
  }
  
  .modal-backdrop{
    display: none!important;
  }
  .navbar-nav .nav-link:hover {
    transform: translateY(-2px);
    text-shadow: 0 0 20px rgba(79, 172, 254, 0.8);
  }

  .qr-code{
    width: 100%!important;
  }
  
  /* Sidebar */
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 280px;
    background: linear-gradient(to bottom, var(--surface-color), var(--background-color));
    border-right: 1px solid var(--border-color);
    padding-top: 76px;
    z-index: 999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .sidebar-link {
    display: flex;
    align-items: center;
    padding: 1.25rem 1.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    gap: 1rem;
    margin-bottom: 0.25rem;
  }

  .sidebar-link:hover,
  .sidebar-link.active {
    color: var(--primary-color);
    background: linear-gradient(to right, rgba(79, 70, 229, 0.1), transparent);
    border-left-color: var(--primary-color);
    transform: translateX(4px);
  }

  .sidebar-link i {
    font-size: var(--text-2xl);
    transition: transform 0.2s ease;
    min-width: 1.75rem;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar-link:hover i {
    transform: scale(1.15);
    color: var(--primary-color);
  }

  .sidebar-section {
    margin-bottom: 2rem;
    padding: 0 1rem;
  }

  .sidebar-section-title {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    padding: 1rem 0.75rem;
    margin-bottom: 0.75rem;
  }

  @media (max-width: 768px) {
    .sidebar {
      transform: translateX(-100%);
      width: 100%;
      background: rgba(255, 255, 255, 0.95);
    }

    .sidebar.active {
      transform: translateX(0);
      box-shadow: var(--shadow-lg);
    }

    .sidebar-link {
      padding: 1.25rem 1.5rem;
      border-left: none;
      border-radius: var(--border-radius);
      margin: 0.25rem 1rem;
    }

    .sidebar-link:hover,
    .sidebar-link.active {
      background: linear-gradient(to right, var(--primary-color), transparent);
      color: white;
      transform: translateX(0);
      box-shadow: var(--shadow-md);
    }

    .sidebar-section {
      padding: 0;
      margin-bottom: 1.5rem;
    }

    .sidebar-section-title {
      padding: 0.75rem 1.5rem;
      background: linear-gradient(to right, var(--surface-color), transparent);
      margin: 0;
      border-radius: var(--border-radius);
    }
  }

  .sidebar::-webkit-scrollbar {
    width: 4px;
  }

  .sidebar::-webkit-scrollbar-track {
    background: transparent;
  }

  .sidebar::-webkit-scrollbar-thumb {
    background: rgba(107, 114, 128, 0.2);
    border-radius: 20px;
    transition: all 0.2s ease;
  }

  .sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 114, 128, 0.4);
  }

  .sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
      rgba(255, 255, 255, 0.1) 0%,
      rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
  }

  .sidebar-header {
    display: none;
    padding: 1.5rem;
    background: var(--background-color);

    margin-bottom: 1rem;
  }

  .sidebar-header h5 {
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.025em;
  }
  
  .sidebar::-webkit-scrollbar {
    width: 6px;
  }
  
  .sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
  }
  
  .sidebar::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 10px;
  }
  
  .sidebar-header {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--background-color);
  }
  
  .sidebar-header h5 {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: 1.8rem;
  }
  
  .sidebar-menu {
    list-style: none;
    padding: 1rem 0;
    overflow-y: auto;
    flex: 1;
  }
  
  .sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    border-radius: var(--border-radius);
    margin: 0.375rem 1rem;
    font-weight: 500;
  }

  .sidebar-link i {
    font-size: 1.25rem;
    width: 1.5rem;
    text-align: center;
    color: var(--text-muted);
  }

  .sidebar-link:hover {
    color: var(--primary-color);
    background-color: var(--background-color);
  }

  .sidebar-link:hover i {
    color: var(--primary-color);
  }

  .sidebar-link.active {
    color: var(--primary-color);
    background-color: var(--background-color);
    font-weight: 600;
  }

  .sidebar-link.active i {
    color: var(--primary-color);
  }
  
  .sidebar-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    transition: var(--transition);
    z-index: -1;
  }
  
  .sidebar-link:hover::before,
  .sidebar-link.active::before {
    left: 0;
  }
  
  .sidebar-link:hover,
  .sidebar-link.active {
    color: var(--text-primary);
    transform: translateX(10px);
    box-shadow: var(--shadow-glow);
  }
  
  .sidebar-link i {
    margin-right: 1rem;
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
  }
  
  /* Main Content */
  .main-content {
    margin-left: 280px;
    padding: 2rem;
    padding-top: 1rem;
    min-height: 100vh;
    background: var(--background-color);
    transition: var(--transition);
  }

  @media (max-width: 768px) {
    .main-content {
      margin-left: 0;
      width: 100%;
    }
  }
  
  /* Cards */
  .card {
    background: white;
  
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-glow);
    transition: var(--transition);
    overflow: hidden;
    position: relative;
  }
  
  .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: var(--accent-gradient);
    transition: var(--transition);
  }
  
  .card:hover::before {
    left: 0;
  }
  
  .card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-intense);
    border-color: rgba(79, 172, 254, 0.5);
  }
  
  .card-header {
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid var(--glass-border);
    padding: 1.5rem;
    font-weight: 600;
  }
  
  .card-body {
    padding: 0 2rem;
  }
  
  /* Stats Cards */
  .card.bg-primary,
  .card.bg-success,
  .card.bg-info,
  .card.bg-warning {
    background: var(--primary-gradient) !important;
    border: none;
    position: relative;
    overflow: hidden;
  }
  
  .card.bg-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important;
  }
  
  .card.bg-info {
    background: var(--accent-gradient) !important;
  }
  
  .card.bg-warning {
    background: var(--secondary-gradient) !important;
  }
  
  .card.bg-primary::before,
  .card.bg-success::before,
  .card.bg-info::before,
  .card.bg-warning::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
    transition: var(--transition);
  }
  
  .card.bg-primary:hover::before,
  .card.bg-success:hover::before,
  .card.bg-info:hover::before,
  .card.bg-warning:hover::before {
    animation: shimmer 1s ease-in-out;
  }
  
  @keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
  }
  
  /* Buttons */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    line-height: var(--leading-normal);
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    outline: none;
    text-decoration: none;
    letter-spacing: 0.025em;
  }
  
  .btn {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: var(--transition);
  }

  .btn-primary {
    background-color: var(--primary-color);
    border: none;
    color: white;
    box-shadow: var(--shadow-md);
  }

  .btn-primary:hover {
    background-color: var(--secondary-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
  }

  .btn-success {
    background-color: #059669;
    border: none;
    color: white;
    box-shadow: var(--shadow-md);
  }

  .btn-success:hover {
    background-color: #047857;
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
  }

  .btn-info {
    background-color: #0284c7;
    border: none;
    color: white;
    box-shadow: var(--shadow-md);
  }

  .btn-info:hover {
    background-color: #0369a1;
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
  }

  .btn-warning {
    background-color: #d97706;
    border: none;
    color: white;
    box-shadow: var(--shadow-md);
  }

  .btn-warning:hover {
    background-color: #b45309;
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
  }
  #templatesContainer .badge{
    display: none;
  }
  .btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    box-shadow: 0 8px 32px rgba(17, 153, 142, 0.3);
  }
  
  .btn-info {
    background: var(--accent-gradient);
    box-shadow: 0 8px 32px rgba(79, 172, 254, 0.3);
  }
  
  .btn-warning {
    background: var(--secondary-gradient);
    box-shadow: 0 8px 32px rgba(240, 147, 251, 0.3);
  }
  
  .btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-intense);
  }
  
  .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: var(--transition);
  }
  
  .btn:hover::before {
    left: 100%;
  }
  
  /* Form Controls */
  .form-control {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--border-radius);
    padding: 0.625rem 1rem;
    transition: var(--transition);
  }

  .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
  }

  .form-label {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
  }
  
  .form-control:focus,
  .form-select:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(79, 172, 254, 0.8);
    box-shadow: 0 0 20px rgba(79, 172, 254, 0.3);
    color: black;
  }
  
  .form-control::placeholder {
    color: var(--text-secondary);
  }
  
  .form-label {
    color: rgb(41, 41, 41);
    font-weight: 600;
    margin-bottom: 0.8rem;
  }
  
  /* Tables */
  .table {
    margin-bottom: 0;
    color: var(--text-primary);
  }

  .table th {
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
    background-color: var(--surface-color);
    padding: 1rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .table td {
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    color: var(--text-primary);
  }

  .table tr:hover td {
    background-color: var(--surface-color);
  }

  .table tbody tr:hover {
    background-color: var(--surface-color);
  }
  
  .table tbody tr {
    border-color: var(--glass-border);
    transition: var(--transition);
  }
  
  .table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
    transform: scale(1.01);
  }
  
  /* Badges */
  .badge {
    padding: 0.5em 1em;
    border-radius: var(--border-radius);
    font-weight: 500;
  }

  .badge.bg-success {
    background-color: #059669 !important;
  }

  .badge.bg-warning {
    background-color: #d97706 !important;
  }

  .badge.bg-danger {
    background-color: #dc2626 !important;
  }
  
  .badge.bg-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important;
  }
  
  .badge.bg-primary {
    background: var(--primary-gradient) !important;
  }
  
  .badge.bg-info {
    background: var(--accent-gradient) !important;
  }
  
  .badge.bg-warning {
    background: var(--secondary-gradient) !important;
  }
  
  /* Animations */
  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  @keyframes pulse {
    0%, 100% {
      transform: scale(1);
    }
    50% {
      transform: scale(1.05);
    }
  }
  
  @keyframes glow {
    0%, 100% {
      box-shadow: var(--shadow-glow);
    }
    50% {
      box-shadow: var(--shadow-intense);
    }
  }
  
  /* Content Sections */
  .content-section {
    animation: fadeInUp 0.8s ease-out;
  }
  
  .content-section h2 {
    display: none!important;
    background: white;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    margin-bottom: 2rem;
    font-size: 2.5rem;
  }
  
  /* Special Effects */
  .fas, .fab {
    filter: drop-shadow(0 0 10px rgba(79, 172, 254, 0.5));
    transition: var(--transition);
  }
  
  .fas:hover, .fab:hover {
    transform: scale(1.2);
    filter: drop-shadow(0 0 20px rgba(79, 172, 254, 0.8));
  }
  
  /* Chart Placeholders */
  .chart-placeholder {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 2px dashed rgba(255, 255, 255, 0.2) !important;
    border-radius: var(--border-radius);
    transition: var(--transition);
  }
  
  .chart-placeholder:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(79, 172, 254, 0.5) !important;
  }
  
  /* Calendar Placeholder */
  .calendar-placeholder {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 2px dashed rgba(255, 255, 255, 0.2) !important;
    border-radius: var(--border-radius);
    transition: var(--transition);
  }
  
  .calendar-placeholder:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(79, 172, 254, 0.5) !important;
  }
  
  /* Chat Container */
  .chat-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border) !important;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  
  .message {
    padding: 10px 15px;
    margin: 8px 0;
    border-radius: 12px;
    transition: var(--transition);
  }
  
  .user-message {
    background: rgba(102, 126, 234, 0.2);
    border-left: 3px solid #667eea;
  }
  
  .ai-message {
    background: rgba(79, 172, 254, 0.2);
    border-left: 3px solid #4facfe;
  }
  
  /* Accordion */
  .accordion-button {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: none;
    border-radius: 12px !important;
    transition: var(--transition);
  }
  
  .accordion-button:not(.collapsed) {
    background: var(--primary-gradient);
    box-shadow: var(--shadow-glow);
  }
  
  .accordion-button:focus {
    box-shadow: var(--shadow-glow);
  }
  
  .accordion-body {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
  }
  
  /* Dropdown Menu */
  .dropdown-menu {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
  }

  .dropdown-item {
    color: var(--text-primary);
    border-radius: var(--border-radius);
    padding: 0.5rem 1rem;
    transition: var(--transition);
  }

  .dropdown-item:hover {
    background-color: var(--surface-color);
    color: var(--primary-color);
  }
  
  .dropdown-item {
    color: var(--text-primary);
    transition: var(--transition);
  }
  
  .dropdown-item:hover {
    background: rgba(102, 126, 234, 0.2);
    color: var(--text-primary);
  }
  
  /* List Group */
  .list-group-item {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--glass-border);
    color: var(--text-primary);
    transition: var(--transition);
  }
  
  .list-group-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
  }
  
  /* Progress Bars (if any) */
  .progress {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
  }
  
  .progress-bar {
    background: var(--primary-gradient);
    border-radius: 10px;
    transition: var(--transition);
  }
  
  /* Responsive Design */
  @media (max-width: 768px) {
    .sidebar {
      transform: translateX(-100%);
    }
    
    .main-content {
      margin-left: 0;
      padding: 100px 1rem 1rem;
    }
    
    .content-section h2 {
      font-size: 2rem;
    }
    
    .card-body {
      padding: 1.5rem;
    }
  }
  
  /* Loading Animation */
  @keyframes loading {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  .loading {
    animation: loading 2s linear infinite;
  }
  
  /* Floating Elements */
  .floating {
    animation: float 6s ease-in-out infinite;
  }
  
  @keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
  }

  /* ==================== VISUAL FLOW BUILDER STYLES ==================== */

  .flow-builder-card {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius);
    overflow: hidden;
  }

  .flow-canvas {
    position: relative;
    width: 100%;
    height: 600px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    overflow: hidden;
    cursor: grab;
  }

  .flow-canvas:active {
    cursor: grabbing;
  }

  .canvas-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
      radial-gradient(circle, #e2e8f0 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.5;
    pointer-events: none;
  }

  .flow-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
  }

  .flow-nodes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
  }

  .canvas-welcome {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
  }

  /* Flow Node Styles */
  .flow-node {
    position: absolute;
    min-width: 180px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: move;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    overflow: hidden;
  }

  .flow-node:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  }

  .flow-node.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.2);
  }

  .flow-node.dragging {
    transform: rotate(5deg) scale(1.05);
    z-index: 1000;
    opacity: 0.9;
  }

  /* Node Types */
  .flow-node.trigger {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
  }

  .flow-node.response {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
  }

  .flow-node.condition {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
  }

  .flow-node.delay {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
  }

  .node-header {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .node-title {
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .node-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
  }

  .flow-node:hover .node-actions {
    opacity: 1;
  }

  .node-action {
    width: 24px;
    height: 24px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: background 0.2s;
  }

  .node-action:hover {
    background: rgba(255, 255, 255, 0.3);
  }

  .node-content {
    padding: 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
  }

  .node-text {
    font-size: 13px;
    line-height: 1.4;
    margin: 0;
    word-wrap: break-word;
  }

  /* Connection Points */
  .connection-point {
    position: absolute;
    width: 12px;
    height: 12px;
    background: white;
    border: 2px solid currentColor;
    border-radius: 50%;
    cursor: crosshair;
    transition: all 0.2s;
    z-index: 10;
  }

  .connection-point:hover {
    transform: scale(1.3);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3);
  }

  .connection-point.input {
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
  }

  .connection-point.output {
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
  }

  .connection-point.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    animation: pulse 1s infinite;
  }

  /* Connection Lines */
  .connection-line {
    stroke: #6b7280;
    stroke-width: 2;
    fill: none;
    marker-end: url(#arrowhead);
    transition: all 0.3s;
  }

  .connection-line:hover {
    stroke: var(--primary-color);
    stroke-width: 3;
    filter: url(#glow);
  }

  .connection-line.active {
    stroke: var(--primary-color);
    stroke-width: 3;
    animation: dash 2s linear infinite;
    stroke-dasharray: 5,5;
  }

  /* Flow Toolbar */
  .flow-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .flow-controls {
    display: flex;
    align-items: center;
  }

  .zoom-level {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 50px;
    text-align: center;
  }

  /* Node Properties Panel */
  #nodePropertiesPanel .form-group {
    margin-bottom: 1rem;
  }

  #nodePropertiesPanel .form-label {
    font-weight: 500;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
  }

  #nodePropertiesPanel .form-control {
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    transition: border-color 0.2s;
  }

  #nodePropertiesPanel .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
  }

  /* Animations */
  @keyframes pulse {
    0%, 100% {
      transform: translateX(-50%) scale(1);
    }
    50% {
      transform: translateX(-50%) scale(1.2);
    }
  }

  @keyframes dash {
    to {
      stroke-dashoffset: -10;
    }
  }

  @keyframes nodeAppear {
    from {
      opacity: 0;
      transform: scale(0.8) translateY(20px);
    }
    to {
      opacity: 1;
      transform: scale(1) translateY(0);
    }
  }

  .flow-node.appearing {
    animation: nodeAppear 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Responsive Design */
  @media (max-width: 768px) {
    .flow-canvas {
      height: 400px;
    }

    .flow-toolbar {
      flex-wrap: wrap;
      gap: 4px;
    }

    .flow-toolbar .btn {
      font-size: 12px;
      padding: 0.25rem 0.5rem;
    }

    .flow-node {
      min-width: 140px;
    }

    .node-header {
      padding: 8px 12px;
    }

    .node-content {
      padding: 12px;
    }

    .canvas-welcome {
      padding: 2rem;
    }
  }

  /* Trigger Response Builder Styles */
  .trigger-response-canvas {
    position: relative;
    min-height: 500px;
    background: linear-gradient(45deg, #f8f9fa 25%, transparent 25%), 
                linear-gradient(-45deg, #f8f9fa 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, #f8f9fa 75%), 
                linear-gradient(-45deg, transparent 75%, #f8f9fa 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    border-radius: 8px;
    overflow: hidden;
  }

  .connection-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
  }

  .canvas-content {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 500px;
    z-index: 2;
  }

  .welcome-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 2px dashed #dee2e6;
  }

  /* Trigger and Response Boxes */
  .trigger-box, .response-box {
    position: absolute;
    min-width: 200px;
    max-width: 280px;
    padding: 20px;
    border-radius: 16px;
    cursor: move;
    user-select: none;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
  }

  .trigger-box::before, .response-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(255,255,255,0.4), rgba(255,255,255,0.1));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    z-index: -1;
  }

  .trigger-box:hover, .response-box:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 16px 48px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.12);
  }

  .trigger-box.selected, .response-box.selected {
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.3), 0 16px 48px rgba(0,0,0,0.18);
    transform: scale(1.05);
  }

  .trigger-box {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 50%, #075e54 100%);
    color: white;
  }

  .response-box {
    background: linear-gradient(135deg, #34b7f1 0%, #1e88e5 50%, #1565c0 100%);
    color: white;
  }

  .box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 15px;
    padding-top: 2px;
  }

  .box-type {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 600;
  }

  .box-type::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.8);
    box-shadow: 0 0 8px rgba(255,255,255,0.6);
  }

  .box-content {
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    line-height: 1.5;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.15);
    word-wrap: break-word;
  }

  .box-content textarea {
    background: transparent;
    border: none;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    resize: none;
    outline: none;
    width: 100%;
  }

  .box-content textarea::placeholder {
    color: rgba(255,255,255,0.7);
  }

  .delete-box {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: none;
    background: rgba(220, 53, 69, 0.8);
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
  }

  .delete-box:hover {
    background: rgba(220, 53, 69, 1);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
  }

  /* Dragging State */
  .trigger-box.dragging, .response-box.dragging {
    transform: rotate(5deg) scale(1.05);
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    z-index: 1000;
    opacity: 0.9;
    cursor: grabbing !important;
    transition: none;
  }

  .trigger-box .box-header[data-drag-handle="true"],
  .response-box .box-header[data-drag-handle="true"] {
    cursor: grab;
  }

  .trigger-box.dragging .box-header[data-drag-handle="true"],
  .response-box.dragging .box-header[data-drag-handle="true"] {
    cursor: grabbing;
  }

  /* Connection Points */
  .connection-point {
    position: absolute;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border: 3px solid rgba(255,255,255,0.9);
    border-radius: 50%;
    cursor: crosshair;
    z-index: 4;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15), inset 0 1px 3px rgba(255,255,255,0.8);
  }

  .connection-point:hover {
    transform: scale(1.4);
    background: linear-gradient(135deg, #25d366, #128c7e);
    border-color: #ffffff;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4), inset 0 1px 3px rgba(255,255,255,0.9);
  }

  .connection-point.output {
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
  }

  .connection-point.output:hover {
    transform: translateY(-50%) scale(1.4);
  }

  .connection-point.input {
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
  }

  .connection-point.input:hover {
    transform: translateY(-50%) scale(1.4);
  }

  /* Connection Lines */
  .connection-line {
    stroke: #25d366;
    stroke-width: 3;
    fill: none;
    pointer-events: stroke;
    cursor: pointer;
    filter: drop-shadow(0 2px 4px rgba(37, 211, 102, 0.3));
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .connection-line:hover {
    stroke: #34b7f1;
    stroke-width: 4;
    filter: drop-shadow(0 4px 8px rgba(52, 183, 241, 0.4));
  }

  .temp-line {
    stroke: #94a3b8;
    stroke-width: 2;
    stroke-dasharray: 8,4;
    fill: none;
    pointer-events: none;
    opacity: 0.8;
    filter: drop-shadow(0 2px 4px rgba(148, 163, 184, 0.3));
  }

  /* Canvas improvements */
  #triggerCanvas {
    position: relative;
    overflow: hidden;
    user-select: none;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.1);
  }

  #canvasContent {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 600px;
    background-image: 
      radial-gradient(circle, #cbd5e1 1px, transparent 1px);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
  }

  /* Builder Controls */
  .builder-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 16px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    margin-bottom: 20px;
  }

  .builder-controls .btn {
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
  }

  .builder-controls .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  }

  .builder-controls .btn-primary {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
  }

  .builder-controls .btn-secondary {
    background: linear-gradient(135deg, #34b7f1, #1e88e5);
    color: white;
  }

  .builder-controls .btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
  }

  .builder-controls .btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
  }

  /* Connection Guide */
  .connection-guide {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  }

  .guide-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
  }

  .step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #007bff;
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
  }

  .step-text {
    font-size: 14px;
    color: #495057;
    line-height: 1.4;
  }

  /* Properties Panel */
  .properties-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

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

  .form-group label {
    font-weight: 600;
    font-size: 14px;
    color: #495057;
  }

  .form-group input, .form-group textarea {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
  }

  .form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.2);
  }

  .form-group textarea {
    resize: vertical;
    min-height: 80px;
  }

  /* Simple Drag and Drop Styles */
  .node-palette {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .palette-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    cursor: grab;
    transition: all 0.3s ease;
    user-select: none;
  }

  .palette-item:hover {
    background: #e9ecef;
    border-color: #007bff;
    transform: translateY(-2px);
  }

  .palette-item:active {
    cursor: grabbing;
  }

  .palette-item[data-type="trigger"] {
    border-color: #28a745;
    color: #28a745;
  }

  .palette-item[data-type="message"] {
    border-color: #007bff;
    color: #007bff;
  }

  .palette-item[data-type="delay"] {
    border-color: #17a2b8;
    color: #17a2b8;
  }

  .simple-canvas {
    min-height: 400px;
    background: #ffffff;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    position: relative;
    overflow-y: auto;
    padding: 20px;
  }

  .simple-canvas.drag-over {
    border-color: #007bff;
    background: #f8f9ff;
  }

  .canvas-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
    background: rgba(255,255,255,0.95);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
  }

  .canvas-welcome {
    background: rgba(255,255,255,0.95);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
  }

  .canvas-welcome h3 {
    color: #1e293b;
    margin-bottom: 16px;
    font-weight: 700;
  }

  .canvas-welcome p {
    color: #64748b;
    margin-bottom: 24px;
    line-height: 1.6;
  }

  .flow-element {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    margin-bottom: 15px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
  }

  .flow-element:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
  }

  .flow-element.selected {
    border-color: #007bff;
    background: #f8f9ff;
  }

  .flow-element[data-type="trigger"] {
    border-left: 4px solid #28a745;
  }

  .flow-element[data-type="message"] {
    border-left: 4px solid #007bff;
  }

  .flow-element[data-type="delay"] {
    border-left: 4px solid #17a2b8;
  }

  .element-content {
    flex: 1;
  }

  .element-title {
    font-weight: 600;
    margin-bottom: 5px;
  }

  .element-description {
    color: #6c757d;
    font-size: 0.9em;
  }

  .element-actions {
    display: flex;
    gap: 5px;
  }

  .element-actions .btn {
    padding: 5px 8px;
    font-size: 0.8em;
  }

  .element-connector {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: #007bff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
  }

  .element-connector::after {
    content: '↓';
  }

  .flow-element:last-child .element-connector {
    display: none;
  }

  /* Properties Panel */
  #simplePropertiesPanel .form-group {
    margin-bottom: 15px;
  }

  #simplePropertiesPanel .form-label {
    font-weight: 600;
    margin-bottom: 5px;
  }

  #simplePropertiesPanel .form-control {
    border-radius: 6px;
  }

  /* Responsive Design */
  @media (max-width: 768px) {
    .trigger-response-canvas {
      min-height: 400px;
    }
    
    .trigger-box, .response-box {
      min-width: 150px;
      max-width: 200px;
      padding: 12px;
    }
    
    .builder-controls {
      flex-wrap: wrap;
      gap: 4px;
    }
    
    .builder-controls .btn {
      font-size: 11px;
      padding: 4px 8px;
    }
  }

  /* Dark mode support */
  @media (prefers-color-scheme: dark) {
    .flow-canvas {
      background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    }

    .canvas-grid {
      background-image: 
        radial-gradient(circle, #475569 1px, transparent 1px);
    }

    .canvas-welcome {
      background: rgba(30, 41, 59, 0.95);
      color: white;
    }

    .flow-node {
      background: #334155;
      color: white;
    }

    .connection-line {
      stroke: #94a3b8;
    }

    .simple-canvas {
      background: #2d3748;
      border-color: #4a5568;
    }
    
    .flow-element {
      background: #4a5568;
      border-color: #718096;
      color: white;
    }
    
    .palette-item {
      background: #4a5568;
      border-color: #718096;
      color: white;
    }
  }

  /* Edge Connection Zones */
  .edge-connection-zones {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10;
  }

  .edge-zone {
    position: absolute;
    background: transparent;
    pointer-events: auto;
    transition: all 0.2s ease;
    cursor: crosshair;
  }

  .edge-zone.top {
    top: -3px;
    left: 10px;
    right: 10px;
    height: 6px;
    border-radius: 3px 3px 0 0;
  }

  .edge-zone.bottom {
    bottom: -3px;
    left: 10px;
    right: 10px;
    height: 6px;
    border-radius: 0 0 3px 3px;
  }

  .edge-zone.left {
    left: -3px;
    top: 10px;
    bottom: 10px;
    width: 6px;
    border-radius: 3px 0 0 3px;
  }

  .edge-zone.right {
    right: -3px;
    top: 10px;
    bottom: 10px;
    width: 6px;
    border-radius: 0 3px 3px 0;
  }

  .edge-zone:hover {
    background: rgba(37, 211, 102, 0.3);
    box-shadow: 0 0 8px rgba(37, 211, 102, 0.5);
  }

  .flow-box:hover .edge-zone {
    background: rgba(37, 211, 102, 0.1);
  }

  /* Edge Connection Lines */
  .edge-connection-line {
    filter: drop-shadow(0 2px 4px rgba(37, 211, 102, 0.3));
    transition: all 0.3s ease;
  }

  .edge-connection-line:hover {
    stroke: #20c55e !important;
    stroke-width: 4 !important;
    filter: drop-shadow(0 4px 8px rgba(37, 211, 102, 0.5));
  }

  /* Mobile Padding Fixes */
  @media (max-width: 768px) {
    .card-header {
      padding: 0.75rem 1rem !important;
    }
    
    .card-body {
      padding: 1rem !important;
    }
    
    .template-card .card-header {
      padding: 0.5rem 0.75rem !important;
    }
    
    .content-section {
      padding: 0 !important;
    }
    
    /* Quick Actions Mobile Layout */
    .quick-actions .btn {
      height: 80px !important;
      flex-direction: column !important;
      gap: 0.5rem !important;
      padding: 0.75rem !important;
    }
    
    .quick-actions .btn i {
      font-size: 1.5rem !important;
      margin-bottom: 0.25rem !important;
    }
    
    .quick-actions .btn span {
      font-size: 0.75rem !important;
      line-height: 1.2 !important;
      text-align: center !important;
    }
  }

  @media (max-width: 480px) {
    .card-header {
      padding: 0.5rem 0.75rem !important;
    }
    
    .card-body {
      padding: 0.75rem !important;
    }
    
    .template-card .card-header {
      padding: 0.375rem 0.5rem !important;
    }
    
    .content-section {
      padding: 0 !important;
    }
    
    /* Quick Actions Mobile Layout */
    .quick-actions .btn {
      height: 70px !important;
      flex-direction: column !important;
      gap: 0.25rem !important;
      padding: 0.5rem !important;
    }
    
    .quick-actions .btn i {
      font-size: 1.25rem !important;
      margin-bottom: 0.125rem !important;
    }
    
    .quick-actions .btn span {
      font-size: 0.7rem !important;
      line-height: 1.1 !important;
      text-align: center !important;
    }
  }

  /* Highlighted Sidebar Link */
  .sidebar-link.highlight-link {
    background: #0f172a !important; /* Dark Blue */
    border-left: 4px solid rgb(34, 211, 238) !important;
    color: rgb(34, 211, 238) !important;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(34, 211, 238, 0.2);
    margin: 0 !important;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
  }
  
  .sidebar-link.highlight-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 45%, rgba(34, 211, 238, 0.3) 50%, transparent 55%);
    background-size: 200% 200%;
    animation: shine 3s infinite;
  }
  
  @keyframes shine {
    0% { background-position: -100% 0; }
    100% { background-position: 200% 0; }
  }

  .sidebar-link.highlight-link i {
    color: rgb(34, 211, 238) !important;
    filter: drop-shadow(0 0 5px rgba(34, 211, 238, 0.5));
    font-size: 1.4rem;
  }

  .sidebar-link.highlight-link:hover {
    background: #1e293b !important; /* Lighter Dark Blue */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 211, 238, 0.3);
  }