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

/* CSS Custom Properties for Design System */
:root {
  /* Spotify-inspired color palette */
  --primary-color: #1DB954;
  --primary-dark: #1AA34A;
  --secondary-color: #FFD166;
  
  --bg-dark: #121212;
  --bg-card: #181818;
  --bg-card-hover: #282828;
  --bg-elevated: #242424;
  
  --text-primary: #FFFFFF;
  --text-secondary: #B3B3B3;
  --text-tertiary: #727272;
  --text-success: #1DB954;
  --text-warning: #FFD166;
  --text-danger: #F15E6C;
  
  --border-light: rgba(255, 255, 255, 0.1);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.5);
  
  --gradient-primary: linear-gradient(135deg, #1DB954 0%, #1AA34A 100%);
  --gradient-warm: linear-gradient(135deg, #FFD166 0%, #F9B208 100%);
  --gradient-cool: linear-gradient(135deg, #4F46E5 0%, #7E22CE 100%);
  --gradient-bg: linear-gradient(135deg, #121212 30%, #242424 100%);
  
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;
  
  --spacing-xs: 0.5rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 2.5rem;
  --spacing-3xl: 3rem;
}

/* Global Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-dark);
  background-image: var(--gradient-bg);
  background-attachment: fixed;
  min-height: 100vh;
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 0.875rem;
  overflow-x: hidden;
}

/* Modern Navigation */
.navbar {
  background: rgba(0, 0, 0, 0.3) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  padding: var(--spacing-md) 0;
  margin-bottom: var(--spacing-xl);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary) !important;
}

.nav-link {
  color: var(--text-secondary) !important;
  font-weight: 500;
  padding: var(--spacing-sm) var(--spacing-md) !important;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
  margin: 0 0.25rem;
}

.nav-link:hover {
  color: var(--text-primary) !important;
  background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary) !important;
  font-weight: 600;
}

/* Container System */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

/* Spotify-inspired Sidebar */
.sidebar {
  width: 240px;
  background: #000000;
  min-height: 100vh;
  padding: 0;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 100;
  box-shadow: var(--shadow-lg);
}

.sidebar-header {
  padding: var(--spacing-md);
  color: var(--text-primary);
}

.sidebar .nav-item {
  margin: var(--spacing-xs) var(--spacing-md);
}

.sidebar .nav-link {
  display: flex;
  align-items: center;
  padding: var(--spacing-md) var(--spacing-lg) !important;
  color: var(--text-secondary) !important;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.sidebar .nav-link i {
  font-size: 1.25rem;
  margin-right: var(--spacing-md);
}

.sidebar .nav-link:hover {
  color: var(--text-primary) !important;
  background: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary) !important;
  font-weight: 600;
}

/* Main Content Area */
.main-content {
  margin-left: 240px;
  min-height: 100vh;
  width: calc(100% - 240px);
  background: var(--bg-dark);
  background-image: var(--gradient-bg);
  display: flex;
  flex-direction: column;
}

.main-content .container-fluid {
  flex: 1;
}

/* Header */
.main-header {
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid var(--border-light);
}

.header-title h1 {
  font-size: 1.75rem;
  font-weight: 700;
}

/* Search Container */
.search-container {
  position: relative;
  width: 300px;
}

.search-container i {
  position: absolute;
  left: var(--spacing-md);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
}

.search-input {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: var(--radius-full);
  padding: var(--spacing-sm) var(--spacing-lg) var(--spacing-sm) var(--spacing-xl);
  width: 100%;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.search-input::placeholder {
  color: var(--text-tertiary);
}

.search-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 2px rgba(29, 185, 84, 0.25);
}

/* User Profile Mini */
.user-profile-mini {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  padding: var(--spacing-xs) var(--spacing-md);
}

.user-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
}

/* Weekly Chart */
.chart-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 150px;
}

.chart-bar {
  width: 30px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  position: relative;
  transition: all 0.3s ease;
}

.chart-bar:hover {
  background: rgba(255, 255, 255, 0.2);
}

.chart-bar.active {
  background: var(--primary-color);
}

