/* Hackney Anaconda Intranet - Stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Montserrat:wght@800;900&display=swap');

:root {
  color-scheme: only dark;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  /* Color Palette (Harmonious Modern Cyberpunk/Glass Theme) */
  --bg-gradient: linear-gradient(135deg, #0d0e12 0%, #151821 50%, #0a0b0e 100%);
  --accent-primary: #ff4757;      /* Anaconda Red */
  --accent-secondary: #2ed573;    /* Active Green */
  --accent-tertiary: #1e90ff;     /* Info Blue */
  --accent-glow: rgba(255, 71, 87, 0.45);
  
  /* Financial / Status Colors (Theme-aware) */
  --amount-positive: #2ed573;
  --amount-negative: #ff4757;
  --net-subtotal-border: rgba(255, 255, 255, 0.25);
  --net-item-border: rgba(255, 255, 255, 0.06);
  --badge-bg: rgba(255, 255, 255, 0.03);
  --badge-border: rgba(255, 255, 255, 0.05);
  --badge-ready-bg: rgba(46, 213, 115, 0.15);
  --badge-ready-border: rgba(46, 213, 115, 0.3);
  --badge-missing-bg: rgba(255, 71, 87, 0.15);
  --badge-missing-border: rgba(255, 71, 87, 0.3);
  
  /* Neutral scale */
  --neutral-100: #ffffff;
  --neutral-200: #f1f2f6;
  --neutral-300: #ced6e0;
  --neutral-400: #747d8c;
  --neutral-800: #2f3542;
  --neutral-900: #1e222b;
  
  /* Glassmorphism settings */
  --glass-bg: rgba(30, 34, 43, 0.65);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-glow: rgba(30, 34, 43, 0.35);
  --glass-blur: blur(12px);
  --header-overlay: rgba(30, 34, 43, 0.45);
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-bounce: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg-gradient);
  color: var(--neutral-100);
  min-height: 100vh;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}

/* Background Glowing Orbs Wrapper */
.bg-orbs-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 1;
  opacity: 0.25;
  pointer-events: none;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: var(--accent-primary);
  top: -100px;
  right: -50px;
  animation: orbFloat 20s infinite alternate;
}

.orb-2 {
  width: 350px;
  height: 350px;
  background: var(--accent-tertiary);
  bottom: -50px;
  left: -50px;
  animation: orbFloat 15s infinite alternate-reverse;
}

@keyframes orbFloat {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(50px, 30px) scale(1.1); }
}

/* Base Layout & Wrapper */
.app-container {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Navbar / Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  background-image: linear-gradient(var(--header-overlay), var(--header-overlay)), url('swimming_header_bg.png');
  background-size: cover;
  background-position: center;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 100;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Official Club Logo Styling */
.club-logo {
  display: flex;
  flex-direction: column;
  line-height: 0.82;
  text-align: left;
  user-select: none;
}

.club-logo .logo-hackney {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: -0.5px;
  color: var(--neutral-100); /* Crisp white/dark depending on theme */
  margin: 0;
  padding: 0;
}

.club-logo .logo-anaconda {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: -0.5px;
  color: #ff4757; /* Club brand Red */
  margin: 0;
  padding: 0;
}

.logo-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 4px;
}

.logo-title-sub {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.25rem;
  color: var(--neutral-300);
  letter-spacing: -0.3px;
  text-transform: capitalize;
}

/* Header Specific Horizontal Logo Layout */
header .club-logo {
  flex-direction: row;
  align-items: center;
  gap: 7px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease;
}

header .club-logo:hover {
  transform: scale(1.02);
}

header .club-logo .logo-hackney,
header .club-logo .logo-anaconda {
  font-size: 1.3rem; /* Slightly larger for horizontal prominence */
  letter-spacing: -0.3px;
}

.user-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Buttons */
.btn {
  font-family: var(--font-heading);
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: var(--transition-bounce);
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary) 0%, #d63031 100%);
  color: white;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 71, 87, 0.6);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--neutral-100);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

/* User Widget */
.user-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.35rem 1rem 0.35rem 0.5rem;
  border-radius: 50px;
}

.user-badge img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--accent-primary);
}

.user-badge span {
  font-size: 0.9rem;
  font-weight: 500;
}

/* Hero Section (Hello World POC) */
.hero-card {
  padding: 3rem;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.hero-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
}

.hero-text {
  max-width: 650px;
}

.badge-tag {
  display: inline-block;
  background: rgba(255, 71, 87, 0.15);
  color: var(--accent-primary);
  border: 1px solid rgba(255, 71, 87, 0.25);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.25rem;
}

.hero-card h1 {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--neutral-100) 0%, var(--neutral-300) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-card p {
  color: var(--neutral-300);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.hero-mascot {
  width: 250px;
  height: 250px;
  opacity: 0.85;
  filter: drop-shadow(0 0 15px rgba(255, 71, 87, 0.3));
  animation: snakeSway 6s infinite ease-in-out;
}

@keyframes snakeSway {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
}

/* Quick Links Section */
.quick-link-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.quick-link-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.quick-link-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.quick-link-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.quick-link-title-group {
  display: flex;
  flex-direction: column;
}

.quick-link-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--neutral-100);
  line-height: 1.2;
}

.quick-link-badge {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--accent-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.quick-link-desc {
  font-size: 0.75rem;
  color: var(--neutral-400);
  line-height: 1.4;
  margin: 0;
  flex-grow: 1;
}

.quick-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}

.quick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0.3rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--neutral-200);
  background: rgba(255, 255, 255, 0.03);
}

.quick-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--neutral-100);
  border-color: rgba(255, 255, 255, 0.15);
}

.quick-btn.primary {
  background: linear-gradient(135deg, var(--accent-primary) 0%, #ff6b81 100%);
  color: #fff;
  border: none;
}

.quick-btn.primary:hover {
  opacity: 0.9;
}

.quick-btn.secondary {
  background: rgba(30, 144, 255, 0.06);
  border-color: rgba(30, 144, 255, 0.15);
  color: #1e90ff;
}

.quick-btn.secondary:hover {
  background: rgba(30, 144, 255, 0.12);
  border-color: rgba(30, 144, 255, 0.25);
  color: #3fa4ff;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.grid-card {
  padding: 2rem;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.grid-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(40, 45, 57, 0.8);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.grid-card:nth-child(2) .card-icon { color: var(--accent-secondary); }
.grid-card:nth-child(3) .card-icon { color: var(--accent-tertiary); }
.grid-card:nth-child(4) .card-icon { color: #a855f7; }

.grid-card:nth-child(4):hover {
  border-color: rgba(168, 85, 247, 0.45);
  box-shadow: 0 10px 25px -5px rgba(168, 85, 247, 0.15);
}


.card-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.2rem;
}

.card-body {
  color: var(--neutral-300);
  font-size: 0.95rem;
  flex: 1;
}

.card-footer {
  margin-top: auto;
}

/* Auth Screens */
.auth-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 2rem;
}

.auth-card {
  max-width: 460px;
  width: 100%;
  padding: 3rem 2.5rem;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  position: relative;
}

.auth-card-logo {
  transform: scale(1.4);
  margin: 1.5rem 0 0.5rem 0;
  text-align: center;
  align-items: center;
  filter: drop-shadow(0 0 16px rgba(255, 71, 87, 0.4));
}

.auth-card-logo .logo-hackney {
  font-size: 1.7rem;
}

.auth-card-logo .logo-anaconda {
  font-size: 1.7rem;
}

.auth-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
}

.auth-desc {
  color: var(--neutral-400);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

#btn-google-login {
  color-scheme: light;
}


/* Notification & Warning Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  max-width: 480px;
  width: 100%;
  background: #16161c;
  border: 1px solid #ff4757;
  box-shadow: 0 10px 40px rgba(255, 71, 87, 0.3);
  border-radius: 20px;
  padding: 2.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  animation: scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-icon {
  width: 56px;
  height: 56px;
  color: var(--accent-primary);
  background: rgba(255, 71, 87, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--accent-primary);
  margin-bottom: 0.5rem;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: #ff4757;
}

.modal-desc {
  color: var(--neutral-300);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Footer styling */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--neutral-400);
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(13, 14, 18, 0.6);
  margin-top: auto;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Hide helper classes */
.hidden {
  display: none !important;
}

/* Responsive Overrides */
@media (max-width: 768px) {
  .app-container {
    padding: 1rem;
  }
  
  header {
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    text-align: center;
  }
  
  .hero-card {
    flex-direction: column;
    padding: 2rem;
    text-align: center;
  }
  
  .hero-card h1 {
    font-size: 2.2rem;
  }
  
  .hero-mascot {
    width: 150px;
    height: 150px;
  }
}

/* Google Mock Account Selector Styles */
.mock-accounts-container {
  width: 100%;
  text-align: left;
  animation: fadeIn 0.4s ease;
  margin-top: 0.5rem;
}

.selector-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  color: var(--neutral-100);
}

.selector-subtitle {
  font-size: 0.9rem;
  color: var(--neutral-400);
  text-align: center;
  margin-bottom: 1.5rem;
}

.accounts-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.account-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition-bounce);
}

.account-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 71, 87, 0.3);
  transform: translateY(-2px);
}

.account-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary) 0%, #d63031 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.account-item:nth-child(2) .account-avatar {
  background: linear-gradient(135deg, var(--accent-primary) 0%, #ff6b81 100%);
}

.account-item:nth-child(3) .account-avatar {
  background: linear-gradient(135deg, var(--accent-secondary) 0%, #20bf6b 100%);
  box-shadow: 0 2px 8px rgba(46, 213, 115, 0.3);
}

.account-item:nth-child(4) .account-avatar {
  background: linear-gradient(135deg, var(--accent-tertiary) 0%, #0984e3 100%);
  box-shadow: 0 2px 8px rgba(30, 144, 255, 0.3);
}

.account-item:nth-child(5) .account-avatar {
  background: linear-gradient(135deg, var(--neutral-400) 0%, #2f3542 100%);
  box-shadow: none;
}

.account-info {
  display: flex;
  flex-direction: column;
}

.account-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--neutral-100);
}

.account-email {
  font-size: 0.8rem;
  color: var(--neutral-400);
}

@keyframes pulseHighlight {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.4);
    border-color: rgba(255, 71, 87, 0.5);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 15px 5px rgba(255, 71, 87, 0.7);
    border-color: rgba(255, 71, 87, 1);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 71, 87, 0);
    border-color: rgba(255, 75, 90, 0.2);
  }
}

.pulse-highlight {
  animation: pulseHighlight 1.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Google Official Sign-In Button Styles */
.btn-google-official {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  color: #1f1f1f;
  border: 1px solid #dadce0;
  border-radius: 40px; /* Modern capsule shape */
  padding: 0 16px;
  height: 40px;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.218s, border-color 0.218s, box-shadow 0.218s;
  box-shadow: none;
  gap: 12px;
  outline: none;
}

.btn-google-official:hover {
  background-color: #f8f9fa;
  border-color: #d2d4d7;
  box-shadow: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
}

.btn-google-official:focus {
  background-color: #ffffff;
  border-color: #1a73e8;
  box-shadow: 0 0 0 2px rgba(26,115,232,0.2);
}

.btn-google-official:active {
  background-color: #f1f3f4;
  border-color: #dadce0;
  box-shadow: 0 1px 2px 0 rgba(60,64,67,0.3);
}

/* Header button specific resizing */
#btn-login.btn-google-official {
  height: 36px;
  font-size: 13px;
  padding: 0 12px;
  gap: 8px;
}

