/* ========================================================
 * BRI Mobile Attendance Application - Mobile & PWA Layout
 * ======================================================== */

/* Main Content Wrapper */
.main-content {
  flex: 1;
  padding: 16px;
  padding-bottom: 90px; /* Space for bottom nav bar */
  overflow-y: auto;
}

/* User Welcome Banner Header */
.welcome-banner {
  background: linear-gradient(135deg, var(--bri-navy) 0%, var(--bri-blue) 100%);
  color: white;
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.welcome-banner::after {
  content: '';
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 120px;
  height: 120px;
  background: rgba(243, 112, 33, 0.15);
  border-radius: 50%;
  pointer-events: none;
}

.user-profile-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-avatar-lg {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.4);
  object-fit: cover;
}

.user-info-text .name {
  font-size: 16px;
  font-weight: 700;
}

.user-info-text .sub {
  font-size: 12px;
  opacity: 0.85;
}

/* Stats Grid Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 14px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.stat-icon.hadir { background: var(--status-hadir-bg); color: var(--status-hadir); }
.stat-icon.terlambat { background: var(--status-terlambat-bg); color: var(--status-terlambat); }
.stat-icon.izin { background: var(--status-izin-bg); color: var(--status-izin); }
.stat-icon.durasi { background: var(--bri-blue-soft); color: var(--bri-blue); }

.stat-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-dark);
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
}

/* Camera & Map View (Absensi Screen) */
.map-container {
  width: 100%;
  height: 200px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  margin-bottom: 16px;
}

.camera-preview-container {
  width: 100%;
  height: 260px;
  background: #000;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1); /* Mirror view for selfie */
}

.camera-canvas {
  display: none;
}

.camera-overlay-frame {
  position: absolute;
  width: 170px;
  height: 220px;
  border: 2px dashed rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  pointer-events: none;
}

/* Bottom Navigation Bar (Mobile PWA) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 68px;
  background: #FFFFFF;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 1000;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  width: 20%;
  height: 100%;
  transition: color 0.2s ease;
}

.nav-item svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  transition: transform 0.2s ease;
}

.nav-item.active {
  color: var(--bri-blue);
}

.nav-item.active svg {
  transform: translateY(-2px);
}

/* Big Action Check-In/Check-Out Button */
.nav-item-center {
  position: relative;
  top: -16px;
}

.btn-checkin-big {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bri-orange) 0%, #D95D12 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(243, 112, 33, 0.4);
  border: 4px solid white;
}
