/* Application styles load after prebuilt AdminLTE. No compilation required. */
.habitual-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--bs-body-color);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.habitual-brand-mark { display: block; flex-shrink: 0; width: 1.75rem; height: 1.75rem; }
.habitual-brand-name { font-size: 1.35rem; letter-spacing: -0.045em; }
.habitual-brand--large { flex-direction: column; gap: 0.75rem; }
.habitual-brand--large .habitual-brand-mark { width: 4.5rem; height: 4.5rem; }
.habitual-brand--large .habitual-brand-name { font-size: 2.5rem; letter-spacing: -0.055em; }

.authentication-box {
  width: min(25rem, calc(100% - 2rem));
}

.authentication-links {
  display: grid;
  gap: 0.75rem;
  text-align: center;
}

body.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  height: auto;
}

.history-grid .history-habit {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 15rem;
  max-width: 20rem;
  background: var(--bs-body-bg);
  font-weight: normal;
}

.history-grid .history-cell {
  min-width: 5rem;
  padding: 0;
  text-align: center;
}

.history-cell--met { --history-bg: var(--bs-success-bg-subtle); }
.history-cell--missed {
  --history-bg: var(--bs-danger-bg-subtle);
  --history-emphasis: var(--bs-danger-text-emphasis);
}
.history-cell--in_progress {
  --history-bg: var(--bs-warning-bg-subtle);
  --history-emphasis: var(--bs-warning-text-emphasis);
}
.history-cell--not_due { --history-bg: var(--bs-secondary-bg); }

.history-grid .history-cell,
.history-legend {
  background-color: var(--history-bg);
}

.history-cell--progress-medium { --history-tint: 15%; }
.history-cell--progress-high { --history-tint: 30%; }
.history-grid .history-cell:is(.history-cell--progress-medium, .history-cell--progress-high) {
  background-color: color-mix(in srgb, var(--history-bg), var(--history-emphasis) var(--history-tint));
}

.history-day {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 6rem;
  padding: 0.5rem;
  color: var(--bs-body-color);
  text-decoration: none;
}

.history-day:focus-visible {
  outline: 3px solid var(--bs-primary);
  outline-offset: -3px;
}

.history-week-summary { min-width: 13rem; font-size: 0.875rem; }
.history-week-summary p:last-child { margin-bottom: 0; }
.history-legend { display: inline-block; width: 0.9rem; height: 0.9rem; border: 1px solid var(--bs-border-color); }

.today-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.today-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(8rem, 9rem);
  gap: 0.4rem 1rem;
  align-items: center;
  height: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--bs-border-color);
  border-left: 3px solid transparent;
  border-radius: var(--bs-border-radius);
  background-color: var(--bs-body-bg);
}
.today-list > turbo-frame { display: block; min-width: 0; }
.today-summary { display: contents; }
.today-name { grid-column: 1; grid-row: 1; display: flex; align-items: flex-start; align-self: start; gap: 0.65rem; min-width: 0; }
.today-name a { overflow-wrap: anywhere; }
.today-name > div { min-width: 0; }
.today-entry { grid-column: 2; grid-row: 2; }
.today-entry-caption { flex-shrink: 0; font-size: 0.7rem; line-height: 1.2; }
.today-target { grid-column: 1; grid-row: 2; min-width: 0; font-size: 0.875rem; }
.today-progress { height: 0.375rem; background-color: var(--bs-secondary-bg); }
.today-progress .progress-bar {
  width: var(--today-progress);
  background-color: color-mix(in srgb, var(--bs-warning), var(--bs-teal) var(--today-progress));
}
.today-progress-caption { margin-top: 0.2rem; font-size: 0.7rem; line-height: 1.2; }
.today-streak { grid-column: 2; grid-row: 1; justify-self: end; align-self: start; padding-top: 0.2rem; white-space: nowrap; }
.today-status { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 1.25rem; height: 1.25rem; margin-top: 0.15rem; border-radius: 50%; }
.today-status .bi { display: flex; font-size: 0.75rem; line-height: 1; }
.today-status .bi::before { display: block; }
.today-entry input[type=number] { min-width: 0; width: 5.5rem; }
.today-entry input[type=checkbox] { width: 1.25rem; height: 1.25rem; margin-top: 0; }
.today-save-feedback { min-height: 1.15rem; font-size: 0.75rem; color: var(--bs-secondary-color); }

@media (max-width: 767.98px) {
  .today-list { grid-template-columns: minmax(0, 1fr); }
}