/* User Profile Container & Google-Style Dropdown Card */
.user-profile-container {
  position: relative;
  display: inline-block;
}

.profile-avatar-btn {
  background: none;
  border: 2px solid transparent;
  padding: 2px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, border-color 0.2s;
  outline: none;
}

.profile-avatar-btn:hover,
.profile-avatar-btn:focus {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-secondary);
}

.profile-avatar-btn img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-initials-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: -0.2px;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.avatar-initials-placeholder-large {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 2rem;
  text-transform: uppercase;
  border: 2px solid rgba(22, 22, 28, 1);
  box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
}

.google-profile-card {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: rgba(22, 22, 28, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  border-radius: 20px;
  padding: 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: slideDownFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(16px);
}

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

.profile-header-email {
  width: 100%;
  text-align: center;
  font-size: 0.85rem;
  color: var(--neutral-400);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
  margin-bottom: 16px;
  word-break: break-all;
}

.profile-card-groups-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  max-height: 100px;
  overflow-y: auto;
  width: 100%;
}

.profile-group-badge {
  display: inline-block;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--neutral-400);
  text-transform: capitalize;
  transition: all 0.2s ease;
  cursor: default;
}

.profile-group-badge:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--neutral-200);
}

.profile-card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 12px;
}

.large-avatar-container {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
}

.large-avatar-container img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(22, 22, 28, 1);
}

.profile-card-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--neutral-100);
  text-align: center;
}

.domain-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(46, 213, 115, 0.1);
  border: 1px solid rgba(46, 213, 115, 0.2);
  color: #2ed573;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.profile-card-footer {
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
  margin-top: 16px;
  display: flex;
  justify-content: center;
}

.google-signout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  color: var(--neutral-200);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  padding: 8px 24px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.google-signout-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
  border-color: var(--accent-primary);
  box-shadow: 0 0 10px rgba(255, 71, 87, 0.15);
}

/* Premium Loading Screen Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.loader-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 200px;
}

.loader-ring {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid rgba(255, 71, 87, 0.08);
  border-top-color: var(--accent-primary);
  border-right-color: var(--accent-secondary);
  animation: spin 1s linear infinite;
  box-shadow: 0 0 20px rgba(255, 71, 87, 0.1);
}

.loader-logo {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}

.loader-logo .logo-hackney {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  color: var(--neutral-100);
  font-size: 0.75rem;
  letter-spacing: -0.2px;
}

.loader-logo .logo-anaconda {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  color: var(--accent-primary);
  font-size: 0.75rem;
  letter-spacing: -0.2px;
}

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

/* =========================================================================
   6. SportsEngine GoMotion Exporter Styling
   ========================================================================= */
.badge-status-inactive, .badge-status-active {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--glass-border);
}
.badge-status-inactive {
  color: var(--neutral-400);
}
.badge-status-active {
  color: var(--accent-secondary);
  border-color: rgba(46, 213, 115, 0.3);
  box-shadow: 0 0 10px rgba(46, 213, 115, 0.1);
}
.badge-status-inactive .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neutral-400);
}
.badge-status-active .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-secondary);
  box-shadow: 0 0 8px var(--accent-secondary);
  animation: pulse-dot 1.5s infinite;
}
@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.5; }
}

.reports-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.report-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  transition: var(--transition-smooth);
}
.report-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}
.report-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.report-month {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--neutral-100);
}
.report-date {
  font-size: 0.75rem;
  color: var(--neutral-400);
}
.report-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
}
.report-status-success {
  color: var(--accent-secondary);
  background: rgba(46, 213, 115, 0.1);
  border: 1px solid rgba(46, 213, 115, 0.2);
}
.report-status-failed {
  color: var(--accent-primary);
  background: rgba(255, 71, 87, 0.1);
  border: 1px solid rgba(255, 71, 87, 0.2);
}
.report-status-pending {
  color: var(--accent-tertiary);
  background: rgba(30, 144, 255, 0.1);
  border: 1px solid rgba(30, 144, 255, 0.2);
}
.btn-download-report {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--neutral-200);
  transition: var(--transition-bounce);
  cursor: pointer;
}
.btn-download-report:hover {
  background: var(--accent-secondary);
  color: var(--neutral-900);
  border-color: var(--accent-secondary);
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(46, 213, 115, 0.3);
}

.report-list-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
  color: var(--neutral-400);
  font-size: 0.9rem;
  gap: 12px;
  text-align: center;
}
.pulse-loader {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.sync-icon-spin.active {
  animation: spin 1s linear infinite;
}

/* Xero Official Connect Button Styles */
.btn-xero-official {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #13b5ea;
  color: #ffffff;
  border: 1px solid #13b5ea;
  border-radius: 4px; /* Xero button is slightly rounded square */
  padding: 0 16px;
  height: 38px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
  gap: 10px;
  outline: none;
  width: 100%;
}

.btn-xero-official:hover {
  background-color: #0c9fcb;
  border-color: #0c9fcb;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.15);
}

.btn-xero-official:active {
  background-color: #0988ae;
  border-color: #0988ae;
}

/* =========================================================================
   7. Unified Integration & Connections UI Styling
   ========================================================================= */
.integrations-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.integration-row {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 1.25rem;
  transition: var(--transition-smooth);
}

.integration-row:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

.integration-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.integration-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.integration-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.sportsengine-icon {
  color: var(--accent-primary);
  background: rgba(255, 71, 87, 0.08);
  border-color: rgba(255, 71, 87, 0.15);
}

.xero-icon {
  color: #13b5ea;
  background: rgba(19, 181, 234, 0.08);
  border-color: rgba(19, 181, 234, 0.15);
}

.integration-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.integration-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--neutral-100);
}

.integration-desc {
  font-size: 0.8rem;
  color: var(--neutral-400);
}

.integration-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.integration-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  white-space: nowrap;
}

.integration-status-connected {
  color: var(--accent-secondary);
  border-color: rgba(46, 213, 115, 0.3);
  box-shadow: 0 0 10px rgba(46, 213, 115, 0.1);
}

.integration-status-connected .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-secondary);
  box-shadow: 0 0 6px var(--accent-secondary);
  animation: pulse-dot 1.5s infinite;
}

.integration-status-disconnected {
  color: var(--accent-primary);
  border-color: rgba(255, 71, 87, 0.3);
  box-shadow: 0 0 10px rgba(255, 71, 87, 0.1);
}

.integration-status-disconnected .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 6px var(--accent-primary);
}

.btn-action {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--glass-border);
  transition: var(--transition-bounce);
  color: var(--neutral-200);
  background: rgba(255, 255, 255, 0.05);
}

.btn-action:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.cookie-form-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cookie-form-label {
  font-size: 0.78rem;
  color: var(--neutral-300);
  display: flex;
  justify-content: space-between;
}

.cookie-form-label span.highlight-tip {
  color: var(--accent-tertiary);
  font-weight: 500;
}

.cookie-input-group {
  display: flex;
  gap: 0.5rem;
}

.cookie-text-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--neutral-100);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: monospace;
  outline: none;
  transition: var(--transition-smooth);
}

.cookie-text-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 8px rgba(255, 71, 87, 0.25);
}

.btn-save-cookie {
  background: linear-gradient(135deg, var(--accent-primary) 0%, #d63031 100%);
  color: white;
  border: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-bounce);
}

.btn-save-cookie:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(255, 71, 87, 0.4);
}

.cookie-last-updated {
  font-size: 0.72rem;
  color: var(--neutral-400);
  margin-top: -0.25rem;
}

/* Tab Settings Navigation */
.tabs-navigation {
  display: flex;
  gap: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--neutral-400);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid transparent;
  transition: var(--transition-smooth);
  outline: none;
}

.tab-btn:hover {
  color: var(--neutral-200);
}

.tab-btn.active {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}

.tab-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  animation: fadeIn 0.25s ease;
}

/* =========================================================================
   8. SportsEngine ➔ Xero Direct Sync Switch and Console Styling
   ========================================================================= */

/* The switch - container */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
}

/* Hide default HTML checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider track */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: var(--neutral-100);
  transition: .4s;
}

input:checked + .slider {
  background-color: var(--accent-primary);
  border-color: var(--accent-primary);
  box-shadow: 0 0 10px rgba(255, 71, 87, 0.3);
}

input:checked + .slider:before {
  transform: translateX(22px);
  background-color: var(--neutral-950, #0d0e12);
}

/* Rounded sliders */
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Tab Buttons & Views for Sync Preview Modal */
.tab-btn {
  font-family: var(--font-heading);
  background: transparent;
  color: var(--neutral-400);
  border: none;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--neutral-200);
}

.tab-btn.active {
  background: rgba(255, 71, 87, 0.15) !important;
  color: var(--accent-primary) !important;
  border: 1px solid rgba(255, 71, 87, 0.3) !important;
}

.tab-view {
  animation: fadeIn 0.25s ease;
}

.tab-view.hidden {
  display: none !important;
}

/* Advanced Configuration Toggle Gear Rules */
#btn-toggle-sync-settings:hover {
  color: var(--neutral-100) !important;
  background: rgba(255, 255, 255, 0.05);
}

#btn-toggle-sync-settings.active svg {
  transform: rotate(90deg);
  color: var(--accent-secondary) !important;
}

/* =========================================================================
   9. Premium Settings Page Layout, Cog Button, and Animations
   ========================================================================= */

/* Glowing Settings Cog in Header */
.settings-cog-btn {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  color: var(--neutral-400) !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  outline: none;
}

.settings-cog-btn:hover {
  color: var(--neutral-100) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.08);
}

.settings-cog-btn:hover svg {
  transform: rotate(45deg);
}

.settings-cog-btn.active svg {
  transform: rotate(90deg);
  color: var(--accent-primary) !important;
}

/* Settings Responsive Grid */
.settings-layout-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 992px) {
  .settings-layout-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Settings Page Title Block */
.settings-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 1.25rem;
  margin-bottom: 1rem;
}

.settings-page-title-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.settings-page-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, var(--neutral-100) 0%, var(--neutral-300) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Back navigation button */
.btn-back-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 0.6rem 1.1rem;
  color: var(--neutral-300);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-back-nav:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--neutral-100);
  transform: translateX(-4px);
}

.btn-back-nav svg {
  transition: transform 0.2s ease;
}

.btn-back-nav:hover svg {
  transform: translateX(-2px);
}

