@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;800;900&family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Philosopher:ital,wght@0,400;0,700;1,400;1,700&family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: dark;
  --bg-dark: #07070a;
  --bg-app-shell: rgba(13, 14, 20, 0.75);
  --bg-header: rgba(10, 11, 16, 0.95);
  --bg-bottom-nav: rgba(10, 11, 16, 0.92);
  --bg-surface: rgba(18, 19, 28, 0.85);
  --bg-card: rgba(24, 26, 38, 0.65);
  --bg-card-hover: rgba(32, 35, 52, 0.85);
  --border-color: rgba(255, 255, 255, 0.12);
  --border-color-active: rgba(225, 29, 72, 0.6);
  
  --accent-primary: #e11d48; /* High-Reiatsu Bankai Crimson */
  --accent-primary-gradient: linear-gradient(135deg, #e11d48 0%, #be123c 60%, #881337 100%);
  --accent-primary-shadow: rgba(225, 29, 72, 0.35);
  --accent-primary-shadow-hover: rgba(225, 29, 72, 0.55);
  --accent-primary-hover: #f43f5e;
  --accent-success: #10b981; /* Emerald */
  --accent-success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --accent-warning: #f59e0b; /* Amber */
  --accent-danger: #ef4444; /* Rose */
  --accent-info: #38bdf8; /* Reiatsu / Quincy Azure */

  --text-main: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --bg-input: rgba(16, 18, 27, 0.75);
  --bg-input-focus: rgba(24, 26, 38, 0.95);
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 18px;
  --border-radius-xl: 24px;
  
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Bleach Light Mode Theme */
:root[data-theme="bleach-light"],
body.light-theme {
  color-scheme: light;
  --bg-dark: #f4f5f9;
  --bg-app-shell: rgba(255, 255, 255, 0.96);
  --bg-header: rgba(255, 255, 255, 0.95);
  --bg-bottom-nav: rgba(255, 255, 255, 0.95);
  --bg-surface: rgba(255, 255, 255, 0.95);
  --bg-card: rgba(241, 245, 249, 0.95);
  --bg-card-hover: rgba(226, 232, 240, 0.98);
  --border-color: rgba(15, 23, 42, 0.12);
  --border-color-active: rgba(220, 38, 38, 0.6);
  
  --accent-primary: #dc2626; /* Crimson Accent */
  --accent-primary-gradient: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  --accent-primary-shadow: rgba(220, 38, 38, 0.25);
  --accent-primary-shadow-hover: rgba(220, 38, 38, 0.4);
  --accent-primary-hover: #ef4444;
  --accent-success: #059669;
  --accent-success-gradient: linear-gradient(135deg, #059669 0%, #047857 100%);
  --accent-warning: #d97706;
  --accent-danger: #dc2626;
  --accent-info: #0284c7; /* Quincy Ice Blue */

  --text-main: #09090b; /* Deep sumi-e ink, high legibility */
  --text-secondary: #334155; /* Slate charcoal */
  --text-muted: #64748b; /* Readable muted slate */
  --bg-input: rgba(241, 245, 249, 0.9);
  --bg-input-focus: #ffffff;
  --shadow-glass: 0 8px 30px rgba(0, 0, 0, 0.08);

  --space-surface-obsidian: #f8fafc;
  --space-surface-card: rgba(255, 255, 255, 0.96);
  --space-surface-console: #ffffff;
  --space-surface-steel: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  --space-surface-steel-hover: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  --shadow-altitude-1: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-altitude-2: 0 8px 24px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-altitude-3: 0 16px 36px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-floating-crimson: 0 12px 30px -6px rgba(220, 38, 38, 0.15), 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-inset-console: inset 0 1px 3px rgba(0, 0, 0, 0.06), inset 0 0 1px rgba(0, 0, 0, 0.08);
  --specular-rim-glass: inset 0 1px 1px rgba(255, 255, 255, 0.9), inset 0 -1px 1px rgba(0, 0, 0, 0.04);
  --specular-rim-steel: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 0 rgba(0, 0, 0, 0.06);
  --border-glass-subtle: 1px solid rgba(15, 23, 42, 0.1);
  --border-glass-active: 1px solid rgba(220, 38, 38, 0.5);
}

/* Base resets */
html, body {
  color-scheme: dark;
}

body.light-theme,
html[data-theme="bleach-light"] body {
  color-scheme: light;
}

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

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background-color: var(--text-muted);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--accent-primary);
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Background grid glow effects */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.03) 0%, transparent 50%);
  z-index: -1;
  pointer-events: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.02em;
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

select {
  color-scheme: dark;
}

/* Global native select dropdown backdrop and option typography */
select option,
select optgroup,
.form-select option,
.set-input-box option,
.chart-select option,
.routine-location-select option,
.routine-sub-filter option,
.manage-checklist-goal-select option,
.weight-ctrl-input option {
  background-color: #0f172a !important; /* Dark solid backdrop to ensure light text is crisp and clear */
  color: #f8fafc !important; /* High-contrast bright readable slate/white */
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 12px;
}

select option:checked,
select option:hover,
select option:focus,
.form-select option:checked,
.set-input-box option:checked {
  background-color: #4f46e5 !important;
  color: #ffffff !important;
}

select option:disabled {
  color: #64748b !important;
  background-color: #0b1120 !important;
}

/* Bleach Light Mode Specific Contrast & Legibility Overrides */
body.light-theme::before,
html[data-theme="bleach-light"] body::before {
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(220, 38, 38, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(2, 132, 199, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(5, 150, 105, 0.03) 0%, transparent 50%);
}

body.light-theme select,
html[data-theme="bleach-light"] select {
  color-scheme: light;
}

body.light-theme select option,
body.light-theme select optgroup,
body.light-theme .form-select option,
body.light-theme .set-input-box option,
body.light-theme .chart-select option,
body.light-theme .routine-location-select option,
body.light-theme .routine-sub-filter option,
body.light-theme .manage-checklist-goal-select option,
body.light-theme .weight-ctrl-input option {
  background-color: #ffffff !important;
  color: #09090b !important;
}

body.light-theme select option:checked,
body.light-theme select option:hover,
body.light-theme select option:focus,
body.light-theme .form-select option:checked,
body.light-theme .set-input-box option:checked {
  background-color: #dc2626 !important;
  color: #ffffff !important;
}

body.light-theme select option:disabled {
  color: #94a3b8 !important;
  background-color: #f1f5f9 !important;
}

body.light-theme .glass-panel {
  background: var(--bg-surface);
  border-color: var(--border-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

body.light-theme .modal-overlay {
  background: rgba(15, 23, 42, 0.45);
}

body.light-theme .modal-content {
  background: #ffffff !important;
  color: #09090b !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18) !important;
}

body.light-theme .modal-header h3,
body.light-theme .modal-header h4,
body.light-theme .modal-body h2,
body.light-theme .modal-body h3,
body.light-theme .modal-body h4 {
  color: #09090b;
}

body.light-theme .form-input,
body.light-theme .form-select,
body.light-theme textarea {
  background: rgba(241, 245, 249, 0.85);
  color: #09090b;
  border: 1px solid rgba(15, 23, 42, 0.15);
}

body.light-theme .form-input:focus,
body.light-theme .form-select:focus,
body.light-theme textarea:focus {
  background: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

body.light-theme .btn-secondary {
  background: rgba(241, 245, 249, 0.95);
  color: #1e293b;
  border: 1px solid rgba(15, 23, 42, 0.15);
}

body.light-theme .btn-secondary:hover {
  background: #e2e8f0;
  color: #09090b;
}

body.light-theme .btn-circle {
  background: rgba(241, 245, 249, 0.9);
  color: #334155;
  border: 1px solid rgba(15, 23, 42, 0.15);
}

body.light-theme .btn-circle:hover {
  background: #e2e8f0;
  color: #09090b;
}

body.light-theme .metallic-pin {
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid rgba(15, 23, 42, 0.15);
  color: #334155;
}

body.light-theme .metallic-pin:hover {
  background: #e2e8f0;
  color: #09090b;
}

body.light-theme .bottom-nav {
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

body.light-theme .nav-item {
  color: #64748b;
}

body.light-theme .nav-item.active {
  color: var(--accent-primary);
}

body.light-theme .dashboard-sub-nav,
body.light-theme .profile-sub-nav,
body.light-theme .manage-sub-nav {
  background: rgba(241, 245, 249, 0.95) !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

body.light-theme .sub-nav-item {
  color: #475569 !important;
}

body.light-theme .sub-nav-item:hover {
  color: #09090b !important;
  background: rgba(226, 232, 240, 0.9) !important;
}

body.light-theme .sub-nav-item.active {
  color: #ffffff !important;
  background: var(--accent-primary-gradient, linear-gradient(135deg, #dc2626 0%, #b91c1c 100%)) !important;
  box-shadow: 0 4px 12px var(--accent-primary-shadow, rgba(220, 38, 38, 0.25)) !important;
}

/* Light Mode Card Surfaces & Spatial Depth Elevators */
body.light-theme .antigravity-card,
body.light-theme .profile-card.glass-panel {
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .antigravity-card:hover,
body.light-theme .profile-card.glass-panel:hover {
  border-color: rgba(220, 38, 38, 0.3) !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08), 0 0 16px rgba(220, 38, 38, 0.1) !important;
}

body.light-theme .ai-ea-card {
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06), 0 0 15px rgba(220, 38, 38, 0.06) !important;
}

body.light-theme .ai-ea-card:hover {
  border-color: rgba(220, 38, 38, 0.4) !important;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.08), 0 0 20px rgba(220, 38, 38, 0.12) !important;
}

body.light-theme #ai-ea-toggle-btn {
  background: rgba(15, 23, 42, 0.06) !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  color: #09090b !important;
}

body.light-theme #ai-ea-guide-btn,
body.light-theme #ai-ea-settings-btn,
body.light-theme #ai-ea-body-toggle-btn {
  background: rgba(15, 23, 42, 0.06) !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  color: #334155 !important;
}

body.light-theme #ai-ea-briefing-container {
  background: rgba(241, 245, 249, 0.9) !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
}

body.light-theme .vea-action-btn-card {
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.1);
  color: #1e293b;
}

body.light-theme .vea-action-btn-card:hover {
  background: rgba(15, 23, 42, 0.08);
  color: #09090b;
}

body.light-theme .vea-action-btn-card.highlight-red {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.25);
  color: #dc2626;
}

body.light-theme .vea-action-btn-card.highlight-blue {
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.25);
  color: #0284c7;
}

body.light-theme .vea-action-btn-card.highlight-amber {
  background: rgba(217, 119, 6, 0.08);
  border-color: rgba(217, 119, 6, 0.25);
  color: #d97706;
}

body.light-theme .vea-action-btn-card.highlight-emerald {
  background: rgba(5, 150, 105, 0.08);
  border-color: rgba(5, 150, 105, 0.25);
  color: #059669;
}

body.light-theme .vea-filter-pill {
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(15, 23, 42, 0.12);
  color: #475569;
}

body.light-theme .vea-filter-pill.active {
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.4);
  color: #dc2626;
}

body.light-theme .ai-ea-alert-card {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.1);
}

body.light-theme .btn-glass-icon {
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(15, 23, 42, 0.12);
  color: #475569;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

body.light-theme .btn-glass-icon svg,
body.light-theme .btn-glass-icon i {
  stroke: #475569;
}

body.light-theme .btn-glass-icon:hover {
  background: rgba(15, 23, 42, 0.1);
  border-color: rgba(220, 38, 38, 0.4);
  color: #dc2626;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body.light-theme .btn-glass-icon:hover svg,
body.light-theme .btn-glass-icon:hover i {
  stroke: #dc2626;
}

body.light-theme .tracker-console-card {
  background: #f8fafc !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-top: 1px solid rgba(220, 38, 38, 0.25) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

body.light-theme .dome-button.dome-past,
body.light-theme .dome-button.dome-future,
body.light-theme .dome-button.dome-inactive {
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.1);
  color: #475569;
}

body.light-theme .consistency-milestone-progress-bar-wrap {
  background: rgba(241, 245, 249, 0.9);
  border-color: rgba(245, 158, 11, 0.3);
}

body.light-theme .consistency-milestone-progress-bar-wrap:hover {
  background: rgba(226, 232, 240, 0.95);
}

body.light-theme .metadata-pill-badge {
  background: rgba(15, 23, 42, 0.05);
  border-color: rgba(15, 23, 42, 0.12);
  color: #334155;
}

body.light-theme .metadata-pill-badge.badge-primary-glow {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.25);
  color: #09090b;
}

body.light-theme .set-row {
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

body.light-theme .set-input-box {
  background: rgba(241, 245, 249, 0.85);
  color: #09090b;
  border: 1px solid rgba(15, 23, 42, 0.15);
}

/* App container */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  padding-bottom: 90px; /* Space for bottom nav and minimized overlay */
  background: var(--bg-app-shell, rgba(7, 9, 19, 0.5));
  box-shadow: 0 0 100px rgba(0, 0, 0, 0.8);
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  transition: background 0.3s ease;
}

/* Header style */
header {
  padding: 20px 24px 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  background: var(--bg-header, rgba(7, 9, 19, 0.95));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 500;
  transition: background 0.3s ease;
}

header.app-top-header {
  position: sticky;
  top: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  padding: 8px 12px;
  background: var(--bg-header, rgba(7, 9, 19, 0.95));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-sizing: border-box;
  width: 100%;
}

.header-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.brand-text-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.0;
  text-align: center;
  white-space: nowrap;
  flex-shrink: 0;
  gap: 2.5px;
}

.rpg-top-bar {
  position: relative;
  z-index: 5;
}

.brand,
.landing-brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.brand:hover,
.landing-brand-lockup:hover {
  transform: translateY(-1px);
}

.brand:active,
.landing-brand-lockup:active {
  transform: translateY(0) scale(0.98);
}

.brand-logo {
  width: 34px;
  height: 34px;
  background: radial-gradient(circle at 50% 30%, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.15);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}

.brand:hover .brand-logo,
.landing-brand-lockup:hover .brand-logo {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 10px rgba(245, 158, 11, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.25);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.brand-logo svg {
  color: white;
}

.brand-title-fitness {
  font-family: var(--font-heading, 'Inter', system-ui, sans-serif);
  font-size: 15.5px;
  font-weight: 900;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  line-height: 1.0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4.5px;
}

.brand-title-fitness .brand-word-fitness {
  display: inline-flex;
  align-items: center;
}

.brand-title-fitness .brand-fit {
  color: #ffffff;
}

.brand-title-fitness .brand-ness {
  color: #e0e7ff;
}

.brand-title-fitness .brand-god {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.45);
}

.brand-sub-quest,
.brand-sub-godquest {
  font-family: var(--font-heading, 'Inter', system-ui, sans-serif);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  text-transform: uppercase;
  color: #f59e0b;
  line-height: 1.0;
  display: block;
  width: 100%;
  text-align: center;
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(120deg, #ffffff 40%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.streak-counter {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(239, 68, 68, 0.25));
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 800;
  transition: all 0.25s ease;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
  user-select: none;
}

.streak-counter i,
.streak-counter svg {
  color: #f59e0b;
  filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.8));
  animation: flame-pulse 2s infinite ease-in-out;
}

.streak-counter:hover {
  transform: translateY(-1px) scale(1.06);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(239, 68, 68, 0.4));
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.4);
  color: #ffffff;
}

@keyframes flame-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.8)); }
  50% { transform: scale(1.15); filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.9)); }
}

.weekly-day-bubble {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.weekly-day-bubble.active {
  background: linear-gradient(135deg, #6366f1, #f59e0b);
  border-color: #f59e0b;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

/* Glass panel */
.glass-panel {
  background: var(--bg-surface);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-glass);
}

/* Views & Navigation */
main {
  padding: 16px 20px;
  flex: 1;
}

.view-container {
  display: none;
  animation: fadeIn var(--transition-normal);
  width: 100%;
  box-sizing: border-box;
}

.view-container.active {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

/* Bottom Nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 600px;
  height: 72px;
  background: var(--bg-bottom-nav, rgba(7, 9, 19, 0.88));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  transition: background 0.3s ease;
  z-index: 500;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
  padding: 8px 12px;
  border-radius: var(--border-radius-md);
  flex: 1;
}

.nav-item:hover {
  color: var(--text-main);
}

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

.nav-item svg {
  width: 22px;
  height: 22px;
  transition: transform var(--transition-fast);
}

.nav-item.active svg {
  transform: translateY(-2px);
  filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.5));
}

.nav-item span {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--border-radius-md);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-normal);
  text-align: center;
}

.btn-primary {
  background: var(--accent-primary-gradient);
  color: white;
  box-shadow: 0 4px 15px var(--accent-primary-shadow, rgba(99, 102, 241, 0.3));
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--accent-primary-shadow-hover, rgba(99, 102, 241, 0.45));
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-muted);
}

.btn-success {
  background: var(--accent-success-gradient);
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--accent-danger);
}

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

.btn-google {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
}

.btn-google:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
  color: #ffffff;
}

.btn-google:active {
  transform: translateY(0);
  background: rgba(255, 255, 255, 0.08);
}

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

.auth-divider-line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.auth-divider-text {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
}

.btn-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: var(--transition-fast);
}

.btn-circle:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}

.btn-block {
  width: 100%;
}

/* SECTION HEADERS */
.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title svg {
  color: var(--accent-primary);
}

/* PROFILE VIEW */
.profile-card {
  padding: 20px;
  margin-bottom: 20px;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.profile-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5 0%, #a855f7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  border: 2px solid var(--border-color);
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.profile-info h3 {
  font-size: 20px;
  font-weight: 700;
}

.profile-info p {
  color: var(--text-secondary);
  font-size: 13px;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
  margin-bottom: 16px;
  padding: 0;
}

#view-profile .profile-stats-grid {
  grid-template-columns: repeat(2, 1fr);
}

.profile-stat-box {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.profile-stat-box:hover {
  transform: translateY(-2px);
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(239, 68, 68, 0.35);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 12px rgba(239, 68, 68, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.stat-label {
  font-family: 'JetBrains Mono', 'Inter', monospace;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Streaks calendar helper */
.streaks-calendar-wrapper {
  margin-top: 20px;
  padding: 16px;
  background: rgba(30, 41, 59, 0.2);
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
}

.calendar-header {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
}

.calendar-days {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.calendar-day-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.calendar-day-dot span {
  font-size: 10px;
  color: var(--text-muted);
}

.dot-indicator {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition-normal);
}

.dot-indicator.completed {
  background: var(--accent-success-gradient);
  border-color: transparent;
  color: white;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.dot-indicator.missed {
  border-color: var(--border-color);
}

/* Measurements progress chart */
.chart-container {
  padding: 16px;
  margin-bottom: 20px;
  position: relative;
}

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

.chart-select {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
}

.svg-chart {
  width: 100%;
  height: 150px;
}

.inline-unit-toggle {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 2px;
  gap: 2px;
  user-select: none;
}

.unit-toggle-btn {
  padding: 2px 8px;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast, 0.15s ease);
}

.unit-toggle-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.unit-toggle-btn.active {
  background: var(--accent-primary, #6366f1);
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.chart-onboarding-placeholder {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px 16px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px dashed var(--border-color);
  border-radius: var(--border-radius-md);
  min-height: 160px;
  overflow: hidden;
}

.chart-onboarding-ghost-svg {
  width: 100%;
  max-width: 320px;
  height: 55px;
  margin-bottom: 10px;
  opacity: 0.65;
}

.physique-analytics-card {
  display: flex !important;
  flex-direction: column !important;
  padding: 1.5rem !important; /* 24px (p-6) */
  box-sizing: border-box;
}

/* Eliminate nested framing box when collapsible body is inside a glass-panel / physique-analytics-card */
body.adventurer-theme .glass-panel .onboard-collapsible-body,
body.cultivator-theme .glass-panel .onboard-collapsible-body,
body.player-theme .glass-panel .onboard-collapsible-body,
.glass-panel .onboard-collapsible-body,
.physique-analytics-card .onboard-collapsible-body {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.analytics-chart-wrapper {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-top: 4px;
}

.chart-trend-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 18px;
  font-size: 11.5px;
  color: var(--text-secondary, #94a3b8);
  margin-top: 14px;
  padding-bottom: 2px;
  flex-wrap: wrap;
}

.chart-trend-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}


.social-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 16px;
}

.social-tab-btn {
  padding: 10px 16px;
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition-fast);
}

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

.social-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.social-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.social-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.social-item .btn {
  padding: 6px 12px;
  font-size: 12px;
}

/* EXERCISE DATABASE VIEW */
.search-bar-row {
  position: relative;
  margin-bottom: 16px;
}

.search-input {
  width: 100%;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid var(--border-color);
  padding: 12px 16px 12px 42px;
  border-radius: var(--border-radius-md);
  transition: var(--transition-normal);
}

.search-input:focus {
  border-color: var(--accent-primary);
  background: rgba(30, 41, 59, 0.7);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
}

.search-icon-svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.filter-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.filter-pill {
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-pill.active {
  background: var(--accent-primary-gradient);
  color: white;
  border-color: transparent;
}

.exercise-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exercise-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  transition: var(--transition-normal);
  cursor: pointer;
}

.exercise-item-card:hover {
  transform: scale(1.01);
  background: var(--bg-card-hover);
  border-color: var(--border-color-active);
}

.exercise-details {
  display: flex;
  align-items: center;
  gap: 12px;
}

.exercise-thumbnail {
  width: 44px;
  height: 44px;
  border-radius: var(--border-radius-sm);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.exercise-meta h4 {
  font-size: 15px;
  font-weight: 600;
}

.exercise-meta p {
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 2px;
}

.exercise-meta .muscle-badge {
  background: rgba(99, 102, 241, 0.1);
  color: #a5b4fc;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(99, 102, 241, 0.15);
}

.custom-flag {
  background: rgba(16, 185, 129, 0.1);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 9px;
  text-transform: uppercase;
  font-weight: 700;
}

/* ROUTINES & PROGRAMS VIEW */
.routine-section {
  margin-bottom: 24px;
}

.routine-subtitle {
  font-size: 13px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.routines-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.routine-card {
  padding: 16px;
  transition: var(--transition-normal);
}

.routine-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color-active);
}

.routine-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 12px;
}

.routine-title-box {
  flex: 1 1 200px;
  min-width: 0;
}

.routine-title-box h3 {
  font-size: 16px;
  font-weight: 700;
}

.routine-meta-row {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.routine-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.routine-exercises-preview {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.routine-exercises-preview span {
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.weeks-indicator {
  background: rgba(139, 92, 246, 0.12);
  color: #d8b4fe;
  border: 1px solid rgba(139, 92, 246, 0.2);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

/* MODALS */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-overlay:not(.active) {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

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

.modal-content {
  width: 90%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px;
  transform: translateY(20px);
  transition: transform var(--transition-slow);
}

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

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

.modal-header h3 {
  font-size: 20px;
  font-weight: 700;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-input, rgba(30, 41, 59, 0.5));
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 10px 14px;
  color: var(--text-main);
  transition: var(--transition-normal);
  color-scheme: dark;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-primary);
  background: var(--bg-input-focus, rgba(30, 41, 59, 0.8));
}

/* Password Input Wrapper & Eye Toggle Button */
.password-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.password-wrapper .form-input {
  padding-right: 42px !important;
}

.password-toggle-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--text-muted, #94a3b8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.1s ease;
  user-select: none;
  z-index: 2;
}

.password-toggle-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.password-toggle-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.password-toggle-btn.active {
  color: var(--accent-primary, #818cf8);
}

/* AI ROUTINE BUILDER VIEW */
.ai-console {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 210px);
  min-height: 450px;
}

.ai-chat-history {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-right: 4px;
  margin-bottom: 16px;
}

.chat-bubble {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: var(--border-radius-md);
  font-size: 14px;
  line-height: 1.5;
  animation: fadeIn var(--transition-normal);
}

.chat-bubble.ai {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  align-self: flex-start;
  border-top-left-radius: 2px;
}

.chat-bubble.user {
  background: var(--accent-primary-gradient);
  color: white;
  align-self: flex-end;
  border-top-right-radius: 2px;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.15);
}

.typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background: var(--text-secondary);
  border-radius: 50%;
  animation: typingBounce 1s infinite ease-in-out;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.ai-input-row {
  display: flex;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 6px;
  border-radius: var(--border-radius-lg);
  backdrop-filter: blur(10px);
}

.ai-input {
  flex: 1;
  padding: 8px 12px;
  background: none;
  border: none;
  outline: none;
  color: var(--text-main, #ffffff);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  resize: none;
  min-height: 60px;
  max-height: 85px;
  overflow-y: auto;
}

/* AI response cards styling */
.generated-program-wrapper {
  margin-top: 10px;
  border: 1px dashed var(--accent-primary);
  background: rgba(99, 102, 241, 0.03);
}

.generated-week {
  margin-bottom: 12px;
  border-left: 2px solid var(--accent-secondary);
  padding-left: 10px;
}

/* LIVE WORKOUT OVERLAY */
.live-workout-overlay {
  position: fixed;
  bottom: 72px; /* Rest just above bottom-nav */
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 600px;
  z-index: 90;
  transition: all var(--transition-slow);
}

/* MINIMIZED STATE */
.live-workout-overlay.minimized {
  height: 62px;
  padding: 10px 18px;
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.9);
  border-top: 1px solid rgba(99, 102, 241, 0.5);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.4);
}

.live-workout-overlay.minimized:hover {
  background: rgba(15, 23, 42, 0.95);
}

.min-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.min-timer {
  font-family: monospace;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-primary);
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

.min-title {
  font-weight: 600;
  font-size: 14px;
}

.min-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* EXPANDED STATE */
.live-workout-overlay.expanded {
  bottom: 0;
  height: 100vh;
  max-height: 100vh;
  border-radius: 0;
  z-index: 150;
  display: flex;
  flex-direction: column;
  background: var(--bg-dark);
  border-top: none;
  overflow: hidden;
}

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

.expanded-header-title h2 {
  font-size: 20px;
  font-weight: 700;
}

.expanded-header-title p {
  color: var(--text-secondary);
  font-size: 12px;
}

.expanded-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  -webkit-overflow-scrolling: touch;
}

/* Health Metrics Panel (Google Health Connect style) */
.health-metrics-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 12px;
  position: relative;
  z-index: 1000;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.metric-item {
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.metric-item.metric-item-interactive {
  cursor: pointer;
  touch-action: manipulation;
  padding: 6px 8px;
  border-radius: var(--border-radius-md);
  transition: background-color var(--transition-fast), transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}

.metric-item.metric-item-interactive:hover {
  background: rgba(255, 255, 255, 0.05);
}

.metric-item.metric-item-interactive:active {
  transform: scale(0.97);
  background: rgba(255, 255, 255, 0.09);
}

#rest-timer-card {
  position: relative;
  z-index: 1050;
}

#rest-timer-card:has(#rest-timer-dropdown:not([style*="display: none"])):active,
.metric-item.metric-item-interactive:has(#rest-timer-dropdown:not([style*="display: none"])):active {
  transform: none !important;
}

.metric-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  pointer-events: none;
}

.metric-icon-box.timer {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-primary);
}

.metric-icon-box.heart {
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent-danger);
}

.heart-pulsing svg {
  animation: heartPulse 1.2s infinite alternate;
}

@keyframes heartPulse {
  0% { transform: scale(0.9); filter: drop-shadow(0 0 1px rgba(239, 68, 68, 0.2)); }
  100% { transform: scale(1.15); filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.8)); }
}

.metric-icon-box.calories {
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-warning);
}

.metric-details {
  display: flex;
  flex-direction: column;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

.metric-val {
  font-size: 14px;
  font-weight: 700;
  font-family: monospace;
}

.metric-lbl {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ACTIVE WORKOUT EXERCISES */
.active-exercise-card {
  margin-bottom: 18px;
  padding: 16px;
  position: relative;
  transition: padding var(--transition-normal), margin var(--transition-normal);
}

.active-exercise-card.collapsed .active-ex-body {
  display: none !important;
}

.active-exercise-card.collapsed {
  padding-bottom: 12px;
  margin-bottom: 10px;
}

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

.active-ex-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.active-ex-title-row h3 {
  font-size: 16px;
  font-weight: 700;
}

/* Superset indicator brackets styling */
.superset-badge {
  background: var(--accent-primary-gradient);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.active-ex-actions {
  display: flex;
  gap: 6px;
}

/* Sets table styling */
.sets-table {
  width: 100%;
  margin-bottom: 12px;
}

.set-row-header {
  display: grid;
  grid-template-columns: 40px 1fr 75px 65px 60px 40px;
  gap: 8px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 8px;
  text-align: center;
}

.set-row {
  display: grid;
  grid-template-columns: 40px 1fr 75px 65px 60px 40px;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
  padding: 4px 0;
  transition: var(--transition-fast);
}

.set-index-cell {
  display: flex;
  justify-content: center;
  align-items: center;
}

.set-badge-btn,
.set-type-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  border: 1px solid transparent;
  padding: 0;
  text-align: center;
  line-height: 1;
  box-sizing: border-box;
  user-select: none;
}

.set-badge-btn:hover,
.set-type-btn:hover {
  filter: brightness(1.15);
  transform: scale(1.05);
}

.set-badge-btn:active,
.set-type-btn:active {
  transform: scale(0.95);
}

/* Solid Set Tag styles */
.tag-N, .set-type-n, .set-type-btn.set-type-n { 
  background: #334155; 
  border: 1px solid #475569; 
  color: #ffffff; 
}
.tag-W, .set-type-w, .set-type-btn.set-type-w { 
  background: #f59e0b; 
  border: 1px solid #d97706; 
  color: #ffffff; 
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.tag-D, .set-type-d, .set-type-btn.set-type-d { 
  background: #8b5cf6; 
  border: 1px solid #7c3aed; 
  color: #ffffff; 
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.tag-F, .set-type-f, .set-type-btn.set-type-f { 
  background: #ef4444; 
  border: 1px solid #dc2626; 
  color: #ffffff; 
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.tag-P, .set-type-p, .set-type-btn.set-type-p { 
  background: #06b6d4; 
  border: 1px solid #0891b2; 
  color: #ffffff; 
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.tag-P.tag-P-full, .set-type-btn.tag-P-full {
  background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%);
  border: 1.5px solid #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
  position: relative;
}
.tag-P.tag-P-armed, .set-type-btn.tag-P-armed {
  background: #0891b2;
  border: 2px solid #38bdf8;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.8);
  animation: pulse-partial-armed 1.2s infinite;
}
.tag-A, .set-type-a, .set-type-btn.set-type-a {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  border: 1px solid #fb923c;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  box-shadow: 0 0 8px rgba(249, 115, 22, 0.35);
}
.tag-E, .set-type-e, .set-type-btn.set-type-e {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: 1px solid #34d399;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.35);
}
@keyframes pulse-partial-armed {
  0%, 100% { transform: scale(1); box-shadow: 0 0 8px rgba(56, 189, 248, 0.5); }
  50% { transform: scale(1.08); box-shadow: 0 0 16px rgba(56, 189, 248, 0.9); }
}
.promoted-set-flash {
  animation: flash-promoted-row 1.2s ease-out;
}
@keyframes flash-promoted-row {
  0% { background: rgba(6, 182, 212, 0.3); border-radius: 6px; }
  100% { background: transparent; }
}

.set-input-box {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 6px 4px;
  text-align: center;
  font-size: 13px;
  width: 100%;
  color: var(--text-main);
  font-family: monospace;
  color-scheme: dark;
}

.set-input-box::placeholder {
  color: rgba(165, 180, 252, 0.7) !important;
  font-weight: 500;
  font-style: italic;
  opacity: 1;
}

.btn-use-last:hover {
  background: rgba(99, 102, 241, 0.35) !important;
  color: #ffffff !important;
  border-color: rgba(99, 102, 241, 0.7) !important;
}

select.set-input-box {
  cursor: pointer;
  background-color: rgba(30, 41, 59, 0.6);
  color-scheme: dark;
}

select.set-input-box option {
  background-color: #0f172a !important;
  color: #f8fafc !important;
  text-align: center;
  font-weight: 600;
  padding: 6px 8px;
}

select.set-input-box option:checked,
select.set-input-box option:hover {
  background-color: #4f46e5 !important;
  color: #ffffff !important;
}

.set-input-box:focus {
  border-color: var(--accent-primary);
  background: rgba(30, 41, 59, 0.7);
}

/* Ghost Placeholder styling */
.set-input-box::placeholder {
  color: var(--text-muted);
  opacity: 0.5;
  font-size: 11px;
}

.set-completed-chk {
  width: 34px;
  height: 34px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(30, 41, 59, 0.5);
  transition: var(--transition-fast);
}

.set-completed-chk svg {
  opacity: 0;
  width: 18px;
  height: 18px;
  color: white;
  transition: var(--transition-fast);
}

.set-row.completed-set .set-completed-chk {
  background: var(--accent-success-gradient);
  border-color: transparent;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.set-row.completed-set .set-completed-chk svg {
  opacity: 1;
}

.set-row.completed-set .set-input-box {
  background: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.2);
  color: #a7f3d0;
}

/* Superset brackets indicator visual overlay wrapper */
.superset-group-indicator {
  position: relative;
  margin-top: 10px;
  padding-left: 14px;
  border-left: 3px solid var(--accent-primary);
  border-radius: 4px;
}

.superset-tag-header {
  font-size: 11px;
  font-weight: 700;
  color: #a5b4fc;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.superset-tag-header svg {
  width: 12px;
  height: 12px;
}

.expanded-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 12px;
  background: rgba(15, 23, 42, 0.9);
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}

/* WORKOUT HISTORY LOG CARDS */
.history-workout-card {
  margin-bottom: 14px;
  padding: 16px;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.history-title-grp h4 {
  font-size: 15px;
  font-weight: 700;
}

.history-title-grp p {
  font-size: 11px;
  color: var(--text-secondary);
}

.history-stats {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted);
}

.history-exercises-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.history-exercise-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.history-ex-name {
  font-weight: 600;
}

.history-ex-sets {
  color: var(--text-secondary);
}

/* Animations & transitions */
.toast-msg {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%) translateY(-15px);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--accent-primary);
  color: white;
  padding: 10px 20px;
  border-radius: var(--border-radius-md);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-glass);
  z-index: 100005;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-normal);
  max-width: calc(100vw - 32px);
  text-align: center;
  box-sizing: border-box;
}

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

.pulse-circle {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--accent-danger);
  opacity: 0.3;
  animation: pulse-ring 1.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.5; }
  100% { transform: scale(1.6); opacity: 0; }
}

