:root {
  --primary-color: #3574f0; /* New Primary Blue */
  --bs-primary: #3574f0;
  --bs-link-color: #3574f0;
  --bs-link-hover-color: #1a58d4;
  --secondary-color: #6c757d;
  --bg-light: #f8f9fa;
  --text-light: #212529;
  --bg-dark: #212529;
  --text-dark: #f8f9fa;
  --border-color: #e9ecef;
  --card-bg: #ffffff;
  --tag-bg: #eef2f7;
  --tag-text: #495057;
  --danger-bg: #ffeef0;
  --danger-text: #dc3545;
  --success-bg: #e6f4ea;
  --success-text: #198754;
}

body {
  background-color: var(--bg-light);
  color: var(--text-light);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Global Link Styles */
a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  color: var(--bs-link-hover-color);
  text-decoration: underline;
}

/* Ensure buttons don't have underlines */
.btn:hover, .btn:focus, .btn:active {
  text-decoration: none !important;
}

/* Bootstrap Overrides */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
  background-color: var(--bs-link-hover-color) !important;
  border-color: var(--bs-link-hover-color) !important;
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.flow-control-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    text-decoration: none;
}

.text-primary {
  color: var(--primary-color) !important;
}

.bg-primary {
  background-color: var(--primary-color) !important;
}

/* Navbar */
.navbar:not(.bg-primary) {
  background-color: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  padding: 1rem 0;
}

.navbar:not(.bg-primary) .navbar-brand {
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1.25rem;
}

.navbar-dark .navbar-brand,
.navbar-dark .nav-link {
  color: #fff !important;
}

.navbar-toggler {
  border: none;
  color: var(--text-light);
}

/* Dashboard Header */
.dashboard-header {
  margin-bottom: 2rem;
}

.dashboard-title {
  font-weight: 700;
  color: #1a1f36;
  margin-bottom: 0.25rem;
}

.dashboard-subtitle {
  color: #6c757d;
  font-size: 0.95rem;
}

/* Logic Cards */
.logic-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  position: relative;
}

.logic-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transform: translateY(-1px);
}

.logic-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.logic-title {
  font-weight: 600;
  font-size: 1.1rem;
  color: #1a1f36;
  margin: 0;
}

