:root {
  --primary-color: #10b981;
  --primary-dark: #059669;
  --primary-darker: #047857;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --info-color: #3b82f6;
  --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;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--gray-800);
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Navigation */
.navbar {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(249, 250, 251, 0.98) 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(16, 185, 129, 0.1);
  transition: var(--transition);
}

.navbar-brand a {
  font-size: 1.75rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  letter-spacing: -0.5px;
  transition: var(--transition);
  display: inline-block;
}

.navbar-brand a:hover {
  transform: scale(1.05);
}

.navbar-menu {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.navbar-menu a {
  color: var(--gray-700);
  text-decoration: none;
  padding: 0.625rem 1.125rem;
  border-radius: var(--radius-lg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  font-size: 0.9375rem;
  position: relative;
  overflow: hidden;
}

.navbar-menu a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: -1;
}

.navbar-menu a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.navbar-menu a:hover::before {
  opacity: 0.08;
}

.navbar-menu a.active {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  transform: translateY(-1px);
}

.navbar-menu a.active:hover {
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
  transform: translateY(-3px);
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.navbar-user span {
  color: var(--gray-600);
  font-size: 0.9375rem;
}

.navbar-user a {
  color: var(--gray-600);
  text-decoration: none;
  transition: var(--transition);
}

.navbar-user a:hover {
  color: var(--primary-color);
}

/* Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2.5rem;
  background-color: #f8fafc;
  min-height: calc(100vh - 80px);
}

.container-fluid {
  max-width: 100%;
  padding: 2.5rem;
  background-color: #f8fafc;
  min-height: calc(100vh - 80px);
}

/* Page Header */
.page-header {
  background: white;
  padding: 2rem;
  border-radius: var(--radius-xl);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.page-header h1 {
  font-size: 2rem;
  color: var(--gray-900);
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.page-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-lg);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
  line-height: 1.5;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.btn-secondary {
  background-color: var(--white);
  color: var(--gray-700);
  border: 2px solid var(--gray-300);
}

.btn-secondary:hover {
  background-color: var(--gray-50);
  border-color: var(--gray-400);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-danger {
  background-color: var(--danger-color);
  color: white;
  border-color: var(--danger-color);
}

.btn-danger:hover {
  background-color: #dc2626;
  border-color: #dc2626;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-success {
  background-color: var(--success-color);
  color: white;
  border-color: var(--success-color);
}

.btn-success:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-warning {
  background-color: var(--warning-color);
  color: white;
  border-color: var(--warning-color);
}

.btn-warning:hover {
  background-color: #d97706;
  border-color: #d97706;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-info {
  background-color: var(--info-color);
  color: white;
  border-color: var(--info-color);
}

.btn-info:hover {
  background-color: #2563eb;
  border-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-sm {
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
}

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

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  padding: 1.75rem;
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  border: 1px solid transparent;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  transform: scaleX(0);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: left;
}

.stat-card:hover {
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.15);
  transform: translateY(-4px);
  border-color: var(--gray-100);
}

.stat-card:hover::before {
  transform: scaleX(1);
}

.stat-icon {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  box-shadow: 0 8px 16px rgba(16, 185, 129, 0.25);
  position: relative;
  transition: all 0.3s;
}

.stat-card:hover .stat-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 12px 24px rgba(16, 185, 129, 0.35);
}

.stat-icon::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

.stat-icon span {
  font-size: 2.25rem;
  filter: brightness(0) invert(1);
  position: relative;
  z-index: 1;
}

.stat-content {
  flex: 1;
  min-width: 0;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  gap: 2rem;
}

.dashboard-section {
  background: white;
  padding: 2rem;
  border-radius: var(--radius-xl);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-section:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.dashboard-section h2 {
  font-size: 1.375rem;
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--gray-900);
  font-weight: 700;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--gray-100);
}

.section-header-inline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--gray-100);
}

.section-header-inline h2 {
  margin-bottom: 0;
}

.live-badge {
  background-color: var(--danger-color);
  color: white;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  animation: pulse 2s infinite;
}

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

/* Cards */
.card {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.8);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 2rem;
}