@media (max-width: 480px) {
  main {
    padding: 12px 14px;
  }
  
  .set-row-header, .set-row {
    grid-template-columns: 32px 1fr 52px 54px 56px 36px;
    gap: 5px;
  }
  
  .set-badge-btn {
    width: 26px;
    height: 26px;
    font-size: 11px;
    border-radius: 6px;
  }
  
  .set-input-box {
    padding: 6px 4px;
    font-size: 16px !important; /* Critical: Eradicates iOS Safari forced auto-zoom */
  }
  
  .health-metrics-row {
    grid-template-columns: 1fr 1fr;
    padding: 8px;
    gap: 4px;
  }
  
  .metric-icon-box {
    width: 28px;
    height: 28px;
  }
  
  .metric-val {
    font-size: 12px;
  }
}

/* UNIFIED ROUTINE CREATOR STYLES */
.routine-builder-tabs .btn {
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  font-weight: 600;
}

.routine-builder-tabs .btn.active {
  background: var(--accent-primary-gradient);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

/* ==========================================================================
   MODERN DUAL-PANEL WORKOUT ROUTINE BUILDER STYLES
   ========================================================================== */
.routine-builder-workspace {
  max-width: 1200px !important;
  width: 96vw !important;
  height: 90vh !important;
  max-height: 880px !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: #141721 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85) !important;
}

.routine-builder-pinned-header {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #1a1d28;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 30;
}

.routine-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.routine-title-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.routine-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
}

.routine-header-fields {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 580px;
}

.routine-name-input {
  flex: 1.3;
  font-size: 13px !important;
  font-weight: 600 !important;
  background: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
  padding: 6px 12px !important;
  border-radius: 6px !important;
}

.routine-name-input:focus {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25) !important;
}

.routine-location-wrapper {
  position: relative;
  flex: 0.9;
  min-width: 140px;
}

.routine-location-icon {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 13px;
  height: 13px;
  color: var(--text-muted);
  pointer-events: none;
}

.routine-location-select {
  width: 100%;
  padding-left: 26px !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
  font-size: 12px !important;
  background: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
  border-radius: 6px !important;
}

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

.routine-save-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.routine-save-btn.btn-saved-success {
  background: rgba(16, 185, 129, 0.2) !important;
  border-color: #10b981 !important;
  color: #34d399 !important;
}

.routine-publish-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  font-size: 12.5px;
  font-weight: 700;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  border: none;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
  cursor: pointer;
  transition: all 0.15s ease;
}

.routine-publish-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.routine-subnav-bar {
  padding: 8px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(18, 21, 30, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.routine-type-toggle-group, .routine-builder-tabs {
  display: flex;
  gap: 6px;
}

.routine-main-pane, .routine-manual-workspace {
  flex: 1;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.routine-weekly-workspace {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.routine-ai-workspace {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.weekly-routine-selection-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.weekly-routine-selection-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(99, 102, 241, 0.4);
}

.routine-mobile-tab-nav {
  display: none;
}

.routine-split-grid {
  display: grid;
  grid-template-columns: 400px 1fr;
  grid-template-rows: 1fr;
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

/* LEFT PANEL: EXERCISE LIBRARY */
.routine-library-panel {
  background: #161922;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.routine-lib-header {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.routine-search-filter-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.routine-search-box {
  position: relative;
  flex: 1;
  min-width: 0;
}

.routine-search-icon {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 13px;
  height: 13px;
  color: var(--text-muted);
  pointer-events: none;
}

.routine-search-clear {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.routine-search-clear:hover {
  color: white;
}

.routine-search-input {
  width: 100%;
  padding-left: 28px !important;
  padding-right: 26px !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
  font-size: 12px !important;
  background: rgba(0, 0, 0, 0.25) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 6px !important;
  color: #f8fafc !important;
}

.routine-custom-ex-btn {
  font-size: 11px !important;
  padding: 6px 9px !important;
  flex-shrink: 0;
  white-space: nowrap;
}

/* QUICK-TAP CATEGORY CHIPS */
.routine-filter-chips-scroll {
  overflow-x: auto;
  scrollbar-width: none;
  margin-top: 2px;
  padding-bottom: 2px;
}

.routine-filter-chips-scroll::-webkit-scrollbar {
  display: none;
}

.routine-filter-chips {
  display: flex;
  gap: 5px;
  white-space: nowrap;
}

.routine-chip-btn {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.routine-chip-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.routine-chip-btn.active {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border-color: transparent;
  color: white;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

/* SECONDARY FILTERS ROW */
.routine-secondary-filters-row {
  display: flex;
  gap: 6px;
}

.routine-filter-select-wrapper {
  position: relative;
  flex: 1;
  min-width: 0;
}

.routine-filter-select-icon {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  color: var(--text-muted);
  pointer-events: none;
}

.routine-sub-filter {
  width: 100%;
  padding-left: 24px !important;
  padding-right: 8px !important;
  padding-top: 4px !important;
  padding-bottom: 4px !important;
  font-size: 11px !important;
  background: rgba(0, 0, 0, 0.25) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 6px !important;
  color: var(--text-secondary) !important;
}

/* AVAILABLE EXERCISES SCROLL AREA */
.routine-available-scroll-area {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.routine-available-scroll-area::-webkit-scrollbar,
.routine-sequencer-scroll-area::-webkit-scrollbar {
  width: 6px;
}

.routine-available-scroll-area::-webkit-scrollbar-track,
.routine-sequencer-scroll-area::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.15);
}

.routine-available-scroll-area::-webkit-scrollbar-thumb,
.routine-sequencer-scroll-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.routine-available-scroll-area::-webkit-scrollbar-thumb:hover,
.routine-sequencer-scroll-area::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.routine-panel-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.routine-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.routine-section-counter {
  font-size: 10.5px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 6px;
  border-radius: 4px;
}

.routine-available-cards-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.routine-available-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 8px;
  background: #1c202d;
  border: 1px solid rgba(255, 255, 255, 0.06);
  gap: 10px;
  transition: all 0.15s ease;
}

.routine-available-card.is-in-routine {
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.05);
}

.routine-available-card:hover {
  background: #232838;
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

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

.routine-available-name {
  font-size: 13px;
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.routine-available-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.routine-add-btn {
  padding: 5px 12px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  background: rgba(99, 102, 241, 0.15) !important;
  border-color: rgba(99, 102, 241, 0.35) !important;
  color: #a5b4fc !important;
  transition: all 0.15s ease;
}

.routine-add-btn:hover {
  background: #6366f1 !important;
  color: white !important;
  border-color: #6366f1 !important;
}

.routine-add-btn.added-success {
  background: rgba(16, 185, 129, 0.25) !important;
  border-color: #10b981 !important;
  color: #34d399 !important;
}

/* SOFT FILLED COLOR PILLS FOR MUSCLE GROUPS */
.muscle-tag-pill {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
}

.muscle-tag-chest {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.muscle-tag-back {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.muscle-tag-delts, .muscle-tag-shoulders {
  background: rgba(192, 132, 252, 0.15);
  color: #c084fc;
  border: 1px solid rgba(192, 132, 252, 0.3);
}

.muscle-tag-arms {
  background: rgba(251, 146, 60, 0.15);
  color: #fb923c;
  border: 1px solid rgba(251, 146, 60, 0.3);
}

.muscle-tag-legs {
  background: rgba(250, 204, 21, 0.15);
  color: #facc15;
  border: 1px solid rgba(250, 204, 21, 0.3);
}

.muscle-tag-core {
  background: rgba(251, 113, 133, 0.15);
  color: #fb7185;
  border: 1px solid rgba(251, 113, 133, 0.3);
}

.muscle-tag-other {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.brand-tag-pill {
  font-size: 9.5px;
  font-weight: 500;
  padding: 1.5px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* RIGHT PANEL: ROUTINE SEQUENCER */
.routine-sequencer-panel {
  background: #141721;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.routine-sequencer-header {
  padding: 12px 20px;
  background: rgba(20, 23, 33, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.routine-sequencer-metrics {
  font-size: 11.5px;
  color: #94a3b8;
  font-weight: 500;
}

.routine-grouping-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 4px 8px;
}

.grouping-count {
  font-size: 11px;
  font-weight: 700;
  color: white;
}

.grouping-btns {
  display: flex;
  gap: 4px;
}

.circuit-btn {
  background: rgba(16, 185, 129, 0.2) !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
  color: #34d399 !important;
}

.routine-sequencer-scroll-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.routine-selected-cards-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100px;
}

.routine-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.routine-selected-card {
  background: #1e2230;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.routine-selected-card.dragging {
  opacity: 0.4;
  border: 1.5px dashed var(--accent-primary) !important;
  transform: scale(0.98);
}

.routine-selected-card.drag-over-indicator {
  border-top: 2.5px solid #6366f1 !important;
  transform: translateY(2px);
}

.routine-card-main-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.routine-drag-handle {
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 2px;
  color: var(--text-muted);
  border-radius: 4px;
  transition: color 0.15s ease;
  flex-shrink: 0;
}

.routine-drag-handle:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
}

.routine-group-chk {
  width: 14px;
  height: 14px;
  cursor: pointer;
  flex-shrink: 0;
}

.routine-step-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  font-weight: 800;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.routine-selected-details {
  flex: 1.3;
  min-width: 0;
}

.routine-selected-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.routine-selected-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}

.routine-card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}

.routine-action-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.routine-action-btn.delete:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}

/* COLLAPSIBLE NOTES ACCORDION */
.routine-notes-accordion {
  border-top: 1px dashed rgba(255, 255, 255, 0.06);
  padding-top: 6px;
  margin-top: 4px;
}

.routine-notes-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 2px 0;
  user-select: none;
}

.routine-notes-drawer {
  margin-top: 6px;
}

.routine-notes-input {
  width: 100%;
  font-size: 11.5px !important;
  padding: 6px 10px !important;
  background: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 6px !important;
  color: #f8fafc !important;
  resize: vertical;
  min-height: 48px;
}

/* SUPERSET VISUAL BRACKET CONNECTORS */
.routine-superset-wrapper {
  position: relative;
  border-left: 3px solid #818cf8;
  padding-left: 12px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(99, 102, 241, 0.03);
  border-radius: 0 8px 8px 0;
  padding-top: 8px;
  padding-bottom: 8px;
  padding-right: 8px;
}

.routine-circuit-wrapper {
  position: relative;
  border-left: 3px solid #34d399;
  padding-left: 12px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(16, 185, 129, 0.03);
  border-radius: 0 8px 8px 0;
  padding-top: 8px;
  padding-bottom: 8px;
  padding-right: 8px;
}

.routine-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.routine-group-badge {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #818cf8;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.routine-circuit-wrapper .routine-group-badge {
  color: #34d399;
}

.routine-ungroup-btn {
  padding: 2px 7px !important;
  font-size: 10px !important;
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 860px) {
  .routine-builder-workspace {
    width: 100vw !important;
    height: 100% !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    padding: 0 !important;
  }

  .routine-builder-workspace.modal-content {
    padding: 0 !important;
    width: 100vw !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
  }

  .routine-builder-pinned-header {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    grid-template-areas:
      "title actions"
      "fields fields" !important;
    gap: 8px 10px !important;
    padding: 10px 14px !important;
  }

  .routine-header-left {
    display: contents !important;
  }

  .routine-title-box {
    grid-area: title !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
    width: auto !important;
  }

  .routine-title-box h3 {
    font-size: 14px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .routine-header-actions {
    grid-area: actions !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    justify-self: end !important;
  }

  .routine-save-btn,
  .routine-publish-btn {
    padding: 6px 10px !important;
    font-size: 11.5px !important;
  }

  .routine-header-fields {
    grid-area: fields !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .routine-name-input {
    flex: 1.2 !important;
    min-width: 0 !important;
    width: auto !important;
  }

  .routine-location-wrapper {
    flex: 1 !important;
    min-width: 0 !important;
    width: auto !important;
  }

  .routine-subnav-bar {
    overflow-x: auto !important;
    scrollbar-width: none !important;
    padding: 6px 12px !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
  }

  .routine-subnav-bar::-webkit-scrollbar {
    display: none !important;
  }

  .routine-type-toggle-group,
  .routine-builder-tabs {
    gap: 4px !important;
    flex-shrink: 0 !important;
  }

  .routine-subnav-bar .btn-sm {
    padding: 5px 8px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
  }

  .routine-drag-handle {
    padding: 8px 6px !important;
  }

  .routine-mobile-tab-nav {
    display: flex;
    background: #161922;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
  }

  .routine-mobile-tab-btn {
    flex: 1;
    padding: 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }

  .routine-mobile-tab-btn.active {
    color: #38bdf8;
    border-bottom-color: #38bdf8;
    background: rgba(56, 189, 248, 0.06);
  }

  .routine-count-pill {
    background: #6366f1;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
  }

  .routine-split-grid {
    display: flex;
    flex-direction: column;
  }

  .routine-library-panel {
    display: none;
    width: 100%;
    border-right: none;
  }

  .routine-library-panel.mobile-active {
    display: flex;
  }

  .routine-sequencer-panel {
    display: none;
    width: 100%;
  }

  .routine-sequencer-panel.mobile-active {
    display: flex;
  }

  .prescriptive-pill-container {
    flex-wrap: wrap;
  }

  .routine-weekly-workspace,
  .routine-ai-workspace {
    padding: 16px;
  }

  .routine-builder-hint-banner {
    margin: 8px 16px 0 16px;
  }
}

/* CALENDAR SYSTEM STYLES */
.calendar-day-cell {
  background: rgba(30, 41, 59, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 6px;
  min-height: 55px;
  height: auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.calendar-day-cell:hover {
  background: rgba(99, 102, 241, 0.05);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

#calendar-days-grid.trainee-view .calendar-day-cell {
  cursor: default;
}
#calendar-days-grid.trainee-view .calendar-day-cell:hover {
  transform: none;
  border-color: var(--border-color);
  background: rgba(30, 41, 59, 0.25);
}

.calendar-day-cell.faded {
  opacity: 0.35;
}

.calendar-day-cell.today {
  background: rgba(99, 102, 241, 0.1);
  border: 2px solid var(--accent-primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

.calendar-day-cell .day-number {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  align-self: flex-end;
}

.calendar-day-cell.today .day-number {
  color: white;
}

.calendar-day-events-container {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 4px;
  overflow: hidden;
  max-height: 65px;
}

/* Event pills */
.event-pill {
  font-size: 9px;
  font-weight: 600;
  padding: 2px 4px;
  border-radius: 4px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  display: block;
  text-align: left;
  border-left: 3px solid transparent;
  transition: opacity 0.2s;
}

.event-pill:hover {
  opacity: 0.85;
}

.event-pill.event-pt {
  background: rgba(16, 185, 129, 0.12);
  border-left-color: #10b981;
  color: #34d399;
}

.event-pill.event-checkin {
  background: rgba(139, 92, 246, 0.12);
  border-left-color: #8b5cf6;
  color: #a78bfa;
}

.event-pill.event-payment {
  background: rgba(239, 68, 68, 0.12);
  border-left-color: #ef4444;
  color: #f87171;
}

.event-pill.event-assessment {
  background: rgba(14, 165, 233, 0.12);
  border-left-color: #0ea5e9;
  color: #38bdf8;
}

.event-pill.event-custom {
  background: rgba(245, 158, 11, 0.12);
  border-left-color: #f59e0b;
  color: #fbbf24;
}

/* Event list timeline styles */
.calendar-timeline-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: rgba(30, 41, 59, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  align-items: center;
  transition: background 0.2s;
  cursor: pointer;
}

.calendar-timeline-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.calendar-timeline-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.calendar-timeline-indicator.indicator-pt { background: #10b981; box-shadow: 0 0 6px #10b981; }
.calendar-timeline-indicator.indicator-checkin { background: #8b5cf6; box-shadow: 0 0 6px #8b5cf6; }
.calendar-timeline-indicator.indicator-payment { background: #ef4444; box-shadow: 0 0 6px #ef4444; }
.calendar-timeline-indicator.indicator-assessment { background: #0ea5e9; box-shadow: 0 0 6px #0ea5e9; }
.calendar-timeline-indicator.indicator-custom { background: #f59e0b; box-shadow: 0 0 6px #f59e0b; }

/* Hide number input spinners for cleaner workout grids */
.set-input-box::-webkit-outer-spin-button,
.set-input-box::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.set-input-box {
  -moz-appearance: textfield;
}

/* Checklist items styling */
.checklist-item-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md, 10px);
  padding: 12px 14px;
  transition: all var(--transition-fast);
  box-sizing: border-box;
}
.checklist-item-wrapper:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.18);
}
.checklist-item-wrapper.has-note {
  border-left: 4px solid var(--accent-warning);
}
.checklist-item-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
}
.checklist-item-left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 48px;
  padding: 2px 0;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}
.checklist-item-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
  width: 100%;
  box-sizing: border-box;
}
.checklist-checkbox {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  margin-top: 2px;
  accent-color: var(--accent-success);
  cursor: pointer;
  flex-shrink: 0;
}
.checklist-text {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-main);
  transition: all var(--transition-fast);
  word-break: normal;
  overflow-wrap: break-word;
  line-height: 1.4;
  width: 100%;
  display: block;
}
.checklist-text.completed {
  text-decoration: line-through;
  color: var(--text-muted);
  opacity: 0.6;
}
.checklist-item-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 3px;
  width: 100%;
}
.checklist-item-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  align-self: flex-start;
  margin-left: 10px;
}
.checklist-note-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-secondary);
  border-radius: var(--border-radius-sm, 8px);
  padding: 8px 14px;
  min-width: 48px;
  min-height: 48px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  touch-action: manipulation;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.checklist-note-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.28);
}
.checklist-note-btn.active {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.4);
}

@media (max-width: 480px) {
  .checklist-item-wrapper {
    padding: 10px 12px;
    margin-bottom: 8px;
  }
  .checklist-item-row {
    gap: 8px;
  }
  .checklist-item-left {
    gap: 8px;
  }
  .checklist-text {
    font-size: 13px;
    line-height: 1.35;
  }
  .checklist-item-meta {
    gap: 4px;
    margin-top: 3px;
  }
  .checklist-goal-badge,
  .checklist-freq-badge {
    font-size: 9.5px;
    padding: 2px 6px;
  }
  .checklist-note-btn {
    padding: 5px 9px;
    font-size: 11px;
    min-height: 34px;
    gap: 4px;
  }
}

@media (max-width: 350px) {
  .checklist-item-row {
    flex-wrap: wrap;
  }
  .checklist-item-actions {
    width: 100%;
    justify-content: flex-end;
    margin-left: 0;
    margin-top: 4px;
  }
}

.checklist-note-badge {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11.5px;
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--border-radius-sm);
  padding: 8px 12px;
  margin-top: 8px;
  line-height: 1.4;
  word-break: break-word;
}
.checklist-note-badge i {
  flex-shrink: 0;
  width: 13px;
  height: 13px;
  margin-top: 2px;
}

.checklist-note-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--border-radius-sm);
}
.checklist-note-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: #fff;
  font-size: 12px;
  padding: 8px 10px;
  resize: vertical;
  min-height: 52px;
  outline: none;
}
.checklist-note-input:focus {
  border-color: var(--accent-primary);
}

/* Checklist celebration badge and effects */
.checklist-celebrate-pulse {
  animation: checklistCelebrateAnim 1.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes checklistCelebrateAnim {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  30% {
    transform: scale(1.18);
    box-shadow: 0 0 20px 6px rgba(16, 185, 129, 0.6);
  }
  60% {
    transform: scale(0.96);
    box-shadow: 0 0 10px 2px rgba(16, 185, 129, 0.3);
  }
  100% {
    transform: scale(1);
    box-shadow: none;
  }
}

#checklist-confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 99999;
}

/* History Modal Navigation & Components */
.checklist-history-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 8px 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.checklist-history-timeline {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 14px;
  scrollbar-width: thin;
}
.checklist-history-day-pill {
  flex: 1 0 54px;
  min-width: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.checklist-history-day-pill:hover {
  background: rgba(255, 255, 255, 0.08);
}
.checklist-history-day-pill.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--accent-primary);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.3);
}

/* Manage Checklist Items list & Goal Alignment */
.manage-checklist-goal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.manage-checklist-goal-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.manage-checklist-goal-chip:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.manage-checklist-goal-chip.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--accent-primary);
  color: #fff;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.3);
}

.manage-checklist-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  min-height: auto;
  height: auto;
  flex-shrink: 0;
  margin-bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm, 8px);
  transition: border-color 0.15s ease, background 0.15s ease;
  box-sizing: border-box;
}

.manage-checklist-item:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(15, 23, 42, 0.85);
}

.manage-checklist-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.manage-checklist-item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.manage-checklist-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  word-break: normal;
  overflow-wrap: break-word;
  line-height: 1.35;
  flex: 1;
}

.manage-checklist-delete-btn {
  flex-shrink: 0;
  padding: 3px;
  opacity: 0.8;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.manage-checklist-delete-btn:hover {
  opacity: 1;
  transform: scale(1.05);
}

.manage-checklist-item-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.manage-checklist-control-label {
  font-size: 10px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 0;
}

.manage-checklist-control-label.weekly-reset {
  color: #fbbf24;
}

.manage-checklist-goal-select,
.manage-checklist-freq-select,
.manage-checklist-day-select {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
  cursor: pointer;
  outline: none;
  transition: all 0.15s ease;
  max-width: 220px;
}

.manage-checklist-goal-select:hover,
.manage-checklist-goal-select:focus,
.manage-checklist-freq-select:hover,
.manage-checklist-freq-select:focus,
.manage-checklist-day-select:hover,
.manage-checklist-day-select:focus {
  border-color: var(--accent-primary);
  color: #fff;
}

/* Aligned Goal Badges for Daily Checklist Items */
.checklist-goal-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  line-height: 1.2;
  white-space: nowrap;
}

.checklist-goal-badge.goal-strength {
  color: #a5b4fc;
  border-color: rgba(129, 140, 248, 0.35);
  background: rgba(99, 102, 241, 0.15);
}

.checklist-goal-badge.goal-fatloss {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(239, 68, 68, 0.15);
}

.checklist-goal-badge.goal-mobility {
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(16, 185, 129, 0.15);
}

.checklist-goal-badge.goal-cardio {
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(245, 158, 11, 0.15);
}

.checklist-goal-badge.goal-nutrition {
  color: #bef264;
  border-color: rgba(163, 230, 53, 0.35);
  background: rgba(132, 204, 22, 0.15);
}

.checklist-goal-badge.goal-general {
  color: #d8b4fe;
  border-color: rgba(192, 132, 252, 0.35);
  background: rgba(168, 85, 247, 0.15);
}

/* Frequency Badges for Daily and Weekly Checklist Items */
.checklist-freq-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  line-height: 1.2;
  white-space: nowrap;
}

.checklist-freq-badge.freq-daily {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(14, 165, 233, 0.15);
}

.checklist-freq-badge.freq-weekly {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.15);
}

/* Muscle Group tab buttons styles */
.muscle-tab-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.muscle-tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}
.muscle-tab-btn.active {
  background: var(--accent-primary-gradient);
  border-color: transparent;
  color: white;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
}

/* Alert animations */
@keyframes pulse-alert {
  0% {
    box-shadow: 0 0 4px rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
  }
  100% {
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
    border-color: rgba(245, 158, 11, 0.5);
  }
}

.pulse-icon {
  animation: pulse-icon-scale 1.5s infinite ease-in-out;
}

@keyframes pulse-icon-scale {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.6)); }
  100% { transform: scale(1); }
}

#custom-exercise-modal {
  z-index: 210; /* Render custom exercise modal above custom routine modal (z-index 200) */
}

/* ADMIN DASHBOARD STYLES */
#admin-clients-table th {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

#admin-clients-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
  color: var(--text-main);
}

#admin-clients-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.admin-trainer-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.admin-last-sync-badge {
  font-size: 11px;
  color: var(--text-muted);
}

/* Onboarding Step 2 Collapsible Sections */
.onboard-collapsible-section {
  border-radius: var(--border-radius-lg);
  background: rgba(30, 41, 59, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  margin-bottom: 8px;
  transition: border-color 0.2s ease;
}

.onboard-collapsible-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(30, 41, 59, 0.6);
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background-color 0.2s ease;
}

.onboard-collapsible-header:hover {
  background: rgba(30, 41, 59, 0.8);
}

.onboard-collapsible-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.onboard-collapsible-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.onboard-collapsible-check {
  color: var(--accent-success);
  display: flex;
  align-items: center;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.onboard-collapsible-check.show {
  opacity: 1;
  transform: scale(1);
}

.onboard-collapsible-arrow {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  transition: transform 0.3s ease;
}

.onboard-collapsible-arrow.open {
  transform: rotate(180deg);
}

.onboard-collapsible-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 500px;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out, opacity 0.3s ease-out;
  overflow: hidden;
}

.onboard-collapsible-body.collapsed {
  max-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  opacity: 0;
  pointer-events: none;
}

.onboard-collapsible-body .form-group {
  margin-bottom: 8px;
}

.onboard-collapsible-body .form-label {
  font-size: 11px;
  margin-bottom: 4px;
}

.onboard-collapsible-body .form-input,
.onboard-collapsible-body .form-select {
  padding: 8px 12px;
  font-size: 13px;
}

/* Individual Field Completion Checks */
.field-check {
  color: var(--accent-success);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.field-check.show {
  opacity: 1;
  transform: scale(1);
}

/* Active Dashboard Metric Card */
.profile-stat-box.active {
  border-color: var(--accent-primary) !important;
  background: rgba(99, 102, 241, 0.1) !important;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
}

/* Mobile Performance Optimizations */
@media (max-width: 768px) {
  .bottom-nav, 
  .glass-panel, 
  header,
  .modal-overlay,
  .ai-input-row {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  
  header {
    background: rgba(7, 9, 19, 0.98) !important;
  }
  
  .bottom-nav {
    background: rgba(7, 9, 19, 0.98) !important;
  }
  
  .glass-panel,
  .ai-input-row {
    background: rgba(15, 23, 42, 0.98) !important;
  }
}

/* Responsive Grid Classes for Sets table */
.set-row-header.is-repetitive,
.set-row.is-repetitive {
  grid-template-columns: 35px 1.2fr 65px 60px 75px 35px;
  gap: 6px;
}
.set-row-header.is-repetitive.no-rpe,
.set-row.is-repetitive.no-rpe {
  grid-template-columns: 35px 1.2fr 80px 75px 35px;
  gap: 6px;
}
.set-row-header.is-cardio,
.set-row.is-cardio {
  grid-template-columns: 35px 1.2fr 70px 85px 35px;
  gap: 6px;
}
.set-row-header.is-time-movement,
.set-row.is-time-movement {
  grid-template-columns: 35px 1.2fr 70px 70px 35px;
  gap: 6px;
}
.set-row-header.is-general,
.set-row.is-general {
  grid-template-columns: 35px 1.2fr 80px 90px 35px;
  gap: 6px;
}

@media (max-width: 480px) {
  .set-row-header, .set-row {
    gap: 5px !important;
  }
  .set-row-header.is-repetitive,
  .set-row.is-repetitive {
    grid-template-columns: 32px 1fr 52px 54px 56px 36px !important;
  }
  .set-row-header.is-repetitive.no-rpe,
  .set-row.is-repetitive.no-rpe {
    grid-template-columns: 32px 1fr 68px 66px 36px !important;
  }
  .set-row-header.is-cardio,
  .set-row.is-cardio {
    grid-template-columns: 32px 1fr 64px 76px 36px !important;
  }
  .set-row-header.is-time-movement,
  .set-row.is-time-movement {
    grid-template-columns: 32px 1fr 64px 64px 36px !important;
  }
  .set-row-header.is-general,
  .set-row.is-general {
    grid-template-columns: 32px 1fr 72px 82px 36px !important;
  }
  .set-row-header span {
    font-size: 10px !important;
    font-weight: 700 !important;
    color: #94a3b8 !important;
    letter-spacing: 0.4px !important;
  }

  /* Responsive Calendar Cells */
  .calendar-day-cell {
    min-height: 48px !important;
    padding: 2px !important;
    border-radius: var(--border-radius-sm) !important;
  }
  .calendar-day-cell .day-number {
    font-size: 9px !important;
  }
  .calendar-day-events-container {
    max-height: 32px !important;
    gap: 2px !important;
    margin-top: 2px !important;
  }
  .event-pill {
    font-size: 8px !important;
    padding: 0px 2px !important;
    line-height: 1.1 !important;
  }
}

/* RPG Sidebar Responsive Layout */
.rpg-sidebar {
  width: 100%;
  max-width: 100%;
  padding: 16px 20px;
  border-radius: var(--border-radius-md);
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255,255,255,0.05);
  box-sizing: border-box;
  text-align: left;
}

.rpg-hero-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.rpg-hero-left-panel, .rpg-hero-right-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.rpg-sidebar-familiar-box:hover {
  border-color: var(--accent-primary) !important;
  background: rgba(30, 41, 59, 0.85) !important;
  transform: translateY(-1px);
}

.rpg-stats-grid {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  color: var(--text-secondary);
}

.rpg-stat-grid-item {
  background: rgba(255,255,255,0.02);
  padding: 6px 10px;
  border-radius: var(--border-radius-sm);
  border: 1px solid rgba(255,255,255,0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.rpg-stat-grid-label {
  font-size: 8px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 2px;
}

.rpg-gear-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.rpg-gear-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  background: rgba(255,255,255,0.02);
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.04);
}

@media (max-width: 480px) {
  .section-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
  }
  
  .section-title-row > div {
    width: 100%;
    justify-content: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .routine-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
  }

  .routine-card-header .routine-title-box,
  .routine-card .routine-title-box {
    width: 100%;
    flex: none;
  }

  .routine-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
  }
}

/* ================= RPG VIEW SUB-TABS & MAP SYSTEM ================= */
.rpg-tabs button {
  transition: all var(--transition-fast);
}
.rpg-tabs button.active-rpg-tab {
  background: var(--accent-primary-gradient) !important;
  color: white !important;
  border-color: transparent !important;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

.rpg-map-container {
  overflow: hidden;
  cursor: grab;
  position: relative;
  width: 100%;
  height: 440px;
  border-radius: var(--border-radius-md);
  border: 3px solid #1e293b;
  background: #fdf6e2; /* Parchment cream */
  box-shadow: inset 0 0 30px rgba(0,0,0,0.15), 0 10px 25px rgba(0,0,0,0.5);
  user-select: none;
}
.rpg-map-container:active {
  cursor: grabbing;
}

.rpg-map-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top left;
  transition: transform 0.15s ease-out;
  width: 100%;
  height: 100%;
}

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

.rpg-hotspot {
  position: absolute;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.0);
  border: 2px dashed transparent;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rpg-hotspot::after {
  content: attr(data-label);
  position: absolute;
  bottom: -22px;
  background: #1e293b;
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
}
.rpg-hotspot:hover {
  background: rgba(30, 41, 59, 0.08);
  border-color: #1e293b;
  box-shadow: 0 0 12px rgba(30, 41, 59, 0.15);
}
.rpg-hotspot:hover::after {
  opacity: 1;
}

.map-zoom-btn {
  transition: all var(--transition-fast);
}
.map-zoom-btn:hover {
  background: #f4f4f5 !important;
  transform: scale(1.05);
}
.map-zoom-btn:active {
  transform: scale(0.95) translate(1px, 1px);
  box-shadow: 1px 1px 0px rgba(0,0,0,0.15) !important;
}

/* Character detailed sheet styles */
.char-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}
.char-attribute-card {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Inventory styles */
.rpg-inventory-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.rpg-inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}
.rpg-inventory-item {
  position: relative;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  text-align: center;
  transition: var(--transition-normal);
}
.rpg-inventory-item:hover {
  transform: translateY(-2px);
  background: var(--bg-card-hover);
  border-color: var(--border-color-active);
}

/* Onboarding Wizard Stepper & Progress Fills */
.onboard-progress-container {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  margin: 12px 0 20px 0;
}
.onboard-progress-fill {
  height: 100%;
  background: var(--accent-primary-gradient);
  width: 20%; /* Will update dynamically in JS */
  transition: width 0.3s ease-in-out;
}

/* Selectable Cards (Account type, Feature toggle) */
.onboard-select-card {
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.01);
  border-radius: var(--border-radius-md);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}
.onboard-select-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(255, 255, 255, 0.03);
}
.onboard-select-card.selected {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.08);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
}

