:root {
  --green-950: #071713;
  --green-900: #10231d;
  --green-800: #17352b;
  --green-700: #1f6b52;
  --green-600: #2f9f78;
  --green-100: #dcefe6;
  --green-50: #f3f8f5;
  --blue: #395fba;
  --violet: #6657c7;
  --orange: #c9823b;
  --red: #c94f4f;
  --ink: #17201c;
  --muted: #66736d;
  --line: #d8e0dc;
  --surface: #ffffff;
  --canvas: #f6f7f4;
  --panel: #eef2ee;
  --shadow: 0 18px 44px rgba(7, 23, 19, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Pretendard", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

body.logged-out .app-shell {
  display: none;
}

body.logged-in .login-screen {
  display: none;
}

body.kiosk-mode .login-screen,
body.kiosk-mode .app-shell {
  display: none;
}

.standalone-kiosk[hidden] {
  display: none;
}

.standalone-kiosk {
  min-height: 100vh;
  display: grid;
  background: #eef5f0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-width: 1180px;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px;
  background:
    linear-gradient(120deg, rgba(7, 23, 19, 0.9), rgba(31, 107, 82, 0.78)),
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.13), transparent 32%),
    var(--green-950);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-screen > .login-brand {
  position: fixed;
  top: 34px;
  left: 42px;
  color: white;
}

.login-brand strong,
.login-brand span {
  display: block;
}

.login-brand strong {
  font-size: 20px;
}

.login-brand span {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.login-panel {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.2);
}

.login-panel h1 {
  margin-bottom: 8px;
}

.login-panel label {
  display: grid;
  gap: 7px;
  color: #30443a;
  font-weight: 900;
}

.login-panel input,
.login-panel select {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: white;
}

.login-panel small {
  color: var(--muted);
  text-align: center;
}

.password-rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: -4px;
}

.password-rules span {
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7faf7;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.password-rules span::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c9d2cd;
}

.password-rules span.passed {
  border-color: var(--green-100);
  background: var(--green-50);
  color: var(--green-800);
}

.password-rules span.passed::before {
  background: var(--green-600);
}

.auth-switch {
  justify-self: center;
}

.top-strip {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  background: linear-gradient(90deg, var(--green-950), var(--green-900));
  color: #e8f4ee;
  font-size: 12px;
}

.status-left,
.status-right,
.main-nav,
.brand,
.quick-search,
.nav-links,
.heading-actions,
.schedule-toolbar,
.legend {
  display: flex;
  align-items: center;
}

.status-left,
.status-right {
  gap: 12px;
}

.status-right button,
.mini-action {
  border: 0;
  background: transparent;
  color: inherit;
}

.top-plus-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.top-plus-link span {
  width: 14px;
  height: 14px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #b9f0d8;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.data-restore-label {
  position: relative;
  cursor: pointer;
}

.data-restore-label input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.plan-badge {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(47, 159, 120, 0.82);
  color: white;
  font-weight: 700;
}

.center-name {
  padding: 3px 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
}

.user-switch-trigger {
  border: 0;
}

.main-nav {
  height: 72px;
  gap: 22px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  gap: 10px;
  width: 250px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--green-800), var(--green-600));
  color: white;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  padding: 0 0 6px 2px;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.quick-search {
  width: 280px;
  height: 38px;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfb;
}

.quick-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.nav-links {
  margin-left: auto;
  gap: 4px;
}

.nav-link {
  height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #22302b;
  font-weight: 700;
}

.nav-link.active {
  background: var(--green-100);
  color: var(--green-900);
}

.nav-link.disabled,
.nav-link:disabled {
  color: #9aa39f;
  cursor: not-allowed;
  opacity: 0.55;
}

main {
  padding: 28px 32px 48px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--green-700);
  font-size: 12px;
  font-weight: 800;
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  font-size: 26px;
  letter-spacing: 0;
}

h2 {
  font-size: 16px;
}

h3 {
  font-size: 13px;
}

.heading-actions {
  gap: 8px;
}

.primary-button,
.success-button,
.ghost-button,
.text-button,
.segmented button,
.quick-grid button {
  min-height: 36px;
  border-radius: 6px;
  padding: 0 14px;
  font-weight: 800;
}

