﻿/* ── Reset & base ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --orange:        #00a767;
  --orange-dark:   #008f58;
  --orange-pale:   #e6f7f1;
  --navy:          #1e293b;
  --navy-light:    #334155;
  --slate:         #64748b;
  --slate-pale:    #f1f5f9;
  --white:         #ffffff;
  --sidebar-bg:    #0f172a;
  --sidebar-bd:    rgba(255,255,255,.07);
  --bubble-ai:     #f8fafc;
  --bubble-user:   linear-gradient(135deg, #00a767 0%, #008f58 100%);
  --shadow:        0 1px 4px rgba(0,0,0,.10);
  --radius:        14px;
  --font:          -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font);
  background: var(--sidebar-bg);
  color: var(--navy);
}

/* ── App shell ───────────────────────────────────────────────────────────── */
.app-shell {
  display: flex;
  flex-direction: row;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
  width: 270px;
  min-width: 270px;
  background: #0f172a;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  flex-shrink: 0;
  transition: width .28s ease, min-width .28s ease;
  position: relative;
  z-index: 100;
}

.app-shell.sidebar-collapsed .sidebar {
  width: 0;
  min-width: 0;
}

/* Mobile overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 99;
  backdrop-filter: blur(2px);
}

/* ── Sidebar header ──────────────────────────────────────────────────────── */
.sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 16px 16px;
  white-space: nowrap;
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar-logo {
  width: 36px;
  height: 36px;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.sidebar-brand {
  font-size: .9rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: .01em;
}

/* ── New chat button ─────────────────────────────────────────────────────── */
.new-chat-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 12px 4px;
  padding: 10px 14px;
  background: rgba(0,167,103,.18);
  color: #4ade80;
  border: 1px solid rgba(0,167,103,.35);
  border-radius: 10px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, border-color .2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.new-chat-btn:hover {
  background: rgba(0,167,103,.28);
  border-color: rgba(0,167,103,.6);
}

/* ── Session list area ───────────────────────────────────────────────────── */
.sessions-label {
  font-size: .63rem;
  font-weight: 700;
  color: #334155;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 14px 16px 5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.sessions-list {
  flex: 1;
  overflow-y: auto;
  padding: 2px 8px 8px;
}

.sessions-empty {
  font-size: .78rem;
  color: #334155;
  text-align: center;
  padding: 28px 12px;
  white-space: normal;
  line-height: 1.5;
}

.session-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: #64748b;
  transition: background .15s, color .15s;
  margin-bottom: 1px;
  position: relative;
  overflow: hidden;
}
.session-item:hover { background: rgba(255,255,255,.06); color: #cbd5e1; }
.session-item.active { background: rgba(0,167,103,.12); color: var(--white); }
.session-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 3px;
  background: var(--orange);
  border-radius: 0 3px 3px 0;
}

.session-icon { font-size: .85rem; flex-shrink: 0; opacity: .7; }
.session-item.active .session-icon { opacity: 1; }

.session-info { flex: 1; overflow: hidden; min-width: 0; }

.session-title {
  font-size: .8rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: inherit;
}

