:root {
  --bg-main: #eef5ff;
  --bg-secondary: #dde8f7;
  --text-main: #0f172a;
  --text-soft: #51607a;
  --card-bg: rgba(255, 255, 255, 0.72);
  --card-border: rgba(148, 163, 184, 0.2);
  --card-shadow: 0 20px 50px rgba(148, 163, 184, 0.22);
  --card-shadow-hover: 0 26px 60px rgba(99, 102, 241, 0.16);
  --primary: #2f66f3;
  --primary-strong: #1f56e5;
  --primary-soft: rgba(47, 102, 243, 0.12);
  --success: #22c55e;
  --danger: #dc2626;
  --surface: #f8fbff;
  --surface-2: #edf4ff;
  --surface-3: #e7eef8;
  --input-border: #d6e0ee;
  --white: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  min-height: 100vh;
  padding: 50px 22px 56px;
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.22), transparent 28%),
    radial-gradient(circle at top right, rgba(129, 140, 248, 0.16), transparent 24%),
    linear-gradient(135deg, var(--bg-main), var(--bg-secondary));
  color: var(--text-main);
  transition: background 0.35s ease, color 0.35s ease;
}

.page-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
  opacity: 0.55;
  z-index: 0;
}

.glow-left {
  top: -130px;
  left: -90px;
  background: rgba(96, 165, 250, 0.28);
}

.glow-right {
  top: 110px;
  right: -120px;
  background: rgba(129, 140, 248, 0.2);
}

.topo,
.dashboard {
  position: relative;
  z-index: 1;
}

.topo {
  max-width: 1180px;
  margin: 0 auto 28px;
  padding: 6px 2px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 10px 24px rgba(148, 163, 184, 0.12);
  color: var(--primary-strong);
  font-size: 0.86rem;
  font-weight: 700;
}

.topo-texto h1 {
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  line-height: 1;
  margin-bottom: 12px;
  letter-spacing: -0.05em;
}

.topo-texto p {
  max-width: 520px;
  font-size: 1.02rem;
  color: var(--text-soft);
}

.topo-acoes {
  display: flex;
  align-items: center;
  gap: 12px;
}

.botao-topo {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a, #111f3f);
  color: white;
  border: none;
  border-radius: 18px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.22);
}

.botao-topo:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 22px 40px rgba(15, 23, 42, 0.28);
}

.botao-topo:active {
  transform: translateY(0) scale(0.98);
}

.dashboard {
  max-width: 1180px;
  margin: 10px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.dashboard-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.card {
  position: relative;
  overflow: hidden;
  background: var(--card-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  padding: 24px;
  box-shadow: var(--card-shadow);
  min-height: 180px;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), transparent 34%);
  pointer-events: none;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.26), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(96, 165, 250, 0.22);
}

.card:hover::after {
  opacity: 1;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
}

.section-tag {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 0.76rem;
  font-weight: 700;
}

.card h2 {
  color: var(--text-main);
  font-size: 1.95rem;
  letter-spacing: -0.04em;
}

.card p {
  color: var(--text-soft);
  line-height: 1.5;
}

.card-clock {
  min-height: 195px;
}

.clock-box {
  font-size: clamp(3.3rem, 6vw, 4.2rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--primary);
  text-shadow: 0 10px 24px rgba(47, 102, 243, 0.18);
}

.card-pomodoro {
  min-height: 470px;
}

.pomodoro-box {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
  min-height: 360px;
  padding: 34px 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(231, 238, 248, 0.72));
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 24px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 16px 30px rgba(96, 165, 250, 0.12);
}

.pomodoro-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(47, 102, 243, 0.18), transparent 58%);
  pointer-events: none;
}

.pomodoro-modes {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.mode-btn,
.filter-btn {
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background-color: var(--surface-3);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.22s ease;
  font-weight: 700;
}

.mode-btn:hover,
.filter-btn:hover {
  transform: translateY(-1px);
  background-color: #dbe7f8;
}

.mode-btn.active,
.filter-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: white;
  box-shadow: 0 12px 22px rgba(47, 102, 243, 0.22);
}

#pomodoroStatus,
#pomodoroCycles {
  font-size: 0.98rem;
  color: var(--text-soft);
  font-weight: 700;
}

#pomodoroTimer {
  font-size: clamp(4.5rem, 8vw, 5.8rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--primary);
  text-shadow: 0 12px 30px rgba(47, 102, 243, 0.2);
}

.pomodoro-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.pomodoro-actions button,
.task-area button,
.goal-area button,
#taskList button,
#goalList button {
  border: none;
  cursor: pointer;
  transition: all 0.22s ease;
}

.pomodoro-actions button,
.task-area button,
.goal-area button {
  min-width: 116px;
  padding: 12px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: white;
  font-weight: 700;
  box-shadow: 0 14px 26px rgba(47, 102, 243, 0.2);
}

.pomodoro-actions button:hover,
.task-area button:hover,
.goal-area button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px rgba(47, 102, 243, 0.24);
}

.pomodoro-actions button:active,
.task-area button:active,
.goal-area button:active,
.mode-btn:active,
.filter-btn:active,
#taskList button:active,
#goalList button:active {
  transform: scale(0.97);
}