.chart-bar .day {
  position: absolute;
  bottom: -25px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.chart-summary {
  display: flex;
  justify-content: space-around;
}

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

.summary-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.summary-label {
  font-size: 0.75rem;
}

/* Time Tracker */
.time-tracker {
  position: relative;
}

.progress-ring {
  position: relative;
}

.time-display {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.current-time {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.time-label {
  font-size: 0.75rem;
}

/* Task List */
.task-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.task-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid var(--border-light);
}

.task-item.completed .form-check-label {
  text-decoration: line-through;
  color: var(--text-tertiary);
}

.task-date {
  font-size: 0.75rem;
}

.form-check-input {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--border-light);
}

.form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* Bento Grid System */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.bento-grid.dashboard {
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(120px, auto);
}

.bento-item {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.bento-item:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* Dashboard Grid Layout */
.stats-card {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
}

.stats-card.large {
  grid-column: span 6;
  min-height: 200px;
}

.stats-card.full-width {
  grid-column: span 12;
}

.stats-card.half-width {
  grid-column: span 6;
}

/* Modern Cards */
.card {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-light) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all 0.3s ease;
}

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

.card-header {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-light) !important;
  padding: var(--spacing-lg);
  font-weight: 600 !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
}

.card-header.bg-primary {
  background: linear-gradient(135deg, var(--primary-color), #1ed760) !important;
  color: #000 !important;
}

.card-header.bg-success {
  background: linear-gradient(135deg, #28a745, #34ce57) !important;
  color: #000 !important;
}

.card-header.bg-danger {
  background: linear-gradient(135deg, #dc3545, #e74c3c) !important;
  color: #fff !important;
}

.card-header.bg-info {
  background: linear-gradient(135deg, #17a2b8, #20c997) !important;
  color: #000 !important;
}

.card-header.bg-secondary {
  background: linear-gradient(135deg, #6c757d, #868e96) !important;
  color: #fff !important;
}

.card-body {
  padding: var(--spacing-xl);
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
}

/* Page Content with Modern Layout */
.page-content {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  padding: var(--spacing-xl) 0;
  margin-bottom: 0;
}

/* Typography System */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary) !important;
  margin-bottom: var(--spacing-md);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

.text-muted {
  color: var(--text-secondary) !important;
}

/* Modern Stat Cards */
.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.stat-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
  display: block;
}

.stat-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-icon {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  font-size: 1.5rem;
  opacity: 0.5;
  color: var(--text-secondary);
}

/* Modern Form Controls */
.form-control, .form-select {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border-light) !important;
  border-radius: var(--radius-md) !important;
  padding: var(--spacing-md) var(--spacing-lg);
  font-size: 0.875rem;
  transition: all 0.3s ease;
  color: var(--text-primary) !important;
}

.form-control:focus, .form-select:focus {
  background: var(--bg-elevated) !important;
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 0.2rem rgba(29, 185, 84, 0.25) !important;
  outline: none;
}

.form-control::placeholder {
  color: var(--text-secondary) !important;
}

.form-label {
  color: var(--text-primary) !important;
  font-weight: 500 !important;
  margin-bottom: var(--spacing-sm);
  font-size: 0.875rem;
}

.form-text {
  color: var(--text-secondary) !important;
}

/* Modern Button System */
.btn {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  position: relative;
  overflow: hidden;
}

.btn:focus,
.btn:active {
  outline: none !important;
  box-shadow: none !important;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #000 !important;
  font-weight: 600;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background: var(--primary-dark) !important;
  color: #000 !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md) !important;
}

.btn-primary:active {
  transform: translateY(0) !important;
  background: var(--primary-dark) !important;
}

.btn-success {
  background: var(--gradient-primary);
  color: #000 !important;
  font-weight: 600;
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active {
  background: var(--primary-dark) !important;
  color: #000 !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md) !important;
}

.btn-warning {
  background: var(--gradient-warm);
  color: #000 !important;
  font-weight: 600;
}

.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active {
  background: #F9B208 !important;
  color: #000 !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md) !important;
}

.btn-danger {
  background: linear-gradient(135deg, #F15E6C 0%, #DC3545 100%);
  color: #fff !important;
  font-weight: 600;
}

.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active {
  background: #DC3545 !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md) !important;
}

.btn-outline-primary {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color) !important;
  font-weight: 500;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  background: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: #000 !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md) !important;
}

.btn-outline-primary:disabled {
  background: transparent !important;
  border-color: var(--border-light) !important;
  color: var(--text-secondary) !important;
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-outline-primary:disabled:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* Modern Table Design - Fixed Color Contrast */
.table-container {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  overflow-x: auto;
  max-width: 100%;
}

.table {
  margin-bottom: 0;
  font-size: 0.875rem;
  color: var(--text-primary) !important;
  background: var(--bg-card) !important;
  min-width: 600px;
  white-space: nowrap;
}

.table th {
  background: var(--bg-elevated) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-light) !important;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  padding: 1rem 0.75rem;
  position: sticky;
  top: 0;
  z-index: 10;
  white-space: nowrap;
}

.table td {
  background: var(--bg-card) !important;
  border-color: var(--border-light) !important;
  color: var(--text-primary) !important;
  padding: 0.875rem 0.75rem;
  vertical-align: middle;
  transition: background-color 0.2s ease;
}

.table tbody tr {
  background: var(--bg-card) !important;
  transition: all 0.2s ease;
}

.table tbody tr:hover {
  background-color: var(--bg-card-hover) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.table tbody tr:hover td {
  background-color: var(--bg-card-hover) !important;
}

.table-bordered {
  border: 1px solid var(--border-light) !important;
}

.table-bordered th,
.table-bordered td {
  border: 1px solid var(--border-light) !important;
  background: var(--bg-card) !important;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: var(--bg-elevated) !important;
}

.table-striped tbody tr:nth-of-type(odd) td {
  background-color: var(--bg-elevated) !important;
}

.table-hover tbody tr:hover {
  background-color: var(--bg-card-hover) !important;
}

.table-hover tbody tr:hover td {
  background-color: var(--bg-card-hover) !important;
}

/* Fix for Bootstrap table-light class override */
.table-light,
.table-light th,
.table-light td,
.table-light thead th {
  background: var(--bg-elevated) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-light) !important;
}

/* Override any Bootstrap light theme table classes */
.table > :not(caption) > * > * {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
}

.table thead {
  background: var(--bg-elevated) !important;
}

.table thead th {
  background: var(--bg-elevated) !important;
  color: var(--text-primary) !important;
}

/* Enhanced table responsiveness */
@media (max-width: 768px) {
  .table-container {
    margin: 0 -1rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  
  .table {
    font-size: 0.8rem;
  }
  
  .table th,
  .table td {
    padding: 0.5rem 0.4rem;
    white-space: nowrap;
    background: var(--bg-card) !important;
  }
}

/* Enhanced status badges */
.table .badge {
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-full);
}

/* Footer Styles - Fixed for dark theme */
footer {
  background: var(--bg-elevated) !important;
  border-top: 1px solid var(--border-light) !important;
  color: var(--text-secondary) !important;
  margin-top: auto;
  position: relative;
  z-index: 1;
}

footer.bg-light {
  background: var(--bg-elevated) !important;
}

footer p {
  color: var(--text-secondary) !important;
  margin: 0;
  font-size: 0.875rem;
}

footer .container {
  max-width: 1400px;
}

/* Action buttons in tables */
.table .btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  margin: 0 0.125rem;
  border-radius: var(--radius-sm);
}

/* Status indicators */
.status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.5rem;
}

.status-indicator.present {
  background-color: var(--text-success);
}

.status-indicator.absent {
  background-color: var(--text-danger);
}

.status-indicator.leave {
  background-color: var(--text-warning);
}

.status-indicator.halfday {
  background-color: var(--text-info);
}

/* Status Badges with Modern Design */
.badge {
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.badge-success {
  background: rgba(29, 185, 84, 0.2);
  color: var(--primary-color);
  border: 1px solid rgba(29, 185, 84, 0.3);
}

.badge-danger {
  background: rgba(241, 94, 108, 0.2);
  color: var(--text-danger);
  border: 1px solid rgba(241, 94, 108, 0.3);
}

.badge-warning {
  background: rgba(255, 209, 102, 0.2);
  color: var(--secondary-color);
  border: 1px solid rgba(255, 209, 102, 0.3);
}

.badge-info {
  background: rgba(79, 70, 229, 0.2);
  color: #4F46E5;
  border: 1px solid rgba(79, 70, 229, 0.3);
}

/* Alert System */
#alert-container {
  position: fixed;
  top: var(--spacing-xl);
  right: var(--spacing-xl);
  z-index: 9999;
  width: 400px;
}

.alert {
  background: var(--bg-elevated) !important;
  border: none !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-lg);
  margin-bottom: var(--spacing-md);
  padding: var(--spacing-lg);
  border-left: 4px solid !important;
  color: var(--text-primary) !important;
}

