:root {
  --red: #e60023;
  --ink: #151922;
  --muted: #6d7280;
  --soft: #f5f6f8;
  --line: #e6e8ee;
  --green: #3f8f72;
  --white: #fff;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--soft);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
}

button,
label {
  font: inherit;
}

.admin-shell {
  min-height: 100vh;
  display: block;
}

.admin-shell[hidden] {
  display: none !important;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 50;
  width: 248px;
  height: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  background: #203734;
  color: white;
  padding: 28px 20px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 34px;
}

.brand span {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--red);
  display: grid;
  place-items: center;
  font-weight: 900;
}

.brand small,
.admin-top p,
.section-head span,
.meta,
.record-row p,
.record-row small {
  color: var(--muted);
}

.sidebar nav {
  display: grid;
  gap: 8px;
}

.sidebar a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  padding: 12px;
  border-radius: 8px;
}

.sidebar a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sidebar a.is-active {
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  box-shadow: inset 3px 0 var(--red);
}

.workspace > [id] {
  scroll-margin-top: 24px;
}

.workspace {
  width: calc(100% - 248px);
  margin-left: 248px;
  min-width: 0;
  padding: 28px;
  display: grid;
  gap: 20px;
}

.admin-top,
.panel,
.stat-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-top {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  min-height: 108px;
  padding: 20px 24px;
}

.admin-top-intro {
  min-width: 260px;
}

.admin-top-intro h1 {
  margin-bottom: 6px;
  font-size: 24px;
  line-height: 1.2;
}

.admin-top-intro p {
  margin-bottom: 0;
  font-size: 13px;
  line-height: 1.5;
}

.top-actions {
  display: grid;
  grid-template-columns: minmax(190px, 230px) auto auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.top-user,
.tenant-subscription {
  display: grid;
  gap: 5px;
  min-width: 150px;
  padding: 2px 12px;
  border-left: 1px solid var(--line);
}

.top-user > span,
.tenant-subscription > span,
.studio-switch > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.current-admin {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
}

.tenant-subscription strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
  white-space: nowrap;
}

.tenant-subscription strong.is-expired {
  color: var(--red);
}

#open-tenant-qr,
#logout-admin {
  min-height: 40px;
  padding: 0 15px;
  white-space: nowrap;
}

.tenant-qr-modal-card {
  width: min(420px, 100%);
}

.tenant-qr-viewer {
  min-height: 280px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fa;
  overflow: hidden;
}

.tenant-qr-viewer img {
  display: block;
  width: min(280px, 82%);
  aspect-ratio: 1;
  object-fit: contain;
}

.tenant-qr-empty {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  padding: 24px;
}

.tenant-qr-help {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.tenant-qr-download {
  min-height: 42px;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--red);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

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

h1 {
  margin-bottom: 8px;
}

h2 {
  font-size: 20px;
  margin-bottom: 0;
}

button,
.upload-row label {
  border: 0;
  border-radius: 8px;
  min-height: 42px;
  padding: 0 16px;
  background: var(--red);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

button.secondary,
.upload-row .dark {
  background: #151922;
}

button.danger {
  color: var(--red);
  background: #fff4f5;
}

.grid {
  display: grid;
  gap: 16px;
}

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

.stat-card {
  padding: 18px;
}

.stat-card strong {
  display: block;
  color: var(--red);
  font-size: 30px;
  margin-bottom: 4px;
}

.visitor-stat {
  background: #fff7f8;
  border-color: #ffd8de;
}

.panel {
  padding: 20px;
}

#admins {
  padding: 16px;
}

#admins > .section-head {
  margin-bottom: 8px;
}

.member-overview-grid {
  display: grid;
  grid-template-columns: minmax(230px, 0.34fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.visitor-panel {
  background: #fff8f9;
  border-color: #ffd8de;
}

.visitor-panel-count {
  color: var(--red);
  font-size: 28px;
}

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

.visitor-list-row {
  width: 100%;
  min-height: 68px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 3px 10px;
  align-items: center;
  color: var(--ink);
  background: #fff;
  border: 1px solid #f3c8cf;
  border-radius: 8px;
  text-align: left;
}

.visitor-list-row small {
  color: var(--muted);
  grid-column: 1;
}

.visitor-list-row > span:not(.visitor-list-avatar) {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
}

.visitor-list-avatar {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #f2f4f7;
  color: var(--red);
  font-weight: 800;
}

.visitor-list-avatar img,
.member-head-actions .avatar img,
.member-avatar-edit-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-avatar-fallback {
  width: 100%;
  height: 100%;
  display: none;
  place-items: center;
  color: var(--red);
  font-weight: 800;
}

.visitor-list-row strong,
.visitor-list-row small {
  grid-column: 2;
  margin-left: 8px;
}

.visitor-list-row.active {
  border-color: var(--red);
  box-shadow: 0 0 0 1px var(--red);
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 20px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

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

.section-actions button {
  min-height: 36px;
  padding: 0 14px;
}

.week-label {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.member-row,
.card-row,
.consumption-row,
.record-row {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.member-row:first-child,
.card-row:first-child,
.consumption-row:first-child,
.record-row:first-child {
  border-top: 0;
}

.member-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.member-head-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.member-head-actions button {
  min-height: 34px;
  padding: 0 14px;
}

.member-action-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.member-note {
  color: var(--muted);
  background: #f8f9fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  line-height: 1.5;
}

.member-consumption-block {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.compact-head {
  margin-bottom: 10px;
}

.compact-head h2 {
  font-size: 18px;
}

.member-table {
  display: grid;
  gap: 8px;
}

.member-table-head,
.member-table-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.9fr 0.9fr auto;
  gap: 12px;
  align-items: center;
}

.member-table-head {
  color: var(--muted);
  font-size: 13px;
  padding: 0 12px 6px;
}

.member-table-row {
  width: 100%;
  min-height: 66px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  text-align: left;
}

.member-table-row.active {
  border-color: var(--red);
  background: #fff8f9;
}

.member-table-row small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.ok,
.warn {
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
}

.ok {
  color: var(--green);
  background: #edf8f3;
}

.warn {
  color: var(--red);
  background: #fff4f5;
}

.avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: transparent;
  color: #151922;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 24px;
  font-weight: 900;
}

.card-row,
.card-option,
.record-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.balance {
  color: var(--red);
  font-size: 24px;
  font-weight: 900;
}

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

.card-row-actions button {
  min-height: 34px;
  padding: 0 12px;
}

.card-catalog {
  display: grid;
  gap: 14px;
}

.card-template {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.card-template h2 {
  margin-bottom: 10px;
}

.card-template p {
  color: var(--muted);
  margin: 5px 0 0;
}

.card-template b {
  color: var(--red);
  display: block;
  text-align: right;
  margin-bottom: 8px;
}

.admin-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(140px, 0.52fr);
  gap: 12px;
  align-items: end;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafbfc;
}

.admin-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

.admin-form input,
.admin-form select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.admin-form input[readonly] {
  color: #5f6878;
  background: #f1f3f6;
  cursor: default;
}

.admin-form > button[type="submit"] {
  grid-column: 5;
  grid-row: 1;
  justify-self: stretch;
  align-self: end;
  min-height: 42px;
}

.admin-studio-field {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-weight: 700;
}

.admin-studio-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  align-items: start;
}

.admin-form .admin-studio-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-studio-options[hidden] {
  display: none;
}

.admin-studio-chip {
  height: 46px;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 12px;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.admin-form .admin-studio-chip {
  display: flex;
  flex: 0 1 280px;
  width: min(280px, 100%);
  height: 40px;
  min-height: 40px;
  gap: 8px;
  align-items: center;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
}

.admin-studio-chip:has(input:checked) {
  border-color: rgba(0, 168, 112, 0.36);
  background: #f0fbf6;
  box-shadow: inset 0 0 0 1px rgba(0, 168, 112, 0.08);
}

.admin-studio-chip input {
  min-height: 0;
  padding: 0;
  width: 14px;
  height: 14px;
  accent-color: var(--green);
  flex: 0 0 auto;
}

.admin-form .admin-studio-chip input[type="checkbox"] {
  min-height: 0;
  width: 16px;
  height: 16px;
  padding: 0;
  margin: 0;
  border-radius: 4px;
}

.admin-studio-chip span {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  line-height: 1;
}

.admin-form .admin-studio-chip span {
  display: flex;
  align-items: center;
  min-width: 0;
}

.admin-studio-chip strong {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-size: 13px;
}

.admin-form .admin-studio-chip strong {
  max-width: 100%;
  font-size: 14px;
  line-height: 1;
}

.admin-studio-chip small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
}

.studio-switch {
  display: grid;
  gap: 6px;
}

.studio-switch select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.studio-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}

.studio-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

.studio-form label small {
  color: #9aa1af;
  font-size: 12px;
  font-weight: 600;
}

.studio-form input,
.studio-form select,
.studio-form textarea {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
}

.studio-form textarea {
  min-height: 150px;
  padding: 12px;
  line-height: 1.65;
  resize: vertical;
}

.studio-address-field {
  grid-column: 1 / -1;
}

.studio-intro-text-field,
.studio-intro-cover-field {
  grid-column: 1 / -1;
}

.studio-inline-form {
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
  width: 100%;
}

.studio-dialog-form .studio-form {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.studio-qr-field {
  display: grid;
  gap: 8px;
  align-content: end;
}

.studio-qr-preview {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
}

.studio-qr-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.studio-logo-preview {
  border-radius: 50%;
  background: transparent;
}

.studio-intro-cover-preview {
  width: 100%;
  height: auto;
  min-height: 160px;
  max-height: none;
  padding: 10px;
  border-radius: 8px;
  position: relative;
  cursor: zoom-in;
}

.studio-intro-cover-preview img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 320px;
  margin: auto;
  object-fit: contain;
  object-position: center;
}

.studio-cover-zoom-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(17, 21, 29, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
}

.studio-cover-viewer-backdrop {
  z-index: 60;
}

.studio-cover-viewer-card {
  width: min(1100px, 100%);
  max-height: calc(100vh - 40px);
  padding: 16px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(17, 21, 29, 0.3);
  display: grid;
  gap: 12px;
}

.studio-cover-viewer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.studio-cover-viewer-head h2 {
  margin: 0;
}

.studio-cover-viewer-image-wrap {
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  background: #f5f7fa;
  border-radius: 8px;
}

.studio-cover-viewer-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 130px);
  object-fit: contain;
}

