/* ============================================================
   AI Chat — OpenRouter | Main Stylesheet
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: #16161f;
  --bg-hover: #1e1e2a;
  --bg-input: #1a1a25;
  --border: rgba(255, 255, 255, .07);
  --border-focus: rgba(124, 58, 237, .5);
  --text-primary: #f0f0f8;
  --text-secondary: #8b8ba0;
  --text-muted: #55556a;
  --accent: #7c3aed;
  --accent-hover: #6d28d9;
  --accent-light: rgba(124, 58, 237, .15);
  --accent-glow: rgba(124, 58, 237, .3);
  --blue: #2563eb;
  --green: #10b981;
  --red: #ef4444;
  --amber: #f59e0b;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --sidebar-w: 280px;
  --topbar-h: 60px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .4);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, .5);
  --shadow-glow: 0 0 30px rgba(124, 58, 237, .15);
  --transition: all .2s ease;
}

html {
  height: 100%;
  height: 100dvh;
}

body {
  height: 100%;
  height: 100dvh;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  overflow: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, .2);
}

/* ══════════════════════════════════════════
   LAYOUT
══════════════════════════════════════════ */
body {
  display: flex;
  height: 100vh;
  height: 100dvh;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  height: 100dvh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  z-index: 100;
  transition: transform .3s ease;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 0 16px var(--accent-glow);
}

.logo-text {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.3px;
  background: linear-gradient(135deg, #c4b5fd, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Credit Card ── */
.credit-card {
  margin: 16px;
  background: linear-gradient(135deg, rgba(124, 58, 237, .2), rgba(37, 99, 235, .15));
  border: 1px solid rgba(124, 58, 237, .3);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.credit-card::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(124, 58, 237, .25) 0%, transparent 70%);
  pointer-events: none;
}

.credit-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 6px;
}

.credit-amount {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.5px;
  min-height: 30px;
  display: flex;
  align-items: center;
}

.credit-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, .1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.credit-refresh {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

/* ── Model Section ── */
.model-section {
  padding: 0 16px 12px;
  flex-shrink: 0;
}

.section-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 600;
  margin-bottom: 8px;
}

.model-select-wrapper {
  position: relative;
}

.model-select {
  width: 100%;
  appearance: none;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 9px 36px 9px 12px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}

.model-select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.model-select option {
  background: #1a1a25;
}

.model-select-arrow {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.model-info {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ── History ── */
.history-section {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
}

.history-empty-state {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 20px 0;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.history-item.active {
  background: var(--accent-light);
  border-color: rgba(124, 58, 237, .2);
  color: var(--text-primary);
}

.history-item svg {
  flex-shrink: 0;
  color: var(--text-muted);
}

/* ── Sidebar Footer ── */
.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.btn-sidebar-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-sidebar-footer:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.admin-link svg {
  color: var(--amber);
}


/* ══════════════════════════════════════════
   MAIN CONTENT
══════════════════════════════════════════ */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-primary);
}

/* ── Topbar ── */
.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 15, .8);
  backdrop-filter: blur(12px);
  flex-shrink: 0;
}

.topbar-title {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -.2px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-menu-btn {
  display: none;
}

/* Credit Badge in topbar */
.credit-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 12px 4px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.credit-dot {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .5;
  }
}

/* ── Messages Area ── */
.messages-area {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Welcome Screen ── */
.welcome-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  animation: fadeInUp .5s ease;
}

.welcome-icon {
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(124, 58, 237, .2) 0%, transparent 70%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  border: 1px solid rgba(124, 58, 237, .2);
}

.welcome-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.5px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.welcome-subtitle {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 32px;
}

.suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 600px;
}

.chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}

.chip:hover {
  background: var(--bg-hover);
  border-color: rgba(124, 58, 237, .3);
  color: var(--text-primary);
  transform: translateY(-1px);
}

