:root {
  --green: #8cc51f;
  --green-dark: #2ea443;
  --line-green: #81bd25;
  --blue-bg: #d7f1fb;
  --blue-line: #62b7dc;
  --pink-bg: #f8deea;
  --pink-line: #ec7ead;
  --text: #3b3b3b;
  --muted: #575757;
  --row-border: #a7a7a7;
  --ui-scale: 0.9;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: #ffffff;
  color: var(--text);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", "Meiryo", Arial, sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

button,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  overflow-x: hidden;
  transform: scale(var(--ui-scale));
  transform-origin: top left;
  width: 111.111111%;
  min-height: 111.111111vh;
}

.top-header {
  height: 89px;
  display: flex;
  align-items: flex-start;
  gap: 74px;
  border-bottom: 3px solid var(--line-green);
  padding: 18px 0 0 30px;
}

.brand {
  display: block;
  flex: 0 0 auto;
  width: 382px;
  line-height: 0;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 31px;
  padding-top: 15px;
}

.icon-control,
.image-button,
.menu-item {
  border: 0;
  background: transparent;
  padding: 0;
}

.icon-control {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
}

.icon-control img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.icon-control-logout {
  width: 38px;
  height: 42px;
  margin-left: 1px;
}

.user-control {
  width: 183px;
  height: 43px;
  border: 1px solid #65bd73;
  border-radius: 8px;
  background: #ffffff;
  color: #323232;
  font-size: 23px;
  line-height: 1;
  text-align: center;
}

.admin-layout {
  display: grid;
  grid-template-columns: 149px 628px minmax(360px, 1fr);
  column-gap: 13px;
  align-items: start;
  padding: 30px 70px 48px 45px;
}

.side-menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 5px;
}

.menu-item {
  display: block;
  width: 149px;
  line-height: 0;
  border-radius: 6px;
}

.menu-item:focus-visible,
.icon-control:focus-visible,
.image-button:focus-visible,
.user-control:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(46, 164, 67, 0.32);
  outline-offset: 3px;
}

.menu-item img {
  display: block;
  width: 149px;
  height: auto;
}

.dashboard-stack {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 628px;
}

.schedule-card,
.information-card,
.students-card {
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
}

.schedule-card {
  min-height: 307px;
  padding: 10px 25px 12px;
  border: 1px solid #7cb620;
  background: var(--green);
}

.schedule-heading {
  display: grid;
  grid-template-columns: 34px max-content 1fr;
  align-items: center;
  column-gap: 11px;
  min-height: 36px;
  color: #ffffff;
  font-weight: 700;
}

.schedule-heading img {
  display: block;
  width: 34px;
  height: 34px;
}

.today-date {
  font-size: 17px;
  white-space: nowrap;
}

.today-time {
  padding-left: 15px;
  font-size: 24px;
  white-space: nowrap;
}

