/* ============================================
   FLUSHED.AI — Shadcn Admin × Green Theme
   Dark zinc backgrounds + green-500 accent
   Font: Plus Jakarta Sans
   ============================================ */

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

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */
:root {
  /* Dark zinc backgrounds — Shadcn style */
  --bg-primary:   #09090b;   /* zinc-950 */
  --bg-secondary: #18181b;   /* zinc-900 */
  --bg-tertiary:  #27272a;   /* zinc-800 */
  --bg-card:      #1c1c1f;   /* between 900 and 950 */

  /* Green accent system */
  --accent-primary:   #22c55e;  /* green-500 */
  --accent-secondary: #16a34a;  /* green-600 */
  --accent-muted:     #166534;  /* green-800 subtle bg */
  --accent-coral:     #f97066;  /* approach color */
  --accent-blue:      #60a5fa;  /* soft blue for info */
  --accent-amber:     #eab308;  /* stars/amber */

  /* Category colors */
  --cat-driving:    #3b82f6;
  --cat-approach:   #f97066;
  --cat-short_game: #22c55e;
  --cat-putting:    #a78bfa;

  /* Text */
  --text-primary:   #fafafa;   /* zinc-50 */
  --text-secondary: #a1a1aa;   /* zinc-400 */
  --text-muted:     #71717a;   /* zinc-500 */

  /* Borders — Shadcn style: very subtle */
  --border:       rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.14);

  /* Semantic */
  --danger:  #ef4444;
  --success: var(--accent-primary);

  /* Sizing — Shadcn: tighter, less bubbly */
  --header-h: 56px;
  --nav-h:    58px;
  --safe-top: 54px;
  --safe-bottom: 20px;
  --radius:    8px;
  --radius-sm: 6px;
  --radius-lg: 10px;
  --radius-xl: 12px;

  /* Shadows — minimal, Shadcn almost uses none */
  --shadow-card: 0 1px 4px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 20px rgba(34,197,94,0.08);
  --shadow-up:   0 -1px 0 rgba(255,255,255,0.06);

  /* Transitions */
  --t: 0.18s cubic-bezier(0.4,0,0.2,1);
  --t-slow: 0.3s cubic-bezier(0.4,0,0.2,1);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Very faint green ambient at top */
body::after {
  content: '';
  position: fixed;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 60vw;
  height: 40vh;
  background: radial-gradient(ellipse at center, rgba(34,197,94,0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ============================================
   APP SHELL
   ============================================ */
#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background: var(--bg-primary);
  overflow: hidden;
}

/* ============================================
   HEADER — slim 50px Shadcn style
   ============================================ */
#app-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: calc(var(--header-h) + var(--safe-top));
  padding-top: var(--safe-top);
  background: rgba(9,9,11,0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: none;
  align-items: center;
  justify-content: space-between;
  padding-left: 16px;
  padding-right: 16px;
  z-index: 100;
  box-sizing: border-box;
}

#app-header.visible {
  display: flex;
}

.header-logo {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.header-logo span {
  color: var(--accent-primary);
}

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

.header-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--t);
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-primary);
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  flex-shrink: 0;
}

.header-avatar:hover {
  border-color: var(--accent-primary);
}

/* ============================================
   BOTTOM NAVIGATION — 58px clean Shadcn style
   ============================================ */
#app-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: calc(var(--nav-h) + var(--safe-bottom));
  background: rgba(9,9,11,0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: none;
  align-items: flex-start;
  justify-content: space-around;
  z-index: 100;
  padding-top: 6px;
  padding-bottom: var(--safe-bottom);
  box-sizing: border-box;
}

#app-nav.visible {
  display: flex;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  padding: 5px 14px;
  border-radius: var(--radius);
  transition: all var(--t);
  -webkit-tap-highlight-color: transparent;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  fill: var(--text-muted);
  transition: fill var(--t);
}

.nav-item span {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  transition: color var(--t);
}

.nav-item.active {
  background: rgba(34,197,94,0.08);
}

.nav-item.active svg {
  fill: var(--accent-primary);
}

.nav-item.active span {
  color: var(--accent-primary);
}

/* ============================================
   MAIN CONTENT — PAGE ISOLATION
   ============================================ */
#main-content {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
}

/* Each page is stacked, only .active is visible */
.page {
  display: none;
  position: absolute;
  top: calc(var(--header-h) + var(--safe-top));
  left: 0;
  right: 0;
  bottom: calc(var(--nav-h) + var(--safe-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* No header: pages start below the status bar using safe area */
#main-content.no-header .page {
  top: env(safe-area-inset-top, 44px);
}

#main-content.no-nav .page {
  bottom: 0;
}

#main-content.no-header.no-nav .page {
  top: 0;
  bottom: 0;
}

.page.active {
  display: block;
  animation: pageFade 0.22s ease forwards;
}

@keyframes pageFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ============================================
   LOGIN PAGE
   ============================================ */
#page-login {
  background: var(--bg-primary);
}

.login-wrap {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 40px;
}