.card-tasks,
.card-notes,
.card-goals {
  min-height: auto;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.progress-area {
  margin-bottom: 18px;
}

#progressText {
  margin-bottom: 10px;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-soft);
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: #dde7f3;
  border-radius: 999px;
  overflow: hidden;
}

#progressFill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--success), #4ade80);
  transition: width 0.5s ease-in-out;
  border-radius: 999px;
}

.task-area,
.goal-area {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

input,
textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--input-border);
  background: rgba(255, 255, 255, 0.78);
  color: var(--text-main);
  padding: 13px 14px;
  font-size: 0.98rem;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

input::placeholder,
textarea::placeholder {
  color: #7c8aa3;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(47, 102, 243, 0.4);
  box-shadow: 0 0 0 4px rgba(47, 102, 243, 0.12);
  background: var(--white);
}

#notesArea {
  min-height: 190px;
  resize: vertical;
}

#taskList,
#goalList {
  list-style: none;
}

#taskList li,
#goalList li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding: 14px 14px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid rgba(214, 224, 238, 0.9);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

#taskList li:hover,
#goalList li:hover {
  transform: translateX(4px);
  background: var(--surface-2);
  border-color: rgba(96, 165, 250, 0.22);
}

#taskList li span,
#goalList li span {
  flex: 1;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
}

.completed {
  opacity: 0.62;
}

.completed span {
  text-decoration: line-through;
}

#taskList button,
#goalList button {
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(220, 38, 38, 0.12);
  color: var(--danger);
  font-weight: 700;
}

#taskList button:hover,
#goalList button:hover {
  transform: scale(1.03);
  background: rgba(220, 38, 38, 0.18);
}

.dark-mode {
  --bg-main: #08101f;
  --bg-secondary: #0f1b31;
  --text-main: #eef4ff;
  --text-soft: #b3c0d8;
  --card-bg: rgba(11, 23, 43, 0.82);
  --card-border: rgba(96, 165, 250, 0.14);
  --card-shadow: 0 22px 50px rgba(2, 8, 23, 0.42);
  --card-shadow-hover: 0 28px 60px rgba(15, 23, 42, 0.5);
  --primary: #60a5fa;
  --primary-strong: #3b82f6;
  --primary-soft: rgba(96, 165, 250, 0.14);
  --surface: rgba(16, 28, 50, 0.92);
  --surface-2: rgba(26, 43, 72, 0.96);
  --surface-3: rgba(36, 52, 80, 0.96);
  --input-border: #2a3d5c;
}

.dark-mode body,
body.dark-mode {
  color: var(--text-main);
}

.dark-mode .brand-badge {
  background: rgba(15, 23, 42, 0.82);
  border-color: rgba(96, 165, 250, 0.16);
  color: #8ec5ff;
  box-shadow: 0 12px 26px rgba(2, 8, 23, 0.25);
}

.dark-mode .botao-topo {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.22);
}

.dark-mode .card::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 30%);
}

.dark-mode .card::after {
  background: radial-gradient(circle at top, rgba(96, 165, 250, 0.1), transparent 60%);
}

.dark-mode .pomodoro-box {
  background: linear-gradient(180deg, rgba(14, 27, 49, 0.96), rgba(13, 23, 40, 0.92));
  border-color: rgba(96, 165, 250, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 16px 30px rgba(2, 8, 23, 0.3);
}

.dark-mode .pomodoro-box::before {
  background: radial-gradient(circle at top, rgba(96, 165, 250, 0.18), transparent 58%);
}

.dark-mode input,
.dark-mode textarea {
  background: rgba(10, 19, 35, 0.86);
  color: var(--text-main);
}

.dark-mode input::placeholder,
.dark-mode textarea::placeholder {
  color: #90a2c3;
}

.dark-mode input:focus,
.dark-mode textarea:focus {
  background: rgba(10, 19, 35, 0.98);
}

.dark-mode #taskList li,
.dark-mode #goalList li {
  background: var(--surface);
  border-color: rgba(42, 61, 92, 0.9);
}

.dark-mode #taskList li:hover,
.dark-mode #goalList li:hover {
  background: var(--surface-2);
  border-color: rgba(96, 165, 250, 0.2);
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.4);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.6);
}

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

  .dashboard-column {
    gap: 20px;
  }
}

@media (max-width: 768px) {
  body {
    padding: 24px 16px 42px;
  }

  .topo {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 22px;
  }

  .topo-acoes {
    justify-content: flex-end;
  }

  .card {
    border-radius: 24px;
    padding: 20px;
  }

  .card h2 {
    font-size: 1.65rem;
  }

  .clock-box {
    font-size: 3rem;
  }

  #pomodoroTimer {
    font-size: 4rem;
  }

  .task-area,
  .goal-area,
  .pomodoro-actions {
    flex-direction: column;
  }

  .task-area button,
  .goal-area button,
  .pomodoro-actions button,
  .botao-topo {
    width: 100%;
  }

  .pomodoro-actions button,
  .task-area button,
  .goal-area button {
    min-width: 100%;
  }
}