/* ============================================
   CROSSFIT SHOCK - Custom Styles
   Tailwind CDN handles most styling;
   this file covers glass morphism, transitions,
   and elements Tailwind can't express inline.
   ============================================ */

/* ---------- Base ---------- */
:root {
  --brand: #f59e0b;
  --brand-hover: #d97706;
  --glass-bg: linear-gradient(145deg, rgba(22, 27, 34, 0.85) 0%, rgba(13, 17, 23, 0.95) 100%);
  --glass-border: rgba(245, 158, 11, 0.06);
  --glass-blur: 20px;
}

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

body {
  font-family: 'Inter', 'Noto Sans KR', sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
  background-color: #0b0f14;
}

/* ---------- Light Mode ---------- */
body.light {
  background: #f5f5f5 !important;
  color: #1a1a1a;
}

body.light .glass-card {
  background: #ffffff !important;
  border-color: #e5e7eb !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.light .glass-card input,
body.light .glass-card select {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #0f172a;
}

body.light .glass-card input:focus,
body.light .glass-card select:focus {
  border-color: var(--brand);
}

body.light .glass-card label {
  color: #64748b;
}

body.light .input-field {
  background: #f9fafb !important;
  border-color: #d1d5db !important;
  color: #1a1a1a !important;
}

body.light .input-field:focus {
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 2px rgba(245,158,11,0.15);
}

body.light .min-h-screen {
  background: #f5f5f5 !important;
}

body.light .text-white {
  color: #111827 !important;
}

body.light .text-gray-200 {
  color: #374151 !important;
}

body.light .text-gray-300 {
  color: #4b5563 !important;
}

body.light .text-gray-400 {
  color: #6b7280 !important;
}

body.light .text-gray-500 {
  color: #9ca3af !important;
}

body.light .text-gray-600 {
  color: #6b7280 !important;
}

body.light .stroke-text {
  -webkit-text-stroke-color: #d1d5db;
}

body.light .glow-accent {
  text-shadow: none;
  color: #d97706 !important;
}

body.light .text-muted {
  color: #64748b;
}

body.light .auth-bg {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

/* ---------- Glass Card / Glass Panel ---------- */
.glass-card {
  background: linear-gradient(145deg, rgba(22, 27, 34, 0.9) 0%, rgba(13, 17, 23, 0.95) 100%);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid rgba(245, 158, 11, 0.08);
  border-radius: 0.375rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.glass-card:hover {
  border-color: rgba(245, 158, 11, 0.18);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), 0 0 20px rgba(245, 158, 11, 0.04);
  transition: all 0.3s ease;
}

/* ---------- Mesh Background ---------- */
.mesh-bg {
  background-image:
    radial-gradient(circle at 20% -10%, rgba(245, 158, 11, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 80% 100%, rgba(245, 158, 11, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.015) 0%, transparent 60%);
}

/* ---------- Background Logo Watermark ---------- */
#app {
  position: relative;
}

#app::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('/assets/logo.png') no-repeat center center;
  background-size: cover;
  opacity: 0.12;
  pointer-events: none;
  z-index: 9995;
  mix-blend-mode: screen;
}

@media (max-width: 767px) {
  #app::after {
    left: 0;
  }
}

/* ---------- Glow Effects ---------- */
.glow-accent {
  text-shadow:
    0 0 10px rgba(245, 158, 11, 0.6),
    0 0 30px rgba(245, 158, 11, 0.4),
    0 0 60px rgba(245, 158, 11, 0.2),
    0 0 100px rgba(245, 158, 11, 0.1);
}

.glow-accent-soft {
  text-shadow:
    0 0 10px rgba(245, 158, 11, 0.3),
    0 0 30px rgba(245, 158, 11, 0.15);
}

.stroke-text {
  color: rgba(255, 255, 255, 0.85);
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.5);
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.glow-border {
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.1);
}

