/* Global Design Tokens & Theme Setup */
:root {
  /* Dynamic Light-Dark Color Tokens using light-dark() CSS function */
  --bg-color: light-dark(#f8fafc, #090d16);
  --panel-bg: light-dark(rgba(255, 255, 255, 0.75), rgba(15, 22, 36, 0.65));
  --text-color: light-dark(#0f172a, #f8fafc);
  --text-muted: light-dark(#64748b, #94a3b8);
  --primary-color: light-dark(#4f46e5, #6366f1);
  --primary-hover: light-dark(#4338ca, #4f46e5);
  --success-color: light-dark(#059669, #34d399);
  --warning-color: light-dark(#d97706, #fbbf24);
  --error-color: light-dark(#dc2626, #f87171);
  --border-color: light-dark(#e2e8f0, #1e293b);
  --accent-color: light-dark(#8b5cf6, #a78bfa);
  
  --card-shadow: light-dark(
    0 10px 30px -10px rgba(0, 0, 0, 0.05), 
    0 15px 35px -10px rgba(0, 0, 0, 0.4)
  );
  --card-border: light-dark(rgba(0, 0, 0, 0.05), rgba(255, 255, 255, 0.08));

  /* Scrollbar dynamic variables */
  --scrollbar-track: light-dark(#f1f5f9, #0f172a);
  --scrollbar-thumb: light-dark(#cbd5e1, #334155);

  accent-color: var(--primary-color);
  color-scheme: light dark;
}

/* Fallback for browsers without light-dark() support */
@supports not (color: light-dark(white, black)) {
  :root {
    --bg-color: #f8fafc;
    --panel-bg: rgba(255, 255, 255, 0.75);
    --text-color: #0f172a;
    --text-muted: #64748b;
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --success-color: #059669;
    --warning-color: #d97706;
    --error-color: #dc2626;
    --border-color: #e2e8f0;
    --accent-color: #8b5cf6;
    --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
    --card-border: rgba(0, 0, 0, 0.05);
    --scrollbar-track: #f1f5f9;
    --scrollbar-thumb: #cbd5e1;
  }

  @media (prefers-color-scheme: dark) {
    :root {
      --bg-color: #090d16;
      --panel-bg: rgba(15, 22, 36, 0.65);
      --text-color: #f8fafc;
      --text-muted: #94a3b8;
      --primary-color: #6366f1;
      --primary-hover: #4f46e5;
      --success-color: #34d399;
      --warning-color: #fbbf24;
      --error-color: #f87171;
      --border-color: #1e293b;
      --accent-color: #a78bfa;
      --card-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.4);
      --card-border: rgba(255, 255, 255, 0.08);
      --scrollbar-track: #0f172a;
      --scrollbar-thumb: #334155;
    }
  }
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Custom Scrollbars */
:root {
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: thin;
}

@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  ::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
  }
  ::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 9999px;
  }
}

/* Serif font style for distraction-free reading */
.font-serif {
  font-family: 'Playfair Display', Georgia, Cambria, "Times New Roman", Times, serif;
}

/* Common Layout Components */
.glass-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: 16px;
}

/* Typography & Subtitles */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 4px;
}

.hidden {
  display: none !important;
}

/* Header UI */
#main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  margin: 16px;
  position: sticky;
  top: 16px;
  z-index: 100;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  font-size: 1.8rem;
}

.header-brand h1 {
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

#role-nav {
  display: flex;
  background: light-dark(rgba(0, 0, 0, 0.04), rgba(255, 255, 255, 0.04));
  padding: 4px;
  border-radius: 12px;
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 16px;
  font-weight: 500;
  font-size: 0.875rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-btn.active {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.nav-btn:hover:not(.active) {
  color: var(--text-color);
  background: light-dark(rgba(0, 0, 0, 0.02), rgba(255, 255, 255, 0.02));
}

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

#user-display {
  font-size: 0.85rem;
  font-weight: 600;
  background: light-dark(rgba(0,0,0,0.05), rgba(255,255,255,0.08));
  padding: 6px 12px;
  border-radius: 9999px;
}

/* Button System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

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

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.btn-secondary {
  background-color: light-dark(rgba(0,0,0,0.05), rgba(255,255,255,0.08));
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: light-dark(rgba(0,0,0,0.08), rgba(255,255,255,0.12));
}

.btn-success {
  background-color: var(--success-color);
  color: white;
}

.btn-success:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-block {
  display: flex;
  width: 100%;
}

.icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
  color: var(--text-color);
}

.icon-btn:hover {
  background-color: light-dark(rgba(0, 0, 0, 0.05), rgba(255, 255, 255, 0.08));
}

/* Theme Toggle icons behavior */
:root[color-scheme="light"] .theme-icon-light { display: none; }
:root[color-scheme="light"] .theme-icon-dark { display: inline-block; }
:root[color-scheme="dark"] .theme-icon-light { display: inline-block; }
:root[color-scheme="dark"] .theme-icon-dark { display: none; }

/* Main app container */
#app-container {
  flex: 1;
  padding: 0 16px 32px 16px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.view-panel {
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* View 1: Login UI Card styling */
#login-view {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(80vh - 120px);
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 40px 32px;
  text-align: center;
}

.login-card h2 {
  font-size: 1.75rem;
}

.login-card form {
  margin-top: 32px;
  text-align: left;
}

/* Input Fields Styles */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  color: var(--text-muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  background-color: light-dark(#ffffff, rgba(255,255,255,0.02));
  border: 1px solid var(--border-color);
  color: var(--text-color);
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.demo-notice {
  margin-top: 24px;
  padding: 12px;
  border-radius: 10px;
  background: light-dark(rgba(0, 0, 0, 0.02), rgba(255, 255, 255, 0.02));
  border: 1px dashed var(--border-color);
  font-size: 0.8rem;
  text-align: left;
  color: var(--text-muted);
}

.demo-notice ul {
  list-style: none;
  margin-top: 4px;
}

/* View 2: Reader Dashboard UI grid */
.dashboard-header {
  margin-bottom: 32px;
  max-width: 800px;
}

.dashboard-header h2 {
  font-size: 1.85rem;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.book-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  transition: transform 0.2s, box-shadow 0.2s;
}

.book-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.1);
}

.book-badge-category {
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  background: light-dark(rgba(99, 102, 241, 0.1), rgba(99, 102, 241, 0.2));
  color: var(--primary-color);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
  align-self: flex-start;
}

.book-card h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.book-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  flex-grow: 1;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-metadata {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.book-metadata span {
  font-weight: 500;
}

/* Spinner Styles */
.spinner-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 0;
  width: 100%;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-state {
  text-align: center;
  padding: 80px 24px;
  border-radius: 16px;
  border: 2px dashed var(--border-color);
}

.empty-state p {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-muted);
}

.empty-detail {
  display: block;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* View 3: Reader Panel Structure */
.reader-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  margin-bottom: 20px;
}

.reader-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.reader-font-controls {
  display: flex;
  gap: 8px;
}

.font-btn {
  background: light-dark(#fff, rgba(255,255,255,0.05));
  border: 1px solid var(--border-color);
  color: var(--text-color);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.font-btn:hover {
  background: var(--border-color);
}

.reader-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  height: calc(100vh - 220px);
  min-height: 480px;
}

.reader-sidebar {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.reader-sidebar h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.reader-sidebar ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chapter-nav-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--text-color);
  cursor: pointer;
  transition: background-color 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chapter-nav-item:hover {
  background: light-dark(rgba(0, 0, 0, 0.03), rgba(255, 255, 255, 0.03));
}

.chapter-nav-item.active {
  background: light-dark(rgba(99, 102, 241, 0.08), rgba(99, 102, 241, 0.15));
  color: var(--primary-color);
  font-weight: 600;
}

.reader-content {
  padding: 40px;
  overflow-y: auto;
  background: light-dark(#fff, rgba(15, 22, 36, 0.8));
}

.reader-text-body {
  font-size: 1.15rem;
  max-width: 680px;
  margin: 0 auto;
  white-space: pre-line;
}

.reader-text-body h2 {
  font-size: 2.2rem;
  margin-bottom: 32px;
  line-height: 1.2;
}

/* View 4: Proofreading Workspace UI styling */
.proofread-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.proofread-list-container {
  width: 100%;
}

.card {
  padding: 24px;
  height: 100%;
}

.list-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.pending-card {
  padding: 20px;
  border-radius: 12px;
  background: light-dark(rgba(0,0,0,0.02), rgba(255,255,255,0.03));
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pending-card h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.pending-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.4;
}

.pending-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Editor Workspace Container */
.proofread-editor-container {
  width: 100%;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.editor-card {
  padding: 0;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 200px);
  min-height: 520px;
}

.editor-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.editor-actions {
  display: flex;
  gap: 12px;
}

.editor-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  flex: 1;
  overflow: hidden;
}

.editor-chapters-sidebar {
  padding: 20px;
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
}

.editor-chapters-sidebar h5 {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.editor-chapters-sidebar ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.editor-textarea-container {
  display: flex;
  flex-direction: column;
  padding: 24px;
  height: 100%;
}

.editor-textarea-container h4 {
  font-size: 1.1rem;
  margin-bottom: 16px;
}

#editor-textarea {
  flex: 1;
  resize: none;
  font-family: inherit;
  font-size: 1.05rem;
  line-height: 1.6;
  padding: 16px;
  border-radius: 12px;
}

/* View 5: Admin Panel Grid and components */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  font-weight: 600;
  font-size: 0.9rem;
}

.badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-stopped {
  background-color: light-dark(rgba(220,38,38,0.1), rgba(248,113,113,0.15));
  color: var(--error-color);
}

.badge-running {
  background-color: light-dark(rgba(5,150,105,0.1), rgba(52,211,153,0.15));
  color: var(--success-color);
}

.help-text {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Metrics Cards inside Admin view */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  padding: 16px;
  border-radius: 12px;
  background: light-dark(rgba(0,0,0,0.02), rgba(255,255,255,0.03));
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
}

.metric-value {
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 4px;
  color: var(--primary-color);
}

.diagnostics-health {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.diagnostics-health h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.health-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  padding: 8px 0;
  border-bottom: 1px solid light-dark(rgba(0,0,0,0.02), rgba(255,255,255,0.02));
}

.health-val {
  font-weight: 600;
}

/* User provision column formats */
.form-row {
  display: flex;
  gap: 16px;
}

.col {
  flex: 1;
}

/* Table rendering stats in admin panel */
.table-container {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

th {
  background-color: light-dark(rgba(0,0,0,0.02), rgba(255,255,255,0.03));
  color: var(--text-muted);
  font-weight: 600;
  padding: 12px 16px;
  text-transform: uppercase;
  font-size: 0.75rem;
}

td {
  padding: 14px 16px;
  border-top: 1px solid var(--border-color);
}

/* Toast Notifications Container overlay styling */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1000;
  max-width: 360px;
  width: 100%;
}

.toast {
  padding: 14px 20px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.85rem;
  color: white;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@keyframes slideInRight {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast-success { background-color: var(--success-color); }
.toast-error { background-color: var(--error-color); }
.toast-info { background-color: var(--primary-color); }

/* Responsive adjustments */
@media (max-width: 900px) {
  #main-header {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
    padding: 16px;
  }

  .header-actions {
    justify-content: space-between;
  }

  .reader-container {
    grid-template-columns: 1fr;
    height: auto;
  }

  .reader-sidebar {
    height: 180px;
  }

  .editor-body {
    grid-template-columns: 1fr;
    height: auto;
  }

  .editor-chapters-sidebar {
    height: 140px;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
}

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

  .form-row {
    flex-direction: column;
    gap: 0;
  }
}

/* ==========================================
   🖥️ LIVE HARVESTER PROGRESS CONSOLE STYLES
   ========================================== */
.col-span-2 {
  grid-column: span 2;
}

@media (max-width: 900px) {
  .col-span-2 {
    grid-column: span 1;
  }
}

.live-progress-container {
  background: light-dark(rgba(0,0,0,0.01), rgba(255,255,255,0.02));
  border: 1px solid var(--border-color);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.progress-details {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.progress-details div {
  flex: 1;
  min-width: 150px;
}

.progress-bar-wrapper {
  height: 10px;
  background: light-dark(#e2e8f0, #1e293b);
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  width: 0%;
  border-radius: 9999px;
  transition: width 0.4s cubic-bezier(0.1, 0.8, 0.3, 1);
}

.progress-percentage-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: right;
}

.terminal-window {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.terminal-header {
  background: light-dark(#e2e8f0, #172033);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: monospace;
  font-size: 0.75rem;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.terminal-dot.red { background-color: #ef4444; }
.terminal-dot.yellow { background-color: #f59e0b; }
.terminal-dot.green { background-color: #10b981; }

.terminal-title {
  color: var(--text-muted);
  font-weight: 500;
}

.terminal-clear-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.terminal-clear-btn:hover {
  background: light-dark(rgba(0,0,0,0.05), rgba(255,255,255,0.08));
}

.terminal-body {
  background-color: light-dark(#0f172a, #05080f);
  color: light-dark(#f8fafc, #38bdf8);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.825rem;
  padding: 16px;
  height: 250px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scroll-behavior: smooth;
  text-align: left;
}

.console-line {
  word-break: break-all;
  line-height: 1.4;
}

.system-line { color: #64748b; }
.info-line { color: #38bdf8; }
.error-line { color: #f87171; font-weight: 600; }
.success-line { color: #34d399; font-weight: 600; }
.generating-line { color: #fb923c; }
