/* ============================================
   DataSantriMIPS — Design System
   PKBM Madina Islamic Premier School
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Amiri:wght@400;700&display=swap');

/* ---- CSS Variables / Design Tokens ---- */
:root {
  /* Primary — Islamic Green */
  --primary-50: #e8f5e9;
  --primary-100: #c8e6c9;
  --primary-200: #a5d6a7;
  --primary-300: #81c784;
  --primary-400: #66bb6a;
  --primary-500: #2e7d32;
  --primary-600: #27652a;
  --primary-700: #1b5e20;
  --primary-800: #145218;
  --primary-900: #0d3b11;

  /* Accent — Gold */
  --accent-50: #fff8e1;
  --accent-100: #ffecb3;
  --accent-200: #ffe082;
  --accent-300: #ffd54f;
  --accent-400: #d4a843;
  --accent-500: #c49a38;
  --accent-600: #b8860b;
  --accent-700: #9e7409;
  --accent-800: #7d5c07;

  /* Neutral */
  --neutral-0: #ffffff;
  --neutral-50: #f8f9fa;
  --neutral-100: #f1f3f5;
  --neutral-200: #e9ecef;
  --neutral-300: #dee2e6;
  --neutral-400: #ced4da;
  --neutral-500: #adb5bd;
  --neutral-600: #6c757d;
  --neutral-700: #495057;
  --neutral-800: #343a40;
  --neutral-900: #212529;

  /* Semantic */
  --success: #28a745;
  --warning: #f0ad4e;
  --danger: #dc3545;
  --info: #17a2b8;

  /* Dark Navy (Sidebar) */
  --sidebar-bg: #0d1b2a;
  --sidebar-hover: #1b2d44;
  --sidebar-active: #243b55;
  --sidebar-text: #8899aa;
  --sidebar-text-active: #ffffff;
  --sidebar-width: 260px;

  /* Typography */
  --font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-arabic: 'Amiri', serif;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  color: var(--neutral-800);
  background-color: var(--neutral-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--primary-500);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-700);
}

img {
  max-width: 100%;
  height: auto;
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--neutral-900);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }

.text-arabic {
  font-family: var(--font-arabic);
  direction: rtl;
}

/* ---- Utility ---- */
.text-primary { color: var(--primary-500) !important; }
.text-accent { color: var(--accent-400) !important; }
.text-muted { color: var(--neutral-600) !important; }
.bg-primary { background-color: var(--primary-500) !important; }
.bg-primary-dark { background-color: var(--primary-700) !important; }
.bg-accent { background-color: var(--accent-400) !important; }

.gradient-primary {
  background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-500) 50%, var(--primary-400) 100%);
}

.gradient-hero {
  background: linear-gradient(160deg, var(--primary-900) 0%, var(--primary-700) 40%, var(--primary-500) 100%);
}

.gradient-gold {
  background: linear-gradient(135deg, var(--accent-500) 0%, var(--accent-300) 100%);
}

/* ---- Navbar Public ---- */
.navbar-public {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding: 0.75rem 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  transition: all var(--transition-base);
}

.navbar-public.scrolled {
  box-shadow: var(--shadow-md);
}

.navbar-public .navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary-700);
}

.navbar-public .navbar-brand .logo-icon {
  width: 42px;
  height: 42px;
  background: var(--primary-500);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(46,125,50,0.3);
}

