:root {
  --screen-black: #101114;
  --panel-white: #f4f4f4;
  --soft-grey: #d7d7d7;
  --text-black: #070707;
  --accent-green: #24b47e;
  --user-screen-black: #101114;
  --user-panel-white: #f7f7f7;
  --user-grey: #777777;
  --user-dark-grey: #2d2d2d;
  --user-blue: #38a7f2;
}

* {
  box-sizing: border-box;
}

body {
  align-items: center;
  background: #ffffff;
  display: flex;
  font-family: Arial, Helvetica, sans-serif;
  justify-content: center;
  margin: 0;
  min-height: 100vh;
}

.admin-calendar-screen {
  background: var(--screen-black);
  border: 10px solid #2f3335;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
  color: var(--panel-white);
  height: 620px;
  overflow: hidden;
  padding: 10px;
  position: relative;
  width: 320px;
}

.menu-button {
  background: transparent;
  border: 0;
  color: var(--panel-white);
  cursor: pointer;
  font-size: 24px;
  font-weight: 900;
  left: 10px;
  position: absolute;
  top: 8px;
}

.date-header {
  align-items: center;
  display: flex;
  flex-direction: column;
  font-weight: 900;
  line-height: 0.85;
  margin: 4px 0 8px;
  text-align: center;
}

.date-header strong {
  font-size: 74px;
}

.date-header span {
  font-size: 38px;
}

.task-dropdown,
.task-panel {
  background: var(--panel-white);
  border: 2px solid #c9c9c9;
  color: var(--text-black);
  width: 100%;
}

.task-dropdown {
  align-items: center;
  cursor: pointer;
  display: flex;
  font-size: 14px;
  font-weight: 900;
  justify-content: space-between;
  min-height: 28px;
  padding: 2px 4px;
  text-align: left;
}

.task-dropdown__arrow {
  font-size: 24px;
  line-height: 1;
}

.task-panel {
  margin-bottom: 8px;
}

.task-dropdown--open {
  border: 0;
  border-bottom: 2px solid #d0d0d0;
}

.task-card__title {
  align-items: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: flex;
  font-size: 14px;
  font-weight: 900;
  justify-content: space-between;
  padding: 4px;
  width: 100%;
}

.task-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.task-card li {
  align-items: center;
  display: flex;
  font-size: 18px;
  font-weight: 700;
  justify-content: space-between;
  padding: 4px;
}

.task-check {
  background: #eeeeee;
  border: 2px solid #676767;
  cursor: pointer;
  height: 28px;
  width: 28px;
}

.calendar-scroll {
  height: 290px;
  margin-top: 8px;
  overflow-y: scroll;
  padding-right: 8px;
  scrollbar-color: var(--panel-white) #2a2a2a;
  scrollbar-width: thin;
}

.calendar-scroll::-webkit-scrollbar {
  width: 10px;
}

.calendar-scroll::-webkit-scrollbar-track {
  background: #2a2a2a;
}

.calendar-scroll::-webkit-scrollbar-thumb {
  background: var(--panel-white);
  border-radius: 999px;
}

.calendar-month {
  min-height: 290px;
  padding: 4px 0 16px;
}

.calendar-month h2 {
  font-size: 20px;
  font-weight: 900;
  margin: 0 0 8px;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
}

.calendar-weekdays {
  color: #8f8f8f;
  font-size: 12px;
  margin-bottom: 4px;
}

.calendar-day {
  background: transparent;
  border: 0;
  color: var(--panel-white);
  font-size: 18px;
  min-height: 28px;
}

.calendar-day--empty {
  display: block;
}

.add-task {
  align-items: center;
  background: var(--panel-white);
  border: 3px solid var(--screen-black);
  border-radius: 50%;
  bottom: 16px;
  color: var(--text-black);
  cursor: pointer;
  display: flex;
  font-size: 34px;
  font-weight: 900;
  height: 48px;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: 14px;
  width: 48px;
}

/* Elderly user homepage */

.elderly-home-screen {
  background: var(--user-screen-black);
  /*border-radius: 18px;*/
  color: var(--user-panel-white);
  /* height: 620px; */
  overflow: hidden;
  padding: 8px;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  /* width: 320px;*/ 
}

.elderly-clock {
  color: #cfcfcf;
  font-size: 16px;
  margin: 0 0 4px;
  text-align: center;
}

.elderly-date-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 42px 1fr 42px;
}

