:root {
  --bg: #f5f7f4;
  --panel: #ffffff;
  --panel-soft: #f9fbfc;
  --text: #1f2a2e;
  --muted: #6b7780;
  --line: #dfe5e3;
  --primary: #405966;
  --primary-dark: #314650;
  --primary-soft: #edf3f5;
  --primary-gradient: #405966;
  --sidebar-bg: #182528;
  --accent: #c86f35;
  --danger: #b93a38;
  --warning: #a66a00;
  --ok: #15734d;
  --info: #2f66a1;
  --shadow: 0 12px 30px rgba(31, 42, 46, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  height: 100vh;
  min-height: 0;
}

.sidebar {
  background: var(--sidebar-bg) !important;
  color: #f6faf9;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 14px;
}

.brand {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  align-items: center;
  padding: 4px 8px 20px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
}

.brand-mark img {
  display: block;
  height: 40px;
  width: 40px;
}

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

.brand small {
  margin-top: 3px;
  color: #b8c7c3;
}

.nav {
  display: grid;
  gap: 4px;
}

.nav-group {
  display: grid;
  gap: 4px;
}

.nav-item {
  align-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #dce6e3;
  cursor: pointer;
  display: flex;
  gap: 9px;
  padding: 11px 12px;
  text-align: left;
  width: 100%;
}

.nav-submenu {
  display: grid;
  gap: 3px;
  padding: 0 0 3px 28px;
}

.nav-submenu[hidden] {
  display: none;
}

.nav-subitem {
  align-items: center;
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #d7e5e6;
  cursor: pointer;
  display: flex;
  min-height: 34px;
  padding: 8px 10px;
  text-align: left;
  width: 100%;
}

.nav-subitem:hover,
.nav-subitem.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.nav-subitem.is-disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.nav-subitem.is-disabled:hover {
  background: transparent;
  color: #d7e5e6;
}

.nav-icon {
  display: inline-flex;
  flex: 0 0 auto;
  height: 18px;
  width: 18px;
}

.nav-icon svg {
  display: block;
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 18px;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
}

.nav-item.is-disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.nav-item.is-disabled:hover {
  background: transparent;
  color: #dce6e3;
}

.workspace {
  height: 100vh;
  min-width: 0;
  overflow-y: auto;
  padding: 24px;
  scroll-behavior: auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 26px;
}

.top-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.api-status {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--muted);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: var(--muted);
  display: flex;
  font-size: 13px;
  justify-content: space-between;
  line-height: 1.45;
  margin: -6px 0 16px;
  min-height: 42px;
  padding: 10px 12px;
}

.api-status strong {
  color: var(--text);
}

.api-status.connected {
  border-left-color: var(--ok);
}

.api-status.syncing {
  border-left-color: var(--info);
}

.api-status.local {
  border-left-color: var(--warning);
}

.api-status.blocked,
.api-status.error {
  border-left-color: var(--danger);
}

.operator-switch {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: inline-flex;
  gap: 8px;
  min-height: 36px;
  padding: 5px 8px 5px 10px;
}

.operator-switch span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.operator-switch select {
  border: 0;
  min-height: 26px;
  padding: 2px 22px 2px 4px;
  width: auto;
}

