:root {
  --bg: #050816;
  --bg-soft: rgba(15, 23, 42, 0.75);
  --bg-card: rgba(15, 23, 42, 0.85);
  --bg-chip: rgba(30, 64, 175, 0.15);
  --border-soft: rgba(148, 163, 184, 0.35);
  --border-strong: rgba(148, 163, 184, 0.6);

  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --text-soft: #6b7280;

  --accent-blue: #3b82f6;
  --accent-blue-soft: rgba(59, 130, 246, 0.18);
  --accent-green: #22c55e;
  --accent-amber: #fbbf24;
  --accent-red: #f97373;

  --shadow-main: 0 30px 80px rgba(15, 23, 42, 0.75);
  --radius-lg: 24px;
  --radius-md: 14px;
  --radius-pill: 999px;
}

body.light {
  --bg: #e5f0ff;
  --bg-soft: rgba(255, 255, 255, 0.9);
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-chip: rgba(59, 130, 246, 0.08);

  --text-main: #0f172a;
  --text-muted: #6b7280;
  --text-soft: #9ca3af;

  --border-soft: rgba(148, 163, 184, 0.4);
  --border-strong: rgba(148, 163, 184, 0.7);

  --shadow-main: 0 20px 60px rgba(15, 23, 42, 0.25);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: radial-gradient(circle at 0% 0%, #0ea5e9 0, transparent 45%),
    radial-gradient(circle at 100% 100%, #6366f1 0, transparent 50%),
    linear-gradient(135deg, #020617, #0b1120 38%, #111827 70%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: stretch;
  padding: 24px;
}

body.light {
  background: radial-gradient(circle at 0% 0%, #bfdbfe 0, transparent 50%),
    radial-gradient(circle at 100% 100%, #dbeafe 0, transparent 55%),
    linear-gradient(135deg, #eff6ff, #f9fafb 60%, #e5e7eb 100%);
}

.background-orbit {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.6;
  background: radial-gradient(circle at 20% 10%, rgba(56, 189, 248, 0.09), transparent 55%),
    radial-gradient(circle at 80% 90%, rgba(129, 140, 248, 0.12), transparent 55%);
}

/* Layout shell */

.shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 220px minmax(560px, 1fr) 220px;
  gap: 24px;
  max-width: 1200px;
  width: 100%;
}

/* Side panel */

.side-panel {
  background: var(--bg-soft);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-main);
  padding: 18px 16px;
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 16px;
  border: 1px solid rgba(59, 130, 246, 0.45);
  background: radial-gradient(circle at 30% 20%, #3b82f6, #1e40af);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #fbbf24;
  box-shadow: 0 0 0 8px rgba(248, 250, 252, 0.1);
}

.brand-title {
  margin: 0;
  font-size: 19px;
  letter-spacing: 0.04em;
}

.brand-subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-soft);
}

.side-section {
  padding-top: 4px;
}

.side-label {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.side-date {
  margin: 6px 0 0;
  font-size: 14px;
}

.side-streak {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--accent-green);
}

.side-mood {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.mood-chip {
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.6);
  padding: 6px 10px;
  font-size: 11px;
  color: var(--text-main);
  cursor: pointer;
}

/* App core */

.app {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-main);
  padding: 18px 20px;
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.eyebrow {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.app-title {
  margin: 6px 0 0;
  font-size: 22px;
}

.app-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.theme-toggle {
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  background: rgba(15, 23, 42, 0.7);
  padding: 6px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 13px;
}

.theme-toggle .icon {
  font-size: 16px;
}

/* Composer */

.composer {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: rgba(15, 23, 42, 0.6);
  padding: 14px 14px 16px;
}

.composer-title {
  margin: 0 0 10px;
  font-size: 15px;
}

.composer-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.composer-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 160px;
}

.field-group.grow {
  flex: 1;
}

.field-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-soft);
}

.field-input {
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: rgba(15, 23, 42, 0.8);
  color: var(--text-main);
  padding: 8px 10px;
  font-size: 13px;
}

.field-input::placeholder {
  color: var(--text-soft);
}

.composer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn.primary {
  background: linear-gradient(135deg, #3b82f6, #22c55e);
  color: #f9fafb;
  border-color: rgba(15, 23, 42, 0.6);
}

.btn.ghost {
  background: rgba(15, 23, 42, 0.6);
  color: var(--text-main);
  border-color: var(--border-soft);
}

.composer-message {
  min-height: 18px;
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--accent-amber);
}

/* Lists */

.lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.list-column {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: rgba(15, 23, 42, 0.55);
  padding: 12px;
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.list-title {
  margin: 2px 0 0;
  font-size: 15px;
}

.count-pill {
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  background: rgba(15, 23, 42, 0.75);
  padding: 4px 10px;
  font-size: 11px;
  color: var(--text-soft);
}

.empty-text {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--text-soft);
}

.task-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.task-item {
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: rgba(15, 23, 42, 0.85);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.task-title {
  margin: 0;
  font-size: 14px;
  word-break: break-word;
}

.task-title.completed {
  text-decoration: line-through;
  color: var(--text-soft);
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.meta-pill {
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 3px 8px;
  font-size: 11px;
  color: var(--text-soft);
  background: rgba(15, 23, 42, 0.7);
}

.meta-pill.deadline {
  border-color: rgba(251, 191, 36, 0.7);
  color: var(--accent-amber);
}

.meta-pill.reminder {
  border-color: rgba(59, 130, 246, 0.7);
  color: var(--accent-blue);
}

.meta-pill.done {
  border-color: rgba(34, 197, 94, 0.7);
  color: var(--accent-green);
}

.task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