/* Goals Grid & Multi-Select Tiles */
.onboard-goals-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}
.onboard-goal-tile {
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.01);
  border-radius: var(--border-radius-md);
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  text-align: left;
}
.onboard-goal-tile:hover {
  transform: translateY(-1px);
  border-color: rgba(99, 102, 241, 0.4);
}
.onboard-goal-tile.selected {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.06);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.12);
}
.onboard-goal-tile-icon {
  font-size: 20px;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.onboard-goal-tile-check {
  position: absolute;
  top: 8px;
  right: 8px;
  color: var(--accent-primary);
  opacity: 0;
  transform: scale(0.7);
  transition: all 0.2s ease;
}
.onboard-goal-tile.selected .onboard-goal-tile-check {
  opacity: 1;
  transform: scale(1);
}

/* Manga Prologue Panels (Phase 5) */
.manga-story-container {
  max-height: 400px;
  overflow-y: auto;
  padding: 12px;
  border-radius: var(--border-radius-lg);
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 12px;
}
.manga-panel {
  border: 3px solid #1e293b;
  background: #111827;
  border-radius: 8px;
  padding: 14px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.manga-panel-img-placeholder {
  height: 130px;
  background: linear-gradient(135deg, #1e1b4b 0%, #3b0764 100%);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  border: 1px solid rgba(255,255,255,0.05);
}
.manga-narration {
  background: rgba(0, 0, 0, 0.55);
  color: #e2e8f0;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.5;
  border-left: 3px solid var(--accent-primary);
  font-style: italic;
}
.manga-bubble {
  background: #ffffff;
  color: #0f172a;
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 700;
  align-self: flex-end;
  box-shadow: 3px 3px 0px #000000;
  border: 2px solid #000000;
  line-height: 1.4;
  max-width: 80%;
  position: relative;
}
.manga-bubble::after {
  content: '';
  position: absolute;
  bottom: -8px;
  right: 15px;
  border-width: 8px 8px 0;
  border-style: solid;
  border-color: #ffffff transparent;
  display: block;
  width: 0;
}
.manga-bubble::before {
  content: '';
  position: absolute;
  bottom: -11px;
  right: 14px;
  border-width: 9px 9px 0;
  border-style: solid;
  border-color: #000000 transparent;
  display: block;
  width: 0;
}

/* Custom Sub-tab Dropdown styles */
.dropdown-item {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 8px 12px;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}
.dropdown-item.active-rpg-tab {
  background: rgba(163, 230, 53, 0.15) !important;
  color: #a3e635 !important;
}

/* ================= ADVENTURER CLASS THEME (DARK WOOD & STONE) ================= */
body.adventurer-theme::before {
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(163, 112, 85, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(139, 90, 62, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.4) 0%, transparent 100%),
    repeating-linear-gradient(45deg, rgba(0,0,0,0.08) 0px, rgba(0,0,0,0.08) 2px, transparent 2px, transparent 4px) !important;
  background-color: #13171e !important;
}

body.adventurer-theme {
  color: #dfd8cf; /* Warm parchment cream */
}

/* Brand Name gold-brown metallic text gradient */
body.adventurer-theme .brand-name {
  background: linear-gradient(120deg, #dfd8cf 30%, #a37055 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  font-family: var(--font-heading) !important;
}

body.adventurer-theme .brand-logo {
  border: 2px solid #8b5a3e !important;
  box-shadow: inset 0 0 0 1px #4d3324, 0 0 10px rgba(163, 112, 85, 0.4) !important;
}

/* Dropdown styling */
body.adventurer-theme .dropdown-menu {
  background: #1c222b !important;
  border: 2px solid #8b5a3e !important;
  box-shadow: inset 0 0 0 1px #4d3324, var(--shadow-lg) !important;
}

body.adventurer-theme .dropdown-item {
  color: #bfae9e !important;
}

body.adventurer-theme .dropdown-item:hover {
  background: rgba(163, 112, 85, 0.15) !important;
  color: #dfd8cf !important;
}

/* Input elements inside adventurer-theme */
body.adventurer-theme input, 
body.adventurer-theme select, 
body.adventurer-theme textarea {
  color: #dfd8cf !important;
  background-color: #13171e !important;
  border: 2px solid #8b5a3e !important;
  box-shadow: inset 0 0 0 1px #4d3324 !important;
  border-radius: var(--border-radius-sm) !important;
  color-scheme: dark;
}

body.adventurer-theme select option,
body.adventurer-theme select optgroup,
body.adventurer-theme .form-select option,
body.adventurer-theme .set-input-box option {
  background-color: #191f28 !important;
  color: #dfd8cf !important;
}

body.adventurer-theme select option:checked,
body.adventurer-theme select option:hover {
  background-color: #8b5a3e !important;
  color: #ffffff !important;
}

body.adventurer-theme input:focus, 
body.adventurer-theme select:focus, 
body.adventurer-theme textarea:focus {
  border-color: #b4826b !important;
  box-shadow: 0 0 8px rgba(180, 130, 107, 0.45) !important;
}

/* Override inline white text color in adventurer theme to warm parchment */
body.adventurer-theme [style*="color: white" i]:not(.btn):not(.btn-primary):not(.btn-success):not(.mr-toggle-btn.active):not(.active-rpg-tab):not(.active-tab):not(.tab-item.active),
body.adventurer-theme [style*="color:white" i]:not(.btn):not(.btn-primary):not(.btn-success):not(.mr-toggle-btn.active):not(.active-rpg-tab):not(.active-tab):not(.tab-item.active),
body.adventurer-theme [style*="color: #ffffff" i]:not(.btn):not(.btn-primary):not(.btn-success):not(.mr-toggle-btn.active):not(.active-rpg-tab):not(.active-tab):not(.tab-item.active),
body.adventurer-theme [style*="color:#ffffff" i]:not(.btn):not(.btn-primary):not(.btn-success):not(.mr-toggle-btn.active):not(.active-rpg-tab):not(.active-tab):not(.tab-item.active),
body.adventurer-theme [style*="color: #fff" i]:not(.btn):not(.btn-primary):not(.btn-success):not(.mr-toggle-btn.active):not(.active-rpg-tab):not(.active-tab):not(.tab-item.active),
body.adventurer-theme [style*="color:#fff" i]:not(.btn):not(.btn-primary):not(.btn-success):not(.mr-toggle-btn.active):not(.active-rpg-tab):not(.active-tab):not(.tab-item.active),
body.adventurer-theme [style*="color: rgb(255" i]:not(.btn):not(.btn-primary):not(.btn-success):not(.mr-toggle-btn.active):not(.active-rpg-tab):not(.active-tab):not(.tab-item.active),
body.adventurer-theme [style*="color:rgb(255" i]:not(.btn):not(.btn-primary):not(.btn-success):not(.mr-toggle-btn.active):not(.active-rpg-tab):not(.active-tab):not(.tab-item.active) {
  color: #dfd8cf !important;
}

/* Override inline translucent-white backgrounds to dark slate */
body.adventurer-theme [style*="background: rgba(255, 255, 255" i]:not(.btn):not(.active),
body.adventurer-theme [style*="background:rgba(255,255,255" i]:not(.btn):not(.active),
body.adventurer-theme [style*="background: rgba(255,255,255" i]:not(.btn):not(.active),
body.adventurer-theme [style*="background-color: rgba(255, 255, 255" i]:not(.btn):not(.active),
body.adventurer-theme [style*="background-color:rgba(255,255,255" i]:not(.btn):not(.active) {
  background-color: #13171e !important;
}

/* Override inline translucent-white borders to wood-brown */
body.adventurer-theme [style*="border: 1px solid rgba(255, 255, 255" i],
body.adventurer-theme [style*="border:1px solid rgba(255,255,255" i],
body.adventurer-theme [style*="border-color: rgba(255, 255, 255" i],
body.adventurer-theme [style*="border-color:rgba(255,255,255" i],
body.adventurer-theme [style*="border: 1px solid rgba(255,255,255" i] {
  border-color: #8b5a3e !important;
}

/* Glass Panels and Cards Framing */
body.adventurer-theme .glass-panel,
body.adventurer-theme .profile-card,
body.adventurer-theme .onboard-collapsible-body,
body.adventurer-theme .modal-content {
  background: #20262e !important;
  border: 2px solid #8b5a3e !important;
  box-shadow: inset 0 0 0 2px #4d3324, 0 10px 25px rgba(0,0,0,0.6) !important;
  border-radius: var(--border-radius-md) !important;
  animation: none !important;
}

/* Stat Box style */
body.adventurer-theme .profile-stat-box {
  background: #171c22 !important;
  border: 2px solid #8b5a3e !important;
  box-shadow: inset 0 0 0 1px #4d3324 !important;
  border-radius: var(--border-radius-sm) !important;
}

body.adventurer-theme .profile-stat-box:hover {
  background: #20262e !important;
  border-color: #b4826b !important;
}

/* Section title font family */
body.adventurer-theme .section-title,
body.adventurer-theme h1,
body.adventurer-theme h2,
body.adventurer-theme h3,
body.adventurer-theme h4,
body.adventurer-theme h5,
body.adventurer-theme h6 {
  font-family: var(--font-heading) !important;
  color: #dfd8cf !important;
}

/* Muscle badges, exercise list, supersets, tags overrides */
body.adventurer-theme .exercise-meta .muscle-badge,
body.adventurer-theme .routine-available-item .ex-muscle,
body.adventurer-theme .routine-selected-idx,
body.adventurer-theme .superset-badge,
body.adventurer-theme .superset-tag-header {
  color: #e0b99c !important; /* Gold/Bronze */
  background: rgba(163, 112, 85, 0.15) !important;
  border-color: rgba(163, 112, 85, 0.35) !important;
  font-family: var(--font-heading) !important;
}

body.adventurer-theme .custom-flag {
  color: #fb7185 !important; /* Rose Red */
  background: rgba(225, 29, 72, 0.1) !important;
  border-color: rgba(225, 29, 72, 0.25) !important;
}

/* Buttons style */
body.adventurer-theme .btn-primary {
  background: linear-gradient(135deg, #a37055 0%, #704732 100%) !important;
  color: #dfd8cf !important;
  border: 2px solid #8b5a3e !important;
  box-shadow: inset 0 0 0 1px #4d3324, 0 4px 15px rgba(163, 112, 85, 0.3) !important;
  font-family: var(--font-heading) !important;
}
body.adventurer-theme .btn-primary:hover {
  background: linear-gradient(135deg, #b4826b 0%, #8b5a3e 100%) !important;
  box-shadow: inset 0 0 0 1px #4d3324, 0 6px 20px rgba(163, 112, 85, 0.45) !important;
}

body.adventurer-theme .btn-secondary {
  background: #20262e !important;
  border: 2px solid #8b5a3e !important;
  color: #bfae9e !important;
  box-shadow: inset 0 0 0 1px #4d3324 !important;
  font-family: var(--font-heading) !important;
}
body.adventurer-theme .btn-secondary:hover {
  background: #2d3540 !important;
  color: #dfd8cf !important;
  border-color: #b4826b !important;
}

/* Calendar styling updates for light theme */
body.adventurer-theme .calendar-day-cell {
  background: rgba(32, 40, 52, 0.4) !important;
  border-color: rgba(139, 90, 62, 0.3) !important;
}

body.adventurer-theme .calendar-day-cell:hover {
  background: rgba(163, 112, 85, 0.08) !important;
  border-color: var(--accent-primary) !important;
}

body.adventurer-theme .calendar-day-cell.today {
  background: rgba(163, 112, 85, 0.12) !important;
  border: 2px solid var(--accent-primary) !important;
}

body.adventurer-theme .calendar-day-cell.today .day-number {
  color: #dfd8cf !important;
  font-family: var(--font-heading) !important;
}

body.adventurer-theme .calendar-timeline-item {
  background: #20262e !important;
  border: 2px solid #8b5a3e !important;
  box-shadow: inset 0 0 0 1px #4d3324 !important;
}

/* Calendar event pills overrides in light theme */
body.adventurer-theme .event-pill.event-pt {
  color: #34d399 !important;
  background: rgba(16, 185, 129, 0.12) !important;
}
body.adventurer-theme .event-pill.event-checkin {
  color: #c084fc !important;
  background: rgba(139, 92, 246, 0.12) !important;
}
body.adventurer-theme .event-pill.event-payment {
  color: #f87171 !important;
  background: rgba(239, 68, 68, 0.12) !important;
}
body.adventurer-theme .event-pill.event-assessment {
  color: #38bdf8 !important;
  background: rgba(14, 165, 233, 0.12) !important;
}
body.adventurer-theme .event-pill.event-custom {
  color: #fbbf24 !important;
  background: rgba(245, 158, 11, 0.12) !important;
}

/* Completed set rows highlight inside session logger */
body.adventurer-theme .set-row.completed-set .set-input-box {
  color: #fca5a5 !important;
  background: rgba(139, 30, 30, 0.15) !important;
  border-color: rgba(139, 30, 30, 0.4) !important;
}

/* Bottom Navigation styling */
body.adventurer-theme .bottom-nav {
  background: #11141a !important;
  border-top: 2px solid #8b5a3e !important;
}

body.adventurer-theme .nav-item {
  color: #8a7d70 !important;
}

body.adventurer-theme .nav-item:hover {
  color: #bfae9e !important;
}

body.adventurer-theme .nav-item.active {
  color: #a37055 !important;
}

body.adventurer-theme .nav-item.active svg {
  filter: drop-shadow(0 0 8px rgba(163, 112, 85, 0.6)) !important;
}

/* Streaks consistency tracker dots overrides */
body.adventurer-theme .dot-indicator.completed {
  background: #8b1e1e !important;
  border: 1.5px solid #a37055 !important;
  color: #dfd8cf !important;
  box-shadow: 0 0 8px rgba(139, 30, 30, 0.5) !important;
}

/* Checklist items styling */
body.adventurer-theme .checklist-item-wrapper {
  background: #20262e !important;
  border: 2px solid #8b5a3e !important;
  box-shadow: inset 0 0 0 1px #4d3324 !important;
}
body.adventurer-theme .checklist-item-row {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

body.adventurer-theme .checklist-checkbox {
  accent-color: #8b1e1e !important;
}

body.adventurer-theme .checklist-text.completed,
body.adventurer-theme .checklist-checkbox:checked + .checklist-text {
  color: #8a7d70 !important;
}

/* SVG Chart adjustments for light theme */
body.adventurer-theme svg line[stroke*="rgba(255,255,255" i],
body.adventurer-theme svg line[stroke*="rgba(255, 255, 255" i] {
  stroke: rgba(139, 90, 62, 0.2) !important;
}

body.adventurer-theme .chart-bar-group rect[fill="rgba(255, 255, 255, 0.2)" i],
body.adventurer-theme rect[fill="rgba(255, 255, 255, 0.2)" i],
body.adventurer-theme rect[fill="rgba(255,255,255,0.2)"] {
  fill: rgba(163, 112, 85, 0.2) !important;
}


/* ================= CULTIVATOR CLASS THEME (DARK SPIRITUAL QI & CRIMSON) ================= */

/* Breathing Qi glow animation for spiritual borders */
@keyframes qi-glow-red {
  0%, 100% {
    opacity: 0.7;
    border-color: rgba(220, 38, 38, 0.35);
  }
  50% {
    opacity: 1;
    border-color: rgba(220, 38, 38, 0.65);
  }
}

/* Floating runes breathing animation */
@keyframes rune-breathe {
  0%, 100% {
    opacity: 0.03;
    transform: translateY(0);
  }
  50% {
    opacity: 0.08;
    transform: translateY(-3px);
  }
}

body.cultivator-theme::before {
  background-image: 
    radial-gradient(circle at 50% 15%, rgba(220, 38, 38, 0.14) 0%, transparent 60%),
    radial-gradient(circle at 10% 75%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(220, 38, 38, 0.06) 0%, transparent 50%),
    repeating-linear-gradient(0deg, rgba(0,0,0,0.12) 0px, rgba(0,0,0,0.12) 1px, transparent 1px, transparent 2px) !important;
  background-color: #070609 !important; /* Deep dark purple-black spiritual void */
}

/* Floating spiritual runes outside app shell container */
body.cultivator-theme::after {
  content: "魂  氣  乾  坤  陰  陽  術  命  輪";
  position: fixed;
  top: 12%;
  left: calc(50vw - 360px);
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 20px;
  color: rgba(220, 38, 38, 0.06);
  pointer-events: none;
  font-family: var(--font-heading), serif;
  font-weight: 700;
  letter-spacing: 24px;
  z-index: 1;
  animation: rune-breathe 6s infinite ease-in-out;
}

@media (max-width: 768px) {
  body.cultivator-theme::after {
    display: none; /* Hide floating runes on small screens to save space */
  }
}

body.cultivator-theme {
  color: #e5e1da; /* Bone white text */
}

/* Brand Name metallic crimson/purple gradient */
body.cultivator-theme .brand-name {
  background: linear-gradient(120deg, #f5f5f4 20%, #dc2626 70%, #7e22ce 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  font-family: var(--font-heading) !important;
}

body.cultivator-theme .brand-logo {
  border: 1px solid rgba(220, 38, 38, 0.4) !important;
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.4) !important;
}

/* Dropdown styling */
body.cultivator-theme .dropdown-menu {
  background: #110d14 !important;
  border: 1px solid rgba(220, 38, 38, 0.3) !important;
  box-shadow: 0 0 15px rgba(220, 38, 38, 0.25), var(--shadow-lg) !important;
}

body.cultivator-theme .dropdown-item {
  color: #a8a29e !important;
}

body.cultivator-theme .dropdown-item:hover {
  background: rgba(220, 38, 38, 0.1) !important;
  color: #f5f5f4 !important;
}

/* Input elements inside cultivator-theme */
body.cultivator-theme input, 
body.cultivator-theme select, 
body.cultivator-theme textarea {
  color: #f5f5f4 !important;
  background-color: #070609 !important;
  border: 1px solid rgba(220, 38, 38, 0.3) !important;
  border-radius: var(--border-radius-sm) !important;
  color-scheme: dark;
}

body.cultivator-theme select option,
body.cultivator-theme select optgroup,
body.cultivator-theme .form-select option,
body.cultivator-theme .set-input-box option {
  background-color: #110d14 !important;
  color: #f5f5f4 !important;
}

body.cultivator-theme select option:checked,
body.cultivator-theme select option:hover {
  background-color: #dc2626 !important;
  color: #ffffff !important;
}

body.cultivator-theme input:focus, 
body.cultivator-theme select:focus, 
body.cultivator-theme textarea:focus {
  border-color: #dc2626 !important;
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.4) !important;
}

/* Override inline white text color in cultivator theme to bone white */
body.cultivator-theme [style*="color: white" i]:not(.btn):not(.btn-primary):not(.btn-success):not(.mr-toggle-btn.active):not(.active-rpg-tab):not(.active-tab):not(.tab-item.active),
body.cultivator-theme [style*="color:white" i]:not(.btn):not(.btn-primary):not(.btn-success):not(.mr-toggle-btn.active):not(.active-rpg-tab):not(.active-tab):not(.tab-item.active),
body.cultivator-theme [style*="color: #ffffff" i]:not(.btn):not(.btn-primary):not(.btn-success):not(.mr-toggle-btn.active):not(.active-rpg-tab):not(.active-tab):not(.tab-item.active),
body.cultivator-theme [style*="color:#ffffff" i]:not(.btn):not(.btn-primary):not(.btn-success):not(.mr-toggle-btn.active):not(.active-rpg-tab):not(.active-tab):not(.tab-item.active),
body.cultivator-theme [style*="color: #fff" i]:not(.btn):not(.btn-primary):not(.btn-success):not(.mr-toggle-btn.active):not(.active-rpg-tab):not(.active-tab):not(.tab-item.active),
body.cultivator-theme [style*="color:#fff" i]:not(.btn):not(.btn-primary):not(.btn-success):not(.mr-toggle-btn.active):not(.active-rpg-tab):not(.active-tab):not(.tab-item.active),
body.cultivator-theme [style*="color: rgb(255" i]:not(.btn):not(.btn-primary):not(.btn-success):not(.mr-toggle-btn.active):not(.active-rpg-tab):not(.active-tab):not(.tab-item.active),
body.cultivator-theme [style*="color:rgb(255" i]:not(.btn):not(.btn-primary):not(.btn-success):not(.mr-toggle-btn.active):not(.active-rpg-tab):not(.active-tab):not(.tab-item.active) {
  color: #f5f5f4 !important;
}

/* Override inline translucent-white backgrounds to deep void charcoal */
body.cultivator-theme [style*="background: rgba(255, 255, 255" i]:not(.btn):not(.active),
body.cultivator-theme [style*="background:rgba(255,255,255" i]:not(.btn):not(.active),
body.cultivator-theme [style*="background: rgba(255,255,255" i]:not(.btn):not(.active),
body.cultivator-theme [style*="background-color: rgba(255, 255, 255" i]:not(.btn):not(.active),
body.cultivator-theme [style*="background-color:rgba(255,255,255" i]:not(.btn):not(.active) {
  background-color: #0d0a0f !important;
}

/* Subdued subtle semi-transparent borders */
body.cultivator-theme [style*="border: 1px solid rgba(255, 255, 255" i],
body.cultivator-theme [style*="border:1px solid rgba(255,255,255" i],
body.cultivator-theme [style*="border-color: rgba(255, 255, 255" i],
body.cultivator-theme [style*="border-color:rgba(255,255,255" i],
body.cultivator-theme [style*="border: 1px solid rgba(255,255,255" i] {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Glass Panels and Cards Framing with modern refined dark styling */
body.cultivator-theme .glass-panel,
body.cultivator-theme .profile-card,
body.cultivator-theme .onboard-collapsible-body,
body.cultivator-theme .modal-content {
  background: #121216 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: var(--border-radius-md) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.cultivator-theme .glass-panel:hover,
body.cultivator-theme .profile-card:hover {
  border-color: rgba(220, 38, 38, 0.35) !important;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45) !important;
}

/* Stat Box style */
body.cultivator-theme .profile-stat-box {
  background: #08060a !important;
  border: 1.5px solid rgba(220, 38, 38, 0.35) !important;
  border-radius: var(--border-radius-sm) !important;
  box-shadow: 0 0 8px rgba(220, 38, 38, 0.15) !important;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

body.cultivator-theme .profile-stat-box:hover {
  background: #110d14 !important;
  border-color: #dc2626 !important;
}

/* Section title font family */
body.cultivator-theme .section-title,
body.cultivator-theme h1,
body.cultivator-theme h2,
body.cultivator-theme h3,
body.cultivator-theme h4,
body.cultivator-theme h5,
body.cultivator-theme h6 {
  font-family: var(--font-heading) !important;
  color: #f5f5f4 !important;
}

/* Muscle badges, exercise list, supersets, tags overrides */
body.cultivator-theme .exercise-meta .muscle-badge,
body.cultivator-theme .routine-available-item .ex-muscle,
body.cultivator-theme .routine-selected-idx,
body.cultivator-theme .superset-badge,
body.cultivator-theme .superset-tag-header {
  color: #fca5a5 !important; /* Soft Red */
  background: rgba(220, 38, 38, 0.1) !important;
  border-color: rgba(220, 38, 38, 0.3) !important;
  font-family: var(--font-heading) !important;
}

body.cultivator-theme .custom-flag {
  color: #fb7185 !important;
  background: rgba(225, 29, 72, 0.15) !important;
  border-color: rgba(225, 29, 72, 0.3) !important;
}

/* Buttons style */
body.cultivator-theme .btn-primary {
  background: linear-gradient(135deg, #991b1b 0%, #dc2626 100%) !important;
  color: #f5f5f4 !important;
  border: 1px solid rgba(220, 38, 38, 0.4) !important;
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.25) !important;
  font-family: var(--font-heading) !important;
}
body.cultivator-theme .btn-primary:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
  box-shadow: 0 0 15px rgba(220, 38, 38, 0.45) !important;
}

body.cultivator-theme .btn-secondary {
  background: #110d14 !important;
  border: 1px solid rgba(220, 38, 38, 0.3) !important;
  color: #a8a29e !important;
  font-family: var(--font-heading) !important;
}
body.cultivator-theme .btn-secondary:hover {
  background: #19141e !important;
  color: #f5f5f4 !important;
  border-color: #dc2626 !important;
}

/* Calendar styling updates for light theme */
body.cultivator-theme .calendar-day-cell {
  background: rgba(28, 20, 32, 0.4) !important;
  border-color: rgba(220, 38, 38, 0.2) !important;
}

body.cultivator-theme .calendar-day-cell:hover {
  background: rgba(220, 38, 38, 0.08) !important;
  border-color: var(--accent-primary) !important;
}

body.cultivator-theme .calendar-day-cell.today {
  background: rgba(220, 38, 38, 0.12) !important;
  border: 1.5px solid var(--accent-primary) !important;
}

body.cultivator-theme .calendar-day-cell.today .day-number {
  color: #dc2626 !important;
  font-family: var(--font-heading) !important;
}

body.cultivator-theme .calendar-timeline-item {
  background: #110d14 !important;
  border: 1px solid rgba(220, 38, 38, 0.3) !important;
  box-shadow: 0 0 8px rgba(220, 38, 38, 0.15) !important;
}

/* Calendar event pills overrides in light theme */
body.cultivator-theme .event-pill.event-pt {
  color: #34d399 !important;
  background: rgba(16, 185, 129, 0.12) !important;
}
body.cultivator-theme .event-pill.event-checkin {
  color: #c084fc !important;
  background: rgba(139, 92, 246, 0.12) !important;
}
body.cultivator-theme .event-pill.event-payment {
  color: #f87171 !important;
  background: rgba(239, 68, 68, 0.12) !important;
}
body.cultivator-theme .event-pill.event-assessment {
  color: #38bdf8 !important;
  background: rgba(14, 165, 233, 0.12) !important;
}
body.cultivator-theme .event-pill.event-custom {
  color: #fbbf24 !important;
  background: rgba(245, 158, 11, 0.12) !important;
}

/* Completed set rows highlight inside session logger */
body.cultivator-theme .set-row.completed-set .set-input-box {
  color: #fca5a5 !important;
  background: rgba(220, 38, 38, 0.15) !important;
  border-color: rgba(220, 38, 38, 0.4) !important;
}

/* Bottom Navigation styling */
body.cultivator-theme .bottom-nav {
  background: #08060a !important;
  border-top: 1.5px solid rgba(220, 38, 38, 0.3) !important;
}

body.cultivator-theme .nav-item {
  color: #78716c !important;
}

body.cultivator-theme .nav-item:hover {
  color: #a8a29e !important;
}

body.cultivator-theme .nav-item.active {
  color: #dc2626 !important;
}

body.cultivator-theme .nav-item.active svg {
  filter: drop-shadow(0 0 8px rgba(220, 38, 38, 0.7)) !important;
}

/* Streaks consistency tracker dots overrides */
body.cultivator-theme .dot-indicator.completed {
  background: #b91c1c !important;
  border: 1px solid #ef4444 !important;
  color: #f5f5f4 !important;
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.5) !important;
}

/* Checklist items styling */
body.cultivator-theme .checklist-item-wrapper {
  background: #110d14 !important;
  border: 1.5px solid rgba(220, 38, 38, 0.3) !important;
  box-shadow: 0 0 8px rgba(220, 38, 38, 0.1) !important;
}
body.cultivator-theme .checklist-item-row {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

body.cultivator-theme .checklist-checkbox {
  accent-color: #dc2626 !important;
}

body.cultivator-theme .checklist-text.completed,
body.cultivator-theme .checklist-checkbox:checked + .checklist-text {
  color: #78716c !important;
}

/* SVG Chart adjustments for cultivator theme */
body.cultivator-theme svg line[stroke*="rgba(255,255,255" i],
body.cultivator-theme svg line[stroke*="rgba(255, 255, 255" i] {
  stroke: rgba(220, 38, 38, 0.15) !important;
}

body.cultivator-theme .chart-bar-group rect[fill="rgba(255, 255, 255, 0.2)" i],
body.cultivator-theme rect[fill="rgba(255, 255, 255, 0.2)" i],
body.cultivator-theme rect[fill="rgba(255,255,255,0.2)"] {
  fill: rgba(220, 38, 38, 0.2) !important;
}


/* ================= PLAYER CHARACTER CLASS THEME (DARK AMETHYST PURPLE) ================= */

/* Breathing Qi glow animation for player theme (purple) */
@keyframes qi-glow-purple {
  0%, 100% {
    opacity: 0.7;
    border-color: rgba(168, 85, 247, 0.35);
  }
  50% {
    opacity: 1;
    border-color: rgba(168, 85, 247, 0.65);
  }
}

/* Floating purple runes breathing animation */
@keyframes rune-breathe-purple {
  0%, 100% {
    opacity: 0.03;
    transform: translateY(0);
  }
  50% {
    opacity: 0.08;
    transform: translateY(-3px);
  }
}

body.player-theme::before {
  background-image: 
    radial-gradient(circle at 50% 15%, rgba(168, 85, 247, 0.14) 0%, transparent 60%),
    radial-gradient(circle at 10% 75%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(168, 85, 247, 0.06) 0%, transparent 50%),
    repeating-linear-gradient(0deg, rgba(0,0,0,0.12) 0px, rgba(0,0,0,0.12) 1px, transparent 1px, transparent 2px) !important;
  background-color: #0a0812 !important; /* Deep dark purple-black void */
}

/* Floating purple runes outside app shell container */
body.player-theme::after {
  content: "魂  氣  乾  坤  陰  陽  術  命  輪";
  position: fixed;
  top: 12%;
  left: calc(50vw - 360px);
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 20px;
  color: rgba(168, 85, 247, 0.06);
  pointer-events: none;
  font-family: var(--font-heading), serif;
  font-weight: 700;
  letter-spacing: 24px;
  z-index: 1;
  animation: rune-breathe-purple 6s infinite ease-in-out;
}

@media (max-width: 768px) {
  body.player-theme::after {
    display: none; /* Hide floating runes on small screens */
  }
}

body.player-theme {
  color: #f3e8ff; /* Lavender bone white text */
}

/* Brand Name metallic purple/fuchsia gradient */
body.player-theme .brand-name {
  background: linear-gradient(120deg, #ffffff 20%, #c084fc 70%, #8b5cf6 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  font-family: var(--font-heading) !important;
}

body.player-theme .brand-logo {
  border: 1px solid rgba(168, 85, 247, 0.4) !important;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.4) !important;
}

/* Dropdown menu styling */
body.player-theme .dropdown-menu {
  background: #14101e !important;
  border: 1px solid rgba(168, 85, 247, 0.3) !important;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.25), var(--shadow-lg) !important;
}

body.player-theme .dropdown-item {
  color: #c084fc !important;
}

body.player-theme .dropdown-item:hover {
  background: rgba(168, 85, 247, 0.1) !important;
  color: #ffffff !important;
}

/* Input elements inside player-theme */
body.player-theme input, 
body.player-theme select, 
body.player-theme textarea {
  color: #f3e8ff !important;
  background-color: #0a0812 !important;
  border: 1px solid rgba(168, 85, 247, 0.3) !important;
  border-radius: var(--border-radius-sm) !important;
  color-scheme: dark;
}

body.player-theme select option,
body.player-theme select optgroup,
body.player-theme .form-select option,
body.player-theme .set-input-box option {
  background-color: #14101e !important;
  color: #f3e8ff !important;
}

body.player-theme select option:checked,
body.player-theme select option:hover {
  background-color: #7e22ce !important;
  color: #ffffff !important;
}

body.player-theme input:focus, 
body.player-theme select:focus, 
body.player-theme textarea:focus {
  border-color: #a855f7 !important;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.4) !important;
}

/* Override inline white text color in player theme to lavender white */
body.player-theme [style*="color: white" i]:not(.btn):not(.btn-primary):not(.btn-success):not(.mr-toggle-btn.active):not(.active-rpg-tab):not(.active-tab):not(.tab-item.active),
body.player-theme [style*="color:white" i]:not(.btn):not(.btn-primary):not(.btn-success):not(.mr-toggle-btn.active):not(.active-rpg-tab):not(.active-tab):not(.tab-item.active),
body.player-theme [style*="color: #ffffff" i]:not(.btn):not(.btn-primary):not(.btn-success):not(.mr-toggle-btn.active):not(.active-rpg-tab):not(.active-tab):not(.tab-item.active),
body.player-theme [style*="color:#ffffff" i]:not(.btn):not(.btn-primary):not(.btn-success):not(.mr-toggle-btn.active):not(.active-rpg-tab):not(.active-tab):not(.tab-item.active),
body.player-theme [style*="color: #fff" i]:not(.btn):not(.btn-primary):not(.btn-success):not(.mr-toggle-btn.active):not(.active-rpg-tab):not(.active-tab):not(.tab-item.active),
body.player-theme [style*="color:#fff" i]:not(.btn):not(.btn-primary):not(.btn-success):not(.mr-toggle-btn.active):not(.active-rpg-tab):not(.active-tab):not(.tab-item.active),
body.player-theme [style*="color: rgb(255" i]:not(.btn):not(.btn-primary):not(.btn-success):not(.mr-toggle-btn.active):not(.active-rpg-tab):not(.active-tab):not(.tab-item.active),
body.player-theme [style*="color:rgb(255" i]:not(.btn):not(.btn-primary):not(.btn-success):not(.mr-toggle-btn.active):not(.active-rpg-tab):not(.active-tab):not(.tab-item.active) {
  color: #f3e8ff !important;
}

/* Override inline translucent-white backgrounds to deep void purple */
body.player-theme [style*="background: rgba(255, 255, 255" i]:not(.btn):not(.active),
body.player-theme [style*="background:rgba(255,255,255" i]:not(.btn):not(.active),
body.player-theme [style*="background: rgba(255,255,255" i]:not(.btn):not(.active),
body.player-theme [style*="background-color: rgba(255, 255, 255" i]:not(.btn):not(.active),
body.player-theme [style*="background-color:rgba(255,255,255" i]:not(.btn):not(.active) {
  background-color: #0f0c16 !important;
}

/* Override inline translucent-white borders to glowing purple */
body.player-theme [style*="border: 1px solid rgba(255, 255, 255" i],
body.player-theme [style*="border:1px solid rgba(255,255,255" i],
body.player-theme [style*="border-color: rgba(255, 255, 255" i],
body.player-theme [style*="border-color:rgba(255,255,255" i],
body.player-theme [style*="border: 1px solid rgba(255,255,255" i] {
  border-color: rgba(168, 85, 247, 0.25) !important;
}

/* Glass Panels and Cards Framing with clean purple Qi aura */
body.player-theme .glass-panel,
body.player-theme .profile-card,
body.player-theme .onboard-collapsible-body,
body.player-theme .modal-content {
  background: #14101e !important;
  border: 1.5px solid rgba(168, 85, 247, 0.35) !important;
  border-radius: var(--border-radius-md) !important;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.2), inset 0 0 8px rgba(168, 85, 247, 0.1) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.player-theme .glass-panel:hover,
body.player-theme .profile-card:hover {
  border-color: rgba(168, 85, 247, 0.6) !important;
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.35), inset 0 0 12px rgba(168, 85, 247, 0.15) !important;
}

/* Stat Box style */
body.player-theme .profile-stat-box {
  background: #0a0812 !important;
  border: 1.5px solid rgba(168, 85, 247, 0.35) !important;
  border-radius: var(--border-radius-sm) !important;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.15) !important;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

body.player-theme .profile-stat-box:hover {
  background: #14101e !important;
  border-color: #bd5af5 !important;
}

/* Section title font family */
body.player-theme .section-title,
body.player-theme h1,
body.player-theme h2,
body.player-theme h3,
body.player-theme h4,
body.player-theme h5,
body.player-theme h6 {
  font-family: var(--font-heading) !important;
  color: #f3e8ff !important;
}

/* Muscle badges, exercise list, supersets, tags overrides */
body.player-theme .exercise-meta .muscle-badge,
body.player-theme .routine-available-item .ex-muscle,
body.player-theme .routine-selected-idx,
body.player-theme .superset-badge,
body.player-theme .superset-tag-header {
  color: #d8b4fe !important; /* Soft Purple */
  background: rgba(168, 85, 247, 0.1) !important;
  border-color: rgba(168, 85, 247, 0.3) !important;
  font-family: var(--font-heading) !important;
}

body.player-theme .custom-flag {
  color: #f472b6 !important; /* Pink */
  background: rgba(236, 72, 153, 0.15) !important;
  border-color: rgba(236, 72, 153, 0.3) !important;
}

/* Buttons style */
body.player-theme .btn-primary {
  background: linear-gradient(135deg, #a855f7 0%, #bd5af5 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(168, 85, 247, 0.4) !important;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.25) !important;
  font-family: var(--font-heading) !important;
}
body.player-theme .btn-primary:hover {
  background: linear-gradient(135deg, #bd5af5 0%, #a855f7 100%) !important;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.45) !important;
}

body.player-theme .btn-secondary {
  background: #14101e !important;
  border: 1px solid rgba(168, 85, 247, 0.3) !important;
  color: #c084fc !important;
  font-family: var(--font-heading) !important;
}
body.player-theme .btn-secondary:hover {
  background: #1d172c !important;
  color: #ffffff !important;
  border-color: #bd5af5 !important;
}

/* Calendar styling updates */
body.player-theme .calendar-day-cell {
  background: rgba(32, 25, 46, 0.4) !important;
  border-color: rgba(168, 85, 247, 0.2) !important;
}

body.player-theme .calendar-day-cell:hover {
  background: rgba(168, 85, 247, 0.08) !important;
  border-color: var(--accent-primary) !important;
}

body.player-theme .calendar-day-cell.today {
  background: rgba(168, 85, 247, 0.12) !important;
  border: 1.5px solid var(--accent-primary) !important;
}

body.player-theme .calendar-day-cell.today .day-number {
  color: #bd5af5 !important;
  font-family: var(--font-heading) !important;
}

body.player-theme .calendar-timeline-item {
  background: #14101e !important;
  border: 1px solid rgba(168, 85, 247, 0.3) !important;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.15) !important;
}

/* Calendar event pills overrides in player theme */
body.player-theme .event-pill.event-pt {
  color: #34d399 !important;
  background: rgba(16, 185, 129, 0.12) !important;
}
body.player-theme .event-pill.event-checkin {
  color: #c084fc !important;
  background: rgba(139, 92, 246, 0.12) !important;
}
body.player-theme .event-pill.event-payment {
  color: #f87171 !important;
  background: rgba(239, 68, 68, 0.12) !important;
}
body.player-theme .event-pill.event-assessment {
  color: #38bdf8 !important;
  background: rgba(14, 165, 233, 0.12) !important;
}
body.player-theme .event-pill.event-custom {
  color: #fbbf24 !important;
  background: rgba(245, 158, 11, 0.12) !important;
}

/* Completed set rows highlight inside session logger */
body.player-theme .set-row.completed-set .set-input-box {
  color: #e9d5ff !important;
  background: rgba(168, 85, 247, 0.15) !important;
  border-color: rgba(168, 85, 247, 0.4) !important;
}

/* Bottom Navigation styling */
body.player-theme .bottom-nav {
  background: #0a0812 !important;
  border-top: 1.5px solid rgba(168, 85, 247, 0.3) !important;
}

body.player-theme .nav-item {
  color: #6b21a8 !important;
}

body.player-theme .nav-item:hover {
  color: #c084fc !important;
}

body.player-theme .nav-item.active {
  color: #bd5af5 !important;
}

body.player-theme .nav-item.active svg {
  filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.7)) !important;
}

/* Streaks consistency tracker dots overrides */
body.player-theme .dot-indicator.completed {
  background: #a855f7 !important;
  border: 1px solid #c084fc !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.5) !important;
}

/* Checklist items styling */
body.player-theme .checklist-item-wrapper {
  background: #14101e !important;
  border: 1.5px solid rgba(168, 85, 247, 0.3) !important;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.1) !important;
}
body.player-theme .checklist-item-row {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

body.player-theme .checklist-checkbox {
  accent-color: #a855f7 !important;
}

body.player-theme .checklist-text.completed,
body.player-theme .checklist-checkbox:checked + .checklist-text {
  color: #8b5cf6 !important;
}

/* SVG Chart adjustments for player theme */
body.player-theme svg line[stroke*="rgba(255,255,255" i],
body.player-theme svg line[stroke*="rgba(255, 255, 255" i] {
  stroke: rgba(168, 85, 247, 0.15) !important;
}

body.player-theme .chart-bar-group rect[fill="rgba(255, 255, 255, 0.2)" i],
body.player-theme rect[fill="rgba(255, 255, 255, 0.2)" i],
body.player-theme rect[fill="rgba(255,255,255,0.2)"] {
  fill: rgba(168, 85, 247, 0.2) !important;
}

/* Document Cards & signature styles */
.document-card {
  transition: all var(--transition-fast);
}
.document-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}
.document-card.completed {
  border-color: rgba(34, 197, 94, 0.3) !important;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.05);
}

/* Document Modal Forms Styles */
.doc-form-group {
  margin-bottom: 16px;
}
.doc-form-label {
  display: block;
  font-weight: 600;
  color: white;
  margin-bottom: 6px;
  font-size: 13px;
}
.doc-input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.doc-textarea {
  min-height: 80px;
}

/* PDF Print Template Layout Styles */
.pdf-print-container {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: #1e293b;
  background: #ffffff;
  padding: 40px;
  box-sizing: border-box;
  font-size: 14px;
  line-height: 1.6;
}
.pdf-print-container h1, .pdf-print-container h2, .pdf-print-container h3, .pdf-print-container h4 {
  color: #0f172a;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 8px;
  margin-top: 24px;
}
.pdf-print-container h1 {
  font-size: 24px;
  text-align: center;
  margin-bottom: 10px;
  border-bottom: 2px solid #0f172a;
}
.pdf-print-container .pdf-meta-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}
.pdf-print-container .pdf-meta-table td {
  padding: 8px;
  border: 1px solid #e2e8f0;
}
.pdf-print-container .pdf-meta-table td.label {
  font-weight: bold;
  background: #f8fafc;
  width: 30%;
}
.pdf-print-container .pdf-clause {
  margin-bottom: 16px;
  text-align: justify;
}
.pdf-print-container .pdf-quiz-item {
  margin-bottom: 12px;
  padding: 10px;
  background: #f8fafc;
  border-left: 4px solid #3b82f6;
}
.pdf-print-container .pdf-quiz-question {
  font-weight: bold;
}
.pdf-print-container .pdf-quiz-answer {
  margin-top: 4px;
  color: #1d4ed8;
  font-weight: 500;
}
.pdf-print-container .pdf-signatures-section {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  page-break-inside: avoid;
}
.pdf-print-container .pdf-sig-box {
  width: 45%;
  border-top: 1px solid #94a3b8;
  padding-top: 10px;
  text-align: center;
}
.pdf-print-container .pdf-sig-image {
  max-height: 80px;
  display: block;
  margin: 10px auto;
  background: transparent;
}

/* ================= NEW INTEGRATION STYLES ================= */

/* Landing Page Navbar & Navigation Links */
.landing-navbar {
  display: flex;
  gap: 20px;
  align-items: center;
}
.landing-nav-link {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast) ease;
  position: relative;
  padding: 6px 0;
}
.landing-nav-link:hover {
  color: white;
}
.landing-nav-link.active {
  color: white;
}
.landing-nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-primary-gradient, linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%));
  border-radius: 2px;
}