.day-arrow {
  align-items: center;
  background: #7f7f7f;
  border: 0;
  border-radius: 50%;
  color: var(--user-panel-white);
  cursor: pointer;
  display: flex;
  font-size: 34px;
  font-weight: 900;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.elderly-date {
  display: flex;
  flex-direction: column;
  font-weight: 900;
  line-height: 0.86;
  text-align: center;
}

.elderly-date strong {
  font-size: 82px;
}

.elderly-date span {
  font-size: 40px;
}

.user-task-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: auto;
  margin-top: 16px;
  overflow-y: auto;
  padding-right: 4px;
}

.user-task {
  background: var(--user-panel-white);
  border: 3px solid #dddddd;
  border-radius: 14px;
  color: #020202;
  overflow: hidden;
}

.user-task--finished {
  background: #1e1e1e;
  border-color: #3b3b3b;
  color: #5d5d5d;
  order: 10;
}

.user-task__header {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: flex;
  font-size: 21px;
  font-weight: 900;
  justify-content: space-between;
  padding: 6px 10px 0;
  text-align: left;
  width: 100%;
}

.user-task__arrow {
  font-size: 30px;
  line-height: 1;
}

.user-task__summary {
  font-size: 21px;
  font-weight: 700;
  padding: 0 10px 8px;
}

.user-task__body {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 78px;
  padding: 0 10px 8px;
}

.user-task__details {
  font-size: 21px;
  line-height: 1.35;
}

.account-photo {
  align-items: center;
  align-self: start;
  background: var(--user-blue);
  border-radius: 50%;
  display: flex;
  font-size: 15px;
  height: 78px;
  justify-content: center;
  line-height: 1.1;
  text-align: center;
  white-space: pre-line;
  width: 78px;
}

.finish-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  grid-column: 1 / -1;
}

.finish-row {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr auto;
}

.finish-row span {
  background: var(--user-grey);
  border-radius: 8px;
  color: #ffffff;
  font-size: 18px;
  padding: 3px 6px;
}

.finish-button {
  background: var(--user-panel-white);
  border: 0;
  border-radius: 999px;
  color: #1e1e1e;
  cursor: pointer;
  font-size: 17px;
  font-weight: 900;
  padding: 4px 10px;
}

.finish-button--finished {
  background: #4b4b4b;
  color: #ffffff;
}

.menu-overlay {
  inset: 0;
  position: absolute;
  z-index: 10;
}

.side-panel {
  background: #111214;
  color: var(--panel-white);
  height: 100%;
  left: 0;
  padding: 14px 12px;
  position: absolute;
  top: 0;
  width: 210px;
  z-index: 12;
}

.side-panel--settings {
  padding-top: 54px;
}

.menu-backdrop {
  background: rgba(175, 175, 175, 0.68);
  border: 0;
  cursor: pointer;
  height: 100%;
  position: absolute;
  right: 0;
  top: 0;
  width: calc(100% - 210px);
  z-index: 11;
}

.settings-cog,
.menu-button--inside {
  background: transparent;
  border: 0;
  color: var(--panel-white);
  cursor: pointer;
  font-size: 28px;
  font-weight: 900;
  left: 10px;
  position: absolute;
  top: 8px;
}

.menu-links {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 42px;
}

.menu-links button {
  background: transparent;
  border: 0;
  color: var(--panel-white);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  padding: 0;
  text-align: left;
}

.side-panel h2 {
  font-size: 13px;
  margin: 14px 0 5px;
}

.account-select,
.admin-account {
  align-items: center;
  background: var(--panel-white);
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  color: var(--text-black);
  display: grid;
  font-size: 13px;
  font-weight: 900;
  gap: 5px;
  grid-template-columns: 22px 1fr 18px;
  min-height: 28px;
  padding: 3px 5px;
  width: 100%;
}

.account-select {
  cursor: pointer;
}

.admin-account {
  background: transparent;
  border: 0;
  color: var(--panel-white);
  grid-template-columns: 22px 1fr;
  padding-left: 0;
}

.account-avatar {
  align-items: center;
  background: #39a8f2;
  border-radius: 50%;
  color: #cfefff;
  display: inline-flex;
  height: 22px;
  justify-content: center;
  width: 22px;
}

.account-calendar {
  background: var(--panel-white);
  color: var(--text-black);
  margin-top: 4px;
  min-height: 190px;
  padding: 5px;
}

.account-calendar h2 {
  color: var(--text-black);
  font-size: 10px;
  margin: 4px 0 2px;
}