/* ── Messages ── */
.message {
  display: flex;
  gap: 12px;
  animation: fadeInUp .3s ease;
  max-width: 100%;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.user {
  flex-direction: row-reverse;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.message.user .message-avatar {
  background: linear-gradient(135deg, var(--accent), var(--blue));
  color: white;
}

.message.assistant .message-avatar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.message-content {
  flex: 1;
  max-width: calc(100% - 44px);
}

.message.user .message-content {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.message-bubble {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.7;
  max-width: 680px;
}

.message.user .message-bubble {
  background: linear-gradient(135deg, var(--accent), var(--blue));
  color: white;
  border-bottom-right-radius: 4px;
}

.message.assistant .message-bubble {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.message-bubble pre {
  background: rgba(0, 0, 0, .5);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--radius-sm);
  padding: 12px;
  overflow-x: auto;
  margin: 10px 0;
  font-size: 13px;
  line-height: 1.5;
}

.message-bubble code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13px;
  background: rgba(0, 0, 0, .35);
  padding: 1px 5px;
  border-radius: 4px;
}

.message-bubble pre code {
  background: none;
  padding: 0;
}

.message-bubble p {
  margin: 6px 0;
}

.message-bubble ul,
.message-bubble ol {
  padding-left: 20px;
  margin: 6px 0;
}

.message-bubble h1,
.message-bubble h2,
.message-bubble h3 {
  margin: 12px 0 6px;
  font-weight: 600;
}

.message-bubble strong {
  font-weight: 600;
}

.message-bubble a {
  color: #a78bfa;
}

.message-bubble .md-hr,
.message-bubble hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, .12);
  margin: 14px 0;
  display: block;
}

.message-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.message.user .message-meta {
  justify-content: flex-end;
}

.message-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.message.user .message-files {
  justify-content: flex-end;
}

.file-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.file-chip:hover {
  background: rgba(255, 255, 255, .12);
}

.file-chip svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.attached-image {
  max-width: 280px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, .1);
}

.attached-image:hover {
  opacity: .9;
  transform: scale(1.01);
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 14px 16px;
  align-items: center;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: bounce .8s infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: .15s;
}

.typing-dot:nth-child(3) {
  animation-delay: .3s;
}

@keyframes bounce {

  0%,
  60%,
  100% {
    transform: translateY(0);
  }

  30% {
    transform: translateY(-6px);
  }
}

/* ── File Preview Area ── */
.file-preview-area {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px 8px;
  flex-shrink: 0;
}

.file-preview-area:empty {
  display: none;
}

.preview-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 12px;
  color: var(--text-secondary);
  max-width: 200px;
}

.preview-item img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 4px;
}

.preview-item-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-remove {
  width: 18px;
  height: 18px;
  background: rgba(239, 68, 68, .2);
  border: none;
  border-radius: 50%;
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}

.preview-remove:hover {
  background: rgba(239, 68, 68, .35);
}

/* ── Input Area ── */
.input-area {
  padding: 12px 20px 20px;
  flex-shrink: 0;
  background: linear-gradient(to top, var(--bg-primary) 80%, transparent);
}

.input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px 10px 10px 12px;
  transition: var(--transition);
}

.input-wrapper:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.message-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  resize: none;
  min-height: 24px;
  max-height: 200px;
  outline: none;
  line-height: 1.6;
}

.message-input::placeholder {
  color: var(--text-muted);
}

.input-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 4px 0;
}

.input-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.input-hint kbd {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: inherit;
  font-size: 10px;
}

.model-badge {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 2px 8px;
}

