/* ============================================================
   SuperSamu - Sigmas AI Assistant Styles
   ============================================================ */

:root {
  --sigma-dark: #0c1222;
  --sigma-900: #0f172a;
  --sigma-800: #1e3a5f;
  --sigma-700: #1d4ed8;
  --sigma-600: #2563eb;
  --sigma-500: #3b82f6;
  --sigma-400: #60a5fa;
  --sigma-gold: #f59e0b;
  --sigma-gold-dark: #d97706;
  --sidebar-width: 260px;
}

/* Reset & Global */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--sigma-dark);
  color: #e2e8f0;
  overflow: hidden;
  height: 100vh;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--sigma-900);
  display: flex;
  flex-direction: column;
  border-right: 1px solid #1e293b;
  height: 100vh;
  overflow-y: auto;
  transition: transform 0.3s ease, width 0.3s ease;
  z-index: 40;
}

.sidebar.collapsed {
  width: 0;
  min-width: 0;
  overflow: hidden;
  border: none;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 12px;
  border-bottom: 1px solid #1e293b;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--sigma-600), var(--sigma-gold));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: white;
  flex-shrink: 0;
}

.conv-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px;
}

.conv-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: #94a3b8;
  font-size: 13px;
  transition: all 0.15s;
}

.conv-item:hover {
  background: #1e293b;
  color: #e2e8f0;
}

.conv-item.active {
  background: rgba(37, 99, 235, 0.15);
  color: var(--sigma-400);
}

.conv-item .delete-btn {
  opacity: 0;
  font-size: 11px;
  color: #ef4444;
  cursor: pointer;
  padding: 2px 4px;
  transition: opacity 0.15s;
}

.conv-item:hover .delete-btn {
  opacity: 1;
}

.nav-section {
  padding: 8px;
  border-top: 1px solid #1e293b;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: #94a3b8;
  font-size: 13px;
  transition: all 0.15s;
}

.nav-item:hover {
  background: #1e293b;
  color: #e2e8f0;
}

.nav-item.active {
  background: rgba(37, 99, 235, 0.15);
  color: var(--sigma-400);
}

/* ============================================================
   CHAT AREA
   ============================================================ */
.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  background: var(--sigma-dark);
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #1e293b;
  background: var(--sigma-900);
  flex-shrink: 0;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ============================================================
   MESSAGES
   ============================================================ */
.message {
  display: flex;
  gap: 10px;
  max-width: 85%;
  animation: fadeIn 0.25s ease;
}

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

.message.assistant {
  align-self: flex-start;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

.message.user .message-avatar {
  background: var(--sigma-600);
  color: white;
}

.message.assistant .message-avatar {
  background: linear-gradient(135deg, var(--sigma-gold), var(--sigma-gold-dark));
  color: white;
}

.message-content {
  background: #1e293b;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.message.user .message-content {
  background: var(--sigma-600);
  color: white;
  border-bottom-right-radius: 4px;
}

.message.assistant .message-content {
  background: #1e293b;
  border-bottom-left-radius: 4px;
}

.message-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 0 4px;
}

.model-badge {
  font-size: 10px;
  color: #64748b;
  background: #0f172a;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid #1e293b;
}

/* TTS Button */
.tts-btn {
  background: none;
  border: 1px solid #334155;
  color: #64748b;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tts-btn:hover {
  background: #1e293b;
  color: var(--sigma-gold);
  border-color: var(--sigma-gold);
}

.tts-btn.loading {
  color: var(--sigma-gold);
  opacity: 0.7;
}

.tts-btn.playing {
  background: rgba(245, 158, 11, 0.15);
  color: var(--sigma-gold);
  border-color: var(--sigma-gold);
  animation: pulse 1.5s infinite;
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64748b;
  animation: bounce 1.4s infinite both;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.16s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.32s; }

/* ============================================================
   INPUT AREA
   ============================================================ */
.chat-input-area {
  padding: 12px 16px;
  border-top: 1px solid #1e293b;
  background: var(--sigma-900);
  flex-shrink: 0;
}

.input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 16px;
  padding: 6px 8px;
  transition: border-color 0.2s;
}

.input-wrapper:focus-within {
  border-color: var(--sigma-500);
}

.input-wrapper textarea {
  flex: 1;
  background: transparent;
  border: none;
  color: #e2e8f0;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  outline: none;
  padding: 6px 4px;
  max-height: 150px;
  line-height: 1.5;
}

.input-wrapper textarea::placeholder {
  color: #475569;
}

.input-wrapper textarea:disabled {
  opacity: 0.5;
}

.input-btn {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 8px;
  border-radius: 10px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.input-btn:hover {
  background: #1e293b;
  color: #e2e8f0;
}

.input-btn.send {
  background: var(--sigma-600);
  color: white;
}

.input-btn.send:hover {
  background: var(--sigma-700);
}

.input-btn.send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.input-btn.recording {
  background: #ef4444;
  color: white;
  animation: pulse 1s infinite;
}

.input-actions {
  padding: 6px 4px 0;
  font-size: 11px;
  color: #475569;
  text-align: center;
}

/* ============================================================
   WELCOME SCREEN
   ============================================================ */
.welcome-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  text-align: center;
  overflow-y: auto;
}

