/* ==========================================================================
   AI BANKING SUPPORT & HAQ SAATHI - CLEAN MODERN INTERFACE
   Pixel-Matched to Mockup with 3 Rounded Panels, "Powered by ⌄", and AI Chat Pop-up
   ========================================================================== */

:root,
[data-theme="dark"] {
  --bg-page: #080c14;
  --bg-window: #0c101c;
  --bg-card: #121726;
  --bg-card-hover: #181f33;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: #3b82f6;

  --text-main: #ffffff;
  --text-muted: #8899b5;
  --text-dim: #5c6b84;

  --accent-blue: #3b82f6;
  --accent-blue-glow: rgba(59, 130, 246, 0.3);
  --accent-orange: #ea580c;
  --accent-green: #22c55e;
  --accent-green-bg: rgba(34, 197, 94, 0.14);
  --accent-red: #ef4444;
  --accent-red-bg: rgba(239, 68, 68, 0.14);
  --accent-purple: #a855f7;
  --accent-yellow: #eab308;

  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-te: 'Noto Sans Telugu', system-ui, sans-serif;
  --font-hi: 'Noto Sans Devanagari', system-ui, sans-serif;
  --font-ur: 'Noto Nastaliq Urdu', system-ui, sans-serif;
}

[data-theme="light"] {
  --bg-page: #f1f5f9;
  --bg-window: #ffffff;
  --bg-card: #f8fafc;
  --bg-card-hover: #f1f5f9;
  --border-subtle: #e2e8f0;
  --border-active: #2563eb;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;

  --accent-blue: #2563eb;
  --accent-blue-glow: rgba(37, 99, 235, 0.15);
  --accent-orange: #c2410c;
  --accent-green: #16a34a;
  --accent-green-bg: #dcfce7;
  --accent-red: #dc2626;
  --accent-red-bg: #fee2e2;
  --accent-purple: #9333ea;
  --accent-yellow: #ca8a04;
}

[data-theme="emerald"] {
  --bg-page: #04100c;
  --bg-window: #081a14;
  --bg-card: #0e271f;
  --bg-card-hover: #14362b;
  --border-subtle: rgba(16, 185, 129, 0.18);
  --border-active: #10b981;

  --text-main: #ecfdf5;
  --text-muted: #a7f3d0;
  --text-dim: #6ee7b7;

  --accent-blue: #10b981;
  --accent-blue-glow: rgba(16, 185, 129, 0.3);
  --accent-orange: #f59e0b;
  --accent-green: #10b981;
  --accent-green-bg: rgba(16, 185, 129, 0.18);
  --accent-red: #f43f5e;
  --accent-red-bg: rgba(244, 63, 94, 0.14);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-window);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   App Header - Full Width
   -------------------------------------------------------------------------- */
.app-header {
  background: var(--bg-window);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  gap: 16px;
  position: relative;
  width: 100%;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-box {
  width: 34px;
  height: 38px;
  border-radius: 8px;
  background: #3b82f6;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.title-group h1 {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.title-group .sub-label {
  font-size: 0.72rem;
  color: #8899a6;
  font-weight: 500;
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: 20px;
}

.nav-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 0;
  cursor: pointer;
  position: relative;
  transition: color 0.15s ease;
}

.nav-tab:hover {
  color: var(--text-main);
}

.nav-tab.active {
  color: var(--text-main);
  border-bottom: 2px solid var(--text-main);
}