.logic-actions {
  display: flex;
  gap: 0.5rem;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.logic-card:hover .logic-actions {
  opacity: 1;
}

.logic-action-btn {
  color: #6c757d;
  cursor: pointer;
  padding: 4px;
}

.logic-action-btn:hover {
  color: var(--primary-color);
}

.logic-action-btn.delete:hover {
  color: var(--danger-text);
}

.logic-answer {
  color: #495057;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.logic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.tag {
  background: var(--tag-bg);
  color: var(--tag-text);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
}

.tag.negative {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.tag-connector {
  color: #adb5bd;
  font-size: 0.8rem;
}

/* Form Styles */
.form-section {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1f36;
  margin-bottom: 1rem;
}

.conditions-flow {
  background: #f8f9fa;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
}

.flow-step {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1rem;
  position: relative;
}

.flow-step:last-child {
  margin-bottom: 0;
}

.login-footer {
    width: 100%;
    padding: 1rem 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: #6c757d;
    background-color: #fff;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

html.dark-mode .login-footer {
    color: #adb5bd;
    background-color: #2c3034;
    border-color: #495057;
}

.flow-connector {
  text-align: center;
  margin: 0.5rem 0;
  color: #adb5bd;
  font-size: 1.2rem;
}

.context-flow {
  background: #e8f0fe;
  border: 1px solid #d2e3fc;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.context-flow-title {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.exclusion-box {
  background: #fef2f2;
  border: 1px solid #fee2e2;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.exclusion-title {
  color: #b91c1c;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Chat Interface (Keeping existing styles but updating colors) */
.chat-container {
  max-width: 600px;
  margin: 20px auto;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 80vh;
}

.chat-header {
  background: var(--primary-color);
  color: white;
  padding: 15px;
  text-align: center;
  font-weight: bold;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.theme-toggle {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

.chat-body {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  background: #f1f1f1;
}

.chat-message {
  margin-bottom: 15px;
  display: flex;
}

.chat-message.user {
  justify-content: flex-end;
}

.message-content {
  max-width: 80%;
  padding: 10px 15px;
  border-radius: 20px;
  font-size: 0.95rem;
  line-height: 1.4;
}

.chat-message.bot .message-content {
  background: white;
  color: #333;
  border-bottom-left-radius: 5px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.chat-message.user .message-content {
  background: var(--primary-color);
  color: white;
  border-bottom-right-radius: 5px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.chat-footer {
  padding: 15px;
  background: white;
  border-top: 1px solid #ddd;
  display: flex;
  gap: 10px;
}

.quick-replies-bar {
    background: white;
    padding: 10px 15px;
    white-space: nowrap;
    overflow-x: auto;
    border-top: 1px solid #ddd;
    display: none; /* Hidden by default */
    -webkit-overflow-scrolling: touch;
}

.quick-replies-bar::-webkit-scrollbar {
    height: 6px;
}

.quick-replies-bar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.quick-replies-bar::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.quick-replies-bar::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

/* Dark Mode Support */
html.dark-mode body {
  background-color: var(--bg-dark);
  color: var(--text-dark);
  --card-bg: #2c3034;
    --border-color: #495057;
}

html.dark-mode body hr {
    border-color: #495057;
    opacity: 1;
}

html.dark-mode body .navbar {
  background-color: #343a40 !important;
  border-bottom: 1px solid #495057;
}

html.dark-mode body .logic-card,
html.dark-mode body .form-section,
html.dark-mode body .flow-step {
  background-color: #2c3034;
  border-color: #495057;
}

html.dark-mode body .logic-title,
html.dark-mode body .form-section-title {
  color: #f8f9fa;
}

html.dark-mode body .logic-answer {
  color: #ced4da;
}

html.dark-mode body .tag {
  background-color: #495057;
  color: #f8f9fa;
}

html.dark-mode body .tag.negative {
  background-color: #4a1c1c;
  color: #f66666;
}

html.dark-mode body .conditions-flow {
  background-color: #343a40;
  border-color: #495057;
}

/* Logic Badge (Quick Replies) */
.logic-badge {
    background-color: #f8f9fa;
    color: #212529;
}

html.dark-mode body .logic-badge {
    background-color: #495057;
    color: #f8f9fa;
    border-color: #6c757d !important;
}

/* Faint Header Utilities */
.opacity-50 {
    opacity: 0.5 !important;
}

html.dark-mode body .context-flow {
  background-color: #1c2e4a;
  border-color: #2c4a7c;
}

html.dark-mode body .context-flow-title {
  color: var(--primary-color);
}

html.dark-mode body .exclusion-box {
  background-color: #4a1c1c;
  border-color: #7c2c2c;
}

html.dark-mode body .exclusion-title {
  color: #f66666;
}

html.dark-mode body .exclusion-box .form-text {
  color: #ffcccc;
}

/* Chat Interface Dark Mode */
html.dark-mode body .chat-container {
  background: #2c3034;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

html.dark-mode body .chat-body {
  background: #1a1d21;
}

html.dark-mode body .chat-footer {
  background: #2c3034;
  border-top-color: #495057;
}

html.dark-mode body .quick-replies-bar {
    background: #2c3034;
    border-top-color: #495057;
}

html.dark-mode body .quick-replies-bar::-webkit-scrollbar-track {
    background: #2c3034;
}

html.dark-mode body .quick-replies-bar::-webkit-scrollbar-thumb {
    background: #495057;
}

html.dark-mode body .chat-message.bot .message-content {
  background: #343a40;
  color: #f8f9fa;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

html.dark-mode body #userInput {
  background: #343a40;
  border-color: #495057;
  color: #f8f9fa;
}

html.dark-mode body #userInput::placeholder {
  color: #adb5bd;
}

html.dark-mode body .helper-text {
  color: #ffffff !important;
  opacity: 1 !important;
  font-weight: 500;
}

html.dark-mode body .text-muted,
html.dark-mode body .form-text {
  color: #dee2e6 !important;
}

html.dark-mode body code {
  color: #e685b5;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 2px 4px;
  border-radius: 4px;
}

html.dark-mode body .text-gray-800 {
  color: #f8f9fa !important;
}

html.dark-mode body .dashboard-title {
  color: #f8f9fa;
}

/* --- Sidebar Styles --- */
.sidebar {
    width: 250px;
    height: 100vh;
    background: #fff;
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: var(--primary-color);
}

.sidebar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.sidebar-user-info {
    font-size: 12px !important;
    color: rgba(255, 255, 255, 0.8) !important;
    padding-left: 2px;
    line-height: 1.2;
}

.user-email {
    font-weight: 400;
    font-size: 11px !important;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-overflow: ellipsis;
    color: rgba(255, 255, 255, 0.8) !important;
    opacity: 1;
}

.user-expiry {
    font-size: 10px !important;
    color: rgba(255, 255, 255, 0.6) !important;
    opacity: 1;
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
    margin: 0;
    flex: 1;
}

.sidebar-menu li {
    margin-bottom: 0.25rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: #6c757d;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    gap: 0.75rem;
}

.sidebar-menu a:hover,
.sidebar-menu li.active a {
    color: var(--primary-color);
    background: rgba(53, 116, 240, 0.05);
    border-right: 3px solid var(--primary-color);
}

.sidebar-footer {
    padding: 0 1rem;
    height: 60px; /* Fixed height to match footer */
    border-top: 1px solid var(--border-color);
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-footer .btn {
    color: var(--secondary-color);
    transition: color 0.2s;
}

.sidebar-footer .btn:hover {
    color: var(--primary-color);
}

/* Main Content Wrapper */
.main-content {
    margin-left: 250px;
    padding: 2rem;
    min-height: 100vh;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* ... (skipping unchanged lines) ... */


.footer-spacer {
    flex-grow: 1;
    min-height: 3rem;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    margin-top: 0;
    background-color: #fff;
    margin-left: -2rem;
    margin-right: -2rem;
    margin-bottom: -2rem;
    padding: 0 2rem;
    height: 60px; /* Fixed height to match sidebar footer */
    display: flex;
    align-items: center;
}

/* Dashboard Cards */
.dashboard-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
    overflow: hidden;
}

.dashboard-card:hover {
    transform: translateY(-5px);
}

.card-primary {
    background: linear-gradient(135deg, #3574f0 0%, #1a58d4 100%);
}

.card-icon {
    font-size: 2.5rem;
    opacity: 0.3;
    color: white;
}

/* Dark Mode Sidebar */
html.dark-mode body .sidebar {
    background: #2c3034;
    border-color: #495057;
}

html.dark-mode body .sidebar-header,
html.dark-mode body .sidebar-footer {
    border-color: #495057;
}

html.dark-mode body .sidebar-footer .btn {
    color: #adb5bd;
}

html.dark-mode body .sidebar-footer .btn:hover {
    color: #fff;
}

html.dark-mode body .sidebar-menu a {
    color: #ced4da;
}

html.dark-mode body .sidebar-menu a:hover,
html.dark-mode body .sidebar-menu li.active a {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

html.dark-mode body .sidebar-user-info {
    color: #adb5bd;
}

/* --- Responsive Styles --- */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }

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

    .main-content {
        margin-left: 0;
        padding: 1rem;
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        display: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .sidebar-overlay.show {
        display: block;
        opacity: 1;
    }
}

.mobile-toggle-btn {
    margin-right: 1rem;
    padding: 0.25rem 0.5rem;
    font-size: 1.25rem;
    line-height: 1;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    background-color: #fff;
    margin-left: -2rem;
    margin-right: -2rem;
    margin-bottom: -2rem;
    padding: 0 2rem;
    height: 60px;
    display: flex;
    align-items: center;
}

html.dark-mode body .footer {
    background-color: #2c3034;
    border-color: #495057;
}

/* Dark Mode Form & Card Overrides */
html.dark-mode body .card {
    background-color: #2c3034;
    border-color: #495057;
}

html.dark-mode body .card-header {
    background-color: #2c3034 !important;
    border-bottom-color: #495057 !important;
}

html.dark-mode body .card-title {
    /* color: #f8f9fa !important; - Removed to allow text-primary/success to work */
}

html.dark-mode body .input-group-text {
    background-color: #343a40 !important;
    border-color: #495057;
    color: #f8f9fa;
}

html.dark-mode body .form-control,
html.dark-mode body .form-select {
    background-color: #343a40;
    border-color: #495057;
    color: #f8f9fa;
}

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

html.dark-mode body .form-label {
    color: #f8f9fa;
}

html.dark-mode body .form-control::file-selector-button {
    background-color: #343a40;
    color: #f8f9fa;
    border-right: 1px solid #495057;
}

html.dark-mode body .form-control:hover::file-selector-button {
    background-color: #495057;
    color: #fff;
}

/* Dark Mode Modal */
html.dark-mode body .modal-content {
    background-color: #2c3034;
    border-color: #495057;
    color: #f8f9fa;
}

html.dark-mode body .modal-header {
    border-bottom-color: #495057;
}

html.dark-mode body .modal-title {
    color: #f8f9fa;
}

html.dark-mode body .modal-footer {
    border-color: #495057;
}

/* Dark Mode Tables */
html.dark-mode body .table {
    color: #e9ecef;
    border-color: #495057;
}

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

html.dark-mode body .table-light {
    background-color: #343a40;
    color: #e9ecef;
    border-color: #495057;
}

html.dark-mode body .table-light th,
html.dark-mode body .table-light td {
    background-color: #343a40;
    color: #e9ecef;
}

html.dark-mode body .table td, 
html.dark-mode body .table th {
    border-color: #495057;
    background-color: transparent;
    color: #e9ecef;
}

html.dark-mode body .table {
    --bs-table-bg: transparent;
    --bs-table-color: #e9ecef;
    color: #e9ecef;
}

html.dark-mode body .card {
    background-color: #2c3034;
    border-color: #495057;
}

html.dark-mode body .table > :not(caption) > * > * {
    background-color: transparent;
    color: #e9ecef;
    box-shadow: none;
}

html.dark-mode body .card {
    background-color: #2c3034;
    border-color: #495057;
}

html.dark-mode body .table > :not(caption) > * > * {
    background-color: transparent;
    color: #e9ecef;
    box-shadow: none;
}

html.dark-mode body .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

html.dark-mode body .btn-light {
    background-color: #495057;
    border-color: #6c757d;
    color: #f8f9fa;
}

html.dark-mode body .btn-light:hover {
    background-color: #5a6268;
    border-color: #7e858b;
    color: #fff;
}

/* Dark Mode Pagination */
html.dark-mode body .page-link {
    background-color: #343a40;
    border-color: #495057;
    color: #f8f9fa;
}

html.dark-mode body .page-link:hover {
    background-color: #495057;
    border-color: #495057;
    color: #fff;
}

html.dark-mode body .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

html.dark-mode body .page-item.disabled .page-link {
    background-color: #2c3034;
    border-color: #495057;
    color: #6c757d;
}

/* Force Font Awesome Spin */
@keyframes fa-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.fa-spin {
  animation: fa-spin 2s infinite linear;
}

/* Dark Mode Date Input Icon */
html.dark-mode body input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

/* Login Page Logo */
.login-logo {
    max-width: 250px !important;
    width: 100% !important;
    height: auto;
    margin-bottom: 1rem;
}



/* Login Container Centering */
.login-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 20px;
}

/* Login Card */
.login-card {
    width: 100%;
    max-width: 400px;
    background-color: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, rgba(0, 0, 0, .125));
}


html.dark-mode .login-card {
    --card-bg: #343a40;
    --border-color: #495057;
    color: #f8f9fa;
}


/* Fix Alert Close Button in Dark Mode */

/* Fix Alert Close Button in Dark Mode */
html.dark-mode body .alert .btn-close {
    filter: none !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") !important;
    opacity: 0.5;
}

html.dark-mode body .alert .btn-close:hover {
    opacity: 0.75;
}

/* Fix Chatbot Status Label in Dark Mode */
html.dark-mode body .form-check-label {
    color: #f8f9fa;
}

/* Image Response Container */
.image-response-container {
    background-color: #f8f9fa; /* Light mode default */
    transition: background-color 0.3s, border-color 0.3s;
}

/* Image Response Container Dark Mode */
html.dark-mode body .image-response-container {
    background-color: #343a40 !important;
    border-color: #495057 !important;
    color: #f8f9fa;
}

html.dark-mode body .image-response-container .text-muted {
    color: #adb5bd !important;
}

/* Dark Mode Image Thumbnail */
html.dark-mode body .img-thumbnail {
    background-color: #343a40;
    border-color: #495057;
}

/* Dark Mode Input Group & File Input */
html.dark-mode body .image-response-container .input-group-text {
    background-color: #2c3034;
    border-color: #495057;
}

html.dark-mode body .image-response-container .form-control {
    background-color: #2c3034;
    border-color: #495057;
    color: #f8f9fa;
}

html.dark-mode body .image-response-container .form-control::file-selector-button {
    background-color: #343a40;
    color: #f8f9fa;
    border-right: 1px solid #495057;
}

html.dark-mode body .image-response-container .form-control:hover::file-selector-button {
    background-color: #495057;
    color: #fff;
}

/* Dark Mode Buttons */
html.dark-mode body .btn-outline-secondary {
    border-color: #495057;
    color: #adb5bd;
}

html.dark-mode body .btn-outline-secondary:hover {
    background-color: #495057;
    color: #fff;
}

html.dark-mode body .btn-outline-danger {
    border-color: #e74a3b;
    color: #e74a3b;
}

html.dark-mode body .btn-outline-danger:hover {
    background-color: #e74a3b;
    color: #fff;
}

/* Card Response Container */
.card-response-container {
    background-color: #f8f9fa; /* Light mode default */
    transition: background-color 0.3s, border-color 0.3s;
}

/* Card Response Container Dark Mode */
html.dark-mode body .card-response-container {
    background-color: #343a40 !important;
    border-color: #495057 !important;
    color: #f8f9fa;
}

html.dark-mode body .card-response-container .text-muted {
    color: #adb5bd !important;
}

/* Chat Card Styles */
.chat-card {
    max-width: 250px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.chat-card-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.chat-card-body {
    padding: 10px;
}

.chat-card-title {
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 4px;
}

.chat-card-subtitle {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 8px;
}

.chat-card-buttons {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-card-btn {
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 15px;
}

/* Dark Mode Chat Card */
html.dark-mode body .chat-card {
    background: #343a40;
    border-color: #495057;
}

html.dark-mode body .chat-card-title {
    color: #f8f9fa;
}

html.dark-mode body .chat-card-subtitle {
    color: #adb5bd;
}

/* Carousel Card Item Styles */
.single-card-item {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
    transition: background-color 0.3s, border-color 0.3s;
}

html.dark-mode body .single-card-item {
    background-color: #2c3034;
    border-color: #495057 !important;
    box-shadow: none;
    color: #f8f9fa;
}

/* Ensure inputs inside card adapt to dark mode */
html.dark-mode body .single-card-item .form-control,
html.dark-mode body .single-card-item .form-select {
    background-color: #343a40;
    border-color: #495057;
    color: #f8f9fa;
}

html.dark-mode body .single-card-item .form-label {
    color: #f8f9fa;
}