.alert-warning {
  background: rgba(255, 193, 7, 0.1) !important;
  border-left-color: #ffc107 !important;
  color: #ffc107 !important;
}

.alert-success {
  background: rgba(29, 185, 84, 0.1) !important;
  border-left-color: var(--primary-color) !important;
  color: var(--primary-color) !important;
}

.alert-danger {
  background: rgba(220, 53, 69, 0.1) !important;
  border-left-color: #dc3545 !important;
  color: #dc3545 !important;
}

.alert-info {
  background: rgba(23, 162, 184, 0.1) !important;
  border-left-color: #17a2b8 !important;
  color: #17a2b8 !important;
}

/* Modal Modernization */
.modal-content {
  background: var(--bg-elevated);
  border: none;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
}

.modal-header {
  border-bottom: 1px solid var(--border-light);
  padding: var(--spacing-xl);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-body {
  padding: var(--spacing-xl);
}

.modal-footer {
  border-top: 1px solid var(--border-light);
  padding: var(--spacing-xl);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* Progress Bar Modernization */
.progress {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
  height: 8px;
}

.progress-bar {
  background: var(--primary-color);
  transition: all 0.6s ease;
}

.progress-bar.bg-success {
  background: var(--primary-color);
}

.progress-bar.bg-warning {
  background: var(--secondary-color);
}

/* Button Group Modernization */
.btn-group .btn {
  border: 1px solid rgba(29, 185, 84, 0.3);
  background: transparent;
  color: var(--text-secondary);
}

.btn-group .btn.active,
.btn-group .btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Navigation Pills */
.nav-pills .nav-link {
  background: transparent;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  padding: var(--spacing-md) var(--spacing-lg);
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-pills .nav-link.active,
.nav-pills .nav-link:hover {
  background: rgba(29, 185, 84, 0.2);
  color: var(--primary-color);
}

/* Legacy Support for Old Classes */
.status-present {
  background: rgba(29, 185, 84, 0.2);
  color: var(--primary-color);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(29, 185, 84, 0.3);
}

.status-absent {
  background: rgba(241, 94, 108, 0.2);
  color: var(--text-danger);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(241, 94, 108, 0.3);
}

.status-leave {
  background: rgba(255, 209, 102, 0.2);
  color: var(--secondary-color);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(255, 209, 102, 0.3);
}

.status-halfday {
  background: rgba(79, 70, 229, 0.2);
  color: #4F46E5;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(79, 70, 229, 0.3);
}

/* Responsive Bento Grid */
@media (max-width: 1200px) {
  .stats-card {
    grid-column: span 4;
  }
}

@media (max-width: 768px) {
  .bento-grid.dashboard {
    grid-template-columns: 1fr;
  }
  
  .stats-card,
  .stats-card.large,
  .stats-card.full-width,
  .stats-card.half-width {
    grid-column: span 1;
  }
  
  .container {
    padding: 0 var(--spacing-md);
  }
  
  #alert-container {
    width: calc(100% - 2rem);
    right: var(--spacing-md);
  }
  
  .page-content {
    padding: var(--spacing-lg) 0;
  }
  
  .bento-item {
    padding: var(--spacing-lg);
  }
}

@media (max-width: 480px) {
  .nav-link {
    padding: var(--spacing-sm) !important;
    margin: 0;
    font-size: 0.875rem;
  }
  
  .navbar-brand {
    font-size: 1rem;
  }
  
  .stat-value {
    font-size: 2rem;
  }
  
  .btn {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.75rem;
  }
}

/* Animation Utilities */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Utility Classes */
.text-gradient {
  background: linear-gradient(90deg, var(--primary-color), #4F46E5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-success {
  color: var(--primary-color) !important;
}

.text-danger {
  color: var(--text-danger) !important;
}

.text-warning {
  color: var(--secondary-color) !important;
}

.text-info {
  color: #4F46E5 !important;
}

.text-primary {
  color: var(--primary-color) !important;
}

.rounded-full {
  border-radius: var(--radius-full);
}

/* Spotify-inspired progress bar */
.progress-ring {
  position: relative;
  width: 150px;
  height: 150px;
}

.progress-ring circle {
  stroke-width: 8;
  fill: transparent;
  transform: rotate(-90deg);
  transform-origin: center;
}

.progress-ring .bg {
  stroke: rgba(255, 255, 255, 0.1);
}

.progress-ring .progress {
  stroke: var(--primary-color);
  transition: stroke-dashoffset 0.3s ease;
}

/* User profile card */
.user-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--spacing-lg);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.user-profile img {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-full);
  object-fit: cover;
  margin-bottom: var(--spacing-md);
  border: 3px solid var(--primary-color);
}

.user-profile h4 {
  margin-bottom: var(--spacing-xs);
}

.user-profile p {
  color: var(--text-secondary);
  margin-bottom: var(--spacing-md);
}

/* Calendar styling */
.calendar-container {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  border: 1px solid var(--border-light);
}

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

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--spacing-xs);
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: all 0.2s ease;
}