.primary-button {
  border: 1px solid var(--green-700);
  background: var(--green-700);
  color: white;
}

.danger-button {
  min-height: 36px;
  border: 1px solid #d64f3c;
  border-radius: 6px;
  padding: 0 14px;
  background: #d64f3c;
  color: white;
  font-weight: 800;
}

.success-button {
  border: 1px solid #2fb876;
  background: #2fb876;
  color: white;
}

.ghost-button {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

.ghost-button.active {
  border-color: var(--green-700);
  background: var(--green-700);
  color: white;
}

.toolbar-select {
  height: 36px;
  min-width: 168px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: white;
  color: var(--ink);
  font-weight: 800;
}

.text-button {
  min-height: auto;
  border: 0;
  background: transparent;
  color: var(--green-700);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric-card {
  padding: 20px;
}

.metric-card span,
.metric-card small {
  display: block;
  color: var(--muted);
}

.metric-card strong {
  display: block;
  margin: 9px 0 7px;
  font-size: 25px;
  letter-spacing: 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.85fr;
  gap: 18px;
}

.view#dashboard.active {
  display: flex;
  flex-direction: column;
}

.view#dashboard.active > .dashboard-attendance {
  order: 0;
}

.view#dashboard.active > .page-heading {
  order: 1;
}

.view#dashboard.active > .metric-grid {
  order: 2;
}

.view#dashboard.active > .dashboard-grid {
  order: 3;
}

.dashboard-grid.attendance-duplicate {
  display: none;
}

.dashboard-grid.lower {
  margin-top: 18px;
}

.panel {
  padding: 18px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border: 1px solid var(--line);
}

.data-table th,
.data-table td {
  height: 42px;
  border-bottom: 1px solid var(--line);
  padding: 0 12px;
  text-align: left;
  white-space: nowrap;
}

.data-table th {
  background: #edf1ee;
  color: #33413b;
  font-size: 12px;
}

