:root {
  color-scheme: light;
  --ink: #18201e;
  --muted: #6a7370;
  --line: #dde5e2;
  --paper: #f5f7f6;
  --panel: #ffffff;
  --green: #167a5b;
  --green-dark: #0e5f46;
  --blue: #255f99;
  --yellow: #f2be4b;
  --red: #c44c3f;
  --shadow: 0 12px 28px rgba(31, 48, 44, 0.08);
  --shadow-lg: 0 20px 40px rgba(31, 48, 44, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.15s ease;
}

button:hover {
  border-color: var(--green);
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(16px + env(safe-area-inset-top)) clamp(16px, 4vw, 32px) 16px;
}

.logo-link {
  cursor: pointer;
  transition: opacity 0.2s;
}

.logo-link:hover {
  opacity: 0.8;
}

.logo-link:focus {
  outline: 2px solid var(--green);
  outline-offset: 4px;
  border-radius: 4px;
}

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

#signOutButton {
  display: none;
}

body.signed-in #signOutButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 14px;
  min-height: 36px;
  font-size: 0.85rem;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.1;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  line-height: 1.2;
}

h3 {
  font-size: 1.1rem;
}

.sync-status {
  display: none;
}

/* Toast Notifications */
.status-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  z-index: 1000;
  min-width: 260px;
  max-width: 85vw;
  padding: 28px 32px;
  border-radius: 16px;
  background: white;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.status-toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.status-toast.ok {
  color: var(--green-dark);
}

.status-toast.ok::before {
  content: "✓";
  display: block;
  width: 48px;
  height: 48px;
  line-height: 48px;
  margin: 0 auto 12px;
  background: var(--green);
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
  border-radius: 50%;
}

.status-toast.error {
  color: var(--red);
}

.status-toast.error::before {
  content: "✕";
  display: block;
  width: 48px;
  height: 48px;
  line-height: 48px;
  margin: 0 auto 12px;
  background: var(--red);
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
  border-radius: 50%;
}

/* Backdrop overlay for toast */
.status-toast-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.status-toast-backdrop.show {
  opacity: 1;
}

.app-shell {
  display: grid;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px) calc(92px + env(safe-area-inset-bottom));
}

/* ===== AUTH SCREEN - MODERN PROFESSIONAL DESIGN ===== */
.auth-screen {
  padding: 24px clamp(16px, 4vw, 48px) calc(44px + env(safe-area-inset-bottom));
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

/* Auth Gateway - Single Entry Point */
.auth-gateway,
.auth-flow {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  animation: fadeIn 0.3s ease;
}

.auth-flow[hidden] {
  display: none !important;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.gateway-card,
.flow-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--shadow-lg);
  padding: 32px;
}

.gateway-header,
.flow-header {
  text-align: center;
  margin-bottom: 4px;
}

.gateway-header h2,
.flow-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

.gateway-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gateway-form label,
.flow-card form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gateway-form label span,
.flow-card form label span {
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
}

.gateway-form label span small,
.flow-card form label span small {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.8rem;
}

.gateway-form input,
.flow-card form input,
.flow-card form select {
  width: 100%;
  min-height: 48px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 12px 16px;
  font-size: 0.95rem;
  transition: all 0.15s ease;
}

.flow-card form select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236a7370' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.gateway-form input:hover,
.flow-card form input:hover,
.flow-card form select:hover {
  border-color: #c5d1cc;
}

.gateway-form input:focus,
.flow-card form input:focus,
.flow-card form select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 122, 91, 0.1);
}

.gateway-form input::placeholder,
.flow-card form input::placeholder {
  color: #9aa5a1;
}

.gateway-form button.primary,
.flow-card form button.primary {
  border: none;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  min-height: 48px;
  margin-top: 4px;
  transition: all 0.15s ease;
}

.gateway-form button.primary:hover,
.flow-card form button.primary:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22, 122, 91, 0.3);
}