/* ══════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════ */
.btn-icon {
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-icon:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-attach {
  width: 34px;
  height: 34px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-attach:hover {
  color: var(--text-primary);
  border-color: var(--border-focus);
}

.btn-send {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  border: none;
  border-radius: 10px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  box-shadow: 0 2px 12px var(--accent-glow);
}

.btn-send:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-send:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.btn-text-small {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
  transition: var(--transition);
  padding: 2px 4px;
  border-radius: 4px;
}

.btn-text-small:hover {
  color: var(--text-secondary);
}

.btn-pdf:hover {
  color: var(--accent) !important;
}

.btn-word:hover {
  color: #2b7a3d !important;
}

.btn-primary {
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary:hover {
  opacity: .9;
  transform: translateY(-1px);
}

.btn-secondary {
  padding: 10px 20px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.btn-icon-sm {
  width: 28px;
  height: 28px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon-sm:hover {
  color: var(--text-primary);
}

/* ══════════════════════════════════════════
   MODAL
══════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn .2s ease;
}

.modal-overlay.open {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 480px;
  max-width: calc(100vw - 40px);
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md), var(--shadow-glow);
  animation: slideUp .3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-header h2 {
  font-size: 16px;
  font-weight: 700;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ── Form Elements ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input,
.form-textarea {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  padding: 10px 12px;
  transition: var(--transition);
  width: 100%;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon .form-input {
  padding-right: 42px;
}

.input-with-icon .btn-icon-sm {
  position: absolute;
  right: 8px;
}

.range-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.range-input {
  flex: 1;
  height: 4px;
  appearance: none;
  background: linear-gradient(to right, var(--accent) 0%, var(--border) 0%);
  border-radius: 2px;
  cursor: pointer;
}

.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  cursor: pointer;
}

.range-value {
  min-width: 32px;
  text-align: right;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

/* ══════════════════════════════════════════
   LIGHTBOX
══════════════════════════════════════════ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, .1);
  border: none;
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, .2);
}

/* ══════════════════════════════════════════
   TOASTS
══════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 3000;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  font-size: 13px;
  color: var(--text-primary);
  animation: slideInRight .3s ease;
  max-width: 320px;
}

.toast.success {
  border-left: 3px solid var(--green);
}

.toast.error {
  border-left: 3px solid var(--red);
}

.toast.info {
  border-left: 3px solid var(--blue);
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ── Streaming cursor ── */
.streaming-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--text-primary);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink .6s infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* ── Copy button on code ── */
.code-block-wrapper {
  position: relative;
  margin: 10px 0;
}

.copy-code-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 5px;
  color: var(--text-muted);
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}

.copy-code-btn:hover {
  background: rgba(255, 255, 255, .14);
  color: var(--text-primary);
}

/* ══════════════════════════════════════════
   USER INFO (sidebar bottom)
══════════════════════════════════════════ */
/* ── User dropdown menu ── */
.user-dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--surface-2, #1a1a2e);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px;
  padding: 6px;
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .5);
  min-width: 180px;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  background: transparent;
  color: var(--text-primary, #f0f0f8);
  font-size: 13px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: background .15s;
}

.user-dropdown-item:hover {
  background: rgba(255, 255, 255, .07);
}

.user-dropdown-danger {
  color: #f87171;
}

.user-dropdown-danger:hover {
  background: rgba(239, 68, 68, .12);
}

.user-dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, .08);
  margin: 4px 0;
}

.sidebar-user-info {
  border-top: 1px solid var(--border);
  padding: 10px 12px;
  flex-shrink: 0;
}