/* Responsive Landing Navbar */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 12px;
    padding: 12px 16px;
  }
  .landing-navbar {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 12px;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 8px;
  }
  .landing-nav-link {
    font-size: 11px;
  }
}

/* ================= REBRANDING: BECOME ALMIGHTY ================= */

.almighty-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.18) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.almighty-figure-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: -6px 0 -6px 0;
}

.almighty-figure-wrapper::before {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.28) 0%, rgba(99, 102, 241, 0.15) 50%, transparent 75%);
  border-radius: 50%;
  filter: blur(22px);
  pointer-events: none;
  z-index: 0;
}

.almighty-hero-img {
  width: clamp(180px, 42vw, 310px);
  height: auto;
  filter: drop-shadow(0 0 24px rgba(245, 158, 11, 0.35)) drop-shadow(0 0 16px rgba(167, 139, 250, 0.4));
  pointer-events: none;
  user-select: none;
  position: relative;
  z-index: 1;
}

.almighty-tagline {
  font-family: var(--font-heading, system-ui, sans-serif);
  font-size: clamp(20px, 5.5vw, 36px);
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-top: 10px;
  width: 100%;
  background: linear-gradient(135deg, #ffffff 0%, #fef08a 35%, #fbbf24 70%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 16px rgba(245, 158, 11, 0.35));
  line-height: 1.15;
}

.almighty-subhook {
  font-size: clamp(12.5px, 3.2vw, 16px);
  font-weight: 600;
  color: #c7d2fe;
  letter-spacing: 0.04em;
  margin-top: 4px;
  line-height: 1.4;
  max-width: 580px;
}

.almighty-hero-desc {
  color: #94a3b8;
  font-size: clamp(13px, 3.2vw, 15px);
  line-height: 1.65;
  max-width: 620px;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}

.btn-almighty-cta {
  padding: 13px 30px !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  letter-spacing: 0.03em !important;
  height: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 9px !important;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%) !important;
  border: 1px solid rgba(251, 191, 36, 0.5) !important;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-almighty-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

.btn-almighty-secondary {
  padding: 13px 22px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  height: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: rgba(15, 23, 42, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #e2e8f0 !important;
  backdrop-filter: blur(10px) !important;
}

.btn-almighty-secondary:hover {
  background: rgba(30, 41, 59, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  color: white !important;
}

.almighty-feature-card {
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.almighty-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.5), 0 0 20px rgba(245, 158, 11, 0.15);
}

/* General Catalog Card Grids (Shop & Coaching) */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  width: 100%;
  max-width: 900px;
  margin: 20px auto 0 auto;
  box-sizing: border-box;
}

.catalog-card {
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: var(--border-radius-lg, 12px);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
  transition: all var(--transition-medium, 0.25s) ease;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.catalog-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-color-active, rgba(99, 102, 241, 0.4));
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.15);
  background: rgba(30, 41, 59, 0.7);
}

.catalog-card-image-placeholder {
  width: 100%;
  height: 160px;
  border-radius: var(--border-radius-md, 8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  position: relative;
}

.catalog-card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.4);
  line-height: 1.2;
  pointer-events: none;
}

.catalog-card > .catalog-card-badge {
  top: 36px;
  right: 36px;
}

.catalog-card-image-placeholder > .catalog-card-badge {
  top: 12px;
  right: 12px;
}

.catalog-card-price {
  font-size: 20px;
  font-weight: 800;
  color: #fbbf24; /* Amber Gold color */
  display: flex;
  align-items: center;
  gap: 6px;
}

.catalog-features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 12.5px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.catalog-features-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.catalog-features-list li svg {
  color: var(--accent-success, #10b981);
  flex-shrink: 0;
}

.shop-crystals-pill {
  transition: all 0.2s ease;
  user-select: none;
}

.shop-crystals-pill:hover {
  background: rgba(168, 85, 247, 0.22) !important;
  border-color: rgba(168, 85, 247, 0.5) !important;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.25);
}

/* Dashboard Shop Tab Navigation, Profile Sub-Nav & Manage Sub-Nav */
.dashboard-sub-nav,
.profile-sub-nav,
.manage-sub-nav {
  display: flex;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md, 10px);
  padding: 4px;
  gap: 4px;
  margin-bottom: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.dashboard-sub-nav::-webkit-scrollbar,
.profile-sub-nav::-webkit-scrollbar,
.manage-sub-nav::-webkit-scrollbar {
  display: none;
}

.profile-tab-panel,
.manage-tab-panel {
  display: none;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}

.profile-tab-panel.active,
.manage-tab-panel.active {
  display: flex;
}

/* Ensure direct top-level section cards inside view containers & tab panels do not have conflicting vertical margins */
.view-container > .glass-panel,
.view-container > .profile-card,
.view-container > .ai-ea-card,
.view-container > .profile-sub-nav,
.view-container > .manage-sub-nav,
.view-container > .dashboard-sub-nav,
.profile-tab-panel > .glass-panel,
.profile-tab-panel > .milestones-card,
.profile-tab-panel > div,
.manage-tab-panel > .glass-panel,
.manage-tab-panel > .profile-card,
.manage-tab-panel > div {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.sub-nav-item {
  flex: 1 1 0px;
  min-width: 0;
  text-align: center;
  padding: 8px 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast) ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.sub-nav-item:hover {
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.sub-nav-item.active {
  color: white;
  background: var(--accent-primary-gradient, linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%));
  box-shadow: 0 4px 12px var(--accent-primary-shadow, rgba(99, 102, 241, 0.3));
}

body.light-theme .sub-nav-item {
  color: #475569 !important;
}

body.light-theme .sub-nav-item:hover {
  color: #09090b !important;
  background: rgba(226, 232, 240, 0.9) !important;
}

body.light-theme .sub-nav-item.active {
  color: #ffffff !important;
  background: var(--accent-primary-gradient, linear-gradient(135deg, #dc2626 0%, #b91c1c 100%)) !important;
  box-shadow: 0 4px 12px var(--accent-primary-shadow, rgba(220, 38, 38, 0.25)) !important;
}

/* Theme overrides for active sub nav */
body.adventurer-theme .sub-nav-item.active {
  background: var(--accent-primary-gradient) !important;
  box-shadow: 0 4px 12px rgba(163, 112, 85, 0.3) !important;
}
body.cultivator-theme .sub-nav-item.active {
  background: var(--accent-primary-gradient) !important;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3) !important;
}
body.player-theme .sub-nav-item.active {
  background: var(--accent-primary-gradient) !important;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3) !important;
}

/* Responsive scrollable sub-nav carousel optimization for mobile screens */
@media (max-width: 600px) {
  .dashboard-sub-nav,
  .profile-sub-nav,
  .manage-sub-nav {
    display: flex !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px !important;
    padding: 5px !important;
    flex-wrap: nowrap !important;
  }
  .dashboard-sub-nav .sub-nav-item,
  .profile-sub-nav .sub-nav-item,
  .manage-sub-nav .sub-nav-item {
    flex: 0 0 auto !important;
    min-width: fit-content !important;
    padding: 8px 14px !important;
    font-size: 12px !important;
    gap: 6px !important;
    letter-spacing: 0px !important;
    scroll-snap-align: start;
    white-space: nowrap !important;
    text-overflow: clip !important;
    overflow: visible !important;
  }
  .dashboard-sub-nav .sub-nav-item svg,
  .dashboard-sub-nav .sub-nav-item i,
  .profile-sub-nav .sub-nav-item svg,
  .profile-sub-nav .sub-nav-item i,
  .manage-sub-nav .sub-nav-item svg,
  .manage-sub-nav .sub-nav-item i {
    width: 14px !important;
    height: 14px !important;
    flex-shrink: 0;
  }
}

/* Accessibility: Ensure high contrast for checklist settings button */
#manage-checklist-btn {
  color: var(--text-main) !important;
}


/* Profile Action Buttons (Edit/Delete Profile) */
.profile-action-btn {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--border-radius-sm);
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  font-family: var(--font-body);
  transition: all var(--transition-fast);
  text-transform: uppercase;
  white-space: nowrap;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#edit-client-btn.profile-action-btn,
#profile-settings-btn.profile-action-btn {
  border: 1px solid var(--accent-primary);
  color: var(--accent-primary);
}

#edit-client-btn.profile-action-btn:hover,
#profile-settings-btn.profile-action-btn:hover {
  background: var(--accent-primary);
  color: white;
}

#delete-client-btn.profile-action-btn {
  border: 1px solid var(--accent-danger);
  color: var(--accent-danger);
}

#delete-client-btn.profile-action-btn:hover {
  background: var(--accent-danger);
  color: white;
}

/* Header Notifications & Responsive Header Controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.notifications-header-btn-container {
  display: flex;
  align-items: center;
  transition: transform var(--transition-fast);
}
.notifications-header-btn-container:hover {
  transform: translateY(-1px);
}
.notifications-header-btn-container:hover .notif-letter-box {
  background: rgba(99, 102, 241, 0.3) !important;
  border-color: rgba(99, 102, 241, 0.6) !important;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.5) !important;
}
.notifications-header-btn-container:hover .notif-text-banner {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.35) 0%, rgba(139, 92, 246, 0.25) 100%) !important;
  border-color: rgba(99, 102, 241, 0.5) !important;
}

/* Mobile responsive fixes for Top Header elements (spillover prevention) */
@media (max-width: 600px) {
  header.app-top-header {
    padding: 8px 10px !important;
  }

  .header-top-row {
    gap: 4px !important;
  }

  .brand,
  .landing-brand-lockup {
    gap: 6px !important;
  }

  .brand-logo,
  .logo-brushed-metal {
    width: 28px !important;
    height: 28px !important;
    border-radius: 7.5px !important;
  }

  .logo-brushed-metal svg,
  .logo-brushed-metal i {
    width: 13px !important;
    height: 13px !important;
  }

  .brand-title-fitness {
    font-size: 13.5px !important;
  }

  .brand-sub-quest,
  .brand-sub-godquest {
    font-size: 8px !important;
    letter-spacing: 0.22em !important;
    text-indent: 0.22em !important;
  }

  .brand-title-spatial {
    font-size: 13px !important;
  }

  .brand-sub-spatial {
    font-size: 7px !important;
  }

  .header-controls {
    gap: 4px !important;
  }

  .metallic-pin {
    height: 26px !important;
    padding: 0 7px !important;
    font-size: 10.5px !important;
    gap: 4px !important;
    border-radius: 9px !important;
  }

  .metallic-pin svg,
  .metallic-pin i {
    width: 12px !important;
    height: 12px !important;
  }

  .mode-capsule-pin {
    height: 26px !important;
    padding: 0 7px !important;
    font-size: 10px !important;
    gap: 3.5px !important;
    border-radius: 9px !important;
  }

  .mode-capsule-pin #mode-capsule-icon {
    width: 11px !important;
    height: 11px !important;
  }

  #header-logout-btn,
  #header-theme-toggle-btn {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
  }

  #header-logout-btn svg,
  #header-logout-btn i,
  #header-theme-toggle-btn svg,
  #header-theme-toggle-btn i {
    width: 12px !important;
    height: 12px !important;
  }
}

@media (max-width: 480px) {
  header.app-top-header {
    padding: 8px 10px !important;
  }

  .header-top-row {
    gap: 6px !important;
  }

  .brand,
  .landing-brand-lockup {
    gap: 6px !important;
  }

  .brand-logo,
  .logo-brushed-metal {
    width: 28px !important;
    height: 28px !important;
    border-radius: 7px !important;
  }

  .logo-brushed-metal svg,
  .logo-brushed-metal i {
    width: 14px !important;
    height: 14px !important;
  }

  .brand-title-fitness {
    font-size: 12.5px !important;
  }

  .brand-sub-quest,
  .brand-sub-godquest {
    font-size: 7.5px !important;
    letter-spacing: 0.22em !important;
    text-indent: 0.22em !important;
  }

  .brand-title-spatial {
    font-size: 13px !important;
  }

  .brand-sub-spatial {
    display: none !important;
  }

  .header-controls {
    gap: 5px !important;
  }

  .header-alerts-label,
  .header-rewards-label {
    display: none !important;
  }

  .metallic-pin {
    height: 32px !important;
    padding: 0 8px !important;
    font-size: 11px !important;
    gap: 4px !important;
    border-radius: 8px !important;
  }

  .mode-capsule-pin {
    height: 32px !important;
    padding: 0 8px !important;
    font-size: 11px !important;
    gap: 4px !important;
    border-radius: 8px !important;
  }

  .mode-capsule-switch-icon {
    display: none !important;
  }

  #header-logout-btn,
  #header-theme-toggle-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
  }

  #header-logout-btn svg,
  #header-logout-btn i,
  #header-theme-toggle-btn svg,
  #header-theme-toggle-btn i {
    width: 13px !important;
    height: 13px !important;
  }
}

@media (max-width: 390px) {
  header.app-top-header {
    padding: 6px 8px !important;
  }

  .brand-title-fitness {
    font-size: 11.5px !important;
  }

  .brand-sub-quest,
  .brand-sub-godquest {
    font-size: 7px !important;
    letter-spacing: 0.22em !important;
    text-indent: 0.22em !important;
  }

  .brand-title-spatial {
    font-size: 12px !important;
  }

  .metallic-pin {
    height: 30px !important;
    padding: 0 6px !important;
    font-size: 10px !important;
    gap: 3px !important;
  }

  .mode-capsule-pin {
    height: 30px !important;
    padding: 0 6px !important;
    font-size: 10px !important;
    gap: 3px !important;
  }

  #header-logout-btn {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
  }
}

/* Dynamic Collision Avoidance: Offset Assistant FAB when Minimized Workout Overlay is Active */
body.has-minimized-workout .vea-fab-trigger,
body:has(#live-workout-bar:not([style*="display: none"])) .vea-fab-trigger {
  bottom: 148px !important;
  transition: bottom 0.28s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s ease, opacity 0.2s ease;
}

/* Responsive Modal Padding Optimization on Mobile Viewports */
@media (max-width: 480px) {
  .modal-content {
    padding: 14px 16px !important;
    width: 95% !important;
    max-height: 92vh !important;
  }
  .routine-builder-workspace.modal-content {
    padding: 0 !important;
    width: 100vw !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
  }
}

/* Standardized Onboarding Step Footer */
.onboard-step-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
  gap: 12px;
  width: 100%;
}

/* Routine Card Kebab Menu & Popover */
.routine-kebab-container {
  position: relative;
  display: inline-block;
}
.routine-kebab-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--border-radius-md, 8px);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  min-width: 160px;
  z-index: 100;
  display: none;
  flex-direction: column;
  padding: 4px;
}
.routine-kebab-dropdown.active {
  display: flex;
}
.routine-kebab-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background 0.15s, color 0.15s;
}
.routine-kebab-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}
.routine-kebab-item.danger {
  color: #f87171;
}
.routine-kebab-item.danger:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}
.routine-kebab-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 0;
}


/* PRESCRIBED VS LOGGED COMPARISON DASHBOARD STYLES */
.pvl-metric-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md, 8px);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s, border-color 0.2s;
}
.pvl-metric-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
}
.pvl-metric-title {
  font-size: 11px;
  color: var(--text-secondary, #94a3b8);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.pvl-metric-value {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}
.pvl-metric-sub {
  font-size: 10.5px;
  color: #a5b4fc;
  font-weight: 500;
}

.pvl-ex-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pvl-ex-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 8px;
}
.pvl-ex-title {
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pvl-table-wrapper {
  overflow-x: auto;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(10, 15, 30, 0.5);
}
.pvl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  text-align: left;
}
.pvl-table th {
  background: rgba(30, 41, 59, 0.8);
  color: #94a3b8;
  font-weight: 700;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.pvl-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: #cbd5e1;
}
.pvl-table tr:last-child td {
  border-bottom: none;
}
.pvl-table tr:hover td {
  background: rgba(99, 102, 241, 0.05);
}

.pvl-badge-exceeded {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.pvl-badge-match {
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.pvl-badge-under {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.pvl-badge-missed {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* AI CHATBOT INTERACTIVE STYLES */
.ai-chip-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.ai-chip-btn {
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: #e2e8f0;
  font-size: 12px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.ai-chip-btn:hover {
  background: var(--accent-primary-gradient);
  border-color: var(--accent-primary);
  color: white;
  transform: translateY(-1px);
}

.ai-chip-btn.selected {
  background: var(--accent-primary);
  border-color: #818cf8;
  color: white;
  font-weight: 700;
}

.ai-notice-box {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fcd34d;
  padding: 10px 12px;
  border-radius: var(--border-radius-md);
  font-size: 12px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-locked-box {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 14px 16px;
  border-radius: var(--border-radius-md);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.ai-preview-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 12px;
  margin-top: 10px;
}

/* Analytics Minitab Exclamation Notifier */
.tab-exclamation-notifier {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ef4444;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  margin-left: 6px;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
  animation: pulse-exclamation-notifier 1.8s infinite;
  vertical-align: middle;
}

@keyframes pulse-exclamation-notifier {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ================= CLEAN MATTE DAILY WEIGHT ENTRY & TRACKER STYLES ================= */
.weight-tracker-panel {
  background: #0f172a !important;
  border: 1px solid #334155 !important;
  border-radius: var(--border-radius-md, 12px) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
  position: relative;
}

.weight-tracker-panel .onboard-collapsible-body {
  max-height: none !important;
  overflow: visible !important;
  padding: 0 !important;
  opacity: 1;
  pointer-events: auto;
}

.weight-tracker-panel .onboard-collapsible-body.collapsed {
  display: none !important;
  max-height: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.weight-header-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #1e293b;
  border: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary, #6366f1);
  flex-shrink: 0;
}

.weight-kpi-pill {
  background: #1e293b;
  color: var(--text-secondary, #94a3b8);
  border: 1px solid #334155;
  font-size: 11px;
  padding: 3px 9px;
  font-weight: 600;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.2px;
}

.weight-kpi-trend {
  color: #34d399;
}

.weight-kpi-trend.trend-up {
  color: #fb7185;
}

.weight-kpi-trend.trend-neutral {
  color: #94a3b8;
}

/* Opaque Matte Hero Entry Container */
.weight-hero-container {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: var(--border-radius-md, 10px);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.weight-hero-main-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.weight-hero-input-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex: 1;
  min-width: 140px;
}

.weight-hero-input {
  background: transparent;
  border: none;
  font-size: 42px;
  font-weight: 800;
  color: #ffffff;
  width: 100%;
  max-width: 220px;
  padding: 0;
  line-height: 1;
  outline: none;
  font-family: inherit;
  letter-spacing: -1px;
}

.weight-hero-input::placeholder {
  color: #475569;
}

.weight-hero-unit-label {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-secondary, #94a3b8);
}

.weight-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.weight-steppers-group {
  display: inline-flex;
  align-items: center;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.weight-stepper-btn {
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.weight-stepper-btn:hover {
  background: #334155;
  color: #ffffff;
}

.weight-stepper-btn:active {
  transform: scale(0.92);
}

.weight-stepper-btn svg,
.weight-stepper-btn i {
  width: 15px;
  height: 15px;
}

/* Segmented Unit Switcher */
.weight-segmented-toggle {
  display: inline-flex;
  align-items: center;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
  user-select: none;
}

.weight-seg-btn {
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
}

.weight-seg-btn:hover {
  color: #ffffff;
}

.weight-seg-btn.active {
  background: #ffffff;
  color: #0f172a;
  font-weight: 800;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* Second Row: Context Controls */
.weight-controls-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  align-items: flex-end;
  padding-top: 10px;
  border-top: 1px solid rgba(51, 65, 85, 0.6);
}

.weight-ctrl-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.weight-ctrl-label {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.weight-ctrl-input {
  background: #0f172a !important;
  border: 1px solid #334155 !important;
  border-radius: 6px !important;
  color: #ffffff !important;
  padding: 7px 10px !important;
  font-size: 12px !important;
  outline: none !important;
  transition: border-color 0.15s ease;
  width: 100%;
  box-sizing: border-box;
}

.weight-ctrl-input:focus {
  border-color: var(--accent-primary, #6366f1) !important;
}

/* Post-Toilet Modern Toggle Switch */
.weight-switch-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  height: 32px;
  user-select: none;
}

.weight-switch-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.weight-switch-slider {
  width: 38px;
  height: 20px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 20px;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.weight-switch-slider::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  left: 2px;
  top: 2px;
  background: #94a3b8;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.weight-switch-checkbox:checked + .weight-switch-slider {
  background: var(--accent-primary, #6366f1);
  border-color: var(--accent-primary, #6366f1);
}

.weight-switch-checkbox:checked + .weight-switch-slider::before {
  transform: translateX(18px);
  background: #ffffff;
}

.weight-switch-text {
  font-size: 12px;
  color: #e2e8f0;
  font-weight: 600;
}

/* Fluid Presets */
.weight-fluid-presets {
  display: inline-flex;
  align-items: center;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
  flex-wrap: wrap;
}

.weight-preset-chip {
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.weight-preset-chip:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.weight-preset-chip.active {
  background: #334155;
  color: #38bdf8;
  font-weight: 700;
}

/* Main CTA Button */
.weight-log-cta-btn {
  width: 100%;
  padding: 10px 16px;
  background: var(--accent-primary, #6366f1);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  letter-spacing: 0.3px;
}

.weight-log-cta-btn:hover {
  background: #4f46e5;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.weight-log-cta-btn:active {
  transform: scale(0.99);
}

/* Timeline History List & Rows */
.weight-history-section {
  border-top: 1px solid #334155;
  padding-top: 14px;
  margin-top: 4px;
}

.weight-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.weight-history-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.weight-select-all-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
}

.weight-custom-checkbox {
  cursor: pointer;
  width: 15px;
  height: 15px;
  accent-color: var(--accent-primary, #6366f1);
}

.weight-count-badge {
  background: #1e293b;
  color: #94a3b8;
  border: 1px solid #334155;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.weight-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
}

.weight-history-row {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: border-color 0.15s ease;
}

.weight-history-row:hover {
  border-color: #475569;
}

.weight-history-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}

.weight-history-val-block {
  display: flex;
  align-items: center;
  gap: 8px;
}

.weight-history-val-main {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
}

.weight-history-val-sub {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}

.weight-delta-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.weight-delta-badge.down {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.weight-delta-badge.up {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.weight-delta-badge.neutral {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.weight-history-date-time {
  font-size: 11px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.weight-tag-chip {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: #0f172a;
  border: 1px solid #334155;
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.weight-tag-chip.toilet {
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.4);
}

.weight-tag-chip.fluid {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
}

.weight-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.weight-action-btn {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #cbd5e1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.weight-action-btn:hover {
  background: #334155;
  color: #ffffff;
}

.weight-action-btn.delete:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}

/* ================= AI EXECUTIVE ASSISTANT (EA) STYLES ================= */
/* ================= AI EXECUTIVE ASSISTANT (EA) STYLES ================= */
.ai-ea-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.75) 0%, rgba(15, 23, 42, 0.9) 100%) !important;
  border: 1px solid var(--border-color, rgba(239, 68, 68, 0.3)) !important;
  border-radius: var(--border-radius-md, 12px) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 0 15px var(--accent-primary-shadow, rgba(239, 68, 68, 0.15)) !important;
  transition: all var(--transition-medium, 0.25s) ease;
}

.ai-ea-card:hover {
  border-color: var(--border-color-active, rgba(239, 68, 68, 0.5)) !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45), 0 0 22px var(--accent-primary-shadow-hover, rgba(239, 68, 68, 0.25)) !important;
}

body.light-theme .ai-ea-card {
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06), 0 0 15px rgba(220, 38, 38, 0.06) !important;
}

body.light-theme .ai-ea-card:hover {
  border-color: rgba(220, 38, 38, 0.4) !important;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.08), 0 0 20px rgba(220, 38, 38, 0.12) !important;
}

/* Circular Neon Glowing Avatar for VEA */
.vea-avatar-ring-outer {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  padding: 2.5px;
  background: linear-gradient(135deg, #334155 0%, #0f172a 50%, #1e293b 100%);
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.7),
    0 0 16px var(--accent-primary-shadow, rgba(239, 68, 68, 0.35)),
    inset 0 1px 1px rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.vea-avatar-ring-neon {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  padding: 2px;
  background: var(--accent-primary-gradient, linear-gradient(135deg, #ef4444 0%, #ff0055 50%, #f59e0b 100%));
  box-shadow: 0 0 14px var(--accent-primary-shadow, rgba(239, 68, 68, 0.8)), inset 0 0 6px var(--accent-primary-shadow, rgba(239, 68, 68, 0.6));
  display: flex;
  align-items: center;
  justify-content: center;
  animation: veaNeonBreathing 3s ease-in-out infinite alternate;
}

.vea-avatar-ring-outer.has-critical-alerts .vea-avatar-ring-neon {
  background: linear-gradient(135deg, #ff0000 0%, #ef4444 50%, #dc2626 100%) !important;
  animation: veaCriticalPulse 1.5s ease-in-out infinite !important;
}

@keyframes veaNeonBreathing {
  0% {
    filter: drop-shadow(0 0 3px rgba(239, 68, 68, 0.6));
  }
  100% {
    filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.95)) drop-shadow(0 0 4px rgba(251, 191, 36, 0.5));
  }
}

@keyframes veaCriticalPulse {
  0%, 100% {
    filter: drop-shadow(0 0 4px rgba(239, 68, 68, 0.7));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 16px rgba(239, 68, 68, 1)) drop-shadow(0 0 8px rgba(255, 0, 0, 0.8));
    transform: scale(1.03);
  }
}

.vea-avatar-ring-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #1e293b 0%, #090d16 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.vea-avatar-ring-inner img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.ea-mascot-btn {
  background: transparent;
  color: var(--text-secondary, #94a3b8);
  transition: all var(--transition-fast, 0.15s) ease;
}

.ea-mascot-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.ea-mascot-btn.active {
  background: var(--accent-primary-gradient, linear-gradient(135deg, #ef4444 0%, #dc2626 100%)) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px var(--accent-primary-shadow, rgba(239, 68, 68, 0.4)) !important;
}

#ai-ea-settings-btn:hover,
#ai-ea-body-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

/* Action Micro-Grid */
.vea-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  width: 100%;
}

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

.vea-action-btn-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  box-sizing: border-box;
}

.vea-action-btn-card:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent-primary-hover, rgba(239, 68, 68, 0.5));
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.vea-action-btn-card.highlight-red {
  border-color: var(--accent-primary-shadow-hover, rgba(239, 68, 68, 0.4));
  background: linear-gradient(135deg, var(--accent-primary-shadow, rgba(239, 68, 68, 0.18)), rgba(0, 0, 0, 0.2));
  color: var(--text-main, #fca5a5);
}
.vea-action-btn-card.highlight-blue {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
}
.vea-action-btn-card.highlight-amber {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
}
.vea-action-btn-card.highlight-emerald {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
}

/* VEA Revenue Radar Styles */
.vea-revenue-period-btn {
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(30, 41, 59, 0.5);
  color: #94a3b8;
  white-space: nowrap;
}
.vea-revenue-period-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
}
.vea-revenue-period-btn.active {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.18);
}
.vea-revenue-kpi-card {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.7);
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
}
.vea-revenue-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.vea-revenue-table th {
  padding: 10px 12px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.4);
}
.vea-revenue-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}
.vea-revenue-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}


/* Dynamic Filter Chips & Edge-Fade Masking */
.vea-radar-filters-wrapper {
  overflow-x: auto;
  -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
  mask-image: linear-gradient(to right, black 85%, transparent 100%);
  padding-right: 12px;
  display: flex;
  gap: 4px;
  align-items: center;
}

.vea-filter-pill {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary, #94a3b8);
  border-radius: 14px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.vea-filter-pill.active {
  background: var(--accent-primary-shadow, rgba(239, 68, 68, 0.2));
  border-color: var(--border-color-active, rgba(239, 68, 68, 0.5));
  color: var(--accent-primary, #f87171);
}

.vea-filter-pill.zero-count {
  display: none !important;
}

/* Two-tier Structured Alert Cards */
.ai-ea-alert-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
}

.ai-ea-alert-card:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(239, 68, 68, 0.35);
  transform: translateX(2px);
}

.vea-client-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.vea-client-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  width: 100%;
}

.vea-meta-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.vea-meta-chip.chip-primary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}
.vea-meta-chip.chip-accent {
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  font-weight: 700;
}

.ai-ea-alert-card.severity-high {
  border-left: 4px solid #ef4444;
}

.ai-ea-alert-card.severity-medium {
  border-left: 4px solid #f59e0b;
}

.ai-ea-alert-card.severity-low {
  border-left: 4px solid #3b82f6;
}

.ai-ea-alert-card.severity-injury {
  border-left: 4px solid #ef4444;
  background: rgba(239, 68, 68, 0.08);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.12);
}

.ai-ea-alert-card.severity-renewal {
  border-left: 4px solid #f59e0b;
  background: rgba(245, 158, 11, 0.06);
}

.ai-ea-alert-card.severity-overload {
  border-left: 4px solid #a855f7;
  background: rgba(168, 85, 247, 0.06);
}

.ai-ea-alert-card.severity-debrief {
  border-left: 4px solid #3b82f6;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.2), rgba(15, 23, 42, 0.65));
}

.ai-ea-alert-card.severity-adaptive {
  border-left: 4px solid #ef4444;
  background: linear-gradient(135deg, rgba(185, 28, 28, 0.18), rgba(15, 23, 42, 0.65));
}

.ai-ea-badge-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.ai-ea-badge-tag.tag-weighin {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.ai-ea-badge-tag.tag-workout {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.ai-ea-badge-tag.tag-login {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.ai-ea-badge-tag.tag-injury {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
  animation: vea-pulse 2s infinite ease-in-out;
}

.ai-ea-badge-tag.tag-renewal {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.ai-ea-badge-tag.tag-overload {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.ai-ea-badge-tag.tag-debrief {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.ai-ea-badge-tag.tag-adaptive {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.ai-ea-action-btn {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(30, 41, 59, 0.8);
  color: #e2e8f0;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ai-ea-action-btn:hover {
  background: var(--accent-primary, #ef4444);
  color: #ffffff;
  border-color: var(--accent-primary, #ef4444);
}

/* Sleek Low-Opacity Scrollbars */
#ai-ea-client-list,
.vea-radar-filters-wrapper {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

#ai-ea-client-list::-webkit-scrollbar,
.vea-radar-filters-wrapper::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

#ai-ea-client-list::-webkit-scrollbar-track,
.vea-radar-filters-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

#ai-ea-client-list::-webkit-scrollbar-thumb,
.vea-radar-filters-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

#ai-ea-client-list::-webkit-scrollbar-thumb:hover,
.vea-radar-filters-wrapper::-webkit-scrollbar-thumb:hover {
  background: rgba(239, 68, 68, 0.4);
}

/* Floating Assistant Trigger (FAB) */
.vea-fab-trigger {
  position: fixed;
  bottom: 74px;
  right: 18px;
  z-index: 1900;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.88);
  border: 1.5px solid var(--accent-primary, #ef4444);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 6px 12px 6px 6px;
  border-radius: 28px;
  color: white;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 16px rgba(239, 68, 68, 0.35);
  transition: all 0.2s ease;
}

.vea-fab-trigger:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 22px rgba(239, 68, 68, 0.5);
}

.vea-fab-icon-box {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: visible;
}

.vea-fab-icon-box img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.vea-fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: white;
  font-size: 10px;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 1.5px solid #0f172a;
}

.vea-fab-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* Voice Dictation Waveform */
.vea-voice-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 24px;
  margin-top: 4px;
}

.vea-voice-wave span {
  display: block;
  width: 4px;
  height: 12px;
  background: #ef4444;
  border-radius: 2px;
  animation: vea-wave 1.2s infinite ease-in-out;
}

.vea-voice-wave span:nth-child(2) { animation-delay: 0.15s; height: 18px; }
.vea-voice-wave span:nth-child(3) { animation-delay: 0.3s; height: 24px; }
.vea-voice-wave span:nth-child(4) { animation-delay: 0.45s; height: 16px; }
.vea-voice-wave span:nth-child(5) { animation-delay: 0.6s; height: 10px; }

@keyframes vea-wave {
  0%, 100% { transform: scaleY(0.4); opacity: 0.5; }
  50% { transform: scaleY(1.2); opacity: 1; }
}

@keyframes vea-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 8px 2px rgba(239, 68, 68, 0.4); }
}

/* VEA Debrief & Adaptive Category Cards */
.ai-ea-alert-card.severity-debrief {
  border-color: rgba(59, 130, 246, 0.45);
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.28), rgba(15, 23, 42, 0.65));
}
.ai-ea-alert-card.severity-adaptive {
  border-color: rgba(239, 68, 68, 0.45);
  background: linear-gradient(135deg, rgba(185, 28, 28, 0.22), rgba(15, 23, 42, 0.65));
}

.ai-ea-badge-tag.tag-debrief {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
}
.ai-ea-badge-tag.tag-adaptive {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.vea-diff-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}
.vea-diff-pill.load-up {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.vea-diff-pill.hold-load {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.vea-diff-pill.deload {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

/* VEA Daily Welcome Back Briefing Modal */
.vea-welcome-avatar-wrapper img {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.vea-welcome-avatar-wrapper:hover img {
  transform: scale(1.05);
}
.vea-welcome-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (max-width: 480px) {
  .vea-welcome-grid {
    grid-template-columns: 1fr;
  }
}
.vea-welcome-stat-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.vea-welcome-stat-card:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(255, 255, 255, 0.18);
}
.vea-welcome-stat-card.alert-highlight {
  border-color: rgba(239, 68, 68, 0.35);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(15, 23, 42, 0.7));
}
.vea-welcome-stat-card.success-highlight {
  border-color: rgba(16, 185, 129, 0.35);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(15, 23, 42, 0.7));
}
.vea-welcome-stat-val {
  font-size: 20px;
  font-weight: 800;
  color: white;
  display: flex;
  align-items: center;
  gap: 6px;
}
.vea-welcome-stat-lbl {
  font-size: 11px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.vea-welcome-quote-box {
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid #ef4444;
  border-radius: 0 8px 8px 0;
  padding: 10px 14px;
  font-size: 12px;
  color: #cbd5e1;
  font-style: italic;
  line-height: 1.45;
}

/* VEA Capabilities Guide & Tutorial Modal */
.vea-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
@media (max-width: 520px) {
  .vea-guide-grid {
    grid-template-columns: 1fr;
  }
}
.vea-guide-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.vea-guide-card:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.vea-guide-card.highlight-blue {
  border-color: rgba(59, 130, 246, 0.35);
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.2), rgba(15, 23, 42, 0.65));
}
.vea-guide-card.highlight-red {
  border-color: rgba(239, 68, 68, 0.35);
  background: linear-gradient(135deg, rgba(185, 28, 28, 0.15), rgba(15, 23, 42, 0.65));
}
.vea-guide-card.highlight-purple {
  border-color: rgba(168, 85, 247, 0.35);
  background: linear-gradient(135deg, rgba(126, 34, 206, 0.15), rgba(15, 23, 42, 0.65));
}
.vea-guide-card.highlight-amber {
  border-color: rgba(245, 158, 11, 0.35);
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.15), rgba(15, 23, 42, 0.65));
}
.vea-guide-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.vea-guide-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
}
.vea-guide-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: white;
  margin: 0;
}
.vea-guide-card-desc {
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.45;
  margin: 0;
  flex: 1;
}
.vea-guide-key-benefit {
  font-size: 11px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 8px;
  border-radius: 6px;
  border-left: 2px solid var(--accent-primary, #ef4444);
}
.vea-guide-card-action {
  margin-top: 4px;
  display: flex;
  justify-content: flex-end;
}

/* Debrief Redirection Highlight Pulse */
@keyframes highlightPulseGlow {
  0% {
    box-shadow: 0 0 0 rgba(99, 102, 241, 0);
    border-color: rgba(99, 102, 241, 0.4);
  }
  30% {
    box-shadow: 0 0 24px rgba(99, 102, 241, 0.7), inset 0 0 12px rgba(99, 102, 241, 0.3);
    border-color: #818cf8;
  }
  60% {
    box-shadow: 0 0 28px rgba(99, 102, 241, 0.85), inset 0 0 16px rgba(99, 102, 241, 0.4);
    border-color: #a5b4fc;
  }
  100% {
    box-shadow: 0 0 0 rgba(99, 102, 241, 0);
    border-color: rgba(255, 255, 255, 0.08);
  }
}

.highlight-pulse-glow {
  animation: highlightPulseGlow 3s ease-in-out forwards !important;
  scroll-margin-top: 100px;
}

/* Categorized Muscle Group Section */
.muscle-category-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.muscle-category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.muscle-category-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(30, 41, 59, 0.3);
  padding: 8px;
  border-radius: var(--border-radius-sm, 6px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Custom Toggle Switch Component */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
  flex-shrink: 0;
  margin: 0;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(51, 65, 85, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 22px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.toggle-slider::before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: #cbd5e1;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--accent-primary, #ef4444);
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.35);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
  background-color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.toggle-switch input:focus-visible + .toggle-slider {
  outline: 2px solid var(--accent-primary, #ef4444);
  outline-offset: 2px;
}

/* Reduced motion & power saver hardware acceleration fallback */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ================= WORKOUT HISTORY SESSION TIMELINE ================= */
.workout-timeline-drawer {
  background: var(--bg-surface, rgba(15, 23, 42, 0.7));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: var(--border-radius-md, 12px);
  padding: 14px 16px;
  box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1));
  animation: fadeIn 0.25s ease-out;
}

.timeline-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
}

.timeline-header-title {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-weight: 700;
  font-size: 12.5px;
  color: var(--text-main, #f8fafc);
  display: flex;
  align-items: center;
  gap: 6px;
}

.timeline-filter-pills {
  display: flex;
  gap: 5px;
}

.timeline-filter-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary, #94a3b8);
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition-fast, 0.15s ease);
}

.timeline-filter-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main, #f8fafc);
}

.timeline-filter-pill.active {
  background: var(--accent-primary-gradient, linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%));
  border-color: rgba(99, 102, 241, 0.4);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

.timeline-list {
  position: relative;
  padding-left: 24px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timeline-list::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.4) 0%, rgba(99, 102, 241, 0.4) 50%, rgba(245, 158, 11, 0.4) 100%);
  border-radius: 1px;
}

