body {
  min-height: 100vh;
}

/* 2FA enrollment QR code (inline SVG) */
.qr-holder svg {
  width: 210px;
  height: 210px;
}

.card {
  border-radius: 0.6rem;
}

.navbar-brand {
  font-size: 1.3rem;
  letter-spacing: 0.02em;
}

table th, table td {
  vertical-align: middle;
}

/* Sticky header for scrollable history table */
.table-sticky-header thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background-color: #f8f9fa;
}

/* Star rating widget */
.star-input {
  display: flex;
  gap: 4px;
}

.star-input span {
  font-size: 1.6rem;
  cursor: pointer;
  color: #ccc;
  line-height: 1;
  transition: color 0.1s;
  user-select: none;
}

.star-input span.filled {
  color: #ffc107;
}

.star-display {
  font-size: 1.1rem;
  letter-spacing: 1px;
}

.star-display .filled { color: #ffc107; }
.star-display .empty  { color: #ccc; }

/* Calendar view */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-weekday {
  text-align: center;
  font-weight: 600;
  font-size: 0.8rem;
  color: #6c757d;
  padding: 2px 0;
}

.cal-cell {
  background: #fff;
  border: 1px solid #e3e6ea;
  border-radius: 6px;
  min-height: 84px;
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
}

.cal-cell.out-month { background: #f6f7f9; }
.cal-cell.out-month .cal-daynum { color: #b7bdc4; }
.cal-cell.today { box-shadow: inset 0 0 0 2px var(--bs-primary); }

.cal-daynum { font-size: 0.8rem; font-weight: 600; }
.cal-markers { font-size: 0.85rem; line-height: 1; white-space: nowrap; }
.cal-reduced { height: 15px; width: auto; vertical-align: text-bottom; }
.cal-cyclelabel { font-size: 0.65rem; color: #6c757d; }

/* Per-day activity icons + both users' weights */
.cal-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 5px;
  margin: 2px 0;
}

.cal-acticon-wrap {
  position: relative;
  display: inline-flex;
}

.cal-acticon-holder {
  position: relative;
  display: inline-flex;
}

.cal-acticon {
  height: 18px;
  width: auto;
  cursor: pointer;
  display: block;
}

/* Small badge tied to the corner of an activity icon (e.g. X-Fit reduced intensity) */
.cal-acticon-badge {
  position: absolute;
  right: -4px;
  bottom: -3px;
  height: 11px;
  width: auto;
  pointer-events: none;
}

/* Hover pop-up: enlarged icon + activity statistics */
.cal-popup {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.cal-acticon-wrap:hover .cal-popup { display: flex; }

.cal-popup-img { width: 96px; height: auto; }
.cal-popup-title { font-size: 0.74rem; font-weight: 600; color: #343a40; white-space: nowrap; }
.cal-popup-stat { font-size: 0.7rem; color: #6c757d; white-space: nowrap; }
.cal-popup-note {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  font-size: 0.7rem;
  color: #6c757d;
  white-space: nowrap;
}
.cal-popup-note-img { height: 20px; width: auto; }

.cal-weight {
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.cal-bar {
  margin-top: auto;
  height: 16px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
}

.cal-cycleday {
  background: #fff;
  color: #495057;
  font-size: 0.6rem;
  font-weight: 600;
  line-height: 1;
  padding: 1px 3px;
  margin-left: 2px;
  border-radius: 4px;
}

.cal-legend-bar {
  height: 16px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: linear-gradient(to right,
    #ffffff, #e6aaaa 39%, #c8a5d7 50%, #a5bee6 61%, #ffffff);
}
