/* ═══════════════════════════════════════════════════════════════════
   RESET & BASE STYLES
   ═══════════════════════════════════════════════════════════════════ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background-color: transparent;
  color: #1a2332;
  line-height: 1.7;
  overflow: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

/* ═══════════════════════════════════════════════════════════════════
   BACKGROUND
   ═══════════════════════════════════════════════════════════════════ */
.ac-background {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  background: #f5f7fa;
}

/* ═══════════════════════════════════════════════════════════════════
   CHAT LAUNCHER
   ═══════════════════════════════════════════════════════════════════ */
.chat-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #e31837;
  border: none;
  cursor: pointer;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(227, 24, 55, 0.4);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
  transform: scale(1);
  opacity: 1;
}

.chat-launcher.launcher-hidden {
  transform: scale(0);
  opacity: 0;
  pointer-events: none;
}

.chat-launcher:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(227, 24, 55, 0.5);
}

  .chat-launcher .launcher-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
}

/* ═══════════════════════════════════════════════════════════════════
   CHAT WIDGET
   ═══════════════════════════════════════════════════════════════════ */
.chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 420px;
  height: 620px;
  max-width: calc(100vw - 48px);
  max-height: calc(100dvh - 48px);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  transform-origin: calc(100% - 30px) calc(100% - 30px);
  transform: scale(1);
  opacity: 1;
  transition: transform 0.35s cubic-bezier(0.25, 0.1, 0.25, 1),
              opacity 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
  will-change: transform, opacity;
}

.chat-widget.widget-collapsed {
  transform: scale(0);
  opacity: 0;
  pointer-events: none;
}

.chat-widget.resizing {
  transition: none;
  user-select: none;
}

.chat-widget.widget-fullscreen {
  bottom: 0;
  right: 0;
  width: 100vw !important;
  height: 100dvh !important;
  max-width: 100vw;
  max-height: 100dvh;
  border-radius: 0;
  box-shadow: none;
}

.chat-widget.widget-fullscreen .messages-area {
  padding: 32px 24px 24px;
}

.chat-widget.widget-fullscreen .chat-messages {
  max-width: 720px;
  margin: 0 auto;
  gap: 20px;
}

.chat-widget.widget-fullscreen .message-text {
  font-size: 16px;
  line-height: 1.6;
}

.chat-widget.widget-fullscreen .message-bubble {
  font-size: 16px;
  padding: 14px 20px;
}

.chat-widget.widget-fullscreen .bottom-input-bar {
  padding: 12px 24px 16px;
}

.chat-widget.widget-fullscreen .input-wrapper {
  max-width: 720px;
  margin: 0 auto;
}

.chat-widget.widget-fullscreen .message-input {
  font-size: 14px;
  padding: 10px 14px;
}

.chat-widget.widget-fullscreen .pin-content {
  max-width: 400px;
  margin: 0 auto;
}

.chat-widget.widget-fullscreen .language-content {
  max-width: 720px;
  margin: 0 auto;
}

.chat-widget.widget-fullscreen .greeting-text {
  font-size: 16px;
  line-height: 1.6;
}

.chat-widget.widget-fullscreen .language-btn {
  font-size: 16px;
  padding: 12px 28px;
}

.chat-widget.widget-fullscreen .bot-avatar-mark {
  width: 40px;
  height: 40px;
}

.chat-widget.widget-fullscreen .avatar-beta {
  font-size: 8px;
}

.chat-widget.widget-fullscreen .ac-nav-bar {
  padding: 0 28px;
}

.chat-widget.widget-fullscreen .widget-subbar {
  padding: 10px 28px;
}

.chat-widget.widget-fullscreen .resize-handle {
  display: none;
}

/* ═══════════════════════════════════════════════════════════════════
   RESIZE HANDLE
   ═══════════════════════════════════════════════════════════════════ */
.resize-handle {
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  cursor: nw-resize;
  z-index: 100;
}


/* ═══════════════════════════════════════════════════════════════════
   WIDGET HEADER
   ═══════════════════════════════════════════════════════════════════ */
.widget-header {
  position: relative;
  flex-shrink: 0;
  z-index: 10;
}

/* --- Top black AC nav bar --- */
.ac-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #000000;
  padding: 0 24px;
  height: 64px;
}

.ac-nav-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ac-nav-hamburger {
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.ac-nav-hamburger:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.ac-nav-logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.ac-nav-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.assistant-nav-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffffff;
  color: #1a2332;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  flex-shrink: 0;
}

.ac-nav-right {
  display: flex;
  align-items: center;
  gap: 0;
}

.ac-nav-item {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: default;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.ac-nav-item:hover {
  opacity: 0.8;
}

.ac-nav-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

.ac-nav-search svg {
  stroke: #ffffff;
}

.ac-nav-flag {
  flex-shrink: 0;
  border-radius: 2px;
  display: block;
}

.ac-nav-currency {
  font-size: 15px;
}

.ac-nav-signin {
  background: #ffffff !important;
  color: #003087 !important;
  border: 2px solid #ffffff;
  border-radius: 20px;
  padding: 8px 22px !important;
  font-weight: 700;
  font-size: 15px;
  margin-left: 8px;
}

/* --- Sub-bar (white): title + controls --- */
.widget-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  padding: 10px 20px;
  border-bottom: 1px solid #e0e0e0;
}

.widget-subbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.widget-logo-circle-small {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #1a2332;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.widget-logo-circle-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.widget-subbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.widget-subbar-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #333333;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background-color 0.2s;
}

.widget-subbar-btn:hover {
  background-color: rgba(0, 0, 0, 0.08);
}

.menu-hint-toast {
  position: absolute;
  top: 8px;
  left: 20px;
  transform: none;
  font-size: 12px;
  font-weight: 500;
  color: #1a2332;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
  pointer-events: none;
  z-index: 50;
  animation: toastFade 3.5s ease-out forwards;
}

@keyframes toastFade {
  0% { opacity: 0; transform: translateY(-4px); }
  10% { opacity: 1; transform: translateY(0); }
  70% { opacity: 1; }
  100% { opacity: 0; }
}

body.dark-theme .menu-hint-toast {
  color: #e0e0e0;
  background: rgba(50, 50, 50, 0.85);
}

.widget-title {
  font-size: 17px;
  font-weight: 800;
  color: #1a2332;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.widget-beta-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: #666666;
  background-color: transparent;
  border: 1px solid #cccccc;
  padding: 2px 8px;
  border-radius: 8px;
  letter-spacing: 0.3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.widget-disclaimer {
  display: none;
}

.widget-control-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #333333;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background-color 0.2s;
  line-height: 1;
}

.widget-control-btn:hover {
  background-color: rgba(0, 0, 0, 0.08);
}

.ctrl-icon {
  width: 16px;
  height: 16px;
}


