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

:root {
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --secondary-color: #64748b;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --info-color: #06b6d4;
  --dark-color: #0f172a;
  --light-color: #f8fafc;
  --border-color: #e2e8f0;
  --sidebar-width: 280px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

body {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.25), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(14, 165, 233, 0.2), transparent 50%),
    radial-gradient(circle at 40% 0%, rgba(168, 92, 246, 0.15), transparent 40%),
    linear-gradient(135deg, #f0e7ff 0%, #e0f2fe 50%, #f0fdf4 100%);
  background-attachment: fixed;
  color: var(--dark-color);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(ellipse at 25% 25%, rgba(251, 191, 36, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 75% 75%, rgba(59, 130, 246, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
}

html {
  scroll-behavior: smooth;
}

#appPage {
  min-height: 100vh;
  background: transparent;
  position: relative;
  z-index: 2;
}

/* Selection color */
::selection {
  background-color: var(--primary-color);
  color: white;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

/* Login Page */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

/* Animated background shapes */
.login-container::before,
.login-container::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  animation: float 20s infinite ease-in-out;
}

.login-container::before {
  width: 600px;
  height: 600px;
  top: -300px;
  left: -300px;
  animation-delay: 0s;
}

.login-container::after {
  width: 400px;
  height: 400px;
  bottom: -200px;
  right: -200px;
  animation-delay: 5s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(10deg); }
}

.login-box {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 50px;
  border-radius: 20px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.15);
  width: 100%;
  max-width: 450px;
  position: relative;
  z-index: 1;
  animation: slideUp 0.6s ease-out;
}

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

.login-header {
  text-align: center;
  margin-bottom: 40px;
}

.login-header i {
  font-size: 80px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 15px;
  display: inline-block;
  animation: pulse 2s infinite;
}

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

.login-header h1 {
  font-size: 28px;
  margin-bottom: 8px;
  color: var(--dark-color);
  font-weight: 700;
  letter-spacing: -0.5px;
}

.login-header p {
  color: var(--secondary-color);
  font-size: 15px;
  font-weight: 500;
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--dark-color);
}

.form-group label i {
  margin-right: 5px;
  color: var(--primary-color);
}

.form-control {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  font-size: 15px;
  transition: var(--transition);
  background-color: #f8fafc;
  font-family: inherit;
}

.form-control:hover {
  border-color: #cbd5e1;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
  background-color: white;
  transform: translateY(-2px);
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

/* Button Styles */
.btn {
  padding: 14px 24px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  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;
}

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

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

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

.btn-success:hover:not(:disabled) {
  background-color: #059669;
}

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

.btn-danger:hover:not(:disabled) {
  background-color: #dc2626;
}

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

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

.btn-block {
  width: 100%;
  justify-content: center;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-lg {
  padding: 15px 30px;
  font-size: 16px;
}

/* Alert Styles */
.alert {
  padding: 12px;
  border-radius: 5px;
  margin-top: 15px;
}

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

.alert-success {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.alert-warning {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

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

/* Navbar */
.navbar {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.95), rgba(55, 48, 163, 0.85));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 20px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 20px 60px rgba(30, 27, 75, 0.35),
              0 0 1px rgba(255, 255, 255, 0.1) inset;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(168, 175, 255, 0.25);
  position: relative;
  overflow: hidden;
}

.navbar::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.15), transparent);
  pointer-events: none;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, #a78bfa, #60a5fa, #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  position: relative;
  z-index: 2;
}

.navbar-brand i {
  font-size: 32px;
  animation: rotate 3s linear infinite;
}

@keyframes rotate {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(15deg) scale(1.1); }
}

.navbar-menu {
  display: flex;
  flex: 1;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 2;
}

.navbar-menu-list {
  display: flex;
  flex-direction: row-reverse;
  list-style: none;
  gap: 8px;
  align-items: center;
}

.navbar-menu-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  border-radius: 14px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-weight: 600;
  font-size: 14px;
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-menu-link::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(168, 175, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
  z-index: -1;
}

.navbar-menu-link:hover::before {
  width: 300px;
  height: 300px;
}