/* Expanded Mappings Rule Table Styles */
.settings-mappings-card {
  padding: 2.25rem;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mappings-grid-table-container {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  overflow-x: auto;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

.mappings-grid-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.mappings-grid-table th {
  padding: 0.85rem 1rem;
  color: var(--neutral-300);
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mappings-grid-table td {
  padding: 0.65rem 1rem;
  vertical-align: middle;
}

/* Directional nav transitions using CSS Keyframes */
@keyframes slide-to-left {
  to { transform: translateX(-100%); }
}

@keyframes slide-from-right {
  from { transform: translateX(100%); }
}

@keyframes slide-to-right {
  to { transform: translateX(100%); }
}

@keyframes slide-from-left {
  from { transform: translateX(-100%); }
}

/* Setup default animation times for SPA Transitions */
::view-transition-group(root) {
  animation: 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* Forward type animations */
html:active-view-transition-type(forward)::view-transition-old(root) {
  animation-name: slide-to-left;
}
html:active-view-transition-type(forward)::view-transition-new(root) {
  animation-name: slide-from-right;
}

/* Backward type animations */
html:active-view-transition-type(backward)::view-transition-old(root) {
  animation-name: slide-to-right;
}
html:active-view-transition-type(backward)::view-transition-new(root) {
  animation-name: slide-from-left;
}

/* Accessibility: respect user preferences for reduced motion */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(root) {
    animation: none !important;
  }
}

/* ──────────────────────────────────────────────────────────
   Swim School Attendance Portal Custom CSS
   ────────────────────────────────────────────────────────── */
:root {
  --accent-cyan: #00d2d3;
  --accent-cyan-glow: rgba(0, 210, 211, 0.4);
}

#swimschool-card-container .card-icon {
  color: var(--accent-cyan);
  background: rgba(0, 210, 211, 0.08);
  border-color: rgba(0, 210, 211, 0.15);
}

.swimschool-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.25rem 0.65rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.swimschool-badge-success {
  background: rgba(46, 213, 115, 0.12);
  color: #2ed573;
  border-color: rgba(46, 213, 115, 0.25);
  box-shadow: 0 0 8px rgba(46, 213, 115, 0.1);
}

.swimschool-badge-danger {
  background: rgba(255, 71, 87, 0.12);
  color: #ff4757;
  border-color: rgba(255, 71, 87, 0.25);
  box-shadow: 0 0 8px rgba(255, 71, 87, 0.1);
}

.swimschool-badge-warning {
  background: rgba(255, 159, 67, 0.12);
  color: #ff9f43;
  border-color: rgba(255, 159, 67, 0.25);
  box-shadow: 0 0 8px rgba(255, 159, 67, 0.15);
}

.swimschool-badge-cyan {
  background: rgba(0, 210, 211, 0.12);
  color: var(--accent-cyan);
  border-color: rgba(0, 210, 211, 0.25);
  box-shadow: 0 0 8px rgba(0, 210, 211, 0.1);
}

.swimschool-badge-neutral {
  background: rgba(142, 150, 158, 0.12);
  color: #8e969e;
  border-color: rgba(142, 150, 158, 0.25);
  box-shadow: 0 0 8px rgba(142, 150, 158, 0.1);
}

/* Shimmer Skeleton Loaders for Tile Widgets */
.swimschool-skeleton-text,
.skeleton-text {
  display: inline-block;
  height: 12px;
  width: 55px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.04) 75%);
  background-size: 200% 100%;
  animation: swimschool-shimmer 1.4s infinite linear;
  border-radius: 4px;
  vertical-align: middle;
}

.swimschool-skeleton-badge,
.skeleton-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  width: 70px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.04) 75%);
  background-size: 200% 100%;
  animation: swimschool-shimmer 1.4s infinite linear;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

@keyframes swimschool-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.swimschool-tabs-nav {
  display: flex;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 3px;
}

.swimschool-tab-btn {
  background: transparent;
  color: var(--neutral-400);
  border: none;
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.swimschool-tab-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--neutral-200);
}

.swimschool-tab-btn.active {
  background: rgba(0, 210, 211, 0.15) !important;
  color: var(--accent-cyan) !important;
  border: 1px solid rgba(0, 210, 211, 0.3) !important;
}

#swimschool-search-input:focus {
  border-color: var(--accent-cyan) !important;
  box-shadow: 0 0 10px rgba(0, 210, 211, 0.25) !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

.swimschool-table-loading {
  animation: pulse 1.5s infinite ease-in-out;
}

.swimschool-row-highlight {
  background: rgba(0, 210, 211, 0.02);
}

.swimschool-row-danger {
  background: rgba(255, 71, 87, 0.02);
}

.swimschool-row-warning {
  background: rgba(255, 159, 67, 0.02);
}

.swimschool-row-empty {
  opacity: 0.65;
}

/* =========================================================================
   15. Premium Fullscreen-Style Workspace Modal Layouts
   ========================================================================= */
.modal-backdrop:has(.workspace-modal-content) {
  padding: 0 !important;
}

.workspace-modal-content {
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  background: #121218 !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 1.25rem 1.75rem !important;
  text-align: left !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  animation: scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.15) !important;
  box-sizing: border-box !important;
  gap: 0 !important;
}

.workspace-modal-content > * {
  flex-shrink: 0;
}

.workspace-table-wrapper {
  flex: 1 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: auto !important;
  width: 100% !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 12px !important;
  background: #16161c !important;
  margin-bottom: 0 !important;
}

.workspace-table-wrapper::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.workspace-table-wrapper::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.workspace-table-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.workspace-table-wrapper::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.workspace-table-wrapper table thead {
  position: sticky !important;
  top: 0 !important;
  z-index: 10 !important;
}

.workspace-table-wrapper table thead th {
  background: #16161c !important;
}

.workspace-modal-content .tab-view:not(.hidden) {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  min-height: 0 !important;
  width: 100% !important;
}

/* Compact table layout */
.swimschool-compact-table th {
  padding: 0.4rem 0.5rem !important;
  font-size: 0.8rem !important;
}
.swimschool-compact-table td {
  padding: 0.35rem 0.5rem !important;
  font-size: 0.78rem !important;
}

/* Header select filters */
.header-filter-select {
  background: rgba(18, 18, 24, 0.9);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 210, 211, 0.25);
  border-radius: 4px;
  padding: 0.15rem 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  font-family: inherit;
  transition: all 0.2s ease;
  max-width: 100%;
  margin: 0;
}
.header-filter-select:hover {
  border-color: var(--accent-cyan);
  background: rgba(0, 210, 211, 0.08);
  box-shadow: 0 0 6px var(--accent-cyan-glow);
}
.header-filter-select option {
  background: #121218;
  color: #fff;
}

/* View Toggle */
.swimschool-view-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}
.swimschool-view-toggle button {
  background: transparent;
  color: var(--neutral-400);
  border: 1px solid transparent;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.swimschool-view-toggle button:hover {
  color: var(--neutral-200);
  background: rgba(255, 255, 255, 0.03);
}
.swimschool-view-toggle button.active {
  background: rgba(0, 210, 211, 0.12) !important;
  color: var(--accent-cyan) !important;
  border-color: rgba(0, 210, 211, 0.25) !important;
  box-shadow: 0 0 8px rgba(0, 210, 211, 0.1);
}

/* Calendar Grid */
.calendar-grid-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  width: 100%;
  gap: 0.5rem;
  padding: 0.5rem 0;
}
.calendar-grid-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
  text-align: center;
  font-weight: 600;
  color: var(--neutral-400);
  font-size: 0.78rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 0.5rem;
}
.calendar-grid-body {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: 1fr;
  gap: 0.5rem;
  flex: 1;
  min-height: 0;
}
.calendar-day-cell {
  background: rgba(255, 255, 255, 0.012);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  transition: all 0.2s ease;
  min-height: 100px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.calendar-day-cell::-webkit-scrollbar {
  width: 4px;
}
.calendar-day-cell::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}
.calendar-day-cell:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(0, 210, 211, 0.15);
  box-shadow: inset 0 0 10px rgba(0, 210, 211, 0.02);
}
.calendar-day-cell.today {
  border-color: rgba(0, 210, 211, 0.35);
  background: rgba(0, 210, 211, 0.02);
  box-shadow: 0 0 10px rgba(0, 210, 211, 0.05);
}
.calendar-day-cell.other-month {
  opacity: 0.3;
}
.calendar-day-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  padding-bottom: 0.15rem;
  margin-bottom: 0.15rem;
}
.calendar-day-number {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--neutral-300);
}
.calendar-day-cell.today .calendar-day-number {
  color: var(--accent-cyan);
}
.calendar-day-compliance {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.05rem 0.25rem;
  border-radius: 3px;
  letter-spacing: 0.01em;
}
.compliance-perfect {
  background: rgba(46, 213, 115, 0.1);
  color: #2ed573;
  border: 1px solid rgba(46, 213, 115, 0.15);
}
.compliance-warning {
  background: rgba(255, 71, 87, 0.08);
  color: #ff4757;
  border: 1px solid rgba(255, 71, 87, 0.15);
  animation: subtle-pulse 2s infinite ease-in-out;
}
.calendar-session-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0.2rem 0.35rem;
  border-radius: 4px;
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 0;
  position: relative;
}
.calendar-session-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}
.calendar-session-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-taken {
  background: #2ed573;
  box-shadow: 0 0 4px #2ed573;
}
.dot-untaken {
  background: #ff4757;
  box-shadow: 0 0 5px #ff4757;
}
.dot-empty {
  background: #8e969e;
  box-shadow: 0 0 4px #8e969e;
}
.session-empty {
  opacity: 0.65;
}
.calendar-session-time {
  font-weight: 700;
  color: var(--neutral-400);
  flex-shrink: 0;
  font-size: 0.65rem;
}
.calendar-session-title {
  color: var(--neutral-200);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
@keyframes subtle-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}
.session-quit-high {
  background: rgba(255, 71, 87, 0.08) !important;
  border-color: rgba(255, 71, 87, 0.18) !important;
}
.session-quit-high:hover {
  background: rgba(255, 71, 87, 0.12) !important;
  border-color: rgba(255, 71, 87, 0.3) !important;
}
.session-quit-med {
  background: rgba(255, 159, 67, 0.08) !important;
  border-color: rgba(255, 159, 67, 0.18) !important;
}
.session-quit-med:hover {
  background: rgba(255, 159, 67, 0.12) !important;
  border-color: rgba(255, 159, 67, 0.3) !important;
}


/* Swim School Borough Swimmer Directory Modal specific styles */
#swimschool-boroughs-modal .swimschool-tab-btn.active {
  background: rgba(30, 144, 255, 0.15) !important;
  color: var(--accent-tertiary) !important;
  border: 1px solid rgba(30, 144, 255, 0.3) !important;
}

#swimschool-boroughs-modal .swimschool-tab-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--neutral-100);
}

#swimschool-boroughs-search-input:focus {
  border-color: var(--accent-tertiary) !important;
  box-shadow: 0 0 10px rgba(30, 144, 255, 0.25) !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

/* Leaflet map inside Borough Directory modal */
#swimschool-boroughs-map-container {
  width: 100%;
  height: 100%;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  z-index: 1;
}