.calendar-day:hover {
  background: rgba(255, 255, 255, 0.1);
}

.calendar-day.active {
  background: var(--primary-color);
  color: white;
}

/* Enhanced Backup Page Styles */
.card {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-light) !important;
  color: var(--text-primary) !important;
}

.card-header {
  border-bottom: 1px solid var(--border-light) !important;
  font-weight: 600 !important;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
}

.card-header.bg-primary {
  background: linear-gradient(135deg, var(--primary-color), #1ed760) !important;
  color: #000 !important;
}

.card-header.bg-success {
  background: linear-gradient(135deg, #28a745, #34ce57) !important;
  color: #000 !important;
}

.card-header.bg-danger {
  background: linear-gradient(135deg, #dc3545, #e74c3c) !important;
  color: #fff !important;
}

.card-header.bg-info {
  background: linear-gradient(135deg, #17a2b8, #20c997) !important;
  color: #000 !important;
}

.card-header.bg-secondary {
  background: linear-gradient(135deg, #6c757d, #868e96) !important;
  color: #fff !important;
}

.card-body {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
}

/* Enhanced Table Styles for Backup Page */
.table {
  color: var(--text-primary) !important;
  background: transparent !important;
}

.table th {
  background: var(--bg-elevated) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-light) !important;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.table td {
  border-color: var(--border-light) !important;
  color: var(--text-primary) !important;
}

.table-bordered {
  border: 1px solid var(--border-light) !important;
}

.table-bordered th,
.table-bordered td {
  border: 1px solid var(--border-light) !important;
}

/* Enhanced Form Controls */
.form-control {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border-light) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-md) !important;
}

.form-control:focus {
  background: var(--bg-elevated) !important;
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 0.2rem rgba(29, 185, 84, 0.25) !important;
  color: var(--text-primary) !important;
}

.form-control::placeholder {
  color: var(--text-secondary) !important;
}

.form-label {
  color: var(--text-primary) !important;
  font-weight: 500 !important;
}

.form-text {
  color: var(--text-secondary) !important;
}

/* Enhanced Alert Styles */
.alert {
  border: none !important;
  border-radius: var(--radius-lg) !important;
  border-left: 4px solid !important;
  background: var(--bg-elevated) !important;
  color: var(--text-primary) !important;
}

.alert-warning {
  background: rgba(255, 193, 7, 0.1) !important;
  border-left-color: #ffc107 !important;
  color: #ffc107 !important;
}

.alert-success {
  background: rgba(29, 185, 84, 0.1) !important;
  border-left-color: var(--primary-color) !important;
  color: var(--primary-color) !important;
}

.alert-danger {
  background: rgba(220, 53, 69, 0.1) !important;
  border-left-color: #dc3545 !important;
  color: #dc3545 !important;
}

.alert-info {
  background: rgba(23, 162, 184, 0.1) !important;
  border-left-color: #17a2b8 !important;
  color: #17a2b8 !important;
}

/* Enhanced Button Styles */
.btn-outline-danger {
  color: #dc3545 !important;
  border-color: #dc3545 !important;
  background: transparent !important;
}

.btn-outline-danger:hover {
  background: #dc3545 !important;
  border-color: #dc3545 !important;
  color: #fff !important;
}

.btn-outline-primary {
  color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  background: transparent !important;
}

.btn-outline-primary:hover {
  background: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: #000 !important;
}

.btn-outline-primary:disabled {
  color: var(--text-secondary) !important;
  border-color: var(--border-light) !important;
  background: transparent !important;
}

/* Pagination Styles */
.d-flex.justify-content-between.align-items-center.mt-2 {
  background: var(--bg-elevated);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  margin-top: var(--spacing-md) !important;
}

.d-flex.justify-content-between.align-items-center.mt-2 span {
  color: var(--text-primary);
  font-weight: 500;
}

/* System Summary Styles */
.metric-item {
  padding: var(--spacing-lg) 0;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  display: block;
  margin-bottom: 0.25rem;
}

.metric-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  transition: all 0.3s ease;
  text-align: center;
}

.summary-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.summary-number {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0.5rem 0;
  display: block;
}

.summary-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.progress-section .progress {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  height: 8px;
}

.attendance-breakdown {
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--border-light);
}

/* Table Link Styles */
.table a {
  color: var(--primary-color) !important;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.table a:hover {
  color: #1ed760 !important;
  text-decoration: underline;
}

/* Loading States */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
}

.spinner-border {
  color: var(--primary-color);
}

/* File Input Styling */
input[type="file"] {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border-light) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-md) !important;
  padding: 0.5rem !important;
}

