:root {
  --navy: #082545;
  --navy-2: #12385c;
  --slate: #25364a;
  --muted: #65758b;
  --line: #d8e2ea;
  --teal: #2e96a9;
  --teal-dark: #1d7284;
  --warning: #996100;
  --warning-bg: #fff7df;
  --danger: #bd2433;
  --danger-bg: #fff1f3;
  --success: #0a7c56;
  --success-bg: #e9fbf4;
  --shadow: 0 22px 60px rgba(8, 37, 69, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--slate);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: #f4f7fa;
}

button,
input,
select,
a {
  font: inherit;
}

.auth-shell {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: start;
  min-height: 100vh;
}

.auth-shell.no-sidebar {
  grid-template-columns: 1fr;
}

.app-header {
  position: relative;
  grid-column: 1 / -1;
  z-index: 20;
  display: flex;
  align-items: center;
  min-height: 76px;
  padding: 8px 24px;
  background: linear-gradient(135deg, #06213e 0%, #082545 58%, #0d3154 100%);
  box-shadow: 0 10px 28px rgba(8, 37, 69, 0.22);
}

.header-brand {
  display: flex;
  flex: 0 0 81px;
  align-items: center;
  justify-content: center;
  width: 81px;
  height: 81px;
  margin-right: 14px;
  overflow: hidden;
  border-radius: 20%;
  text-decoration: none;
}

.header-brand img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 34%;
}

.header-title h1 {
  margin: 0;
  color: #fff;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.22);
}

.header-title p {
  margin: 3px 0 0;
  color: #75b6c4;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.header-user {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 8px;
  margin-left: auto;
  min-width: 0;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
}

.header-role-icons {
  display: flex;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
}

.header-club-logo {
  display: block;
  flex: 0 0 81px;
  width: 81px;
  height: 81px;
  object-fit: contain;
  background: #fff;
  border-radius: 20%;
}

.header-user .account-menu {
  min-width: 0;
}

@media (max-width: 540px) {
  .app-header:has(.header-club-logo) .header-title {
    display: none;
  }
}