.navbar-menu-link:hover {
  background: rgba(168, 175, 255, 0.25);
  color: #ffffff;
  border-color: rgba(168, 175, 255, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.25);
}

.navbar-menu-link.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.4),
              0 0 1px rgba(255, 255, 255, 0.2) inset;
  border-color: rgba(255, 255, 255, 0.3);
  position: relative;
}

.navbar-menu-link.active::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  border-radius: 2px;
}

.navbar-menu-link i {
  font-size: 18px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.navbar-menu-link:hover i {
  transform: scale(1.15);
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
  z-index: 2;
}

.admin-clock-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 170px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(168, 175, 255, 0.15);
  border: 1px solid rgba(168, 175, 255, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.admin-clock {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.08em;
  line-height: 1.2;
  background: linear-gradient(135deg, #a78bfa, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.admin-date {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.2;
  font-weight: 500;
}

.navbar-user span {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(168, 175, 255, 0.15);
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(168, 175, 255, 0.3);
  backdrop-filter: blur(10px);
  font-size: 14px;
  transition: all 0.3s ease;
}

.navbar-user span:hover {
  background: rgba(168, 175, 255, 0.25);
  border-color: rgba(168, 175, 255, 0.5);
}

/* App Container */
.app-container {
  min-height: calc(100vh - 140px);
  padding: 24px;
  max-width: 1500px;
  margin: 0 auto;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.sidebar {
  width: 260px;
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(76, 65, 146, 0.08);
  padding: 20px 14px;
  position: sticky;
  top: 110px;
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-menu li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  color: #3b3a5f;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.25s ease;
  background: rgba(255, 255, 255, 0.15);
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(139, 92, 246, 0.12));
  color: #1f2937;
  box-shadow: 0 8px 18px rgba(99, 102, 241, 0.12);
}

/* Main Content */
.main-content {
  flex: 1;
  width: 100%;
  padding: 30px 28px 40px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 26px;
  box-shadow: 0 18px 40px rgba(76, 65, 146, 0.08);
}

.main-content > h2 {
  margin-bottom: 24px;
  font-size: 2rem;
  letter-spacing: -0.03em;
  color: #1f2937;
}

.card {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 20px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(248, 250, 252, 0.7);
  border-radius: 20px 20px 0 0;
}

.card-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
}

.card-body {
  padding: 24px 22px 22px;
}

.search-container {
  position: relative;
}

.search-container input {
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
}

#usersList {
  min-height: 120px;
}

.user-card {
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(248,250,252,0.92));
}

.user-card:hover {
  box-shadow: 0 12px 25px rgba(99, 102, 241, 0.15);
}

.registration-grid {
  margin-top: 28px;
}

@media (max-width: 960px) {
  .app-container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    position: static;
  }

  .sidebar-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .main-content {
    padding: 22px 18px 28px;
  }
}

.content-section {
  display: none;
}

.content-section.active {
  display: block;
}

.content-section h2 {
  margin-bottom: 20px;
  color: var(--dark-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.stat-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.95));
  padding: 28px 24px;
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1),
              0 0 1px rgba(255, 255, 255, 0.5) inset;
  display: flex;
  gap: 24px;
  align-items: center;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(168, 175, 255, 0.2);
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92)),
              linear-gradient(45deg, rgba(99, 102, 241, 0.05), transparent 50%);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stat-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 24px 50px rgba(99, 102, 241, 0.2),
              0 0 1px rgba(255, 255, 255, 0.8) inset;
  border-color: rgba(99, 102, 241, 0.35);
}

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

@keyframes cardFloat {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.02); }
  100% { transform: translateY(-12px) scale(1.02); }
}

.stat-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: white;
  position: relative;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15),
              0 0 1px rgba(255, 255, 255, 0.3) inset;
  flex-shrink: 0;
}

.stat-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: inherit;
  opacity: 0.25;
  transform: scale(1.2);
  animation: pulse-icon 2.5s ease-in-out infinite;
}

@keyframes pulse-icon {
  0%, 100% { opacity: 0.25; transform: scale(1.2); }
  50% { opacity: 0; transform: scale(1.5); }
}

