:root {
  --bg-primary: #040915;
  --bg-card: rgba(10, 16, 34, 0.82);
  --border-soft: rgba(93, 124, 183, 0.35);
  --text-main: #f3f7ff;
  --text-muted: #9caecf;
  --brand: #2f87ff;
  --brand-strong: #0d5fe6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  font-family: "Inter", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 12% 10%, rgba(52, 129, 255, 0.26) 0%, transparent 38%),
    radial-gradient(circle at 90% 82%, rgba(40, 108, 235, 0.2) 0%, transparent 40%),
    linear-gradient(160deg, #030712 0%, #060d1f 45%, #040915 100%);
}

body.dashboard-body {
  display: block;
}

.page {
  width: min(90vw, 1080px);
  padding: 2rem 1rem;
}

.page-dashboard {
  width: 100%;
  max-width: none;
  padding: 0;
  min-height: 100vh;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
  background: rgba(10, 16, 34, 0.78);
  border: 1px solid rgba(93, 124, 183, 0.32);
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.dashboard-shell.sidebar-collapsed {
  grid-template-columns: 0 1fr;
}

.dashboard-shell.sidebar-collapsed > .dashboard-main {
  grid-column: 2;
}

.sidebar {
  border-right: 1px solid rgba(120, 151, 214, 0.55);
  padding: 1.35rem 1rem;
  min-height: 100vh;
  background: rgba(8, 14, 30, 0.72);
  box-shadow: inset -1px 0 0 rgba(16, 30, 61, 0.95);
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.dashboard-shell.sidebar-collapsed .sidebar {
  opacity: 0;
  pointer-events: none;
}

.sidebar-nav {
  display: grid;
  gap: 0.35rem;
}

.nav-item {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.7rem 0.75rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-item:hover,
.nav-item.is-active {
  color: #ffffff;
  background: rgba(43, 73, 135, 0.45);
}

.dashboard-main {
  padding: 1.35rem;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.dashboard-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.header-logo-wrap,
.header-menu-toggle {
  display: none;
}

.dashboard-shell.sidebar-collapsed .header-logo-wrap,
.dashboard-shell.sidebar-collapsed .header-menu-toggle {
  display: inline-flex;
}

.menu-toggle {
  border: 1px solid rgba(114, 146, 206, 0.42);
  background: rgba(28, 40, 72, 0.76);
  color: var(--text-main);
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.15rem;
}

.menu-toggle:hover {
  background: rgba(50, 69, 120, 0.76);
}

.dashboard-header h1 {
  margin: 0;
  font-size: 1.35rem;
}

.gym-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.gym-switcher__label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.gym-switcher__select {
  min-width: 200px;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}

.user-menu {
  position: relative;
}

.user-menu__trigger {
  list-style: none;
  border: 1px solid rgba(114, 146, 206, 0.42);
  background: rgba(28, 40, 72, 0.76);
  color: var(--text-main);
  border-radius: 11px;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.68rem 0.95rem;
  cursor: pointer;
}

.user-menu__trigger::-webkit-details-marker {
  display: none;
}

.user-menu__trigger::after {
  content: "▾";
  margin-left: 0.5rem;
  font-size: 0.8rem;
}

.user-menu[open] .user-menu__trigger::after {
  content: "▴";
}

.user-menu__dropdown {
  position: absolute;
  right: 0;
  margin-top: 0.45rem;
  min-width: 100%;
  background: rgba(14, 24, 48, 0.96);
  border: 1px solid rgba(99, 130, 190, 0.45);
  border-radius: 10px;
  padding: 0.4rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.user-menu__item {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text-main);
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-radius: 7px;
  font: inherit;
  cursor: pointer;
}

.user-menu__item:hover {
  background: rgba(43, 73, 135, 0.45);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.stat-card {
  background: rgba(14, 24, 48, 0.8);
  border: 1px solid rgba(94, 129, 194, 0.34);
  border-radius: 12px;
  padding: 0.85rem;
}

.stat-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.83rem;
}

.stat-card h2 {
  margin: 0.4rem 0 0;
  font-size: 1.9rem;
}

.stat-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.stat-card-link:hover,
.stat-card-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(94, 129, 194, 0.75);
}

.members-panel {
  margin-top: 0.55rem;
  border: 1px solid rgba(94, 129, 194, 0.34);
  border-radius: 14px;
  background: rgba(8, 14, 30, 0.62);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid rgba(94, 129, 194, 0.28);
}

.panel-header h2 {
  margin: 0;
  font-size: 1.2rem;
}


.members-panel__controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.members-search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.members-search-input {
  width: min(300px, 100%);
  margin-left: auto;
}


.members-page-controls {
  align-items: flex-start;
}

.members-page-filters {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.members-filter-input {
  width: min(220px, 100%);
}

.column-sort-btn {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.column-sort-btn::after {
  content: " ↕";
  opacity: 0.5;
}

.column-sort-btn.is-active::after {
  content: " ↑";
  opacity: 1;
}

.column-sort-btn.is-active.is-desc::after {
  content: " ↓";
}

.member-row.is-hidden {
  display: none;
}

.table-wrap {
  overflow-x: auto;
}



.upcoming-classes-panel {
  margin-top: 0;
  margin-bottom: 0.9rem;
}

.dashboard-upcoming-grid {
  padding-top: 0.9rem;
}

.class-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  padding: 1rem;
}

.class-card {
  border: 1px solid rgba(94, 129, 194, 0.34);
  border-radius: 12px;
  padding: 0.95rem;
  background: rgba(10, 19, 42, 0.72);
}

.class-card--clickable {
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.class-card--clickable:hover {
  border-color: rgba(116, 171, 255, 0.7);
  box-shadow: 0 8px 24px rgba(5, 14, 36, 0.45);
  transform: translateY(-1px);
}

.class-card--clickable:focus-visible {
  outline: 0;
  border-color: rgba(130, 180, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(70, 132, 239, 0.35);
}

.class-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.class-card__title {
  margin: 0;
  font-size: 1.05rem;
}

.class-card__badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(96, 162, 255, 0.7);
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #cde4ff;
  background: rgba(53, 111, 209, 0.28);
}

.class-card__details {
  margin: 0;
  display: grid;
  gap: 0.65rem;
}

.class-card__details div {
  display: grid;
  gap: 0.2rem;
}

.class-card__details dt {
  color: #adc7f3;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.class-card__details dd {
  margin: 0;
  color: #eef5ff;
  font-size: 0.92rem;
  font-weight: 500;
}


.class-card__actions {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.55rem;
}

.class-card__inline-form {
  display: grid;
  gap: 0.55rem;
}

.class-card__actions .btn {
  width: 100%;
}

.class-card__hint {
  margin: 0.9rem 0 0;
  color: #adc7f3;
  font-size: 0.85rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.empty-state {
  margin: 0;
  padding: 1rem;
  color: #c9d9f8;
}

.calendar-panel {
  margin: 0 1rem 1rem;
  border: 1px solid rgba(94, 129, 194, 0.34);
  border-radius: 12px;
  background: rgba(10, 19, 42, 0.72);
}

.calendar-panel--compact {
  max-width: 860px;
  margin-right: auto;
}

.calendar-panel--compact .calendar-day {
  min-height: 98px;
}

.calendar-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(94, 129, 194, 0.28);
}

.calendar-panel__header h3 {
  margin: 0;
  font-size: 1.02rem;
}

.calendar-panel__controls {
  display: flex;
  gap: 0.5rem;
}

.calendar-nav-btn {
  min-width: 42px;
  padding: 0.45rem 0.7rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekday {
  padding: 0.55rem;
  border-right: 1px solid rgba(94, 129, 194, 0.24);
  border-bottom: 1px solid rgba(94, 129, 194, 0.28);
  text-align: center;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #adc7f3;
}

.calendar-weekday:nth-child(7n) {
  border-right: 0;
}

.calendar-day {
  min-height: 120px;
  padding: 0.45rem;
  border-right: 1px solid rgba(94, 129, 194, 0.24);
  border-bottom: 1px solid rgba(94, 129, 194, 0.24);
}

.calendar-day:nth-child(7n) {
  border-right: 0;
}

.calendar-day__number {
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #d9e6fb;
}

.calendar-day.is-outside-month {
  background: rgba(4, 9, 20, 0.5);
}

.calendar-day.is-outside-month .calendar-day__number {
  color: #7892ba;
}

.calendar-event {
  margin-bottom: 0.35rem;
  border-radius: 8px;
  padding: 0.35rem 0.45rem 0.45rem;
  background: rgba(53, 111, 209, 0.32);
  border: 1px solid rgba(96, 162, 255, 0.46);
  width: 100%;
  text-align: left;
  color: inherit;
}

.calendar-event:hover {
  background: rgba(53, 111, 209, 0.45);
}

.calendar-event__summary {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.calendar-event__book-form {
  margin-top: 0.35rem;
}

.calendar-event__book-btn {
  width: 100%;
  min-height: 1.9rem;
  font-size: 0.78rem;
  padding: 0.2rem 0.45rem;
}

.calendar-event__time,
.calendar-event__title {
  margin: 0;
}

.calendar-event__time {
  font-size: 0.72rem;
  color: #d8e9ff;
}

.calendar-event__title {
  margin-top: 0.12rem;
  font-size: 0.78rem;
  color: #f2f7ff;
  font-weight: 600;
}

.upcoming-classes-panel {
  margin: 0 1rem 1rem;
  border: 1px solid rgba(94, 129, 194, 0.34);
  border-radius: 12px;
  background: rgba(10, 19, 42, 0.72);
}

.member-dashboard-main .upcoming-classes-panel {
  margin: 0 1rem 1rem;
}


.dashboard-main:not(.member-dashboard-main) .members-panel.upcoming-classes-panel {
  margin: 0 0 0.9rem;
}

.upcoming-classes-panel__header {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(94, 129, 194, 0.28);
}

.upcoming-classes-panel__header h3 {
  margin: 0;
  font-size: 1.02rem;
}

.upcoming-classes-list {
  display: grid;
  gap: 0.65rem;
  padding: 0.8rem;
}

.upcoming-class-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid rgba(96, 162, 255, 0.42);
  border-radius: 10px;
  background: rgba(53, 111, 209, 0.18);
  padding: 0.65rem;
}

.upcoming-class-row__details {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.upcoming-class-row__datetime,
.upcoming-class-row__title,
.upcoming-class-row__spots {
  margin: 0;
}

.upcoming-class-row__datetime {
  font-size: 0.76rem;
  color: #d8e9ff;
}

.upcoming-class-row__title {
  margin-top: 0.15rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: #f2f7ff;
}

.upcoming-class-row__spots {
  margin-top: 0.2rem;
  font-size: 0.74rem;
  color: #bed5fa;
}

.upcoming-class-row__book-btn {
  min-width: 86px;
  min-height: 2.05rem;
}

.class-occurrence-modal-card {
  width: min(92vw, 480px);
}

.class-occurrence-meta {
  margin: 1rem 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.class-occurrence-meta dt {
  color: #adc7f3;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.class-occurrence-meta dd {
  margin: 0.18rem 0 0;
  color: #eef5ff;
  font-size: 0.9rem;
  font-weight: 600;
}

.class-occurrence-members-title {
  margin: 0.8rem 0 0.45rem;
  font-size: 1rem;
}

.class-occurrence-members {
  margin: 0;
  padding-left: 1rem;
  color: #dce9ff;
}

.class-occurrence-empty {
  margin: 0;
  color: #b8ccef;
}

.class-occurrence-add-form {
  margin-top: 1rem;
}

.class-occurrence-add-form__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
  align-items: center;
}

.class-occurrence-add-help {
  margin: 0.45rem 0 0;
  color: #b8ccef;
  font-size: 0.78rem;
}

#cancel-class-form {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
}

.membership-card {
  background:
    radial-gradient(120% 190% at 100% 0%, rgba(71, 110, 255, 0.5) 0%, rgba(32, 62, 158, 0.22) 45%, rgba(7, 13, 31, 0) 100%),
    linear-gradient(120deg, #0f1e45 0%, #0b1532 60%, #080f24 100%);
  border: 1px solid rgba(95, 135, 255, 0.38);
  border-radius: 0;
  padding: 1rem 1.1rem;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
}

.membership-card__title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  color: #f4f8ff;
}

.membership-card__expiry {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 600;
  color: rgba(211, 225, 255, 0.9);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  text-align: left;
  font-weight: 600;
  color: #ccdcfb;
  font-size: 0.85rem;
  padding: 0.9rem 1rem;
}

tbody td {
  padding: 0.9rem 1rem;
  border-top: 1px solid rgba(84, 112, 161, 0.28);
  color: #e7f0ff;
  font-size: 0.92rem;
}

.action-btn {
  border: 1px solid rgba(151, 174, 218, 0.45);
  background: rgba(22, 35, 64, 0.85);
  color: #e7f0ff;
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  margin-right: 0.35rem;
}

.action-btn:last-child {
  margin-right: 0;
}

.row-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.action-btn-edit:hover {
  background: rgba(92, 130, 255, 0.28);
  border-color: rgba(138, 172, 255, 0.7);
}

.action-btn-edit:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(106, 145, 255, 0.3);
}

.action-btn-delete:hover {
  background: rgba(195, 39, 71, 0.25);
  border-color: rgba(255, 115, 145, 0.6);
}

.action-btn-delete:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(255, 88, 128, 0.3);
}

.status-badge {
  display: inline-flex;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(40, 174, 104, 0.22);
  border: 1px solid rgba(66, 212, 136, 0.42);
  color: #8ff3bd;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-badge-inactive {
  background: rgba(195, 39, 71, 0.22);
  border: 1px solid rgba(255, 115, 145, 0.42);
  color: #ff9db6;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 8, 19, 0.72);
  display: grid;
  place-items: center;
  padding: 1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 60;
}

.modal-card {
  width: min(92vw, 420px);
  max-height: calc(100dvh - 2rem);
  background: #0a1226;
  border: 1px solid rgba(94, 129, 194, 0.38);
  border-radius: 14px;
  padding: 1rem 1rem 1.2rem;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.4rem;
}

.modal-close {
  border: 0;
  background: transparent;
  color: #dbe8ff;
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

#membership-fields-row {
  align-items: start;
  column-gap: 0.9rem;
}

#membership-fields-row .membership-plan-wrap {
  grid-column: 1;
  grid-row: 1 / span 2;
}

#membership-fields-row #member-start-wrap {
  grid-column: 2;
  grid-row: 1;
}

#membership-fields-row #member-duration-wrap {
  grid-column: 2;
  grid-row: 2;
}

#membership-fields-row #member-end-wrap {
  grid-column: 2;
  grid-row: 1;
}

.plan-mode-toggle {
  margin: 0.45rem 0 0;
  padding: 0.2rem;
  border: 1px solid rgba(94, 129, 194, 0.42);
  border-radius: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem;
}

.plan-mode-toggle__option {
  position: relative;
  cursor: pointer;
}

.plan-mode-toggle__option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.plan-mode-toggle__option span {
  display: block;
  width: 100%;
  text-align: center;
  border-radius: 8px;
  padding: 0.55rem 0.45rem;
  font-size: 0.83rem;
  font-weight: 600;
  color: #b4c8ef;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.plan-mode-toggle__option:hover span {
  color: #e8f0ff;
}

.plan-mode-toggle__option input:checked + span {
  color: #f4f8ff;
  background: linear-gradient(135deg, #7fb0ff, #4f7bd3);
  box-shadow: 0 8px 18px rgba(66, 107, 180, 0.35);
}

.plan-mode-toggle__option input:focus-visible + span {
  outline: 2px solid rgba(160, 200, 255, 0.95);
  outline-offset: 2px;
}


.repeat-days-fieldset {
  margin: 1rem 0 0;
  border: 1px solid rgba(94, 129, 194, 0.38);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
}

.repeat-days-help {
  margin: 0.2rem 0 0.6rem;
  color: #9eb5de;
  font-size: 0.86rem;
}

.repeat-days-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 0.75rem;
}

.repeat-days-grid label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: #dbe8ff;
  font-size: 0.92rem;
}