.service-switch-tab {
  background: rgba(234, 88, 12, 0.1);
  color: #ea580c !important;
  border: 1px solid rgba(234, 88, 12, 0.3);
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.service-switch-tab:hover {
  background: rgba(234, 88, 12, 0.2);
}

/* "Powered by ⌄" Dropdown Button & Box */
.powered-by-dropdown-container {
  position: relative;
}

.btn-powered-by {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-powered-by:hover {
  background: rgba(255, 255, 255, 0.09);
}

.btn-powered-by .arrow {
  font-size: 0.75rem;
}

.powered-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: #141a29;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px;
  width: 200px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  z-index: 1000;
  display: none;
  flex-direction: column;
  gap: 10px;
  animation: fadeIn 0.15s ease;
}

.powered-dropdown-menu.active {
  display: flex;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-blue { background: #38bdf8; }
.dot-orange { background: #fb923c; }
.dot-green { background: #4ade80; }
.dot-purple { background: #c084fc; }
.dot-yellow { background: #facc15; }

/* Right Action Buttons */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-buttons-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.theme-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.15s;
}

.theme-icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* "Chat with us" Button matching image */
.btn-chat-with-us {
  background: var(--accent-blue);
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  padding: 8px 18px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--accent-blue-glow);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-chat-with-us:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   Quick Sub-Bar (Persona & Scenarios)
   -------------------------------------------------------------------------- */
.quick-sub-bar {
  padding: 8px 24px;
  background: rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.scenarios-flex {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.authenticated-customer-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.session-secure-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 6px;
}

.session-green-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.session-divider {
  color: rgba(255, 255, 255, 0.2);
  font-size: 0.8rem;
}

.session-detail-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #cbd5e1;
}

.session-detail-item strong {
  color: #ffffff;
  font-weight: 700;
}

.session-item-label {
  color: #64748b;
  font-weight: 500;
  font-size: 0.74rem;
}

.session-mono-text {
  font-family: var(--font-mono);
  color: #93c5fd;
  font-weight: 600;
}

.scenarios-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.clean-select {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-family: inherit;
  outline: none;
}

.chip-scenario {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.chip-scenario:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.chip-scenario.active {
  background: rgba(59, 130, 246, 0.18);
  border-color: var(--accent-blue);
  color: #ffffff;
}

.btn-clean-reset {
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-clean-reset:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

/* --------------------------------------------------------------------------
   Main 3-Cards Dashboard Layout matching image
   -------------------------------------------------------------------------- */
.dashboard-grid {
  flex: 1;
  padding: 20px 28px 28px 28px;
  display: grid;
  grid-template-columns: 1fr 1.35fr 1fr;
  gap: 20px;
  align-items: stretch;
  width: 100%;
}

.col-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 20px;
  min-height: 480px;
  display: flex;
  flex-direction: column;
}

.card-section-title {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-main);
  text-transform: uppercase;
  margin-bottom: 20px;
}

/* Left Card: Verified Facts */
.card-facts .fact-row {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
}

.card-facts .fact-label {
  font-size: 0.78rem;
  color: #6c7e97;
  margin-bottom: 2px;
}

.card-facts .fact-value {
  font-size: 0.96rem;
  font-weight: 600;
  color: #ffffff;
}

.card-facts .fact-value.mono {
  font-family: var(--font-mono);
  font-size: 0.88rem;
}

/* Center Card: Conversation Panel */
.card-conversation {
  position: relative;
}

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.lang-audio-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mini-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.72rem;
  border-radius: 6px;
  padding: 3px 6px;
  outline: none;
}

.auto-speak-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
}

/* Haq Saathi Chips */
.haq-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.haq-pill-btn {
  background: rgba(234, 88, 12, 0.12);
  border: 1px solid rgba(234, 88, 12, 0.3);
  color: #ea580c;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s;
}

.haq-pill-btn:hover {
  background: #ea580c;
  color: #fff;
}

/* Conversation Scroll Area */
.conversation-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 4px;
  max-height: calc(100vh - 340px);
  min-height: 380px;
}

.chat-placeholder-msg {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  margin: auto 0;
  padding: 20px;
}

.message-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.45;
  animation: fadeIn 0.15s ease;
  max-width: 90%;
}

.user-bubble {
  align-self: flex-end;
  background: #2563eb;
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.agent-bubble {
  align-self: flex-start;
  background: #1a233a;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-bottom-left-radius: 4px;
}

.bubble-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 4px;
}

/* Audio Waves Bar */
.audio-waves-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 24px;
  margin-top: 6px;
  opacity: 0.4;
  transition: opacity 0.2s;
}
.audio-waves-bar.active { opacity: 1; }

.waves-animation {
  display: flex;
  align-items: center;
  gap: 3px;
}

.waves-animation span {
  width: 3px;
  height: 6px;
  background: var(--accent-blue);
  border-radius: 2px;
}

.audio-waves-bar.active .waves-animation span {
  animation: barWave 0.6s infinite alternate ease-in-out;
}
.waves-animation span:nth-child(2) { animation-delay: 0.1s; }
.waves-animation span:nth-child(3) { animation-delay: 0.2s; }
.waves-animation span:nth-child(4) { animation-delay: 0.3s; }
.waves-animation span:nth-child(5) { animation-delay: 0.4s; }

@keyframes barWave {
  from { height: 4px; }
  to { height: 16px; }
}

.voice-status-text {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.btn-replay-pill {
  margin-left: auto;
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  cursor: pointer;
}

/* Conversation Input Form */
.conversation-input-form {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 6px 10px;
  margin-top: 8px;
}

.btn-icon-mic, .btn-icon-send {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.btn-icon-mic:hover, .btn-icon-send:hover {
  color: var(--text-main);
}

.btn-icon-mic.listening {
  color: #ef4444;
  animation: pulse 1s infinite;
}

.conversation-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
}

/* Right Card: Guardrails & Inspector */
.inspector-block {
  margin-bottom: 18px;
}

.block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.block-label {
  font-size: 0.75rem;
  color: #6c7e97;
  font-weight: 600;
  text-transform: uppercase;
}

.block-detail {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  margin-bottom: 3px;
}

.sub-lbl { color: var(--text-dim); }
.val-txt { color: var(--text-main); font-weight: 600; }
.val-txt.mono { font-family: var(--font-mono); }

/* Pills matching green "loan_id" in image */
.pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.pill-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 9999px;
  font-family: var(--font-mono);
}

.pill-green {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.pill-red {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.pill-blue {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.badge-pill {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 9999px;
}
.badge-green { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.badge-orange { background: rgba(234, 88, 12, 0.2); color: #fb923c; }

/* Mini Progress Bar */
.mini-progress-bar {
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  margin-top: 6px;
  overflow: hidden;
}

.mini-progress-bar div {
  height: 100%;
  background: #ea580c;
  transition: width 0.3s;
}

.mini-timeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.timeline-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
}

.bullet-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #38bdf8;
  color: #0c101c;
  font-size: 0.65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.bullet-dot.green { background: #4ade80; }
.bullet-dot.orange { background: #fb923c; }

.timeline-text { color: var(--text-muted); }

.btn-call-office-pill {
  display: inline-block;
  background: #2563eb;
  color: #fff;
  text-decoration: none;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 6px;
  transition: background 0.15s;
}
.btn-call-office-pill:hover { background: #1d4ed8; }

.btn-pdf-action {
  flex: 1;
  padding: 6px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  border: none;
}
.btn-pdf-primary { background: #ea580c; color: #fff; }
.btn-pdf-secondary { background: rgba(255,255,255,0.08); color: #fff; border: 1px solid var(--border-subtle); }

.link-why-answer {
  background: none;
  border: none;
  color: var(--accent-blue);
  font-size: 0.7rem;
  cursor: pointer;
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   AI Chat Pop-Up Dialog ("Chat with us")
   -------------------------------------------------------------------------- */
.chat-dialog-modal {
  position: fixed;
  inset: auto 24px 24px auto;
  margin: 0;
  width: 400px;
  max-width: calc(100vw - 32px);
  height: 540px;
  background: #111625;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
  color: var(--text-main);
  padding: 0;
  overflow: hidden;
  z-index: 10000;
  display: none;
  flex-direction: column;
}

.chat-dialog-modal::backdrop {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
}

.chat-dialog-modal[open],
.chat-dialog-modal.active {
  display: flex !important;
  animation: slideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-modal-header {
  background: #171f33;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.modal-title-wrap h3 {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
}

.chat-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.chat-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.chat-modal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px;
  overflow: hidden;
}

.modal-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
}

.modal-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.45;
  max-width: 88%;
}

.modal-bubble.user {
  align-self: flex-end;
  background: #2563eb;
  color: #fff;
}

.modal-bubble.agent {
  align-self: flex-start;
  background: #1c263d;
  color: #fff;
  border: 1px solid var(--border-subtle);
}

.modal-quick-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.modal-input-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 6px 10px;
}

.modal-input {
  flex: 1;
  background: none;
  border: none;
  color: #fff;
  font-size: 0.84rem;
  font-family: inherit;
  outline: none;
}

.modal-send-btn {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.modal-send-btn:hover {
  background: #1d4ed8;
}

/* Floating "Chat with us" Launcher Button */
.floating-chat-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--accent-blue);
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  padding: 10px 20px;
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px var(--accent-blue-glow);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 9999;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.floating-chat-launcher:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

/* Tabs Content Panes (Left Card) */
.facts-tab-pane {
  display: flex;
  flex-direction: column;
}

.tickets-container, .insights-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}

.ticket-item-card, .insight-item-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: fadeIn 0.15s ease;
}

.ticket-item-header, .insight-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-dim);
}

.ticket-item-title, .insight-item-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
}

.ticket-item-notes, .insight-item-notes {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.badge-blue { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }

/* --------------------------------------------------------------------------
   LOGIN PORTAL STYLES (Pixel-matched to media_1791622357200_d9d307d9.jpg)
   -------------------------------------------------------------------------- */
.login-portal-wrapper {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background-color: #080c16;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 18% 25%, rgba(99, 102, 241, 0.16) 0%, transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(59, 130, 246, 0.12) 0%, transparent 45%);
  background-size: 36px 36px, 36px 36px, auto, auto;
  animation: fadeIn 0.25s ease-out;
}

.login-portal-grid {
  display: grid;
  grid-template-columns: 460px 520px;
  gap: 50px;
  align-items: center;
  max-width: 1080px;
  width: 100%;
}

/* Left Column: Login Card */
.login-card {
  background: #111625;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
}

.login-brand-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.login-brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #3b82f6;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.login-brand-text h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.login-brand-text span {
  font-size: 0.72rem;
  color: #8899a6;
  display: block;
  margin-top: 2px;
}

.login-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.login-badge-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  padding: 3px 10px;
  font-size: 0.72rem;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.badge-dot.dot-purple { background: #a855f7; }
.badge-dot.dot-orange { background: #fb923c; }
.badge-dot.dot-green { background: #4ade80; }

.login-divider-line {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 14px 0 18px 0;
}

.login-title-section h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.login-title-section p {
  font-size: 0.85rem;
  color: #8899a6;
  margin-top: 4px;
  margin-bottom: 18px;
}

.login-tab-switcher {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 20px;
}

.login-tab-btn {
  flex: 1;
  padding: 8px;
  border: none;
  border-radius: 8px;
  background: none;
  color: #8899a6;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.login-tab-btn.active {
  background: #6366f1;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.login-form {
  display: flex;
  flex-direction: column;
}

.login-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.login-field-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #cbd5e1;
}

.login-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.login-forgot-link {
  font-size: 0.74rem;
  color: #60a5fa;
  text-decoration: none;
}
.login-forgot-link:hover { text-decoration: underline; }

.login-input-group {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-input-group:focus-within {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

.login-field-icon {
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
}

.login-input {
  flex: 1;
  height: 42px;
  background: none;
  border: none;
  color: #fff;
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
}

.btn-toggle-eye {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  font-size: 0.95rem;
  padding: 4px;
}

.quick-login-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.quick-pick-label {
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 600;
}

.quick-acc-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #94a3b8;
  font-size: 0.7rem;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.quick-acc-btn:hover, .quick-acc-btn.active {
  background: rgba(99, 102, 241, 0.18);
  border-color: #6366f1;
  color: #fff;
}

.login-checkbox-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.login-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: #94a3b8;
  cursor: pointer;
}

.login-feedback {
  font-size: 0.74rem;
  color: #ef4444;
  font-weight: 500;
  transition: all 0.2s ease;
}

.login-feedback.success {
  color: #10b981;
}

.login-feedback.info {
  color: #818cf8;
}

.login-feedback.error {
  color: #ef4444;
}

.btn-login-submit {
  width: 100%;
  height: 46px;
  background: #4f46e5;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.4);
  transition: all 0.2s;
}

.btn-login-submit:hover {
  background: #4338ca;
  transform: translateY(-1px);
}

.login-or-divider {
  position: relative;
  text-align: center;
  margin: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.login-or-divider span {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: #111625;
  padding: 0 10px;
  font-size: 0.72rem;
  color: #64748b;
}

.btn-login-sso {
  width: 100%;
  height: 42px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #cbd5e1;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-login-sso:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.login-security-notice {
  text-align: center;
  font-size: 0.68rem;
  color: #526177;
  margin-top: 16px;
}

/* Right Column: Platform Capabilities */
.platform-capabilities-col {
  display: flex;
  flex-direction: column;
}

.capabilities-eyebrow {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #818cf8;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.capabilities-title {
  font-size: 2.1rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.15;
  margin-bottom: 12px;
}

.capabilities-desc {
  font-size: 0.88rem;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 24px;
}

.features-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.feature-item-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.feature-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-blue {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.icon-orange {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.icon-green {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.icon-purple {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.feature-text h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
}

.feature-text p {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 2px;
}

/* Live Activity Card */
.live-activity-card {
  background: #111625;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.activity-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #4ade80;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.activity-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 10px #4ade80;
  animation: pulse 1.8s infinite;
}

.activity-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.activity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
}

.act-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.act-pill {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  font-family: var(--font-mono);
}

.act-blocked {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.act-reflect {
  background: rgba(99, 102, 241, 0.2);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.act-escalate {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.act-retain {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.act-msg {
  color: #cbd5e1;
  font-weight: 500;
}

.act-time {
  color: #64748b;
  font-size: 0.7rem;
}

/* User Badge in Dashboard Header */
.auth-user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
}

.btn-sign-out {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-sign-out:hover {
  background: #ef4444;
  color: #fff;
}

/* Responsive Login Grid */
@media (max-width: 980px) {
  .login-portal-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
  }
  .platform-capabilities-col {
    display: none;
  }
}

/* Modals Overlay */
.danger-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 20000;
  backdrop-filter: blur(4px);
}

.danger-modal-box, .why-modal-box {
  background: #111625;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 22px;
  max-width: 480px;
  width: 100%;
  color: #fff;
}

.danger-modal-box { border-color: #ef4444; }

.danger-badge {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 9999px;
  display: inline-block;
  margin-bottom: 8px;
}

.emergency-contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0;
}

.emer-chip {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid #ef4444;
  border-radius: 8px;
  padding: 8px;
  text-decoration: none;
  color: #fff;
  display: flex;
  flex-direction: column;
}
.emer-chip strong { color: #ef4444; font-size: 1rem; }
.emer-chip span { color: #8899b5; font-size: 0.7rem; }

.btn-danger-close {
  width: 100%;
  background: #ef4444;
  color: #fff;
  border: none;
  padding: 8px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

.why-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.why-header h3 { font-size: 0.95rem; font-weight: 700; }
.close-x { background: none; border: none; color: #8899b5; font-size: 1.2rem; cursor: pointer; }
.why-body { font-size: 0.82rem; color: #cbd5e1; display: flex; flex-direction: column; gap: 8px; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* Responsive adjustments */
@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .app-header {
    flex-wrap: wrap;
  }
  .nav-tabs {
    margin-left: 0;
    width: 100%;
    overflow-x: auto;
  }
}