.login-hero {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent-primary);
  line-height: 1;
  margin-bottom: 8px;
}

.login-logo span {
  color: var(--text-primary);
  font-weight: 400;
}

.login-tagline {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.5;
}

.login-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  width: 100%;
  max-width: 380px;
}

.free-slots-banner {
  background: rgba(34,197,94,0.06);
  border: 1px solid rgba(34,197,94,0.18);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.free-slots-banner svg {
  width: 14px;
  height: 14px;
  fill: var(--accent-primary);
  flex-shrink: 0;
}

.free-slots-text {
  font-size: 11px;
  color: var(--accent-primary);
  font-weight: 600;
  line-height: 1.4;
}

/* Pill toggle — Shadcn style */
.login-tabs {
  display: flex;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px;
  margin-bottom: 20px;
  gap: 2px;
}

.login-tab {
  flex: 1;
  padding: 8px 0;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: calc(var(--radius) - 2px);
  transition: all var(--t);
}

.login-tab.active {
  background: var(--accent-primary);
  color: #000;
}

.login-footer {
  margin-top: 24px;
  text-align: center;
}

.login-footer p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.8;
}

/* Forgot Password */
.forgot-link-wrap {
  text-align: center;
  margin-top: 12px;
}

.forgot-link {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--t);
}

.forgot-link:hover {
  color: var(--accent-primary);
}

.forgot-password-panel {
  animation: fadeIn 0.2s ease;
}

.forgot-header {
  margin-bottom: 16px;
}

.forgot-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  transition: color var(--t);
}

.forgot-back-btn:hover {
  color: var(--accent-primary);
}

.forgot-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 6px;
}

.forgot-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 18px;
  line-height: 1.5;
}

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

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 12px;
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
  -webkit-appearance: none;
}

.form-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.form-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(34,197,94,0.10);
}

.form-input[type="number"] {
  -moz-appearance: textfield;
}

.form-input[type="number"]::-webkit-outer-spin-button,
.form-input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

textarea.form-input {
  resize: vertical;
  min-height: 88px;
  line-height: 1.55;
}

/* ============================================
   BUTTONS — Shadcn: 6px radius, clean
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t);
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent-primary);
  color: #000;
  padding: 11px 20px;
  width: 100%;
}

.btn-primary:hover {
  background: var(--accent-secondary);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 10px 20px;
  width: 100%;
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.04);
}

.btn-ghost {
  background: transparent;
  color: var(--accent-primary);
  padding: 9px 14px;
  font-size: 13px;
}

.btn-ghost:hover {
  background: rgba(34,197,94,0.07);
}

.btn-danger {
  background: rgba(239,68,68,0.08);
  color: var(--danger);
  border: 1px solid rgba(239,68,68,0.18);
  padding: 10px 20px;
  width: 100%;
}

.btn-danger:hover {
  background: rgba(239,68,68,0.14);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 12px;
  width: auto;
  border-radius: var(--radius-sm);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============================================
   ERROR / SUCCESS MESSAGES
   ============================================ */
.error-msg {
  color: var(--danger);
  font-size: 12px;
  margin-top: 10px;
  text-align: center;
  font-weight: 500;
}

.success-msg {
  color: var(--accent-primary);
  font-size: 12px;
  margin-top: 10px;
  text-align: center;
}

/* ============================================
   ONBOARDING
   ============================================ */
#page-onboarding {
  background: var(--bg-primary);
}

.onboarding-wrap {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.onboarding-header {
  padding: 20px 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.onboarding-logo {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-primary);
  letter-spacing: -0.01em;
}

.onboarding-logo span {
  color: var(--text-primary);
  font-weight: 400;
}

.step-dots {
  display: flex;
  gap: 5px;
  align-items: center;
}

.step-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  transition: all var(--t-slow);
}

.step-dot.active {
  background: var(--accent-primary);
  width: 18px;
  border-radius: 3px;
}

.step-dot.done {
  background: var(--accent-secondary);
}

.onboarding-progress {
  height: 2px;
  background: var(--border);
  margin: 16px 0 0;
}

.onboarding-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
  border-radius: 2px;
  transition: width var(--t-slow);
}

.onboarding-step {
  flex: 1;
  padding: 24px 20px 20px;
  display: none;
  flex-direction: column;
  animation: pageFade 0.22s ease forwards;
}

.onboarding-step.active {
  display: flex;
}

.step-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.step-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.55;
  font-weight: 400;
}

.step-content {
  flex: 1;
}

.step-footer {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Weakness Ranking */
.weakness-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.weakness-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--t);
  user-select: none;
  text-align: center;
  position: relative;
  min-height: 100px;
  justify-content: center;
}

.weakness-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-tertiary);
}

.weakness-item[data-weakness="Driving"]    { --cat-color: var(--cat-driving); }
.weakness-item[data-weakness="Approach"]   { --cat-color: var(--cat-approach); }
.weakness-item[data-weakness="Short Game"] { --cat-color: var(--cat-short_game); }
.weakness-item[data-weakness="Putting"]    { --cat-color: var(--cat-putting); }