/* ---------- Buttons ---------- */
.btn-primary {
  background-color: var(--brand);
  color: #000000;
  font-weight: 900;
  border-radius: 0.25rem;
  padding: 0.75rem 1.5rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.btn-primary:hover {
  background-color: #ffffff;
  color: #000000;
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.4);
}

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

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background-color: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 700;
  border-radius: 0.25rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.875rem;
}

body.light .btn-secondary {
  background: #ffffff !important;
  border-color: #d1d5db !important;
  color: #374151 !important;
}

.btn-secondary:hover {
  background-color: #ffffff;
  color: #000000;
}

body.light .btn-secondary:hover {
  background: #f3f4f6 !important;
  color: #1e293b;
}

/* Toggle Button */
.btn-toggle {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #64748b;
  font-weight: 700;
  border-radius: 0.25rem;
  padding: 0.5rem 1rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.btn-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
}

.btn-toggle.active {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: #f59e0b;
}

body.light .btn-toggle {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #64748b;
}

body.light .btn-toggle.active {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.4);
  color: #d97706;
}

/* Danger Button */
.btn-danger {
  background-color: #ef4444;
  color: #ffffff;
  font-weight: 900;
  border-radius: 0.25rem;
  padding: 0.75rem 1.5rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

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

/* Icon Button (table / inline actions) */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  padding: 0.375rem;
  border-radius: 0.25rem;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: scale(1.05);
}

.btn-icon:active {
  transform: scale(0.95);
}

body.light .btn-icon:hover {
  background: rgba(0, 0, 0, 0.06);
}

/* ---------- Inputs ---------- */
.input-field {
  width: 100%;
  padding: 0.75rem 1rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.25rem;
  color: #f0f0f0;
  font-size: 0.9375rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  font-family: 'Inter', 'Noto Sans KR', sans-serif;
}

.input-field::placeholder {
  color: #475569;
}

.input-field:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15), inset 0 0 0 1px rgba(245, 158, 11, 0.1);
}

.input-field.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

select.input-field {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23475569' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 5.646a.5.5 0 0 1 .708 0L8 8.293l2.646-2.647a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

select.input-field option {
  background: #111318;
  color: #f0f0f0;
  padding: 0.5rem;
}

select.input-field option:disabled {
  color: #64748b;
}

select.input-field optgroup {
  background: #0b0f14;
  color: #f59e0b;
  font-weight: 700;
  font-style: normal;
  padding: 0.25rem 0;
}

select.input-field optgroup option {
  color: #f0f0f0;
  font-weight: 400;
  padding-left: 0.75rem;
}

body.light select.input-field option {
  background: #ffffff;
  color: #1e293b;
}

body.light select.input-field option:disabled {
  color: #94a3b8;
}

/* ---------- Spinner ---------- */
.spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid rgba(245, 158, 11, 0.3);
  border-top-color: #f59e0b;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ---------- Toast ---------- */
.toast {
  pointer-events: auto;
  padding: 0.875rem 1.25rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  animation: toast-in 0.3s ease forwards;
  max-width: 22rem;
}

.toast.success {
  background: #065f46;
  color: #d1fae5;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.toast.error {
  background: #7f1d1d;
  color: #fecaca;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.toast.info {
  background: #0c2d48;
  color: #bfdbfe;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.toast.warning {
  background: #78350f;
  color: #fef3c7;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.toast.removing {
  animation: toast-out 0.3s ease forwards;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(1rem); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(1rem); }
}

/* ---------- Auth page background ---------- */
.auth-bg {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background-color: #0b0f14;
  background-image:
    radial-gradient(ellipse at 30% 20%, rgba(245, 158, 11, 0.07) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(245, 158, 11, 0.04) 0%, transparent 50%);
}