.login-landing {
  background:
    radial-gradient(circle at 84% 43%, rgba(255, 255, 255, 0.96) 0 23%, rgba(255, 255, 255, 0.86) 23.2% 37%, transparent 37.2%),
    radial-gradient(circle at 18% 82%, rgba(36, 104, 113, 0.32), transparent 34%),
    radial-gradient(circle at 58% 17%, rgba(27, 196, 167, 0.26), transparent 30%),
    linear-gradient(120deg, #111b24 0%, #101820 54%, #eef1ed 54.2%, #f9faf6 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.75fr);
  min-height: 100vh;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.login-landing::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 92px 92px;
  content: "";
  inset: 0;
  opacity: 0.35;
  pointer-events: none;
  position: absolute;
}

.login-visual {
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.login-brand-block {
  align-items: center;
  color: #ffffff;
  display: flex;
  gap: 12px;
  left: clamp(34px, 8vw, 110px);
  position: absolute;
  top: clamp(36px, 8vh, 92px);
  z-index: 2;
}

.login-brand-mark {
  align-items: center;
  display: inline-flex;
  height: 48px;
  justify-content: center;
  overflow: hidden;
  width: 48px;
}

.login-brand-mark img {
  display: block;
  height: 48px;
  width: 48px;
}

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

.login-brand-block strong {
  font-size: 22px;
  letter-spacing: 0;
}

.login-brand-block small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  margin-top: 4px;
}

.login-athlete {
  bottom: -4vh;
  filter: drop-shadow(0 22px 40px rgba(125, 241, 216, 0.24));
  left: clamp(-90px, -3vw, -20px);
  max-height: 72vh;
  position: absolute;
  width: min(760px, 72vw);
  z-index: 1;
}

.login-panel {
  align-self: center;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(16, 24, 32, 0.18);
  display: grid;
  gap: 24px;
  justify-self: center;
  margin-right: clamp(24px, 6vw, 92px);
  padding: 34px 38px;
  position: relative;
  width: min(430px, calc(100vw - 40px));
  z-index: 3;
}

.login-card-title p {
  color: #111820;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 8px;
}

.login-panel h2 {
  color: #8a969d;
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 0;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form label {
  display: grid;
  gap: 7px;
}

.login-form span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.login-panel input {
  background: rgba(232, 237, 241, 0.92);
  border-color: transparent;
  border-radius: 4px;
  min-height: 44px;
}

.login-panel input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(64, 89, 102, 0.16);
  outline: none;
}

.login-screen {
  background: #101820;
}

.login-screen .app-shell {
  display: block;
  min-height: 100vh;
}

.login-screen .sidebar,
.login-screen .topbar {
  display: none;
}

.login-screen .workspace {
  display: block;
  min-height: 100vh;
  padding: 0;
}

.login-screen .api-status {
  display: none;
}

.login-screen .view-root {
  display: block;
  min-height: 100vh;
  width: 100%;
}

.login-form .remember-login {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  margin-top: -2px;
}

.login-form .remember-login input {
  accent-color: var(--primary);
  background: transparent;
  border: 0;
  flex: 0 0 auto;
  height: 16px;
  min-height: auto;
  margin: 0;
  padding: 0;
  width: 16px;
}

.login-form .remember-login span {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.login-submit {
  background: var(--primary);
  border: 0;
  border-radius: 4px;
  box-shadow: 0 10px 20px rgba(64, 89, 102, 0.22);
  min-height: 46px;
}

.login-submit:hover {
  background: var(--primary-dark);
}

.btn {
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  min-height: 36px;
  padding: 8px 13px;
}

.btn.primary {
  background: var(--primary);
  border: 0;
  color: #ffffff;
}

.btn.mini {
  min-height: 28px;
  padding: 4px 10px;
}

.btn.primary:hover {
  background: var(--primary-dark);
  border: 0;
}

.btn.secondary {
  background: var(--primary-soft);
  border: 0;
  color: var(--primary-dark);
}

.btn.blue {
  background: var(--primary);
  border: 0;
  color: #ffffff;
}

.btn.blue:hover {
  background: var(--primary-dark);
  border: 0;
}

.btn.danger {
  background: #fff5f5;
  border-color: #efcaca;
  color: var(--danger);
}

.btn:disabled,
.link-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.btn:disabled:hover {
  background: var(--primary);
}

.btn.secondary:disabled:hover {
  background: var(--primary-soft);
}

.icon-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.view-root {
  display: grid;
  gap: 16px;
}

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

.panel {
  padding: 16px;
}

.panel-title-row {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.panel-title-row h3 {
  margin: 0;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
}

.member-center {
  display: grid;
  gap: 14px;
}

.home-dashboard {
  display: grid;
  gap: 14px;
}

.home-summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.home-metric {
  appearance: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
  color: inherit;
  cursor: pointer;
  display: grid;
  font: inherit;
  grid-template-columns: 54px 1fr;
  min-height: 112px;
  padding: 16px;
  position: relative;
  text-align: left;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.home-metric:hover {
  border-color: rgba(64, 89, 102, 0.45);
  box-shadow: 0 16px 34px rgba(18, 35, 47, 0.12);
  transform: translateY(-1px);
}

.home-metric:focus-visible {
  border-color: rgba(64, 89, 102, 0.7);
  outline: 3px solid rgba(64, 89, 102, 0.2);
  outline-offset: 2px;
}

.home-metric-icon {
  align-items: center;
  align-self: start;
  background: var(--primary-gradient);
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.home-metric-icon svg {
  fill: none;
  height: 27px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 27px;
}

.home-metric-main small {
  color: #202d33;
  display: block;
  font-weight: 800;
  margin-top: 4px;
}

.home-metric-main strong {
  display: block;
  font-size: 20px;
  line-height: 1.2;
  margin-top: 5px;
}

.home-metric-foot {
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  font-size: 12px;
  gap: 12px;
  grid-column: 1 / -1;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 10px;
}

.home-metric-foot b {
  color: var(--primary);
  font-weight: 800;
}

.home-detail-table {
  max-height: min(64vh, 560px);
  overflow: auto;
}

.schedule-roster-summary {
  display: grid;
  gap: 7px;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--muted);
  font-size: 13px;
}

.schedule-roster-summary strong {
  color: var(--text);
  font-size: 15px;
}

.home-detail-table table {
  min-width: 680px;
}

.home-detail-table th {
  background: #f7faf9;
  position: sticky;
  top: 0;
  z-index: 1;
}

.home-panel-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(320px, 0.75fr) minmax(420px, 1.25fr);
}

.home-panel-grid.single {
  grid-template-columns: minmax(0, 1fr);
}

.home-panel-grid.wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-income {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: 180px 1fr;
  min-height: 250px;
}

.home-range-tabs {
  align-items: center;
  background: #eef6f8;
  border: 1px solid #d8e8eb;
  border-radius: 6px;
  display: inline-flex;
  gap: 2px;
  padding: 3px;
}

.home-range-tabs button {
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: #36616c;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 8px 10px;
}

.home-range-tabs button:hover,
.home-range-tabs button:focus-visible {
  background: rgba(64, 89, 102, 0.1);
  outline: 0;
}

.home-range-tabs button.active {
  background: var(--primary-gradient);
  box-shadow: 0 6px 14px rgba(64, 89, 102, 0.18);
  color: #ffffff;
}

.home-donut {
  align-items: center;
  border-radius: 50%;
  display: flex;
  height: 150px;
  justify-content: center;
  margin: 0 auto;
  position: relative;
  width: 150px;
}

.home-donut::after {
  background: #ffffff;
  border-radius: 50%;
  content: "";
  height: 88px;
  position: absolute;
  width: 88px;
}

.home-donut strong {
  font-size: 20px;
  position: relative;
  z-index: 1;
}

.home-legend {
  display: grid;
  gap: 9px;
}

.home-income-range-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin: 0 0 2px;
}

.home-legend div {
  align-items: center;
  color: var(--muted);
  display: grid;
  gap: 8px;
  grid-template-columns: 10px minmax(56px, 1fr) 44px 78px;
}

.home-legend i {
  border-radius: 999px;
  height: 10px;
  width: 10px;
}

.home-legend span {
  color: #455158;
}

.home-legend b,
.home-legend strong {
  color: #455158;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.work-hint {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.work-hint span {
  color: var(--muted);
}

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

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

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
}

.metric span {
  color: var(--muted);
  display: block;
  line-height: 1.5;
  margin-top: 8px;
}

.metric.current-role {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(22, 119, 97, 0.12), var(--shadow);
}

.role-summary {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.range-filter {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.range-filter label {
  display: grid;
  gap: 6px;
}

.access-log-filter {
  margin-top: 12px;
}

.access-result {
  border-radius: 6px;
  display: grid;
  gap: 6px;
  margin-top: 16px;
  padding: 14px 16px;
}

.access-result strong {
  font-size: 22px;
}

.access-result span {
  font-weight: 700;
}

.access-result small {
  color: var(--muted);
}

.access-result.ok {
  background: #e9f6f0;
  border: 1px solid #bce3d2;
  color: var(--ok);
}

.access-result.bad {
  background: #fff0f0;
  border: 1px solid #ffd1d1;
  color: var(--danger);
}

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

.close-breakdown p {
  color: var(--muted);
  line-height: 1.7;
  margin: 8px 0 0;
}

.group-row td {
  background: var(--panel-soft);
  color: var(--muted);
  font-weight: 700;
}

.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
}

.toolbar input,
.toolbar select {
  width: min(280px, 100%);
}

.toolbar-left,
.toolbar-right {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.pager {
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  padding: 12px 14px;
}

.compact-label {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

.compact-label select {
  min-width: 70px;
}

.table-wrap {
  overflow: auto;
}

.member-management-page {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 4px;
  display: grid;
  gap: 0;
  overflow: hidden;
}

.member-page-head {
  align-items: start;
  background: #f4f4f4;
  border-bottom: 1px solid #e5e9ee;
  display: grid;
  gap: 12px;
  min-height: 48px;
  padding: 8px 12px;
}

.member-page-head h2 {
  border-left: 4px solid #ff563f;
  font-size: 16px;
  line-height: 1;
  margin: 0;
  padding-left: 10px;
}

.member-page-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: start;
  width: 100%;
}

.member-page-actions .btn {
  border-radius: 7px;
  font-size: 13px;
  min-height: 32px;
  padding: 6px 13px;
  white-space: nowrap;
}

.member-filter-panel {
  background: #ffffff;
  display: grid;
  gap: 16px;
  padding: 16px 14px 20px;
}

.member-filter-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.member-filter-row.first {
  justify-content: flex-start;
}

.member-filter-grid {
  display: grid;
  gap: 14px 16px;
  grid-template-columns: repeat(4, minmax(210px, 1fr));
}

.member-filter-field {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(130px, 1fr);
  white-space: nowrap;
}

.member-filter-field.keyword {
  grid-template-columns: auto 150px;
}

.member-filter-field.face-name,
.member-filter-field.face-phone {
  grid-template-columns: auto 150px;
}

.member-filter-field.face-date {
  grid-template-columns: auto minmax(250px, 1fr);
}

.member-filter-field.checkin-keyword {
  grid-template-columns: auto 150px;
}

.member-filter-field.checkin-select {
  grid-template-columns: auto 150px;
}

.member-filter-field.checkin-date {
  grid-template-columns: auto minmax(250px, 1fr);
}

.checkin-page-head {
  align-items: center;
  grid-template-columns: 1fr auto;
}

.checkin-page-head .member-page-actions {
  justify-content: flex-end;
  width: auto;
}

.member-filter-field.reservation-course,
.member-filter-field.reservation-keyword,
.member-filter-field.reservation-coach {
  grid-template-columns: auto 150px;
}

.member-filter-field.adjustment-keyword,
.member-filter-field.adjustment-operator,
.member-filter-field.adjustment-card-name,
.member-filter-field.adjustment-type {
  grid-template-columns: auto 150px;
}

.member-filter-field.adjustment-date {
  grid-template-columns: auto minmax(250px, 1fr);
}

.adjustment-page-head {
  align-items: center;
  grid-template-columns: 1fr auto;
}

.adjustment-page-head .member-page-actions {
  justify-content: flex-end;
  width: auto;
}

.card-type-page-head {
  align-items: center;
  grid-template-columns: 1fr auto;
}

.card-type-page-head .member-page-actions {
  justify-content: flex-end;
  width: auto;
}

.access-device-page-head {
  display: flex;
  justify-content: space-between;
}

.access-device-page-head .member-page-actions {
  margin-left: auto;
}

.internal-person-page-head {
  gap: 16px;
  justify-content: flex-start;
}

.internal-person-page-head .member-page-actions {
  margin-left: 0;
}

.member-filter-field.card-type-keyword,
.member-filter-field.card-type-status,
.member-filter-field.course-keyword,
.member-filter-field.course-status,
.member-filter-field.schedule-keyword,
.member-filter-field.schedule-status,
.member-filter-field.stats-keyword,
.member-filter-field.stats-status,
.member-filter-field.staff-keyword,
.member-filter-field.staff-role,
.member-filter-field.staff-status {
  grid-template-columns: auto 150px;
}

.member-filter-field.stats-date {
  grid-template-columns: auto minmax(360px, 1fr);
}

.stats-filter-panel .member-filter-row {
  align-items: center;
  gap: 12px;
}

.stats-filter-panel .stats-date {
  flex: 0 0 auto;
}

.date-range {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr);
  min-width: 360px;
}

.date-range input {
  min-width: 0;
  width: 100%;
}

.date-range em {
  color: var(--muted);
  font-style: normal;
}

.stats-filter-panel .btn,
.stats-filter-panel .member-reset-filter {
  flex: 0 0 auto;
}

.adjustment-table {
  font-size: 13px;
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}

.adjustment-table th,
.adjustment-table td {
  overflow: hidden;
  padding: 10px 8px;
  text-overflow: ellipsis;
}

.adjustment-table th:nth-child(1),
.adjustment-table td:nth-child(1) {
  width: 11%;
}

.adjustment-table th:nth-child(2),
.adjustment-table td:nth-child(2) {
  width: 10%;
}

.adjustment-table th:nth-child(3),
.adjustment-table td:nth-child(3),
.adjustment-table th:nth-child(4),
.adjustment-table td:nth-child(4),
.adjustment-table th:nth-child(5),
.adjustment-table td:nth-child(5),
.adjustment-table th:nth-child(6),
.adjustment-table td:nth-child(6),
.adjustment-table th:nth-child(7),
.adjustment-table td:nth-child(7) {
  width: 8%;
}

.adjustment-table th:nth-child(8),
.adjustment-table td:nth-child(8) {
  width: 5%;
}

.adjustment-table th:nth-child(9),
.adjustment-table td:nth-child(9) {
  width: 13%;
}

.adjustment-table th:nth-child(10),
.adjustment-table td:nth-child(10) {
  width: 10%;
}

.adjustment-table th:nth-child(11),
.adjustment-table td:nth-child(11) {
  width: 8%;
}

.adjustment-table th:nth-child(12),
.adjustment-table td:nth-child(12),
.adjustment-table.duration-table th:nth-child(11),
.adjustment-table.duration-table td:nth-child(11) {
  width: 11%;
}

.adjustment-table.duration-table th:nth-child(1),
.adjustment-table.duration-table td:nth-child(1) {
  width: 9%;
}

.adjustment-table.duration-table th:nth-child(2),
.adjustment-table.duration-table td:nth-child(2) {
  width: 9%;
}

.adjustment-table.duration-table th:nth-child(3),
.adjustment-table.duration-table td:nth-child(3),
.adjustment-table.duration-table th:nth-child(4),
.adjustment-table.duration-table td:nth-child(4) {
  width: 7%;
}

.adjustment-table.duration-table th:nth-child(5),
.adjustment-table.duration-table td:nth-child(5),
.adjustment-table.duration-table th:nth-child(6),
.adjustment-table.duration-table td:nth-child(6) {
  width: 8%;
}

.adjustment-table.duration-table th:nth-child(7),
.adjustment-table.duration-table td:nth-child(7) {
  width: 7%;
}

.adjustment-table.duration-table th:nth-child(8),
.adjustment-table.duration-table td:nth-child(8) {
  width: 7%;
}

.adjustment-table.duration-table th:nth-child(9),
.adjustment-table.duration-table td:nth-child(9) {
  width: 5%;
}

.adjustment-table.duration-table th:nth-child(10),
.adjustment-table.duration-table td:nth-child(10) {
  width: 10%;
}

.adjustment-table.duration-table th:nth-child(11),
.adjustment-table.duration-table td:nth-child(11) {
  width: 9%;
}

.adjustment-table.duration-table th:nth-child(12),
.adjustment-table.duration-table td:nth-child(12) {
  width: 6%;
}

.adjustment-table.duration-table th:nth-child(13),
.adjustment-table.duration-table td:nth-child(13) {
  width: 8%;
}

.adjustment-table .actions {
  gap: 4px;
}

.adjustment-table .link-btn {
  font-size: 12px;
  min-height: 24px;
  padding: 0 2px;
}

.reservation-action-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 14px 10px;
}

.reservation-tabs {
  border-bottom: 1px solid #e5e9ee;
  display: flex;
  padding: 0 14px;
}

.reservation-tabs button {
  background: var(--primary-soft);
  border: 0;
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
  color: var(--primary);
  cursor: default;
  font-weight: 700;
  min-height: 38px;
  padding: 8px 18px;
}

.reservation-week-panel {
  background: #ffffff;
  display: grid;
  gap: 18px;
  padding: 16px 14px 24px;
}

.reservation-week-head {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(320px, 1fr) auto;
}

.reservation-week-title {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  min-height: 44px;
}

.reservation-week-title strong {
  color: #1e2d34;
  font-size: 17px;
}

.reservation-week-title span {
  color: #1f2a2e;
  font-weight: 700;
}

.reservation-week-nav,
.reservation-today {
  background: transparent;
  border: 0;
  color: var(--primary);
  cursor: pointer;
  font-weight: 800;
}

.reservation-week-nav {
  font-size: 24px;
  line-height: 1;
  min-height: 30px;
  min-width: 30px;
}

.reservation-today {
  font-size: 13px;
}

.reservation-legend {
  align-items: center;
  color: #53636c;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-end;
  min-height: 32px;
}

.reservation-legend span {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  white-space: nowrap;
}

.reservation-status-dot {
  background: #7aa2ff;
  border-radius: 999px;
  display: inline-block;
  height: 10px;
  width: 10px;
}

.reservation-status-dot.reserved {
  background: #4d8df7;
}

.reservation-status-dot.waitlisted {
  background: #ee774d;
  box-shadow: 0 0 0 3px rgba(238, 119, 77, 0.15);
}

.schedule-waitlist-count {
  display: block;
  margin-top: 3px;
  color: #d76842;
  font-size: 11px;
}

.reservation-status-dot.ongoing {
  background: #49d6bf;
}

.reservation-status-dot.done {
  background: #7fcf56;
}

.reservation-status-dot.bad {
  background: #f29b9b;
}

.reservation-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(130px, 1fr));
  overflow-x: auto;
}

