@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-muted: #f0f2f8;
  --text: #0f172a;
  --text-muted: #66728b;
  --primary: #5865f2;
  --primary-dark: #484ed4;
  --danger: #f56565;
  --success: #22c55e;
  --border: rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at top, #c6d0ff 0%, #f4f6fb 50%);
  color: var(--text);
  min-height: 100vh;
}

.page-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 20px 72px;
}

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

.hero-copy h1 {
  margin: 6px 0 12px;
  font-size: 2.5rem;
}

.subhead {
  margin: 0;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.6;
}

.eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}

.theme-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(88, 101, 242, 0.2);
  font-size: 1.35rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.theme-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(88, 101, 242, 0.3);
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(400px, 1fr);
  gap: 28px;
}

.panel {
  background: var(--surface);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.08);
  border: 1px solid var(--border);
}

.panel-header h2 {
  margin: 4px 0 0;
}

.input-area {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 24px;
}

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

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

.field input,
.field select {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--surface-muted);
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.2);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.primary-btn {
  border: none;
  border-radius: 16px;
  background: var(--primary);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.primary-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.search-field input {
  width: 100%;
}

.progress-card {
  background: linear-gradient(120deg, rgba(88, 101, 242, 0.1), rgba(34, 197, 94, 0.12));
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.progress-text {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.progress-value {
  font-size: 1.75rem;
  margin: 0;
  font-weight: 700;
}

#progressBarContainer {
  width: 100%;
  background: rgba(15, 23, 42, 0.08);
  height: 12px;
  border-radius: 999px;
}

#progressBar {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--success));
  transition: width 0.3s ease;
}

#taskList {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#taskList li {
  padding: 18px 20px;
  border-radius: 18px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: border 0.2s ease, background 0.2s ease;
}

#taskList li:hover {
  border-color: rgba(88, 101, 242, 0.4);
}

.task-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.task-title {
  margin: 0;
  font-weight: 600;
}

.task-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  letter-spacing: 0.04em;
}

.low {
  background: #3cbaba;
}

.medium {
  background: #f4b042;
}

.high {
  background: #eb4f4f;
}

.due-chip {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
}

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

.task-actions button {
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
  cursor: pointer;
  background: white;
  color: var(--text);
  border: 1px solid var(--border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.task-actions button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.task-actions button:first-child {
  color: var(--success);
  border-color: rgba(34, 197, 94, 0.5);
}

.task-actions button:last-child {
  color: var(--danger);
  border-color: rgba(245, 101, 101, 0.4);
}

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

.completed {
  opacity: 0.8;
}

button {
  font-family: inherit;
}

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

  .hero {
    flex-direction: column;
  }

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

body.dark-mode {
  --bg: #0b1120;
  --surface: #121a2d;
  --surface-muted: #1b2540;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --border: rgba(148, 163, 184, 0.2);
  background: radial-gradient(circle at top, #121a2d 0%, #0b1120 60%);
}

body.dark-mode .theme-btn {
  background: #1b2540;
  color: #f8fafc;
}

body.dark-mode #taskList li {
  background: rgba(15, 23, 42, 0.55);
}
