.routine-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
}
.routine-form {
  display: grid;
  gap: 16px;
}
.routine-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.routine-days,
.routine-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px;
}
.routine-days label {
  position: relative;
}
.routine-days input {
  position: absolute;
  opacity: 0;
}
.routine-days span {
  display: grid;
  place-items: center;
  min-height: 39px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff05;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
  transition: 0.22s;
}
.routine-days input:checked + span {
  border-color: #8d7cf4;
  background: #8d7cf42b;
  color: #fff;
  box-shadow: 0 0 0 3px #8d7cf412;
}
.routine-form-actions {
  display: flex;
  gap: 9px;
  justify-content: flex-end;
}
.routine-day {
  min-height: 80px;
  padding: 9px 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff04;
  text-align: center;
}
.routine-day.today {
  border-color: #8d7cf4;
  background: #8d7cf41b;
}
.routine-day b,
.routine-day small {
  display: block;
}
.routine-day small {
  color: var(--muted);
}
.routine-day i {
  display: block;
  width: 7px;
  height: 7px;
  margin: 7px auto 0;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 10px #61d5cd;
}
.routine-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.routine-row:last-child {
  border-bottom: 0;
}
.routine-time {
  display: grid;
  place-items: center;
  min-width: 68px;
  padding: 9px;
  border-radius: 11px;
  background: #8d7cf41b;
  color: #ddd8ff;
  font-weight: 900;
}
.routine-row b,
.routine-row small {
  display: block;
}
.routine-row small {
  color: var(--muted);
}
.routine-row-actions {
  display: flex;
  gap: 6px;
}
.routine-row-actions button {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff06;
  color: #ddd9ff;
}
.routine-row.disabled {
  opacity: 0.55;
}
.home-routine-list {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}
.home-routine-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff05;
}
.home-routine-item b,
.home-routine-item small {
  display: block;
}
.home-routine-item small {
  color: var(--muted);
}
@media (max-width: 900px) {
  .routine-layout {
    grid-template-columns: 1fr;
  }
  .routine-form-grid {
    grid-template-columns: 1fr;
  }
  .routine-days {
    gap: 4px;
  }
  .routine-days span {
    min-height: 36px;
    font-size: 10px;
  }
}
@media (max-width: 520px) {
  .routine-row {
    grid-template-columns: 1fr;
  }
  .routine-time {
    justify-self: start;
  }
  .routine-row-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  .routine-row-actions button {
    flex: 1;
  }
}