.user-info-block {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  color: white;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-info-text {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-client {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ══════════════════════════════════════════
   SIDEBAR OVERLAY (mobile)
══════════════════════════════════════════ */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  z-index: 99;
}

/* ══════════════════════════════════════════
   RESPONSIVE — TABLET (max 1024px)
══════════════════════════════════════════ */
@media (max-width: 1024px) {
  :root {
    --sidebar-w: 240px;
  }

  .messages-area {
    padding: 20px 16px;
  }

  .message-bubble {
    max-width: 100%;
  }

  .input-area {
    padding: 10px 16px 16px;
  }

  .welcome-title {
    font-size: 24px;
  }

  .welcome-subtitle {
    font-size: 14px;
  }

  .suggestion-chips {
    max-width: 100%;
    padding: 0 8px;
  }

  .chip {
    font-size: 12px;
    padding: 9px 14px;
  }
}

/* ══════════════════════════════════════════
   RESPONSIVE — MOBILE (max 768px)
══════════════════════════════════════════ */
@media (max-width: 768px) {

  html,
  body {
    font-size: 15px;
    /* Usa dvh per rispettare la barra del browser mobile */
    height: 100dvh;
    overflow: hidden;
    position: fixed;
    width: 100%;
  }

  /* Layout principale: occupa tutto lo schermo disponibile */
  body {
    display: flex;
    flex-direction: row;
  }

  /* Sidebar: slide-in da sinistra, altezza piena */
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 85vw;
    max-width: 300px;
    height: 100%;
    height: 100dvh;
    transform: translateX(-100%);
    z-index: 200;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.open {
    display: block;
  }

  .mobile-menu-btn {
    display: flex;
  }

  /* Main content: occupa tutto lo schermo */
  .main-content {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  /* Topbar */
  .topbar {
    padding: 0 12px;
    height: 54px;
    flex-shrink: 0;
  }

  .topbar-title {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .credit-badge {
    font-size: 11px;
    padding: 4px 10px 4px 7px;
  }

  /* Area messaggi: cresce e scorre */
  .messages-area {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px 12px;
    gap: 16px;
    min-height: 0;
    /* fondamentale per flex su mobile */
  }

  .message-bubble {
    font-size: 14px;
    padding: 10px 14px;
    max-width: 100%;
    word-break: break-word;
  }

  .message-avatar {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }

  .message-content {
    max-width: calc(100% - 40px);
  }

  /* Welcome screen */
  .welcome-screen {
    padding: 20px 16px;
    justify-content: flex-start;
    padding-top: 40px;
  }

  .welcome-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 14px;
  }

  .welcome-icon svg {
    width: 32px;
    height: 32px;
  }

  .welcome-title {
    font-size: 22px;
    margin-bottom: 6px;
  }

  .welcome-subtitle {
    font-size: 13px;
    margin-bottom: 20px;
    padding: 0 8px;
  }

  .suggestion-chips {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    padding: 0 4px;
  }

  .chip {
    justify-content: flex-start;
    padding: 12px 16px;
    font-size: 13px;
    border-radius: var(--radius-md);
    border-radius: 12px;
  }

  /* File preview */
  .file-preview-area {
    padding: 0 12px 6px;
    flex-shrink: 0;
  }

  /* Input area: sempre visibile in fondo */
  .input-area {
    flex-shrink: 0;
    padding: 8px 12px 12px;
    background: var(--bg-primary);
  }

  .input-wrapper {
    padding: 8px 8px 8px 12px;
    border-radius: var(--radius-md);
    gap: 6px;
  }

  .message-input {
    font-size: 16px;
    /* 16px evita zoom su iOS */
    min-height: 22px;
    max-height: 120px;
  }

  .input-footer {
    padding: 4px 2px 0;
  }

  .input-hint {
    display: none;
  }

  .model-badge {
    font-size: 10px;
    padding: 2px 7px;
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Bottoni touch-friendly */
  .btn-send {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .btn-attach {
    width: 40px;
    height: 40px;
  }

  .btn-icon {
    width: 38px;
    height: 38px;
  }

  /* Toast */
  .toast-container {
    bottom: 80px;
    right: 12px;
    left: 12px;
  }

  .toast {
    max-width: 100%;
  }

  /* Modal */
  .modal {
    width: calc(100vw - 24px);
    max-height: 85dvh;
    border-radius: var(--radius-lg);
  }

  .modal-header {
    padding: 16px 18px 14px;
  }

  .modal-body {
    padding: 18px;
    gap: 16px;
  }

  .modal-footer {
    padding: 14px 18px 16px;
  }

  /* Codice */
  .message-bubble pre {
    font-size: 12px;
    padding: 10px;
    max-width: 100%;
    overflow-x: auto;
  }

  .message-bubble code {
    font-size: 12px;
  }

  /* Immagini allegate */
  .attached-image {
    max-width: min(200px, 60vw);
  }
}

/* ══════════════════════════════════════════
   RESPONSIVE — SMALL MOBILE (max 480px)
══════════════════════════════════════════ */
@media (max-width: 480px) {
  .welcome-title {
    font-size: 20px;
  }

  .welcome-subtitle {
    font-size: 12px;
  }

  .topbar-title {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
  }

  .message-bubble {
    font-size: 13px;
  }

  .message-input {
    font-size: 16px;
    /* evita zoom automatico su iOS */
  }

  .credit-badge {
    display: none;
    /* nasconde il badge credito su schermi molto piccoli */
  }

  .modal {
    width: calc(100vw - 16px);
    max-height: 90vh;
  }
}

/* ══════════════════════════════════════════
   SAFE AREA — iPhone notch / Dynamic Island
   e barra navigazione browser mobile
══════════════════════════════════════════ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .input-area {
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }

  .topbar {
    padding-top: env(safe-area-inset-top);
  }

  .sidebar {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }

  @media (max-width: 768px) {
    .input-area {
      padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }
  }
}

/* ══════════════════════════════════════════
   WEB SEARCH BUTTON & INDICATOR
══════════════════════════════════════════ */

/* Pulsante globo 🌐 — stato normale */
.btn-web-search {
  transition: all .2s ease;
  position: relative;
}

/* Stato ATTIVO: glow ciano, bordo colorato */
.btn-web-search.active {
  color: #06b6d4 !important;
  border-color: rgba(6, 182, 212, .5) !important;
  background: rgba(6, 182, 212, .12) !important;
  box-shadow: 0 0 12px rgba(6, 182, 212, .3);
  animation: webPulse 2s ease-in-out infinite;
}

.btn-web-search.active::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  background: #06b6d4;
  border-radius: 50%;
  box-shadow: 0 0 6px #06b6d4;
}

@keyframes webPulse {

  0%,
  100% {
    box-shadow: 0 0 8px rgba(6, 182, 212, .3);
  }

  50% {
    box-shadow: 0 0 16px rgba(6, 182, 212, .5);
  }
}

/* Bolla indicatore ricerca web */
.web-search-bubble {
  background: linear-gradient(135deg, rgba(6, 182, 212, .15), rgba(37, 99, 235, .1)) !important;
  border: 1px solid rgba(6, 182, 212, .3) !important;
  padding: 10px 16px !important;
}

.web-search-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #06b6d4;
  font-size: 13px;
  font-weight: 500;
}

.web-search-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(6, 182, 212, .25);
  border-top-color: #06b6d4;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}

/* Hover pulsanti export */
.btn-pdf:hover {
  color: #7c3aed !important;
}

.btn-word:hover {
  color: #2b7a3d !important;
}

/* ══════════════════════════════════════════
   VOICE RECORDING BUTTON & INDICATOR
══════════════════════════════════════════ */

/* Pulsante microfono — stato normale */
.btn-voice {
  transition: all .2s ease;
  position: relative;
}

/* Stato REGISTRAZIONE ATTIVA: glow rosso pulsante */
.btn-voice.recording {
  color: #ef4444 !important;
  border-color: rgba(239, 68, 68, .5) !important;
  background: rgba(239, 68, 68, .12) !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, .35);
  animation: voicePulse 1.2s ease-in-out infinite;
}

/* Pallino rosso live nell'angolo */
.btn-voice.recording::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  background: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 6px #ef4444;
  animation: voiceDot .8s ease-in-out infinite alternate;
}

@keyframes voicePulse {
  0%, 100% { box-shadow: 0 0 8px rgba(239, 68, 68, .35); }
  50%       { box-shadow: 0 0 18px rgba(239, 68, 68, .6); }
}

@keyframes voiceDot {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: .4; transform: scale(.7); }
}

