/* Modern Design System */
:root {
  /* Colors - Professional Blue/Gray Palette */
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-300: #93c5fd;
  --primary-400: #60a5fa;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --primary-900: #1e3a8a;
  
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  --success-500: #10b981;
  --success-600: #059669;
  --warning-500: #f59e0b;
  --error-500: #ef4444;
  
  /* Semantic Colors */
  --bg: #fafbfc;
  --panel: #ffffff;
  --text: var(--gray-900);
  --text-muted: var(--gray-600);
  --text-light: var(--gray-500);
  --primary: var(--primary-600);
  --primary-hover: var(--primary-700);
  --border: var(--gray-200);
  --border-light: var(--gray-100);
  --accent: var(--success-500);
  
  /* Spacing Scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Base Styles */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  line-height: 1.6;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 var(--space-4);
  letter-spacing: -0.025em;
}

h2 {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 var(--space-4);
  letter-spacing: -0.025em;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 var(--space-3);
}

p {
  margin: 0 0 var(--space-4);
  color: var(--text-muted);
}

/* Layout Components */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) var(--space-6);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.topbar .brand {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.025em;
  color: var(--primary);
  background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.topbar nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.topbar nav a:hover {
  color: var(--text);
  background: var(--gray-50);
}

.container {
  display: flex;
  min-height: calc(100vh - 80px);
  background: var(--bg);
}

.left {
  flex: 1;
  padding: var(--space-12);
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 600px;
  margin: 0 auto;
}

.right {
  flex: 1;
  padding: var(--space-12);
  background: linear-gradient(135deg, var(--primary-50) 0%, var(--primary-100) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.right::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--primary-100) 0%, transparent 70%);
  opacity: 0.5;
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(-30px, -30px) rotate(120deg); }
  66% { transform: translate(30px, -60px) rotate(240deg); }
}

/* Cards & Components */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  margin: var(--space-6) 0;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-500), var(--primary-600));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-200);
}

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

/* Form Elements */
.field {
  margin: var(--space-5) 0;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-2);
}

input, select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  background: var(--panel);
  color: var(--text);
  transition: all 0.2s ease;
  font-family: inherit;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  transform: translateY(-1px);
}

input::placeholder {
  color: var(--text-light);
}

/* Buttons */
button {
  padding: var(--space-3) var(--space-6);
  border: none;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  position: relative;
  overflow: hidden;
  font-family: inherit;
}

button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

button:hover::before {
  left: 100%;
}

button:active {
  transform: translateY(0);
}

button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

button.loading {
  pointer-events: none;
  opacity: 0.8;
}

button.loading::after {
  content: "";
  position: absolute;
  right: var(--space-3);
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

button.secondary {
  background: var(--gray-100);
  color: var(--text);
  border: 2px solid var(--border);
}

button.secondary:hover {
  background: var(--gray-200);
  border-color: var(--gray-300);
}

button + button {
  margin-left: var(--space-3);
}

/* Tabs */
.tabs {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  background: var(--gray-100);
  padding: var(--space-1);
  border-radius: var(--radius-lg);
}

.tab {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-radius: var(--radius);
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

.tab.active {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.tab:hover:not(.active) {
  background: var(--gray-50);
  color: var(--text);
}

/* Timer Display */
.timerRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: var(--space-8) 0;
  padding: var(--space-6);
  background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
  border-radius: var(--radius-xl);
  border: 2px solid var(--primary-200);
}

#liveClock {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--primary-700);
  text-shadow: 0 2px 4px rgba(37, 99, 235, 0.1);
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
}

.timerButtons {
  display: flex;
  gap: var(--space-3);
}

/* Stats */
.statsRow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.stat {
  background: linear-gradient(135deg, white, var(--gray-50));
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  text-align: center;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
}

.stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.statLabel {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-2);
}

