/* =============================================
   🏋️  TREINO FITNESS - DARK NEON THEME
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;700&display=swap');

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

:root {
  /* Dark Background */
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: #16161f;
  --bg-elevated: #1c1c28;
  --bg-input: #0f0f18;

  /* Neon Colors */
  --neon-green: #00ff88;
  --neon-green-dim: rgba(0, 255, 136, 0.15);
  --neon-pink: #ff00ff;
  --neon-pink-dim: rgba(255, 0, 255, 0.15);
  --neon-blue: #00ccff;
  --neon-blue-dim: rgba(0, 204, 255, 0.15);
  --neon-orange: #ff6600;
  --neon-orange-dim: rgba(255, 102, 0, 0.15);
  --neon-purple: #aa44ff;
  --neon-purple-dim: rgba(170, 68, 255, 0.15);

  /* Text */
  --text-primary: #f0f0f0;
  --text-secondary: #a0a0b8;
  --text-muted: #6b6b80;
  --text-inverse: #0a0a0f;

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-neon-green: rgba(0, 255, 136, 0.3);
  --border-neon-pink: rgba(255, 0, 255, 0.3);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --glow-green: 0 0 20px rgba(0, 255, 136, 0.15);
  --glow-pink: 0 0 20px rgba(255, 0, 255, 0.15);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Font */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

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

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* === FLAT ICONS (SVG coloridos) === */
.flat-icon {
  display: inline-block;
  vertical-align: -0.22em;
  flex-shrink: 0;
  pointer-events: none;
}

.nav-item .nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-logo svg {
  display: block;
}

.brand-icon svg {
  filter: drop-shadow(0 8px 24px rgba(0, 255, 136, 0.25));
}

/* === NEON TEXT EFFECTS === */
.neon-text-green {
  color: var(--neon-green);
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.3), 0 0 30px rgba(0, 255, 136, 0.1);
}
.neon-text-pink {
  color: var(--neon-pink);
  text-shadow: 0 0 10px rgba(255, 0, 255, 0.3), 0 0 30px rgba(255, 0, 255, 0.1);
}
.neon-text-blue {
  color: var(--neon-blue);
  text-shadow: 0 0 10px rgba(0, 204, 255, 0.3), 0 0 30px rgba(0, 204, 255, 0.1);
}

/* === LOGIN PAGE === */
.login-page {
  display: flex;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Animated background grid */
.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridScroll 20s linear infinite;
  pointer-events: none;
}

@keyframes gridScroll {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

.login-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.login-brand {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--space-2xl);
  position: relative;
  overflow: hidden;
}

.login-brand::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 255, 136, 0.05) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.brand-icon {
  font-size: 80px;
  margin-bottom: var(--space-lg);
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.brand-title {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -2px;
  margin-bottom: var(--space-sm);
}

.brand-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.brand-features {
  display: flex;
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
}

.brand-feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.brand-feature .feature-icon {
  font-size: 2rem;
  color: var(--neon-green);
}

.login-form-wrapper {
  width: 480px;
  min-width: 480px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-2xl);
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-subtle);
  position: relative;
}

.login-form-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--neon-green), var(--neon-pink), var(--neon-blue));
}

.form-header {
  margin-bottom: var(--space-xl);
}

.form-header h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: var(--space-sm);
}

.form-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* === FORM ELEMENTS === */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: var(--font-sans);
  transition: all var(--transition-base);
  outline: none;
}

.form-input:focus {
  border-color: var(--neon-green);
  box-shadow: 0 0 0 3px var(--neon-green-dim), 0 0 15px rgba(0, 255, 136, 0.05);
}

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

.form-input.error {
  border-color: #ff3355;
  box-shadow: 0 0 0 3px rgba(255, 51, 85, 0.15);
}

.form-error {
  color: #ff3355;
  font-size: 0.8rem;
  margin-top: var(--space-xs);
  display: none;
}

.form-error.visible { display: block; }

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--neon-green);
  color: var(--text-inverse);
  box-shadow: var(--glow-green);
}

.btn-primary:hover:not(:disabled) {
  background: #00ff95;
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.3);
  transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--neon-green);
  background: var(--neon-green-dim);
}

.btn-danger {
  background: rgba(255, 51, 85, 0.1);
  color: #ff3355;
  border: 1px solid rgba(255, 51, 85, 0.2);
}

.btn-danger:hover:not(:disabled) {
  background: #ff3355;
  color: white;
  box-shadow: 0 0 20px rgba(255, 51, 85, 0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.1rem;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  font-size: 1.1rem;
}

.btn-icon:hover {
  color: var(--neon-green);
  border-color: var(--border-neon-green);
  background: var(--neon-green-dim);
}

.btn-icon.btn-icon-danger:hover {
  color: #ff3355;
  border-color: rgba(255, 51, 85, 0.3);
  background: rgba(255, 51, 85, 0.1);
}

/* === CARD === */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-base);
}

