/* Enhanced SaaS UI - style.css */
:root {
    /* Brand Colors */
    --primary-dark: #0d5b96;
    --primary-main: #0066cc;
    --primary-light: #4d94ff;
    --primary-lightest: #e6f2ff;
    --accent: #f6921e;
    --accent-light: #ffb15c;
    --accent-dark: #d6780a;
    
    /* Neutral Colors */
    --neutral-900: #212b36;
    --neutral-800: #323f4b;
    --neutral-700: #3e4c59;
    --neutral-600: #52606d;
    --neutral-500: #616e7c;
    --neutral-400: #7b8794;
    --neutral-300: #9aa5b1;
    --neutral-200: #cbd2d9;
    --neutral-100: #e4e7eb;
    --neutral-50: #f5f7fa;
    --white: #ffffff;
    
    /* Functional Colors */
    --success: #00875a;
    --warning: #de911d;
    --error: #d91921;
    --info: #2b79c2;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-main) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    
    /* Shadow */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    
    /* Layout */
    --header-height: 64px;
    --footer-height: 240px;
    --sidebar-width: 280px;
  }
  
  /* Base Styles */
  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--neutral-50);
    color: var(--neutral-800);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  /* Container Layout */
  .container-fluid {
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }
  
  .row {
    margin: 0;
    flex-grow: 1;
    display: flex;
  }
  
  /* Header/Navbar Styles */
  .app-header {
    background-color: var(--white);
    border-bottom: 1px solid var(--neutral-100);
    padding: 0 1.5rem;
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: box-shadow 0.3s ease;
  }
  
  .app-header:hover {
    box-shadow: var(--shadow-md);
  }
  
  .app-header .page-title {
    color: var(--primary-dark);
    margin: 0;
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: -0.025em;
  }
  
  .app-header .user-menu {
    display: flex;
    align-items: center;
  }
  
  .app-header .user-info {
    margin-right: 12px;
    text-align: right;
  }
  
  .app-header .user-name {
    font-weight: 600;
    color: var(--neutral-800);
    margin: 0;
    font-size: 0.9rem;
  }
  
  .app-header .user-role {
    color: var(--neutral-500);
    font-size: 0.75rem;
    margin: 0;
  }
  
  .app-header .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--white);
    transition: all 0.2s ease;
  }
  
  .app-header .user-avatar:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
  }
  
  /* Sidebar Styles */
  .sidebar {
    background: var(--gradient-primary);
    min-height: 100vh;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 1030;
    padding-bottom: 1rem;
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    transition: all 0.3s ease;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
  }
  
  .sidebar::-webkit-scrollbar {
    width: 4px;
  }
  
  .sidebar::-webkit-scrollbar-track {
    background: transparent;
  }
  
  .sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
  }
  
  .sidebar-header {
    padding: 1.5rem 1.5rem 1.25rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .sidebar-header .logo-text {
    color: var(--white);
    font-weight: 700;
    margin: 0;
    font-size: 1.2rem;
    letter-spacing: -0.025em;
    display: flex;
    align-items: center;
  }
  
  .sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    margin: 0.15rem 0.75rem;
    transition: all 0.2s ease;
    border-radius: 6px;
    display: flex;
    align-items: center;
    border-left: none;
  }
  
  .sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white) !important;
  }
  
  .sidebar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--white) !important;
    box-shadow: var(--shadow-sm);
    position: relative;
  }
  
  .sidebar .nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    height: 100%;
    width: 4px;
    background-color: var(--accent);
    border-radius: 0 4px 4px 0;
  }
  
  .sidebar .nav-link i {
    color: var(--accent);
    width: 20px;
    margin-right: 12px;
    font-size: 1rem;
    text-align: center;
    transition: transform 0.2s ease;
  }
  
  .sidebar .nav-link:hover i {
    transform: translateX(2px);
  }
  
  .sidebar .nav-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.075rem;
    color: rgba(255, 255, 255, 0.5);
    padding: 1.5rem 1.75rem 0.5rem;
    margin-bottom: 0;
    font-weight: 600;
  }
  
  /* Main Content Area */
  main {
    flex: 1;
    background-color: var(--neutral-50);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: all 0.3s ease;
  }
  
  .content-area {
    flex: 1;
    padding: 1.75rem;
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
  }
  
  /* Dashboard Card Styles */
  .card-stats {
    transition: all 0.3s ease;
    border: none;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    background-color: var(--white);
  }
  
  .card-stats:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
  }
  
  .card-stats .card-title {
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
  
  .card-stats .card-body {
    padding: 1.5rem;
  }
  
  .card-stats .card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin: 0.75rem 0;
  }
  
  .card-stats .card-icon {
    color: var(--accent);
    font-size: 1.25rem;
    background-color: var(--primary-lightest);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .card-stats .card-trend {
    font-size: 0.875rem;
    display: flex;
    align-items: center;
  }
  
  .card-stats .trend-up {
    color: var(--success);
  }
  
  .card-stats .trend-down {
    color: var(--error);
  }
  
  /* Chat Styles */
  .chat-container {
    height: calc(100vh - 220px);
    min-height: 400px;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    background-color: var(--white);
    overflow: hidden;
  }
  
  .chat-header {
    padding: 1rem 1.5rem;
    background-color: var(--primary-dark);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  .chat-header h4 {
    margin: 0;
    font-weight: 600;
    font-size: 1rem;
  }
  
  .chat-header .actions {
    display: flex;
    gap: 0.5rem;
  }
  
  .chat-header .btn-icon {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: var(--white);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  
  .chat-header .btn-icon:hover {
    background: rgba(255, 255, 255, 0.25);
  }
  
  .chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background-color: var(--neutral-50);
    scrollbar-width: thin;
    scrollbar-color: var(--neutral-300) transparent;
  }
  
  .chat-messages::-webkit-scrollbar {
    width: 4px;
  }
  
  .chat-messages::-webkit-scrollbar-track {
    background: transparent;
  }
  
  .chat-messages::-webkit-scrollbar-thumb {
    background-color: var(--neutral-300);
    border-radius: 10px;
  }
  
  .chat-message {
    margin-bottom: 1.25rem;
    display: flex;
    max-width: 80%;
  }
  
  .chat-message.user {
    justify-content: flex-end;
    margin-left: auto;
  }
  
  .chat-message.ai {
    justify-content: flex-start;
    margin-right: auto;
  }
  
  .chat-message-content {
    padding: 0.875rem 1.25rem;
    border-radius: 1.25rem;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease;
  }
  
  .chat-message-content:hover {
    box-shadow: var(--shadow-md);
  }
  
  .chat-message.user .chat-message-content {
    background: var(--gradient-primary);
    color: var(--white);
    border-bottom-right-radius: 0.25rem;
  }
  
  .chat-message.ai .chat-message-content {
    background-color: var(--white);
    color: var(--neutral-800);
    border-bottom-left-radius: 0.25rem;
  }
  
  .chat-message-time {
    font-size: 0.7rem;
    color: var(--neutral-500);
    margin-top: 0.25rem;
    text-align: right;
  }
  
  .chat-message.user .chat-message-time {
    text-align: right;
  }
  
  .chat-message.ai .chat-message-time {
    text-align: left;
  }
  
  .chat-input-container {
    padding: 1rem 1.5rem;
    background-color: var(--white);
    border-top: 1px solid var(--neutral-100);
  }
  
  .chat-input-wrapper {
    display: flex;
    align-items: center;
    background-color: var(--neutral-50);
    border-radius: 2rem;
    padding: 0.5rem 1rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease;
  }
  
  .chat-input-wrapper:focus-within {
    box-shadow: var(--shadow-md);
  }
  
  .chat-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.5rem;
    outline: none;
    font-size: 0.95rem;
    color: var(--neutral-800);
  }
  
  .chat-input-wrapper .btn-send {
    background-color: var(--primary-main);
    color: var(--white);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  
  .chat-input-wrapper .btn-send:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
  }
  
  /* Footer Styles */
  .app-footer {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 2.5rem 0 1.5rem;
    position: relative;
    z-index: 10;
  }
  
  .app-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-accent);
  }
  
  .app-footer a {
    color: rgba(255, 255, 255, 0.8) !important;
    transition: all 0.2s ease;
    text-decoration: none;
  }
  
  .app-footer a:hover {
    color: var(--accent) !important;
  }
  
  .app-footer h5 {
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 1.25rem;
    font-size: 1.125rem;
    letter-spacing: -0.01em;
  }
  
  .app-footer hr {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 1.5rem 0;
  }
  
  .footer-info {
    font-size: 0.9rem;
    opacity: 0.85;
    line-height: 1.5;
  }
  
  .footer-logo {
    height: 40px;
    margin-bottom: 1rem;
  }
  
  .app-footer .list-unstyled li {
    margin-bottom: 0.5rem;
  }
  
  .app-footer .list-unstyled li a {
    display: inline-flex;
    align-items: center;
  }
  
  .app-footer .list-unstyled li a i {
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.2s ease;
    color: var(--accent);
  }
  
  .app-footer .list-unstyled li a:hover i {
    opacity: 1;
    transform: translateX(0);
  }
  
  /* Button Styles */
  .btn-primary {
    background-color: var(--primary-main);
    border-color: var(--primary-main);
    border-radius: 6px;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
  }
  
  .btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
  }
  
  .btn-outline-primary {
    color: var(--primary-main);
    border-color: var(--primary-main);
    border-radius: 6px;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    transition: all 0.2s ease;
  }
  
  .btn-outline-primary:hover {
    background-color: var(--primary-main);
    border-color: var(--primary-main);
    box-shadow: var(--shadow-sm);
  }
  
  /* Typing indicator */
  .typing-indicator {
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--neutral-600);
  }
  
  .typing-indicator span {
    display: inline-block;
    margin-left: 2px;
    font-size: 1.25rem;
    line-height: 0;
    font-weight: bold;
  }
  
  .typing-indicator .dot-1,
  .typing-indicator .dot-2,
  .typing-indicator .dot-3 {
    animation: pulse 1.3s infinite;
  }
  
  .typing-indicator .dot-1 {
    animation-delay: 0s;
  }
  
  .typing-indicator .dot-2 {
    animation-delay: 0.2s;
  }
  
  .typing-indicator .dot-3 {
    animation-delay: 0.4s;
  }
  
  @keyframes pulse {
    0%, 100% { opacity: 0.2; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-3px); }
  }
  
  /* Dropdown Menu Styling */
  .dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: 8px;
    padding: 0.5rem;
    min-width: 180px;
  }
  
  .dropdown-item {
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    color: var(--neutral-700);
    border-radius: 6px;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
  }
  
  .dropdown-item i {
    margin-right: 10px;
    font-size: 1rem;
    color: var(--neutral-500);
    transition: all 0.2s ease;
  }
  
  .dropdown-item:hover {
    background-color: var(--primary-lightest);
    color: var(--primary-dark);
  }
  
  .dropdown-item:hover i {
    color: var(--primary-main);
  }
  
  .dropdown-item:active {
    background-color: var(--primary-main);
    color: var(--white);
  }
  
  .dropdown-item:active i {
    color: var(--white);
  }
  
  .dropdown-divider {
    margin: 0.5rem 0;
    border-top-color: var(--neutral-100);
  }
  
  /* Toast Notifications */
  .toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .toast {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    padding: 1rem;
    min-width: 300px;
    max-width: 450px;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
  }
  
  .toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
  }
  
  .toast-success::before {
    background-color: var(--success);
  }
  
  .toast-error::before {
    background-color: var(--error);
  }
  
  .toast-warning::before {
    background-color: var(--warning);
  }
  
  .toast-info::before {
    background-color: var(--info);
  }
  
  .toast-icon {
    font-size: 1.25rem;
    margin-right: 0.75rem;
  }
  
  .toast-success .toast-icon {
    color: var(--success);
  }
  
  .toast-error .toast-icon {
    color: var(--error);
  }
  
  .toast-warning .toast-icon {
    color: var(--warning);
  }
  
  .toast-info .toast-icon {
    color: var(--info);
  }
  
  .toast-content {
    flex: 1;
    font-size: 0.95rem;
    color: var(--neutral-800);
  }
  
  .toast-close {
    background: none;
    border: none;
    color: var(--neutral-400);
    font-size: 1rem;
    cursor: pointer;
    margin-left: 0.75rem;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
  }
  
  .toast-close:hover {
    color: var(--neutral-700);
  }
  
  /* Animation */
  .fade-in {
    animation: fadeIn 0.3s ease forwards;
  }
  
  .fade-out {
    animation: fadeOut 0.3s ease forwards;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  @keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
  }
  
  /* Responsive Fixes */
  @media (max-width: 767.98px) {
    .sidebar {
      position: fixed;
      top: 56px; /* Height of mobile navbar */
      bottom: 0;
      left: 0;
      padding: 0;
      width: 280px;
      transform: translateX(-100%);
      transition: transform 0.3s ease-in-out;
      z-index: 1025;
    }
    
    .sidebar.show {
      transform: translateX(0);
    }
    
    .chat-container {
      height: calc(100vh - 180px);
    }
    
    /* Mobile navbar */
    .mobile-navbar {
      position: sticky;
      top: 0;
      z-index: 1030;
      background: var(--gradient-primary);
      box-shadow: var(--shadow-md);
      height: 56px;
    }
    
    /* Adjust main padding for mobile */
    .content-area {
      padding: 1rem;
    }
    
    /* Ensure footer styling on mobile */
    .app-footer {
      position: relative;
      bottom: 0;
    }
    
    /* Adjust card spacing on mobile */
    .card-stats {
      margin-bottom: 1rem;
    }
  }
  
  /* Additional utility classes */
  .text-primary { color: var(--primary-main) !important; }
  .text-accent { color: var(--accent) !important; }
  .text-success { color: var(--success) !important; }
  .text-warning { color: var(--warning) !important; }
  .text-error { color: var(--error) !important; }
  .text-info { color: var(--info) !important; }
  
  .bg-primary { background-color: var(--primary-main) !important; }
  .bg-accent { background-color: var(--accent) !important; }
  .bg-primary-light { background-color: var(--primary-lightest) !important; }
  .bg-white { background-color: var(--white) !important; }
  
  /* Premium feature badges */
  .badge-premium {
    background: var(--gradient-accent);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
  }
  
  .badge-premium i {
    margin-right: 0.25rem;
    font-size: 0.8rem;
  }
  
  /* Status indicators */
  .status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
  }
  
  .status-online {
    background-color: var(--success);
    box-shadow: 0 0 0 2px rgba(0, 135, 90, 0.2);
  }
  
  .status-away {
    background-color: var(--warning);
    box-shadow: 0 0 0 2px rgba(222, 145, 29, 0.2);
  }
  
  .status-offline {
    background-color: var(--neutral-400);
    box-shadow: 0 0 0 2px rgba(123, 135, 148, 0.2);
  }
  
  /* Custom scrollbar for the whole page */
  ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }
  
  ::-webkit-scrollbar-track {
    background: transparent;
  }
  
  ::-webkit-scrollbar-thumb {
    background-color: var(--neutral-300);
    border-radius: 6px;
  }
  
  ::-webkit-scrollbar-thumb:hover {
    background-color: var(--neutral-400);
  }
  
  /* Focus ring styles */
  :focus {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
  }
  
  .btn:focus, .btn-primary:focus, .btn-outline-primary:focus {
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.25);
  }
  
  /* Loading skeleton */
  .skeleton {
    background: linear-gradient(90deg, var(--neutral-100) 25%, var(--neutral-200) 50%, var(--neutral-100) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
  }
  
  @keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
  }
  /* Chat Interface Fixes */