.statValue {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

/* Progress Bar */
.progress {
  margin-top: var(--space-6);
  padding: var(--space-4);
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

.progressHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.progressBar {
  width: 100%;
  height: 12px;
  background: var(--gray-200);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.progressBar #todayProgress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--success-500), var(--success-600));
  border-radius: 999px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.progressBar #todayProgress::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: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Enhanced Animations & Micro-interactions */

/* Smooth page transitions */
* {
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

/* Loading states */
.loading-skeleton {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
  background-size: 200% 100%;
  animation: loading-shimmer 2s infinite;
}

@keyframes loading-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Button press animation */
button:active {
  transform: scale(0.98);
  transition: transform 0.1s ease;
}

/* Hover lift effect for interactive elements */
.card:hover,
.feature:hover,
.stat:hover,
.stat-metric:hover {}

@keyframes gentle-lift {
  to {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  }
}

/* Staggered animation for stats */
.statsRow .stat {
  animation: slide-in-up 0.6s ease forwards;
  opacity: 0;
  transform: translateY(20px);
}

.statsRow .stat:nth-child(1) { animation-delay: 0.1s; }
.statsRow .stat:nth-child(2) { animation-delay: 0.2s; }
.statsRow .stat:nth-child(3) { animation-delay: 0.3s; }

@keyframes slide-in-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Typing indicator for active sessions */
.typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.typing-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary-500);
  animation: typing-bounce 1.4s ease-in-out infinite both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing-bounce {
  0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

/* Progress bar fill animation */
.progressBar #todayProgress {
  position: relative;
  overflow: hidden;
}

.progressBar #todayProgress::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: progress-shine 2s ease-in-out infinite;
}

@keyframes progress-shine {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

/* Clock tick animation */
#liveClock {
  position: relative;
}

#liveClock.ticking::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -8px;
  width: 2px;
  height: 2px;
  background: var(--primary-500);
  border-radius: 50%;
  animation: tick-blink 1s ease-in-out infinite;
}

@keyframes tick-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Status indicator animations */
.status-indicator {
  position: relative;
}

.status-indicator::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  animation: pulse-ring 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}

.status-indicator.active::after {
  border: 2px solid var(--success-500);
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* Form focus animations */
input:focus,
select:focus {
  animation: input-focus 0.3s ease;
}

@keyframes input-focus {
  0% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
  }
  100% {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  }
}

/* Tab switch animation */
.tab.active {
  animation: tab-activate 0.3s ease;
}