/* Leaflet control button styling */
#swimschool-boroughs-modal .leaflet-bar {
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: none !important;
  border-radius: 6px !important;
  overflow: hidden;
}
#swimschool-boroughs-modal .leaflet-bar a {
  background-color: rgba(30, 30, 40, 0.9) !important;
  color: var(--neutral-200) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}
#swimschool-boroughs-modal .leaflet-bar a:hover {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: var(--neutral-100) !important;
}

/* Custom styling for Leaflet dark popups */
#swimschool-boroughs-modal .leaflet-popup-content-wrapper {
  background: rgba(26, 26, 36, 0.95) !important;
  backdrop-filter: blur(12px) !important;
  color: var(--neutral-200) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6) !important;
  border-radius: 10px !important;
  font-family: inherit !important;
}
#swimschool-boroughs-modal .leaflet-popup-tip {
  background: rgba(26, 26, 36, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}
#swimschool-boroughs-modal .leaflet-popup-close-button {
  color: var(--neutral-400) !important;
  padding: 6px !important;
}
#swimschool-boroughs-modal .leaflet-popup-close-button:hover {
  color: var(--neutral-100) !important;
}
#swimschool-boroughs-modal .leaflet-container a {
  color: var(--accent-tertiary) !important;
}

/* =========================================================================
   Display Theme Styles (Light Mode & Switcher)
   ========================================================================= */

/* Theme Switcher Button Base Styles */
.theme-select-btn {
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: transparent;
  color: var(--neutral-400);
  transition: var(--transition-smooth);
}

.theme-select-btn:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--neutral-200);
}

.theme-select-btn.active {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: var(--neutral-100) !important;
}

/* Light Theme Variables Override */
html.light-theme body {
  --bg-gradient: linear-gradient(135deg, #f5f6fa 0%, #eef1f6 50%, #e4e8f0 100%);
  --neutral-100: #1e222b; /* primary dark text */
  --neutral-200: #2f3542; /* headings */
  --neutral-300: #485460; /* secondary labels */
  --neutral-400: #808e9b; /* muted details */
  --neutral-800: #ced6e0; /* borders/dividers */
  --neutral-900: #ffffff; /* pure card white backgrounds */
  
  /* Financial / Status Colors (Theme-aware, dark readable contrast) */
  --amount-positive: #1b8a5a;
  --amount-negative: #d63031;
  --net-subtotal-border: rgba(30, 34, 43, 0.35);
  --net-item-border: rgba(30, 34, 43, 0.12);
  --badge-bg: rgba(0, 0, 0, 0.04);
  --badge-border: rgba(0, 0, 0, 0.08);
  --badge-ready-bg: rgba(27, 138, 90, 0.1);
  --badge-ready-border: rgba(27, 138, 90, 0.25);
  --badge-missing-bg: rgba(214, 48, 49, 0.1);
  --badge-missing-border: rgba(214, 48, 49, 0.25);
  
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(30, 34, 43, 0.08);
  --glass-glow: rgba(0, 0, 0, 0.02);
  --header-overlay: rgba(255, 255, 255, 0.85);
  
  --accent-glow: rgba(255, 71, 87, 0.18);
  color: #1e222b;
}

/* Light Mode specific element overrides */
html.light-theme .orb {
  opacity: 0.11;
}

html.light-theme input,
html.light-theme select,
html.light-theme textarea,
html.light-theme .cookie-text-input {
  background: rgba(0, 0, 0, 0.04) !important;
  color: #1e222b !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
}

html.light-theme input::placeholder,
html.light-theme textarea::placeholder {
  color: rgba(30, 34, 43, 0.45) !important;
}

html.light-theme .grid-card,
html.light-theme .workspace-card,
html.light-theme .modal-content,
html.light-theme .settings-mappings-card {
  background: #ffffff !important;
  border-color: rgba(30, 34, 43, 0.12) !important;
  color: #1e222b !important;
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.06) !important;
}

html.light-theme .workspace-table-wrapper {
  background: #ffffff !important;
  border: 1px solid rgba(30, 34, 43, 0.12) !important;
}

html.light-theme .modal-backdrop {
  background: rgba(255, 255, 255, 0.25) !important;
  backdrop-filter: blur(8px) !important;
}

html.light-theme th {
  color: rgba(30, 34, 43, 0.65) !important;
  border-bottom-color: rgba(30, 34, 43, 0.1) !important;
}

html.light-theme .workspace-table-wrapper table thead th {
  background: #ffffff !important;
}

html.light-theme tr {
  border-bottom-color: rgba(30, 34, 43, 0.05) !important;
}

html.light-theme td {
  color: #1e222b !important;
}

html.light-theme .swimschool-compact-table tr:hover,
html.light-theme .workspace-table tr:hover {
  background: rgba(0, 0, 0, 0.02) !important;
}

html.light-theme .btn-secondary,
html.light-theme .btn-action {
  background: rgba(0, 0, 0, 0.05) !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  color: #1e222b !important;
}

html.light-theme .btn-secondary:hover,
html.light-theme .btn-action:hover {
  background: rgba(0, 0, 0, 0.08) !important;
  color: #000000 !important;
}

html.light-theme .settings-cog-btn {
  background: rgba(0, 0, 0, 0.05) !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  color: #1e222b !important;
}

html.light-theme .nav-badge {
  background: rgba(0, 0, 0, 0.05) !important;
  color: #1e222b !important;
}

/* Light theme high-contrast status colors for swimschool badges */
html.light-theme .swimschool-badge-success {
  background: rgba(46, 213, 115, 0.15) !important;
  color: #1e7e34 !important;
  border-color: rgba(46, 213, 115, 0.35) !important;
}

html.light-theme .swimschool-badge-danger {
  background: rgba(255, 71, 87, 0.15) !important;
  color: #bd2130 !important;
  border-color: rgba(255, 71, 87, 0.35) !important;
}

html.light-theme .swimschool-badge-warning {
  background: rgba(255, 159, 67, 0.15) !important;
  color: #d35400 !important;
  border-color: rgba(255, 159, 67, 0.35) !important;
}

html.light-theme .swimschool-badge-cyan {
  background: rgba(0, 210, 211, 0.15) !important;
  color: #007a8c !important;
  border-color: rgba(0, 210, 211, 0.35) !important;
}

html.light-theme .swimschool-badge-neutral {
  background: rgba(142, 150, 158, 0.18) !important;
  color: #495057 !important;
  border-color: rgba(142, 150, 158, 0.35) !important;
}

/* Light theme high-contrast status colors for reports and integrations */
html.light-theme .report-status-success,
html.light-theme .integration-status-connected {
  background: rgba(46, 213, 115, 0.15) !important;
  color: #1e7e34 !important;
  border-color: rgba(46, 213, 115, 0.35) !important;
}

html.light-theme .report-status-failed,
html.light-theme .integration-status-disconnected {
  background: rgba(255, 71, 87, 0.15) !important;
  color: #bd2130 !important;
  border-color: rgba(255, 71, 87, 0.35) !important;
}

html.light-theme .report-status-pending {
  background: rgba(255, 159, 67, 0.15) !important;
  color: #d35400 !important;
  border-color: rgba(255, 159, 67, 0.35) !important;
}

html.light-theme .report-row {
  background: rgba(255, 255, 255, 0.6) !important;
  border-color: rgba(30, 34, 43, 0.06) !important;
}

html.light-theme .report-row:hover {
  border-color: var(--accent-tertiary) !important;
  background: rgba(255, 255, 255, 0.95) !important;
}

html.light-theme .text-glow {
  text-shadow: none !important;
}

/* Leaflet Map overrides for Light Theme */
html.light-theme .leaflet-popup-content-wrapper,
html.light-theme .leaflet-popup-tip {
  background: rgba(255, 255, 255, 0.92) !important;
  color: #1e222b !important;
  border: 1px solid rgba(0,0,0,0.08) !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1) !important;
}

html.light-theme .leaflet-popup-content-wrapper strong {
  color: #1e222b !important;
}

html.light-theme .map-popup-container li strong {
  color: #1e222b !important;
}

html.light-theme .swimschool-tab-btn {
  color: rgba(30, 34, 43, 0.6) !important;
}

html.light-theme .swimschool-tab-btn.active {
  background: rgba(0, 0, 0, 0.05) !important;
  color: #1e222b !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
}

html.light-theme .swimschool-tab-btn:hover {
  background: rgba(0, 0, 0, 0.03) !important;
  color: #1e222b !important;
}

/* Sidebar list items */
html.light-theme #swimschool-boroughs-sidebar-list button {
  background: transparent !important;
  color: #1e222b !important;
}

html.light-theme #swimschool-boroughs-sidebar-list button.active {
  background: rgba(0, 0, 0, 0.05) !important;
  color: #1e222b !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
}

/* Theme selector buttons in light theme */
html.light-theme .theme-select-btn {
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  background: transparent !important;
  color: rgba(30, 34, 43, 0.6) !important;
}

html.light-theme .theme-select-btn:hover {
  background: rgba(0, 0, 0, 0.02) !important;
  color: #1e222b !important;
}

html.light-theme .theme-select-btn.active {
  background: rgba(0, 0, 0, 0.06) !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  color: #1e222b !important;
}

/* Light Theme Specific Visual Fixes */
html.light-theme .logo-hackney {
  color: #1e222b !important;
}

html.light-theme .logo-divider {
  background: rgba(30, 34, 43, 0.15) !important;
}

