/* Coach Companion Court Vision Dark Design Tokens & Stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,400;0,600;0,700;1,700&family=Barlow:wght@400;500;600&family=Bebas+Neue&display=swap');

:root {
  --bg-primary: #07090e;
  --bg-secondary: #0d111a;
  --bg-tertiary: #131926;
  
  --accent-orange: #ff6e00;
  --accent-orange-glow: rgba(255, 110, 0, 0.45);
  --accent-amber: #ffb300;
  --accent-amber-glow: rgba(255, 179, 0, 0.3);
  
  --success-green: #00e676;
  --info-blue: #00e5ff;
  --danger-red: #ff3d00;
  
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-tertiary: #6b7280;
  
  --border-light: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(255, 110, 0, 0.15);
  
  --sidebar-width: 260px;
  --sidebar-width-collapsed: 72px;
  
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  
  --font-sporty: 'Bebas Neue', sans-serif;
  --font-labels: 'Barlow Condensed', sans-serif;
  --font-body: 'Barlow', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-orange) var(--bg-secondary);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--accent-orange);
  border-radius: 3px;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  line-height: 1.5;
}

/* --- Layout Structure --- */

.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar navigation */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  z-index: 100;
  transition: width var(--transition-normal);
  flex-shrink: 0;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  padding-left: 0.5rem;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: radial-gradient(circle, var(--accent-amber) 0%, var(--accent-orange) 100%);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent-orange-glow);
  position: relative;
}

/* Lines of a basketball logo */
.logo-icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--bg-primary);
  transform: translateY(-50%);
}

.logo-text {
  font-family: var(--font-sporty);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #fff 30%, var(--accent-amber) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
}

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-sporty);
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.nav-item i {
  font-size: 1.2rem;
  width: 20px;
  text-align: center;
}

.nav-item:hover {
  background-color: rgba(255, 110, 0, 0.05);
  color: var(--accent-orange);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(255, 110, 0, 0.15) 0%, rgba(255, 179, 0, 0.03) 100%);
  color: var(--accent-orange);
  border-color: rgba(255, 110, 0, 0.25);
  box-shadow: inset 0 0 10px rgba(255, 110, 0, 0.05);
}

/* Sidebar footer */
.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-light);
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.team-selector-wrapper {
  position: relative;
}

.team-dropdown {
  width: 100%;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 0.6rem 0.8rem;
  font-family: var(--font-sporty);
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff6e00' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  outline: none;
  transition: border-color var(--transition-fast);
}

.team-dropdown:focus {
  border-color: var(--accent-orange);
  box-shadow: 0 0 8px rgba(255, 110, 0, 0.25);
}

/* Custom Team Switcher Dropdown */
.custom-dropdown {
  position: relative;
  width: 100%;
}

.custom-dropdown-trigger {
  width: 100%;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 0.6rem 0.8rem;
  font-family: var(--font-sporty);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.custom-dropdown-trigger:hover,
.custom-dropdown-trigger:focus {
  border-color: var(--accent-orange);
  box-shadow: 0 0 8px rgba(255, 110, 0, 0.25);
}

.custom-dropdown-trigger .trigger-arrow {
  color: var(--accent-orange);
  transition: transform var(--transition-fast);
  font-size: 0.85rem;
}

.custom-dropdown.open .custom-dropdown-trigger .trigger-arrow {
  transform: rotate(180deg);
}

.custom-dropdown-menu {
  position: absolute;
  bottom: 100%;
  left: 0;
  width: 100%;
  margin-bottom: 0.5rem;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.6);
  display: none;
  flex-direction: column;
  z-index: 105;
  max-height: 280px;
  overflow-y: auto;
  padding: 0.5rem 0;
}

.custom-dropdown.open .custom-dropdown-menu {
  display: flex;
}

.custom-dropdown-item {
  padding: 0.65rem 0.85rem;
  font-family: var(--font-labels);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.custom-dropdown-item:hover {
  background-color: rgba(255, 110, 0, 0.15);
  color: var(--accent-orange);
}

.custom-dropdown-item.active-item {
  background-color: rgba(255, 110, 0, 0.2);
  color: var(--accent-orange);
  border-left: 3px solid var(--accent-orange);
}

.custom-dropdown-item.add-team-item {
  border-top: 1px solid var(--border-light);
  color: var(--accent-orange);
  margin-top: 0.25rem;
  padding-top: 0.75rem;
}

.custom-dropdown-item.archived-teams-item {
  border-top: 1px solid var(--border-light);
  color: var(--text-secondary);
  margin-top: 0.25rem;
  padding-top: 0.75rem;
}

.custom-dropdown-item.archived-teams-item:hover {
  color: var(--accent-orange);
}

/* Archived Teams Sidebar (Hover Slide-Out) */
.archived-sidebar {
  position: fixed;
  left: var(--sidebar-width);
  bottom: 20px;
  top: 20px;
  width: 380px;
  background: rgba(13, 17, 26, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 20px var(--accent-orange-glow);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateX(-20px);
  pointer-events: none;
  transition: opacity var(--transition-normal), transform var(--transition-normal);
}

.archived-sidebar.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.archived-sidebar-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.archived-sidebar-header h3 {
  font-family: var(--font-sporty);
  font-size: 1.35rem;
  color: var(--accent-orange);
  margin: 0;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.archived-sidebar-header .close-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.25rem;
  cursor: pointer;
  transition: color var(--transition-fast), transform var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.archived-sidebar-header .close-btn:hover {
  color: var(--danger-red);
  background: rgba(255, 255, 255, 0.05);
  transform: scale(1.1);
}

.archived-sidebar-list {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Responsive Overrides for Mobile View */
.mobile-view .archived-sidebar {
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  bottom: 0 !important;
  top: 0 !important;
  height: 100% !important;
  border-radius: 0 !important;
  transform: translateY(100%);
  z-index: 2100;
}

.mobile-view .archived-sidebar.active {
  transform: translateY(0);
}


/* Content Pane */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.top-bar {
  height: 64px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1005;
}

.view-title {
  font-family: var(--font-sporty);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Status Indicator */
.status-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
  background-color: rgba(0, 230, 118, 0.1);
  color: var(--success-green);
  border: 1px solid rgba(0, 230, 118, 0.2);
}

.status-pill.offline {
  background-color: rgba(255, 61, 0, 0.1);
  color: var(--danger-red);
  border-color: rgba(255, 61, 0, 0.2);
}

.status-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: currentColor;
  box-shadow: 0 0 6px currentColor;
}

.status-pill.offline .dot {
  animation: pulse 1.5s infinite;
}

.sub-badge {
  background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-amber) 100%);
  color: #000;
  font-family: var(--font-sporty);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  text-transform: uppercase;
  box-shadow: 0 0 10px var(--accent-orange-glow);
  cursor: pointer;
  border: none;
}

.sub-badge.unpaid {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  box-shadow: none;
}

/* Tab Panels viewport */
.viewport-panel {
  flex-grow: 1;
  overflow-y: auto;
  padding: 2rem;
  display: none;
  height: calc(100vh - 64px);
}

.viewport-panel.active-view {
  display: block;
}

/* --- Global Cards & Controls --- */

.glass-card {
  background: linear-gradient(135deg, rgba(20, 27, 43, 0.75) 0%, rgba(13, 17, 26, 0.95) 100%);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--border-glow), transparent);
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.col-12 { grid-column: span 12; }
.col-8  { grid-column: span 8; }
.col-7  { grid-column: span 7; }
.col-6  { grid-column: span 6; }
.col-5  { grid-column: span 5; }
.col-4  { grid-column: span 4; }
.col-3  { grid-column: span 3; }