.member-link {
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.member-link:hover {
  color: var(--green-700);
}

.empty-state {
  padding: 28px;
  border: 1px solid var(--line);
  border-top: 0;
  background: white;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.data-table.compact th,
.data-table.compact td {
  height: 38px;
}

.status {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.status.done {
  background: var(--green-100);
  color: var(--green-800);
}

.status.warning {
  background: #fff1df;
  color: #a65319;
}

.status.reserved {
  background: #e7ebff;
  color: #2f4fc4;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.attendance-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.attendance-summary div {
  min-height: 88px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.attendance-summary span,
.attendance-summary strong {
  display: block;
}

.attendance-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.attendance-summary strong {
  margin-top: 8px;
  font-size: 24px;
}

.attendance-live-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
  gap: 18px;
  margin-bottom: 18px;
}

.dashboard-attendance {
  margin: 0 0 28px;
  padding: 0 0 24px;
  border-bottom: 1px solid var(--line);
}

.live-board {
  min-height: 360px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f211b;
  color: white;
  box-shadow: var(--shadow);
}

.live-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.live-header span,
.live-header strong {
  display: block;
}

.live-header span {
  color: #a9c4b8;
  font-size: 12px;
  font-weight: 800;
}

.live-header strong {
  margin-top: 5px;
  font-size: 30px;
}

.pulse-dot {
  height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(47, 159, 120, 0.18);
  color: #73ddb6;
  font-size: 12px;
  font-weight: 900;
}

.checkin-flow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.flow-step {
  min-height: 122px;
  padding: 16px;
  border: 1px solid rgba(220, 239, 230, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.flow-step span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #9fe2c6;
  font-weight: 900;
}

.flow-step strong,
.flow-step small {
  display: block;
}

.flow-step small {
  margin-top: 8px;
  color: #a9c4b8;
  line-height: 1.5;
}

.flow-step.active {
  background: rgba(47, 159, 120, 0.18);
}

.device-list {
  display: grid;
  gap: 10px;
}

.device-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.device-item strong,
.device-item span {
  display: block;
}

.device-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.device-item em {
  font-style: normal;
  font-weight: 900;
}

.device-item.online em {
  color: var(--green-700);
}

.device-item.warning em {
  color: #a65319;
}

.attendance-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
}

.table-tools {
  display: flex;
  gap: 8px;
}

.table-tools input,
.manual-checkin input,
.manual-checkin select,
.manual-checkin textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  padding: 0 10px;
}

.table-tools input {
  height: 36px;
  min-width: 220px;
}

.row-action {
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: white;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.row-action.primary {
  border-color: var(--green-700);
  background: var(--green-700);
  color: white;
}

.detail-drawer {
  position: fixed;
  top: 106px;
  right: 24px;
  z-index: 30;
  width: 380px;
  max-width: calc(100vw - 32px);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 24px 70px rgba(7, 23, 19, 0.18);
  transform: translateX(calc(100% + 40px));
  opacity: 0;
  pointer-events: none;
  transition: transform 180ms ease, opacity 180ms ease;
}

.detail-drawer.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.drawer-header,
.member-profile,
.drawer-actions {
  display: flex;
  align-items: center;
}

.drawer-header {
  justify-content: space-between;
  margin-bottom: 18px;
}

.icon-button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.member-profile {
  gap: 12px;
  padding: 14px;
  border-radius: 8px;
  background: var(--green-50);
}

.avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green-800);
  color: white;
  font-size: 20px;
  font-weight: 900;
}

.member-profile strong,
.member-profile span {
  display: block;
}

.member-profile span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.drawer-section {
  margin-top: 18px;
}

.drawer-section h3 {
  margin-bottom: 10px;
}

.pass-summary {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pass-summary strong,
.pass-summary span,
.pass-summary small {
  display: block;
}

.pass-summary span {
  margin: 7px 0;
  color: var(--green-700);
  font-weight: 900;
}

.pass-summary small,
.mini-list span {
  color: var(--muted);
}

.mini-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.mini-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.mini-list b {
  white-space: nowrap;
}

.drawer-actions {
  gap: 8px;
  margin-top: 20px;
}

.drawer-actions button {
  flex: 1;
}

.manual-checkin {
  align-self: start;
}

.manual-checkin label {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.manual-checkin input,
.manual-checkin select {
  height: 38px;
  margin-top: 6px;
}

.manual-checkin textarea {
  min-height: 96px;
  margin-top: 6px;
  padding-top: 10px;
  resize: vertical;
}

.manual-checkin .primary-button {
  width: 100%;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 23, 19, 0.36);
}

.modal-backdrop[hidden],
.toast[hidden] {
  display: none;
}

.modal {
  display: none;
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 20px;
  border-radius: 8px;
  background: white;
  box-shadow: 0 28px 90px rgba(7, 23, 19, 0.26);
}

.modal.open {
  display: block;
}

.modal-header,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-header {
  margin-bottom: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-grid label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.form-grid .wide {
  grid-column: 1 / -1;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
}

.form-grid input,
.form-grid select {
  height: 40px;
  padding: 0 10px;
}

.form-grid textarea {
  min-height: 92px;
  padding: 10px;
  resize: vertical;
}

.modal-actions {
  justify-content: flex-end;
  margin-top: 18px;
}

.modal-note {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid #f0d1c9;
  border-radius: 6px;
  background: #fff7f4;
  color: #7c3c31;
  font-size: 13px;
  line-height: 1.5;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 70;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--green-900);
  color: white;
  box-shadow: 0 18px 50px rgba(7, 23, 19, 0.24);
  font-weight: 800;
}

.quick-grid button {
  border: 1px solid var(--line);
  background: #fbfcfb;
  color: var(--green-800);
  text-align: left;
}

.segmented {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.segmented button {
  border: 0;
  border-radius: 0;
  background: white;
}

.segmented .active {
  background: var(--green-700);
  color: white;
}

.schedule-toolbar {
  gap: 8px;
  margin-bottom: 12px;
}

.schedule-toolbar select {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  padding: 0 10px;
}

.legend {
  gap: 12px;
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 5px;
  border-radius: 2px;
}

.legend .available {
  background: #c9f2d7;
}

.legend .booked {
  background: var(--violet);
}

.legend .completed {
  background: var(--green-600);
}

.schedule-board {
  display: grid;
  grid-template-columns: 64px repeat(4, minmax(220px, 1fr));
  border: 1px solid var(--line);
  background: white;
  overflow: hidden;
}

.schedule-board[hidden],
.week-schedule-board[hidden] {
  display: none;
}

.schedule-title {
  margin: 0 0 10px;
  text-align: center;
  font-size: 17px;
  font-weight: 900;
}

.week-schedule-board {
  display: grid;
  grid-template-columns: 64px repeat(7, minmax(170px, 1fr));
  border: 1px solid var(--line);
  background: white;
  overflow: hidden;
}

.time-col,
.coach-column {
  display: grid;
  grid-template-rows: 36px repeat(16, 38px);
}

.time-col {
  background: #f9fbf9;
  color: var(--muted);
  font-size: 12px;
}

.time-col span,
.coach-column h3,
.slot,
.booking {
  border-bottom: 1px solid var(--line);
}

.time-col span {
  display: flex;
  align-items: center;
  justify-content: center;
}

.coach-column {
  border-left: 1px solid var(--line);
}

.coach-column h3 {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f2;
}

.coach-column h3.today {
  color: var(--green-700);
  background: #e9f7ee;
}

.slot.open {
  background: linear-gradient(0deg, rgba(47, 159, 120, 0.14), rgba(47, 159, 120, 0.14));
  cursor: pointer;
}

.slot.open:hover {
  background: rgba(47, 159, 120, 0.24);
}

.booking {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 3px 8px;
  background: #5c55b8;
  color: white;
  font-size: 12px;
}

.booking strong,
.booking span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.booking small {
  position: absolute;
  right: 5px;
  top: 5px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.22);
}

.booking.complete {
  background: var(--green-600);
}

.booking.risk {
  background: var(--orange);
}

.member-search-head {
  display: grid;
  grid-template-columns: minmax(320px, 560px) 120px;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.member-search-head input {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0 12px;
}

.member-condition-table {
  display: grid;
  grid-template-columns: 140px 1fr 140px 1fr 140px 1fr;
  border: 1px solid var(--line);
  background: white;
  margin-bottom: 18px;
}

.condition-label {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f1f3f1;
  color: #41514a;
  font-size: 12px;
  font-weight: 900;
}

.condition-field {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 7px 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.condition-field.wide {
  grid-column: span 5;
}

.condition-field label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #33433d;
  font-size: 12px;
  white-space: nowrap;
}

.condition-field input[type="checkbox"],
.condition-field input[type="radio"] {
  accent-color: var(--green-700);
}

.condition-field input,
.condition-field select {
  height: 32px;
  border: 1px solid var(--line);
  background: white;
  padding: 0 8px;
  font-size: 12px;
}

.condition-field select {
  min-width: 220px;
}

.condition-field .short-input {
  width: 110px;
}

.condition-field .short-select {
  min-width: 76px;
}

.condition-submit {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 14px;
}

.member-result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.member-result-bar strong {
  color: var(--ink);
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.import-guide {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf7;
  color: var(--muted);
  line-height: 1.5;
}

.import-guide p {
  margin: 0;
}

.import-columns {
  padding: 10px;
  border-radius: 6px;
  background: white;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.member-page {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
}

.member-sidebar {
  min-height: calc(100vh - 160px);
  padding: 18px;
  border-right: 1px solid var(--line);
  background: white;
}

.member-side-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.member-side-profile strong,
.member-side-profile span {
  display: block;
}

.member-side-profile span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.side-info {
  margin: 0 0 16px;
  border-top: 1px solid var(--line);
}

.side-info div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 34px;
  border-bottom: 1px solid var(--line);
}

.side-info dt,
.side-info dd {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0 8px;
  font-size: 12px;
}

.side-info dt {
  background: #f1f3f1;
  color: var(--muted);
  font-weight: 800;
}

.side-info dd {
  justify-content: center;
}

.side-info .danger {
  color: var(--red);
  font-weight: 900;
}

.side-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  margin-bottom: 18px;
}

.side-actions button {
  min-height: 34px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: white;
  font-size: 12px;
}

.side-actions button:nth-child(1) {
  grid-column: 1 / -1;
  background: #dfe8ff;
  color: #2448b6;
  font-weight: 900;
}

.side-actions button:nth-child(2) {
  grid-column: 1 / -1;
  background: #ffd8d2;
  color: #a23c2d;
  font-weight: 900;
}

.side-pass-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--violet);
  border-radius: 8px;
  margin-bottom: 14px;
}

.side-pass-card p,
.side-pass-card strong,
.side-pass-card span,
.side-pass-card small {
  display: block;
  margin: 0;
}

.side-pass-card p {
  margin-bottom: 12px;
  color: var(--muted);
  font-weight: 900;
}

.side-pass-card span {
  margin: 8px 0;
  color: var(--green-700);
  font-weight: 900;
}

.side-memo {
  width: 100%;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 12px;
  resize: vertical;
}

.member-main {
  min-width: 0;
}

.detail-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 28px;
  border: 1px solid #36403b;
}

