/* ==========================================================================
   IRONCORE GYM MANAGEMENT SYSTEM - GLOBAL CORE DESIGN SYSTEM
   Theme: Premium Dark Gym & Fitness SaaS
   ========================================================================== */

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

:root {
  /* Color Tokens */
  --bg-base: #080808;
  --bg-card: #141414;
  --bg-card-hover: #1C1C1C;
  --bg-card-subtle: #121212;
  --bg-glass: rgba(20, 20, 20, 0.75);
  --bg-input: #181818;
  
  --text-primary: #FFFFFF;
  --text-secondary: #A5A5A5;
  --text-muted: #6B7280;
  
  --accent: #FF3B30;
  --accent-secondary: #FF6B35;
  --accent-glow: rgba(255, 59, 48, 0.28);
  --accent-gradient: linear-gradient(135deg, #FF3B30 0%, #FF6B35 100%);
  --accent-gradient-subtle: linear-gradient(135deg, rgba(255, 59, 48, 0.15) 0%, rgba(255, 107, 53, 0.05) 100%);
  
  --success: #22C55E;
  --success-glow: rgba(34, 197, 94, 0.25);
  --warning: #F59E0B;
  --warning-glow: rgba(245, 158, 11, 0.25);
  --danger: #EF4444;
  --danger-glow: rgba(239, 68, 68, 0.25);
  --info: #3B82F6;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(255, 59, 48, 0.4);
  --border-glow: 0 0 15px var(--accent-glow);
  
  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Layout & Spacing */
  --sidebar-width: 260px;
  --header-height: 72px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 30px var(--accent-glow);
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Variables (Optional Toggle) */
[data-theme="light"] {
  --bg-base: #F4F4F6;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F8F9FA;
  --bg-card-subtle: #EDEDF0;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --bg-input: #F0F0F3;
  --text-primary: #111827;
  --text-secondary: #4B5563;
  --text-muted: #9CA3AF;
  --border-color: rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: #262626;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Typography Base */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.2;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }

p {
  color: var(--text-secondary);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition);
}
a:hover {
  color: var(--accent-secondary);
}

/* Utility Containers */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Brand Logo Component */
.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  text-transform: uppercase;
  text-decoration: none;
}
.brand-logo .logo-icon {
  width: 38px;
  height: 38px;
  background: var(--accent-gradient);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.15rem;
  box-shadow: 0 0 15px var(--accent-glow);
}
.brand-logo span.accent {
  color: var(--accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #FFFFFF;
  box-shadow: 0 4px 14px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 59, 48, 0.45);
  color: #FFFFFF;
}

.btn-secondary {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-color);
}
.btn-secondary:hover {
  background: #252525;
  border-color: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255, 59, 48, 0.05);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
  border-radius: 6px;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

.btn-danger {
  background: var(--danger);
  color: #FFFFFF;
}
.btn-danger:hover {
  background: #DC2626;
}

.btn-success {
  background: var(--success);
  color: #FFFFFF;
}
.btn-success:hover {
  background: #16A34A;
}

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--radius-sm);
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-active, .badge-present, .badge-completed, .badge-confirmed {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-expiring_soon, .badge-pending, .badge-late {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-expired, .badge-failed, .badge-rejected, .badge-cancelled, .badge-absent {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-primary, .badge-info {
  background: rgba(59, 130, 246, 0.15);
  color: var(--info);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Glass & Card Base */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-md);
}

.glass-card.glow-border {
  border-color: var(--border-highlight);
  box-shadow: var(--border-glow);
}

/* Loading Skeleton & Spinner */
.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.skeleton-box {
  background: linear-gradient(90deg, #181818 25%, #222222 50%, #181818 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Empty State Illustration */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-secondary);
}
.empty-state .empty-icon {
  font-size: 3.5rem;
  color: #333333;
  margin-bottom: 16px;
}
.empty-state h3 {
  color: var(--text-primary);
  margin-bottom: 8px;
}
.empty-state p {
  max-width: 380px;
  margin: 0 auto 20px auto;
  font-size: 0.9rem;
}

/* Page Header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}
.page-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.page-title h1 {
  font-size: 1.85rem;
}
.page-title p {
  font-size: 0.92rem;
  color: var(--text-secondary);
}
.page-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Floating Toast Notifications */
#toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  min-width: 300px;
  max-width: 420px;
  background: #181818;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  color: #FFFFFF;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: auto;
  animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.9rem;
}
.toast.toast-success { border-color: var(--success); }
.toast.toast-warning { border-color: var(--warning); }
.toast.toast-error   { border-color: var(--danger); }
.toast.toast-info    { border-color: var(--info); }
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Helper Utilities */
.text-accent { color: var(--accent) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-muted { color: var(--text-muted) !important; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.w-100 { width: 100%; }
.text-center { text-align: center; }
.text-right { text-align: right; }
