/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f6fa;
  color: #333;
  line-height: 1.6;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Navigation */
.navbar {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.nav-brand h2 {
  margin: 0;
  font-weight: 600;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-info {
  font-weight: 500;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-success {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  color: white;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(17, 153, 142, 0.3);
}

.btn-danger {
  background: linear-gradient(135deg, #fc466b 0%, #3f5efb 100%);
  color: white;
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(252, 70, 107, 0.3);
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #545b62;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.btn-lg {
  padding: 15px 30px;
  font-size: 18px;
  font-weight: 600;
}

.btn-block {
  width: 100%;
}

/* Login Page */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
}

.login-box {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
}

.login-box h2 {
  text-align: center;
  margin-bottom: 30px;
  color: #333;
  font-weight: 600;
}

.login-form {
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #555;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 2px solid #e1e5e9;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

  .login-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    font-size: 12px;
    color: #666;
  }


/* Dashboard */
.dashboard h1 {
  margin-bottom: 30px;
  color: #333;
  font-weight: 600;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.quick-actions .btn {
  padding: 20px;
  font-size: 16px;
  border-radius: 12px;
  text-decoration: none;
}

/* Cards */
.card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

.status-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

.status-card p {
  margin-bottom: 10px;
}

/* Attendance Page */
.attendance-page {
  max-width: 600px;
  margin: 0 auto;
}

.attendance-card {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  text-align: center;
  margin-bottom: 20px;
}

.date-info h3 {
  color: #333;
  margin-bottom: 10px;
}

.date-info p {
  color: #666;
  font-size: 18px;
  font-weight: 500;
}

.location-info {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin: 20px 0;
}

.attendance-status {
  margin: 30px 0;
}

.status-item {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 15px;
  border-left: 4px solid #ddd;
}

.status-item.completed {
  background: #d4edda;
  border-left-color: #28a745;
}

.status-item.pending {
  background: #fff3cd;
  border-left-color: #ffc107;
}

.status-item h4 {
  margin-bottom: 10px;
  color: #333;
}

.attendance-actions {
  margin: 30px 0;
}

.completed-message {
  background: #d4edda;
  padding: 20px;
  border-radius: 8px;
  color: #155724;
  font-weight: 500;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
  margin-top: 20px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.table th,
.table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #e1e5e9;
}

.table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #555;
}

.table tr:hover {
  background: #f8f9fa;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.badge-success {
  background: #d4edda;
  color: #155724;
}

.badge-danger {
  background: #f8d7da;
  color: #721c24;
}

/* Alerts */
.alert {
  padding: 12px 15px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: #667eea;
  margin-bottom: 10px;
}

.stat-label {
  color: #666;
  font-weight: 500;
}

/* Input Validation States */
.form-group input.valid {
  border-color: #28a745 !important;
  box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

.form-group input.invalid {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2);
}

.form-group input.warning {
  border-color: #ffc107 !important;
  box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.2);
}

.form-group small {
  display: block;
  margin-top: 5px;
  font-size: 12px;
}

.form-group .error-message {
  color: #dc3545;
  font-size: 12px;
  margin-top: 5px;
  display: none;
}

.form-group .success-message {
  color: #28a745;
  font-size: 12px;
  margin-top: 5px;
  display: none;
}

/* NIK Input Specific */
input[name="nik"] {
  font-family: "Courier New", monospace;
  letter-spacing: 1px;
  font-weight: 600;
}

input[name="nik"]:focus {
  background-color: #f8f9fa;
}

/* Enhanced Table for NIK Display */
.table td:nth-child(2) {
  font-family: "Courier New", monospace;
  font-weight: 600;
  color: #495057;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .nav-container {
    padding: 0 15px;
    flex-direction: column;
    gap: 10px;
  }

  .nav-menu {
    flex-direction: column;
    gap: 10px;
  }

  .login-box {
    padding: 30px 20px;
  }

  .attendance-card {
    padding: 20px;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .table-responsive {
    font-size: 14px;
  }

  .btn-lg {
    padding: 12px 24px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .nav-brand h2 {
    font-size: 1.5rem;
  }

  .user-info {
    font-size: 14px;
  }

  .login-box {
    margin: 20px;
  }

  .attendance-card {
    margin: 10px;
    padding: 15px;
  }
}