.navbar-public .nav-link {
  color: var(--neutral-700);
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 0.5rem 1rem !important;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.navbar-public .nav-link:hover,
.navbar-public .nav-link.active {
  color: var(--primary-500);
  background: var(--primary-50);
}

.btn-login-nav {
  background: var(--primary-500);
  color: white !important;
  padding: 0.5rem 1.5rem !important;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.875rem;
  border: none;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 8px rgba(46,125,50,0.25);
}

.btn-login-nav:hover {
  background: var(--primary-700);
  color: white !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(46,125,50,0.35);
}

/* ---- Hero Section ---- */
.hero-section {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  padding: 8rem 0 5rem;
  overflow: hidden;
  color: white;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M40 0L80 40L40 80L0 40z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: 0;
}

.hero-section > .container {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.6s ease;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  animation: fadeInUp 0.6s ease 0.1s both;
}

.hero-title .text-gold {
  color: var(--accent-300);
}

.hero-subtitle {
  font-size: 1.125rem;
  font-weight: 400;
  opacity: 0.85;
  max-width: 560px;
  margin-bottom: 2rem;
  animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease 0.3s both;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
  margin-top: 3rem;
  animation: fadeInUp 0.6s ease 0.4s both;
}

.hero-stat-card {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  transition: transform var(--transition-fast);
}

.hero-stat-card:hover {
  transform: translateY(-3px);
  background: rgba(255,255,255,0.15);
}

.hero-stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  display: block;
  color: var(--accent-300);
}

.hero-stat-label {
  font-size: 0.8125rem;
  opacity: 0.8;
  margin-top: 0.25rem;
}

/* ---- Buttons ---- */
.btn-primary-custom {
  background: var(--primary-500);
  color: white;
  border: none;
  padding: 0.625rem 1.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.btn-primary-custom:hover {
  background: var(--primary-700);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(46,125,50,0.3);
}

.btn-outline-custom {
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.4);
  padding: 0.5rem 1.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.btn-outline-custom:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.7);
  color: white;
}

.btn-accent {
  background: var(--accent-400);
  color: var(--neutral-900);
  border: none;
  padding: 0.625rem 1.5rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.btn-accent:hover {
  background: var(--accent-500);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212,168,67,0.3);
}

.btn-sm-custom {
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--neutral-300);
  background: white;
  color: var(--neutral-600);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.btn-icon:hover {
  border-color: var(--primary-500);
  color: var(--primary-500);
  background: var(--primary-50);
}

.btn-icon.danger:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: #fef2f2;
}

/* ---- Section Styles ---- */
.section-padding {
  padding: 5rem 0;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--neutral-600);
  font-size: 1rem;
  margin-bottom: 2.5rem;
}

/* ---- Program Cards ---- */
.program-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  border: 1px solid var(--neutral-200);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.program-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-500), var(--accent-400));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

.program-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-200);
}

.program-card:hover::before {
  transform: scaleX(1);
}

.program-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 1.5rem;
  color: white;
}

.program-card h4 {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.program-card .program-level {
  color: var(--neutral-600);
  font-size: 0.8125rem;
  margin-bottom: 0.75rem;
}

.program-count {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--primary-50);
  color: var(--primary-700);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
}

/* ---- Data Table Section (Public) ---- */
.data-section {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--neutral-200);
  overflow: hidden;
}

