/* app.css: MoraBanc Banking-Grade Design System for Diane Finadvisor */

:root {
  --navy-primary: #0a3550;
  --navy-secondary: #18427A;
  --navy-light: #eef5fa;
  --navy-hover: #072538;
  --grey-dark: #212529;
  --grey-body: #343a40;
  --grey-muted: #898989;
  --grey-light: #f8f8f8;
  --grey-border: #e2e8f0;
  --grey-hover: #edf2f7;
  --accent-gold: #c59b27;
  --accent-gold-bg: #fffbf0;
  --mark-bg: #e6f0fa;
  --mark-border: #b8d5ed;
  --mark-color: #0a3550;
  --error-bg: #fdf2f2;
  --error-border: #f8b4b4;
  --error-text: #9b1c1c;

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(10, 53, 80, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(10, 53, 80, 0.09), 0 4px 6px -2px rgba(10, 53, 80, 0.04);
}

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

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

body {
  font-family: var(--font-family);
  font-size: 15px;
  line-height: 1.5;
  color: var(--grey-dark);
  background-color: var(--grey-light);
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ---------------------------------------------------------------- Header */
.app-header {
  flex-shrink: 0;
  background: #ffffff;
  border-bottom: 1px solid var(--grey-border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-new-conv {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy-primary);
  background: var(--navy-light);
  border: 1px solid #c8dced;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-new-conv:hover {
  background: #dbeaf7;
  border-color: var(--navy-secondary);
}

.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy-primary);
  background: var(--navy-light);
  border: 1px solid #c8dced;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-export:hover {
  background: #dbeaf7;
  border-color: var(--navy-secondary);
}


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

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy-primary);
  letter-spacing: -0.2px;
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--grey-muted);
  font-weight: 500;
}

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

.select-input {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--grey-dark);
  background-color: #ffffff;
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.select-input:focus {
  border-color: var(--navy-secondary);
}

.mode-switch {
  display: flex;
  background-color: var(--grey-light);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 3px;
}

.mode-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--grey-muted);
  background: transparent;
  border: none;
  border-radius: 4px;
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-btn:hover {
  color: var(--navy-primary);
}

.mode-btn.active {
  background-color: var(--navy-primary);
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(10, 53, 80, 0.2);
}

/* ---------------------------------------------------------------- Main */
.app-main {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 16px 20px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Quick Products Bar */
.quick-products-bar {
  background: #ffffff;
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  box-shadow: var(--shadow-sm);
}

.products-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.products-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy-secondary);
  white-space: nowrap;
}

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

.product-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--navy-primary);
  background: var(--navy-light);
  border: 1px solid #d0e2f0;
  border-radius: var(--radius-full);
  padding: 5px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.product-chip .chip-svg-icon {
  flex-shrink: 0;
  color: var(--navy-secondary);
}

.product-chip:hover {
  background: #dbeaf7;
  border-color: var(--navy-secondary);
}

/* Error Banner */
.error-banner {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  color: var(--error-text);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.error-content {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 500;
}

.btn-error-retry {
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  background: #ffffff;
  color: var(--error-text);
  border: 1px solid var(--error-border);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  cursor: pointer;
}

.btn-error-retry:hover {
  background: #fdf2f2;
}

/* Chat Messages */
.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* User Message */
.msg-user {
  position: relative;
  align-self: flex-end;
  max-width: 82%;
  background: var(--navy-primary);
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 16px 16px 2px 16px;
  box-shadow: var(--shadow-sm);
  font-size: 0.95rem;
  line-height: 1.5;
  word-break: break-word;
}

.msg-user.pending {
  opacity: 0.65;
  font-style: italic;
}

.btn-edit-msg {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ffffff;
  color: var(--navy-primary);
  border: 1px solid #c8dced;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  padding: 0;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn-edit-msg:hover {
  transform: scale(1.15);
  background: #f0f7ff;
}

.edit-msg-container {
  display: flex;
  gap: 6px;
  align-items: center;
  width: 100%;
}

.input-edit-msg {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #005a9c;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.9rem;
  color: #1e293b;
  background: #ffffff;
}

.btn-save-edit, .btn-cancel-edit {
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

.btn-save-edit {
  background: #2563eb;
  color: #ffffff;
}

.btn-save-edit:hover {
  background: #1d4ed8;
}

.btn-cancel-edit {
  background: #e2e8f0;
  color: #334155;
}

.btn-cancel-edit:hover {
  background: #cbd5e1;
}

.msg-edited-badge {
  font-size: 0.75rem;
  opacity: 0.8;
  margin-left: 6px;
  cursor: help;
  user-select: none;
}

.msg-correction-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 12px;
  padding: 4px 10px;
  font-size: 0.8rem;
  color: #64748b;
  background: #f8fafc;
  border-left: 3px solid #94a3b8;
  border-radius: 0 4px 4px 0;
}

.msg-correction-line .correction-icon {
  font-size: 0.85rem;
  color: #64748b;
}

.msg-correction-line .correction-text {
  font-style: italic;
}

.msg-user .msg-files {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.file-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.file-tag .chip-icon {
  flex-shrink: 0;
  width: 13px;
  height: 13px;
}

/* Diane Card */
.msg-diane {
  align-self: flex-start;
  max-width: 88%;
  background: #ffffff;
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.diane-header {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--grey-border);
  padding-bottom: 10px;
}

.diane-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--navy-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.diane-name {
  font-weight: 700;
  color: var(--navy-primary);
  font-size: 0.95rem;
}

.diane-badge {
  font-size: 0.72rem;
  background: var(--navy-light);
  color: var(--navy-secondary);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
  letter-spacing: 0.3px;
}

.diane-body {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--grey-body);
}

.diane-body p {
  margin-bottom: 10px;
}

.diane-body p:last-child {
  margin-bottom: 0;
}

.diane-body ul, .diane-body ol {
  margin: 10px 0 10px 20px;
}

.diane-body li {
  margin-bottom: 4px;
}

/* Highlight mark styling */
mark {
  background-color: var(--mark-bg);
  border: 1px solid var(--mark-border);
  color: var(--mark-color);
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

.diane-body a {
  color: var(--navy-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Blocks container (rendered after bubble in order) */
.blocks-wrapper {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* SVG Infographic blocks */
.svg-block-item {
  width: 100%;
  max-width: 520px;
  background: var(--grey-light);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: block;
}

/* Product Card Block */
.card-product {
  background: #ffffff;
  border-left: 4px solid var(--navy-secondary);
  border-top: 1px solid var(--grey-border);
  border-right: 1px solid var(--grey-border);
  border-bottom: 1px solid var(--grey-border);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 520px;
}

.product-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy-primary);
}

.product-rate {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy-secondary);
}

.product-today {
  font-size: 0.88rem;
  color: var(--grey-body);
}

.product-meta {
  display: flex;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--grey-dark);
  font-weight: 500;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--grey-border);
  font-size: 0.78rem;
  color: var(--grey-muted);
}

