﻿:root {
  color-scheme: dark;
  --bg: #090b16;
  --body-bg: radial-gradient(circle at top left, rgba(99, 102, 241, 0.22), transparent 24%), linear-gradient(180deg, #050816 0%, #090b16 100%);
  --sidebar-bg: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.92));
  --surface: #0f172a;
  --surface-soft: #111827;
  --surface-muted: rgba(255, 255, 255, 0.04);
  --surface-muted-strong: rgba(255, 255, 255, 0.05);
  --surface-ghost: rgba(148, 163, 184, 0.06);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #7c3aed;
  --accent-2: #6366f1;
  --accent-soft: rgba(99, 102, 241, 0.14);
  --border: rgba(148, 163, 184, 0.16);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

body.light-theme {
  --bg: #f5f7fb;
  --body-bg: #f5f7fb;
  --sidebar-bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-muted: rgba(15, 23, 42, 0.04);
  --surface-muted-strong: rgba(15, 23, 42, 0.07);
  --surface-ghost: rgba(148, 163, 184, 0.16);
  --text: #1d4ed8;
  --muted: #3b82f6;
  --accent: #4338ca;
  --accent-2: #2563eb;
  --accent-soft: rgba(99, 102, 241, 0.12);
  --border: rgba(226, 232, 240, 0.6);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Segoe UI", Roboto, sans-serif;
  background: var(--body-bg);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px 22px;
  background: var(--sidebar-bg);
  border-right: 1px solid rgba(148, 163, 184, 0.12);
}

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

.logo-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: white;
  font-weight: 800;
}

.sidebar-brand strong {
  margin: 0;
  font-size: 1.1rem;
}

.sidebar-brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.add-task-button {
  border: none;
  border-radius: 16px;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--accent), #ec4899);
  color: white;
  font-weight: 700;
}

.sidebar-group {
  display: grid;
  gap: 10px;
}

.sidebar-group a.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--surface-muted);
  color: var(--text);
  text-decoration: none;
}

.sidebar-group a.nav-item:hover,
.sidebar-group a.nav-item.active {
  background: rgba(99, 102, 241, 0.16);
}

.faq-shell .sidebar {
  background: var(--sidebar-bg);
}

.faq-workspace {
  padding: 28px 32px;
}

.section-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: none;
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--surface-muted);
  color: var(--text);
  transition: background 0.2s ease;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(99, 102, 241, 0.16);
}

.nav-item.mini {
  padding: 12px 14px;
  border-radius: 16px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  color: var(--badge-text, var(--text));
  font-size: 0.82rem;
}

.badge.small {
  min-width: 24px;
  padding: 0 8px;
  font-size: 0.78rem;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 14px;
}

.theme-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--surface-muted);
}

.toggle-switch {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(255, 255, 255, 0.08);
  padding: 0;
}

.toggle-switch::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  transition: transform 0.2s ease;
}

.toggle-switch.active {
  background: var(--accent);
  border-color: transparent;
}

.toggle-switch.active::before {
  transform: translateX(18px);
}

.saved-card {
  padding: 16px;
  border-radius: 22px;
  background: var(--surface-muted);
}

.saved-card strong {
  display: block;
  margin-bottom: 6px;
}

.saved-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.workspace {
  padding: 28px 32px;
}

.workspace-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}

.search-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 18px;
  background: var(--surface-muted);
  border: 1px solid rgba(148, 163, 184, 0.12);
  flex: 1;
}

.search-icon {
  font-size: 1rem;
  color: var(--muted);
}

.search-panel input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  outline: none;
  font-size: 1rem;
  min-width: 0;
}

.top-icons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-button {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: none;
  background: var(--surface-muted);
  color: var(--text);
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #5b21b6;
  color: white;
  font-weight: 700;
}

.hero-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.hero-copy {
  display: grid;
  gap: 12px;
}

.eyebrow {
  margin: 0;
  font-size: 1rem;
}

.eyebrow strong {
  color: #c084fc;
}

.hero-panel h1 {
  margin: 0;
  font-size: 2.1rem;
  line-height: 1.1;
}

.hero-subtitle {
  margin: 0;
  color: var(--muted);
}

.date-chip {
  padding: 12px 18px;
  border-radius: 18px;
  background: var(--surface-muted);
  border: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--muted);
  font-size: 0.95rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  padding: 20px;
  border-radius: 24px;
  background: var(--surface-muted);
  border: 1px solid rgba(148, 163, 184, 0.12);
  display: grid;
  gap: 10px;
}

.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
}

.stat-icon.blue {
  background: rgba(59, 130, 246, 0.18);
}

.stat-icon.green {
  background: rgba(22, 163, 74, 0.18);
}