.calendar-row,
.recent-task {
  align-items: center;
  display: grid;
  font-size: 10px;
  gap: 4px;
  grid-template-columns: 1fr auto auto;
  min-height: 22px;
}

.calendar-remove,
.calendar-show {
  border: 1px solid #b8b8b8;
  border-radius: 999px;
  cursor: pointer;
  font-size: 8px;
  font-weight: 900;
  padding: 3px 4px;
}

.calendar-remove {
  background: #ed2e38;
  color: #ffffff;
}

.calendar-show {
  background: #ffffff;
  color: var(--text-black);
}

.recent-task {
  background: #dcdcdc;
  grid-template-columns: 1fr auto;
  margin-top: 18px;
}

.recent-task__check {
  align-items: center;
  background: #1f9c73;
  color: #ffffff;
  display: inline-flex;
  font-weight: 900;
  height: 20px;
  justify-content: center;
  width: 42px;
}

.setting-row {
  align-items: center;
  display: grid;
  font-size: 13px;
  font-weight: 900;
  gap: 8px;
  grid-template-columns: auto 1fr 28px;
  margin-bottom: 20px;
}

.setting-row input {
  accent-color: var(--panel-white);
  width: 100%;
}

.setting-row output {
  border: 1px solid var(--panel-white);
  font-size: 11px;
  padding: 1px 3px;
  text-align: center;
}

.theme-picker {
  border: 0;
  margin: 0 0 18px;
  padding: 0;
}

.theme-picker legend {
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 8px;
}

.theme-dot {
  border: 2px solid var(--panel-white);
  border-radius: 50%;
  cursor: pointer;
  height: 34px;
  margin-right: 12px;
  width: 34px;
}

.theme-dot--white {
  background: #ffffff;
}

.theme-dot--blue {
  background: #117fe6;
}

.theme-dot--orange {
  background: #ff9140;
}

.create-account,
.search-accounts {
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  display: block;
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 10px;
  min-height: 34px;
  width: 100%;
}

.create-account {
  background: var(--accent-green);
  color: var(--text-black);
}

.search-accounts {
  background: var(--panel-white);
  color: var(--text-black);
}

/*
 * The admin view starts as a phone-first interface.  These rules only apply
 * once there is a desktop-sized viewport, leaving the existing mobile layout
 * exactly as it is.
 */
@media (min-width: 768px) {
  body {
    padding: 0;
  }

  .admin-calendar-screen {
    border-width: 12px;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: clamp(18px, 2.4vw, 30px);
    width: 100vw;
  }

  .menu-button {
    font-size: 32px;
    left: clamp(18px, 2.4vw, 30px);
    top: clamp(14px, 2vw, 24px);
  }

  .date-header {
    margin: 0 0 16px;
  }

  .date-header strong {
    font-size: clamp(80px, 9vw, 116px);
  }

  .date-header span {
    font-size: clamp(40px, 4.5vw, 58px);
  }

  .task-dropdown,
  .task-card__title {
    font-size: 16px;
  }

  .task-card li {
    font-size: 20px;
  }

  .calendar-scroll {
    flex: 1;
    height: auto;
    min-height: 0;
    margin-top: 14px;
    padding-right: 14px;
  }

  .calendar-month {
    min-height: 0;
    padding-bottom: 28px;
  }

  .calendar-month h2 {
    font-size: 26px;
    margin-bottom: 12px;
  }

  .calendar-weekdays {
    font-size: 14px;
    margin-bottom: 8px;
  }

  .calendar-day {
    font-size: clamp(20px, 2vw, 28px);
    min-height: clamp(34px, 4.2vh, 46px);
  }

  .add-task {
    bottom: clamp(22px, 3vw, 36px);
    height: 58px;
    right: clamp(22px, 3vw, 36px);
    width: 58px;
  }

  .side-panel {
    padding: 24px;
    width: min(360px, 38%);
  }

  .side-panel--settings {
    padding-top: 70px;
  }

  .menu-backdrop {
    width: max(0px, calc(100% - min(360px, 38%)));
  }

  .settings-cog,
  .menu-button--inside {
    font-size: 32px;
    left: 24px;
    top: 18px;
  }

  .menu-links button,
  .side-panel h2,
  .account-select,
  .admin-account,
  .setting-row,
  .theme-picker legend,
  .create-account,
  .search-accounts {
    font-size: 16px;
  }
}