/* ---------- Role badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem;
  border-radius: 0.125rem;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid transparent;
}

.badge-admin   { background: rgba(239, 68, 68, 0.15); color: #f87171; border-color: rgba(239, 68, 68, 0.3); }
.badge-coach   { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border-color: rgba(59, 130, 246, 0.3); }
.badge-member  { background: rgba(16, 185, 129, 0.15); color: #34d399; border-color: rgba(16, 185, 129, 0.3); }
.badge-branch  { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border-color: rgba(245, 158, 11, 0.3); }

/* ---------- Password toggle ---------- */
.password-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #475569;
  user-select: none;
  transition: color 0.2s;
  display: flex;
  align-items: center;
}

.password-toggle:hover {
  color: #94a3b8;
}

/* ---------- Field error message ---------- */
.field-error {
  color: #f87171;
  font-size: 0.8125rem;
  margin-top: 0.25rem;
  min-height: 1.25rem;
}

/* ---------- Misc ---------- */
.fade-in {
  animation: fadeIn 0.3s ease forwards;
}

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

/* Material Symbols size utility */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.material-symbols-outlined.filled {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

body.light ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); }
body.light ::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.25); }

/* ---------- Toggle Buttons (member pages) ---------- */
.result-type-btn,
.scale-btn,
.filter-btn,
.strength-tab {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #64748b;
  cursor: pointer;
}

.result-type-btn:hover,
.scale-btn:hover,
.filter-btn:hover,
.strength-tab:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
}

.result-type-btn.active,
.scale-btn.active,
.filter-btn.active,
.strength-tab.active {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: #f59e0b;
}

body.light .result-type-btn,
body.light .scale-btn,
body.light .filter-btn,
body.light .strength-tab {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #64748b;
}

body.light .result-type-btn.active,
body.light .scale-btn.active,
body.light .filter-btn.active,
body.light .strength-tab.active {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.4);
  color: #d97706;
}

/* ---------- Light mode overrides for member pages ---------- */
body.light .glass-card .text-gray-200,
body.light .glass-card .text-white {
  color: #1e293b;
}

body.light .glass-card .text-gray-400 {
  color: #64748b;
}

body.light .glass-card .text-gray-500 {
  color: #94a3b8;
}

body.light .glass-card .text-gray-600 {
  color: #cbd5e1;
}

/* ---------- Page transition ---------- */
.page-exit {
  opacity: 0.5;
  transition: opacity 0.1s ease;
}

.page-enter {
  animation: fadeIn 0.25s ease forwards;
}

/* ---------- Toast keyframes (toast.js uses these) ---------- */
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-0.5rem) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(-0.5rem) scale(0.95); }
}

/* ========== Bottom Navigation (Mobile) ========== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(11, 15, 20, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(245, 158, 11, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom, 0);
  z-index: 1000;
}

body.light .bottom-nav {
  background: rgba(255,255,255,0.95) !important;
  border-top: 1px solid #e5e7eb !important;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 56px;
  min-height: 44px;
  color: rgba(255, 255, 255, 0.3);
  text-decoration: none;
  transition: color 0.2s ease;
}

.bottom-nav-item .material-symbols-outlined {
  font-size: 1.5rem;
}

.bottom-nav-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bottom-nav-item.active {
  color: var(--brand);
}

.bottom-nav-item.active .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

body.light .bottom-nav-item {
  color: #94a3b8;
}

body.light .bottom-nav-item.active {
  color: var(--brand);
}

/* Hide bottom nav on desktop */
@media (min-width: 768px) {
  .bottom-nav {
    display: none;
  }
}

/* ========== Sidebar (Desktop) ========== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100vh;
  background: rgba(11, 15, 20, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid rgba(245, 158, 11, 0.08);
  display: none;
  flex-direction: column;
  z-index: 1000;
  overflow-y: auto;
}

body.light .sidebar {
  background: rgba(255, 255, 255, 0.95);
  border-right-color: rgba(0, 0, 0, 0.08);
}

@media (min-width: 768px) {
  .sidebar {
    display: flex;
  }

  /* Push content to the right when sidebar is visible */
  #app {
    margin-left: 240px;
  }

  /* But not for auth pages (login/register) */
  body:has(.auth-bg) .sidebar {
    display: none;
  }

  body:has(.auth-bg) #app {
    margin-left: 0;
  }

  body:has(.auth-bg) .mobile-menu-btn {
    display: none;
  }
}