.reservation-day {
  border-bottom: 1px solid #e6edf2;
  border-right: 1px solid #e6edf2;
  display: grid;
  grid-template-rows: 36px minmax(320px, auto);
  min-width: 130px;
}

.reservation-day:first-child {
  border-left: 1px solid #e6edf2;
}

.reservation-day-head {
  align-items: center;
  background: #f5f7f9;
  border-top: 1px solid #e6edf2;
  color: #1f2a2e;
  display: flex;
  font-weight: 800;
  justify-content: center;
  min-height: 36px;
}

.reservation-day.today .reservation-day-head {
  background: var(--primary-gradient);
  color: #ffffff;
}

.reservation-day-body {
  align-content: start;
  display: grid;
  gap: 10px;
  padding: 10px;
}

.reservation-empty {
  align-self: center;
  color: #98a5ad;
  font-size: 13px;
  margin: 78px 0 0;
  text-align: center;
}

.reservation-card {
  background: #ffffff;
  border: 1px solid #e2ebf0;
  border-left: 4px solid #4d8df7;
  border-radius: 7px;
  box-shadow: 0 8px 18px rgba(33, 55, 68, 0.08);
  overflow: hidden;
}

.reservation-card.ongoing {
  border-left-color: #49d6bf;
}

.reservation-card.done {
  border-left-color: #7fcf56;
}