@keyframes tab-activate {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Notification slide-in */
.msg {
  animation: slide-in-right 0.4s ease;
}

@keyframes slide-in-right {
  0% {
    transform: translateX(20px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Card entrance animation (disabled to prevent hover override hiding cards) */
.card {
  opacity: 1;
  transform: translateY(0);
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }

@keyframes card-enter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Navigation item hover effect */
.topbar nav a,
.sidebar-nav a {
  position: relative;
  overflow: hidden;
}

.topbar nav a::after,
.sidebar-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: var(--primary-500);
  transition: left 0.3s ease;
}

.topbar nav a:hover::after,
.sidebar-nav a:hover::after,
.topbar nav a.active::after,
.sidebar-nav a.active::after {
  left: 0;
}

/* Table row animation */
.data-table tbody tr {
  animation: table-row-enter 0.4s ease forwards;
  opacity: 0;
  transform: translateX(-10px);
}

.data-table tbody tr:nth-child(odd) { animation-delay: 0.05s; }
.data-table tbody tr:nth-child(even) { animation-delay: 0.1s; }

@keyframes table-row-enter {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Feature grid stagger */
.featureGrid .feature {}

.featureGrid .feature:nth-child(1) { animation-delay: 0.1s; }
.featureGrid .feature:nth-child(2) { animation-delay: 0.2s; }
.featureGrid .feature:nth-child(3) { animation-delay: 0.3s; }
.featureGrid .feature:nth-child(4) { animation-delay: 0.4s; }

/* removed feature enter animation */

/* Loading spinner enhancement */
button.loading::after {
  animation: spin 0.6s linear infinite, loading-pulse 2s ease-in-out infinite;
}

@keyframes loading-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Hover effect for clickable items */
.quick-action-btn,
.btn-filter,
.refresh-btn {
  position: relative;
  overflow: hidden;
}

.quick-action-btn::before,
.btn-filter::before,
.refresh-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.quick-action-btn:hover::before,
.btn-filter:hover::before,
.refresh-btn:hover::before {
  width: 300px;
  height: 300px;
}

/* Sidebar navigation slide effect */
.sidebar-nav a {
  transform: translateX(0);
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.sidebar-nav a:hover {
  transform: translateX(8px);
}

/* Logo rotation on hover */
.brand svg {
  transition: transform 0.3s ease;
}

.brand:hover svg {
  transform: rotate(15deg);
}

/* Stats value counter animation */
.statValue,
.stat-metric-content .value {
  animation: counter-up 1s ease-out;
}

@keyframes counter-up {
  0% {
    transform: translateY(10px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Success/Error message animations */
.msg {
  position: relative;
}

.msg.success {
  animation: success-bounce 0.6s ease;
}

.msg.error {
  animation: error-shake 0.6s ease;
}

@keyframes success-bounce {
  0%, 20%, 53%, 80%, 100% {
    transform: translate3d(0, 0, 0);
  }
  40%, 43% {
    transform: translate3d(0, -8px, 0);
  }
  70% {
    transform: translate3d(0, -4px, 0);
  }
  90% {
    transform: translate3d(0, -2px, 0);
  }
}

@keyframes error-shake {
  10%, 90% {
    transform: translate3d(-2px, 0, 0);
  }
  20%, 80% {
    transform: translate3d(4px, 0, 0);
  }
  30%, 50%, 70% {
    transform: translate3d(-8px, 0, 0);
  }
  40%, 60% {
    transform: translate3d(8px, 0, 0);
  }
}

/* Enhanced Data Tables & Sessions */
.session-actions {
  display: flex;
  gap: var(--space-3);
}

.btn-export {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--success-50);
  color: var(--success-700);
  border: 2px solid var(--success-200);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-export:hover {
  background: var(--success-100);
  border-color: var(--success-300);
  color: var(--success-800);
  transform: translateY(-1px);
}

.session-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4);
  background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-6);
  border: 1px solid var(--primary-200);
  font-weight: 600;
  color: var(--primary-800);
}

/* Enhanced Table Headers */
.sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: all 0.2s ease;
}

.sortable:hover {
  background: var(--primary-50);
  color: var(--primary-700);
}

.sort-indicator {
  position: absolute;
  right: var(--space-2);
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  opacity: 0.3;
  transition: all 0.2s ease;
}

.sortable[data-order="asc"] .sort-indicator {
  border-bottom: 6px solid var(--primary-600);
  opacity: 1;
}

.sortable[data-order="desc"] .sort-indicator {
  border-top: 6px solid var(--primary-600);
  opacity: 1;
}

/* Sessions Table Specific Styles */
.sessions-table {
  position: relative;
}

.sessions-table tbody tr {
  border-left: 4px solid transparent;
  transition: all 0.2s ease;
}

.sessions-table tbody tr:hover {
  border-left-color: var(--primary-400);
  background: var(--primary-25);
}

.sessions-table tbody tr.active-session {
  border-left-color: var(--success-500);
  background: var(--success-25);
}

.sessions-table tbody tr.active-session td:last-child {
  position: relative;
}

.sessions-table tbody tr.active-session td:last-child::after {
  content: 'ACTIVE';
  position: absolute;
  right: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  padding: var(--space-1) var(--space-2);
  background: var(--success-500);
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
}

/* Table Footer */
.table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) var(--space-5);
  background: var(--gray-50);
  border-top: 1px solid var(--border-light);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  font-size: 0.875rem;
}

.table-info {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text-muted);
  font-weight: 500;
}

.separator {
  color: var(--text-light);
}

.table-pagination {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.pagination-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: white;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--primary-50);
  color: var(--primary-700);
  border-color: var(--primary-200);
}

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

.page-info {
  font-weight: 600;
  color: var(--text);
  font-size: 0.875rem;
}

/* Empty Table State */
.table-container .empty-state {
  display: none;
  padding: var(--space-16) var(--space-8);
}

.table-container.empty .data-table {
  display: none;
}

.table-container.empty .empty-state {
  display: block;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-4);
  color: var(--text-light);
}

/* Table Loading State */
.table-container.loading {
  position: relative;
  min-height: 200px;
}

.table-container.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
}

.table-container.loading::before {
  content: 'Loading sessions...';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  font-weight: 600;
  color: var(--text-muted);
}

/* Duration Badge Styling */
.duration-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  background: var(--gray-100);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

.duration-badge.long-session {
  background: var(--success-100);
  color: var(--success-700);
}

.duration-badge.short-session {
  background: var(--warning-100);
  color: var(--warning-700);
}

/* Task Category Indicators */
.task-category {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: var(--space-2);
}