/* Stato TRASCRIZIONE IN CORSO: glow ambra */
.btn-voice.transcribing {
  color: #f59e0b !important;
  border-color: rgba(245, 158, 11, .5) !important;
  background: rgba(245, 158, 11, .12) !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, .3);
  animation: voiceTranscribing 1s ease-in-out infinite;
  pointer-events: none;
}

@keyframes voiceTranscribing {
  0%, 100% { opacity: 1; }
  50%       { opacity: .6; }
}

/* Bolla indicatore trascrizione nel chat */
.voice-transcribing-bubble {
  background: linear-gradient(135deg, rgba(239, 68, 68, .12), rgba(245, 158, 11, .08)) !important;
  border: 1px solid rgba(239, 68, 68, .3) !important;
  padding: 10px 16px !important;
}

.voice-transcribing-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f87171;
  font-size: 13px;
  font-weight: 500;
}

.voice-transcribing-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(239, 68, 68, .25);
  border-top-color: #ef4444;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}

/* Timer di registrazione nell'input */
.voice-timer {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #ef4444;
  letter-spacing: .5px;
  flex-shrink: 0;
  min-width: 42px;
}

.voice-timer.active {
  display: flex;
}

.voice-timer-dot {
  width: 7px;
  height: 7px;
  background: #ef4444;
  border-radius: 50%;
  animation: voiceDot .8s ease-in-out infinite alternate;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════
   PWA INSTALL MODAL
══════════════════════════════════════════ */

/* Overlay */
#pwaInstallOverlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s ease;
}

#pwaInstallOverlay.pwa-visible {
  opacity: 1;
  pointer-events: all;
}

/* Backdrop scuro */
.pwa-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .35s ease;
}

#pwaInstallOverlay.pwa-visible .pwa-backdrop {
  opacity: 1;
}

/* Sheet (il pannello bianco che sale dal basso) */
.pwa-sheet {
  position: relative;
  z-index: 1;
  background: #ffffff;
  border-radius: 28px 28px 0 0;
  width: 100%;
  max-width: 520px;
  padding: 12px 28px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, .35);
  transform: translateY(100%);
  transition: transform .4s cubic-bezier(.32, .72, 0, 1);
  will-change: transform;
  /* Safe area per iPhone con notch */
  padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
}