.card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.card-header {
  padding: 1.5rem 2rem;
  border-bottom: 2px solid var(--gray-100);
  background: linear-gradient(135deg, rgba(249, 250, 251, 0.8) 0%, rgba(255, 255, 255, 1) 100%);
}

.card-header h3,
.card-header h4,
.card-header h5 {
  margin: 0;
  font-weight: 700;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.card-body {
  padding: 2rem;
}

.card-footer {
  padding: 1.5rem 2rem;
  border-top: 2px solid var(--gray-100);
  background-color: var(--gray-50);
}

/* Tables */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-lg);
}

.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius-lg);
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table th,
.table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-100);
}

.table th {
  background: linear-gradient(135deg, var(--gray-50) 0%, rgba(249, 250, 251, 0.5) 100%);
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--gray-700);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: sticky;
  top: 0;
  z-index: 10;
}

.table thead tr th:first-child {
  border-top-left-radius: var(--radius-lg);
}

.table thead tr th:last-child {
  border-top-right-radius: var(--radius-lg);
}

.table tbody tr {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background-color: white;
}

.table tbody tr:hover {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.05) 0%, rgba(16, 185, 129, 0.02) 100%);
  cursor: pointer;
  transform: scale(1.01);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

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

.table tr.new-punch {
  animation: highlight 2s;
}

@keyframes highlight {
  0% { background-color: #fef3c7; }
  100% { background-color: transparent; }
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  transition: all 0.2s;
}

.badge:hover {
  transform: scale(1.05);
}

.badge-in {
  background-color: #10b981;
  color: white;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.badge-out {
  background-color: #ef4444;
  color: white;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.badge-active {
  background-color: #10b981;
  color: white;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.badge-inactive {
  background-color: #6b7280;
  color: white;
  box-shadow: 0 2px 4px rgba(107, 114, 128, 0.2);
}

.badge-success {
  background-color: #10b981;
  color: white;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.badge-danger {
  background-color: #ef4444;
  color: white;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.badge-warning {
  background-color: #f59e0b;
  color: white;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
}

.badge-secondary {
  background-color: #6b7280;
  color: white;
  box-shadow: 0 2px 4px rgba(107, 114, 128, 0.2);
}

.badge-info {
  background-color: #3b82f6;
  color: white;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.badge-primary {
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

/* Location and Duration Badges */
.location-badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  background-color: var(--gray-100);
  color: var(--gray-700);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1px solid var(--gray-200);
}

.duration-badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label,
.form-label {
  font-weight: 600;
  margin-bottom: 0.625rem;
  color: var(--gray-700);
  font-size: 0.9375rem;
  display: block;
}

.form-group input,
.form-group select,
.form-group textarea,
.form-control,
.form-select {
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  font-size: 0.9375rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background-color: var(--white);
  width: 100%;
  font-family: inherit;
  color: var(--gray-800);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover,
.form-control:hover,
.form-select:hover {
  border-color: var(--gray-300);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.form-control:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
  background-color: var(--white);
  transform: translateY(-1px);
}

.form-control::placeholder {
  color: var(--gray-400);
}

select.form-control,
select.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.25rem;
  padding-right: 2.75rem;
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Alerts */
.alert {
  padding: 1rem;
  border-radius: 0.375rem;
  margin-bottom: 1.5rem;
}

.alert-error {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-info {
  background-color: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--gray-600);
  background: var(--gray-50);
  border-radius: var(--radius);
  margin: 1rem 0;
}

.empty-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state p {
  font-size: 1rem;
  color: var(--gray-700);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.empty-state small {
  font-size: 0.875rem;
  color: var(--gray-500);
}

/* Login Page */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-darker) 100%);
  padding: 2rem;
}

.login-card {
  background: var(--white);
  padding: 3rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 450px;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 1.5rem;
}

.logo i {
  font-size: 2.5rem;
}

.login-header h1 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--gray-900);
}

.login-header p {
  color: var(--gray-600);
  font-size: 1rem;
}

/* Keep backwards compatibility */
.login-box {
  background: var(--white);
  padding: 3rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 450px;
}

.login-box h1 {
  text-align: center;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
  font-size: 1.75rem;
}

.login-box h2 {
  text-align: center;
  color: var(--gray-600);
  font-size: 1rem;
  font-weight: normal;
  margin-bottom: 1.5rem;
}

/* Error Page */
.error-container {
  text-align: center;
  padding: 4rem 2rem;
}

.error-container h1 {
  font-size: 3rem;
  color: var(--gray-900);
  margin-bottom: 1rem;
}

.error-container p {
  font-size: 1.25rem;
  color: var(--gray-600);
  margin-bottom: 2rem;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.location-card {
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
}

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

.location-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
}

.location-card h3 {
  margin-bottom: 0;
  color: var(--gray-900);
  font-size: 1.125rem;
  font-weight: 600;
  flex: 1;
}

.location-id {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: 1rem;
}

.location-id strong {
  color: var(--gray-700);
  margin-right: 0.5rem;
}

.location-address {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.location-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-200);
}

/* Detail Pages */
.detail-grid {
  display: grid;
  gap: 2rem;
}

.detail-section {
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}

.detail-section h2 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--gray-900);
}

.detail-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-200);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-weight: 600;
  color: var(--gray-600);
}