.task-category.development { background: var(--primary-500); }
.task-category.meeting { background: var(--warning-500); }
.task-category.design { background: var(--success-500); }
.task-category.admin { background: var(--error-500); }

/* Table Responsive Enhancements */
@media (max-width: 768px) {
  .table-footer {
    flex-direction: column;
    gap: var(--space-3);
    align-items: stretch;
  }
  
  .table-pagination {
    justify-content: center;
  }
  
  .session-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .btn-export {
    justify-content: center;
  }
  
  .session-summary {
    flex-direction: column;
    gap: var(--space-2);
    text-align: center;
  }
  
  .sortable {
    font-size: 0.7rem;
    padding: var(--space-2);
  }
  
  .sort-indicator {
    right: var(--space-1);
  }
}

@media (max-width: 480px) {
  .data-table th,
  .data-table td {
    padding: var(--space-2);
    font-size: 0.7rem;
  }
  
  .sessions-table tbody tr.active-session td:last-child::after {
    position: static;
    display: block;
    margin-top: var(--space-1);
    transform: none;
  }
  
  .table-info {
    flex-direction: column;
    gap: var(--space-1);
    text-align: center;
  }
  
  .pagination-btn {
    padding: var(--space-2);
    font-size: 0.75rem;
  }
}

/* Reduced motion preferences */
@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;
  }
  
  .status-indicator::after,
  .live-dot,
  .typing-dot {
    animation: none;
  }
}

/* Tables */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: var(--space-4);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

th, td {
  padding: var(--space-4);
  text-align: left;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border-light);
}

th {
  background: linear-gradient(135deg, var(--gray-50), var(--gray-100));
  color: var(--text);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
  z-index: 10;
}

tbody tr {
  transition: all 0.2s ease;
}

tbody tr:hover {
  background: var(--primary-50);
  transform: scale(1.01);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* Feature Grid */
.featureGrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.feature {
  background: white;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  text-align: center;
  font-weight: 600;
  color: var(--text);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-400), var(--primary-600));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-200);
}

.feature:hover::before {
  transform: scaleX(1);
}

/* Admin Layout */
.adminShell {
  display: flex;
  min-height: calc(100vh - 80px);
  background: var(--bg);
}

.sidebar {
  width: 280px;
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: var(--space-6);
  position: sticky;
  top: 80px;
  height: calc(100vh - 80px);
  overflow-y: auto;
}

.sidebar h3 {
  margin: 0 0 var(--space-4);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar a {
  display: block;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: var(--space-2);
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

.sidebar a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--primary);
  border-radius: 2px;
  transition: height 0.2s ease;
}

.sidebar a.active,
.sidebar a:hover {
  background: var(--primary-50);
  color: var(--primary-700);
  border-color: var(--primary-200);
}

.sidebar a.active::before,
.sidebar a:hover::before {
  height: 60%;
}

.adminContent {
  flex: 1;
  padding: var(--space-8);
  overflow-y: auto;
}

/* Filters */
.filters {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  align-items: end;
  margin-bottom: var(--space-6);
  padding: var(--space-4);
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

.filters label {
  font-size: 0.75rem;
  margin-bottom: var(--space-1);
}

.filters input,
.filters select {
  min-width: 140px;
  padding: var(--space-2) var(--space-3);
  font-size: 0.875rem;
}

/* Messages */
.msg {
  margin-top: var(--space-3);
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: var(--space-3) var(--space-4);
  background: var(--gray-50);
  border-radius: var(--radius);
  border-left: 4px solid var(--primary-300);
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Animations */
.pulse {
  animation: pulse 1.2s ease-out 1;
}

.flash {
  animation: flash 0.6s ease-out 1;
}

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

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

@keyframes flash {
  0% {
    background: rgba(59, 130, 246, 0.1);
  }
  100% {
    background: transparent;
  }
}

/* Login Page Specific Styles */
.login-header {
  text-align: center;
  margin-bottom: var(--space-8);
}

.logo-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  border-radius: var(--radius-2xl);
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-lg);
}

.logo-icon {
  color: white;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.card-header {
  text-align: center;
  margin-bottom: var(--space-6);
}

.card-header h2 {
  margin-bottom: var(--space-2);
  color: var(--text);
}

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

.button-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.btn-primary, .btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--gray-50);
  color: var(--text-muted);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  background: var(--gray-100);
  color: var(--text);
  border-color: var(--gray-300);
}