.detail-tabs button {
  height: 38px;
  border: 0;
  border-right: 1px solid #36403b;
  background: white;
  font-weight: 900;
}

.detail-tabs button:last-child {
  border-right: 0;
}

.detail-tabs .active {
  background: #444a5b;
  color: white;
}

.detail-panel {
  display: none;
}

.detail-panel.active {
  display: block;
}

.member-hero {
  padding: 24px 28px 22px;
  border-top: 3px solid var(--blue);
  background: #eff7fc;
}

.member-title {
  display: inline-block;
  min-width: 260px;
  padding-right: 24px;
  border-right: 1px solid #c8d4dc;
  vertical-align: top;
}

.member-title h1 {
  font-size: 26px;
}

.member-title p {
  margin: 8px 0 0;
  color: var(--muted);
}

.member-contact {
  display: inline-grid;
  gap: 6px;
  margin-left: 24px;
  color: #40504a;
  font-size: 13px;
  font-weight: 800;
}

.mini-info-table {
  width: 100%;
  margin-top: 26px;
  border-collapse: collapse;
  background: white;
}

.mini-info-table th,
.mini-info-table td {
  height: 36px;
  border-top: 1px solid #212926;
  border-bottom: 1px solid var(--line);
  text-align: center;
  font-size: 12px;
}

