/* ===== MESH Design System — CSS Custom Properties ===== */

:root,
[data-theme="dark"] {
  --bg: #0a0e1a;
  --surface: #111827;
  --surface-2: #141c2b;
  --surface-raised: #1a2332;
  --border: #1e3a5f;
  --border-glow: #1e3a5f40;
  --text-primary: #f0f4f8;
  --text-secondary: #8899aa;
  --text-muted: #4a5568;

  --accent: #00d4ff;
  --accent-glow: #00d4ff33;
  --accent-dim: #00d4ff15;
  --success: #00e68a;
  --warning: #ffb020;
  --danger: #ff4d6a;
  --info: #a78bfa;

  --module-memory: #a78bfa;
  --module-calendar: #38bdf8;
  --module-notes: #2dd4bf;
  --module-todo: #fbbf24;

  --font: 'Rethink Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  --radius: 8px;
  --transition: 200ms ease;
}

[data-theme="light"] {
  --bg: #f0f2f5;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --surface-raised: #f1f5f9;
  --border: #d0d8e0;
  --border-glow: #d0d8e020;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;

  --accent: #0091b3;
  --accent-glow: #00b8d920;
  --accent-dim: #00b8d910;
}

.mono {
  font-family: var(--font-mono);
}

/* ===== Reset & Base ===== */

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  transition: background var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
  font-size: 13px;
}

/* ===== Top Bar ===== */

.top-bar {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: transparent;
  border-bottom: 1px solid var(--border-glow);
  flex-shrink: 0;
  z-index: 100;
  position: relative;
}

.top-bar-left {
  display: flex;
  align-items: center;
}

.logo-svg {
  display: block;
}

.top-nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.feedback-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 12px;
  cursor: pointer;
  transition: var(--transition);
}
.feedback-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.top-nav {
  display: flex;
  gap: 2px;
}

.nav-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.nav-btn svg {
  width: 16px;
  height: 16px;
}


.nav-btn:hover,
.nav-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 0 12px var(--accent-dim);
}

.theme-toggle {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition);
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.theme-toggle svg {
  width: 14px;
  height: 14px;
}

[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }

/* ===== HUD Layout ===== */

.hud {
  flex: 1;
  display: grid;
  grid-template-columns: 280px 1fr 280px;
  gap: 0;
  overflow: hidden;
}

.wing {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  overflow-y: auto;
  background: transparent;
  scrollbar-width: none;
}

.wing::-webkit-scrollbar {
  width: 0;
  background: transparent;
}

.wing:hover {
  scrollbar-width: thin;
}

.wing:hover::-webkit-scrollbar {
  width: 4px;
}

.wing:hover::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.wing-left {}

.wing-right {}

/* Full-width mode — hides wings for modules/detail pages */
.hud.full-width {
  grid-template-columns: 1fr;
}

.hud.full-width .wing {
  display: none;
}

.hud.full-width .center {
  padding: 24px 32px;
  align-items: stretch;
}

.hud.full-width .view {
  max-width: none;
}

.center {
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.view {
  max-width: 640px;
  width: 100%;
}


/* ===== Module Wing Panels ===== */

.module-panel {
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid color-mix(in srgb, var(--border) 40%, transparent);
  border-radius: var(--radius);
  padding: 16px;
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
}

.module-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: var(--radius) var(--radius) 0 0;
}

.module-panel[data-module="memory"]::before { background: var(--module-memory); }
.module-panel[data-module="calendar"]::before { background: var(--module-calendar); }
.module-panel[data-module="notes"]::before { background: var(--module-notes); }
.module-panel[data-module="todo"]::before { background: var(--module-todo); }
.module-panel[data-module="conversations"]::before { background: var(--accent); }

[data-theme="dark"] .module-panel:hover {
  border-color: color-mix(in srgb, var(--border) 50%, var(--accent) 50%);
  box-shadow: 0 0 20px var(--accent-dim);
  background: color-mix(in srgb, var(--surface) 75%, transparent);
}

[data-theme="light"] .module-panel {
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border-color: color-mix(in srgb, var(--border) 50%, transparent);
}

[data-theme="light"] .module-panel:hover {
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  border-color: var(--border);
}

.module-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.module-panel-name {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.module-panel-name[data-module="memory"] { color: var(--module-memory); }
.module-panel-name[data-module="calendar"] { color: var(--module-calendar); }
.module-panel-name[data-module="notes"] { color: var(--module-notes); }
.module-panel-name[data-module="todo"] { color: var(--module-todo); }

.module-panel-body {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.module-panel-meta {
  font-family: var(--font-mono);
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ===== Wing List Items ===== */

.module-panel-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.wing-list-item {
  padding: 6px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 30%, transparent);
  cursor: pointer;
  transition: background var(--transition);
  border-radius: 4px;
  padding: 6px 4px;
}

.wing-list-item:last-child {
  border-bottom: none;
}

.wing-list-item:hover {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.wing-item-title {
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 400;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wing-item-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  gap: 6px;
}

.wing-item-overdue .wing-item-title {
  color: var(--text-primary);
}

.wing-convo-item.active {
  background: var(--accent-dim);
}

.wing-convo-item.active .wing-item-title {
  color: var(--accent);
}

/* "View all" footer link */
.module-panel-footer {
  font-family: var(--font-mono);
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid color-mix(in srgb, var(--border) 30%, transparent);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color var(--transition);
  text-align: left;
}

.module-panel-footer:hover {
  color: var(--accent);
}

/* ===== Bottom Bar ===== */

.bottom-bar {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: transparent;
  border-top: 1px solid var(--border-glow);
  flex-shrink: 0;
  font-size: 11px;
}

.usage-bar-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.usage-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.usage-track {
  width: 120px;
  height: 3px;
  background: var(--surface-raised);
  border-radius: 2px;
  overflow: hidden;
}

.usage-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--success));
  border-radius: 2px;
  transition: width 600ms ease-out;
}

[data-theme="dark"] .usage-fill {
  box-shadow: 0 0 6px var(--accent-glow);
}

.usage-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}

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