.data-section-header {
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid var(--neutral-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.data-section-header h3 {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.data-filters {
  padding: 1.25rem 1.75rem;
  background: var(--neutral-50);
  border-bottom: 1px solid var(--neutral-200);
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.data-filters .form-select,
.data-filters .form-control {
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--neutral-300);
  padding: 0.5rem 0.875rem;
  min-width: 160px;
  transition: border-color var(--transition-fast);
}

.data-filters .form-select:focus,
.data-filters .form-control:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(46,125,50,0.1);
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.search-box input {
  padding-left: 2.5rem;
  width: 100%;
}

.search-box .search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--neutral-500);
  font-size: 0.875rem;
}

/* ---- Custom Table ---- */
.table-custom {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
}

.table-custom thead th {
  background: var(--neutral-50);
  color: var(--neutral-700);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.875rem 1.25rem;
  border-bottom: 2px solid var(--neutral-200);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

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

.table-custom tbody tr:hover {
  background: var(--primary-50);
}

.table-custom tbody td {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--neutral-100);
  vertical-align: middle;
}

.table-custom tbody tr:last-child td {
  border-bottom: none;
}

/* ---- Pagination ---- */
.pagination-custom {
  padding: 1rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--neutral-200);
  font-size: 0.875rem;
  color: var(--neutral-600);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pagination-custom .page-link {
  border: 1px solid var(--neutral-300);
  color: var(--neutral-700);
  border-radius: var(--radius-sm);
  padding: 0.375rem 0.75rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  font-size: 0.8125rem;
}

.pagination-custom .page-link:hover {
  background: var(--primary-50);
  border-color: var(--primary-300);
  color: var(--primary-700);
}

.pagination-custom .page-item.active .page-link {
  background: var(--primary-500);
  border-color: var(--primary-500);
  color: white;
}

/* ---- Footer Public ---- */
.footer-public {
  background: var(--neutral-900);
  color: var(--neutral-400);
  padding: 3rem 0 1.5rem;
}

.footer-public h5 {
  color: white;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-public a {
  color: var(--neutral-400);
  transition: color var(--transition-fast);
}

.footer-public a:hover {
  color: var(--accent-400);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8125rem;
}

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */

/* ---- Sidebar ---- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  z-index: 1040;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform var(--transition-base);
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  padding: 1.5rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.sidebar-brand .brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-400));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}

.sidebar-brand .brand-text {
  color: white;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
}

.sidebar-brand .brand-text small {
  display: block;
  font-size: 0.6875rem;
  color: var(--sidebar-text);
  font-weight: 400;
}

.sidebar-nav {
  padding: 1rem 0;
  flex: 1;
}

.sidebar-nav-title {
  color: var(--sidebar-text);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 1.25rem 1.25rem 0.5rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1.25rem;
  color: var(--sidebar-text);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
  position: relative;
}

.sidebar-link:hover {
  color: var(--sidebar-text-active);
  background: var(--sidebar-hover);
}

.sidebar-link.active {
  color: var(--sidebar-text-active);
  background: var(--sidebar-active);
  border-left-color: var(--accent-400);
}

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

.sidebar-submenu {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base);
}

.sidebar-submenu.show {
  max-height: 300px;
}

.sidebar-submenu .sidebar-link {
  padding-left: 3.25rem;
  font-size: 0.8125rem;
}

.sidebar-link .arrow {
  margin-left: auto;
  transition: transform var(--transition-fast);
  font-size: 0.75rem;
}

.sidebar-link[aria-expanded="true"] .arrow {
  transform: rotate(90deg);
}

.sidebar-user {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary-500), var(--accent-400));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.8125rem;
  font-weight: 700;
  flex-shrink: 0;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  color: white;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

/* ---- Main Content ---- */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--transition-base);
}

/* ---- Top Bar ---- */
.topbar {
  background: white;
  border-bottom: 1px solid var(--neutral-200);
  padding: 0.875rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.topbar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--neutral-700);
  cursor: pointer;
  padding: 0.25rem;
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--neutral-600);
}

.topbar-breadcrumb a {
  color: var(--neutral-500);
}

.topbar-breadcrumb .separator {
  color: var(--neutral-400);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topbar-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--neutral-100);
  color: var(--neutral-600);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.topbar-icon-btn:hover {
  background: var(--primary-50);
  color: var(--primary-500);
}

.topbar-icon-btn .badge-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid white;
}

/* ---- Dashboard Content Area ---- */
.dashboard-content {
  padding: 1.75rem;
  flex: 1;
}

.page-header {
  margin-bottom: 1.75rem;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--neutral-900);
  margin-bottom: 0.25rem;
}

.page-description {
  color: var(--neutral-600);
  font-size: 0.875rem;
}

/* ---- Stat Cards ---- */
.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--neutral-200);
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  border-radius: 0 0 0 80px;
  opacity: 0.06;
  transition: opacity var(--transition-fast);
}

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

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--neutral-900);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-card .stat-label {
  font-size: 0.8125rem;
  color: var(--neutral-600);
  font-weight: 500;
}

.stat-card .stat-change {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 0.5rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
}

.stat-change.up {
  background: #dcfce7;
  color: #16a34a;
}