.card-hover:hover {
  border-color: rgba(0, 255, 136, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
}

.card-title {
  font-size: 1.2rem;
  font-weight: 700;
}

/* === AUTH TOGGLE === */
.auth-toggle {
  text-align: center;
  margin-top: var(--space-lg);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.auth-toggle a {
  color: var(--neon-green);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

.auth-toggle a:hover {
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.password-input-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px;
}

.password-toggle:hover { color: var(--text-secondary); }

/* === DASHBOARD LAYOUT === */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  min-width: 260px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform var(--transition-base);
}

.sidebar-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.sidebar-logo {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--neon-green), var(--neon-pink));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.sidebar-brand {
  font-weight: 800;
  font-size: 1.1rem;
}

.sidebar-nav {
  flex: 1;
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-base);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-sans);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--neon-green-dim);
  color: var(--neon-green);
  font-weight: 600;
}

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

.nav-item .nav-badge {
  margin-left: auto;
  background: rgba(0, 255, 136, 0.15);
  color: var(--neon-green);
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.sidebar-footer {
  padding: var(--space-md);
  border-top: 1px solid var(--border-subtle);
}

.teacher-info {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 8px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
}

.teacher-info:hover {
  background: rgba(255, 255, 255, 0.04);
}

.teacher-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  overflow: hidden;
}

.teacher-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.teacher-name {
  font-size: 0.85rem;
  font-weight: 600;
}

.teacher-cref {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 260px;
  padding: var(--space-xl);
  min-height: 100vh;
}

.page-section {
  display: none;
  animation: fadeIn 0.3s ease;
}

.page-section.active {
  display: block;
}

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

.page-header {
  margin-bottom: var(--space-xl);
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: var(--space-xs);
}

.page-header p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* === MOBILE TOGGLE === */
.mobile-toggle {
  display: none;
  position: fixed;
  top: var(--space-md);
  left: var(--space-md);
  z-index: 200;
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1.3rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99;
}

/* === STUDENT CARDS GRID === */
.students-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.student-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.student-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--neon-green), var(--neon-blue));
  opacity: 0;
  transition: opacity var(--transition-base);
}

.student-card:hover::before {
  opacity: 1;
}

.student-card:hover {
  border-color: rgba(0, 255, 136, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.student-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.student-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  flex-shrink: 0;
}

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

.student-name {
  font-weight: 700;
  font-size: 1rem;
}

.student-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.student-card-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-subtle);
}

/* === WORKOUT LIST === */
.workouts-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.workout-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-base);
  cursor: pointer;
}

.workout-item:hover {
  border-color: rgba(0, 204, 255, 0.2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.workout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.workout-name {
  font-size: 1.1rem;
  font-weight: 700;
}

.workout-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.workout-student {
  color: var(--neon-blue);
  font-weight: 500;
}

.workout-children-info {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-sm);
}

.workout-child-tag {
  padding: 2px 10px;
  background: var(--neon-purple-dim);
  color: var(--neon-purple);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.workout-actions {
  display: flex;
  gap: var(--space-sm);
}

/* === SEGMENTED CONTROL (Treinos / Modelos) === */
.segmented-control {
  display: inline-flex;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
}

.segmented-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.segmented-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.segmented-btn.active {
  background: var(--neon-green-dim);
  color: var(--neon-green);
  box-shadow: inset 0 0 0 1px var(--border-neon-green);
}

/* === TEMPLATE BADGE (Modelo de Treino) === */
.template-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  background: var(--neon-pink-dim);
  color: var(--neon-pink);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  vertical-align: middle;
}

/* === TEMPLATE HINT BANNER === */
.template-hint {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--neon-pink-dim);
  border: 1px solid rgba(255, 0, 255, 0.25);
  border-radius: var(--radius-md);
  color: var(--neon-pink);
  font-size: 0.85rem;
  margin-top: var(--space-md);
  line-height: 1.5;
}

.template-hint strong {
  font-weight: 700;
}

/* === MODAL === */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  backdrop-filter: blur(4px);
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.2s ease;
}

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  background: var(--bg-secondary);
  z-index: 1;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--bg-elevated);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all var(--transition-base);
}

.modal-close:hover {
  background: rgba(255, 51, 85, 0.1);
  color: #ff3355;
}

.modal-body {
  padding: var(--space-lg);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
  padding: var(--space-lg);
  border-top: 1px solid var(--border-subtle);
}

/* === EXERCISE LIST IN WORKOUT === */
.exercise-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.exercise-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.exercise-card:hover {
  border-color: rgba(0, 255, 136, 0.15);
}

