/* Import Inter Font */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #667eea;
  --primary-dark: #5568d3;
  --secondary: #764ba2;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --dark: #1f2937;
  --light: #f9fafb;
  --white: #ffffff;
  --border: #e5e7eb;
  --text: #374151;
  --text-light: #6b7280;
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 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);
  --radius: 12px;
  --radius-sm: 8px;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: url("assets/Background5.png") center center / cover no-repeat
    fixed;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Login Page */
.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  background: url("assets/Background6.jpg") center center / cover no-repeat;
}

.login-container {
  width: 100%;
  max-width: 440px;
}

.login-box {
  background: var(--white);
  padding: 48px 40px;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.5s ease;
}

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

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.login-logo-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.login-box h2 {
  color: var(--dark);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.login-box p {
  color: var(--text-light);
  font-size: 14px;
  font-weight: 400;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon svg {
  position: absolute;
  left: 16px;
  color: var(--text-light);
  pointer-events: none;
}

.input-with-icon input {
  padding-left: 48px !important;
}

.btn-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-info {
  margin-top: 32px;
  padding: 20px;
  background: var(--light);
  border-radius: var(--radius-sm);
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 13px;
}

.info-item strong {
  color: var(--dark);
  font-weight: 600;
}

.info-item span {
  color: var(--text-light);
  font-family: "Courier New", monospace;
}

.login-footer {
  margin-top: 24px;
  text-align: center;
  color: var(--text-light);
  font-size: 12px;
  font-weight: 600;
}

/* Navbar */
.navbar {
  background: var(--white);
  padding: 16px 32px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-top {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 16px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-brand h1 {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 20px;
  font-weight: 700;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.brand-logo {
  object-fit: contain;
  max-width: 100%;
  max-height: 40px;
}

/* Responsive brand logo */
@media (max-width: 768px) {
  .brand-logo {
    max-height: 35px;
  }
}

@media (max-width: 480px) {
  .brand-logo {
    max-height: 30px;
  }
}

.nav-menu {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
  justify-content: center;
}

.nav-toggle {
  display: none;
  border: none;
  background: transparent;
  padding: 8px;
  cursor: pointer;
  color: var(--text);
  font-size: 18px;
}

.nav-menu a {
  color: var(--text);
  text-decoration: none;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-menu a:hover {
  background: var(--light);
  color: var(--primary);
}

.nav-menu a.active {
  font-weight: 700;
  color: var(--primary);
  background: rgba(102, 126, 234, 0.12);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.nav-user span {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.btn-logout {
  background: var(--danger);
  color: var(--white);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-logout:hover {
  background: #dc2626;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Container */
.container {
  max-width: 1400px;
  margin: 32px auto;
  padding: 0 20px;
}

.content {
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  margin-bottom: 32px;
}

/* Dashboard Modern */
.dashboard-modern {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 20px;
}

.welcome-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.welcome-content h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}

.welcome-content p {
  color: var(--text-light);
  font-size: 16px;
  font-weight: 500;
}

.date-card {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  padding: 20px 32px;
  border-radius: var(--radius);
  text-align: center;
  min-width: 120px;
}

.date-compact {
  display: none;
  font-weight: 600;
  color: var(--text-light);
  font-size: 14px;
}

.date-day {
  display: block;
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
}

.date-month {
  display: block;
  font-size: 14px;
  font-weight: 600;
  opacity: 0.9;
  margin-top: 4px;
}

/* Stats Grid Modern */
.stats-grid-modern {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card-modern {
  background: var(--white);
  padding: 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 24px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.stat-card-modern::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  opacity: 0.1;
  transform: translate(30%, -30%);
}

.stat-card-modern.stat-purple::before {
  background: #667eea;
}
.stat-card-modern.stat-blue::before {
  background: #3b82f6;
}
.stat-card-modern.stat-green::before {
  background: #10b981;
}
.stat-card-modern.stat-orange::before {
  background: #f59e0b;
}

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

.stat-icon-modern {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-card-modern.stat-purple .stat-icon-modern {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: var(--white);
}

.stat-card-modern.stat-blue .stat-icon-modern {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: var(--white);
}

.stat-card-modern.stat-green .stat-icon-modern {
  background: linear-gradient(135deg, #10b981, #059669);
  color: var(--white);
}

.stat-card-modern.stat-orange .stat-icon-modern {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: var(--white);
}

.stat-content-modern {
  flex: 1;
}

.stat-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 4px;
}

.stat-trend {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-block;
}

.stat-trend.positive {
  background: #d1fae5;
  color: #059669;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.dashboard-card {
  background: var(--white);
  padding: 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

/* Full width card for dashboard grid */
.dashboard-card-full {
  grid-column: 1 / -1 !important;
  width: 100% !important;
}

/* Ensure full width card spans entire grid row */
.dashboard-grid > .dashboard-card-full {
  grid-column: 1 / -1;
}

/* Ensure table in full width card is also wide */
.dashboard-card-full .table-responsive {
  width: 100% !important;
  overflow-x: auto;
}

.dashboard-card-full table {
  width: 100% !important;
}

/* Distribusi Table Styling */
.distribusi-card {
  padding: 24px !important;
}

.table-wrapper-distribusi {
  width: 100%;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.distribusi-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: white;
}

.distribusi-table thead {
  background: #f3f4f6;
  border-bottom: 2px solid #d1d5db;
}

.distribusi-table thead th {
  padding: 12px 12px;
  text-align: left;
  color: #374151;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
  border-right: 1px solid #e5e7eb;
}

.distribusi-table thead th:last-child {
  border-right: none;
}

.distribusi-table tbody tr {
  border-bottom: 1px solid #e5e7eb;
}

.distribusi-table tbody tr:hover {
  background: #f9fafb;
}

.distribusi-table tbody td {
  padding: 12px 12px;
  color: #1f2937;
  border-right: 1px solid #f3f4f6;
}

.distribusi-table tbody td:last-child {
  border-right: none;
}

.distribusi-table .text-center {
  text-align: center;
}

.distribusi-table .text-right {
  text-align: right;
}

.distribusi-total {
  background: #f9fafb !important;
  border-top: 2px solid #d1d5db;
}

.distribusi-total td {
  color: #1f2937 !important;
  padding: 14px;
  font-weight: 600;
}

.distribusi-total strong {
  color: #1f2937;
}

/* Responsive Distribusi Table */
@media (max-width: 768px) {
  .distribusi-table {
    font-size: 12px;
  }

  .distribusi-table thead th,
  .distribusi-table tbody td {
    padding: 10px 8px;
  }

  .distribusi-table thead th:first-child,
  .distribusi-table thead th:last-child {
    border-radius: 0;
  }

  .table-wrapper-distribusi {
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .distribusi-card {
    padding: 16px !important;
  }
}

@media (max-width: 480px) {
  .distribusi-table thead th,
  .distribusi-table tbody td {
    padding: 8px 6px;
  }

  .distribusi-table {
    font-size: 11px;
  }
}

/* Ranking Badges */
.rank-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 12px;
  text-align: center;
  min-width: 40px;
}

.rank-gold {
  background: #fef3c7;
  color: #d97706;
  border: 1px solid #fcd34d;
}

.rank-silver {
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #d1d5db;
}

.rank-bronze {
  background: #fef2f2;
  color: #d97706;
  border: 1px solid #fed7aa;
}

.rank-normal {
  background: #ffffff;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}

/* Sekolah Info */
.sekolah-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sekolah-name {
  font-weight: 600;
  color: #1f2937;
  font-size: 13px;
  word-wrap: break-word;
}

.sekolah-code {
  font-size: 11px;
  color: #9ca3af;
}

/* Amount Highlight */
.amount-highlight {
  font-weight: 700;
  color: #059669;
  font-size: 14px;
}

/* Card Subtitle */
.card-subtitle {
  margin: 0;
  padding: 0;
  font-size: 12px;
  color: #6b7280;
  font-weight: 400;
}

.chart-card {
  grid-column: span 2;
}

.card-header-modern {
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* margin-bottom: 24px; */
}

.card-header-modern h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
}

.card-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  background: var(--light);
  color: var(--text-light);
  border-radius: 20px;
}

/* Bar Chart */
.chart-container {
  height: 300px;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 100%;
  gap: 12px;
}

.bar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.bar {
  width: 100%;
  background: var(--light);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  position: relative;
  min-height: 20px;
  cursor: pointer;
  transition: all 0.3s;
}

.bar:hover .bar-tooltip {
  opacity: 1;
  visibility: visible;
}

.bar-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.bar-tooltip {
  position: absolute;
  top: -40px;
  background: var(--dark);
  color: var(--white);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
}

.bar-label {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
}

.line-chart {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.line-svg {
  width: 100%;
  height: 220px;
}

.line-area {
  fill: rgba(102, 126, 234, 0.18);
}

.line-path {
  fill: none;
  stroke: url(#lineGradient);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.line-point {
  fill: #764ba2;
  stroke: #ffffff;
  stroke-width: 0.8;
}

.line-labels {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
}

.empty-state {
  height: 100%;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-light);
  background: var(--light);
  border-radius: var(--radius);
  font-weight: 600;
}

/* Quick Stats */
.quick-stats {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.quick-stat-item {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--light);
  border-radius: var(--radius-sm);
}

.quick-stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.quick-stat-icon.blue {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: var(--white);
}

.quick-stat-icon.green {
  background: linear-gradient(135deg, #10b981, #059669);
  color: var(--white);
}

.quick-stat-icon.purple {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: var(--white);
}

.quick-stat-content p {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 4px;
}

.quick-stat-content h4 {
  font-size: 20px;
  font-weight: 800;
  color: var(--dark);
}

/* Top List */
.top-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.top-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--light);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.top-item:hover {
  background: #f3f4f6;
  transform: translateX(4px);
}

.top-rank {
  font-size: 24px;
}

.top-info {
  flex: 1;
}

.top-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 2px;
}

.top-class {
  font-size: 13px;
  color: var(--text-light);
}

.top-amount {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

/* Class Distribution */
.class-distribution {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.class-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.class-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.class-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 20px;
  font-weight: 800;
}

.class-details p {
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 2px;
}

.class-details span {
  font-size: 13px;
  color: var(--text-light);
}

.class-amount {
  min-width: 140px;
}

.class-amount p {
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}

.progress-bar {
  height: 6px;
  background: var(--light);
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.5s ease;
}

/* Quick Actions Grid */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s;
}

.quick-action-btn:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.quick-action-btn.purple {
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.quick-action-btn.blue {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.quick-action-btn.green {
  background: linear-gradient(135deg, #10b981, #059669);
}

.quick-action-btn.orange {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Forms */
.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--dark);
  font-weight: 600;
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: "Inter", sans-serif;
  transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.search-row {
  align-items: end;
  grid-template-columns: 2.5fr 1fr;
}

.form-group-action {
  display: flex;
  align-items: flex-end;
}

.btn-search {
  width: 100%;
  padding: 14px 24px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

/* Buttons */
.btn {
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  font-family: "Inter", sans-serif;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
}

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

.btn-success {
  background: var(--success);
  color: var(--white);
}

.btn-success:hover {
  background: #059669;
}

.btn-warning {
  background: var(--warning);
  color: var(--white);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
}

.btn-secondary {
  background: #6b7280;
  color: var(--white);
}

.btn-info {
  background: var(--info);
  color: var(--white);
}

.btn-export-excel {
  background: #10b981;
  color: var(--white);
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-export-excel:hover {
  background: #059669;
  transform: translateY(-1px);
}

.btn-export-excel i {
  font-size: 16px;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  table-layout: fixed;
}

/* Pastikan tabel tidak melebihi lebar container */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table thead {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Pastikan header tetap terlihat saat scroll */
.table-responsive {
  max-height: 600px;
  overflow-y: auto;
}

.table-responsive table thead th {
  position: sticky;
  top: 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

table th,
table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  vertical-align: middle;
}

/* Pastikan nama siswa tidak terpotong dan proporsional */
table td {
  word-wrap: break-word;
  white-space: normal;
}

/* Kolom Checkbox */
table th:nth-child(1),
table td:nth-child(1) {
  width: 40px;
  text-align: center;
}

/* Kolom No */
table th:nth-child(2),
table td:nth-child(2) {
  width: 50px;
  text-align: center;
}

/* Kolom NISN */
table th:nth-child(3),
table td:nth-child(3) {
  width: 120px;
  min-width: 100px;
}

/* Kolom Nama Lengkap / Nama Siswa */
table th:nth-child(4),
table td:nth-child(4) {
  width: 30%;
  min-width: 250px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Tampilkan full nama saat hover */
table td:nth-child(4):hover {
  white-space: normal;
  word-wrap: break-word;
  position: relative;
  z-index: 1;
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  padding: 10px 14px;
}

/* Kolom kelas */
table th:nth-child(5),
table td:nth-child(5) {
  width: 100px;
  min-width: 80px;
}

/* Kolom tanggal */
table th:nth-child(6),
table td:nth-child(6) {
  width: 120px;
  min-width: 100px;
}

/* Kolom total tabungan */
table th:nth-child(7),
table td:nth-child(7) {
  width: 150px;
  min-width: 130px;
  text-align: right;
}

/* Kolom aksi */
table th:nth-child(8),
table td:nth-child(8) {
  width: 220px;
  min-width: 200px;
  white-space: nowrap;
}

/* Untuk tabel dengan kolom berbeda (misal report table tanpa checkbox) */
table th:first-child,
table td:first-child {
  width: 50px;
}

/* Special styling untuk report table - kolom nama siswa */
#table-siswa th:nth-child(4),
#table-siswa td:nth-child(4) {
  width: 25%;
  min-width: 280px;
  max-width: 450px;
  font-weight: 600;
  color: var(--dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Tampilkan full nama saat hover untuk report table */
#table-siswa td:nth-child(4):hover {
  white-space: normal;
  word-wrap: break-word;
  position: relative;
  z-index: 1;
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  padding: 10px 14px;
}

/* Report table dengan sekolah column */
#table-siswa th:nth-child(5),
#table-siswa td:nth-child(5) {
  min-width: 150px;
}

/* Responsive untuk tabel */
@media (max-width: 768px) {
  .table-responsive {
    max-height: 400px;
  }

  table {
    font-size: 12px;
  }

  table th,
  table td {
    padding: 8px 10px;
  }

  /* Di mobile, beri lebih banyak ruang untuk nama */
  table th:nth-child(4),
  table td:nth-child(4) {
    min-width: 150px;
    width: auto;
  }

  #table-siswa th:nth-child(4),
  #table-siswa td:nth-child(4) {
    min-width: 150px;
    max-width: 200px;
  }
}

@media (max-width: 480px) {
  table {
    font-size: 11px;
  }

  table th,
  table td {
    padding: 6px 8px;
  }

  table th:nth-child(4),
  table td:nth-child(4) {
    min-width: 120px;
  }
}

table th {
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

table tbody tr:hover {
  background: var(--light);
}

/* Alerts */
.alert {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
}

.alert-icon {
  font-size: 20px;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.alert-danger {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.alert-info {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* Badges */
.badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  display: inline-block;
}

.badge-success {
  background: #d1fae5;
  color: #065f46;
}

.badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

/* Table badges - Soft */
.table-simple .badge-success {
  background: #d1fae5;
  color: #065f46;
}

.table-simple .badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

.table-simple .badge-warning {
  background: #fef3c7;
  color: #92400e;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
}

.tab-btn {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Report Buttons */
.report-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 24px;
}

.report-btn {
  background: var(--light);
  color: var(--text);
  padding: 12px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.report-btn:hover {
  background: var(--white);
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.report-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  border-color: transparent;
  box-shadow: var(--shadow-md);
}

.report-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

/* Cards */
.card {
  background: var(--white);
  padding: 28px;
  margin-bottom: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: visible; /* Biarkan table scroll */
}

/* Mobile card adjustments */
@media (max-width: 768px) {
  .card {
    padding: 16px;
    margin-bottom: 16px;
    border-radius: 12px;
  }

  .card h3 {
    font-size: 16px;
  }
}

.card h3 {
  color: var(--dark);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--light);
}

/* Table Toolbar */
.table-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.table-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--light);
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  min-width: 260px;
}

.table-search i {
  color: var(--text-light);
}

.table-search input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 14px;
}

.table-footer {
  margin-top: 12px;
  color: var(--text-light);
  font-size: 12px;
}

/* QR Scan */
.qr-card .card-header-modern {
  margin-bottom: 18px;
}

.qr-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 24px;
  align-items: center;
}

.qr-frame {
  position: relative;
  background: #0f172a;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.qr-reader {
  width: 100%;
  min-height: 260px;
}

.qr-frame video,
.qr-frame canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

.qr-overlay {
  position: absolute;
  inset: 18px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.qr-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qr-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
}

.qr-desc {
  font-size: 14px;
  color: var(--text-light);
}

.qr-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.qr-hint {
  font-size: 12px;
  color: var(--text-light);
  background: var(--light);
  padding: 8px 12px;
  border-radius: 10px;
  display: inline-block;
}

/* Detail Siswa Modern */
.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.detail-title h2 {
  margin-bottom: 6px;
}

.detail-breadcrumb {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 8px;
}

.detail-breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.detail-subtitle {
  color: var(--text-light);
  font-size: 14px;
}

.detail-actions {
  display: flex;
  gap: 10px;
}

.detail-card {
  padding: 24px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Featured Nominal Input Styles */
.nominal-input-wrapper {
  position: relative;
  margin-bottom: 20px;
}

.nominal-input-wrapper::before {
  content: "💰";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 28px;
  z-index: 10;
}

.nominal-input-display {
  width: 100%;
  padding: 20px 20px 20px 60px;
  font-size: 28px;
  font-weight: 700;
  border: 2px solid #d1d5db;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  color: var(--primary);
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.nominal-input-display:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow:
    0 0 0 4px rgba(102, 126, 234, 0.15),
    0 8px 20px rgba(102, 126, 234, 0.2);
  background: #ffffff;
  transform: translateY(-2px);
}

.nominal-input-display::placeholder {
  color: #9ca3af;
  font-weight: 500;
}

.nominal-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nominal-helper {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-light);
}

.nominal-highlight {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #fbbf24;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.nominal-highlight-title {
  font-size: 13px;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Action Buttons for Nominal */
.nominal-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.nominal-preset {
  padding: 8px 14px;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  transition: all 0.2s ease;
}

.nominal-preset:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.25);
}

.nominal-preset:active {
  transform: translateY(0);
}

.detail-profile {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 20px;
  background: #f9fafb;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid #e5e7eb;
}

.detail-avatar {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #6366f1;
  color: var(--white);
  font-size: 26px;
  font-weight: 700;
}

.detail-meta h1 {
  margin: 0 0 4px 0;
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
  border: none;
  padding: 0;
  line-height: 1.3;
}

.detail-meta p {
  color: #6b7280;
  font-size: 13px;
  margin: 0;
  font-weight: 500;
}

.detail-total {
  text-align: right;
  background: #f3f4f6;
  padding: 14px 18px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.detail-total span {
  display: block;
  color: #6b7280;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.detail-total strong {
  color: #1f2937;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.detail-card > span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #4b5563;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-grid.modern {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

/* NISN Item - Blue Theme */
.detail-grid.modern .detail-item:nth-child(1) {
  background: #eff6ff;
  border-radius: 8px;
  padding: 14px 16px;
  border: 1px solid #dbeafe;
}

.detail-grid.modern .detail-item:nth-child(1) .label {
  color: #1e40af;
  font-weight: 600;
}

.detail-grid.modern .detail-item:nth-child(1) .value {
  color: #1e3a8a;
  font-weight: 700;
}

/* Kelas Item - Purple Theme */
.detail-grid.modern .detail-item:nth-child(2) {
  background: #faf5ff;
  border-radius: 8px;
  padding: 14px 16px;
  border: 1px solid #e9d5ff;
}

.detail-grid.modern .detail-item:nth-child(2) .label {
  color: #7c3aed;
  font-weight: 600;
}

.detail-grid.modern .detail-item:nth-child(2) .value {
  color: #5b21b6;
  font-weight: 700;
}

.detail-grid.modern .detail-item:nth-child(2) .badge {
  background: #7c3aed !important;
  color: white !important;
  font-weight: 600;
  padding: 6px 12px;
  font-size: 13px;
}

.detail-grid.modern .detail-item {
  transition: background-color 0.2s ease;
}

.detail-grid.modern .detail-item:hover {
  background-color: #f3f4f6;
}

.detail-grid.modern .label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.detail-grid.modern .value {
  font-size: 15px;
  font-weight: 700;
}

.detail-grid.modern .value.highlight {
  color: var(--success);
  font-size: 16px;
  font-weight: 700;
}

.detail-card hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 20px 0;
}

.detail-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: var(--dark);
}

/* Responsive */
@media (max-width: 768px) {
  .navbar {
    padding: 12px 16px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-top {
    flex-wrap: wrap;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 12px;
    background: var(--light);
    padding: 12px;
    border-radius: var(--radius-sm);
  }

  .nav-menu a {
    padding: 10px 12px;
    font-size: 14px;
  }

  .nav-user {
    display: none;
    width: 100%;
    justify-content: space-between;
    background: var(--white);
    padding: 12px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
  }

  .navbar.open .nav-menu,
  .navbar.open .nav-user {
    display: flex;
  }

  .welcome-section {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  /* Detail Card Mobile */
  .detail-profile {
    grid-template-columns: auto 1fr;
    gap: 12px;
    padding: 16px;
  }

  .detail-avatar {
    width: 50px;
    height: 50px;
    font-size: 20px;
    border-radius: 12px;
  }

  .detail-meta h1 {
    font-size: 16px;
  }

  .detail-total {
    grid-column: 1 / -1;
    text-align: left;
    padding: 10px 12px;
  }

  .detail-total h2 {
    font-size: 18px;
  }

  .detail-grid.modern {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .detail-grid.modern .detail-item {
    padding: 12px;
  }

  .detail-grid.modern .value {
    font-size: 14px;
  }

  .detail-grid.modern .value.highlight {
    font-size: 15px;
  }

  /* Nominal Input Mobile */
  .nominal-input-display {
    font-size: 24px;
    padding: 16px 16px 16px 50px;
  }

  .nominal-input-wrapper::before {
    left: 12px;
    font-size: 24px;
  }

  .nominal-preset {
    font-size: 12px;
    padding: 6px 12px;
  }

  .stats-grid-modern {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .chart-card {
    grid-column: span 1;
  }

  .quick-actions-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .detail-header {
    flex-direction: column;
    align-items: stretch;
  }

  .detail-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .detail-profile {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .detail-total {
    text-align: left;
  }

  .detail-grid.modern {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 20px;
  }

  table th,
  table td {
    padding: 12px;
    font-size: 13px;
  }

  .dashboard-card {
    padding: 20px;
  }

  .content {
    padding: 20px;
  }

  .card {
    border-radius: 14px;
  }

  .stat-value {
    font-size: 24px;
  }

  .stat-label {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 14px;
  }

  .container {
    padding: 0 12px;
    margin: 16px auto;
  }

  .navbar {
    padding: 12px 16px;
  }

  .nav-brand h1 {
    font-size: 15px;
  }

  .login-box {
    padding: 28px 20px;
  }

  .detail-avatar {
    width: 48px;
    height: 48px;
    font-size: 18px;
  }

  .detail-meta h3 {
    font-size: 15px;
  }

  .detail-total strong {
    font-size: 17px;
  }

  .btn {
    padding: 10px 14px;
    font-size: 12px;
  }

  .btn-sm {
    padding: 6px 10px;
    font-size: 11px;
  }

  /* Fix detail button text duplication on mobile */
  .table-responsive .btn-sm {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
  }

  .stat-value {
    font-size: 20px;
  }

  .stat-label {
    font-size: 11px;
  }

  .quick-actions-grid {
    grid-template-columns: 1fr;
  }

  .report-menu {
    gap: 8px;
  }

  .report-btn {
    padding: 8px 12px;
    font-size: 12px;
  }

  .welcome-content h1 {
    font-size: 22px;
  }

  .welcome-content p {
    font-size: 13px;
  }

  .date-card {
    display: none;
  }

  .date-compact {
    display: block;
    margin-top: 8px;
  }

  .dashboard-card {
    padding: 16px;
  }

  table th,
  table td {
    padding: 8px 10px;
    font-size: 12px;
  }

  .form-group label {
    font-size: 12px;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 13px;
    padding: 12px 14px;
  }

  .card h3 {
    font-size: 16px;
  }

  .qr-layout {
    grid-template-columns: 1fr;
  }

  .qr-frame {
    border-radius: 14px;
  }
}

/* Footer */
.footer {
  text-align: center;
  padding: 24px;
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
  position: relative;
  z-index: 1;
  margin-top: auto;
}

/* Container dengan spacing yang cukup untuk footer */
.container {
  min-height: calc(100vh - 200px);
  padding-bottom: 40px;
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal.hidden {
  display: none !important;
}

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

.modal-content {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
  animation: slideUp 0.3s ease;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Close modal button */
.close-modal {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--gray);
  padding: 5px;
  border-radius: 4px;
  transition: all 0.2s;
}

.close-modal:hover {
  background: var(--light);
  color: var(--dark);
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 15px 20px;
  background: var(--light);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--border);
}

.modal-footer .btn {
  margin: 0;
}

/* Progress Bar Styles */
.progress-bar-container {
  width: 100%;
  height: 30px;
  background: var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 13px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Radio Button Styles */
input[type="radio"] {
  cursor: pointer;
  margin-right: 10px;
  vertical-align: middle;
}

/* Export/Import Specific */
.radio-option {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.radio-option:hover {
  border-color: var(--primary);
  background: rgba(102, 126, 234, 0.05);
}

.radio-option input[type="radio"] {
  margin-top: 2px;
}

.radio-option-label {
  flex: 1;
}

.radio-option-label strong {
  display: block;
  margin-bottom: 4px;
  color: var(--danger);
}

.radio-option-label span {
  color: var(--text-light);
  font-size: 14px;
}

/* Content styling untuk memastikan footer tidak tertutup */
.content {
  padding-bottom: 20px;
  clear: both;
}

/* Radio Filter Group - Style yang lebih rapi */
.radio-filter-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.radio-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--white);
  min-height: 56px;
  position: relative;
}

/* Reset min-height untuk inline style override */
.radio-item[style*="min-height: auto"] {
  min-height: 56px !important;
}

.radio-item:hover {
  border-color: var(--primary);
  background: rgba(102, 126, 234, 0.05);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
  transform: translateY(-2px);
}

/* Checked state - visual feedback yang lebih jelas */
.radio-item:has(input:checked) {
  border-color: var(--primary);
  background: rgba(102, 126, 234, 0.1);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Indikator checklist di kanan untuk item yang dipilih */
.radio-item:has(input:checked)::after {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: var(--primary);
  animation: checkmark 0.3s ease;
}

@keyframes checkmark {
  0% {
    opacity: 0;
    transform: translateY(-50%) scale(0);
  }
  50% {
    transform: translateY(-50%) scale(1.2);
  }
  100% {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}

/* Sembunyikan radio button asli tapi tetap bisa diklik */
.radio-item input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  pointer-events: none; /* Klik akan diteruskan ke parent label */
}

/* Checked state untuk label */
.radio-item:has(input:checked) .radio-label {
  color: var(--primary);
}

.radio-item:has(input:checked) .radio-label small {
  color: var(--primary);
}

.radio-item:has(input:checked) .radio-label i {
  color: var(--primary);
}

.radio-item:has(input:checked) .radio-label strong {
  color: var(--primary);
}

.radio-label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  padding-right: 36px; /* Space untuk checklist icon */
}

/* Support untuk layout column */
.radio-label[style*="column"] {
  align-items: flex-start;
}

/* Pastikan elemen di dalam radio-label sejajar dengan baik */
.radio-label[style*="column"] i,
.radio-label[style*="column"] strong,
.radio-label[style*="column"] small {
  align-self: flex-start;
  margin-left: 0;
}

/* Support untuk div wrapper di dalam radio-label */
.radio-label div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  flex: 1;
  min-width: 0; /* Memungkinkan text truncation */
}

.radio-label i {
  font-size: 20px;
  color: var(--primary);
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}

/* Support untuk inline style override pada icon */
.radio-label i[style*="font-size"] {
  font-size: 20px !important;
  width: 28px !important;
}

.radio-label strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

/* Support untuk inline style override */
.radio-label strong[style*="font-size"] {
  font-size: 14px !important;
}

.radio-label small {
  display: block;
  font-size: 12px;
  color: var(--text-light);
  margin-top: 0;
  line-height: 1.3;
}

/* Support untuk inline style override */
.radio-label small[style*="font-size"] {
  font-size: 12px !important;
}

/* Radio danger style */
.radio-item.radio-danger {
  border-color: rgba(239, 68, 68, 0.3);
}

.radio-item.radio-danger:hover {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.05);
}

/* Checked state untuk danger variant */
.radio-item.radio-danger:has(input:checked) {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.radio-item.radio-danger:has(input:checked)::after {
  color: var(--danger);
}

.radio-item.radio-danger:has(input:checked) .radio-label {
  color: var(--danger);
}

.radio-item.radio-danger:has(input:checked) .radio-label small {
  color: var(--danger);
}

.radio-item.radio-danger .radio-label i,
.radio-item.radio-danger .radio-label strong {
  color: var(--danger);
}

/* Ensure modal is hidden by default */
.modal[style*="display: none"] {
  display: none !important;
}

/* Bootstrap 5 Modal Overrides - Fix conflict with custom modal */
.modal.fade .modal-dialog {
  transition: transform 0.3s ease-out;
  transform: translate(0, -50px);
}

.modal.show .modal-dialog {
  transform: none;
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none; /* Allow clicks to pass through when hidden */
}

.modal-backdrop.show {
  opacity: 0.5;
  pointer-events: auto; /* Enable clicks when shown */
}

/* Ensure Bootstrap modal has higher z-index than custom modal */
.modal.fade:not(.custom-modal) {
  z-index: 1055 !important;
}

/* Fix Bootstrap modal positioning - only for Bootstrap modals */
.modal.fade:not(.custom-modal) .modal-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}

.modal.show:not(.custom-modal) .modal-dialog {
  transform: translate(-50%, -50%);
}

/* Ensure body scroll is restored when modal is hidden */
body.modal-open {
  overflow: hidden !important;
  padding-right: 0 !important;
}

/* Remove Bootstrap modal backdrop on modal hide */
.modal.hide ~ .modal-backdrop,
.modal[style*="display: none"] ~ .modal-backdrop {
  display: none !important;
}

/* ============================================
   MODERN TABLE SYSTEM - Simple, Clean, Responsive
   ============================================ */

/* Table container - responsive wrapper */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0;
  padding: 0;
}

/* DataTables specific */
.dataTables_wrapper .table-responsive {
  overflow-x: auto !important;
  overflow-y: visible !important;
}

.dataTables_wrapper table {
  min-width: 100%;
}

/* Static table specific */
.static-table {
  min-width: 100%;
}

/* IMPORTANT: Ensure static table can scroll horizontally */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Force static table min-width for scroll */
.static-table {
  min-width: 600px !important;
}

@media (max-width: 768px) {
  .card-report .table-responsive {
    margin: 0 -16px;
    padding: 0 16px;
    overflow-x: auto !important;
  }

  /* Force min width for horizontal scroll - ALL tables */
  .card-report table,
  .card-report .static-table,
  .dataTables_wrapper table {
    min-width: 600px !important;
  }
}

/* Custom scrollbar */
.table-responsive::-webkit-scrollbar {
  height: 6px;
}

.table-responsive::-webkit-scrollbar-track {
  background: transparent;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: var(--secondary);
}

/* Base table styles */
.table-responsive table {
  width: 100%;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 14px;
}

/* Table header - Soft */
.table-responsive table thead th {
  background: #374151;
  color: white;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 12px 10px;
  border-bottom: 1px solid #d1d5db;
  text-align: left;
  white-space: nowrap;
}

/* Table body */
.table-responsive table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease;
}

.table-responsive table tbody tr:hover {
  background: var(--light);
}

.table-responsive table tbody td {
  padding: 12px 10px;
  vertical-align: middle;
  font-size: 14px;
  color: var(--text);
}

/* First column - left aligned */
.table-responsive table tbody td:first-child {
  text-align: left;
  font-weight: 500;
}

/* Last column - action buttons - center */
.table-responsive table tbody td:last-child {
  text-align: center;
  white-space: nowrap;
}

/* Numbers - right aligned */
.table-responsive table tbody td:nth-last-child(2) {
  text-align: right;
  font-weight: 600;
}

/* Total/Summary row */
.table-responsive table tbody tr.total-row,
.table-responsive table tfoot tr,
.table-responsive table tbody tr.table-total {
  background: var(--dark);
  color: white;
  font-weight: 600;
}

.table-responsive table tbody tr.total-row td,
.table-responsive table tfoot tr td,
.table-responsive table tbody tr.table-total td {
  color: white !important;
  padding: 14px 12px;
}

/* ============================================
   SIMPLE TABLE VARIANT - For styled tables
   ============================================ */

.table-simple {
  /* Inherits all base styles from above */
}

/* Force column widths if specified */
.table-simple thead th[style*="width:"] {
  min-width: 0; /* Allow shrinking */
  width: auto; /* But flexible */
}

/* Center alignment for simple tables */
.table-simple thead th {
  text-align: center;
}

.table-simple tbody td {
  text-align: center;
}

/* First column still left aligned */
.table-simple tbody td:first-child {
  text-align: left;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Tablet and below */
@media (max-width: 1024px) {
  .table-responsive {
    margin: 0;
    padding: 0;
  }

  .table-responsive table {
    font-size: 13px;
  }

  .table-responsive table thead th,
  .table-responsive table tbody td {
    padding: 10px 8px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .card {
    padding: 16px !important;
    margin-bottom: 16px !important;
  }

  .table-responsive {
    margin: 0 -16px;
    width: calc(100% + 32px);
    padding: 0 16px;
  }

  .table-responsive table {
    font-size: 12px;
  }

  .table-responsive table thead th {
    padding: 10px 8px;
    font-size: 11px;
  }

  .table-responsive table tbody td {
    padding: 10px 8px;
    font-size: 12px;
  }

  /* Stack buttons on mobile */
  .table-responsive table tbody td:last-child .btn,
  .table-responsive table tbody td:last-child div {
    padding: 6px 10px;
    font-size: 11px;
    display: inline-flex;
  }

  .table-responsive table tbody td:last-child > .btn:not(:only-child) {
    flex-direction: column;
    gap: 4px;
  }

  .table-responsive table tbody td:last-child .btn i {
    margin-right: 0;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .table-responsive {
    margin: 0 -12px;
    width: calc(100% + 24px);
    padding: 0 12px;
  }

  .table-responsive table {
    font-size: 11px;
  }

  .table-responsive table thead th,
  .table-responsive table tbody td {
    padding: 8px 6px;
  }

  /* Hide less important columns on very small screens */
  .table-responsive table thead th.hide-mobile,
  .table-responsive table tbody td.hide-mobile {
    display: none;
  }
}

/* ============================================
   SPECIAL TABLE STYLES
   ============================================ */

/* Report table specific */
.table-simple .total-row {
  background: var(--dark) !important;
}

.table-simple .separator-row td {
  background: var(--light) !important;
  border: none;
}

/* Badge in tables */
.table-simple tbody td .badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
}

/* Simple badge */
.badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  white-space: nowrap;
}

.badge-success {
  background: var(--success);
  color: white;
}

.badge-danger {
  background: var(--danger);
  color: white;
}

.badge-warning {
  background: var(--warning);
  color: white;
}

.badge-info {
  background: #dbeafe;
  color: #1e40af;
}

/* Report-specific badges - Soft */
.table-simple .badge-info {
  background: #dbeafe;
  color: #1e40af;
}

/* Report table specific styles */
.table-simple tbody td:last-child .btn {
  padding: 6px 12px;
  font-size: 12px;
}

.table-simple .total-row {
  background: var(--dark) !important;
}

.table-simple .total-row td {
  color: white !important;
  font-size: 12px;
  padding: 14px 12px;
}

.table-simple .separator-row td {
  background: var(--light);
  border: none;
}

/* Mobile specific for report tables */
@media (max-width: 768px) {
  .table-responsive {
    margin: 0 -16px;
    width: calc(100% + 32px);
    padding: 0 16px;
    max-height: 400px; /* Mobile lebih kecil */
  }

  .table-simple {
    font-size: 13px;
  }

  .table-simple thead th,
  .table-simple tbody td {
    padding: 10px 8px;
  }

  .table-simple tbody td:last-child .btn {
    padding: 6px 10px;
    font-size: 11px;
    white-space: nowrap;
  }

  .table-simple tbody td:last-child .btn i {
    display: none; /* Hide icon on mobile */
  }
}

/* Desktop report table height */
@media (min-width: 769px) {
  .table-responsive {
    max-height: 600px;
  }
}

/* Sticky footer for report tables - TOTAL KESELURUHAN tetap terlihat saat scroll */
.table-responsive {
  position: relative;
  max-height: 500px;
  overflow-y: auto;
  overflow-x: auto;
}

/* ============================================
   DATATABLES FULL HEIGHT - Show all data without scroll
   ============================================ */

/* DataTables tables - no max-height limit */
.card-report .table-responsive {
  max-height: none !important;
  overflow: visible !important;
}

.card-report .dataTables_wrapper {
  position: static;
}

/* Data Siswa and other pages - full view for table */
.content .card .table-responsive {
  max-height: none !important;
  overflow: visible !important;
}

/* Data Siswa table - full width on desktop, scroll on mobile */
.data-siswa-table {
  width: 100%;
  margin: 0 auto;
}

.data-siswa-table th,
.data-siswa-table td {
  padding: 10px 8px; /* Padding lebih compact */
  vertical-align: middle;
}

.data-siswa-table tbody tr:hover td {
  background-color: rgba(102, 126, 234, 0.05);
}

/* Button styling in data siswa table */
.data-siswa-table .btn {
  padding: 5px 10px;
  font-size: 12px;
  margin: 0 2px;
  display: inline-block;
  transition: all 0.2s;
}

.data-siswa-table .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Badge styling for kelas */
.data-siswa-table .badge {
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 5px;
}

/* Checkbox styling */
.data-siswa-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Empty state */
.data-siswa-table tbody tr td.text-muted {
  color: #9ca3af !important;
}

.data-siswa-table tbody tr td i.fa-inbox {
  color: #d1d5db;
}

/* ============================================
   STATS ROW - Data Siswa Statistics
   ============================================ */

.stats-row {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 200px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #f8f9ff, #ffffff);
  border: 1px solid #e0e7ff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.08);
}

.stat-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-radius: 10px;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-icon-success {
  background: linear-gradient(135deg, #10b981, #059669);
}

.stat-content {
  flex: 1;
}

.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.2;
}

/* Search Box Modern */
.search-box-modern {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box-modern i {
  position: absolute;
  left: 12px;
  color: #9ca3af;
  font-size: 14px;
  pointer-events: none;
}

.search-box-modern input {
  padding: 8px 12px 8px 36px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 13px;
  color: #374151;
  background: white;
  transition: all 0.2s;
  width: 200px;
}

.search-box-modern input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  width: 250px;
}

/* Table toolbar spacing */
.table-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ============================================
   RESPONSIVE - Scroll only on mobile
   ============================================ */

/* Desktop - Full width, no scroll */
@media (min-width: 769px) {
  .data-siswa-table {
    max-width: 100% !important; /* Full width desktop */
    width: 100% !important;
  }

  .content .card .table-responsive {
    overflow: visible !important;
  }
}

/* Mobile - Compact width with horizontal scroll */
@media (max-width: 768px) {
  .data-siswa-table {
    max-width: 650px !important; /* Lebar fixed untuk scroll */
    min-width: 650px !important;
    font-size: 13px;
  }

  .content .card .table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .data-siswa-table th,
  .data-siswa-table td {
    padding: 8px 6px;
  }

  .data-siswa-table .btn {
    padding: 4px 8px;
    font-size: 11px;
    margin: 0 1px;
  }

  .data-siswa-table .badge {
    font-size: 10px;
    padding: 4px 8px;
  }
}

@media (max-width: 480px) {
  .data-siswa-table {
    max-width: 600px !important;
    min-width: 600px !important;
  }

  .data-siswa-table th,
  .data-siswa-table td {
    padding: 7px 5px;
    font-size: 12px;
  }

  .data-siswa-table .btn {
    padding: 4px 6px;
    font-size: 10px;
    margin: 0 1px;
  }

  /* Hide buttons, keep icons */
  .data-siswa-table .btn {
    padding: 5px 8px;
  }
}

/* But keep DataTables responsive wrapper scrollable */
.dataTables_wrapper .table-responsive {
  overflow-x: auto !important;
  max-height: none !important;
}

/* Sticky header */
.table-simple thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--dark);
}

/* Sticky footer - TOTAL KESELURUHAN - Soft */
.table-simple tfoot tr {
  position: sticky;
  bottom: 0;
  z-index: 10;
  background: #374151;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.08);
}

.table-simple tfoot td {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 10px;
}

/* Design Format Card - seperti ss5 */
.design-format-card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
  overflow: hidden;
  padding: 28px;
}

.design-format-card h3 {
  color: var(--dark);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--light);
}

.design-format-summary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 24px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  color: white;
}

.design-format-summary h4 {
  color: white;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.summary-item {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

.summary-item:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.summary-item strong {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  opacity: 0.9;
  font-weight: 600;
}

.summary-item span {
  font-size: 13px;
  font-weight: 700;
  font-family: "Courier New", monospace;
  color: white;
}

/* Bootstrap-style Card System */
.bs-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  margin-bottom: 16px;
  overflow: hidden;
}

.bs-card-header {
  padding: 16px 20px;
  background: var(--light);
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
}

.bs-card-body {
  padding: 20px;
}

/* Bootstrap-style List Group */
.bs-list-group {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.bs-list-group-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text);
  transition: background-color 0.15s ease;
}

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

.bs-list-group-item:hover {
  background: var(--light);
}

.bs-list-group-item i {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.bs-list-group-item span {
  line-height: 1.5;
}

.bs-list-group-item span strong {
  color: var(--dark);
  font-weight: 600;
}

/* Bootstrap-style Badge */
.bs-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 10px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.bs-badge-secondary {
  background: var(--secondary);
}

.bs-badge-info {
  background: var(--info);
}

.bs-badge-success {
  background: var(--success);
}

.bs-badge-warning {
  background: var(--warning);
}

.bs-badge-danger {
  background: var(--danger);
}

/* Bootstrap-style Alert */
.bs-alert {
  border: 1px solid transparent;
  border-radius: var(--radius);
  margin-bottom: 16px;
  padding: 0;
  position: relative;
}

.bs-alert::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: var(--radius) 0 0 var(--radius) 0;
}

/* Alert Warning Style - Kuning muda seperti Bootstrap */
.bs-alert-warning {
  background: #fff3cd;
  border-color: #ffeaa7;
  color: #856404;
}

.bs-alert-warning::before {
  background: #f59e0b;
}

.bs-alert-content {
  padding: 16px 16px 16px 20px;
}

/* Override list group styles inside alert */
.bs-alert .bs-list-group {
  gap: 0;
}

.bs-alert .bs-list-group-item {
  background: transparent;
  border-bottom: 1px solid rgba(133, 100, 4, 0.1);
  padding: 10px 0;
  transition: background-color 0.15s ease;
}

.bs-alert .bs-list-group-item:hover {
  background: rgba(255, 255, 255, 0.5);
}

.bs-alert .bs-list-group-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.bs-alert .bs-list-group-item:first-child {
  padding-top: 0;
}

/* Alert variants */
.bs-alert-primary {
  background: #cfe2ff;
  border-color: #b6d4fe;
  color: #084298;
}

.bs-alert-primary::before {
  background: #0d6efd;
}

.bs-alert-success {
  background: #d1e7dd;
  border-color: #badbcc;
  color: #0f5132;
}

.bs-alert-success::before {
  background: #198754;
}

.bs-alert-info {
  background: #cff4fc;
  border-color: #b6effb;
  color: #055160;
}

.bs-alert-info::before {
  background: #0dcaf0;
}

.bs-alert-danger {
  background: #f8d7da;
  border-color: #f5c2c7;
  color: #842029;
}

.bs-alert-danger::before {
  background: #dc3545;
}
.bs-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 10px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.bs-badge-secondary {
  background: var(--secondary);
}

.bs-badge-info {
  background: var(--info);
}

.bs-badge-success {
  background: var(--success);
}

.bs-badge-warning {
  background: var(--warning);
}

.bs-badge-danger {
  background: var(--danger);
}

/* Import Tabs - Bootstrap style */
.import-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
  flex-wrap: wrap;
}

.import-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-light);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.import-tab-btn:hover {
  color: var(--primary);
  background: rgba(102, 126, 234, 0.05);
}

.import-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.import-tab-btn i {
  font-size: 16px;
}

/* Responsive untuk tabs */
@media (max-width: 768px) {
  .import-tabs {
    flex-direction: column;
    gap: 0;
  }

  .import-tab-btn {
    width: 100%;
    justify-content: center;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
  }

  .import-tab-btn.active {
    border-bottom: 1px solid var(--border);
    border-left: 3px solid var(--primary);
  }
}

/* Text color utilities */
.text-primary {
  color: var(--primary) !important;
}

.text-secondary {
  color: var(--secondary) !important;
}

.text-success {
  color: var(--success) !important;
}

.text-info {
  color: var(--info) !important;
}

.text-warning {
  color: var(--warning) !important;
}

.text-danger {
  color: var(--danger) !important;
}

.text-muted {
  color: var(--text-light) !important;
}

/* Info Simple List - Tanpa animasi/card */
.info-simple-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.info-simple-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
}

.info-simple-item i {
  font-size: 16px;
  color: var(--primary);
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.info-simple-item i.warning {
  color: var(--warning);
}

.info-simple-item i.success {
  color: var(--success);
}

.info-simple-item span {
  line-height: 1.5;
}

.info-simple-item span strong {
  color: var(--dark);
  font-weight: 600;
}

/* CSV Columns - Simple badge */
.csv-columns {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.csv-columns:last-child {
  border-bottom: none;
}

.column-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.column-badge.secondary {
  background: var(--secondary);
}

.column-badge.info {
  background: var(--info);
}

/* Tips List - Sederhana dengan icon */
.tips-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tips-list-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: var(--light);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.tips-list-item:hover {
  background: rgba(102, 126, 234, 0.08);
  transform: translateX(4px);
}

.tips-list-item .tips-icon {
  font-size: 18px;
  color: var(--success);
  flex-shrink: 0;
  margin-top: 2px;
}

/* Variasi warna icon */
.tips-list-item .tips-icon.warning {
  color: var(--warning);
}

.tips-list-item .tips-icon.info {
  color: var(--info);
}

.tips-list-item .tips-icon.primary {
  color: var(--primary);
}

.tips-list-item .tips-icon.success {
  color: var(--success);
}

/* Number badge untuk urutan kolom */
.tips-list-item .number-badge {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.tips-list-item:nth-child(2) .number-badge {
  background: var(--secondary);
}

.tips-list-item:nth-child(3) .number-badge {
  background: var(--info);
}

.tips-list-item span {
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
}

.tips-list-item span strong {
  color: var(--primary);
  font-weight: 600;
}

/* Body dan HTML styling untuk memastikan scroll berjalan dengan baik */
html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Container styling */
.container {
  flex: 1;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 20px;
}

/* Content div */
.content {
  width: 100%;
  animation: fadeIn 0.3s ease;
}

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

/* Checkbox siswa hover effect */
input[type="checkbox"] {
  cursor: pointer;
  width: 18px;
  height: 18px;
}

input[type="checkbox"]:checked {
  accent-color: var(--primary);
}

/* Style untuk checkbox label di filter siswa */
#filterSiswa label {
  position: relative;
  display: flex !important;
  align-items: center !important;
  gap: 12px;
  padding: 14px !important;
  border-width: 2px !important;
}

#filterSiswa label:hover {
  background: rgba(102, 126, 234, 0.08) !important;
  border-color: var(--primary) !important;
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

#filterSiswa label:has(input:checked) {
  background: rgba(102, 126, 234, 0.15) !important;
  border-color: var(--primary) !important;
  border-width: 2px !important;
  box-shadow: 0 2px 12px rgba(102, 126, 234, 0.25);
}

#filterSiswa label:has(input:checked)::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary);
  border-radius: 8px 0 0 8px;
}

/* Checkbox styling di filter siswa */
#filterSiswa input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  margin-top: 0;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

/* Nama siswa lebih menonjol */
#filterSiswa label > div {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

#filterSiswa label > div > div:first-child {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
}

#filterSiswa label > div > div:first-child:hover {
  white-space: normal;
  word-wrap: break-word;
  position: relative;
  z-index: 3;
  background: var(--white);
  padding: 4px;
  margin: -4px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#filterSiswa label > div > div:last-child {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Custom scrollbar untuk filter siswa */
#filterSiswa > div:first-of-type {
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--light);
}

#filterSiswa > div:first-of-type::-webkit-scrollbar {
  width: 8px;
}

#filterSiswa > div:first-of-type::-webkit-scrollbar-track {
  background: var(--light);
  border-radius: 4px;
}

#filterSiswa > div:first-of-type::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

#filterSiswa > div:first-of-type::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* Container untuk setiap kelas di filter siswa */
#filterSiswa > div:first-of-type > div {
  margin-bottom: 10px;
}

/* Header kelas di filter siswa */
#filterSiswa > div:first-of-type > div > div:first-child {
  position: sticky;
  top: 0;
  z-index: 5;
}

/* Grid untuk items siswa per kelas */
#filterSiswa > div:first-of-type > div > div:last-child {
  display: grid;
  gap: 8px;
  padding-left: 10px;
}