.stat-change.down {
  background: #fef2f2;
  color: #dc2626;
}

/* Stat card color variants */
.stat-card.green .stat-icon { background: var(--primary-50); color: var(--primary-500); }
.stat-card.green::after { background: var(--primary-500); }
.stat-card.blue .stat-icon { background: #eff6ff; color: #2563eb; }
.stat-card.blue::after { background: #2563eb; }
.stat-card.amber .stat-icon { background: var(--accent-50); color: var(--accent-600); }
.stat-card.amber::after { background: var(--accent-600); }
.stat-card.purple .stat-icon { background: #f5f3ff; color: #7c3aed; }
.stat-card.purple::after { background: #7c3aed; }
.stat-card.red .stat-icon { background: #fef2f2; color: #dc2626; }
.stat-card.red::after { background: #dc2626; }
.stat-card.teal .stat-icon { background: #f0fdfa; color: #0d9488; }
.stat-card.teal::after { background: #0d9488; }

/* ---- Quick Action Cards ---- */
.quick-action-card {
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  color: var(--neutral-800);
}

.quick-action-card:hover {
  border-color: var(--primary-300);
  background: var(--primary-50);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  color: var(--neutral-800);
}

.quick-action-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.quick-action-text h5 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.125rem;
}

.quick-action-text p {
  font-size: 0.75rem;
  color: var(--neutral-600);
  margin: 0;
}

/* ---- Chart Container ---- */
.chart-container {
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.chart-container h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

/* ---- Form Styles ---- */
.form-section {
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.form-section-header {
  padding: 1.25rem 1.5rem;
  background: var(--neutral-50);
  border-bottom: 1px solid var(--neutral-200);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.form-section-header h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.form-section-header .section-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
}

.form-section-body {
  padding: 1.5rem;
}

.form-label-custom {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--neutral-700);
  margin-bottom: 0.375rem;
}

.form-label-custom .required {
  color: var(--danger);
}

.form-control-custom,
.form-select-custom {
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-sm);
  padding: 0.5625rem 0.875rem;
  font-size: 0.875rem;
  font-family: var(--font-primary);
  transition: all var(--transition-fast);
  width: 100%;
}

.form-control-custom:focus,
.form-select-custom:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(46,125,50,0.12);
  outline: none;
}

.form-control-custom.is-invalid {
  border-color: var(--danger);
}

.form-text {
  font-size: 0.75rem;
  color: var(--neutral-600);
  margin-top: 0.25rem;
}

/* ---- Status Badges ---- */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--neutral-100);
  color: var(--neutral-600);
}

.badge-status.cuti {
  background: #fef9c3; /* yellow-100 */
  color: #a16207; /* yellow-800 */
}

.badge-status.aktif {
  background: #dcfce7;
  color: #16a34a;
}

.badge-status.pindahan-masuk {
  background: #dbeafe;
  color: #2563eb;
}

.badge-status.menginduk {
  background: var(--accent-50);
  color: var(--accent-600);
}

.badge-status.lulus {
  background: #f5f3ff;
  color: #7c3aed;
}

.badge-status.pindah-keluar {
  background: #fef2f2;
  color: #dc2626;
}

.badge-role {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-role.admin {
  background: var(--primary-50);
  color: var(--primary-700);
}

.badge-role.guru {
  background: #dbeafe;
  color: #1d4ed8;
}

/* ---- Detail Tabs ---- */
.detail-tabs .nav-tabs {
  border-bottom: 2px solid var(--neutral-200);
  gap: 0.25rem;
}

.detail-tabs .nav-link {
  color: var(--neutral-600);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.75rem 1.25rem;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition-fast);
}

.detail-tabs .nav-link:hover {
  color: var(--primary-500);
  border-bottom-color: var(--primary-200);
}

.detail-tabs .nav-link.active {
  color: var(--primary-700);
  border-bottom-color: var(--primary-500);
  background: transparent;
}

/* ---- Import Preview ---- */
.import-zone {
  border: 2px dashed var(--neutral-300);
  border-radius: var(--radius-lg);
  padding: 3rem;
  text-align: center;
  background: var(--neutral-50);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.import-zone:hover,
.import-zone.dragover {
  border-color: var(--primary-400);
  background: var(--primary-50);
}

.import-zone i {
  font-size: 2.5rem;
  color: var(--neutral-400);
  margin-bottom: 1rem;
}

.import-zone h5 {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.import-zone p {
  color: var(--neutral-600);
  font-size: 0.875rem;
}

/* ---- Timeline (Riwayat Akademik) ---- */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: var(--neutral-200);
}

.timeline-item {
  position: relative;
  padding-bottom: 1.5rem;
  padding-left: 1.25rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 0.375rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary-500);
  border: 2px solid white;
  box-shadow: 0 0 0 2px var(--primary-200);
}

.timeline-item.current::before {
  background: var(--accent-400);
  box-shadow: 0 0 0 2px var(--accent-200);
}

.timeline-year {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--primary-700);
}

.timeline-info {
  font-size: 0.8125rem;
  color: var(--neutral-600);
  margin-top: 0.25rem;
}

/* ---- Log / Activity ---- */
.activity-item {
  display: flex;
  gap: 1rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--neutral-100);
}

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

.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  flex-shrink: 0;
}

.activity-text {
  flex: 1;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.activity-text strong {
  font-weight: 600;
  color: var(--neutral-800);
}

.activity-time {
  font-size: 0.75rem;
  color: var(--neutral-500);
  margin-top: 0.125rem;
}

/* ---- Kenaikan Kelas (Mapping) ---- */
.mapping-card {
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  transition: all var(--transition-fast);
}

.mapping-card:hover {
  border-color: var(--primary-300);
  box-shadow: var(--shadow-xs);
}

.mapping-arrow {
  color: var(--primary-500);
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* ---- Empty State ---- */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--neutral-500);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h5 {
  font-weight: 600;
  color: var(--neutral-700);
  margin-bottom: 0.5rem;
}

/* ---- Animations ---- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

.animate-fade-in-up {
  animation: fadeInUp 0.5s ease;
}

.animate-slide-in {
  animation: slideInLeft 0.3s ease;
}

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .topbar-toggle {
    display: block;
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1035;
    display: none;
  }

  .sidebar-overlay.show {
    display: block;
  }
}

@media (max-width: 767.98px) {
  .hero-section {
    min-height: auto;
    padding: 7rem 0 3rem;
  }

  .hero-title {
    font-size: 1.75rem;
  }

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

  .data-filters {
    flex-direction: column;
  }

  .data-filters .form-select,
  .data-filters .form-control,
  .search-box {
    min-width: 100%;
  }

  .dashboard-content {
    padding: 1rem;
  }

  .pagination-custom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 575.98px) {
  .hero-stats {
    grid-template-columns: 1fr 1fr;
  }

  .stat-card {
    padding: 1.125rem;
  }

  .stat-card .stat-value {
    font-size: 1.375rem;
  }
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--neutral-300);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--neutral-400);
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
}

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

.modal-custom .modal-header {
  border-bottom: 1px solid var(--neutral-200);
  padding: 1.25rem 1.5rem;
}

.modal-custom .modal-title {
  font-size: 1.125rem;
  font-weight: 700;
}

.modal-custom .modal-body {
  padding: 1.5rem;
}

.modal-custom .modal-footer {
  border-top: 1px solid var(--neutral-200);
  padding: 1rem 1.5rem;
}

/* ---- Tooltip ---- */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) scale(0.95);
  background: var(--neutral-800);
  color: white;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.6875rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-fast);
}

[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* ---- Print Styles ---- */
@media print {
  .sidebar,
  .topbar,
  .btn,
  .data-filters,
  .pagination-custom {
    display: none !important;
  }

  .main-content {
    margin-left: 0 !important;
  }

  .table-custom {
    font-size: 10pt;
  }
}

/* ---- Global Loader ---- */
.global-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(2px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