.theme-icon {
  transition: opacity 0.2s;
}

/* ═══════════════════════════════════════════════════════════════════
   MENU BACKDROP & DROPDOWN
   ═══════════════════════════════════════════════════════════════════ */
.menu-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease-out, visibility 0.2s ease-out;
  z-index: 98;
}

.menu-backdrop.show {
  opacity: 1;
  visibility: visible;
}

.dropdown-menu {
  position: absolute;
  top: 100px;
  left: 12px;
  right: 12px;
  max-width: 320px;
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease-out;
  z-index: 200;
  max-height: calc(100% - 110px);
  overflow-y: auto;
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  color: #1a2332;
  text-decoration: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 13px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

.dropdown-item:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

.dropdown-item:first-child {
  border-radius: 12px 12px 0 0;
}

.dropdown-item:last-child {
  border-radius: 0 0 12px 12px;
}

.dropdown-item.copy-success svg {
  animation: copyPop 0.3s ease-out;
}

@keyframes copyPop {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

.dropdown-item svg {
  flex-shrink: 0;
  stroke: #1a2332;
}

.dropdown-item.dropdown-info {
  cursor: default;
  padding: 8px 18px;
}

.dropdown-item.dropdown-info:hover {
  background-color: transparent;
}

.dropdown-divider {
  height: 1px;
  background-color: rgba(0, 0, 0, 0.08);
  margin: 4px 0;
}

.info-label {
  font-size: 11px;
  color: #666666;
  min-width: 75px;
}

.info-value {
  font-size: 11px;
  color: #1a2332;
  flex: 1;
  text-align: right;
  cursor: text;
  user-select: all;
  transition: opacity 0.2s;
}

.info-value:hover {
  opacity: 0.6;
}

.info-value-mono {
  font-size: 11px;
  user-select: all;
  cursor: text;
  word-break: break-all;
  color: #1a2332;
  font-family: 'Courier New', monospace;
}

.menu-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  background-color: #e31837;
  color: #ffffff;
  border-radius: 4px;
  margin-left: auto;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════════════ */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════════
   PIN AUTHENTICATION SCREEN
   ═══════════════════════════════════════════════════════════════════ */
.pin-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 20px 16px;
  background-color: #ffffff;
  animation: fadeIn 0.6s ease-out;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.pin-content {
  width: 100%;
  max-width: 320px;
  text-align: center;
}

.pin-prompt {
  font-size: 15px;
  font-weight: 500;
  color: #333333;
  margin-bottom: 20px;
}

.pin-input {
  display: block;
  width: 100%;
  max-width: 200px;
  margin: 0 auto 16px;
  padding: 12px 16px;
  font-size: 24px;
  font-family: 'Courier New', monospace;
  letter-spacing: 8px;
  text-align: center;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  outline: none;
  background-color: #ffffff;
  color: #1a2332;
  transition: border-color 0.2s ease-out, box-shadow 0.2s ease-out;
  -webkit-appearance: none;
  appearance: none;
}

.pin-input:focus {
  border-color: #e31837;
  box-shadow: 0 0 0 1px rgba(227, 24, 55, 0.15);
}

.pin-input::placeholder {
  color: #cccccc;
  letter-spacing: 8px;
}

.pin-submit-btn {
  display: block;
  width: 100%;
  max-width: 200px;
  margin: 0 auto;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  background-color: #e31837;
  border: 2px solid #e31837;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease-out;
  min-height: 40px;
  touch-action: manipulation;
}

.pin-submit-btn:hover {
  background-color: #c91430;
  border-color: #c91430;
  transform: scale(1.02);
}

.pin-error {
  font-size: 13px;
  color: #e31837;
  margin-top: 14px;
  animation: shake 0.4s ease-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

.status-splash {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 12px 16px;
  background-color: #ffffff;
  animation: splashFadeIn 0.4s ease-out;
  overflow: hidden;
}

.status-splash-content {
  width: 100%;
  max-width: 480px;
}

.status-splash .welcome-logo-container {
  margin-bottom: 10px;
}

.status-splash .welcome-logo {
  height: 32px;
}

.status-splash .welcome-mark {
  width: 42px;
  height: 42px;
  font-size: 14px;
}

.status-notice {
  font-size: 13px;
  line-height: 1.5;
  color: #333333;
  margin-bottom: 10px;
}

.status-notice-small {
  font-size: 13px;
  line-height: 1.4;
  color: #333333;
  margin-bottom: 8px;
}

.status-group {
  margin-bottom: 10px;
}

.status-group-label {
  font-size: 13px;
  font-weight: 600;
  color: #333333;
  margin-bottom: 4px;
  line-height: 1.4;
}

.status-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.status-item {
  padding: 2px 0 2px 8px;
  font-size: 13px;
  position: relative;
}

.status-item::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  margin-right: 8px;
  position: relative;
  top: -1px;
}

.status-done {
  color: #333333;
}

.status-done::before {
  background-color: #16a34a;
}

.status-wip {
  color: #333333;
}

.status-wip::before {
  background-color: #cccccc;
}

.status-continue-btn {
  display: block;
  width: 100%;
  max-width: 180px;
  margin: 12px auto 0;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
  background-color: #e31837;
  border: 2px solid #e31837;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease-out;
  touch-action: manipulation;
}

.status-continue-btn:hover {
  background-color: #c91430;
  border-color: #c91430;
  transform: scale(1.02);
}

@keyframes splashFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

/* ═══════════════════════════════════════════════════════════════════
   LANGUAGE SELECTION SCREEN
   ═══════════════════════════════════════════════════════════════════ */
.language-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 20px 16px;
  background-color: #ffffff;
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.language-content {
  width: 100%;
  text-align: center;
}

.welcome-logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
  animation: fadeIn 0.6s ease-out 0.1s backwards;
}

.welcome-logo {
  height: 50px;
  width: auto;
  display: block;
}

.welcome-mark {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #1a2332;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
}

.greeting-text {
  font-size: 13px;
  line-height: 1.5;
  color: #333333;
  margin-bottom: 12px;
  padding: 0 8px;
  animation: fadeIn 0.6s ease-out 0.2s backwards;
}

.greeting-divider {
  margin-top: 16px;
  margin-bottom: 12px;
  animation: fadeIn 0.6s ease-out 0.3s backwards;
}

.language-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
  animation: fadeIn 0.6s ease-out 0.4s backwards;
}

.language-btn {
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease-out;
  border: 2px solid;
  min-width: 120px;
  min-height: 40px;
  touch-action: manipulation;
}

.language-btn-primary {
  color: #ffffff;
  background-color: #e31837;
  border-color: #e31837;
}

.language-btn-primary:hover {
  background-color: #c91430;
  border-color: #c91430;
  transform: scale(1.02);
}