/* Style untuk checkbox kelas (chip style) */
.kelas-chip-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  background: white;
  padding: 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.kelas-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 12px 20px;
  background: var(--light);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  overflow: hidden;
}

.kelas-chip:hover {
  border-color: var(--primary);
  background: rgba(102, 126, 234, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

/* Sembunyikan checkbox asli */
.kelas-chip input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Text styling */
.kelas-chip-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: all 0.25s ease;
  position: relative;
  z-index: 1;
  letter-spacing: 0.3px;
}

/* Check icon - hidden by default */
.kelas-chip-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: 10px;
  background: var(--white);
  border-radius: 6px;
  opacity: 0;
  transform: scale(0) rotate(-45deg);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  color: var(--primary);
  font-size: 11px;
}

/* Checked state */
.kelas-chip:has(input:checked) {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
  transform: translateY(-2px);
}

.kelas-chip:has(input:checked) .kelas-chip-text {
  color: var(--white);
  font-weight: 600;
}

.kelas-chip:has(input:checked) .kelas-chip-check {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  background: rgba(255, 255, 255, 0.25);
  color: var(--white);
}

/* Ripple effect on click */
.kelas-chip::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(102, 126, 234, 0.3);
  transform: translate(-50%, -50%);
  transition:
    width 0.4s ease,
    height 0.4s ease;
  pointer-events: none;
}

