.calendar-frame {
  border: 2px solid var(--primary);
  border-radius: 14px;
  padding: .5rem;
  box-shadow: 0 2px 10px var(--card-shadow);
}

.month-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: .25rem 0 .5rem;
  font-size: 1.1rem;
}

.month-title .saldo {
  font-weight: 800;
}

.controls.topbar .topbar-row.action-row {
  gap: .65rem;
  align-items: center;
  flex-wrap: nowrap;
}

.controls.topbar .topbar-row.action-row .topbar-quick-actions {
  flex: 1 1 auto;
  flex-wrap: nowrap;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: .55rem;
  margin-bottom: 1rem;
  font-size: 1rem;
  table-layout: fixed;
}

th,
td {
  border: none;
  padding: .35rem;
  text-align: center;
  vertical-align: top;
}

thead th {
  color: var(--dow-label);
  font-weight: 600;
  letter-spacing: .02em;
  background: transparent;
  padding-bottom: .25rem;
}

thead th.week-index-head,
thead th.week-balance-head {
  color: var(--fg);
  font-weight: 700;
}

.week-index,
.week-balance,
.week-index-head,
.week-balance-head {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.week-index,
.week-balance {
  color: var(--fg);
  font-weight: 600;
  padding-inline: .25rem;
}

.week-balance {
  white-space: nowrap;
}

.calendar thead tr,
.yearly-table thead tr {
  position: relative;
}

.calendar thead tr::after,
.yearly-table thead tr::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--table-border);
  transform: translateY(.25rem);
}

.calendar-day {
  padding: 0;
  vertical-align: top;
  position: relative;
}

.glass-tile {
  position: relative;
  overflow: hidden;
  border-radius: var(--tile-border-radius);
  padding: .55rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  background: var(--tile-empty-gradient);
  border: 2px solid var(--tile-empty-border);
  color: var(--tile-empty-text);
  box-shadow: var(--glass-shadow);
  transition: transform .2s ease, box-shadow .2s ease, background .3s ease, border-color .3s ease, color .3s ease;
  min-height: 100%;
  width: 100%;
}

.day-top {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  min-height: 1.2rem;
}

.day-top-compact {
  min-height: 1rem;
}

.day-icon-group {
  display: inline-flex;
  gap: .25rem;
  align-items: center;
  min-height: 1rem;
}

.day-icon-group.top-icons {
  justify-content: center;
}

.day-icon-group.bottom-icons {
  justify-content: center;
  flex: 0;
  width: 100%;
}

.day-icon {
  font-size: calc(var(--month-icon-base-size) * var(--month-icon-scale));
  line-height: 1;
  opacity: .9;
}

.day-icon.compact {
  font-size: calc(var(--year-icon-base-size) * var(--year-icon-scale));
}

.day-number {
  font-weight: 700;
  font-size: var(--month-day-font-size);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 1.4rem;
  position: relative;
}

.day-number-compact {
  font-size: var(--year-day-font-size);
  min-height: 1.2rem;
}

.day-number-value {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.calendar-day.has-warning .day-number-value {
  opacity: 0;
}

.day-warning-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.day-warning-overlay .day-warning {
  pointer-events: auto;
}

.day-bottom {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: .25rem;
  width: 100%;
  min-height: 1.25rem;
}

.day-bottom-compact {
  min-height: 1.05rem;
  gap: .2rem;
}

.day-info {
  flex: 1;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: .82rem;
  text-align: center;
  line-height: 1.1;
}

.day-info.day-label {
  font-size: .75rem;
}

.day-info.not-recorded-text {
  font-size: var(--not-recorded-font-size);
  display: inline-flex;
}

.day-warning {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  color: var(--saldo-negative);
}

.day-warning-compact {
  font-size: .8rem;
}