.timeline-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeline-item-node {
  position: absolute;
  left: -24px;
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

.timeline-item-node.node-set {
  background: rgba(16, 185, 129, 0.2);
  border: 1.5px solid #10b981;
  color: #34d399;
}

.timeline-item-node.node-rest {
  background: rgba(245, 158, 11, 0.2);
  border: 1.5px solid #f59e0b;
  color: #fbbf24;
}

.timeline-item-content {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--border-radius-sm, 8px);
  padding: 8px 12px;
  transition: var(--transition-fast, 0.15s ease);
}

.timeline-item-content:hover {
  background: rgba(30, 41, 59, 0.75);
  border-color: rgba(255, 255, 255, 0.12);
}

.timeline-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  margin-bottom: 3px;
  flex-wrap: wrap;
}

.timeline-item-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.badge-set-completed {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.badge-rest-timer {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.timeline-item-timestamp {
  color: var(--text-secondary, #94a3b8);
  font-size: 10.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.timeline-item-details {
  font-size: 12px;
  color: var(--text-main, #f8fafc);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Admin Impersonation Banner */
#admin-impersonation-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10005;
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.95) 0%, rgba(194, 65, 12, 0.95) 100%);
  backdrop-filter: blur(12px);
  color: #ffffff;
  padding: 8px 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  animation: slideDownBanner 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDownBanner {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.impersonation-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.25);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-exit-impersonation {
  background: #ffffff;
  color: #c2410c;
  border: none;
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.btn-exit-impersonation:hover {
  background: #ffedd5;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   MOBILE-FIRST REST TIMER COMPONENT & MODAL
   ========================================================================== */
.rest-timer-component {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  padding: 18px 16px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), 0 0 20px rgba(245, 158, 11, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  user-select: none;
  box-sizing: border-box;
}

.rest-timer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 12px;
  padding: 0 4px;
}

.rest-timer-title-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 4px 10px;
  border-radius: 12px;
}

.rest-timer-title-badge .pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fbbf24;
  display: inline-block;
  box-shadow: 0 0 8px #fbbf24;
}

.rest-timer-title-badge.active .pulse-dot {
  animation: restTimerPulse 1.2s infinite ease-in-out;
}

@keyframes restTimerPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

/* Progress Ring Container */
.rest-timer-ring-container {
  position: relative;
  width: 190px;
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px 0 14px;
}

.rest-timer-ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  overflow: visible;
}

.rest-timer-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 8;
}

.rest-timer-ring-progress {
  fill: none;
  stroke: #f59e0b;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.35s linear, stroke 0.3s ease;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.5));
}

.rest-timer-ring-progress.resting {
  stroke: #10b981;
  filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.6));
}

.rest-timer-ring-progress.paused {
  stroke: #f59e0b;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.4));
}

.rest-timer-ring-progress.completed {
  stroke: #ef4444;
  filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.7));
}

.rest-timer-ring-center {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.rest-timer-countdown {
  font-family: 'JetBrains Mono', 'Roboto Mono', 'SF Mono', Consolas, monospace;
  font-size: 2.35rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #f8fafc;
  line-height: 1;
  margin-bottom: 4px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.rest-timer-status-pill {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-secondary, #94a3b8);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 8px;
  transition: all 0.25s ease;
}

.rest-timer-status-pill.resting {
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.rest-timer-status-pill.paused {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.rest-timer-status-pill.completed {
  color: #f87171;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

/* Preset Buttons Grid */
.rest-timer-presets-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-bottom: 12px;
}

.rest-timer-presets-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  width: 100%;
}

.rest-timer-preset-btn {
  padding: 8px 0;
  font-size: 11px;
  font-weight: 800;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.85);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rest-timer-preset-btn:hover {
  background: rgba(51, 65, 85, 0.9);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.rest-timer-preset-btn:active {
  transform: scale(0.94);
}

.rest-timer-preset-btn.active {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
  color: #fbbf24;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

/* Quick Adjust Pills */
.rest-timer-adjust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.rest-timer-adjust-btn {
  flex: 1;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.rest-timer-adjust-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.rest-timer-adjust-btn:active {
  transform: scale(0.95);
}

/* Actions Controls */
.rest-timer-actions-row {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
}

.rest-timer-toggle-btn {
  flex: 1;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.rest-timer-toggle-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
}

.rest-timer-toggle-btn:active {
  transform: scale(0.97);
}

.rest-timer-toggle-btn.active {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.4);
}

.rest-timer-toggle-btn.active:hover {
  box-shadow: 0 6px 18px rgba(225, 29, 72, 0.55);
}

.rest-timer-reset-btn {
  padding: 12px 18px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.85);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.rest-timer-reset-btn:hover {
  background: rgba(51, 65, 85, 0.95);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.rest-timer-reset-btn:active {
  transform: scale(0.95);
}

/* Custom duration fold-out */
.rest-timer-custom-row {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.rest-timer-custom-input {
  width: 52px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-color);
  color: white;
  padding: 5px;
  border-radius: 6px;
  font-size: 11px;
  text-align: center;
  outline: none;
}

.rest-timer-custom-input:focus {
  border-color: #f59e0b;
}

/* Dropdown specific compact mode */
#rest-timer-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1100;
  width: 300px;
  max-width: 90vw;
  margin-top: 8px;
  pointer-events: auto;
}

#rest-timer-dropdown.glass-panel {
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

#rest-timer-dropdown .rest-timer-component {
  max-width: 320px;
  padding: 14px 12px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-lg);
  pointer-events: auto;
}

#rest-timer-dropdown .rest-timer-ring-container {
  width: 150px;
  height: 150px;
  margin: 4px 0 10px;
}

#rest-timer-dropdown .rest-timer-countdown {
  font-size: 1.85rem;
}

/* ==========================================================================
   Add / Invite Client Modal Component Styles
   ========================================================================== */

.client-modal-tabs-container button {
  transition: all 0.2s ease;
  white-space: nowrap;
}

.client-modal-tabs-container button.btn-primary {
  background: var(--accent-primary-gradient, linear-gradient(135deg, #6366f1 0%, #4f46e5 100%));
  color: #ffffff;
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.client-modal-tabs-container button.btn-secondary {
  background: rgba(30, 41, 59, 0.6);
  color: var(--text-secondary, #94a3b8);
  border-color: rgba(255, 255, 255, 0.08);
}

.client-modal-tabs-container button.btn-secondary:hover {
  background: rgba(51, 65, 85, 0.8);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.15);
}

#invite-success-code-display {
  transition: all 0.2s ease;
}

#invite-success-code-display:hover {
  background: rgba(15, 23, 42, 0.95);
  border-color: #f59e0b;
}

#copy-invite-code-btn:active,
#copy-invite-link-btn:active {
  transform: scale(0.96);
}

#manage-client-invite-badge {
  animation: pulse-badge 2s infinite ease-in-out;
}

@keyframes pulse-badge {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
  }
  50% {
    opacity: 0.85;
    box-shadow: 0 0 8px 2px rgba(245, 158, 11, 0.2);
  }
}

/* VOLUME HEATMAP ANALYZER & SEGMENTED CONTROLS */
.segmented-control {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-sm, 8px);
  padding: 3px;
  gap: 2px;
}

.segmented-control-btn,
.heatmap-preset-btn,
.manage-heatmap-preset-btn {
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary, #94a3b8);
  cursor: pointer;
  transition: all var(--transition-fast, 0.15s ease);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
  user-select: none;
}

.segmented-control-btn:hover,
.heatmap-preset-btn:hover,
.manage-heatmap-preset-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.segmented-control-btn.active,
.heatmap-preset-btn.active,
.manage-heatmap-preset-btn.active {
  background: #1e1e24 !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.heatmap-custom-date-container {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--border-radius-sm, 8px);
  margin-top: 8px;
  margin-bottom: 8px;
  animation: fadeIn 0.2s ease;
}

/* Metric Badges Strip */
.metric-badge-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.heatmap-metric-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary, #94a3b8);
  transition: all 0.15s ease;
  user-select: none;
}

.heatmap-metric-badge.badge-total {
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.25);
  color: #22d3ee;
  font-weight: 700;
}

.heatmap-metric-badge.badge-normal {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}

.heatmap-metric-badge.badge-drop {
  background: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.25);
  color: #c084fc;
}

.heatmap-metric-badge.badge-failure {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
  color: #f87171;
}

.heatmap-metric-badge.badge-load {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.25);
  color: #34d399;
  font-weight: 700;
}

/* GitHub style Square Activity Tiles */
.heatmap-day-header-cell {
  width: 24px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-muted, #64748b);
  user-select: none;
}

.heatmap-activity-tile {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  user-select: none;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.heatmap-activity-tile:hover {
  transform: scale(1.22);
  z-index: 10;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
  border-color: rgba(6, 182, 212, 0.6) !important;
}

.heatmap-muscle-pill {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 10px;
  min-height: 54px;
  box-sizing: border-box;
  border-radius: var(--border-radius-md, 8px);
  font-size: 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.heatmap-muscle-pill:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: rgba(6, 182, 212, 0.5) !important;
}

.heatmap-muscle-pill:active {
  transform: scale(0.97);
}

.heatmap-empty-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  text-align: center;
  background: rgba(15, 23, 42, 0.4);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--border-radius-lg, 12px);
  gap: 8px;
}

/* Workout History Muscle Group Heatmap */
.workout-history-heatmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
  gap: 6px;
}

.workout-history-heatmap-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 5px 7px;
  border-radius: 5px;
  font-size: 10px;
  box-sizing: border-box;
  min-width: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.workout-history-heatmap-pill.zero-score {
  justify-content: center;
}

.workout-history-heatmap-pill .heatmap-muscle-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
  text-align: left;
  line-height: 1.2;
}

.workout-history-heatmap-pill.zero-score .heatmap-muscle-label {
  text-align: center;
}

.workout-history-heatmap-pill .heatmap-score-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 6px;
  line-height: 1.2;
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Physique Chart Header */
.physique-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.physique-chart-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* App Mode Switcher (Personal vs Coach/Client) */
.app-mode-switcher-container {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  box-sizing: border-box;
}

.mode-pill-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
  white-space: nowrap;
}

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

.mode-pill-btn.active {
  background: var(--accent-primary-gradient);
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 10px var(--accent-primary-shadow);
}

.mode-pill-btn.active i,
.mode-pill-btn.active svg {
  color: white;
}

@media (max-width: 480px) {
  .mode-pill-btn {
    padding: 6px 8px;
    font-size: 11.5px;
    gap: 5px;
  }
}