html.light-theme .hero-text h1,
html.light-theme .hero-card h1,
html.light-theme .settings-page-title {
  background: linear-gradient(135deg, #1e222b 0%, #485460 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

html.light-theme select option {
  background: #ffffff !important;
  color: #1e222b !important;
}

/* Override inline dashed borders that use white in dark mode */
html.light-theme .hero-card > div:first-child,
html.light-theme div[style*="dashed rgba(255"],
html.light-theme div[style*="dashed rgba(255,255,255"] {
  border-top-color: rgba(30, 34, 43, 0.1) !important;
  border-bottom-color: rgba(30, 34, 43, 0.1) !important;
}

/* Override inline dark backgrounds on nested elements */
html.light-theme div[style*="background: rgba(255, 255, 255, 0.03)"],
html.light-theme div[style*="background: rgba(255,255,255,0.03)"],
html.light-theme div[style*="background:rgba(255,255,255,0.03)"],
html.light-theme div[style*="background: rgba(255, 255, 255, 0.02)"],
html.light-theme div[style*="background: rgba(255,255,255,0.02)"],
html.light-theme div[style*="background:rgba(255,255,255,0.02)"] {
  background: rgba(0, 0, 0, 0.03) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

html.light-theme div[style*="background: rgba(0,0,0,0.15)"] {
  background: rgba(0, 0, 0, 0.04) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

/* Google Profile Card Overrides for Light Theme */
html.light-theme .google-profile-card {
  background: rgba(255, 255, 255, 0.98) !important;
  border-color: rgba(30, 34, 43, 0.12) !important;
  box-shadow: 0 8px 30px rgba(30, 34, 43, 0.12) !important;
}

html.light-theme .profile-header-email {
  color: rgba(30, 34, 43, 0.65) !important;
  border-bottom-color: rgba(30, 34, 43, 0.08) !important;
}

html.light-theme .large-avatar-container img,
html.light-theme .avatar-initials-placeholder-large {
  border-color: #ffffff !important;
}

html.light-theme .profile-card-name {
  color: #1e222b !important;
}

html.light-theme .profile-card-footer {
  border-top-color: rgba(30, 34, 43, 0.08) !important;
}

html.light-theme .google-signout-btn {
  color: rgba(30, 34, 43, 0.8) !important;
  border-color: rgba(30, 34, 43, 0.2) !important;
  background: transparent !important;
}

html.light-theme .google-signout-btn:hover {
  background: rgba(0, 0, 0, 0.04) !important;
  color: #1e222b !important;
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 10px rgba(255, 71, 87, 0.15) !important;
}

/* =========================================================================
   16. Intranet Dashboard Mobile Responsiveness Overrides (<= 768px)
   ========================================================================= */
@media (max-width: 768px) {


  /* 1. Modal padding & header spacing compaction */
  .workspace-modal-content {
    padding: 0.5rem 0.75rem !important;
  }
  
  /* Selectors for workspace headers/control bars */
  .workspace-modal-content > div:first-of-type,
  .workspace-modal-content > header,
  .workspace-modal-content .settings-page-header,
  .workspace-modal-content .calendar-nav-bar {
    margin-bottom: 0.5rem !important;
    gap: 0.5rem !important;
  }
  
  /* Make range sliders and search filters scale to 100% width and stack vertically */
  .workspace-modal-content div[style*="display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem"],
  .workspace-modal-content div[style*="display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; background: rgba(255, 255, 255, 0.02)"] {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.5rem !important;
  }
  
  .workspace-modal-content input[type="range"],
  .workspace-modal-content input[type="text"],
  .workspace-modal-content input[type="search"] {
    width: 100% !important;
  }
  
  .workspace-modal-content div[style*="display: flex; align-items: center; gap: 12px; min-width: 280px; flex: 1"] {
    width: 100% !important;
    min-width: 0 !important;
    justify-content: space-between;
  }

  /* 2. Responsive Table Columns */
  /* Hide the horizontal scroll / min-width limits */
  .workspace-table-wrapper table {
    min-width: 100% !important;
  }
  
  /* Show inline mobile details block */
  .mobile-only-info {
    display: block !important;
  }
  
  /* Hide secondary columns for Debtors table */
  .col-swimmers,
  .col-squad,
  .col-reason {
    display: none !important;
  }
  
  /* Hide secondary columns for Swim School Sessions table */
  .col-date,
  .col-location,
  .col-hour,
  .col-instructors {
    display: none !important;
  }
  
  /* Hide secondary columns for Swim School Quitters table */
  .col-parent,
  .col-class,
  .col-fullness,
  .col-rate,
  .col-risk {
    display: none !important;
  }
  
  /* Hide secondary columns for Borough Swimmer Analytics table */
  .col-parent-name,
  .col-class-title,
  .col-email,
  .col-phone {
    display: none !important;
  }

  /* Hide secondary columns for Xero Reconciliation table */
  .col-reference,
  .col-se-source,
  .col-xero-dest,
  .col-splits {
    display: none !important;
  }

  /* 3. Borough Split Panel Stacking */
  .swimschool-boroughs-split-panel {
    flex-direction: column !important;
    gap: 1rem !important;
  }
  
  .swimschool-boroughs-sidebar {
    width: 100% !important;
    height: auto !important;
    max-height: 120px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    padding: 0.4rem !important;
    flex-shrink: 0 !important;
  }
  
  .swimschool-boroughs-sidebar-list {
    flex-direction: row !important;
    gap: 0.5rem !important;
    display: inline-flex !important;
    width: auto !important;
  }
  
  .swimschool-boroughs-sidebar-list > div {
    display: inline-block !important;
    white-space: nowrap !important;
    padding: 0.35rem 0.75rem !important;
    font-size: 0.75rem !important;
    border-radius: 6px !important;
    cursor: pointer !important;
  }

  /* 4. Calendar Layout Stack */
  .calendar-grid-header {
    display: none !important;
  }
  
  .calendar-grid-body {
    grid-template-columns: 1fr !important;
    grid-auto-rows: auto !important;
    gap: 0.5rem !important;
  }
  
  .calendar-day-cell {
    min-height: auto !important;
    max-height: none !important;
  }
  
  .calendar-day-name-mobile {
    display: inline !important;
    font-weight: 600;
    color: var(--neutral-400);
    margin-right: 4px;
  }
  
  /* 5. Touch targets padding minimum 44px */
  button, 
  a,
  .btn,
  .btn-action,
  .btn-secondary,
  .btn-primary,
  .swimschool-tab-btn,
  .calendar-nav-bar button,
  .settings-page-header button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Exceptions for inside tables/lists to avoid bloated heights if needed, but we keep interactive elements touchable */
  .swimschool-boroughs-sidebar-list > div,
  .btn-chase-debtor {
    min-height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .workspace-modal-content input[type="range"] {
    height: 44px !important;
  }

  /* 6. Fullscreen Popups / Modals */
  .modal-backdrop:not(#reject-modal) {
    padding: 0 !important;
  }

  .modal-backdrop:not(#reject-modal) .modal-content {
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0 !important;
    border: none !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
  }

  .modal-backdrop:not(#reject-modal) .modal-content:not(.workspace-modal-content) {
    padding: 1.25rem !important;
  }

  /* 7. Auth Screen Overlay & Card Compaction to prevent clipping and horizontal scroll */
  .auth-overlay {
    padding: 1rem 0.5rem !important;
  }
  
  .auth-card {
    padding: 2.25rem 1.25rem !important;
    gap: 1.25rem !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 16px !important;
  }

  .auth-title {
    font-size: 1.6rem !important;
  }

  .auth-desc {
    font-size: 0.85rem !important;
    line-height: 1.4 !important;
  }

  .mock-accounts-container {
    margin-top: 0.25rem !important;
  }

  .selector-title {
    font-size: 1.3rem !important;
  }

  .selector-subtitle {
    font-size: 0.82rem !important;
    margin-bottom: 1rem !important;
  }

  .accounts-list {
    gap: 0.5rem !important;
  }

  .account-item {
    padding: 0.65rem 0.85rem !important;
    gap: 0.65rem !important;
    border-radius: 10px !important;
  }

  .account-avatar {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.8rem !important;
  }

  .account-name {
    font-size: 0.85rem !important;
  }

  .account-email {
    font-size: 0.72rem !important;
  }

  #btn-restore-login {
    margin-top: 1rem !important;
  }

  /* 8. Footer scaling and padding compression to prevent text wrapping issues */
  footer {
    padding: 1.5rem 1rem !important;
    font-size: 0.75rem !important;
  }
}

/* High-Fidelity Mock Google Identity Services (GSI) Button Styles */
.mock-gsi-button {
  background: #ffffff;
  color: #1f1f1f;
  border: 1px solid #747775;
  border-radius: 20px; /* default pill shape */
  font-family: 'Plus Jakarta Sans', Roboto, Arial, sans-serif;
  font-weight: 500;
  font-size: 14px;
  height: 40px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background-color 0.218s, border-color 0.218s, box-shadow 0.218s, transform 0.15s;
  user-select: none;
  box-shadow: none;
  width: auto;
  justify-content: center;
}

.mock-gsi-button:hover {
  background-color: #f7f9fa;
  border-color: #747775;
  box-shadow: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
  transform: translateY(-1px);
}

.mock-gsi-button:active {
  background-color: #e8eaed;
  transform: translateY(0);
}

/* Rectangular large button style for login page */
.mock-gsi-button-rect {
  border-radius: 4px;
  width: 100%;
  max-width: 320px; /* matching the 320px rendered width of GSI */
  height: 44px;     /* matching GSI large height */
  font-size: 15px;
  box-shadow: var(--shadow-sm);
}

.mock-gsi-button-logo {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Personalized Mock GSI Button styling */
.mock-gsi-button-personalized {
  display: flex !important;
  align-items: center;
  justify-content: space-between !important;
  padding: 0 16px !important;
  text-align: left;
  background: #ffffff;
  color: #1f1f1f;
  border: 1px solid #747775;
  border-radius: 4px;
  cursor: pointer;
}

.mock-gsi-avatar-container {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f3f4;
  border: 1px solid #747775;
  flex-shrink: 0;
}

.mock-gsi-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mock-gsi-avatar-initials {
  font-size: 11px;
  font-weight: 700;
  color: #1f1f1f;
  text-transform: uppercase;
}

.mock-gsi-text-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0 12px;
  overflow: hidden;
}

.mock-gsi-personalized-title {
  font-size: 13px;
  font-weight: 500;
  color: #1f1f1f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mock-gsi-personalized-subtitle {
  font-size: 11px;
  color: #5f6368;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mock-gsi-use-another {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--accent-tertiary) !important;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}

.mock-gsi-use-another:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* =========================================================================
   12. Staff Roster Side Drawer & Strip Calendar
   ========================================================================= */
.roster-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1040;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.roster-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.roster-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  height: 100%;
  z-index: 1050;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-left: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
  transition: right 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

@media (max-width: 450px) {
  .roster-drawer {
    width: 100%;
    right: -100%;
  }
}

.roster-drawer.open {
  right: 0;
}

.roster-calendar-strip {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
  scrollbar-width: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.roster-calendar-strip::-webkit-scrollbar {
  display: none;
}

.roster-date-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 58px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.roster-date-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.roster-date-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  box-shadow: 0 4px 12px rgba(255, 71, 87, 0.4);
}

.roster-date-btn .day-name {
  font-size: 0.6rem;
  color: var(--neutral-400);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 2px;
}

.roster-date-btn.active .day-name {
  color: rgba(255, 255, 255, 0.8);
}

.roster-date-btn .day-num {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--neutral-100);
}

.roster-date-btn.active .day-num {
  color: #fff;
}

.roster-shift-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

.roster-shift-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.roster-shift-card .shift-time {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--neutral-100);
  display: flex;
  align-items: center;
  gap: 4px;
}

.roster-shift-card .shift-role {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-tertiary);
}

.roster-shift-card .shift-location {
  font-size: 0.75rem;
  color: var(--neutral-300);
  display: flex;
  align-items: center;
  gap: 4px;
}

.roster-shift-card .qualification-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(46, 213, 115, 0.1);
  border: 1px solid rgba(46, 213, 115, 0.25);
  color: var(--accent-secondary);
  margin-right: 4px;
}

/* =========================================================================
   13. Swim School Scheduling & Pool Configurator
   ========================================================================= */

/* Scheduler Timeline Grid Layout */
.scheduler-timeline-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.scheduler-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
}

.scheduler-zones-column {
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.01);
}

.scheduler-zones-header-spacer {
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.3);
  padding: 0.5rem 1rem;
}