.clock {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}
.last-sync {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.status-indicator {
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ===== Status Dots ===== */

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-dot.healthy {
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
  animation: pulse 3s ease-in-out infinite;
}

.status-dot.degraded {
  background: var(--warning);
  box-shadow: 0 0 6px var(--warning);
  animation: pulse 1.5s ease-in-out infinite;
}

.status-dot.unavailable {
  background: var(--danger);
  box-shadow: 0 0 4px var(--danger);
}

.status-dot.stopped {
  background: var(--text-muted);
}

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

/* ===== Center Content — Feed ===== */

.feed {
  max-width: 600px;
  margin: 0 auto;
}

.feed-header {
  text-align: center;
  margin-bottom: 28px;
}

.feed-greeting {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 6px;
}

.feed-date {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.feed-loading {
  text-align: center;
  padding: 48px 16px;
}

.feed-loading-text {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.loading-dots::after {
  content: '';
  animation: dots 1.5s steps(4) infinite;
}

@keyframes dots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}

/* Feed entries */

.feed-entry {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 12px;
  transition: all var(--transition);
}

[data-theme="dark"] .feed-entry {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.feed-briefing {
  border-left: 3px solid var(--accent);
}

[data-theme="dark"] .feed-briefing {
  box-shadow: 0 2px 20px var(--accent-dim), inset 0 0 30px var(--accent-dim);
}

.feed-entry-muted {
  border-left-color: var(--text-muted);
  opacity: 0.6;
}

.feed-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.feed-entry-source {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.feed-entry-muted .feed-entry-source {
  color: var(--text-muted);
}

.feed-entry-time {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

.feed-entry-body {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 13px;
}

.feed-entry-body p {
  margin-bottom: 10px;
}

.feed-entry-body p:last-child {
  margin-bottom: 0;
}

.feed-entry-body code {
  background: var(--surface-raised);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12px;
}

.feed-entry-modules {
  display: flex;
  gap: 6px;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.feed-module-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 3px;
  border: 1px solid;
}

.feed-module-tag[data-module="memory"] {
  color: var(--module-memory);
  border-color: color-mix(in srgb, var(--module-memory) 30%, transparent);
  background: color-mix(in srgb, var(--module-memory) 8%, transparent);
}

.feed-module-tag[data-module="calendar"] {
  color: var(--module-calendar);
  border-color: color-mix(in srgb, var(--module-calendar) 30%, transparent);
  background: color-mix(in srgb, var(--module-calendar) 8%, transparent);
}

.feed-module-tag[data-module="notes"] {
  color: var(--module-notes);
  border-color: color-mix(in srgb, var(--module-notes) 30%, transparent);
  background: color-mix(in srgb, var(--module-notes) 8%, transparent);
}

.feed-module-tag[data-module="todo"] {
  color: var(--module-todo);
  border-color: color-mix(in srgb, var(--module-todo) 30%, transparent);
  background: color-mix(in srgb, var(--module-todo) 8%, transparent);
}

/* Feed status entry */

.feed-status {
  border-left: 3px solid var(--border);
}

.feed-stats {
  display: flex;
  gap: 24px;
}

.feed-stat {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.feed-stat-value {
  font-size: 20px;
  font-weight: 500;
  color: var(--accent);
}

.feed-stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ===== Center Content — History ===== */

.page-header {
  margin-bottom: 20px;
}

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

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 12px;
  cursor: pointer;
  margin-bottom: 16px;
  transition: var(--transition);
}

.back-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ── List View ── */
.list-view-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.list-view-title {
  font-size: 18px;
  font-weight: 600;
}
.list-view-count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}
.list-view-new {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 5px;
}
.list-view-new:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}
.list-entry {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-glow);
  border-radius: 8px;
  padding: 14px 40px 14px 18px;
  margin-bottom: 8px;
  border-left: 3px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}
.list-entry > .action-btn {
  position: absolute;
  top: 10px;
  right: 10px;
}
.list-entry:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.list-entry-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.list-entry-preview {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.list-entry-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 6px;
  display: flex;
  gap: 12px;
}

/* ── Detail View ── */
.detail-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}
.detail-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 20px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.detail-body {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
}
.detail-body p { margin-bottom: 12px; }
.detail-section {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-glow);
}
.detail-section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.detail-field {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 12px;
}
.detail-field-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  min-width: 80px;
  flex-shrink: 0;
}
.detail-field-value { color: var(--text-secondary); }

.struck { text-decoration: line-through; color: var(--text-muted); }

.detail-actions { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--border); display: flex; gap: 8px; }
.btn-edit {
  font-family: 'JetBrains Mono', monospace; font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 6px 14px; border-radius: 6px; cursor: pointer;
  background: transparent; color: var(--accent); border: 1px solid var(--accent);
  transition: background 0.15s, color 0.15s;
}
.btn-edit:hover { background: var(--accent); color: var(--bg); }

.btn-complete {
  font-family: 'JetBrains Mono', monospace; font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 6px 14px; border-radius: 6px; cursor: pointer;
  background: transparent; color: var(--success); border: 1px solid var(--success);
  transition: background 0.15s, color 0.15s;
}
.btn-complete:hover { background: var(--success); color: var(--bg); }
.btn-complete.completed { color: var(--text-muted); border-color: var(--text-muted); }
.btn-complete.completed:hover { background: var(--text-muted); color: var(--bg); }

/* Todo checkbox in list */
.todo-check {
  width: 14px; height: 14px; min-width: 14px; border-radius: 3px;
  border: 1px solid var(--border); background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.15s, background 0.15s;
  margin-top: 1px;
}
.todo-check:hover { border-color: var(--success); }
.todo-check.checked { border-color: var(--success); background: var(--success); color: var(--bg); }
.list-entry:has(.todo-check) { display: flex; align-items: flex-start; gap: 10px; }
.list-entry-content { flex: 1; min-width: 0; cursor: pointer; }