.studio-upload-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: stretch;
}

.studio-upload-actions .contact-upload-button {
  min-height: 36px;
  padding: 0 10px;
}

.studio-upload-actions .subtle {
  min-height: 36px;
  padding: 0 10px;
}

.studio-inline-actions {
  display: flex;
  gap: 8px;
  align-items: end;
}

.studio-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.studio-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.studio-row.active {
  border-color: var(--green);
  background: #f2fbf7;
}

.studio-row p {
  margin: 4px 0 0;
  color: var(--muted);
}

.studio-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.studio-actions span {
  color: var(--muted);
  font-weight: 800;
}

.studio-actions span.on,
.studio-actions span.off {
  min-width: 58px;
  text-align: center;
  border-radius: 999px;
  padding: 7px 10px;
}

.studio-actions span.on {
  color: #168454;
  background: #eaf8f1;
}

.studio-actions span.off {
  color: #7a8190;
  background: #f1f3f6;
}

.admin-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.admin-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  background: #fff;
}

.admin-row.active {
  border-color: rgba(231, 0, 43, 0.36);
  background: linear-gradient(90deg, #fff8f9 0%, #fff 62%);
}

.admin-row p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.admin-row-main {
  display: grid;
  grid-template-columns: minmax(210px, auto) minmax(110px, 150px) minmax(180px, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.admin-row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-row-title strong {
  font-size: 16px;
}

.admin-role-badge,
.admin-current-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.admin-platform-note {
  color: #7b8493;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.admin-role-badge {
  color: #168454;
  background: #eaf8f1;
}

.admin-role-badge.super {
  color: var(--red);
  background: #fff0f3;
}

.admin-current-badge {
  color: #5f6878;
  background: #f1f3f6;
}

.admin-scope-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 0;
}

.admin-scope-list span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  max-width: 260px;
  border-radius: 999px;
  background: #f5f7fa;
  color: #687182;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 21, 29, 0.42);
  display: grid;
  place-items: center;
  z-index: 30;
  padding: 20px;
}

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

.open-card-modal {
  width: min(560px, 100%);
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 24px 70px rgba(17, 21, 29, 0.28);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.open-card-modal .section-head,
.open-card-modal .check-group,
.open-card-modal .wide-field,
.open-card-modal > button {
  grid-column: 1 / -1;
}

.open-card-modal label {
  color: var(--muted);
  background: transparent;
  min-height: auto;
  padding: 0;
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.member-avatar-edit-field {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.member-avatar-edit-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.member-avatar-edit-preview {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #f2f4f7;
  color: var(--red);
  font-size: 24px;
  font-weight: 800;
}

.open-card-modal .check-group {
  color: var(--muted);
  display: grid;
  grid-template-columns: 72px repeat(3, minmax(92px, 1fr));
  gap: 10px;
  align-items: center;
  font-weight: 700;
}

.booking-list-modal {
  position: relative;
  width: min(440px, 100%);
  max-height: min(680px, calc(100vh - 48px));
  overflow: auto;
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 24px 70px rgba(17, 21, 29, 0.28);
}

.booking-list-head {
  display: block;
  margin-bottom: 14px;
  padding-right: 52px;
}

.booking-list-head h3 {
  margin: 0;
  font-size: 22px;
}

.booking-list-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.booking-list-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  min-width: 44px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(17, 21, 29, 0.58);
  color: #fff;
  font-weight: 900;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0 0 3px;
  opacity: 1;
  transition: background 160ms ease, transform 160ms ease;
}

.booking-list-close:hover {
  background: rgba(17, 21, 29, 0.82);
  transform: scale(1.04);
}

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

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

.booking-member-row div {
  display: grid;
  gap: 4px;
}

.booking-member-row span,
.booking-member-row small {
  color: var(--muted);
  font-weight: 700;
}

.booking-member-row-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
  flex: 0 0 auto;
}

.booking-action-buttons {
  display: flex !important;
  justify-content: flex-end;
  align-items: center;
  gap: 8px !important;
}

.booking-sign-button,
.booking-cancel-button {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 7px;
  font-weight: 800;
  cursor: pointer;
}

.booking-sign-button {
  border: 1px solid rgba(112, 136, 128, 0.3);
  background: #708880;
  color: #fff;
}

.booking-sign-button:hover {
  background: #5f766e;
}

.booking-sign-button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.booking-cancel-button {
  border: 1px solid rgba(235, 0, 32, 0.2);
  background: #fff4f5;
  color: var(--red);
}

.booking-cancel-button:hover {
  background: #ffe3e6;
}

.open-card-modal .check-group > span {
  line-height: 36px;
}

.open-card-modal .check-group label {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  white-space: nowrap;
}

.open-card-modal .studio-check-group {
  display: grid;
  grid-template-columns: 86px 1fr;
  align-items: start;
  gap: 10px;
}

.open-card-modal .studio-check-group[hidden] {
  display: none;
}

.open-card-modal .studio-check-group > span {
  line-height: 38px;
}

.open-card-modal .studio-options {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.open-card-modal .studio-check-group label {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  min-height: 38px;
  height: auto;
  margin: 0;
  justify-content: flex-start;
  white-space: normal;
  line-height: 1.35;
  padding: 8px 12px;
}

.open-card-modal .check-group input {
  width: 14px;
  height: 14px;
  min-height: 0;
  padding: 0;
}

.open-card-modal input,
.open-card-modal select,
.open-card-modal textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
}

.open-card-modal textarea {
  min-height: 92px;
  padding: 10px 12px;
  resize: vertical;
}

.course-form {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
  margin-bottom: 20px;
  padding: 16px;
  background: #fafbfc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.teacher-form {
  display: grid;
  grid-template-columns: 136px repeat(5, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
  margin-bottom: 16px;
  padding: 16px;
  background: #fafbfc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.teacher-form[hidden] {
  display: none;
}

.teacher-photo-field {
  display: grid;
  gap: 8px;
  align-self: stretch;
}

.teacher-photo-preview {
  width: 100%;
  min-height: 92px;
  border-radius: 8px;
  background: #fff1f2;
  color: var(--red);
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 28px;
  font-weight: 900;
  border: 1px solid var(--line);
}

.teacher-photo-preview img,
.teacher-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.teacher-photo-field .upload-row {
  min-height: 36px;
  padding: 0 12px;
  display: grid;
  place-items: center;
  text-align: center;
}

.teacher-photo-field input[type="file"] {
  display: none;
}

.teacher-form label {
  color: var(--muted);
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.teacher-form .wide-field {
  grid-column: span 2;
}

.teacher-form input,
.teacher-form select,
.teacher-form textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
}

.teacher-form input[type="color"] {
  padding: 4px;
  cursor: pointer;
}

.teacher-form textarea {
  min-height: 108px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.5;
}

.teacher-form .teacher-detail-field {
  grid-column: span 3;
}

.crop-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 21, 29, 0.56);
}

.crop-modal {
  width: min(560px, 100%);
  padding: 20px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(17, 21, 29, 0.28);
}

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

.crop-modal-head strong {
  display: block;
  font-size: 22px;
}

.crop-modal-head span {
  color: var(--muted);
}

.crop-preview-wrap {
  width: 320px;
  height: 320px;
  margin: 18px auto;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f8fafc;
}

.crop-preview {
  width: 100%;
  height: 100%;
  display: block;
}

.crop-controls {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.crop-controls label {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 800;
}

.crop-controls input {
  width: 100%;
}

.crop-actions {
  justify-content: flex-end;
}

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

.teacher-add-card {
  min-height: 84px;
  display: grid;
  grid-template-columns: 48px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  justify-items: start;
  text-align: left;
  border: 1px dashed var(--red);
  background: #fff8f9;
  color: var(--ink);
  padding: 14px;
}

.teacher-add-card span {
  grid-row: span 2;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--red);
  font-size: 28px;
  font-weight: 900;
}

.teacher-add-card strong {
  font-size: 16px;
}

.teacher-add-card small {
  color: var(--muted);
  font-weight: 700;
}

.teacher-card {
  display: grid;
  grid-template-columns: 56px minmax(240px, 1fr) 120px 150px;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.teacher-card.disabled {
  opacity: 0.6;
}

.teacher-card.active {
  border-color: var(--red);
  background: #fffafb;
}

.teacher-avatar {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--red);
  font-size: 20px;
  font-weight: 900;
  overflow: hidden;
}

.teacher-card h3 {
  margin: 0 0 4px;
}

.teacher-card p,
.teacher-card small {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.teacher-meta {
  display: grid;
  gap: 6px;
  justify-items: start;
}

.teacher-meta span {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 900;
}

.teacher-meta .ok {
  color: var(--green);
  background: #eef8f4;
}

.teacher-meta .warn {
  color: var(--red);
  background: #fff1f2;
}

.teacher-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
  margin-right: 6px;
  vertical-align: -1px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.teacher-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.teacher-actions button {
  min-height: 36px;
  padding: 0 12px;
}

.course-form label {
  color: var(--muted);
  background: transparent;
  min-height: auto;
  padding: 0;
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.course-form label small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  margin-top: -2px;
}

.course-form input,
.course-form select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
}

.course-form .check-field,
.open-card-modal .check-field {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 12px;
}

.course-form .check-field input,
.open-card-modal .check-field input {
  width: 16px;
  min-height: 16px;
}

.course-form button[type="submit"] {
  width: 100%;
  min-height: 44px;
  grid-column: 6 / span 2;
}

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

.private-request-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  max-width: 620px;
  margin-bottom: 14px;
  padding: 6px;
  border-radius: 10px;
  background: #edf0ef;
}