/* Main chat container - make it fill available space */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 160px); /* Adjust to fill viewport minus header/footer space */
    min-height: 600px;
    margin: 0;
    background-color: var(--white, #ffffff);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}

/* Chat header */
.chat-header {
    padding: 1rem 1.5rem;
    background: var(--gradient-primary, linear-gradient(135deg, #0d5b96 0%, #0066cc 100%));
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

/* Messages container */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background-color: var(--neutral-50, #f5f7fa);
    display: flex;
    flex-direction: column;
}

/* Individual message styling */
.chat-message {
    margin-bottom: 1.25rem;
    max-width: 80%;
    animation: fadeIn 0.3s ease;
}

.chat-message.user {
    align-self: flex-end;
    margin-left: auto;
}

.chat-message.ai {
    align-self: flex-start;
    margin-right: auto;
}

.chat-message-content {
    padding: 1rem 1.25rem;
    border-radius: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chat-message.user .chat-message-content {
    background: var(--primary-main, #0066cc);
    color: white;
    border-bottom-right-radius: 0.25rem;
}

.chat-message.ai .chat-message-content {
    background-color: white;
    color: var(--neutral-800, #323f4b);
    border-bottom-left-radius: 0.25rem;
}

/* Message timestamp */
.chat-message-time {
    font-size: 0.7rem;
    color: var(--neutral-500, #a0aec0);
    margin-top: 0.25rem;
}

.chat-message.user .chat-message-time {
    text-align: right;
}

.chat-message.ai .chat-message-time {
    text-align: left;
}

/* Chat input area */
.chat-input-container {
    padding: 1rem 1.5rem;
    background-color: white;
    border-top: 1px solid var(--neutral-100, #e4e7eb);
}

.chat-input-wrapper {
    display: flex;
    align-items: center;
    background-color: var(--neutral-50, #f5f7fa);
    border-radius: 2rem;
    padding: 0.5rem 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.chat-input-wrapper:focus-within {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-light, #4d94ff);
}

.chat-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.75rem;
    outline: none;
    font-size: 1rem;
    color: var(--neutral-800, #323f4b);
    width: 100%;
    resize: none;
    min-height: 48px;
    max-height: 150px;
    overflow-y: auto;
}

.chat-send-btn {
    background-color: var(--primary-main, #0066cc);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chat-send-btn:hover {
    background-color: var(--primary-dark, #0d5b96);
    transform: translateY(-2px);
}

/* Back to sessions button */
.back-to-sessions {
    display: inline-flex;
    align-items: center;
    background-color: var(--white, #ffffff);
    color: var(--primary-main, #0066cc);
    border: 1px solid var(--primary-main, #0066cc);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-bottom: 1rem;
}

.back-to-sessions:hover {
    background-color: var(--primary-lightest, #e6f2ff);
    color: var(--primary-dark, #0d5b96);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.back-to-sessions i {
    margin-right: 0.5rem;
}

/* Chat page content wrapper - ensure proper spacing */
.chat-page-content {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 180px);
    padding: 0;
}

.chat-session-header {
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-session-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--neutral-800, #323f4b);
    margin: 0;
}

/* Animation for messages */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Make content area take full height */
.content-area {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    flex-grow: 1;
    height: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .chat-container {
        height: calc(100vh - 200px);
        min-height: 400px;
    }
    
    .chat-message {
        max-width: 90%;
    }
}

.mininav-toggle .mainnav__avatar.img-md {
    width: 48px !important; /* Adjust this value */
    height: 48px !important; /* Adjust this value */
    font-size: 18px !important; /* Adjust this value */
    line-height: 48px !important; /* Should match height */
}

/* Ensure both image and initials avatar have the same size */
.mininav-toggle .mainnav__avatar.img-md {
    width: 64px !important; /* Set to the exact size of your avatar image */
    height: 64px !important;
    line-height: 64px !important; /* For text centering in the span version */
}
.mininav-toggle .mainnav__avatar.img-md.text-white {
    font-size: 22px !important; /* Adjust for the text size */
}

/* User Card Styling */
.user-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    position: relative;
    background-color: #fff;
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 20px;
    border: none;
}

.user-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Card Header */
.card-header-custom {
    position: relative;
    padding: 20px 15px 60px 15px;
    color: white;
    border-radius: 12px 12px 0 0;
}

.card-options {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.user-title {
    padding-top: 15px;
    text-align: center;
}

/* Avatar */
.avatar-container {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 100px;
    z-index: 20;
}

.avatar-img, .avatar-initials {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: bold;
}

/* Card Body */
.card-body-custom {
    padding: 70px 20px 20px 20px;
}

.user-email {
    text-align: center;
    font-size: 0.95rem;
    color: #555;
    word-break: break-word;
}

/* User Stats */
.user-stats {
    margin-top: 20px;
}

.stat-item {
    margin-bottom: 15px;
}

.stat-label {
    font-size: 0.85rem;
    color: #6c757d;
}

.stat-value {
    font-weight: 600;
    font-size: 0.95rem;
}

.progress {
    margin-top: 5px;
    border-radius: 10px;
    background-color: #f0f0f0;
}

/* Card Footer */
.card-footer-custom {
    padding: 15px;
    border-top: 1px solid #eee;
}

.action-buttons {
    display: flex;
    justify-content: space-around;
}

.btn-action {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s;
}

.btn-action:hover {
    transform: scale(1.1);
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
    .action-buttons {
        flex-wrap: wrap;
        gap: 10px;
    }
}