.detail-value {
  color: var(--gray-900);
}

/* Punch colors */
.punch-in {
  border-left: 3px solid var(--success-color);
}

.punch-out {
  border-left: 3px solid var(--danger-color);
}

/* Fingerprint Enrollment */
.enrollment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  .enrollment-grid {
    grid-template-columns: 1fr;
  }
}

.enrollment-section {
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}

.enrollment-section h2 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--gray-900);
}

.fingerprints-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.fingerprint-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--gray-200);
  border-radius: 0.375rem;
}

.fingerprint-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.fingerprint-info strong {
  color: var(--gray-900);
}

.fingerprint-info small {
  color: var(--gray-600);
  font-size: 0.75rem;
}

.enrollment-status {
  margin-top: 1rem;
  padding: 1rem;
  background-color: var(--gray-100);
  border-radius: 0.375rem;
}

.enroll-instructions {
  margin-bottom: 2rem;
}

.enroll-instructions h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--gray-900);
}

.enroll-instructions ol {
  margin-left: 1.5rem;
  color: var(--gray-700);
}

.enroll-instructions li {
  margin-bottom: 0.5rem;
}

.enrollment-code {
  margin-top: 2rem;
  padding: 1.5rem;
  background-color: var(--gray-100);
  border-radius: 0.5rem;
  text-align: center;
}

.code-display {
  font-size: 2rem;
  font-weight: bold;
  font-family: 'Courier New', monospace;
  color: var(--primary-color);
  padding: 1rem;
  background: white;
  border-radius: 0.375rem;
  margin: 1rem 0;
}

.enrollment-progress {
  text-align: center;
  padding: 2rem;
}