@media (max-width: 1024px) {
  .col-8, .col-7, .col-6, .col-5, .col-4, .col-3 {
    grid-column: span 12;
  }
}

/* Headings */
h2.section-title {
  font-family: var(--font-sporty);
  font-weight: 700;
  font-size: 1.4rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
}

h2.section-title i {
  color: var(--accent-orange);
}

.card-title {
  font-family: var(--font-sporty);
  font-weight: 600;
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  color: #fff;
}

/* Form controls */
.form-group {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.form-input, .form-select, .form-textarea {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 0.65rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: all var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-orange);
  box-shadow: 0 0 6px var(--accent-orange-glow);
}

.btn {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-family: var(--font-sporty);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-amber) 100%);
  color: #000;
  border: none;
  box-shadow: 0 4px 15px rgba(255, 110, 0, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #ff8126 0%, #ffc426 100%);
  box-shadow: 0 4px 20px rgba(255, 110, 0, 0.35);
  transform: translateY(-1px);
}

.btn-danger {
  background-color: var(--danger-red);
  color: #fff;
  border: none;
}

.btn-danger:hover {
  background-color: #ff5522;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

/* --- View-specific Styles --- */

/* --- PAGE 1: HOME PAGE --- */

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-item {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.stat-val {
  font-family: var(--font-sporty);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-orange);
  margin-top: 0.25rem;
}

/* Homepage Layout Grid matching User Sketch */
.home-layout-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  height: calc(100vh - 120px);
}

.home-left-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  height: 100%;
}

.home-right-col {
  height: 100%;
}

.home-left-bottom-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 1.5rem;
}

.schedule-card {
  flex-grow: 1.5;
}

.chat-container.full-height {
  height: 100%;
  display: flex;
  flex-direction: column;
}

@media (max-width: 900px) {
  .home-layout-grid {
    grid-template-columns: 1fr;
    height: auto;
    overflow-y: auto;
  }
}

.timeline-event {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: 10px;
  background-color: rgba(255,255,255,0.02);
  border: 1px solid var(--border-light);
  margin-bottom: 0.75rem;
}

.event-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.event-icon-box.practice {
  background-color: rgba(0, 229, 255, 0.1);
  color: var(--info-blue);
  border: 1px solid rgba(0, 229, 255, 0.2);
}

.event-icon-box.game {
  background-color: rgba(255, 110, 0, 0.1);
  color: var(--accent-orange);
  border: 1px solid rgba(255, 110, 0, 0.2);
}

/* AI Chat Sidebar on home page */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 500px;
}

.chat-history {
  flex-grow: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-right: 0.5rem;
  margin-bottom: 1rem;
}

.chat-bubble {
  max-width: 85%;
  padding: 0.8rem 1rem;
  border-radius: 14px;
  font-size: 0.9rem;
}

.chat-bubble.assistant {
  align-self: flex-start;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-bottom-left-radius: 2px;
  color: var(--text-primary);
}

.chat-bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(255, 110, 0, 0.2) 0%, rgba(255, 179, 0, 0.05) 100%);
  border: 1px solid rgba(255, 110, 0, 0.3);
  border-bottom-right-radius: 2px;
  color: #fff;
}

.chat-input-wrapper {
  display: flex;
  gap: 0.5rem;
}

.voice-btn {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.voice-btn:hover {
  color: var(--accent-orange);
  border-color: var(--accent-orange);
}

.voice-btn.recording {
  background-color: var(--danger-red);
  color: #fff;
  border-color: var(--danger-red);
  animation: pulse 1s infinite alternate;
}

/* --- PAGE 2: PRACTICE PLAN & HUB --- */

.planner-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 200px;
}

.drill-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-radius: 12px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-light);
  cursor: grab;
  transition: all var(--transition-fast);
}

.drill-item-card:hover {
  border-color: rgba(255,110,0,0.3);
}

.drill-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.drill-duration {
  font-family: var(--font-sporty);
  color: var(--accent-orange);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.drill-order-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.drill-order-btn {
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0.1rem;
}

.drill-order-btn:hover {
  color: var(--accent-orange);
}

/* --- PAGE 3: PLAYBOOK --- */

.playbook-container {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 1.5rem;
  height: 600px;
}

@media (max-width: 1024px) {
  .playbook-container {
    grid-template-columns: 1fr;
    height: auto;
  }
}

.court-canvas-wrapper {
  background-color: #070a12;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6);
}

.court-canvas-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(255, 110, 0, 0.05) 0%, transparent 80%);
  pointer-events: none;
}

.court-board {
  position: relative;
  width: 500px;
  height: 470px;
}

.court-canvas {
  background-color: transparent;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  z-index: 10;
}

.player-marker {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font-sporty);
  font-weight: 700;
  font-size: 0.9rem;
  z-index: 20;
  cursor: grab;
  user-select: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  border: 2px solid;
  transform: translate(-50%, -50%);
}

.player-marker.offense {
  background-color: #ff6e00;
  color: #000;
  border-color: #ff9100;
}

.player-marker.defense {
  background-color: #1e293b;
  color: #fff;
  border-color: #3b82f6;
}

.player-marker.ball {
  background-color: #ff3d00;
  color: #fff;
  border-color: #ff784e;
  width: 20px;
  height: 20px;
  font-size: 0.6rem;
  box-shadow: 0 0 10px #ff3d00;
}

.canvas-toolbar {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(13, 17, 26, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-light);
  border-radius: 30px;
  padding: 0.4rem 1rem;
  display: flex;
  gap: 0.75rem;
  z-index: 30;
}

.playbook-desc-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgba(7, 10, 18, 0.95);
  border-top: 1px solid var(--border-light);
  padding: 0.85rem 1.25rem;
  z-index: 25;
  text-align: left;
  box-sizing: border-box;
}

.playbook-desc-overlay h4 {
  margin: 0 0 0.35rem 0;
  color: var(--accent-orange);
  font-family: var(--font-sporty);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.playbook-desc-overlay p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-primary);
  line-height: 1.55;
  max-height: 90px;
  overflow-y: auto;
}

.tool-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.tool-btn:hover {
  color: var(--accent-orange);
  background-color: rgba(255, 255, 255, 0.05);
}

.tool-btn.active {
  color: #000;
  background-color: var(--accent-orange);
  box-shadow: 0 0 10px var(--accent-orange-glow);
}

/* --- PAGE 4: TEAM MANAGEMENT & ROSTER --- */

.roster-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.player-card {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  position: relative;
}

.player-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.player-number-badge {
  background-color: rgba(255, 110, 0, 0.1);
  color: var(--accent-orange);
  border: 1px solid rgba(255, 110, 0, 0.2);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sporty);
  font-weight: 700;
}

.player-level-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background-color: rgba(0, 0, 0, 0.2);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.8rem;
}

.player-level-btn {
  background: none;
  border: none;
  color: var(--accent-orange);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0 0.2rem;
}

/* Roster photo/PDF drag and drop area */
.drag-drop-zone {
  border: 2px dashed rgba(255, 110, 0, 0.3);
  background-color: rgba(255, 110, 0, 0.02);
  border-radius: 12px;
  padding: 2.5rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: 1.5rem;
}

.drag-drop-zone:hover {
  border-color: var(--accent-orange);
  background-color: rgba(255, 110, 0, 0.04);
}

.drag-drop-icon {
  font-size: 2.5rem;
  color: var(--accent-orange);
  margin-bottom: 1rem;
}