.session-time {
  font-size: .66rem;
  color: #334155;
  margin-top: 2px;
}
.session-item.active .session-time { color: #64748b; }

.session-del {
  background: none;
  border: none;
  color: transparent;
  font-size: .75rem;
  cursor: pointer;
  padding: 3px 5px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color .15s, background .15s;
  line-height: 1;
}
.session-item:hover .session-del { color: #475569; }
.session-del:hover { color: #ef4444 !important; background: rgba(239,68,68,.12); }

/* ── Sidebar user profile panel ──────────────────────────────────────────── */
.sidebar-user-panel {
  flex-shrink: 0;
  margin: 8px;
  border-radius: 14px;
  background: linear-gradient(160deg, #1e3a5f 0%, #162d4a 100%);
  border: 1px solid rgba(99,179,237,.18);
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.05);
}

.user-panel-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: 2px solid rgba(147,197,253,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.user-panel-info { overflow: hidden; flex: 1; }

.user-panel-name {
  font-size: .83rem;
  font-weight: 700;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-panel-mobile {
  font-size: .68rem;
  color: #64748b;
  margin-top: 1px;
}

/* Wallet row */
.wallet-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
  padding: 8px 10px;
}

.wallet-label {
  font-size: .65rem;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  flex: 1;
}

.wallet-bal {
  font-size: .9rem;
  font-weight: 800;
  color: #4ade80;
}

.recharge-btn {
  background: rgba(0,167,103,.2);
  color: #4ade80;
  border: 1px solid rgba(0,167,103,.35);
  border-radius: 6px;
  padding: 4px 9px;
  font-size: .68rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, border-color .2s;
  flex-shrink: 0;
}
.recharge-btn:hover {
  background: rgba(0,167,103,.35);
  border-color: rgba(0,167,103,.6);
}

/* History & logout links */
.history-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  color: #94a3b8;
  text-decoration: none;
  padding: 4px 2px;
  border-radius: 6px;
  transition: color .15s;
}
.history-link:hover { color: #93c5fd; }

.logout-btn {
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.18);
  color: #94a3b8;
  border-radius: 8px;
  padding: 7px;
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: color .15s, background .15s, border-color .15s;
}
.logout-btn:hover {
  color: #fca5a5;
  background: rgba(239,68,68,.15);
  border-color: rgba(239,68,68,.35);
}

/* ── Sidebar footer (unused now, kept for safety) ────────────────────────── */
.sidebar-footer {
  padding: 8px 16px;
  flex-shrink: 0;
  white-space: nowrap;
}
.rr-link {
  font-size: .7rem;
  color: var(--orange);
  text-decoration: none;
}
.rr-link:hover { text-decoration: underline; }

/* ── Main panel ──────────────────────────────────────────────────────────── */
.main-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--white);
  min-width: 0;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--navy);
  color: var(--white);
  flex-shrink: 0;
  gap: 8px;
}

.header-left { display: flex; align-items: center; gap: 10px; }

.menu-btn {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: color .2s, background .2s;
}
.menu-btn:hover { color: var(--white); background: var(--navy-light); }

.logo-badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--white);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,167,103,.4);
}

.logo-badge-sm {
  width: 34px;
  height: 34px;
  font-size: 1.1rem;
  box-shadow: none;
}

.header-title { font-size: .95rem; font-weight: 700; letter-spacing: .01em; }
.header-sub   { font-size: .72rem; color: #94a3b8; display: flex; align-items: center; gap: 6px; margin-top: 2px; }

.dot-green {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse-green 2s infinite;
  flex-shrink: 0;
}
@keyframes pulse-green {
  0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,.4); }
  50%      { box-shadow: 0 0 0 5px rgba(34,197,94,0); }
}

.header-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.lang-select {
  background: var(--navy-light);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: .78rem;
  cursor: pointer;
  outline: none;
}
.lang-select option { background: var(--navy); }

.icon-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: color .2s, background .2s;
  display: flex;
  align-items: center;
}
.icon-btn:hover { color: var(--white); background: var(--navy-light); }

/* ── Chat messages ───────────────────────────────────────────────────────── */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 15%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}

/* Message row layouts */
.msg-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 100%;
  animation: fadeUp .25s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.msg-row.user  { flex-direction: row-reverse; }
.msg-row.ai    { flex-direction: row; }

/* Avatar */
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 700;
}
.avatar.ai-av   { background: var(--orange); color: var(--white); }
.avatar.user-av { background: var(--slate); color: var(--white); }

/* Bubble */
.bubble {
  max-width: 72%;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: .9rem;
  line-height: 1.6;
  box-shadow: var(--shadow);
  word-break: break-word;
}

.msg-row.ai  .bubble {
  background: var(--bubble-ai);
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 4px;
  color: var(--navy);
}