.welcome-logo {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--sigma-600), var(--sigma-gold));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 32px;
  color: white;
  margin-bottom: 20px;
  animation: float 3s ease-in-out infinite;
}

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 420px;
  width: 100%;
  margin-top: 24px;
}

.quick-action {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 12px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  cursor: pointer;
  color: #94a3b8;
  font-size: 13px;
  transition: all 0.2s;
}

.quick-action:hover {
  background: #334155;
  color: #e2e8f0;
  border-color: var(--sigma-500);
  transform: translateY(-1px);
}

.quick-action i {
  color: var(--sigma-gold);
  font-size: 16px;
  flex-shrink: 0;
}

/* Meet Me Button */
.meet-me-btn {
  position: relative;
  margin-top: 28px;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--sigma-gold), var(--sigma-gold-dark));
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s;
  font-family: inherit;
}

.meet-me-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.3);
}

.meet-me-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150%;
  height: 150%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(245, 158, 11, 0.3) 0%, transparent 60%);
  animation: pulse 2s infinite;
  pointer-events: none;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

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

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

.btn-gold {
  background: linear-gradient(135deg, var(--sigma-gold), var(--sigma-gold-dark));
  color: white;
}

.btn-gold:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: #94a3b8;
  padding: 6px 10px;
}

.btn-ghost:hover {
  background: #1e293b;
  color: #e2e8f0;
}

.btn-danger {
  background: #ef4444;
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
}

/* ============================================================
   PANEL VIEW (CRM, Projects, etc.)
   ============================================================ */
.panel-view {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.panel-header h2 {
  font-size: 18px;
  font-weight: 700;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.stat-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.stat-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--sigma-gold);
}

.stat-label {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}

.card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 8px;
  transition: border-color 0.2s;
}

.card:hover {
  border-color: #475569;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

.badge-active {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.badge-pending {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.badge-completed {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.badge-cancelled {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--sigma-900);
  border: 1px solid #334155;
  border-radius: 16px;
  padding: 24px;
  max-width: 440px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 4px;
}

.form-input, .form-select {
  width: 100%;
  padding: 10px 12px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus, .form-select:focus {
  border-color: var(--sigma-500);
}

.form-select {
  appearance: none;
  cursor: pointer;
}

/* ============================================================
   CRM ACTION CARDS
   ============================================================ */
.crm-action-card {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 12px;
  padding: 12px;
  margin-top: 8px;
}

.action-header {
  font-size: 12px;
  font-weight: 600;
  color: var(--sigma-gold);
  margin-bottom: 6px;
}

.action-btns {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.action-btn {
  padding: 6px 14px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.action-btn.btn-confirm {
  background: var(--sigma-gold);
  color: white;
}

.action-btn.btn-confirm:hover {
  background: var(--sigma-gold-dark);
}

.action-btn.btn-cancel {
  background: #334155;
  color: #94a3b8;
}

.action-btn.btn-cancel:hover {
  background: #475569;
}

/* ============================================================
   IMAGE GALLERY
   ============================================================ */
.image-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
}

.image-thumb {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #334155;
}

.image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-thumb-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.image-thumb:hover .image-thumb-overlay {
  opacity: 1;
}

.image-thumb-delete {
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.image-upload-btn {
  width: 100px;
  height: 100px;
  border: 2px dashed #334155;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 12px;
}

.image-upload-btn:hover {
  border-color: var(--sigma-gold);
  color: var(--sigma-gold);
}

.image-upload-btn i {
  font-size: 20px;
}

/* Mini gallery for entity cards */
.image-gallery-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.image-thumb-mini {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #334155;
}

.image-thumb-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-mini-delete {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(239, 68, 68, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 8px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}

.image-thumb-mini:hover .image-mini-delete {
  display: flex;
}

/* Company Logo Section */
.company-logo-section {
  padding: 8px 0;
}

/* Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   ABOUT ME OVERLAY
   ============================================================ */
.about-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(12, 18, 34, 0.95);
  z-index: 100;
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.about-overlay.visible {
  opacity: 1;
}

.about-overlay.closing {
  opacity: 0;
}

.about-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 20px 60px;
  position: relative;
}

.about-close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1e293b;
  border: 1px solid #334155;
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 101;
  transition: all 0.2s;
}

.about-close:hover {
  background: #334155;
  color: white;
}

.about-hero {
  text-align: center;
  margin-bottom: 32px;
}

.about-logo-wrap {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 20px;
}

.about-logo {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, var(--sigma-600), var(--sigma-gold));
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 48px;
  color: white;
  animation: float 3s ease-in-out infinite;
}

.about-logo-ring {
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border-radius: 28px;
  border: 2px solid rgba(245, 158, 11, 0.3);
  animation: pulse 2s infinite;
}

.about-title {
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--sigma-500), var(--sigma-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-subtitle {
  color: #64748b;
  font-size: 16px;
  margin-top: 4px;
}

.about-letter {
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid #334155;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 28px;
  line-height: 1.7;
}

.about-letter p {
  margin-bottom: 12px;
  color: #cbd5e1;
  font-size: 15px;
}

.about-section {
  text-align: center;
  margin-bottom: 28px;
  padding: 20px;
  background: rgba(30, 41, 59, 0.3);
  border-radius: 16px;
  border: 1px solid #334155;
}

.about-section-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--sigma-600), var(--sigma-gold));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 22px;
  color: white;
}

.about-section h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.about-section p {
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.6;
}

.about-capabilities {
  margin-bottom: 28px;
}

.about-cap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.about-cap-card {
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 16px;
  transition: all 0.2s;
}

.about-cap-card:hover {
  border-color: var(--sigma-gold);
  transform: translateY(-2px);
}

.about-cap-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: white;
  margin-bottom: 10px;
}

.about-cap-card h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

.about-cap-card p {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
}

.about-promise {
  text-align: center;
  padding: 28px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(245, 158, 11, 0.1));
  border: 1px solid #334155;
  border-radius: 16px;
  margin-bottom: 24px;
}

