/* PT Somagede Indonesia - Modern Professional Design */
:root {
  /* Brand Colors */
  --primary: #336699;
  --primary-dark: #234668;
  --primary-light: #509ae4;
  --secondary: #10b981;
  --secondary-dark: #059669;
  --accent: #f59e0b;
  --accent-light: #fbbf24;
  
  /* Neutral Colors */
  --white: #ffffff;
  --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;
  
  /* Status Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* Transitions */
  --transition: all 0.2s ease-in-out;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

/* Layout */
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
  position: relative;
}

.main-content {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

/* Header */
.app-header {
  text-align: center;
  margin-bottom: 3rem;
}

.company-name {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  letter-spacing: -0.025em;
}

.tagline {
  font-size: 1.125rem;
  color: var(--gray-600);
  font-weight: 500;
  margin-bottom: 0;
}

/* Main Card */
.attendance-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--gray-200);
}

.attendance-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
}

/* Greeting Section */
.user-greeting {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-lg);
  color: var(--white);
  text-align: center;
}

.greeting-message {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.last-attendance-info {
  font-size: 0.875rem;
  opacity: 0.9;
}

/* Form Styles */
.attendance-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

/* Special handling for form-group with map */
.form-group:has(.location-map-container) {
  height: auto;
  margin-bottom: 1.5rem;
}

.map-form-group {
  height: auto !important;
  min-height: 200px;
}

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

.form-input, .form-select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: var(--transition);
  background: var(--white);
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

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

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

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

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

.btn-success {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
  color: var(--white);
}

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

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.btn-full {
  width: 100%;
}

/* Status Messages */
.status-message {
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-success {
  background: rgb(16 185 129 / 0.1);
  color: var(--secondary-dark);
  border: 1px solid rgb(16 185 129 / 0.2);
}

.status-error {
  background: rgb(239 68 68 / 0.1);
  color: #dc2626;
  border: 1px solid rgb(239 68 68 / 0.2);
}

.status-warning {
  background: rgb(245 158 11 / 0.1);
  color: #d97706;
  border: 1px solid rgb(245 158 11 / 0.2);
}

/* Weather Info */
.weather-info {
  background: linear-gradient(135deg, var(--info) 0%, var(--primary-light) 100%);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1rem;
  color: var(--white);
  border: none;
}

.weather-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.weather-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
}

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

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

.weather-label {
  font-size: 0.875rem;
  opacity: 0.9;
}

.weather-display {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
}

.weather-icon {
  font-size: 1.5rem;
}

.weather-temp {
  font-size: 1.25rem;
  font-weight: 600;
}

.weather-desc {
  font-size: 0.875rem;
  opacity: 0.9;
  text-transform: capitalize;
}

/* Admin Menu */
.admin-menu-container {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 1000;
}

.admin-menu-button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-menu-button:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-xl);
}

.admin-dropdown {
  position: absolute;
  top: 70px;
  right: 0;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--gray-200);
  min-width: 250px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
}

.admin-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.admin-dropdown button {
  width: 100%;
  padding: 1rem;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--gray-700);
}

.admin-dropdown button:first-child {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.admin-dropdown button:last-child {
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.admin-dropdown button:hover {
  background: var(--gray-50);
  color: var(--primary);
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  padding: 1rem;
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2rem;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: scale(0.9) translateY(-20px);
  transition: var(--transition);
  position: relative;
  margin: auto;
}

.modal.show .modal-content {
  transform: scale(1) translateY(0);
}

.modal-header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 0.5rem;
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gray-100);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.close-btn:hover {
  background: var(--gray-200);
}

/* Chart Styles */
.chart-container {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
}

.chart-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 1rem;
  text-align: center;
}

#attendanceHistoryChart {
  width: 100%;
  height: 200px;
}

/* Location Catalog Styles */
.location-catalog {
  margin-top: 2rem;
}

/* Filter Container Styles */
.filter-container {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
}

.filter-container .form-group {
  margin-bottom: 0;
}

.filter-container .form-label {
  margin-bottom: 0.5rem;
}

.location-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

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

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

.location-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.5rem;
}

.location-image {
  text-align: center;
  margin-bottom: 1rem;
}

