:root {
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-light: #e0f2fe;
  --secondary: #0f172a;
  --surface: #ffffff;
  --bg: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --success: #10b981;
  --warning: #f59e0b;
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --radius-lg: 16px;
  --radius-md: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.08);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg);
  color: var(--text-main);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Navbar */
.navbar {
  height: 64px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  z-index: 10;
}

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

.brand-logo-img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: contain;
  background: white;
  border: 1px solid var(--border);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.brand-icon {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.brand-text h1 {
  font-size: 17px;
  font-weight: 800;
  color: var(--secondary);
  line-height: 1.2;
}

.brand-text span {
  font-size: 12px;
  color: var(--text-muted);
}

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

.badge-status {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f0fdf4;
  color: #166534;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #bbf7d0;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.btn-icon {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

/* Main Workspace Grid */
.workspace {
  flex: 1;
  display: grid;
  grid-template-columns: 480px 1fr;
  overflow: hidden;
  min-height: 0;
}

@media (max-width: 1024px) {
  .workspace {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
}

/* Chat Panel */
.chat-panel {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
  height: 100%;
  overflow: hidden;
  min-height: 0;
}

.chat-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.advisor-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.advisor-info h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--secondary);
}

.advisor-info p {
  font-size: 12px;
  color: var(--text-muted);
}

.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.msg {
  display: flex;
  gap: 10px;
  max-width: 88%;
}

.msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.msg.model {
  align-self: flex-start;
}

.msg-bubble {
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.msg.user .msg-bubble {
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 4px;
}

.msg.model .msg-bubble {
  background: #f8fafc;
  color: var(--text-main);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.msg-bubble p {
  margin-bottom: 6px;
}
.msg-bubble p:last-child {
  margin-bottom: 0;
}
.msg-bubble ul {
  padding-left: 20px;
  margin: 6px 0;
}
.msg-bubble li {
  margin-bottom: 4px;
}

.tool-indicator {
  font-size: 11px;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
  font-weight: 600;
}

/* Suggestions Chips */
.quick-chips {
  padding: 8px 16px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  border-top: 1px solid var(--border);
  background: #ffffff;
  scrollbar-width: none;
}

.quick-chips::-webkit-scrollbar {
  display: none;
}

.chip {
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid #e2e8f0;
  transition: all 0.2s;
}

.chip:hover {
  background: var(--primary-light);
  color: var(--primary-hover);
  border-color: #bae6fd;
}

/* Chat Input Bar */
.chat-input-bar {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.input-form {
  display: flex;
  gap: 8px;
}

.chat-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.chat-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.send-btn {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 0 20px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.2s;
}

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

/* Quote Panel (Right Side) */
.quote-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg);
  overflow-y: auto;
  padding: 24px;
}

.quote-view-container {
  max-width: 880px;
  width: 100%;
  margin: 0 auto;
}

/* Empty State */
.empty-quote-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 40px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 2px dashed var(--border);
}

.empty-icon {
  font-size: 56px;
  margin-bottom: 16px;
  color: var(--primary);
}

.empty-quote-state h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 8px;
}

.empty-quote-state p {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 420px;
  line-height: 1.5;
  margin-bottom: 24px;
}

.destinations-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  width: 100%;
  margin-top: 20px;
}

.dest-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-align: left;
}

.dest-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.dest-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.dest-card-content {
  padding: 12px;
}

.dest-card-content h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--secondary);
}

.dest-card-content p {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Active Quote Presentation */
.active-quote-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  overflow: hidden;
}

.quote-hero-header {
  height: 220px;
  position: relative;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: 24px;
}

.quote-hero-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.2) 60%, transparent 100%);
}

.quote-hero-info {
  position: relative;
  z-index: 2;
  color: white;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.quote-hero-info h2 {
  font-size: 26px;
  font-weight: 800;
}

.quote-hero-info p {
  font-size: 14px;
  color: #e2e8f0;
}

.quote-folio-badge {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.quote-body {
  padding: 24px;
}

.trip-meta-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  background: #f8fafc;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

@media (max-width: 640px) {
  .trip-meta-bar { grid-template-columns: repeat(2, 1fr); }
}

.meta-item .label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.meta-item .val {
  font-size: 14px;
  font-weight: 700;
  color: var(--secondary);
  margin-top: 2px;
}

.quote-section-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--secondary);
  margin: 20px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-flight, .card-hotel, .card-tour {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
}

.flight-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hotel-grid {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
}

.hotel-grid img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
}

/* Pricing and Voucher Box */
.quote-finance-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: white;
  border-radius: var(--radius-md);
  padding: 22px;
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.finance-total-wrap .lbl {
  font-size: 12px;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

.finance-total-wrap .tot {
  font-size: 32px;
  font-weight: 800;
  color: #38bdf8;
  line-height: 1.1;
}

.finance-total-wrap .per-person {
  font-size: 13px;
  color: #cbd5e1;
  margin-top: 3px;
}

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

.btn-voucher {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-voucher:hover {
  background: var(--primary-hover);
}

.btn-whatsapp {
  background: #10b981;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-whatsapp:hover {
  background: #059669;
}

/* Modal API Key */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: white;
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 90%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
}

.modal-box h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
}

.modal-box p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.modal-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  margin-bottom: 16px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