.product-link {
  color: var(--navy-secondary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Plan Card */
.plan-card {
  margin-top: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
  border: 2px solid var(--navy-secondary);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 520px;
}

.plan-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.plan-title-wrap {
  display: flex;
  flex-direction: column;
}

.plan-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy-primary);
}

.plan-card-sub {
  font-size: 0.8rem;
  color: var(--grey-muted);
}

.plan-card-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.plan-thumbnail {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--grey-border);
  background: #ffffff;
}

.plan-details {
  flex: 1;
  font-size: 0.88rem;
  color: var(--grey-body);
}

.plan-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-plan-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
  background: var(--navy-primary);
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-plan-open:hover {
  background: var(--navy-hover);
  text-decoration: none;
}

.btn-plan-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-primary);
  background: #ffffff;
  border: 1px solid var(--navy-primary);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-plan-download:hover {
  background: var(--navy-light);
  text-decoration: none;
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  margin-top: 4px;
}

.typing-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--navy-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
}

.typing-bubble {
  background: #ffffff;
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}

.typing-dots {
  display: flex;
  gap: 4px;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  background: var(--navy-secondary);
  border-radius: 50%;
  animation: bounce 1.2s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1.1); opacity: 1; }
}

.typing-text {
  font-size: 0.82rem;
  color: var(--grey-muted);
  font-weight: 500;
}

/* ---------------------------------------------------------------- Footer */
.app-footer {
  flex-shrink: 0;
  position: relative;
  background: #ffffff;
  border-top: 1px solid var(--grey-border);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.04);
  z-index: 40;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 20px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* File Chips */
.file-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--navy-light);
  border: 1px solid #c8dced;
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-size: 0.78rem;
  color: var(--navy-primary);
  font-weight: 500;
}

.chip-item .chip-icon {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  color: var(--navy-secondary);
}

.chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--navy-secondary);
  cursor: pointer;
  padding: 2px;
  border-radius: 50%;
  transition: all 0.15s ease;
}

.chip-remove:hover {
  color: #c53030;
  background: rgba(197, 48, 48, 0.1);
}

/* Hands-free Voice Panel */
.conv-voice-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--navy-light);
  border: 1px solid #cce0f0;
  border-radius: var(--radius-md);
  padding: 8px 16px;
  margin-bottom: 4px;
  gap: 16px;
}

.conv-voice-left {
  flex: 1;
  display: flex;
  align-items: center;
}

.voice-status-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
}

.voice-status-info {
  display: flex;
  flex-direction: column;
}

.conv-status-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy-primary);
}

/* Voice Animation (Wave / Pulsing Bars) */
.voice-animation {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 24px;
}

.voice-animation .anim-bar {
  width: 3.5px;
  height: 6px;
  background: var(--navy-secondary);
  border-radius: 2px;
  transition: all 0.2s ease;
}

/* Listening: gentle undulating navy wave */
.anim-listening .bar-1 { animation: waveListening 1.2s infinite ease-in-out 0.0s; }
.anim-listening .bar-2 { animation: waveListening 1.2s infinite ease-in-out 0.2s; }
.anim-listening .bar-3 { animation: waveListening 1.2s infinite ease-in-out 0.4s; }
.anim-listening .bar-4 { animation: waveListening 1.2s infinite ease-in-out 0.6s; }
.anim-listening .bar-5 { animation: waveListening 1.2s infinite ease-in-out 0.1s; }