.private-request-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid transparent;
  color: #65736e;
  background: transparent;
}

.private-request-tab strong {
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  color: #68756f;
  font-size: 12px;
  line-height: 18px;
  background: #dde3e0;
  box-sizing: border-box;
}

.private-request-tab.active {
  border-color: #d9e2de;
  color: #314c43;
  background: #fff;
  box-shadow: 0 3px 10px rgba(43, 66, 58, 0.08);
}

.private-request-tab.active strong {
  color: #fff;
  background: #708880;
}

.private-request-list {
  display: grid;
  gap: 12px;
}

.private-request-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.private-request-card.overdue {
  border-left: 4px solid #d6972d;
  background: #fffaf1;
}

.private-request-card.history {
  gap: 12px;
  padding: 12px 14px;
  background: #fafbfa;
}

.private-request-card.history .private-request-details {
  margin-top: 8px;
}

.private-request-card.history .private-request-note {
  margin-top: 6px !important;
}

.private-request-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.private-request-title-row strong {
  font-size: 18px;
}

.private-request-main > p {
  margin: 0;
  color: var(--muted);
}

.private-request-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.private-request-status.pending {
  color: #9a5b00;
  background: #fff4d9;
}

.private-request-status.confirmed {
  color: #23725e;
  background: #e7f6f0;
}

.private-request-status.signed {
  color: #fff;
  background: #708880;
}

.private-request-status.closed {
  color: #6f7786;
  background: #eef0f3;
}

.private-request-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
  margin: 14px 0 0;
}

.private-request-details div {
  min-width: 0;
}

.private-request-details dt {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
}

.private-request-details dd {
  margin: 0;
  font-weight: 700;
}

.private-request-note {
  margin-top: 10px !important;
  line-height: 1.55;
}

.private-request-overdue-note {
  margin-top: 10px !important;
  color: #9a6108 !important;
  font-weight: 700;
}

.private-request-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.private-history-load-more {
  width: 100%;
  min-height: 42px;
}

.private-request-modal textarea {
  resize: vertical;
}

.private-booking-hint {
  margin: -2px 0 0;
  padding: 10px 12px;
  border-left: 3px solid #708880;
  background: #f2f6f4;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.course-date-tabs {
  display: grid;
  grid-template-columns: 72px repeat(7, minmax(132px, 1fr));
  gap: 0;
  margin: 6px 0 0;
  align-items: stretch;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #fff;
}

.schedule-corner,
.schedule-day {
  min-height: 70px;
  background: #fff;
  border: 0;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
}

.schedule-corner {
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

.schedule-day strong {
  color: #55bba2;
  font-size: 15px;
}

.schedule-day span {
  color: #55bba2;
  font-size: 14px;
  font-weight: 800;
}

.schedule-day.active {
  background: #f4fffb;
}

.schedule-grid {
  display: grid;
  grid-template-columns: 72px repeat(7, minmax(132px, 1fr));
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  background: #fff;
}

.schedule-time {
  min-height: 172px;
  border-right: 1px solid var(--line);
  border-left: 0;
  border-top: 0;
  border-bottom: 1px solid var(--line);
  padding-top: 20px;
  background: #fff;
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
}

.schedule-time:hover {
  color: var(--red);
  background: #fff8f9;
}

.schedule-cell {
  min-height: 172px;
  border-right: 1px solid #f1f2f5;
  border-bottom: 1px solid var(--line);
  padding: 10px;
  background: #fff;
}

.schedule-cell.active {
  background: #fffdfd;
}

.schedule-card {
  min-height: 150px;
  border-radius: 8px;
  padding: 10px 9px 9px;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3px;
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.08);
}

.schedule-card + .schedule-card {
  margin-top: 8px;
}

.schedule-card.paused {
  opacity: 0.58;
  filter: grayscale(0.25);
}

.schedule-card-title {
  width: 100%;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.2;
  min-height: 20px;
  max-height: 38px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.schedule-card-theme {
  width: 100%;
  min-height: 16px;
  font-size: 13px;
  line-height: 1.25;
  opacity: 0.9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-card-time {
  font-size: 15px;
  line-height: 1.25;
  font-weight: 900;
}

.schedule-card-coach,
.schedule-card-stars,
.schedule-card-meta {
  font-size: 13px;
  line-height: 1.25;
  font-weight: 800;
}

.schedule-card-stars {
  min-height: 17px;
  color: #ffd34d;
  letter-spacing: 1px;
}

.schedule-card-meta {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  min-height: 24px;
}

.schedule-card-meta span,
.schedule-booked-chip {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 7px;
}

.schedule-booked-chip {
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  line-height: 1.25;
}

.schedule-booked-chip:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--dark);
}

.schedule-card-actions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: auto;
}

.schedule-card-actions button {
  min-height: 26px;
  border-radius: 6px;
  border: 0;
  background: rgba(255, 255, 255, 0.86);
  color: #344054;
  padding: 0 5px;
  font-size: 12px;
  font-weight: 800;
}

.course-admin-row {
  display: grid;
  grid-template-columns: 76px minmax(220px, 1fr) 116px 148px;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: #fff;
}

.course-admin-row.paused {
  opacity: 0.62;
  background: #fafafa;
}

.card-option {
  width: 100%;
  min-height: 68px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  text-align: left;
}

.card-option b {
  color: var(--red);
  font-size: 18px;
}

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

.home-admin-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbfc;
  padding: 16px;
  margin-top: 14px;
}

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

.block-head button {
  flex: 0 0 auto;
}

.block-head h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.block-head span {
  color: var(--muted);
}

.notice-form {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 160px 140px;
  gap: 12px;
  align-items: end;
  margin: 0;
}

