/* =====================================================
   SI PINTER - Global Styles (Bootstrap 5 Overrides)
   Sistem Presensi Pembinaan Terintegrasi Rutan Garut
   ===================================================== */

/* --- Variables --- */
:root {
  --primary: #0d6efd;
  --secondary: #6c757d;
  --success: #198754;
  --info: #0dcaf0;
  --dark: #212529;
  --sidebar-bg: #1e293b;
  --sidebar-hover: #334155;
  --card-radius: 12px;
  --transition: all 0.3s ease;
}

/* --- Body --- */
body {
  background: #f1f5f9;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
}

/* --- Login Page --- */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
}

.login-card {
  border: none;
  border-radius: var(--card-radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  overflow: hidden;
}

.login-card .card-body {
  padding: 2.5rem;
}

.login-brand {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -1px;
}

.login-brand small {
  font-size: 0.8rem;
  font-weight: 400;
  opacity: 0.7;
}

/* --- Navbar --- */
.navbar-brand {
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
}

.navbar-brand small {
  font-size: 0.65rem;
  font-weight: 400;
  opacity: 0.7;
  display: block;
  line-height: 1;
  margin-top: -2px;
}

.navbar .nav-link {
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  border-radius: 8px;
  margin: 0 2px;
  transition: var(--transition);
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  background: rgba(255,255,255,0.15);
}

.navbar .nav-link i {
  margin-right: 6px;
}

/* --- Dashboard Stats --- */
.stat-card {
  border: none;
  border-radius: var(--card-radius);
  transition: var(--transition);
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}

.stat-card .stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-card .stat-number {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.stat-card .stat-label {
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.8;
}

/* --- Cards --- */
.card {
  border: none;
  border-radius: var(--card-radius);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.card-header {
  background: transparent;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  font-weight: 600;
  padding: 1rem 1.25rem;
}

/* --- Tables --- */
.table-container {
  overflow-x: auto;
}

.table th {
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--secondary);
  border-top: none;
  white-space: nowrap;
}

.table td {
  vertical-align: middle;
  font-size: 0.9rem;
}

.table tbody tr {
  transition: var(--transition);
}

.table tbody tr:hover {
  background: rgba(13, 110, 253, 0.04);
}

/* --- Form Styles --- */
.form-section {
  border: none;
  border-radius: var(--card-radius);
}

.form-section legend {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark);
  width: auto;
  padding: 0 10px;
  margin-bottom: 1rem;
}

.form-section .form-label {
  font-weight: 500;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

/* --- Buttons --- */
.btn {
  border-radius: 8px;
  font-weight: 500;
  padding: 0.5rem 1.25rem;
  transition: var(--transition);
}

.btn-sm {
  border-radius: 6px;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* --- Mode Select Toggle --- */
.mode-select .btn {
  border-radius: 0;
}

.mode-select .btn:first-child {
  border-radius: 8px 0 0 8px;
}

.mode-select .btn:last-child {
  border-radius: 0 8px 8px 0;
}

/* --- Status Badges --- */
.badge-registered {
  background: #d1fae5;
  color: #065f46;
}

.badge-unregistered {
  background: #fef3c7;
  color: #92400e;
}

.badge-checkin {
  background: #dbeafe;
  color: #1e40af;
}

.badge-checkout {
  background: #fce7f3;
  color: #9d174d;
}

/* --- Alerts --- */
.alert-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  min-width: 300px;
}

.alert-container .alert {
  border: none;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* --- Modal --- */
.modal-content {
  border: none;
  border-radius: var(--card-radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.modal-header {
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.modal-footer {
  border-top: 1px solid rgba(0,0,0,0.06);
}

/* --- Select button (manage users) --- */
.select-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  transition: var(--transition);
}

.select-btn:hover {
  color: #0a58ca;
  text-decoration: underline;
}

/* --- Animation --- */
.fade-in {
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .login-card .card-body {
    padding: 1.5rem;
  }
  
  .stat-card .stat-number {
    font-size: 1.5rem;
  }
  
  .navbar-brand {
    font-size: 1.2rem;
  }
}