.weakness-item.ranked {
  border-color: var(--cat-color, var(--accent-primary));
  background: color-mix(in srgb, var(--cat-color, var(--accent-primary)) 8%, var(--bg-secondary));
}

.weakness-rank {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  transition: all var(--t);
}

.weakness-item.ranked .weakness-rank {
  background: var(--cat-color, var(--accent-primary));
  border-color: var(--cat-color, var(--accent-primary));
  color: #fff;
}

.weakness-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
}

.weakness-icon svg {
  width: 20px;
  height: 20px;
}

.weakness-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.weakness-hint {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 400;
}

.weakness-instruction {
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 6px;
  grid-column: 1 / -1;
}

/* Environment Cards */
.env-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.env-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all var(--t);
}

.env-card:hover {
  border-color: var(--border-hover);
}

.env-card.selected {
  border-color: var(--accent-primary);
  background: rgba(34,197,94,0.05);
}

.env-card-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.env-card-icon svg {
  width: 20px;
  height: 20px;
  fill: var(--text-secondary);
}

.env-card.selected .env-card-icon svg {
  fill: var(--accent-primary);
}

.env-card-text h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.env-card-text p {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Slider */
.slider-wrap {
  margin-bottom: 18px;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.slider-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.slider-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-primary);
  letter-spacing: -0.02em;
}

.slider-value small {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-left: 2px;
}

input[type="range"] {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 0 1px var(--accent-primary);
  cursor: pointer;
  transition: transform var(--t);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: 2px solid var(--bg-primary);
  cursor: pointer;
}

/* Toggle */
.toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: all var(--t);
  margin-bottom: 18px;
}

.toggle-wrap:hover {
  border-color: var(--border-hover);
}

.toggle-wrap-text h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.toggle-wrap-text p {
  font-size: 11px;
  color: var(--text-secondary);
}

.toggle {
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  position: relative;
  cursor: pointer;
  transition: background var(--t), border-color var(--t);
  flex-shrink: 0;
}

.toggle.on {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform var(--t), background var(--t);
}

.toggle.on::after {
  transform: translateX(18px);
  background: #000;
}

/* Ready Step */
.ready-summary {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}

.ready-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

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

.ready-row-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.ready-row-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Golf Ball Spinner */
.golf-spinner-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 20px 0;
}

.golf-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #dcfce7 0%, var(--accent-secondary) 55%, #14532d 100%);
  position: relative;
  animation: spinBall 1.2s linear infinite;
  box-shadow: 0 0 20px rgba(34,197,94,0.25);
}

.golf-spinner::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 65% 25%, rgba(255,255,255,0.12) 0%, transparent 50%);
}

.golf-spinner::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-image:
    radial-gradient(circle 2px at 30% 30%, rgba(0,0,0,0.3) 50%, transparent 51%),
    radial-gradient(circle 2px at 60% 20%, rgba(0,0,0,0.3) 50%, transparent 51%),
    radial-gradient(circle 2px at 70% 50%, rgba(0,0,0,0.3) 50%, transparent 51%),
    radial-gradient(circle 2px at 40% 65%, rgba(0,0,0,0.3) 50%, transparent 51%),
    radial-gradient(circle 2px at 20% 55%, rgba(0,0,0,0.3) 50%, transparent 51%);
}

@keyframes spinBall {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.spinner-text {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ============================================
   PAGE INNER WRAPPER
   ============================================ */
.page-inner {
  padding: 18px 16px 0;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 3px;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 18px;
  font-weight: 400;
  line-height: 1.5;
}

.page-bottom-pad {
  height: 20px;
}

/* ============================================
   DASHBOARD
   ============================================ */
.greeting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.greeting-text {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.greeting-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  font-weight: 400;
}

.greeting-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-primary);
  flex-shrink: 0;
  overflow: hidden;
}

/* Hero Handicap Card */
.hero-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34,197,94,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.hero-number {
  font-size: 48px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 6px;
}

.hero-target {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 12px;
}

.hero-target strong {
  color: var(--accent-primary);
}

.hero-progress-track {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}

.hero-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
  border-radius: 2px;
  transition: width 1s cubic-bezier(0.4,0,0.2,1);
}

/* Stats Row — 3 cards */
.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 10px;
  text-align: center;
}

.stat-label {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 2px;
  letter-spacing: -0.02em;
}

.stat-value.accent {
  color: var(--accent-primary);
}

.stat-desc {
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Section Headers */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  margin-top: 20px;
}

.section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.section-link {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-primary);
  cursor: pointer;
  transition: opacity var(--t);
}

.section-link:hover { opacity: 0.75; }

/* Today's Focus / Drill Cards on Dashboard */
.focus-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--t);
}

.focus-card:hover {
  border-color: var(--border-hover);
}

.focus-card-accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
}

.focus-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  margin-bottom: 8px;
}

.focus-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.3;
  padding-left: 10px;
}

.focus-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 10px;
  padding-left: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: left;
}

.focus-card-meta {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  padding-left: 10px;
  flex-wrap: wrap;
}

.meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  padding: 3px 8px;
  border-radius: 4px;
}

.meta-badge svg {
  width: 10px;
  height: 10px;
  fill: var(--text-muted);
}

/* Quick Actions Row */
.quick-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 0;
}

/* Activity Feed */
.activity-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  transition: border-color var(--t);
}

.activity-item:hover {
  border-color: var(--border-hover);
}

.activity-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-primary);
  flex-shrink: 0;
  opacity: 0.5;
}

.activity-content { flex: 1; min-width: 0; }

.activity-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.activity-meta {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.activity-rating {
  color: var(--accent-amber);
  font-size: 11px;
  flex-shrink: 0;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 30px 16px;
  color: var(--text-muted);
}

.empty-state p {
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 14px;
}

/* ============================================
   DRILLS PAGE
   ============================================ */
.filter-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  margin-bottom: 14px;
  scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar { display: none; }

.filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: transparent;
  transition: all var(--t);
}

.filter-tab:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.filter-tab.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #000;
}

.filter-tab[data-filter="driving"].active  { background: var(--cat-driving);    border-color: var(--cat-driving);    color: #fff; }
.filter-tab[data-filter="approach"].active { background: var(--cat-approach);   border-color: var(--cat-approach);   color: #fff; }
.filter-tab[data-filter="short_game"].active { background: var(--cat-short_game); border-color: var(--cat-short_game); color: #000; }
.filter-tab[data-filter="putting"].active  { background: var(--cat-putting);    border-color: var(--cat-putting);    color: #fff; }

.filter-tab .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

/* Drill Cards */
.drills-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 16px;
}

.drill-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--t);
  animation: slideUpCard 0.28s ease both;
  position: relative;
}

.drill-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--cat-color, var(--accent-primary));
  border-radius: 3px 0 0 3px;
}

.drill-card.driving    { --cat-color: var(--cat-driving); }
.drill-card.approach   { --cat-color: var(--cat-approach); }
.drill-card.short_game { --cat-color: var(--cat-short_game); }
.drill-card.putting    { --cat-color: var(--cat-putting); }

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

.drill-card:hover {
  border-color: var(--border-hover);
}

.drill-card-header {
  padding: 12px 14px 12px 14px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.drill-cat-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  flex-shrink: 0;
  margin-top: 2px;
}

.drill-cat-badge.driving    { background: rgba(59,130,246,0.12);  color: var(--cat-driving); }
.drill-cat-badge.approach   { background: rgba(249,112,102,0.12); color: var(--cat-approach); }
.drill-cat-badge.short_game { background: rgba(34,197,94,0.12);   color: var(--cat-short_game); }
.drill-cat-badge.putting    { background: rgba(167,139,250,0.12); color: var(--cat-putting); }

.drill-card-info {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.drill-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 5px;
  line-height: 1.3;
  text-align: left;
}

.drill-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.drill-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: 4px;
}

.drill-badge svg {
  width: 9px;
  height: 9px;
  fill: var(--text-muted);
}

.drill-expand-icon {
  width: 18px;
  height: 18px;
  fill: var(--text-muted);
  flex-shrink: 0;
  transition: transform var(--t);
  margin-top: 2px;
}

.drill-card.expanded .drill-expand-icon {
  transform: rotate(180deg);
}

.drill-card-body {
  display: none;
  padding: 0 14px 14px 14px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  text-align: left;
}

.drill-card.expanded .drill-card-body {
  display: block;
  animation: pageFade 0.18s ease forwards;
}

.drill-description {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 12px;
  font-weight: 400;
  text-align: left;
}

.drill-track-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 5px;
  text-align: left;
}

.drill-track-text {
  font-size: 12px;
  color: var(--accent-primary);
  font-weight: 600;
  margin-bottom: 14px;
  line-height: 1.5;
  text-align: left;
}

.drill-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.drill-completed-count {
  font-size: 11px;
  color: var(--text-muted);
}

.drill-completed-count span {
  color: var(--accent-primary);
  font-weight: 700;
}

/* ============================================
   SESSION LOGGER
   ============================================ */
.quick-buttons {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.quick-btn {
  flex: 1;
  padding: 9px 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all var(--t);
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.quick-btn:hover, .quick-btn.active {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: rgba(34,197,94,0.06);
}

/* Category tiles for log page */
.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 4px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--t);
  user-select: none;
}

.checkbox-item:hover { border-color: var(--border-hover); }

.checkbox-item[data-area="Driving"].checked    { border-color: var(--cat-driving);    background: rgba(59,130,246,0.06); }
.checkbox-item[data-area="Approach"].checked   { border-color: var(--cat-approach);   background: rgba(249,112,102,0.06); }
.checkbox-item[data-area="Short Game"].checked { border-color: var(--cat-short_game); background: rgba(34,197,94,0.06); }
.checkbox-item[data-area="Putting"].checked    { border-color: var(--cat-putting);    background: rgba(167,139,250,0.06); }

.checkbox-box {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--t);
}