/* --- PAGE 5: LIVE PRACTICE --- */

.live-practice-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .live-practice-layout {
    grid-template-columns: 1fr;
  }
}

.live-attendance-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.live-attendance-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background-color: rgba(255,255,255,0.02);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  cursor: pointer;
}

.live-attendance-item input[type="checkbox"] {
  accent-color: var(--accent-orange);
  width: 18px;
  height: 18px;
}

.live-timer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
  position: relative;
}

/* Circular Timer */
.timer-canvas-box {
  position: relative;
  width: 220px;
  height: 220px;
  margin-bottom: 2rem;
}

.timer-numbers {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timer-time {
  font-family: var(--font-sporty);
  font-size: 3.5rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.timer-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-orange);
  margin-top: 0.25rem;
}

.timer-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-counter-box {
  display: flex;
  gap: 2rem;
  background-color: rgba(0,0,0,0.2);
  border-radius: 12px;
  padding: 1rem 2rem;
  border: 1px solid var(--border-light);
}

.counter-column {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.counter-value {
  font-family: var(--font-sporty);
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
}

.counter-btn-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.counter-btn {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  width: 44px;
  height: 44px;
  border-radius: 8px;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
}

.counter-btn:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-orange);
}

/* --- LOCKED FEATURES & PRO badge MODAL --- */

.blur-overlay {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
}

.premium-lock-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(7, 9, 14, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  z-index: 50;
  border-radius: 16px;
  border: 1px dashed rgba(255,110,0,0.3);
}

.lock-icon {
  font-size: 2.5rem;
  color: var(--accent-orange);
  margin-bottom: 1rem;
  text-shadow: 0 0 15px var(--accent-orange-glow);
}

.lock-title {
  font-family: var(--font-sporty);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.lock-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 300px;
  margin-bottom: 1.5rem;
}

/* Modal dialog custom */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: 500px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  position: relative;
  transform: translateY(-20px);
  transition: transform var(--transition-normal);
}

.modal-overlay.active .modal-card {
  transform: translateY(0);
}

/* Constrain heights of large modals on desktop/laptops to fit layout */
#profile-settings-modal .modal-card,
#add-player-modal .modal-card {
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

#profile-settings-modal .modal-card form,
#add-player-modal .modal-card form {
  overflow-y: auto;
  flex-grow: 1;
  min-height: 0;
  padding-right: 0.5rem;
  margin-right: -0.5rem;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
}

.modal-close:hover {
  color: #fff;
}

/* --- ANIMATIONS & CORE KEYFRAMES --- */

@keyframes pulse {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Print Overrides */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .sidebar, .top-bar, .canvas-toolbar, .btn, .chat-input-wrapper {
    display: none !important;
  }
  .viewport-panel {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
    padding: 0 !important;
  }
  .glass-card {
    border: 1px solid #ccc !important;
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
  .stat-val {
    color: #000 !important;
  }
}

/* --- SIDEBAR BOOK PROMOTION STYLE --- */
.sidebar-book-promo {
  margin: 1.2rem 0;
  padding: 1.1rem 0.9rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 110, 0, 0.08) 0%, rgba(255, 179, 0, 0.02) 100%);
  border: 1px solid rgba(255, 110, 0, 0.2);
  text-align: center;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sidebar-book-promo:hover {
  border-color: rgba(255, 110, 0, 0.4);
  background: linear-gradient(135deg, rgba(255, 110, 0, 0.12) 0%, rgba(255, 179, 0, 0.04) 100%);
  box-shadow: 0 6px 16px rgba(255, 110, 0, 0.1);
  transform: translateY(-1px);
}

.sidebar-book-promo .book-icon {
  font-size: 1.8rem;
  color: var(--accent-orange);
  margin-bottom: 0.4rem;
  display: inline-block;
  filter: drop-shadow(0 0 5px var(--accent-orange-glow));
}

.sidebar-book-promo .book-title {
  font-family: var(--font-sporty);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.sidebar-book-promo .book-desc {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.35;
  margin-bottom: 0.4rem;
}

/* --- HOME PAGE REDESIGN LAYOUT --- */
.home-layout-grid-redesign {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem;
  height: calc(100vh - 110px);
  max-height: calc(100vh - 110px);
  overflow: hidden;
}

.home-left-col-redesign {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  height: 100%;
  overflow: hidden;
}

.home-right-col-redesign {
  height: 100%;
  overflow: hidden;
}

.upcoming-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 200px;
}

.upcoming-list-container {
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.comm-card {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 250px;
}

/* Rigid Chat Card */
.chat-card-rigid {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-card-rigid .chat-history {
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 0.25rem;
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Upcoming Event Bars matching sketch */
.upcoming-event-bar {
  display: flex;
  align-items: center;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  overflow: hidden;
  height: 48px;
  border: 1px solid var(--border-light);
  background-color: var(--bg-tertiary);
}

.upcoming-event-bar.practice {
  border-color: rgba(59, 130, 246, 0.25);
}

.upcoming-event-bar.game {
  border-color: rgba(239, 68, 68, 0.25);
}

.upcoming-event-bar .day-counter {
  width: 90px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sporty);
  font-weight: 800;
  font-size: 0.9rem;
  color: #fff;
  flex-shrink: 0;
}

.upcoming-event-bar.practice .day-counter {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.upcoming-event-bar.game .day-counter {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
}

.upcoming-event-bar .event-name {
  flex-grow: 1;
  padding-left: 1.25rem;
  font-family: var(--font-sporty);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.upcoming-event-bar .start-practice-btn {
  margin-right: 12px;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
}

@media (max-width: 900px) {
  .home-layout-grid-redesign {
    grid-template-columns: 1fr;
    height: auto;
    max-height: none;
    overflow-y: auto;
  }
  .upcoming-card, .comm-card, .chat-card-rigid {
    height: auto;
    max-height: none;
    min-height: auto;
  }
}

#onboarding-wizard-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(7, 9, 14, 0.85);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

#onboarding-wizard-overlay.active {
  display: flex;
  opacity: 1;
}

.onboarding-card {
  width: 90%;
  max-width: 550px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 30px 60px rgba(0,0,0,0.6), 0 0 40px rgba(255, 110, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.onboarding-stepper {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
  position: relative;
  padding: 0 1rem;
}

.onboarding-stepper::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--border-light);
  z-index: 1;
  transform: translateY(-50%);
}

.onboarding-step-indicator {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--bg-primary);
  border: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sporty);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-secondary);
  z-index: 2;
  transition: all var(--transition-normal);
}

.onboarding-step-indicator.active {
  border-color: var(--accent-orange);
  background-color: var(--accent-orange);
  color: #000;
  box-shadow: 0 0 15px var(--accent-orange-glow);
}

.onboarding-step-indicator.completed {
  border-color: var(--success-green);
  background-color: var(--success-green);
  color: #000;
}

.onboarding-step-panel {
  display: none;
}

.onboarding-step-panel.active {
  display: block;
  animation: onboardingFadeIn 0.35s ease;
}

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

.onboarding-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
  border-top: 1px solid var(--border-light);
  padding-top: 1.5rem;
}

/* Chat Action Buttons */
.chat-action-btn {
  font-family: var(--font-sporty);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  background-color: rgba(255, 110, 0, 0.12) !important;
  border: 1px solid rgba(255, 110, 0, 0.3) !important;
  color: var(--accent-orange) !important;
  padding: 8px 14px !important;
  border-radius: 6px !important;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  margin-right: 6px;
}

