/* Import Premium Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --font-sans: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
  
  /* Dark Mode Variables (Default) */
  --bg-app: #0b0f19;
  --bg-sidebar: #050811;
  --bg-panel: rgba(17, 25, 40, 0.65);
  --bg-panel-solid: #111928;
  --border-glow: rgba(255, 255, 255, 0.08);
  --border-glow-hover: rgba(255, 255, 255, 0.16);
  --border-glow-focus: rgba(99, 102, 241, 0.4);
  
  --ink: #f3f4f6;
  --ink-muted: #9ca3af;
  --line: rgba(255, 255, 255, 0.08);
  
  /* Accent Colors */
  --teal: #14b8a6;
  --teal-glow: rgba(20, 184, 166, 0.15);
  --indigo: #6366f1;
  --indigo-glow: rgba(99, 102, 241, 0.2);
  
  /* State Colors */
  --green: #10b981;
  --soft-green: rgba(16, 185, 129, 0.12);
  --blue: #3b82f6;
  --soft-blue: rgba(59, 130, 246, 0.12);
  --amber: #f59e0b;
  --soft-amber: rgba(245, 158, 11, 0.12);
  --red: #ef4444;
  --soft-red: rgba(239, 68, 68, 0.12);
  
  --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --backdrop-blur: blur(16px);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Mode Variables Override */
[data-theme="light"] {
  --bg-app: #f4f6f9;
  --bg-sidebar: #0f172a; /* Keep dark sidebar for premium brand contrast */
  --bg-panel: rgba(255, 255, 255, 0.8);
  --bg-panel-solid: #ffffff;
  --border-glow: rgba(0, 0, 0, 0.06);
  --border-glow-hover: rgba(0, 0, 0, 0.12);
  --border-glow-focus: rgba(99, 102, 241, 0.4);
  
  --ink: #0f172a;
  --ink-muted: #64748b;
  --line: rgba(0, 0, 0, 0.06);
  
  --teal: #0f766e;
  --teal-glow: rgba(15, 118, 110, 0.1);
  --indigo: #4f46e5;
  --indigo-glow: rgba(79, 70, 229, 0.1);
  
  /* States */
  --green: #047857;
  --soft-green: rgba(4, 120, 87, 0.1);
  --blue: #1d4ed8;
  --soft-blue: rgba(29, 78, 216, 0.1);
  --amber: #b45309;
  --soft-amber: rgba(180, 83, 9, 0.1);
  --red: #b91c1c;
  --soft-red: rgba(185, 28, 28, 0.1);
  
  --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
  --backdrop-blur: blur(12px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: var(--bg-app);
  color: var(--ink);
  font-family: var(--font-sans);
  letter-spacing: -0.01em;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

button, input, select, textarea {
  font: inherit;
  transition: var(--transition);
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

.hidden {
  display: none !important;
}

/* App Shell Grid Layout */
.app-shell {
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: 100vh;
}

/* Sidebar Layout & Styling */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 32px 24px;
  background: var(--bg-sidebar);
  color: #ffffff;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--teal), var(--indigo));
  color: #ffffff;
  font-weight: 800;
  font-size: 1.25rem;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.brand h1 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, #ffffff, #c7d2fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand p {
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Language and Theme Switcher container */
.sidebar-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lang-select-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-select-wrap label {
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 600;
  margin: 0;
}

.lang-select-dropdown {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.8rem;
  outline: none;
  cursor: pointer;
}

.lang-select-dropdown option {
  background: #0f172a;
  color: #fff;
}

.theme-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 4px;
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  padding: 12px 16px;
  text-align: left;
  font-size: 0.92rem;
  font-weight: 600;
  transition: var(--transition);
}

.nav-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(20, 184, 166, 0.15));
  border-color: rgba(99, 102, 241, 0.3);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.05);
}

.privacy-box {
  display: flex;
  gap: 12px;
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.privacy-box strong {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

.privacy-box p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.4;
}

.privacy-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulse-glow 2s infinite;
}

/* Workspace main content */
.workspace {
  position: relative;
  min-width: 0;
  padding: 40px;
  overflow-y: auto;
  max-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
}