.exercise-number {
  width: 32px;
  height: 32px;
  background: var(--neon-blue-dim);
  color: var(--neon-blue);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

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

.exercise-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.exercise-details {
  display: flex;
  gap: var(--space-md);
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 2px;
}

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

.exercise-card-actions {
  display: flex;
  gap: var(--space-xs);
}

/* === EMPTY STATE === */
.empty-state {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: var(--space-lg);
  opacity: 0.5;
}

.empty-state h3 {
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  font-size: 1.2rem;
}

.empty-state p {
  font-size: 0.9rem;
  margin-bottom: var(--space-lg);
}

/* === TOAST === */
.toast-container {
  position: fixed;
  top: var(--space-lg);
  right: var(--space-lg);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  max-width: 400px;
}

.toast.success {
  background: var(--neon-green-dim);
  border: 1px solid var(--border-neon-green);
  color: var(--neon-green);
}

.toast.error {
  background: rgba(255, 51, 85, 0.1);
  border: 1px solid rgba(255, 51, 85, 0.3);
  color: #ff3355;
}

.toast.info {
  background: var(--neon-blue-dim);
  border: 1px solid rgba(0, 204, 255, 0.3);
  color: var(--neon-blue);
}

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

/* === TOOLBAR === */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex: 1;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  max-width: 320px;
}

.search-input-wrapper .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input-wrapper input {
  padding-left: 36px;
}

/* === CONFIG SECTION (PROFILE) === */
.profile-section {
  max-width: 640px;
}

.profile-avatar-section {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
}

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

.avatar-upload-btn {
  font-size: 0.85rem;
}

/* === WORKOUT DETAIL === */
.workout-detail-header {
  margin-bottom: var(--space-xl);
}

.workout-detail-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: var(--space-sm);
}

.workout-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.workout-detail-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.child-workout-tabs {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.child-tab {
  padding: 8px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--transition-base);
  font-family: var(--font-sans);
}

.child-tab:hover {
  border-color: rgba(0, 255, 136, 0.2);
}

.child-tab.active {
  background: var(--neon-green-dim);
  border-color: var(--border-neon-green);
  color: var(--neon-green);
}

/* === SHARE MODAL === */
.share-link-box {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.share-link-input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--neon-green);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  outline: none;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 24px;
  background: #25D366;
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all var(--transition-base);
}

.share-btn:hover {
  background: #20bd5a;
  transform: translateY(-1px);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .login-brand {
    display: none;
  }
  .login-form-wrapper {
    width: 100%;
    min-width: 0;
    max-width: 480px;
    margin: 0 auto;
    border-left: none;
  }
  .login-page {
    justify-content: center;
  }
  .login-container {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.active {
    display: block;
  }
  .mobile-toggle {
    display: flex;
  }
  .main-content {
    margin-left: 0;
    padding: var(--space-lg);
    padding-top: 70px;
  }
  .students-grid {
    grid-template-columns: 1fr;
  }
  .brand-features {
    display: none;
  }
  .form-header h2 {
    font-size: 1.5rem;
  }
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .search-input-wrapper {
    max-width: 100%;
  }
  .modal {
    max-width: 100%;
    border-radius: var(--radius-lg);
    margin: var(--space-sm);
  }
  .profile-section {
    max-width: 100%;
  }
  .workout-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .workout-meta {
    flex-wrap: wrap;
  }
  .child-workout-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* === LOADING SPINNER === */
.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-subtle);
  border-top-color: var(--neon-green);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

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

@keyframes pulse-icon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* === STATS CARDS === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(0, 255, 136, 0.03) 0%, transparent 70%);
  pointer-events: none;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-card.green .stat-value { color: var(--neon-green); }
.stat-card.pink .stat-value { color: var(--neon-pink); }
.stat-card.blue .stat-value { color: var(--neon-blue); }
.stat-card.orange .stat-value { color: var(--neon-orange); }

/* === EXERCISE LIBRARY === */
.exercise-group-section {
  margin-bottom: var(--space-xl);
}

.exercise-group-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--neon-blue);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.exercises-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-sm);
}

.exercise-pill {
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  font-size: 0.85rem;
  font-weight: 500;
  text-align: left;
  font-family: var(--font-sans);
  color: var(--text-primary);
}

.exercise-pill:hover {
  border-color: var(--neon-green);
  background: var(--neon-green-dim);
}

.exercise-pill.selected {
  border-color: var(--neon-green);
  background: var(--neon-green-dim);
  color: var(--neon-green);
}

/* === EXERCISE DETAIL MODAL === */
.exercise-detail-container {
  text-align: center;
}

.exercise-detail-name {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: var(--space-sm);
}

.exercise-detail-group {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-lg);
}

.exercise-detail-movement {
  font-size: 1rem;
  color: var(--text-secondary);
  padding: var(--space-lg);
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  line-height: 1.6;
}

.stick-figure-container {
  width: 200px;
  height: 280px;
  margin: 0 auto var(--space-lg);
  position: relative;
}

/* === ADD EXERCISE TO WORKOUT === */
.add-exercise-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-top: var(--space-lg);
}

.add-exercise-search {
  margin-bottom: var(--space-md);
}

.add-exercise-groups {
  max-height: 400px;
  overflow-y: auto;
}