.checkbox-item.checked .checkbox-box {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.checkbox-box svg {
  width: 10px;
  height: 10px;
  fill: #000;
  opacity: 0;
}

.checkbox-item.checked .checkbox-box svg { opacity: 1; }

.checkbox-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Star Rating */
.star-rating {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}

.star {
  width: 32px;
  height: 32px;
  cursor: pointer;
  transition: transform var(--t);
}

.star svg {
  width: 32px;
  height: 32px;
  fill: var(--bg-tertiary);
  stroke: var(--border);
  stroke-width: 1;
  transition: fill var(--t);
}

.star:hover, .star.active { transform: scale(1.08); }

.star.active svg {
  fill: var(--accent-amber);
  stroke: var(--accent-amber);
}

/* Session History */
.session-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 7px;
  overflow: hidden;
}

.session-item-header {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.session-date-badge {
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  text-align: center;
  flex-shrink: 0;
  min-width: 38px;
}

.session-date-day {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-primary);
  line-height: 1;
  letter-spacing: -0.02em;
}

.session-date-month {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.session-info { flex: 1; min-width: 0; }

.session-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-meta {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.session-stars {
  font-size: 11px;
  color: var(--accent-amber);
}

.session-body {
  display: none;
  padding: 0 12px 12px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.session-item.expanded .session-body { display: block; }

.session-detail-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 3px;
  margin-top: 9px;
}

.session-detail-value {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================
   PROGRESS PAGE
   ============================================ */
.progress-hero-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px 0;
  margin-bottom: 4px;
}

.progress-hero-number {
  font-size: 48px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.04em;
  line-height: 1;
}

.progress-hero-number.target {
  color: var(--accent-primary);
}

.progress-hero-arrow {
  font-size: 20px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

.progress-hero-arrow svg {
  width: 24px;
  height: 24px;
  fill: var(--accent-primary);
}

.chart-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.chart-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.chart-container {
  position: relative;
  height: 155px;
}

/* Progress Bar */
.progress-goal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.progress-goal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 12px;
}

.progress-goal-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.progress-goal-values {
  display: flex;
  gap: 8px;
  align-items: center;
}

.progress-current {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.progress-arrow {
  color: var(--accent-primary);
  font-size: 14px;
  font-weight: 700;
}

.progress-target {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-primary);
  letter-spacing: -0.02em;
}

.progress-bar-track {
  height: 6px;
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 7px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
  border-radius: 3px;
  transition: width 0.9s cubic-bezier(0.4,0,0.2,1);
}

.progress-bar-label {
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
  font-weight: 500;
}

/* Big Stats Row */
.big-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 7px;
  margin-bottom: 14px;
}

.big-stat {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 8px;
  text-align: center;
}

.big-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 3px;
  letter-spacing: -0.02em;
  line-height: 1;
}

.big-stat-label {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.4;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.18s ease;
}

.modal-backdrop.hidden { display: none; }

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

.modal-sheet {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-top: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 20px;
  width: 100%;
  max-width: 480px;
  animation: slideUp 0.25s cubic-bezier(0.4,0,0.2,1);
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 5px;
  letter-spacing: -0.02em;
}

.modal-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 18px;
  line-height: 1.5;
}

/* ============================================
   SETTINGS PAGE
   ============================================ */
.settings-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
}

.settings-section-title {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 14px 3px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  transition: background var(--t);
}

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

.settings-row:hover { background: rgba(255,255,255,0.02); }

.settings-row-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.settings-row-value {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  text-align: right;
}

.settings-row-value.green {
  color: var(--accent-primary);
  font-weight: 600;
}

.subscription-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.subscription-badge.free   { background: rgba(34,197,94,0.10);  color: var(--accent-primary); }
.subscription-badge.active { background: rgba(96,165,250,0.10);  color: var(--accent-blue); }
.subscription-badge.none   { background: rgba(234,179,8,0.10);   color: var(--accent-amber); }

/* Settings — Editable Input Rows */
.settings-input-row {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.settings-input-row:last-of-type {
  border-bottom: none;
}

.settings-input-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input-sm {
  padding: 8px 10px;
  font-size: 13px;
}

.settings-section-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.55;
  padding: 2px 14px 10px;
  margin: 0;
}

/* Upload Zone */
.upload-zone {
  margin: 0 14px 14px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--t), background var(--t);
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--accent-primary);
  background: rgba(34,197,94,0.04);
}

.upload-icon {
  width: 32px;
  height: 32px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.upload-zone:hover .upload-icon,
.upload-zone.drag-over .upload-icon {
  color: var(--accent-primary);
}

.upload-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.upload-subtext {
  font-size: 11px;
  color: var(--text-muted);
}

/* Upload Preview */
#upload-preview-wrap {
  padding: 0 14px 14px;
}

.upload-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.gallery-thumb {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 1;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(9,9,11,0.8);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background var(--t), color var(--t);
  padding: 0;
}

.gallery-remove-btn:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.gallery-thumb-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(9,9,11,0.75);
  font-size: 9px;
  color: var(--text-secondary);
  padding: 3px 5px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.upload-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}