.btn-delete {
  font-family: 'JetBrains Mono', monospace; font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 6px 14px; border-radius: 6px; cursor: pointer;
  background: transparent; color: var(--danger, #ff4d6a); border: 1px solid var(--danger, #ff4d6a);
  transition: background 0.15s, color 0.15s;
}
.btn-delete:hover { background: var(--danger, #ff4d6a); color: var(--bg); }

.page-title {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 4px;
}

.page-header-row .page-title {
  margin-bottom: 0;
}

.page-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: all var(--transition);
}

.history-table {
  width: 100%;
  border-collapse: collapse;
}

.history-table th {
  font-family: var(--font-mono);
  text-align: left;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

.history-table td {
  padding: 8px 10px;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.history-table tr:hover td {
  background: var(--surface-raised);
}

.history-table .tool-name {
  color: var(--accent);
}

.success-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
}

.success-badge.ok {
  background: color-mix(in srgb, var(--success) 15%, transparent);
  color: var(--success);
}

.success-badge.fail {
  background: color-mix(in srgb, var(--danger) 15%, transparent);
  color: var(--danger);
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

.pagination button {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent-glow);
  padding: 4px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-family: var(--font-mono);
  transition: all var(--transition);
}

.pagination button:hover { background: var(--accent-glow); }
.pagination button:disabled { opacity: 0.3; cursor: default; }

.filter-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  align-items: center;
}
.filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.filter-label {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.filter-count {
  margin-left: auto;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.filter-btn {
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-mono);
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.filter-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.filter-btn.active {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: var(--accent-glow);
}

/* ===== Calendar View Controls ===== */

#cal-controls {
  justify-content: space-between;
}

.cal-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cal-nav-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  transition: color var(--transition), border-color var(--transition);
}
.cal-nav-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.cal-nav-today {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  transition: color var(--transition), border-color var(--transition);
}
.cal-nav-today:hover {
  color: var(--accent);
  border-color: var(--accent-glow);
}

.cal-date-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

/* Week view */
.cal-week-day {
  margin-bottom: 4px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-glow);
}
.cal-week-day:last-child {
  border-bottom: none;
}
.cal-week-day.cal-today .cal-week-day-label {
  color: var(--accent);
}
.cal-week-day-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.cal-week-empty {
  font-size: 11px;
  color: var(--text-muted);
  padding: 4px 0;
}
.list-entry.compact {
  padding: 8px 12px;
  margin-bottom: 4px;
}
.list-entry.compact .list-entry-title {
  font-size: 13px;
}

/* Month view */
.cal-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.cal-month-header {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  text-transform: uppercase;
  padding: 6px 0;
  letter-spacing: 0.5px;
}
.cal-month-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
  position: relative;
  gap: 4px;
}
.cal-month-cell.empty {
  cursor: default;
}
.cal-month-cell:not(.empty):hover {
  background: var(--surface-raised);
}
.cal-month-cell.cal-today .cal-month-day {
  color: var(--accent);
  font-weight: 700;
}
.cal-month-cell.has-events {
  background: var(--accent-dim);
}
.cal-month-day {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}
.cal-month-dots {
  display: flex;
  gap: 3px;
}
.cal-month-event-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--module-calendar);
}

/* ===== Center Content — Settings ===== */

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.setting-row > div:first-child {
  flex: 1;
  min-width: 0;
}

.setting-row:last-child { border-bottom: none; }

.setting-label {
  font-size: 13px;
  font-weight: 500;
}

.setting-description {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.setting-value {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--surface-raised);
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* ── Settings Two-Column Layout ── */
.settings-layout {
  display: flex;
  gap: 0;
  height: 100%;
  max-width: 720px;
  margin: 0 auto;
}
.settings-nav {
  width: 160px;
  flex-shrink: 0;
  padding: 4px 20px 24px 0;
  border-right: 1px solid var(--border-glow);
  position: sticky;
  top: 0;
  align-self: flex-start;
}
.settings-nav-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}
.settings-nav-item {
  display: block;
  width: 100%;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: none;
  border: none;
  padding: 6px 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 2px;
}
.settings-nav-item:hover {
  color: var(--text-secondary);
  background: var(--accent-dim);
}
.settings-nav-item.active {
  color: var(--accent);
  background: var(--accent-dim);
}
.settings-main {
  flex: 1;
  overflow-y: auto;
  padding: 0 0 24px 24px;
  max-width: 560px;
}
@media (max-width: 700px) {
  .settings-nav { display: none; }
  .settings-main { padding: 0; max-width: none; }
}

.settings-section {
  margin-bottom: 20px;
}

.settings-section-title {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.settings-modules {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.setting-module {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.setting-module:last-child {
  border-bottom: none;
}

.setting-module-name {
  font-size: 13px;
  font-weight: 500;
  flex: 1;
}

.setting-module-status {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.setting-badge {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 4px;
  text-transform: capitalize;
}

.setting-badge-ok {
  background: color-mix(in srgb, var(--success) 12%, transparent);
  color: var(--success);
  border: 1px solid color-mix(in srgb, var(--success) 25%, transparent);
}

.setting-badge-warn {
  background: color-mix(in srgb, var(--warning) 12%, transparent);
  color: var(--warning);
  border: 1px solid color-mix(in srgb, var(--warning) 25%, transparent);
}

.setting-badge-pro {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  box-shadow: 0 0 8px var(--accent-dim);
}

/* Toast notification */
.mesh-toast {
  position: fixed;
  bottom: 100px;
  right: 20px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-primary);
  z-index: 300;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 300ms ease, transform 300ms ease;
}

.mesh-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.mesh-toast-error {
  border-left-color: var(--danger);
}

/* Usage warning banner */
.usage-warning-banner {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  margin-bottom: 16px;
  border-radius: 6px;
  font-size: 13px;
  background: color-mix(in srgb, var(--warning) 12%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--warning) 30%, transparent);
  color: var(--text-primary);
}

.usage-warning-dismiss {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.usage-warning-dismiss:hover {
  color: var(--text-primary);
}

/* Source badges for calendar events */
.source-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  vertical-align: middle;
}

.source-google {
  background: color-mix(in srgb, #4285f4 15%, transparent);
  color: #4285f4;
  border: 1px solid color-mix(in srgb, #4285f4 30%, transparent);
}

.source-ics {
  background: color-mix(in srgb, var(--module-calendar) 15%, transparent);
  color: var(--module-calendar);
  border: 1px solid color-mix(in srgb, var(--module-calendar) 30%, transparent);
}

/* ── Custom Dropdown ── */
.custom-select {
  position: relative;
  min-width: 160px;
  display: inline-block;
}
.filter-group .custom-select {
  min-width: 120px;
}
.custom-select-trigger {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 28px 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  white-space: nowrap;
}
.custom-select-trigger::after {
  content: '';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--text-muted);
  transition: var(--transition);
}
.custom-select.open .custom-select-trigger::after {
  transform: translateY(-50%) rotate(180deg);
}
.custom-select-trigger:hover, .custom-select.open .custom-select-trigger {
  border-color: var(--accent);
}
.custom-select-options {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 0;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  max-height: 200px;
  overflow-y: auto;
}
.custom-select.open .custom-select-options {
  display: block;
}
.custom-select-option {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 7px 12px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
  white-space: nowrap;
}
.custom-select-option:hover {
  background: var(--accent-dim);
  color: var(--accent);
}
.custom-select-option.selected {
  color: var(--accent);
}
.custom-select-option.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.setting-input {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  width: 200px;
}

.setting-input:focus {
  outline: none;
  border-color: var(--accent, #a78bfa);
}

.setting-select {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-primary);
  cursor: pointer;
  appearance: none;
  padding-right: 24px;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238899aa' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.setting-select:focus {
  outline: none;
  border-color: var(--accent);
}

.settings-footer {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  padding: 20px 0;
  letter-spacing: 0.02em;
}

/* ===== Center Content — Setup Wizard ===== */

.wizard {
  max-width: 560px;
  margin: 0 auto;
}

.wizard-step { display: none; }
.wizard-step.active { display: block; }

.wizard-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 28px;
}

.wizard-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: all var(--transition);
}

.wizard-dot.active {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.wizard-dot.completed {
  background: var(--success);
}

.wizard-title {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 8px;
}

.wizard-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
}

.code-block {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px;
  font-size: 11px;
  color: var(--text-secondary);
  overflow-x: auto;
  line-height: 1.6;
  position: relative;
}

.copy-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent-glow);
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 10px;
  font-family: var(--font-mono);
  transition: all var(--transition);
}