input[type="file"]:focus {
  border-color: var(--primary-color) !important;
  outline: none !important;
  box-shadow: 0 0 0 0.2rem rgba(29, 185, 84, 0.25) !important;
}

/* Text Color Overrides for Better Contrast */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary) !important;
}

p {
  color: var(--text-primary) !important;
}

label {
  color: var(--text-primary) !important;
}

.text-dark {
  color: var(--text-primary) !important;
}

/* Additional UI Enhancements */

/* Improved status badges with icons */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.status-badge.present {
  background: rgba(29, 185, 84, 0.2);
  color: var(--text-success);
  border: 1px solid rgba(29, 185, 84, 0.3);
}

.status-badge.absent {
  background: rgba(241, 94, 108, 0.2);
  color: var(--text-danger);
  border: 1px solid rgba(241, 94, 108, 0.3);
}

.status-badge.leave {
  background: rgba(255, 209, 102, 0.2);
  color: var(--text-warning);
  border: 1px solid rgba(255, 209, 102, 0.3);
}

.status-badge.halfday {
  background: rgba(79, 70, 229, 0.2);
  color: #4F46E5;
  border: 1px solid rgba(79, 70, 229, 0.3);
}

/* Enhanced table loading states */
.table-loading {
  position: relative;
  min-height: 200px;
}

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