.stat-icon.bg-primary { 
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.stat-icon.bg-success { 
  background: linear-gradient(135deg, #34d399, #10b981);
}

.stat-icon.bg-danger { 
  background: linear-gradient(135deg, #f87171, #ef4444);
}

.stat-icon.bg-warning { 
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.stat-icon.bg-info { 
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
}

.stat-info h3 {
  font-size: 36px;
  margin-bottom: 6px;
  color: var(--dark-color);
  font-weight: 800;
  letter-spacing: -0.5px;
}

.stat-info p {
  color: var(--secondary-color);
  font-size: 14px;
  font-weight: 500;
}

/* Card */
.card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.92));
  border-radius: 28px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.1),
              0 0 1px rgba(255, 255, 255, 0.5) inset;
  margin-bottom: 30px;
  border: 1px solid rgba(168, 175, 255, 0.2);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card:hover {
  box-shadow: 0 28px 60px rgba(99, 102, 241, 0.15),
              0 0 1px rgba(255, 255, 255, 0.8) inset;
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.3);
}

.card-header {
  padding: 28px 32px;
  border-bottom: 1px solid rgba(168, 175, 255, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.9), rgba(237, 242, 255, 0.85));
}

.card-header h3 {
  font-size: 22px;
  color: var(--dark-color);
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.card-header h3 i {
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card-body {
  padding: 30px;
}

.report-panel {
  background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(237,244,255,0.9));
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.08);
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.report-header h4 {
  margin: 0;
  font-size: 1.4rem;
  color: var(--dark-color);
}

.report-summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-color);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.82rem;
}

.report-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 18px;
  align-items: end;
  min-height: 220px;
  padding: 20px 10px 12px;
  background: linear-gradient(180deg, rgba(248,250,252,0.8), rgba(255,255,255,0.4));
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.chart-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: end;
  min-height: 180px;
  gap: 12px;
}

.chart-bar-wrap {
  width: 100%;
  max-width: 80px;
  height: 150px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 8px 0 0;
}

.chart-bar {
  width: 100%;
  height: var(--bar-height);
  min-height: 20px;
  border-radius: 18px 18px 12px 12px;
  background: linear-gradient(180deg, rgba(99,104,241,0.9), rgba(14,165,233,0.8));
  position: relative;
  box-shadow: 0 12px 24px rgba(99, 102, 241, 0.2);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
  animation: barRise 0.7s ease forwards;
}

.chart-bar:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 18px 28px rgba(59, 130, 246, 0.28);
  filter: brightness(1.08);
}

.chart-bar.hadir {
  background: linear-gradient(180deg, #34d399, #10b981);
}

.chart-bar.telat {
  background: linear-gradient(180deg, #fbbf24, #f59e0b);
}

.chart-bar.alpha {
  background: linear-gradient(180deg, #f87171, #ef4444);
}

.chart-bar.izin {
  background: linear-gradient(180deg, #60a5fa, #3b82f6);
}

.chart-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.32), transparent 40%);
  border-radius: inherit;
}

.chart-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--dark-color);
}

.chart-label {
  font-size: 0.76rem;
  color: var(--secondary-color);
  text-transform: capitalize;
  text-align: center;
}

@keyframes barRise {
  from {
    transform: scaleY(0.2);
    opacity: 0.2;
  }
  to {
    transform: scaleY(1);
    opacity: 1;
  }
}

/* Table */
.table-responsive {
  overflow-x: auto;
}

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

.table th, .table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.table th {
  background-color: var(--light-color);
  font-weight: 600;
  color: var(--dark-color);
}

.table tbody tr:hover {
  background-color: var(--light-color);
}

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

