/* =====================
   Anu.ai Dashboard — Sidebar Layout
   ===================== */

:root {
  --brand-main: #dedfff;
  --brand-secondary: #ffffff;
  --brand-neutral: #8e90a6;
  --brand-bg: #F8F9FC;
  --brand-heading: #3b4259;
  --brand-heading-hover: #2f354a;
  --danger: #e53935;
  --success: #2e7d32;
  --sidebar-w: 240px;
  --transition: 0.2s ease;
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--brand-bg);
  color: var(--brand-neutral);
  min-height: 100vh;
  overflow-x: hidden;
}

.glass-card {
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(59,66,89,0.08);
  box-shadow: 0 4px 20px -6px rgba(59,66,89,0.08);
}

/* =====================
   Loading
   ===================== */
.loading-screen {
  position: fixed; inset: 0;
  background: var(--brand-bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem;
  z-index: 9999;
}
.loading-logo { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 2rem; font-weight: 800; color: var(--brand-heading); }
.loading-spinner { width: 32px; height: 32px; border: 3px solid var(--brand-main); border-top-color: var(--brand-heading); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =====================
   Auth Screens
   ===================== */
.auth-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem; background: var(--brand-bg); }
.auth-card { width: 100%; max-width: 440px; border-radius: 24px; padding: 2.5rem 2rem; text-align: center; }
.auth-logo { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.5rem; font-weight: 800; color: var(--brand-heading); margin-bottom: 1.5rem; }
.auth-card h1 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.5rem; font-weight: 700; color: var(--brand-heading); margin-bottom: 0.25rem; }
.auth-sub { font-size: 0.9rem; color: var(--brand-neutral); margin-bottom: 2rem; }
.auth-error { background: #fff0f0; color: var(--danger); border-radius: 10px; padding: 0.6rem 1rem; font-size: 0.82rem; font-weight: 500; margin-top: 0.75rem; display: none; text-align: center; }
.auth-error.show { display: block; }
.auth-switch { margin-top: 1.5rem; font-size: 0.85rem; color: var(--brand-neutral); }
.auth-switch a { color: var(--brand-heading); font-weight: 600; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

/* =====================
   Forms
   ===================== */
.form-group { text-align: left; margin-bottom: 1rem; flex: 1; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--brand-heading); margin-bottom: 0.35rem; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 0.65rem 0.9rem; border: 1.5px solid rgba(59,66,89,0.12); border-radius: 10px;
  font-family: 'Inter', sans-serif; font-size: 0.88rem; color: var(--brand-heading); background: rgba(255,255,255,0.9);
  transition: border-color var(--transition); outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--brand-heading); box-shadow: 0 0 0 3px rgba(222,223,255,0.5); }
.form-group textarea { resize: vertical; }
.form-row { display: flex; gap: 0.75rem; }
.hint { font-weight: 400; color: var(--brand-neutral); font-size: 0.75rem; }

.btn-primary {
  width: 100%; background: var(--brand-heading); color: var(--brand-secondary);
  font-family: 'Inter', sans-serif; font-size: 0.92rem; font-weight: 600; padding: 0.75rem; border: none; border-radius: 12px;
  cursor: pointer; transition: background var(--transition), transform var(--transition);
  box-shadow: 0 6px 20px -6px rgba(59,66,89,0.25); margin-top: 0.5rem;
}
.btn-primary:hover { background: var(--brand-heading-hover); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-sm { width: auto; padding: 0.5rem 1.25rem; font-size: 0.82rem; border-radius: 10px; margin-top: 0; }
.btn-sm-outline { background: transparent; border: 1.5px solid rgba(59,66,89,0.15); color: var(--brand-neutral); font-family: 'Inter', sans-serif; font-size: 0.78rem; font-weight: 500; padding: 0.4rem 0.9rem; border-radius: 8px; cursor: pointer; transition: all var(--transition); }
.btn-sm-outline:hover { border-color: var(--brand-heading); color: var(--brand-heading); }
.btn-sm-outline:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-danger-outline { background: transparent; border: 1.5px solid var(--danger); color: var(--danger); font-family: 'Inter', sans-serif; font-size: 0.82rem; font-weight: 600; padding: 0.5rem 1.25rem; border: none; border-radius: 10px; margin-top: 0; width: auto; cursor: pointer; border: 1.5px solid var(--danger); }
.btn-danger-outline:hover { background: var(--danger); color: white; }

/* =====================
   App Shell — Sidebar + Content
   ===================== */
.app-shell { display: flex; height: 100vh; overflow: hidden; }

/* Sidebar */
.sidebar {
  width: var(--sidebar-w); background: var(--brand-heading); color: rgba(255,255,255,0.7);
  display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; z-index: 60;
  transition: transform 0.3s ease;
}

.sidebar-top { padding: 1.25rem 1.25rem 1rem; display: flex; align-items: center; gap: 0.6rem; }
.sidebar-logo { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.2rem; font-weight: 800; color: white; letter-spacing: -0.02em; }
.sidebar-badge { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 8px; border-radius: 10px; background: rgba(222,223,255,0.2); color: var(--brand-main); }

/* Nav */
.sidebar-nav { flex: 1; padding: 0.5rem 0.75rem; display: flex; flex-direction: column; gap: 0.25rem; }
.nav-item {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.65rem 0.85rem; border-radius: 10px;
  font-family: 'Inter', sans-serif; font-size: 0.88rem; font-weight: 500; color: rgba(255,255,255,0.6);
  background: transparent; border: none; cursor: pointer; width: 100%; text-align: left;
  transition: background var(--transition), color var(--transition);
}
.nav-item:hover { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.9); }
.nav-item.active { background: rgba(222,223,255,0.15); color: white; font-weight: 600; }
.nav-item svg { flex-shrink: 0; opacity: 0.7; }
.nav-item.active svg { opacity: 1; }
.nav-badge { margin-left: auto; background: var(--danger); color: white; font-size: 0.65rem; font-weight: 700; padding: 1px 7px; border-radius: 10px; }