/* Analysis Results Card */
.analysis-card {
  margin: 10px 14px 14px;
  background: rgba(34,197,94,0.04);
  border: 1px solid rgba(34,197,94,0.18);
  border-radius: var(--radius);
  padding: 14px;
}

.analysis-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.analysis-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-primary);
}

.analysis-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid rgba(34,197,94,0.08);
}

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

.analysis-row-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.analysis-row-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.analysis-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 0 4px;
}

.analysis-weakness-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  margin: 2px 3px 2px 0;
}

.analysis-weakness-tag.high {
  background: rgba(239,68,68,0.12);
  color: #ef4444;
}

.analysis-weakness-tag.medium {
  background: rgba(234,179,8,0.12);
  color: #eab308;
}

.analysis-weakness-tag.low {
  background: rgba(34,197,94,0.12);
  color: var(--accent-primary);
}

/* Gate overlay for gated drills */
.gate-overlay {
  position: absolute;
  inset: 0;
  background: rgba(9,9,11,0.88);
  backdrop-filter: blur(4px);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  z-index: 10;
}

.gate-overlay-icon   { font-size: 26px; margin-bottom: 8px; }
.gate-overlay-title  { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 5px; }
.gate-overlay-sub    { font-size: 11px; color: var(--text-secondary); line-height: 1.5; }