.reservation-card.bad {
  border-left-color: #f29b9b;
}

.reservation-card-main {
  background: transparent;
  border: 0;
  color: #1f2a2e;
  cursor: pointer;
  display: grid;
  gap: 5px;
  padding: 10px 10px 8px;
  text-align: left;
  width: 100%;
}

.reservation-card-main strong {
  font-size: 14px;
}

.reservation-card-main span,
.reservation-card-main small {
  color: #65747d;
}

.reservation-card-foot {
  align-items: center;
  border-top: 1px solid #edf2f5;
  color: #53636c;
  display: flex;
  gap: 6px;
  min-height: 34px;
  padding: 7px 10px;
}

.reservation-card-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.face-date-range {
  align-items: center;
  display: inline-grid;
  gap: 8px;
  grid-template-columns: minmax(132px, 1fr) auto minmax(132px, 1fr);
}

.face-date-range em {
  color: #1f2a2e;
  font-style: normal;
  font-weight: 700;
}

.member-filter-field span {
  color: #1f2a2e;
  font-weight: 600;
}

.member-filter-field input,
.member-filter-field select {
  background: #ffffff;
  border: 1px solid #d8e0e7;
  border-radius: 5px;
  color: #2c3940;
  min-height: 32px;
  padding: 6px 10px;
  width: 100%;
}