.admin-summary {
  background: var(--bg-warm);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}

.admin-summary p {
  margin: 0 0 8px 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.admin-summary strong {
  display: block;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.admin-summary span {
  display: block;
  color: var(--muted);
  font-size: 0.875rem;
}

.text-link {
  background: none;
  border: none;
  color: var(--green);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  min-height: auto;
}

.text-link:hover {
  text-decoration: underline;
  transform: none;
  box-shadow: none;
}

.gateway-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
}

.gateway-divider::before,
.gateway-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.gateway-divider span {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.gateway-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gateway-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 20px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.gateway-action-btn:hover {
  border-color: var(--green);
  background: rgba(22, 122, 91, 0.04);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(22, 122, 91, 0.1);
}

.action-icon {
  font-size: 1.75rem;
  line-height: 1;
}

.action-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.action-desc {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

.back-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  min-height: auto;
  align-self: flex-start;
  margin-bottom: -8px;
}

.back-btn:hover {
  color: var(--green);
  transform: none;
  box-shadow: none;
}

.step-indicator {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  margin: -8px 0 0;
}

.form-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
  margin: 0;
}

.invite-banner {
  background: rgba(22, 122, 91, 0.08);
  border: 1px solid rgba(22, 122, 91, 0.2);
  border-radius: 10px;
  padding: 12px 16px;
  text-align: center;
}

.invite-banner p {
  margin: 0;
  color: var(--green-dark);
  font-weight: 600;
  font-size: 0.9rem;
}

.club-search {
  margin-bottom: 4px;
}

.club-search input,
.invite-paste input {
  width: 100%;
  min-height: 44px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 10px 14px;
  font-size: 0.9rem;
}

.invite-paste {
  margin-top: 8px;
}

.invite-paste p {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  margin: 0 0 6px;
}

.invite-paste button {
  width: 100%;
  margin-top: 8px;
  min-height: 44px;
  border: none;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.invite-paste button:hover {
  background: var(--green-dark);
}

/* Legacy grid layout (hidden by default) */
.auth-grid {
  display: none;
}

/* Auth Header */
.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 8px;
}

.auth-header p {
  color: var(--muted);
  font-size: 1rem;
  margin: 0;
}

.login-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow-lg);
  padding: 28px;
  transition: box-shadow 0.2s ease;
}

.login-card:hover {
  box-shadow: 0 24px 48px rgba(31, 48, 44, 0.14);
}

[hidden],
.login-card[hidden] {
  display: none !important;
}

.login-card small {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.login-card .card-header {
  margin-bottom: 4px;
}

.login-card .card-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

/* Form Styling */
.login-card form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-card label span {
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
}

.login-card label span small {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.8rem;
}

.login-card input,
.login-card select {
  width: 100%;
  min-height: 48px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 12px 16px;
  font-size: 0.95rem;
  transition: all 0.15s ease;
  appearance: none;
}

.login-card select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236a7370' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.login-card select option:first-child {
  color: #9aa5a1;
}

.login-card input:hover,
.login-card select:hover {
  border-color: #c5d1cc;
}

.login-card input:focus,
.login-card select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 122, 91, 0.1);
}

.login-card input::placeholder {
  color: #9aa5a1;
}

.login-card button.primary {
  border: none;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  min-height: 48px;
  margin-top: 4px;
  transition: all 0.15s ease;
}

.login-card button.primary:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22, 122, 91, 0.3);
}

.login-card button.secondary {
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  min-height: 48px;
  transition: all 0.15s ease;
}

.login-card button.secondary:hover {
  border-color: var(--green);
  background: rgba(22, 122, 91, 0.04);
}

/* Find Clubs Card - Full Width */
.find-clubs-card {
  grid-column: 1 / -1;
}

.clubs-directory {
  display: grid;
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 8px;
}