.loading-spinner {
  border: 4px solid var(--gray-200);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

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

.text-warning {
  color: var(--warning-color);
  font-weight: 500;
}

.subtitle {
  color: var(--gray-600);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

/* Wizard & Step UI */
.wizard-container {
  max-width: 900px;
  margin: 0 auto;
}

.wizard-steps {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 2rem 0 3rem;
  padding: 0 2rem;
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0.4;
  transition: opacity 0.3s;
}

.wizard-step.active {
  opacity: 1;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--gray-300);
  color: var(--gray-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.wizard-step.active .step-number {
  background-color: var(--primary-color);
  color: white;
}

.step-label {
  font-size: 0.875rem;
  color: var(--gray-600);
  text-align: center;
}

.wizard-step.active .step-label {
  color: var(--primary-color);
  font-weight: 600;
}

/* Form Sections */
.form-section {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  margin-bottom: 2rem;
}

.form-section h2 {
  font-size: 1.25rem;
  color: var(--gray-900);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--gray-200);
}

/* Quick Presets */
.quick-presets {
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  margin-bottom: 2rem;
}

.quick-presets h3 {
  font-size: 1rem;
  color: var(--gray-900);
  margin-bottom: 1rem;
}

.preset-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-preset {
  padding: 0.5rem 1rem;
  background-color: white;
  border: 2px solid var(--gray-300);
  color: var(--gray-700);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.875rem;
}

.btn-preset:hover {
  border-color: var(--primary-color);
  background-color: var(--gray-100);
}

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

/* Date Range Display */
.date-range-display {
  background-color: var(--gray-100);
  padding: 1rem;
  border-radius: 0.375rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.date-range-display p {
  margin: 0;
  color: var(--gray-700);
  font-weight: 500;
}

/* Tooltips */
.tooltip-icon {
  cursor: help;
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-left: 0.25rem;
}

.tooltip-popup {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* Required Fields */
.required {
  color: var(--danger-color);
  margin-left: 0.25rem;
}

/* Input with Button */
.input-with-button {
  display: flex;
  gap: 0.5rem;
}

.input-with-button input {
  flex: 1;
}

/* Form Hints */
.form-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-top: 0.25rem;
  font-style: italic;
}

/* Info Boxes */
.info-box {
  border-left: 4px solid var(--primary-color);
}

.info-box p, .info-box ul {
  margin: 0.5rem 0;
}

.info-box ul {
  margin-left: 1.5rem;
}

.info-box li {
  margin: 0.25rem 0;
}

/* Button Sizes */
.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

/* Select Styling */
select {
  appearance: none;
  background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="%234b5563" d="M6 9L1 4h10z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

/* Hover Effects */
.table tr:hover td {
  background-color: transparent;
}

.table tbody tr:hover {
  background-color: var(--gray-50);
  cursor: pointer;
}

/* Focus States */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Placeholder Styling */
::placeholder {
  color: var(--gray-400);
  opacity: 1;
}

/* Disabled State */
input:disabled, select:disabled, textarea:disabled {
  background-color: var(--gray-100);
  cursor: not-allowed;
  opacity: 0.6;
}

/* Photo Capture */
.photo-capture-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  margin: 1.5rem 0;
}

.photo-preview {
  position: relative;
  width: 100%;
  max-width: 400px;
}

.photo-box {
  width: 100%;
  aspect-ratio: 4/3;
  border: 2px dashed var(--gray-300);
  border-radius: 0.5rem;
  overflow: hidden;
  background-color: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-placeholder {
  text-align: center;
  color: var(--gray-500);
  font-size: 3rem;
}

.photo-placeholder p {
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

#videoPreview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Login Form Specific Styles */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}

.checkbox input {
  width: auto;
}

.form-options a {
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 500;
}

.form-options a:hover {
  text-decoration: underline;
  color: var(--primary-color);
}

.btn-block {
  width: 100%;
}

.divider {
  text-align: center;
  margin: 2rem 0;
  position: relative;
}

.divider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--gray-200);
  z-index: 0;
}

.divider span {
  background: var(--white);
  padding: 0 1rem;
  color: var(--gray-500);
  font-size: 0.875rem;
  position: relative;
  z-index: 1;
}

.login-footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-200);
}

.login-footer a {
  color: var(--gray-600);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.login-footer a:hover {
  color: var(--primary-dark);
}

/* Public Pages Styling */
.hero {
  padding: 6rem 0 4rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-darker) 100%);
  color: var(--white);
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

.hero .btn {
  margin: 0 0.5rem;
}

/* Choice Cards */
.choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.choice-card {
  background: var(--gray-50);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
  display: block;
}

.choice-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  background: var(--white);
}

.choice-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.choice-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.choice-desc {
  font-size: 0.875rem;
  color: var(--gray-600);
}

/* Section Titles */
.section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin: 2rem 0 1rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--gray-200);
}

/* Table Actions */
.actions {
  white-space: nowrap;
  display: flex;
  gap: 0.5rem;
}

