:root {
  --navy: #1b2a5c;
  --navy-deep: #1b2a5c;
  --green: #7cbc42;
  --green-light: #d4d4b9;
  --olive-line: #aeb993;
  --table-border: #4e6c40;
  --body-grid: rgb(185, 191, 157);
  --row-hover: #c7e456;
  --panel-gray: #f2f2f2;
  --text: #222222;
  --blue: #164ddd;
  --red: #e3332c;
  --border: #aeb79c;
  --focus: #0069c2;
  font-family: Dotum, "돋움", sans-serif;
  font-size: 12px;
  color: var(--text);
  background: #e5e5e5;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100dvh;
  background: #d9d9d9;
  font-size: 12px;
}

input {
  font: inherit;
}

.ui-button,
.action-control {
  cursor: pointer;
  text-align: center;
}

span[role="button"]:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

span[role="button"]:active {
  transform: translateY(1px);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  width: min(1916px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  border: 1px solid #a8a8a8;
  background: #fff;
}

.sidebar {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  padding: 7px 7px 28px;
  border-right: 6px solid #c8c8c8;
  background: #fff;
}

.brand-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  margin: 6px 2px;
  border: 0;
  background: #fff;
}

.brand-title {
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.term-banner {
  display: grid;
  place-items: center;
  height: 60px;
  margin-top: 7px;
  color: #fff;
  background: var(--green);
  font-size: 12px;
  font-weight: 700;
  text-shadow: 0 1px rgb(255 255 255 / 35%);
}

.profile-table {
  width: 100%;
  margin-top: 4px;
  border-collapse: separate;
  border-spacing: 2px;
  table-layout: fixed;
  background: #fff;
  font-size: 12px;
}

.profile-table th,
.profile-table td {
  height: 27px;
  padding: 4px 6px;
  border: 0;
}

.profile-table th {
  width: 50%;
  background: var(--green);
  color: var(--navy);
  font-weight: 700;
  text-align: center;
}

.profile-table td {
  background: #fff;
  color: var(--text);
  line-height: 1.35;
}

.practice-stamp {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 12px 22px 0;
  padding: 9px 8px;
  border: 1px solid var(--green);
  background: #fff;
  color: var(--text);
  text-align: center;
}

.practice-stamp span {
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
}

.side-actions {
  display: grid;
  gap: 10px;
  margin: 26px 22px 0;
}

.side-actions .side-action {
  display: grid;
  place-items: center;
  min-height: 27px;
  border: 1px solid #c8c8c8;
  color: #fff;
  background: var(--navy);
  font-family: Geneva, sans-serif;
  font-weight: 700;
  box-shadow: 0 1px 2px rgb(0 0 0 / 12%);
}

.side-actions .english {
  color: #111;
  background: #d1d1d1;
}

.main-content {
  min-width: 0;
  padding: 8px 12px 72px;
  background: #fff;
}

.top-bar-shell {
  margin: -8px -12px 0;
  padding: 8px 12px 13px;
  border-bottom: 1px solid #dedede;
  background: var(--panel-gray);
}

.top-nav {
  display: flex;
  align-items: stretch;
  height: 41px;
  background: var(--navy);
  font-family: "Nanum Gothic", "나눔고딕", sans-serif;
}

.top-nav a,
.top-nav .nav-logout {
  display: grid;
  place-items: center;
  min-width: 110px;
  padding: 0 20px;
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  text-shadow: 1px 1px 0.6px rgb(0 0 0 / 70%);
  white-space: nowrap;
}

.top-nav a:nth-child(3) {
  min-width: 245px;
}

.top-nav a:hover,
.top-nav .nav-logout:hover {
  background: #072a60;
  box-shadow: none;
}

.top-nav .active {
  border: 0;
  color: #fff;
  background: var(--green);
  box-shadow: none;
}

.top-nav .active:hover {
  background: #072a60;
  box-shadow: none;
}

.nav-accent {
  height: 10px;
  background: var(--green);
}

.control-bar {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px 16px;
  padding: 12px 11px 9px;
  border-top: 1px solid #fff;
  background: #fff;
  font-family: "Trebuchet MS", Arial, sans-serif;
}

.search-mode {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #000;
  white-space: nowrap;
}

.search-mode strong {
  color: var(--red);
}

.radio {
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: -4px;
  border: 1px solid #777;
  border-radius: 50%;
  background: #fff;
}

.radio.selected {
  border-color: #487bff;
  box-shadow: inset 0 0 0 3px #fff;
  background: #487bff;
}

.course-form {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.course-form .course-label,
.rate-label {
  color: #0000FF;
  font-weight: 700;
  white-space: nowrap;
}

.course-form input {
  height: 25px;
  border: 1px solid var(--body-grid);
  border-radius: 0;
  background: #fbfce4;
  padding: 2px 5px;
  box-shadow: none;
}

#course-name {
  width: min(270px, 28vw);
}

#applicants,
#capacity {
  width: 69px;
  text-align: center;
}