@keyframes waveListening {
  0%, 100% { height: 6px; }
  50% { height: 18px; }
}

/* Thinking: pulsating rhythmic dots */
.anim-thinking .anim-bar {
  background: var(--navy-primary);
  animation: waveThinking 0.9s infinite ease-in-out;
}
.anim-thinking .bar-1 { animation-delay: 0.0s; }
.anim-thinking .bar-2 { animation-delay: 0.15s; }
.anim-thinking .bar-3 { animation-delay: 0.3s; }
.anim-thinking .bar-4 { animation-delay: 0.45s; }
.anim-thinking .bar-5 { animation-delay: 0.6s; }

@keyframes waveThinking {
  0%, 100% { height: 4px; opacity: 0.4; }
  50% { height: 16px; opacity: 1; }
}

/* Speaking: vibrant gold undulating speech wave */
.anim-speaking .anim-bar {
  background: var(--accent-gold);
}
.anim-speaking .bar-1 { animation: waveSpeaking 0.75s infinite ease-in-out 0.1s; }
.anim-speaking .bar-2 { animation: waveSpeaking 0.75s infinite ease-in-out 0.3s; }
.anim-speaking .bar-3 { animation: waveSpeaking 0.75s infinite ease-in-out 0.0s; }
.anim-speaking .bar-4 { animation: waveSpeaking 0.75s infinite ease-in-out 0.25s; }
.anim-speaking .bar-5 { animation: waveSpeaking 0.75s infinite ease-in-out 0.4s; }

@keyframes waveSpeaking {
  0%, 100% { height: 6px; }
  50% { height: 22px; }
}

/* Paused: static muted bars */
.anim-paused .anim-bar {
  height: 4px;
  background: var(--grey-muted);
}

/* Big Mic Toggle */
.conv-voice-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-big-mic {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--navy-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(10, 53, 80, 0.25);
  transition: all 0.2s ease;
  position: relative;
}

.btn-big-mic:hover {
  background: var(--navy-hover);
  transform: scale(1.04);
}

body[data-status="listening"] .btn-big-mic {
  box-shadow: 0 0 0 4px rgba(24, 66, 122, 0.2), 0 4px 12px rgba(10, 53, 80, 0.3);
  animation: micPulse 2s infinite ease-in-out;
}

body[data-status="speaking"] .btn-big-mic {
  box-shadow: 0 0 0 4px rgba(197, 155, 39, 0.25), 0 4px 12px rgba(197, 155, 39, 0.3);
}

body[data-status="paused"] .btn-big-mic {
  background: #e2e8f0;
  color: #64748b;
  box-shadow: none;
  animation: none;
}

@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(24, 66, 122, 0.2), 0 4px 10px rgba(10, 53, 80, 0.25); }
  50% { box-shadow: 0 0 0 7px rgba(24, 66, 122, 0.35), 0 4px 14px rgba(10, 53, 80, 0.35); }
}

.conv-voice-right {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.conv-toggle-hint {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy-secondary);
}

/* Chat Form */
.chat-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.input-wrap {
  flex: 1;
  background: var(--grey-light);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  display: flex;
  transition: border-color 0.2s, background-color 0.2s;
}

.input-wrap:focus-within {
  border-color: var(--navy-secondary);
  background: #ffffff;
}

.chat-input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--grey-dark);
  resize: none;
  max-height: 120px;
  line-height: 1.4;
}

.btn-icon {
  background: #ffffff;
  border: 1px solid var(--grey-border);
  color: var(--grey-muted);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-icon:hover {
  color: var(--navy-primary);
  border-color: var(--navy-secondary);
}

.btn-mic.active {
  background: #fee2e2;
  border-color: #ef4444;
  color: #dc2626;
  animation: pulse-mic 1.5s infinite;
}

@keyframes pulse-mic {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.btn-send {
  background: var(--navy-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  height: 42px;
  padding: 0 18px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

.btn-send:hover {
  background: var(--navy-hover);
}

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

/* Drag-drop overlay */
.drop-overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 53, 80, 0.85);
  align-items: center;
  justify-content: center;
  z-index: 100;
  color: #ffffff;
  backdrop-filter: blur(2px);
}

.drop-overlay:not([hidden]) {
  display: flex;
}

.drop-message {
  border: 2px dashed rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-lg);
  padding: 30px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  font-weight: 600;
}

/* ---------------------------------------------------------------- Responsive */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .header-controls {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    justify-content: flex-start;
  }

  .quick-products-bar {
    padding: 10px 12px;
  }

  .msg-user, .msg-diane, .card-product, .plan-card {
    max-width: 95%;
  }

  .btn-send span {
    display: none;
  }

  .btn-send {
    padding: 0 12px;
  }

  .app-main {
    padding-left: 12px;
    padding-right: 12px;
  }
}