.member-filter-field select {
  color: #7b8790;
}

.member-reset-filter {
  background: transparent;
  border: 0;
  color: var(--primary);
  cursor: pointer;
  margin-left: auto;
}

.member-reset-filter:hover {
  color: var(--primary);
}

.member-switch {
  background: #dfe7ed;
  border-radius: 999px;
  display: inline-block;
  height: 22px;
  position: relative;
  vertical-align: middle;
  width: 42px;
}

.member-switch::after {
  background: #ffffff;
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(23, 36, 44, 0.18);
  content: "";
  height: 18px;
  left: 2px;
  position: absolute;
  top: 2px;
  width: 18px;
}

.member-switch.on {
  background: #ff4d57;
}

.member-switch.on::after {
  left: 22px;
}

.member-pager {
  align-items: center;
  border-top: 1px solid #e5e9ee;
  color: #56636c;
  display: flex;
  gap: 8px;
  justify-content: center;
  min-height: 48px;
  padding: 9px 12px;
}

.member-pager select,
.member-pager input {
  background: #ffffff;
  border: 1px solid #d8e0e7;
  border-radius: 5px;
  min-height: 30px;
  padding: 4px 8px;
}

.member-pager .page-jump {
  text-align: center;
  width: 48px;
}

.member-page-btn,
.member-page-number {
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: #1d2d35;
  cursor: pointer;
  min-height: 28px;
  min-width: 28px;
}