.shift-list {
  margin-top: 9px;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.shift-row {
  min-height: 35px;
  display: grid;
  grid-template-columns: 142px 110px 1fr;
  align-items: center;
  padding: 0 14px;
  color: var(--muted);
  font-size: 16px;
}

.shift-row + .shift-row {
  border-top: 1px solid #9cd150;
}

.shift-row img {
  width: 42px;
  height: auto;
}

.shift-row .wide-badge {
  width: 171px;
}

.event-row {
  min-height: 35px;
  display: grid;
  grid-template-columns: 76px 67px 1fr;
  align-items: center;
  margin-top: 7px;
  padding: 0 14px;
  border-radius: 7px;
  background: #ffffff;
  color: var(--muted);
  font-size: 16px;
}

.tomorrow-button {
  display: block;
  width: 579px;
  margin-top: 10px;
  line-height: 0;
}

.tomorrow-button img {
  display: block;
  width: 100%;
  height: auto;
}

.information-card {
  min-height: 276px;
  padding: 10px 22px 14px;
  border: 1px solid var(--blue-line);
  background: var(--blue-bg);
}

.panel-heading {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 11px;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.panel-title img {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.panel-title h1,
.panel-title h2 {
  margin: 0;
  color: #332a2d;
  font-size: 25px;
  font-weight: 500;
  line-height: 1;
}

.panel-heading select {
  width: 171px;
  height: 32px;
  margin-left: 8px;
  border: 1px solid #a6a6a6;
  border-radius: 8px;
  background: #ffffff;
  color: #222222;
  font-size: 15px;
  padding: 0 12px;
}

.create-button {
  width: 101px;
  height: 32px;
  line-height: 0;
}

.create-button img {
  display: block;
  width: 100%;
  height: auto;
}

.pager {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-left: 2px;
}

.pager .image-button {
  width: 32px;
  height: 32px;
  line-height: 0;
}

.pager img {
  display: block;
  width: 100%;
  height: 100%;
}

.notice-list,
.student-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 5px;
}

.notice-row,
.student-row {
  min-height: 37px;
  display: grid;
  align-items: center;
  border: 1px solid var(--row-border);
  border-radius: 7px;
  background: #ffffff;
  color: var(--muted);
  font-size: 15px;
}

.notice-row {
  grid-template-columns: 76px 70px 1fr 26px;
  padding: 0 4px 0 14px;
}

.notice-row img {
  width: 23px;
  height: auto;
}

.notice-row span:nth-child(3) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.students-card {
  min-height: 276px;
  padding: 10px 22px 20px;
  border: 1px solid var(--pink-line);
  background: var(--pink-bg);
}

.students-heading {
  min-height: 39px;
}

.students-heading .panel-title img {
  width: 34px;
  height: 34px;
}

.students-heading .panel-title {
  gap: 9px;
}

.student-list {
  margin-top: 7px;
}

.student-row {
  grid-template-columns: 58px 116px 57px 116px 1fr;
  min-height: 36px;
  padding: 0 14px;
}

.student-row span:last-child {
  text-align: left;
}

.detail-panel {
  width: 100%;
  height: calc(100vh - 168px);
  min-height: 520px;
  margin-left: 4px;
  border: 1px solid #68bd73;
  border-radius: 18px;
  background: #ffffff;
}

@media (max-width: 1240px) {
  .top-header {
    height: auto;
    min-height: 89px;
    flex-wrap: wrap;
    gap: 20px 46px;
    padding-bottom: 12px;
  }

  .admin-layout {
    grid-template-columns: 150px minmax(0, 628px);
    gap: 24px 24px;
    padding-right: 30px;
  }

  .detail-panel {
    grid-column: 2;
    min-height: 420px;
    height: auto;
  }
}

@media (max-width: 840px) {
  .app-shell {
    overflow-x: hidden;
  }

  .top-header {
    align-items: center;
    padding: 14px 16px 12px;
  }

  .brand {
    width: min(100%, 320px);
  }

  .header-actions {
    display: grid;
    grid-template-columns: 48px 1fr 48px;
    width: 100%;
    max-width: 100%;
    justify-content: initial;
    gap: 12px;
    padding-top: 0;
  }

  .user-control {
    justify-self: center;
  }

  .admin-layout {
    display: block;
    padding: 18px 14px 32px;
  }

  .side-menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
    padding-top: 0;
  }

  .menu-item,
  .menu-item img {
    width: 100%;
    max-width: 149px;
  }

  .dashboard-stack {
    width: 100%;
    margin-top: 18px;
  }

  .schedule-card,
  .information-card,
  .students-card,
  .detail-panel {
    border-radius: 14px;
  }

  .schedule-card {
    padding: 13px 12px;
  }

  .schedule-heading {
    grid-template-columns: 34px 1fr;
  }

  .today-time {
    grid-column: 2;
    padding-left: 0;
    font-size: 22px;
  }

  .shift-row,
  .event-row,
  .notice-row,
  .student-row {
    grid-template-columns: 1fr;
    gap: 2px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .shift-row img,
  .shift-row .wide-badge,
  .notice-row img {
    width: auto;
    max-height: 24px;
  }

  .tomorrow-button {
    width: 100%;
  }

  .panel-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .panel-heading select {
    width: 148px;
    margin-left: 0;
  }

  .notice-row span:nth-child(3) {
    white-space: normal;
  }

  .detail-panel {
    min-height: 300px;
    margin-top: 18px;
  }
}