.mini-info-table th {
  background: #f0f1ef;
}

.detail-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0;
}

.detail-metrics article {
  min-height: 86px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: #f3f3f2;
  text-align: center;
}

.detail-metrics strong,
.detail-metrics span {
  display: block;
}

.detail-metrics strong {
  font-size: 19px;
}

.detail-metrics span {
  color: var(--muted);
  font-size: 12px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 32px;
}

.history-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  border-bottom: 2px solid #1f2723;
}

.history-title h2 {
  position: relative;
  padding-left: 9px;
  font-size: 15px;
}

.history-title h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 3px;
  height: 15px;
  background: var(--blue);
}

.history-title button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.pass-detail-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 2px solid #1f2723;
}

.pass-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.pass-status-grid article {
  min-height: 96px;
  padding: 18px;
  border: 1px solid var(--line);
  background: #f3f3f2;
}

.pass-status-grid span,
.pass-status-grid strong {
  display: block;
}

.pass-status-grid span {
  color: var(--muted);
  font-weight: 800;
}

.pass-status-grid strong {
  margin-top: 12px;
  font-size: 22px;
}

.pass-manage-panel {
  margin-bottom: 24px;
}

.pass-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 32px;
}

.sales-subnav,
.center-subnav {
  display: flex;
  gap: 0;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  background: white;
}

.sales-subnav button,
.center-subnav button {
  min-width: 180px;
  height: 42px;
  border: 0;
  border-right: 1px solid var(--line);
  background: white;
  font-weight: 900;
}

.sales-subnav .active,
.center-subnav .active {
  color: var(--green-700);
  border-bottom: 3px solid var(--green-700);
}

.sales-panel,
.center-panel {
  display: none;
}

.sales-panel.active,
.center-panel.active {
  display: block;
}