.stat-icon.red {
  background: rgba(239, 68, 68, 0.18);
}

.stat-icon.purple {
  background: rgba(124, 58, 237, 0.18);
}

.stat-card strong {
  font-size: 1.8rem;
}

.stat-card p,
.stat-card span {
  margin: 0;
  color: var(--muted);
}

.task-entry-panel {
  margin-bottom: 22px;
}

.task-entry-card {
  display: grid;
  gap: 14px;
  padding: 20px;
  border-radius: 24px;
  background: var(--surface-muted);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.task-entry-card input,
.task-entry-card select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  background: var(--surface-soft);
  color: var(--text);
  padding: 14px 16px;
}

.task-entry-card input::placeholder,
.task-entry-card select::placeholder {
  color: var(--muted);
  opacity: 1;
}

.task-entry-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.task-entry-row label {
  display: grid;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text);
}

.task-entry-row .primary-button {
  margin-top: 2px;
}

.primary-button {
  border: none;
  border-radius: 16px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--accent), #ec4899);
  color: white;
  font-weight: 700;
}

.shortcut {
  color: var(--muted);
  font-size: 0.8rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.tag-pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--surface-muted-strong);
  color: var(--muted);
}

.task-list-panel {
  padding: 22px;
  border-radius: 28px;
  background: var(--surface-muted);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

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

.panel-head h2 {
  margin: 0;
  font-size: 1.3rem;
}

.panel-controls {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.tabs {
  display: flex;
  gap: 10px;
}

.tab,
.secondary {
  border: none;
  border-radius: 16px;
  padding: 12px 16px;
  background: var(--surface-muted);
  color: var(--text);
}

.tab.active,
.tab:hover,
.secondary:hover {
  background: rgba(99, 102, 241, 0.16);
}

.panel-actions {
  display: flex;
  gap: 10px;
}

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

.faq-panel {
  margin-top: 30px;
  padding: 22px;
  border-radius: 24px;
  background: var(--surface-muted);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.faq-header h2 {
  margin: 0 0 18px;
  font-size: 1.4rem;
}

.faq-item {
  margin-bottom: 16px;
}

.faq-item h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.faq-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.task-item {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 22px;
  background: var(--surface-muted);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

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

.task-main input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 6px;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  display: inline-grid;
  place-items: center;
}

.task-main input[type="checkbox"]::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: transparent;
}

.task-main input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.task-main input[type="checkbox"]:checked::before {
  content: '\2713';
  color: white;
  font-size: 12px;
  line-height: 1;
  background: transparent;
}

.task-content {
  display: grid;
  gap: 8px;
}

.task-title {
  margin: 0;
  font-size: 1rem;
  color: var(--text);
}

.task-title.completed {
  color: rgba(29, 78, 216, 0.8);
  text-decoration: line-through;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--text);
  font-size: 0.84rem;
}

.category-pill,
.priority-pill,
.status-pill {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
}

.category-pill {
  background: rgba(59, 130, 246, 0.22);
  color: #1d4ed8;
}

.status-active {
  background: rgba(99, 102, 241, 0.22);
  color: #1e40af;
}

.status-progress {
  background: rgba(251, 191, 36, 0.22);
  color: #b45309;
}

.status-completed {
  background: rgba(34, 197, 94, 0.22);
  color: #047857;
}

.priority-high {
  background: rgba(248, 113, 113, 0.22);
  color: #b91c1c;
}

.priority-medium {
  background: rgba(249, 115, 22, 0.22);
  color: #c2410c;
}

.priority-low {
  background: rgba(34, 197, 94, 0.22);
  color: #166534;
}

.tag-pill {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-muted-strong);
  color: var(--text);
  font-size: 0.78rem;
}

.shortcut {
  padding: 8px 10px;
  border-radius: 12px;
  color: var(--muted);
  background: var(--surface-muted-strong);
  font-size: 0.8rem;
}

.task-actions {
  display: flex;
  justify-content: flex-end;
}

.task-actions button {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
}

.empty-state {
  color: var(--muted);
  padding: 18px 16px;
  text-align: center;
  border: 1px dashed rgba(148, 163, 184, 0.16);
  border-radius: 18px;
}

.fab {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  color: white;
  background: var(--accent);
  font-size: 1.8rem;
  box-shadow: 0 18px 40px rgba(33, 36, 52, 0.3);
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    grid-row: 2;
  }
}

@media (max-width: 860px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-entry-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .workspace {
    padding: 20px;
  }

  .hero-panel,
  .panel-head,
  .workspace-top {
    flex-direction: column;
    align-items: stretch;
  }

  .top-icons {
    justify-content: flex-end;
  }

  .search-panel {
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}
