/* ==========================================================================
   Antigravity Mission Hub - Design System & Styles
   Palette: Cloudflare Amber (#F38020) x Antigravity Deep Cyber (#0B0F19, #1E293B)
   ========================================================================== */

:root {
  /* Color Tokens */
  --bg-primary: #07090e;
  --bg-secondary: #0d121f;
  --bg-card: rgba(18, 24, 38, 0.75);
  --bg-card-hover: rgba(26, 35, 56, 0.85);
  --bg-glass: rgba(15, 23, 42, 0.65);
  --bg-glass-heavy: rgba(11, 15, 25, 0.9);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.15);
  --border-glow: rgba(243, 128, 32, 0.35);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0b0f19;

  /* Accent Colors */
  --cf-orange: #f38020;
  --cf-orange-glow: rgba(243, 128, 32, 0.25);
  --cf-orange-light: #fb923c;
  
  --agy-purple: #8b5cf6;
  --agy-cyan: #06b6d4;
  --agy-blue: #3b82f6;

  /* Status & Category Colors */
  --cat-fix: #f43f5e;
  --cat-fix-bg: rgba(244, 63, 94, 0.15);
  --cat-idea: #fbbf24;
  --cat-idea-bg: rgba(251, 191, 36, 0.15);
  --cat-task: #38bdf8;
  --cat-task-bg: rgba(56, 189, 248, 0.15);
  --cat-rule: #a855f7;
  --cat-rule-bg: rgba(168, 85, 247, 0.15);

  --priority-high: #ef4444;
  --priority-med: #f59e0b;
  --priority-low: #10b981;

  /* Sizing & Geometry */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --shadow-glow: 0 0 25px rgba(243, 128, 32, 0.25);
  --shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, 0.7);

  /* Fonts */
  --font-main: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(243, 128, 32, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(6, 182, 212, 0.05) 0%, transparent 50%),
    linear-gradient(180deg, #07090e 0%, #0d121f 100%);
  background-attachment: fixed;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--cf-orange);
}

/* Container */
.app-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 100vh;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(243, 128, 32, 0.2), rgba(99, 102, 241, 0.2));
  border: 1px solid var(--border-glow);
  box-shadow: 0 0 15px rgba(243, 128, 32, 0.2);
  transition: transform var(--transition-normal);
}

.logo-badge:hover {
  transform: rotate(5deg) scale(1.05);
}

.brand-titles h1 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-titles h1 span.highlight {
  background: linear-gradient(135deg, #f38020 0%, #fb923c 50%, #f472b6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-titles p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.header-badges {
  display: flex;
  gap: 8px;
  align-items: center;
}

.cf-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(243, 128, 32, 0.12);
  border: 1px solid rgba(243, 128, 32, 0.3);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fdba74;
}

/* Cloud KV Sync Badge */
.cloud-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--transition-normal);
}

.cloud-svg-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: all var(--transition-normal);
}

/* Cloud status states */
.cloud-badge.status-synced {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}
.cloud-badge.status-synced .cloud-svg-icon {
  color: #10b981;
  filter: drop-shadow(0 0 4px rgba(16, 185, 129, 0.6));
}

.cloud-badge.status-syncing {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.4);
  color: #7dd3fc;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
}
.cloud-badge.status-syncing .cloud-svg-icon {
  color: #38bdf8;
  animation: pulse-cloud 1.2s infinite ease-in-out;
}

.cloud-badge.status-local {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fcd34d;
}
.cloud-badge.status-local .cloud-svg-icon {
  color: #f59e0b;
}

@keyframes pulse-cloud {
  0%, 100% {
    transform: scale(0.9);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.15);
    opacity: 1;
    filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.8));
  }
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cf-orange) 0%, #ea580c 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(243, 128, 32, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
  box-shadow: 0 6px 20px rgba(243, 128, 32, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-medium);
  transform: translateY(-1px);
}