.club-directory-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.club-directory-item:hover {
  border-color: var(--green);
  background: white;
  box-shadow: 0 2px 8px rgba(22, 122, 91, 0.08);
}

.club-directory-info {
  flex: 1;
}

.club-directory-info h4 {
  margin: 0 0 4px;
  font-size: 1rem;
  color: var(--ink);
}

.club-directory-info p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.club-directory-item .request-btn {
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Join Form */
#joinForm {
  grid-column: 1 / -1;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

body.signed-out .app-shell,
body.signed-out .topbar-actions #signOutButton {
  display: none;
}

/* Signed out topbar styling */
body.signed-out .topbar {
  justify-content: center;
  padding-top: 32px;
}

body.signed-out .logo-link {
  text-align: center;
}

body.signed-out .logo-link .eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

body.signed-out .logo-link h1 {
  font-size: 2.25rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.signed-in .auth-screen {
  display: none;
}

body.join-page .auth-grid {
  grid-template-columns: minmax(280px, 600px);
  justify-content: center;
}

body.join-page #loginForm,
body.join-page #authClubForm {
  display: none;
}

.join-club-name {
  margin: -4px 0 0;
  color: var(--green-dark);
  font-weight: 700;
  font-size: 1.1rem;
}

body.no-club .dashboard,
body.no-club .player-form,
body.no-club .profile-form,
body.no-club .match-form,
body.no-club .attendance-form,
body.no-club .market-form,
body.no-club .app-tabs,
body.no-club .app-view {
  display: none;
}

body:not(.is-club-admin) .admin-drawer,
body:not(.is-club-admin) .admin-tab,
body:not(.is-superadmin) .superadmin-drawer,
body:not(.is-superadmin) .platform-panel {
  display: none;
}

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

.app-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.club-logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg-warm);
  border: 1.5px solid var(--line);
}

.club-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.club-logo:empty::before {
  content: "🏸";
  font-size: 1.5rem;
}

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

.user-profile-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: white;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-profile-button:hover {
  border-color: var(--green);
  box-shadow: 0 2px 8px rgba(22, 122, 91, 0.2);
}

.user-profile-button .user-avatar {
  display: block;
  width: 100%;
  height: 100%;
}

.user-profile-button .user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-profile-button .user-avatar .avatar-initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: white;
  font-size: 1rem;
  font-weight: 600;
}