.member-page-number.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
}

.member-page-btn:disabled {
  color: #bdc7cf;
  cursor: not-allowed;
}

.member-page-ellipsis {
  color: #1d2d35;
  padding: 0 4px;
}

.face-log-photo-modal {
  display: grid;
  gap: 16px;
  min-width: min(560px, 82vw);
}

.face-log-photo,
.face-log-photo-empty {
  align-items: center;
  background: #f7faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  justify-content: center;
  min-height: 220px;
  width: 100%;
}

.face-log-photo {
  max-height: 420px;
  object-fit: contain;
}

.face-log-photo-modal dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.face-log-photo-modal dl div {
  display: grid;
  gap: 8px;
  grid-template-columns: 76px 1fr;
}

.face-log-photo-modal dt {
  color: var(--muted);
  font-weight: 700;
}

.face-log-photo-modal dd {
  margin: 0;
}

.access-verification-panel {
  display: grid;
  gap: 16px;
}

.access-verification-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.access-verification-head h3 {
  margin: 0;
}

.access-verification-body {
  display: grid;
  gap: 14px;
  grid-template-columns: 150px 1fr 150px;
}

.access-photo-block {
  display: grid;
  gap: 8px;
}

.access-photo-block span,
.access-check-item small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.access-face-preview,
.access-face-empty,
.access-photo-thumb,
.access-photo-empty {
  align-items: center;
  background: #f7faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  justify-content: center;
  min-height: 120px;
  overflow: hidden;
  width: 100%;
}

.access-face-preview,
.access-photo-thumb img {
  height: 120px;
  object-fit: cover;
}

.access-photo-thumb {
  cursor: pointer;
  padding: 0;
}

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

.access-check-item {
  background: #f7faf9;
  border-radius: 8px;
  display: grid;
  gap: 6px;
  min-height: 82px;
  padding: 12px;
}

.access-check-item strong {
  align-items: center;
  color: var(--text);
  display: flex;
  font-size: 16px;
  min-height: 24px;
}

.access-check-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  border-top: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  background: var(--panel-soft);
  color: #455158;
  font-size: 12px;
  font-weight: 700;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.link-btn {
  border: 0;
  background: transparent;
  border-radius: 4px;
  color: var(--primary-dark);
  cursor: pointer;
  min-height: 28px;
  padding: 3px 4px;
}

.link-btn:hover:not(:disabled) {
  background: var(--primary-soft);
}