.language-btn-secondary {
  color: #ffffff;
  background-color: #666666;
  border-color: #666666;
}

.language-btn-secondary:hover {
  background-color: #555555;
  border-color: #555555;
  transform: scale(1.02);
}

/* ═══════════════════════════════════════════════════════════════════
   HTTP SETUP SCREEN — radio-card platform picker
   ═══════════════════════════════════════════════════════════════════ */
.http-setup {
  max-width: 440px;
  width: 100%;
  text-align: center;
  padding: 24px;
  box-sizing: border-box;
}

.http-setup .http-setup-title {
  font-size: 22px;
  font-weight: 600;
  margin: 8px 0 4px;
  color: #1a1a1a;
  letter-spacing: -0.01em;
}

.http-setup .http-setup-subtitle {
  font-size: 13px;
  color: #6b7280;
  margin: 0 0 20px;
  line-height: 1.45;
}

.http-setup .http-setup-options {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px;
  margin: 0 0 20px 0;
  padding: 0;
  text-align: left;
  width: 100%;
}

.http-setup .http-setup-card {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

.http-setup .http-setup-card:hover {
  border-color: #d1d5db;
  background: #fafafa;
}

.http-setup .http-setup-card:active {
  transform: scale(0.995);
}

.http-setup .http-setup-card input[type="radio"] {
  margin: 3px 0 0 0;
  accent-color: #e31837;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
}

.http-setup .http-setup-card.selected {
  border-color: #e31837;
  background: linear-gradient(180deg, #fff5f7 0%, #fff 100%);
  box-shadow: 0 0 0 3px rgba(227, 24, 55, 0.10), 0 1px 2px rgba(17, 24, 39, 0.04);
}

.http-setup .http-setup-card-body {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px;
  line-height: 1.35;
  flex: 1;
  min-width: 0;
}

.http-setup .http-setup-card-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
}

.http-setup .http-setup-card-desc {
  display: block;
  font-size: 12.5px;
  color: #6b7280;
  font-weight: 400;
}

.http-setup .http-setup-start {
  width: 100%;
  max-width: 440px;
  margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════════════
   CHAT SCREEN & MESSAGES
   ═══════════════════════════════════════════════════════════════════ */
.chat-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.messages-area {
  flex: 1;
  overflow-y: auto;
  padding: 24px 16px 16px;
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  -webkit-overflow-scrolling: touch;
}

.chat-messages {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ═══════════════════════════════════════════════════════════════════
   MESSAGE BUBBLES
   ═══════════════════════════════════════════════════════════════════ */
.message {
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: fadeIn 0.3s ease-in;
}

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

.message-assistant {
  align-items: flex-start;
  flex-direction: row;
  gap: 10px;
}

.message-bubble {
  padding: 12px 16px;
  border-radius: 12px;
  max-width: 85%;
  word-wrap: break-word;
  font-size: 13px;
  line-height: 1.6;
}

.message-user .message-bubble {
  background-color: #ECECEC;
  color: #1a2332;
  border: none;
  border-radius: 12px;
}

/* Bot Avatar */
.bot-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  padding-top: 2px;
}

.bot-avatar-mark {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1a2332;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.avatar-beta {
  font-size: 7px;
  font-weight: 700;
  color: #e31837;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Assistant message content (no card, transparent) */
.message-assistant .message-content {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  max-width: 100%;
  flex: 1;
  min-width: 0;
}

.message-text {
  color: #1a2332;
  line-height: 1.7;
  font-size: 13px;
}

.message-text p {
  margin: 8px 0;
}

.message-text h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 12px 0 6px 0;
  color: #1a2332;
}

.message-text ul, .message-text ol {
  margin: 8px 0;
  padding-left: 20px;
}

.message-text li {
  margin: 4px 0;
}

.message-text strong {
  font-weight: 600;
  color: #1a2332;
}

.message-text a {
  color: #e31837;
  text-decoration: none;
}

.message-text a:hover {
  text-decoration: underline;
}

.warning-text {
  font-size: 12px;
  color: #9ca3af;
  font-style: italic;
  margin-bottom: 12px;
  padding: 6px 10px;
  background-color: #fef3f2;
  border-left: 3px solid #f97316;
  border-radius: 4px;
}

/* ═══════════════════════════════════════════════════════════════════
   SOURCES & CITATIONS
   ═══════════════════════════════════════════════════════════════════ */
.message-sources {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e0e0e0;
}

.source-label {
  font-weight: 600;
  color: #666666;
  font-size: inherit;
  margin-bottom: 6px;
  display: block;
}

.source-list {
  margin: 6px 0 0 0;
  padding-left: 0;
  list-style: none;
  counter-reset: source-counter;
}

.source-list li {
  margin: 4px 0;
  padding-left: 0;
  line-height: 1.5;
  color: #374151;
  font-size: inherit;
  counter-increment: source-counter;
  display: flex;
  align-items: baseline;
  gap: 6px;
  scroll-margin-top: 60px;
}

.source-list li::before {
  content: "[" counter(source-counter) "]";
  color: #e31837;
  font-weight: 600;
  font-size: inherit;
  flex-shrink: 0;
  min-width: 24px;
  text-align: right;
}

.source-link {
  color: #e31837;
  text-decoration: none;
  transition: color 0.2s;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

.source-link:hover {
  color: #b71c2f;
  text-decoration: underline;
}

.source-text {
  color: #374151;
  font-size: inherit;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

.citation-link {
  color: #e31837;
  text-decoration: none;
  font-size: 11px;
  vertical-align: super;
  line-height: 0;
  padding: 0 1px;
  transition: all 0.2s;
}

.citation-link:hover {
  color: #b71c2f;
  text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════════
   LOADING / THINKING INDICATOR
   ═══════════════════════════════════════════════════════════════════ */
.thinking-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding-top: 2px;
}


.thinking-dots {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px 0;
  /* animation: dotsSpin 7s infinite ease-in-out; */
}

.thinking-dots span {
  position: relative;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: #e31837;
  animation: typingDot 1.4s infinite ease-in-out;
}

.thinking-dots span:nth-child(1) { animation-delay: 0s; }
.thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.4s; }

/* Triangle + spin animation (uncomment above and below to enable)
.thinking-dots span:nth-child(1) {
  animation: typingDot 1.4s infinite ease-in-out, triDot1 7s infinite ease-in-out;
}
.thinking-dots span:nth-child(2) {
  animation: typingDot 1.4s infinite ease-in-out, triDot2 7s infinite ease-in-out;
  animation-delay: 0.2s, 0s;
}
.thinking-dots span:nth-child(3) {
  animation: typingDot 1.4s infinite ease-in-out, triDot3 7s infinite ease-in-out;
  animation-delay: 0.4s, 0s;
}
*/

@keyframes typingDot {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

@keyframes triDot1 {
  0%, 78% { top: 0; }
  82%, 94% { top: 4.6px; }
  98%, 100% { top: 0; }
}

@keyframes triDot2 {
  0%, 78% { top: 0; }
  82%, 94% { top: -9.2px; }
  98%, 100% { top: 0; }
}

@keyframes triDot3 {
  0%, 78% { top: 0; }
  82%, 94% { top: 4.6px; }
  98%, 100% { top: 0; }
}

@keyframes dotsSpin {
  0%, 82% { transform: rotate(0deg); }
  94% { transform: rotate(-360deg); }
  100% { transform: rotate(-360deg); }
}

/* ═══════════════════════════════════════════════════════════════════
   BOTTOM INPUT BAR
   ═══════════════════════════════════════════════════════════════════ */
.bottom-input-bar {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background-color: #ffffff;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  flex-shrink: 0;
  z-index: 10;
}

.input-wrapper {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  position: relative;
}

.message-input {
  flex: 1;
  padding: 10px 14px;
  font-size: 13px;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  resize: none;
  overflow-y: hidden;
  min-height: 38px;
  max-height: 150px;
  font-family: inherit;
  line-height: 1.4;
  outline: none;
  transition: border-color 0.2s ease-out, box-shadow 0.2s ease-out, background-color 0.2s ease-out;
  background-color: #ffffff;
  color: #1a2332;
  -webkit-appearance: none;
  appearance: none;
}

.message-input:focus {
  border-color: #e31837;
  background-color: rgba(227, 24, 55, 0.03);
  box-shadow: 0 0 0 1px rgba(227, 24, 55, 0.15);
}

.message-input::placeholder {
  color: #aaaaaa;
}

.send-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background-color: #e31837;
  border: 2px solid #e31837;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease-out;
  flex-shrink: 0;
}

.send-btn svg {
  stroke: #ffffff;
  transition: stroke 0.2s ease-out;
}

.send-btn:hover:not(:disabled) {
  background-color: #c91430;
  border-color: #c91430;
  transform: scale(1.02);
}

.send-btn:disabled {
  background-color: #e0e0e0;
  border-color: #e0e0e0;
  cursor: not-allowed;
}

.send-btn:disabled svg {
  stroke: #cccccc;
}

/* ═══════════════════════════════════════════════════════════════════
   QUICK ACTION PROMPTS
   ═══════════════════════════════════════════════════════════════════ */
.quick-actions {
  padding: 12px 16px 0 16px;
  animation: slideUpFade 0.4s ease-out;
}

@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.quick-actions-container {
  margin: 0 auto;
}

.quick-actions-label {
  font-size: 11px;
  color: #888888;
  margin-bottom: 8px;
  font-weight: 500;
  text-align: left;
}

.quick-actions-grid {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.quick-action-chip {
  padding: 6px 12px;
  background-color: transparent;
  border: 1.5px solid #e0e0e0;
  border-radius: 16px;
  color: #333333;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease-out;
  white-space: nowrap;
}

.quick-action-chip:hover {
  background-color: rgba(227, 24, 55, 0.05);
  border-color: #e31837;
  color: #e31837;
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════════
   FEEDBACK BUTTONS
   ═══════════════════════════════════════════════════════════════════ */
.feedback-buttons {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
}

.feedback-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feedback-btn:hover {
  background-color: #f3f4f6;
}

.feedback-btn svg {
  width: 16px;
  height: 16px;
  fill: #9ca3af;
}

.feedback-btn:hover svg {
  fill: #6b7280;
}

/* ═══════════════════════════════════════════════════════════════════
   FLIGHT DISRUPTION WORKFLOW STYLES
   ═══════════════════════════════════════════════════════════════════ */
.workflow-title {
  font-size: 15px;
  font-weight: 600;
  color: #1a2332;
  margin: 0 0 8px 0;
  padding: 0;
}

.workflow-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.workflow-option-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 12px 14px;
  background-color: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease-out;
  text-align: left;
  width: 100%;
}

.workflow-option-btn:hover:not(:disabled) {
  background-color: rgba(227, 24, 55, 0.08);
  border-color: #e31837;
  transform: translateX(3px);
}

.workflow-option-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.workflow-option-btn .option-label {
  font-size: 13px;
  font-weight: 500;
  color: #1a2332;
}

.workflow-option-btn .option-description {
  font-size: 11px;
  color: #666666;
}

.workflow-step-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background-color: rgba(227, 24, 55, 0.1);
  border-radius: 10px;
  font-size: 10px;
  font-weight: 500;
  color: #e31837;
  margin-bottom: 8px;
}

.workflow-step-badge svg {
  width: 10px;
  height: 10px;
  stroke: currentColor;
}

/* Multi-select workflow options (checkboxes) */
.workflow-options-multi {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.workflow-checkbox-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background-color: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease-out;
  width: 100%;
}

.workflow-checkbox-option:hover {
  background-color: rgba(227, 24, 55, 0.08);
  border-color: #e31837;
}

.workflow-checkbox-option.selected {
  background-color: rgba(227, 24, 55, 0.1);
  border-color: #e31837;
}

.workflow-checkbox {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #e31837;
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.checkbox-content .option-label {
  font-size: 13px;
  font-weight: 500;
  color: #1a2332;
}

.checkbox-content .option-description {
  font-size: 11px;
  color: #666666;
}

.workflow-submit-btn {
  margin-top: 12px;
  padding: 10px 20px;
  background-color: #e31837;
  border: none;
  border-radius: 10px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease-out;
  width: 100%;
}

.workflow-submit-btn:hover:not(:disabled) {
  background-color: #c91430;
  transform: scale(1.01);
}

.workflow-submit-btn:disabled {
  background-color: #e0e0e0;
  color: #999999;
  cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════════════
   DEBUG PANEL (inside widget)
   ═══════════════════════════════════════════════════════════════════ */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 18px;
  margin-left: auto;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cccccc;
  transition: 0.3s;
  border-radius: 18px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: #e31837;
}

input:checked + .toggle-slider:before {
  transform: translateX(18px);
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.debug-panel {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  background-color: #ffffff;
  border-right: 1px solid #e0e0e0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  animation: slideInLeft 0.3s ease-out;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.debug-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #e0e0e0;
  background-color: #f5f5f5;
}

.debug-panel-title {
  font-size: 13px;
  font-weight: 600;
  color: #e31837;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.debug-panel-close {
  background: none;
  border: none;
  color: #999999;
  font-size: 22px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}

.debug-panel-close:hover {
  color: #e31837;
}

.debug-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.debug-section {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e0e0e0;
}

.debug-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.debug-section-title {
  font-size: 10px;
  font-weight: 600;
  color: #e31837;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.debug-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
  font-size: 11px;
}

.debug-label {
  color: #666666;
  flex-shrink: 0;
  margin-right: 6px;
}

.debug-value {
  color: #333333;
  text-align: right;
  word-break: break-all;
}

.debug-value-mono {
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-size: 10px;
  background-color: #f0f0f0;
  padding: 2px 4px;
  border-radius: 3px;
}

.debug-value.active { color: #22c55e; }
.debug-value.inactive { color: #666666; }
.debug-value.processing { color: #f59e0b; }

.debug-event-log {
  max-height: 160px;
  overflow-y: auto;
  background-color: #f5f5f5;
  border-radius: 6px;
  padding: 6px;
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-size: 9px;
}

.debug-event {
  padding: 3px 0;
  border-bottom: 1px solid #e0e0e0;
  color: #888888;
}

.debug-event:last-child { border-bottom: none; }
.debug-event.event-status { color: #6b7280; }
.debug-event.event-delta { color: #10b981; }
.debug-event.event-tool { color: #f59e0b; }
.debug-event.event-error { color: #ef4444; }
.debug-event.event-workflow { color: #8b5cf6; }
.debug-event.event-user { color: #f43f5e; }
.debug-event-time { color: #999999; margin-right: 4px; }

/* ═══════════════════════════════════════════════════════════════════
   DARK THEME
   ═══════════════════════════════════════════════════════════════════ */
body.dark-theme .chat-widget {
  background-color: #1a1a1a;
}

body.dark-theme .ac-nav-bar {
  background: #0a0a0a;
}

body.dark-theme .widget-subbar {
  background: #1a1a1a;
  border-bottom-color: #333333;
}

body.dark-theme .widget-title {
  color: #e0e0e0;
}

body.dark-theme .widget-beta-badge {
  color: #999999;
  border-color: #555555;
}

body.dark-theme .widget-subbar-btn {
  color: #e0e0e0;
}

body.dark-theme .widget-subbar-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .widget-control-btn {
  color: #e0e0e0;
}

body.dark-theme .widget-control-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .widget-logo-circle-small {
  background: #e0e0e0;
  color: #1a1a1a;
}

body.dark-theme .menu-backdrop {
  background-color: rgba(0, 0, 0, 0.5);
}

body.dark-theme .dropdown-menu {
  background-color: #2a2a2a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

body.dark-theme .dropdown-item {
  color: #e0e0e0;
}

body.dark-theme .dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

body.dark-theme .dropdown-item svg {
  stroke: #e0e0e0;
}

body.dark-theme .dropdown-divider {
  background-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .info-label {
  color: #999999;
}

body.dark-theme .info-value {
  color: #e0e0e0;
}

body.dark-theme .info-value-mono {
  color: #e0e0e0;
}

body.dark-theme .pin-screen {
  background-color: #1a1a1a;
}

body.dark-theme .pin-prompt {
  color: #e0e0e0;
}

body.dark-theme .pin-input {
  background-color: transparent;
  color: #e0e0e0;
  border-color: #333333;
}

body.dark-theme .pin-input:focus {
  border-color: #e31837;
  box-shadow: 0 0 0 1px rgba(227, 24, 55, 0.2);
}

body.dark-theme .pin-input::placeholder {
  color: #555555;
}

body.dark-theme .status-splash {
  background-color: #1a1a1a;
}

body.dark-theme .status-notice {
  color: #aaaaaa;
}

body.dark-theme .status-notice-small {
  color: #888888;
}

body.dark-theme .status-group-label {
  color: #e0e0e0;
}

body.dark-theme .status-done {
  color: #e0e0e0;
}

body.dark-theme .status-wip {
  color: #666666;
}

body.dark-theme .status-wip::before {
  background-color: #555555;
}

body.dark-theme .language-screen {
  background-color: #1a1a1a;
}

body.dark-theme .greeting-text {
  color: #e0e0e0;
}

body.dark-theme .messages-area {
  background-color: #1a1a1a;
}

body.dark-theme .message-user .message-bubble {
  background-color: #333333;
  color: #e0e0e0;
}

body.dark-theme .message-text {
  color: #e0e0e0;
}


body.dark-theme .message-text h3 {
  color: #e0e0e0;
}

body.dark-theme .message-text strong {
  color: #e0e0e0;
}

body.dark-theme .message-sources {
  border-top-color: #333333;
}

body.dark-theme .source-label {
  color: #999999;
}

body.dark-theme .source-text {
  color: #cccccc;
}

body.dark-theme .source-list li {
  color: #cccccc;
}

body.dark-theme .bottom-input-bar {
  background-color: #1a1a1a;
  border-top-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .message-input {
  background-color: transparent;
  color: #e0e0e0;
  border-color: #333333;
}

body.dark-theme .message-input:focus {
  border-color: #e31837;
  background-color: rgba(227, 24, 55, 0.05);
  box-shadow: 0 0 0 1px rgba(227, 24, 55, 0.2);
}

body.dark-theme .message-input::placeholder {
  color: #888888;
}

body.dark-theme .send-btn:disabled {
  background-color: #333333;
  border-color: #333333;
}

body.dark-theme .send-btn:disabled svg {
  stroke: #666666;
}

body.dark-theme .quick-action-chip {
  border-color: #333333;
  color: #e0e0e0;
}

body.dark-theme .quick-action-chip:hover {
  background-color: rgba(227, 24, 55, 0.1);
  border-color: #e31837;
  color: #e31837;
}

body.dark-theme .workflow-title {
  color: #e0e0e0;
}

body.dark-theme .workflow-option-btn {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

body.dark-theme .workflow-option-btn:hover:not(:disabled) {
  background-color: rgba(227, 24, 55, 0.1);
  border-color: #e31837;
}

body.dark-theme .workflow-option-btn .option-label {
  color: #e0e0e0;
}

body.dark-theme .workflow-option-btn .option-description {
  color: #999999;
}

body.dark-theme .workflow-checkbox-option {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

body.dark-theme .workflow-checkbox-option:hover {
  background-color: rgba(227, 24, 55, 0.1);
  border-color: #e31837;
}

body.dark-theme .workflow-checkbox-option.selected {
  background-color: rgba(227, 24, 55, 0.15);
  border-color: #e31837;
}

body.dark-theme .checkbox-content .option-label {
  color: #e0e0e0;
}

body.dark-theme .checkbox-content .option-description {
  color: #999999;
}

body.dark-theme .workflow-submit-btn:disabled {
  background-color: #333333;
  color: #666666;
}

body.dark-theme .warning-text {
  background-color: rgba(254, 243, 242, 0.1);
  color: #cccccc;
}

/* Dark theme debug panel */
body.dark-theme .debug-panel {
  background-color: #1a1a1a;
  border-right-color: #333333;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
}

body.dark-theme .debug-panel-header {
  background-color: #0f0f0f;
  border-bottom-color: #333333;
}

body.dark-theme .debug-section {
  border-bottom-color: #262626;
}

body.dark-theme .debug-label {
  color: #888888;
}

body.dark-theme .debug-value {
  color: #e0e0e0;
}

body.dark-theme .debug-value-mono {
  background-color: #262626;
}

body.dark-theme .debug-event-log {
  background-color: #0f0f0f;
}

body.dark-theme .debug-event {
  border-bottom-color: #1a1a1a;
}

body.dark-theme .toggle-slider {
  background-color: #333333;
}

body.dark-theme .toggle-slider:before {
  background-color: #999999;
}

body.dark-theme .feedback-btn:hover {
  background-color: rgba(255, 255, 255, 0.05);
}


body.dark-theme .avatar-beta {
  color: #e31837;
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE - MOBILE FULL SCREEN
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .chat-widget {
    bottom: 0;
    right: 0;
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }

  .resize-handle {
    display: none;
  }

  .chat-launcher {
    bottom: 16px;
    right: 16px;
    width: 52px;
    height: 52px;
  }

.chat-launcher .launcher-icon {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }

  .ac-nav-bar {
    padding: 0 12px;
    height: 46px;
  }

  .ac-nav-right {
    gap: 0;
  }

  /* Hide less important nav items on small screens */
  .ac-nav-search span,
  .ac-nav-lang span,
  .ac-nav-currency,
  .ac-nav-join,
  .ac-nav-divider:nth-of-type(n+2) {
    display: none;
  }

  .ac-nav-item {
    padding: 6px 8px;
    font-size: 12px;
  }

  .ac-nav-signin {
    padding: 5px 14px !important;
    font-size: 12px;
  }

  .widget-subbar {
    padding: 8px 12px;
  }

  .widget-title {
    font-size: 14px;
  }

  .widget-beta-badge {
    font-size: 9px;
    padding: 1px 6px;
  }

  .pin-input {
    font-size: 20px;
    max-width: 180px;
  }

  .pin-submit-btn {
    max-width: 180px;
    font-size: 14px;
  }

  .welcome-logo {
    height: 40px;
  }

  .welcome-logo-container {
    margin-bottom: 16px;
  }

  .greeting-text,
  .chat-widget.widget-fullscreen .greeting-text {
    font-size: 12px;
    padding: 0 4px;
    margin-bottom: 8px;
  }

  .language-buttons {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
  }

  .language-btn,
  .chat-widget.widget-fullscreen .language-btn {
    width: 100%;
    max-width: 240px;
    padding: 10px 20px;
    font-size: 14px;
  }

  .messages-area,
  .chat-widget.widget-fullscreen .messages-area {
    padding: 12px 10px;
  }

  .chat-widget.widget-fullscreen .chat-messages {
    max-width: none;
  }

  .message-bubble,
  .chat-widget.widget-fullscreen .message-bubble {
    max-width: 90%;
    padding: 10px 12px;
    font-size: 13px;
  }

  .message-text,
  .chat-widget.widget-fullscreen .message-text {
    font-size: 13px;
  }

  .bottom-input-bar,
  .chat-widget.widget-fullscreen .bottom-input-bar {
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .chat-widget.widget-fullscreen .input-wrapper {
    max-width: none;
  }

  .message-input,
  .chat-widget.widget-fullscreen .message-input {
    padding: 10px 12px;
    font-size: 16px; /* Prevent iOS zoom */
  }

  .send-btn {
    width: 36px;
    height: 36px;
  }

  .bot-avatar-mark,
  .chat-widget.widget-fullscreen .bot-avatar-mark {
    width: 28px;
    height: 28px;
    font-size: 10px;
  }

  .chat-widget.widget-fullscreen .avatar-beta {
    font-size: 7px;
  }

  .chat-widget.widget-fullscreen .language-content {
    max-width: none;
  }

  .dropdown-menu {
    top: 94px;
    left: 8px;
    right: 8px;
    max-width: none;
  }
}

/* Landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .language-screen {
    padding: 12px;
  }

  .welcome-logo-container {
    margin-bottom: 12px;
  }

  .welcome-logo {
    height: 36px;
  }

  .greeting-text {
    font-size: 12px;
    margin-bottom: 8px;
  }

  .language-buttons {
    flex-direction: row;
    margin-top: 12px;
  }

  .language-btn {
    min-width: 100px;
  }
}

/* Tablet - slightly larger widget */
@media (min-width: 481px) and (max-width: 768px) {
  .chat-widget {
    width: 400px;
    height: 580px;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════════ */
.hidden {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════════════
   CMP MODE — Platform Select & Widget Styles
   ═══════════════════════════════════════════════════════════════════ */

.cmp-platform-select {
  margin-left: auto;
  padding: 2px 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 12px;
  background: #fff;
  color: #333;
  cursor: pointer;
}

/* Quick Replies */
.cmp-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.cmp-quick-reply-btn {
  padding: 6px 14px;
  border: 1.5px solid #e31837;
  border-radius: 20px;
  background: transparent;
  color: #e31837;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cmp-quick-reply-btn:hover:not(:disabled) {
  background: #e31837;
  color: #fff;
}

.cmp-quick-reply-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.cmp-btn-selected {
  background: #e31837 !important;
  color: #fff !important;
}

/* Single Select */
.cmp-single-select {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.cmp-select-btn {
  padding: 10px 14px;
  border: 1.5px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  color: #1a2332;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cmp-select-btn:hover:not(:disabled) {
  border-color: #e31837;
  background: #fef2f4;
}

.cmp-select-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* Multi Select */
.cmp-multi-select {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.cmp-multi-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1.5px solid #d0d5dd;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  transition: border-color 0.15s;
}

.cmp-multi-option:hover {
  border-color: #e31837;
}

.cmp-multi-cb {
  accent-color: #e31837;
}

/* Chips */
.cmp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.cmp-chip {
  padding: 6px 14px;
  border: 1.5px solid #d0d5dd;
  border-radius: 20px;
  background: #fff;
  color: #1a2332;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cmp-chip:hover:not(:disabled) {
  border-color: #e31837;
}

.cmp-chip-selected {
  background: #e31837;
  color: #fff;
  border-color: #e31837;
}

.cmp-chip:disabled {
  opacity: 0.5;
  cursor: default;
}

/* Submit Button (multi-select, chips, qty picker) */
.cmp-submit-btn {
  margin-top: 10px;
  padding: 8px 20px;
  border: none;
  border-radius: 8px;
  background: #e31837;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.cmp-submit-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.cmp-submit-btn:hover:not(:disabled) {
  opacity: 0.9;
}

/* CTA link-as-button (e.g. IDV verification link) — primary action style,
   rendered as an <a> so the browser handles the URL navigation natively.
   Re-enable when ARC implements the CTA_LINK widget on the production CMP renderer. */
/*
.cmp-link-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 20px;
  border: none;
  border-radius: 8px;
  background: #e31837;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s;
}

.cmp-link-btn:hover {
  opacity: 0.9;
}
*/

/* Document Upload */
.cmp-document-upload {
  margin-top: 8px;
}

/* GLOB-17 in-language case-submission form widget (textarea + Submit). */
.cmp-case-submission-form {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cmp-case-form-description {
  width: 100%;
  min-height: 88px;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  resize: vertical;
  box-sizing: border-box;
}

.cmp-case-form-description:focus {
  outline: none;
  border-color: #e31837;
}

.cmp-case-form-description:disabled {
  background: #f4f4f4;
  cursor: not-allowed;
}

.cmp-case-form-submit-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.cmp-upload-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 8px 20px;
  border: 2px dashed #ccc;
  border-radius: 8px;
  background: #f9f9f9;
  color: #333;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.cmp-upload-btn:hover {
  border-color: #e31837;
  background: #fff;
}

.cmp-upload-files {
  margin-top: 6px;
  font-size: 12px;
  color: #666;
}

.cmp-upload-file {
  padding: 2px 0;
}

/* Multi-file DOCUMENT_UPLOAD widget (v2) */
.cmp-doc-upload-v2 {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cmp-doc-upload-v2 .cmp-upload-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px 16px;
  border: 2px dashed #c9d1dc;
  border-radius: 10px;
  color: #687588;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.cmp-doc-upload-v2 .cmp-upload-dropzone:hover,
.cmp-doc-upload-v2 .cmp-upload-dropzone:focus-visible,
.cmp-doc-upload-v2 .cmp-upload-dropzone-active {
  border-color: #e31837;
  background: #fff5f6;
  color: #1a2332;
  outline: none;
}

.cmp-doc-upload-v2 .cmp-upload-dropzone-icon {
  color: #687588;
}

.cmp-doc-upload-v2 .cmp-upload-dropzone:hover .cmp-upload-dropzone-icon,
.cmp-doc-upload-v2 .cmp-upload-dropzone-active .cmp-upload-dropzone-icon {
  color: #e31837;
}

.cmp-doc-upload-v2 .cmp-upload-dropzone-text {
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  line-height: 1.4;
}

.cmp-doc-upload-v2 .cmp-upload-files {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  font-size: 13px;
  color: #1a2332;
}

.cmp-doc-upload-v2 .cmp-upload-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #f7f8fa;
  border: 1px solid #e6e9ee;
  border-radius: 6px;
}

.cmp-doc-upload-v2 .cmp-upload-filename {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cmp-doc-upload-v2 .cmp-upload-remove {
  background: transparent;
  border: none;
  color: #687588;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.cmp-doc-upload-v2 .cmp-upload-remove:hover {
  color: #e31837;
}

.cmp-doc-upload-v2 .cmp-upload-btn-primary,
.cmp-doc-upload-v2 .cmp-upload-btn-secondary {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 11px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: opacity 0.15s, background 0.15s, border-color 0.15s;
}

.cmp-doc-upload-v2 .cmp-upload-btn-primary {
  background: #e31837;
  color: #fff;
}

.cmp-doc-upload-v2 .cmp-upload-btn-primary:hover:not(:disabled) {
  background: #c4142f;
}

.cmp-doc-upload-v2 .cmp-upload-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cmp-doc-upload-v2 .cmp-upload-btn-secondary {
  background: #fff;
  color: #e31837;
  border-color: #e31837;
}

.cmp-doc-upload-v2 .cmp-upload-btn-secondary:hover:not(:disabled) {
  background: #fff5f6;
}

.cmp-doc-upload-v2.cmp-doc-upload-submitted {
  opacity: 0.7;
  pointer-events: none;
}

/* Quantity Picker */
.cmp-qty-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.cmp-qty-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border: 1.5px solid #d0d5dd;
  border-radius: 8px;
}

.cmp-qty-label {
  font-size: 13px;
  font-weight: 500;
}

.cmp-qty-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cmp-qty-minus,
.cmp-qty-plus {
  width: 28px;
  height: 28px;
  border: 1.5px solid #d0d5dd;
  border-radius: 50%;
  background: #fff;
  color: #1a2332;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.cmp-qty-minus:hover,
.cmp-qty-plus:hover {
  border-color: #e31837;
  color: #e31837;
}

.cmp-qty-value {
  font-size: 14px;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

/* Info Banners */
.cmp-info {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
}

.cmp-info-important {
  background: #fff8e1;
  border-left: 4px solid #f9a825;
  color: #5d4037;
}

.cmp-info-error {
  background: #fdecea;
  border-left: 4px solid #d32f2f;
  color: #611a15;
}

.cmp-info-success {
  background: #e8f5e9;
  border-left: 4px solid #2e7d32;
  color: #1b5e20;
}

.cmp-info-warning {
  background: #fff3e0;
  border-left: 4px solid #ef6c00;
  color: #e65100;
}

.cmp-info-low {
  background: #f5f5f5;
  border-left: 4px solid #9e9e9e;
  color: #616161;
}

/* CTA Link bubble — plain bubble (no alert chrome) carrying body copy +
   primary-action button. Used for action prompts like IDV verification.
   Font sizing tracks .message-text (narrow: 13px, fullscreen: 16px below).
   Re-enable when ARC implements the CTA_LINK widget on the production CMP renderer. */
/*
.cmp-cta-link {
  padding: 10px 14px;
  color: #1a2332;
  font-size: 13px;
  line-height: 1.7;
}

.chat-widget.widget-fullscreen .cmp-cta-link {
  font-size: 16px;
  line-height: 1.6;
}
*/

/* RECEIPT_UPLOAD_ERROR — toast-style banner. Title (filename) on top with a
 * close X; warning icon + body message below. Per the W-13 widget catalog
 * entry (display-only per-file upload error). */
.cmp-upload-error {
  display: inline-block;
  min-width: 220px;
  max-width: 360px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.4;
}
.cmp-upload-error-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.cmp-upload-error-title {
  font-weight: 600;
  color: #212121;
}
.cmp-upload-error-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #616161;
  font-size: 16px;
  line-height: 1;
  padding: 0 0 0 8px;
}
.cmp-upload-error-close:hover {
  color: #212121;
}
.cmp-upload-error-body {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: #d32f2f;
}
.cmp-upload-error-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── CMP FLIGHT_SAME_PNR (W-17) flight cards ───────────────
   Dev-only renderer used while production CMP UI is in flight.
   Sleek rectangular card per journey: route + date / timeline /
   flight numbers + stops + fare brand. Single-pick — clicking
   a card emits same_pnr_select with { id, date, ori, dest, ... }. */
.cmp-flight-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.cmp-flight-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
  font-family: inherit;
  font-size: 13px;
  color: #212121;
  width: 100%;
  max-width: 360px;
}

.cmp-flight-card:hover:not(:disabled) {
  border-color: #c00;
  box-shadow: 0 2px 8px rgba(204, 0, 0, 0.08);
  transform: translateY(-1px);
}

.cmp-flight-card:disabled {
  cursor: default;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.cmp-flight-card.cmp-btn-selected {
  border-color: #c00;
  box-shadow: 0 0 0 2px rgba(204, 0, 0, 0.18);
}

.cmp-flight-card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  border-bottom: 1px solid #c00;
  padding-bottom: 6px;
}

.cmp-flight-route {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.cmp-flight-arrow {
  margin: 0 4px;
  color: #757575;
  font-weight: 400;
}

.cmp-flight-date {
  font-size: 12px;
  color: #757575;
  white-space: nowrap;
}

.cmp-flight-card-mid {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cmp-flight-time {
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
  font-size: 14px;
  font-weight: 500;
  color: #212121;
}

.cmp-flight-arr-offset {
  font-size: 10px;
  color: #c00;
  margin-left: 2px;
}

.cmp-flight-line {
  flex: 1;
  height: 1px;
  background: #e0e0e0;
  position: relative;
  text-align: center;
}

.cmp-flight-dur {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  padding: 0 6px;
  font-size: 11px;
  color: #757575;
  white-space: nowrap;
}

.cmp-flight-card-bot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.cmp-flight-fn {
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
  color: #424242;
  font-weight: 500;
}

.cmp-flight-stops {
  color: #757575;
}

.cmp-flight-fare {
  background: #f5f5f5;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 11px;
  color: #424242;
}

/* ── CMP Kafka Traffic Debug ─────────────────────────────── */

.cmp-kafka-traffic-log {
  max-height: 300px;
  overflow-y: auto;
  font-size: 11px;
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
}

.cmp-traffic-entry {
  border-bottom: 1px solid #eee;
  padding: 4px 0;
}

.cmp-traffic-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  line-height: 1.4;
}

.cmp-traffic-dir {
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  white-space: nowrap;
}

.cmp-traffic-dir-inbound {
  background: #e3f2fd;
  color: #1565c0;
}

.cmp-traffic-dir-outbound {
  background: #e8f5e9;
  color: #2e7d32;
}

.cmp-traffic-time {
  color: #999;
  font-size: 10px;
}

.cmp-traffic-session {
  color: #666;
  font-size: 10px;
}

.cmp-traffic-kafka {
  color: #888;
  font-size: 10px;
}

.cmp-traffic-payload {
  margin: 4px 0 0 0;
  padding: 6px 8px;
  background: #fafafa;
  border-radius: 4px;
  font-size: 10px;
  line-height: 1.3;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 200px;
  overflow-y: auto;
}

/* Dark mode */
[data-theme="dark"] .cmp-traffic-entry { border-bottom-color: #333; }
[data-theme="dark"] .cmp-traffic-dir-inbound { background: #1a2b3c; color: #64b5f6; }
[data-theme="dark"] .cmp-traffic-dir-outbound { background: #1b2e1b; color: #81c784; }
[data-theme="dark"] .cmp-traffic-payload { background: #1e1e1e; }

/* EXPENSE_BREAKDOWN — W-7 categorized expense list. Display-only collapsible
 * card. Header row toggles a `data-collapsed` attribute on the outer card; the
 * body sections are hidden via the [data-collapsed="true"] selector below. */
.cmp-expense-breakdown {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  margin-top: 4px;
  width: 100%;
  max-width: 100%;
}

.cmp-expense-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: #1a2332;
}

.cmp-expense-header:hover {
  background: #f7f8fa;
}

.cmp-expense-title {
  font-weight: 700;
  font-size: 14px;
  color: #1a2332;
}

.cmp-expense-chevron {
  color: #1a2332;
  flex-shrink: 0;
  transition: transform 0.18s ease;
}

.cmp-expense-breakdown[data-collapsed="true"] .cmp-expense-chevron {
  transform: rotate(-180deg);
}

.cmp-expense-breakdown[data-collapsed="true"] .cmp-expense-body {
  display: none;
}

.cmp-expense-body {
  padding: 0 18px 14px;
}

.cmp-expense-empty {
  padding: 4px 0 6px;
  font-size: 13px;
  color: #687588;
}

.cmp-expense-section {
  padding-top: 10px;
}

.cmp-expense-section + .cmp-expense-section {
  border-top: 1px solid #e6e9ee;
  margin-top: 6px;
}

.cmp-expense-section-title {
  margin: 4px 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: #1a2332;
  letter-spacing: 0.1px;
}

.cmp-expense-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-top: 1px solid #f0f2f5;
}

.cmp-expense-section-title + .cmp-expense-item {
  border-top: none;
}

.cmp-expense-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.cmp-expense-item-merchant {
  font-size: 13px;
  font-weight: 600;
  color: #1a2332;
  white-space: pre-line;
  word-break: break-word;
}

.cmp-expense-item-desc {
  font-size: 12px;
  color: #687588;
  line-height: 1.4;
  word-break: break-word;
}

.cmp-expense-item-reason {
  font-size: 12px;
  font-style: italic;
  color: #8a93a3;
  line-height: 1.4;
  word-break: break-word;
}

.cmp-expense-item-amount {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 500;
  color: #1a2332;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

body.dark-theme .cmp-expense-breakdown {
  background: #1f2733;
  border-color: #2d3748;
}

body.dark-theme .cmp-expense-header,
body.dark-theme .cmp-expense-title,
body.dark-theme .cmp-expense-chevron,
body.dark-theme .cmp-expense-section-title,
body.dark-theme .cmp-expense-item-merchant,
body.dark-theme .cmp-expense-item-amount {
  color: #f1f3f6;
}

body.dark-theme .cmp-expense-header:hover {
  background: #283142;
}

body.dark-theme .cmp-expense-item-desc {
  color: #9aa4b3;
}

body.dark-theme .cmp-expense-item-reason {
  color: #7d8898;
}

body.dark-theme .cmp-expense-section + .cmp-expense-section {
  border-top-color: #2d3748;
}

body.dark-theme .cmp-expense-item {
  border-top-color: #232a37;
}

/* ═══════════════════════════════════════════════════════════════════
   SESSION GUARD: Chat Ended Separator
   ═══════════════════════════════════════════════════════════════════ */

.chat-ended-separator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 16px;
  color: #e31837;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.chat-ended-separator::before,
.chat-ended-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e31837;
  opacity: 0.4;
}

body.dark-theme .chat-ended-separator {
  color: #ff4d6a;
}

body.dark-theme .chat-ended-separator::before,
body.dark-theme .chat-ended-separator::after {
  background: #ff4d6a;
}