.location-emoji {
  font-size: 2.5rem;
  display: block;
}

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

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

.location-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

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

.location-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--gray-500);
}

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

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--gray-200);
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

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

/* Employee List */
.employee-list {
  max-height: 300px;
  overflow-y: auto;
  margin-top: 1rem;
}

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

.employee-item:last-child {
  border-bottom: none;
}

.employee-name {
  font-weight: 500;
  color: var(--gray-800);
}

/* Loading Spinner */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--white);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s ease-in-out infinite;
}

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

/* Location Management Styles */
.locations-list {
  max-height: 300px;
  overflow-y: auto;
}

.location-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  background: var(--white);
}

.location-item-info {
  flex: 1;
}

.location-item-name {
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.25rem;
}

.location-item-address {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: 0.25rem;
}

.location-item-meta {
  font-size: 0.75rem;
  color: var(--gray-500);
}

.grid {
  display: grid;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.gap-3 {
  gap: 0.75rem;
}

.mb-3 {
  margin-bottom: 0.75rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

/* Admin Authentication Styles */
.admin-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.text-sm {
  font-size: 0.875rem;
}

.text-gray-600 {
  color: var(--gray-600);
}

/* Google Maps URL Parser Styles */
.bg-blue-50 {
  background-color: #eff6ff;
}

.border-blue-200 {
  border-color: #bfdbfe;
}

.text-blue-800 {
  color: #1e40af;
}

.font-semibold {
  font-weight: 600;
}

textarea.form-input {
  min-height: 60px;
  font-family: inherit;
  line-height: 1.4;
}

/* Success message styling for admin auth */
.admin-auth-message.success {
  background-color: #d1fae5;
  border-color: #10b981;
  color: #065f46;
}

.admin-auth-message.success .material-icons-round {
  color: #10b981;
}

/* Location Map Styles */
.location-map-container {
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  height: auto; /* Allow container to grow with map height */
  min-height: 200px; /* Match the map height */
}

.location-map-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
}

.location-map {
  height: 200px !important; /* Force height with !important */
  position: relative;
  background: #f8fafc;
}

.map-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #64748b;
  font-size: 0.875rem;
  gap: 0.5rem;
}

.map-placeholder .material-icons-round {
  font-size: 2rem;
  opacity: 0.6;
  animation: pulse 2s infinite;
}

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

/* Leaflet map container */
.leaflet-container {
  height: 100%;
  width: 100%;
  border-radius: 0;
}

.full-height-map {
  height: 200px !important; /* Force height for the map */
}

/* Face Recognition Styles */
.face-recognition-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
}

/* Face Models Loading Overlay */
.face-models-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: var(--radius-lg);
  gap: 1rem;
}

.face-models-loading.hidden {
  display: none;
}

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

.loading-progress {
  width: 200px;
  height: 4px;
  background: var(--gray-200);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 2px;
}

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

.camera-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.camera-frame {
  position: relative;
  width: 400px;
  height: 400px;
  border: 3px solid var(--primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--gray-900);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.camera-frame canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transform: scaleX(-1); /* Mirror effect to match video */
}

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

.face-detection-box {
  width: 250px;
  height: 250px;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  position: relative;
  transition: border-color 0.3s ease;
}

.face-detection-box.detecting {
  border-color: var(--warning);
  animation: pulse-border 2s infinite;
}

.face-detection-box.recognized {
  border-color: var(--success);
  animation: none;
}

.face-detection-corners {
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
}

.face-detection-corners::before,
.face-detection-corners::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid currentColor;
}

.face-detection-corners::before {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
}

.face-detection-corners::after {
  top: 0;
  right: 0;
  border-left: none;
  border-bottom: none;
}

@keyframes pulse-border {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.camera-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--gray-600);
  font-weight: 500;
}

.recognition-results {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--success-light);
  border: 1px solid var(--success);
  border-radius: var(--radius-lg);
  color: var(--success-dark);
}

.result-card.unknown {
  background: var(--warning-light);
  border-color: var(--warning);
  color: var(--warning-dark);
}