/* Badge */
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.badge-success { background-color: #d1fae5; color: #065f46; }
.badge-danger { background-color: #fee2e2; color: #991b1b; }
.badge-warning { background-color: #fef3c7; color: #92400e; }
.badge-info { background-color: #dbeafe; color: #1e40af; }
.badge-secondary { background-color: #f1f5f9; color: #475569; }

/* Absensi Container */
.absensi-container {
  text-align: center;
}

.absensi-info {
  margin-bottom: 30px;
}

.time-display {
  font-size: 48px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.date-display {
  font-size: 18px;
  color: var(--secondary-color);
}

.absensi-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 20px;
}

/* Today Status */
.today-status {
  display: flex;
  justify-content: space-around;
  padding: 20px;
}

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

.status-item .icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.status-item .time {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 5px;
}

.status-item .label {
  color: var(--secondary-color);
}

/* Loading */
.loading {
  text-align: center;
  color: var(--secondary-color);
  padding: 20px;
}

/* Utilities */
.mt-3 { margin-top: 1.5rem; }
.mb-3 { margin-bottom: 1.5rem; }
.row { display: flex; gap: 20px; flex-wrap: wrap; }
.col-md-6 { flex: 1; min-width: 300px; }

/* Filter Container */
.filter-container {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-container .form-control {
  flex: 1;
  min-width: 150px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  overflow-y: auto;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background-color: white;
  border-radius: 10px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.close {
  cursor: pointer;
  font-size: 28px;
  font-weight: bold;
  color: var(--secondary-color);
}

.close:hover {
  color: var(--dark-color);
}

/* Leave Card */
.leave-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
}

.leave-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.leave-card-type {
  font-weight: 600;
  text-transform: capitalize;
}

.leave-card-body {
  font-size: 14px;
  color: var(--secondary-color);
}

/* Responsive */
@media (max-width: 768px) {
.navbar {
    flex-direction: column;
  }

  .navbar-menu-list {
    flex-direction: column;
  }

  .navbar-menu-link span {
    display: inline;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .absensi-actions {
    flex-direction: column;
  }
  
  .time-display {
    font-size: 36px;
  }
  
  .filter-container {
    flex-direction: column;
  }
  
  .filter-container .form-control {
    width: 100%;
  }
}

/* ============= RFID & FACE REGISTRATION STYLES ============= */

/* Users Grid */
.users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.user-card {
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.user-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.user-card-avatar {
  font-size: 60px;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.user-card-info h4 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--dark-color);
}

.user-nip {
  color: var(--secondary-color);
  font-size: 13px;
  margin: 0 0 5px 0;
}

.user-dept {
  color: var(--info-color);
  font-size: 12px;
  margin: 0;
}

.user-card-badges {
  position: absolute;
  top: 15px;
  right: 15px;
  display: flex;
  gap: 5px;
}

.mini-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

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

.search-container i {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--secondary-color);
}

.search-container input {
  padding-right: 45px;
}

/* User Info Card */
.user-info-card {
  margin-bottom: 30px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
}

.user-info-header {
  display: flex;
  align-items: center;
  gap: 25px;
}

.user-avatar {
  font-size: 80px;
  opacity: 0.9;
}

.user-details {
  flex: 1;
}

.user-details h3 {
  margin: 0 0 10px 0;
  font-size: 24px;
  font-weight: 700;
}

.user-details p {
  margin: 5px 0;
  opacity: 0.95;
  font-size: 14px;
}

/* Registration Grid */
.registration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

/* RFID Card */
.rfid-card .card-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
}

.rfid-visual {
  text-align: center;
  padding: 40px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 16px;
  margin-bottom: 30px;
  position: relative;
  overflow: hidden;
}

.rfid-icon {
  font-size: 100px;
  color: var(--primary-color);
  position: relative;
  display: inline-block;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.rfid-waves {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
}

.rfid-waves span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  opacity: 0;
  animation: ripple 3s infinite;
}

.rfid-waves span:nth-child(2) {
  animation-delay: 1s;
}

.rfid-waves span:nth-child(3) {
  animation-delay: 2s;
}

@keyframes ripple {
  0% {
    width: 0;
    height: 0;
    opacity: 0.8;
  }
  100% {
    width: 200%;
    height: 200%;
    opacity: 0;
  }
}

.rfid-instruction {
  margin-top: 20px;
  font-size: 16px;
  font-weight: 600;
  color: var(--secondary-color);
}

.form-hint {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--secondary-color);
}

.current-rfid {
  margin: 20px 0;
}

.info-box {
  background: #e0f2fe;
  border-left: 4px solid var(--info-color);
  padding: 15px 20px;
  border-radius: 8px;
  display: flex;
  gap: 15px;
  align-items: start;
}

.info-box i {
  font-size: 24px;
  color: var(--info-color);
  margin-top: 3px;
}

.info-box strong {
  display: block;
  margin-bottom: 5px;
  color: var(--dark-color);
}

.info-box p {
  margin: 0;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: var(--dark-color);
}

.info-box small {
  color: var(--secondary-color);
  font-size: 12px;
}

/* Face Card */
.face-card .card-header {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
}

.face-capture {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto 20px;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4/3;
}

.face-capture video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.face-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.face-guide {
  width: 280px;
  height: 350px;
  border: 4px solid rgba(16, 185, 129, 0.8);
  border-radius: 50%;
  box-shadow: 
    0 0 0 9999px rgba(0, 0, 0, 0.4),
    inset 0 0 20px rgba(16, 185, 129, 0.3);
  animation: pulse-guide 2s infinite;
}

@keyframes pulse-guide {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.02); opacity: 1; }
}

/* Captured Photos Grid */
.face-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.captured-photo {
  position: relative;
  aspect-ratio: 3/4;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 3px solid var(--success-color);
}

.captured-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.delete-photo-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(239, 68, 68, 0.9);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  opacity: 0;
}

.captured-photo:hover .delete-photo-btn {
  opacity: 1;
}

.delete-photo-btn:hover {
  background: var(--danger-color);
  transform: scale(1.1);
}

.photo-number {
  position: absolute;
  bottom: 8px;
  left: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--success-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

/* Progress Bar */
.progress-bar {
  width: 100%;
  height: 12px;
  background: var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--success-color), var(--info-color));
  transition: width 0.3s ease;
  width: 0;
}

