/* ============================================================
   UPI FRAUD DETECTION CHATBOT — style.css
   Full-Responsive & Polished Theme System
   ============================================================ */

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-primary:    #0a0a0f;
  --bg-secondary:  #0f0f18;
  --bg-sidebar:    #0c0c14;
  --bg-input:      #13131e;
  --bg-user-msg:   #111827;
  --bg-bot-msg:    #0f0f18;
  --bg-chip:       #13131e;
  --bg-chip-hover: #1a1a2e;

  --accent:        #7c6dfa;
  --accent-dim:    rgba(124, 109, 250, 0.10);
  --accent-glow:   rgba(124, 109, 250, 0.35);
  --accent-2:      #c084fc;
  --accent-3:      #38bdf8;

  --danger:        #f87171;
  --danger-dim:    rgba(248, 113, 113, 0.10);
  --warning:       #fbbf24;
  --warning-dim:   rgba(251, 191, 36, 0.10);
  --safe:          #34d399;
  --safe-dim:      rgba(52, 211, 153, 0.10);

  --text-primary:  #e8e8f0;
  --text-secondary:#8888aa;
  --text-muted:    #44445a;

  --border:        rgba(255, 255, 255, 0.05);
  --border-input:  rgba(255, 255, 255, 0.08);
  --shadow-sm:     0 2px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg:     0 12px 40px rgba(0, 0, 0, 0.7);
  --glass:         rgba(255, 255, 255, 0.03);

  --sidebar-width: 270px;
  --radius-sm:     10px;
  --radius-md:     16px;
  --radius-lg:     22px;
  --transition:    0.22s ease;
}

html, body {
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
  width: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  display: flex;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  max-width: 100vw;
  position: relative;
  background-image:
    radial-gradient(ellipse 80% 60% at 20% -10%, rgba(124, 109, 250, 0.09) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 110%, rgba(192, 132, 252, 0.07) 0%, transparent 60%);
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.10); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.20); }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  position: relative;
  will-change: margin-left, transform;
}

/* Collapsed on Desktop */
.sidebar.collapsed {
  margin-left: calc(-1 * var(--sidebar-width));
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 109, 250, 0.4), transparent);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px 16px;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 11px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  box-shadow: 0 0 20px var(--accent-glow), 0 4px 12px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
  position: relative;
}

.logo-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
  background: linear-gradient(135deg, #e8e8f0, var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.new-chat-btn, .sidebar-close-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: var(--accent-dim);
  border: 1px solid rgba(124, 109, 250, 0.2);
  border-radius: 9px;
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.sidebar-close-btn {
  background: var(--glass);
  border-color: var(--border-input);
  color: var(--text-secondary);
}

.new-chat-btn:hover {
  background: rgba(124, 109, 250, 0.22);
  box-shadow: 0 0 14px var(--accent-glow);
  transform: scale(1.05);
  color: #fff;
}

.sidebar-close-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: rgba(124, 109, 250, 0.3);
  transform: scale(1.05);
}

.new-chat-btn:active, .sidebar-close-btn:active {
  transform: scale(0.95);
}

.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  padding: 18px 16px 7px;
}

.chat-history {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 13px;
  transition: all var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: none;
}

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

.history-item.active {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(124, 109, 250, 0.18);
}

.history-item svg {
  flex-shrink: 0;
  opacity: 0.75;
}

.history-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Sidebar footer */
.sidebar-footer {
  padding: 14px 16px 18px;
  border-top: 1px solid var(--border);
}

.shield-badge {
  display: flex;
  align-items: center;
  gap: 9px;
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.08), rgba(52, 211, 153, 0.04));
  border: 1px solid rgba(52, 211, 153, 0.18);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--safe);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 11px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.disclaimer {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Backdrop overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 99;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg-primary);
  min-width: 0;
  position: relative;
  width: 100%;
}

.main-content::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(124, 109, 250, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 109, 250, 0.015) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  flex-shrink: 0;
  gap: 12px;
  min-height: 56px;
  position: relative;
  z-index: 10;
}

.menu-btn, .clear-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  background: var(--glass);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}

.menu-btn:hover, .clear-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: rgba(124, 109, 250, 0.3);
}

.menu-btn.active, .menu-btn:active, .clear-btn:active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: rgba(124, 109, 250, 0.35);
  transform: scale(0.96);
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  justify-content: center;
  min-width: 0;
  text-align: center;
}

.title-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-dot {
  width: 7px;
  height: 7px;
  min-width: 7px;
  background: var(--safe);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
  animation: pulse 2.5s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.8); }
}

