
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Nunito:wght@400;600;700;800&display=swap');

:root {
  --green: #436b4b;
  --green-dark: #2c4933;
  --green-light: #e8f0e5;
  --background: #f5f7f1;
  --white: #ffffff;
  --text: #26362a;
  --muted: #748074;
  --border: #e4e9df;
  --danger: #b94e4e;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--background);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  line-height: 1.6;
}

button, input, select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #a4c5a0;
  outline-offset: 3px;
}

.topbar {
  min-height: 76px;
  padding: 15px 7%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--green-dark);
  font-family: "Nunito", sans-serif;
  font-size: 25px;
  font-weight: 800;
  text-decoration: none;
}

.logo {
  font-size: 32px;
}

.brand-ai {
  color: #86a77b;
}

.local-badge {
  color: var(--green);
  background: var(--green-light);
  border-radius: 30px;
  padding: 7px 13px;
  font-size: 12px;
}

.container {
  width: min(960px, 90%);
  margin: 0 auto;
}

.hero {
  padding: 55px 0 30px;
}

.eyebrow {
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
}

.hero h1 {
  margin: 12px 0;
  font-family: "Nunito", sans-serif;
  font-size: clamp(35px, 6vw, 54px);
  line-height: 1.15;
  letter-spacing: -1.5px;
}

.subtitle {
  max-width: 520px;
  color: var(--muted);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

.stat-card,
.panel,
.ai-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 5px 20px #273c2c08;
}

.stat-card {
  padding: 20px;
}

.stat-icon {
  font-size: 23px;
}

.stat-card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.stat-card h2 {
  font-family: "Nunito", sans-serif;
  font-size: 28px;
}

.panel {
  padding: 26px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 23px;
}

.section-heading h2,
.ai-heading h2 {
  font-family: "Nunito", sans-serif;
  font-size: 23px;
}

.date-label {
  color: var(--muted);
  font-size: 12px;
}

.task-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.task-form input {
  flex: 1 1 220px;
  min-width: 0;
}

.task-form input,
.task-form select {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  color: var(--text);
  background: #fff;
}

.primary-btn {
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  background: var(--green);
  color: white;
  font-weight: 700;
  transition: background 0.2s, transform 0.2s;
}

.primary-btn:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
}

.task-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 22px 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.text-btn {
  border: 0;
  background: transparent;
  color: var(--green);
  font-weight: 700;
}

.task-list {
  display: grid;
  gap: 10px;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.task-check {
  width: 19px;
  height: 19px;
  accent-color: var(--green);
  flex-shrink: 0;
}

.task-content {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.task-title {
  font-weight: 600;
}

.task-item.done .task-title {
  color: #8b958a;
  text-decoration: line-through;
}

.task-meta {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.priority {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 20px;
  white-space: nowrap;
}

.priority-high {
  background: #fce8e5;
  color: #a4473c;
}

.priority-medium {
  background: #fff1d7;
  color: #8b671e;
}

.priority-low {
  background: #e7f2e6;
  color: #436b4b;
}

.delete-btn {
  border: 0;
  padding: 6px;
  background: transparent;
  color: var(--danger);
  font-size: 17px;
}

.empty-state {
  padding: 35px 10px;
  text-align: center;
}

.empty-state span {
  font-size: 35px;
}

.empty-state h3 {
  margin: 8px 0 5px;
  font-family: "Nunito", sans-serif;
}

.empty-state p {
  color: var(--muted);
  font-size: 13px;
}

.ai-panel {
  margin-top: 22px;
  padding: 26px;
  background: #eef4e9;
  border-color: #dce8d6;
}

.ai-heading {
  display: flex;
  align-items: center;
  gap: 13px;
}

.ai-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: white;
  font-size: 23px;
}

.ai-description {
  margin: 16px 0;
  color: #5d6d5c;
  font-size: 14px;
}

.ai-btn {
  width: 100%;
}

.ai-status {
  margin-top: 12px;
  color: #687866;
  font-size: 12px;
}

.ai-result {
  margin-top: 18px;
  padding: 18px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.ai-result[hidden] {
  display: none;
}

footer {
  padding: 28px 0;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 600px) {
  .topbar {
    padding: 14px 5%;
  }

  .brand {
    font-size: 21px;
  }

  .local-badge {
    font-size: 10px;
  }

  .container {
    width: 92%;
  }

  .hero {
    padding-top: 35px;
  }

  .stats {
    gap: 8px;
  }

  .stat-card {
    padding: 13px;
  }

  .stat-card h2 {
    font-size: 24px;
  }

  .stat-card p {
    font-size: 11px;
  }

  .panel,
  .ai-panel {
    padding: 18px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .task-form select,
  .task-form .primary-btn {
    flex: 1;
  }

  .priority {
    padding: 4px 6px;
  }
}