.chat-action-btn:hover {
  background-color: var(--accent-orange) !important;
  color: #000 !important;
  border-color: var(--accent-orange) !important;
  box-shadow: 0 0 10px var(--accent-orange-glow);
  transform: translateY(-1px);
}

.chat-action-btn:active {
  transform: translateY(0);
}




/* --- REDESIGNED LIVE PRACTICE WINDOW (3-COLUMN LAYOUT) --- */
.live-practice-grid-redesign {
  display: grid;
  grid-template-columns: 290px 1fr 310px;
  gap: 1.25rem;
  height: 100%;
  max-height: 100%;
  box-sizing: border-box;
}

.live-left-col {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.live-middle-col {
  height: 100%;
  overflow: hidden;
}

.live-right-col {
  height: 100%;
  overflow: hidden;
}

.scaler-number {
  color: var(--accent-orange);
  font-weight: 800;
  font-size: 0.95rem;
  background: rgba(255, 110, 0, 0.1);
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 110, 0, 0.2);
}

.drill-outline-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  font-size: 0.8rem;
  transition: all var(--transition-fast);
}

.drill-outline-item.completed {
  border-color: rgba(0, 200, 83, 0.2);
  background: rgba(0, 200, 83, 0.03);
}

.drill-outline-item.active {
  border-color: var(--accent-orange);
  background: rgba(255, 110, 0, 0.05);
  box-shadow: 0 0 8px rgba(255, 110, 0, 0.15);
}

.drill-outline-item.upcoming {
  opacity: 0.6;
}

.drill-outline-item .status-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  flex-shrink: 0;
}

.drill-outline-item.completed .status-icon {
  background: var(--success-green);
  color: #000;
}

.drill-outline-item.active .status-icon {
  background: var(--accent-orange);
  color: #000;
  animation: pulse 1s infinite alternate;
}

.drill-outline-item.upcoming .status-icon {
  border: 1.5px solid var(--text-tertiary);
  background: transparent;
}

@media (max-width: 1024px) {
  .live-practice-grid-redesign {
    grid-template-columns: 240px 1fr;
  }
  .live-right-col {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .live-practice-grid-redesign {
    grid-template-columns: 1fr;
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .live-left-col {
    height: auto !important;
  }
  .live-left-col .live-attendance-card {
    height: 250px !important;
  }
  .live-left-col .live-outline-card {
    height: 250px !important;
  }
  .live-middle-col .live-timer-card {
    height: auto !important;
    min-height: 480px;
  }
}

/* --- PUSH NOTIFICATION SIMULATOR BANNER --- */
.push-notification-banner {
  position: fixed;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 450px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--accent-orange);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 110, 0, 0.25);
  border-radius: 14px;
  padding: 14px 18px;
  z-index: 9999;
  transition: top 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
}
.push-notification-banner.show {
  top: 20px;
}
.push-banner-content {
  display: flex;
  align-items: center;
  gap: 14px;
}
.push-banner-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 110, 0, 0.2);
  color: var(--accent-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.push-banner-text {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.push-banner-title {
  font-size: 0.88rem;
  color: #fff;
  font-weight: 700;
  margin: 0;
}
.push-banner-body {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.3;
}
.push-banner-close {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 4px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}
.push-banner-close:hover {
  color: #fff;
}

/* --- STRIPE SIMULATOR CUSTOM STYLES --- */
.sim-card-preview {
  position: relative;
  width: 100%;
  height: 165px;
  background: linear-gradient(135deg, #131926 0%, #1e293b 100%);
  border: 1px solid rgba(255, 110, 0, 0.25);
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin: 0.5rem 0 1.25rem 0;
  overflow: hidden;
}

.sim-card-preview::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 110, 0, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.sim-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
}

.sim-card-chip {
  width: 38px;
  height: 28px;
  background: linear-gradient(135deg, #ffd700 0%, #b8860b 100%);
  border-radius: 6px;
  position: relative;
  box-shadow: inset 1px 1px 2px rgba(255,255,255,0.3);
}

.sim-card-logo {
  font-family: var(--font-sporty);
  font-weight: 800;
  font-style: italic;
  color: var(--accent-orange);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 2;
  text-shadow: 0 0 10px rgba(255, 110, 0, 0.3);
}

.sim-card-number {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.35rem;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
  margin: 0.75rem 0;
  z-index: 2;
  text-align: center;
  word-spacing: 4px;
}

.sim-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  color: var(--text-secondary);
  font-size: 0.7rem;
  text-transform: uppercase;
  z-index: 2;
  letter-spacing: 1px;
}

.sim-card-name {
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sim-card-expiry-label {
  display: block;
  font-size: 0.6rem;
  color: var(--text-tertiary);
  margin-bottom: 2px;
}

.sim-card-expiry-val {
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
}

@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.4);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(0, 230, 118, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 230, 118, 0);
  }
}

/* Legal Modal Tabs */
.legal-tab-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0.5rem;
  font-family: var(--font-sporty);
  font-weight: 600;
  font-size: 0.8rem;
}
.legal-tab-btn:hover {
  border-color: var(--accent-orange);
  color: var(--text-primary);
}
.legal-tab-btn.active {
  background: linear-gradient(135deg, rgba(255, 110, 0, 0.15) 0%, rgba(255, 179, 0, 0.03) 100%);
  color: var(--accent-orange);
  border-color: rgba(255, 110, 0, 0.25);
  box-shadow: inset 0 0 10px rgba(255, 110, 0, 0.05);
}

/* Legal Content Container styling for dynamic markdown */
.legal-content-container h1 {
  font-size: 1.35rem;
  color: var(--text-primary);
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
  font-family: var(--font-sporty);
  font-weight: 700;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.25rem;
}
.legal-content-container h2 {
  font-size: 1.05rem;
  color: var(--accent-amber);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-sporty);
  font-weight: 600;
}
.legal-content-container p {
  margin-bottom: 0.75rem;
  line-height: 1.55;
  color: var(--text-secondary);
}
.legal-content-container ul {
  margin-left: 1.25rem;
  margin-bottom: 0.75rem;
  list-style-type: disc;
}
.legal-content-container li {
  margin-bottom: 0.35rem;
  color: var(--text-secondary);
}
.legal-content-container strong {
  color: var(--text-primary);
}