/* Code Elements */
code {
  background-color: var(--gray-100);
  color: var(--gray-800);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
  font-size: 0.875rem;
  border: 1px solid var(--gray-200);
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* Responsive Design */
@media (max-width: 768px) {
  .navbar {
    padding: 0.75rem 1rem;
  }

  .navbar-menu {
    gap: 0.5rem;
  }

  .navbar-menu a {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
  }

  .container {
    padding: 1rem;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .table-container {
    overflow-x: scroll;
  }

  .login-container {
    padding: 1rem;
  }

  .login-card,
  .login-box {
    padding: 2rem 1.5rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .choices {
    grid-template-columns: 1fr;
  }
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  top: 5rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  pointer-events: none;
}

.toast {
  min-width: 300px;
  max-width: 500px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  pointer-events: all;
  animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 4px solid var(--gray-300);
  position: relative;
  overflow: hidden;
}

.toast::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--gray-300);
  animation: toastProgress 5s linear;
}

.toast.toast-success {
  border-left-color: var(--success-color);
}

.toast.toast-success::before {
  background: var(--success-color);
}

.toast.toast-error {
  border-left-color: var(--danger-color);
}

.toast.toast-error::before {
  background: var(--danger-color);
}

.toast.toast-warning {
  border-left-color: var(--warning-color);
}

.toast.toast-warning::before {
  background: var(--warning-color);
}

.toast.toast-info {
  border-left-color: var(--info-color);
}

.toast.toast-info::before {
  background: var(--info-color);
}

.toast-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--gray-100);
}

.toast.toast-success .toast-icon {
  background: #d1fae5;
  color: #065f46;
}

.toast.toast-error .toast-icon {
  background: #fee2e2;
  color: #991b1b;
}

.toast.toast-warning .toast-icon {
  background: #fef3c7;
  color: #92400e;
}

.toast.toast-info .toast-icon {
  background: #dbeafe;
  color: #1e40af;
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.25rem;
  font-size: 0.9375rem;
}

.toast-message {
  color: var(--gray-600);
  font-size: 0.875rem;
  line-height: 1.5;
  word-wrap: break-word;
}

.toast-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.toast-actions .btn {
  flex: 1;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

.toast-close {
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: 0;
  font-size: 1.25rem;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  transition: var(--transition);
}

.toast-close:hover {
  background: var(--gray-100);
  color: var(--gray-700);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

@keyframes toastProgress {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

.toast.toast-removing {
  animation: slideOutRight 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@media (max-width: 768px) {
  #toast-container {
    top: 4rem;
    right: 1rem;
    left: 1rem;
  }

  .toast {
    min-width: auto;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .btn,
  .form-actions {
    display: none !important;
  }

  body {
    background: white;
  }

  .container {
    max-width: none;
  }
}

/* Language Switcher */
.language-switcher {
  display: inline-flex;
  gap: 0.375rem;
  background: white;
  padding: 0.375rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--gray-200);
}

.language-btn {
  padding: 0.375rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--gray-600);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: all 0.2s;
  letter-spacing: 0.5px;
}

.language-btn:hover {
  background: var(--gray-50);
  color: var(--gray-800);
  transform: translateY(-1px);
}

.language-btn.active {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.navbar-user .user-welcome {
  color: var(--gray-600);
  font-size: 0.875rem;
}

.navbar-user .logout-link {
  padding: 0.5rem 1rem;
  background-color: var(--danger-color);
  color: white;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
}

.navbar-user .logout-link:hover {
  background-color: #dc2626;
  transform: translateY(-1px);
}

/* User Dropdown Menu */
.user-menu {
  position: relative;
}

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 1.125rem;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.875rem;
  color: var(--gray-700);
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.user-menu-btn:hover {
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
  transform: translateY(-2px);
}

.user-name {
  font-weight: 600;
  color: var(--gray-900);
  letter-spacing: -0.2px;
}

.user-role {
  font-size: 1.125rem;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.dropdown-arrow {
  font-size: 0.75rem;
  color: var(--gray-400);
  transition: transform 0.3s;
  margin-left: 0.25rem;
}

.user-menu-btn:hover .dropdown-arrow {
  color: var(--primary-color);
  transform: translateY(2px);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  min-width: 240px;
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--gray-100);
  padding: 0.5rem;
  z-index: 1000;
  animation: slideDown 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 1rem;
  color: var(--gray-700);
  text-decoration: none;
  transition: all 0.2s;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-lg);
  margin: 0.125rem 0;
}

.dropdown-item:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.08) 100%);
  color: var(--primary-dark);
  transform: translateX(4px);
  padding-left: 1.25rem;
}

.dropdown-item.logout {
  color: var(--danger-color);
}

.dropdown-item.logout:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(220, 38, 38, 0.08) 100%);
  color: #991b1b;
}