.table-loading .spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-light);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Enhanced search and filter inputs */
.search-filter-container {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  border: 1px solid var(--border-light);
}

.search-filter-container .form-control,
.search-filter-container .form-select {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-light) !important;
}

/* Table pagination improvements */
.pagination {
  margin: 0;
}

.pagination .page-link {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
  margin: 0 0.125rem;
  border-radius: var(--radius-md);
}

.pagination .page-link:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #000;
}

.pagination .page-item.active .page-link {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #000;
}

/* Table action buttons improvements */
.table-actions {
  display: flex;
  gap: 0.25rem;
  justify-content: flex-start;
}

.table-actions .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  line-height: 1.2;
  border-radius: var(--radius-sm);
}

/* Table cell improvements */
.table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.table td.expandable {
  white-space: normal;
  word-wrap: break-word;
}

/* Empty state styling */
.table-empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
}

.table-empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.table-empty-state h5 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

/* Responsive table improvements */
@media (max-width: 576px) {
  .table-container {
    border-radius: 0;
    margin: 0 -15px;
  }
  
  .table th,
  .table td {
    padding: 0.375rem 0.25rem;
    font-size: 0.75rem;
  }
  
  .table-actions {
    flex-direction: column;
    gap: 0.125rem;
  }
  
  .table-actions .btn {
    width: 100%;
    padding: 0.125rem 0.25rem;
    font-size: 0.7rem;
  }
}

/* Enhanced sorting indicators */
.table th.sortable {
  cursor: pointer;
  position: relative;
  user-select: none;
}

.table th.sortable:hover {
  background: var(--bg-card-hover) !important;
}

.table th.sortable::after {
  content: '↕';
  position: absolute;
  right: 0.5rem;
  opacity: 0.5;
  font-size: 0.8rem;
}

.table th.sortable.asc::after {
  content: '↑';
  opacity: 1;
}

.table th.sortable.desc::after {
  content: '↓';
  opacity: 1;
}

/* Enhanced form styling within tables */
.table .form-check-input {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
}

.table .form-check-input:checked {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

/* Quick stats cards */
.quick-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
}

.quick-stat-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  text-align: center;
  transition: all 0.3s ease;
}

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

.quick-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
  margin: 0.5rem 0;
}

.quick-stat-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Enhanced mobile responsiveness */
@media (max-width: 768px) {
  .main-content {
    margin-left: 0;
    width: 100%;
  }
  
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
  
  .bento-grid {
    grid-template-columns: 1fr !important;
    gap: var(--spacing-md) !important;
  }
  
  .quick-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
  }
}

/* Fix for navigation tabs in salary management */
.nav-tabs .nav-link {
  background: transparent !important;
  border: 1px solid var(--border-light) !important;
  color: var(--text-secondary) !important;
  margin-right: 0.25rem;
  border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
}

.nav-tabs .nav-link:hover {
  background: var(--bg-card-hover) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-light) !important;
}

.nav-tabs .nav-link.active {
  background: var(--bg-elevated) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-light) !important;
  border-bottom-color: var(--bg-elevated) !important;
}

/* Fix for tab content */
.tab-content {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border-light) !important;
  border-top: none !important;
  border-radius: 0 var(--radius-md) var(--radius-md) var(--radius-md) !important;
  padding: var(--spacing-lg) !important;
}

/* Fix for card headers in salary section */
.card-header-tabs {
  background: transparent !important;
  border-bottom: none !important;
  margin-bottom: -1px !important;
}

.card-header-tabs .nav-link {
  background: transparent !important;
  border: 1px solid var(--border-light) !important;
  color: var(--text-secondary) !important;
  border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
}