/* Cookie Consent Banner Styling */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
  z-index: 9999;
  padding: 1rem 2rem;
  box-sizing: border-box;
  animation: slideUp 0.3s ease-out;
}
.cookie-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.cookie-banner-text {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.cookie-banner-text strong {
  color: var(--accent-orange);
  font-family: var(--font-sporty);
  font-size: 0.95rem;
}
.cookie-banner-text span {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.cookie-banner-text a {
  color: var(--accent-amber);
  text-decoration: underline;
}
.cookie-banner-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
@media (max-width: 768px) {
  .cookie-banner {
    padding: 1rem;
  }
  .cookie-banner-content {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
}


/* ADA Compliance: Legal Links */
.sidebar-legal-links a {
  padding: 2px 4px;
  min-width: auto;
  min-height: auto;
  display: inline-block;
  font-size: 0.65rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.sidebar-legal-links a:focus,
.sidebar-legal-links a:focus-visible {
  outline: 2px solid var(--accent-orange);
  outline-offset: 2px;
  background-color: rgba(255, 107, 0, 0.1);
}

/* Playbook Tabs and Star Elements */
.playbook-tab.active-tab {
  border-bottom: 2px solid var(--accent-orange) !important;
  color: var(--text-primary) !important;
}
.playbook-tab:not(.active-tab) {
  border-bottom: 2px solid transparent !important;
  color: var(--text-secondary) !important;
}
.playbook-tab:hover {
  color: var(--text-primary) !important;
}
.play-star-btn:hover {
  transform: scale(1.2);
}

/* Hidden Print Container */
#print-container {
  display: none;
}

/* Print Playbook styling */
@media print {
  /* Hide the rest of the application */
  body > *:not(#print-container) {
    display: none !important;
  }
  
  /* Reset print container styles */
  #print-container {
    display: block !important;
    position: static !important;
    width: 100% !important;
    height: auto !important;
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .print-page {
    page-break-after: always;
    break-after: page;
    padding: 1.5in !important;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: 100vh;
    justify-content: space-between;
    background: #ffffff !important;
    color: #000000 !important;
  }

  .print-cover {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100vh;
    background: #ffffff !important;
    color: #000000 !important;
  }

  .print-cover h1 {
    font-size: 3.5rem;
    color: #ff6e00;
    margin-bottom: 1rem;
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
  }

  .print-cover h2 {
    font-size: 1.8rem;
    color: #4b5563;
    margin-bottom: 3rem;
  }

  .print-cover .metadata {
    font-size: 1.1rem;
    color: #9ca3af;
  }

  .print-play-header {
    border-bottom: 2px solid #ff6e00;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
  }

  .print-play-title {
    font-size: 2rem;
    color: #000000;
    margin: 0;
    font-family: 'Outfit', sans-serif;
  }

  .print-play-meta {
    font-size: 1rem;
    color: #4b5563;
    margin-top: 0.25rem;
  }

  .print-play-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
    align-items: start;
    flex-grow: 1;
    margin-bottom: 1.5rem;
  }

  .print-play-diagram-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .print-play-diagram {
    width: 100%;
    max-width: 450px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background-color: #f9fafb;
    height: auto;
  }

  .print-play-details h3 {
    margin-top: 0;
    color: #ff6e00;
    font-size: 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.35rem;
    text-transform: uppercase;
    font-family: 'Outfit', sans-serif;
  }

  .print-play-details p {
    font-size: 1rem;
    line-height: 1.6;
    color: #374151;
  }

  .print-footer {
    border-top: 1px solid #e5e7eb;
    padding-top: 0.5rem;
    font-size: 0.85rem;
    color: #9ca3af;
    display: flex;
    justify-content: space-between;
  }

  .print-lineup-page {
    padding: 0.5in !important;
    box-sizing: border-box;
    display: block !important;
    height: auto !important;
    background: #ffffff !important;
    color: #000000 !important;
  }
}

/* Onboarding Interview Chat Elements */
.onboard-msg-bot {
  align-self: flex-start;
  background-color: rgba(255, 110, 0, 0.08);
  border: 1px solid rgba(255, 110, 0, 0.15);
  color: var(--text-primary);
  border-radius: 16px 16px 16px 0;
  padding: 1.1rem 1.4rem;
  max-width: 85%;
  font-size: 1.05rem;
  line-height: 1.5;
  animation: slideInLeft 0.3s ease forwards;
}

.onboard-msg-user {
  align-self: flex-end;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  color: #fff;
  border-radius: 16px 16px 0 16px;
  padding: 1.1rem 1.4rem;
  max-width: 85%;
  font-size: 1.05rem;
  line-height: 1.5;
  animation: slideInRight 0.3s ease forwards;
}

.onboard-chip {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  border-radius: 24px;
  padding: 0.7rem 1.3rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.onboard-chip:hover, .onboard-chip.selected {
  background-color: rgba(255, 110, 0, 0.15);
  border-color: var(--accent-orange);
  color: var(--text-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(255, 110, 0, 0.15);
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-15px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(15px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Guided App Tutorial Styles */
.tutorial-overlay-active {
  overflow: hidden !important;
}

.tutorial-highlight {
  position: relative !important;
  z-index: 100001 !important;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.85), 0 0 35px 15px var(--accent-orange) !important;
  pointer-events: none !important;
  border-radius: 8px;
  outline: 3px solid var(--accent-orange) !important;
  transition: box-shadow 0.3s ease, outline 0.3s ease;
  animation: tutorialPulse 2s infinite alternate ease-in-out;
}

@keyframes tutorialPulse {
  0% {
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.85), 0 0 20px 8px var(--accent-orange-glow);
    outline-color: var(--accent-orange-glow);
  }
  100% {
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.85), 0 0 45px 20px var(--accent-orange);
    outline-color: var(--accent-orange);
  }
}

.tutorial-popover {
  position: fixed;
  z-index: 100002;
  width: 420px;
  background: rgba(13, 17, 26, 0.98);
  border: 2px solid var(--accent-orange);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95), 0 0 25px rgba(255, 110, 0, 0.2);
  color: #fff;
  font-family: inherit;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  animation: tutorialCardFade 0.25s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes tutorialCardFade {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.tutorial-popover h3 {
  margin: 0 0 0.75rem 0;
  font-family: var(--font-sporty);
  font-size: 1.45rem;
  text-transform: uppercase;
  color: var(--accent-orange);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-shadow: 0 0 10px rgba(255, 110, 0, 0.3);
}

.tutorial-popover p {
  margin: 0 0 1.5rem 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.tutorial-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.tutorial-step-indicator {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.tutorial-actions {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.tutorial-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  padding: 0.6rem 1.1rem;
  font-size: 0.9rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.tutorial-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.tutorial-btn.primary {
  background: var(--accent-orange);
  border-color: var(--accent-orange);
  color: #fff;
  font-weight: 600;
}

.tutorial-btn.primary:hover {
  background: #ff8533;
  border-color: #ff8533;
  box-shadow: 0 0 15px var(--accent-orange-glow);
}

.tutorial-btn.skip {
  background: transparent;
  border: none;
  color: var(--text-muted);
  text-decoration: underline;
  padding: 0.6rem 0.5rem;
}

.tutorial-btn.skip:hover {
  color: var(--text-secondary);
}

/* Profile Dropdown Menu */
.profile-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.profile-dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 0.75rem;
  width: 250px;
  background: rgba(13, 17, 26, 0.98);
  border: 1px solid var(--accent-orange-glow);
  border-radius: 16px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000;
  overflow: hidden;
  padding: 0.5rem 0;
  transform-origin: top right;
  animation: dropdownFadeIn 0.2s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

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

.profile-dropdown-menu.show {
  display: block;
}

.profile-dropdown-header {
  padding: 0.85rem 1.2rem;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1.2rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

.profile-dropdown-item:hover {
  background: rgba(255, 110, 0, 0.12);
  color: #fff;
}

.profile-dropdown-item i {
  color: var(--accent-orange);
  width: 18px;
  text-align: center;
  font-size: 0.95rem;
}

.profile-dropdown-divider {
  height: 1px;
  background: var(--border-light);
  margin: 0.4rem 0;
}

.profile-dropdown-item.danger {
  color: #f87171;
}

.profile-dropdown-item.danger i {
  color: #ef4444;
}

.profile-dropdown-item.danger:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #ff8787;
}

/* Dual Slider Styles */
.dual-slider-thumb::-webkit-slider-thumb {
  pointer-events: auto;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent-orange);
  cursor: pointer;
  box-shadow: 0 0 5px rgba(0,0,0,0.5), 0 0 10px var(--accent-orange-glow);
  position: relative;
  z-index: 2;
}

.dual-slider-thumb::-moz-range-thumb {
  pointer-events: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent-orange);
  cursor: pointer;
  box-shadow: 0 0 5px rgba(0,0,0,0.5), 0 0 10px var(--accent-orange-glow);
  position: relative;
  z-index: 2;
}

.dual-slider-thumb:active::-webkit-slider-thumb {
  transform: scale(1.1);
  background: var(--accent-orange);
  border-color: #fff;
}
.dual-slider-thumb:active::-moz-range-thumb {
  transform: scale(1.1);
  background: var(--accent-orange);
  border-color: #fff;
}

/* Quick Add Event Chip Styles */
.quick-add-chip {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  border-radius: 20px;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  font-family: inherit;
}

.quick-add-chip:hover, .quick-add-chip.active {
  background-color: rgba(255, 110, 0, 0.15);
  border-color: var(--accent-orange);
  color: var(--text-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(255, 110, 0, 0.15);
}

/* Tryout Evaluator Styles */
.tryout-card {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tryout-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.tryout-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.tryout-number-badge {
  background-color: rgba(255, 110, 0, 0.1);
  color: var(--accent-orange);
  border: 1px solid rgba(255, 110, 0, 0.25);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sporty);
  font-weight: 700;
  font-size: 0.9rem;
}

.tryout-skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem 1.25rem;
  margin-bottom: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.75rem 0;
}

.tryout-skill-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tryout-skill-label-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.tryout-skill-value {
  font-weight: bold;
  color: var(--accent-orange);
}

.tryout-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
}

.tryout-status-badge {
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.tryout-status-badge.active {
  background-color: rgba(255, 110, 0, 0.1);
  color: var(--accent-orange);
  border: 1px solid rgba(255, 110, 0, 0.2);
}

.tryout-status-badge.converted {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success-green);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* ==========================================================================
   MOBILE RESPONSIVE LAYOUT & SANDBOX PREVIEW SYSTEM
   ========================================================================== */

/* Hamburger Button / Brand Logo Toggle in top-bar (hidden on desktop) */
.sidebar-toggle-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.35rem;
  cursor: pointer;
  padding: 0.25rem;
  margin-right: 0.75rem;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  transition: background 0.2s;
  z-index: 1010;
}

.sidebar-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Sidebar Overlay Backdrop on Mobile - Scoped inside phone boundary */
.sidebar-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1050;
  opacity: 0;
  transition: opacity 0.3s ease;
}

body.sidebar-open .sidebar-overlay {
  display: block;
  opacity: 1;
}



/* --------------------------------------------------------------------------
   Mobile View Mode overrides (active on screens <= 768px OR in sandbox)
   -------------------------------------------------------------------------- */

.mobile-view .sidebar-toggle-btn {
  display: flex !important;
}

/* Hide the top-left menu logo when any modal/popup is open on mobile */
.mobile-view .app-container:has(.modal-overlay.active) .sidebar-toggle-btn {
  display: none !important;
}

/* Constrain tutorial popovers to absolute positions inside the app container on mobile */
.mobile-view .tutorial-popover {
  position: absolute !important;
  width: 90% !important;
  max-width: 320px !important;
  padding: 1rem !important;
  z-index: 100002 !important;
}

.mobile-view .tutorial-popover h3 {
  font-size: 1.1rem !important;
  margin-bottom: 0.5rem !important;
}

.mobile-view .tutorial-popover p {
  font-size: 0.82rem !important;
  line-height: 1.4 !important;
  margin-bottom: 0.85rem !important;
}

.mobile-view .tutorial-btn {
  padding: 0.35rem 0.65rem !important;
  font-size: 0.75rem !important;
  border-radius: 6px !important;
}

.mobile-view .tutorial-step-indicator {
  font-size: 0.7rem !important;
}

/* Position and scale profile dropdown menu on mobile so it stays inside screen boundaries */
.mobile-view .profile-dropdown-menu {
  position: absolute !important;
  right: 0.5rem !important;
  left: auto !important;
  top: 100% !important;
  width: 220px !important;
  max-width: none !important; /* Exclude from global mobile * max-width: 100% selector */
  z-index: 2000 !important;
}

/* Mobile Sidebar drawer styled relative to app screen container to prevent horizontal viewport leaks */
.mobile-view .sidebar {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  transform: translateX(-100%);
  z-index: 1100;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: none;
}

body.sidebar-open .sidebar {
  transform: translateX(0) !important;
  box-shadow: 5px 0 30px rgba(0, 0, 0, 0.5) !important;
}

/* Mobile Top-Bar & View Titles */
.mobile-view .top-bar {
  padding: 0 1rem;
  height: 60px;
}

.mobile-view .view-title {
  font-size: 1.1rem;
}

.mobile-view .header-actions {
  gap: 0.4rem;
}



/* Viewport Panels spacing */
.mobile-view .viewport-panel {
  padding: 1rem 0.75rem;
  height: calc(100vh - 60px);
  overflow-x: hidden !important;
  box-sizing: border-box;
}

/* Collapse grids & stack all content elements */
.mobile-view .section-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-view .section-grid > [class*="col-"] {
  grid-column: span 12 !important;
  width: 100% !important;
}

/* Prevent horizontal overflow scrolling entirely */
.mobile-view, 
.mobile-view body, 
.mobile-view .app-container, 
.mobile-view .main-content, 
.mobile-view .viewport-panel {
  overflow-x: hidden !important;
}

.mobile-view * {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Specific view adjustments */

/* 1. Home View: Stack Cards in Priority Order (Upcoming, AI Chat, Messages) */
.mobile-view .home-layout-grid-redesign {
  display: flex;
  flex-direction: column;
  height: auto !important;
  max-height: none !important;
  overflow-y: visible !important;
  gap: 1rem;
}

/* Treat column wrappers as non-existent layout boundaries to let flexbox stack grandchildren */
.mobile-view .home-left-col-redesign,
.mobile-view .home-right-col-redesign {
  display: contents !important;
}

.mobile-view .upcoming-card {
  order: 1 !important;
  height: auto !important;
  max-height: none !important;
  min-height: auto !important;
}

.mobile-view .chat-card-rigid {
  order: 2 !important;
  height: 540px !important; /* Expanded vertically */
}

.mobile-view .chat-history {
  height: 380px !important; /* Expanded vertically */
  overflow-y: auto;
}

/* Collapsible sections mobile-only overrides */
.mobile-view .glass-card.collapsed .collapse-content {
  display: none !important;
}

.mobile-view .glass-card.collapsed .collapse-icon {
  transform: rotate(180deg) !important;
}

.mobile-view .comm-card {
  order: 3 !important;
  height: auto !important;
  max-height: none !important;
  min-height: auto !important;
}

/* 2. Playbook View: Scaled whiteboard & wrapped toolbar button controls */
.mobile-view .playbook-container {
  display: flex;
  flex-direction: column;
  height: auto !important;
  gap: 1rem;
}

.mobile-view .court-canvas-wrapper {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  overflow: visible !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  background-color: #070a12;
  padding: 1rem 0 !important;
}

.mobile-view .court-board {
  transform-origin: center top !important;
  flex-shrink: 0;
  margin: 0 !important;
  max-width: none !important; /* Prevent global max-width: 100% from squashing layout width */
  /* height and transform are computed dynamically in app.js scalePlayboard() */
}

.mobile-view .court-canvas {
  max-width: none !important; /* Prevent canvas from squashing horizontally */
}

.mobile-view .canvas-toolbar {
  position: relative !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  margin: 1.5rem auto 0 auto !important;
  max-width: 290px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  border-radius: 16px !important;
  padding: 0.5rem !important;
  gap: 0.4rem !important;
  z-index: 30 !important;
}

.mobile-view .canvas-toolbar .tool-btn {
  width: 36px !important;
  height: 36px !important;
  font-size: 0.95rem !important;
  margin: 0 !important;
}

/* 3. Team Management View: fit to screen and avoid bottom scroll bar */
.mobile-view #view-team {
  overflow-y: auto !important;
}

.mobile-view .roster-card-grid {
  max-height: 280px !important;
  overflow-y: auto !important;
}

.mobile-view #team-subtabs-nav {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 0.5rem !important;
}

.mobile-view #team-subtabs-nav button {
  width: 100% !important;
  padding: 0.4rem 0.25rem !important;
  font-size: 0.75rem !important;
}

.mobile-view #team-subpanel-homework {
  padding: 0.25rem !important;
}

