:root {
  --bg-0: #f3f5f7;
  --bg-1: #ffffff;
  --ink-1: #17212b;
  --ink-2: #415060;
  --accent: #0a7f70;
  --accent-soft: #dbf2ef;
  --warn: #d1661f;
  --high: #c7441a;
  --med: #d9a707;
  --low: #1c8c51;
  --line: #dbe3ea;
  --shadow: 0 12px 30px rgba(17, 26, 39, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 5% 0%, #d6efe2 0%, transparent 40%),
    radial-gradient(circle at 95% 15%, #ffe7cf 0%, transparent 35%),
    linear-gradient(150deg, #eef2f5 0%, #f9fbfc 70%);
  color: var(--ink-1);
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), transparent 35%);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  letter-spacing: 0.01em;
}

p {
  margin: 0;
}

.page {
  width: min(1320px, 94vw);
  margin: 24px auto 30px;
  display: grid;
  gap: 18px;
  position: relative;
  z-index: 1;
}

.card {
  background: color-mix(in srgb, var(--bg-1) 92%, #f4f8fb 8%);
  border: 1px solid rgba(201, 214, 226, 0.65);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px;
  backdrop-filter: blur(6px);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.eyebrow {
  color: var(--accent);
  font-size: 13px;
  margin-bottom: 4px;
  font-weight: 700;
}

.sub {
  color: var(--ink-2);
  margin-top: 6px;
}

.google-block {
  text-align: right;
  display: grid;
  gap: 10px;
}

.google-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.stat {
  display: grid;
  gap: 8px;
}

.stat h3 {
  font-size: 14px;
  color: var(--ink-2);
  font-family: "Noto Sans SC", sans-serif;
}

.stat p {
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 700;
}

.panel-grid {
  display: grid;
  grid-template-columns: minmax(290px, 400px) minmax(320px, 1fr);
  gap: 12px;
}

.task-form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-2);
}

input,
textarea,
select,
button {
  font: inherit;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink-1);
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-color: var(--accent);
}

.inline-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.scope-switch {
  display: flex;
  gap: 6px;
}

.chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
}

.chip-active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

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

.board-col {
  min-height: 320px;
}

.board-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.board-head span {
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
}

.task-list {
  display: grid;
  gap: 10px;
}

.task-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
  display: grid;
  gap: 8px;
}

.task-title {
  font-weight: 700;
  font-size: 15px;
}

.task-desc {
  font-size: 13px;
  color: var(--ink-2);
  white-space: pre-wrap;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.pill {
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 12px;
  border: 1px solid transparent;
}

.pill-high {
  background: color-mix(in srgb, var(--high) 14%, #fff);
  color: var(--high);
}

.pill-medium {
  background: color-mix(in srgb, var(--med) 16%, #fff);
  color: #896e00;
}

.pill-low {
  background: color-mix(in srgb, var(--low) 12%, #fff);
  color: #0f6f3c;
}

.task-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.task-actions select {
  font-size: 12px;
  padding: 6px 8px;
}

#calendar {
  margin-top: 10px;
}

.btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  background: #fff;
  color: var(--ink-1);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-outline {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-ghost {
  background: transparent;
}

.task-delete {
  border: 1px solid color-mix(in srgb, var(--warn) 26%, #fff);
  color: var(--warn);
  background: #fff;
  border-radius: 8px;
  padding: 6px 8px;
  cursor: pointer;
}

.empty {
  font-size: 13px;
  color: var(--ink-2);
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}

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

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

@media (max-width: 860px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .google-block {
    width: 100%;
    text-align: left;
  }

  .google-actions {
    justify-content: flex-start;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .inline-inputs {
    grid-template-columns: 1fr;
  }
}
