:root {
  --primary-color: #4a6fa5;
  --secondary-color: #166088;
  --accent-color: #4fc3f7;
  --text-color: #333;
  --light-color: #f8f9fa;
  --present-color: #4caf50;
  --late-color: #ffc107;
  --absent-color: #f44336;
  --total-color: #2196f3;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
  margin: 0;
  padding: 20px;
  color: var(--text-color);
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 1000px;
  margin-bottom: 30px;
}

.header-container {
  text-align: left;
  flex: 1;
}

.stats-container {
  display: flex;
  gap: 10px;
  width: auto;
}

.stat-card {
  background-color: white;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  transition: transform 0.3s ease;
  height: 60px;
  min-width: 120px;
}

.stat-card:hover {
  transform: translateY(-3px);
}

.stat-icon {
  font-size: 1.2rem;
  margin-right: 10px;
  width: 30px;
  text-align: center;
}

.stat-icon.total {
  color: var(--total-color);
}

.stat-icon.present {
  color: var(--present-color);
}

.stat-icon.late {
  color: var(--late-color);
}

.stat-icon.absent {
  color: var(--absent-color);
}

.stat-content {
  flex: 1;
}

.stat-number {
  font-size: 1.2rem;
  font-weight: bold;
  line-height: 1;
}

.stat-number.total {
  color: var(--total-color);
}

.stat-number.present {
  color: var(--present-color);
}

.stat-number.late {
  color: var(--late-color);
}

.stat-number.absent {
  color: var(--absent-color);
}

.stat-label {
  font-size: 0.7rem;
  color: #666;
  margin-top: 2px;
}

.logo-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-header img {
  height: 60px;
  margin-bottom: 10px;
}

.title {
  color: var(--secondary-color);
  font-size: 1.8rem;
  margin-bottom: 5px;
}

.subtitle {
  color: var(--primary-color);
  font-size: 1rem;
  opacity: 0.8;
}

.tap-device {
  width: 1000px;
  height: 400px;
  background-color: white;
  border-radius: 20px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 30px;
  transition: all 0.3s ease;
}

.tap-device::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 10px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );
}

.tap-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
}

.tap-text {
  font-size: 1.2rem;
  color: var(--text-color);
  text-align: center;
  z-index: 2;
}

.tap-device.active {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.tap-device.active .tap-icon {
  animation: pulse 1s infinite;
}

.tap-device.success {
  background-color: #e8f5e9;
}

.tap-device.success .tap-icon,
.tap-device.success .tap-text {
  color: #2e7d32;
}

.tap-device.error,
.tap-device.invalid-card {
  background-color: #ffebee;
}

.tap-device.error .tap-icon,
.tap-device.error .tap-text,
.tap-device.invalid-card .tap-icon,
.tap-device.invalid-card .tap-text {
  color: #c62828;
}

.tap-device.locked {
  background-color: #fff3e0;
}

.tap-device.locked .tap-icon,
.tap-device.locked .tap-text {
  color: #ef6c00;
}

.status-message {
  margin-bottom: 1  0px;
  padding: 15px 25px;
  border-radius: 50px;
  font-weight: bold;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.status-message.show {
  opacity: 1;
  transform: translateY(0);
}

.status-message.success {
  background-color: #e8f5e9;
  color: #2e7d32;
}

.status-message.error {
  background-color: #ffebee;
  color: #c62828;
}

.status-message.invalid-card {
  background-color: #ffebee;
  color: #c62828;
}

.status-message.locked {
  background-color: #fff3e0;
  color: #ef6c00;
}

.scan-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    0deg,
    rgba(79, 195, 247, 0) 0%,
    rgba(79, 195, 247, 0.3) 50%,
    rgba(79, 195, 247, 0) 100%
  );
  animation: scan 2s infinite;
  opacity: 0;
}

.tap-device.active .scan-animation {
  opacity: 1;
}

@keyframes scan {
  0% {
    transform: translateY(-100%);
  }

  100% {
    transform: translateY(100%);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

.back-button {
  position: absolute;
  top: 20px;
  left: 20px;
  background-color: var(--primary-color);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.back-button:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
}

.attendance-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 10px;
}

.attendance-details .avatar-initial {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background-color: #a7d9f2;
  color: white;
  font-size: 3rem;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
  text-transform: uppercase;
  box-shadow: 0 0 0 3px var(--primary-color);
}

.attendance-details .user-name {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--secondary-color);
  margin-bottom: 5px;
}

.attendance-details .user-position {
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.attendance-details .time-stamp {
  font-size: 1rem;
  color: #666;
}

.register-button-container {
  margin-top: 20px;
  text-align: center;
}

.register-button {
  background-color: #28a745;
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.register-button:hover {
  background-color: #218838;
}

@media (max-width: 1200px) {
  .header-wrapper {
    flex-direction: column;
  }

  .stats-container {
    width: 100%;
    margin-top: 20px;
    justify-content: center;
  }

  .tap-device {
    width: 100%;
    max-width: 800px;
  }
}

@media (max-width: 768px) {
  .header-container {
    padding-left: 0;
    text-align: center;
  }

  .stats-container {
    padding-right: 0;
    flex-wrap: wrap;
    justify-content: center;
  }

  .stat-card {
    min-width: 100px;
  }
}

@media (max-width: 600px) {
  .stat-card {
    height: auto;
    flex-direction: column;
    text-align: center;
    padding: 8px;
  }

  .stat-icon {
    margin-right: 0;
    margin-bottom: 5px;
  }

  .stat-number {
    font-size: 1rem;
  }

  .stat-label {
    font-size: 0.6rem;
  }
}