.topbar h2 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--ink), var(--ink-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.eyebrow {
  color: var(--indigo);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.status-strip {
  display: flex;
  align-items: center;
  gap: 16px;
}

#dateStamp {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.state-badge {
  border-radius: 999px;
  padding: 6px 16px;
  font-weight: 800;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.state-badge::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.state-badge.focused {
  background: var(--soft-green);
  color: var(--green);
}
.state-badge.focused::before {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.state-badge.neutral {
  background: var(--soft-blue);
  color: var(--blue);
}
.state-badge.neutral::before {
  background: var(--blue);
  box-shadow: 0 0 8px var(--blue);
}

.state-badge.stressed {
  background: var(--soft-amber);
  color: var(--amber);
}
.state-badge.stressed::before {
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
}

.state-badge.overwhelmed {
  background: var(--soft-red);
  color: var(--red);
  animation: pulse-glow-red 1.5s infinite;
}
.state-badge.overwhelmed::before {
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
}

/* Toast Notification */
.toast {
  position: fixed;
  top: 32px;
  right: 32px;
  z-index: 50;
  transform: translateY(-20px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid var(--border-glow);
  border-radius: 12px;
  background: var(--bg-panel-solid);
  color: var(--ink);
  padding: 14px 20px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

/* Panels (Glassmorphism layout containers) */
.panel {
  border: 1px solid var(--border-glow);
  border-radius: 16px;
  background: var(--bg-panel);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.panel:hover {
  border-color: var(--border-glow-hover);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.panel h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Form Controls styling */
label {
  display: block;
  margin: 14px 0 6px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  padding: 12px 14px;
  outline: none;
  font-size: 0.92rem;
  transition: var(--transition);
}

/* Form inputs on light mode need distinct backgrounds */
[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
  background: rgba(0, 0, 0, 0.02);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--indigo);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 4px var(--indigo-glow);
}

[data-theme="light"] input:focus,
[data-theme="light"] select:focus,
[data-theme="light"] textarea:focus {
  background: rgba(255, 255, 255, 0.9);
}

textarea {
  resize: vertical;
  line-height: 1.5;
}

.field-error {
  min-height: 18px;
  margin-top: 6px;
  color: var(--red);
  font-size: 0.8rem;
  font-weight: 600;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.form-row.compact {
  grid-template-columns: 1fr 1.2fr;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

/* Button UI Components */
.primary-btn, .secondary-btn, .ghost-btn, .danger-btn, .mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 10px;
  padding: 10px 20px;
  font-weight: 700;
  font-size: 0.88rem;
  transition: var(--transition);
  border: 1px solid transparent;
}

.primary-btn {
  background: linear-gradient(135deg, var(--indigo), #4f46e5);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}
.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}
.primary-btn:active {
  transform: translateY(1px);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  border-color: var(--line);
}
.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-glow-hover);
}

.ghost-btn {
  background: transparent;
  color: var(--indigo);
  border-color: rgba(99, 102, 241, 0.3);
}
.ghost-btn:hover {
  background: var(--indigo-glow);
  color: #ffffff;
}

[data-theme="light"] .ghost-btn:hover {
  color: var(--indigo);
}

.danger-btn {
  background: var(--soft-red);
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.2);
}
.danger-btn:hover {
  background: var(--red);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.mini-btn {
  min-height: 32px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  border-color: var(--line);
  font-size: 0.78rem;
  border-radius: 6px;
}
.mini-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}
.mini-btn.danger {
  background: var(--soft-red);
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.1);
}
.mini-btn.danger:hover {
  background: var(--red);
  color: #fff;
}

/* Views display switching */
.view {
  display: none;
  animation: fade-in 0.4s ease;
}

.view.active {
  display: block;
}

/* Hero Section (Home tab) */
.hero-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  margin-bottom: 24px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-copy h3 {
  margin: 12px 0 16px;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--ink), var(--indigo));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-copy p {
  color: var(--ink-muted);
  line-height: 1.65;
  font-size: 1.05rem;
  margin-bottom: 24px;
}

.hero-output {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-panel);
  border: 1px solid var(--border-glow);
  border-radius: 16px;
  padding: 24px;
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  box-shadow: var(--shadow);
}

.output-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-grid .panel h3 {
  margin-bottom: 8px;
  color: var(--indigo);
}

.feature-grid .panel p {
  color: var(--ink-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* Demo Layout */
.demo-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
}

.demo-card > .small-note {
  margin-bottom: 20px;
}

.step-list, .demo-output-list {
  display: grid;
  gap: 14px;
}

.step-list article, .demo-output-list div {
  border: 1px solid var(--border-glow);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  padding: 16px;
  transition: var(--transition);
}

.step-list article:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-glow-hover);
}

.step-list strong, .demo-output-list strong {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  font-size: 0.95rem;
}

.step-list p, .demo-output-list p {
  color: var(--ink-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* Dashboard Panel & Adaptive Plan styling */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
}

.intake-panel textarea {
  margin-top: 10px;
  background: rgba(0, 0, 0, 0.15);
  border-color: var(--border-glow);
}

.meter-wrap {
  margin-top: 16px;
}

.meter {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  position: relative;
}

.meter span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--amber), var(--red));
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.meter-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--ink-muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
}

.state-details {
  margin-top: 20px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.55;
  border: 1px solid var(--border-glow);
}

.signals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.signal-chip {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glow);
  color: var(--ink-muted);
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
}