.class-actions-modal-card {
  width: min(92vw, 460px);
}

.class-actions-modal__summary {
  margin: 0.8rem 0 1rem;
  display: grid;
  gap: 0.6rem;
}

.class-actions-modal__summary div {
  display: grid;
  gap: 0.2rem;
}

.class-actions-modal__summary dt {
  color: #adc7f3;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.class-actions-modal__summary dd {
  margin: 0;
  color: #eef5ff;
  font-size: 0.92rem;
  font-weight: 500;
}

#class-actions-cancel-form {
  margin-top: 0.7rem;
}

#class-actions-cancel-form .btn {
  width: 100%;
}


.modal-description {
  margin: 1.1rem 0 1.25rem;
  color: #c9d9f7;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.7rem;
}

.auth-shell {
  max-width: 560px;
  margin: 0 auto;
}

.auth-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  padding: 2.4rem;
  backdrop-filter: blur(8px);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(49, 105, 209, 0.12) inset;
}

.auth-card-signup {
  border-color: rgba(86, 121, 186, 0.55);
}

.is-hidden {
  display: none;
}

.logo-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-icon {
  width: 2.15rem;
  height: 2.15rem;
  object-fit: contain;
  filter: drop-shadow(0 5px 12px rgba(34, 130, 255, 0.35));
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.logo-text-my {
  color: #45d9ff;
}

.logo-text-spotter {
  color: #f5f7ff;
}

.eyebrow {
  margin: 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

h1,
h2 {
  margin: 0.45rem 0 0.65rem;
  font-size: clamp(1.5rem, 2.4vw, 1.95rem);
}

.description {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.55;
}

.auth-actions {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 11px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.97rem;
  padding: 0.8rem 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(145deg, var(--brand) 0%, var(--brand-strong) 100%);
  box-shadow: 0 10px 26px rgba(41, 112, 232, 0.32);
}

.add-member-btn {
  gap: 0.55rem;
  padding: 0.62rem 0.95rem;
  border: 1px solid rgba(142, 186, 255, 0.5);
  box-shadow:
    0 12px 24px rgba(25, 90, 206, 0.32),
    inset 0 1px 0 rgba(218, 236, 255, 0.28);
}

.add-member-btn__icon {
  width: 1.15rem;
  height: 1.15rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
}

.add-member-btn:hover {
  background: linear-gradient(145deg, #4799ff 0%, #1b67f0 100%);
  box-shadow:
    0 14px 28px rgba(25, 90, 206, 0.38),
    inset 0 1px 0 rgba(226, 242, 255, 0.32);
}

.add-member-btn:focus-visible {
  outline: 0;
  box-shadow:
    0 0 0 3px rgba(96, 163, 255, 0.35),
    0 12px 24px rgba(25, 90, 206, 0.32),
    inset 0 1px 0 rgba(218, 236, 255, 0.28);
}

.btn-secondary {
  color: var(--text-main);
  background: rgba(28, 40, 72, 0.76);
  border: 1px solid rgba(114, 146, 206, 0.42);
}

.btn-danger {
  color: #fff;
  background: linear-gradient(145deg, #eb4b76 0%, #cb1d48 100%);
  box-shadow: 0 10px 26px rgba(180, 38, 77, 0.32);
}

.back-button {
  margin-top: 0.9rem;
  padding-inline: 0.9rem;
  width: fit-content;
}

.signup-form {
  margin-top: 1.6rem;
  display: grid;
  gap: 0.75rem;
}

.form-label {
  font-size: 0.88rem;
  color: #dce8ff;
}

.form-input {
  width: 100%;
  background: rgba(14, 24, 48, 0.8);
  border: 1px solid rgba(99, 130, 190, 0.45);
  border-radius: 11px;
  color: var(--text-main);
  padding: 0.82rem 0.95rem;
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.password-input-wrap {
  position: relative;
}

.password-input-wrap .form-input {
  padding-right: 2.8rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.6rem;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #9bb4e3;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.password-toggle:hover {
  color: #d7e6ff;
  background: rgba(60, 96, 164, 0.25);
}

.password-toggle:focus-visible {
  outline: 2px solid rgba(87, 153, 255, 0.9);
  outline-offset: 2px;
}

.form-input::placeholder {
  color: #8095bc;
}

.form-input:focus {
  border-color: rgba(87, 153, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(56, 126, 235, 0.24);
}

.btn-submit {
  margin-top: 0.55rem;
}

.form-messages {
  margin-top: 1rem;
  display: grid;
  gap: 0.4rem;
}

.password-feedback {
  font-size: 0.84rem;
  color: #9caecf;
  min-height: 1.2rem;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.form-footer {
  margin: 1.2rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.form-footer a {
  color: #91bdff;
  text-decoration: none;
}

.form-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 560px) {
  .auth-card {
    padding: 1.5rem;
  }

  .auth-actions {
    grid-template-columns: 1fr;
  }

  .modal-row {
    grid-template-columns: 1fr;
  }

  #membership-fields-row .membership-plan-wrap,
  #membership-fields-row #member-start-wrap,
  #membership-fields-row #member-duration-wrap,
  #membership-fields-row #member-end-wrap {
    grid-column: auto;
    grid-row: auto;
  }

  .repeat-days-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .dashboard-shell {
    display: block;
    position: relative;
  }

  .dashboard-shell::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(1, 6, 18, 0.72);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.24s ease;
    z-index: 30;
    pointer-events: none;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: min(84vw, 280px);
    height: 100vh;
    min-height: 100vh;
    z-index: 40;
    opacity: 0;
    transform: translateX(-105%);
    transition: transform 0.24s ease, opacity 0.2s ease;
  }

  .dashboard-main {
    position: relative;
    z-index: 10;
    padding: 1rem;
  }

  .dashboard-shell.sidebar-mobile-open .sidebar {
    opacity: 1;
    transform: translateX(0);
  }

  .dashboard-shell.sidebar-mobile-open::before {
    opacity: 1;
    pointer-events: auto;
  }

  .header-menu-toggle {
    display: inline-flex;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-header {
    flex-wrap: wrap;
    gap: 0.8rem;
  }

  .members-panel__controls {
    flex-wrap: wrap;
  }

  .members-search-input,
  .members-filter-input,
  .add-member-btn {
    width: 100%;
    margin-left: 0;
  }

  .calendar-day {
    min-height: 100px;
  }

  .upcoming-class-row {
    grid-template-columns: 1fr;
  }

  .upcoming-class-row__book-btn {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .dashboard-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-title-wrap,
  .user-menu,
  .user-menu__trigger,
  .gym-switcher,
  .gym-switcher__select {
    width: 100%;
  }

  .user-menu__dropdown {
    left: 0;
    right: auto;
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    overflow: visible;
    padding: 0.5rem;
  }

  table,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }

  thead {
    display: none;
  }

  tbody tr {
    background: rgba(14, 24, 48, 0.8);
    border: 1px solid rgba(94, 129, 194, 0.34);
    border-radius: 12px;
    padding: 0.2rem 0;
    margin-bottom: 0.6rem;
  }

  tbody td {
    border-top: 1px solid rgba(84, 112, 161, 0.28);
    display: grid;
    grid-template-columns: minmax(92px, 110px) 1fr;
    gap: 0.55rem;
    align-items: center;
    padding: 0.65rem 0.8rem;
  }

  tbody td:first-child {
    border-top: 0;
  }

  tbody td::before {
    content: attr(data-label);
    color: #ccdcfb;
    font-size: 0.78rem;
    font-weight: 600;
  }

  .row-actions {
    justify-content: flex-start;
  }
}
