/* =========================================================
   SiPoin - Design System CSS (Enhanced)
   ========================================================= */

:root {
  --primary: #2563EB;
  --primary-light: #3B82F6;
  --primary-dark: #1D4ED8;
  --primary-bg: #EFF6FF;
  --primary-gradient: linear-gradient(135deg, #2563EB, #1D4ED8);
  --primary-gradient-light: linear-gradient(135deg, #3B82F6, #2563EB);
  --success: #059669;
  --success-bg: #D1FAE5;
  --warning: #D97706;
  --warning-bg: #FEF3C7;
  --danger: #DC2626;
  --danger-bg: #FEE2E2;
  --orange: #EA580C;
  --orange-bg: #FFEDD5;
  --bg-page: #F0F2F5;
  --bg-card: #FFFFFF;
  --border-soft: #E5E7EB;
  --border-light: #F3F4F6;
  --text-main: #111827;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --sidebar-width: 260px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 40px rgba(0,0,0,0.1), 0 8px 20px rgba(0,0,0,0.06);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg-page);
  color: var(--text-main);
  font-size: 0.925rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; }

/* ---------------- Scrollbar ---------------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9CA3AF; }

/* ---------------- Layout ---------------- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-card);
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  z-index: 1030;
  transition: transform var(--transition-slow);
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--border-soft);
}

.sidebar-logo-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}

.sidebar-brand-text strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.sidebar-brand-text span {
  font-size: 0.7rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.sidebar-menu {
  flex: 1;
  padding: 14px 12px;
  overflow-y: auto;
}

.sidebar-menu .nav-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 16px 16px 6px;
}

.sidebar-menu .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.875rem;
  margin-bottom: 2px;
  transition: all var(--transition);
  position: relative;
}

.sidebar-menu .nav-link i {
  width: 20px;
  text-align: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.sidebar-menu .nav-link:hover {
  background: #F3F4F6;
  color: var(--text-main);
}

.sidebar-menu .nav-link.active {
  background: var(--primary-bg);
  color: var(--primary);
  font-weight: 600;
}

.sidebar-menu .nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}

.sidebar-footer {
  padding: 14px 12px;
  border-top: 1px solid var(--border-soft);
}

.sidebar-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  margin-bottom: 4px;
}

.sidebar-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
}

.sidebar-user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.sidebar-user-role {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.sidebar-footer .nav-link {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.85rem;
  transition: all var(--transition);
}

.sidebar-footer .nav-link:hover {
  background: #FEF2F2;
  color: var(--danger);
}

.main-content {
  margin-left: var(--sidebar-width);
  padding: 28px 32px;
  min-height: 100vh;
  transition: margin-left var(--transition-slow);
}

.sidebar-toggle-btn {
  display: none;
  border: none;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.sidebar-toggle-btn:hover {
  background: #F3F4F6;
  color: var(--text-main);
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.show { transform: translateX(0); }
  .main-content { margin-left: 0; padding: 20px 16px; }
  .sidebar-toggle-btn { display: inline-flex; }
}

/* ---------------- Page Header ---------------- */
.page-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.page-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------------- Card umum ---------------- */
.card-sp {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  transition: box-shadow var(--transition);
}

.card-sp:hover {
  box-shadow: var(--shadow-md);
}

/* ---------------- Buttons ---------------- */
.btn-primary-sp {
  background: var(--primary-gradient);
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: #fff;
  padding: 0.5rem 1.25rem;
  transition: all var(--transition);
  box-shadow: 0 2px 6px rgba(37,99,235,0.25);
}

.btn-primary-sp:hover {
  background: var(--primary-gradient-light);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37,99,235,0.35);
  transform: translateY(-1px);
}

.btn-primary-sp:active {
  transform: translateY(0);
}

.btn-outline-sp {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  color: var(--text-secondary);
  background: #fff;
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: all var(--transition);
}

.btn-outline-sp:hover {
  background: #F9FAFB;
  border-color: #D1D5DB;
  color: var(--text-main);
}

.btn-outline-sp.aktif {
  background: var(--primary-bg);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}

.btn-danger-sp {
  background: linear-gradient(135deg, #DC2626, #B91C1C);
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: #fff;
  padding: 0.5rem 1.25rem;
  transition: all var(--transition);
  box-shadow: 0 2px 6px rgba(220,38,38,0.25);
}

.btn-danger-sp:hover {
  color: #fff;
  box-shadow: 0 4px 12px rgba(220,38,38,0.35);
  transform: translateY(-1px);
}

.link-lihat-semua {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all var(--transition);
}

.link-lihat-semua:hover {
  color: var(--primary-dark);
  gap: 6px;
}

/* ---------------- Stat cards (Dashboard) ---------------- */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 22px 24px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.stat-card[data-color="blue"]::after { background: var(--primary-gradient); }
.stat-card[data-color="yellow"]::after { background: linear-gradient(135deg, #F59E0B, #D97706); }
.stat-card[data-color="green"]::after { background: linear-gradient(135deg, #10B981, #059669); }
.stat-card[data-color="red"]::after { background: linear-gradient(135deg, #EF4444, #DC2626); }

.stat-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.stat-card-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
}

.stat-icon-blue {
  background: linear-gradient(135deg, #DBEAFE, #BFDBFE);
  color: #2563EB;
}
.stat-icon-yellow {
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  color: #D97706;
}
.stat-icon-green {
  background: linear-gradient(135deg, #D1FAE5, #A7F3D0);
  color: #059669;
}
.stat-icon-red {
  background: linear-gradient(135deg, #FEE2E2, #FECACA);
  color: #DC2626;
}

.stat-card-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-card-note {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* ---------------- List Riwayat (detail modal) ---------------- */
.list-card-riwayat .list-item:last-child { border-bottom: none; }

/* ---------------- List Card (dashboard) ---------------- */
.list-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.list-card-header h6 {
  font-weight: 700;
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-main);
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
}

.list-item:hover {
  background: #FAFBFC;
  margin: 0 -8px;
  padding: 14px 8px;
  border-radius: var(--radius-sm);
}

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

.list-rank {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #F3F4F6;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.list-rank.top-1 { background: linear-gradient(135deg, #FCD34D, #F59E0B); color: #fff; }
.list-rank.top-2 { background: linear-gradient(135deg, #E5E7EB, #D1D5DB); color: #374151; }
.list-rank.top-3 { background: linear-gradient(135deg, #FCA5A5, #EF4444); color: #fff; }

.list-item-name { font-weight: 600; color: var(--text-main); font-size: 0.9rem; }
.list-item-sub { font-size: 0.75rem; color: var(--text-secondary); }

.poin-tambahan {
  color: var(--danger);
  font-weight: 700;
  font-size: 0.95rem;
}

/* ---------------- Badge Pill ---------------- */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  flex-shrink: 0;
}

.badge-baik       { background: var(--success-bg); color: var(--success); }
.badge-peringatan { background: var(--warning-bg); color: var(--warning); }
.badge-pembinaan  { background: var(--orange-bg); color: var(--orange); }
.badge-skorsing   { background: var(--danger-bg); color: var(--danger); }
.badge-ringan     { background: #DBEAFE; color: #2563EB; }
.badge-sedang     { background: #FEF3C7; color: #D97706; }
.badge-berat      { background: #FEE2E2; color: #DC2626; }

.badge-role-admin { background: #EDE9FE; color: #7C3AED; }
.badge-role-wali_kelas { background: #DBEAFE; color: #2563EB; }
.badge-role-murid { background: var(--success-bg); color: var(--success); }

/* ---------------- Tabel ---------------- */
.table-sp {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table-sp thead th {
  background: #F9FAFB;
  border-bottom: 2px solid var(--border-soft);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 12px 14px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.table-sp thead th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.table-sp thead th:last-child { border-radius: 0 var(--radius-sm) 0 0; }

.table-sp tbody td {
  border-bottom: 1px solid var(--border-light);
  padding: 14px;
  vertical-align: middle;
  font-size: 0.9rem;
}

.table-sp tbody tr {
  transition: background var(--transition);
}

.table-sp tbody tr:hover { background: #F9FAFB; }

.icon-action {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1rem;
  padding: 6px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  line-height: 1;
}

.icon-action:hover { background: var(--border-light); }

.icon-action.edit:hover {
  background: var(--primary-bg);
  color: var(--primary);
}

.icon-action.delete:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.search-box-wrap {
  position: relative;
  flex-grow: 1;
  max-width: 320px;
}

.search-box-wrap i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.search-box-wrap input {
  padding-left: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  width: 100%;
  font-size: 0.875rem;
  height: 42px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-box-wrap input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
  outline: none;
}

.filter-select-sp {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  min-width: 150px;
  height: 42px;
  font-size: 0.875rem;
  padding: 0 12px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.filter-select-sp:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
  outline: none;
}

/* ---------------- Modal ---------------- */
.modal-content {
  border-radius: var(--radius-lg);
  border: none;
  box-shadow: var(--shadow-xl);
}

.modal-header {
  background: #fff;
  border-bottom: 1px solid var(--border-soft);
  padding: 20px 24px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-header .modal-title {
  font-weight: 700;
  font-size: 1.1rem;
}

.modal-body {
  padding: 24px;
}

.modal-body .form-label {
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--text-main);
  margin-bottom: 6px;
}

.modal-body .form-control,
.modal-body .form-select {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  padding: 10px 14px;
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.modal-body .form-control:focus,
.modal-body .form-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
  outline: none;
}

.modal-body .mb-form { margin-bottom: 18px; }

.modal-footer {
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border-soft);
  gap: 8px;
}

/* ---------------- Kategori Page ---------------- */
.tingkat-section-header {
  margin-top: 32px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tingkat-section-header:first-of-type { margin-top: 8px; }

.kategori-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.kategori-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  border-radius: 4px 0 0 4px;
}

.kategori-card[data-tingkat="Ringan"]::before { background: #2563EB; }
.kategori-card[data-tingkat="Sedang"]::before { background: #D97706; }
.kategori-card[data-tingkat="Berat"]::before { background: #DC2626; }

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

.kategori-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.kategori-card-poin {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.03em;
  line-height: 1;
}

.kategori-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

/* ---------------- Input Pelanggaran ---------------- */
.step-label {
  font-weight: 700;
  margin-bottom: 10px;
  font-size: 0.95rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-label .step-number {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.kategori-scroll-list {
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}

.kategori-pick-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 8px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all var(--transition);
}

.kategori-pick-card:hover {
  background: #F9FAFB;
  border-color: #D1D5DB;
}

.kategori-pick-card.selected {
  border-color: var(--primary);
  background: var(--primary-bg);
  box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
}

.autocomplete-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  max-height: 260px;
  overflow-y: auto;
}

.autocomplete-item {
  padding: 12px 16px;
  cursor: pointer;
  transition: background var(--transition);
  border-bottom: 1px solid var(--border-light);
}

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

.autocomplete-item:hover { background: var(--primary-bg); }

.btn-submit-pelanggaran {
  width: 100%;
  height: 50px;
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(37,99,235,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-submit-pelanggaran:hover {
  box-shadow: 0 6px 16px rgba(37,99,235,0.4);
  transform: translateY(-2px);
}

.btn-submit-pelanggaran:active {
  transform: translateY(0);
}

/* ---------------- Monitoring Kelas ---------------- */
.kelas-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 18px;
  transition: all var(--transition);
}

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

.kelas-card-nama {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-main);
}

.kelas-card-jumlah {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.kelas-card-rata-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.kelas-card-rata-row strong {
  color: var(--text-main);
  font-weight: 700;
}

.progress-sp {
  height: 8px;
  border-radius: 999px;
  background: #E5E7EB;
  overflow: hidden;
}

.progress-sp .bar {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: 999px;
  transition: width 0.6s ease;
}

.kelas-card-bermasalah {
  font-size: 0.75rem;
  color: var(--danger);
  margin-top: 10px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ---------------- Login ---------------- */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1E3A5F 0%, #1E40AF 50%, #2563EB 100%);
  position: relative;
  overflow: hidden;
}

.login-wrapper::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(59,130,246,0.15) 0%, transparent 50%),
              radial-gradient(circle at 70% 60%, rgba(37,99,235,0.1) 0%, transparent 50%);
  animation: loginBgAnim 20s ease-in-out infinite;
}

@keyframes loginBgAnim {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(2%, 2%); }
  50% { transform: translate(-1%, 3%); }
  75% { transform: translate(3%, -1%); }
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
  padding: 40px 36px;
  position: relative;
  z-index: 1;
  animation: loginCardEnter 0.5s ease-out;
}

@keyframes loginCardEnter {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-logo {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: var(--primary-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  font-size: 1.5rem;
  box-shadow: 0 4px 16px rgba(37,99,235,0.35);
}

.login-card h4 {
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.login-card .form-control {
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-soft);
  padding: 12px 14px;
  font-size: 0.9rem;
  height: 46px;
  transition: all var(--transition);
}

.login-card .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

.login-card .form-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-main);
  margin-bottom: 6px;
}

.login-card .btn-primary-sp {
  height: 48px;
  font-size: 0.95rem;
}

/* ---------------- Profil Page ---------------- */
.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2rem;
  box-shadow: 0 4px 16px rgba(37,99,235,0.3);
}

.profile-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.profile-info-row:last-child { border-bottom: none; }

.profile-info-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.profile-info-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
}

/* ---------------- Alert custom ---------------- */
.alert-sp {
  border-radius: var(--radius-sm);
  border: none;
  padding: 12px 16px;
  font-size: 0.875rem;
  font-weight: 500;
}

.alert-sp.alert-success {
  background: var(--success-bg);
  color: #065F46;
}

.alert-sp.alert-danger {
  background: var(--danger-bg);
  color: #991B1B;
}

/* ---------------- DataTables override ---------------- */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
  margin-bottom: 12px;
}

.dataTables_wrapper .dataTables_filter input {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  padding: 8px 12px;
  font-size: 0.875rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: var(--radius-sm);
  padding: 6px 12px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff !important;
}

.dataTables_wrapper .dataTables_info {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ---------------- Utility ---------------- */
.text-gradient {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.animate-fade-in {
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