.payroll-settlement {
  margin-top: 18px;
}

.payroll-rule-note {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--green-100);
  border-radius: 8px;
  background: var(--green-50);
  color: var(--green-900);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

.pass-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 720px);
  gap: 16px;
}

.pass-admin-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.pass-admin-summary article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.pass-admin-summary span,
.pass-admin-summary strong {
  display: block;
}

.pass-admin-summary span {
  color: var(--muted);
  font-weight: 800;
}

.pass-admin-summary strong {
  margin-top: 10px;
  font-size: 22px;
}

.pass-filter-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.pass-filter-bar label {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-weight: 800;
}

.pass-filter-bar input[type="checkbox"] {
  accent-color: var(--green-700);
}

.pass-filter-bar #passSearchInput {
  height: 36px;
  min-width: 240px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
}

.register-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr) 280px;
  gap: 18px;
  align-items: start;
}

.register-form input,
.register-form select,
.register-form textarea {
  background: #fbfcfb;
}

.register-side {
  display: grid;
  gap: 12px;
}

.register-side label {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--ink);
  font-weight: 800;
}

.category-list {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.category-list button {
  height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  font-weight: 800;
}

.category-list .active {
  background: var(--green-100);
  color: var(--green-800);
}

.pass-item {
  display: grid;
  grid-template-columns: 1fr 150px 74px 54px;
  align-items: center;
  min-height: 74px;
  border-bottom: 1px solid var(--line);
  gap: 10px;
}

.pass-item:last-child {
  border-bottom: 0;
}

.pass-item strong,
.pass-item span,
.pass-item em {
  display: block;
}

.pass-item span {
  margin-top: 5px;
  color: var(--muted);
}

.pass-item b {
  text-align: right;
  font-size: 16px;
}

.pass-item em {
  color: var(--green-700);
  font-style: normal;
  font-weight: 800;
  text-align: center;
}

.pass-admin-detail {
  align-self: start;
}

.pass-admin-detail label {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.pass-admin-detail input,
.pass-admin-detail select,
.pass-admin-detail textarea {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  padding: 0 10px;
}

.pass-admin-detail input,
.pass-admin-detail select {
  height: 38px;
}

.pass-admin-detail textarea {
  min-height: 90px;
  padding-top: 10px;
  resize: vertical;
}

.pass-admin-detail .primary-button {
  width: 100%;
}

.tag {
  display: inline-flex;
  height: 24px;
  align-items: center;
  margin-right: 5px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--green-100);
  color: var(--green-800);
  font-size: 12px;
  font-weight: 800;
}

.payroll-panel {
  margin-top: 18px;
}

.payroll-edit-panel {
  margin-top: 18px;
}

.data-table tr.selected-row {
  background: #ecf7f0;
}

.permission-page {
  margin-top: 18px;
}

.compact-heading {
  align-items: center;
}

.permission-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
}

.permission-staff {
  border: 1px solid var(--line);
  background: white;
}

.permission-staff input {
  width: calc(100% - 28px);
  height: 38px;
  margin: 14px;
  border: 1px solid var(--line);
  padding: 0 10px;
}

.staff-group {
  padding: 10px;
  background: #eceeed;
  color: #3d4843;
  text-align: center;
  font-weight: 900;
}

.staff-item {
  width: 100%;
  min-height: 74px;
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: white;
  padding: 10px;
  text-align: left;
}

.permission-staff-list {
  display: contents;
}

.staff-item.active {
  background: #e5f2fb;
}

.staff-item .avatar {
  grid-row: span 2;
}

.staff-item strong,
.staff-item small {
  display: block;
}

.staff-item small {
  color: var(--muted);
}

.permission-main {
  display: grid;
  gap: 18px;
}

.permission-current {
  padding: 16px 18px;
  border: 1px solid var(--line);
  background: white;
}

.permission-current strong,
.permission-current span {
  display: block;
}

.permission-current span {
  margin-top: 5px;
  color: var(--muted);
}

.permission-section {
  border: 1px solid var(--line);
  background: white;
  padding: 16px;
}

.permission-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.permission-title button {
  height: 28px;
  margin-left: 6px;
  border: 1px solid var(--line);
  background: white;
  font-size: 12px;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 28px;
}