/* 4. Live Practice View: Fits on one screen without scrolling, popups for Attendance and Chat */
.mobile-view #view-live.active-view {
  height: calc(100vh - 60px) !important;
  max-height: calc(100vh - 60px) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0.75rem !important;
}

.mobile-view .live-mobile-actions {
  display: flex !important;
}

.mobile-view .live-practice-grid-redesign {
  flex-grow: 1 !important;
  height: calc(100% - 46px) !important;
  max-height: calc(100% - 46px) !important;
  grid-template-columns: 1fr !important;
  overflow: hidden !important;
  margin: 0 !important;
  position: relative !important;
}

.mobile-view .live-middle-col {
  height: 100% !important;
  max-height: 100% !important;
  overflow: hidden !important;
}

.mobile-view .live-timer-card {
  height: 100% !important;
  max-height: 100% !important;
  min-height: auto !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  padding: 0.75rem !important;
}

/* Roster Attendance Popup Modal */
.mobile-view .live-left-col {
  display: none !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background-color: var(--bg-secondary) !important;
  border: 1px solid var(--border-light) !important;
  border-radius: 16px !important;
  z-index: 1020 !important;
  padding: 1rem !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6) !important;
  height: 100% !important;
  max-height: 100% !important;
}

.mobile-view .live-left-col.active {
  display: flex !important;
  flex-direction: column !important;
}