.kelas-chip:active::before {
  width: 300px;
  height: 300px;
}

/* Focus state untuk accessibility */
.kelas-chip:focus-within {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Responsive untuk chip */
@media (max-width: 768px) {
  .kelas-chip-container {
    gap: 8px;
    padding: 12px;
  }

  .kelas-chip {
    padding: 8px 14px;
    font-size: 13px;
  }

  .kelas-chip-text {
    font-size: 13px;
  }
}

/* ============================================
   MODERN REPORT PAGE STYLES - Soft & Clean
   ============================================ */

/* Content Header */
.content-header {
  margin-bottom: 24px;
}

.content-header h2 {
  font-size: 26px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
}

.content-subtitle {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 400;
}

/* Modern Report Tabs - Soft & Clean */
.report-tabs-wrapper {
  margin-bottom: 24px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  padding: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.report-tabs-wrapper::-webkit-scrollbar {
  height: 3px;
}

.report-tabs-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

.report-tabs-wrapper::-webkit-scrollbar-thumb {
  background: rgba(102, 126, 234, 0.3);
  border-radius: 10px;
}

.report-tabs {
  display: flex;
  gap: 6px;
  min-width: max-content;
}

.report-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-light);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.report-tab i {
  font-size: 15px;
  opacity: 0.7;
}

.report-tab:hover {
  background: #f3f4f6;
  color: var(--text);
}

.report-tab:hover i {
  opacity: 1;
}

.report-tab.active {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.2);
}