.scheduler-zone-cell {
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.scheduler-zone-cell:last-child {
  border-bottom: none;
}

.scheduler-zone-name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--neutral-100);
  margin-bottom: 4px;
}

.scheduler-zone-sub {
  font-size: 0.72rem;
  color: var(--neutral-400);
}

.scheduler-timeline-wrapper {
  overflow-x: auto;
  position: relative;
}

.scheduler-timeline-grid {
  display: flex;
  flex-direction: column;
  min-width: 1000px;
}

.scheduler-timeline-header {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.3);
}

.scheduler-time-header-cell {
  position: relative;
  flex: 1;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--neutral-400);
  padding: 0.5rem 0.25rem;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  min-width: 140px; /* 2 slots wide min-width (70px * 2) */
  height: 28px;
  box-sizing: border-box;
}

.scheduler-time-header-label {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

.scheduler-time-header-label-end {
  left: 100%;
}

.scheduler-timeline-slot:nth-child(2n) {
  border-right: 1px solid rgba(255, 255, 255, 0.08); /* slightly brighter and solid for hour boundary */
}

.scheduler-timeline-row {
  min-height: 140px;
  display: flex;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.scheduler-timeline-row:last-child {
  border-bottom: none;
}

.scheduler-timeline-slot {
  flex: 1;
  border-right: 1px dashed rgba(255, 255, 255, 0.03);
  min-width: 70px;
  height: 100%;
}

.scheduler-block-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.scheduler-class-card {
  position: absolute;
  height: 72px;
  border-radius: 8px;
  padding: 0.3rem 0.5rem;
  font-size: 0.68rem;
  color: #fff;
  background: rgba(30, 144, 255, 0.12);
  border: 1px solid rgba(30, 144, 255, 0.25);
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  pointer-events: auto;
  cursor: pointer;
  transition: var(--transition-smooth);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1px;
  z-index: 2;
}

.scheduler-class-card:hover {
  background: rgba(30, 144, 255, 0.28);
  border-color: rgba(30, 144, 255, 0.5);
  transform: translateY(-1px);
  z-index: 10;
  height: auto;
  min-height: 72px;
  overflow: visible;
}

.scheduler-class-title {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.7rem;
  line-height: 1.2;
}

.scheduler-class-sub {
  font-size: 0.6rem;
  color: var(--neutral-300);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scheduler-class-meta {
  font-size: 0.6rem;
  color: var(--neutral-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scheduler-class-instructor {
  color: var(--accent-cyan, #00d2d3);
}

.scheduler-class-capacity {
  font-size: 0.58rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 1px 4px;
  border-radius: 4px;
  display: inline-block;
  max-width: 100%;
}

.scheduler-class-capacity.cap-full {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.1);
}

.scheduler-class-capacity.cap-low {
  color: #ffa502;
  background: rgba(255, 165, 2, 0.1);
}

.scheduler-class-capacity.cap-ok {
  color: #2ed573;
  background: rgba(46, 213, 115, 0.1);
}

/* Subprogram Legend */
.scheduler-subprog-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  margin-bottom: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  font-size: 0.72rem;
}

.scheduler-legend-label {
  font-weight: 700;
  color: var(--neutral-300);
  margin-right: 0.25rem;
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
}

.scheduler-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--neutral-200);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  font-weight: 500;
}

.scheduler-legend-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.scheduler-legend-remove {
  margin-left: 6px;
  cursor: pointer;
  font-size: 0.65rem;
  font-weight: 700;
  opacity: 0.5;
  transition: all 0.2s;
  color: var(--neutral-400);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.scheduler-legend-remove:hover {
  opacity: 1;
  color: #ff4757;
  background: rgba(255, 71, 87, 0.12);
}

.scheduler-legend-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 210, 211, 0.1);
  border: 1px solid rgba(0, 210, 211, 0.3);
  color: var(--accent-cyan);
  cursor: pointer;
  font-weight: bold;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
  outline: none;
}

.scheduler-legend-add-btn:hover {
  background: var(--accent-cyan);
  color: #000;
  transform: scale(1.1);
  border-color: var(--accent-cyan);
}

.scheduler-legend-popover {
  position: absolute;
  background: rgba(22, 22, 30, 0.98);
  border: 1px solid rgba(0, 210, 211, 0.25);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  backdrop-filter: blur(12px);
  padding: 0.4rem;
  min-width: 160px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.scheduler-legend-popover-item {
  padding: 0.35rem 0.6rem;
  font-size: 0.72rem;
  color: var(--neutral-200);
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s ease;
  text-align: left;
}

.scheduler-legend-popover-item:hover {
  background: rgba(0, 210, 211, 0.15);
  color: #fff;
}

/* Pool Layout Band */
.scheduler-layout-band-spacer {
  height: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.scheduler-layout-badge-set {
  color: #2dd4bf;
}

.scheduler-layout-badge-unset {
  color: var(--neutral-500);
  font-style: italic;
}

.scheduler-layout-band {
  display: flex;
  align-items: stretch;
  height: 28px;
  background: linear-gradient(90deg, rgba(0, 210, 211, 0.02), rgba(30, 144, 255, 0.02));
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: visible;
}

/* Layout Segments */
.scheduler-layout-segment {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 0.6rem;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.65rem;
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
  white-space: nowrap;
}

.scheduler-layout-segment-unset {
  flex: 1;
  justify-content: center;
  background: rgba(255, 255, 255, 0.01);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  margin: 2px;
}

.scheduler-layout-segment-unset:hover {
  background: rgba(0, 210, 211, 0.05);
  border-color: rgba(0, 210, 211, 0.2);
}

.scheduler-layout-segment-set {
  background: rgba(0, 210, 211, 0.06);
  border-right: 1px solid rgba(0, 210, 211, 0.15);
  top: 0;
  height: 100%;
}

.scheduler-layout-segment-set:hover {
  background: rgba(0, 210, 211, 0.12);
}

.scheduler-layout-seg-time {
  font-size: 0.55rem;
  color: var(--neutral-500);
  margin-left: auto;
}

/* Split Button */
.scheduler-layout-split-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  cursor: pointer;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.15s ease;
  z-index: 5;
}

.scheduler-layout-split-btn:hover {
  background: rgba(0, 210, 211, 0.15);
  border-color: rgba(0, 210, 211, 0.3);
}

/* Layout Resizer */
.scheduler-layout-resizer {
  width: 8px;
  margin-left: -4px;
  height: 100%;
  cursor: col-resize;
  z-index: 10;
  top: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.scheduler-layout-resizer-line {
  width: 2px;
  height: 60%;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 1px;
  transition: background 0.15s ease, width 0.15s ease;
}

.scheduler-layout-resizer:hover .scheduler-layout-resizer-line {
  background: var(--accent-cyan, #00d2d3);
  width: 3px;
}

/* Layout Popover */
.scheduler-layout-popover {
  position: absolute;
  background: rgba(22, 22, 30, 0.98);
  border: 1px solid rgba(0, 210, 211, 0.25);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 12px rgba(0, 210, 211, 0.08);
  min-width: 240px;
  z-index: 200;
  animation: popoverSlideIn 0.15s ease;
  backdrop-filter: blur(12px);
}

@keyframes popoverSlideIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.scheduler-popover-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-cyan);
}

.scheduler-popover-close {
  background: none;
  border: none;
  color: var(--neutral-400);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0 4px;
  line-height: 1;
}

.scheduler-popover-close:hover {
  color: #fff;
}

.scheduler-popover-body {
  padding: 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.scheduler-popover-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: var(--neutral-300);
}

.scheduler-popover-row label {
  font-weight: 600;
  color: var(--neutral-400);
  font-size: 0.68rem;
  min-width: 70px;
}

.scheduler-popover-layout-select {
  flex: 1;
  padding: 0.3rem 0.5rem;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.72rem;
  outline: none;
}

.scheduler-popover-time {
  font-weight: 600;
  color: var(--neutral-200);
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
}

.scheduler-popover-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.scheduler-popover-btn {
  padding: 0.3rem 0.75rem;
  border-radius: 5px;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.15s ease;
}

.scheduler-popover-btn-apply {
  background: linear-gradient(135deg, rgba(0, 210, 211, 0.8), rgba(0, 210, 211, 0.5));
  color: #fff;
  border-color: rgba(0, 210, 211, 0.4);
}

.scheduler-popover-btn-apply:hover {
  background: linear-gradient(135deg, rgba(0, 210, 211, 1), rgba(0, 210, 211, 0.7));
}

.scheduler-popover-btn-remove {
  background: rgba(255, 71, 87, 0.08);
  color: #ff6b7a;
  border-color: rgba(255, 71, 87, 0.2);
}

.scheduler-popover-btn-remove:hover {
  background: rgba(255, 71, 87, 0.15);
}

.scheduler-layout-band-lanes {
  display: flex;
  gap: 2px;
  align-items: center;
}

.scheduler-lane-mini {
  width: 12px;
  height: 8px;
  background: rgba(0, 210, 211, 0.2);
  border: 1px solid rgba(0, 210, 211, 0.35);
  border-radius: 1px;
}

.scheduler-layout-band-name {
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
}

.scheduler-layout-band-content {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
}

.scheduler-shift-card {
  position: absolute;
  height: 48px;
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  font-size: 0.72rem;
  color: #fff;
  background: rgba(46, 213, 115, 0.1);
  border: 1px solid rgba(46, 213, 115, 0.2);
  backdrop-filter: blur(4px);
  pointer-events: auto;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.scheduler-shift-card:hover {
  transform: translateY(-1px);
  background: rgba(46, 213, 115, 0.18);
  border-color: rgba(46, 213, 115, 0.35);
}

.scheduler-shift-card.qualification-mismatch {
  background: rgba(255, 71, 87, 0.1);
  border-color: rgba(255, 71, 87, 0.3);
  box-shadow: 0 0 10px rgba(255, 71, 87, 0.15);
}

.scheduler-shift-card.qualification-mismatch:hover {
  background: rgba(255, 71, 87, 0.18);
  border-color: rgba(255, 71, 87, 0.45);
}

.scheduler-shift-staff {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}

.scheduler-shift-role {
  font-size: 0.65rem;
  color: var(--neutral-300);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scheduler-grid-click-cell {
  position: absolute;
  cursor: pointer;
  z-index: 1;
}

.scheduler-grid-click-cell:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* 2D Pool Layout Configurator styles */
.pool-configurator-container {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.5rem;
  min-height: 300px;
}

@media (max-width: 900px) {
  .pool-configurator-container {
    grid-template-columns: 1fr;
  }
}

.pool-visualizer {
  background: radial-gradient(circle at center, #1b3a72 0%, #0d1e3f 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 250px;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pool-water-lanes {
  position: absolute;
  top: 10%;
  left: 5%;
  width: 90%;
  height: 80%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 210, 211, 0.03);
  display: flex;
  flex-direction: column;
}

.pool-lane {
  flex: 1;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
  position: relative;
}

.pool-lane:last-child {
  border-bottom: none;
}

.pool-rope {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 4px;
  z-index: 5;
}

/* Anti-Wave Lane Rope - competition disc-floats with alternating colour bands */
.pool-rope.anti_wave {
  height: 6px;
  bottom: -3px;
  background:
    repeating-linear-gradient(
      90deg,
      #dc2626 0px, #dc2626 3px,
      #ef4444 3px, #ef4444 5px,
      #ffffff 5px, #ffffff 7px,
      #dc2626 7px, #dc2626 10px,
      #ef4444 10px, #ef4444 12px,
      #ffffff 12px, #ffffff 14px
    );
  border-radius: 3px;
  box-shadow:
    0 0 4px rgba(220, 38, 38, 0.35),
    inset 0 1px 0 rgba(255,255,255,0.25),
    inset 0 -1px 0 rgba(0,0,0,0.15);
  border-top: 1px solid rgba(255,255,255,0.2);
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

/* Cable core line through the centre */
.pool-rope.anti_wave::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(0, 0, 0, 0.15);
  transform: translateY(-50%);
}

/* Standard Floats - rounder, simpler blue/white pattern */
.pool-rope.standard_floats {
  background:
    repeating-linear-gradient(
      90deg,
      #2563eb 0px, #2563eb 8px,
      #3b82f6 8px, #3b82f6 10px,
      #ffffff 10px, #ffffff 18px,
      #2563eb 18px, #2563eb 20px
    );
  border-radius: 2px;
  box-shadow:
    0 0 3px rgba(37, 99, 235, 0.3),
    inset 0 1px 0 rgba(255,255,255,0.2);
}

.pool-rope.standard_floats::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
  transform: translateY(-50%);
}

/* Wide Divider - thicker safety rope */
.pool-rope.wide_divider {
  height: 8px;
  bottom: -4px;
  background:
    repeating-linear-gradient(
      90deg,
      #f59e0b 0px, #f59e0b 6px,
      #fbbf24 6px, #fbbf24 8px,
      #ffffff 8px, #ffffff 14px,
      #f59e0b 14px, #f59e0b 16px
    );
  border-radius: 4px;
  box-shadow:
    0 0 6px rgba(245, 158, 11, 0.35),
    inset 0 2px 0 rgba(255,255,255,0.2),
    inset 0 -2px 0 rgba(0,0,0,0.1);
  border-top: 1px solid rgba(255,255,255,0.25);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.pool-rope.wide_divider::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(0, 0, 0, 0.12);
  transform: translateY(-50%);
}

.pool-rope {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 4px;
  z-index: 5;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pool-rope:hover {
  height: 8px !important;
  bottom: -4px !important;
  box-shadow: 0 0 8px var(--accent-cyan) !important;
  opacity: 0.95 !important;
}

.pool-rope.none {
  background: transparent;
  border-bottom: 2px dashed rgba(255, 255, 255, 0.1);
  height: 2px;
  bottom: -1px;
}

.pool-rope.none:hover {
  background: rgba(0, 210, 211, 0.3) !important;
  border-bottom: 2px solid var(--accent-cyan) !important;
}

.pool-transverse-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  z-index: 10;
  cursor: ew-resize;
  transform: translateX(-50%);
  border-radius: 2px;
}

/* Transverse divider rope type variants */
.pool-transverse-divider.anti_wave {
  width: 6px;
  background:
    repeating-linear-gradient(
      0deg,
      #dc2626 0px, #dc2626 3px,
      #ef4444 3px, #ef4444 5px,
      #ffffff 5px, #ffffff 7px,
      #dc2626 7px, #dc2626 10px
    );
  box-shadow: 0 0 5px rgba(220, 38, 38, 0.4);
  border-radius: 3px;
}

.pool-transverse-divider.standard_floats {
  background:
    repeating-linear-gradient(
      0deg,
      #2563eb 0px, #2563eb 8px,
      #3b82f6 8px, #3b82f6 10px,
      #ffffff 10px, #ffffff 18px,
      #2563eb 18px, #2563eb 20px
    );
  box-shadow: 0 0 4px rgba(37, 99, 235, 0.35);
}

.pool-transverse-divider.wide_divider {
  width: 8px;
  background:
    repeating-linear-gradient(
      0deg,
      #f59e0b 0px, #f59e0b 6px,
      #fbbf24 6px, #fbbf24 8px,
      #ffffff 8px, #ffffff 14px,
      #f59e0b 14px, #f59e0b 16px
    );
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
  border-radius: 4px;
}

.pool-divider-label {
  position: absolute;
  bottom: -22px;
  transform: translateX(-50%);
  font-size: 0.6rem;
  font-weight: 700;
  color: #ff9f43;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 159, 67, 0.3);
  padding: 1px 5px;
  border-radius: 4px;
  pointer-events: none;
  white-space: nowrap;
}

.pool-depth-overlay {
  position: absolute;
  top: 8px;
  left: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.35);
  pointer-events: none;
  display: flex;
  gap: 12px;
}

.pool-staff-pin {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4), 0 0 6px currentColor;
  cursor: grab;
  z-index: 20;
  user-select: none;
  transform: translate(-50%, -50%); /* Centered relative to coord */
}

.pool-staff-pin:active {
  cursor: grabbing;
  transform: translate(-50%, -50%) scale(1.18);
}

.pool-staff-pin .pin-mismatch-warning {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ff4757;
  color: #fff;
  font-size: 0.7rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #fff;
  animation: pulseRed 1.5s infinite;
}

@keyframes pulseRed {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 4px rgba(255, 71, 87, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 71, 87, 0); }
}