.copy-btn:hover { background: var(--accent-glow); }

.wizard-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
}

.btn {
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-mono);
  transition: all var(--transition);
}

.btn-primary {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}

.btn-primary:hover {
  background: var(--accent-glow);
  box-shadow: 0 0 15px var(--accent-dim);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

/* ===== Empty & Skeleton ===== */

.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
}

.empty-state-text {
  font-size: 13px;
  margin-bottom: 4px;
}

.empty-state-hint {
  font-size: 11px;
}

.skeleton {
  background: linear-gradient(90deg, var(--surface-raised) 25%, var(--border) 50%, var(--surface-raised) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
  height: 14px;
}

.skeleton.tall { height: 24px; width: 60px; }
.skeleton.wide { width: 100%; }
.skeleton.medium { width: 60%; }

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== Wing collapsed on smaller screens ===== */

@media (max-width: 1100px) {
  .hud {
    grid-template-columns: 220px 1fr 220px;
  }
}

@media (max-width: 900px) {
  .hud {
    grid-template-columns: 1fr;
  }
  .wing {
    display: none;
  }
}

/* ===== Scrollbar: hidden (prototype style) ===== */

::-webkit-scrollbar { width: 0; height: 0; }
* { scrollbar-width: none; }

/* ===== Item Action Buttons ===== */

.item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.action-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 16px;
  font-family: var(--font-mono);
  opacity: 0;
  transition: all var(--transition);
}

/* Show on card hover */
.timeline-entry:hover .action-btn,
.event-card:hover .action-btn,
.note-card:hover .action-btn,
.task-card:hover .action-btn,
.list-entry:hover .action-btn {
  opacity: 1;
}

/* Always show during confirm */
.item-confirming .action-btn {
  opacity: 1;
}

.action-delete:hover {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 40%, transparent);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
}

.action-complete:hover {
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 40%, transparent);
  background: color-mix(in srgb, var(--success) 10%, transparent);
}

/* Confirm state — card border turns red */
.item-confirming {
  border-color: color-mix(in srgb, var(--danger) 50%, var(--border) 50%) !important;
}

.item-confirming .action-delete {
  color: var(--danger);
  border-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 15%, transparent);
}

/* Delete animation */
.item-deleting {
  opacity: 0;
  transform: translateX(-20px);
  transition: all 300ms ease-out;
  overflow: hidden;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  height: 0 !important;
}

/* ===== Edit Modal ===== */

.edit-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 200ms ease;
}

.edit-modal-overlay.open {
  opacity: 1;
}

.edit-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 440px;
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transform: scale(0.95);
  transition: transform 200ms ease;
}

.edit-modal-overlay.open .edit-modal {
  transform: scale(1);
}

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

.edit-modal-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.edit-modal-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 16px;
  font-family: var(--font-mono);
  transition: all var(--transition);
}

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

.edit-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.edit-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.confirm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 200ms ease;
}
.confirm-modal-overlay.open {
  opacity: 1;
}

.edit-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 4px;
  margin-top: 14px;
}

.edit-label:first-child {
  margin-top: 0;
}

.edit-input,
.edit-textarea {
  width: 100%;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 13px;
  font-family: var(--font);
  color: var(--text-primary);
  transition: border-color var(--transition);
}

.edit-input:focus,
.edit-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.edit-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
}

select.edit-input {
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.edit-row {
  display: flex;
  gap: 12px;
}

.edit-field {
  flex: 1;
}

.btn-sm {
  padding: 5px 14px;
  font-size: 11px;
}

.action-edit:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ===== Module Detail Views ===== */

/* Shared: Timeline date headers (used by Memory + Calendar) */

.timeline-date {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 16px 0 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.timeline-date:first-child {
  padding-top: 0;
}

/* ===== Memory Timeline ===== */

.timeline-entry {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--module-memory);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 8px;
  transition: all var(--transition);
}

[data-theme="dark"] .timeline-entry:hover {
  border-color: color-mix(in srgb, var(--module-memory) 40%, var(--border) 60%);
  box-shadow: 0 2px 12px rgba(167, 139, 250, 0.08);
}

.timeline-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.timeline-type {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--module-memory) 12%, transparent);
  color: var(--module-memory);
}

.timeline-type[data-type="preference"] {
  background: color-mix(in srgb, var(--warning) 12%, transparent);
  color: var(--warning);
}

.timeline-type[data-type="decision"] {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}

.timeline-type[data-type="relationship"] {
  background: color-mix(in srgb, var(--success) 12%, transparent);
  color: var(--success);
}

.timeline-type[data-type="event"] {
  background: color-mix(in srgb, var(--module-calendar) 12%, transparent);
  color: var(--module-calendar);
}

.timeline-importance {
  width: 60px;
  height: 4px;
  background: var(--surface-raised);
  border-radius: 2px;
  overflow: hidden;
}

.importance-bar {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--module-memory), var(--info));
  border-radius: 2px;
}

.timeline-content {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 8px;
}

.timeline-meta {
  font-family: var(--font-mono);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: var(--text-muted);
}

.timeline-source {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.timeline-entities {
  color: var(--module-memory);
  font-style: italic;
}

.timeline-tag {
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  background: var(--surface-raised);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* ===== Calendar Events ===== */

.event-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--module-calendar);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 8px;
  transition: all var(--transition);
}

[data-theme="dark"] .event-card:hover {
  border-color: color-mix(in srgb, var(--module-calendar) 40%, var(--border) 60%);
  box-shadow: 0 2px 12px rgba(56, 189, 248, 0.08);
}

.event-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.event-time {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--module-calendar);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.event-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.event-location {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.event-location::before {
  content: '📍 ';
  font-size: 10px;
}

.event-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

/* ===== Notes Cards ===== */

.note-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--module-notes);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 8px;
  transition: all var(--transition);
}