.report-tab.active i {
  opacity: 1;
}

/* Card Variants - Soft */
.card-filter {
  background: #fafafa;
  border: 1px solid #e5e7eb;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 12px;
}

.filter-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e5e7eb;
}

.filter-header i {
  font-size: 18px;
  color: var(--primary);
}

.filter-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
  margin: 0;
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: end;
}

.form-action {
  text-align: right;
}

.required {
  color: var(--danger);
  font-weight: 600;
}

.card-report {
  overflow: visible;
}

/* Modern Report Header - Clean */
.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
  flex-wrap: wrap;
}

.report-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--dark);
}

/* Modern Export Button - Soft */
.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #10b981;
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-export:hover {
  background: #059669;
}

.btn-export:active {
  transform: translateY(1px);
}

/* Modern Alert - Soft */
.alert-modern {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 400;
}

.alert-modern.alert-warning {
  background: #fef3c7;
  color: #92400e;
}

.alert-modern.alert-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  opacity: 0.8;
}

.alert-modern.alert-warning .alert-icon {
  color: var(--warning);
}

/* Inline Filter Form - Soft */
.filter-form-inline {
  margin-bottom: 20px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

.filter-group-inline {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: end;
}

.form-group-inline {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group-inline label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-group-inline label i {
  font-size: 13px;
  color: var(--primary);
  opacity: 0.7;
}

.form-group-inline input,
.form-group-inline select {
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  font-family: "Inter", sans-serif;
  transition: all 0.2s;
  min-width: 160px;
}

.form-group-inline input:focus,
.form-group-inline select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.08);
}