.card-header-tabs .nav-link.active {
  background: var(--bg-elevated) !important;
  color: var(--text-primary) !important;
  border-bottom-color: var(--bg-elevated) !important;
}

/* Universal Tab Styling for Management Pages */
#teacher-tabs, #attendance-tabs {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  padding: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

#teacher-tabs .nav-link, #attendance-tabs .nav-link {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-weight: 500;
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

#teacher-tabs .nav-link:hover, #attendance-tabs .nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  transform: translateY(-1px);
}

#teacher-tabs .nav-link.active, #attendance-tabs .nav-link.active {
  background: var(--primary-color);
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(29, 185, 84, 0.3);
}

#teacher-tabs .nav-link.active:hover, #attendance-tabs .nav-link.active:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-1px);
}

/* Add subtle animation effect */
#teacher-tabs .nav-link::before, #attendance-tabs .nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

#teacher-tabs .nav-link:hover::before, #attendance-tabs .nav-link:hover::before {
  left: 100%;
}

/* Tab Content Styling */
#teachers-page .tab-content, #attendance-page .tab-content {
  background: transparent;
  border: none;
  padding: 0;
}

#teachers-page .tab-pane, #attendance-page .tab-pane {
  min-height: 400px;
  animation: fadeInUp 0.3s ease-out;
}

/* Tab Icons */
#teacher-tabs .nav-link i, #attendance-tabs .nav-link i {
  font-size: 1.1rem;
  margin-right: var(--spacing-sm);
  transition: transform 0.3s ease;
}

#teacher-tabs .nav-link.active i, #attendance-tabs .nav-link.active i {
  transform: scale(1.1);
}

/* Unified Table Styling for All Management Pages */
.table-container, .table-responsive {
  background: var(--bg-card) !important;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.table-container .table, .table-responsive .table {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
}

/* Enhanced Table Headers */
.table-container .table th, .table-responsive .table th {
  background: var(--bg-elevated) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-light) !important;
  padding: var(--spacing-lg) var(--spacing-md) !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  border-bottom: 2px solid var(--border-light) !important;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.table-container .table td, .table-responsive .table td {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-light) !important;
  padding: var(--spacing-lg) var(--spacing-md) !important;
  vertical-align: middle !important;
  font-size: 0.9rem !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* Enhanced Table Row Hover Effects */
.table-container .table tbody tr, .table-responsive .table tbody tr {
  transition: all 0.3s ease !important;
  cursor: default;
}

.table-container .table tbody tr:hover, .table-responsive .table tbody tr:hover {
  background: var(--bg-card-hover) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.table-container .table tbody tr:hover td, .table-responsive .table tbody tr:hover td {
  background: var(--bg-card-hover) !important;
}

/* Remove striping for cleaner look */
.table-container .table tbody tr:nth-of-type(odd), .table-responsive .table tbody tr:nth-of-type(odd) {
  background: var(--bg-card) !important;
}

.table-container .table tbody tr:nth-of-type(odd) td, .table-responsive .table tbody tr:nth-of-type(odd) td {
  background: var(--bg-card) !important;
}

/* Enhanced Table Action Buttons */
.table-container .btn, .table-responsive .btn {
  padding: var(--spacing-sm) var(--spacing-md) !important;
  font-size: 0.875rem !important;
  border-radius: var(--radius-md) !important;
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
  border: none !important;
}

.table-container .btn-sm, .table-responsive .btn-sm {
  padding: var(--spacing-xs) var(--spacing-sm) !important;
  font-size: 0.8rem !important;
}

.table-container .btn-outline-primary, .table-responsive .btn-outline-primary {
  border: 1px solid var(--primary-color) !important;
  color: var(--primary-color) !important;
  background: transparent !important;
}

.table-container .btn-outline-primary:hover, .table-responsive .btn-outline-primary:hover {
  background: var(--primary-color) !important;
  color: white !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(29, 185, 84, 0.3);
}

.table-container .btn-outline-danger, .table-responsive .btn-outline-danger {
  border: 1px solid var(--text-danger) !important;
  color: var(--text-danger) !important;
  background: transparent !important;
}

.table-container .btn-outline-danger:hover, .table-responsive .btn-outline-danger:hover {
  background: var(--text-danger) !important;
  color: white !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(241, 94, 108, 0.3);
}

/* Enhanced Status Badges in Tables */
.table-container .badge, .table-responsive .badge {
  padding: var(--spacing-sm) var(--spacing-md) !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  border-radius: var(--radius-full) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

.table-container .status-present, .table-responsive .status-present,
.table-container .badge.bg-success, .table-responsive .badge.bg-success {
  background: rgba(29, 185, 84, 0.15) !important;
  color: var(--primary-color) !important;
  border: 1px solid rgba(29, 185, 84, 0.3) !important;
}

.table-container .status-absent, .table-responsive .status-absent,
.table-container .badge.bg-danger, .table-responsive .badge.bg-danger {
  background: rgba(241, 94, 108, 0.15) !important;
  color: var(--text-danger) !important;
  border: 1px solid rgba(241, 94, 108, 0.3) !important;
}

.table-container .status-leave, .table-responsive .status-leave,
.table-container .badge.bg-warning, .table-responsive .badge.bg-warning {
  background: rgba(255, 209, 102, 0.15) !important;
  color: var(--secondary-color) !important;
  border: 1px solid rgba(255, 209, 102, 0.3) !important;
}

/* Enhanced Form Controls in Tables */
.table-container .form-select, .table-responsive .form-select,
.table-container .form-control, .table-responsive .form-control {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border-light) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-md) !important;
  font-size: 0.875rem !important;
  padding: var(--spacing-sm) var(--spacing-md) !important;
  transition: all 0.2s ease !important;
}

.table-container .form-select:focus, .table-responsive .form-select:focus,
.table-container .form-control:focus, .table-responsive .form-control:focus {
  background: var(--bg-elevated) !important;
  border-color: var(--primary-color) !important;
  color: var(--text-primary) !important;
  box-shadow: 0 0 0 0.2rem rgba(29, 185, 84, 0.25) !important;
  transform: translateY(-1px);
}

/* Enhanced Attendance Status Styling */
.table-container .status-indicator, .table-responsive .status-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
}