.slash {
  font-size: 12px;
  font-weight: 700;
}

.legacy-button,
.timer-button,
.action-control {
  display: inline-grid;
  place-items: center;
  border: 1px solid #aaa;
  border-radius: 2px;
  background: #cccccc;
  color: #000;
  font-weight: 700;
  box-shadow: none;
  text-align: center;
  user-select: none;
  transition: background-color 100ms ease, color 100ms ease;
}

.legacy-button {
  min-height: 27px;
  padding: 0 9px;
  white-space: nowrap;
}

.timer-panel {
  grid-row: 2 / span 2;
  grid-column: 2;
  display: grid;
  grid-template-columns: max-content 116px max-content 72px 86px;
  align-items: center;
  gap: 7px;
  padding: 4px 7px;
  border: 1px solid #b7b7b7;
  background: #f8f8f8;
  font-family: Pretendard, "Pretendard Variable", sans-serif;
}

.millisecond-option {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
}

.millisecond-option input {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: var(--navy);
}

.timer-label {
  color: var(--text);
  font-weight: 700;
}

.timer-display {
  display: block;
  width: 116px;
  min-width: 116px;
  color: var(--navy);
  font-family: inherit;
  font-size: 21px;
  font-weight: 800;
  font-feature-settings: "tnum" 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  text-align: center;
  white-space: nowrap;
}

.timer-display.with-milliseconds {
  width: 116px;
  min-width: 116px;
}

.timer-display.ready {
  color: var(--red);
  animation: ready-pulse 900ms ease-in-out 2;
}

@keyframes ready-pulse {
  50% { background: #fff4a8; }
}

.timer-button {
  min-height: 30px;
  padding: 0 16px;
  white-space: nowrap;
}

.timer-button.start,
.timer-button.restart {
  color: #000;
  background: #cccccc;
}

.timer-button.start {
  min-width: 72px;
}

.timer-button.restart {
  min-width: 86px;
}

.timer-button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.54;
}

.form-error {
  grid-column: 1;
  min-height: 16px;
  margin: 0;
  color: var(--red);
  font-weight: 700;
}

.notices {
  padding: 1px 12px 7px;
  font-family: "Trebuchet MS", Arial, sans-serif;
}

.notices p {
  margin: 2px 0;
  color: var(--blue);
  line-height: 1.35;
}

.notices p span {
  color: #000;
}

.notices .warning {
  color: var(--red);
}

.data-panel {
  margin: 0 5px 34px;
  border-radius: 5px 5px 0 0;
  overflow: hidden;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 34px;
  padding: 0 7px;
  color: #fff;
  font-family: "Lucida Grande", sans-serif;
}

.panel-title h2 {
  margin: 0;
  font-size: 12px;
}

.panel-title span {
  font-size: 12px;
  font-weight: 700;
}

.green-title {
  color: #fff;
  background: var(--green);
}

.navy-title {
  background: var(--navy);
}

.table-scroll {
  max-width: 100%;
  overflow-x: hidden;
  border: 1px solid var(--table-border);
  border-top: 0;
}

.data-table {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  color: var(--text);
  background: #fff;
  font-size: 12px;
}

.data-table th,
.data-table td {
  height: 22px;
  padding: 0 2px;
  text-align: center;
  vertical-align: middle;
  line-height: 1.15;
  overflow: hidden;
}

.data-table thead th {
  height: 22px;
  padding: 0 2px;
  overflow: hidden;
  white-space: nowrap;
  border: 1px solid var(--table-border);
  border-top: 0;
  border-bottom: 0;
  border-left: 0;
  background: #d4d4b9;
  color: #30390c;
  font-weight: bold;
  text-align: center;
}

.data-table tbody tr {
  border-color: var(--body-grid);
}

.data-table tbody td {
  height: auto;
  padding: 0;
  overflow: hidden;
  border-right-width: 1px;
  border-right-color: inherit;
  border-right-style: solid;
  border-bottom-width: 1px;
  border-bottom-color: inherit;
  border-bottom-style: solid;
  color: var(--text);
  font-weight: normal;
  word-wrap: break-word;
  white-space: pre-wrap;
  vertical-align: middle;
}

