/* Sherpa — Tasks screen. Same shell/tokens as the Today screen (black
   background, teal cards, Manrope + JetBrains Mono, shared tab bar) so
   the two screens read as one app; the design's own three-tier card
   treatment (calm / urgent / blocked) and filter chips are new here. */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #000;
  color: #e8eeee;
  font-family: Manrope, Helvetica, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.mono { font-family: 'JetBrains Mono', monospace; }

/* Header */

.head {
  padding: 20px 20px 8px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f2f7f7;
  line-height: 1.1;
}

.stats {
  padding-top: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #6f8f94;
}

/* Filter chips */

.filters {
  display: flex;
  gap: 6px;
  padding: 6px 20px 16px;
  overflow-x: auto;
}

.chip {
  flex: none;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  background: rgba(0, 73, 83, 0.45);
  color: #7fa8ad;
  -webkit-tap-highlight-color: transparent;
}

.chip.active {
  background: #f2f5f4;
  color: #00181c;
  font-weight: 600;
}

.chip .count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  opacity: .55;
}

/* Calm-state message (empty / auth) */

.message {
  margin: 8px 20px 4px;
  padding: 14px 16px;
  border: 1px solid #1c1f20;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: #b9c5c6;
}

/* List */

.list {
  padding: 0 20px 10px;
  flex: 1;
}

.section {
  margin-bottom: 22px;
}

.section:last-child { margin-bottom: 0; }

.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: #5c6a6b;
  padding: 2px 2px 8px;
}

.section-cards {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.task-card {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 16px;
  padding: 16px 16px 14px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.task-card:active { transform: scale(0.98); }

.task-card-body {
  flex: 1;
  min-width: 0;
}

.task-card .chevron { flex: none; }

.task-title {
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
}

.task-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 11px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.task-tag { flex: none; }

/* calm — due later than tomorrow */
.task-card--calm {
  background: #004953;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}
.task-card--calm .task-due { color: #9cc3c7; }
.task-card--calm .task-tag { color: #6c9298; opacity: .8; }

/* urgent — due today or overdue (bot's own TODAY section) */
.task-card--urgent {
  background: #005a66;
  box-shadow: inset 0 1px 0 rgba(255, 210, 168, 0.14);
}
.task-card--urgent .task-due {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #ffb257;
  font-weight: 600;
}
.task-card--urgent .due-dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #ffb257;
  flex: none;
}
.task-card--urgent .task-tag { color: #8fb2b8; opacity: .75; }

/* blocked — parked, kept out of the plan; still visible so it doesn't
   fall through the cracks, just visually quieted */
.task-card--blocked {
  background: #002c33;
  padding: 15px 16px 13px;
}
.task-card--blocked .task-title { font-weight: 500; color: #6f8f94; }
.task-card--blocked .task-due { color: #4e7378; }
.task-card--blocked .task-tag { color: #4e7378; opacity: .85; }

/* Tab bar (shared with the Today screen) */

.tabbar {
  margin-top: auto;
  border-top: 1px solid #131617;
  padding: 12px 14px calc(18px + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  gap: 4px;
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: #8b9899;
  text-decoration: none;
}

.tab.active { color: #6fe3d2; font-weight: 600; }

.tab-icon {
  width: 17px;
  height: 17px;
  border: 1.4px solid #6d7a7b;
  border-radius: 4px;
}

.tab.active .tab-icon { border-color: #6fe3d2; }

.tab-fab {
  display: flex;
  justify-content: center;
  text-decoration: none;
}

.tab-fab span {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #006d7c;
  color: #eafcfa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  line-height: 1;
  margin-bottom: 4px;
}