/* Attendance Action Buttons */
.table-container .attendance-action-btn, .table-responsive .attendance-action-btn {
  min-width: 100px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  transition: all 0.3s ease;
}

.table-container .attendance-action-btn:hover, .table-responsive .attendance-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Enhanced spacing for attendance tables */
#mark-attendance-table td, #view-attendance-table td {
  padding: var(--spacing-lg) var(--spacing-md) !important;
}

#mark-attendance-table th, #view-attendance-table th {
  padding: var(--spacing-xl) var(--spacing-md) !important;
}

/* Fix for any remaining white background issues */
.bg-light,
.table-light {
  background: var(--bg-elevated) !important;
  color: var(--text-primary) !important;
}

/* Fix for form controls in tables */
.table .form-control,
.table .form-select {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border-light) !important;
  color: var(--text-primary) !important;
}

.table .form-control:focus,
.table .form-select:focus {
  background: var(--bg-elevated) !important;
  border-color: var(--primary-color) !important;
  color: var(--text-primary) !important;
  box-shadow: 0 0 0 0.2rem rgba(29, 185, 84, 0.25) !important;
}

/* Fix for dropdown menus */
.dropdown-menu {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border-light) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-lg) !important;
}

.dropdown-item {
  color: var(--text-primary) !important;
  background: transparent !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: var(--bg-card-hover) !important;
  color: var(--text-primary) !important;
}

/* Fix for pagination within tables */
.table-container + nav .pagination {
  background: var(--bg-elevated);
  padding: var(--spacing-md);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  margin: 0;
}

/* Ensure all text in tables is readable */
.table *,
.table-responsive * {
  color: inherit !important;
}

.table th *,
.table td * {
  color: var(--text-primary) !important;
}

/* Ensure footer stays at bottom */
.main-content {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content .container-fluid {
  flex: 1;
}

/* Final overrides for any stubborn table styling issues */
table,
.table,
.table-responsive table {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
}

table th,
table td,
.table th,
.table td {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-light) !important;
}

table thead,
.table thead {
  background: var(--bg-elevated) !important;
}

table thead th,
.table thead th {
  background: var(--bg-elevated) !important;
  color: var(--text-primary) !important;
}

/* Force all Bootstrap table variants to use dark theme */
.table-primary,
.table-secondary,
.table-success,
.table-danger,
.table-warning,
.table-info,
.table-light,
.table-dark {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
}

.table-primary th,
.table-secondary th,
.table-success th,
.table-danger th,
.table-warning th,
.table-info th,
.table-light th,
.table-dark th {
  background: var(--bg-elevated) !important;
  color: var(--text-primary) !important;
}

/* Ensure any remaining white backgrounds are fixed */
[class*="bg-white"],
[class*="bg-light"] {
  background: var(--bg-elevated) !important;
  color: var(--text-primary) !important;
}

/* Fix for any inline styles that might override */
.table[style],
.table th[style],
.table td[style] {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
} 