.about-promise-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.about-promise h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.about-promise p {
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.6;
}

.about-start-btn {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  padding: 16px;
  background: linear-gradient(135deg, var(--sigma-600), var(--sigma-gold));
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s;
}

.about-start-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 0 30px rgba(37, 99, 235, 0.3);
}

/* ============================================================
   MARKDOWN RENDERING
   ============================================================ */
.message-content h1, .message-content h2, .message-content h3 {
  font-weight: 700;
  margin: 12px 0 6px;
}

.message-content h1 { font-size: 18px; }
.message-content h2 { font-size: 16px; }
.message-content h3 { font-size: 15px; }

.message-content pre {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 12px;
  overflow-x: auto;
  margin: 8px 0;
}

.message-content code {
  background: #0f172a;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Fira Code', monospace;
  font-size: 13px;
}

.message-content pre code {
  background: transparent;
  padding: 0;
}

.message-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
  font-size: 13px;
}

.message-content table td {
  border: 1px solid #334155;
  padding: 6px 10px;
}

.message-content table tr:first-child td {
  background: #0f172a;
  font-weight: 600;
}

.message-content ul {
  padding-left: 16px;
  margin: 6px 0;
  list-style: none;
}

.message-content li {
  position: relative;
  padding-left: 12px;
  margin-bottom: 2px;
}

.message-content li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--sigma-gold);
}

.message-content blockquote {
  border-left: 3px solid var(--sigma-gold);
  padding-left: 12px;
  color: #94a3b8;
  margin: 8px 0;
}

.message-content a {
  color: var(--sigma-400);
  text-decoration: underline;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-100%);
    z-index: 40;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .about-cap-grid {
    grid-template-columns: 1fr;
  }

  .message {
    max-width: 95%;
  }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============================================================
   PWA INSTALL POPUP
   ============================================================ */
#pwaInstallPopup {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 16px;
  opacity: 0;
  transform: translateY(100%);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

#pwaInstallPopup.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

#pwaInstallPopup.closing {
  opacity: 0;
  transform: translateY(100%);
}

.pwa-popup {
  max-width: 420px;
  margin: 0 auto;
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border: 1px solid #334155;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.4), 0 0 60px rgba(37, 99, 235, 0.1);
  position: relative;
}

.pwa-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #334155;
  border: none;
  color: #94a3b8;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.pwa-close:hover {
  background: #475569;
  color: white;
}

.pwa-content {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.pwa-icon {
  flex-shrink: 0;
}

.pwa-logo {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #2563eb, #f59e0b);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 26px;
  color: white;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.pwa-text h3 {
  font-size: 16px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 3px;
}

.pwa-text p {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.4;
}

.pwa-actions {
  display: flex;
  gap: 8px;
}

.pwa-btn {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pwa-btn-install {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.3);
}

.pwa-btn-install:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.pwa-btn-later {
  background: #1e293b;
  color: #94a3b8;
  border: 1px solid #334155;
}

.pwa-btn-later:hover {
  background: #334155;
  color: #e2e8f0;
}

.pwa-btn-ok {
  width: 100%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
}

.pwa-ios-steps {
  margin-bottom: 14px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 12px;
  border: 1px solid #1e293b;
}

.pwa-ios-steps > p {
  font-size: 13px;
  color: #cbd5e1;
  margin-bottom: 10px;
}

.pwa-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 13px;
  color: #94a3b8;
}

.pwa-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--sigma-600);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .sidebar, .chat-header, .chat-input-area, .input-btn, .tts-btn, .meet-me-btn {
    display: none !important;
  }
}
