body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-bottom: 70px;
}

.conversation-container {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background-color: #f9f9f9;
    padding: 10px;
    margin-bottom: 20px;
}

.message-container {
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 5px;
}

.user-message {
    background-color: #e3f2fd;
    margin-left: 20%;
    border-left: 4px solid #2196F3;
}

.agent-message {
    background-color: #fff;
    margin-right: 20%;
    border-left: 4px solid #4CAF50;
}

.message-header {
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    font-weight: bold;
}

.message-content {
    white-space: pre-line;
}

.footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 60px;
    line-height: 60px;
    background-color: #f5f5f5;
}

.card {
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.jumbotron {
    background-color: #f5f8fa;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Custom template filter for newlines to <br> */
.nl2br {
    white-space: pre-line;
}
/* Dark mode styles */
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-mode .card {
    background-color: #1e1e1e;
    border-color: #333;
}

body.dark-mode .jumbotron {
    background-color: #1e1e1e;
    color: #e0e0e0;
}

body.dark-mode .table {
    color: #e0e0e0;
}

body.dark-mode .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .modal-content {
    background-color: #1e1e1e;
    color: #e0e0e0;
}

body.dark-mode .card-header {
    background-color: rgba(0, 0, 0, 0.3);
}

body.dark-mode .list-group-item {
    background-color: #1e1e1e;
    color: #e0e0e0;
    border-color: #333;
}

/* Light pattern for normal mode */
body {
    background-color: #f8f9fa;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23e9ecef' fill-opacity='0.6' fill-rule='evenodd'/%3E%3C/svg%3E");
}

/* Dark pattern for dark mode */
body.dark-mode {
    background-color: #121212;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23333333' fill-opacity='0.3' fill-rule='evenodd'/%3E%3C/svg%3E");
}
/* Custom navbar color */
.navbar-dark.bg-success {
    background-color: #0B5345 !important; /* Dark green custom color */
}

/* Brilliant white text color for navbar items */
.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important; /* More brilliant white */
    font-weight: 500; /* Slightly bolder text */
}

.navbar-dark .navbar-brand {
    color: rgba(255, 255, 255, 1) !important; /* Pure white for brand */
    font-weight: 600; /* Bolder brand text */
}
/* Improve text legibility in dark mode */
body.dark-mode {
    background-color: #121212;
    color: #ffffff; /* Brighter text for better contrast */
}

body.dark-mode .card {
    background-color: #1e1e1e;
    border-color: #333;
}

body.dark-mode .message-content,
body.dark-mode p,
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
    color: #ffffff; /* Make sure all text is bright white in dark mode */
}

/* Make navbar sticky (fixed to top) */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000; /* Ensure it stays on top of other content */
}

/* Add logo styling */
.navbar-brand {
    display: flex;
    align-items: center;
}

.logo {
    color: #ff0000; /* Red color for logo */
    font-weight: bold;
    font-size: 1.2em;
    margin-right: 10px;
}
/* Add this to main.css to fix message text in dark mode */
body.dark-mode .message-container {
    background-color: #2d2d2d; /* Darker background for messages */
}

body.dark-mode .user-message {
    background-color: #253546; /* Dark blue background */
    border-left: 4px solid #4682B4;
}

body.dark-mode .agent-message {
    background-color: #253527; /* Dark green background */
    border-left: 4px solid #4CAF50;
}

body.dark-mode .message-header {
    border-bottom: 1px solid rgba(255,255,255,0.2);
    color: #ffffff;
}

body.dark-mode .message-content {
    color: #e6e6e6; /* Light gray text for better readability */
}
/* Add this to your main.css file */
.mode-subtitle {
    font-size: 0.9rem;
    font-style: italic;
    color: #6c757d; /* Bootstrap's text-muted color */
    margin-top: 5px;
}

/* For dark mode compatibility */
body.dark-mode .mode-subtitle {
    color: #adb5bd; /* Lighter color for dark mode */
}
/* Add this to your existing main.css file */
.mode-subtitle {
    font-size: 0.9rem;
    font-style: italic;
    color: #6c757d; /* Bootstrap's text-muted color */
    margin-top: 5px;
}
/* For dark mode compatibility */
body.dark-mode .mode-subtitle {
    color: #adb5bd; /* Lighter color for dark mode */
}

/* Custom logo styling */
.logo {
    color: #ff0000; /* Red color for logo */
    font-weight: bold;
    font-size: 1.2em;
    margin-right: 5px;
}

/* Knowledge Base Entry styling improvements */
.card-header.bg-primary {
    background-color: #0d6efd !important; /* Ensure primary blue is visible in both modes */
}

/* Light mode knowledge base entry styling */
.kb-entry-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.kb-entry-field {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #0d6efd;
}

.kb-entry-label {
    font-weight: bold;
    margin-bottom: 10px;
    color: #212529;
}

.kb-entry-content {
    white-space: pre-line;
    color: #212529;
}

.kb-entry-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.kb-category-tag {
    display: inline-block;
    background-color: #0d6efd;
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.9rem;
    margin-right: 5px;
}

/* Dark mode adjustments */
body.dark-mode .kb-entry-container {
    background-color: #2d2d2d;
}