.header-role-icons img {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.account-menu {
  position: relative;
}

.account-menu summary {
  max-width: 220px;
  padding: 9px 12px;
  overflow: hidden;
  color: #fff;
  cursor: pointer;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
}

.account-menu summary:hover,
.account-menu[open] summary {
  background: rgba(255, 255, 255, 0.12);
}

.account-menu-items {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(8, 37, 69, 0.2);
}

.account-menu-items form {
  margin: 0;
}

.account-menu-items a,
.account-menu-items button {
  display: block;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 0;
  border-radius: 4px;
  color: var(--slate);
  background: transparent;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.account-menu-items a:hover,
.account-menu-items button:hover {
  color: var(--navy);
  background: #edf4f8;
}

.side-nav {
  position: relative;
  z-index: 15;
  top: auto;
  bottom: auto;
  left: auto;
  width: 210px;
  min-height: calc(100vh - 76px);
  padding: 24px 14px;
  border-right: 1px solid rgba(216, 226, 234, 0.85);
  background: linear-gradient(180deg, #f8fbfd 0%, #eef4f8 100%);
  box-shadow: 12px 0 34px rgba(8, 37, 69, 0.06);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 41px;
  margin-bottom: 8px;
  padding: 0 13px;
  border-radius: 9px;
  color: #111;
  font-size: 0.91rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-submenu {
  margin: -2px 0 10px 35px;
  padding-left: 10px;
  border-left: 1px solid rgba(8, 37, 69, 0.14);
}

.nav-submenu .nav-link {
  min-height: 32px;
  margin-bottom: 0;
  padding: 0 10px;
  color: #40556b;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 7px;
  box-shadow: none;
}

.nav-submenu .nav-link:not(:last-child) {
  border-bottom: 1px solid rgba(8, 37, 69, 0.12);
}

.nav-submenu .nav-link:hover,
.nav-submenu .nav-link.active {
  color: var(--navy);
  background: rgba(38, 151, 170, 0.1);
  box-shadow: none;
}

.nav-icon {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  background: var(--navy);
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
}

.nav-icon.user-plus {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4Zm-8 1c2.21 0 4-1.79 4-4S9.21 5 7 5 3 6.79 3 9s1.79 4 4 4Zm0 2c-2.67 0-7 1.34-7 4v1h14v-1c0-2.66-4.33-4-7-4Zm8-1c-.31 0-.65.02-1 .06 1.16.84 2 1.96 2 3.44V20h8v-1c0-2.66-4.33-4-7-4h-2Zm6-3V8h-3V6h3V3h2v3h3v2h-3v3h-2Z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4Zm-8 1c2.21 0 4-1.79 4-4S9.21 5 7 5 3 6.79 3 9s1.79 4 4 4Zm0 2c-2.67 0-7 1.34-7 4v1h14v-1c0-2.66-4.33-4-7-4Zm8-1c-.31 0-.65.02-1 .06 1.16.84 2 1.96 2 3.44V20h8v-1c0-2.66-4.33-4-7-4h-2Zm6-3V8h-3V6h3V3h2v3h3v2h-3v3h-2Z'/%3E%3C/svg%3E");
}

.nav-icon.login {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 17v-3H2v-4h8V7l6 5-6 5Zm1-15h9c1.1 0 2 .9 2 2v16c0 1.1-.9 2-2 2h-9v-3h8V5h-8V2Z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 17v-3H2v-4h8V7l6 5-6 5Zm1-15h9c1.1 0 2 .9 2 2v16c0 1.1-.9 2-2 2h-9v-3h8V5h-8V2Z'/%3E%3C/svg%3E");
}

.nav-icon.lock {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2ZM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6Z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2ZM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6Z'/%3E%3C/svg%3E");
}

.nav-icon.key {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 14a5 5 0 1 1 4.58-7H24v4h-3v3h-4v3h-4.42A5 5 0 0 1 7 14Zm0-3a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 14a5 5 0 1 1 4.58-7H24v4h-3v3h-4v3h-4.42A5 5 0 0 1 7 14Zm0-3a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z'/%3E%3C/svg%3E");
}

.nav-icon.users {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16 11c1.66 0 3-1.57 3-3.5S17.66 4 16 4s-3 1.57-3 3.5S14.34 11 16 11Zm-8 0c1.66 0 3-1.57 3-3.5S9.66 4 8 4 5 5.57 5 7.5 6.34 11 8 11Zm0 2c-2.33 0-7 1.17-7 3.5V20h14v-3.5C15 14.17 10.33 13 8 13Zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.96 1.97 3.45V20h6v-3.5c0-2.33-4.67-3.5-7-3.5Z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16 11c1.66 0 3-1.57 3-3.5S17.66 4 16 4s-3 1.57-3 3.5S14.34 11 16 11Zm-8 0c1.66 0 3-1.57 3-3.5S9.66 4 8 4 5 5.57 5 7.5 6.34 11 8 11Zm0 2c-2.33 0-7 1.17-7 3.5V20h14v-3.5C15 14.17 10.33 13 8 13Zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.96 1.97 3.45V20h6v-3.5c0-2.33-4.67-3.5-7-3.5Z'/%3E%3C/svg%3E");
}

.nav-icon.dashboard {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 13h8V3H3v10Zm0 8h8v-6H3v6Zm10 0h8V11h-8v10Zm0-18v6h8V3h-8Z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 13h8V3H3v10Zm0 8h8v-6H3v6Zm10 0h8V11h-8v10Zm0-18v6h8V3h-8Z'/%3E%3C/svg%3E");
}

.nav-icon.calendar {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 2h2v2h6V2h2v2h3c1.1 0 2 .9 2 2v14c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h3V2Zm13 8H4v10h16V10ZM6 12h4v4H6v-4Zm6 0h6v2h-6v-2Zm0 4h6v2h-6v-2Z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 2h2v2h6V2h2v2h3c1.1 0 2 .9 2 2v14c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h3V2Zm13 8H4v10h16V10ZM6 12h4v4H6v-4Zm6 0h6v2h-6v-2Zm0 4h6v2h-6v-2Z'/%3E%3C/svg%3E");
}

.nav-icon.arbiters {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2 5 5v6c0 4.55 2.91 8.82 7 10 4.09-1.18 7-5.45 7-10V5l-7-3Zm0 3.19 4 1.71V11c0 3.18-1.65 6.16-4 7.28C9.65 17.16 8 14.18 8 11V6.9l4-1.71ZM10 8h4v2h-1v5h-2v-5h-1V8Z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2 5 5v6c0 4.55 2.91 8.82 7 10 4.09-1.18 7-5.45 7-10V5l-7-3Zm0 3.19 4 1.71V11c0 3.18-1.65 6.16-4 7.28C9.65 17.16 8 14.18 8 11V6.9l4-1.71ZM10 8h4v2h-1v5h-2v-5h-1V8Z'/%3E%3C/svg%3E");
}

.nav-icon.tournaments {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 2h2v2h6V2h2v2h3c1.1 0 2 .9 2 2v14c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h3V2Zm13 8H4v10h16V10ZM4 8h16V6H4v2Zm3 4h4v4H7v-4Z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 2h2v2h6V2h2v2h3c1.1 0 2 .9 2 2v14c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h3V2Zm13 8H4v10h16V10ZM4 8h16V6H4v2Zm3 4h4v4H7v-4Z'/%3E%3C/svg%3E");
}

.nav-icon.reports {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 3h16v18H4V3Zm3 4v2h10V7H7Zm0 4v2h10v-2H7Zm0 4v2h6v-2H7Z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 3h16v18H4V3Zm3 4v2h10V7H7Zm0 4v2h10v-2H7Zm0 4v2h6v-2H7Z'/%3E%3C/svg%3E");
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--navy) 0%, #0d3154 100%);
  box-shadow: 0 8px 18px rgba(8, 37, 69, 0.18);
}

.nav-link:hover .nav-icon,
.nav-link.active .nav-icon {
  background: #fff;
}

.auth-main {
  min-width: 0;
  display: flex;
  justify-content: center;
  width: min(760px, calc(100% - 56px));
  min-height: calc(100vh - 76px);
  margin: 0 auto;
  padding: 10px 0 56px;
  align-items: center;
}

.auth-main.admin-main {
  width: calc(100% - 40px);
  max-width: 1560px;
}

.auth-stage {
  min-width: 0;
  display: flex;
  justify-content: center;
  width: 100%;
}

.auth-stage.centered {
  max-width: 520px;
}

.auth-stage.wide {
  max-width: 680px;
}

.auth-stage.admin-wide {
  max-width: 100%;
}

.auth-stage.dashboard-wide {
  max-width: 100%;
}

.auth-card {
  min-width: 0;
  width: min(452px, 100%);
  margin: 0 auto;
  padding: 34px;
  border: 1px solid rgba(216, 226, 234, 0.92);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.auth-card.register {
  width: min(620px, 100%);
}

.auth-card.coach-create-card,
.auth-card.student-create-card,
.auth-card.class-create-card,
.auth-card.club-create-card,
.auth-card.assignment-create-card {
  width: 100%;
}

.auth-shell:not(.compact-login) .auth-main {
  width: calc(100% - 40px);
  max-width: 1560px;
}

.auth-shell:not(.compact-login) .auth-stage {
  max-width: 100%;
}

.auth-shell:not(.compact-login) .auth-card {
  width: 100%;
}

.admin-card {
  width: 100%;
}

.page-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.page-title-row .subtitle {
  margin-bottom: 0;
}

.primary-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--navy);
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 52%, var(--teal-dark) 100%);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.dashboard-card {
  width: 100%;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.dashboard-stat-card {
  position: relative;
  min-height: 170px;
  padding: 22px;
  border: 1px solid rgba(216, 226, 234, 0.95);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbfd 100%);
  box-shadow: 0 16px 34px rgba(8, 37, 69, 0.09);
}

.stat-icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  margin-bottom: 16px;
  border-radius: 12px;
  background-color: var(--navy);
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: 22px;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 22px;
}

.stat-icon.tournaments {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 2h2v2h6V2h2v2h3v18H4V4h3V2Zm13 8H4v10h16V10ZM6 12h5v5H6v-5Z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 2h2v2h6V2h2v2h3v18H4V4h3V2Zm13 8H4v10h16V10ZM6 12h5v5H6v-5Z'/%3E%3C/svg%3E");
}

.stat-icon.arbiters {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2 5 5v6c0 4.55 2.91 8.82 7 10 4.09-1.18 7-5.45 7-10V5l-7-3Zm-2 6h4v2h-1v5h-2v-5h-1V8Z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2 5 5v6c0 4.55 2.91 8.82 7 10 4.09-1.18 7-5.45 7-10V5l-7-3Zm-2 6h4v2h-1v5h-2v-5h-1V8Z'/%3E%3C/svg%3E");
}

.dashboard-stat-card .stat-label {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.dashboard-stat-card strong {
  display: block;
  margin: 14px 0 8px;
  color: var(--navy);
  font-size: 3rem;
  line-height: 1;
}

.dashboard-stat-card p {
  margin: 0;
  color: var(--slate);
  font-size: 0.95rem;
  line-height: 1.5;
}

.dashboard-chart-card {
  margin-top: 22px;
  padding: 22px;
  border: 1px solid rgba(216, 226, 234, 0.95);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbfd 100%);
  box-shadow: 0 16px 34px rgba(8, 37, 69, 0.09);
}

/* Clubs intelligence dashboards */
.club-intelligence-shell {
  display: grid;
  gap: 20px;
}

.club-dashboard-heading,
.club-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.club-dashboard-heading h2 {
  margin-bottom: 7px;
}

.club-dashboard-scope {
  display: grid;
  gap: 4px;
  min-width: 260px;
  padding: 12px 14px;
  border-left: 3px solid #0f766e;
  color: #334155;
  background: #f0fdfa;
}

.club-dashboard-scope span,
.club-dashboard-scope strong {
  font-size: 0.82rem;
}

.club-dashboard-scope span {
  color: #64748b;
  font-weight: 700;
}

.club-dashboard-filters {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 14px;
  border: 1px solid #d8e2ea;
  border-radius: 8px;
  background: #f8fafc;
}

.club-dashboard-filters .filter-field {
  width: min(220px, 100%);
}

.club-dashboard-filters .filter-field.grow {
  width: min(380px, 100%);
}

.club-dashboard-filters label {
  display: block;
  margin-bottom: 5px;
  color: #334155;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.club-dashboard-filters select {
  width: 100%;
  min-height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 10px;
  color: #0f172a;
  background: #fff;
}

.club-dashboard-apply {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  color: #fff;
  background: #082545;
  font-weight: 800;
  cursor: pointer;
}

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

.student-rating-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.club-payment-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.payment-kpi-link { position: relative; z-index: 1; color: #fff; font-weight: 700; margin-top: 10px; text-decoration: underline; }
.student-joined-date { display: grid; gap: 4px; font-size: 0.88rem; }
.student-joined-date span { color: var(--slate); }
.student-payment-history { margin-bottom: 28px; }
.student-payment-alert { margin: 12px 0; padding: 14px; border: 1px solid #fecaca; border-radius: 6px; color: #991b1b; background: #fef2f2; font-weight: 700; }
@media (max-width: 700px) { .club-payment-kpis { grid-template-columns: 1fr; } }
.club-admin-filter input[type="date"] { width: 100%; min-height: 40px; border: 1px solid #cbd5e1; border-radius: 6px; padding: 0 10px; color: #0f172a; background: #fff; }
.club-payment-kpis strong { overflow-wrap: anywhere; line-height: 1.2; }

.student-rating-progress { margin-top: 26px; min-width: 0; }
.student-rating-progress-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.student-rating-progress-header h3 { margin: 0; }
.student-rating-periods { display: flex; flex-wrap: wrap; gap: 6px; }
.student-rating-periods button { border: 1px solid #cbd5e1; border-radius: 6px; padding: 7px 11px; background: #fff; color: #334155; cursor: pointer; }
.student-rating-periods button[aria-pressed="true"] { border-color: #0e7490; background: #0e7490; color: #fff; }
.student-rating-chart { position: relative; width: 100%; min-width: 0; height: 320px; margin-top: 14px; }

.student-progress { margin-top: 28px; min-width: 0; }
.student-progress-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.student-progress-panel { min-width: 0; padding-top: 16px; border-top: 1px solid #dbe3eb; }
.student-progress-panel h3 { margin: 0 0 12px; }
.student-progress-panel .subtitle { text-align: center; }
.student-progress-canvas-wrap { position: relative; width: min(100%, 260px); height: 220px; margin: 0 auto; }
.student-progress-value { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.65rem; color: #0f172a; pointer-events: none; }
.student-assignment-points { display: grid; gap: 4px; margin-top: 18px; padding-top: 14px; border-top: 1px solid #dbe3eb; text-align: center; }
.student-assignment-points span { color: #475569; font-size: 0.8rem; font-weight: 700; }
.student-assignment-points strong { color: #0f172a; font-size: 1.55rem; }
.student-assignment-points small { color: #64748b; font-size: 0.74rem; }

.club-kpi-card {
  position: relative;
  min-height: 126px;
  overflow: hidden;
  padding: 18px;
  border-radius: 8px;
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.club-kpi-card::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -34px;
  width: 92px;
  height: 92px;
  border: 16px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

.club-kpi-card span,
.club-kpi-card strong,
.club-kpi-card small {
  position: relative;
  z-index: 1;
  display: block;
}

.club-kpi-card span {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.club-kpi-card strong {
  margin: 10px 0 7px;
  font-size: 2rem;
  line-height: 1;
}

.club-kpi-card small {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.74rem;
  font-weight: 700;
}

.kpi-blue { background: #1d4ed8; }
.kpi-cyan { background: #0e7490; }
.kpi-violet { background: #6d28d9; }
.kpi-green { background: #15803d; }
.kpi-amber { background: #b45309; }
.kpi-red { background: #b91c1c; }
.kpi-teal { background: #0f766e; }
.kpi-indigo { background: #4338ca; }

.club-dashboard-two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr);
  gap: 14px;
}

.club-dashboard-two-column.bottom-panels {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.club-analytics-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid #dbe4ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(8, 37, 69, 0.07);
}

.club-panel-heading {
  margin-bottom: 18px;
}

.club-panel-heading h3 {
  margin: 0 0 5px;
  color: #082545;
  font-size: 1rem;
}

.club-panel-heading p {
  margin: 0;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.45;
}

.club-panel-heading a,
.attention-item a {
  color: #0f766e;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.metric-pill {
  padding: 6px 9px;
  border-radius: 999px;
  color: #166534;
  background: #dcfce7;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.club-trend-chart {
  display: grid;
  grid-template-columns: repeat(12, minmax(24px, 1fr));
  gap: 7px;
  align-items: end;
  min-height: 245px;
  padding: 10px 0 0;
  border-bottom: 1px solid #cbd5e1;
}

.trend-column {
  display: grid;
  grid-template-rows: 22px 180px 34px;
  gap: 5px;
  align-items: end;
  min-width: 0;
  text-align: center;
}

.trend-value {
  color: #475569;
  font-size: 0.66rem;
  font-weight: 800;
}

.trend-track {
  position: relative;
  width: min(28px, 78%);
  min-height: 4px;
  justify-self: center;
  overflow: hidden;
  border-radius: 4px 4px 0 0;
  background: #dbeafe;
}

.trend-track span {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  background: #0f766e;
}

.trend-column small {
  align-self: start;
  overflow: hidden;
  color: #64748b;
  font-size: 0.6rem;
  line-height: 1.2;
}

.club-chart-legend {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  color: #64748b;
  font-size: 0.72rem;
}

.club-chart-legend span::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 6px;
  border-radius: 2px;
  background: #dbeafe;
}

.club-chart-legend span.present::before {
  background: #0f766e;
}

.club-progress-list,
.pipeline-chart,
.attention-list,
.upcoming-session-list {
  display: grid;
  gap: 12px;
}

.club-progress-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
}

.club-progress-row div:first-child {
  display: grid;
  gap: 2px;
}

.club-progress-row strong,
.club-progress-row em {
  color: #0f172a;
  font-size: 0.78rem;
  font-style: normal;
}

.club-progress-row span {
  color: #64748b;
  font-size: 0.68rem;
}

.progress-track {
  grid-column: 1 / -1;
  height: 7px;
  overflow: hidden;
  border-radius: 4px;
  background: #e2e8f0;
}

.progress-track span {
  display: block;
  height: 100%;
}

.progress-track .green { background: #16a34a; }
.progress-track .teal { background: #0f766e; }
.progress-track .violet { background: #7c3aed; }
.progress-track .amber { background: #d97706; }

.club-performance-table td strong,
.club-performance-table td small {
  display: block;
}

.club-performance-table td small {
  margin-top: 3px;
  color: #64748b;
  font-size: 0.7rem;
}

.club-performance-table td a {
  color: #082545;
  text-decoration: none;
}

.health-badge,
.metric-cell {
  display: inline-flex;
  justify-content: center;
  min-width: 42px;
  padding: 5px 7px;
  border-radius: 6px;
  color: #166534;
  background: #dcfce7;
  font-weight: 900;
}

.health-badge.watch { color: #92400e; background: #fef3c7; }
.health-badge.risk,
.metric-cell.risk { color: #991b1b; background: #fee2e2; }

.pipeline-row {
  display: grid;
  grid-template-columns: 100px minmax(80px, 1fr) 30px;
  gap: 10px;
  align-items: center;
  color: #475569;
  font-size: 0.74rem;
}

.pipeline-row > div {
  height: 12px;
  overflow: hidden;
  border-radius: 3px;
  background: #e2e8f0;
}

.pipeline-row i {
  display: block;
  height: 100%;
}

.pipeline-row .blue { background: #2563eb; }
.pipeline-row .violet { background: #7c3aed; }
.pipeline-row .teal { background: #0f766e; }
.pipeline-row .amber { background: #d97706; }
.pipeline-row .green { background: #16a34a; }

.upcoming-session-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  color: #0f172a;
  text-decoration: none;
}

.upcoming-session-row time {
  display: grid;
  justify-items: center;
  padding: 6px;
  color: #fff;
  background: #1d4ed8;
  border-radius: 6px;
}

.upcoming-session-row time strong { font-size: 1rem; }
.upcoming-session-row time span { font-size: 0.62rem; text-transform: uppercase; }
.upcoming-session-row > div { display: grid; gap: 3px; min-width: 0; }
.upcoming-session-row > div strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.78rem; }
.upcoming-session-row > div span,
.upcoming-session-row em { color: #64748b; font-size: 0.68rem; font-style: normal; }

.attention-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 11px;
  border-left: 3px solid #64748b;
  background: #f8fafc;
}

.attention-item > span {
  padding: 4px 6px;
  border-radius: 4px;
  color: #475569;
  background: #e2e8f0;
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.attention-item strong { display: block; color: #0f172a; font-size: 0.78rem; }
.attention-item p { margin: 3px 0 0; color: #64748b; font-size: 0.7rem; line-height: 1.4; }
.attention-item.high { border-left-color: #dc2626; background: #fef2f2; }
.attention-item.high > span { color: #991b1b; background: #fee2e2; }
.attention-item.medium { border-left-color: #d97706; background: #fffbeb; }
.attention-item.medium > span { color: #92400e; background: #fef3c7; }
.attention-item.good { border-left-color: #16a34a; background: #f0fdf4; }
.attention-item.good > span { color: #166534; background: #dcfce7; }
.club-dashboard-empty { margin: 0; color: #64748b; font-size: 0.8rem; }

@media (max-width: 1180px) {
  .club-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .club-dashboard-two-column,
  .club-dashboard-two-column.bottom-panels { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .student-rating-grid { grid-template-columns: 1fr; }
  .student-rating-chart { height: 260px; }
  .student-progress-grid { grid-template-columns: 1fr; }
  .club-dashboard-heading,
  .club-panel-heading,
  .club-dashboard-filters { flex-direction: column; }
  .club-dashboard-scope,
  .club-dashboard-filters .filter-field,
  .club-dashboard-filters .filter-field.grow,
  .club-dashboard-apply { width: 100%; min-width: 0; }
  .club-kpi-grid { grid-template-columns: 1fr; }
  .club-trend-chart { overflow-x: auto; grid-template-columns: repeat(12, minmax(38px, 1fr)); }
  .attention-item { grid-template-columns: 1fr; }
  .upcoming-session-row { grid-template-columns: 46px minmax(0, 1fr); }
  .upcoming-session-row em { grid-column: 2; }
}

.chart-title-row h3 {
  margin: 0 0 6px;
  color: var(--navy);
  font-size: 1.18rem;
}

.chart-title-row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.pie-chart-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 26px;
  align-items: center;
  margin-top: 24px;
}

.pie-chart {
  position: relative;
  display: grid;
  place-items: center;
  width: min(260px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(8, 37, 69, 0.08), 0 16px 34px rgba(8, 37, 69, 0.1);
}

.pie-chart::after {
  content: "";
  position: absolute;
  width: 52%;
  height: 52%;
  border-radius: 50%;
  background: #fff;
}

.pie-chart span {
  position: relative;
  z-index: 1;
  color: var(--navy);
  font-size: 2rem;
  font-weight: 900;
}

.chart-legend {
  display: grid;
  gap: 10px;
}

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

.legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 4px;
}

.legend-row strong {
  color: var(--navy);
  font-size: 0.9rem;
}

.legend-row em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.chart-empty-state {
  margin-top: 22px;
  padding: 28px;
  border: 1px dashed #cfdbe5;
  border-radius: 16px;
  color: var(--muted);
  background: #fff;
  text-align: center;
  font-weight: 800;
}

.chart-context-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-height: 30px;
  padding: 6px 11px;
  border: 1px solid #c9e5eb;
  border-radius: 999px;
  color: var(--teal-dark);
  background: #eefafd;
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.engagement-chart-card .chart-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.engagement-empty-note {
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid #f4d796;
  border-radius: 12px;
  color: #8a5a00;
  background: #fff7df;
  font-size: 0.88rem;
  font-weight: 800;
}

.engagement-bars {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.engagement-row {
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(180px, 1fr) 42px;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.engagement-label {
  min-width: 0;
}

.engagement-label strong,
.engagement-label span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.engagement-label strong {
  color: var(--navy);
  font-size: 0.9rem;
}

.engagement-label span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.engagement-track {
  position: relative;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8f1f5;
}

.engagement-fill {
  display: block;
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--navy) 0%, var(--teal-dark) 100%);
  box-shadow: 0 6px 14px rgba(46, 150, 169, 0.22);
}

.engagement-row em {
  color: var(--navy);
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

.engagement-helper {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.confirmation-card {
  text-align: center;
}

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 11px;
  border: 1px solid #c9e5eb;
  border-radius: 999px;
  color: var(--teal-dark);
  background: #eefafd;
  font-size: 0.78rem;
  font-weight: 800;
}

.card-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--navy);
}

.auth-card h2 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 1.65rem;
  letter-spacing: 0;
}

.subtitle {
  margin: 0 0 26px;
  color: var(--muted);
  line-height: 1.6;
}

.form-grid {
  display: grid;
  gap: 18px;
}

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

.full,
.field.full,
.check-row.full,
.action-row.full {
  grid-column: 1 / -1;
}

.form-section {
  border-top: 1px solid #d7e2ea;
  padding-top: 18px;
}

.form-section h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.05rem;
}

.field label,
.field-group label,
.check-row {
  color: var(--slate);
  font-size: 0.9rem;
  font-weight: 700;
}

.field label,
.field-group label {
  display: block;
  margin-bottom: 8px;
}

.field input,
.field select,
.field-group input,
.field-group select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #cfdbe5;
  border-radius: 12px;
  color: var(--navy);
  background: #fff;
  outline: none;
}

.field textarea,
.field-group textarea {
  display: block;
  width: 100%;
  min-height: 128px;
  padding: 12px 14px;
  border: 1px solid #cfdbe5;
  border-radius: 12px;
  color: var(--navy);
  background: #fff;
  line-height: 1.5;
  outline: none;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(46, 150, 169, 0.14);
}

.standard-radio-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
}

.field label.standard-radio-option,
.field-group label.standard-radio-option,
.standard-radio-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--slate);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.field input.standard-radio-input,
.field-group input.standard-radio-input,
.standard-radio-input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  flex: 0 0 16px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  accent-color: var(--teal);
  cursor: pointer;
}

.field input.standard-radio-input:focus,
.field-group input.standard-radio-input:focus,
.standard-radio-input:focus {
  box-shadow: 0 0 0 3px rgba(46, 150, 169, 0.14);
}

.error-text,
.field-validation-error {
  display: block;
  min-height: 18px;
  margin-top: 7px;
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 700;
}

.validation-summary {
  color: var(--danger);
  font-size: 0.88rem;
  font-weight: 700;
}

.validation-summary ul {
  margin: 0;
  padding-left: 18px;
}

.message,
.success-message {
  margin-bottom: 18px;
  padding: 13px 14px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.45;
}

.message.success,
.success-message {
  border: 1px solid #bcebd9;
  color: var(--success);
  background: var(--success-bg);
}

.status-message {
  margin-bottom: 18px;
  padding: 13px 14px;
  border: 1px solid #bcebd9;
  border-radius: 12px;
  color: var(--success);
  background: var(--success-bg);
  font-size: 0.88rem;
  font-weight: 800;
}

.check-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--slate);
  line-height: 1.45;
}

.check-line input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--teal);
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.link-button {
  border: 0;
  padding: 0;
  color: var(--teal-dark);
  background: transparent;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}

.link-button:hover {
  color: var(--navy);
  text-decoration: underline;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}

.primary-button {
  border: 1px solid var(--navy);
  color: #fff;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 52%, var(--teal-dark) 100%);
  box-shadow: 0 14px 28px rgba(8, 37, 69, 0.18);
}

.primary-button.compact {
  align-self: end;
  width: auto;
  min-width: 110px;
  padding: 0 18px;
}

.secondary-button {
  border: 1px solid #cfdbe5;
  color: var(--navy);
  background: #fff;
}

.action-row {
  display: grid;
  gap: 13px;
  margin-top: 4px;
}

.helper-card {
  display: none;
  padding: 12px 14px;
  border: 1px solid #f0d696;
  border-radius: 12px;
  color: var(--warning);
  background: var(--warning-bg);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.5;
}

.helper-card.visible {
  display: block;
}

.screen-footer {
  margin-top: 22px;
  color: var(--muted);
  text-align: center;
  font-size: 0.92rem;
}

.confirmation-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  margin-bottom: 18px;
  border: 1px solid #bcebd9;
  border-radius: 50%;
  background: var(--success-bg);
}

.confirmation-icon::before {
  content: "";
  width: 34px;
  height: 34px;
  background: var(--success);
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
}

.confirmation-icon.success::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m9 16.2-3.5-3.5L4 14.2l5 5L20 8.2 18.5 6.7 9 16.2Z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m9 16.2-3.5-3.5L4 14.2l5 5L20 8.2 18.5 6.7 9 16.2Z'/%3E%3C/svg%3E");
}

.confirmation-icon.email::before {
  background: var(--teal-dark);
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2Zm0 4-8 5-8-5V6l8 5 8-5v2Z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2Zm0 4-8 5-8-5V6l8 5 8-5v2Z'/%3E%3C/svg%3E");
}

.confirmation-icon.security::before {
  background: var(--navy);
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2 4 5v6c0 5.55 3.84 10.74 8 12 4.16-1.26 8-6.45 8-12V5l-8-3Zm-1 15-4-4 1.41-1.41L11 14.17l5.59-5.59L18 10l-7 7Z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2 4 5v6c0 5.55 3.84 10.74 8 12 4.16-1.26 8-6.45 8-12V5l-8-3Zm-1 15-4-4 1.41-1.41L11 14.17l5.59-5.59L18 10l-7 7Z'/%3E%3C/svg%3E");
}

.confirmation-icon.is-loading::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 18px;
  height: 18px;
  border: 3px solid #d7f2ea;
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 1.1s linear infinite;
}

.confirmation-note {
  margin: 0 0 20px;
  padding: 13px 14px;
  border: 1px solid #f0d696;
  border-radius: 12px;
  color: var(--warning);
  background: var(--warning-bg);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.55;
  text-align: left;
}

.summary-card {
  display: grid;
  gap: 10px;
  margin: 22px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fbfd;
  text-align: left;
}

.summary-row {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 12px;
}

.summary-row span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.summary-row strong {
  color: var(--navy);
  font-size: 0.9rem;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.table-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 14px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(3, minmax(150px, 0.8fr)) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(216, 226, 234, 0.92);
  border-radius: 16px;
  background: #f8fbfd;
}

.attendance-overview-filter-panel {
  align-items: end;
  gap: 10px;
}

.attendance-overview-filter-panel.no-club-filter {
  grid-template-columns: minmax(150px, 170px) minmax(125px, 1fr) minmax(125px, 1fr) minmax(110px, 0.7fr) auto;
}

.attendance-overview-filter-panel.has-club-filter {
  grid-template-columns: minmax(150px, 170px) minmax(110px, 1fr) minmax(110px, 1fr) minmax(105px, 0.7fr) minmax(110px, 1fr) auto;
}

.attendance-overview-filter-panel .attendance-filter-date input {
  min-width: 0;
}

.attendance-overview-filter-panel .attendance-filter-apply {
  min-height: 40px;
  min-width: 70px;
  padding: 0 12px;
}

.tournaments-filter-panel {
  grid-template-columns: minmax(220px, 1.6fr) repeat(5, minmax(130px, 0.8fr)) auto;
}

.reports-filter-panel {
  grid-template-columns: minmax(280px, 1.6fr) repeat(2, minmax(150px, 0.8fr)) auto auto;
}

.calendar-filter-panel {
  grid-template-columns: repeat(3, minmax(180px, 1fr)) auto auto;
}

.class-schedule-grid {
  display: grid;
  grid-template-columns: minmax(160px, 1.1fr) minmax(140px, 1fr) minmax(140px, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.schedule-heading {
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 900;
}

.schedule-remove-cell {
  padding-top: 7px;
}

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

.student-selector-toolbar {
  display: flex;
  justify-content: flex-end;
  color: var(--navy);
}

.student-selector {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(216, 226, 234, 0.92);
  border-radius: 16px;
  background: #f8fbfd;
}

.student-check-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #cfdbe5;
  border-radius: 12px;
  background: #fff;
}

.student-check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

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

.student-check-row strong {
  color: var(--navy);
  font-size: 0.9rem;
}

.student-check-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.student-check-row em {
  color: var(--slate);
  font-size: 0.84rem;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.class-details-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.class-details-header > div { min-width: 0; overflow-wrap: anywhere; }

.class-details-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.class-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.class-summary-card strong {
  font-size: 2rem;
}

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

.class-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
}

.class-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--navy);
  background: #fff;
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
}

.class-tabs a:hover {
  border-color: #c9e5eb;
  background: #eefafd;
}

.class-section {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(216, 226, 234, 0.92);
  border-radius: 16px;
  background: #fff;
}

.class-section h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.08rem;
}

details.class-section { display: block; min-width: 0; }
details.class-section > summary { cursor: pointer; font-weight: 700; color: var(--navy); font-size: 1.08rem; }
details.class-section[open] > summary { margin-bottom: 16px; }
details.class-section[open] > .section-heading-row { margin-bottom: 12px; }

.class-section p {
  margin: 0;
  color: var(--slate);
  line-height: 1.6;
}

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

.schedule-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbfd;
}

.schedule-list strong {
  color: var(--navy);
}

.schedule-list span {
  color: var(--slate);
  font-weight: 800;
}

.muted-section {
  background: #f8fbfd;
}

.class-details-actions {
  justify-content: flex-start;
}

.puzzle-editor-card {
  display: grid;
  gap: 22px;
}

.puzzle-editor-card [hidden] {
  display: none !important;
}

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

.puzzle-step {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #f8fbfd;
}

.puzzle-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  background: var(--muted);
  font-weight: 900;
}

.puzzle-step.active,
.puzzle-step.complete {
  color: var(--navy);
  border-color: #a9dce5;
  background: #eefafd;
}

.puzzle-step.active span,
.puzzle-step.complete span {
  background: var(--navy);
}

.puzzle-metadata-grid {
  margin-bottom: 22px;
}

.puzzle-metadata-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.puzzle-metadata-summary div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.puzzle-metadata-summary span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.puzzle-metadata-summary strong {
  overflow-wrap: anywhere;
  color: var(--navy);
}

.puzzle-setup-layout {
  display: grid;
  grid-template-columns: minmax(320px, 680px) minmax(280px, 1fr);
  align-items: start;
  gap: 24px;
}

.puzzle-board {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  grid-template-rows: repeat(8, minmax(0, 1fr));
  width: 100%;
  max-width: 680px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 3px solid var(--navy);
  border-radius: 8px;
  background: var(--navy);
}

@media (min-width: 992px) {
  .puzzle-board {
    max-width: 382.5px;
  }
}

.puzzle-square {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  padding: 0;
  border: 0;
  color: #111820;
  cursor: pointer;
}

.puzzle-square.light {
  background: #e8e1ca;
}

.puzzle-square.dark {
  background: #63806b;
}

.puzzle-square.selected {
  box-shadow: inset 0 0 0 4px #f1c75b;
}

.puzzle-square.legal-target {
  box-shadow: inset 0 0 0 5px rgba(38, 175, 116, 0.78);
}

.puzzle-piece,
.puzzle-piece-palette button[data-piece]:not(.remove-piece)::before {
  width: 82%;
  height: 82%;
  flex: 0 0 82%;
  background: var(--piece-image) center / contain no-repeat;
}

.puzzle-piece-palette button[data-piece]:not(.remove-piece)::before {
  content: "";
}

[data-piece="K"] { --piece-image: url("/images/chess-pieces/cburnett/wK.svg"); }
[data-piece="Q"] { --piece-image: url("/images/chess-pieces/cburnett/wQ.svg"); }
[data-piece="R"] { --piece-image: url("/images/chess-pieces/cburnett/wR.svg"); }
[data-piece="B"] { --piece-image: url("/images/chess-pieces/cburnett/wB.svg"); }
[data-piece="N"] { --piece-image: url("/images/chess-pieces/cburnett/wN.svg"); }
[data-piece="P"] { --piece-image: url("/images/chess-pieces/cburnett/wP.svg"); }
[data-piece="k"] { --piece-image: url("/images/chess-pieces/cburnett/bK.svg"); }
[data-piece="q"] { --piece-image: url("/images/chess-pieces/cburnett/bQ.svg"); }
[data-piece="r"] { --piece-image: url("/images/chess-pieces/cburnett/bR.svg"); }
[data-piece="b"] { --piece-image: url("/images/chess-pieces/cburnett/bB.svg"); }
[data-piece="n"] { --piece-image: url("/images/chess-pieces/cburnett/bN.svg"); }
[data-piece="p"] { --piece-image: url("/images/chess-pieces/cburnett/bP.svg"); }

.puzzle-square::before,
.puzzle-square::after {
  position: absolute;
  z-index: 2;
  color: rgba(17, 24, 32, 0.72);
  font-size: clamp(0.55rem, 1.2vw, 0.74rem);
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}

.puzzle-square.dark::before,
.puzzle-square.dark::after {
  color: rgba(255, 255, 255, 0.82);
}

.puzzle-square[data-rank-label]::before {
  top: 4px;
  left: 4px;
  content: attr(data-rank-label);
}

.puzzle-square[data-file-label]::after {
  right: 4px;
  bottom: 4px;
  content: attr(data-file-label);
}

.puzzle-square .puzzle-piece {
  cursor: grab;
  user-select: none;
}

.puzzle-board.is-locked .puzzle-square,
.puzzle-board.is-locked .puzzle-square .puzzle-piece {
  cursor: default;
}

.puzzle-board-help {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.puzzle-control-panel {
  align-content: start;
}

.puzzle-panel-stack {
  display: grid;
  gap: 14px;
}

.puzzle-tool-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.puzzle-piece-palette {
  display: grid;
  grid-template-columns: repeat(6, minmax(42px, 1fr));
  gap: 7px;
}

.puzzle-piece-palette button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  min-width: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #111820;
  background: #fff;
}

.puzzle-piece-palette button:hover,
.puzzle-piece-palette button.selected {
  border-color: #5ab4c6;
  background: #eefafd;
}

.puzzle-piece-palette .remove-piece {
  grid-column: span 2;
  aspect-ratio: auto;
  min-height: 42px;
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 800;
}

.puzzle-solution-list {
  display: grid;
  gap: 7px;
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.puzzle-solution-list div {
  display: grid;
  grid-template-columns: 34px minmax(70px, 1fr) minmax(70px, 1fr);
  gap: 8px;
  color: var(--navy);
}

.puzzle-promotion-picker {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #a9dce5;
  border-radius: 8px;
  background: #eefafd;
}

.puzzle-promotion-picker button {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--navy);
  font-weight: 800;
}

.puzzle-test-message {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
  color: var(--navy);
  font-weight: 800;
}

.puzzle-test-message.error {
  border-color: #e7b2b2;
  background: #fff4f4;
  color: var(--danger);
}

.puzzle-test-message.success {
  border-color: #9bd6bb;
  background: #effbf5;
  color: #166b48;
}

@media (max-width: 1050px) {
  .puzzle-setup-layout {
    grid-template-columns: 1fr;
  }

  .puzzle-board {
    margin: 0 auto;
  }

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

@media (max-width: 600px) {
  .puzzle-stepper {
    grid-template-columns: 1fr;
  }

  .puzzle-piece-palette {
    grid-template-columns: repeat(4, minmax(42px, 1fr));
  }

  .puzzle-metadata-summary {
    grid-template-columns: 1fr;
  }
}

.calendar-filter-card {
  margin-top: 18px;
}

.calendar-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  margin-top: 18px;
}

.calendar-legend,
.calendar-card {
  min-width: 0;
  border: 1px solid rgba(216, 226, 234, 0.95);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(8, 37, 69, 0.08);
}

.calendar-legend {
  align-self: start;
  display: grid;
  gap: 12px;
  padding: 18px;
}

.calendar-legend strong {
  color: var(--navy);
}

.calendar-legend span {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--slate);
  font-size: 0.9rem;
  font-weight: 800;
}

.calendar-legend i {
  width: 14px;
  height: 14px;
  border-radius: 4px;
}

.calendar-card {
  padding: 18px;
  overflow: visible;
}

.full-calendar-host {
  min-height: 640px;
}

.full-calendar-host .fc {
  min-width: 0;
  color: var(--slate);
}

.full-calendar-host .fc-toolbar-title {
  color: var(--navy);
  font-size: 1.24rem;
  font-weight: 900;
}

.full-calendar-host .fc-button-primary {
  border-color: var(--navy);
  background: var(--navy);
  font-weight: 800;
}

.full-calendar-host .fc-button-primary:not(:disabled):hover,
.full-calendar-host .fc-button-primary:not(:disabled).fc-button-active {
  border-color: var(--teal-dark);
  background: var(--teal-dark);
}

.full-calendar-host .fc-event {
  border-radius: 7px;
  padding: 2px 4px;
  cursor: pointer;
}

.fc-event-popover {
  position: absolute;
  z-index: 40;
  display: grid;
  gap: 6px;
  width: 300px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--slate);
  background: #fff;
  box-shadow: var(--shadow);
}

.fc-event-popover strong {
  color: var(--navy);
}

.fc-event-popover span,
.fc-event-popover a {
  font-size: 0.82rem;
}

.fc-event-popover a {
  color: var(--teal-dark);
  font-weight: 900;
  text-decoration: none;
}

.calendar-empty-state {
  margin-bottom: 16px;
}

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

.calendar-toolbar h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.22rem;
}

.calendar-view-tabs {
  display: flex;
  gap: 8px;
}

.calendar-view-tabs span {
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}

.calendar-view-tabs .active {
  color: #fff;
  background: var(--navy);
  border-color: var(--navy);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: auto;
}

.calendar-weekday {
  padding: 10px;
  color: var(--navy);
  background: #f8fbfd;
  font-size: 0.82rem;
  font-weight: 900;
  text-align: center;
}

.calendar-day {
  position: relative;
  min-height: 136px;
  padding: 10px;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: #fff;
}

.calendar-day.muted {
  background: #f8fbfd;
}

.day-number {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.calendar-event {
  position: relative;
  margin-bottom: 6px;
  border-left: 4px solid;
  border-radius: 8px;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 800;
}

.calendar-event summary {
  padding: 6px 8px;
  cursor: pointer;
  list-style: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event summary::-webkit-details-marker {
  display: none;
}

.event-popover {
  position: absolute;
  z-index: 25;
  left: 0;
  top: 30px;
  display: grid;
  gap: 5px;
  width: 280px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--slate);
  background: #fff;
  box-shadow: var(--shadow);
}

.event-popover strong {
  color: var(--navy);
}

.event-popover span,
.event-popover a {
  color: var(--slate);
  font-size: 0.8rem;
}

.event-popover a {
  color: var(--teal-dark);
  font-weight: 900;
  text-decoration: none;
}

.more-events {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.report-filter-card,
.report-result-card {
  margin-top: 18px;
}

.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.report-action-button,
.compact-link {
  width: auto;
  min-height: 42px;
  padding: 0 14px;
}

.report-action-button {
  gap: 8px;
}

.report-action-button.excel-export {
  border-color: #9bd3b1;
  color: #17613a;
}

.report-action-button.pdf-export {
  border-color: #efb1b1;
  color: #9b1c1c;
}

.report-action-button.excel-export::before,
.report-action-button.pdf-export::before {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
}

.report-action-button.excel-export::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6Zm-1 2.5L17.5 9H13V4.5ZM8 12h2l1.4 2.1L12.8 12h2l-2.4 3.5L15 19h-2l-1.6-2.3L9.8 19h-2l2.6-3.5L8 12Z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6Zm-1 2.5L17.5 9H13V4.5ZM8 12h2l1.4 2.1L12.8 12h2l-2.4 3.5L15 19h-2l-1.6-2.3L9.8 19h-2l2.6-3.5L8 12Z'/%3E%3C/svg%3E");
}

.report-action-button.pdf-export::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6Zm-1 2.5L17.5 9H13V4.5ZM7 12h3a2 2 0 0 1 0 4H9v3H7v-7Zm2 2v1h1a.5.5 0 0 0 0-1H9Zm4-2h2a3 3 0 0 1 0 6h-2v-6Zm2 2v2a1 1 0 0 0 0-2Zm3-2h3v2h-1v5h-2v-7Z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6Zm-1 2.5L17.5 9H13V4.5ZM7 12h3a2 2 0 0 1 0 4H9v3H7v-7Zm2 2v1h1a.5.5 0 0 0 0-1H9Zm4-2h2a3 3 0 0 1 0 6h-2v-6Zm2 2v2a1 1 0 0 0 0-2Zm3-2h3v2h-1v5h-2v-7Z'/%3E%3C/svg%3E");
}

.report-action-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.report-group-row td {
  color: var(--navy);
  background: #eefafd;
  font-weight: 900;
}

.report-group-row span {
  display: inline-flex;
  margin-left: 10px;
  padding: 4px 8px;
  border: 1px solid #c9e5eb;
  border-radius: 999px;
  color: var(--teal-dark);
  background: #fff;
  font-size: 0.78rem;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #c9e5eb;
  border-radius: 999px;
  color: var(--teal-dark);
  background: #eefafd;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.sort-link {
  color: var(--navy);
  text-decoration: none;
}

.sort-link:hover {
  color: var(--teal-dark);
}

.export-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--navy);
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--navy) 0%, var(--teal-dark) 100%);
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
}

.excel-icon {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  background:
    linear-gradient(90deg, #0f7a45 0 34%, transparent 34%),
    linear-gradient(#fff 0 0) 11px 4px / 5px 1px no-repeat,
    linear-gradient(#fff 0 0) 11px 8px / 5px 1px no-repeat,
    linear-gradient(#fff 0 0) 11px 12px / 5px 1px no-repeat,
    #1f9d5a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.admin-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
}

:is(.admin-table, .data-table) > tbody > tr:nth-child(odd):not(.report-group-row) { background-color: #ffffff; }
:is(.admin-table, .data-table) > tbody > tr:nth-child(even):not(.report-group-row) { background-color: #eef7fa; }
@supports selector(tr:nth-child(2 of :not(.report-group-row))) {
  :is(.admin-table, .data-table) > tbody > tr:nth-child(odd of :not(.report-group-row)) { background-color: #ffffff; }
  :is(.admin-table, .data-table) > tbody > tr:nth-child(even of :not(.report-group-row)) { background-color: #eef7fa; }
}

.admin-table th,
.admin-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--slate);
  font-size: 0.9rem;
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  color: var(--navy);
  background: #f8fbfd;
  font-weight: 800;
}

.table-filter-form {
  display: grid;
  gap: 6px;
  margin: 0;
}

.table-filter-form label {
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 800;
}

.table-filter-form select {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #cfdbe5;
  border-radius: 8px;
  color: var(--navy);
  background: #fff;
  font-size: 0.82rem;
  font-weight: 700;
}

.username-filter-form {
  min-width: 230px;
}

.search-filter-row {
  display: flex;
  gap: 6px;
}

.search-filter-row input {
  min-height: 34px;
  width: 100%;
  padding: 0 10px;
  border: 1px solid #cfdbe5;
  border-radius: 8px;
  color: var(--navy);
  background: #fff;
  font-size: 0.82rem;
  font-weight: 700;
}

.search-filter-row button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--navy);
  border-radius: 8px;
  color: #fff;
  background: var(--navy);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

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

.inline-actions form,
.admin-table form {
  margin: 0;
}

.table-button,
.table-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  background: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.table-button.approve {
  color: var(--success);
  border-color: #bcebd9;
  background: var(--success-bg);
}

.table-button.reject,
.table-button.delete {
  color: var(--danger);
  border-color: #f3c5cb;
  background: var(--danger-bg);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  min-width: 76px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.status-badge.active {
  color: var(--success);
  background: var(--success-bg);
  border: 1px solid #bcebd9;
}

.status-badge.inactive {
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid #f3c5cc;
}

.status-badge.upcoming {
  color: var(--teal-dark);
  background: #eefafd;
  border: 1px solid #c9e5eb;
}

.status-badge.completed {
  color: #5f6c7b;
  background: #f0f3f6;
  border: 1px solid #d9e0e7;
}

.attendance-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.attendance-summary-grid div,
.attendance-student-row {
  border: 1px solid rgba(216, 226, 234, 0.92);
  border-radius: 12px;
  background: #f8fbfd;
}

.attendance-summary-grid div {
  padding: 14px;
}

.attendance-summary-grid span,
.attendance-field-label,
.attendance-student-name span {
  display: block;
  margin-bottom: 6px;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.attendance-summary-grid strong,
.attendance-student-name strong {
  color: var(--navy);
  font-size: 0.98rem;
}

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

.attendance-live-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--navy);
  font-weight: 800;
}

.attendance-roster {
  display: grid;
  gap: 14px;
}

.attendance-student-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(300px, 1.4fr) minmax(260px, 1fr);
  gap: 16px;
  padding: 16px;
}

.attendance-status-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.attendance-status-option {
  cursor: pointer;
}

.attendance-status-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.attendance-status-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid #cfdbe5;
  border-radius: 10px;
  color: var(--navy);
  background: #fff;
  font-size: 0.86rem;
  font-weight: 800;
}

.attendance-status-option input:checked + span {
  color: #fff;
  border-color: var(--navy);
  background: var(--navy);
}

.attendance-unmarked {
  margin-top: 8px;
  color: #64748b;
  font-size: 0.84rem;
  font-weight: 800;
}

.attendance-additional {
  display: grid;
  gap: 10px;
}

.attendance-extra {
  display: none;
}

.attendance-extra label {
  display: block;
  margin-bottom: 5px;
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 800;
}

.attendance-extra input,
.attendance-extra select {
  width: 100%;
  min-height: 38px;
  border: 1px solid #d7e1ea;
  border-radius: 10px;
  padding: 0 10px;
  color: var(--text);
  background: #fff;
}

.attendance-student-row.is-late .attendance-late,
.attendance-student-row.is-excused .attendance-excused,
.attendance-notes {
  display: block;
}

.attendance-actions {
  margin-top: 18px;
}

@media (max-width: 960px) {
  .attendance-summary-grid,
  .attendance-student-row {
    grid-template-columns: 1fr;
  }

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

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

.readonly-note {
  margin: 16px 0;
  padding: 13px 14px;
  border: 1px solid #c9e5eb;
  border-radius: 12px;
  color: var(--navy);
  background: #eefafd;
  font-size: 0.9rem;
  font-weight: 800;
}

.assignment-panel {
  margin: 22px 0;
  padding: 18px;
  border: 1px solid rgba(216, 226, 234, 0.92);
  border-radius: 16px;
  background: #f8fbfd;
}

.assignment-panel h3 {
  margin: 0 0 16px;
  color: var(--navy);
  font-size: 1.1rem;
}

.multi-select-panel {
  margin-top: 18px;
}

.multi-select-panel > label {
  display: block;
  margin-bottom: 10px;
  color: var(--slate);
  font-size: 0.9rem;
  font-weight: 800;
}

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

.arbiter-chip {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid #cfdbe5;
  border-radius: 12px;
  background: #fff;
}

.arbiter-chip input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--teal);
}

.arbiter-chip strong,
.arbiter-chip small {
  display: block;
}

.arbiter-chip strong {
  color: var(--navy);
  font-size: 0.88rem;
}

.arbiter-chip small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
}

.toggle-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.approval-toggle-form {
  display: inline-flex;
}

.toggle-button {
  position: relative;
  width: 58px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: #d7dee7;
  cursor: pointer;
  transition: background 0.18s ease;
}

.toggle-button span {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(8, 37, 69, 0.22);
  transition: transform 0.18s ease;
}

.toggle-button.approved {
  background: var(--success);
}

.toggle-button.rejected {
  background: var(--danger);
}

.toggle-button.approved span {
  transform: translateX(28px);
}

.empty-cell {
  color: var(--muted);
  text-align: center;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.pager-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pager-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  background: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1200px) {
  .filter-panel:not(.attendance-overview-filter-panel) {
    grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  }
}

@media (min-width: 981px) {
  form.filter-panel[method="get"]:not(.reports-filter-panel):not(.attendance-overview-filter-panel),
  form.calendar-filter-panel {
    display: flex;
    align-items: flex-end;
    flex-wrap: nowrap;
  }

  form.filter-panel[method="get"]:not(.reports-filter-panel):not(.attendance-overview-filter-panel) > .field-group,
  form.calendar-filter-panel > .field-group {
    flex: 1 1 0;
    min-width: 0;
  }

  form.filter-panel[method="get"]:not(.reports-filter-panel):not(.attendance-overview-filter-panel) > .field-group:first-child,
  form.calendar-filter-panel > .field-group:first-child {
    flex-grow: 1.5;
  }
}

.filter-panel[method="get"]:not(.reports-filter-panel) button.primary-button,
.calendar-filter-panel #ApplyCalendarFilters {
  align-self: end;
  justify-self: start;
  flex: 0 0 auto;
  width: auto;
  min-width: 70px;
  min-height: 40px;
  padding: 0 12px;
}

.clubs-manage-filter-apply.primary-button.compact {
  min-width: 70px;
  min-height: 40px;
  padding: 0 12px;
}

@media (max-width: 980px) {
  .auth-shell {
    grid-template-columns: 171px minmax(0, 1fr);
  }

  .app-header {
    min-height: 68px;
    padding: 7px 18px;
  }

  .header-brand {
    flex-basis: 72px;
    width: 72px;
    height: 72px;
    margin-right: 12px;
  }

  .header-club-logo {
    flex-basis: 72px;
    width: 72px;
    height: 72px;
  }

  .header-title h1 {
    font-size: 1.25rem;
  }

  .header-title p {
    font-size: 0.61rem;
  }

  .side-nav {
    width: 171px;
    min-height: calc(100vh - 68px);
    padding: 14px 10px;
  }

  .nav-link {
    min-height: 36px;
    padding: 0 10px;
    gap: 8px;
    font-size: 0.8rem;
  }

  .nav-submenu {
    margin-left: 28px;
    padding-left: 8px;
  }

  .nav-submenu .nav-link {
    min-height: 30px;
    font-size: 0.72rem;
  }

  .nav-icon {
    flex-basis: 20px;
    width: 20px;
    height: 20px;
  }

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

  .attendance-overview-filter-panel.no-club-filter,
  .attendance-overview-filter-panel.has-club-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .calendar-filter-panel,
  .calendar-shell {
    grid-template-columns: 1fr;
  }

  .calendar-grid {
    grid-template-columns: repeat(7, minmax(105px, 1fr));
  }

  .arbiter-chip-grid {
    grid-template-columns: 1fr;
  }

  .pie-chart-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .chart-legend {
    width: 100%;
  }

  .engagement-chart-card .chart-title-row {
    flex-direction: column;
  }

  .engagement-row {
    grid-template-columns: minmax(150px, 210px) minmax(160px, 1fr) 36px;
  }
}

@media (max-width: 720px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .app-header {
    min-height: 60px;
    padding: 6px 12px;
  }

  .header-brand {
    flex-basis: 63px;
    width: 63px;
    height: 63px;
    margin-right: 8px;
  }

  .header-club-logo {
    flex-basis: 63px;
    width: 63px;
    height: 63px;
  }

  .header-title h1 {
    font-size: 1.05rem;
    text-shadow: none;
  }

  .header-title p {
    margin-top: 3px;
    font-size: 0.52rem;
  }

  .header-user {
    font-size: 0.75rem;
  }

  .header-role-icons img {
    width: 26px;
    height: 26px;
  }

  .account-menu summary {
    max-width: 120px;
    padding: 7px 8px;
  }

  .side-nav {
    position: relative;
    top: auto;
    display: flex;
    gap: 8px;
    width: 100%;
    min-height: auto;
    overflow-x: auto;
    padding: 12px 14px;
    border-right: 0;
    border-bottom: 1px solid rgba(216, 226, 234, 0.85);
  }

  .nav-link {
    flex: 0 0 auto;
    min-height: 32px;
    margin-bottom: 0;
    white-space: nowrap;
    font-size: 0.8rem;
  }

  .nav-submenu {
    display: flex;
    flex: 0 0 auto;
    gap: 6px;
    margin: 0;
    padding-left: 0;
    border-left: 0;
  }

  .nav-submenu .nav-link {
    min-height: 30px;
    padding: 0 10px;
    font-size: 0.72rem;
  }

  .nav-submenu .nav-link:first-child {
    border-bottom: 0;
    border-right: 1px solid rgba(8, 37, 69, 0.12);
    padding-right: 12px;
  }

  .nav-icon {
    flex-basis: 18px;
    width: 18px;
    height: 18px;
  }

  .auth-main {
    width: min(100% - 28px, 620px);
    min-height: auto;
    padding: 10px 0 28px;
  }

  .auth-card {
    padding: 24px;
    border-radius: 20px;
  }

  .register .form-grid,
  .class-schedule-grid,
  .class-wizard-summary,
  .class-overview-grid,
  .class-details-summary,
  .dashboard-grid,
  .filter-panel,
  .attendance-overview-filter-panel.no-club-filter,
  .attendance-overview-filter-panel.has-club-filter,
  .tournaments-filter-panel,
  .reports-filter-panel,
  .calendar-filter-panel,
  .summary-row {
    grid-template-columns: 1fr;
  }

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

  .full-calendar-host .fc-header-toolbar {
    flex-wrap: wrap;
    gap: 10px;
  }

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

  .student-check-row em {
    grid-column: 2;
  }

  .page-title-row {
    flex-direction: column;
  }

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

  .engagement-row {
    grid-template-columns: 1fr;
  }

  .engagement-row em {
    text-align: left;
  }

  .chart-context-badge {
    white-space: normal;
  }
}
:root { --student-section-border: #d6e2ed; }
.student-dashboard-section { margin: 20px 0; border: 1px solid var(--student-section-border); border-radius: 8px; padding: 16px; min-width: 0; }
.student-dashboard-section > summary { cursor: pointer; font-size: 18px; font-weight: 700; color: #0c2c4b; }
.student-dashboard-section[open] > summary { margin-bottom: 20px; }
.student-dashboard-unwrapped { display: block; }
.student-dashboard-unwrapped > summary { display: none; }
.trial-account-banner { padding: 16px 20px; margin-bottom: 16px; border: 1px solid #e7ba4b; background: #fff8dc; color: #624400; border-radius: 8px; overflow-wrap: anywhere; }
.auth-main:has(> .trial-account-banner) { flex-direction: column; align-items: stretch; justify-content: flex-start; }
.student-dashboard-section .level-current-badge { max-width: 100%; min-width: 0; flex-shrink: 1; }
.student-dashboard-section .level-current-badge > div { min-width: 0; overflow-wrap: anywhere; }
.reset-account-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 28px; margin: 20px 0 0; padding: 22px; background: #f7fafc; border-block: 1px solid var(--line); }
.reset-account-details > div { min-width: 0; }
.reset-account-details dt { color: var(--muted); font-size: 13px; font-weight: 600; }
.reset-account-details dd { margin: 5px 0 0; color: var(--navy); font-weight: 600; overflow-wrap: anywhere; }
.reset-password-section { margin-top: 28px; padding-top: 8px; }
.reset-password-form { margin-top: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.password-reset-page .action-row { display: flex; flex-wrap: wrap; gap: 12px; }
.password-reset-page .action-row > .primary-button,
.password-reset-page .action-row > .secondary-button { width: auto; min-width: 140px; min-height: 44px; padding: 0 22px; }
.attendance-sessions-table tbody tr:nth-child(odd) > td:not(.empty-cell) { background-color: #ffffff; }
.attendance-sessions-table tbody tr:nth-child(even) > td:not(.empty-cell) { background-color: #eef7fa; }
.session-status-filter { grid-template-columns: minmax(160px, 280px) max-content; align-items: end; }
.session-status-filter > button { width: auto; justify-self: start; }
@media (max-width: 720px) { .reset-account-details { grid-template-columns: 1fr; padding: 18px; gap: 16px; } .reset-password-form { grid-template-columns: 1fr; } .session-status-filter { grid-template-columns: minmax(0, 1fr) max-content; } }