.permission-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.permission-grid input {
  accent-color: var(--green-700);
}

.user-switch-modal {
  width: min(520px, calc(100vw - 32px));
}

.user-group-title {
  padding: 11px;
  margin: 10px 0;
  background: #edf0ee;
  color: #3e4b46;
  text-align: center;
  font-weight: 900;
}

.user-select-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.user-select-row {
  display: grid;
  grid-template-columns: 52px 1fr 86px;
  gap: 12px;
  align-items: center;
  min-height: 76px;
  border-bottom: 1px solid var(--line);
}

.user-select-row strong,
.user-select-row span {
  display: block;
}

.user-select-row span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.user-select-row button {
  height: 36px;
  border: 1px solid var(--line);
  background: white;
  font-weight: 900;
}

.payroll-rate-box {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.payroll-range-list {
  display: grid;
  gap: 8px;
}

.payroll-range-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 80px auto 56px;
  gap: 8px;
  align-items: center;
}

.payroll-range-row .range-preview {
  grid-column: 1 / -1;
  color: var(--green-700);
  font-size: 12px;
  font-weight: 900;
}

.payroll-range-row input {
  margin-top: 0;
}

.phone-stage {
  display: grid;
  grid-template-columns: repeat(2, 340px);
  gap: 28px;
  align-items: start;
}

.kiosk-view {
  min-height: calc(100vh - 130px);
}

.kiosk-shell {
  min-height: calc(100vh - 170px);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 28px;
  padding: 28px;
  border-radius: 10px;
  background: #eef5f0;
}

.kiosk-shell.standalone {
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, 520px);
  grid-template-rows: auto 1fr;
  align-items: stretch;
  border-radius: 0;
  padding: 34px;
}

.kiosk-shell.standalone .kiosk-top {
  grid-column: 1 / -1;
}

.kiosk-shell.standalone > .kiosk-card {
  width: 100%;
  grid-column: 2;
  justify-self: stretch;
  align-self: stretch;
}

.kiosk-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kiosk-top .login-brand {
  color: var(--ink);
}

.kiosk-top .login-brand span {
  color: var(--muted);
}

.kiosk-visual-panel {
  grid-column: 1;
  min-height: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  align-self: stretch;
  overflow: hidden;
  border: 1px solid rgba(216, 224, 220, 0.9);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(7, 23, 19, 0.15), rgba(7, 23, 19, 0.62)),
    linear-gradient(135deg, #e8f3ed 0%, #b5dac9 46%, #17352b 100%);
  box-shadow: var(--shadow);
}

.kiosk-logo-preview {
  position: relative;
  min-height: 0;
  border: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  padding: 36px;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.55), transparent 20%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 44%);
  background-position: center;
  background-size: cover;
  color: white;
  text-align: center;
  cursor: pointer;
}

.kiosk-logo-preview::after {
  content: "";
  position: absolute;
  inset: auto 8% 9% 8%;
  height: 18%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  filter: blur(10px);
}

.kiosk-logo-preview span,
.kiosk-logo-preview strong {
  position: relative;
  z-index: 1;
  display: block;
}

.kiosk-logo-preview span {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0;
}

.kiosk-logo-preview strong {
  font-size: 54px;
  line-height: 1;
}

.kiosk-logo-preview.has-image {
  background-color: #10231d;
}

.kiosk-logo-preview.has-image span,
.kiosk-logo-preview.has-image strong,
.kiosk-logo-preview.has-image::after {
  display: none;
}

.kiosk-visual-copy {
  display: grid;
  gap: 8px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.92);
}

.kiosk-visual-copy h2,
.kiosk-visual-copy p {
  margin: 0;
}

.kiosk-visual-copy h2 {
  font-size: 28px;
}

.kiosk-visual-copy p:not(.eyebrow) {
  color: var(--muted);
  font-weight: 800;
}

.kiosk-visual-copy input {
  display: none;
}

.kiosk-card {
  width: min(620px, 100%);
  justify-self: center;
  align-self: center;
  display: grid;
  gap: 18px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  box-shadow: var(--shadow);
  text-align: center;
}