/* Labels with icons */
label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-2);
}

label svg {
  color: var(--text-light);
}

/* Hero Content */
.hero-content {
  position: relative;
  z-index: 10;
}

.hero-content h1 {
  color: var(--primary-800);
  margin-bottom: var(--space-4);
}

.hero-content > p {
  font-size: 1.125rem;
  color: var(--primary-700);
  margin-bottom: var(--space-8);
  line-height: 1.7;
}

/* Enhanced Feature Grid */
.featureGrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
  margin-top: var(--space-8);
}

.feature {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  text-align: left;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-400), var(--primary-600));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.95);
}

.feature:hover::before {
  transform: scaleX(1);
}

.feature svg {
  color: var(--primary-600);
  margin-bottom: var(--space-3);
}

.feature h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-800);
  margin: 0 0 var(--space-2);
}

.feature p {
  font-size: 0.875rem;
  color: var(--primary-700);
  margin: 0;
  line-height: 1.5;
}

/* Stats Preview */
.stats-preview {
  display: flex;
  justify-content: space-around;
  margin-top: var(--space-10);
  padding: var(--space-6) 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-800);
  line-height: 1;
  margin-bottom: var(--space-1);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--primary-700);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Navigation Icons */
.topbar nav a {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.topbar nav a svg {
  color: currentColor;
}

/* Enhanced Employee Dashboard */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-8);
  padding: var(--space-6);
  background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
  border-radius: var(--radius-xl);
  border: 1px solid var(--primary-200);
}

.welcome-section h1 {
  margin: 0 0 var(--space-2);
  font-size: 2rem;
  color: var(--primary-800);
}

.welcome-section p {
  margin: 0;
  color: var(--primary-700);
  font-size: 1rem;
}

.quick-actions {
  display: flex;
  gap: var(--space-3);
}

.quick-action-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: white;
  color: var(--primary-700);
  border: 2px solid var(--primary-200);
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-action-btn:hover {
  background: var(--primary-600);
  color: white;
  border-color: var(--primary-600);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Enhanced Tabs */
.tabs {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  background: var(--gray-100);
  padding: var(--space-1);
  border-radius: var(--radius-lg);
}

.tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-radius: var(--radius);
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  font-size: 0.875rem;
}

.tab.active {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.tab:hover:not(.active) {
  background: var(--gray-50);
  color: var(--text);
}

/* Timer Card */
.timer-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

.timer-section {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: var(--space-8);
}

.timer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
}

.timer-header h2 {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0;
  color: var(--text);
}

.timer-status {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray-400);
  animation: pulse-dot 2s ease-in-out infinite;
}

.status-indicator.active {
  background: var(--success-500);
}

.status-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.timer-controls {
  display: grid;
  gap: var(--space-6);
}

.field-group {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-4);
}

.timer-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6);
  background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
  border-radius: var(--radius-xl);
  border: 2px solid var(--primary-200);
}

.clock-container {
  text-align: center;
}

#liveClock {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--primary-700);
  text-shadow: 0 2px 4px rgba(37, 99, 235, 0.1);
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
  margin-bottom: var(--space-2);
  line-height: 1;
}

.clock-label {
  font-size: 0.875rem;
  color: var(--primary-600);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.timer-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.btn-start, .btn-stop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  min-width: 140px;
}

.btn-start {
  background: linear-gradient(135deg, var(--success-500), var(--success-600));
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-start:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-stop {
  background: var(--gray-100);
  color: var(--text-muted);
  border: 2px solid var(--border);
}

.btn-stop:hover {
  background: var(--error-500);
  color: white;
  border-color: var(--error-500);
}

.current-session-info {
  margin-top: var(--space-4);
  padding: var(--space-4);
  background: var(--primary-50);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--primary-500);
  font-size: 0.875rem;
  color: var(--primary-700);
}

/* Enhanced Stats */
.stats-section h3 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  color: var(--text);
  font-size: 1.25rem;
}

.statsRow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.stat {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  background: linear-gradient(135deg, white, var(--gray-50));
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gray-300);
}

.stat-primary::before {
  background: var(--primary-500);
}

.stat-success::before {
  background: var(--success-500);
}

.stat-info::before {
  background: var(--warning-500);
}

.stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: var(--gray-100);
}

.stat-primary .stat-icon {
  background: var(--primary-100);
  color: var(--primary-600);
}

.stat-success .stat-icon {
  background: var(--success-500);
  color: white;
}

.stat-info .stat-icon {
  background: var(--warning-500);
  color: white;
}

.stat-content {
  flex: 1;
}

.statLabel {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-1);
}

.statValue {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

/* Enhanced Progress Bar */
.progress {
  padding: var(--space-5);
  background: linear-gradient(135deg, var(--gray-50), var(--gray-100));
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

.progressHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
}

.progress-info {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.progress-percentage {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--success-600);
}

.progressBar {
  width: 100%;
  height: 16px;
  background: var(--gray-200);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  margin-bottom: var(--space-3);
}

.progressBar #todayProgress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--success-500), var(--success-600));
  border-radius: 999px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.progressBar #todayProgress::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: shimmer 2s ease-in-out infinite;
}

.progress-goal-line {
  position: absolute;
  top: 0;
  right: 0;
  width: 2px;
  height: 100%;
  background: var(--warning-500);
  opacity: 0.7;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 500;
}

/* Enhanced Admin Interface */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-6);
  border-bottom: 2px solid var(--border-light);
}

.page-title h1 {
  margin: 0 0 var(--space-2);
  font-size: 2.25rem;
  color: var(--text);
  font-weight: 800;
}

.page-title p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.125rem;
}

.header-actions {
  display: flex;
  gap: var(--space-3);
}

.refresh-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  background: var(--primary-50);
  color: var(--primary-700);
  border: 2px solid var(--primary-200);
  border-radius: var(--radius-lg);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.refresh-btn:hover {
  background: var(--primary-100);
  border-color: var(--primary-300);
  transform: translateY(-1px);
}

/* Enhanced Sidebar */
.sidebar {
  width: 320px;
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: 0;
  position: sticky;
  top: 80px;
  height: calc(100vh - 80px);
  overflow-y: auto;
}

.sidebar-header {
  padding: var(--space-6) var(--space-6) var(--space-4);
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
}

.sidebar-header h3 {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary-800);
}

.sidebar-nav {
  padding: var(--space-4);
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: var(--space-2);
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  position: relative;
  border: 2px solid transparent;
}

.sidebar-nav a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 0;
  background: var(--primary);
  border-radius: 2px;
  transition: height 0.2s ease;
}

.sidebar-nav a.active,
.sidebar-nav a:hover {
  background: var(--primary-50);
  color: var(--primary-700);
  border-color: var(--primary-200);
  transform: translateX(4px);
}

.sidebar-nav a.active::before,
.sidebar-nav a:hover::before {
  height: 60%;
}

.sidebar-nav a.active {
  background: var(--primary-100);
  color: var(--primary-800);
  font-weight: 600;
}

/* Card Headers */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-light);
}

.card-header h2 {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0;
  font-size: 1.5rem;
  color: var(--text);
}

/* Enhanced Filters */
.filters {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  align-items: end;
  margin-bottom: var(--space-6);
  padding: var(--space-5);
  background: linear-gradient(135deg, var(--gray-50), var(--gray-100));
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.filter-group label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-1);
}

.filter-group input {
  min-width: 160px;
  padding: var(--space-3);
  font-size: 0.875rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: white;
}

.btn-filter {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  height: fit-content;
}

.btn-filter:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Stats Display */
.stats-display {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.stat-metric {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: white;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  transition: all 0.2s ease;
}

.stat-metric:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-200);
}

.stat-metric-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: var(--primary-100);
  color: var(--primary-600);
}

.stat-metric-content h4 {
  margin: 0 0 var(--space-1);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-metric-content .value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

/* Live Indicator */
.live-indicator {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--success-50);
  border: 1px solid var(--success-200);
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--success-700);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success-500);
  animation: pulse-dot 2s ease-in-out infinite;
}

/* Enhanced Data Tables */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: white;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
  background: white;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.data-table th {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-5);
  background: linear-gradient(135deg, var(--gray-50), var(--gray-100));
  color: var(--text);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 10;
}

.data-table td {
  padding: var(--space-4) var(--space-5);
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: all 0.2s ease;
}

.data-table tbody tr:hover {
  background: var(--primary-25);
  transform: none;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-8);
  color: var(--text-muted);
}