[data-theme="dark"] .note-card:hover {
  border-color: color-mix(in srgb, var(--module-notes) 40%, var(--border) 60%);
  box-shadow: 0 2px 12px rgba(45, 212, 191, 0.08);
}

.note-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.note-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.note-date {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: 12px;
}

.note-preview {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 8px;
}

.note-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.note-tag {
  padding: 1px 8px;
  border-radius: 3px;
  font-size: 10px;
  background: color-mix(in srgb, var(--module-notes) 10%, transparent);
  color: var(--module-notes);
  border: 1px solid color-mix(in srgb, var(--module-notes) 25%, transparent);
}

/* ===== Task Cards ===== */

.task-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--module-todo);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 8px;
  transition: all var(--transition);
}

[data-theme="dark"] .task-card:hover {
  border-color: color-mix(in srgb, var(--module-todo) 40%, var(--border) 60%);
  box-shadow: 0 2px 12px rgba(251, 191, 36, 0.08);
}

.task-completed {
  opacity: 0.5;
  border-left-color: var(--text-muted);
}

.task-suggested {
  border-left-style: dashed;
}

.task-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.task-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
}

.task-status {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  flex-shrink: 0;
}

.task-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
  padding-left: 36px;
}

.task-meta {
  font-family: var(--font-mono);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: var(--text-muted);
  padding-left: 36px;
}

.task-due {
  color: var(--text-secondary);
}

.task-due.overdue {
  color: var(--danger);
  font-weight: 500;
}

.task-source {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ===== Chat Interface (Sprint 3) ===== */

/* Chat-mode overrides removed — chat is now always the center view with wings visible */

/* Chat layout */
.chat-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* Sidebar — now rendered as a wing panel instead */
.chat-sidebar {
  display: none;
}

.chat-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.chat-sidebar-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.chat-sidebar-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.chat-sidebar-empty {
  text-align: center;
  padding: 24px 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.chat-convo-item {
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 2px;
  transition: all var(--transition);
  position: relative;
}

.chat-convo-item:hover {
  background: var(--surface-raised);
}

.chat-convo-item.active {
  background: var(--accent-dim);
  border: 1px solid var(--accent-glow);
}

.chat-convo-title {
  font-size: 12px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 20px;
}

.chat-convo-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

.chat-convo-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  border-radius: 3px;
  opacity: 0;
  transition: all var(--transition);
}

.chat-convo-item:hover .chat-convo-delete {
  opacity: 1;
}

.chat-convo-delete:hover {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
}

/* Chat main area */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* Empty state */
.chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.chat-empty-icon svg {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  opacity: 0.3;
}

.chat-empty-text {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
}

.chat-empty-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* Messages area */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: none;
}

.chat-messages::-webkit-scrollbar {
  width: 0;
  background: transparent;
}

.chat-messages:hover {
  scrollbar-width: thin;
}

.chat-messages:hover::-webkit-scrollbar {
  width: 4px;
}

.chat-messages:hover::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.chat-msg {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}

.chat-msg-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.chat-msg-user .chat-msg-label {
  color: var(--text-muted);
}

.chat-msg-assistant .chat-msg-label {
  color: var(--accent);
}

.chat-msg-user .chat-msg-content {
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.chat-msg-assistant .chat-msg-content {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
}

.chat-msg-assistant .chat-msg-content p {
  margin-bottom: 10px;
}

.chat-msg-assistant .chat-msg-content p:last-child {
  margin-bottom: 0;
}

/* Chat input */
.chat-input-area {
  padding: 16px 32px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.chat-input-wrapper {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.chat-input {
  flex: 1;
  resize: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-primary);
  padding: 9px 14px;
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.5;
  min-height: 40px;
  max-height: 200px;
  box-sizing: border-box;
  transition: border-color var(--transition);
}

.chat-input:focus {
  outline: none;
  border-color: var(--accent);
}

.chat-input::placeholder {
  color: var(--text-muted);
}

.chat-send-btn {
  width: 40px;
  min-height: 40px;
  align-self: flex-end;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border: 1px solid var(--accent-glow);
  border-radius: 8px;
  color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition);
}

.chat-send-btn:hover {
  background: var(--accent-glow);
  box-shadow: 0 0 12px var(--accent-dim);
}

.chat-send-btn:disabled {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-muted);
  cursor: default;
}

.chat-send-btn svg {
  width: 16px;
  height: 16px;
}

/* Typing indicator */
.chat-typing {
  color: var(--text-muted);
  font-style: italic;
}

/* Tool execution indicators */
.chat-tool-indicator {
  font-size: 11px;
  color: var(--text-muted);
  padding: 6px 10px;
  margin-bottom: 8px;
  border-left: 2px solid var(--accent);
  background: var(--accent-dim);
  border-radius: 0 4px 4px 0;
}

.chat-tool-icon {
  margin-right: 4px;
}

/* Error display */
.chat-error {
  padding: 12px 16px;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
  background: color-mix(in srgb, var(--danger) 6%, transparent);
}

.chat-error-msg {
  font-size: 12px;
  color: var(--danger);
  line-height: 1.5;
}

/* Softer variant for usage limits (not a real error) */
.chat-error.chat-notice {
  border-color: color-mix(in srgb, var(--text-secondary) 20%, transparent);
  background: color-mix(in srgb, var(--text-secondary) 6%, transparent);
}
.chat-notice .chat-error-msg {
  color: var(--text-secondary);
}
.chat-error-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}
.chat-notice .chat-error-title {
  color: var(--text-primary);
}

/* Markdown in chat */
.chat-code-block {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 12px;
  overflow-x: auto;
  margin: 8px 0;
  line-height: 1.5;
}

.chat-code-block code {
  background: none;
  padding: 0;
}

.chat-inline-code {
  background: var(--surface-raised);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12px;
}

.chat-md-h1 {
  font-size: 16px;
  font-weight: 500;
  margin: 12px 0 6px;
  color: var(--text-primary);
}

.chat-md-h2 {
  font-size: 14px;
  font-weight: 500;
  margin: 10px 0 4px;
  color: var(--text-primary);
}

.chat-md-h3 {
  font-size: 13px;
  font-weight: 500;
  margin: 8px 0 4px;
  color: var(--text-primary);
}

.chat-md-li {
  padding-left: 12px;
  margin: 2px 0;
}

/* Responsive: collapse sidebar on small screens */
@media (max-width: 768px) {
  .chat-sidebar {
    width: 200px;
  }
  .chat-messages {
    padding: 16px;
  }
  .chat-input-area {
    padding: 12px 16px 16px;
  }
}

/* ===== Onboarding Paths (Sprint 4) ===== */

.onboarding-paths {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin: 20px 0;
}

