/* ═══════════════════════════════════════════════════════════════════════
   clajama-missing.css — Restores 78+ missing CSS classes
   These classes were used in templates but never had corresponding CSS,
   or were accidentally removed during clajama.css deduplication.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── HEADER ──────────────────────────────────────────────────────── */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h, 56px);
  padding: 0 20px;
  background: var(--surface, #0e0e14);
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.06));
  position: relative;
  z-index: 100;
}
.header-left { display: flex; align-items: center; gap: 12px; }
.header-hamburger {
  background: none; border: none; color: var(--text-secondary, #8a8a9a);
  font-size: 20px; cursor: pointer; padding: 6px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
}
.header-hamburger:hover { background: var(--accent-tint, rgba(123,77,255,0.08)); color: var(--accent, #7B4DFF); }
.header-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.header-logo-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent, #7B4DFF), #9b6dff);
  color: #fff; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.header-logo-text { font-size: 15px; font-weight: 600; color: var(--text-primary, #fff); letter-spacing: -0.02em; }
.header-center { flex: 1; display: flex; justify-content: center; padding: 0 24px; }
.header-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-deep, #07070B); border: 1px solid var(--border, rgba(255,255,255,0.06));
  border-radius: 8px; padding: 6px 12px; width: 100%; max-width: 400px;
}
.header-search-icon { flex-shrink: 0; color: var(--text-muted, #5a5a6a); }
.header-search-input {
  background: none; border: none; outline: none;
  color: var(--text-primary, #fff); font-size: 13px; width: 100%;
}
.header-search-input::placeholder { color: var(--text-muted, #5a5a6a); }
.header-search-kbd {
  font-size: 10px; color: var(--text-muted, #5a5a6a);
  background: rgba(255,255,255,0.04); padding: 2px 6px; border-radius: 4px;
  font-family: inherit; letter-spacing: 0.04em; flex-shrink: 0;
}
.header-right { display: flex; align-items: center; gap: 4px; }
.header-icon-btn {
  background: none; border: none; color: var(--text-secondary, #8a8a9a);
  cursor: pointer; padding: 8px; border-radius: 8px; position: relative;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.header-icon-btn:hover { background: var(--accent-tint, rgba(123,77,255,0.08)); color: var(--accent, #7B4DFF); }
.header-badge {
  position: absolute; top: 2px; right: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent, #7B4DFF); color: #fff;
  font-size: 9px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.header-avatar-btn {
  background: none; border: none; cursor: pointer; padding: 4px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.header-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent, #7B4DFF), #9b6dff);
  color: #fff; font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}

/* ── SIDEBAR ──────────────────────────────────────────────────────── */
.sidebar-inner {
  display: flex; flex-direction: column; height: 100%; padding: 12px 8px;
  overflow-y: auto;
}
.sidebar-group { margin-bottom: 8px; }
.sidebar-group-label {
  font-size: 10px; font-weight: 500; color: var(--text-muted, #5a5a6a);
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 8px 12px 4px;
}
.sidebar-item-icon {
  width: 18px; height: 18px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: inherit;
}
.sidebar-item-label {
  font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-new-chat {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: var(--radius-sm, 6px); font-size: 13px; font-weight: 500;
  color: var(--text-primary, #fff); cursor: pointer;
  background: var(--accent-tint, rgba(123,77,255,0.1));
  border: 1px solid var(--accent-border, rgba(123,77,255,0.2));
  width: 100%; text-align: left; transition: all 0.15s; margin-bottom: 8px;
}
.sidebar-new-chat:hover { background: var(--accent-tint, rgba(123,77,255,0.15)); border-color: var(--accent, #7B4DFF); }
.sidebar-new-chat-icon {
  width: 18px; height: 18px; display: flex; align-items: center; justify-content: center;
}
.sidebar-new-chat-text { flex: 1; }

/* ── INPUT BAR ────────────────────────────────────────────────────── */
.input-bar-wrapper {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--surface, #0e0e14); border-top: 1px solid var(--border, rgba(255,255,255,0.06));
  padding: 10px 24px 16px; z-index: 90;
}
.input-bar {
  display: flex; align-items: flex-end; gap: 8px;
  max-width: 800px; margin: 0 auto;
  background: var(--bg-deep, #07070B); border: 1px solid var(--border, rgba(255,255,255,0.06));
  border-radius: 12px; padding: 4px; transition: border-color 0.15s;
}
.input-bar:focus-within { border-color: var(--accent, #7B4DFF); }
.input-attach-btn {
  background: none; border: none; color: var(--text-muted, #5a5a6a);
  cursor: pointer; padding: 8px 6px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all 0.15s;
}
.input-attach-btn:hover { color: var(--text-secondary, #8a8a9a); background: rgba(255,255,255,0.04); }
.input-field-wrap { flex: 1; display: flex; align-items: center; }
.input-field {
  background: none; border: none; outline: none;
  color: var(--text-primary, #fff); font-size: 14px; line-height: 1.5;
  width: 100%; resize: none; max-height: 120px; padding: 8px 4px;
  font-family: inherit;
}
.input-field::placeholder { color: var(--text-muted, #5a5a6a); }
.input-voice-btn {
  background: none; border: none; color: var(--text-muted, #5a5a6a);
  cursor: pointer; padding: 8px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all 0.15s;
}
.input-voice-btn:hover { color: var(--text-secondary, #8a8a9a); }
.input-send-btn {
  background: var(--accent, #7B4DFF); border: none; color: #fff;
  cursor: pointer; padding: 8px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all 0.15s; opacity: 0.5;
}
.input-send-btn:enabled { opacity: 1; }
.input-send-btn:enabled:hover { background: #8b5dff; }
.input-send-btn:disabled { cursor: not-allowed; }
.icon-send { display: block; }
.input-chips {
  display: flex; gap: 6px; max-width: 800px; margin: 6px auto 0;
  padding: 0 4px; overflow-x: auto; flex-wrap: nowrap;
}
.chip {
  background: rgba(255,255,255,0.04); border: 1px solid var(--border, rgba(255,255,255,0.06));
  color: var(--text-secondary, #8a8a9a); font-size: 11px; font-weight: 400;
  padding: 4px 12px; border-radius: 20px; cursor: pointer; white-space: nowrap;
  transition: all 0.15s; flex-shrink: 0;
}
.chip:hover { background: var(--accent-tint, rgba(123,77,255,0.1)); color: var(--accent, #7B4DFF); border-color: var(--accent-border, rgba(123,77,255,0.2)); }
.chip.active { background: var(--accent-tint, rgba(123,77,255,0.12)); color: var(--accent, #7B4DFF); border-color: var(--accent, #7B4DFF); }

/* ── CHAT AREA ─────────────────────────────────────────────────────── */
.chat-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 24px; border-bottom: 1px solid var(--border, rgba(255,255,255,0.06));
}
.chat-header-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent, #7B4DFF), #9b6dff);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px; font-weight: 600; flex-shrink: 0;
}
.chat-header-info { flex: 1; min-width: 0; }
.chat-header-name { font-size: 14px; font-weight: 600; color: var(--text-primary, #fff); }
.chat-header-status { font-size: 11px; color: var(--text-muted, #5a5a6a); display: flex; align-items: center; gap: 4px; }
.chat-input-bar {
  position: sticky; bottom: 0; padding: 12px 24px;
  background: var(--surface, #0e0e14); border-top: 1px solid var(--border, rgba(255,255,255,0.06));
}
.chat-input-form { display: flex; gap: 8px; max-width: 800px; margin: 0 auto; }
.chat-link { color: var(--accent, #7B4DFF); text-decoration: underline; text-underline-offset: 2px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px 24px; }
.chat-msg { display: flex; gap: 10px; margin-bottom: 16px; }
.chat-msg.jama { align-items: flex-start; }
.chat-msg.user { flex-direction: row-reverse; }
.chat-msg-avatar { flex-shrink: 0; }
.chat-msg-content { flex: 1; min-width: 0; }
.chat-thinking {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0; margin-left: 46px;
}
.chat-thinking-dots { display: flex; gap: 4px; }
.chat-thinking-text { font-size: 12px; color: var(--text-muted, #5a5a6a); }
.chat-timestamp { font-size: 10px; color: var(--text-muted, #5a5a6a); margin-top: 4px; }

/* ── CONTEXT PANEL ────────────────────────────────────────────────── */
.context-panel {
  width: var(--context-w, 280px); background: var(--surface, #0e0e14);
  border-left: 1px solid var(--border, rgba(255,255,255,0.06));
  display: flex; flex-direction: column; overflow: hidden;
}
.context-scroll { flex: 1; overflow-y: auto; padding: 16px; }
.context-card {
  background: var(--raised, #14141c); border: 1px solid var(--border, rgba(255,255,255,0.06));
  border-radius: var(--radius-md, 8px); padding: 16px; margin-bottom: 12px;
}
.context-profile { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px 16px; }
.context-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent, #7B4DFF), #9b6dff);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; font-weight: 600;
}
.context-user-info { text-align: center; }
.context-user-name { font-size: 15px; font-weight: 600; color: var(--text-primary, #fff); }
.context-user-plan { margin-top: 4px; }
.context-plan-badge {
  display: inline-block; font-size: 10px; font-weight: 500;
  color: var(--accent, #7B4DFF); background: var(--accent-tint, rgba(123,77,255,0.1));
  padding: 2px 10px; border-radius: 20px; border: 1px solid var(--accent-border, rgba(123,77,255,0.15));
  text-transform: uppercase; letter-spacing: 0.06em;
}
.context-section { margin-bottom: 16px; }
.context-section-header {
  font-size: 11px; font-weight: 500; color: var(--text-muted, #5a5a6a);
  text-transform: uppercase; letter-spacing: 0.08em; padding: 0 4px 8px;
}
.context-item-list { display: flex; flex-direction: column; gap: 6px; }
.context-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px; border-radius: var(--radius-sm, 6px);
  transition: background 0.15s;
}
.context-item:hover { background: rgba(255,255,255,0.02); }
.context-item-icon { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
.context-item-content { flex: 1; min-width: 0; }
.context-item-title { font-size: 13px; font-weight: 500; color: var(--text-primary, #fff); }
.context-item-value { font-size: 11px; color: var(--text-muted, #5a5a6a); margin-top: 2px; }
.context-file-item { cursor: pointer; }
.context-file-item:hover { background: var(--accent-tint, rgba(123,77,255,0.05)); }
.context-file-icon { width: 20px; height: 20px; flex-shrink: 0; }
.context-action-list { display: flex; flex-direction: column; gap: 6px; }
.context-action-btn {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: none; border: 1px solid var(--border, rgba(255,255,255,0.06));
  color: var(--text-secondary, #8a8a9a); font-size: 13px;
  padding: 8px 12px; border-radius: var(--radius-sm, 6px); cursor: pointer;
  transition: all 0.15s; text-align: left;
}
.context-action-btn:hover { background: var(--accent-tint, rgba(123,77,255,0.08)); border-color: var(--accent-border, rgba(123,77,255,0.15)); color: var(--accent, #7B4DFF); }
.context-footer { padding: 12px 16px; border-top: 1px solid var(--border, rgba(255,255,255,0.06)); }
.context-footer-text { font-size: 10px; color: var(--text-muted, #5a5a6a); }
.context-panel-overlay {
  display: none; position: fixed; inset: 0; z-index: 80;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
}

/* ── HAMBURGER MENU ────────────────────────────────────────────────── */
.hm-dropdown {
  display: none; position: fixed; top: 56px; left: 0; right: 0;
  max-height: calc(100vh - 56px); overflow-y: auto;
  background: var(--surface, #0e0e14); border-bottom: 1px solid var(--border, rgba(255,255,255,0.06));
  z-index: 95; box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}
.hm-scroll { padding: 8px 0; }
.hm-menu-list { list-style: none; margin: 0; padding: 0; }
.hm-label {
  padding: 12px 20px 6px; font-size: 10px; font-weight: 500;
  color: var(--text-muted, #5a5a6a); text-transform: uppercase; letter-spacing: 0.08em;
  pointer-events: none;
}
.hm-item {
  display: block; padding: 10px 20px; font-size: 14px; font-weight: 400;
  color: var(--text-primary, #fff); text-decoration: none; transition: all 0.12s;
}
.hm-item:hover { background: var(--accent-tint, rgba(123,77,255,0.08)); color: var(--accent, #7B4DFF); }
.hm-divider { height: 1px; background: var(--border, rgba(255,255,255,0.06)); margin: 4px 20px; }

/* ── WELCOME OVERLAY ────────────────────────────────────────────────── */
.welcome-overlay {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 50; display: flex; align-items: center; justify-content: center;
  background: var(--base, #0a0a10); padding: 20px;
  animation: woFadeIn 0.3s ease-out;
}
@keyframes woFadeIn { from { opacity: 0; } to { opacity: 1; } }
.wo-card {
  max-width: 480px; width: 100%; text-align: center;
  background: var(--surface, #0e0e14); border: 1px solid var(--border, rgba(255,255,255,0.06));
  border-radius: var(--radius-xl, 12px); padding: 40px 32px;
}
.wo-jama-icon {
  width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--accent, #7B4DFF), #9b6dff);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 22px; font-weight: 700;
}
.wo-title { font-size: 22px; font-weight: 600; color: var(--text-primary, #fff); margin-bottom: 8px; }
.wo-sub { font-size: 14px; font-weight: 400; color: var(--text-secondary, #8a8a9a); margin-bottom: 24px; line-height: 1.6; }
.wo-suggestions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-bottom: 16px;
}
.wo-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: var(--raised, #14141c); border: 1px solid var(--border, rgba(255,255,255,0.06));
  border-radius: var(--radius-md, 8px); padding: 16px 12px; cursor: pointer;
  color: var(--text-primary, #fff); transition: all 0.2s; text-align: center;
  font-size: 13px; font-weight: 500; font-family: inherit;
}
.wo-btn:hover { border-color: var(--accent-border, rgba(123,77,255,0.2)); background: var(--accent-tint, rgba(123,77,255,0.06)); transform: translateY(-1px); }
.wo-btn-icon { font-size: 24px; display: block; }
.wo-btn-desc { font-size: 10px; font-weight: 400; color: var(--text-muted, #5a5a6a); display: block; }
.wo-skip {
  display: block; background: none; border: none;
  color: var(--text-muted, #5a5a6a); font-size: 13px; cursor: pointer;
  margin: 8px auto 0; font-family: inherit; padding: 8px 16px;
  transition: color 0.15s;
}
.wo-skip:hover { color: var(--text-secondary, #8a8a9a); }

/* ── STATUS / LOADING ────────────────────────────────────────────────── */
.status-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--success, #22c55e); vertical-align: middle;
}
.spinner {
  width: 20px; height: 20px; border: 2px solid var(--border, rgba(255,255,255,0.06));
  border-top-color: var(--accent, #7B4DFF); border-radius: 50%;
  animation: spin 0.6s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── AVATARS ─────────────────────────────────────────────────────────── */
.jama-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent, #7B4DFF), #9b6dff);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 600;
}
.jama-avatar-sm {
  width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent, #7B4DFF), #9b6dff);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 10px; font-weight: 600;
}

/* ── UTILITY ──────────────────────────────────────────────────────────── */
.hide-collapsed { display: block; }