/* SET COMPLETION STATUS BADGES (C / NC) */
.set-status-badge {
  font-size: 8.5px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 3px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  user-select: none;
}
.set-status-badge.badge-c {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.set-status-badge.badge-nc {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.history-set-badge.is-not-completed {
  opacity: 0.8;
  border-color: rgba(239, 68, 68, 0.2) !important;
}

/* ================= EDIT CLIENT PROFILE MODAL & REFACTOR STYLES ================= */
.edit-profile-modal-container {
  display: flex !important;
  flex-direction: column !important;
  max-width: 520px !important;
  width: 92% !important;
  max-height: 88vh !important;
  max-height: 88dvh !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: var(--border-radius-lg, 18px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: rgba(15, 23, 42, 0.96) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 25px rgba(99, 102, 241, 0.12) !important;
}

.edit-profile-header {
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 16px 20px !important;
  margin-bottom: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(15, 23, 42, 0.75) !important;
}

.edit-profile-title-box {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.edit-profile-icon {
  font-size: 18px;
  color: #fbbf24;
  flex-shrink: 0;
}

.edit-profile-header h3 {
  margin: 0 !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.edit-profile-modal-body {
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  scroll-behavior: smooth !important;
  -webkit-overflow-scrolling: touch !important;
  padding: 20px !important;
}

.edit-profile-footer {
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 12px !important;
  padding: 14px 20px !important;
  margin-top: 0 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(15, 23, 42, 0.95) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

/* Sections & Dividers */
.form-section-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-section-divider {
  border: none !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  margin: 6px 0 !important;
}

.form-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: #94a3b8;
  margin-bottom: 2px;
}

.form-section-header i,
.form-section-header svg {
  width: 14px;
  height: 14px;
  color: var(--accent-primary, #ef4444);
}

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

.form-field-hint {
  display: block;
  font-size: 11px;
  color: var(--text-muted, #64748b);
  margin-top: 4px;
  line-height: 1.35;
}

/* Profile Picture Uploader */
.profile-avatar-uploader {
  cursor: pointer !important;
  margin: 8px auto !important;
  width: 76px !important;
  height: 76px !important;
  font-size: 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background-color: rgba(24, 24, 27, 0.7) !important;
  background-repeat: no-repeat !important;
  border: 2px dashed rgba(255, 255, 255, 0.22) !important;
  border-radius: 50% !important;
  background-size: cover !important;
  background-position: center !important;
  transition: all 0.2s ease !important;
}

.profile-avatar-uploader:hover {
  border-color: var(--accent-primary, #ef4444) !important;
  transform: scale(1.04);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.35);
}

/* Neutral Dark Input Fields & Contrast Rules */
.edit-profile-modal-body .form-input,
.edit-profile-modal-body .form-select,
.edit-profile-modal-body textarea.form-input {
  background: rgba(24, 24, 27, 0.75) !important;
  border: 1px solid #27272a !important; /* Neutral dark gray / border-zinc-800 */
  color: #f4f4f5 !important; /* text-zinc-100 */
  border-radius: var(--border-radius-md, 10px) !important;
  padding: 10px 14px !important;
  font-size: 13px !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.edit-profile-modal-body .form-input::placeholder,
.edit-profile-modal-body textarea.form-input::placeholder {
  color: #71717a !important; /* text-zinc-500 */
  opacity: 1 !important;
}

.edit-profile-modal-body .form-input:focus,
.edit-profile-modal-body .form-select:focus,
.edit-profile-modal-body textarea.form-input:focus {
  border-color: var(--accent-primary, #ef4444) !important;
  background: rgba(24, 24, 27, 0.95) !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25) !important;
}

/* Progression Helper Card (Resolves Dropdown Truncation) */
.progression-helper-card {
  margin-top: 8px;
  padding: 10px 12px;
  background: rgba(24, 24, 27, 0.65);
  border: 1px solid #27272a;
  border-radius: var(--border-radius-sm, 8px);
  font-size: 11.5px;
  transition: all 0.2s ease;
}

.progression-helper-title {
  font-weight: 700;
  color: #f4f4f5;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.progression-helper-desc {
  color: #94a3b8;
  line-height: 1.4;
}

/* FUN RPG Mode Toggle Switch Card */
.rpg-mode-toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  background: rgba(24, 24, 27, 0.75);
  border: 1px solid #27272a;
  border-radius: var(--border-radius-md, 10px);
  transition: border-color 0.2s ease;
}

.rpg-mode-toggle-card:focus-within {
  border-color: var(--accent-primary, #ef4444);
}

.rpg-mode-toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rpg-mode-title {
  font-weight: 700;
  font-size: 13px;
  color: #f4f4f5;
}

.rpg-mode-status-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
}

.rpg-mode-status-badge.badge-enabled {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.rpg-mode-status-badge.badge-disabled {
  background: rgba(113, 113, 122, 0.18);
  color: #a1a1aa;
  border: 1px solid rgba(113, 113, 122, 0.35);
}

.rpg-mode-status-desc {
  font-size: 11.5px;
  color: #71717a;
  margin-top: 3px;
  line-height: 1.35;
}

/* Button Styling (Ghost vs Full-contrast Accent) */
.btn-ghost {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #cbd5e1 !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  padding: 9px 18px !important;
  border-radius: var(--border-radius-md, 10px) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
}

.edit-profile-save-btn {
  background: linear-gradient(135deg, var(--accent-primary, #ef4444), #dc2626) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  padding: 9px 20px !important;
  border-radius: var(--border-radius-md, 10px) !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35) !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  transition: all 0.2s ease !important;
}

.edit-profile-save-btn:hover {
  filter: brightness(1.1) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.5) !important;
}

/* Floating Widgets / Badges Isolation when Modals/Drawers are Active */
body:has(.modal-overlay.active) .vea-fab-trigger,
body.modal-open .vea-fab-trigger,
.modal-overlay.active ~ .vea-fab-trigger,
body:has(.modal-overlay.active) .floating-badge,
body.modal-open .floating-badge {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
  transform: scale(0.85) translateY(10px) !important;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s !important;
}

/* Multi-Select Training Goals Grid in Edit Profile */
.edit-profile-goals-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 4px;
}

.edit-profile-goal-tile {
  border: 1px solid #27272a;
  background: rgba(24, 24, 27, 0.75);
  border-radius: var(--border-radius-md, 10px);
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  text-align: left;
  user-select: none;
}

.edit-profile-goal-tile:hover {
  transform: translateY(-1px);
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(39, 39, 42, 0.85);
}

.edit-profile-goal-tile:focus-visible {
  outline: 2px solid var(--accent-primary, #ef4444);
  outline-offset: 2px;
}

.edit-profile-goal-tile.selected {
  border-color: var(--accent-primary, #ef4444) !important;
  background: rgba(239, 68, 68, 0.12) !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.22) !important;
}

.edit-profile-goal-icon {
  font-size: 18px;
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.edit-profile-goal-label {
  font-size: 12px;
  font-weight: 600;
  color: #f4f4f5;
  line-height: 1.25;
  flex: 1;
  padding-right: 14px;
}

.edit-profile-goal-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 14px;
  height: 14px;
  color: var(--accent-primary, #ef4444);
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.2s ease;
}

.edit-profile-goal-tile.selected .edit-profile-goal-check {
  opacity: 1;
  transform: scale(1);
}

/* Responsive Mobile Layout */
@media (max-width: 600px) {
  .edit-profile-goals-grid {
    grid-template-columns: 1fr;
  }

  .edit-profile-modal-container {
    width: 95% !important;
    max-height: 92vh !important;
    max-height: 92dvh !important;
  }

  .edit-profile-header {
    padding: 14px 16px !important;
  }

  .edit-profile-modal-body {
    padding: 16px !important;
  }

  .form-row-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .edit-profile-footer {
    padding: 12px 16px !important;
  }

  .edit-profile-footer button {
    flex: 1 !important;
    min-height: 42px !important;
  }
}



/* ==========================================================================
   SPATIAL DEPTH ("ANTIGRAVITY") DESIGN SYSTEM EXTENSIONS
   ========================================================================== */

:root {
  --space-surface-obsidian: #090d16;
  --space-surface-card: rgba(15, 23, 42, 0.72);
  --space-surface-console: #080c14;
  --space-surface-steel: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  --space-surface-steel-hover: linear-gradient(180deg, #334155 0%, #1e293b 100%);
  
  --space-crimson-base: #dc2626;
  --space-crimson-bright: #ef4444;
  --space-coral-glow: #fb7185;
  --space-gold-accent: #fbbf24;
  --space-gold-metallic: linear-gradient(135deg, #fef08a 0%, #fbbf24 50%, #b45309 100%);
  --space-crimson-gradient: linear-gradient(135deg, #ef4444 0%, #e11d48 50%, #be123c 100%);
  --space-crimson-coral-gradient: linear-gradient(135deg, #ff4d6d 0%, #ef4444 50%, #f43f5e 100%);
  
  --shadow-altitude-1: 0 4px 12px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(0, 0, 0, 0.25);
  --shadow-altitude-2: 0 12px 32px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-altitude-3: 0 24px 48px -12px rgba(0, 0, 0, 0.7), 0 8px 20px rgba(0, 0, 0, 0.4);
  --shadow-floating-crimson: 0 16px 40px -8px rgba(239, 68, 68, 0.25), 0 8px 16px rgba(0, 0, 0, 0.6);
  --shadow-inset-console: inset 0 3px 10px rgba(0, 0, 0, 0.85), inset 0 0 1px rgba(255, 255, 255, 0.08);

  --specular-rim-glass: inset 0 1px 1px rgba(255, 255, 255, 0.18), inset 0 -1px 1px rgba(0, 0, 0, 0.6);
  --specular-rim-steel: inset 0 1px 0 rgba(255, 255, 255, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.8);
  --border-glass-subtle: 1px solid rgba(255, 255, 255, 0.09);
  --border-glass-active: 1px solid rgba(239, 68, 68, 0.45);
}

.antigravity-card,
.profile-card.glass-panel {
  background: var(--space-surface-card) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: var(--border-glass-subtle) !important;
  border-radius: 20px !important;
  box-shadow: var(--shadow-altitude-2), var(--specular-rim-glass) !important;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease !important;
  position: relative;
  overflow: hidden;
}

.antigravity-card:hover,
.profile-card.glass-panel:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-altitude-3), var(--shadow-floating-crimson), var(--specular-rim-glass) !important;
  border-color: rgba(239, 68, 68, 0.25) !important;
}

body.light-theme .antigravity-card,
body.light-theme .profile-card.glass-panel {
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .antigravity-card:hover,
body.light-theme .profile-card.glass-panel:hover {
  border-color: rgba(220, 38, 38, 0.3) !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08), 0 0 16px rgba(220, 38, 38, 0.1) !important;
}

/* Gold & Crimson Brushed Metal Logo */
.logo-brushed-metal {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: 
    radial-gradient(ellipse at 30% 20%, rgba(251, 191, 36, 0.4) 0%, transparent 60%),
    linear-gradient(135deg, #7f1d1d 0%, #b91c1c 30%, #450a0a 70%, #991b1b 100%);
  border: 1px solid rgba(251, 191, 36, 0.45);
  box-shadow: 
    0 0 16px rgba(220, 38, 38, 0.4),
    0 3px 8px rgba(0, 0, 0, 0.6),
    inset 0 1px 2px rgba(255, 255, 255, 0.45),
    inset 0 -2px 4px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.logo-brushed-metal:hover {
  transform: scale(1.05) rotate(-1deg);
  box-shadow: 
    0 0 24px rgba(239, 68, 68, 0.6),
    0 0 10px rgba(251, 191, 36, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.7),
    inset 0 1px 3px rgba(255, 255, 255, 0.6);
}

.logo-brushed-metal svg,
.logo-brushed-metal i {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 6px rgba(251, 191, 36, 0.6));
  color: #fffbeb;
  width: 15px;
  height: 15px;
}

.brand-title-spatial {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ffffff 0%, #fef08a 45%, #f87171 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(239, 68, 68, 0.25));
  line-height: 1.1;
  white-space: nowrap;
}

.brand-sub-spatial {
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--space-gold-accent, #fbbf24);
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
  line-height: 1.1;
  margin-top: 1px;
  white-space: nowrap;
}

/* Segmented iOS-Style Mode Switcher */
.segmented-mode-container {
  position: relative;
  display: flex;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  padding: 4px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6), 0 4px 14px rgba(0, 0, 0, 0.35);
  user-select: none;
  width: 100%;
  box-sizing: border-box;
}

.segmented-sliding-pill {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 9999px;
  background: var(--accent-primary-gradient, linear-gradient(135deg, #ef4444 0%, #f43f5e 50%, #fb7185 100%));
  box-shadow: 
    0 0 18px var(--accent-primary-shadow, rgba(239, 68, 68, 0.55)),
    0 2px 8px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.4);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease, box-shadow 0.3s ease;
  pointer-events: none;
  animation: pillGlowPulse 3s ease-in-out infinite alternate;
}

@keyframes pillGlowPulse {
  0% {
    box-shadow: 0 0 14px var(--accent-primary-shadow, rgba(239, 68, 68, 0.45)), 0 2px 6px rgba(0, 0, 0, 0.4);
  }
  100% {
    box-shadow: 0 0 24px var(--accent-primary-shadow, rgba(239, 68, 68, 0.75)), 0 0 8px rgba(255, 255, 255, 0.4), 0 2px 10px rgba(0, 0, 0, 0.6);
  }
}

.segmented-option-btn {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  border-radius: 9999px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #94a3b8;
  transition: color 0.3s ease-out, text-shadow 0.3s ease-out, transform 0.2s ease;
  font-family: var(--font-heading);
}

.segmented-option-btn:hover:not(.active) {
  color: #f1f5f9;
}

.segmented-option-btn.active {
  color: #ffffff !important;
  font-weight: 800;
  text-shadow: 
    0 0 8px rgba(255, 255, 255, 0.85),
    0 0 14px var(--accent-primary-shadow, rgba(239, 68, 68, 0.9)),
    0 1px 2px rgba(0, 0, 0, 0.9);
}

/* Single Flip Mode Capsule Pin (Option 3 Compact Toggle) */
.mode-capsule-pin {
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 28px;
  padding: 0 8px;
  border-radius: 10px;
  user-select: none;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  position: relative;
  text-transform: uppercase;
  box-sizing: border-box;
  flex-shrink: 0;
  white-space: nowrap;
}

.mode-capsule-pin.mode-personal-active {
  background: linear-gradient(145deg, #1e293b 0%, #0b0f17 100%) !important;
  border: 1px solid rgba(251, 191, 36, 0.45) !important;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.45),
    0 0 8px rgba(245, 158, 11, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
  color: #fef08a !important;
}

.mode-capsule-pin.mode-personal-active:hover {
  transform: translateY(-1px) scale(1.02) !important;
  border-color: rgba(251, 191, 36, 0.8) !important;
  box-shadow: 
    0 4px 14px rgba(0, 0, 0, 0.6),
    0 0 12px rgba(245, 158, 11, 0.35),
    inset 0 1px 1px rgba(255, 255, 255, 0.35) !important;
  color: #ffffff !important;
}

.mode-capsule-pin.mode-personal-active #mode-capsule-icon {
  color: #f59e0b !important;
  filter: drop-shadow(0 0 5px rgba(245, 158, 11, 0.85)) !important;
}

.mode-capsule-pin.mode-coach-active {
  background: linear-gradient(145deg, #1e1b4b 0%, #090d16 100%) !important;
  border: 1px solid rgba(99, 102, 241, 0.55) !important;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.5),
    0 0 10px rgba(99, 102, 241, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  color: #e0e7ff !important;
}

.mode-capsule-pin.mode-coach-active:hover {
  transform: translateY(-1px) scale(1.02) !important;
  border-color: rgba(129, 140, 248, 0.9) !important;
  box-shadow: 
    0 4px 14px rgba(0, 0, 0, 0.65),
    0 0 16px rgba(99, 102, 241, 0.45),
    inset 0 1px 1px rgba(255, 255, 255, 0.35) !important;
  color: #ffffff !important;
}

.mode-capsule-pin.mode-coach-active #mode-capsule-icon {
  color: #818cf8 !important;
  filter: drop-shadow(0 0 5px rgba(99, 102, 241, 0.85)) !important;
}

.mode-capsule-pin #mode-capsule-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.mode-capsule-switch-icon {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  color: var(--text-muted, #94a3b8);
  width: 9px;
  height: 9px;
  flex-shrink: 0;
}

.mode-capsule-pin:hover .mode-capsule-switch-icon {
  opacity: 1 !important;
  color: #ffffff !important;
  transform: rotate(180deg);
}

/* Textured Metallic Header Pins */
.metallic-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 28px;
  padding: 0 8px;
  border-radius: 10px;
  background: linear-gradient(145deg, #1e293b 0%, #0b0f17 100%);
  border: 1px solid rgba(251, 191, 36, 0.3);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(0, 0, 0, 0.8);
  font-size: 11px;
  font-weight: 700;
  color: #f8fafc;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  font-family: var(--font-heading);
  position: relative;
  box-sizing: border-box;
  flex-shrink: 0;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, border-color 0.2s ease;
}

.metallic-pin:hover {
  transform: translateY(-1px);
  border-color: rgba(251, 191, 36, 0.6);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.6),
    0 0 10px rgba(251, 191, 36, 0.25),
    inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.metallic-pin svg,
.metallic-pin i {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.metallic-pin .gold-accent {
  color: var(--space-gold-accent, #fbbf24);
  font-weight: 800;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}

.metallic-pin .notif-unread-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 9999px;
  background: var(--accent-primary-gradient, linear-gradient(135deg, #ef4444, #dc2626));
  border: 2px solid #090d16;
  color: white;
  font-size: 9px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px var(--accent-primary-shadow, rgba(239, 68, 68, 0.9));
  animation: notifPulse 2.5s infinite;
  box-sizing: border-box;
}

#header-logout-btn {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  border-radius: 50% !important;
  background: rgba(239, 68, 68, 0.12) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  color: var(--accent-danger, #ef4444) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

#header-logout-btn:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: rgba(239, 68, 68, 0.6) !important;
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

#header-logout-btn svg,
#header-logout-btn i {
  width: 13px !important;
  height: 13px !important;
}

@keyframes notifPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); box-shadow: 0 0 12px var(--accent-primary-shadow, rgba(239, 68, 68, 1)); }
}

/* Avatar Ring of Power */
.avatar-ring-outer {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, #334155 0%, #0f172a 50%, #1e293b 100%);
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.7),
    0 0 16px var(--accent-primary-shadow, rgba(239, 68, 68, 0.35)),
    inset 0 1px 1px rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.avatar-ring-neon {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  padding: 2.5px;
  background: var(--accent-primary-gradient, linear-gradient(135deg, #ef4444 0%, #ff0055 50%, #f59e0b 100%));
  box-shadow: 0 0 14px var(--accent-primary-shadow, rgba(239, 68, 68, 0.8)), inset 0 0 6px var(--accent-primary-shadow, rgba(239, 68, 68, 0.6));
  display: flex;
  align-items: center;
  justify-content: center;
  animation: neonRingBreathing 3s ease-in-out infinite alternate;
}

@keyframes neonRingBreathing {
  0% {
    filter: drop-shadow(0 0 3px rgba(239, 68, 68, 0.6));
  }
  100% {
    filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.95)) drop-shadow(0 0 4px rgba(251, 191, 36, 0.5));
  }
}

.avatar-ring-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #1e293b 0%, #090d16 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.avatar-initial-text {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 900;
  background: linear-gradient(135deg, #ffffff 0%, var(--text-main, #fca5a5) 40%, var(--accent-primary, #ef4444) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 6px var(--accent-primary-shadow, rgba(239, 68, 68, 0.4)));
  line-height: 1;
}

.avatar-initial-text.has-image {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  -webkit-background-clip: border-box !important;
  -webkit-text-fill-color: initial !important;
  filter: none !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
}

/* Badge-Based Metadata */
.metadata-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  font-size: 11.5px;
  font-weight: 600;
  color: #cbd5e1;
  transition: all 0.3s ease-out;
}

.metadata-pill-badge:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: var(--border-color-active, rgba(239, 68, 68, 0.3));
  color: #ffffff;
  transform: translateY(-1px);
}

.metadata-pill-badge.badge-primary-glow {
  background: var(--accent-primary-shadow, rgba(239, 68, 68, 0.12));
  border: 1px solid var(--border-color-active, rgba(239, 68, 68, 0.35));
  color: var(--text-main, #fecdd3);
}

.metadata-pill-badge.badge-primary-glow i,
.metadata-pill-badge.badge-primary-glow svg {
  color: var(--accent-primary, #f43f5e) !important;
}

/* Elevated Player Rank Progression Badge */
.metadata-pill-badge.badge-rank-progression {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(239, 68, 68, 0.14) 100%) !important;
  border: 1px solid rgba(251, 191, 36, 0.45) !important;
  color: #fef08a !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
  letter-spacing: 0.04em;
  padding: 4px 12px;
}

.metadata-pill-badge.badge-rank-progression:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.28) 0%, rgba(239, 68, 68, 0.22) 100%) !important;
  border-color: rgba(251, 191, 36, 0.7) !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-1px);
}

/* Profile Header Architecture */
.profile-header {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.profile-header-main {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.profile-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Subtle Top-Right Glass Icon Controls */
.profile-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
}

.btn-glass-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.btn-glass-icon svg,
.btn-glass-icon i {
  width: 15px;
  height: 15px;
  stroke: #94a3b8;
  stroke-width: 2px;
  transition: transform 0.2s ease, stroke 0.2s ease;
}

.btn-glass-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-color-active, rgba(239, 68, 68, 0.45));
  color: #f8fafc;
  transform: translateY(-1.5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4), 0 0 12px var(--accent-primary-shadow, rgba(239, 68, 68, 0.25));
}

.btn-glass-icon:hover svg,
.btn-glass-icon:hover i {
  stroke: var(--accent-primary-hover, #ff6b6b);
  transform: scale(1.1);
}

.btn-glass-icon:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Brushed Dark Steel Buttons with Inset LED Lettering */
.btn-brushed-steel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  background: var(--space-surface-steel, #1e293b);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 
    0 4px 14px rgba(0, 0, 0, 0.5),
    var(--specular-rim-steel, inset 0 1px 0 rgba(255, 255, 255, 0.1));
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  font-family: var(--font-heading);
}

.btn-brushed-steel:hover {
  background: var(--space-surface-steel-hover, #334155);
  border-color: var(--accent-primary-hover, rgba(239, 68, 68, 0.5));
  transform: translateY(-1.5px);
  box-shadow: 
    0 6px 20px rgba(0, 0, 0, 0.6),
    0 0 14px var(--accent-primary-shadow, rgba(239, 68, 68, 0.35)),
    var(--specular-rim-steel, inset 0 1px 0 rgba(255, 255, 255, 0.1));
}

.btn-brushed-steel .led-text {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-primary, #ff5252);
  text-shadow: 
    0 0 6px var(--accent-primary-shadow, rgba(255, 82, 82, 0.8)),
    0 0 14px rgba(0, 0, 0, 0.45);
}

.btn-brushed-steel:hover .led-text {
  color: var(--accent-primary-hover, #ff7b7b);
  text-shadow: 
    0 0 10px var(--accent-primary, #ff7b7b),
    0 0 18px var(--accent-primary-shadow, rgba(239, 68, 68, 0.8));
}

/* Weekly Consistency Tracker Card (Clean Glassmorphism) */
.tracker-console-card {
  position: relative;
  background: var(--bg-surface, rgba(15, 23, 42, 0.65));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-top: 1px solid var(--border-color-active, rgba(99, 102, 241, 0.35));
  padding: 14px 16px 16px 16px;
  box-shadow: var(--shadow-glass, 0 8px 32px 0 rgba(0, 0, 0, 0.35));
  overflow: hidden;
}

.console-status-dot {
  display: none;
}

.console-streak-title {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-main, #f8fafc);
  text-transform: uppercase;
}

.console-streak-active-badge {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 11px;
  font-weight: 700;
  color: #f59e0b;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.12);
  letter-spacing: 0.02em;
}

.flame-icon-glow {
  filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.6));
}

/* Fused Streak Milestone Pill Button */
.streak-milestone-pill-btn {
  cursor: pointer;
  user-select: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  outline: none;
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.streak-milestone-pill-btn:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(245, 158, 11, 0.65);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35);
  transform: translateY(-1px);
}

.streak-milestone-pill-btn:active {
  transform: translateY(0);
}

.streak-milestone-subtag {
  color: rgba(251, 191, 36, 0.85);
  font-size: 10px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 3px;
  letter-spacing: 0.02em;
}

.streak-claim-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
  animation: streakClaimPulse 1.5s infinite;
  margin-left: 2px;
}

@keyframes streakClaimPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.12); box-shadow: 0 0 0 5px rgba(239, 68, 68, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Consistency Milestone Progress Track (Beneath Weekly Domes) */
.consistency-milestone-progress-bar-wrap {
  margin-top: 14px;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: var(--border-radius-sm, 8px);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.consistency-milestone-progress-bar-wrap:hover {
  background: rgba(15, 23, 42, 0.65);
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3), inset 0 0 12px rgba(245, 158, 11, 0.08);
}

.milestone-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary, #94a3b8);
}

.milestone-progress-header span#consistency-next-milestone-label {
  color: var(--text-main, #f8fafc);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.milestone-reward-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 1.5px 8px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  white-space: nowrap;
}

.milestone-reward-pill.claim-ready {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.35), rgba(245, 158, 11, 0.35));
  border-color: rgba(239, 68, 68, 0.7);
  color: #fef08a;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.45);
  animation: streakClaimPulse 1.8s infinite;
}

.milestone-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.milestone-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  border-radius: 4px;
  transition: width 0.4s ease;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.milestone-progress-fill.ticket-tier {
  background: linear-gradient(90deg, #a855f7, #ec4899);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.5);
}

/* 3D Button Domes Grid */
.day-domes-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.day-dome-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* Standard / Inactive Day Button (Clean Translucent Glass Disc) */
.dome-button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: none;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease-out, filter 0.25s ease, color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  outline: none;
}

.dome-button:focus-visible {
  outline: 2px solid var(--accent-primary, #6366f1);
  outline-offset: 2px;
}

.dome-button.dome-past,
.dome-button.dome-future,
.dome-button.dome-inactive {
  background: rgba(30, 41, 59, 0.45);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary, #94a3b8);
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 12px;
  font-weight: 600;
}

.dome-button.dome-past:hover,
.dome-button.dome-future:hover,
.dome-button.dome-inactive:hover {
  transform: translateY(-1.5px);
  color: var(--text-main, #ffffff);
  background: rgba(51, 65, 85, 0.55);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

/* Active Completed Dome (Fallback Accent Gradient) */
.dome-button.dome-completed {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #991b1b 100%);
  box-shadow: 
    0 0 14px rgba(239, 68, 68, 0.5),
    0 2px 6px rgba(0, 0, 0, 0.4),
    inset 0 1px 1.5px rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.3);
  animation: domeGlowBreathing 3s ease-in-out infinite alternate;
}

@keyframes domeGlowBreathing {
  0% {
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.45), 0 2px 5px rgba(0, 0, 0, 0.35), inset 0 1px 1.5px rgba(255, 255, 255, 0.4);
  }
  100% {
    box-shadow: 0 0 18px rgba(239, 68, 68, 0.75), 0 3px 8px rgba(0, 0, 0, 0.5), inset 0 1.5px 2px rgba(255, 255, 255, 0.6);
  }
}

.dome-button.dome-completed:hover {
  transform: translateY(-1.5px) scale(1.05);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.85), 0 4px 10px rgba(0, 0, 0, 0.5), inset 0 1.5px 2px rgba(255, 255, 255, 0.7);
}

.holographic-check {
  color: #ffffff;
  width: 15px;
  height: 15px;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.8));
  stroke-width: 3.2;
}

.day-name-label {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted, #64748b);
  letter-spacing: 0.05em;
  transition: color 0.25s ease;
}

.day-name-label.active {
  color: var(--text-main, #ffffff) !important;
}


/* ========================================================================= */
/* ====== CHARACTER CLASS THEMES SPECIFIC SPATIAL DEPTH CUSTOMIZATIONS ====== */
/* ========================================================================= */

/* ----------------- 1. PLAYER CLASS THEME (Amethyst Purple) ----------------- */
body.player-theme .segmented-sliding-pill {
  background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 50%, #c084fc 100%) !important;
  box-shadow: 
    0 0 18px rgba(168, 85, 247, 0.55),
    0 2px 8px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.4) !important;
  animation: playerPillGlowPulse 3s ease-in-out infinite alternate !important;
}

@keyframes playerPillGlowPulse {
  0% {
    box-shadow: 0 0 14px rgba(168, 85, 247, 0.45), 0 2px 6px rgba(0, 0, 0, 0.4);
  }
  100% {
    box-shadow: 0 0 24px rgba(168, 85, 247, 0.75), 0 0 8px rgba(192, 132, 252, 0.6), 0 2px 10px rgba(0, 0, 0, 0.6);
  }
}

body.player-theme .segmented-option-btn.active {
  text-shadow: 
    0 0 8px rgba(255, 255, 255, 0.85),
    0 0 14px rgba(168, 85, 247, 0.9),
    0 1px 2px rgba(0, 0, 0, 0.9) !important;
}

body.player-theme .metallic-pin .notif-unread-dot {
  background: linear-gradient(135deg, #a855f7, #7e22ce) !important;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.9) !important;
}

body.player-theme .avatar-ring-outer {
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.7),
    0 0 16px rgba(168, 85, 247, 0.35),
    inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
}

body.player-theme .avatar-ring-neon {
  background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 50%, #ec4899 100%) !important;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.8), inset 0 0 6px rgba(168, 85, 247, 0.6) !important;
  animation: playerNeonRingBreathing 3s ease-in-out infinite alternate !important;
}

@keyframes playerNeonRingBreathing {
  0% {
    filter: drop-shadow(0 0 3px rgba(168, 85, 247, 0.6));
  }
  100% {
    filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.95)) drop-shadow(0 0 4px rgba(236, 72, 153, 0.5));
  }
}

body.player-theme .avatar-initial-text:not(.has-image) {
  background: linear-gradient(135deg, #ffffff 0%, #e9d5ff 40%, #a855f7 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  filter: drop-shadow(0 2px 6px rgba(168, 85, 247, 0.4)) !important;
}

body.player-theme .metadata-pill-badge:hover {
  border-color: rgba(168, 85, 247, 0.4) !important;
}

body.player-theme .metadata-pill-badge.badge-primary-glow {
  background: rgba(168, 85, 247, 0.12) !important;
  border: 1px solid rgba(168, 85, 247, 0.35) !important;
  color: #e9d5ff !important;
}

body.player-theme .metadata-pill-badge.badge-primary-glow i,
body.player-theme .metadata-pill-badge.badge-primary-glow svg {
  color: #c084fc !important;
}

body.player-theme .btn-glass-icon:hover {
  border-color: rgba(168, 85, 247, 0.45) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4), 0 0 12px rgba(168, 85, 247, 0.25) !important;
}

body.player-theme .btn-glass-icon:hover svg,
body.player-theme .btn-glass-icon:hover i {
  stroke: #c084fc !important;
}

body.player-theme .btn-brushed-steel:hover {
  border-color: rgba(168, 85, 247, 0.5) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 14px rgba(168, 85, 247, 0.35), var(--specular-rim-steel) !important;
}

body.player-theme .btn-brushed-steel .led-text {
  color: #c084fc !important;
  text-shadow: 0 0 6px rgba(192, 132, 252, 0.8), 0 0 14px rgba(168, 85, 247, 0.45) !important;
}

body.player-theme .btn-brushed-steel:hover .led-text {
  color: #d8b4fe !important;
  text-shadow: 0 0 10px rgba(216, 180, 254, 0.95), 0 0 18px rgba(168, 85, 247, 0.8) !important;
}

body.player-theme .tracker-console-card {
  border-top: 1px solid rgba(168, 85, 247, 0.45) !important;
}

body.player-theme .dome-button.dome-completed {
  background: linear-gradient(135deg, #a855f7 0%, #9333ea 50%, #6b21a8 100%) !important;
  box-shadow: 
    0 0 14px rgba(168, 85, 247, 0.55),
    0 2px 6px rgba(0, 0, 0, 0.4),
    inset 0 1px 1.5px rgba(255, 255, 255, 0.45) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  animation: playerDomeGlowBreathing 3s ease-in-out infinite alternate !important;
}

@keyframes playerDomeGlowBreathing {
  0% {
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.45), 0 2px 5px rgba(0, 0, 0, 0.35), inset 0 1px 1.5px rgba(255, 255, 255, 0.4);
  }
  100% {
    box-shadow: 0 0 18px rgba(168, 85, 247, 0.75), 0 3px 8px rgba(0, 0, 0, 0.5), inset 0 1.5px 2px rgba(255, 255, 255, 0.6);
  }
}

body.player-theme .dome-button.dome-completed:hover {
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.85), 0 4px 10px rgba(0, 0, 0, 0.5), inset 0 1.5px 2px rgba(255, 255, 255, 0.7) !important;
}

body.player-theme .ai-ea-card {
  border: 1px solid rgba(168, 85, 247, 0.3) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 0 15px rgba(168, 85, 247, 0.15) !important;
}

body.player-theme .ai-ea-card:hover {
  border-color: rgba(168, 85, 247, 0.5) !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45), 0 0 22px rgba(168, 85, 247, 0.25) !important;
}

body.player-theme .vea-avatar-ring-outer {
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.7),
    0 0 16px rgba(168, 85, 247, 0.35),
    inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
}

body.player-theme .vea-avatar-ring-neon {
  background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 50%, #ec4899 100%) !important;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.8), inset 0 0 6px rgba(168, 85, 247, 0.6) !important;
  animation: playerVeaNeonBreathing 3s ease-in-out infinite alternate !important;
}

@keyframes playerVeaNeonBreathing {
  0% {
    filter: drop-shadow(0 0 3px rgba(168, 85, 247, 0.6));
  }
  100% {
    filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.95)) drop-shadow(0 0 4px rgba(236, 72, 153, 0.5));
  }
}

body.player-theme .vea-action-btn-card:hover {
  border-color: rgba(168, 85, 247, 0.5) !important;
}

body.player-theme .ea-mascot-btn.active {
  background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%) !important;
  box-shadow: 0 2px 8px rgba(168, 85, 247, 0.4) !important;
}

body.player-theme .vea-filter-pill.active {
  background: rgba(168, 85, 247, 0.2) !important;
  border-color: rgba(168, 85, 247, 0.5) !important;
  color: #c084fc !important;
}

body.player-theme .vea-role-tag {
  background: rgba(168, 85, 247, 0.18) !important;
  color: #d8b4fe !important;
  border: 1px solid rgba(168, 85, 247, 0.3) !important;
}


/* ---------------- 2. ADVENTURER CLASS THEME (Bronze / Amber Gold) ---------------- */
body.adventurer-theme .segmented-sliding-pill {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #92400e 100%) !important;
  box-shadow: 
    0 0 18px rgba(245, 158, 11, 0.55),
    0 2px 8px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.4) !important;
  animation: adventurerPillGlowPulse 3s ease-in-out infinite alternate !important;
}

@keyframes adventurerPillGlowPulse {
  0% {
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.45), 0 2px 6px rgba(0, 0, 0, 0.4);
  }
  100% {
    box-shadow: 0 0 24px rgba(245, 158, 11, 0.75), 0 0 8px rgba(251, 191, 36, 0.6), 0 2px 10px rgba(0, 0, 0, 0.6);
  }
}

body.adventurer-theme .segmented-option-btn.active {
  text-shadow: 
    0 0 8px rgba(255, 255, 255, 0.85),
    0 0 14px rgba(245, 158, 11, 0.9),
    0 1px 2px rgba(0, 0, 0, 0.9) !important;
}

body.adventurer-theme .metallic-pin .notif-unread-dot {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.9) !important;
}

body.adventurer-theme .avatar-ring-outer {
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.7),
    0 0 16px rgba(245, 158, 11, 0.35),
    inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
}

body.adventurer-theme .avatar-ring-neon {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #78350f 100%) !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.8), inset 0 0 6px rgba(245, 158, 11, 0.6) !important;
  animation: adventurerNeonRingBreathing 3s ease-in-out infinite alternate !important;
}

@keyframes adventurerNeonRingBreathing {
  0% {
    filter: drop-shadow(0 0 3px rgba(245, 158, 11, 0.6));
  }
  100% {
    filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.95)) drop-shadow(0 0 4px rgba(217, 119, 6, 0.5));
  }
}

body.adventurer-theme .avatar-initial-text:not(.has-image) {
  background: linear-gradient(135deg, #ffffff 0%, #fde68a 40%, #d97706 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  filter: drop-shadow(0 2px 6px rgba(245, 158, 11, 0.4)) !important;
}

body.adventurer-theme .metadata-pill-badge:hover {
  border-color: rgba(245, 158, 11, 0.4) !important;
}

body.adventurer-theme .metadata-pill-badge.badge-primary-glow {
  background: rgba(217, 119, 6, 0.12) !important;
  border: 1px solid rgba(217, 119, 6, 0.35) !important;
  color: #fde68a !important;
}

body.adventurer-theme .metadata-pill-badge.badge-primary-glow i,
body.adventurer-theme .metadata-pill-badge.badge-primary-glow svg {
  color: #f59e0b !important;
}

body.adventurer-theme .btn-glass-icon:hover {
  border-color: rgba(245, 158, 11, 0.45) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4), 0 0 12px rgba(245, 158, 11, 0.25) !important;
}

body.adventurer-theme .btn-glass-icon:hover svg,
body.adventurer-theme .btn-glass-icon:hover i {
  stroke: #f59e0b !important;
}

body.adventurer-theme .btn-brushed-steel:hover {
  border-color: rgba(245, 158, 11, 0.5) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 14px rgba(245, 158, 11, 0.35), var(--specular-rim-steel) !important;
}

body.adventurer-theme .btn-brushed-steel .led-text {
  color: #fbbf24 !important;
  text-shadow: 0 0 6px rgba(251, 191, 36, 0.8), 0 0 14px rgba(217, 119, 6, 0.45) !important;
}

body.adventurer-theme .btn-brushed-steel:hover .led-text {
  color: #fef08a !important;
  text-shadow: 0 0 10px rgba(254, 240, 138, 0.95), 0 0 18px rgba(245, 158, 11, 0.8) !important;
}

body.adventurer-theme .tracker-console-card {
  border-top: 1px solid rgba(217, 119, 6, 0.45) !important;
}

body.adventurer-theme .dome-button.dome-completed {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #92400e 100%) !important;
  box-shadow: 
    0 0 14px rgba(245, 158, 11, 0.55),
    0 2px 6px rgba(0, 0, 0, 0.4),
    inset 0 1px 1.5px rgba(255, 255, 255, 0.45) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  animation: adventurerDomeGlowBreathing 3s ease-in-out infinite alternate !important;
}

@keyframes adventurerDomeGlowBreathing {
  0% {
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.45), 0 2px 5px rgba(0, 0, 0, 0.35), inset 0 1px 1.5px rgba(255, 255, 255, 0.4);
  }
  100% {
    box-shadow: 0 0 18px rgba(245, 158, 11, 0.75), 0 3px 8px rgba(0, 0, 0, 0.5), inset 0 1.5px 2px rgba(255, 255, 255, 0.6);
  }
}

body.adventurer-theme .dome-button.dome-completed:hover {
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.85), 0 4px 10px rgba(0, 0, 0, 0.5), inset 0 1.5px 2px rgba(255, 255, 255, 0.7) !important;
}

body.adventurer-theme .ai-ea-card {
  border: 1px solid rgba(217, 119, 6, 0.3) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 0 15px rgba(217, 119, 6, 0.15) !important;
}

body.adventurer-theme .ai-ea-card:hover {
  border-color: rgba(217, 119, 6, 0.5) !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45), 0 0 22px rgba(217, 119, 6, 0.25) !important;
}

body.adventurer-theme .vea-avatar-ring-outer {
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.7),
    0 0 16px rgba(245, 158, 11, 0.35),
    inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
}

body.adventurer-theme .vea-avatar-ring-neon {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #78350f 100%) !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.8), inset 0 0 6px rgba(245, 158, 11, 0.6) !important;
  animation: adventurerVeaNeonBreathing 3s ease-in-out infinite alternate !important;
}

@keyframes adventurerVeaNeonBreathing {
  0% {
    filter: drop-shadow(0 0 3px rgba(245, 158, 11, 0.6));
  }
  100% {
    filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.95)) drop-shadow(0 0 4px rgba(217, 119, 6, 0.5));
  }
}

body.adventurer-theme .vea-action-btn-card:hover {
  border-color: rgba(245, 158, 11, 0.5) !important;
}

body.adventurer-theme .ea-mascot-btn.active {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4) !important;
}

body.adventurer-theme .vea-filter-pill.active {
  background: rgba(217, 119, 6, 0.2) !important;
  border-color: rgba(217, 119, 6, 0.5) !important;
  color: #fde68a !important;
}

body.adventurer-theme .vea-role-tag {
  background: rgba(217, 119, 6, 0.18) !important;
  color: #fde68a !important;
  border: 1px solid rgba(217, 119, 6, 0.3) !important;
}


/* ---------------- 3. CULTIVATOR CLASS THEME (Crimson Qi / Blood Ruby) ---------------- */
body.cultivator-theme .segmented-sliding-pill {
  background: linear-gradient(135deg, #ef4444 0%, #f43f5e 50%, #fb7185 100%) !important;
  box-shadow: 
    0 0 18px rgba(239, 68, 68, 0.55),
    0 2px 8px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.4) !important;
  animation: cultivatorPillGlowPulse 3s ease-in-out infinite alternate !important;
}

@keyframes cultivatorPillGlowPulse {
  0% {
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.45), 0 2px 6px rgba(0, 0, 0, 0.4);
  }
  100% {
    box-shadow: 0 0 24px rgba(239, 68, 68, 0.75), 0 0 8px rgba(251, 113, 133, 0.6), 0 2px 10px rgba(0, 0, 0, 0.6);
  }
}

body.cultivator-theme .segmented-option-btn.active {
  text-shadow: 
    0 0 8px rgba(255, 255, 255, 0.85),
    0 0 14px rgba(239, 68, 68, 0.9),
    0 1px 2px rgba(0, 0, 0, 0.9) !important;
}

body.cultivator-theme .metallic-pin .notif-unread-dot {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.9) !important;
}

body.cultivator-theme .avatar-ring-outer {
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.7),
    0 0 16px rgba(239, 68, 68, 0.35),
    inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
}

body.cultivator-theme .avatar-ring-neon {
  background: linear-gradient(135deg, #ef4444 0%, #ff0055 50%, #f59e0b 100%) !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.8), inset 0 0 6px rgba(239, 68, 68, 0.6) !important;
  animation: cultivatorNeonRingBreathing 3s ease-in-out infinite alternate !important;
}

@keyframes cultivatorNeonRingBreathing {
  0% {
    filter: drop-shadow(0 0 3px rgba(239, 68, 68, 0.6));
  }
  100% {
    filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.95)) drop-shadow(0 0 4px rgba(251, 191, 36, 0.5));
  }
}

body.cultivator-theme .avatar-initial-text:not(.has-image) {
  background: linear-gradient(135deg, #ffffff 0%, #fca5a5 40%, #ef4444 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  filter: drop-shadow(0 2px 6px rgba(239, 68, 68, 0.4)) !important;
}

body.cultivator-theme .metadata-pill-badge:hover {
  border-color: rgba(239, 68, 68, 0.4) !important;
}

body.cultivator-theme .metadata-pill-badge.badge-primary-glow {
  background: rgba(239, 68, 68, 0.12) !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
  color: #fecdd3 !important;
}

body.cultivator-theme .metadata-pill-badge.badge-primary-glow i,
body.cultivator-theme .metadata-pill-badge.badge-primary-glow svg {
  color: #f43f5e !important;
}

body.cultivator-theme .btn-glass-icon:hover {
  border-color: rgba(239, 68, 68, 0.45) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4), 0 0 12px rgba(239, 68, 68, 0.25) !important;
}

body.cultivator-theme .btn-glass-icon:hover svg,
body.cultivator-theme .btn-glass-icon:hover i {
  stroke: #ff6b6b !important;
}

body.cultivator-theme .btn-brushed-steel:hover {
  border-color: rgba(239, 68, 68, 0.5) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 14px rgba(239, 68, 68, 0.35), var(--specular-rim-steel) !important;
}

body.cultivator-theme .btn-brushed-steel .led-text {
  color: #ff5252 !important;
  text-shadow: 0 0 6px rgba(255, 82, 82, 0.8), 0 0 14px rgba(249, 115, 22, 0.45) !important;
}

body.cultivator-theme .btn-brushed-steel:hover .led-text {
  color: #ff7b7b !important;
  text-shadow: 0 0 10px rgba(255, 123, 123, 0.95), 0 0 18px rgba(239, 68, 68, 0.8) !important;
}

body.cultivator-theme .tracker-console-card {
  border-top: 1px solid rgba(239, 68, 68, 0.45) !important;
}

body.cultivator-theme .dome-button.dome-completed {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 50%, #9f1239 100%) !important;
  box-shadow: 
    0 0 14px rgba(244, 63, 94, 0.55),
    0 2px 6px rgba(0, 0, 0, 0.4),
    inset 0 1px 1.5px rgba(255, 255, 255, 0.45) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  animation: cultivatorDomeGlowBreathing 3s ease-in-out infinite alternate !important;
}

@keyframes cultivatorDomeGlowBreathing {
  0% {
    box-shadow: 0 0 10px rgba(244, 63, 94, 0.45), 0 2px 5px rgba(0, 0, 0, 0.35), inset 0 1px 1.5px rgba(255, 255, 255, 0.4);
  }
  100% {
    box-shadow: 0 0 18px rgba(244, 63, 94, 0.75), 0 3px 8px rgba(0, 0, 0, 0.5), inset 0 1.5px 2px rgba(255, 255, 255, 0.6);
  }
}

body.cultivator-theme .dome-button.dome-completed:hover {
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.85), 0 4px 10px rgba(0, 0, 0, 0.5), inset 0 1.5px 2px rgba(255, 255, 255, 0.7) !important;
}

body.cultivator-theme .ai-ea-card {
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 0 15px rgba(239, 68, 68, 0.15) !important;
}

body.cultivator-theme .ai-ea-card:hover {
  border-color: rgba(239, 68, 68, 0.5) !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45), 0 0 22px rgba(239, 68, 68, 0.25) !important;
}

body.cultivator-theme .vea-avatar-ring-outer {
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.7),
    0 0 16px rgba(239, 68, 68, 0.35),
    inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
}

body.cultivator-theme .vea-avatar-ring-neon {
  background: linear-gradient(135deg, #ef4444 0%, #ff0055 50%, #f59e0b 100%) !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.8), inset 0 0 6px rgba(239, 68, 68, 0.6) !important;
  animation: cultivatorVeaNeonBreathing 3s ease-in-out infinite alternate !important;
}

@keyframes cultivatorVeaNeonBreathing {
  0% {
    filter: drop-shadow(0 0 3px rgba(239, 68, 68, 0.6));
  }
  100% {
    filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.95)) drop-shadow(0 0 4px rgba(251, 191, 36, 0.5));
  }
}

body.cultivator-theme .vea-action-btn-card:hover {
  border-color: rgba(239, 68, 68, 0.5) !important;
}

body.cultivator-theme .ea-mascot-btn.active {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4) !important;
}

body.cultivator-theme .vea-filter-pill.active {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  color: #f87171 !important;
}

body.cultivator-theme .vea-role-tag {
  background: rgba(239, 68, 68, 0.18) !important;
  color: #f87171 !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
}

/* ==========================================================================
   REUSABLE SYSTEM TOOLTIP ENGINE (Glassmorphic & Viewport-Aware)
   ========================================================================== */
.sys-tooltip {
  position: fixed;
  z-index: 100000;
  pointer-events: none;
  max-width: 280px;
  min-width: 140px;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color-active, rgba(99, 102, 241, 0.4));
  border-radius: var(--border-radius-md, 12px);
  box-shadow: var(--shadow-glass, 0 8px 32px rgba(0, 0, 0, 0.6)),
              0 0 14px rgba(99, 102, 241, 0.25);
  color: var(--text-main, #f8fafc);
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.78rem;
  line-height: 1.35;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.sys-tooltip.is-visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto; /* Allows hovering over tooltip text for accessibility */
}