.onboarding-path {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.onboarding-path:hover {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-dim);
}

.onboarding-path.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.onboarding-path-badge {
  position: absolute;
  top: -8px;
  right: 12px;
  background: var(--accent);
  color: var(--bg);
  font-size: 10px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.onboarding-path-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}

.onboarding-path-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.path-config-panel {
  margin-top: 16px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.path-status {
  font-size: 12px;
  padding: 6px 0;
  color: var(--text-secondary);
}

.path-status-ok {
  color: var(--success);
}

.path-status-warn {
  color: var(--warning);
}

/* ===== Command Palette (Sprint 4) ===== */

.command-palette {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 20vh;
  backdrop-filter: blur(4px);
}

.command-palette-dialog {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 480px;
  max-width: 90vw;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.command-palette-input {
  width: 100%;
  padding: 16px 20px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 14px;
  outline: none;
}

.command-palette-input::placeholder {
  color: var(--text-muted);
}

.command-palette-results {
  max-height: 300px;
  overflow-y: auto;
}

.command-palette-item {
  padding: 10px 20px;
  font-size: 13px;
  cursor: pointer;
  transition: background var(--transition);
}

.command-palette-item:hover,
.command-palette-item.selected {
  background: var(--accent-dim);
  color: var(--accent);
}

/* ===== Update Banner (Sprint 4) ===== */

.update-banner {
  background: var(--accent-dim);
  color: var(--accent);
  text-align: center;
  padding: 8px 16px;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
}

/* ===== Modules Grid (Sprint 6) ===== */

.modules-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.module-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}

.module-card:hover {
  border-color: var(--accent);
}

.module-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 2px solid var(--border);
  transition: background var(--transition);
}

.module-card-header:hover {
  background: var(--surface-raised);
}

.module-card-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

svg.module-card-icon {
  width: 16px;
  height: 16px;
}

.module-card-name {
  font-weight: 500;
  font-size: 13px;
  flex: 1;
}

.module-card-body {
  padding: 12px 16px;
  max-height: 240px;
  overflow-y: auto;
}

.module-card-item {
  padding: 6px 0;
  font-size: 12px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-glow);
  line-height: 1.4;
}

.module-card-item:last-child {
  border-bottom: none;
}

.module-card-item.overdue {
  color: var(--danger);
}

.module-card-item-time {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 11px;
}

.module-card-item-type {
  font-family: var(--font-mono);
  display: inline-block;
  background: var(--surface-raised);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: 4px;
}

.module-card-empty {
  color: var(--text-muted);
  font-size: 12px;
  padding: 8px 0;
}

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

/* ===== Chat Modal (Sprint 6) ===== */

.chat-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 200ms ease;
}

.chat-modal-overlay.open {
  opacity: 1;
}

.chat-modal {
  width: 560px;
  max-width: 90vw;
  max-height: 70vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

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

.chat-modal-title {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.chat-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  transition: color var(--transition);
}

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

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

.chat-modal-messages::-webkit-scrollbar {
  width: 0;
}

.chat-modal-input-area {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ===== Chat FAB (Sprint 6.13) ===== */

.chat-fab {
  position: fixed;
  bottom: 56px;
  right: 32px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(0,212,255,0.3), 0 0 40px rgba(0,212,255,0.1);
  transition: all 300ms ease;
  z-index: 100;
}

.chat-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 32px rgba(0,212,255,0.45), 0 0 60px rgba(0,212,255,0.15);
}

.chat-fab svg {
  width: 22px;
  height: 22px;
}

/* ===== Chat Drawer (Sprint 6.13) ===== */

.chat-drawer {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 420px;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  transform: translateX(100%);
  transition: transform 300ms ease;
  z-index: 200;
  display: flex;
  flex-direction: column;
}

.chat-drawer.open {
  transform: translateX(0);
}

.chat-drawer-header {
  height: 48px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-glow);
  flex-shrink: 0;
}

.chat-drawer-header span {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.chat-drawer-close {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.chat-drawer-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

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

.chat-drawer .chat-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.6;
  width: auto;
  margin: 0;
}

.chat-drawer .chat-msg.assistant {
  background: var(--surface-2);
  border: 1px solid var(--border-glow);
  color: var(--text-secondary);
  align-self: flex-start;
  max-width: 92%;
}

.chat-drawer .chat-msg.user {
  background: var(--accent-dim);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  color: var(--text-primary);
  align-self: flex-end;
  white-space: pre-wrap;
}

.chat-drawer .chat-input-area {
  padding: 12px 16px;
  border-top: 1px solid var(--border-glow);
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.chat-drawer .chat-input {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 13px;
  outline: none;
  transition: var(--transition);
  resize: none;
  min-height: auto;
  max-height: none;
}

.chat-drawer .chat-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: var(--bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
  min-height: auto;
  align-self: auto;
}

.chat-drawer .chat-send-btn:hover {
  opacity: 0.85;
}

.chat-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}

.chat-overlay.open {
  opacity: 1;
  pointer-events: all;
}

@media (max-width: 900px) {
  .chat-drawer { width: 100%; }
}

/* ===== Chat Item Cards ===== */

.chat-card {
  background: var(--surface-2);
  border: 1px solid var(--border-glow);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 10px 12px 0;
  margin-top: 6px;
  margin-bottom: 12px;
}
.chat-card.created {
  background: color-mix(in srgb, var(--success) 6%, var(--surface-2));
  border-color: color-mix(in srgb, var(--success) 15%, var(--border-glow));
}
.chat-card.module-calendar { border-left-color: var(--module-calendar); }
.chat-card.module-todo { border-left-color: var(--module-todo); }
.chat-card.module-notes { border-left-color: var(--module-notes); }
.chat-card.module-memory { border-left-color: var(--module-memory); }

.chat-card-badge {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 3px;
  display: inline-block;
  margin-bottom: 6px;
}
.chat-card-badge.badge-created {
  background: color-mix(in srgb, var(--success) 18%, transparent);
  color: var(--success);
}
.chat-card-badge.badge-updated {
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
}
.chat-card-badge.badge-calendar {
  background: color-mix(in srgb, var(--module-calendar) 15%, transparent);
  color: var(--module-calendar);
}
.chat-card-badge.badge-todo {
  background: color-mix(in srgb, var(--module-todo) 15%, transparent);
  color: var(--module-todo);
}
.chat-card-badge.badge-notes {
  background: color-mix(in srgb, var(--module-notes) 15%, transparent);
  color: var(--module-notes);
}
.chat-card-badge.badge-memory {
  background: color-mix(in srgb, var(--module-memory) 15%, transparent);
  color: var(--module-memory);
}

.chat-card-title {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
  transition: var(--transition);
}
.chat-card-title.struck { text-decoration: line-through; color: var(--text-muted); }

.chat-card-body {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.chat-card-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 8px;
}
.chat-card-meta .sep { opacity: 0.4; }

.chat-card-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding-bottom: 8px;
}
.chat-card-tag,
.chat-card-entity {
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 3px;
}
.chat-card-tag {
  background: color-mix(in srgb, var(--module-notes) 12%, transparent);
  color: var(--module-notes);
}
.chat-card-entity {
  background: color-mix(in srgb, var(--module-memory) 12%, transparent);
  color: var(--module-memory);
}