.empty-state svg {
  margin-bottom: var(--space-4);
  color: var(--text-light);
}

.empty-state h3 {
  margin: 0 0 var(--space-2);
  color: var(--text-muted);
  font-weight: 600;
}

.empty-state p {
  margin: 0;
  font-size: 0.875rem;
}

/* Enhanced Responsive Design */

/* Large Tablets and Small Desktops */
@media (max-width: 1200px) {
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }
  
  .quick-actions {
    align-self: stretch;
  }
  
  .field-group {
    grid-template-columns: 1fr;
  }
  
  .timer-display {
    flex-direction: column;
    text-align: center;
    gap: var(--space-6);
  }
  
  .timer-actions {
    flex-direction: row;
    justify-content: center;
  }
}

/* Tablets */
@media (max-width: 1024px) {
  .adminShell {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--border);
    top: auto;
  }
  
  .sidebar-nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
  }
  
  .sidebar-nav a {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
    justify-content: center;
  }
  
  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }
  
  .stats-display {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
  
  .filters {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-group {
    flex: 1;
  }
  
  .filter-group input {
    min-width: auto;
  }
}

/* Mobile Landscape and Small Tablets */
@media (max-width: 768px) {
  body {
    font-size: 13px;
  }
  
  .container {
    flex-direction: column;
  }
  
  .left,
  .right {
    padding: var(--space-6);
  }
  
  .right {
    min-height: 300px;
  }
  
  .left {
    max-width: none;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .page-title h1 {
    font-size: 1.875rem;
  }
  
  /* Enhanced Mobile Timer */
  .timer-card {
    gap: var(--space-6);
  }
  
  .timer-display {
    padding: var(--space-4);
  }
  
  #liveClock {
    font-size: 2.5rem;
  }
  
  .timer-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .btn-start, .btn-stop {
    min-width: auto;
    width: 100%;
  }
  
  /* Mobile Stats */
  .statsRow {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
  
  .stat {
    flex-direction: column;
    text-align: center;
    gap: var(--space-3);
  }
  
  .stat-icon {
    margin: 0 auto;
  }
  
  /* Mobile Features */
  .featureGrid {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
  
  .stats-preview {
    flex-direction: column;
    gap: var(--space-4);
  }
  
  /* Mobile Navigation */
  .topbar {
    padding: var(--space-3) var(--space-4);
    flex-wrap: wrap;
  }
  
  .topbar nav {
    gap: var(--space-2);
    flex-wrap: wrap;
  }
  
  .topbar nav a {
    font-size: 0.75rem;
    padding: var(--space-1) var(--space-2);
  }
  
  /* Mobile Tabs */
  .tabs {
    flex-direction: row;
    overflow-x: auto;
    padding: var(--space-1);
    gap: var(--space-1);
  }
  
  .tab {
    white-space: nowrap;
    min-width: auto;
    flex: none;
    padding: var(--space-2) var(--space-3);
    font-size: 0.75rem;
  }
  
  .tab svg {
    width: 14px;
    height: 14px;
  }
  
  /* Mobile Tables */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .data-table {
    min-width: 600px;
    font-size: 0.75rem;
  }
  
  .data-table th,
  .data-table td {
    padding: var(--space-2) var(--space-3);
  }
  
  .data-table th {
    font-size: 0.625rem;
  }
  
  /* Mobile Cards */
  .card {
    margin: var(--space-4) 0;
    padding: var(--space-5);
  }
  
  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }
  
  .card-header h2 {
    font-size: 1.25rem;
  }
}

/* Mobile Portrait */
@media (max-width: 480px) {
  .left,
  .right,
  .adminContent {
    padding: var(--space-4);
  }
  
  .card {
    padding: var(--space-4);
    margin: var(--space-3) 0;
  }
  
  /* Mobile Login */
  .login-header h1 {
    font-size: 1.75rem;
  }
  
  .logo-container {
    width: 60px;
    height: 60px;
    margin-bottom: var(--space-4);
  }
  
  .button-group {
    gap: var(--space-2);
  }
  
  .btn-primary, .btn-secondary {
    padding: var(--space-3) var(--space-4);
    font-size: 0.8rem;
  }
  
  /* Mobile Dashboard Header */
  .dashboard-header {
    padding: var(--space-4);
    flex-direction: column;
    text-align: center;
  }
  
  .welcome-section h1 {
    font-size: 1.5rem;
  }
  
  .quick-actions {
    flex-direction: column;
    gap: var(--space-2);
  }
  
  .quick-action-btn {
    justify-content: center;
    padding: var(--space-3);
  }
  
  /* Mobile Timer */
  #liveClock {
    font-size: 2rem;
  }
  
  .clock-label {
    font-size: 0.75rem;
  }
  
  .timer-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }
  
  .timer-header h2 {
    font-size: 1.125rem;
  }
  
  .timer-status {
    align-self: stretch;
    justify-content: center;
  }
  
  /* Mobile Form Fields */
  .field-group {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
  
  input, select {
    padding: var(--space-3);
    font-size: 0.875rem;
  }
  
  label {
    font-size: 0.75rem;
  }
  
  /* Mobile Admin */
  .sidebar-header {
    text-align: center;
    padding: var(--space-4);
  }
  
  .sidebar-nav {
    padding: var(--space-3);
  }
  
  .sidebar-nav a {
    min-width: auto;
    flex: 1 1 calc(50% - var(--space-1));
    font-size: 0.75rem;
    padding: var(--space-3);
  }
  
  .page-title h1 {
    font-size: 1.5rem;
  }
  
  .page-title p {
    font-size: 0.875rem;
  }
  
  .admin-header {
    text-align: center;
  }
  
  .header-actions {
    align-self: stretch;
  }
  
  .refresh-btn {
    width: 100%;
    justify-content: center;
    padding: var(--space-3);
  }
  
  /* Mobile Stats */
  .stats-display {
    grid-template-columns: 1fr;
  }
  
  .stat-metric {
    flex-direction: column;
    text-align: center;
    gap: var(--space-2);
  }
  
  .stat-metric-content .value {
    font-size: 1.25rem;
  }
  
  /* Mobile Progress */
  .progress {
    padding: var(--space-3);
  }
  
  .progressHeader {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }
  
  .progress-info {
    font-size: 0.75rem;
  }
  
  .progress-percentage {
    font-size: 1rem;
    align-self: flex-end;
  }
  
  /* Mobile Filters */
  .filters {
    padding: var(--space-3);
    gap: var(--space-3);
  }
  
  .btn-filter {
    width: 100%;
    justify-content: center;
    padding: var(--space-3);
  }
  
  /* Mobile Tables - Stack on very small screens */
  .data-table {
    min-width: 100%;
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  
  /* Utility for mobile */
  .mobile-hidden {
    display: none;
  }
}

/* Extra Small Devices */
@media (max-width: 360px) {
  body {
    font-size: 12px;
  }
  
  .left,
  .right,
  .adminContent {
    padding: var(--space-3);
  }
  
  .card {
    padding: var(--space-3);
    margin: var(--space-2) 0;
  }
  
  #liveClock {
    font-size: 1.75rem;
    letter-spacing: 1px;
  }
  
  .welcome-section h1 {
    font-size: 1.25rem;
  }
  
  .page-title h1 {
    font-size: 1.25rem;
  }
  
  .topbar {
    padding: var(--space-2) var(--space-3);
  }
  
  .brand {
    font-size: 1rem;
  }
  
  .topbar nav a {
    padding: var(--space-1);
    font-size: 0.7rem;
  }
  
  .tabs {
    padding: 2px;
    gap: 2px;
  }
  
  .tab {
    padding: var(--space-1) var(--space-2);
    font-size: 0.7rem;
  }
  
  .tab svg {
    width: 12px;
    height: 12px;
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .logo-icon,
  .brand svg {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  button,
  .tab,
  .quick-action-btn,
  .topbar nav a,
  .sidebar-nav a {
    min-height: 44px;
    min-width: 44px;
  }
  
  input,
  select {
    min-height: 44px;
  }
  
  .data-table th,
  .data-table td {
    padding: var(--space-3) var(--space-4);
  }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .container {
    flex-direction: row;
  }
  
  .left,
  .right {
    padding: var(--space-4);
  }
  
  .dashboard-header {
    padding: var(--space-3);
  }
  
  .timer-display {
    flex-direction: row;
    gap: var(--space-4);
  }
  
  #liveClock {
    font-size: 2rem;
  }
}