.mobile-view .live-left-col .live-attendance-card {
  height: 100% !important;
  max-height: 100% !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
}

.mobile-view .live-left-col .live-outline-card {
  display: none !important; /* outline is merged into timeline segments */
}

/* Advisor Chat Popup Modal */
.mobile-view .live-right-col {
  display: none !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background-color: var(--bg-secondary) !important;
  border: 1px solid var(--border-light) !important;
  border-radius: 16px !important;
  z-index: 1020 !important;
  padding: 1rem !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6) !important;
  height: 100% !important;
  max-height: 100% !important;
}

.mobile-view .live-right-col.active {
  display: flex !important;
  flex-direction: column !important;
}

.mobile-view .live-right-col .chat-card-rigid {
  height: 100% !important;
  max-height: 100% !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
}

.mobile-view .live-overlay-close-btn {
  display: block !important;
}

/* Compact Whistle Timer Circle */
.mobile-view .timer-canvas-box {
  width: 150px !important;
  height: 150px !important;
  margin-bottom: 0.5rem !important;
}

.mobile-view #timer-progress-canvas {
  width: 150px !important;
  height: 150px !important;
}

.mobile-view .timer-numbers {
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
}

.mobile-view .timer-time {
  font-size: 1.8rem !important;
  line-height: 1.2 !important;
}

.mobile-view .timer-label {
  font-size: 0.6rem !important;
}

/* Compact layout panels in live card */
.mobile-view #live-prep-drill-instructions,
.mobile-view #live-prep-drill-distribution {
  max-height: 100px !important;
  overflow-y: auto !important;
}

.mobile-view .stat-counter-box {
  padding: 0.4rem !important;
  gap: 0.75rem !important;
}

.mobile-view .counter-value {
  font-size: 1.5rem !important;
}

/* Compact segment indicator timeline */
#live-compact-progress {
  display: none;
}

.mobile-view #live-compact-progress {
  display: flex !important;
}

.live-compact-step {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background-color: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.live-compact-step.completed {
  background-color: var(--success-green);
}

.live-compact-step.active {
  background-color: var(--accent-orange);
  box-shadow: 0 0 6px var(--accent-orange-glow);
}

.live-compact-step.upcoming {
  background-color: rgba(255, 255, 255, 0.15);
}

/* 5. General Modals & Onboarding overlays */
.mobile-view .modal-overlay {
  align-items: flex-start !important;
  overflow-y: auto !important;
  padding: 2rem 0 !important;
}

.mobile-view .modal-card {
  width: 92% !important;
  max-width: 92% !important;
  padding: 1.25rem !important;
  border-radius: 16px;
  max-height: none !important;
  display: block !important;
}

.mobile-view #profile-settings-modal .modal-card form,
.mobile-view #add-player-modal .modal-card form {
  overflow-y: visible !important;
  max-height: none !important;
  padding-right: 0 !important;
  margin-right: 0 !important;
}

.mobile-view .onboarding-card {
  padding: 1.5rem !important;
  width: 95% !important;
  max-width: 95% !important;
}

.mobile-view .modal-card button,
.mobile-view .modal-card .btn {
  white-space: normal !important;
  word-break: break-word !important;
}

.mobile-view .modal-card div[style*="display: flex"] {
  flex-wrap: wrap !important;
}

/* Stack flex rows and grid layouts inside modals on mobile to prevent expanding to computer layout */
.mobile-view .modal-card div[style*="display: flex"]:not(#quick-add-duration-chips),
.mobile-view .modal-card div[style*="display:flex"]:not(#quick-add-duration-chips) {
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0.75rem !important;
}

.mobile-view .modal-card div[style*="display: flex"]:not(#quick-add-duration-chips) > *,
.mobile-view .modal-card div[style*="display:flex"]:not(#quick-add-duration-chips) > * {
  width: 100% !important;
  max-width: 100% !important;
  flex: none !important;
}

.mobile-view .modal-card div[style*="display: grid"]:not(#quick-add-duration-chips),
.mobile-view .modal-card div[style*="display:grid"]:not(#quick-add-duration-chips) {
  grid-template-columns: 1fr !important;
  gap: 0.75rem !important;
}

.mobile-view .modal-card div[style*="display: grid"]:not(#quick-add-duration-chips) > *,
.mobile-view .modal-card div[style*="display:grid"]:not(#quick-add-duration-chips) > * {
  width: 100% !important;
  max-width: 100% !important;
}

.mobile-view #quick-add-presets-wrapper > div {
  grid-template-columns: 1fr !important;
}

/* 6. Homepage: Upcoming event cards mobile layout */
.mobile-view .upcoming-event-bar {
  flex-direction: column !important;
  height: auto !important;
  align-items: stretch !important;
  padding: 0.75rem !important;
  gap: 0.5rem !important;
}

.mobile-view .upcoming-event-bar .day-counter {
  width: auto !important;
  height: auto !important;
  padding: 0.25rem 0.5rem !important;
  border-radius: 4px !important;
  align-self: flex-start !important;
  font-size: 0.75rem !important;
}

.mobile-view .upcoming-event-bar .event-name {
  padding-left: 0 !important;
  font-size: 0.85rem !important;
  margin-bottom: 0.25rem !important;
}

.mobile-view .upcoming-event-bar > div[style*="display: flex"] {
  margin-right: 0 !important;
  width: 100% !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.4rem !important;
  justify-content: flex-start !important;
}

.mobile-view .upcoming-event-bar button {
  flex: 1 1 auto !important;
  font-size: 0.7rem !important;
  padding: 0.35rem 0.5rem !important;
  margin: 0 !important;
}

/* 7. Tryout Evaluator mobile layout overrides */
.mobile-view #tryout-candidates-grid {
  grid-template-columns: 1fr !important;
}

.mobile-view #tryout-candidates-grid .col-12 {
  grid-column: 1 / -1 !important;
}

.mobile-view div:has(> .tryout-filter-btn) {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 0.4rem !important;
  width: 100% !important;
}

.mobile-view .tryout-filter-btn {
  width: 100% !important;
  padding: 0.4rem 0.2rem !important;
  font-size: 0.7rem !important;
  white-space: normal !important;
  text-align: center !important;
}

.mobile-view #view-tryouts .glass-card:first-of-type {
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 1rem !important;
}