.chat-card-actions {
  display: flex;
  gap: 4px;
  border-top: 1px solid var(--border-glow);
  padding: 6px 0;
  margin: 0 -12px;
  padding-left: 12px;
  padding-right: 12px;
}

.chat-card-action {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}
.chat-card-action:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}
.chat-card-action.complete:hover {
  border-color: var(--success);
  color: var(--success);
  background: color-mix(in srgb, var(--success) 10%, transparent);
}
.chat-card-action.complete.done {
  border-color: var(--success);
  color: #fff;
  background: var(--success);
}

/* ===== Briefing Dashboard (Sprint 6.12) ===== */

/* ── Briefing Header ── */
.briefing-header { margin-bottom: 28px; }
.briefing-date {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.briefing-greeting { font-size: 22px; font-weight: 600; margin-bottom: 6px; }
.briefing-summary {
  font-size: 14px;
  font-weight: 400;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Briefing Prose (LLM intelligence line) ── */
.briefing-intel {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  margin-top: 8px;
}

/* Briefing loading status — cycling phrase line above the skeleton bars
   ("Catching up on your day...", etc.). Quiet but always visible at the
   top of the loading area so the user sees something is happening. */
.briefing-loading-status {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 12px;
  min-height: 14px;
}
.briefing-intel.loading {
  color: var(--text-muted);
  font-style: italic;
}
.loading-dots::after {
  content: '';
  animation: dots 1.4s steps(4, end) infinite;
}
@keyframes dots {
  0%  { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}

/* ── Stat Chips ── */
.stat-row { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.stat-chip {
  flex: 1;
  min-width: 120px;
  background: var(--surface);
  border: 1px solid var(--border-glow);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: var(--transition);
  cursor: pointer;
}
.stat-chip:hover {
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-dim);
}
.stat-chip .stat-value { font-size: 24px; font-weight: 700; }
.stat-chip .stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}
.stat-chip[data-module="calendar"] .stat-value { color: var(--module-calendar); }
.stat-chip[data-module="todo"] .stat-value { color: var(--module-todo); }
.stat-chip[data-module="notes"] .stat-value { color: var(--module-notes); }
.stat-chip[data-module="memory"] .stat-value { color: var(--module-memory); }

/* ── Briefing Sections ── */
.briefing-section { margin-bottom: 24px; }
.section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-glow);
}

/* ── Briefing Cards ── */
.briefing-card {
  background: var(--surface);
  border: 1px solid var(--border-glow);
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 10px;
  border-left: 3px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
}
.briefing-card:hover {
  border-color: var(--border);
  box-shadow: 0 2px 16px rgba(0,0,0,0.3);
}
.briefing-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}
.briefing-card .card-title { font-size: 14px; font-weight: 600; }
.briefing-card .card-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 3px;
  border: 1px solid;
  flex-shrink: 0;
  margin-left: 12px;
}
.card-tag.calendar {
  color: var(--module-calendar);
  border-color: color-mix(in srgb, var(--module-calendar) 40%, transparent);
  background: color-mix(in srgb, var(--module-calendar) 8%, transparent);
}
.card-tag.todo {
  color: var(--module-todo);
  border-color: color-mix(in srgb, var(--module-todo) 40%, transparent);
  background: color-mix(in srgb, var(--module-todo) 8%, transparent);
}
.card-tag.notes {
  color: var(--module-notes);
  border-color: color-mix(in srgb, var(--module-notes) 40%, transparent);
  background: color-mix(in srgb, var(--module-notes) 8%, transparent);
}
.card-tag.memory {
  color: var(--module-memory);
  border-color: color-mix(in srgb, var(--module-memory) 40%, transparent);
  background: color-mix(in srgb, var(--module-memory) 8%, transparent);
}
.briefing-card .card-body {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}
.briefing-card .card-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 8px;
  display: flex;
  gap: 12px;
}

/* ── Observations ── */
.observation-card {
  background: color-mix(in srgb, var(--info) 5%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--info) 20%, transparent);
  border-radius: 8px;
  padding: 14px 18px;
  border-left: 3px solid var(--info);
}
.obs-list {
  margin: 0;
  padding-left: 18px;
  list-style: disc;
}
.obs-list li {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 4px;
}
.obs-list li:last-child { margin-bottom: 0; }

/* ── Onboarding ── */
.onboarding-hero {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--module-calendar) 30%, var(--border));
  border-radius: 8px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  cursor: pointer;
  transition: var(--transition);
}
.onboarding-hero:hover {
  border-color: var(--module-calendar);
  box-shadow: 0 0 20px color-mix(in srgb, var(--module-calendar) 10%, transparent);
}
.onboarding-hero-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--module-calendar) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--module-calendar) 20%, transparent);
  border-radius: 10px;
  flex-shrink: 0;
}
.onboarding-hero-content { flex: 1; min-width: 0; }
.onboarding-hero-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}
.onboarding-hero-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── Calendar Connect Modal ── */
.calendar-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 200ms ease;
}
.calendar-modal-overlay.open { opacity: 1; }
.calendar-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 420px;
  max-width: 90vw;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transform: scale(0.95);
  transition: transform 200ms ease;
}
.calendar-modal-overlay.open .calendar-modal { transform: scale(1); }
.calendar-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.calendar-modal-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--module-calendar);
}
.calendar-modal-body { padding: 20px; }
.calendar-provider {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-glow);
}
.calendar-provider:last-child { border-bottom: none; }
.calendar-provider-info { display: flex; flex-direction: column; gap: 2px; }
.calendar-provider-name { font-size: 14px; font-weight: 500; }
.calendar-provider-desc { font-size: 12px; color: var(--text-muted); }
.calendar-provider-status {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--success);
}
.calendar-provider .coming-soon {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
#calendar-modal-status {
  margin-top: 12px;
  font-size: 12px;
}