.sidebar-header {
  padding: 1.5rem 1.25rem 1.25rem;
  border-bottom: 1px solid rgba(245, 158, 11, 0.08);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.03) 0%, transparent 100%);
}

body.light .sidebar-header {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.sidebar-logo {
  margin-bottom: 0.5rem;
}

.sidebar-logo img {
  height: 32px;
  object-fit: contain;
}

.sidebar-branch {
  font-size: 9px;
  color: #f59e0b;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sidebar-menu {
  flex: 1;
  padding: 0.75rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.25rem;
  color: rgba(255, 255, 255, 0.4);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-left: 2px solid transparent;
}

.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.8);
}

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

body.light .sidebar-item:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #1e293b;
}

.sidebar-item.active {
  background: transparent;
  color: #f59e0b;
  border-left-color: #f59e0b;
}

.sidebar-item.active .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

body.light .sidebar-item.active {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
  border-left-color: #d97706;
}

.sidebar-item .material-symbols-outlined {
  font-size: 1.25rem;
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

body.light .sidebar-footer {
  border-top-color: rgba(0, 0, 0, 0.08);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.sidebar-user .material-symbols-outlined {
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.2);
}

.sidebar-user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

body.light .sidebar-user-name {
  color: #1e293b;
}

.sidebar-user-role {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

/* ---------- Line clamp ---------- */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========== Mobile Hamburger Menu ========== */
.mobile-menu-btn {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1001;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.25rem;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.2s ease;
}

body.light .mobile-menu-btn {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.08);
  color: #64748b;
}

.mobile-menu-btn:hover {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(0, 0, 0, 0.95);
}

/* Mobile sidebar overlay */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Desktop-only buttons (hidden on mobile) */
@media (max-width: 639px) {
  .we-desktop-only {
    display: none !important;
  }
}

/* Mobile sidebar open state */
.sidebar.mobile-open {
  display: flex !important;
  transform: translateX(0);
  transition: transform 0.25s ease;
}

@media (max-width: 767px) {
  .sidebar {
    display: flex !important;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    background: rgba(11, 15, 20, 0.98);
  }

  body.light .sidebar {
    background: rgba(255, 255, 255, 0.98);
  }

  .mobile-menu-btn {
    display: flex;
  }

  /* Content padding-top for hamburger button */
  #app > div:first-child {
    padding-top: 3.5rem;
  }

  /* No left margin on mobile */
  #app {
    margin-left: 0 !important;
  }
}

@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }

  .sidebar-overlay {
    display: none;
  }
}

/* ========== Responsive Tables ========== */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ========== Responsive WOD Editor Panels ========== */
@media (max-width: 639px) {
  #we-panels {
    flex-direction: column !important;
    max-height: none !important;
  }

  #we-panels > div {
    min-height: 200px;
  }
}

/* ========== Safe area padding for bottom nav ========== */
@media (max-width: 767px) {
  .min-h-screen {
    padding-bottom: 80px;
  }
}

/* ========== Modal ========== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  opacity: 0;
  animation: modalFadeIn 0.2s ease forwards;
}

.modal-backdrop.modal-open {
  opacity: 1;
}

.modal-backdrop.modal-close {
  animation: modalFadeOut 0.2s ease forwards;
}

.modal-card {
  background: linear-gradient(145deg, rgba(20, 20, 20, 0.95) 0%, rgba(5, 5, 5, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.375rem;
  padding: 1.5rem;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-title {
  font-size: 1.125rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-content {
  margin-bottom: 1.25rem;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

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

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