.pool-staff-pin .pin-tooltip {
  position: absolute;
  bottom: 34px;
  transform: translateX(-50%);
  left: 50%;
  background: rgba(13, 14, 18, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  font-size: 0.68rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 30;
  box-shadow: var(--shadow-md);
  color: var(--neutral-200);
}

.pool-staff-pin:hover .pin-tooltip {
  opacity: 1;
}

.pool-depth-marker {
  position: absolute;
  top: -20px;
  transform: translateX(-50%);
  font-size: 0.68rem;
  font-weight: 700;
  color: #00d2d3;
  background: rgba(13, 14, 18, 0.85);
  border: 1px solid rgba(0, 210, 211, 0.3);
  padding: 1px 4px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 15;
}

.pool-transverse-divider.anti_wave {
  width: 4px;
  background: repeating-linear-gradient(0deg, #ff4757 0px, #ff4757 8px, #ffffff 8px, #ffffff 16px);
  box-shadow: 0 0 6px rgba(255, 71, 87, 0.4);
}

.pool-transverse-divider.standard_floats {
  width: 4px;
  background: repeating-linear-gradient(0deg, #1e90ff 0px, #1e90ff 12px, #ffffff 12px, #ffffff 24px);
  box-shadow: 0 0 4px rgba(30, 144, 255, 0.3);
}

.pool-transverse-divider.wide_divider {
  width: 8px;
  background: repeating-linear-gradient(0deg, #f59e0b 0px, #f59e0b 10px, #ffffff 10px, #ffffff 20px);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

/* Draggable Equipment Pins */
.pool-equipment-pin {
  position: absolute;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  z-index: 22;
  user-select: none;
  transform: translate(-50%, -50%) rotate(var(--eq-rotation, 0deg));
  transition: transform 0.1s ease;
}

.pool-equipment-pin:active {
  cursor: grabbing;
  transform: translate(-50%, -50%) rotate(var(--eq-rotation, 0deg)) scale(1.2);
}

.eq-lifeguard-chair {
  background: #ff4757;
  border: 2px solid #ffffff;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(255, 71, 87, 0.4);
}

.eq-lifeguard-standing {
  background: #f59e0b;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.eq-start-block {
  background: #1e90ff;
  border: 2px solid #ffffff;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(30, 144, 255, 0.4);
}

.eq-ladder {
  background: #2ed573;
  border: 2px solid #ffffff;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(46, 213, 115, 0.4);
}

.eq-polo-net {
  background: #a855f7;
  border: 2px solid #ffffff;
  border-radius: 4px;
  width: 48px;
  height: 24px;
  box-shadow: 0 2px 8px rgba(168, 85, 247, 0.4);
}

.eq-platform-rail {
  width: 54px;
  height: 19px;
  box-shadow: 0 3px 10px rgba(20, 184, 166, 0.4);
}

/* Backstroke Flags Line - pendant flags spanning pool width */
.pool-backstroke-flags-line {
  position: absolute;
  top: -6px;
  bottom: -6px;
  width: 2px;
  background: rgba(236, 72, 153, 0.5);
  cursor: ew-resize;
  z-index: 14;
  transform: translateX(-50%);
}

.backstroke-pole {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d4d4d8;
  border: 1.5px solid #a1a1aa;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
}

.backstroke-pole.top {
  top: -2px;
}

.backstroke-pole.bottom {
  bottom: -2px;
}

.backstroke-pendant {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 8px solid #ec4899;
  z-index: 15;
  pointer-events: none;
}

/* Start Blocks - base styles */
.pool-start-block {
  position: absolute;
  transform: translateY(-50%);
  z-index: 16;
  pointer-events: none;
}

/* TS16 Competition Block (512×790mm) - larger, angled platform */
.pool-start-block.ts16 {
  width: 18px;
  height: 12px;
}

.pool-start-block.ts16::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #cbd5e1 0%, #94a3b8 40%, #64748b 100%);
  clip-path: polygon(5% 0%, 95% 0%, 100% 100%, 0% 100%);
  border-radius: 1px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.pool-start-block.ts16::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 20%;
  width: 60%;
  height: 4px;
  background: #475569;
  border-radius: 0 0 2px 2px;
}

/* Basic Tubular Block (500×600mm) - smaller, simpler shape */
.pool-start-block.basic {
  width: 14px;
  height: 9px;
}

.pool-start-block.basic::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #e2e8f0 0%, #a1a1aa 100%);
  border-radius: 2px;
  border: 1px solid #78716c;
  box-sizing: border-box;
}

.pool-start-block.basic::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 30%;
  width: 40%;
  height: 3px;
  background: #78716c;
  border-radius: 0 0 1px 1px;
}

/* Positioning */
.pool-start-block.left {
  left: -20px;
}

.pool-start-block.right {
  right: -20px;
}

.pool-start-block.basic.left {
  left: -16px;
}

.pool-start-block.basic.right {
  right: -16px;
}

.pool-equipment-pin .eq-tooltip {
  position: absolute;
  bottom: 36px;
  transform: translateX(-50%);
  left: 50%;
  background: rgba(13, 14, 18, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  font-size: 0.65rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 30;
  box-shadow: var(--shadow-md);
  color: var(--neutral-200);
}

.pool-equipment-pin:hover .eq-tooltip {
  opacity: 1;
}

.pool-configurator-side-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1rem;
  border-radius: 12px;
}

/* Light Theme color-scheme overrides and native element styles */
html.light-theme {
  color-scheme: only light;
}

/* Select element styling - default dark mode options background */
select option {
  background: #16161c;
  color: #ffffff;
}

html.light-theme select option {
  background: #ffffff !important;
  color: #1e222b !important;
}

input[type="date"] {
  color-scheme: dark;
}

html.light-theme input[type="date"] {
  color-scheme: light;
}

/* Style the native date inputs & calendar pickers */
input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  border-radius: 4px;
  padding: 4px;
  opacity: 0.75;
  transition: var(--transition-smooth);
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
  background: rgba(255, 255, 255, 0.12);
  opacity: 1;
}

html.light-theme input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0.7;
}

