:root {
  --bg: #f6f3ee;
  --card: #fffdf9;
  --text: #3f3a34;
  --text-soft: #6e675f;
  --border: #e7dfd4;
  --sage: #a3b18a;
  --sage-dark: #7c8f69;
  --brown: #8b6f47;
  --brown-dark: #6f5638;
  --shadow: 0 8px 24px rgba(80, 60, 40, 0.06);
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.app-header {
  text-align: center;
  margin-bottom: 32px;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.85rem;
  color: var(--brown);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-header h1 {
  margin: 0;
  font-size: 2.6rem;
  font-weight: 700;
}

.subtitle {
  margin-top: 10px;
  color: var(--text-soft);
  font-size: 1rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.stat-card,
.controls-card,
.form-card,
.task-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 18px;
}

.stat-label {
  margin: 0 0 10px;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.stat-number {
  margin: 0;
  font-size: 1.8rem;
  color: var(--text);
}

.controls-card {
  display: flex;
  gap: 12px;
  padding: 16px;
  margin-bottom: 22px;
}

.search-input,
.filter-select,
.task-form input,
.task-form select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d9d0c3;
  border-radius: var(--radius-md);
  background: #fdfaf6;
  color: var(--text);
  font-size: 0.95rem;
}

.search-input:focus,
.filter-select:focus,
.task-form input:focus,
.task-form select:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(163, 177, 138, 0.18);
}

.form-card,
.tasks-section {
  margin-bottom: 24px;
}

.form-card {
  padding: 22px;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0 0 6px;
  font-size: 1.25rem;
}

.section-heading p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.task-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.92rem;
  color: var(--text-soft);
}

.btn-primary,
.btn-secondary,
.btn-delete {
  border: none;
  border-radius: 12px;
  padding: 11px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  align-self: flex-start;
  background: var(--sage);
  color: #fffdf9;
}

.btn-primary:hover {
  background: var(--sage-dark);
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.task-card {
  padding: 18px;
}

.task-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}

.badge-high {
  background: #eadfce;
  color: var(--brown);
}

.badge-medium {
  background: #edf1e8;
  color: var(--sage-dark);
}

.badge-low {
  background: #f3efe8;
  color: var(--text-soft);
}

.badge-status {
  background: #e8efe1;
  color: var(--sage-dark);
}

.badge-status-todo {
  background: #efe6da;
  color: var(--brown-dark);
}

.task-card h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
}

.task-card p {
  margin: 0 0 16px;
  color: var(--text-soft);
  line-height: 1.5;
}

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

.btn-secondary {
  background: #edf1e8;
  color: var(--sage-dark);
}

.btn-delete {
  background: #efe6da;
  color: var(--brown-dark);
}

.btn-secondary:hover {
  background: #e4eadc;
}

.btn-delete:hover {
  background: #e7dccd;
}

@media (max-width: 768px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .controls-card {
    flex-direction: column;
  }

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

  .task-actions {
    flex-direction: column;
  }
}

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

  .app-header h1 {
    font-size: 2rem;
  }

  .container {
    padding: 28px 16px 40px;
  }
}

.completed {
  text-decoration: line-through;
  opacity: 0.6;
}


.empty-state {
  margin: 0;
  padding: 18px;
  text-align: center;
  color: var(--text-soft);
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

.btn-secondary:disabled {
  cursor: default;
  opacity: 0.6;
}