/* Filter Button - Soft */
.btn-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-filter:hover {
  background: var(--primary-dark);
}

.btn-filter:active {
  transform: translateY(1px);
}

/* Search Siswa - Modern Style */
#search-siswa {
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s;
}

#search-siswa:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.08);
}

/* Table Improvements for Report - Soft */
.table-simple tbody tr {
  transition: background 0.15s ease;
}

.table-simple tbody tr:hover {
  background: #f9fafb;
}

.table-simple tbody td {
  position: relative;
}

/* Modern badge styling in tables - Soft */
.table-simple tbody td .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
}

/* Total row improvements - Soft */
.table-simple tfoot tr,
.table-simple .total-row {
  background: #1f2937 !important;
}

.table-simple tfoot td,
.table-simple .total-row td {
  color: var(--white) !important;
  font-weight: 600;
}

/* Separator row - Soft */
.separator-row td {
  background: #f9fafb !important;
  border: none;
  padding: 8px !important;
}

/* ============================================
   SUMMARY CARD STYLING
   ============================================ */

.summary-card {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.summary-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-radius: 10px;
  font-size: 20px;
  flex-shrink: 0;
}

.summary-icon-secondary {
  background: linear-gradient(135deg, #10b981, #059669);
}

.summary-content {
  flex: 1;
}

.summary-label {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.summary-value {
  font-size: 19px;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.2;
}

.summary-divider {
  width: 1px;
  background: linear-gradient(to bottom, transparent, #e5e7eb, transparent);
  margin: 0 6px;
}

/* Responsive summary card */
@media (max-width: 768px) {
  .summary-card {
    flex-direction: column;
    gap: 12px;
    padding: 14px;
  }

  .summary-item {
    width: 100%;
  }

  .summary-divider {
    width: 100%;
    height: 1px;
    margin: 0;
  }

  .summary-value {
    font-size: 16px;
  }

  .summary-icon {
    width: 42px;
    height: 42px;
    font-size: 18px;
  }

  .summary-label {
    font-size: 11px;
  }
}

/* ============================================
   BOOTSTRAP TABLE CUSTOMIZATION
   ============================================ */

/* Table improvements */
.table-responsive {
  margin: 0;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
}

.table {
  margin-bottom: 0;
}

.table thead th {
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: none;
}

.table tbody td {
  font-size: 14px;
  vertical-align: middle;
}

.table .table-dark {
  --bs-table-bg: #374151;
  --bs-table-color: #fff;
}

/* Badge styling */
.badge {
  font-weight: 600;
  padding: 6px 12px;
  font-size: 12px;
}

/* Button styling in table */
.table .btn {
  font-size: 12px;
  padding: 6px 14px;
}

/* Responsive Styles - Soft */
@media (max-width: 768px) {
  .content-header h2 {
    font-size: 20px;
  }

  .content-subtitle {
    font-size: 13px;
  }

  .report-tabs {
    gap: 4px;
  }

  .report-tab {
    padding: 10px 14px;
    font-size: 13px;
  }

  .report-tab span {
    display: none;
  }

  .report-tab i {
    font-size: 16px;
  }

  .report-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .report-title {
    font-size: 15px;
  }

  .btn-export {
    width: 100%;
    justify-content: center;
  }

  .filter-row {
    grid-template-columns: 1fr;
  }

  .form-action {
    text-align: left;
  }

  .filter-group-inline {
    flex-direction: column;
    width: 100%;
  }

  .form-group-inline {
    width: 100%;
  }

  .form-group-inline input,
  .form-group-inline select {
    width: 100%;
    min-width: auto;
  }

  .card-filter,
  .filter-form-inline {
    padding: 16px;
  }

  .filter-header {
    margin-bottom: 14px;
    padding-bottom: 12px;
  }

  .filter-header h3 {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .content-header h2 {
    font-size: 18px;
  }

  .content-subtitle {
    font-size: 12px;
  }

  .report-tab {
    padding: 8px 12px;
  }

  .btn-export,
  .btn-filter {
    padding: 9px 14px;
    font-size: 13px;
  }

  .alert-modern {
    padding: 12px 14px;
    font-size: 13px;
  }

  .table-simple {
    font-size: 12px;
  }

  .table-simple thead th,
  .table-simple tbody td {
    padding: 10px 8px;
  }
}

/* ============================================
   DETAIL SISWA PAGE - Professional Layout
   ============================================ */

.detail-page {
  max-width: 1200px;
  margin: 0 auto;
}

/* Header Section */
.detail-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  gap: 20px;
}

.detail-page-title h1 {
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
  margin: 8px 0 0 0;
  letter-spacing: -0.5px;
}

.detail-breadcrumb {
  margin-bottom: 4px;
}

.detail-breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #6366f1;
  text-decoration: none;
  transition: color 0.2s ease;
}

.detail-breadcrumb a:hover {
  color: #4f46e5;
}

.detail-page-actions {
  display: flex;
  gap: 10px;
}

/* Student Card */
.detail-student-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.student-avatar {
  width: 72px;
  height: 72px;
  min-width: 72px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

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

.student-name {
  font-size: 22px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 12px 0;
  letter-spacing: -0.5px;
}

.student-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

.meta-item i {
  font-size: 16px;
  color: #9ca3af;
}

/* Stats Grid */
.detail-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: hsl(236, 89%, 47%);
  border: 1px solid #244586;
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.stat-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.stat-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.stat-primary .stat-icon {
  background: #eff6ff;
  color: #3b82f6;
}

.stat-secondary .stat-icon {
  background: #fdf4ff;
  color: #a855f7;
}

.stat-content {
  flex: 1;
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.2;
}

/* Detail Card */
.detail-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.detail-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.detail-card-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-card-header h3 i {
  color: #9ca3af;
  font-size: 18px;
}

.detail-card-count {
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  background: #f3f4f6;
  padding: 6px 12px;
  border-radius: 20px;
}

/* Table Wrapper */
.detail-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.detail-table thead {
  background: #f9fafb;
  border-bottom: 2px solid #e5e7eb;
}

.detail-table thead th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-table tbody tr {
  border-bottom: 1px solid #e5e7eb;
  transition: background-color 0.15s ease;
}

.detail-table tbody tr:hover {
  background: #f9fafb;
}

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

.detail-table tbody td {
  padding: 14px 16px;
  color: #374151;
  vertical-align: middle;
}

.detail-table .text-center {
  text-align: center;
}

.detail-table .text-end {
  text-align: right;
}

.detail-table strong {
  font-weight: 600;
  color: #1f2937;
}

.detail-table .text-muted {
  color: #9ca3af;
}

.detail-table em.text-muted {
  font-style: italic;
}

/* Empty State */
.empty-row td {
  padding: 40px 20px !important;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: #9ca3af;
}

.empty-state i {
  font-size: 48px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 14px;
  font-weight: 500;
  margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .detail-page-header {
    flex-direction: column;
    gap: 16px;
  }

  .detail-page-title h1 {
    font-size: 22px;
  }

  .detail-page-actions {
    width: 100%;
  }

  .detail-page-actions .btn {
    flex: 1;
    justify-content: center;
  }

  .detail-student-card {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }

  .student-meta {
    justify-content: center;
  }

  .detail-stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    padding: 16px 20px;
  }

  .stat-value {
    font-size: 18px;
  }

  .detail-card {
    padding: 16px;
  }

  .detail-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .detail-table thead th,
  .detail-table tbody td {
    padding: 12px 10px;
    font-size: 13px;
  }

  .empty-state i {
    font-size: 36px;
  }
}

@media (max-width: 480px) {
  .student-avatar {
    width: 60px;
    height: 60px;
    min-width: 60px;
    font-size: 24px;
  }

  .student-name {
    font-size: 18px;
  }

  .student-meta {
    flex-direction: column;
    gap: 8px;
  }

  .stat-card {
    padding: 14px 16px;
  }

  .stat-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    font-size: 18px;
  }

  .stat-value {
    font-size: 16px;
  }
}

/* ============================================
   KELOLA SEKOLAH PAGE - Professional Flat Design
   ============================================ */

.manage-page {
  max-width: 1200px;
  margin: 0 auto;
}

/* Header */
.manage-header {
  margin-bottom: 24px;
}

.manage-title h1 {
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 8px 0;
  letter-spacing: -0.5px;
}

.manage-title p {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

/* Tabs */
.manage-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: #f3f4f6;
  padding: 4px;
  border-radius: 12px;
  width: fit-content;
}

.manage-tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
}