html.light-theme input[type="date"]::-webkit-calendar-picker-indicator:hover {
  background: rgba(0, 0, 0, 0.06);
  opacity: 1;
}

/* ---- Light-theme: Scheduler & Timeline ---- */
html.light-theme .scheduler-zones-column {
  border-right-color: rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.02);
}

html.light-theme .scheduler-zones-header-spacer {
  background: rgba(0, 0, 0, 0.06);
  border-bottom-color: rgba(0, 0, 0, 0.12);
}

html.light-theme .scheduler-zone-cell {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

html.light-theme .scheduler-zone-name {
  color: #1a1a2e;
}

html.light-theme .scheduler-zone-sub {
  color: #666;
}

html.light-theme .scheduler-timeline-header {
  background: rgba(0, 0, 0, 0.06);
  border-bottom-color: rgba(0, 0, 0, 0.12);
}

html.light-theme .scheduler-time-header-cell {
  color: #333;
  border-right-color: rgba(0, 0, 0, 0.06);
}

html.light-theme .scheduler-timeline-row {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

html.light-theme .scheduler-timeline-slot {
  border-right-color: rgba(0, 0, 0, 0.04);
}

html.light-theme .scheduler-timeline-slot:nth-child(2n) {
  border-right-color: rgba(0, 0, 0, 0.08);
}

html.light-theme .scheduler-class-card {
  background: rgba(30, 144, 255, 0.1);
  border-color: rgba(30, 144, 255, 0.3);
  color: #1a1a2e;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

html.light-theme .scheduler-class-card:hover {
  background: rgba(30, 144, 255, 0.18);
  border-color: rgba(30, 144, 255, 0.5);
}

html.light-theme .scheduler-class-title {
  color: #1a1a2e;
}

html.light-theme .scheduler-class-sub {
  color: #555;
}

html.light-theme .scheduler-class-meta {
  color: #666;
}

html.light-theme .scheduler-class-instructor {
  color: #0891b2;
}

html.light-theme .scheduler-class-capacity.cap-full {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
}

html.light-theme .scheduler-class-capacity.cap-low {
  color: #d97706;
  background: rgba(217, 119, 6, 0.08);
}

html.light-theme .scheduler-class-capacity.cap-ok {
  color: #16a34a;
  background: rgba(22, 163, 74, 0.08);
}

html.light-theme .scheduler-shift-card {
  background: rgba(46, 213, 115, 0.08);
  border-color: rgba(46, 213, 115, 0.25);
  color: #1a1a2e;
}

html.light-theme .scheduler-shift-card:hover {
  background: rgba(46, 213, 115, 0.15);
  border-color: rgba(46, 213, 115, 0.4);
}

html.light-theme .scheduler-grid-click-cell:hover {
  background: rgba(0, 210, 211, 0.06);
}

html.light-theme .scheduler-subprog-legend {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

html.light-theme .scheduler-legend-label {
  color: #333;
}

html.light-theme .scheduler-legend-item {
  color: #1a1a2e;
  background: rgba(0, 0, 0, 0.04);
}

html.light-theme .scheduler-layout-band-spacer {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

html.light-theme .scheduler-layout-badge-set {
  color: #0d9488;
}

html.light-theme .scheduler-layout-badge-unset {
  color: #9ca3af;
}

html.light-theme .scheduler-layout-band {
  background: linear-gradient(90deg, rgba(0, 210, 211, 0.04), rgba(30, 144, 255, 0.04));
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

html.light-theme .scheduler-layout-segment-unset {
  border-color: rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.01);
}

html.light-theme .scheduler-layout-segment-set {
  background: rgba(0, 210, 211, 0.08);
  border-right-color: rgba(0, 210, 211, 0.2);
}

html.light-theme .scheduler-layout-band-name {
  color: #1a1a2e;
}

html.light-theme .scheduler-lane-mini {
  background: rgba(0, 210, 211, 0.15);
  border-color: rgba(0, 210, 211, 0.3);
}

html.light-theme .scheduler-layout-popover {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(0, 210, 211, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

html.light-theme .scheduler-popover-row {
  color: #333;
}

html.light-theme .scheduler-popover-row label {
  color: #666;
}

html.light-theme .scheduler-popover-layout-select {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.12);
  color: #1a1a2e;
}

html.light-theme .scheduler-popover-time {
  color: #1a1a2e;
}

html.light-theme .scheduler-popover-close {
  color: #999;
}

html.light-theme .scheduler-popover-close:hover {
  color: #333;
}

html.light-theme .scheduler-layout-split-btn {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
}

html.light-theme .scheduler-layout-split-btn:hover {
  background: rgba(0, 210, 211, 0.1);
  border-color: rgba(0, 210, 211, 0.3);
}

html.light-theme .scheduler-layout-resizer-line {
  background: rgba(0, 0, 0, 0.25);
}

html.light-theme .scheduler-layout-resizer:hover .scheduler-layout-resizer-line {
  background: var(--accent-cyan, #00d2d3);
}

/* Resilient Tile Error Fallback Styles */
.tile-error-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
  background: rgba(255, 71, 87, 0.04);
  border: 1px dashed rgba(255, 71, 87, 0.35);
  border-radius: 16px;
  text-align: center;
  min-height: 220px;
  box-sizing: border-box;
  width: 100%;
}
.tile-error-icon {
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
  animation: pulse-dot 2s infinite;
}
.tile-error-fallback h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--neutral-100);
  margin: 0 0 0.5rem 0;
}
.tile-error-fallback p {
  font-size: 0.85rem;
  color: var(--neutral-400);
  margin: 0 0 1.25rem 0;
  max-width: 260px;
  line-height: 1.4;
}
.btn-tile-retry {
  padding: 0.55rem 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--neutral-200);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s;
  font-family: var(--font-heading);
  outline: none;
}
.btn-tile-retry:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
  box-shadow: 0 0 12px rgba(255, 71, 87, 0.3);
}

/* Swim School Staff Tile & Modal Styling */
#swimschool-staff-card-container .card-icon {
  color: #ec4899;
  background: rgba(236, 72, 153, 0.08);
  border-color: rgba(236, 72, 153, 0.15);
}
#swimschool-staff-card-container:hover {
  border-color: rgba(236, 72, 153, 0.45) !important;
  box-shadow: 0 10px 25px -5px rgba(236, 72, 153, 0.15) !important;
}

/* Swim School Staff Directory Sticky Multi-Row Header Overrides */
#swimschool-staff-modal .workspace-table-wrapper table thead {
  position: static !important;
}

#swimschool-staff-modal .workspace-table-wrapper table thead th {
  position: sticky !important;
  z-index: 12 !important;
  background: #16161c !important;
}

#swimschool-staff-modal .workspace-table-wrapper table thead tr:first-child th {
  top: 0 !important;
}

#swimschool-staff-modal .workspace-table-wrapper table thead tr:last-child th {
  top: 32px !important; /* Offset by the height of the first row's SportsEngine/Xero cells */
  z-index: 11 !important;
}

/* Ensure light theme overrides background color */
html.light-theme #swimschool-staff-modal .workspace-table-wrapper table thead th {
  background: #ffffff !important;
  border-bottom-color: rgba(30, 34, 43, 0.1) !important;
}

/* WYSIWYG Editor Styling */
.wysiwyg-editor-container {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transition: border-color 0.2s;
}

.wysiwyg-editor-container:focus-within {
  border-color: var(--accent-cyan);
}

.wysiwyg-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  align-items: center;
}

.wysiwyg-btn {
  background: none;
  border: none;
  color: var(--neutral-300);
  cursor: pointer;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  min-width: 28px;
  height: 28px;
  outline: none;
}

.wysiwyg-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff;
}

.wysiwyg-btn:active {
  background: rgba(255, 255, 255, 0.15) !important;
}

.wysiwyg-btn.active {
  background: var(--accent-cyan) !important;
  color: #121216 !important;
  font-weight: 700;
}

.wysiwyg-select {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--neutral-200);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  outline: none;
  cursor: pointer;
  height: 28px;
}

.wysiwyg-select option {
  background: #16161c;
  color: #fff;
}

.wysiwyg-select:focus {
  border-color: var(--accent-cyan);
}

#comms-template-body-wysiwyg {
  width: 100%;
  height: 200px;
  padding: 0.75rem;
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  line-height: 1.5;
  overflow-y: auto;
  outline: none;
  box-sizing: border-box;
  min-height: 200px;
  background: transparent;
}

#comms-template-body-wysiwyg:empty::before {
  content: attr(placeholder);
  color: var(--neutral-500);
  pointer-events: none;
  display: block; /* For contenteditable */
}

/* Light Theme Styling for Editor */
html.light-theme .wysiwyg-editor-container {
  border-color: rgba(0, 0, 0, 0.15);
  background: rgba(0, 0, 0, 0.02);
}

html.light-theme .wysiwyg-editor-container:focus-within {
  border-color: var(--accent-cyan);
}

html.light-theme .wysiwyg-toolbar {
  background: rgba(0, 0, 0, 0.03);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

html.light-theme .wysiwyg-btn {
  color: var(--neutral-700);
}

html.light-theme .wysiwyg-btn:hover {
  background: rgba(0, 0, 0, 0.05) !important;
  color: #000;
}

html.light-theme .wysiwyg-btn.active {
  background: var(--accent-cyan) !important;
  color: #fff !important;
}

html.light-theme .wysiwyg-select {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.15);
  color: #1e222b;
}

html.light-theme .wysiwyg-select option {
  background: #ffffff;
  color: #1e222b;
}

html.light-theme #comms-template-body-wysiwyg {
  color: #1e222b;
}

html.light-theme #comms-template-body-wysiwyg:empty::before {
  color: rgba(30, 34, 43, 0.4);
}

/* Double Range Slider Wrapper & Custom Style */
.double-slider-wrapper input[type="range"] {
  outline: none;
}

/* Chrome, Safari, Opera, and Edge */
.double-slider-wrapper input[type="range"]::-webkit-slider-runnable-track {
  background: transparent;
  border: none;
}
.double-slider-wrapper input[type="range"]::-webkit-slider-thumb {
  pointer-events: auto;
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-cyan, #00d2d3);
  cursor: pointer;
  box-shadow: 0 0 4px rgba(0, 210, 211, 0.5);
  margin-top: -4px; /* Align to track center */
  position: relative;
  z-index: 10;
}

/* Firefox */
.double-slider-wrapper input[type="range"]::-moz-range-track {
  background: transparent;
  border: none;
}
.double-slider-wrapper input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-cyan, #00d2d3);
  cursor: pointer;
  box-shadow: 0 0 4px rgba(0, 210, 211, 0.5);
  border: none;
  position: relative;
  z-index: 10;
}