/* Celebration Banner */
.celebration-banner {
  background: linear-gradient(135deg, rgba(34,197,94,0.08), rgba(22,163,74,0.12));
  border: 1px solid rgba(34,197,94,0.22);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  margin-bottom: 16px;
  animation: celebPop 0.35s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes celebPop {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.celebration-emoji { font-size: 24px; margin-bottom: 6px; }

.celebration-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.celebration-sub {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Toast */
.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 18px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  z-index: 300;
  opacity: 0;
  transition: all 0.24s cubic-bezier(0.4,0,0.2,1);
  max-width: 300px;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  border-color: rgba(34,197,94,0.28);
  background: rgba(34,197,94,0.08);
  color: var(--accent-primary);
}

/* Loading Spinner (inline) */
.loading-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(34,197,94,0.2);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  vertical-align: middle;
}

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

/* ============================================
   DESKTOP SHADOW
   ============================================ */
@media (min-width: 480px) {
  #app {
    box-shadow: 0 0 60px rgba(0,0,0,0.6);
  }
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar          { width: 3px; height: 3px; }
::-webkit-scrollbar-track    { background: transparent; }
::-webkit-scrollbar-thumb    { background: var(--border); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============================================
   STAGGER ANIMATIONS
   ============================================ */
.drill-card:nth-child(1) { animation-delay: 0ms; }
.drill-card:nth-child(2) { animation-delay: 40ms; }
.drill-card:nth-child(3) { animation-delay: 80ms; }
.drill-card:nth-child(4) { animation-delay: 120ms; }
.drill-card:nth-child(5) { animation-delay: 160ms; }
.drill-card:nth-child(6) { animation-delay: 200ms; }
.drill-card:nth-child(7) { animation-delay: 240ms; }
.drill-card:nth-child(8) { animation-delay: 280ms; }

/* ============================================================
   ADMIN PANEL STYLES
   ============================================================ */

/* Stats Grid */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.admin-stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 12px;
  text-align: center;
  transition: border-color 0.2s;
}
.admin-stat-card:hover {
  border-color: var(--accent-primary);
}
.admin-stat-icon {
  font-size: 20px;
  margin-bottom: 6px;
}
.admin-stat-value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.admin-stat-label {
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

/* User Cards */
.admin-user-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.admin-user-card:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.15);
}
.admin-user-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.admin-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), #059669);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.admin-user-info {
  flex: 1;
  min-width: 0;
}
.admin-user-name {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-user-order {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 12px;
  margin-left: 4px;
}
.admin-user-email {
  color: var(--text-secondary);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-user-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

/* Status Badges */
.admin-status-badge {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.badge-free { background: rgba(16,185,129,0.12); color: var(--accent-primary); }
.badge-paid { background: rgba(96,165,250,0.12); color: #60a5fa; }
.badge-unpaid { background: rgba(251,191,36,0.12); color: #fbbf24; }

/* Trend Badges */
.admin-trend-badge {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.trend-improving { background: rgba(16,185,129,0.12); color: #10b981; }
.trend-declining { background: rgba(239,68,68,0.12); color: #ef4444; }
.trend-steady { background: rgba(156,163,175,0.12); color: #9ca3af; }
.trend-none { background: rgba(156,163,175,0.08); color: var(--text-muted); }

/* Metrics Row */
.admin-user-metrics {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.admin-metric {
  text-align: center;
}
.admin-metric-value {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.01em;
}
.admin-metric-label {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  margin-top: 2px;
}

/* Category Breakdown */
.admin-user-categories {
  padding-top: 12px;
}
.admin-section-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  margin-bottom: 8px;
}
.admin-cat-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.admin-cat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.admin-cat-bar-track {
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  overflow: hidden;
}
.admin-cat-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}
.admin-cat-label {
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 600;
}
.admin-cat-label strong {
  color: var(--text-primary);
}
.admin-cat-empty {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}

/* Card Footer */
.admin-user-card-footer {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.admin-reset-btn {
  color: var(--text-secondary) !important;
  border-color: var(--border) !important;
}
.admin-reset-btn:hover {
  color: var(--danger) !important;
  border-color: var(--danger) !important;
}

/* Detail View */
.admin-empty-text {
  color: var(--text-muted);
  font-size: 13px;
}
.admin-detail-section-title {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 800;
  margin-bottom: 10px;
}
.admin-detail-grid {
  display: grid;
  gap: 8px;
}
.admin-drill-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-drill-cat {
  color: #fff;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}
.admin-drill-info {
  flex: 1;
  min-width: 0;
}
.admin-drill-title {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
}
.admin-drill-meta {
  color: var(--text-muted);
  font-size: 11px;
  margin-top: 2px;
}
.admin-session-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}
.admin-session-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.admin-session-date {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 13px;
}
.admin-session-duration {
  color: var(--text-secondary);
  font-size: 12px;
}
.admin-session-focus {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 4px;
}

/* Responsive: stack metrics on small screens */
@media (max-width: 600px) {
  .admin-user-metrics {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .admin-cat-bars {
    grid-template-columns: repeat(2, 1fr);
  }
  .admin-user-badges {
    flex-direction: row;
    gap: 4px;
  }
}

/* ============================================
   SELECT DROPDOWN — dark theme
   ============================================ */
select.form-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}
select.form-input option {
  background: var(--card-bg);
  color: var(--text-primary);
}

/* ============================================
   HAMBURGER MENU
   ============================================ */
.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hamburger-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  border-radius: 6px;
  transition: background 0.2s;
}
.hamburger-btn:hover {
  background: rgba(255,255,255,0.06);
}
.hamburger-menu {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  z-index: 999;
  padding: 8px 16px;
  transform: translateY(0);
  transition: transform 0.25s ease, opacity 0.25s ease;
  opacity: 1;
}
.hamburger-menu.hidden {
  transform: translateY(-10px);
  opacity: 0;
  pointer-events: none;
}
.hamburger-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}
.hamburger-item:hover {
  background: rgba(255,255,255,0.04);
}
.hamburger-icon {
  font-size: 22px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
}
.hamburger-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.hamburger-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* ============================================
   CLUBS PAGE
   ============================================ */
.club-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
}
.club-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.club-yardage-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.club-yardage-input {
  width: 72px !important;
  text-align: center;
}
.club-yds-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}
.btn-icon-delete {
  background: rgba(239,68,68,0.1);
  border: none;
  color: #ef4444;
  font-size: 16px;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.15s;
}
.btn-icon-delete:hover {
  background: rgba(239,68,68,0.2);
}

/* ============================================
   CLUBHOUSE PAGE
   ============================================ */
.clubhouse-tab {
  background: transparent;
  color: #71717a;
}
.clubhouse-tab.active {
  background: #22c55e;
  color: #fff;
}

/* Wager cards */
.wager-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}
.wager-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.wager-amount {
  font-size: 16px;
  font-weight: 700;
  color: #22c55e;
}
.wager-status {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.wager-status.pending { background: #422006; color: #fbbf24; }
.wager-status.open { background: #042f2e; color: #2dd4bf; }
.wager-status.active { background: #052e16; color: #22c55e; }
.wager-status.settled { background: #1e1b4b; color: #a78bfa; }
.wager-status.declined { background: #1c1917; color: #78716c; }
.wager-status.cancelled { background: #1c1917; color: #78716c; }
.wager-desc {
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}
.wager-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.wager-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.wager-actions .btn {
  font-size: 12px;
  padding: 6px 14px;
}
.wager-create-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 16px;
}
.wager-create-form input,
.wager-create-form textarea,
.wager-create-form select {
  margin-bottom: 8px;
}
.wager-opponent-results {
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 8px;
  max-height: 160px;
  overflow-y: auto;
  margin-bottom: 8px;
}
.wager-opponent-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background .15s;
}
.wager-opponent-item:hover {
  background: #27272a;
}
.wager-opponent-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #27272a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #22c55e;
  overflow: hidden;
  flex-shrink: 0;
}

.clubhouse-post-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 20px;
}
.clubhouse-post {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
}
.clubhouse-post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.clubhouse-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), #059669);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  overflow: hidden;
  flex-shrink: 0;
  font-weight: 800;
  color: #fff;
}
.clubhouse-post-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.clubhouse-post-time {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.clubhouse-course-tag {
  background: rgba(16,185,129,0.1);
  color: var(--accent-primary);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.clubhouse-post-body {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 10px;
  white-space: pre-wrap;
}
.clubhouse-post-actions {
  padding-bottom: 4px;
}
.clubhouse-replies {
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: 4px;
}
.clubhouse-reply {
  display: flex;
  gap: 10px;
  padding: 8px 0;
}
.clubhouse-reply-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  overflow: hidden;
  flex-shrink: 0;
  font-weight: 700;
  color: var(--text-secondary);
}
.clubhouse-reply-content {
  flex: 1;
  min-width: 0;
}
.clubhouse-reply-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}
.clubhouse-reply-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}
.clubhouse-reply-time {
  font-size: 10px;
  color: var(--text-muted);
}
.clubhouse-reply-body {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.clubhouse-reply-form.hidden {
  display: none;
}

/* ============================================
   COACH PAGE
   ============================================ */
.coach-messages {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0 16px;
  scroll-behavior: smooth;
}
.coach-welcome {
  text-align: center;
  padding: 40px 16px;
}
.coach-welcome-icon {
  font-size: 48px;
  margin-bottom: 12px;
}
.coach-welcome-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.coach-welcome-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 320px;
  margin: 0 auto 20px;
}
.coach-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.coach-suggestion-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}
.coach-suggestion-btn:hover {
  background: rgba(16,185,129,0.08);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}
.coach-msg {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  align-items: flex-start;
}
.coach-msg-user {
  justify-content: flex-end;
}
.coach-msg-coach {
  justify-content: flex-start;
}
.coach-msg-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(16,185,129,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.coach-msg-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.6;
}
.coach-msg-bubble.user {
  background: var(--accent-primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.coach-msg-bubble.coach {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-bottom-left-radius: 4px;
}
.coach-input-area {
  flex-shrink: 0;
  padding: 12px 0 8px;
  border-top: 1px solid var(--border);
}
.coach-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.coach-upload-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all 0.15s;
}
.coach-upload-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}
.coach-upload-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(16,185,129,0.08);
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--accent-primary);
}
.coach-upload-preview.hidden {
  display: none;
}

/* Profile Photo */
.profile-photo-wrap {
  position: relative;
  width: 88px;
  height: 88px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.profile-photo-placeholder {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(16,185,129,0.2), rgba(16,185,129,0.05));
  border: 2px solid rgba(16,185,129,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 800;
  color: var(--accent-primary);
  overflow: hidden;
}
.profile-photo-edit {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 28px;
  height: 28px;
  background: var(--accent-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  border: 2px solid var(--bg-primary);
}

/* ============================================
   STREAK BAR & LEVEL SYSTEM
   ============================================ */
#streak-bar {
  margin-bottom: 14px;
}

.streak-bar-inner {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.streak-fire {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.streak-flame {
  line-height: 1;
  display: flex;
  align-items: center;
}

.streak-count {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
}

.streak-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.streak-level {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex: 1;
  min-width: 0;
}

.level-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.level-badge.level-beginner {
  background: rgba(34,197,94,0.10);
  color: var(--accent-primary);
  border: 1px solid rgba(34,197,94,0.22);
}

.level-badge.level-intermediate {
  background: rgba(96,165,250,0.10);
  color: var(--accent-blue);
  border: 1px solid rgba(96,165,250,0.22);
}

.level-badge.level-advanced {
  background: rgba(167,139,250,0.10);
  color: #a78bfa;
  border: 1px solid rgba(167,139,250,0.22);
}

.level-progress-track {
  width: 100%;
  max-width: 140px;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}

.level-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
  border-radius: 2px;
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}

.level-progress-text {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ============================================
   DRILL DIFFICULTY BADGE
   ============================================ */
.drill-difficulty-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.drill-difficulty-badge.diff-beginner {
  background: rgba(34,197,94,0.10);
  color: var(--accent-primary);
}

.drill-difficulty-badge.diff-intermediate {
  background: rgba(96,165,250,0.10);
  color: var(--accent-blue);
}

.drill-difficulty-badge.diff-advanced {
  background: rgba(167,139,250,0.10);
  color: #a78bfa;
}

/* ============================================
   WEEKLY SUMMARY MODAL
   ============================================ */
#weekly-summary-modal .modal-sheet {
  max-height: 85vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ============================================
   MOBILE FIXES — Login & Forms
   ============================================ */
@media (max-width: 768px) {
  /* Prevent iOS Safari auto-zoom on input focus (requires >= 16px) */
  .form-input,
  .form-input-sm,
  input.form-input,
  select.form-input,
  textarea.form-input {
    font-size: 16px !important;
  }

  /* Login page: ensure scrollable when mobile keyboard opens */
  #page-login {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .login-wrap {
    min-height: auto;
    padding: 24px 16px 60px;
    justify-content: flex-start;
    padding-top: 10vh;
  }
  .login-card {
    max-width: 100%;
    padding: 20px 16px;
  }

  /* Larger touch targets for buttons */
  .btn {
    min-height: 44px;
  }
  .login-tabs .login-tab {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Prevent body scroll bounce breaking layout */
  body {
    overscroll-behavior: none;
    -webkit-text-size-adjust: 100%;
  }

  /* Ensure form inputs have proper tap area */
  .form-group {
    margin-bottom: 14px;
  }
  .form-input {
    padding: 12px 14px;
  }
}