.manage-tab-btn:hover {
  background: #e5e7eb;
  color: #374151;
}

.manage-tab-btn.active {
  background: #ffffff;
  color: #6366f1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.manage-tab-btn i {
  font-size: 16px;
}

/* Tab Content */
.manage-tab-content {
  display: none;
}

.manage-tab-content.active {
  display: block;
}

/* Card */
.manage-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.manage-card-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.manage-card-header h2 {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.manage-card-header h2 i {
  color: #6366f1;
  font-size: 18px;
}

.manage-card-body {
  padding: 24px;
}

/* Form */
.manage-form {
  margin: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.form-item {
  margin-bottom: 16px;
}

.form-item:last-child {
  margin-bottom: 0;
}

.form-item label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.form-item .required {
  color: #ef4444;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  color: #1f2937;
  background: #ffffff;
  transition: all 0.2s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input::placeholder {
  color: #9ca3af;
}

.form-input.readonly {
  background: #f9fafb;
  color: #6b7280;
  cursor: default;
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.form-help {
  display: block;
  font-size: 12px;
  color: #6b7280;
  margin-top: 6px;
}

/* Input with Button */
.input-with-button {
  display: flex;
  gap: 8px;
}

.input-with-button .form-input {
  flex: 1;
}

.input-button {
  padding: 10px 16px;
  background: #6366f1;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-button:hover {
  background: #4f46e5;
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

/* Table */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.manage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.manage-table thead {
  background: #f9fafb;
  border-bottom: 2px solid #e5e7eb;
}

.manage-table thead th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.manage-table tbody tr {
  border-bottom: 1px solid #e5e7eb;
  transition: background 0.15s ease;
}

.manage-table tbody tr:hover {
  background: #f9fafb;
}

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

.manage-table tbody td {
  padding: 14px 16px;
  color: #374151;
  vertical-align: middle;
}

.manage-table .text-center {
  text-align: center;
}

/* Table Elements */
.school-name {
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 4px;
}

.school-code {
  font-size: 12px;
  color: #6b7280;
}

.school-name-simple {
  color: #374151;
}

.contact-info {
  font-size: 13px;
}

.contact-info div {
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #4b5563;
}

.contact-info i {
  font-size: 12px;
  color: #9ca3af;
}

.admin-name {
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 4px;
}

.admin-username {
  font-size: 12px;
  color: #6b7280;
}

/* Badge */
.badge-count {
  display: inline-block;
  background: #eff6ff;
  color: #3b82f6;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-badge.status-active {
  background: #ecfdf5;
  color: #059669;
}

.status-badge.status-inactive {
  background: #fef3c7;
  color: #d97706;
}

/* Action Buttons */
.action-buttons {
  display: inline-flex;
  gap: 6px;
  justify-content: center;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  font-size: 14px;
}

.btn-icon.btn-primary {
  background: #6366f1;
  color: #ffffff;
}

.btn-icon.btn-primary:hover {
  background: #4f46e5;
}

.btn-icon.btn-success {
  background: #10b981;
  color: #ffffff;
}

.btn-icon.btn-success:hover {
  background: #059669;
}

.btn-icon.btn-warning {
  background: #f59e0b;
  color: #ffffff;
}

.btn-icon.btn-warning:hover {
  background: #d97706;
}

.btn-icon.btn-danger {
  background: #ef4444;
  color: #ffffff;
}

.btn-icon.btn-danger:hover {
  background: #dc2626;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

.modal-box {
  background: #ffffff;
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

.modal-overlay.show .modal-box {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.modal-close {
  background: transparent;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: #f3f4f6;
  color: #6b7280;
}

.modal-close i {
  font-size: 20px;
}

.modal-form {
  padding: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

/* Responsive */
@media (max-width: 768px) {
  .manage-title h1 {
    font-size: 22px;
  }

  .manage-tabs {
    width: 100%;
  }

  .manage-tab-btn {
    flex: 1;
    justify-content: center;
    padding: 10px 16px;
  }

  .manage-tab-btn span {
    display: none;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .manage-card-header,
  .manage-card-body {
    padding: 16px;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .manage-table thead th,
  .manage-table tbody td {
    padding: 12px 10px;
    font-size: 13px;
  }

  .modal-box {
    margin: 20px;
  }

  .modal-header,
  .modal-form,
  .modal-footer {
    padding: 16px;
  }

  .modal-footer {
    flex-direction: column;
  }

  .modal-footer .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .manage-card-header h2 {
    font-size: 14px;
  }

  .form-input,
  .form-textarea,
  .form-select {
    padding: 8px 12px;
    font-size: 13px;
  }

  .action-buttons {
    flex-direction: column;
  }

  .btn-icon {
    width: 100%;
  }
}

/* ============================================
   DATATABLES FOR KELOLA SEKOLAH
   ============================================ */

.manage-card .dataTables_wrapper {
  padding: 0;
}

.manage-card .dataTables_wrapper .dataTables_length,
.manage-card .dataTables_wrapper .dataTables_filter {
  padding: 12px 16px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
}

.manage-card .dataTables_wrapper .dataTables_length {
  float: none;
  text-align: left;
}

.manage-card .dataTables_wrapper .dataTables_length select {
  padding: 6px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  color: #374151;
  background: #ffffff;
  margin-left: 8px;
}

.manage-card .dataTables_wrapper .dataTables_filter {
  float: none;
  text-align: right;
}

.manage-card .dataTables_wrapper .dataTables_filter input {
  padding: 6px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  color: #374151;
  background: #ffffff;
  margin-left: 8px;
  width: 200px;
}

.manage-card .dataTables_wrapper .dataTables_filter input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.manage-card .dataTables_wrapper .dataTables_info {
  padding: 12px 16px;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  font-size: 13px;
  color: #6b7280;
  float: none;
  text-align: left;
}

.manage-card .dataTables_wrapper .dataTables_paginate {
  padding: 12px 16px;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  float: none;
  text-align: right;
}

.manage-card .dataTables_wrapper .dataTables_paginate .paginate_button {
  padding: 6px 12px;
  margin: 0 2px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #ffffff;
  color: #6b7280;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.manage-card .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
  color: #374151;
}

.manage-card .dataTables_wrapper .dataTables_paginate .paginate_button.current,
.manage-card
  .dataTables_wrapper
  .dataTables_paginate
  .paginate_button.current:hover {
  background: #6366f1;
  border-color: #6366f1;
  color: #ffffff;
}

.manage-card
  .dataTables_wrapper
  .dataTables_paginate
  .paginate_button.disabled {
  opacity: 0.5;
  cursor: default;
}

.manage-card
  .dataTables_wrapper
  .dataTables_paginate
  .paginate_button.disabled:hover {
  background: #ffffff;
  border-color: #d1d5db;
  color: #6b7280;
}

.manage-card .dataTables_wrapper .dataTables_paginate .paginate_button.first,
.manage-card .dataTables_wrapper .dataTables_paginate .paginate_button.last {
  display: none;
}

/* DataTable table styling */
.manage-card .table.dataTable {
  margin: 0;
}

.manage-card .table.dataTable thead th {
  padding: 14px 16px;
}

.manage-card .table.dataTable tbody td {
  padding: 14px 16px;
}

/* DataTable sorting icons */
.manage-card .table.dataTable thead .sorting,
.manage-card .table.dataTable thead .sorting_asc,
.manage-card .table.dataTable thead .sorting_desc {
  cursor: pointer;
  position: relative;
  padding-right: 30px;
}

.manage-card .table.dataTable thead .sorting:after,
.manage-card .table.dataTable thead .sorting_asc:after,
.manage-card .table.dataTable thead .sorting_desc:after {
  position: absolute;
  right: 10px;
  opacity: 0.5;
}

.manage-card .table.dataTable thead .sorting_asc:after {
  content: "\f0de";
  opacity: 1;
}

.manage-card .table.dataTable thead .sorting_desc:after {
  content: "\f0dd";
  opacity: 1;
}

/* Responsive DataTables */
@media (max-width: 768px) {
  .manage-card .dataTables_wrapper .dataTables_length,
  .manage-card .dataTables_wrapper .dataTables_filter,
  .manage-card .dataTables_wrapper .dataTables_info,
  .manage-card .dataTables_wrapper .dataTables_paginate {
    padding: 10px 12px;
  }

  .manage-card .dataTables_wrapper .dataTables_length select,
  .manage-card .dataTables_wrapper .dataTables_filter input {
    width: 100%;
    margin: 8px 0 0 0;
  }

  .manage-card .dataTables_wrapper .dataTables_length,
  .manage-card .dataTables_wrapper .dataTables_filter {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Info Cards */
.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.info-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}

.info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.info-card-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  flex-shrink: 0;
}

.info-card-content {
  flex: 1;
}

.info-card-label {
  font-size: 13px;
  color: #666;
  margin-bottom: 5px;
}

.info-card-value {
  font-size: 28px;
  font-weight: 700;
  color: #333;
}

@media (max-width: 768px) {
  .info-cards {
    grid-template-columns: 1fr;
  }
}
