.announcement {
  text-align: center;
  background-color: #fff;
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: var(--box-shadow);
}

.main-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000000a8;
  z-index: 1;
  display: none;
}

.modal.show {
  display: block;
}

.modal .modal-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: white;
  max-width: 1440px;
  width: calc(100% - 4rem);
  max-height: calc(100% - 4rem);
  overflow: auto;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 2rem;
  border-radius: 1rem;
}

#modal-title {
  font-size: 1.6rem;
  font-weight: bold;
}

.label-tag select {
  grid-column-start: 1;
  grid-row-start: 2;
}

.label-tag button {
  grid-row-start: 2;
}

.label-tag {
  display: grid;
  grid-template-columns: 1fr 100px;
  gap: 0 1.5rem;
}

.modal-actions {
  display: flex;
  gap: 1.5rem
}

.modal-actions button {
  width: 100%;
  font-weight: bold;
}

.modal-actions .ok {
  background-color: var(--green);
}

.modal-actions .ok:hover {
  background-color: var(--green-hover);
}

.modal-actions .cancel {
  background-color: var(--red);
}

.modal-actions .cancel:hover {
  background-color: var(--red-hover);
}

#save-data-btn {
  display: none !important;
}

.main.wrap,
#data-container,
.year {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.year>.title {
  font-size: 1.6rem;
  font-weight: 800;
}

.month {
  background-color: #fff;
  box-shadow: var(--box-shadow);
  border-radius: .5rem;
  overflow: hidden;
}

.month>.title {
  font-size: 1.3rem;
  font-weight: 600;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #eee;
  background-color: var(--blue);
  color: #fff;
  position: relative;
  cursor: pointer;
  transition: .2s;
}

.month>.title:hover {
  background-color: var(--blue-hover);
}

.month>.title::after {
  content: '';
  background: url(../icon/arrow-down.png) no-repeat center center;
  position: absolute;
  width: 35px;
  height: 100%;
  scale: 0.6;
  filter: invert(1);
  display: block;
  top: 0;
  right: 1rem;
}

.month:has(> .month-container[data-collapsed='true']) .title::after {
  transform: rotate(180deg);
}

.month .month-container {
  overflow: hidden;
  transition: .2s;
}

.month .total {
  border-top: 2px solid #eee;
  transition: .2s;
}

.month .month-container[data-collapsed='true']+.total {
  border-top: unset;
  grid-template-columns: 1fr 1fr 1fr;
}

.month .month-container[data-collapsed='true']+.total .date {
  display: none;
}

.month .day:nth-child(n+2) thead {
  display: none;
}

.day {
  width: 100%;
}

.day thead {
  background-color: #f0f0f0;
}

.day tr {
  display: grid;
  grid-template-columns: 100px 1fr 200px 200px 200px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.day tbody tr:nth-child(odd) {
  background-color: #f9f9f9bd;
  transition: .2s;
}

.day tbody tr:hover {
  background-color: #f0f0f0;
}

.day th {
  padding: .5rem 0;
  border-bottom: 1px solid #eee;
}

.day td {
  padding: .5rem 1rem;
  border-bottom: 1px solid #eee;
  align-items: center;
  display: flex;
}

.day .date,
.day .category,
.day .type,
.day .amount {
  justify-content: center;
}

.day .category {
  display: flex;
  justify-content: center;
}

.day .category span {
  color: #fff;
  padding: 0.3rem 0.5rem;
  border-radius: 0.5rem;
  font-size: .9rem;
}

.day .type {
  text-transform: capitalize;
}

.day .actions {
  padding: 0;
  width: 36px;
  height: 100%;
  position: absolute;
  right: -36px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  transition: .2s;
}

.day tr:hover .actions {
  right: 0;
}

.day .actions div {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: .2s;
  border-radius: 0.5rem;
  cursor: pointer;
}

.day .actions div:hover {
  background-color: firebrick;
}

.day .actions div img {
  width: 20px;
  height: 20px;
  transition: .2s;
}

.day .actions div:hover img {
  filter: brightness(0) invert(1);
}

.total {
  padding: 1rem 0;
  display: grid;
  grid-template-columns: 1fr 200px 200px 200px;
  text-align: center;
}

.total>span {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.total .date {
  font-weight: bold;
}

.total .title {
  font-weight: bold;
  font-size: .8rem;
}

.total .amount {
  font-weight: bold;
  font-size: 1.2rem;
}

.total .income .amount {
  color: var(--green);
}

.total .expense .amount {
  color: var(--red);
}

.total .balance .amount {
  color: var(--blue);
}

#data-container>.total,
.year>.total {
  background-color: #fff;
  box-shadow: var(--box-shadow);
  border-radius: .5rem;
}