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

:root {
  --bg: #050711;
  --bg-panel: rgba(255, 255, 255, 0.06);
  --bg-card: rgba(255, 255, 255, 0.08);
  --text: #f4f7fb;
  --muted: #a7b6d1;
  --accent: #7cf3ff;
  --accent-2: #ff7dd8;
  --border: rgba(255, 255, 255, 0.15);
  --shadow: 0 25px 70px rgba(0, 0, 0, 0.45);
  --sans: "Manrope", "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: "DM Mono", "Source Code Pro", monospace;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 20% 20%, #0c0f1f, #050711 45%), radial-gradient(circle at 80% 10%, #13092b, transparent 40%), #050711;
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
  overflow-x: hidden;
}

.background {
  position: fixed;
  inset: 0;
  z-index: -2;
}

.gradient {
  position: absolute;
  width: 520px;
  height: 520px;
  filter: blur(140px);
  opacity: 0.6;
}

.gradient-a {
  top: -140px;
  left: -120px;
  background: radial-gradient(circle at 30% 30%, #7cf3ff, transparent 55%);
}

.gradient-b {
  bottom: -180px;
  right: -140px;
  background: radial-gradient(circle at 70% 70%, #ff7dd8, transparent 55%);
}

.grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 140px 140px;
  mask-image: radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.4), transparent 70%);
}

.app {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 32px 24px 52px;
}

.hero {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  align-items: center;
  margin-bottom: 26px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 10px;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  line-height: 1.2;
}

.lede {
  color: var(--muted);
  max-width: 700px;
}

.hero-actions {
  margin-top: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.status {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.92rem;
}

.hero-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.card-label {
  color: var(--muted);
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.card-date {
  font-size: 1.4rem;
  font-weight: 700;
}

.card-sub {
  color: var(--muted);
  margin-top: 10px;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.tabs {
  display: inline-flex;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 6px;
  border-radius: 14px;
  width: fit-content;
  box-shadow: var(--shadow);
}

.tab {
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 150ms ease;
}

.tab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0a0d16;
  box-shadow: 0 10px 30px rgba(124, 243, 255, 0.3);
}

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
  display: none;
}

.panel.active {
  display: block;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.panel-meta {
  color: var(--muted);
  max-width: 440px;
}

.dots-legend {
  display: flex;
  gap: 14px;
  align-items: center;
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.dot-swatch {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--border);
}

.dot-swatch.complete {
  background: linear-gradient(135deg, var(--accent), #42ffcd);
}

.dot-swatch.partial {
  background: linear-gradient(135deg, #ffcf7d, #ff8fb1);
}

.dot-swatch.empty {
  background: rgba(255, 255, 255, 0.06);
}

.dot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(26px, 1fr));
  gap: 10px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(124, 243, 255, 0.08), rgba(255, 125, 216, 0.06));
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.day-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease, border-color 120ms ease;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45);
}

.day-dot:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.6);
}

.day-dot.complete {
  background: linear-gradient(135deg, var(--accent), #42ffcd);
  box-shadow: 0 0 0 2px rgba(124, 243, 255, 0.35), 0 10px 20px rgba(66, 255, 205, 0.35);
}

.day-dot.partial {
  background: linear-gradient(135deg, #ffcf7d, #ff8fb1);
  box-shadow: 0 0 0 2px rgba(255, 207, 125, 0.4), 0 10px 20px rgba(255, 143, 177, 0.35);
}

.goals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.goal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: grid;
  gap: 8px;
}

.goal-card h3 {
  margin: 0;
  font-size: 1.2rem;
}

.goal-summary {
  color: var(--muted);
}

.goal-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  display: grid;
  gap: 6px;
}

.goal-card li {
  line-height: 1.45;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}

.timeline-date {
  font-family: var(--mono);
  color: var(--accent);
  font-weight: 700;
}

.monthly-legend {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid var(--border);
  font-size: 0.9rem;
}

.pill.done {
  background: linear-gradient(135deg, var(--accent), #42ffcd);
  color: #04121a;
}

.pill.doing {
  background: linear-gradient(135deg, #ffcf7d, #ff8fb1);
  color: #110912;
}

.pill.todo {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.monthly-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 6px;
  min-height: 180px;
}

.month-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(124, 243, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  padding: 14px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
  min-height: 64px;
}

.month-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.35);
}

.month-title {
  margin: 0;
  font-weight: 700;
}

.month-status {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.9rem;
}

.month-status.todo {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.month-status.doing {
  background: linear-gradient(135deg, #ffcf7d, #ff8fb1);
  color: #110912;
}

.month-status.done {
  background: linear-gradient(135deg, var(--accent), #42ffcd);
  color: #04121a;
}

.button {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none;
  color: #0b0f17;
}

.button:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.35);
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  z-index: 10;
}

.modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal__card {
  background: #0d1426;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  width: min(420px, 90vw);
  box-shadow: var(--shadow);
}

.modal__card h3 {
  margin: 0 0 6px;
  font-size: 1.4rem;
}

.modal__hint {
  color: var(--muted);
  margin-bottom: 12px;
}

#loginForm {
  display: grid;
  gap: 10px;
}

#passwordInput {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 1rem;
}

.error {
  color: #fca5a5;
  min-height: 20px;
  font-size: 0.95rem;
}

.popover {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  z-index: 9;
}

.popover.open {
  opacity: 1;
  pointer-events: auto;
}

.popover__card {
  background: #0d1426;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  width: min(460px, 92vw);
  box-shadow: var(--shadow);
}

.popover__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.popover__date {
  color: var(--muted);
  font-weight: 700;
}

.menu-list {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.menu-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
}

.menu-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.menu-title {
  font-weight: 700;
  margin: 0;
}

.menu-hint {
  margin: 2px 0 0;
  color: var(--muted);
}

.popover__actions {
  display: flex;
  justify-content: flex-end;
}

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

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