.data-table th:last-child,
.data-table td:last-child {
  border-right: 0;
}

.history-table td {
  color: #30309C;
}

.basket-table tbody td {
  padding: 0;
  line-height: 1;
  white-space: normal;
}

.basket-table tbody td:nth-child(4),
.history-table tbody td:nth-child(6) {
  text-align: left;
}

.data-table tbody tr:nth-child(even):not(.empty-row) {
  background: #f8f8f8;
}

.data-table.basket-table tbody tr.success-row {
  background: #fff;
}

.data-table tbody tr:hover:not(.empty-row) {
  background: var(--row-hover);
}

.data-table .utility-col {
  width: 12%;
}

.data-table .expand-col {
  width: 1.5%;
}

.data-table .index-col {
  width: 2.5%;
}

.basket-table th:nth-child(2) { width: 5%; }
.basket-table th:nth-child(3) { width: 7%; }
.basket-table th:nth-child(4) { width: 11%; }
.basket-table th:nth-child(5) { width: 4%; }
.basket-table th:nth-child(6),
.basket-table th:nth-child(7) { width: 3%; }
.basket-table th:nth-child(8) { width: 6%; }
.basket-table th:nth-child(9),
.basket-table th:nth-child(10),
.basket-table th:nth-child(11) { width: 6%; }
.basket-table th:nth-child(12) { width: 3.5%; }
.basket-table th:nth-child(13) { width: 5.5%; }
.basket-table th:nth-child(14) { width: 12%; }
.basket-table th:nth-child(15) { width: 8.5%; }

.history-table {
  min-width: 0;
  max-width: 100%;
  background: #fff;
}

.history-panel,
.history-panel .table-scroll,
.history-table tbody tr,
.history-table tbody tr:nth-child(even):not(.empty-row),
.history-table .empty-row td {
  background: #fff;
}

.history-table tbody tr:hover:not(.empty-row) {
  background: var(--row-hover);
}

.history-table th:nth-child(1) { width: 2.5%; }
.history-table th:nth-child(2),
.history-table th:nth-child(3) { width: 5.5%; }
.history-table th:nth-child(4) { width: 8%; }
.history-table th:nth-child(5) { width: 5%; }
.history-table th:nth-child(6) { width: 12%; }
.history-table th:nth-child(7) { width: 3.5%; }
.history-table th:nth-child(8) { width: 5.5%; }
.history-table th:nth-child(9),
.history-table th:nth-child(10) { width: 5%; }
.history-table th:nth-child(11) { width: 13%; }
.history-table th:nth-child(12) { width: 9%; }
.history-table th:nth-child(13),
.history-table th:nth-child(14) { width: 5%; }
.history-table th:nth-child(15) { width: 5.5%; }
.history-table th:nth-child(16) { width: 5%; }

.empty-row td {
  height: 76px;
  color: var(--text);
  background: #fafbf7;
  text-align: center;
}

.history-table .empty-row td {
  color: #30309C;
}

.action-control {
  min-height: 24px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.apply-control {
  min-width: 42px;
}

.remove-control {
  min-width: 42px;
  padding: 0 5px;
}

.edit-control {
  min-width: 34px;
  padding: 0 4px;
}

.row-actions {
  text-align: right;
  white-space: nowrap;
}

.row-plus {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 24px;
  color: #487bff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.row-action-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  width: 100%;
}

.order-control {
  flex: 0 0 20px;
  width: 20px;
  height: 24px;
  padding: 0;
}

.order-control svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-width: 1.5;
}

.ui-button:hover:not([aria-disabled="true"]),
.action-control:hover:not([aria-disabled="true"]),
.apply-control:hover:not([aria-disabled="true"]),
.apply-control:focus-visible {
  border-color: #072a60;
  background: #072a60;
  color: #fff;
  box-shadow: none;
}

.action-control:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.action-control[aria-disabled="true"] {
  cursor: default;
  opacity: 0.62;
  pointer-events: none;
}

.table-edit-input {
  height: 24px;
  padding: 0 2px;
  border: 1px solid #7f886d;
  border-radius: 0;
  background: #fbfce4;
  color: var(--text);
  font: inherit;
  text-align: center;
}