.mobile-view #view-tryouts .glass-card:first-of-type > div:last-child {
  width: 100% !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.5rem !important;
  justify-content: stretch !important;
}

.mobile-view #view-tryouts .glass-card:first-of-type > div:last-child button {
  flex: 1 1 auto !important;
  margin: 0 !important;
}

/* 8. Practice Planner (Drill Framework Builder) mobile layout overrides */
.mobile-view #view-planner .col-8.glass-card > div:first-child {
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0.75rem !important;
}

.mobile-view #view-planner .col-8.glass-card > div:first-child > div:last-child {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
}

.mobile-view div:has(> #planner-practice-select) {
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0.4rem !important;
}

.mobile-view #view-planner .col-8.glass-card > div:last-child {
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0.75rem !important;
}

.mobile-view #view-planner .col-8.glass-card > div:last-child > div:last-child {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.5rem !important;
  justify-content: center !important;
  width: 100% !important;
}

.mobile-view #view-planner .col-8.glass-card > div:last-child > div:last-child button {
  flex: 1 1 auto !important;
  font-size: 0.75rem !important;
  padding: 0.4rem 0.6rem !important;
  margin: 0 !important;
}

/* 9. Roster Database (Team Management) top controls */
.mobile-view .team-top-tabs-wrapper {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 0.5rem !important;
  margin-bottom: 1rem !important;
}

.mobile-view #team-archive-btn {
  grid-column: span 2 !important;
}

.mobile-view .team-top-tabs-wrapper button {
  font-size: 0.75rem !important;
  padding: 0.5rem 0.25rem !important;
  margin: 0 !important;
}

/* 10. Roster Database Card Title Unstacking */
.mobile-view #view-team .col-5.glass-card > div:first-child {
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0.75rem !important;
}

.mobile-view #view-team .col-5.glass-card > div:first-child h2 {
  font-size: 1.25rem !important;
  text-align: center !important;
  white-space: nowrap !important;
}

.mobile-view #view-team .col-5.glass-card > div:first-child button {
  width: 100% !important;
  padding: 0.5rem !important;
}

/* ==========================================================================
   ATHLETIC SPORTS LAYOUT OVERLAYS & CONTROLS
   ========================================================================== */

/* 1. BUTTONS, BADGES, AND NAVIGATION ITEMS (UNSKEWED, SPACED OUT) */
.btn, .comm-btn-action, .event-type-pill, .status-pill, .nav-item {
  transition: transform var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
  letter-spacing: 0.08em; /* Premium spaced look */
  text-transform: uppercase;
}

.btn:hover, .comm-btn-action:hover {
  transform: translateY(-2px);
  box-shadow: -4px 4px 0px var(--accent-orange); /* Hard athletic shadow accent */
}

/* 2. COURT PATTERN GRID OVERLAYS */
.glass-card {
  background-color: var(--bg-secondary) !important;
  background-image: 
    linear-gradient(180deg, rgba(255, 110, 0, 0.03) 0%, transparent 100%) !important;
  background-size: 100% 100% !important;
  border: 1px solid var(--border-light) !important;
  border-top: 3px solid var(--accent-orange) !important; /* Top "Racing Stripe" detail */
  border-radius: 4px !important; /* Harder corners for a technical scoreboard feel */
}

/* 3. JERSEY NUMBER WATERMARK FOR ROSTER CARDS */
.athlete-scorecard {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}

/* Watermark backing effect */
.athlete-scorecard::after {
  content: "#";
  position: absolute;
  right: -5px;
  bottom: -20px;
  font-family: var(--font-sporty);
  font-size: 5rem;
  color: rgba(255, 110, 0, 0.03);
  z-index: 1;
  pointer-events: none;
}

/* 4. HIGH-DENSITY SCOREBOARD HEADERS & TITLES */
.section-title, .view-title, .card-title {
  font-family: var(--font-sporty);
  letter-spacing: 0.12em !important; /* Spacious display look */
  text-transform: uppercase;
  color: var(--accent-amber);
}

.section-title {
  font-size: 1.6rem;
  border-bottom: 2px solid var(--accent-orange);
  padding-bottom: 0.25rem;
  display: inline-flex;
}

/* 5. TIGHT LABELS & TEAM HEADER METRICS */
label, .comm-label-tag, .scoreboard-team-label {
  font-family: var(--font-labels) !important;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.1em !important; /* Distinctly spaced labels */
  color: var(--text-secondary);
}

/* Custom Google SSO Masked Button styling */
.google-sso-wrapper {
  position: relative;
  width: 100%;
  height: 40px;
  overflow: hidden;
  border-radius: 8px;
}

.google-sso-wrapper .btn {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
  transition: all var(--transition-fast);
}

.google-sso-wrapper:hover .btn {
  background-color: rgba(255, 255, 255, 0.08) !important;
  transform: translateY(-1px);
}

.google-sso-wrapper:active .btn {
  transform: translateY(1px);
}

.google-sso-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.001;
  z-index: 2;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Visual Timeline Substitution Planner */
.sub-timeline-quarter {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.sub-timeline-axis {
  display: flex;
  justify-content: space-between;
  padding-left: 53px; /* Offset for position labels */
  padding-right: 0;
  margin-bottom: 2px;
}

.sub-timeline-axis-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 0;
  overflow: visible;
  white-space: nowrap;
  font-size: 0.65rem;
  color: var(--text-secondary);
}

.sub-timeline-axis-tick {
  height: 4px;
  width: 1px;
  background-color: rgba(255, 255, 255, 0.25);
  margin-top: 2px;
}

.sub-timeline-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.sub-timeline-label {
  width: 45px;
  text-align: right;
  font-weight: bold;
  font-size: 0.75rem;
  color: var(--accent-orange);
  text-transform: uppercase;
}

.sub-timeline-track {
  flex: 1;
  display: flex;
  gap: 4px;
  background-color: rgba(0, 0, 0, 0.15);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
}

.sub-timeline-slot-wrapper {
  position: relative;
  min-width: 0;
}

.sub-timeline-slot {
  width: 100%;
  height: 36px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  text-align-last: center;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Styled empty slot */
.sub-timeline-slot:not(.has-player) {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  color: var(--text-secondary);
}

.sub-timeline-slot:not(.has-player):hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Styled slot with player */
.sub-timeline-slot.has-player {
  background-color: rgba(255, 110, 0, 0.12);
  border: 1px solid var(--accent-orange-glow);
  color: #fff;
}

.sub-timeline-slot.has-player:hover {
  background-color: rgba(255, 110, 0, 0.2);
  border-color: var(--accent-orange);
  box-shadow: 0 0 8px rgba(255, 110, 0, 0.3);
}