.btn-prompt {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-prompt:hover {
  background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-icon-only {
  padding: 8px;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
}

/* Stats Ribbon */
.stats-ribbon {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.stat-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  backdrop-filter: blur(8px);
}

.stat-chip:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateY(-2px);
}

.stat-chip.active {
  border-color: var(--cf-orange);
  background: rgba(243, 128, 32, 0.12);
  box-shadow: 0 0 12px rgba(243, 128, 32, 0.2);
}

.stat-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat-icon {
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-count {
  font-size: 1.3rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

/* Toolbar & Filters */
.toolbar-section {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 240px;
  max-width: 420px;
}

.search-box input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.88rem;
  transition: all var(--transition-normal);
}

.search-box input:focus {
  outline: none;
  border-color: var(--cf-orange);
  box-shadow: 0 0 0 3px rgba(243, 128, 32, 0.15);
  background: rgba(0, 0, 0, 0.6);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.filters-group {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.select-filter {
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.select-filter:focus {
  outline: none;
  border-color: var(--cf-orange);
}

.view-toggle {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 3px;
}

.view-btn {
  padding: 6px 12px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.view-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* Kanban Board */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  align-items: start;
}

@media (max-width: 1100px) {
  .kanban-board {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .kanban-board {
    grid-template-columns: 1fr;
  }
}

.kanban-column {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  min-height: 520px;
  backdrop-filter: blur(8px);
  transition: border-color var(--transition-normal);
}

.kanban-column.drag-over {
  border-color: var(--cf-orange);
  background: rgba(243, 128, 32, 0.05);
}

.column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.column-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.column-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.column-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

/* Card Styling */
.memo-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  cursor: grab;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.memo-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--card-accent, var(--cf-orange));
  border-top-left-radius: var(--radius-md);
  border-bottom-left-radius: var(--radius-md);
}

.memo-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.memo-card.dragging {
  opacity: 0.4;
  cursor: grabbing;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-fix {
  background: var(--cat-fix-bg);
  color: var(--cat-fix);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.badge-idea {
  background: var(--cat-idea-bg);
  color: var(--cat-idea);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.badge-task {
  background: var(--cat-task-bg);
  color: var(--cat-task);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.badge-rule {
  background: var(--cat-rule-bg);
  color: var(--cat-rule);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.badge-priority-high {
  color: var(--priority-high);
  background: rgba(239, 68, 68, 0.15);
}

.badge-priority-med {
  color: var(--priority-med);
  background: rgba(245, 158, 11, 0.15);
}

.badge-priority-low {
  color: var(--priority-low);
  background: rgba(16, 185, 129, 0.15);
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  word-break: break-word;
}

.card-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.card-scope {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--agy-cyan);
  background: rgba(6, 182, 212, 0.08);
  padding: 3px 6px;
  border-radius: 4px;
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  margin-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.card-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.card-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.btn-card-action {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.btn-card-action:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.btn-card-action.prompt-copy:hover {
  background: rgba(99, 102, 241, 0.2);
  color: #818cf8;
  border-color: #6366f1;
}

/* List View */
.list-view-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  gap: 16px;
}

.list-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateX(4px);
}

.list-item-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.list-item-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.list-item-title {
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item-status-pill {
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  color: var(--text-muted);
  text-align: center;
  gap: 12px;
}

.empty-state-icon {
  font-size: 2.5rem;
  opacity: 0.6;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-glass-heavy);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transform: translateY(20px) scale(0.97);
  transition: all var(--transition-normal);
}

.modal-overlay.active .modal-content {
  transform: translateY(0) scale(1);
}

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

.modal-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 18px 24px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.2);
}

/* Forms */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input, .form-textarea, .form-select {
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.9rem;
  transition: all var(--transition-normal);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--cf-orange);
  box-shadow: 0 0 0 3px rgba(243, 128, 32, 0.15);
  background: rgba(0, 0, 0, 0.6);
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.5;
}

.category-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.cat-option {
  position: relative;
  cursor: pointer;
}

.cat-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cat-option-box {
  padding: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all var(--transition-normal);
}

.cat-option input:checked + .cat-option-box {
  border-color: var(--cf-orange);
  background: rgba(243, 128, 32, 0.12);
}

.cat-option-icon {
  font-size: 1.2rem;
}

.cat-option-text {
  font-size: 0.85rem;
  font-weight: 600;
}

/* Prompt Preview Box */
.prompt-preview-box {
  background: #030712;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  max-height: 350px;
  overflow-y: auto;
  white-space: pre-wrap;
  color: #e2e8f0;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: var(--bg-glass-heavy);
  border: 1px solid var(--cf-orange);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 15px rgba(243, 128, 32, 0.3);
  font-size: 0.88rem;
  font-weight: 500;
  transform: translateY(20px);
  opacity: 0;
  transition: all var(--transition-normal);
  pointer-events: auto;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon {
  font-size: 1.2rem;
  color: var(--cf-orange);
}

/* Guide Modal Custom Styling */
.guide-step {
  display: flex;
  gap: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  background: var(--cf-orange);
  color: white;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.step-content h4 {
  font-size: 0.95rem;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.step-content p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.code-snippet {
  background: #000;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #38bdf8;
  display: inline-block;
  margin-top: 4px;
}

/* ==========================================================================
   Voice Input & Google Calendar Integration Styles
   ========================================================================== */

/* Header Voice Button */
.btn-voice {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 50%, #f38020 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(244, 63, 94, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-voice:hover {
  background: linear-gradient(135deg, #fb7185 0%, #f43f5e 50%, #fb923c 100%);
  box-shadow: 0 6px 22px rgba(244, 63, 94, 0.6);
  transform: translateY(-1px);
}

.mic-pulse-dot {
  display: inline-block;
  animation: mic-pulse 1.8s infinite ease-in-out;
}

@keyframes mic-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(244, 63, 94, 0)); }
  50% { transform: scale(1.18); filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8)); }
}

/* Floating Action Button (FAB) for Mobile & Quick Access */
.fab-voice-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f43f5e 0%, #f38020 100%);
  border: 2px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  cursor: pointer;
  z-index: 990;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(244, 63, 94, 0.5), 0 0 20px rgba(243, 128, 32, 0.35);
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fab-voice-btn:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 12px 30px rgba(244, 63, 94, 0.7), 0 0 25px rgba(243, 128, 32, 0.5);
}

.fab-voice-btn:active {
  transform: scale(0.95);
}

.fab-mic-icon {
  font-size: 1.65rem;
  z-index: 2;
}

.fab-pulse-ring {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 2px solid #f43f5e;
  opacity: 0.8;
  animation: fab-ring-pulse 2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

@keyframes fab-ring-pulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* Card Date & Calendar Badges */
.badge-due {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
}

.badge-due.is-urgent {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.45);
  color: #fb7185;
}

/* Voice Recognition Modal */
.modal-voice-content {
  max-width: 520px;
}

.modal-voice-body {
  padding: 24px 20px;
}

.mic-modal-badge {
  font-size: 1.3rem;
  margin-right: 6px;
}

.voice-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

/* Pulse waves animation */
.pulse-ring-container {
  position: relative;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0;
}

.pulse-core {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f43f5e 0%, #f38020 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 0 25px rgba(244, 63, 94, 0.6);
  z-index: 3;
}

.pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(244, 63, 94, 0.25);
  animation: pulse-wave 2.2s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 1;
}

.pulse-ring.delay-1 {
  animation-delay: 0.6s;
}

.pulse-ring.delay-2 {
  animation-delay: 1.2s;
}

@keyframes pulse-wave {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(1.7); opacity: 0; }
}

.voice-listening-text {
  font-size: 1rem;
  font-weight: 700;
  color: #f43f5e;
  letter-spacing: 0.04em;
  animation: text-pulse 1.5s infinite ease-in-out;
}

@keyframes text-pulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

.voice-transcript-box {
  width: 100%;
  min-height: 72px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: var(--text-primary);
  font-size: 1.05rem;
  line-height: 1.5;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  word-break: break-word;
}

.voice-transcript-box .placeholder-tip {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Result Card */
.voice-result-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-sm);
  color: #34d399;
  font-weight: 600;
  font-size: 0.9rem;
}

.voice-parsed-card {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.parsed-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.parsed-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.parsed-date-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.parsed-tag {
  background: rgba(243, 128, 32, 0.15);
  border: 1px solid rgba(243, 128, 32, 0.4);
  color: var(--cf-orange);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.parsed-val-input {
  flex: 1;
}

.voice-action-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
  width: 100%;
  margin-top: 6px;
}

/* Google Calendar Action Button */
.btn-google-cal {
  background: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(26, 115, 232, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 700;
}

.btn-google-cal:hover {
  background: linear-gradient(135deg, #4285f4 0%, #1a73e8 100%);
  box-shadow: 0 6px 20px rgba(26, 115, 232, 0.6);
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .voice-action-grid {
    grid-template-columns: 1fr;
  }
  .fab-voice-btn {
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
  }
}