.msg-row.user .bubble {
  background: var(--bubble-user);
  color: var(--white);
  border-bottom-right-radius: 4px;
}

/* Markdown inside AI bubble */
.bubble p          { margin-bottom: .5em; }
.bubble p:last-child { margin-bottom: 0; }
.bubble ul, .bubble ol { padding-left: 1.4em; margin-bottom: .5em; }
.bubble li         { margin-bottom: .2em; }
.bubble strong     { font-weight: 700; }
.bubble em         { font-style: italic; }
.bubble code       { background: #e2e8f0; border-radius: 4px; padding: 1px 5px; font-size: .85em; }
.bubble pre        { background: #1e293b; color: #f8fafc; border-radius: 8px; padding: 12px; overflow-x: auto; margin: .5em 0; }
.bubble pre code   { background: none; padding: 0; color: inherit; }
.bubble table      { border-collapse: collapse; width: 100%; margin: .5em 0; font-size: .85em; }
.bubble th, .bubble td { border: 1px solid #cbd5e1; padding: 6px 10px; text-align: left; }
.bubble th         { background: #f1f5f9; font-weight: 600; }
.bubble a          { color: var(--orange); text-decoration: underline; }

/* Timestamp */
.msg-ts {
  font-size: .68rem;
  color: var(--slate);
  margin-top: 3px;
  padding: 0 4px;
  align-self: flex-end;
}
.msg-row.user .msg-ts { text-align: right; }

/* Typing indicator */
.typing-row { display: flex; align-items: center; gap: 8px; }
.typing-dots {
  background: var(--bubble-ai);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  border-bottom-left-radius: 4px;
  padding: 12px 16px;
  display: flex; gap: 5px; align-items: center;
}
.typing-dots span {
  width: 8px; height: 8px;
  background: var(--slate);
  border-radius: 50%;
  animation: bounce .9s infinite ease-in-out;
}
.typing-dots span:nth-child(2) { animation-delay: .15s; }
.typing-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce {
  0%,80%,100% { transform: translateY(0); opacity:.4; }
  40%          { transform: translateY(-7px); opacity:1; }
}

/* ── Quick actions ───────────────────────────────────────────────────────── */
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 15%;
  background: var(--white);
  flex-shrink: 0;
}

.chip {
  background: var(--orange-pale);
  color: var(--orange-dark);
  border: 1.5px solid #99dfc3;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .1s;
  white-space: nowrap;
}
.chip:hover  { background: #ccf0e2; border-color: var(--orange); transform: translateY(-1px); }
.chip:active { transform: translateY(0); }

/* ── Escalation banner ───────────────────────────────────────────────────── */
.escalation-banner {
  display: none;
  background: #fef3c7;
  border-top: 2px solid #f59e0b;
  color: #92400e;
  font-size: .82rem;
  font-weight: 500;
  padding: 10px 18px;
  text-align: center;
  flex-shrink: 0;
}

/* ── Input area ──────────────────────────────────────────────────────────── */
.input-area {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 14px;
  margin: 0 15% 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 4px 24px rgba(0,0,0,.10), 0 1px 6px rgba(0,0,0,.06);
  flex-shrink: 0;
}

.attach-btn {
  cursor: pointer;
  color: var(--slate);
  padding: 8px;
  border-radius: 10px;
  transition: color .2s, background .2s;
  display: flex; align-items: center;
  flex-shrink: 0;
}
.attach-btn:hover { color: var(--orange); background: var(--orange-pale); }

.input-wrapper {
  flex: 1;
  background: var(--slate-pale);
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px 12px;
  transition: border-color .2s;
}
.input-wrapper:focus-within { border-color: var(--orange); }

.input-wrapper textarea {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  font-family: var(--font);
  font-size: .9rem;
  color: var(--navy);
  max-height: 150px;
  overflow-y: auto;
  line-height: 1.5;
}

.send-btn {
  background: var(--orange);
  border: none;
  border-radius: 12px;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--white);
  flex-shrink: 0;
  transition: background .2s, transform .1s;
  box-shadow: 0 2px 8px rgba(0,167,103,.35);
}
.send-btn:hover  { background: var(--orange-dark); }
.send-btn:active { transform: scale(.95); }
.send-btn:disabled { background: #cbd5e1; box-shadow: none; cursor: not-allowed; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.chat-footer {
  padding: 6px 15% 10px;
  font-size: .7rem;
  color: var(--slate);
  text-align: center;
  flex-shrink: 0;
}
.chat-footer a { color: var(--orange); text-decoration: none; }
.chat-footer a:hover { text-decoration: underline; }

/* ── Scrollbars ──────────────────────────────────────────────────────────── */
::-webkit-scrollbar              { width: 5px; }
::-webkit-scrollbar-track        { background: transparent; }
::-webkit-scrollbar-thumb        { background: #cbd5e1; border-radius: 3px; }
.sessions-list::-webkit-scrollbar-thumb { background: #334155; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Sidebar: slide-in overlay on mobile */
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: 260px !important;
    min-width: 0 !important;
    transform: translateX(-100%);
    transition: transform .3s ease;
    z-index: 200;
  }
  .app-shell.sidebar-open .sidebar {
    transform: translateX(0);
  }
  .app-shell.sidebar-open .sidebar-overlay {
    display: block;
  }
  /* sidebar-collapsed has no effect on mobile */
  .app-shell.sidebar-collapsed .sidebar {
    width: 260px !important;
    transform: translateX(-100%);
  }

  /* Header */
  .chat-header { padding: 10px 12px; }
  .header-title { font-size: .88rem; }
  .logo-badge-sm { display: none; }
  /* Hide language label text, keep dropdown compact */
  .lang-select { font-size: .72rem; padding: 5px 6px; max-width: 90px; }

  /* Messages: remove wide desktop padding */
  .chat-messages { padding: 14px 12px; gap: 10px; }

  /* Bubbles */
  .bubble { max-width: 88%; font-size: .85rem; padding: 10px 13px; }

  /* Quick action chips: horizontal scroll instead of wrapping */
  .quick-actions {
    padding: 8px 12px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .quick-actions::-webkit-scrollbar { display: none; }
  .chip { flex-shrink: 0; font-size: .76rem; padding: 6px 12px; }

  /* Input area: flush with edges, no side margin */
  .input-area {
    margin: 0 10px 10px;
    margin-bottom: calc(10px + env(safe-area-inset-bottom));
    padding: 8px 10px;
    border-radius: 16px;
  }

  /* Footer */
  .chat-footer {
    padding: 4px 12px 8px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    font-size: .65rem;
  }

  /* Tables inside bubbles: horizontal scroll */
  .bubble table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@media (min-width: 769px) {
  /* Overlay never shown on desktop */
  .sidebar-overlay { display: none !important; }
}

/* ── Utility ─────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Auth overlay ────────────────────────────────────────────────────────── */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.auth-card {
  background: var(--white);
  border-radius: 20px;
  padding: 36px 32px 28px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 24px 64px rgba(0,0,0,.35);
  animation: fadeUp .3s ease;
}

.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-title { font-size: 1.3rem; font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.auth-sub   { font-size: .82rem; color: var(--slate); }

.auth-step { display: flex; flex-direction: column; gap: 12px; }
.auth-label { font-size: .88rem; color: var(--navy); font-weight: 500; }

.auth-input-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--slate-pale);
  transition: border-color .2s;
}
.auth-input-wrap:focus-within { border-color: var(--orange); }

.auth-prefix {
  padding: 12px 10px 12px 14px;
  font-size: .9rem;
  color: var(--slate);
  background: var(--slate-pale);
  border-right: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.auth-input {
  width: 100%;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: .9rem;
  color: var(--navy);
  background: var(--slate-pale);
  outline: none;
  transition: border-color .2s;
  font-family: var(--font);
}
.auth-input-wrap .auth-input {
  border: none;
  border-radius: 0;
  background: transparent;
}
.auth-input:focus { border-color: var(--orange); }

.auth-btn {
  background: var(--orange);
  color: var(--white);
  border: none;
  border-radius: 10px;
  padding: 13px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: background .2s, transform .1s;
}
.auth-btn:hover  { background: var(--orange-dark); }
.auth-btn:active { transform: scale(.98); }
.auth-btn:disabled { background: #94a3b8; cursor: not-allowed; }

.auth-link-btn {
  background: none;
  border: none;
  color: var(--orange);
  font-size: .82rem;
  cursor: pointer;
  text-align: center;
  padding: 2px;
  text-decoration: underline;
}

.auth-hint {
  font-size: .78rem;
  text-align: center;
  color: var(--slate);
  min-height: 1em;
}
.auth-hint.error   { color: #dc2626; }
.auth-hint.success { color: #16a34a; }

.auth-sebi {
  margin-top: 20px;
  font-size: .68rem;
  color: #94a3b8;
  text-align: center;
}

/* OTP boxes */
.otp-inputs {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.otp-box {
  width: 46px;
  height: 52px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  outline: none;
  background: var(--slate-pale);
  color: var(--navy);
  transition: border-color .2s, background .2s;
  font-family: var(--font);
}
.otp-box:focus { border-color: var(--orange); background: #f0fdf9; }

/* Welcome credit screen */
.welcome-credit {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.credit-icon    { font-size: 3rem; }
.credit-title   { font-size: 1.05rem; font-weight: 700; color: var(--navy); }
.credit-amount  {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--orange);
  background: var(--orange-pale);
  padding: 12px 28px;
  border-radius: 16px;
  margin: 4px 0;
}
.credit-desc { font-size: .85rem; color: var(--slate); }

/* ── Header wallet pill ──────────────────────────────────────────────────── */
.header-wallet {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0,167,103,.15);
  border: 1px solid rgba(0,167,103,.3);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--orange);
  cursor: pointer;
  transition: background .2s;
  white-space: nowrap;
}
.header-wallet:hover { background: rgba(0,167,103,.25); }

/* ── Low-balance banner ──────────────────────────────────────────────────── */
.low-balance-banner {
  background: #fef3c7;
  border-top: 2px solid #f59e0b;
  color: #92400e;
  font-size: .82rem;
  font-weight: 500;
  padding: 8px 18px;
  text-align: center;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.banner-recharge-btn {
  background: #f59e0b;
  color: var(--white);
  border: none;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
}
.banner-recharge-btn:hover { background: #d97706; }

/* ── Recharge modal ──────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 8000;
  padding: 20px;
  backdrop-filter: blur(3px);
}

.modal-card {
  background: var(--white);
  border-radius: 18px;
  padding: 28px 28px 24px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  animation: fadeUp .25s ease;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 { font-size: 1.05rem; font-weight: 700; color: var(--navy); }

.modal-close {
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--slate);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: color .15s, background .15s;
}
.modal-close:hover { color: var(--navy); background: var(--slate-pale); }

.modal-sub { font-size: .85rem; color: var(--slate); margin-top: -6px; }
.modal-note { font-size: .72rem; color: #94a3b8; text-align: center; margin-top: -4px; }

.recharge-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recharge-option-btn {
  flex: 1;
  min-width: 70px;
  padding: 9px 6px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  background: var(--slate-pale);
  color: var(--navy);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  text-align: center;
}
.recharge-option-btn:hover    { border-color: var(--orange); background: var(--orange-pale); }
.recharge-option-btn.selected { border-color: var(--orange); background: var(--orange-pale); color: var(--orange-dark); }

.recharge-custom { display: flex; flex-direction: column; gap: 4px; }

