/* Gondola Dashboard — Fluid-inspired dark theme */

:root {
  --bg-primary: #090d14;
  --bg-secondary: #0d1117;
  --bg-card: rgba(255,255,255,0.03);
  --bg-card-hover: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.15);
  --text-primary: #ffffff;
  --text-secondary: rgba(255,255,255,0.6);
  --text-muted: rgba(255,255,255,0.35);
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-glow: rgba(59,130,246,0.15);
  --green: #22c55e;
  --green-bg: rgba(34,197,94,0.12);
  --red: #ef4444;
  --purple: #a855f7;
  --purple-bg: rgba(168,85,247,0.12);
  --orange: #f59e0b;
  --font-body: 'Red Hat Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Red Hat Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --sidebar-w: 240px;
  --topbar-h: 64px;
  --radius: 12px;
  --radius-sm: 8px;
}

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

body {
  font-family: 'Red Hat Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
.mono { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.85em; }
.muted { color: var(--text-muted); }
.green { color: var(--green); }
.text-muted { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.5; }

/* ============================================================
   Auth Screen
   ============================================================ */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(59,130,246,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(168,85,247,0.05) 0%, transparent 50%);
  padding: 2rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(54,111,255,0.04));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  text-align: center;
  backdrop-filter: blur(20px);
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.auth-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.auth-label {
  display: block;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin-bottom: 1rem;
}

.auth-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.auth-input::placeholder { color: var(--text-muted); }

.auth-btn {
  width: 100%;
  padding: 0.875rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.auth-btn:hover { background: var(--accent-hover); }
.auth-btn:active { transform: scale(0.98); }

.auth-btn-ghost {
  width: 100%;
  padding: 0.75rem;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: color 0.2s;
}

.auth-btn-ghost:hover { color: var(--text-primary); }

.otp-display {
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.otp-label { font-size: 0.75rem; color: var(--orange); }

.otp-code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--text-primary);
}

.auth-error {
  color: var(--red);
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

.auth-footer {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 2rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ============================================================
   App Layout
   ============================================================ */
.app-main {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.sidebar-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: white;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.875rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s;
}

.nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--accent-glow);
  color: var(--accent);
}

.nav-item.active svg { stroke: var(--accent); }

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
}

.network-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.network-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(34,197,94,0.5);
}

/* Main Area */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: rgba(9,13,20,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}

.topbar-left { display: flex; align-items: baseline; gap: 0.75rem; }

.page-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.page-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.wallet-address {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s;
}

.wallet-address:hover { border-color: var(--border-hover); }

.address-label {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ============================================================
   Content & Cards
   ============================================================ */
.content {
  padding: 2rem;
}

.cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  transition: border-color 0.2s, background 0.2s;
}

.card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.card-balance {
  background: linear-gradient(135deg, rgba(59,130,246,0.08), rgba(99,102,241,0.05));
  border-color: rgba(59,130,246,0.2);
}

.card-wide { grid-column: 1 / -1; }

.card-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.card-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.card-value-sm { font-size: 1.15rem; }

.card-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* Section Blocks */
.section-block { margin-bottom: 2rem; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
}

.section-link {
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
}

.section-link:hover { text-decoration: underline; }

.section-count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================================
   Table
   ============================================================ */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.table tr:last-child td { border-bottom: none; }

.table tr:hover td { background: rgba(255,255,255,0.02); }

.row-muted td { opacity: 0.6; }

/* Badges & Pills */
.service-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.service-badge.travel { background: var(--accent-glow); color: var(--accent); }
.service-badge.wallet { background: var(--green-bg); color: var(--green); }
.service-badge.enrich { background: var(--purple-bg); color: var(--purple); }

.status-pill {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
}

.status-pill.success { background: var(--green-bg); color: var(--green); }

.tx-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.8rem;
}

.tx-link:hover { text-decoration: underline; }

/* ============================================================
   Quick Actions Grid
   ============================================================ */
.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}

.action-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--text-primary);
  transition: all 0.2s;
}

.action-card:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
  transform: translateY(-2px);
}

.action-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }

.action-label {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.action-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.action-pulse {
  animation: pulse 0.3s ease;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(0.97); }
  100% { transform: scale(1); }
}

/* ============================================================
   Services Grid
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}

.service-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.service-card .service-icon { font-size: 1.75rem; margin-bottom: 0.75rem; }
.service-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.4rem; }
.service-card p { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.75rem; line-height: 1.4; }

.service-meta { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; flex-wrap: wrap; }

.meta-tag {
  padding: 0.2rem 0.5rem;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.service-status {
  font-size: 0.75rem;
  font-weight: 500;
}

.service-status.online { color: var(--green); }

/* ============================================================
   Agents Grid
   ============================================================ */
.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1rem;
}

.agent-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  transition: border-color 0.2s;
}