/* Face Tips */
.face-tips {
  background: #fef3c7;
  border-left: 4px solid var(--warning-color);
  padding: 20px;
  border-radius: 8px;
  margin-top: 20px;
}

.face-tips p {
  margin: 0 0 10px 0;
  color: var(--dark-color);
  font-weight: 600;
}

.face-tips ul {
  margin: 0;
  padding-left: 20px;
}

.face-tips li {
  margin: 8px 0;
  color: #92400e;
  font-size: 14px;
}

/* Button Group */
.button-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.button-group .btn {
  flex: 1;
  min-width: 150px;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-spinner {
  text-align: center;
  color: white;
}

.loading-spinner i {
  font-size: 60px;
  margin-bottom: 20px;
  display: block;
}

.loading-spinner p {
  font-size: 18px;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 1024px) {
  .registration-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .users-grid {
    grid-template-columns: 1fr;
  }
  
  .user-info-header {
    flex-direction: column;
    text-align: center;
  }
  
  .button-group {
    flex-direction: column;
  }
  
  .button-group .btn {
    width: 100%;
  }
}


/* ========================================
   NOTIFICATION TOAST
   ======================================== */

.notification-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  min-width: 300px;
  max-width: 500px;
  padding: 16px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 9999;
  transform: translateX(400px);
  opacity: 0;
  transition: all 0.3s ease;
}

.notification-toast.show {
  transform: translateX(0);
  opacity: 1;
}

.notification-toast i {
  font-size: 20px;
  flex-shrink: 0;
}

.notification-toast span {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

.notification-success {
  border-left: 4px solid #10b981;
}

.notification-success i {
  color: #10b981;
}

.notification-error {
  border-left: 4px solid #ef4444;
}

.notification-error i {
  color: #ef4444;
}

.notification-warning {
  border-left: 4px solid #f59e0b;
}

.notification-warning i {
  color: #f59e0b;
}

.notification-info {
  border-left: 4px solid #3b82f6;
}

.notification-info i {
  color: #3b82f6;
}

/* Mobile responsive */
@media (max-width: 576px) {
  .notification-toast {
    left: 20px;
    right: 20px;
    min-width: auto;
  }
}