.signed-in-label {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.app-tabs {
  position: fixed;
  z-index: 20;
  right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  left: 12px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  max-width: 560px;
  margin: 0 auto;
  border: 1px solid rgba(221, 229, 226, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 34px rgba(31, 48, 44, 0.14);
  padding: 5px;
  backdrop-filter: blur(14px);
}

body.is-club-admin .app-tabs {
  grid-template-columns: repeat(6, 1fr);
}

.app-tab {
  min-width: 0;
  min-height: 46px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  padding: 6px 3px;
  font-size: 0.75rem;
}

.app-tab.active {
  background: rgba(22, 122, 91, 0.1);
  color: var(--green-dark);
}

.app-view {
  display: none;
  gap: 14px;
}

.app-view.active {
  display: grid;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border-color: rgba(22, 122, 91, 0.18);
  background: linear-gradient(135deg, rgba(22, 122, 91, 0.08), #fff 58%);
}

.quick-action {
  min-width: 150px;
}

.club-switch-panel {
  padding: 18px;
}

.club-switcher {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

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

.club-choice {
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 12px;
  text-align: left;
}

.club-choice.selected {
  border-color: rgba(22, 122, 91, 0.55);
  background: rgba(22, 122, 91, 0.06);
}

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

.invite-button {
  min-height: 34px;
  padding: 5px 9px;
  font-size: 0.78rem;
}

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

.app-view > .panel,
.app-view > details.panel,
.detail-grid .panel {
  padding: 20px;
}

.admin-drawer,
.member-drawer {
  display: grid;
  gap: 14px;
}

.admin-drawer summary,
.member-drawer summary {
  cursor: pointer;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
  list-style-position: outside;
}

.admin-drawer form,
.member-drawer form {
  margin-top: 16px;
}

.product-actions {
  display: grid;
  gap: 8px;
}

.admin-list,
.admin-sheet {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

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

.admin-row div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.admin-row small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.danger-button {
  border-color: rgba(196, 76, 63, 0.35);
  color: var(--red);
}

.panel-heading,
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.icon-button {
  width: 42px;
  padding: 0;
  font-size: 1.25rem;
}

form {
  display: grid;
  gap: 14px;
}

.form-divider {
  height: 1px;
  margin-top: 8px;
  background: var(--line);
}

.player-form {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 92px;
}

label,
fieldset {
  display: grid;
  gap: 7px;
}

label span,
legend {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

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

input:focus,
select:focus,
button:focus-visible {
  outline: 3px solid rgba(37, 95, 153, 0.2);
  outline-offset: 2px;
}

fieldset {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.teams {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.attendance-form {
  margin-top: 20px;
}

.attendance-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}

.check-row input {
  width: 18px;
  min-height: 18px;
}

.check-row span {
  color: var(--ink);
}

.primary {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

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

.dashboard {
  min-width: 0;
  display: grid;
  gap: 18px;
}

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

#playerFilter {
  min-width: min(260px, 100%);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.segmented button {
  min-width: 76px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.segmented button.active {
  background: var(--blue);
  color: #fff;
}

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

.stat {
  min-height: 116px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 10px 28px rgba(31, 48, 44, 0.07);
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.stat strong {
  display: block;
  margin-top: 8px;
  font-size: 2rem;
  line-height: 1;
}

.stat em {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.detail-grid .panel,
.dashboard > .panel {
  padding: 18px;
}

.leaderboard-note {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.leaderboard {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.player-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  text-align: left;
}

.player-card.selected {
  border-color: rgba(22, 122, 91, 0.55);
  background: rgba(22, 122, 91, 0.06);
}

.player-card span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.player-card strong {
  overflow-wrap: anywhere;
}

.player-card small,
.player-card em {
  color: var(--muted);
  font-size: 0.74rem;
  font-style: normal;
}

.player-card em {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  grid-column: 1 / -1;
}

.role-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  background: rgba(37, 95, 153, 0.12);
  color: var(--blue);
  padding: 2px 8px;
  font-size: 0.68rem;
  font-weight: 900;
}

.role-pill.member {
  background: rgba(22, 122, 91, 0.1);
  color: var(--green-dark);
}

.h2h-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.h2h-scoreboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
  margin-top: 14px;
}

.h2h-player,
.versus-block {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  text-align: center;
}

.pair-stack {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.h2h-player span {
  font-weight: 900;
}

.h2h-player strong,
.versus-block strong {
  margin-top: 8px;
  font-size: 2.8rem;
  line-height: 1;
}

.h2h-player small,
.versus-block span,
.muted-text {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.versus-block {
  background: rgba(37, 95, 153, 0.08);
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin-top: 12px;
}

.form-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(22, 122, 91, 0.12);
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 900;
}

.h2h-insights {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.h2h-note {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.h2h-note span {
  color: var(--muted);
  font-size: 0.86rem;
}

.compact-list {
  margin-top: 10px;
}

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

.market-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 14px;
}

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

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

.club-row div {
  display: grid;
  gap: 3px;
}

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

.mini-stat {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.mini-stat strong {
  display: block;
  font-size: 1.2rem;
}

.mini-stat span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 42px minmax(150px, 1fr) repeat(4, minmax(74px, 0.5fr));
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
  text-align: left;
}

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

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.product-card {
  display: grid;
  gap: 8px;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.product-top,
.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.product-top span,
.product-meta span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.product-top strong {
  color: var(--green-dark);
  font-size: 1.05rem;
}

.product-card h4,
.product-card p {
  margin: 0;
}

.product-card h4 {
  font-size: 1rem;
}

.product-card p {
  color: var(--muted);
  font-size: 0.86rem;
}

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

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

.order-row div {
  display: grid;
  gap: 3px;
}

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

.attendance-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) repeat(4, minmax(74px, 0.5fr));
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 60px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
  text-align: left;
}

.attendance-row.selected {
  border-color: rgba(22, 122, 91, 0.55);
  background: rgba(22, 122, 91, 0.06);
}

.leaderboard-row.selected {
  border-color: rgba(22, 122, 91, 0.55);
  background: rgba(22, 122, 91, 0.06);
}

.rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(37, 95, 153, 0.1);
  color: var(--blue);
  font-weight: 900;
}

.leader-name {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 900;
}

.person {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.person > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.avatar {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 2px solid rgba(22, 122, 91, 0.18);
  border-radius: 999px;
  background: rgba(37, 95, 153, 0.1);
  color: var(--blue);
  object-fit: cover;
  font-size: 0.72rem;
  font-weight: 900;
}

.large-avatar {
  width: 46px;
  height: 46px;
  font-size: 0.86rem;
}

.h2h-player .avatar {
  width: 54px;
  height: 54px;
  font-size: 0.9rem;
}

.inline-person {
  margin: 2px 4px 2px 0;
}

.inline-person .avatar {
  width: 24px;
  height: 24px;
  border-width: 1px;
  font-size: 0.62rem;
}

.leader-stat {
  display: grid;
  gap: 2px;
}

.leader-stat strong {
  font-size: 1.08rem;
}

.leader-stat small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.warn-stat strong {
  color: var(--red);
}

.list,
.match-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.row,
.match {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.row-top,
.match-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 800;
}

.row small,
.match small,
.match p {
  margin: 0;
  color: var(--muted);
}

.match-pairs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 3px 9px;
  background: rgba(22, 122, 91, 0.1);
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 800;
}

.loss {
  background: rgba(196, 76, 63, 0.1);
  color: var(--red);
}

.empty-state {
  display: grid;
  gap: 4px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
}

.empty-state strong {
  color: var(--ink);
}

@media (min-width: 760px) {
  .app-shell {
    padding-bottom: 44px;
  }

  .app-tabs {
    position: sticky;
    top: 8px;
    right: auto;
    bottom: auto;
    left: auto;
    max-width: none;
  }

  .app-tab {
    font-size: 0.88rem;
  }

  .app-view.active {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .leaderboard-row {
    grid-template-columns: 42px minmax(150px, 1fr) repeat(2, minmax(74px, 1fr));
  }

  .attendance-row {
    grid-template-columns: minmax(150px, 1fr) repeat(3, minmax(70px, 1fr));
  }

  .product-grid,
  .players-grid,
  .club-switcher,
  .market-summary,
  .platform-grid,
  .h2h-insights {
    grid-template-columns: repeat(2, 1fr);
  }

  .optional-stat {
    display: none;
  }
}

@media (max-width: 768px) {
  body {
    background: var(--paper);
  }

  .topbar {
    padding-top: 18px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.7rem;
  }

  .app-shell {
    gap: 14px;
    padding-inline: 12px;
  }

  .app-view > .panel,
  .app-view > details.panel,
  .detail-grid .panel,
  .dashboard > .panel {
    padding: 14px;
  }

  .app-header,
  .dashboard-header,
  .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .app-header-title {
    gap: 10px;
  }

  .club-logo {
    width: 40px;
    height: 40px;
  }

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

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

  .sync-status {
    max-width: none;
    text-align: left;
  }

  .auth-screen {
    padding: 16px 12px;
  }

  .auth-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .login-card {
    padding: 24px;
    gap: 16px;
  }
  
  .login-card .card-header h2 {
    font-size: 1.35rem;
  }
  
  body.signed-out .topbar {
    padding-top: 24px;
  }
  
  body.signed-out .logo-link h1 {
    font-size: 1.75rem;
  }

  .gateway-card,
  .flow-card {
    padding: 24px;
    border-radius: 16px;
  }

  .gateway-header h2,
  .flow-header h2 {
    font-size: 1.35rem;
  }

  .gateway-action-btn {
    padding: 16px;
  }

  .action-icon {
    font-size: 1.5rem;
  }

  input,
  select,
  button {
    min-height: 48px;
  }

  .player-form,
  .teams,
  .attendance-controls,
  .attendance-summary,
  .market-summary,
  .platform-grid,
  .product-grid,
  .players-grid,
  .h2h-controls,
  .h2h-scoreboard,
  .h2h-insights,
  .detail-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .filters {
    justify-content: stretch;
  }

  .filters > * {
    width: 100%;
  }

  .leaderboard-row {
    grid-template-columns: 32px minmax(0, 1fr) 54px 54px;
    gap: 8px;
    padding: 9px;
  }

  .attendance-row {
    grid-template-columns: minmax(0, 1fr) 54px 54px 54px;
    gap: 8px;
    padding: 9px;
  }

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

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

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

  .person {
    gap: 7px;
  }

  .avatar {
    width: 30px;
    height: 30px;
  }

  .large-avatar {
    width: 44px;
    height: 44px;
  }

  .h2h-player .avatar {
    width: 48px;
    height: 48px;
  }

  .leader-stat strong {
    font-size: 0.95rem;
  }

  .leader-stat small {
    font-size: 0.66rem;
  }

  .h2h-player,
  .versus-block {
    min-height: 110px;
  }

  .leaderboard-note {
    display: none;
  }
}

/* WhatsApp Link Styles */
.whatsapp-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #25d366;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
}

.whatsapp-link:hover {
  text-decoration: underline;
}

/* Phone Number WhatsApp Link */
.phone-whatsapp {
  color: #25d366;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

.phone-whatsapp:hover {
  text-decoration: underline;
}

.player-card .phone-whatsapp,
.admin-row .phone-whatsapp {
  font-size: 0.85rem;
}

/* Invite Message */
.invite-message {
  background: #f0f9f6;
  border-left: 4px solid #167a5b;
  padding: 16px 20px;
  margin: 16px 0;
  border-radius: 8px;
}

.invite-message .invite-text {
  margin: 0;
  color: #0e5f46;
  font-size: 1rem;
  line-height: 1.5;
}

.invite-message .invite-admin {
  font-weight: 700;
  color: #167a5b;
}

.invite-message .invite-club {
  font-weight: 700;
  color: #167a5b;
}

.invite-message .invite-sport {
  font-weight: 600;
  color: #5a6b66;
}

/* Match Actions */
.match-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.match-actions button {
  flex: 1;
  min-height: 36px;
  font-size: 0.85rem;
}

.match-actions button[data-whatsapp-match] {
  background: #25d366;
  color: white;
  border-color: #25d366;
}

.match-actions button[data-whatsapp-match]:hover {
  background: #128c7e;
  border-color: #128c7e;
}

/* Modal Styles */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.modal-header h3 {
  font-size: 1.25rem;
  color: var(--ink);
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--paper);
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--line);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  max-height: calc(90vh - 80px);
}

/* Social Share Grid */
.social-share-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.social-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}

.social-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.social-icon {
  font-size: 1.75rem;
}

.social-btn.facebook { background: #1877f2; }
.social-btn.linkedin { background: #0a66c2; }
.social-btn.tiktok { background: #000000; }
.social-btn.instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.social-btn.twitter { background: #000000; }
.social-btn.whatsapp { background: #25d366; }

.share-preview {
  background: var(--paper);
  padding: 16px;
  border-radius: 12px;
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 16px;
}

.copy-section {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.copy-section input {
  flex: 1;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.9rem;
}

/* Profile Card */
.profile-card {
  text-align: center;
  padding: 24px;
}

.profile-card .avatar {
  width: 100px;
  height: 100px;
  font-size: 2.5rem;
  margin: 0 auto 16px;
}

.profile-card h4 {
  font-size: 1.5rem;
  margin: 0 0 8px;
}

.profile-card .role-badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--green);
  color: white;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.profile-card .contact-info {
  margin-top: 20px;
  text-align: left;
}

.profile-card .contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--paper);
  border-radius: 8px;
  margin-bottom: 8px;
}

.profile-card .contact-item a {
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
}

/* Profile Photo Section */
.profile-photo-section {
  text-align: center;
  margin-bottom: 20px;
}

.profile-photo-preview {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--paper);
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--muted);
  overflow: hidden;
}

.profile-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-upload-btn {
  display: inline-block;
  padding: 8px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
}

.photo-upload-btn:hover {
  border-color: var(--green);
}

/* Club Logo Section */
.club-logo-section {
  text-align: center;
  margin-bottom: 24px;
  padding: 20px;
  background: var(--paper);
  border-radius: 12px;
}

.club-logo-preview {
  width: 120px;
  height: 120px;
  border-radius: 16px;
  background: white;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--line);
  overflow: hidden;
}

.club-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.club-logo-preview .logo-placeholder {
  font-size: 3rem;
}

/* Form Hints */
.form-hint {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

/* My Profile View */
#myProfileView {
  text-align: center;
}

#myProfileView .profile-card {
  background: var(--paper);
  border-radius: 12px;
  margin-bottom: 16px;
}

/* Member Directory - Professional Grid */
.member-directory-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.member-directory-item:hover {
  border-color: var(--green);
  box-shadow: 0 4px 16px rgba(22, 122, 91, 0.1);
  transform: translateY(-2px);
}

.member-directory-item .member-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--paper);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.member-directory-item .member-avatar .avatar-initials {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 600;
}

.member-directory-item .member-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
  line-height: 1.3;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-directory-item .admin-dot {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 10px;
  height: 10px;
  background: var(--green);
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* My Profile Preview */
.my-profile-preview {
  text-align: center;
}

.my-profile-preview .avatar {
  width: 80px;
  height: 80px;
  font-size: 2rem;
  margin: 0 auto 12px;
}

.my-profile-preview h4 {
  margin: 0 0 8px;
}

/* Hide admin sections for regular members */
body:not(.is-club-admin) .admin-drawer,
body:not(.is-club-admin) .admin-view .pending-approvals-panel {
  display: none;
}

/* QR Code Modal */
.qr-modal .modal-body {
  text-align: center;
}

.qr-display {
  background: white;
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 20px;
  display: inline-block;
}

.qr-display img {
  max-width: 280px;
  width: 100%;
  height: auto;
}

.qr-instructions {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* Pending Approvals */
.pending-approvals-panel,
.pending-approvals-alert {
  background: #fff8e6;
  border: 1px solid #f2be4b;
}

.pending-approvals-alert {
  margin-bottom: 16px;
}

.pending-approvals-alert .alert-message {
  color: #5a6b66;
  margin: 0 0 16px;
}

.pending-approvals-alert button {
  width: 100%;
}

.pending-approvals-panel .panel-heading {
  background: #f2be4b;
  color: #18201e;
  margin: -16px -16px 16px;
  padding: 16px;
  border-radius: 12px 12px 0 0;
}

.pending-count {
  background: #c44c3f;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
}

.pending-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pending-member-card {
  background: white;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.pending-member-info h4 {
  margin: 0 0 4px;
  font-size: 1.1rem;
}

.pending-member-info p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.existing-badge {
  display: inline-block;
  background: var(--blue);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

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

.pending-actions button {
  padding: 8px 16px;
  font-size: 0.85rem;
}