.model-pill {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--accent-dim);
  border: 1px solid rgba(124, 109, 250, 0.22);
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--transition);
}

.model-pill.fallback {
  background: var(--warning-dim);
  border-color: rgba(251, 191, 36, 0.28);
  color: var(--warning);
}

/* ============================================================
   CHAT CONTAINER
   ============================================================ */
.chat-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px 0 12px;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  z-index: 1;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* ============================================================
   MESSAGE BUBBLES
   ============================================================ */
.message-row {
  display: flex;
  gap: 14px;
  padding: 10px 24px;
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  animation: fadeSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(14px) scale(0.99); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.message-row.bot-row { align-items: flex-start; }
.message-row.user-row { flex-direction: row-reverse; }

.avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  margin-top: 3px;
  position: relative;
}

.bot-avatar {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 16px var(--accent-glow), 0 4px 10px rgba(0, 0, 0, 0.4);
  font-size: 15px;
  color: #fff;
}

.user-avatar {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.bubble {
  max-width: min(720px, calc(100% - 50px));
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.75;
  word-break: break-word;
  overflow-wrap: break-word;
  position: relative;
}

.bot-bubble {
  background: var(--bg-bot-msg);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-top-left-radius: 4px;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.bot-bubble p { margin-bottom: 8px; }
.bot-bubble p:last-child { margin-bottom: 0; }

.user-bubble {
  background: linear-gradient(135deg, #1e1b4b, #1a1040);
  border: 1px solid rgba(124, 109, 250, 0.18);
  color: var(--text-primary);
  border-top-right-radius: 4px;
  box-shadow: var(--shadow-sm);
}

.user-bubble p { margin-bottom: 0; }

/* Verdict cards */
.verdict-card {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: flex-start;
  gap: 13px;
  font-size: 13.5px;
  line-height: 1.65;
  position: relative;
  overflow: hidden;
}

.verdict-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  opacity: 0.5;
}

.verdict-card.danger {
  background: var(--danger-dim);
  border: 1px solid rgba(248, 113, 113, 0.25);
}
.verdict-card.danger::before { background: linear-gradient(90deg, transparent, var(--danger), transparent); }

.verdict-card.warning {
  background: var(--warning-dim);
  border: 1px solid rgba(251, 191, 36, 0.25);
}
.verdict-card.warning::before { background: linear-gradient(90deg, transparent, var(--warning), transparent); }

.verdict-card.safe {
  background: var(--safe-dim);
  border: 1px solid rgba(52, 211, 153, 0.25);
}
.verdict-card.safe::before { background: linear-gradient(90deg, transparent, var(--safe), transparent); }

.verdict-icon { font-size: 22px; flex-shrink: 0; margin-top: 1px; }

.verdict-text strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.verdict-card.danger .verdict-text strong { color: var(--danger); }
.verdict-card.warning .verdict-text strong { color: var(--warning); }
.verdict-card.safe .verdict-text strong { color: var(--safe); }

.verdict-text p { color: var(--text-secondary); font-size: 13px; margin-bottom: 6px; }
.verdict-text p:last-child { margin-bottom: 0; }

/* Tips list */
.tip-list {
  margin: 8px 0 4px;
  padding-left: 0;
  list-style: none;
}
.tip-list li {
  position: relative;
  padding: 3px 0 3px 20px;
  margin-bottom: 4px;
  color: var(--text-secondary);
  font-size: 13px;
}
.tip-list li::before {
  content: "›";
  position: absolute;
  left: 4px;
  color: var(--accent);
  font-weight: 700;
  font-size: 17px;
  line-height: 1;
  top: 2px;
}

/* Typing indicator */
.typing-row { opacity: 0; animation: fadeSlideIn 0.3s ease 0.08s forwards; }

.typing-bubble {
  background: var(--bg-bot-msg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  border-top-left-radius: 4px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: var(--shadow-sm);
}

.typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: bounce 1.3s ease-in-out infinite;
  opacity: 0.6;
}
.typing-dot:nth-child(2) { animation-delay: 0.18s; }
.typing-dot:nth-child(3) { animation-delay: 0.36s; }

@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40%           { transform: translateY(-7px); opacity: 1; }
}

/* ============================================================
   SUGGESTION CHIPS
   ============================================================ */
.suggestion-area {
  padding: 8px 24px 14px;
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  flex-shrink: 0;
  transition: opacity 0.35s ease, max-height 0.4s ease, padding 0.35s ease;
  max-height: 220px;
  position: relative;
  z-index: 2;
}

.suggestion-area.hidden {
  opacity: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
  overflow: hidden;
}

.suggestion-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  background: var(--bg-chip);
  border: 1px solid var(--border-input);
  border-radius: 99px;
  padding: 7px 15px;
  font-size: 12.5px;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.chip:hover {
  background: var(--bg-chip-hover);
  color: var(--text-primary);
  border-color: rgba(124, 109, 250, 0.3);
  box-shadow: 0 0 14px rgba(124, 109, 250, 0.12);
  transform: translateY(-1px);
}
.chip:active { transform: translateY(0); }

/* ============================================================
   INPUT AREA
   ============================================================ */
.input-area {
  padding: 12px 24px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-lg);
  padding: 10px 12px 10px 20px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.input-wrapper:focus-within {
  border-color: rgba(124, 109, 250, 0.4);
  box-shadow: 0 0 0 3px rgba(124, 109, 250, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

textarea#userInput {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14.5px;
  line-height: 1.55;
  resize: none;
  min-height: 24px;
  max-height: 160px;
  overflow-y: auto;
}
textarea#userInput::placeholder { color: var(--text-muted); }

.send-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  box-shadow: 0 0 18px var(--accent-glow), 0 4px 10px rgba(0, 0, 0, 0.4);
}
.send-btn:hover:not(:disabled) {
  transform: scale(1.1);
  box-shadow: 0 0 28px var(--accent-glow), 0 4px 14px rgba(0, 0, 0, 0.4);
}
.send-btn:active:not(:disabled) { transform: scale(0.95); }
.send-btn:disabled {
  background: rgba(255, 255, 255, 0.08);
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.input-note {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 9px;
  line-height: 1.5;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   RESPONSIVE DESIGN ACROSS ALL SCREEN SIZES
   ============================================================ */

/* Tablets & Small Screens (<= 900px) */
@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    height: 100dvh;
    width: min(300px, 85vw);
    max-width: 85vw;
    transform: translateX(-100%);
    margin-left: 0 !important;
    z-index: 1000;
    box-shadow: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.08);
  }

  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .sidebar-overlay.open {
    opacity: 1;
    pointer-events: auto;
  }

  .main-content {
    width: 100%;
  }

  body.sidebar-open-mobile {
    overflow: hidden;
  }
}