.dropdown-icon {
  font-size: 1.125rem;
  width: 1.5rem;
  display: inline-block;
  text-align: center;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.dropdown-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--gray-200) 50%, transparent 100%);
  margin: 0.5rem 0;
}

/* Responsive adjustments for user menu */
@media (max-width: 768px) {
  .user-menu-btn {
    padding: 0.375rem 0.75rem;
  }

  .user-name {
    display: none;
  }

  .user-dropdown {
    right: -1rem;
    min-width: 200px;
  }
}

/* Page Transitions and Animations */
.container {
  animation: fadeIn 0.4s ease-out;
}

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

/* Enhanced Card Styles */
.card {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--gray-100);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.card:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.card-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--gray-100);
  background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
}

/* Enhanced Button Hover Effects */
.btn {
  position: relative;
  overflow: hidden;
}

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

.btn:hover::before {
  width: 300px;
  height: 300px;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Loading Spinner */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* Stat Card Number Animation */
.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.2;
  letter-spacing: -0.5px;
}

/* Quick Action Cards */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.action-card {
  background: white;
  padding: 2rem;
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--gray-100);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.action-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  opacity: 0;
  transition: opacity 0.3s;
}

.action-card:hover::before {
  opacity: 0.05;
}

.action-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.15);
  border-color: var(--primary-color);
}

.action-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.action-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.action-description {
  font-size: 0.875rem;
  color: var(--gray-600);
}

/* Badge Enhancements */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-lg);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.badge-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.badge-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.badge-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.badge-info {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

/* Table Row Hover Effect */
.table tbody tr {
  transition: all 0.2s;
}

.table tbody tr:hover {
  background: linear-gradient(90deg, transparent 0%, rgba(16, 185, 129, 0.03) 50%, transparent 100%);
  transform: scale(1.01);
}

/* Form Input Enhancements */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
  transform: translateY(-1px);
}

/* Micro-interactions */
a, button {
  -webkit-tap-highlight-color: transparent;
}

/* Success Animation */
@keyframes successPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  100% {
    box-shadow: 0 0 0 20px rgba(16, 185, 129, 0);
  }
}

.success-pulse {
  animation: successPulse 1s ease-out;
}

/* Row and Column Layouts */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -0.75rem;
}

.col-12, .col-md-12, .col-lg-12 {
  padding: 0 0.75rem;
  width: 100%;
}

.col-md-6 {
  padding: 0 0.75rem;
  width: 100%;
}

.col-md-4 {
  padding: 0 0.75rem;
  width: 100%;
}

.col-md-3 {
  padding: 0 0.75rem;
  width: 100%;
}

.col-md-2 {
  padding: 0 0.75rem;
  width: 100%;
}

.col-lg-6 {
  padding: 0 0.75rem;
  width: 100%;
}

.col-lg-8 {
  padding: 0 0.75rem;
  width: 100%;
}

.col-lg-10 {
  padding: 0 0.75rem;
  width: 100%;
}

@media (min-width: 768px) {
  .col-md-2 { width: 16.666667%; }
  .col-md-3 { width: 25%; }
  .col-md-4 { width: 33.333333%; }
  .col-md-6 { width: 50%; }
  .col-md-8 { width: 66.666667%; }
  .col-md-12 { width: 100%; }
}

@media (min-width: 1024px) {
  .col-lg-6 { width: 50%; }
  .col-lg-8 { width: 66.666667%; }
  .col-lg-10 { width: 83.333333%; }
  .col-lg-12 { width: 100%; }
}

.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-0 { margin-bottom: 0; }

.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }

.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.justify-content-end { justify-content: flex-end; }
.align-items-center { align-items: center; }
.gap-2 { gap: 0.5rem; }

.text-center { text-align: center; }
.text-muted { color: var(--gray-600); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }
.text-warning { color: var(--warning-color); }
.text-primary { color: var(--primary-color); }
.text-white { color: white; }

.bg-primary { background-color: var(--primary-color) !important; }
.bg-success { background-color: var(--success-color) !important; }
.bg-danger { background-color: var(--danger-color) !important; }
.bg-warning { background-color: var(--warning-color) !important; }
.bg-info { background-color: var(--info-color) !important; }
.bg-secondary { background-color: var(--gray-600) !important; }

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