body.dark-mode .kb-entry-field {
    background-color: #383838;
    border-left: 4px solid #2196F3;
}

body.dark-mode .kb-entry-label {
    color: #e0e0e0;
}

body.dark-mode .kb-entry-content {
    color: #e0e0e0;
}

body.dark-mode .kb-category-tag {
    background-color: #2196F3;
}

body.dark-mode .breadcrumb {
    background-color: #2d2d2d;
}

body.dark-mode .breadcrumb-item a {
    color: #2196F3;
}

body.dark-mode .breadcrumb-item.active {
    color: #e0e0e0;
}

/* Dark mode table improvements */
body.dark-mode .table {
    color: #e0e0e0;
    background-color: #2d2d2d;
}

body.dark-mode .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .thead-dark th {
    background-color: #212529;
    color: #e0e0e0;
}

/* Improve empty fields display */
.kb-entry-field:empty::before {
    content: "None provided";
    color: #6c757d;
    font-style: italic;
}

body.dark-mode .kb-entry-field:empty::before {
    color: #adb5bd;
}

/* Improve alerts in dark mode */
body.dark-mode .alert-info {
    background-color: #1a3248;
    color: #8edbff;
    border-color: #0f2a3d;
}
/* Add just these styles to your main.css file */

/* Dark mode fix for knowledge base entry text */
body.dark-mode .p-3.bg-light {
    background-color: #333 !important;
    color: #f8f9fa !important;
}

body.dark-mode .badge-info {
    background-color: #17a2b8;
}
/* Simple dark mode improvements */
body.dark-mode .bg-light {
    background-color: #333 !important;
    color: #fff !important;
}

body.dark-mode .badge-info {
    background-color: #17a2b8;
    color: #fff;
}

body.dark-mode h4, 
body.dark-mode h5 {
    color: #fff;
}
/* Dark mode compatibility for search form */
body.dark-mode .form-control {
    background-color: #333;
    color: #fff;
    border-color: #555;
}

body.dark-mode .form-control::placeholder {
    color: #aaa;
}

body.dark-mode .form-control:focus {
    background-color: #444;
    color: #fff;
    border-color: #777;
}

body.dark-mode .input-group-append .btn {
    border-color: #555;
}
/* Category badge colors */
.badge-info { background-color: #17a2b8; }  /* Network - Cyan */
.badge-warning { background-color: #ffc107; color: #212529; }  /* Hardware - Yellow */
.badge-success { background-color: #28a745; }  /* Software - Green */
.badge-danger { background-color: #dc3545; }  /* Email - Red */
.badge-primary { background-color: #007bff; }  /* Mobile - Blue */
.badge-secondary { background-color: #6c757d; }  /* General - Gray */

/* Dark mode badge adjustments */
body.dark-mode .badge {
    font-weight: 500;
}

/* Category statistics cards */
.card.text-center {
    min-height: 100px;
}

body.dark-mode .card.text-center {
    background-color: #2d2d2d;
    border-color: #444;
}

/* Filter form styling for dark mode */
body.dark-mode .form-control {
    background-color: #333;
    color: #fff;
    border-color: #555;
}

body.dark-mode .form-control:focus {
    background-color: #444;
    color: #fff;
    border-color: #777;
}

body.dark-mode select.form-control option {
    background-color: #333;
    color: #fff;
}
/* Category statistics cards with smaller size */
.category-card {
    min-height: 45px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.category-card .card-body {
    padding: 0.5rem !important;
}

.category-card .card-title {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Light mode category colors */
body:not(.dark-mode) .category-general {
    background-color: #fff;
    color: #0B5345;
}

body:not(.dark-mode) .category-network {
    background-color: #fff;
    color: #0B5345;
}

body:not(.dark-mode) .category-hardware {
    background-color: #fff;
    color: #0B5345;
}

body:not(.dark-mode) .category-software {
    background-color: #fff;
    color: #0B5345;
}

body:not(.dark-mode) .category-email {
    background-color: #fff;
    color: #0B5345;
}

body:not(.dark-mode) .category-mobile {
    background-color: #fff;
    color: #0B5345;
}

/* Dark mode - simple dark boxes */
body.dark-mode .category-card {
    background-color: #0B5345;
    color: #fff;
    border: 1px solid #fff;
}

body.dark-mode .category-card:hover {
    background-color: #253527;
    border-color: #fff;
}

/* Ensure proper text contrast */
.category-card a {
    color: inherit;
}

.category-card small {
    display: block;
    font-size: 0.75rem;
}

/* Fix dark mode text muted */
body.dark-mode .text-muted {
    color: #999 !important;
}

/* Analytics Dashboard Styles */
.metric-card {
    border-left: 4px solid #007bff;
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.activity-feed .activity-item {
    border-left: 3px solid #e9ecef;
    padding-left: 15px;
}

.activity-title {
    font-weight: 500;
    font-size: 0.9rem;
}

.activity-meta {
    font-size: 0.8rem;
}

/* Dark mode analytics */
body.dark-mode .metric-card {
    background-color: #2d2d2d;
    border-color: #555;
}

body.dark-mode .activity-item {
    border-left-color: #555;
}

body.dark-mode .card {
    background-color: #2d2d2d;
    border-color: #444;
}