.face-upload-cell {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

.face-upload-link {
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: var(--primary-dark);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  min-height: 24px;
  padding: 2px 3px;
}

.face-upload-link:hover:not(:disabled) {
  background: var(--primary-soft);
}

.face-upload-link:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.internal-person-table {
  table-layout: fixed;
}

.internal-person-table th,
.internal-person-table td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.internal-person-table th:nth-child(1),
.internal-person-table td:nth-child(1) {
  width: 10%;
}

.internal-person-table th:nth-child(2),
.internal-person-table td:nth-child(2) {
  width: 12%;
}

.internal-person-table th:nth-child(3),
.internal-person-table td:nth-child(3),
.internal-person-table th:nth-child(5),
.internal-person-table td:nth-child(5),
.internal-person-table th:nth-child(9),
.internal-person-table td:nth-child(9) {
  width: 8%;
}

.internal-person-table th:nth-child(4),
.internal-person-table td:nth-child(4),
.internal-person-table th:nth-child(6),
.internal-person-table td:nth-child(6) {
  width: 11%;
}

.internal-person-table th:nth-child(7),
.internal-person-table td:nth-child(7) {
  width: 17%;
}

.internal-person-table th:nth-child(8),
.internal-person-table td:nth-child(8) {
  width: 15%;
}

.danger-link {
  color: var(--danger);
}

.danger-link:hover:not(:disabled) {
  background: #fff0f0;
}

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

.status.ok {
  background: #e9f6f0;
  color: var(--ok);
}

.status.warn {
  background: #fff6df;
  color: var(--warning);
}

.status.bad {
  background: #fff0f0;
  color: var(--danger);
}

.status.info {
  background: #edf4ff;
  color: var(--info);
}

.status.muted {
  background: #eef1f2;
  color: #59666d;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.45fr);
  gap: 16px;
}

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

.compact-list {
  gap: 8px;
}

.compact-list .actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.home-click-panel {
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.home-click-panel:hover {
  border-color: rgba(31, 135, 232, 0.45);
  box-shadow: 0 16px 34px rgba(18, 35, 47, 0.12);
  transform: translateY(-1px);
}

.home-click-panel:focus-visible {
  border-color: rgba(31, 135, 232, 0.7);
  outline: 3px solid rgba(31, 135, 232, 0.2);
  outline-offset: 2px;
}

.list-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.list-row strong,
.list-row small {
  display: block;
}

.list-row small {
  margin-top: 4px;
  color: var(--muted);
}

.empty {
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.modal {
  border: 0;
  border-radius: 8px;
  max-width: min(680px, calc(100vw - 24px));
  width: 680px;
  padding: 0;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.modal::backdrop {
  background: rgba(20, 30, 34, 0.42);
}

.modal-panel {
  display: grid;
  max-height: min(82vh, 760px);
}

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

.modal-header {
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
}

.modal-body {
  display: grid;
  gap: 14px;
  overflow: auto;
  padding: 18px;
}

.modal-footer {
  border-top: 1px solid var(--line);
  justify-content: flex-end;
}

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

.field {
  display: grid;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

.hidden {
  display: none !important;
}

.field-help,
.face-upload-summary small {
  color: var(--muted);
  font-size: 12px;
}

.face-upload-summary {
  background: var(--panel-soft);
  border-radius: 6px;
  padding: 12px;
}

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

.face-upload-summary strong {
  margin: 4px 0;
}

.member-face-preview {
  border-radius: 6px;
  display: block;
  max-height: 220px;
  max-width: 100%;
  object-fit: contain;
}

.face-capture-panel {
  display: grid;
  gap: 14px;
  min-width: min(620px, 82vw);
}

.face-capture-status {
  background: #eef6f8;
  border-radius: 6px;
  color: var(--primary);
  font-weight: 800;
  line-height: 1.5;
  padding: 12px;
}

.face-capture-status.ok {
  background: #e9f8f1;
  color: #0f7b55;
}

.face-capture-status.bad {
  background: #fff0ef;
  color: #d64a42;
}

.face-capture-grid {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: 220px minmax(0, 1fr);
}

.face-capture-qr {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  height: 220px;
  padding: 10px;
  width: 220px;
}

.face-capture-url {
  background: var(--panel-soft);
  border-radius: 6px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.face-capture-url span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.face-capture-url strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .face-capture-panel {
    min-width: 0;
  }

  .face-capture-grid {
    grid-template-columns: 1fr;
  }

  .face-capture-qr {
    height: min(280px, 72vw);
    justify-self: center;
    width: min(280px, 72vw);
  }
}

.audit-detail {
  display: grid;
  gap: 14px;
}

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

.audit-diff h3 {
  margin: 0 0 8px;
}

.audit-diff pre {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.6;
  margin: 0;
  max-height: 260px;
  overflow: auto;
  padding: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

label {
  color: #4e5a61;
  font-size: 12px;
  font-weight: 700;
}

input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 38px;
  padding: 8px 10px;
  width: 100%;
}

.password-control {
  position: relative;
}

.password-control input {
  padding-right: 42px;
}

.password-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
}

.password-toggle svg {
  fill: none;
  height: 24px;
  stroke: #2f3a3f;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
  width: 24px;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: rgba(111, 125, 132, 0.08);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.toast {
  display: none;
  border-radius: 6px;
  margin-bottom: 14px;
  padding: 10px 12px;
}

.toast.show {
  display: block;
}

.toast.ok {
  background: #e9f6f0;
  color: var(--ok);
}

.toast.bad {
  background: #fff0f0;
  color: var(--danger);
}

.rule-list {
  margin: 0;
  padding-left: 18px;
  color: #4b5960;
}

.rule-list li {
  margin: 7px 0;
}

.muted-text {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 0;
}

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

.detail-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.detail-item small {
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}

.detail-item strong {
  display: block;
}

.detail-block {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.detail-block h3 {
  font-size: 15px;
  margin-bottom: 8px;
}

.detail-block ul {
  margin: 0;
  padding-left: 18px;
}

.detail-block li {
  margin: 7px 0;
}

.detail-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.detail-page {
  display: grid;
  gap: 16px;
}

.detail-hero {
  align-items: flex-start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 18px;
}

.detail-hero h2 {
  font-size: 24px;
  margin: 8px 0 6px;
}

.detail-hero p {
  color: var(--muted);
  margin-bottom: 0;
}

.detail-list ul {
  margin: 0;
  padding-left: 18px;
}

.detail-list li {
  margin: 7px 0;
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.segmented-btn {
  background: var(--primary-soft);
  border: 0;
  border-radius: 7px;
  color: var(--primary-dark);
  cursor: pointer;
  font-weight: 700;
  padding: 8px 14px;
}

.segmented-btn.active {
  background: var(--primary);
  border: 0;
  color: #fff;
}

.role-permission-page {
  align-content: start;
}

.role-permission-filter {
  border-bottom: 1px solid var(--line);
}

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

.role-segmented {
  margin-bottom: 0;
}

.role-segmented .segmented-btn {
  align-items: center;
  background: rgba(64, 89, 102, 0.08);
  color: var(--primary-dark);
  display: inline-flex;
  gap: 8px;
  min-height: 38px;
}

.role-segmented .segmented-btn.active {
  background: var(--primary);
  color: #fff;
}

.role-segmented .segmented-btn span {
  color: inherit;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.82;
}

.role-permission-panel {
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  box-shadow: none;
}

.role-permission-panel-title {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding-bottom: 12px;
}

.role-permission-panel-title strong {
  font-size: 16px;
}

.role-permission-panel-title span,
.permission-module-meta span {
  color: var(--muted);
  font-size: 13px;
}

.permission-module-row {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 14px;
  grid-template-columns: 150px 1fr;
  padding: 16px 0;
}

.permission-module-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.permission-module-meta {
  display: grid;
  gap: 6px;
  align-content: start;
}

.permission-list {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.permission-toggle {
  align-items: center;
  background: #f7f9fb;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  display: grid;
  gap: 6px 8px;
  grid-template-columns: auto 1fr;
  min-height: 42px;
  padding: 8px 10px;
}

.permission-toggle input {
  accent-color: var(--primary);
  height: 16px;
  width: 16px;
}

.permission-toggle span {
  font-weight: 700;
}

.permission-toggle small {
  color: var(--muted);
  grid-column: 2;
}

.permission-toggle.is-disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.save-bar {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 180px 1fr auto;
}

.role-save-bar {
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  box-shadow: none;
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .sidebar {
    max-height: 38vh;
    position: static;
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-grid,
  .split,
  .form-grid,
  .detail-grid,
  .permission-list,
  .permission-module-row,
  .member-filter-grid,
  .save-bar,
  .home-panel-grid,
  .home-panel-grid.wide {
    grid-template-columns: 1fr;
  }

  .member-page-head,
  .member-filter-row,
  .member-pager {
    align-items: flex-start;
    flex-direction: column;
  }

  .reservation-week-head {
    grid-template-columns: 1fr;
  }

  .reservation-legend {
    justify-content: flex-start;
  }

  .member-page-actions {
    justify-content: flex-start;
  }

  .member-filter-field,
  .member-filter-field.keyword,
  .member-filter-field.reservation-course,
  .member-filter-field.reservation-keyword,
  .member-filter-field.reservation-coach,
  .member-filter-field.adjustment-keyword,
  .member-filter-field.adjustment-operator,
  .member-filter-field.adjustment-card-name,
  .member-filter-field.adjustment-type,
  .member-filter-field.adjustment-date {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .home-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-income {
    grid-template-columns: 1fr;
  }

  .workspace {
    height: 100%;
    padding: 16px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions,
  .operator-switch {
    width: 100%;
  }

  .operator-switch select {
    flex: 1;
  }

  .pager,
  .toolbar,
  .detail-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .detail-actions {
    justify-content: flex-start;
  }

  .compact-list .actions {
    justify-content: flex-start;
  }

  .login-screen .workspace {
    padding: 0;
  }

  .login-landing {
    background:
      radial-gradient(circle at 50% 12%, rgba(28, 196, 167, 0.24), transparent 38%),
      linear-gradient(180deg, #111b24 0%, #101820 52%, #f7f8f4 52.2%, #ffffff 100%);
    grid-template-columns: 1fr;
    min-height: 100vh;
    padding: 24px 18px;
  }

  .login-visual {
    min-height: 240px;
  }

  .login-brand-block {
    left: 6px;
    top: 6px;
  }

  .login-athlete {
    bottom: -34px;
    left: -120px;
    max-height: none;
    opacity: 0.76;
    width: 620px;
  }

  .login-panel {
    align-self: start;
    justify-self: center;
    margin: 12px 0 0;
    padding: 28px 22px;
    width: min(430px, 100%);
  }
}