/* Tooltip Content Header & Body */
.sys-tooltip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sys-tooltip-title {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-weight: 700;
  font-size: 0.82rem;
  color: #fff;
  letter-spacing: 0.02em;
}

.sys-tooltip-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  text-transform: uppercase;
  white-space: nowrap;
}

.sys-tooltip-body {
  color: var(--text-secondary, #94a3b8);
}

.sys-tooltip-body strong {
  color: #fff;
}

.sys-tooltip-formula {
  margin-top: 6px;
  padding: 4px 6px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  color: var(--accent-warning, #f59e0b);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

/* Directional Arrow Tips */
.sys-tooltip::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid var(--border-color-active, rgba(99, 102, 241, 0.4));
  transform: rotate(45deg);
}

.sys-tooltip[data-placed="top"]::after {
  bottom: -5px;
  left: calc(var(--arrow-x, 50%) - 4px);
  border-top: none;
  border-left: none;
}

.sys-tooltip[data-placed="bottom"]::after {
  top: -5px;
  left: calc(var(--arrow-x, 50%) - 4px);
  border-bottom: none;
  border-right: none;
}

.sys-tooltip[data-placed="left"]::after {
  right: -5px;
  top: calc(var(--arrow-y, 50%) - 4px);
  border-bottom: none;
  border-left: none;
}

.sys-tooltip[data-placed="right"]::after {
  left: -5px;
  top: calc(var(--arrow-y, 50%) - 4px);
  border-top: none;
  border-right: none;
}

/* ================= BATTLE PASS SYSTEM STYLES ================= */
.bp-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
}

.bp-header-banner {
  background: radial-gradient(circle at 85% 20%, rgba(139, 92, 246, 0.25) 0%, rgba(30, 27, 75, 0.6) 40%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: var(--border-radius-md);
  padding: 20px 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.bp-header-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.bp-level-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
  font-weight: 900;
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 20px;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4);
  letter-spacing: 0.5px;
}

.bp-progress-bar-container {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  height: 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  position: relative;
}

.bp-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #818cf8, #c084fc, #f59e0b);
  border-radius: 6px;
  transition: width 0.4s ease;
  box-shadow: 0 0 12px rgba(192, 132, 252, 0.6);
}

/* Horizontal Scrollable Progression Track */
.bp-track-wrapper {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md);
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.bp-track-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 10px 4px 16px 4px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.bp-track-scroll::-webkit-scrollbar {
  height: 8px;
}
.bp-track-scroll::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 4px;
}
.bp-track-scroll::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.4);
  border-radius: 4px;
}
.bp-track-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.6);
}

.bp-tier-card {
  flex: 0 0 140px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--border-radius-sm);
  padding: 10px;
  box-sizing: border-box;
  text-align: center;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.bp-tier-card:hover {
  transform: translateY(-2px);
  border-color: rgba(168, 85, 247, 0.3);
}

.bp-tier-card.unlocked {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(99, 102, 241, 0.3);
}

.bp-tier-card.current {
  border-color: #f59e0b;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.25);
}

.bp-tier-header {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.bp-tier-card.unlocked .bp-tier-header {
  color: #a5b4fc;
}

.bp-tier-card.current .bp-tier-header {
  color: #fbbf24;
}

.bp-reward-slot {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 80px;
  justify-content: center;
  position: relative;
}

.bp-reward-slot.premium {
  border-color: rgba(245, 158, 11, 0.4);
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.12) 0%, rgba(15, 23, 42, 0.8) 100%);
}

.bp-reward-slot.claimed {
  opacity: 0.55;
}

.bp-reward-slot.claimed::after {
  content: '✓';
  position: absolute;
  top: 4px;
  right: 4px;
  background: #10b981;
  color: #064e3b;
  font-weight: 900;
  font-size: 10px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bp-claim-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: opacity 0.2s, transform 0.1s;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.bp-claim-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.bp-locked-tag {
  font-size: 9px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

/* Seasonal Quests & Missions Grid */
.bp-missions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  width: 100%;
}

.bp-mission-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--border-radius-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  transition: border-color 0.2s;
}

.bp-mission-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
}

.bp-mission-card.completed {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.05);
}

.bp-mission-progress {
  width: 100%;
  height: 6px;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 3px;
  overflow: hidden;
}

.bp-mission-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #a855f7);
  border-radius: 3px;
}

/* ==========================================================================
   TRAINING SETTINGS & RPE / PARTIALS TUTORIAL SYSTEM
   ========================================================================== */

/* Modern UI Switch / Toggle Component */
.switch-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  transition: all 0.2s ease;
  gap: 12px;
}

.switch-container:hover:not(.disabled) {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.switch-container.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.05);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

input:checked + .toggle-slider {
  background-color: var(--accent-primary, #6366f1);
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

input:disabled + .toggle-slider {
  cursor: not-allowed;
  opacity: 0.4;
}

/* RPE / RIR Scale Pill Group */
.rpe-scale-pill-group {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2px;
  gap: 2px;
}

.rpe-scale-pill {
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 16px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.rpe-scale-pill.active {
  background: var(--accent-primary);
  color: white;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* Educational Tutorial Modal Tabs & Panels */
.tutorial-step-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
}

.tutorial-step-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--border-radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.tutorial-step-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.tutorial-step-tab.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.5);
  color: #a5b4fc;
}

.tutorial-step-tab.completed {
  border-color: rgba(16, 185, 129, 0.4);
  color: #a7f3d0;
}

.tutorial-step-pane {
  display: none;
  flex-direction: column;
  gap: 14px;
  animation: fadeIn 0.2s ease-in-out;
}

.tutorial-step-pane.active {
  display: flex;
}

/* Quiz Option Card */
.quiz-option-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.quiz-option-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

.quiz-option-card.selected {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--accent-primary);
}

.quiz-option-card.correct {
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: var(--accent-success) !important;
  color: #a7f3d0 !important;
}

.quiz-option-card.incorrect {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: var(--accent-danger) !important;
  color: #fca5a5 !important;
}

/* Onboarding Checklist Card */
.onboard-checklist-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.onboard-checklist-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
}

.onboard-checklist-card.selected {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.15);
}

.onboard-checklist-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.15s ease;
}

.onboard-checklist-card.selected .onboard-checklist-checkbox {
  background: var(--accent-primary, #6366f1);
  border-color: var(--accent-primary, #6366f1);
}

/* ================= DAILY LOGIN REWARDS SYSTEM STYLES ================= */
.login-rewards-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .login-rewards-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }
}

@media (max-width: 480px) {
  .login-rewards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
}

.login-day-card {
  position: relative;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md, 8px);
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  min-height: 94px;
  box-sizing: border-box;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  user-select: none;
}

.login-day-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.login-day-card .day-badge {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 2px;
}

.login-day-card .reward-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  position: relative;
  margin: 2px 0;
  transition: transform 0.2s ease;
}

.login-day-card:hover .reward-icon-box {
  transform: scale(1.08);
}

.login-day-card .reward-count-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 0 4px;
  font-size: 8.5px;
  font-weight: 800;
  color: #fcd34d;
  line-height: 1.2;
}

.login-day-card .reward-label {
  font-size: 9.5px;
  font-weight: 700;
  color: #e2e8f0;
  line-height: 1.15;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 2px;
}

/* Status States */
.login-day-card.claimed {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.3);
  opacity: 0.65;
}

.login-day-card.claimed .day-badge {
  color: #34d399;
}

.login-day-card.claimed::after {
  content: '✓';
  position: absolute;
  top: 4px;
  right: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #10b981;
  color: white;
  font-size: 9px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
}

.login-day-card.ready {
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.22), rgba(99, 102, 241, 0.22));
  border-color: #fbbf24;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.45);
  animation: loginCardGlow 2s infinite ease-in-out;
  transform: translateY(-2px);
}

.login-day-card.ready .day-badge {
  color: #fde047;
  font-weight: 900;
}

.login-day-card.ready .reward-icon-box {
  background: rgba(245, 158, 11, 0.2);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.login-day-card.ready::before {
  content: 'CLAIM';
  position: absolute;
  top: 3px;
  right: 4px;
  background: #f59e0b;
  color: #0f172a;
  font-size: 7.5px;
  font-weight: 900;
  padding: 1px 4px;
  border-radius: 4px;
  letter-spacing: 0.4px;
  animation: badgeBlink 1.4s infinite alternate;
}

.login-day-card.locked {
  opacity: 0.55;
}

.login-day-card.milestone {
  background: linear-gradient(145deg, rgba(168, 85, 247, 0.18), rgba(236, 72, 153, 0.18));
  border-color: rgba(168, 85, 247, 0.55);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.2);
}

.login-day-card.milestone .day-badge {
  color: #d8b4fe;
}

.login-day-card.milestone.ready {
  background: linear-gradient(145deg, rgba(236, 72, 153, 0.3), rgba(168, 85, 247, 0.3));
  border-color: #f472b6;
  box-shadow: 0 0 22px rgba(236, 72, 153, 0.6);
}

.login-day-card.grand-finale {
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.3), rgba(236, 72, 153, 0.3), rgba(99, 102, 241, 0.3));
  border: 1.5px solid #fcd34d;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.35);
}

.login-day-card.grand-finale .day-badge {
  color: #fde047;
}

/* Milestone Chests Track */
.milestone-chests-container {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md, 8px);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.milestone-chest-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.milestone-chest-node:hover {
  transform: translateY(-2px);
}

.milestone-chest-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: all 0.2s ease;
}

.milestone-chest-node.ready .milestone-chest-icon {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.25);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.5);
  animation: chestBounce 1.5s infinite ease-in-out;
}

.milestone-chest-node.claimed .milestone-chest-icon {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.1);
  opacity: 0.6;
}

/* Keyframes */
@keyframes loginCardGlow {
  0%, 100% {
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
    border-color: #fbbf24;
  }
  50% {
    box-shadow: 0 0 24px rgba(245, 158, 11, 0.7);
    border-color: #fde047;
  }
}

@keyframes badgeBlink {
  0% { opacity: 0.8; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1.05); }
}

@keyframes chestBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Header Login Reward Gift Glow */
.gift-icon-glow {
  animation: giftIconPulse 2s infinite ease-in-out;
}

@keyframes giftIconPulse {
  0%, 100% {
    filter: drop-shadow(0 0 2px rgba(245, 158, 11, 0.4));
  }
  50% {
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.9));
  }
}

/* ==========================================================================
   CLIENT EDUCATION MANAGER (SIMPLIFIED MOVEMENT SYLLABUS) STYLES
   ========================================================================== */

.syllabus-pattern-btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
}

.syllabus-pattern-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--border-radius-md);
  font-size: 12.5px;
  font-weight: 700;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.syllabus-pattern-btn:hover {
  background: rgba(51, 65, 85, 0.8);
  border-color: rgba(255, 255, 255, 0.2);
  color: white;
}

.syllabus-pattern-btn.active {
  background: var(--accent-primary-gradient, linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%));
  border-color: transparent;
  color: white;
  box-shadow: 0 0 14px var(--accent-primary-shadow, rgba(99, 102, 241, 0.4));
}

.syllabus-pattern-btn .badge-count {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  color: white;
}

.syllabus-pattern-btn.active .badge-count {
  background: rgba(255, 255, 255, 0.25);
}

.syllabus-pattern-chip {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
}

.syllabus-pattern-chip.pattern-push {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.syllabus-pattern-chip.pattern-pull {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.syllabus-pattern-chip.pattern-squat {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.4);
  color: #c084fc;
}

.syllabus-pattern-chip.pattern-hip-hinge {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.syllabus-pattern-chip.pattern-lunge {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.4);
  color: #fb7185;
}

.syllabus-pattern-chip.pattern-custom {
  background: rgba(148, 163, 184, 0.15);
  border-color: rgba(148, 163, 184, 0.4);
  color: #cbd5e1;
}

.syllabus-pattern-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.syllabus-search-box-wrapper {
  position: relative;
  margin-bottom: 14px;
  width: 100%;
}

.syllabus-search-input-field {
  width: 100%;
  padding: 10px 14px 10px 36px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  color: white;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.syllabus-search-input-field:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.35);
}

.syllabus-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  pointer-events: none;
}

.syllabus-search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  max-height: 280px;
  overflow-y: auto;
  z-index: 100;
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
}

.syllabus-search-result-item {
  padding: 9px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s;
}

.syllabus-search-result-item:hover {
  background: rgba(99, 102, 241, 0.2);
}

.syllabus-exercise-row {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--border-radius-md);
  padding: 10px 14px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.syllabus-exercise-row:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.syllabus-status-btn-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px 4px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.syllabus-status-btn {
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  white-space: nowrap;
}

.syllabus-status-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.06);
}

.syllabus-status-btn.btn-to-learn.active {
  background: rgba(100, 116, 139, 0.35);
  border-color: rgba(148, 163, 184, 0.5);
  color: #f1f5f9;
}

.syllabus-status-btn.btn-learning.active {
  background: rgba(245, 158, 11, 0.25);
  border-color: rgba(245, 158, 11, 0.6);
  color: #fde047;
}

.syllabus-status-btn.btn-proficient.active {
  background: rgba(168, 85, 247, 0.25);
  border-color: rgba(168, 85, 247, 0.6);
  color: #e9d5ff;
}

.syllabus-status-btn.btn-mastered.active {
  background: rgba(16, 185, 129, 0.25);
  border-color: rgba(16, 185, 129, 0.6);
  color: #6ee7b7;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

.syllabus-done-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.syllabus-done-badge.active {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.syllabus-done-badge.zero {
  background: rgba(100, 116, 139, 0.15);
  border: 1px dashed rgba(148, 163, 184, 0.3);
  color: #94a3b8;
}

.syllabus-scheduled-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  white-space: nowrap;
}

.syllabus-frequency-tag {
  font-size: 10.5px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.syllabus-lock-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0.6) 100%);
  border: 1px dashed rgba(245, 158, 11, 0.4);
  border-radius: var(--border-radius-md);
  padding: 32px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* =========================================================================
   NUTRITION LOGGING & FOOD DIARY STYLES
   ========================================================================= */

:root {
  --macro-cals: #f59e0b;
  --macro-pro: #3b82f6;
  --macro-carb: #10b981;
  --macro-fat: #8b5cf6;
  --macro-fiber: #06b6d4;
  --macro-sugar: #ec4899;
  --macro-sodium: #94a3b8;
  --macro-water: #0ea5e9;
}

/* 1. Date Navigator Bar (Standardized 3-Column Glass Layout) */
.nutrition-date-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card, rgba(15, 23, 42, 0.7));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  border-radius: var(--border-radius-md, 12px);
  padding: 10px 16px;
  margin-bottom: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  gap: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.nutrition-date-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  min-width: 0;
  user-select: none;
}

.nutrition-date-title {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.nutrition-date-subtitle {
  font-size: 11.5px;
  color: var(--text-muted, #94a3b8);
  font-weight: 500;
  margin-top: 2px;
  line-height: 1.2;
}

/* Standardized Navigation Buttons */
.nutrition-date-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  user-select: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.nutrition-date-nav-btn i,
.nutrition-date-nav-btn svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.2px;
  transition: transform 0.2s ease, color 0.2s ease;
  color: #94a3b8;
}

.nutrition-date-nav-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-color-active, rgba(99, 102, 241, 0.5));
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), 0 0 12px var(--accent-primary-shadow, rgba(99, 102, 241, 0.25));
}

.nutrition-date-nav-btn:hover i,
.nutrition-date-nav-btn:hover svg {
  color: var(--accent-primary-hover, #a5b4fc);
}

.nutrition-date-nav-btn.prev-btn:hover i,
.nutrition-date-nav-btn.prev-btn:hover svg {
  transform: translateX(-2px);
}

.nutrition-date-nav-btn.next-btn:hover i,
.nutrition-date-nav-btn.next-btn:hover svg {
  transform: translateX(2px);
}

.nutrition-date-nav-btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Smart "Jump to Today" Chip */
.nutrition-today-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  margin-top: 4px;
  font-size: 10.5px;
  font-weight: 700;
  background: rgba(99, 102, 241, 0.16);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  user-select: none;
}

.nutrition-today-chip:hover {
  background: rgba(99, 102, 241, 0.3);
  border-color: rgba(99, 102, 241, 0.6);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.nutrition-today-chip i,
.nutrition-today-chip svg {
  width: 10px;
  height: 10px;
}

/* Theme Responsiveness */
body.player-theme .nutrition-date-nav-btn:hover {
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), 0 0 12px rgba(168, 85, 247, 0.25);
}
body.player-theme .nutrition-date-nav-btn:hover i,
body.player-theme .nutrition-date-nav-btn:hover svg {
  color: #c084fc;
}
body.player-theme .nutrition-today-chip {
  background: rgba(168, 85, 247, 0.16);
  border-color: rgba(168, 85, 247, 0.35);
  color: #d8b4fe;
}
body.player-theme .nutrition-today-chip:hover {
  background: rgba(168, 85, 247, 0.3);
  border-color: rgba(168, 85, 247, 0.6);
}

body.adventurer-theme .nutrition-date-nav-btn:hover {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), 0 0 12px rgba(245, 158, 11, 0.25);
}
body.adventurer-theme .nutrition-date-nav-btn:hover i,
body.adventurer-theme .nutrition-date-nav-btn:hover svg {
  color: #fbbf24;
}
body.adventurer-theme .nutrition-today-chip {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fde68a;
}
body.adventurer-theme .nutrition-today-chip:hover {
  background: rgba(245, 158, 11, 0.3);
  border-color: rgba(245, 158, 11, 0.6);
}

body.cultivator-theme .nutrition-date-nav-btn:hover {
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), 0 0 12px rgba(239, 68, 68, 0.25);
}
body.cultivator-theme .nutrition-date-nav-btn:hover i,
body.cultivator-theme .nutrition-date-nav-btn:hover svg {
  color: #ff7b7b;
}
body.cultivator-theme .nutrition-today-chip {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}
body.cultivator-theme .nutrition-today-chip:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(239, 68, 68, 0.6);
}

/* 2. Macro Rollup Hero Card & Donut Ring */
.nutrition-macro-card {
  padding: 20px;
  border-radius: var(--border-radius-lg);
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.macro-donut-wrapper {
  position: relative;
  width: 104px;
  height: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.macro-donut-svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.macro-donut-circle-bg {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 8;
  fill: none;
}

.macro-donut-circle-fill {
  stroke: var(--macro-cals);
  stroke-width: 8;
  stroke-linecap: round;
  fill: none;
  stroke-dasharray: 251.32;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.3s ease;
}

.macro-donut-center-text {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.macro-donut-center-text .val {
  font-size: 19px;
  font-weight: 900;
  color: white;
  line-height: 1.1;
}

.macro-donut-center-text .lbl {
  font-size: 9.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}

/* Linear Progress Bar Tracks */
.macro-progress-track {
  width: 100%;
  height: 7px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.macro-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.macro-progress-fill.cals { background: var(--macro-cals); }
.macro-progress-fill.pro  { background: var(--macro-pro); }
.macro-progress-fill.carb { background: var(--macro-carb); }
.macro-progress-fill.fat  { background: var(--macro-fat); }
.macro-progress-fill.water { background: var(--macro-water); }

/* Secondary Micronutrient Summary Grid & Boxes (Hydration, Fiber, Sodium) */
.nutrition-macro-summary-grid,
.secondary-macro-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  width: 100%;
}

.macro-box,
.secondary-macro-pill {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--border-radius-sm, 8px);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.macro-box:hover,
.secondary-macro-pill:hover {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(255, 255, 255, 0.15);
}

.macro-box.hydration {
  border-left: 3px solid #38bdf8;
}

.macro-box.fiber {
  border-left: 3px solid var(--macro-fiber, #06b6d4);
}

.macro-box.sodium {
  border-left: 3px solid #a855f7;
}

.macro-box-label,
.secondary-macro-pill .lbl {
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.macro-box-values,
.secondary-macro-pill .val {
  display: flex;
  align-items: baseline;
  gap: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.macro-box-current {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.macro-box-target {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
}

@media (max-width: 480px) {
  .nutrition-macro-summary-grid,
  .secondary-macro-pills {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding-top: 10px;
  }
  .macro-box,
  .secondary-macro-pill {
    padding: 6px 7px;
  }
  .macro-box-label,
  .secondary-macro-pill .lbl {
    font-size: 10px;
    gap: 3px;
  }
  .macro-box-current {
    font-size: 12px;
  }
  .macro-box-target {
    font-size: 10px;
  }
}

/* 3. Four Meal Buckets (Breakfast, Lunch, Dinner, Snack) */
.meal-bucket-card {
  border-radius: var(--border-radius-md);
  margin-bottom: 12px;
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.07);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.meal-bucket-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.meal-bucket-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meal-bucket-icon {
  font-size: 16px;
}

.meal-bucket-name {
  font-size: 14px;
  font-weight: 800;
  color: white;
}

.meal-bucket-subtotal-badge {
  font-size: 11.5px;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.3);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.meal-bucket-subtotal-badge strong {
  color: var(--macro-cals);
}

.meal-items-list {
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.meal-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-sm);
  transition: background 0.15s ease;
  gap: 8px;
}

.meal-item-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.meal-item-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.meal-item-name {
  font-size: 13px;
  font-weight: 700;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meal-item-portion {
  font-size: 11px;
  color: var(--text-muted);
}

.meal-item-macros {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.macro-chip-cals {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--macro-cals);
}

.macro-chip-pro {
  font-size: 10.5px;
  font-weight: 600;
  color: #93c5fd;
}

.macro-chip-carb {
  font-size: 10.5px;
  font-weight: 600;
  color: #6ee7b7;
}

.macro-chip-fat {
  font-size: 10.5px;
  font-weight: 600;
  color: #c4b5fd;
}

.meal-item-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.meal-bucket-actions {
  display: flex;
  gap: 6px;
  padding: 8px 12px 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* 4. Water Hydration Tracker Card */
.nutrition-water-card {
  padding: 16px;
  border-radius: var(--border-radius-md);
  margin-bottom: 16px;
  background: rgba(14, 165, 233, 0.06);
  border: 1px solid rgba(14, 165, 233, 0.2);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.water-buttons-row,
.water-quick-btn-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

@media (max-width: 520px) {
  .water-buttons-row,
  .water-quick-btn-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
}

.water-quick-btn {
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.3);
  color: #7dd3fc;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}

.water-quick-btn:hover {
  background: rgba(14, 165, 233, 0.25);
  color: white;
  border-color: rgba(14, 165, 233, 0.5);
}

/* 5. Food Discovery & Search Modal Components */
.nutrition-search-bar-wrapper {
  position: relative;
  width: 100%;
}

.nutrition-category-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0 6px 0;
  scrollbar-width: thin;
}

.nutrition-cat-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.nutrition-cat-tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.nutrition-cat-tab-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
  font-weight: 700;
}

.nutrition-food-results-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 2px;
}

.nutrition-food-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  gap: 10px;
}

.nutrition-food-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

/* 6. Portion Stepper & Live Preview */
.portion-stepper-container {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.portion-stepper-btn {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  border-radius: 8px;
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.portion-stepper-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.portion-chips-row {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.portion-quick-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.portion-quick-chip:hover {
  background: rgba(99, 102, 241, 0.25);
  color: white;
  border-color: var(--accent-primary);
}

.portion-live-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--border-radius-sm);
  padding: 10px;
  text-align: center;
}

.portion-macro-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.portion-macro-box .lbl {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.portion-macro-box .val {
  font-size: 14px;
  font-weight: 900;
}

/* 7. Barcode Scanner Viewfinder */
.barcode-scanner-viewfinder {
  position: relative;
  width: 100%;
  height: 180px;
  background: rgba(0, 0, 0, 0.6);
  border: 2px dashed rgba(59, 130, 246, 0.5);
  border-radius: var(--border-radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
}

.barcode-scanner-redline {
  position: absolute;
  top: 0;
  left: 10%;
  width: 80%;
  height: 2px;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444, 0 0 16px #ef4444;
  animation: scanLaser 2s infinite ease-in-out alternate;
}

@keyframes scanLaser {
  0%   { top: 15%; opacity: 0.8; }
  100% { top: 85%; opacity: 1; }
}

/* =========================================================================
   8. Macronutrient Entry Cards & Real-Time Kcal Displays (Option 4)
   ========================================================================= */
.macro-entry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.macro-entry-card {
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md, 10px);
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.macro-entry-card:hover {
  transform: translateY(-1px);
}

.macro-entry-card.protein {
  background: rgba(59, 130, 246, 0.07);
  border-color: rgba(59, 130, 246, 0.3);
}
.macro-entry-card.protein:focus-within {
  border-color: var(--macro-pro);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.25);
}

.macro-entry-card.carbs {
  background: rgba(16, 185, 129, 0.07);
  border-color: rgba(16, 185, 129, 0.3);
}
.macro-entry-card.carbs:focus-within {
  border-color: var(--macro-carb);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

.macro-entry-card.fat {
  background: rgba(139, 92, 246, 0.07);
  border-color: rgba(139, 92, 246, 0.3);
}
.macro-entry-card.fat:focus-within {
  border-color: var(--macro-fat);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.25);
}

.macro-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.macro-card-label {
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.macro-pct-badge {
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  letter-spacing: 0.2px;
}

.macro-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}

.macro-input-wrapper input {
  padding-right: 22px !important;
  text-align: center;
  font-weight: 700;
}

.macro-unit-suffix {
  position: absolute;
  right: 7px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
  pointer-events: none;
}

.macro-kcal-subbox {
  background: rgba(0, 0, 0, 0.45);
  border-radius: 6px;
  padding: 4px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.macro-kcal-val {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.macro-density-note {
  font-size: 8.5px;
  color: var(--text-muted, #94a3b8);
  opacity: 0.85;
}

.macro-ratio-bar-wrapper {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.macro-ratio-track {
  height: 6px;
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.macro-ratio-seg {
  height: 100%;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.macro-ratio-seg.pro { background: var(--macro-pro); }
.macro-ratio-seg.carb { background: var(--macro-carb); }
.macro-ratio-seg.fat { background: var(--macro-fat); }

.macro-match-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm, 6px);
  padding: 8px 12px;
  font-size: 11.5px;
  margin-top: 4px;
}

/* =========================================================================
   9. Deficit & Surplus Strategy & Smart Intercept System
   ========================================================================= */
.strategy-selector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.strategy-pill-btn {
  padding: 7px 6px;
  border-radius: var(--border-radius-md, 10px);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  transition: all 0.2s ease;
}

.strategy-pill-btn:hover {
  background: rgba(30, 41, 59, 0.9);
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.2);
}

.strategy-pill-btn.active {
  background: rgba(99, 102, 241, 0.25);
  border-color: rgba(99, 102, 241, 0.7);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
}

.strategy-pill-btn.active.deficit {
  background: rgba(59, 130, 246, 0.22);
  border-color: rgba(59, 130, 246, 0.7);
  color: #93c5fd;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.25);
}

.strategy-pill-btn.active.surplus {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(245, 158, 11, 0.7);
  color: #fde68a;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

.strategy-pill-sub {
  font-size: 9.5px;
  font-weight: 500;
  opacity: 0.8;
}

.preset-chip-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.preset-chip {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary, #cbd5e1);
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-chip:hover {
  background: rgba(51, 65, 85, 0.9);
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
}

.preset-chip.deficit {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}
.preset-chip.deficit:hover {
  background: rgba(59, 130, 246, 0.25);
}

.preset-chip.surplus {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fcd34d;
}
.preset-chip.surplus:hover {
  background: rgba(245, 158, 11, 0.25);
}

.btn-sync-tdee-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.2;
  text-decoration: none;
  user-select: none;
}

.btn-sync-tdee-mini:hover {
  background: rgba(99, 102, 241, 0.3);
  border-color: rgba(99, 102, 241, 0.6);
  color: #ffffff;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.3);
  transform: translateY(-1px);
}

.btn-sync-tdee-mini:active {
  transform: translateY(0);
}

/* =========================================================================
   10. Macro Split Generator Component
   ========================================================================= */
.macro-split-generator-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md, 10px);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.macro-split-generator-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.macro-split-action-btn {
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.35);
  transition: all 0.2s ease;
}

.macro-split-action-btn:hover {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.55);
  transform: translateY(-1px);
}

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

.smart-intercept-action-btn {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: var(--border-radius-md, 10px);
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
}

.smart-intercept-action-btn:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.smart-intercept-action-btn.primary-phase {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.4) 0%, rgba(15, 23, 42, 0.9) 100%);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.smart-intercept-action-btn.primary-phase.surplus {
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.4) 0%, rgba(15, 23, 42, 0.9) 100%);
  border-color: rgba(245, 158, 11, 0.4);
}

.smart-intercept-action-btn.primary-phase:hover {
  border-color: rgba(59, 130, 246, 0.8);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.2);
}

.smart-intercept-action-btn.primary-phase.surplus:hover {
  border-color: rgba(245, 158, 11, 0.8);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.2);
}

.projection-rate-banner {
  border-radius: var(--border-radius-sm, 6px);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
}

.projection-rate-banner.deficit {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #bfdbfe;
}

.projection-rate-banner.surplus {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fef08a;
}

/* ==========================================================================
   Big 3 Quick-Select & 1RM Performance Snapshot Styles
   ========================================================================== */
.big3-quick-container {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.big3-quick-btn {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.big3-quick-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  color: white;
}

.big3-quick-btn.active {
  background: rgba(99, 102, 241, 0.25);
  border-color: var(--accent-primary);
  color: #e0e7ff;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.35);
}

.big3-snapshot-banner {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--border-radius-sm);
  padding: 9px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  transition: all 0.2s ease;
}

/* ==========================================================================
   1RM STRENGTH TOTAL & 100KG - 1000KG CLUB ACHIEVEMENT SYSTEM
   ========================================================================== */

.strength-club-section {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.strength-club-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899, #f59e0b, #34d399, #6366f1);
  background-size: 200% auto;
  animation: strengthHeaderGlow 6s linear infinite;
}

@keyframes strengthHeaderGlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.strength-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.strength-header-title {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: white;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.2px;
}

.strength-mode-pill-group {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px;
  border-radius: var(--border-radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.strength-mode-btn {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.strength-mode-btn.active {
  background: rgba(99, 102, 241, 0.25);
  color: #e0e7ff;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.strength-sync-btn {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.25) 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fef08a;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--border-radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.strength-sync-btn:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35) 0%, rgba(217, 119, 6, 0.4) 100%);
  border-color: #f59e0b;
  transform: translateY(-1px);
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.25);
}

.strength-lifts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.strength-lift-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s ease;
}

.strength-lift-card:focus-within {
  border-color: rgba(99, 102, 241, 0.6);
  background: rgba(99, 102, 241, 0.06);
}

.strength-lift-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
}

.strength-lift-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.strength-lift-pr-badge {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(245, 158, 11, 0.15);
  color: #fef08a;
  border: 1px solid rgba(245, 158, 11, 0.3);
  white-space: nowrap;
}

.strength-lift-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 3px 8px;
}

.strength-lift-input {
  background: transparent;
  border: none;
  color: white;
  font-size: 14px;
  font-weight: 800;
  width: 100%;
  outline: none;
}

.strength-lift-unit {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
}

/* Hero Active Club Showcase */
.strength-club-hero {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--border-radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.strength-club-hero-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.strength-club-hero-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.strength-hero-trophy-emblem {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
}

.strength-hero-trophy-emblem::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 14px;
  padding: 2px;
  background: inherit;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.strength-club-hero-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.strength-club-hero-status {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}

.strength-club-hero-name {
  font-size: 18px;
  font-weight: 900;
  color: white;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.2;
}

.strength-club-hero-title {
  font-size: 12px;
  font-weight: 700;
  color: #a5b4fc;
}

.strength-club-hero-total-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-sm);
  padding: 8px 14px;
  text-align: right;
  min-width: 130px;
}

.strength-hero-total-label {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
}

.strength-hero-total-val {
  font-size: 20px;
  font-weight: 900;
  color: #34d399;
  display: block;
  line-height: 1.2;
}

.strength-hero-total-alt {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 600;
  display: block;
}

/* Progress toward Next Club */
.strength-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.strength-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.strength-progress-target-label {
  font-weight: 700;
  color: var(--text-secondary);
}

.strength-progress-pct {
  font-weight: 800;
  color: #a5b4fc;
}

.strength-progress-track {
  height: 7px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.strength-progress-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.strength-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: strengthProgressShimmer 2s infinite;
}

@keyframes strengthProgressShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* 10-Tier Strength Club Trophy Hall of Fame */
.strength-hall-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.strength-hall-title {
  margin: 0;
  font-size: 12.5px;
  font-weight: 800;
  color: white;
  display: flex;
  align-items: center;
  gap: 6px;
}

.strength-hall-count-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.strength-trophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 10px;
}

.strength-trophy-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  position: relative;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.strength-trophy-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.strength-trophy-card.unlocked {
  border-color: var(--trophy-border, rgba(255, 255, 255, 0.2));
  background: var(--trophy-bg, rgba(30, 41, 59, 0.7));
}

.strength-trophy-card.unlocked:hover {
  border-color: var(--trophy-glow, #6366f1);
  box-shadow: 0 0 16px var(--trophy-glow, rgba(99, 102, 241, 0.4));
}

.strength-trophy-card.locked {
  opacity: 0.6;
  filter: grayscale(0.5);
  background: rgba(10, 15, 30, 0.6);
  border-style: dashed;
}

.strength-trophy-card.locked:hover {
  opacity: 0.9;
  filter: grayscale(0.2);
}

.strength-trophy-card.active-highest {
  border-width: 2px;
  border-color: var(--trophy-color, #fbbf24);
  box-shadow: 0 0 18px var(--trophy-glow, rgba(251, 191, 36, 0.5));
}

.strength-trophy-emblem {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 2px;
  position: relative;
  transition: transform 0.2s ease;
}

.strength-trophy-card:hover .strength-trophy-emblem {
  transform: scale(1.08);
}

.strength-trophy-club-name {
  font-size: 12px;
  font-weight: 800;
  color: white;
  margin: 0;
  line-height: 1.2;
}

.strength-trophy-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--trophy-color, #a5b4fc);
  line-height: 1.2;
}

.strength-trophy-req {
  font-size: 9.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.strength-trophy-badge {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.4px;
  margin-top: 2px;
}

.strength-trophy-badge.unlocked {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.strength-trophy-badge.locked {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* 500kg & 1000kg Special Pulsing Effects */
.strength-trophy-card.tier-500.unlocked .strength-trophy-emblem {
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.6);
  animation: goldPulse 3s ease-in-out infinite alternate;
}

@keyframes goldPulse {
  0% { box-shadow: 0 0 10px rgba(250, 204, 21, 0.4); }
  100% { box-shadow: 0 0 22px rgba(250, 204, 21, 0.8); }
}

.strength-trophy-card.tier-1000.unlocked .strength-trophy-emblem {
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.7);
  animation: apexSovereignPulse 3s ease-in-out infinite alternate;
}

@keyframes apexSovereignPulse {
  0% { filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.6)); }
  50% { filter: drop-shadow(0 0 14px rgba(245, 158, 11, 0.8)); }
  100% { filter: drop-shadow(0 0 16px rgba(6, 182, 212, 0.8)); }
}