/* Standard Mobile Devices (<= 680px) */
@media (max-width: 680px) {
  .topbar {
    padding: 8px 12px;
    gap: 8px;
    min-height: 52px;
  }

  .topbar-title {
    font-size: 13.5px;
    gap: 7px;
  }

  .model-pill {
    font-size: 9.5px;
    padding: 2px 7px;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .message-row {
    padding: 8px 12px;
    gap: 10px;
  }

  .avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    font-size: 13px;
  }

  .bubble {
    padding: 11px 14px;
    font-size: 13.5px;
    max-width: calc(100% - 44px);
  }

  .suggestion-area {
    padding: 6px 12px 10px;
  }

  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
    gap: 6px;
    -webkit-overflow-scrolling: touch;
  }
  .chips::-webkit-scrollbar {
    display: none;
  }

  .chip {
    white-space: nowrap;
    font-size: 12px;
    padding: 6px 12px;
    flex-shrink: 0;
  }

  .input-area {
    padding: 8px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .input-wrapper {
    padding: 8px 10px 8px 14px;
    border-radius: var(--radius-md);
  }

  textarea#userInput {
    font-size: 16px; /* Prevents auto-zoom in iOS Safari */
    line-height: 1.45;
  }

  .send-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
  }

  .input-note {
    font-size: 10.5px;
    margin-top: 6px;
  }
}

/* Small Screen Phones (<= 440px) */
@media (max-width: 440px) {
  .topbar {
    padding: 6px 10px;
    min-height: 48px;
  }

  .menu-btn, .clear-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
  }

  .topbar-title {
    font-size: 12.5px;
    gap: 6px;
  }

  .status-dot {
    width: 6px;
    height: 6px;
    min-width: 6px;
  }

  .model-pill {
    display: none; /* Hide model pill on tiny screens to preserve clean header layout */
  }

  .verdict-card {
    padding: 10px 12px;
    gap: 8px;
    font-size: 12.5px;
  }

  .verdict-icon {
    font-size: 18px;
  }

  .input-note {
    font-size: 10px;
  }
}

/* Extra Small Phones (<= 340px) */
@media (max-width: 340px) {
  .sidebar {
    width: 88vw;
  }

  .bubble {
    padding: 9px 11px;
    font-size: 13px;
  }

  .title-text {
    max-width: 135px;
  }
}