.pwa-sheet.pwa-sheet-in {
  transform: translateY(0);
}

/* Handle (la barretta in cima) */
.pwa-handle {
  width: 40px;
  height: 4px;
  background: #d1d5db;
  border-radius: 2px;
  margin-bottom: 20px;
  flex-shrink: 0;
}

/* Icona app */
.pwa-icon-wrap {
  margin-bottom: 14px;
}

.pwa-app-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(124, 58, 237, .35);
  margin: 0 auto;
}

/* Testi */
.pwa-title {
  font-size: 22px;
  font-weight: 800;
  color: #111827;
  letter-spacing: -.4px;
  margin-bottom: 4px;
}

.pwa-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 18px;
}

.pwa-install-label {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 10px;
}

.pwa-desc {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Pulsante installa */
.pwa-btn-install {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 380px;
  padding: 16px 24px;
  background: linear-gradient(135deg, #16a34a, #15803d);
  border: none;
  border-radius: 100px;
  color: white;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .5px;
  cursor: pointer;
  transition: all .2s ease;
  box-shadow: 0 4px 20px rgba(22, 163, 74, .4);
  margin-bottom: 16px;
}

.pwa-btn-install:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(22, 163, 74, .5);
}

.pwa-btn-install:active {
  transform: translateY(0);
}

/* Pulsante "più tardi" */
.pwa-btn-later {
  background: none;
  border: none;
  color: #6b7280;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 8px;
  transition: color .2s ease;
}

.pwa-btn-later:hover {
  color: #374151;
}

.pwa-btn-later-ios {
  color: #2563eb;
  font-weight: 600;
  font-size: 15px;
}

.pwa-btn-later-ios:hover {
  color: #1d4ed8;
}

/* Steps iOS */
.pwa-ios-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 360px;
  margin-bottom: 20px;
}

.pwa-ios-step {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  font-size: 14px;
  color: #374151;
  line-height: 1.4;
}

.pwa-ios-icon {
  color: #2563eb;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
}

.pwa-ios-step strong {
  font-weight: 700;
  color: #111827;
}

/* Label browser */
.pwa-browsers-label {
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 12px;
}

/* Icone browser */
.pwa-browser-icons {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.pwa-browser-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 10px;
}

/* Desktop: sheet centrato (non bottom sheet) */
@media (min-width: 769px) {
  #pwaInstallOverlay {
    align-items: center;
  }

  .pwa-sheet {
    border-radius: 24px;
    max-width: 460px;
    padding: 32px 36px 36px;
    transform: translateY(40px) scale(.96);
    opacity: 0;
    transition: transform .4s cubic-bezier(.32, .72, 0, 1), opacity .35s ease;
  }

  .pwa-sheet.pwa-sheet-in {
    transform: translateY(0) scale(1);
    opacity: 1;
  }

  .pwa-handle {
    display: none;
  }
}

/* ══════════════════════════════════════════
   IMAGE GENERATION STYLES
══════════════════════════════════════════ */

/* Indicatore generazione in corso */
.img-gen-bubble {
  background: linear-gradient(135deg, rgba(124, 58, 237, .15), rgba(236, 72, 153, .1)) !important;
  border: 1px solid rgba(236, 72, 153, .3) !important;
  padding: 10px 16px !important;
}

.img-gen-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ec4899;
  font-size: 13px;
  font-weight: 500;
}

.img-gen-spinner {
  width: 14px;
  height: 14px;
  min-width: 14px;
  border: 2px solid rgba(236, 72, 153, .25);
  border-top-color: #ec4899;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

/* Bolla risultato immagine: trasparente */
.img-result-bubble {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

/* Wrapper */
.gen-image-wrapper {
  display: inline-flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .07);
  max-width: 480px;
  width: 100%;
}

/* L'immagine */
.gen-image {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform .3s ease, filter .3s ease;
}

.gen-image:hover {
  transform: scale(1.02);
  filter: brightness(1.06);
}

/* Meta-bar sotto l'immagine */
.gen-image-meta {
  background: rgba(10, 10, 15, .85);
  backdrop-filter: blur(8px);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gen-image-prompt {
  font-size: 12px;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.4;
}

.gen-image-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gen-image-model {
  font-size: 10px;
  color: var(--text-muted);
  font-family: 'Courier New', monospace;
}  
/* ============================================================  
   Kardup AI - PWA Install Modal + Push Button CSS  
   ============================================================ */ 
