html { font-size: 14px; position: relative; min-height: 100%; }
@media (min-width: 768px) { html { font-size: 16px; } }

body {
  margin-bottom: 80px;
  background: #f5f7f6;
  color: #17211d;
}

.navbar { background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
.navbar-brand { font-weight: 800; letter-spacing: -.04em; }
.nav-link { color: #33443c; }
.eyebrow { margin-bottom: .35rem; color: #0d7250; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2 { letter-spacing: -.035em; }

.hero {
  max-width: 760px;
  margin: 8vh auto;
  padding: 4rem;
  background: linear-gradient(145deg, #fff, #edf7f2);
  border: 1px solid #dbe9e2;
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(32,73,55,.10);
}
.hero h1 { margin-bottom: 1.25rem; font-size: clamp(2.4rem,7vw,4.8rem); font-weight: 800; line-height: .98; }
.hero p:not(.eyebrow) { max-width: 620px; margin-bottom: 2rem; color: #52635b; font-size: 1.15rem; }

.btn-primary { background: #087a54; border-color: #087a54; }
.btn-primary:hover { background: #056b49; border-color: #056b49; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.page-heading h1, .form-shell h1 { margin: 0; font-size: clamp(2rem,6vw,3.5rem); font-weight: 800; }

.stats-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin-bottom: 2rem; }
.stats-grid.import-stats { grid-template-columns: repeat(4,1fr); }
.stat-card { display: flex; align-items: center; justify-content: space-between; padding: 1.4rem; color: inherit; text-decoration: none; background: #fff; border: 1px solid #dde6e1; border-radius: 18px; }
.stat-card strong { font-size: 2.2rem; }
.stat-danger strong { color: #ba2d3b; }

.dashboard-section, .form-shell { padding: 1.6rem; background: #fff; border: 1px solid #dde6e1; border-radius: 20px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.section-heading h2 { margin: 0; }
.priority-list { display: grid; }
.priority-item { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; color: inherit; text-decoration: none; border-bottom: 1px solid #edf0ee; }
.priority-item:last-child { border-bottom: 0; }
.priority-item span { display: grid; }
.priority-item small { color: #68766f; }
.priority-item time { font-size: 1.15rem; font-weight: 800; }

.task-list { display: grid; gap: 1rem; }
.task-card { padding: 1.4rem; background: #fff; border: 1px solid #dde6e1; border-radius: 18px; }
.task-card-overdue { border-left: 5px solid #ba2d3b; }
.task-card-top, .task-actions, .task-meta { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.task-card-top time { font-weight: 800; }
.task-kind { margin-right: .5rem; color: #0d7250; font-weight: 700; }
.task-card h2 { margin: 1rem 0 .5rem; font-size: 1.35rem; }
.task-meta { justify-content: flex-start; margin: 1rem 0; color: #5b6a63; font-size: .9rem; }
.task-actions form { min-width: 220px; margin-left: auto; }

.empty-state { padding: 4rem 1.5rem; text-align: center; background: #fff; border: 1px dashed #bfcfc7; border-radius: 20px; }
.empty-state.compact { padding: 2rem; }
.form-shell { max-width: 900px; margin: 0 auto; }
.import-shell { max-width: none; }
.import-form { max-width: 680px; }
.import-table th { white-space: nowrap; }
.task-form { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.25rem; margin-top: 2rem; }
.form-field-wide { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: .75rem; padding-top: 1rem; }

.footer { position: absolute; bottom: 0; width: 100%; line-height: 60px; }
.btn:focus, .form-control:focus, .form-select:focus { box-shadow: 0 0 0 .2rem rgba(8,122,84,.2); }

@media (max-width: 767px) {
  .hero { margin: 2rem auto; padding: 2rem 1.4rem; }
  .page-heading { align-items: stretch; flex-direction: column; }
  .stats-grid, .stats-grid.import-stats, .task-form { grid-template-columns: 1fr; }
  .form-field-wide { grid-column: auto; }
  .task-actions { align-items: stretch; flex-direction: column; }
  .task-actions form { width: 100%; margin-left: 0; }
  .form-actions { flex-direction: column-reverse; }
}