.contact-form {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) 180px;
  gap: 14px 18px;
  align-items: start;
  margin: 0;
}

.notice-form label,
.contact-form label {
  color: var(--muted);
  background: transparent;
  min-height: auto;
  padding: 0;
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.notice-title-field {
  grid-column: 1 / 2;
}

.notice-body-field {
  grid-column: 1 / -1;
}

.notice-image-field {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 220px auto;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.notice-image-field strong,
.notice-image-field span {
  display: block;
}

.notice-image-field span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.notice-image-preview {
  height: 92px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #fafbfc;
}

.notice-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

.notice-image-actions .notice-image-upload {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.notice-image-upload input {
  display: none;
}

.notice-form input,
.notice-form textarea,
.contact-form input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
}

.notice-form textarea {
  min-height: 150px;
  padding: 12px;
  resize: vertical;
  line-height: 1.6;
}

.notice-form button {
  min-height: 42px;
  grid-column: 3;
  justify-self: end;
  min-width: 140px;
}

.notice-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 12px;
}

.notice-admin-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.notice-admin-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.notice-admin-row.active {
  border-color: var(--red);
  background: #fff8f9;
}

.notice-admin-row > button:first-child {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 0 8px;
}

.notice-admin-row strong,
.notice-admin-row span {
  display: block;
}

.notice-admin-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.contact-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
  grid-column: 1 / -1;
}

.contact-actions {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  align-self: end;
  grid-column: 2;
  grid-row: 2;
}

.contact-actions button {
  min-height: 42px;
  min-width: 140px;
}

.contact-qr-field {
  align-self: start;
  justify-self: start;
  grid-column: 1;
  grid-row: 2;
}

.contact-qr-preview {
  width: 92px;
  height: 92px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 13px;
}

.contact-qr-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.contact-upload-button {
  width: 92px;
  min-height: 34px;
  border-radius: 8px;
  background: #151922;
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.contact-upload-button input {
  display: none;
}

.banner-thumb {
  min-height: 170px;
  border: 2px solid transparent;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  color: white;
  position: relative;
  overflow: hidden;
}

.banner-thumb-select {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  border-radius: 0;
  min-height: 0;
  padding: 0;
  background: transparent;
  color: inherit;
}

.banner-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.65));
}

.banner-thumb span {
  position: relative;
  z-index: 3;
  padding: 0 12px 12px;
}

.banner-thumb.active {
  border-color: var(--red);
}

.banner-delete-button {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 999px;
  background: rgba(21, 25, 34, 0.82);
  color: #fff;
  font-size: 20px;
  line-height: 1;
}

.banner-delete-button:hover {
  background: var(--red);
}

.banner-link-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px minmax(220px, 1fr) 150px;
  gap: 12px;
  align-items: end;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.banner-link-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

.banner-link-form input,
.banner-link-form select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
}

.banner-link-form button {
  min-height: 42px;
}

.upload-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.upload-row label {
  display: grid;
  place-items: center;
}

.upload-row input {
  display: none;
}

.photo-wall-upload {
  border-radius: 8px;
  min-height: 42px;
  padding: 0 16px;
  background: var(--red);
  color: white;
  font-weight: 800;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.section-actions .photo-wall-upload {
  margin: 0;
}

.photo-wall-upload input {
  display: none;
}

.photo-wall-upload.small {
  min-height: 38px;
  padding: 0 12px;
  font-size: 13px;
}

.photo-wall-form {
  display: grid;
  grid-template-columns: 160px minmax(180px, 1fr) minmax(240px, 2fr) 120px 100px;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
  padding: 14px;
  background: #fafbfc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.photo-upload-form {
  grid-template-columns: 240px 1fr;
  align-items: center;
}

.photo-upload-form span {
  color: var(--muted);
  font-weight: 700;
}

.photo-wall-form label {
  color: var(--muted);
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.photo-wall-form input,
.photo-wall-form select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
}

.photo-album-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.photo-album-cover {
  width: 132px;
  aspect-ratio: 4 / 3;
  border: 0;
  border-radius: 8px;
  background: #f2f4f7;
  color: var(--muted);
  display: grid;
  place-items: center;
  overflow: hidden;
  margin: 0;
  padding: 0;
  cursor: pointer;
}

.photo-album-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.photo-album-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin: 0;
}

.photo-album-copy {
  min-width: 0;
}

.photo-album-copy p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-album-title {
  border: 0;
  background: transparent;
  color: var(--ink);
  min-height: auto;
  padding: 0;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}

.album-view-modal {
  width: min(860px, 100%);
  max-height: 86vh;
  overflow: auto;
}

.album-photo-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.photo-wall-list {
  display: grid;
  gap: 14px;
}

.photo-wall-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.album-photo-card {
  cursor: grab;
}

.album-photo-card.dragging {
  opacity: 0.55;
}

.album-photo-card.drag-over {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(235, 0, 32, 0.12);
}

.photo-delete-button {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  min-height: 28px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: rgba(17, 21, 29, 0.84);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
  z-index: 2;
}

.photo-wall-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #f2f4f7;
  display: block;
}

.photo-wall-card div {
  padding: 10px 12px;
}

.photo-wall-card strong {
  display: block;
  margin-bottom: 4px;
}

.photo-wall-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.photo-wall-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding-top: 0 !important;
}

.photo-wall-actions button,
.photo-wall-actions .photo-wall-upload.small {
  width: auto;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
}

.photo-wall-actions .photo-wall-upload.small {
  background: #151922;
}

@media (max-width: 600px) {
  .photo-album-card {
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
  }

  .photo-album-cover {
    width: 96px;
  }

  .photo-album-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .photo-wall-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

.record-type {
  width: 46px;
  height: 28px;
  border-radius: 999px;
  background: #fff4f5;
  color: var(--red);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
}

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

.record-actions button {
  min-height: 32px;
  padding: 0 12px;
}

.consumption-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr auto;
  gap: 14px;
  align-items: center;
}

.member-consumption-block .consumption-row {
  grid-template-columns: 1.2fr 1fr auto;
}