/* ── Onboarding Note Modal ── */
.note-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 200ms ease;
}
.note-modal-overlay.open { opacity: 1; }
.note-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 480px;
  max-width: 90vw;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transform: scale(0.95);
  transition: transform 200ms ease;
  display: flex;
  flex-direction: column;
}
.note-modal-overlay.open .note-modal { transform: scale(1); }
.note-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.note-modal-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--module-notes);
}
.note-modal-body { padding: 20px; }
.note-modal-textarea {
  width: 100%;
  min-height: 140px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  outline: none;
  resize: vertical;
  transition: border-color var(--transition);
}
.note-modal-textarea:focus { border-color: var(--module-notes); }
.note-modal-textarea::placeholder { color: var(--text-muted); }
.note-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
}

/* ── Feedback Modal (reuses note-modal internals) ── */
.feedback-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 200ms ease;
}
.feedback-modal-overlay.open { opacity: 1; }
.feedback-modal-overlay .note-modal { transform: scale(0.95); transition: transform 200ms ease; }
.feedback-modal-overlay.open .note-modal { transform: scale(1); }

/* ── Briefing Timeline ── */
.briefing-timeline { position: relative; padding-left: 20px; }
.briefing-timeline::before {
  content: '';
  position: absolute;
  left: 4px; top: 4px; bottom: 4px;
  width: 1px;
  background: var(--border);
}
.briefing-timeline .timeline-item { position: relative; margin-bottom: 16px; padding-left: 8px; }
.briefing-timeline .timeline-item::before {
  content: '';
  position: absolute;
  left: -20px; top: 6px;
  width: 7px; height: 7px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  background: var(--bg);
}
.briefing-timeline .timeline-item.now::before {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}
.briefing-timeline .timeline-item.past::before { border-color: var(--text-muted); }
.briefing-timeline .timeline-time { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); margin-bottom: 2px; }
.briefing-timeline .timeline-title { font-size: 13px; font-weight: 500; }
.briefing-timeline .timeline-detail { font-family: var(--font-mono); font-size: 10px; color: var(--text-secondary); margin-top: 2px; }

/* ── Responsive: hamburger on mobile, settings icon on desktop ── */
.hamburger-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 7px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
  display: none;
}
.hamburger-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
}
.mobile-menu-overlay.open { display: block; }

.mobile-menu {
  display: none;
  position: fixed;
  top: 48px;
  right: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 0;
  z-index: 1000;
  min-width: 160px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.mobile-menu.open { display: block; }

.mobile-menu-item {
  display: block;
  width: 100%;
  padding: 10px 20px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}
.mobile-menu-item:hover {
  background: var(--accent-dim);
  color: var(--accent);
}

.briefing-timestamp {
  color: var(--text-muted);
}

/* ===== Briefing Block Interactions ===== */

.card-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  position: relative;
}

.block-menu-trigger {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--text-muted) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--text-muted) 30%, transparent);
  border-radius: 3px;
  padding: 2px 8px;
  cursor: pointer;
  transition: all var(--transition);
}

.block-menu-trigger:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

/* Block fly menu + snooze submenu */
.block-menu {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 10;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  display: flex;
  flex-direction: column;
  min-width: 140px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.block-menu button {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 12px;
  padding: 7px 12px;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
  transition: all var(--transition);
}

.block-menu button:hover {
  color: var(--text-primary);
  background: var(--surface-raised);
}

.briefing-card.dismissed {
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.briefing-card.block-completed {
  opacity: 0.6;
}

.completed-title {
  text-decoration: line-through;
  color: var(--text-muted) !important;
}

.briefing-note-block {
  border-left-width: 3px;
  border-left-style: solid;
}

/* Dirty-state banner — actionable invitation to refresh the briefing.
   Fixed at the bottom of the viewport so it's always reachable regardless
   of scroll position. Solid surface + accent border (no translucency) so
   it reads as a discrete CTA, not as part of the page chrome. */
.briefing-banner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  background: var(--surface-raised);
  border: 1px solid var(--accent);
  border-radius: 999px;
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 12px);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.briefing-banner.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.briefing-banner-cta {
  cursor: pointer;
}

.briefing-banner-cta:hover {
  background: var(--surface-2);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--accent);
}

.briefing-banner-cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.briefing-banner-text {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.briefing-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-glow);
}

.briefing-feedback {
  display: flex;
  align-items: center;
  gap: 6px;
}

.briefing-feedback-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-right: 4px;
}

.briefing-rating-btn {
  background: none;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: all var(--transition);
}

.briefing-rating-btn:hover {
  color: var(--text-secondary);
  border-color: var(--border);
  background: var(--surface-raised);
}

.briefing-rating-btn.selected {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  background: var(--accent-dim);
}


.briefing-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.briefing-feedback-text {
  width: 100%;
  margin-top: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.5;
  outline: none;
  resize: none;
  overflow: hidden;
  transition: border-color var(--transition);
}

.briefing-feedback-text:focus {
  border-color: var(--accent);
}

.briefing-feedback-text::placeholder {
  color: var(--text-muted);
}

.briefing-feedback-submit {
  margin-top: 6px;
  text-align: right;
}

.briefing-feedback-hint {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

.briefing-feedback-thanks {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-secondary);
  padding: 10px 14px;
  background: var(--accent-dim);
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
}

.observation-discuss-footer {
  font-family: var(--font-mono);
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid color-mix(in srgb, var(--border) 30%, transparent);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color var(--transition);
  text-align: left;
}

.observation-discuss-footer:hover {
  color: var(--accent);
}

/* ===== Briefing Reflection ===== */

.briefing-reflection {
  background: color-mix(in srgb, var(--info) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--info) 20%, transparent);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
}

.briefing-reflection p {
  margin: 0;
}

/* ===== Archive ===== */

.archive-header {
  margin-bottom: 20px;
}

.archive-date {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.archive-summary {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 6px;
}

.archive-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

.archive-section {
  margin-bottom: 16px;
}

.archive-block {
  padding: 8px 12px;
  border-left: 2px solid var(--border);
  margin-bottom: 6px;
}

.archive-block.completed {
  opacity: 0.6;
}

.archive-block-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.archive-block-body {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.5;
}

.archive-block-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  margin-top: 2px;
}

/* ===== Admin Tables ===== */

.admin-card-title {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.admin-table th {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border-glow);
  color: var(--text-secondary);
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table td.mono {
  font-family: var(--font-mono);
  font-size: 11px;
}

.memory-lab-tab.active {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: var(--accent);
}

.desktop-only { display: flex; }
.mobile-only { display: none; }

@media (max-width: 900px) {
  .desktop-only { display: none !important; }
  .mobile-only, .hamburger-btn { display: flex; }
  .feedback-btn { display: none; }
}