.p-0 { padding: 0; }
.p-4 { padding: 1.5rem; }

/* Definition Lists in Cards */
dl.row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem 1.5rem;
  margin: 0;
}

dl.row dt {
  font-weight: 600;
  color: var(--gray-700);
  font-size: 0.9375rem;
}

dl.row dd {
  color: var(--gray-900);
  font-size: 0.9375rem;
  margin: 0;
}

/* Alert Messages */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: start;
  gap: 0.75rem;
  border: 2px solid;
  font-size: 0.9375rem;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.alert-success {
  background-color: #ecfdf5;
  color: #047857;
  border-color: #10b981;
}

.alert-danger,
.alert-error {
  background-color: #fef2f2;
  color: #b91c1c;
  border-color: #ef4444;
}

.alert-warning {
  background-color: #fffbeb;
  color: #b45309;
  border-color: #f59e0b;
}

.alert-info {
  background-color: #eff6ff;
  color: #1e40af;
  border-color: #3b82f6;
}

.alert-dismissible {
  padding-right: 3rem;
  position: relative;
}

.btn-close {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.btn-close:hover {
  opacity: 1;
}

/* Fade animations */
.fade {
  transition: opacity 0.3s ease-in-out;
}

.fade.show {
  opacity: 1;
}

/* Button enhancements */
.btn-outline-secondary {
  background-color: white;
  color: var(--gray-700);
  border: 2px solid var(--gray-300);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-outline-secondary:hover {
  background-color: var(--gray-700);
  color: white;
  border-color: var(--gray-700);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-outline-primary {
  background-color: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.15);
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-outline-danger {
  background-color: white;
  color: var(--danger-color);
  border: 2px solid var(--danger-color);
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.15);
}

.btn-outline-danger:hover {
  background-color: var(--danger-color);
  color: white;
  border-color: var(--danger-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Small text */
small, .small {
  font-size: 0.875rem;
  color: var(--gray-600);
}

small.text-muted {
  font-size: 0.8125rem;
  color: var(--gray-500);
}

/* Horizontal rules */
hr {
  border: 0;
  border-top: 2px solid var(--gray-100);
  margin: 1.5rem 0;
}

/* Border utilities */
.border-bottom {
  border-bottom: 2px solid var(--gray-100);
}

.pb-2 {
  padding-bottom: 0.5rem;
}

/* Icon spacing */
i.fa, i.fas {
  margin-right: 0.375rem;
}

/* Pagination */
.pagination {
  display: flex;
  gap: 0.375rem;
  margin: 1.5rem 0;
  list-style: none;
  padding: 0;
}

.page-item {
  display: block;
}

.page-item.active .page-link {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  border-color: var(--primary-color);
}

.page-link {
  display: block;
  padding: 0.5rem 0.875rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  color: var(--gray-700);
  text-decoration: none;
  transition: all 0.2s;
  background-color: white;
  font-weight: 500;
}

.page-link:hover {
  background-color: var(--gray-50);
  border-color: var(--gray-300);
  color: var(--primary-color);
}

.page-item.disabled .page-link {
  opacity: 0.5;
  pointer-events: none;
}


/* Ensure all colored badges have white text */
.badge.bg-primary,
.badge.bg-success,
.badge.bg-danger,
.badge.bg-warning,
.badge.bg-info,
.badge.bg-secondary,
.badge.bg-dark {
  color: white !important;
}

.badge.bg-light {
  color: var(--gray-800) !important;
}

/* Button group styling */
.btn-group {
  display: inline-flex;
  gap: 0;
}

.btn-group .btn {
  border-radius: 0;
  margin-left: -2px;
}

.btn-group .btn:first-child {
  border-top-left-radius: var(--radius-lg);
  border-bottom-left-radius: var(--radius-lg);
  margin-left: 0;
}

.btn-group .btn:last-child {
  border-top-right-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

/* Ensure small badges are also visible */
small.badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.625rem;
}

/* Icon spacing helper */
.me-1 {
  margin-right: 0.375rem;
}

.me-2 {
  margin-right: 0.5rem;
}

.ms-1 {
  margin-left: 0.375rem;
}

.ms-2 {
  margin-left: 0.5rem;
}