.consumption-row p,
.consumption-row small {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.empty {
  color: var(--muted);
  background: #f8f9fb;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
}

.empty.compact {
  padding: 14px 16px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(21, 25, 34, 0.92);
  color: white;
  padding: 11px 16px;
  border-radius: 999px;
  opacity: 0;
  transition: 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #11151d, #2a1117);
  overflow-x: hidden;
}

.login-screen[hidden] {
  display: none;
}

.login-card {
  width: min(420px, 100%);
  max-width: 100%;
  display: grid;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 28px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.login-brand {
  color: var(--ink);
  margin-bottom: 6px;
}

.login-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

.login-card input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
}

.login-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

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

  .member-overview-grid,
  .two-col,
  .stats,
  .banner-list,
  .notice-form,
  .contact-form,
  .banner-link-form,
  .admin-form,
  .studio-form,
  .studio-row,
  .photo-wall-form,
  .photo-wall-list,
  .course-form,
  .teacher-form,
  .teacher-card,
  .course-admin-row,
  .card-template,
  .open-card-modal,
  .member-table-head,
  .member-table-row,
  .consumption-row {
    grid-template-columns: 1fr;
  }

  .admin-form > button[type="submit"] {
    grid-column: 1;
    grid-row: auto;
  }

  .admin-studio-options {
    grid-template-columns: 1fr;
  }

  .admin-studio-field {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .admin-form .admin-studio-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-form .admin-studio-chip {
    width: 100%;
    max-width: none;
  }

  .admin-row-main {
    display: block;
  }

  .admin-row p {
    margin-top: 4px;
  }

  .admin-scope-list {
    margin-top: 8px;
  }

  .member-table-head {
    display: none;
  }

  .open-card-modal .check-group {
    grid-template-columns: 1fr;
  }

  .open-card-modal .check-group > span {
    line-height: 1.2;
  }

  .teacher-form .wide-field {
    grid-column: 1;
  }

  .teacher-form .teacher-detail-field {
    grid-column: 1;
  }

  .teacher-photo-field {
    grid-column: 1;
  }

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

  .contact-fields {
    grid-template-columns: 1fr;
  }

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

  .notice-image-field {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .notice-image-actions {
    justify-content: flex-start;
  }

  .notice-form > button[type="submit"] {
    grid-column: 1;
    width: 100%;
    min-width: 0;
    justify-self: stretch;
  }

  .notice-image-preview {
    width: 100%;
    height: auto;
    min-height: 150px;
    aspect-ratio: 16 / 7;
  }

  .notice-admin-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .notice-admin-row > button:first-child {
    min-width: 0;
    overflow: hidden;
  }

  .notice-admin-row strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .teacher-actions {
    grid-template-columns: 1fr 1fr;
  }

  .course-date-tabs,
  .schedule-grid {
    grid-template-columns: 64px repeat(7, minmax(124px, 1fr));
  }

  .course-admin-time {
    width: 76px;
  }

  .course-admin-meta {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .course-admin-actions {
    grid-template-columns: 1fr 1fr;
  }

  .section-actions {
    width: 100%;
    justify-content: space-between;
  }

  .course-form button[type="submit"] {
    grid-column: 1;
  }
}

/* Mobile browser administration */
@media (max-width: 1180px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    -webkit-text-size-adjust: 100%;
  }

  .admin-shell {
    display: block;
    min-width: 0;
  }

  .sidebar {
    position: sticky;
    top: 0;
    left: auto;
    bottom: auto;
    z-index: 40;
    height: auto;
    overflow-y: visible;
    overscroll-behavior: auto;
    scrollbar-gutter: auto;
    width: 100%;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 24px rgba(17, 21, 29, 0.14);
  }

  .brand {
    flex: 0 0 auto;
    gap: 8px;
    margin: 0;
  }

  .brand span {
    width: 34px;
    height: 34px;
    border-radius: 7px;
  }

  .brand strong {
    display: block;
    max-width: 108px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
  }

  .brand small {
    display: none;
  }

  .sidebar nav {
    min-width: 0;
    flex: 1;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .sidebar nav::-webkit-scrollbar {
    display: none;
  }

  .sidebar a {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 8px 10px;
    display: inline-flex;
    align-items: center;
    border-radius: 7px;
    font-size: 13px;
    white-space: nowrap;
  }

  .sidebar a.is-active {
    box-shadow: inset 0 -2px var(--red);
  }

  .workspace > [id] {
    scroll-margin-top: 76px;
  }

  .workspace {
    width: 100%;
    margin-left: 0;
    min-width: 0;
    padding: 12px;
    gap: 12px;
  }

  .admin-top {
    padding: 16px;
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-top h1 {
    font-size: 22px;
    margin-bottom: 4px;
  }

  .admin-top p {
    margin-bottom: 0;
    font-size: 13px;
    line-height: 1.5;
  }

  .top-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    padding: 10px;
  }

  .top-actions .studio-switch {
    grid-column: 1 / -1;
  }

  .tenant-subscription {
    grid-column: 1;
  }

  .top-user {
    grid-column: 2;
  }

  .top-user,
  .tenant-subscription {
    min-width: 0;
    padding: 2px 4px;
    border-left: 0;
  }

  #open-tenant-qr {
    grid-column: 1;
  }

  #logout-admin {
    grid-column: 2;
  }

  .top-actions button,
  .top-actions select {
    width: 100%;
  }

  .panel,
  .stat-card {
    min-width: 0;
    padding: 14px;
  }

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

  .stat-card strong {
    font-size: 25px;
  }

  .section-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .section-head > div:first-child {
    min-width: 0;
  }

  .section-head h2 {
    font-size: 18px;
  }

  .section-head span {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.45;
  }

  .section-actions {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .section-actions::-webkit-scrollbar {
    display: none;
  }

  .section-actions > * {
    flex: 0 0 auto;
  }

  input,
  select,
  textarea,
  button {
    max-width: 100%;
  }

  .member-card-head,
  .member-action-row,
  .record-actions {
    flex-wrap: wrap;
  }

  .member-head-actions {
    justify-items: end;
  }

  .visitor-list-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .member-table-row {
    gap: 7px;
    padding: 12px;
  }

  .member-table-row > * {
    min-width: 0;
  }

  .course-admin-list {
    width: calc(100% + 4px);
    overflow-x: auto;
    padding: 0 2px 8px;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  .private-request-card {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px;
  }

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

  .private-request-actions {
    width: 100%;
  }

  .private-request-actions button {
    flex: 1;
  }

  .course-date-tabs,
  .schedule-grid {
    width: 1050px;
    min-width: 1050px;
    overflow: visible;
  }

  .course-date-tabs {
    margin-top: 4px;
  }

  .schedule-card {
    min-height: 148px;
  }

  .photo-wall-list,
  .teacher-list,
  .banner-list {
    gap: 10px;
  }

  .photo-wall-card img,
  .banner-card img,
  .teacher-card img {
    max-width: 100%;
  }

  .modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .open-card-modal,
  .booking-list-modal,
  .crop-modal,
  .album-view-modal {
    width: 100%;
    max-width: none;
    max-height: min(88vh, 760px);
    overflow-y: auto;
    border-radius: 12px 12px 0 0;
    padding: 18px 14px calc(18px + env(safe-area-inset-bottom));
  }

  .booking-member-row {
    align-items: flex-start;
  }

  .booking-member-row-actions {
    min-width: 88px;
  }

  .login-screen {
    padding: 16px;
  }

  .login-card {
    padding: 22px 18px;
  }
}

@media (max-width: 600px) {
  .login-screen {
    padding: 12px;
  }

  .login-card {
    width: min(420px, 100%);
    max-width: 420px;
    padding: 22px 18px;
  }

  .sidebar {
    gap: 8px;
  }

  .brand strong {
    display: none;
  }

  .workspace {
    padding: 10px;
  }

  .admin-top,
  .panel,
  .stat-card {
    border-radius: 7px;
  }

  .top-actions {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .top-actions button {
    min-height: 40px;
    padding: 0 10px;
    font-size: 13px;
  }

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

  .stat-card {
    min-height: 92px;
  }

  .section-head > button {
    min-height: 38px;
    padding: 0 12px;
  }

  .member-card-head {
    align-items: flex-start;
  }

  .member-head-actions {
    width: auto;
  }

  .member-action-row {
    justify-content: flex-end;
  }

  .photo-wall-actions,
  .teacher-actions,
  .course-admin-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .notice-image-actions,
  .contact-actions,
  .record-actions {
    width: 100%;
    justify-content: stretch;
  }

  .notice-image-actions button,
  .notice-image-actions .notice-image-upload,
  .contact-actions button,
  .record-actions button {
    flex: 1;
  }

  #banner.panel {
    padding: 12px;
  }

  #banner .home-admin-block {
    padding: 12px;
    margin-top: 10px;
  }

  #banner .block-head {
    margin-bottom: 12px;
  }

  .notice-form {
    gap: 10px;
  }

  .notice-form input,
  .notice-form textarea {
    min-width: 0;
    font-size: 16px;
  }

  .notice-image-field {
    padding: 10px;
    gap: 10px;
  }

  .notice-image-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .notice-image-actions button,
  .notice-image-actions .notice-image-upload {
    grid-column: auto;
    width: 100%;
    min-width: 0;
    padding: 0 10px;
    justify-self: stretch;
  }

  .notice-actions #new-notice {
    width: 100%;
  }

  .notice-admin-row {
    gap: 6px;
    padding: 7px;
  }

  .notice-admin-row > button:last-child {
    min-width: 62px;
    padding: 0 10px;
  }

  .open-card-modal input,
  .open-card-modal select,
  .open-card-modal textarea {
    font-size: 16px;
  }

  .open-card-modal .studio-check-group {
    grid-template-columns: 1fr;
  }

  .open-card-modal .studio-check-group > span {
    line-height: 1.3;
  }

  .booking-member-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

/* Compact operations layout: keep the single-page workflow while improving scanability. */
@media (min-width: 1181px) {
  .sidebar {
    width: 224px;
    padding: 22px 16px;
  }

  .workspace {
    width: calc(100% - 224px);
    margin-left: 224px;
    padding: 22px;
    gap: 16px;
  }
}

.brand {
  margin-bottom: 22px;
}

.brand span {
  width: 40px;
  height: 40px;
}

.brand strong {
  display: block;
  line-height: 1.25;
}

.brand small {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.35;
}

.sidebar nav {
  gap: 3px;
}

.nav-section-label {
  display: block;
  margin: 16px 10px 5px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.nav-section-label:first-child {
  margin-top: 0;
}

.sidebar a {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 9px 12px;
  font-size: 14px;
}

.admin-top {
  min-height: 0;
  padding: 16px 20px;
  gap: 18px;
}

.admin-top-intro {
  min-width: 210px;
}

.admin-top-intro h1 {
  margin: 0 0 4px;
  font-size: 21px;
}

.admin-top-intro p {
  font-size: 12px;
}

.top-actions {
  grid-template-columns: minmax(176px, 220px) auto auto auto auto;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
}

.top-user,
.tenant-subscription {
  min-width: 122px;
  padding: 0 10px;
}

.studio-switch select,
#open-tenant-qr,
#logout-admin {
  min-height: 36px;
}

#open-tenant-qr,
#logout-admin {
  padding: 0 12px;
  font-size: 13px;
}