.table-edit-input:focus {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

.course-edit-name {
  width: 100%;
  text-align: left;
}

.ratio-edit-fields {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.ratio-edit-input {
  width: 38px;
}

.complete-text {
  color: var(--red);
}

.history-table td.confirmed-text {
  color: #0000FF;
}

.ratio-cell {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ratio-cell small {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 12px;
}

dialog {
  padding: 0;
}

dialog::backdrop {
  background: rgb(5 18 45 / 18%);
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
}

.legacy-dialog {
  width: min(392px, calc(100vw - 24px));
  border: 1px solid #aaa;
  border-radius: 5px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 9px 30px rgb(20 37 70 / 24%);
}

.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 35px;
  padding: 0 8px;
  color: #fff;
  background: var(--green);
  font-size: 12px;
}

.dialog-x {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.dialog-body {
  min-height: 120px;
  padding: 14px 12px;
  font-size: 12px;
}

.dialog-body p {
  margin: 0 0 16px;
  line-height: 1.5;
}

.dialog-footer {
  display: flex;
  justify-content: flex-end;
  padding: 11px 15px;
  border-top: 1px solid var(--green);
  background: #fbfbfb;
}

.close-button {
  display: inline-grid;
  place-items: center;
  min-width: 63px;
  min-height: 31px;
  border: 1px solid var(--green);
  border-radius: 5px;
  background: var(--green);
  color: var(--text);
  font-family: Dotum, "돋움", sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.result-copy strong {
  color: var(--navy);
}

.result-copy .result-success {
  color: var(--green);
  font-weight: 700;
}

.result-copy .result-failure {
  color: #c42c26;
  font-weight: 700;
}

.waiting-dialog {
  width: min(330px, calc(100vw - 24px));
  border: 1px solid #a7cce6;
  border-radius: 5px;
  overflow: hidden;
  background: #d9effe;
  box-shadow: 0 14px 50px rgb(20 62 112 / 35%);
}

.waiting-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 416px;
  padding: 32px 28px 23px;
  color: var(--text);
  text-align: center;
}

.waiting-kicker {
  margin: 0 0 30px;
  color: var(--text);
  font-size: 12px;
}

.waiting-inner h2 {
  margin: 0 0 30px;
  color: var(--green);
  font-size: 12px;
}

.queue-label,
.wait-label {
  color: var(--text);
  font-size: 12px;
}

.queue-number {
  margin-top: 9px;
  color: var(--navy);
  font-size: 30px;
  letter-spacing: 0.02em;
}

.progress-track {
  width: 100%;
  height: 12px;
  margin: 26px 0 25px;
  overflow: hidden;
  border-radius: 12px;
  background: #cee7f8;
}

.progress-track span {
  display: block;
  width: 55%;
  height: 100%;
  border-radius: inherit;
  background: #9bd3f4;
  animation: waiting-progress 1.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes waiting-progress {
  from { width: 8%; }
  to { width: 96%; }
}

.wait-time {
  margin: 10px 0 30px;
  color: var(--text);
  font-size: 12px;
}

.waiting-inner > p:last-child {
  margin: auto 0 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.55;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 980px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    min-height: auto;
    padding-bottom: 9px;
    border-right: 0;
    border-bottom: 5px solid #c8c8c8;
  }

  .brand-panel {
    width: 220px;
    margin: 5px auto;
  }

  .term-banner {
    height: 40px;
  }

  .profile-table,
  .side-actions {
    display: none;
  }

  .practice-stamp {
    width: min(520px, calc(100% - 24px));
    margin: 8px auto 0;
  }

  .main-content {
    padding-inline: 7px;
  }

  .top-bar-shell {
    margin-inline: -7px;
    padding-inline: 7px;
  }

  .control-bar {
    grid-template-columns: 1fr;
  }

  .timer-panel {
    grid-row: auto;
    grid-column: 1;
    justify-content: start;
  }

  .search-mode {
    overflow: hidden;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 12px;
  }

  .main-content {
    padding-inline: 0;
  }

  .top-bar-shell {
    margin-inline: 0;
    padding-inline: 0;
  }

  .top-nav {
    overflow-x: auto;
  }

  .top-nav a,
  .top-nav .nav-logout {
    min-width: max-content;
    padding: 0 15px;
  }

  .control-bar {
    padding-inline: 8px;
  }

  .course-form {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  }

  #course-name {
    width: 100%;
  }

  .rate-label {
    grid-column: 1;
  }

  #applicants,
  #capacity {
    width: 100%;
  }

  .add-button {
    grid-column: 5;
    grid-row: 1 / span 2;
    height: 100%;
  }

  .timer-panel {
    grid-template-columns: max-content 116px max-content minmax(72px, 1fr) minmax(86px, 1fr);
  }

  .data-panel {
    margin-inline: 0;
  }

  .notices {
    padding-inline: 8px;
  }
}