.kiosk-card h1 {
  font-size: 28px;
  line-height: 1.35;
}

.kiosk-card input {
  height: 64px;
  border: 2px solid var(--green-100);
  border-radius: 8px;
  font-size: 30px;
  font-weight: 900;
  text-align: center;
  letter-spacing: 5px;
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.keypad button {
  height: 62px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf8;
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
}

.kiosk-result {
  min-height: 48px;
  display: grid;
  place-items: center;
  padding: 12px;
  border-radius: 8px;
  background: #f4f6f4;
  color: var(--muted);
  font-weight: 900;
}

.kiosk-result.success {
  background: #e9f7ee;
  color: var(--green-700);
}

.kiosk-result.error {
  background: #fff1f1;
  color: var(--red);
}

.phone-frame {
  min-height: 640px;
  padding: 14px;
  border: 1px solid #c9d8d0;
  border-radius: 28px;
  background: #0c1e18;
  box-shadow: 0 24px 60px rgba(7, 23, 19, 0.2);
}

.phone-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 42px;
  padding: 0 12px;
  color: white;
}

.phone-content {
  min-height: 560px;
  padding: 20px;
  border-radius: 20px;
  background: #f7faf7;
}

.app-hello {
  margin: 0 0 18px;
  color: var(--muted);
  font-weight: 800;
}

.app-pass,
.coach-summary {
  padding: 18px;
  margin-bottom: 20px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--green-800), var(--green-600));
  color: white;
}

.app-pass span,
.app-pass strong,
.app-pass small,
.coach-summary strong,
.coach-summary span {
  display: block;
}

.app-pass strong {
  margin: 8px 0;
  font-size: 28px;
}

.phone-content h2 {
  margin-bottom: 12px;
}

.app-slot,
.lesson-row {
  width: 100%;
  min-height: 52px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.app-slot {
  padding: 0 14px;
  color: #24332e;
  text-align: left;
  font-weight: 800;
}

.app-slot.selected {
  border-color: var(--green-700);
  background: #e9f7ee;
  color: var(--green-800);
}

.app-primary {
  width: 100%;
  height: 48px;
  margin-top: 8px;
  border: 0;
  border-radius: 8px;
  background: var(--green-700);
  color: white;
  font-weight: 900;
}

.app-primary:disabled {
  background: #8fa69b;
  cursor: default;
}

.lesson-row {
  display: grid;
  grid-template-columns: 58px 1fr 54px;
  align-items: center;
  padding: 0 12px;
}

.lesson-row span {
  color: var(--muted);
}

.lesson-row em {
  justify-self: end;
  color: var(--green-700);
  font-style: normal;
  font-weight: 800;
}

@media (max-width: 900px) {
  .app-shell {
    min-width: 0;
  }

  .top-strip,
  .quick-search,
  .status-right {
    display: none;
  }

  .main-nav {
    height: auto;
    flex-wrap: wrap;
    padding: 14px;
  }

  .brand,
  .nav-links {
    width: 100%;
  }

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

  main {
    padding: 18px 14px 34px;
  }

  .metric-grid,
  .dashboard-grid,
  .pass-admin-summary,
  .pass-layout,
  .register-layout,
  .phone-stage,
  .attendance-live-grid,
  .attendance-workspace,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .member-search-head,
  .member-condition-table {
    grid-template-columns: 1fr;
  }

  .condition-field.wide,
  .condition-submit {
    grid-column: auto;
  }

  .member-page,
  .permission-layout,
  .detail-grid,
  .pass-detail-grid,
  .pass-status-grid,
  .detail-metrics,
  .detail-tabs {
    grid-template-columns: 1fr;
  }

  .permission-grid {
    grid-template-columns: 1fr;
  }

  .member-sidebar {
    min-height: auto;
    border-right: 0;
  }

  .form-grid .wide {
    grid-column: auto;
  }

  .schedule-board {
    overflow-x: auto;
    grid-template-columns: 58px repeat(4, 210px);
  }

  .week-schedule-board {
    overflow-x: auto;
    grid-template-columns: 58px repeat(7, 180px);
  }
}