.result-avatar {
  width: 48px;
  height: 48px;
  background: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.result-card.unknown .result-avatar {
  background: var(--warning);
}

.result-info {
  flex: 1;
}

.result-name {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
}

.result-confidence {
  font-size: 0.875rem;
  opacity: 0.8;
  margin: 0;
}

.face-recognition-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Face Registration Styles */
.face-registration-section, .registered-faces-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
}

.section-header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 0.5rem;
}

.section-description {
  color: var(--gray-600);
  font-size: 0.9rem;
  margin: 0;
}

.face-registration-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Camera Section */
.camera-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.camera-container {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.camera-frame {
  position: relative;
  width: 100%;
  height: 300px;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.camera-frame video, .camera-frame canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.camera-frame video.active, .camera-frame canvas.active {
  display: block;
}

.camera-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  gap: 1rem;
}

.camera-placeholder.hidden {
  display: none;
}

.camera-icon {
  font-size: 4rem !important;
  color: var(--gray-400);
}

.camera-placeholder h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-700);
  margin: 0;
}

.camera-placeholder p {
  color: var(--gray-500);
  margin: 0;
  font-size: 0.9rem;
}

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

.face-detection-guide {
  position: relative;
  width: 200px;
  height: 200px;
  border: 2px dashed var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(51, 102, 153, 0.1);
}

.guide-corners {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.guide-corners::before,
.guide-corners::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 3px solid var(--primary);
}

.guide-corners::before {
  top: -2px;
  left: -2px;
  border-right: none;
  border-bottom: none;
  border-radius: 50% 0 0 0;
}

.guide-corners::after {
  bottom: -2px;
  right: -2px;
  border-left: none;
  border-top: none;
  border-radius: 0 0 50% 0;
}

.guide-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  text-align: center;
  background: var(--white);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.camera-status-bar {
  padding: 0.75rem 1rem;
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
}

.status-indicator.active {
  color: var(--success);
}

.status-indicator.active .material-icons-round {
  color: var(--success);
}

/* Camera Controls */
.camera-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.camera-controls .btn {
  flex: 1;
  max-width: 150px;
}

/* Capture Status */
.capture-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--info);
  color: var(--white);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
}

.capture-status.success {
  background: var(--success);
}

.capture-status.error {
  background: var(--error);
}

.capture-status.warning {
  background: var(--warning);
}

/* Registered Faces Section */
.section-actions {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.registered-faces-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  min-height: 200px;
}

.loading-placeholder {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 2px dashed var(--gray-300);
  text-align: center;
}

.loading-placeholder .material-icons-round {
  font-size: 3rem;
  color: var(--gray-400);
  margin-bottom: 1rem;
}

.loading-placeholder p {
  color: var(--gray-500);
  margin: 0;
}

.registered-face-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
}

.registered-face-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.registered-face-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.registered-face-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.5rem;
}

.registered-face-details h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0 0 0.25rem 0;
}

.registered-face-details p {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin: 0;
}

.registered-face-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

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

.btn-error:hover {
  background: #dc2626;
  transform: scale(1.05);
}

/* Pulse animation for save button */
@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.pulse {
  animation: pulse 2s infinite;
}

/* Responsive Face Recognition */
@media (max-width: 640px) {
  .camera-frame {
    width: 300px;
    height: 300px;
  }
  
  .face-detection-box {
    width: 200px;
    height: 200px;
  }
  
  .face-recognition-actions {
    flex-direction: column;
  }
  
  .face-registration-actions {
    flex-direction: column;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .app-container {
    padding: 1rem;
  }
  
  .attendance-card {
    padding: 1.5rem;
  }
  
  .company-name {
    font-size: 2rem;
  }
  
  .admin-menu-container {
    top: 1rem;
    right: 1rem;
  }
  
  .admin-menu-button {
    width: 50px;
    height: 50px;
  }
  
  .modal-content {
    padding: 1.5rem;
  }
  
  .location-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .app-container {
    padding: 0.5rem;
  }
  
  .attendance-card {
    padding: 1rem;
  }
  
  .company-name {
    font-size: 1.75rem;
  }
  
  .btn {
    padding: 0.75rem 1rem;
  }
  
  .user-greeting {
    padding: 1rem;
  }
  
  .greeting-message {
    font-size: 1.125rem;
  }
}

/* Utility Classes */
.hidden { display: none !important; }
.show { display: block !important; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