.panel {
  padding: 18px;
}

.section-head {
  margin-bottom: 12px;
}

.section-head h2 {
  font-size: 18px;
  line-height: 1.3;
}

.section-head span,
.block-head span {
  display: inline-block;
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.45;
}

button,
.upload-row label {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 7px;
  font-size: 13px;
}

button.secondary,
.upload-row .dark {
  border: 1px solid #d9dde5;
  background: #fff;
  color: var(--ink);
}

button.secondary:hover,
.upload-row .dark:hover {
  border-color: #b9c0cc;
  background: #f6f7f9;
}

.grid {
  gap: 12px;
}

.stat-card {
  min-height: 98px;
  padding: 15px 16px;
}

.stat-card strong {
  font-size: 26px;
}

.member-overview-grid,
.two-col {
  gap: 16px;
}

.member-overview-grid {
  grid-template-columns: minmax(230px, 0.3fr) minmax(0, 1fr);
}

.member-table-row {
  min-height: 58px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.member-row,
.card-row,
.consumption-row,
.record-row {
  padding: 12px 0;
}

.home-admin-block {
  margin-top: 12px;
  padding: 14px;
  background: #fbfcfd;
}

.admin-form,
.studio-form,
.teacher-form,
.course-form {
  gap: 11px;
}

.admin-form,
.teacher-form,
.course-form {
  padding: 14px;
  margin-bottom: 14px;
}

.admin-form input,
.admin-form select,
.studio-form input,
.studio-form select,
.studio-form textarea,
.teacher-form input,
.teacher-form select,
.course-form input,
.course-form select {
  min-height: 40px;
}

.admin-form > button[type="submit"] {
  min-height: 40px;
}

.admin-form .admin-studio-chip {
  height: 38px;
  min-height: 38px;
}

.teacher-form {
  grid-template-columns: 120px repeat(4, minmax(0, 1fr));
}

.teacher-form .teacher-detail-field {
  grid-column: span 2;
}

.teacher-photo-preview {
  min-height: 84px;
}

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

.course-form button[type="submit"] {
  grid-column: 4 / span 2;
  min-height: 40px;
}

.teacher-card,
.course-admin-row,
.private-request-card,
.studio-row,
.admin-row {
  padding: 12px 14px;
}

.teacher-card {
  grid-template-columns: 52px minmax(220px, 1fr) 110px 144px;
}

.private-request-card {
  gap: 14px;
}

.private-request-details {
  margin-top: 10px;
}

.admin-row-main {
  grid-template-columns: minmax(190px, auto) minmax(96px, 130px) minmax(160px, 1fr);
}

.admin-list,
.studio-list,
.teacher-list,
.course-admin-list,
.private-request-list {
  gap: 8px;
}

@media (max-width: 1500px) and (min-width: 1181px) {
  .admin-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
    grid-template-columns: minmax(180px, 1fr) auto auto auto auto;
  }

  .teacher-form,
  .course-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .course-form button[type="submit"] {
    grid-column: span 2;
  }

  .teacher-card {
    grid-template-columns: 52px minmax(190px, 1fr) 110px;
  }

  .teacher-actions {
    grid-column: 2 / -1;
    justify-self: end;
  }
}

@media (max-width: 1180px) {
  .sidebar {
    padding: max(8px, env(safe-area-inset-top)) 10px 8px;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(17, 21, 29, 0.14);
  }

  .brand {
    min-width: max-content;
    margin: 0 6px 0 0;
  }

  .brand span {
    width: 34px;
    height: 34px;
    border-radius: 7px;
  }

  .brand small,
  .nav-section-label {
    display: none;
  }

  .sidebar nav {
    gap: 4px;
    padding-bottom: 0;
  }

  .sidebar a {
    min-height: 36px;
    padding: 7px 11px;
    font-size: 13px;
    white-space: nowrap;
  }

  .workspace {
    gap: 12px;
  }

  .admin-top {
    padding: 14px;
    gap: 12px;
  }

  .admin-top-intro {
    min-width: 0;
  }

  .admin-top-intro h1 {
    font-size: 19px;
  }

  .top-actions {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .studio-switch {
    grid-column: 1 / -1;
  }

  .top-user,
  .tenant-subscription {
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
  }

  #open-tenant-qr,
  #logout-admin {
    width: 100%;
  }

  .panel {
    padding: 14px;
  }

  .member-overview-grid,
  .two-col {
    gap: 12px;
  }

  .teacher-form,
  .course-form {
    padding: 12px;
  }

  .teacher-card,
  .course-admin-row,
  .private-request-card,
  .studio-row,
  .admin-row {
    padding: 11px;
  }

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

@media (max-width: 600px) {
  .workspace {
    padding: 9px;
  }

  .admin-top,
  .panel,
  .stat-card {
    border-radius: 8px;
  }

  .section-head {
    align-items: flex-start;
  }

  .section-head h2 {
    font-size: 17px;
  }

  .section-actions {
    flex-wrap: wrap;
  }

  .stats {
    gap: 9px;
  }

  .stat-card {
    min-height: 84px;
    padding: 12px;
  }

  .stat-card strong {
    font-size: 23px;
  }

  .top-actions {
    grid-template-columns: 1fr 1fr;
  }

  .teacher-card,
  .course-admin-row,
  .private-request-card,
  .studio-row,
  .admin-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .teacher-actions,
  .private-request-actions,
  .studio-actions {
    width: 100%;
    justify-content: stretch;
  }

  .teacher-actions button,
  .private-request-actions button,
  .studio-actions button {
    flex: 1;
  }

  .private-request-details {
    grid-template-columns: 1fr 1fr;
  }
}

/* Member statistics: align with the summary cards and keep long lists compact. */
.member-stats-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.member-stats-search {
  flex: 1;
  min-width: 0;
}

.member-stats-search input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #d9dee6;
  border-radius: 7px;
  background: #fff;
}

.member-stats-result-count {
  flex: 0 0 auto;
  color: var(--muted);
  white-space: nowrap;
}