/* Sidebar bottom */
.sidebar-bottom { padding: 0.75rem; border-top: 1px solid rgba(255,255,255,0.08); }
.sidebar-bottom .nav-item { margin-bottom: 0.5rem; }
.sidebar-user { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.5rem; }
.sidebar-user-avatar { width: 32px; height: 32px; border-radius: 8px; background: rgba(222,223,255,0.2); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem; flex-shrink: 0; }
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { font-size: 0.78rem; font-weight: 600; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-email { font-size: 0.65rem; color: rgba(255,255,255,0.4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-logout { background: transparent; border: none; color: rgba(255,255,255,0.3); cursor: pointer; padding: 4px; transition: color var(--transition); flex-shrink: 0; }
.sidebar-logout:hover { color: var(--danger); }

/* Mobile header */
.mobile-header { display: none; }

/* Content Area */
.content-area { flex: 1; margin-left: var(--sidebar-w); height: 100vh; overflow-y: auto; }

/* Panels */
.panel { display: none; padding: 1.5rem 2rem; max-width: 1100px; margin: 0 auto; }
.panel.active { display: block; }
.panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 0.75rem; }
.panel-header h1 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.5rem; font-weight: 700; color: var(--brand-heading); }
.panel-actions { display: flex; gap: 0.5rem; }
.sub-title { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1rem; font-weight: 600; color: var(--brand-heading); margin: 1.25rem 0 0.75rem; }

/* =====================
   Stats
   ===================== */
.stats-row { display: flex; gap: 0.75rem; margin-bottom: 1.5rem; }
.stat-card { flex: 1; border-radius: 14px; padding: 1rem; text-align: center; }
.stat-number { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 2rem; font-weight: 800; color: var(--brand-heading); }
.stat-active { color: var(--success); }
.stat-suspended { color: var(--danger); }
.stat-label { font-size: 0.75rem; font-weight: 500; color: var(--brand-neutral); margin-top: 0.2rem; }

/* =====================
   Search + Client List
   ===================== */
.search-bar { margin-bottom: 1rem; }
.search-bar input { width: 100%; padding: 0.65rem 1rem; border: 1.5px solid rgba(59,66,89,0.08); border-radius: 12px; font-family: 'Inter', sans-serif; font-size: 0.88rem; color: var(--brand-heading); background: rgba(255,255,255,0.8); outline: none; }
.search-bar input:focus { border-color: var(--brand-heading); box-shadow: 0 0 0 3px rgba(222,223,255,0.4); }
.clients-list { display: flex; flex-direction: column; gap: 0.5rem; }
.client-card { display: flex; align-items: center; gap: 0.85rem; padding: 0.85rem 1rem; border-radius: 14px; cursor: pointer; transition: box-shadow var(--transition), transform var(--transition); }
.client-card:hover { box-shadow: 0 6px 24px -8px rgba(59,66,89,0.12); transform: translateY(-1px); }
.client-avatar { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-main); color: var(--brand-heading); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; flex-shrink: 0; }
.client-info { flex: 1; min-width: 0; }
.client-name { font-size: 0.92rem; font-weight: 600; color: var(--brand-heading); }
.client-company { font-size: 0.75rem; color: var(--brand-neutral); }
.client-meta { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.client-plan { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; padding: 2px 8px; border-radius: 10px; background: var(--brand-main); color: var(--brand-heading); }
.client-status { font-size: 0.65rem; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
.client-status.active { background: #e8f5e9; color: var(--success); }
.client-status.suspended { background: #ffebee; color: var(--danger); }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--brand-neutral); font-size: 0.9rem; }

/* Client card actions */
.client-actions { display: flex; gap: 0.35rem; flex-shrink: 0; }
.btn-view-as, .btn-edit-client { background: transparent; border: 1.5px solid rgba(59,66,89,0.12); width: 34px; height: 34px; border-radius: 8px; cursor: pointer; font-size: 0.9rem; display: flex; align-items: center; justify-content: center; transition: all var(--transition); }
.btn-view-as:hover { background: var(--brand-main); border-color: var(--brand-heading); }
.btn-edit-client:hover { background: rgba(59,66,89,0.06); border-color: var(--brand-heading); }

/* Viewing as Banner */
.viewing-as-banner { position: fixed; top: 0; left: var(--sidebar-w); right: 0; z-index: 100; background: linear-gradient(135deg, var(--brand-heading) 0%, #2f354a 100%); color: white; display: flex; align-items: center; justify-content: space-between; padding: 0.6rem 2rem; font-size: 0.85rem; box-shadow: 0 2px 12px rgba(0,0,0,0.15); }
.viewing-as-banner strong { color: var(--brand-main); }
.btn-exit-view { background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.25); color: white; font-family: 'Inter', sans-serif; font-size: 0.78rem; font-weight: 600; padding: 0.35rem 1rem; border-radius: 8px; cursor: pointer; transition: background var(--transition); }
.btn-exit-view:hover { background: rgba(255,255,255,0.25); }

@media (max-width: 768px) {
  .viewing-as-banner { left: 0; padding: 0.5rem 1rem; font-size: 0.78rem; }
}

/* =====================
   Integrations
   ===================== */
.connect-cards { display: flex; flex-direction: column; gap: 0.6rem; }
.connect-card { display: flex; align-items: center; gap: 1rem; padding: 1.1rem; border-radius: 14px; }
.connect-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.connect-info { flex: 1; min-width: 0; }
.connect-name { font-size: 0.92rem; font-weight: 600; color: var(--brand-heading); }
.connect-desc { font-size: 0.75rem; color: var(--brand-neutral); }
.btn-connect { background: var(--brand-heading); color: white; font-family: 'Inter', sans-serif; font-size: 0.8rem; font-weight: 600; padding: 0.45rem 1.1rem; border: none; border-radius: 10px; cursor: pointer; white-space: nowrap; flex-shrink: 0; transition: background var(--transition); }
.btn-connect:hover { background: var(--brand-heading-hover); }
.btn-connect-disabled { background: rgba(59,66,89,0.12); color: var(--brand-neutral); cursor: not-allowed; }
.btn-connect-disabled:hover { background: rgba(59,66,89,0.12); }
.btn-disconnect { background: transparent; border: 1.5px solid var(--danger); color: var(--danger); font-family: 'Inter', sans-serif; font-size: 0.72rem; font-weight: 600; padding: 0.35rem 0.85rem; border-radius: 8px; cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.btn-disconnect:hover { background: var(--danger); color: white; }
.connected-pages-list { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.page-card { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; background: rgba(255,255,255,0.7); border: 1px solid rgba(59,66,89,0.05); border-radius: 12px; }
.page-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.page-info { flex: 1; }
.page-name { font-size: 0.85rem; font-weight: 600; color: var(--brand-heading); }
.page-type { font-size: 0.68rem; color: var(--brand-neutral); }
.page-status { font-size: 0.65rem; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: #e8f5e9; color: var(--success); }

/* Toggle switch */
.page-toggle { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; cursor: pointer; }
.page-toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: rgba(59,66,89,0.15); border-radius: 24px; transition: background 0.2s; }
.toggle-slider::before { content: ''; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: transform 0.2s; box-shadow: 0 1px 4px rgba(0,0,0,0.15); }
.page-toggle input:checked + .toggle-slider { background: var(--success); }
.page-toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* =====================
   Automations
   ===================== */
.panel-desc { font-size: 0.85rem; color: var(--brand-neutral); margin-bottom: 1.5rem; line-height: 1.6; }
.automation-list { display: flex; flex-direction: column; gap: 0.5rem; }
.automation-card { display: flex; align-items: center; gap: 0.85rem; padding: 1rem 1.1rem; border-radius: 14px; cursor: pointer; transition: box-shadow var(--transition), transform var(--transition); }
.automation-card:hover { box-shadow: 0 6px 24px -8px rgba(59,66,89,0.12); transform: translateY(-1px); }
.auto-avatar { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-main); color: var(--brand-heading); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; flex-shrink: 0; }
.auto-info { flex: 1; min-width: 0; }
.auto-name { font-size: 0.92rem; font-weight: 600; color: var(--brand-heading); }
.auto-url { font-size: 0.72rem; color: var(--brand-neutral); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auto-status { font-size: 0.65rem; font-weight: 700; padding: 2px 10px; border-radius: 10px; flex-shrink: 0; }
.auto-status.on { background: #e8f5e9; color: #2e7d32; }
.auto-status.off { background: rgba(59,66,89,0.08); color: var(--brand-neutral); }
.automation-client-name { font-size: 1rem; font-weight: 700; color: var(--brand-heading); padding: 0.5rem 0; }
.api-key-row { display: flex; gap: 0.5rem; }
.api-key-row input { flex: 1; font-family: monospace; font-size: 0.8rem; background: var(--brand-bg); }

/* =====================
   Diagnostics
   ===================== */
.diagnostics-list { display: flex; flex-direction: column; gap: 0.4rem; }
.diag-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; background: rgba(255,255,255,0.7); border: 1px solid rgba(59,66,89,0.05); border-radius: 12px; font-size: 0.85rem; }
.diag-status { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.diag-status.ok { background: #2e7d32; }
.diag-status.warn { background: #f9a825; }
.diag-status.fail { background: #e53935; }
.diag-label { font-weight: 600; color: var(--brand-heading); }
.diag-value { color: var(--brand-neutral); font-size: 0.78rem; margin-left: auto; }
.diagnostics-results { margin-top: 0.75rem; padding: 1rem; background: var(--brand-heading); color: rgba(255,255,255,0.85); border-radius: 12px; font-family: monospace; font-size: 0.75rem; line-height: 1.6; white-space: pre-wrap; max-height: 400px; overflow-y: auto; }

/* =====================
   Inbox — Conversations
   ===================== */
.inbox-layout { display: flex; height: calc(100vh - 120px); border-radius: 14px; overflow: hidden; background: white; border: 1px solid rgba(59,66,89,0.06); }

/* Conversation list */
.conv-list { width: 340px; flex-shrink: 0; overflow-y: auto; border-right: 1px solid rgba(59,66,89,0.06); }
.conv-item { display: flex; align-items: center; gap: 0.7rem; padding: 0.85rem 1rem; cursor: pointer; border-bottom: 1px solid rgba(59,66,89,0.04); transition: background var(--transition); }
.conv-item:hover { background: rgba(222,223,255,0.2); }
.conv-item.active { background: rgba(222,223,255,0.35); }
.conv-item.unread { background: rgba(222,223,255,0.12); }
.conv-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-main); color: var(--brand-heading); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; flex-shrink: 0; }
.conv-info { flex: 1; min-width: 0; }
.conv-name { font-size: 0.88rem; font-weight: 600; color: var(--brand-heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-last-msg { font-size: 0.75rem; color: var(--brand-neutral); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.conv-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 0.3rem; flex-shrink: 0; }
.conv-time { font-size: 0.62rem; color: var(--brand-neutral); }
.conv-platform-badge { font-size: 0.58rem; font-weight: 700; padding: 1px 6px; border-radius: 6px; }
.conv-platform-badge.messenger { background: rgba(37,99,235,0.08); color: #1565c0; }
.conv-platform-badge.instagram { background: rgba(236,72,153,0.08); color: #c2185b; }
.conv-unread-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-heading); }

/* Chat area */
.conv-chat { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.conv-chat-header { display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem 1.25rem; border-bottom: 1px solid rgba(59,66,89,0.06); background: white; }
.conv-back-btn { display: none; background: transparent; border: 1.5px solid rgba(59,66,89,0.12); color: var(--brand-heading); width: 32px; height: 32px; border-radius: 8px; cursor: pointer; font-size: 1rem; align-items: center; justify-content: center; }
.conv-chat-name { font-size: 0.95rem; font-weight: 600; color: var(--brand-heading); }
.conv-chat-platform { font-size: 0.65rem; font-weight: 600; padding: 2px 8px; border-radius: 8px; background: rgba(59,66,89,0.06); color: var(--brand-neutral); }

/* Messages */
.conv-messages { flex: 1; overflow-y: auto; padding: 1.25rem 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; background: linear-gradient(180deg, var(--brand-bg) 0%, rgba(222,223,255,0.08) 100%); }
.msg-bubble { max-width: 70%; padding: 0.65rem 1rem; border-radius: 18px; font-size: 0.88rem; line-height: 1.55; word-wrap: break-word; position: relative; }
.msg-incoming { align-self: flex-start; background: white; color: var(--brand-heading); box-shadow: 0 1px 4px rgba(59,66,89,0.06); border-bottom-left-radius: 4px; }
.msg-outgoing { align-self: flex-end; background: linear-gradient(135deg, var(--brand-heading) 0%, #2f354a 100%); color: white; border-bottom-right-radius: 4px; box-shadow: 0 2px 8px rgba(59,66,89,0.15); }
.msg-time { font-size: 0.58rem; margin-top: 0.2rem; opacity: 0.45; }
.msg-incoming .msg-time { text-align: left; }
.msg-outgoing .msg-time { text-align: right; }
.msg-date-divider { text-align: center; font-size: 0.7rem; color: var(--brand-neutral); padding: 0.5rem 0; opacity: 0.6; }

/* Reply bar */
.conv-reply-bar { display: flex; gap: 0.5rem; padding: 0.85rem 1.25rem; border-top: 1px solid rgba(59,66,89,0.06); background: white; }
.conv-reply-input { flex: 1; padding: 0.6rem 1rem; border: 1.5px solid rgba(59,66,89,0.1); border-radius: 12px; font-family: 'Inter', sans-serif; font-size: 0.88rem; color: var(--brand-heading); outline: none; background: var(--brand-bg); }
.conv-reply-input:focus { border-color: var(--brand-heading); }
.conv-send-btn { background: var(--brand-heading); color: white; font-family: 'Inter', sans-serif; font-size: 0.82rem; font-weight: 600; padding: 0.6rem 1.25rem; border: none; border-radius: 12px; cursor: pointer; white-space: nowrap; }
.conv-send-btn:hover { background: var(--brand-heading-hover); }

/* =====================
   Settings
   ===================== */
.settings-section { border-radius: 16px; padding: 1.5rem; }
.settings-section h3 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1rem; font-weight: 700; color: var(--brand-heading); margin-bottom: 1rem; }
.settings-text { font-size: 0.88rem; color: var(--brand-neutral); margin-bottom: 0.5rem; }
.settings-text strong { color: var(--brand-heading); }

/* =====================
   Modal
   ===================== */
.modal-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(59,66,89,0.35); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.modal { width: 100%; max-width: 540px; border-radius: 20px; padding: 1.75rem; max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.modal-header h2 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.15rem; font-weight: 700; color: var(--brand-heading); }
.modal-close { background: transparent; border: 1.5px solid rgba(59,66,89,0.12); color: var(--brand-neutral); width: 32px; height: 32px; border-radius: 50%; font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.modal-close:hover { border-color: var(--danger); color: var(--danger); }

/* =====================
   Toast
   ===================== */
.toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(2rem); background: var(--brand-heading); color: white; font-family: 'Inter', sans-serif; font-size: 0.85rem; font-weight: 500; padding: 0.65rem 1.5rem; border-radius: 50px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); opacity: 0; transition: opacity 0.3s, transform 0.3s; pointer-events: none; z-index: 1000; white-space: nowrap; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* =====================
   Responsive
   ===================== */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); z-index: 200; }
  .sidebar.open { transform: translateX(0); }
  .content-area { margin-left: 0; }
  .mobile-header { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; background: var(--brand-heading); position: sticky; top: 0; z-index: 50; }
  .mobile-menu-btn { background: transparent; border: none; color: white; font-size: 1.5rem; cursor: pointer; padding: 0; line-height: 1; }
  .mobile-logo { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.1rem; font-weight: 800; color: white; }
  .panel { padding: 1rem; }
  .panel-header h1 { font-size: 1.2rem; }
  .inbox-layout { flex-direction: column; min-height: auto; }
  .conv-list { width: 100%; max-height: 400px; border-right: none; border-bottom: 1px solid rgba(59,66,89,0.06); }
  .conv-list.hidden-mobile { display: none; }
  .conv-chat { min-height: 400px; }
  .conv-back-btn { display: flex; }
  .stats-row { gap: 0.5rem; }
  .stat-number { font-size: 1.5rem; }
  .form-row { flex-direction: column; gap: 0; }
  .auth-card { padding: 2rem 1.25rem; }
}

@media (max-width: 480px) {
  .stat-number { font-size: 1.2rem; }
  .panel-header { flex-direction: column; align-items: flex-start; }
}
