/* Styles that belong to one screen and nowhere else. */

/* Today -------------------------------------------------------------- */

.today-total {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 10px;
  border-radius: 16px;
  background: var(--forest-soft);
  flex-shrink: 0;
}
.today-total__value {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  color: var(--forest-deep);
  text-align: right;
}
.today-total__caption { font-size: 12px; font-weight: 500; color: var(--ink2); text-align: right; }

.timer {
  position: relative;
  overflow: hidden;
  background: var(--forest);
  color: var(--cream);
  border-radius: 26px;
  padding: 20px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.timer__hills { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; }
.timer > *:not(.timer__hills) { position: relative; }
.timer__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.timer__tracker { font-size: 17px; font-weight: 700; }
.timer__kind { font-size: 14px; color: #CFDCD2; }
.timer__clock {
  font-family: var(--display);
  font-size: 80px;
  font-weight: 700;
  line-height: .95;
  letter-spacing: -2px;
}
.timer__started { margin-top: 6px; font-size: 14px; color: #CFDCD2; }
.timer__note {
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .1);
  font-size: 15px;
}
.timer__actions { display: flex; gap: 10px; }
.timer__actions .button { height: 52px; border-radius: 26px; font-size: 16px; }

@media (min-width: 900px) {
  .timer__clock { font-size: 96px; }
}

/* Week --------------------------------------------------------------- */

.week-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  height: 96px;
  border-bottom: 2px solid var(--sand);
}
.week-bars__day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}
.week-bars__bar { width: 22px; border-radius: 11px 11px 5px 5px; background: var(--sage); }
.week-bars__bar--today { background: var(--forest); }
.week-bars__trunk { width: 4px; height: 7px; background: var(--bark); }
.week-bars__labels {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin-top: -6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink2);
  text-align: center;
}
.week-total {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.6px;
}

.day-card { background: var(--paper); border-radius: 24px; padding: 4px 16px; }
.day-card__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 0 6px;
}
.day-card__title { font-family: var(--display); font-size: 18px; font-weight: 700; }
.day-card__total { font-size: 15px; font-weight: 700; color: var(--ink2); }

/* Dashboard ---------------------------------------------------------- */

.panel { padding: 18px 16px 16px; background: var(--paper); border-radius: 24px; }
.panel__figure {
  margin-top: 2px;
  font-family: var(--display);
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.8px;
}
.panel__figure--gain { color: var(--gain); }
.panel__figure--loss { color: var(--loss); }
.panel__caption { font-size: 14px; color: var(--ink2); }
.panel__chart { margin-top: 16px; position: relative; height: 170px; }

.totals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.total-tile { padding: 16px; border-radius: 24px; }
.total-tile--gain { background: var(--gain-soft); }
.total-tile--loss { background: var(--loss-soft); }
.total-tile__title { font-size: 15px; font-weight: 700; }
.total-tile__value {
  margin-top: 6px;
  font-family: var(--display);
  font-size: 26px;
  font-weight: 800;
}
.total-tile--gain .total-tile__value { color: var(--gain); }
.total-tile--loss .total-tile__value { color: var(--loss); }
.total-tile__caption { margin-top: 2px; font-size: 13px; color: var(--ink2); }

.sync-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 18px;
  background: var(--paper);
  font-size: 14px;
  color: var(--ink2);
}

.hills { display: block; margin: -4px 0 -14px; width: 100%; }

/* Invoicing ---------------------------------------------------------- */

.line-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 0;
}
.line-item + .line-item { border-top: 1px solid var(--line); }
.line-item input[type="checkbox"] {
  width: 22px; height: 22px; margin: 1px 0 0;
  accent-color: var(--forest); flex-shrink: 0;
}
.line-item__body { flex-grow: 1; min-width: 0; }
.line-item__text { display: block; font-size: 15px; line-height: 1.4; }
.line-item__meta { display: block; margin-top: 4px; font-size: 13px; color: var(--ink2); }
.line-item__quantity {
  font-family: var(--display); font-size: 15px; font-weight: 700; white-space: nowrap;
}

.invoice-total {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 16px 16px;
  background: var(--forest-soft);
  border-radius: 24px;
}
.invoice-total__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.invoice-total__value {
  font-family: var(--display); font-size: 26px; font-weight: 800; color: var(--forest-deep);
}

/* Sign in ------------------------------------------------------------ */

.centered {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px));
}
.centered .card { width: 100%; max-width: 380px; }

.flash {
  margin: 0 20px;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 600;
}
.flash--notice { background: var(--gain-soft); color: var(--gain); }
.flash--alert { background: var(--loss-soft); color: var(--loss); }

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-top: 8px;
  text-align: center;
}
.footer-brand__word {
  font-family: var(--display); font-size: 15px; font-weight: 800; color: var(--forest-deep);
}
.footer-brand__tagline { font-size: 13px; color: var(--ink2); }