/* Trophy Detail Inspector Modal Styling */
.trophy-inspector-badge-box {
  width: 90px;
  height: 90px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 46px;
  margin: 0 auto;
  position: relative;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.trophy-inspector-quote {
  font-style: italic;
  font-size: 11.5px;
  color: #cbd5e1;
  background: rgba(0, 0, 0, 0.3);
  border-left: 3px solid var(--accent-primary);
  padding: 8px 12px;
  border-radius: 0 6px 6px 0;
  margin: 8px 0;
}

/* ==========================================================================
   ROUTINE ARCHITECT BOOTCAMP & TUTORIAL SYSTEM STYLES
   ========================================================================== */

.routine-tutorial-section {
  position: relative;
  padding: 20px;
  background: radial-gradient(120% 120% at 0% 0%, rgba(99, 102, 241, 0.09) 0%, rgba(139, 92, 246, 0.04) 50%, rgba(15, 23, 42, 0.6) 100%);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 8px 32px -4px rgba(99, 102, 241, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  overflow: hidden;
}

.routine-tutorial-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.routine-tutorial-icon-box {
  width: 34px;
  height: 34px;
  border-radius: var(--border-radius-sm);
  background: rgba(168, 85, 247, 0.18);
  border: 1px solid rgba(168, 85, 247, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.25);
}

.routine-tutorial-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.routine-tutorial-progress-pill {
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(99, 102, 241, 0.15);
  color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, 0.3);
  letter-spacing: 0.2px;
}

.routine-tutorial-skip-btn {
  padding: 6px 12px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #94a3b8 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  transition: all 0.2s ease !important;
}

.routine-tutorial-skip-btn:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
}

.routine-tutorial-progress-bg {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 18px;
  overflow: hidden;
  position: relative;
}

.routine-tutorial-progress-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.6);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.routine-tutorial-steps-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 1100px) {
  .routine-tutorial-steps-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

@media (max-width: 640px) {
  .routine-tutorial-steps-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 10px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }
  .routine-step-card {
    min-width: 220px;
    flex-shrink: 0;
    scroll-snap-align: start;
  }
}

.routine-step-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 12px;
  border-radius: var(--border-radius-md);
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: all 0.25s ease;
  position: relative;
  min-height: 160px;
}

.routine-step-card:hover {
  background: rgba(30, 41, 59, 0.5);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.routine-step-card.active {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 0 18px rgba(99, 102, 241, 0.2);
}

.routine-step-card.completed {
  background: rgba(16, 185, 129, 0.04);
  border-color: rgba(16, 185, 129, 0.35);
}

.routine-step-card.locked {
  opacity: 0.55;
  background: rgba(15, 23, 42, 0.25);
  border-color: rgba(255, 255, 255, 0.04);
  cursor: not-allowed;
}

.routine-step-card.locked:hover {
  transform: none;
  background: rgba(15, 23, 42, 0.25);
}

.routine-step-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.routine-step-num-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.routine-step-num-badge.completed {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

.routine-step-card.active .routine-step-num-badge {
  background: rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.35);
}

.routine-step-card-status {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
}

.routine-step-card.completed .routine-step-card-status {
  color: #34d399;
}

.routine-step-card.active .routine-step-card-status {
  color: #a5b4fc;
}

.routine-step-card-body {
  flex: 1;
  margin-bottom: 12px;
}

.routine-step-title {
  margin: 0 0 4px 0;
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
}

.routine-step-desc {
  margin: 0;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
}

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

.routine-step-btn {
  width: 100%;
  padding: 6px 10px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  border-radius: var(--border-radius-sm) !important;
}

.routine-step-btn.done {
  background: rgba(16, 185, 129, 0.1) !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
  color: #e2e8f0 !important;
}

.routine-step-btn.locked {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
  color: #64748b !important;
  cursor: not-allowed !important;
}

/* In-Modal Tutorial Hint Banner */
.routine-builder-hint-banner {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--border-radius-sm);
  padding: 8px 14px;
  margin: 12px 24px 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  animation: slideDownFade 0.25s ease;
}

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

/* ==========================================================================
   NUTRITION ONBOARDING TUTORIAL & QUICK GUIDE
   ========================================================================== */

.nutrition-tutorial-section {
  padding: 16px;
  border-radius: var(--border-radius-lg);
  border: 1px solid rgba(245, 158, 11, 0.28);
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.08), rgba(15, 23, 42, 0.75) 70%);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  animation: slideDownFade 0.3s ease;
}

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

.nutrition-tutorial-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}

.nutrition-tutorial-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.nutrition-tutorial-progress-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 9999px;
  background: rgba(245, 158, 11, 0.15);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nutrition-tutorial-progress-pill.completed {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.35);
}

.nutrition-tutorial-progress-bg {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 16px;
  overflow: hidden;
  position: relative;
}

.nutrition-tutorial-progress-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #f97316 0%, #eab308 50%, #10b981 100%);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nutrition-tutorial-steps-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 1100px) {
  .nutrition-tutorial-steps-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

@media (max-width: 640px) {
  .nutrition-tutorial-steps-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 10px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }
  .nutrition-step-card {
    min-width: 200px;
    flex-shrink: 0;
    scroll-snap-align: start;
  }
}

/* === Per-step color theming via data-step attribute === */
.nutrition-step-card[data-step="1"] { --step-color: #f59e0b; --step-color-rgb: 245, 158, 11; }
.nutrition-step-card[data-step="2"] { --step-color: #10b981; --step-color-rgb: 16, 185, 129; }
.nutrition-step-card[data-step="3"] { --step-color: #38bdf8; --step-color-rgb: 56, 189, 248; }
.nutrition-step-card[data-step="4"] { --step-color: #f97316; --step-color-rgb: 249, 115, 22; }
.nutrition-step-card[data-step="5"] { --step-color: #06b6d4; --step-color-rgb: 6, 182, 212; }

.nutrition-step-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 14px 12px;
  border-radius: var(--border-radius-md);
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.09);
  transition: all 0.25s ease;
  position: relative;
  min-height: 220px;
  text-align: center;
}

.nutrition-step-card:hover {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* Step 1 required: amber left-border accent */
.nutrition-step-card[data-step="1"]:not(.completed) {
  border-left: 3px solid rgba(245, 158, 11, 0.85);
}

.nutrition-step-card.active {
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.25);
}

.nutrition-step-card.completed {
  background: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.35);
}

.nutrition-step-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.nutrition-step-num-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.nutrition-step-num-badge.completed {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.35);
}

.nutrition-step-card.active .nutrition-step-num-badge {
  background: rgba(245, 158, 11, 0.25);
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.65);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.nutrition-step-card-status {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.nutrition-step-card.completed .nutrition-step-card-status {
  color: #34d399;
}

.nutrition-step-card.active .nutrition-step-card-status {
  color: #fde68a;
}

.nutrition-step-card-body {
  flex: 1;
  margin-bottom: 12px;
}

.nutrition-step-title {
  margin: 0 0 5px 0;
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
}

.nutrition-step-desc {
  margin: 0;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

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

.nutrition-step-btn {
  width: 100%;
  padding: 8px 12px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  border-radius: var(--border-radius-sm) !important;
}

.nutrition-step-btn.done {
  background: rgba(16, 185, 129, 0.09) !important;
  border-color: rgba(16, 185, 129, 0.28) !important;
  color: #a7f3d0 !important;
}

/* === Large centered icon per step card === */
.nutrition-step-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  background: rgba(var(--step-color-rgb), 0.13);
  border: 1px solid rgba(var(--step-color-rgb), 0.28);
  box-shadow: 0 0 16px rgba(var(--step-color-rgb), 0.18);
  color: var(--step-color);
  flex-shrink: 0;
  transition: box-shadow 0.25s ease;
}

.nutrition-step-icon-box i,
.nutrition-step-icon-box svg {
  width: 22px;
  height: 22px;
}

.nutrition-step-card:hover .nutrition-step-icon-box {
  box-shadow: 0 0 24px rgba(var(--step-color-rgb), 0.32);
}

.nutrition-step-card.completed .nutrition-step-icon-box {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.2);
  color: #34d399;
}

/* === Tutorial footer: Finish & Unlock CTA === */
.nutrition-tutorial-footer {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nutrition-finish-btn {
  padding: 10px 28px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  min-width: 220px;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  border-radius: var(--border-radius-md) !important;
  letter-spacing: 0.1px;
}

.nutrition-finish-btn:disabled,
.nutrition-finish-btn[disabled] {
  opacity: 0.38;
  cursor: not-allowed;
  filter: grayscale(0.4);
  pointer-events: none;
}


.nutrition-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

@media (max-width: 580px) {
  .nutrition-guide-grid {
    grid-template-columns: 1fr;
  }
}

.nutrition-guide-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.nutrition-guide-card:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.nutrition-guide-card.highlight-orange {
  border-color: rgba(249, 115, 22, 0.35);
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.15), rgba(15, 23, 42, 0.65));
}

.nutrition-guide-card.highlight-red {
  border-color: rgba(239, 68, 68, 0.35);
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.15), rgba(15, 23, 42, 0.65));
}

.nutrition-guide-card.highlight-blue {
  border-color: rgba(56, 189, 248, 0.35);
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.15), rgba(15, 23, 42, 0.65));
}

.nutrition-guide-card.highlight-green {
  border-color: rgba(16, 185, 129, 0.35);
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.15), rgba(15, 23, 42, 0.65));
}

.nutrition-guide-card.highlight-purple {
  border-color: rgba(168, 85, 247, 0.35);
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.15), rgba(15, 23, 42, 0.65));
}

.nutrition-guide-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nutrition-guide-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
}

.nutrition-guide-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: white;
  margin: 0;
}

.nutrition-guide-card-desc {
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.45;
  margin: 0;
  flex: 1;
}

.nutrition-guide-key-point {
  font-size: 11px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 8px;
  border-radius: 6px;
  border-left: 2px solid var(--macro-cals, #f97316);
  line-height: 1.4;
}

.nutrition-guide-card-action {
  margin-top: 4px;
  display: flex;
  justify-content: flex-end;
}

/* ==========================================================================
   AVATAR PHOTO CROPPER MODAL & INTERACTIVE STAGE
   ========================================================================== */

.avatar-crop-stage-container {
  position: relative;
  width: 100%;
  height: 270px;
  background: #090d16;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  touch-action: none;
  user-select: none;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-crop-stage-container:active {
  cursor: grabbing;
}

#avatar-crop-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.avatar-crop-reticle-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-crop-circle-guide {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  box-shadow: 0 0 0 9999px rgba(10, 15, 28, 0.72);
  border: 2px solid #f59e0b;
  position: relative;
  box-sizing: border-box;
}

.avatar-crop-circle-guide::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

.avatar-crop-controls-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(30, 41, 59, 0.6);
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.avatar-crop-tool-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #e2e8f0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.avatar-crop-tool-btn:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  transform: scale(1.05);
}

.avatar-crop-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  outline: none;
}

.avatar-crop-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
  cursor: pointer;
  border: 2px solid #0f172a;
}

.avatar-crop-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
  cursor: pointer;
  border: 2px solid #0f172a;
}

.avatar-crop-preview-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(30, 41, 59, 0.45);
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.avatar-crop-preview-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
  background: #090d16;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-crop-preview-circle canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.profile-avatar-uploader {
  position: relative !important;
  overflow: hidden !important;
}

.profile-avatar-hover-hint {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  border-radius: 50%;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.profile-avatar-uploader:hover .profile-avatar-hover-hint {
  opacity: 1;
}

/* ==========================================================================
   Hypertrophy Volume EXP Multiplier Styles & Animations
   ========================================================================== */

.heatmap-metric-badge.badge-rpg-multiplier {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
  transition: all 0.2s ease;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--border-radius-sm);
  font-size: 11.5px;
}

.heatmap-metric-badge.badge-rpg-multiplier:hover {
  background: rgba(245, 158, 11, 0.28);
  border-color: rgba(245, 158, 11, 0.65);
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.35);
}

.rpg-sidebar-volume-box {
  cursor: pointer;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 8px 12px;
  width: 100%;
  max-width: 320px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.rpg-sidebar-volume-box:hover {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(30, 41, 59, 0.85);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.hypertrophy-admin-muscle-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-sm);
  font-size: 11px;
}

.hypertrophy-admin-muscle-row:hover {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(99, 102, 241, 0.3);
}

.hypertrophy-tier-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hypertrophy-tier-pill.tier-active {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
}

.hypertrophy-tier-pill.tier-inactive {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ========================================== */
/* --- STRIPE PAYMENT GATEWAY & INVOICE CSS - */
/* ========================================== */

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

.spin {
  animation: spin 1s linear infinite;
  display: inline-block;
}

.btn-loading {
  opacity: 0.75;
  pointer-events: none;
  cursor: wait !important;
}

.stripe-badge-container {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.stripe-pay-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
}

.invoice-badge-paid {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.invoice-badge-pending {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

/* Settings Export & Database Panels Spacing & Padding */
#settings-export-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

/* ========================================== */
/* --- TEMPO FUNCTION & CADENCE ASSISTANT CSS */
/* ========================================== */

.tempo-target-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #c7d2fe;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.tempo-target-badge:hover {
  background: rgba(99, 102, 241, 0.22);
  border-color: rgba(99, 102, 241, 0.5);
  color: #ffffff;
  transform: translateY(-1px);
}

.tempo-target-badge.empty-tempo {
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  color: var(--text-muted);
}

.tempo-target-badge.empty-tempo:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-primary);
  color: #ffffff;
}

.tempo-pill-ecc {
  color: #22d3ee;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
}

.tempo-pill-iso {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
}

/* In-Set Cadence Metronome Container */
.cadence-assistant-container {
  margin: 10px 0;
  padding: 12px 14px;
  border-radius: var(--border-radius-md);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(8, 12, 24, 0.95));
  border: 1px solid rgba(99, 102, 241, 0.35);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.cadence-visual-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 10px;
  text-align: center;
}

.cadence-phase-title {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.cadence-phase-title.phase-ecc {
  color: #22d3ee;
  text-shadow: 0 0 12px rgba(34, 211, 238, 0.4);
}

.cadence-phase-title.phase-iso {
  color: #fbbf24;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.4);
}

.cadence-phase-title.phase-con {
  color: #34d399;
  text-shadow: 0 0 12px rgba(52, 211, 153, 0.4);
}

.cadence-number-counter {
  font-size: 38px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}

.cadence-cue-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.cadence-progress-track {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  margin-top: 8px;
}

.cadence-progress-fill {
  height: 100%;
  transition: width 0.25s linear;
}

.cadence-progress-fill.fill-ecc {
  background: #22d3ee;
  box-shadow: 0 0 8px #22d3ee;
}

.cadence-progress-fill.fill-iso {
  background: #fbbf24;
  box-shadow: 0 0 8px #fbbf24;
}

.cadence-progress-fill.fill-con {
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
}

/* ========================================================================= */
/* --- RESPONSIVE MOBILE OVERLAP RESOLUTIONS (< 600px) --------------------- */
/* ========================================================================= */

@media (max-width: 600px) {
  /* Profile Card Padding Reclaim */
  .profile-card,
  .profile-card.glass-panel {
    padding: 16px 14px !important;
  }

  /* Two-Tier Stacked Layout for Profile Header */
  .profile-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  .profile-header-main {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .profile-info {
    min-width: 0 !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
  }

  #profile-name,
  #manage-profile-name {
    font-size: 19px !important;
    line-height: 1.25 !important;
    word-break: break-word !important;
  }

  /* Ergonomic Full-Width Glass Action Toolbar on Mobile */
  .profile-header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    padding-top: 10px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    margin-top: 2px !important;
    box-sizing: border-box !important;
  }

  .profile-header-actions .btn-glass-icon {
    flex: 1 !important;
    height: 38px !important;
    min-width: 0 !important;
  }

  /* Metadata Goal Badge Preservation */
  .metadata-pill-badge {
    max-width: 100% !important;
    white-space: normal !important;
    line-height: 1.35 !important;
    border-radius: 9999px !important;
  }

  /* Floating Assistant Trigger (FAB) Compact Mode on Other Tabs */
  .vea-fab-trigger {
    padding: 6px !important;
    border-radius: 50% !important;
    bottom: 78px !important;
    right: 14px !important;
  }

  /* Override mobile default bottom position when workout dock is active */
  body.has-minimized-workout .vea-fab-trigger,
  body:has(#live-workout-bar:not([style*="display: none"])) .vea-fab-trigger {
    bottom: 148px !important;
  }

  .vea-fab-label {
    display: none !important;
  }
}

/* Weekly Consistency 7-Day Dome Grid Responsiveness (< 420px) */
@media (max-width: 420px) {
  .day-domes-grid {
    gap: 4px !important;
  }

  .dome-button {
    width: 32px !important;
    height: 32px !important;
    font-size: 11px !important;
  }

  .day-dome-cell {
    gap: 4px !important;
  }

  .day-dome-cell span {
    font-size: 10px !important;
  }
}

/* Floating Assistant FAB: Dynamic Collision Avoidance with Profile View */
body.in-profile-view .vea-fab-trigger,
body:has(#view-profile.active) #vea-floating-trigger,
body:has(#view-profile.active) .vea-fab-trigger,
.view-container#view-profile.active ~ #vea-floating-trigger {
  display: none !important;
}

/* ================= EXERCISE HISTORY IMPORT STYLES ================= */
#custom-ex-import-history-banner {
  transition: all 0.25s ease-in-out;
}

.imported-history-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(99, 102, 241, 0.18);
  color: #c7d2fe;
  font-size: 9.5px;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(99, 102, 241, 0.35);
  font-weight: 700;
  vertical-align: middle;
}

/* ================= CLASS SELECTION TUTORIAL & SIMULATION STYLES ================= */
.tutorial-class-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  user-select: none;
}

.tutorial-class-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

body.light-theme .tutorial-class-card:hover {
  border-color: rgba(15, 23, 42, 0.3);
}

.tutorial-class-card.selected {
  border-color: var(--accent-primary);
  box-shadow: 0 0 16px var(--accent-primary-shadow, rgba(225, 29, 72, 0.3));
  background: rgba(225, 29, 72, 0.08);
}

body.light-theme .tutorial-class-card.selected {
  background: rgba(220, 38, 38, 0.06);
  border-color: var(--accent-primary);
}

.tutorial-class-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tutorial-class-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.tutorial-class-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tag-cultivator {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.tag-player {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.tag-adventurer {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.tutorial-class-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.tutorial-class-specs {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: 8px;
  margin-top: 4px;
}


/* ================= SETTINGS THEME PICKER STYLES ================= */
.settings-theme-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 520px) {
  .settings-theme-grid {
    grid-template-columns: 1fr;
  }
}

.settings-theme-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  text-align: left;
}

.settings-theme-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

body.light-theme .settings-theme-card:hover {
  border-color: rgba(15, 23, 42, 0.25);
}

.settings-theme-card.active {
  border-color: var(--accent-primary);
  box-shadow: 0 0 16px var(--accent-primary-shadow, rgba(225, 29, 72, 0.3));
  background: rgba(225, 29, 72, 0.08);
}

body.light-theme .settings-theme-card.active {
  background: rgba(220, 38, 38, 0.06);
  border-color: var(--accent-primary);
}

.settings-theme-card-preview {
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.preview-dark {
  background: #07070a;
  color: #f8fafc;
}

.preview-light {
  background: #f4f5f9;
  color: #09090b;
  border-color: rgba(15, 23, 42, 0.15);
}

.settings-theme-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.settings-theme-card-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.settings-theme-check-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.settings-theme-card.active .settings-theme-check-icon {
  color: var(--accent-primary);
}

.settings-theme-card-desc {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
}

/* Disabled Theme Cards & Header Toggle when Character Class UI is Active */
.settings-theme-card.disabled-by-class-theme {
  opacity: 0.55;
  filter: grayscale(0.25);
  cursor: not-allowed;
  pointer-events: auto;
  border-style: dashed;
}

.settings-theme-card.disabled-by-class-theme:hover {
  transform: none !important;
  background: var(--bg-card) !important;
  border-color: var(--border-color) !important;
  box-shadow: none !important;
}

#header-theme-toggle-btn.disabled-by-class-theme {
  opacity: 0.45;
  cursor: not-allowed !important;
  pointer-events: auto;
}

#settings-theme-lock-notice {
  transition: all 0.2s ease-in-out;
}

/* ==========================================================================
   ADMIN MASTER WORKOUT DATABASE STUDIO WORKSPACE MODAL
   ========================================================================== */
.admin-master-db-workspace {
  max-width: 1200px !important;
  width: 96vw !important;
  height: 90vh !important;
  max-height: 880px !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: #111726 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85) !important;
}

.admin-master-modal-header {
  padding: 12px 20px;
  background: #161f36;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.admin-master-header-kpis {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 11.5px;
}

.admin-master-mobile-nav {
  display: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #141a29;
  padding: 6px 12px;
  gap: 8px;
}

.admin-master-mobile-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(30, 41, 59, 0.5);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-master-mobile-tab-btn.active {
  background: var(--accent-primary);
  color: white;
  border-color: transparent;
}

.admin-master-workspace-body {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

/* Left Users Directory Panel */
.admin-master-users-panel {
  width: 340px;
  min-width: 300px;
  max-width: 380px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: #0e1424;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-master-panel-search-box {
  padding: 12px;
  background: #121a2d;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-master-role-tabs {
  display: flex;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.admin-master-role-btn {
  flex: 1;
  padding: 4px 6px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.admin-master-role-btn.active {
  background: var(--accent-primary);
  color: white;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

.admin-master-users-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-master-user-card {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-master-user-card:hover {
  background: rgba(30, 41, 59, 0.75);
  border-color: rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
}

.admin-master-user-card.active {
  background: rgba(99, 102, 241, 0.15) !important;
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.25);
}

.admin-master-users-footer {
  padding: 8px 12px;
  background: #0b101d;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Right Workout Logs Inspector Panel */
.admin-master-logs-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #0b0f19;
  min-width: 0;
  overflow: hidden;
}

.admin-master-athlete-banner {
  padding: 14px 20px;
  background: linear-gradient(90deg, #141b2f 0%, #101728 50%, #0b0f19 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  flex-shrink: 0;
}

.admin-master-banner-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.admin-master-avatar {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.admin-master-banner-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-master-mini-stat {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 6px 12px;
  text-align: center;
  min-width: 80px;
}

.admin-master-mini-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-master-mini-stat-val {
  font-size: 13px;
  font-weight: 700;
  color: white;
  margin-top: 2px;
}

.admin-master-logs-toolbar {
  padding: 8px 18px;
  background: #0e1424;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.admin-master-logs-feed {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-master-log-card {
  background: #12192c;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s ease;
}

.admin-master-log-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.admin-master-log-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 10px;
}

.admin-master-exercise-item {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-master-set-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 3px 7px;
  font-size: 11px;
  font-family: monospace;
}

.admin-master-set-pill.warmup {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.admin-master-set-pill.dropset {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.3);
  color: #c084fc;
}

/* Responsive breakpoint for mobile */
@media (max-width: 768px) {
  .admin-master-header-kpis {
    display: none;
  }
  .admin-master-mobile-nav {
    display: flex;
  }
  .admin-master-workspace-body {
    position: relative;
  }
  .admin-master-users-panel {
    width: 100%;
    max-width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
  }
  .admin-master-logs-panel {
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
  }
  .admin-master-users-panel.mobile-hidden {
    display: none !important;
  }
  .admin-master-logs-panel.mobile-hidden {
    display: none !important;
  }
}

/* ==========================================================================
   WEEKLY BIOFEEDBACK DASHBOARD CARD & HISTORY MODAL
   ========================================================================== */
#profile-biofeedback-card {
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

#biofeedback-summary-container .glass-panel,
#biofeedback-history-list .glass-panel {
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

#biofeedback-summary-container .glass-panel:hover,
#biofeedback-history-list .glass-panel:hover {
  border-color: rgba(52, 211, 153, 0.25);
}

@media (max-width: 480px) {
  #biofeedback-summary-container [style*="grid-template-columns"],
  #biofeedback-history-list [style*="grid-template-columns"] {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* Rest Duration Pills and Exercise Rest Badge */
.rest-duration-pill {
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rest-duration-pill:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #ffffff;
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
}

.rest-duration-pill:active {
  transform: scale(0.95);
}

.rest-duration-pill.active {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.badge-exercise-rest {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 1px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  vertical-align: middle;
}

.badge-exercise-rest:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}

.exercise-rest-settings-card {
  background: rgba(56, 189, 248, 0.05);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--border-radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ==========================================================================
   AMRAP & EMOM PROTOCOLS: RUNNERS & CONFIG MODAL STYLES
   ========================================================================== */
.amrap-runner-container,
.emom-runner-container {
  margin: 10px 0;
  padding: 14px;
  border-radius: var(--border-radius-md);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(8, 12, 24, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.amrap-runner-container {
  border-color: rgba(249, 115, 22, 0.35);
}

.emom-runner-container {
  border-color: rgba(16, 185, 129, 0.35);
}

.amrap-timer-digits,
.emom-timer-digits {
  font-size: 42px;
  font-weight: 900;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  line-height: 1;
  letter-spacing: 1px;
}

.amrap-timer-digits {
  color: #fb923c;
  text-shadow: 0 0 16px rgba(249, 115, 22, 0.4);
}

.emom-timer-digits {
  color: #34d399;
  text-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
}

.emom-phase-banner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.emom-phase-banner.phase-work {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.emom-phase-banner.phase-rest {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #60a5fa;
}

.emom-round-dots-track {
  display: flex;
  gap: 4px;
  width: 100%;
}

.emom-round-dot {
  height: 6px;
  flex: 1;
  border-radius: 9999px;
  background: #334155;
  transition: all 0.2s ease;
}

.emom-round-dot.completed {
  background: #10b981;
}

.emom-round-dot.active {
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.8);
  animation: pulse-emom-dot 1.2s infinite;
}

@keyframes pulse-emom-dot {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50% { transform: scaleY(1.4); opacity: 0.7; }
}

.amrap-emom-chip-btn {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.amrap-emom-chip-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.amrap-emom-chip-btn.selected {
  background: rgba(99, 102, 241, 0.25);
  border-color: #818cf8;
  color: #c7d2fe;
}

.amrap-emom-chip-btn.selected-amrap {
  background: rgba(249, 115, 22, 0.25);
  border-color: #fb923c;
  color: #fed7aa;
}

.amrap-emom-chip-btn.selected-emom {
  background: rgba(16, 185, 129, 0.25);
  border-color: #34d399;
  color: #a7f3d0;
}

.set-protocol-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.set-protocol-pill.pill-amrap {
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.3);
  color: #fb923c;
}

.set-protocol-pill.pill-amrap:hover {
  background: rgba(249, 115, 22, 0.22);
}

.set-protocol-pill.pill-emom {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.set-protocol-pill.pill-emom:hover {
  background: rgba(16, 185, 129, 0.22);
}

/* ==========================================================================
   PERIODIZATION & MESOCYCLE PLANNING STYLES
   ========================================================================== */

.periodization-program-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  transition: all 0.2s ease;
}

.periodization-program-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
}

.periodization-goal-banner {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.06) 100%);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--border-radius-sm);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.periodization-timeline-bar {
  display: flex;
  width: 100%;
  height: 28px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 4px;
}

.timeline-phase-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: white;
  transition: all 0.15s ease;
  cursor: pointer;
  padding: 0 6px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  border-right: 1px solid rgba(0, 0, 0, 0.25);
}

.timeline-phase-segment:hover {
  filter: brightness(1.18);
}

.timeline-phase-segment:last-child {
  border-right: none;
}

/* Phase Badges & Preset Accents */
.phase-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.phase-badge-strength, .timeline-seg-strength {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}
.timeline-seg-strength {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #1c1917;
}

.phase-badge-hypertrophy, .timeline-seg-hypertrophy {
  background: rgba(139, 92, 246, 0.18);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #c084fc;
}
.timeline-seg-hypertrophy {
  background: linear-gradient(135deg, #7c3aed, #8b5cf6);
  color: #ffffff;
}

.phase-badge-conditioning, .timeline-seg-conditioning {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}
.timeline-seg-conditioning {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
}

.phase-badge-deload, .timeline-seg-deload {
  background: rgba(14, 165, 233, 0.18);
  border: 1px solid rgba(14, 165, 233, 0.4);
  color: #38bdf8;
}
.timeline-seg-deload {
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  color: #ffffff;
}

.phase-badge-peak, .timeline-seg-peak {
  background: rgba(244, 63, 94, 0.18);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fb7185;
}
.timeline-seg-peak {
  background: linear-gradient(135deg, #e11d48, #f43f5e);
  color: #ffffff;
}

.phase-badge-custom, .timeline-seg-custom {
  background: rgba(148, 163, 184, 0.18);
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: #cbd5e1;
}
.timeline-seg-custom {
  background: linear-gradient(135deg, #475569, #64748b);
  color: #ffffff;
}

/* Week Navigator Strip */
.week-nav-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 2px 8px 2px;
  scrollbar-width: thin;
}

.week-nav-pill {
  flex: 0 0 auto;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 14px;
  border-radius: var(--border-radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.week-nav-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.week-nav-pill.active {
  background: rgba(99, 102, 241, 0.25);
  border-color: #818cf8;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.35);
}

.week-nav-pill .week-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* Week Details & History Tie-in */
.week-detail-panel {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--border-radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.adherence-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 800;
}

.adherence-badge-pill.full {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.adherence-badge-pill.partial {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.adherence-badge-pill.empty {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

/* Dynamic Phase Block Builder */
.phase-builder-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: all 0.15s ease;
}

.phase-builder-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.phase-builder-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Periodization Tutorial Styles */
.periodization-tutorial-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ==========================================================================
   BIOFEEDBACK & MUSCLE RECOVERY ANATOMICAL STYLES
   ========================================================================== */

.anatomy-svg-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.anatomy-body-svg {
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
  user-select: none;
}

.muscle-path {
  cursor: pointer;
  fill: rgba(148, 163, 184, 0.16);
  stroke: rgba(148, 163, 184, 0.4);
  stroke-width: 1.2px;
  stroke-linejoin: round;
  transition: fill 0.22s ease, stroke 0.22s ease, filter 0.22s ease, transform 0.15s ease;
  transform-origin: center;
}

.muscle-path:hover {
  fill: rgba(56, 189, 248, 0.35);
  stroke: #38bdf8;
  stroke-width: 1.6px;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.6));
}

.muscle-path.not-recovered {
  fill: rgba(239, 68, 68, 0.55) !important;
  stroke: #ef4444 !important;
  stroke-width: 1.8px !important;
  filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.75)) !important;
}

.muscle-path.recovered {
  fill: rgba(16, 185, 129, 0.55) !important;
  stroke: #10b981 !important;
  stroke-width: 1.8px !important;
  filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.75)) !important;
}

/* Muscle Recovery Interactive Chips / Pills */
.muscle-recovery-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 20px;
  cursor: pointer;
  user-select: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(30, 41, 59, 0.6);
  color: #94a3b8;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.muscle-recovery-pill:hover {
  border-color: rgba(56, 189, 248, 0.4);
  color: #f1f5f9;
  transform: translateY(-1px);
}

.muscle-recovery-pill .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #64748b;
  transition: all 0.2s ease;
}

.muscle-recovery-pill.not-recovered {
  border-color: rgba(239, 68, 68, 0.55) !important;
  background: rgba(239, 68, 68, 0.15) !important;
  color: #fca5a5 !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.muscle-recovery-pill.not-recovered .status-dot {
  background: #ef4444 !important;
  box-shadow: 0 0 6px #ef4444;
}

.muscle-recovery-pill.recovered {
  border-color: rgba(16, 185, 129, 0.55) !important;
  background: rgba(16, 185, 129, 0.15) !important;
  color: #6ee7b7 !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.muscle-recovery-pill.recovered .status-dot {
  background: #10b981 !important;
  box-shadow: 0 0 6px #10b981;
}

@media (max-width: 540px) {
  .biofeedback-anatomy-layout {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}

/* ==========================================================================
   COACH MEAL PLAN PRESCRIPTION & CLIENT DASHBOARD STYLES
   ========================================================================== */

.pmp-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary, #94a3b8);
  padding: 12px 18px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s ease;
}

.pmp-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.03);
}

.pmp-tab-btn.active {
  color: #f59e0b;
  border-bottom-color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
}

.pmp-template-card {
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-md, 10px);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.25s ease;
}

.pmp-template-card:hover {
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}

.pmp-template-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.pmp-template-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 800;
  color: #ffffff;
}

.pmp-category-badge {
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pmp-category-badge.cutting {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.pmp-category-badge.bulking {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.pmp-category-badge.recomposition {
  background: rgba(168, 85, 247, 0.2);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.pmp-category-badge.maintenance,
.pmp-category-badge.performance {
  background: rgba(14, 165, 233, 0.2);
  color: #7dd3fc;
  border: 1px solid rgba(14, 165, 233, 0.35);
}

.pmp-macro-chips-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 11px;
}

.pmp-macro-chip {
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 600;
}

.pmp-bucket-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pmp-bucket-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.pmp-bucket-macro-pill {
  font-size: 11px;
  font-weight: 700;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.pmp-items-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pmp-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 6px 10px;
  gap: 8px;
  font-size: 12px;
}

.pmp-item-row-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.pmp-item-row-name {
  font-weight: 700;
  color: #ffffff;
}

.pmp-item-row-meta {
  font-size: 10.5px;
  color: var(--text-secondary, #94a3b8);
}

/* Client Dashboard Prescribed Meal Plan Styles */
.client-pmp-header-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
}

.client-pmp-bucket-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.client-pmp-bucket-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.client-pmp-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11.5px;
  color: #cbd5e1;
}

.client-pmp-adherence-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-secondary, #94a3b8);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.client-pmp-adherence-btn.followed {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.45);
  color: #4ade80;
}