.agent-card:hover { border-color: var(--border-hover); }

.agent-avatar {
  width: 48px;
  height: 48px;
  background: var(--accent-glow);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.agent-info { flex: 1; }
.agent-info h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.3rem; }
.agent-info p { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.5rem; line-height: 1.4; }

.agent-services { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.mini-tag {
  padding: 0.15rem 0.45rem;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  font-size: 0.65rem;
  color: var(--text-muted);
}

.agent-stats {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

.stat { text-align: center; }
.stat-value { display: block; font-size: 1.1rem; font-weight: 700; }
.stat-label { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

.agent-card-new {
  border-style: dashed;
  cursor: pointer;
  align-items: center;
}

.agent-card-new .agent-avatar {
  background: transparent;
  border: 2px dashed var(--border);
  font-size: 1.5rem;
  color: var(--text-muted);
}

.agent-card-new:hover {
  border-color: var(--accent);
}

.agent-card-new:hover .agent-avatar {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

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

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

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

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 0.4rem;
}

.btn-ghost:hover { color: var(--text-primary); }

.spinning svg {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.fund-options {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .topbar { padding: 0 1rem; }
  .content { padding: 1.5rem 1rem; }
  .cards-row { grid-template-columns: 1fr 1fr; }
  .actions-grid { grid-template-columns: 1fr 1fr; }
  .agents-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Modals
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  animation: modalFadeIn 0.25s ease forwards;
}

.modal-overlay.hidden {
  display: none !important;
}

.modal-overlay.closing {
  animation: modalFadeOut 0.2s ease forwards;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes modalFadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(54,111,255,0.04));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem 2rem 1.75rem;
  backdrop-filter: blur(20px);
  transform: scale(0.95) translateY(10px);
  animation: modalCardIn 0.3s cubic-bezier(0.16,1,0.3,1) forwards;
}

.modal-overlay.closing .modal-card {
  animation: modalCardOut 0.2s ease forwards;
}

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

@keyframes modalCardOut {
  from { opacity: 1; transform: scale(1) translateY(0); }
  to   { opacity: 0; transform: scale(0.97) translateY(6px); }
}

/* Scrollbar inside modal */
.modal-card::-webkit-scrollbar { width: 6px; }
.modal-card::-webkit-scrollbar-track { background: transparent; }
.modal-card::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

/* Close button */
.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.modal-close:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

/* Modal header */
.modal-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-icon.travel {
  background: var(--accent-glow);
  color: var(--accent);
}

.modal-icon.hotel {
  background: rgba(34,197,94,0.12);
  color: var(--green);
}

.modal-icon.enrich {
  background: var(--purple-bg);
  color: var(--purple);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.modal-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* Modal form */
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.modal-form .auth-input {
  margin-bottom: 0.5rem;
}

.modal-form .auth-btn {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.form-group-wide {
  grid-column: 1 / -1;
}

/* Spinner inside button */
.btn-loader {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.spinner {
  animation: spin 0.8s linear infinite;
}

/* Date input theming */
.auth-input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.7);
  cursor: pointer;
}

/* ============================================================
   Modal — Flight Results
   ============================================================ */
.modal-results {
  margin-top: 1.5rem;
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.results-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.results-cost {
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  background: var(--green-bg);
  color: var(--green);
  border-radius: 100px;
  font-weight: 600;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

/* Flight result card */
.flight-result {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
}

.flight-result:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.flight-airline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  min-width: 72px;
}

.airline-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
  letter-spacing: 0.02em;
}

.airline-logo.ek { background: linear-gradient(135deg, #c4242b, #8b1a1e); }
.airline-logo.gf { background: linear-gradient(135deg, #9a7b4f, #6b5334); }
.airline-logo.ai { background: linear-gradient(135deg, #e44d2e, #c23a1e); }
.airline-logo.sq { background: linear-gradient(135deg, #fdb813, #c48f00); }

.airline-code {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.flight-detail {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.flight-times {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.flight-time {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.flight-route {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
}

.route-line {
  flex: 1;
  height: 1px;
  background: var(--border-hover);
  position: relative;
}

.route-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.flight-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.flight-duration { font-weight: 500; color: var(--text-secondary); }

.flight-stops-nonstop { color: var(--green); font-weight: 600; }
.flight-stops-1 { color: var(--orange); font-weight: 500; }

.flight-price {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
}

.price-amount {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.price-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Hotel result card */
.hotel-result {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
}

.hotel-result:hover {
  border-color: var(--green);
  background: rgba(34,197,94,0.05);
}

.hotel-info h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.hotel-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.hotel-stars {
  color: var(--orange);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}

.hotel-price {
  text-align: right;
}

.hotel-price .price-amount {
  font-size: 1.1rem;
}

.hotel-price .price-label {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* Company result card */
.company-result {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color 0.15s, background 0.15s;
}

.company-result:hover {
  border-color: var(--purple);
  background: rgba(168,85,247,0.05);
}

.company-result h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.company-meta-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.3rem 1rem;
  font-size: 0.8rem;
}

.company-meta-grid dt {
  color: var(--text-muted);
  font-weight: 500;
}

.company-meta-grid dd {
  color: var(--text-secondary);
}

/* Responsive modal */
@media (max-width: 768px) {
  .modal-overlay { padding: 1rem; }
  .modal-card { padding: 1.5rem; max-height: 90vh; }
  .form-row { grid-template-columns: 1fr; }
  .flight-result { grid-template-columns: 1fr; gap: 0.75rem; }
  .flight-airline { flex-direction: row; min-width: auto; }
  .flight-price { align-items: flex-start; flex-direction: row; gap: 0.5rem; }
}

/* ============================================================
   Chat Section
   ============================================================ */
#section-chat {
  padding: 0;
  height: calc(100vh - var(--topbar-h));
  display: flex;
  flex-direction: column;
}

#section-chat.hidden { display: none !important; }

.chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 2rem 2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
}
.chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.2);
}

/* Chat Message Rows */
.chat-message {
  display: flex;
  gap: 0.75rem;
  max-width: 720px;
  animation: chatFadeIn 0.3s ease;
}

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

.chat-message.system {
  align-self: flex-start;
}

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

/* Avatars */
.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.chat-message.system .chat-avatar {
  background: linear-gradient(135deg, var(--accent), #6366f1);
  color: white;
}

.chat-message.user .chat-avatar {
  background: rgba(255,255,255,0.08);
  color: var(--text-secondary);
}

/* Bubbles */
.chat-bubble {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-primary);
}

.chat-message.system .chat-bubble {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px 12px 12px 12px;
}

.chat-message.user .chat-bubble {
  background: var(--accent);
  color: white;
  border-radius: 12px 4px 12px 12px;
}

.chat-bubble strong { font-weight: 600; }

/* Thinking indicator */
.chat-thinking {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.6rem 1rem;
}

.chat-thinking .dot {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: dotBounce 1.4s ease-in-out infinite;
}

.chat-thinking .dot:nth-child(2) { animation-delay: 0.2s; }
.chat-thinking .dot:nth-child(3) { animation-delay: 0.4s; }

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

/* Rich Result Cards inside chat */
.chat-result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-top: 0.5rem;
  transition: border-color 0.2s;
}

.chat-result-card:hover { border-color: var(--border-hover); }

.chat-result-card .result-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.chat-result-card .result-header svg { stroke: var(--accent); }

.chat-result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.chat-result-row:last-child { border-bottom: none; }

.chat-result-row .row-left {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.chat-result-row .row-airline {
  font-weight: 600;
  color: var(--text-primary);
}

.chat-result-row .row-detail {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.chat-result-row .row-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--green);
}

.chat-result-row .row-price.highlight {
  color: var(--accent);
  font-size: 1.15rem;
}

/* Company card specifics */
.company-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.company-stat {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.company-stat .stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.company-stat .stat-val {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}

/* Image generation placeholder */
.chat-image-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, rgba(59,130,246,0.08), rgba(168,85,247,0.08));
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.chat-image-placeholder svg { stroke: var(--accent); opacity: 0.6; }

/* Email confirmation */
.chat-email-confirm {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--green-bg);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: var(--radius-sm);
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--green);
}

.chat-email-confirm svg { stroke: var(--green); flex-shrink: 0; }

/* Hotel-specific */
.hotel-stars {
  color: var(--orange);
  font-size: 0.75rem;
  letter-spacing: 1px;
}

/* Input Bar */
.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}

.chat-input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.chat-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.chat-input::placeholder { color: var(--text-muted); }

.chat-send-btn {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.1s;
}

.chat-send-btn:hover { background: var(--accent-hover); }
.chat-send-btn:active { transform: scale(0.95); }

/* Chat-specific responsive */
@media (max-width: 768px) {
  .chat-messages { padding: 1rem; }
  .chat-input-bar { padding: 0.75rem 1rem 1rem; }
  .chat-message { max-width: 100%; }
}

/* ============================================
   UI POLISH OVERRIDES — Appended enhancements
   ============================================ */

/* 1. Cards — Better glass morphism */
.card { background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.02) 100%); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.06); box-shadow: 0 4px 24px rgba(0,0,0,0.2); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.card:hover { border-color: rgba(255,255,255,0.12); box-shadow: 0 8px 32px rgba(0,0,0,0.3); transform: translateY(-2px); }

/* 2. Balance card — Accent glow */
.card-balance { background: linear-gradient(135deg, rgba(59,130,246,0.08) 0%, rgba(168,85,247,0.06) 100%); border-color: rgba(59,130,246,0.15); }
.card-balance:hover { border-color: rgba(59,130,246,0.25); box-shadow: 0 8px 40px rgba(59,130,246,0.15); }
.card-value { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; }

/* 3. Action cards — Scale + glow hover */
.action-card { transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); border: 1px solid rgba(255,255,255,0.06); }
.action-card:hover { transform: translateY(-4px) scale(1.02); border-color: rgba(59,130,246,0.2); box-shadow: 0 12px 40px rgba(59,130,246,0.1); }
.action-card:hover .action-icon { color: var(--accent); }
.action-card:active { transform: translateY(-1px) scale(0.99); }

/* 4. Service cards — Better hover with icon shift */
.service-card { transition: all 0.3s ease; }
.service-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.15); box-shadow: 0 12px 40px rgba(0,0,0,0.25); }
.service-card:hover .service-icon { color: var(--accent); transform: scale(1.1); }
.service-icon { transition: all 0.3s ease; }

/* 5. Sidebar gradient */
.sidebar { background: linear-gradient(180deg, #0d1117 0%, #080c12 100%); }

/* 6. Buttons — Gradient + glow */
.auth-btn { background: linear-gradient(135deg, #3b82f6, #2563eb); box-shadow: 0 4px 16px rgba(59,130,246,0.25); transition: all 0.2s ease; }
.auth-btn:hover { box-shadow: 0 6px 24px rgba(59,130,246,0.35); transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, #3b82f6, #2563eb); box-shadow: 0 4px 16px rgba(59,130,246,0.25); }
.btn-primary:hover { box-shadow: 0 6px 24px rgba(59,130,246,0.35); transform: translateY(-1px); }

/* 7. Table — Better striping and hover */
.table tbody tr { transition: background 0.15s ease; }
.table tbody tr:hover { background: rgba(59,130,246,0.05); }

/* 8. Toast notification system */
.toast-container { position: fixed; top: 1rem; right: 1rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.875rem 1rem; border-radius: 10px; min-width: 320px; max-width: 420px; font-size: 0.85rem; font-family: var(--font-body); line-height: 1.5; backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 8px 32px rgba(0,0,0,0.4); animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1); transition: all 0.3s ease; }
.toast.removing { animation: toastSlideOut 0.3s ease forwards; }
.toast-error { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.25); color: #fca5a5; }
.toast-success { background: rgba(34,197,94,0.12); border-color: rgba(34,197,94,0.25); color: #86efac; }
.toast-info { background: rgba(59,130,246,0.12); border-color: rgba(59,130,246,0.25); color: #93c5fd; }
.toast-icon { flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px; }
.toast-content { flex: 1; }
.toast-title { font-weight: 600; margin-bottom: 2px; }
.toast-message { opacity: 0.8; font-size: 0.8rem; }
.toast-close { flex-shrink: 0; background: none; border: none; color: inherit; opacity: 0.5; cursor: pointer; padding: 2px; }
.toast-close:hover { opacity: 1; }
.toast-progress { position: absolute; bottom: 0; left: 0; height: 2px; border-radius: 0 0 10px 10px; animation: toastProgress 5s linear forwards; }
.toast-error .toast-progress { background: rgba(239,68,68,0.5); }
.toast-success .toast-progress { background: rgba(34,197,94,0.5); }
.toast-info .toast-progress { background: rgba(59,130,246,0.5); }
@keyframes toastSlideIn { from { opacity: 0; transform: translateX(100px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastSlideOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(100px); } }
@keyframes toastProgress { from { width: 100%; } to { width: 0%; } }

/* 9. Modal inline errors */
.modal-error { display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1rem; margin-top: 0.75rem; border-radius: 8px; background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.2); color: #fca5a5; font-size: 0.82rem; line-height: 1.5; animation: errorShake 0.4s ease; }
.modal-error svg { flex-shrink: 0; }
.modal-error.hidden { display: none; }
@keyframes errorShake { 0%, 100% { transform: translateX(0); } 15%, 45%, 75% { transform: translateX(-4px); } 30%, 60% { transform: translateX(4px); } }

/* 10. Smoother page transitions */
.content { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* 11. Chat improvements */
.chat-bubble { animation: bubbleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(8px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
.chat-input { transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.chat-input:focus { border-color: rgba(59,130,246,0.4); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }

/* 12. Agent card hover */
.agent-card { transition: all 0.3s ease; }
.agent-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.12); box-shadow: 0 8px 32px rgba(0,0,0,0.25); }

/* 13. Navigation hover improvement */
.nav-item { transition: all 0.2s ease; }
.nav-item:hover:not(.active) { background: rgba(255,255,255,0.04); transform: translateX(2px); }

/* 14. Scrollbar styling */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* 15. Modal card improvements */
.modal-card { box-shadow: 0 24px 80px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.08); }

/* 16. Page title gradient text */
.page-title { background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.8) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