.member-table-scroll {
  display: grid;
  gap: 8px;
  max-height: 353px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.member-table-scroll .member-table-head {
  position: sticky;
  z-index: 1;
  top: 0;
  padding-right: 15px;
  padding-left: 15px;
  background: var(--white);
}

.member-table-scroll .member-table-row {
  height: 58px;
  min-height: 58px;
}

.member-table-row[hidden],
.member-stats-search-empty[hidden] {
  display: none;
}

.member-table-head,
.member-table-row {
  grid-template-columns: minmax(170px, 1.2fr) minmax(155px, 1fr) minmax(110px, 0.8fr) minmax(105px, 0.8fr) 64px;
}

.member-table-head > :last-child,
.member-table-row > :last-child {
  justify-self: end;
}

@media (max-width: 1180px) {
  .member-table-scroll {
    max-height: 60vh;
  }

  .member-table-scroll .member-table-row {
    height: auto;
    min-height: 0;
  }

  .member-table-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .member-stats-tools {
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
  }
}

/* Final mobile layout guard: keep every administration form inside the viewport. */
@media (max-width: 1180px) {
  html,
  body {
    overflow-x: clip;
  }

  .sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 100;
    align-self: start;
    isolation: isolate;
  }

  .workspace,
  .workspace > *,
  .panel,
  .panel > *,
  form,
  fieldset,
  label {
    min-width: 0;
  }

  .admin-form,
  .admin-form .admin-studio-options,
  .studio-dialog-form .studio-form,
  .studio-inline-form,
  .teacher-form,
  .course-form,
  .notice-form,
  .contact-form,
  .banner-link-form,
  .photo-wall-form,
  .photo-upload-form {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-form > *,
  .studio-form > *,
  .teacher-form > *,
  .course-form > *,
  .notice-form > *,
  .contact-form > *,
  .banner-link-form > *,
  .photo-wall-form > * {
    grid-column: 1 / -1;
    min-width: 0;
    max-width: 100%;
  }

  .admin-form > button[type="submit"],
  .studio-form > button[type="submit"],
  .teacher-form > button[type="submit"],
  .course-form > button[type="submit"],
  .notice-form > button[type="submit"],
  .contact-form > button[type="submit"],
  .banner-link-form > button[type="submit"],
  .photo-wall-form > button[type="submit"] {
    width: 100%;
    min-width: 0;
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  select,
  textarea {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    font-size: 16px;
  }

  input[type="date"],
  input[type="time"],
  input[type="datetime-local"] {
    min-height: 44px;
  }

  .upload-row,
  .contact-actions,
  .notice-image-actions,
  .record-actions,
  .teacher-actions,
  .photo-wall-actions {
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .sidebar {
    padding-top: max(10px, env(safe-area-inset-top));
  }

  .admin-form,
  .studio-form,
  .teacher-form,
  .course-form,
  .notice-form,
  .contact-form,
  .banner-link-form,
  .photo-wall-form {
    gap: 10px;
  }

  .banner-link-form,
  .photo-wall-form,
  .admin-form {
    padding: 12px;
  }

  #admins {
    padding: 14px 12px;
  }

  .admin-form .admin-studio-options {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-row {
    padding: 12px;
  }

  .upload-row > *,
  .contact-actions > *,
  .notice-image-actions > *,
  .record-actions > * {
    min-width: 0;
  }
}

/* Operations console hierarchy refresh: distinguish page, sections, forms, and data rows. */
:root {
  --page-bg: #f1f3f6;
  --surface-muted: #f7f8fa;
  --surface-soft: #fbfcfd;
  --line-strong: #dce1e8;
  --shadow-soft: 0 5px 18px rgba(17, 24, 39, 0.045);
}

body,
.workspace {
  background: var(--page-bg);
}

@media (min-width: 1181px) {
  .workspace {
    gap: 22px;
    padding: 24px 26px 32px;
  }
}

.sidebar {
  box-shadow: 8px 0 24px rgba(17, 21, 29, 0.08);
}

.sidebar a {
  border-left: 3px solid transparent;
  border-radius: 7px;
}

.sidebar a.active {
  border-left-color: var(--red);
  background: rgba(255, 255, 255, 0.13);
}

.nav-section-label {
  letter-spacing: 0;
}

.admin-top {
  position: relative;
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--red);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.admin-top-intro h1 {
  margin-bottom: 5px;
  font-size: 23px;
  line-height: 1.2;
}

.admin-top-intro p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.top-actions {
  padding: 8px;
  border: 1px solid #e3e6eb;
  border-radius: 8px;
  background: var(--surface-muted);
}

.top-user,
.tenant-subscription {
  min-height: 44px;
  border-left: 1px solid #e0e4ea;
}

.panel {
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.section-head {
  min-height: 52px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e5e8ed;
}

.section-head > div:first-child {
  min-width: 0;
}

.section-head h2 {
  margin: 0;
  color: #151a23;
  font-size: 20px;
  line-height: 1.25;
}

.section-head span,
.block-head span {
  margin-top: 5px;
  color: #737b8c;
  font-size: 13px;
  line-height: 1.5;
}

.section-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.stats {
  gap: 14px;
}

.stat-card {
  min-height: 104px;
  padding: 17px 18px;
  border: 1px solid var(--line-strong);
  border-top: 3px solid #cfd5dd;
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.stat-card:first-child {
  border-top-color: var(--red);
}

.stat-card strong {
  margin-bottom: 8px;
  font-size: 29px;
  line-height: 1;
}

.member-overview-grid {
  grid-template-columns: minmax(250px, 0.32fr) minmax(0, 1fr);
  gap: 18px;
}

.visitor-panel {
  border-top: 3px solid rgba(238, 0, 51, 0.5);
}

.two-col {
  gap: 0;
}

.two-col > div {
  min-width: 0;
  padding: 2px 0;
}

.two-col > div + div {
  margin-left: 24px;
  padding-left: 24px;
  border-left: 1px solid #e4e7ec;
}

.compact-head {
  min-height: 44px;
  margin-top: 18px;
  margin-bottom: 10px;
  padding-top: 14px;
  padding-bottom: 10px;
  border-top: 1px solid #e5e8ed;
}

.compact-head h2 {
  font-size: 17px;
}

.admin-form,
.studio-form,
.studio-inline-form,
.teacher-form,
.course-form,
.notice-form,
.contact-form,
.banner-link-form,
.photo-wall-form,
.photo-upload-form {
  padding: 16px;
  border: 1px solid #e1e5eb;
  border-radius: 8px;
  background: var(--surface-muted);
}

.admin-form label,
.studio-form label,
.teacher-form label,
.course-form label,
.notice-form label,
.contact-form label,
.banner-link-form label,
.photo-wall-form label,
.photo-upload-form label {
  color: #596172;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.admin-form input,
.admin-form select,
.studio-form input,
.studio-form select,
.teacher-form input,
.teacher-form select,
.course-form input,
.course-form select,
.notice-form input,
.notice-form select,
.notice-form textarea,
.banner-link-form input,
.banner-link-form select,
.photo-wall-form input,
.photo-wall-form textarea {
  border-color: #d9dee6;
  background: var(--white);
}

.home-admin-block {
  margin-top: 22px;
  padding: 22px 0 0;
  border: 0;
  border-top: 1px solid #e3e6eb;
  border-radius: 0;
  background: transparent;
}

.home-admin-block:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.block-head {
  margin-bottom: 14px;
}

.block-head h3 {
  color: #1b2029;
  font-size: 17px;
  line-height: 1.3;
}

.teacher-card,
.course-admin-row,
.private-request-card,
.studio-row,
.admin-row,
.notice-admin-row,
.member-table-row {
  border: 1px solid #e1e5eb;
  border-radius: 7px;
  background: var(--surface-soft);
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.teacher-card:hover,
.course-admin-row:hover,
.private-request-card:hover,
.studio-row:hover,
.admin-row:hover,
.notice-admin-row:hover,
.member-table-row:hover {
  border-color: #c9cfd8;
  background: #fff;
}

.studio-row.active,
.admin-row.current {
  border-left: 4px solid var(--red);
}

.admin-list,
.studio-list,
.teacher-list,
.course-admin-list,
.private-request-list,
.notice-admin-list {
  gap: 10px;
}

.card-catalog,
.member-consumption-block {
  padding-top: 2px;
}

button,
.upload-row label {
  font-weight: 700;
}

@media (max-width: 1180px) {
  .workspace {
    gap: 14px;
    padding: 12px;
  }

  .admin-top {
    border-left: 1px solid var(--line-strong);
    border-top: 3px solid var(--red);
  }

  .top-actions {
    padding: 0;
    border: 0;
    background: transparent;
  }

  .top-user,
  .tenant-subscription {
    border-left: 0;
  }

  .panel {
    padding: 16px;
  }

  .section-head {
    min-height: 0;
    margin-bottom: 14px;
    padding-bottom: 12px;
  }

  .section-head h2 {
    font-size: 18px;
  }

  .member-overview-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .two-col > div + div {
    margin-top: 18px;
    margin-left: 0;
    padding-top: 18px;
    padding-left: 0;
    border-top: 1px solid #e4e7ec;
    border-left: 0;
  }

  .admin-form,
  .studio-form,
  .studio-inline-form,
  .teacher-form,
  .course-form,
  .notice-form,
  .contact-form,
  .banner-link-form,
  .photo-wall-form,
  .photo-upload-form {
    padding: 13px;
  }

  .home-admin-block {
    margin-top: 18px;
    padding-top: 18px;
  }
}

@media (max-width: 600px) {
  .workspace {
    padding: 9px;
  }

  .admin-top,
  .panel {
    border-radius: 7px;
  }

  .admin-top-intro h1 {
    font-size: 20px;
  }

  .panel {
    padding: 14px 12px;
  }

  .section-head {
    gap: 10px;
  }

  .section-head h2 {
    font-size: 17px;
  }

  .section-head span,
  .block-head span {
    font-size: 12px;
  }

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

  .stat-card {
    min-height: 88px;
    padding: 13px;
  }

  .stat-card strong {
    font-size: 24px;
  }

  .teacher-card,
  .course-admin-row,
  .private-request-card,
  .studio-row,
  .admin-row,
  .notice-admin-row,
  .member-table-row {
    padding: 12px;
  }
}

/* Unified member workspace: directory on the left, selected member details on the right. */
.member-management-grid {
  display: grid;
  grid-template-columns: minmax(300px, 340px) minmax(0, 1fr);
  border: 1px solid #e1e5eb;
  border-radius: 8px;
  background: var(--white);
}

.member-directory-pane {
  min-width: 0;
  padding: 16px;
  border-right: 1px solid #e1e5eb;
  border-radius: 8px 0 0 8px;
  background: #f7f8fa;
}

.member-detail-pane {
  min-width: 0;
}

.member-detail-section {
  padding: 20px;
}

.member-detail-section + .member-detail-section {
  border-top: 1px solid #e1e5eb;
}

.member-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e8ebef;
}

.member-pane-head h3 {
  margin: 0;
  color: #171c25;
  font-size: 17px;
}

.member-pane-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.member-stats-search {
  display: grid;
  gap: 7px;
  margin: 0 0 4px;
}

.member-stats-search-title {
  color: #3f4754;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.member-stats-search input {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  border-color: #d8dde5;
  background: #fff;
  font-size: 14px;
  line-height: 1.4;
}

.member-stats-search input::placeholder {
  color: #9299a5;
  font-size: 13px;
}

.member-filter-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.member-filter-bar button {
  min-height: 36px;
  padding: 0 9px;
  border: 1px solid #dfe3e8;
  border-radius: 7px;
  background: #fff;
  color: #596172;
}

.member-filter-bar button small {
  margin-left: 3px;
  color: inherit;
}

.member-filter-bar button.active {
  border-color: rgba(238, 0, 51, 0.34);
  background: #fff1f4;
  color: var(--red);
}

.member-stats-result-count {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.member-table-scroll {
  max-height: 412px;
}

.member-table-scroll .member-table-row.member-directory-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  height: 76px;
  min-height: 76px;
  padding: 9px 10px;
  overflow: hidden;
}

.member-directory-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #eceff3;
  color: var(--red);
  font-size: 16px;
  font-weight: 800;
}

.member-directory-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-directory-identity {
  min-width: 0;
}

.member-directory-identity strong,
.member-directory-identity small,
.member-directory-identity em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-directory-identity small {
  margin-top: 2px;
}

.member-directory-identity em {
  margin-top: 3px;
  color: #747c8b;
  font-size: 11px;
  font-style: normal;
}

.member-status-tag {
  align-self: start;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 11px;
  white-space: nowrap;
}

.member-status-tag.member {
  color: #167c57;
  background: #eaf7f1;
}

.member-status-tag.visitor,
.member-status-tag.followup {
  color: var(--red);
  background: #fff0f3;
}

.member-card-catalog-section .card-catalog {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.member-card-catalog-section .card-template {
  min-width: 0;
  padding: 13px;
}

@media (max-width: 1200px) {
  .member-card-catalog-section .card-catalog {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1180px) {
  .member-management-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .member-directory-pane {
    border-right: 0;
    border-bottom: 1px solid #e1e5eb;
    border-radius: 8px 8px 0 0;
  }

  .member-table-scroll {
    max-height: 412px;
  }

  .member-table-scroll .member-table-row.member-directory-row {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    height: 76px;
    min-height: 76px;
  }
}

@media (max-width: 600px) {
  .member-directory-pane,
  .member-detail-section {
    padding: 12px;
  }

  .member-card-head {
    align-items: flex-start;
  }

  .member-head-actions {
    justify-items: start;
  }

}

.member-card-head {
  justify-content: flex-start;
  gap: 0;
}

.member-card-head > div:first-child {
  flex: 0 1 auto;
  min-width: 0;
}

.member-head-actions {
  flex: 0 0 auto;
  justify-items: start;
}

.member-profile-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.member-profile-copy {
  min-width: 0;
}

.member-profile-copy h2 {
  margin: 0 0 4px;
}

.member-profile-copy .meta {
  margin: 2px 0 0;
}

.member-action-row {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.member-card-dialog-root:empty {
  display: none;
}

/* Existing member cards: visual card grid, up to three per row. */
.member-active-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.member-active-card {
  min-width: 0;
  min-height: 224px;
  display: flex;
  flex-direction: column;
  padding: 15px;
  border: 1px solid #e1e5eb;
  border-top: 3px solid rgba(238, 0, 51, 0.68);
  border-radius: 9px;
  background: linear-gradient(145deg, #fff 0%, #fff 68%, #fff7f9 100%);
  box-shadow: 0 5px 14px rgba(25, 31, 42, 0.05);
}

.member-active-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.member-active-card-head > strong {
  min-width: 0;
  overflow: hidden;
  color: #171c25;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-card-status {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.member-card-status.active {
  color: #167c57;
  background: #eaf7f1;
}

.member-card-status.inactive {
  color: #7a5260;
  background: #f3edf0;
}

.member-active-card-balance {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 14px 0 12px;
}

.member-active-card-balance strong {
  color: var(--red);
  font-size: 28px;
  line-height: 1;
}

.member-active-card-balance span {
  color: var(--muted);
  font-size: 13px;
}

.member-active-card-meta {
  display: grid;
  gap: 7px;
  margin: 0;
}

.member-active-card-meta > div {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  font-size: 12px;
  line-height: 1.35;
}

.member-active-card-meta dt {
  color: #8a91a0;
}

.member-active-card-meta dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #4f5766;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-active-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: auto;
  padding-top: 13px;
}

.member-active-card-actions button {
  min-height: 32px;
  padding: 0 10px;
}

.member-cards-empty {
  grid-column: 1 / -1;
}

/* Consumption history is intentionally quieter and placed after card operations. */
.member-history-section {
  padding: 13px 20px 16px;
  border-top: 1px solid #e1e5eb;
  background: #fafbfc;
}

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

.member-history-head h3 {
  margin: 0;
  color: #444c5b;
  font-size: 14px;
}

.member-history-head span {
  display: block;
  margin-top: 3px;
  color: #8a91a0;
  font-size: 11px;
}

.member-history-head button {
  min-height: 32px;
  padding: 0 11px;
}

.member-history-section #member-consumption-list {
  max-height: 280px;
  overflow-y: auto;
}

.member-history-section .empty {
  margin-top: 8px;
  padding: 8px 0 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.member-history-section .consumption-row {
  padding: 11px 0;
}

@media (max-width: 1500px) {
  .member-active-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .member-active-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .member-history-section {
    padding-right: 16px;
    padding-left: 16px;
  }
}

@media (max-width: 600px) {
  .member-history-section {
    padding-right: 12px;
    padding-left: 12px;
  }
}

/* Venue-first branding for the login screen and signed-in administration. */
.brand.venue-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 4px 0 20px;
  text-align: center;
}

.venue-brand-avatar {
  width: 76px;
  height: 76px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
}

.venue-brand-avatar img,
.venue-brand-avatar [data-venue-brand-fallback] {
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.venue-brand-avatar img {
  display: block;
  object-fit: cover;
}

.venue-brand-avatar [data-venue-brand-fallback] {
  display: grid;
  place-items: center;
  background: var(--red);
  color: #fff;
  font-size: 26px;
  font-weight: 900;
}

.venue-brand strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: inherit;
  font-size: 17px;
  line-height: 1.4;
  text-overflow: ellipsis;
}

.login-brand {
  margin-bottom: 8px;
  color: var(--ink);
}

.login-brand .venue-brand-avatar {
  width: 88px;
  height: 88px;
  border-color: var(--line);
  background: var(--soft);
  box-shadow: 0 10px 24px rgba(21, 25, 34, 0.1);
}

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

.login-screen-signature {
  position: absolute;
  right: 22px;
  bottom: 18px;
  color: rgba(109, 114, 128, 0.3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9),
    0 -1px 0 rgba(21, 25, 34, 0.16);
  user-select: none;
}

.login-card {
  position: relative;
  padding-bottom: 50px;
}

.sidebar-product-signature {
  display: block;
  margin-top: auto;
  padding-top: 24px;
  color: rgba(255, 255, 255, 0.3);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.5;
  text-align: left;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05),
    0 -1px 0 rgba(0, 0, 0, 0.7);
  user-select: none;
}

@media (min-width: 1181px) {
  .sidebar {
    display: flex;
    flex-direction: column;
  }
}

@media (max-width: 1180px) {
  .sidebar .venue-brand {
    flex: 0 0 auto;
    flex-direction: row;
    width: auto;
    min-width: max-content;
    margin: 0 6px 0 0;
    padding: 0;
    text-align: left;
  }

  .sidebar .venue-brand-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
  }

  .sidebar .venue-brand-avatar [data-venue-brand-fallback] {
    font-size: 15px;
  }

  .sidebar .venue-brand strong {
    display: block;
    max-width: 120px;
    font-size: 14px;
    white-space: nowrap;
  }

  .sidebar-product-signature {
    display: none;
  }
}

@media (max-width: 600px) {
  .sidebar .venue-brand strong {
    display: none;
  }

  .login-screen-signature {
    right: 18px;
    bottom: 16px;
    font-size: 10px;
  }

  .login-card {
    padding-bottom: 46px;
  }
}