.plan-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.plan-list li {
  padding: 14px 16px;
  border: 1px solid var(--border-glow);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  line-height: 1.5;
  font-size: 0.92rem;
  position: relative;
  padding-left: 44px;
}

.plan-list li::before {
  content: "✦";
  position: absolute;
  left: 18px;
  top: 14px;
  color: var(--indigo);
  font-size: 1rem;
}

.plan-panel .panel-heading #planMode {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--indigo);
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--indigo-glow);
}

.small-note {
  margin-top: 14px;
  color: var(--ink-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

/* Two Column Layout (Tasks, Memory, History views) */
.two-column-layout, .memory-layout, .ethics-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 24px;
}

.list-panel {
  margin-top: 24px;
}

/* Cards & Lists (Tasks items, Notes items) */
.task-list, .memory-results, .mini-list {
  display: grid;
  gap: 12px;
}

.task-item, .memory-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--border-glow);
  border-radius: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  transition: var(--transition);
}

.task-item:hover, .memory-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-glow-hover);
}

.memory-item {
  display: block;
}

.task-item strong, .memory-item strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.task-item p, .memory-item p {
  margin: 10px 0;
  line-height: 1.5;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.meta {
  color: var(--ink-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.muted-item {
  opacity: 0.5;
}

.item-actions {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  align-content: flex-start;
  justify-content: flex-start;
  gap: 6px;
}

/* Summary Panel elements */
.summary-panel .summary-heading #storageText {
  color: var(--ink-muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.summary-grid div {
  border: 1px solid var(--border-glow);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  padding: 16px 12px;
  text-align: center;
  transition: var(--transition);
}

.summary-grid div:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.04);
}

.summary-grid strong {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--indigo);
  margin-bottom: 2px;
}

.summary-grid span {
  color: var(--ink-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.check-list {
  margin: 12px 0 0;
  padding-left: 20px;
  line-height: 1.7;
}

.check-list li {
  color: var(--ink-muted);
  font-size: 0.88rem;
  margin-bottom: 6px;
}

/* Modal Dialog */
dialog {
  border: 1px solid var(--border-glow);
  border-radius: 16px;
  background: var(--bg-panel-solid);
  color: var(--ink);
  padding: 0;
  width: min(600px, calc(100% - 32px));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  outline: none;
}

dialog::backdrop {
  background: rgba(3, 7, 18, 0.7);
  backdrop-filter: blur(8px);
}

.dialog-card {
  padding: 28px;
}

.dialog-card h3 {
  margin-bottom: 16px;
  font-size: 1.25rem;
  font-weight: 800;
}

.dialog-card textarea {
  margin-bottom: 20px;
  background: rgba(0, 0, 0, 0.15);
}

/* AI Model & Vector Settings selectors */
.retrieval-mode-selector {
  display: inline-flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid var(--border-glow);
}

.retrieval-option-btn {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  color: var(--ink-muted);
  text-transform: uppercase;
}

.retrieval-option-btn.active {
  background: var(--indigo);
  color: #fff;
}

/* Timeline & Stats Visualizations */
.timeline-wrap {
  margin-top: 16px;
  display: grid;
  gap: 12px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.timeline-item {
  display: flex;
  gap: 16px;
  position: relative;
  padding-left: 12px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 20px;
  bottom: -20px;
  width: 2px;
  background: var(--line);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--indigo);
  margin-top: 6px;
  flex-shrink: 0;
  box-shadow: 0 0 6px var(--indigo);
}

.timeline-content {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glow);
  padding: 10px 14px;
  border-radius: 8px;
  flex-grow: 1;
}

.timeline-content .title-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.timeline-content p {
  font-size: 0.82rem;
  color: var(--ink-muted);
  line-height: 1.4;
}

.stats-card-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.stat-card-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glow);
  padding: 12px;
  border-radius: 8px;
  text-align: center;
}

.stat-card-item strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--indigo);
}

.stat-card-item span {
  font-size: 0.72rem;
  color: var(--ink-muted);
  font-weight: 700;
}

/* Multi-language alignment fixes */
[lang="ur"] *, [lang="hi"] *, [lang="bn"] * {
  letter-spacing: normal;
}

/* Animations */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-glow {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes pulse-glow-red {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Responsive Overrides */
@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 260px minmax(0, 1fr);
  }
  .dashboard-grid, .two-column-layout, .ethics-grid, .hero-panel, .demo-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    padding: 24px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .nav-list {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
  .workspace {
    padding: 24px;
  }
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .form-row, .form-row.compact, .summary-grid, .feature-grid {
    grid-template-columns: 1fr;
  }
  .task-item {
    flex-direction: column;
  }
  .item-actions {
    flex-direction: row;
    margin-top: 10px;
  }
  .toast {
    left: 24px;
    right: 24px;
    top: 16px;
  }
}
