﻿/* =========================================================
   STYLE.CSS - SISTEM TANGGUNGAN SISWA & CETAK KWITANSI A6
   ========================================================= */

:root {
  --primary: #1e3a8a;          /* Deep School Blue */
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --secondary: #0f172a;        /* Slate 900 */
  --accent: #0284c7;           /* Sky Blue */
  
  --success: #15803d;          /* Green Lunas */
  --success-bg: #dcfce7;
  --warning: #b45309;          /* Amber Cicilan */
  --warning-bg: #fef3c7;
  --danger: #b91c1c;           /* Red Belum Bayar */
  --danger-bg: #fee2e2;

  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --border-focus: #3b82f6;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-white: #ffffff;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.07);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ==================== HEADER ==================== */
.app-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(30, 58, 138, 0.25);
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--secondary);
}

.brand-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.staff-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  padding: 6px 14px;
  border-radius: 9999px;
  border: none;
}

.staff-avatar {
  width: 32px;
  height: 32px;
  background: rgba(2, 132, 199, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(2, 132, 199, 0.4);
  box-shadow: 0 4px 6px -1px rgba(2, 132, 199, 0.1), 0 2px 4px -1px rgba(2, 132, 199, 0.06);
  color: #0284c7;
  font-weight: 700;
  font-size: 0.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden; /* Ensure image fits inside nicely */
}

.staff-text {
  display: flex;
  flex-direction: column;
}

.staff-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.staff-role {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  text-decoration: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.25);
}

.btn-secondary {
  background: var(--secondary);
  color: #ffffff;
}
.btn-secondary:hover {
  background: #1e293b;
}

.btn-outline {
  background: #ffffff;
  color: var(--text-main);
  border-color: var(--border);
}
.btn-outline:hover {
  background: var(--bg-main);
  border-color: #cbd5e1;
}

.btn-danger {
  background: var(--danger);
  color: #ffffff;
}
.btn-danger:hover {
  background: #991b1b;
  box-shadow: 0 4px 12px rgba(185, 28, 28, 0.25);
}

.btn-danger-soft {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}
.btn-danger-soft:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}

.btn-outline.text-red:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}

/* ==================== MAIN LAYOUT ==================== */
.main-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

/* ==================== STATS CARDS ==================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon-blue { background: #eff6ff; color: #2563eb; }
.icon-green { background: #dcfce7; color: #16a34a; }
.icon-red { background: #fee2e2; color: #dc2626; }
.icon-purple { background: #f3e8ff; color: #9333ea; }

.stat-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

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

.stat-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.stat-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.text-green { color: var(--success) !important; }
.text-red { color: var(--danger) !important; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0;
}

/* ==================== TABS ==================== */
.tab-navigation {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.tab-btn:hover {
  color: var(--primary);
}
.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

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

/* ==================== PANEL & TABLES ==================== */
.panel {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.panel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.panel-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--secondary);
}

.panel-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.search-box {
  position: relative;
  min-width: 250px;
}
.search-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.search-box input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.search-box input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.select-box {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}
.select-box select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.85rem;
  background-color: #fff;
  cursor: pointer;
  outline: none;
}
.select-box select:focus {
  border-color: var(--border-focus);
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-container {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.data-table thead {
  background-color: #f1f5f9;
  border-bottom: 2px solid var(--border);
}

.data-table th {
  padding: 12px 14px;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tbody tr:hover {
  background-color: #f8fafc;
}

.table-footer {
  padding: 12px 4px 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==================== BADGES ==================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-neutral { background: #f1f5f9; color: #475569; }

/* Action Buttons inside Table */
.action-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ==================== FORMS & SETTINGS ==================== */
.settings-panel {
  max-width: 800px;
}

.settings-form {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.form-group label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.875rem;
  background-color: #fff;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-row {
  display: flex;
  gap: 16px;
}

.input-rupiah-group {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
}

.rupiah-prefix {
  background: #f1f5f9;
  padding: 9px 14px;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--text-muted);
  border-right: 1px solid var(--border);
}

.input-rupiah-group input {
  border: none !important;
  width: 100%;
}

.terbilang-preview {
  font-style: italic;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.settings-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

/* ==================== MODALS ==================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 50;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 620px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.receipt-modal-card {
  max-width: 780px;
}

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

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--secondary);
}

.modal-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover {
  color: var(--danger);
}

.modal-card form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.modal-body {
  padding: 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1 1 auto;
  min-height: 0;
}

.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.info-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 6px;
}
.info-row:last-child { margin-bottom: 0; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  text-align: center;
}

.item-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 160px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
}

.checkbox-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  cursor: pointer;
}
.checkbox-item:hover {
  background: #eff6ff;
}

.checkbox-label-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.printer-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-right: auto;
}

/* =========================================================
   KWITANSI A6 RESMI (SCREEN & MODAL PREVIEW)
   Ukuran Standar A6 Landscape: 148 mm x 105 mm
   ========================================================= */

.receipt-preview-wrapper {
  background: #e2e8f0;
  display: flex;
  justify-content: center;
  padding: 24px;
}

.receipt-box-a6 {
  width: 14cm;
  height: 9cm;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  padding: 4mm 6mm;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  font-family: 'Times New Roman', Times, serif; /* Klasik & Resmi untuk Kwitansi */
  color: #000;
  position: relative;
  border: 1px solid #cbd5e1;
}

/* Watermark LUNAS jika tagihan berstatus lunas */
.receipt-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-18deg);
  font-size: 3.2rem;
  font-weight: 900;
  color: rgba(22, 163, 74, 0.12);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  pointer-events: none;
  border: 3px solid rgba(22, 163, 74, 0.15);
  padding: 4px 20px;
  border-radius: 8px;
}

/* Kop Sekolah Kwitansi */
.receipt-kop {
  display: flex;
  align-items: center;
  border-bottom: 2px solid #000;
  padding-bottom: 5px;
  margin-bottom: 6px;
  position: relative;
}

.kop-logo {
  width: 42px;
  height: 42px;
  margin-right: 12px;
  object-fit: contain;
}

.kop-text {
  flex: 1;
  text-align: center;
}

.kop-text h2 {
  font-size: 11pt;
  font-weight: bold;
  letter-spacing: 0.5px;
  margin: 0;
  line-height: 1.1;
  text-transform: uppercase;
}

.kop-text p {
  font-size: 6.5pt;
  margin: 1px 0 0;
  line-height: 1.2;
}

/* Judul Kwitansi & Nomor */
.receipt-meta-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.receipt-title {
  font-size: 9.5pt;
  font-weight: bold;
  text-decoration: underline;
  letter-spacing: 1px;
}

.receipt-no {
  font-size: 8pt;
  font-family: 'Courier New', Courier, monospace;
  font-weight: bold;
}

/* Data Isi Kwitansi */
.receipt-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 8pt;
  line-height: 1.3;
  margin-bottom: 2px;
}

.receipt-data-table td {
  padding: 1.5px 0;
  vertical-align: top;
}

.receipt-label {
  width: 130px;
  white-space: nowrap;
}

.receipt-colon {
  width: 12px;
  text-align: center;
}

.receipt-value {
  font-weight: 500;
}

.receipt-value-strong {
  font-weight: bold;
}

.terbilang-box {
  background: #f1f5f9;
  border: 1px dashed #64748b;
  padding: 3px 6px;
  font-style: italic;
  font-size: 7.5pt;
  font-weight: bold;
  margin: 2px 0 4px;
  border-radius: 3px;
}

/* Sisa Tanggungan Banner di Kwitansi */
.receipt-status-summary {
  display: flex;
  justify-content: space-between;
  font-size: 8pt;
  background: #fafafa;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  padding: 3px 6px;
  margin-bottom: 6px;
}

/* Kolom Tanda Tangan */
.receipt-signatures {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  font-size: 8pt;
}

.sig-col {
  width: 160px;
  text-align: center;
}

.sig-date {
  font-size: 7.5pt;
  margin-bottom: 2px;
}

.sig-role {
  margin-bottom: 34px; /* Space untuk tanda tangan basah & stempel */
}

.sig-name {
  font-weight: bold;
  text-decoration: underline;
}

.sig-nip {
  font-size: 7pt;
}

/* =========================================================
   MEDIA PRINT KHUSUS UKURAN KERTAS A6
   148 mm x 105 mm (Landscape)
   ========================================================= */

#print-only-container {
  display: none;
}

@media print {
  /* Atur ukuran kertas kuitansi A6 secara presisi */
  @page {
    size: 14cm 9cm; /* 14cm lebar x 9cm tinggi (9x14) */
    margin: 0; /* Hindari default margin agar pas 1 lembar */
  }

  /* Sembunyikan semua elemen aplikasi web saat print */
  body * {
    visibility: hidden;
  }

  /* Tampilkan hanya wadah kuitansi cetak */
  #print-only-container,
  #print-only-container * {
    visibility: visible;
  }

  html, body {
    width: 14cm !important;
    height: 9cm !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important; /* Mencegah halaman berlebih */
  }

  #print-only-container {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    padding: 0;
    margin: 0;
    background: transparent;
    box-sizing: border-box;
  }

  .receipt-box-a6 {
    box-shadow: none !important;
    border: none !important;
    width: 100% !important;
    height: 100% !important;
    box-sizing: border-box !important;
    padding: 2mm 3mm !important;
  }

  .terbilang-box {
    background: transparent !important;
    border: 1px solid #000 !important;
  }

  .receipt-status-summary {
    background: transparent !important;
    border-color: #000 !important;
  }
}

/* =========================================================
   HALAMAN LOGIN MODERN & ELEGAN (ADMIN & STAF TU)
   ========================================================= */

.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 10% 20%, #0f172a 0%, #1e293b 50%, #0b1120 100%);
  position: relative;
  overflow: hidden;
  padding: 30px 20px;
}

/* Dynamic Glowing Orbs in Background */
.login-bg-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.25) 0%, rgba(14, 165, 233, 0.1) 40%, transparent 70%);
  top: -150px;
  right: -100px;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  animation: floatOrb 10s ease-in-out infinite alternate;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-60px, 80px) scale(1.15); }
}

.login-container {
  position: relative;
  z-index: 10;
  max-width: 1080px;
  width: 100%;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

/* SISI KIRI: HERO & FEATURE HIGHLIGHTS */
.login-hero {
  padding: 48px;
  background: linear-gradient(145deg, rgba(30, 58, 138, 0.35) 0%, rgba(15, 23, 42, 0.8) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 36px;
}

.hero-logo-box {
  width: 64px;
  height: 64px;
  background: #ffffff;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  padding: 6px;
}

.hero-school-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.hero-school-sub {
  font-size: 0.82rem;
  color: #94a3b8;
  margin-top: 4px;
  font-weight: 500;
}

.hero-features {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-bottom: 30px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.feature-icon {
  width: 40px;
  height: 40px;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-item h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 2px;
}

.feature-item p {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.4;
}

.hero-footer-note {
  font-size: 0.75rem;
  color: #64748b;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* SISI KANAN: CARD FORM LOGIN */
.login-card {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #ffffff;
}

.login-card-header {
  margin-bottom: 22px;
}

.login-badge {
  display: inline-block;
  padding: 4px 10px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 9999px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.login-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.03em;
}

.login-desc {
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 4px;
}

/* Role Selector Tabs */
.role-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: #f1f5f9;
  padding: 5px;
  border-radius: 12px;
  margin-bottom: 22px;
}

.role-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 12px;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: #64748b;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.role-tab:hover {
  color: #1e293b;
}

.role-tab.active {
  background: #ffffff;
  color: #1d4ed8;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-alert {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

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

.input-with-icon svg {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  pointer-events: none;
}

.input-with-icon input {
  width: 100%;
  padding: 11px 40px 11px 42px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  color: #0f172a;
  background-color: #f8fafc;
  outline: none;
  transition: all 0.2s ease;
}

.input-with-icon input:focus {
  background-color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.btn-toggle-password {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-toggle-password:hover {
  color: #475569;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
}

.remember-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #475569;
  font-weight: 500;
}
.remember-check input {
  accent-color: #2563eb;
  cursor: pointer;
}

.btn-login {
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #ffffff;
  padding: 13px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  margin-top: 4px;
}

.btn-login:hover {
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

/* Quick Demo Login Cards */
.quick-demo-section {
  margin-top: 20px;
}

.demo-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin-bottom: 12px;
}
.demo-divider::before,
.demo-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}
.demo-divider span {
  padding: 0 10px;
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.demo-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-demo {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 8px 10px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}
.btn-demo:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  transform: translateY(-1px);
}

.demo-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.75rem;
  color: #fff;
  flex-shrink: 0;
}
.tu-color { background: #0284c7; }
.admin-color { background: #7c3aed; }

.demo-text {
  display: flex;
  flex-direction: column;
}
.demo-text strong {
  font-size: 0.8rem;
  color: #1e293b;
  line-height: 1.2;
}
.demo-text small {
  font-size: 0.68rem;
  color: #64748b;
  line-height: 1.2;
}

/* HEADER LOGOUT BUTTON */
.btn-logout {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}
.btn-logout:hover {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
}

/* Responsive adjustment for login */
@media (max-width: 900px) {
  .login-container {
    grid-template-columns: 1fr;
  }
  .login-hero {
    padding: 32px 24px;
  }
  .login-card {
    padding: 32px 24px;
  }
  .demo-buttons {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   FITUR PENAGIHAN COMBO (KHUSUS ADMINISTRATOR)
   ========================================================= */

.btn-admin {
  background: linear-gradient(135deg, #6d28d9, #9333ea);
  color: #ffffff;
  border: 1px solid #7e22ce;
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.25);
}

.btn-admin:hover {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(109, 40, 217, 0.35);
}

.combo-modal-card {
  max-width: 680px;
}

.admin-modal-header {
  border-top: 4px solid #7c3aed;
  background: linear-gradient(180deg, #faf5ff 0%, #ffffff 100%);
}

.admin-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #d8b4fe;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 9999px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Target Mode Switcher (Per Kelas vs Per Siswa) */
.target-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}

.target-radio-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: flex-start;
  background: #f8fafc;
}

.target-radio-card input[type="radio"] {
  display: none;
}

.target-radio-content {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.target-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #e2e8f0;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.target-radio-card.active {
  border-color: #7c3aed;
  background: #faf5ff;
}

.target-radio-card.active .target-icon {
  background: #7c3aed;
  color: #ffffff;
}

.target-radio-card strong {
  font-size: 0.88rem;
  color: var(--secondary);
  display: block;
}

.target-radio-card p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
  margin-top: 2px;
}

.label-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.btn-text-action {
  background: transparent;
  border: none;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.btn-text-action:hover {
  text-decoration: underline;
}

.checkbox-select-helpers {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
}

.search-mini-box {
  margin-bottom: 8px;
}
.search-mini-box input {
  width: 100%;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  outline: none;
}
.search-mini-box input:focus {
  border-color: #7c3aed;
}

.students-checklist-container {
  max-height: 180px;
  overflow-y: auto;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #ffffff;
}

.student-check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  cursor: pointer;
  transition: background 0.15s ease;
  font-size: 0.85rem;
}
.student-check-row:hover {
  background: #f3e8ff;
}

.student-check-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.student-check-left input[type="checkbox"] {
  accent-color: #7c3aed;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Impact Summary Card */
.impact-summary-card {
  background: linear-gradient(135deg, #faf5ff 0%, #eff6ff 100%);
  border: 1.5px solid #e9d5ff;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-top: 4px;
}

.impact-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #6b21a8;
  margin-bottom: 10px;
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  text-align: center;
}

.impact-grid h4 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--secondary);
  margin-top: 2px;
}

.text-primary-dark {
  color: #6d28d9 !important;
}

/* =========================================================
   SEARCHABLE COMBOBOX SISWA (MODAL PEMBAYARAN)
   ========================================================= */

.custom-combobox {
  position: relative;
  width: 100%;
}

.combobox-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background-color: #ffffff;
  transition: all 0.2s ease;
  overflow: hidden;
}

.combobox-input-wrapper:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.combobox-search-icon {
  margin-left: 12px;
  color: #94a3b8;
  flex-shrink: 0;
  pointer-events: none;
}

.combobox-input {
  flex: 1;
  width: 100%;
  padding: 10px 12px;
  border: none !important;
  outline: none !important;
  font-family: inherit;
  font-size: 0.9rem;
  color: #0f172a;
  background: transparent;
}

.combobox-clear-btn {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  color: #94a3b8;
  cursor: pointer;
  padding: 0 8px;
  line-height: 1;
  transition: color 0.15s ease;
}
.combobox-clear-btn:hover {
  color: var(--danger);
}

.combobox-toggle-btn {
  background: #f8fafc;
  border: none;
  border-left: 1px solid var(--border);
  padding: 10px 12px;
  cursor: pointer;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.combobox-toggle-btn:hover {
  background: #f1f5f9;
  color: var(--primary);
}

.combobox-toggle-btn svg {
  transition: transform 0.2s ease;
}
.custom-combobox.open .combobox-toggle-btn svg {
  transform: rotate(180deg);
}

.combobox-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  max-height: 250px;
  overflow-y: auto;
  z-index: 70;
}

.custom-combobox.open .combobox-dropdown {
  display: block;
  animation: fadeIn 0.15s ease-out;
}

.combobox-option {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.15s ease;
}
.combobox-option:last-child {
  border-bottom: none;
}
.combobox-option:hover,
.combobox-option.highlighted {
  background-color: #eff6ff;
}
.combobox-option.selected {
  background-color: #dbeafe;
}

.combobox-option-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.combobox-option-title strong {
  font-size: 0.88rem;
  color: #0f172a;
}
.combobox-option-meta-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: #64748b;
}

.combobox-option-balance {
  text-align: right;
}
.combobox-option-balance .balance-amount {
  font-size: 0.85rem;
  font-weight: 700;
}
.combobox-option-balance .balance-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.combobox-empty {
  padding: 20px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.85rem;
  font-style: italic;
}

/* =========================================================
   IMPORT EXCEL MODAL & DROPZONE STYLING
   ========================================================= */

.import-modal-card {
  max-width: 680px;
}

.template-download-box {
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.template-info-text {
  display: flex;
  align-items: center;
  gap: 12px;
}
.template-info-text svg {
  color: #16a34a;
  flex-shrink: 0;
}
.template-info-text strong {
  font-size: 0.88rem;
  color: #14532d;
  display: block;
}
.template-info-text p {
  font-size: 0.78rem;
  color: #166534;
  margin: 0;
}
.template-info-text code {
  background: #dcfce7;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
  color: #15803d;
}

/* File Dropzone */
.file-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  background-color: #f8fafc;
  cursor: pointer;
  transition: all 0.2s ease;
}

.file-dropzone:hover,
.file-dropzone.dragover {
  border-color: #2563eb;
  background-color: #eff6ff;
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.dropzone-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #e0f2fe;
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.dropzone-content h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--secondary);
}

.dropzone-content p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================
   MASTER ADMIN, TAHUN AJARAN & USER MANAGEMENT
   ========================================== */

.badge-academic-year {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  border: 1px solid rgba(37, 99, 235, 0.25);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 9999px;
  letter-spacing: 0.01em;
}

.active-year-banner {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  color: #fff;
  flex-wrap: wrap;
  gap: 12px;
}

.active-year-tag {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #38bdf8;
  display: inline-block;
  margin-bottom: 4px;
}

.active-year-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0;
  color: #fff;
}

.active-year-desc {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 4px 0 0 0;
}

.badge-role-admin {
  background: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #d8b4fe;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-role-tu {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.user-avatar-badge {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.78rem;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.user-avatar-badge.admin {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
}

.user-avatar-badge.tu {
  background: linear-gradient(135deg, #2563eb, #0284c7);
}

.btn-set-active {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-set-active:hover {
  background: #059669;
  color: #fff;
  border-color: #059669;
}

/* ==================== STATS KHUSUS STAF TU (NON-RUPIAH) ==================== */
.stats-tu-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.tu-stats-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.tu-summary-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.tu-pill-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 30px;
  font-size: 0.85rem;
  color: var(--secondary);
}

.tu-pill-stat.danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.tu-pill-stat.success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.tu-pill-label {
  font-weight: 500;
  color: var(--text-muted);
}
.tu-pill-stat.danger .tu-pill-label {
  color: #b91c1c;
}
.tu-pill-stat.success .tu-pill-label {
  color: #15803d;
}

.tu-class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.tu-class-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

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

.tu-class-card.has-unpaid {
  border-left: 5px solid #dc2626;
  background: linear-gradient(to bottom, #ffffff, #fffdfd);
}

.tu-class-card.all-paid {
  border-left: 5px solid #16a34a;
  background: linear-gradient(to bottom, #ffffff, #fcfdfc);
}

.tu-class-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tu-class-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.tu-class-name svg {
  color: var(--primary);
}

.tu-class-total-badge {
  background: #f1f5f9;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 12px;
}

.tu-class-metric-box {
  background: #f8fafc;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid #e2e8f0;
  text-align: center;
}

.tu-metric-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.tu-metric-number {
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 4px 0;
}

.tu-metric-sub {
  margin-top: 4px;
}

.tu-breakdown-row {
  display: flex;
  justify-content: space-around;
  gap: 6px;
  background: #fff;
  padding: 8px 4px;
  font-size: 0.78rem;
  border-top: 1px dashed var(--border);
  border-bottom: 1px dashed var(--border);
}

.tu-breakdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.tu-breakdown-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
}

.tu-progress-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tu-progress-bar {
  width: 100%;
  height: 8px;
  background: #fee2e2;
  border-radius: 4px;
  display: flex;
  overflow: hidden;
}

.tu-bar-lunas {
  background: #16a34a;
  height: 100%;
  transition: width 0.3s ease;
}

.tu-bar-unpaid {
  background: #dc2626;
  height: 100%;
  transition: width 0.3s ease;
}

.tu-progress-caption {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.tu-filter-btn {
  width: 100%;
  justify-content: center;
  font-size: 0.8rem;
  padding: 7px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

/* ==========================================
   OPTIMASI PENERBITAN TAGIHAN PER SISWA
   ========================================== */
.combo-student-filter-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.combo-class-select {
  width: 175px;
  padding: 7px 10px;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: #ffffff;
  outline: none;
  font-weight: 500;
  color: var(--text-dark);
}

.combo-class-select:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.student-check-row.selected {
  background: #ede9fe;
  border: 1px solid #c4b5fd;
}

.student-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f3e8ff;
  border: 1px solid #d8b4fe;
  color: #6b21a8;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  margin: 2px;
}

.student-tag-pill button {
  background: none;
  border: none;
  color: #7c3aed;
  cursor: pointer;
  padding: 0;
  font-size: 0.9rem;
  line-height: 1;
  display: flex;
  align-items: center;
}

.student-tag-pill button:hover {
  color: #ef4444;
}

/* Inline Student Detail Billing Box */
.box-add-detail-bill {
  background: linear-gradient(135deg, #fdf4ff 0%, #f5f3ff 100%);
  border: 1.5px solid #d8b4fe;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 14px;
  animation: fadeIn 0.2s ease;
}

.box-add-detail-bill .form-group {
  margin-bottom: 8px;
}

.box-add-detail-bill label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #581c87;
  margin-bottom: 4px;
}

.box-add-detail-bill input,
.box-add-detail-bill select {
  font-size: 0.82rem;
  padding: 7px 10px;
  border: 1.5px solid #d8b4fe;
  border-radius: var(--radius-sm);
  width: 100%;
  background: #ffffff;
}

.box-add-detail-bill input:focus,
.box-add-detail-bill select:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
  outline: none;
}

/* ==================== Server BACKUP REPOSITORY STYLES ==================== */
.server-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #166534;
  transition: all 0.2s ease;
}

.server-status-badge.error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.server-status-badge.saving {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
  animation: pulseDot 2s infinite;
}

.server-status-badge.error .status-dot {
  background: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25);
  animation: none;
}

.server-status-badge.saving .status-dot {
  background: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
  animation: pulseDot 1s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.repo-hero-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.repo-hero-card::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.25) 0%, rgba(14, 165, 233, 0) 70%);
  border-radius: 50%;
}

.repo-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.repo-hero-title {
  font-size: 1.35rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f8fafc;
}

.repo-hero-subtitle {
  color: #94a3b8;
  font-size: 0.88rem;
  margin-top: 4px;
  max-width: 650px;
  line-height: 1.5;
}

.repo-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.repo-info-box {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  backdrop-filter: blur(8px);
}

.repo-info-label {
  font-size: 0.75rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.repo-info-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin-top: 2px;
  word-break: break-all;
}

.repo-info-sub {
  font-size: 0.72rem;
  color: #38bdf8;
  margin-top: 2px;
}

.repo-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  background: #ffffff;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.repo-toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-repo-backup {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff;
  border: none;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25);
}

.btn-repo-backup:hover {
  background: linear-gradient(135deg, #047857 0%, #059669 100%);
  transform: translateY(-1px);
}

.btn-restore {
  background: #f8fafc;
  color: #0284c7;
  border: 1px solid #bae6fd;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-restore:hover {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #7dd3fc;
}

.btn-delete-bkp {
  background: #fff;
  color: #dc2626;
  border: 1px solid #fecaca;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-delete-bkp:hover {
  background: #fee2e2;
  color: #b91c1c;
}

/* ==================== STATISTIK FINANSIAL PER ITEM TANGGUNGAN (ADMIN) ==================== */
.admin-finance-stats-section {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.admin-total-finance-box {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.finance-stat-pill {
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  min-width: 135px;
}

.finance-stat-pill.success {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.finance-stat-pill.danger {
  background: #fef2f2;
  border-color: #fecaca;
}

.finance-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.finance-stat-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--secondary);
  line-height: 1.3;
}

.item-progress-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.item-progress-bar {
  flex: 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.item-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  border-radius: 9999px;
  transition: width 0.4s ease;
}

.item-progress-fill.warning {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.item-progress-fill.danger {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.item-progress-text {
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 36px;
  text-align: right;
  color: var(--text-main);
}

/* ==================== BUKU KAS & ADVANCED EXPORT WIZARD ==================== */
.cashflow-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.cashflow-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.cashflow-card.in {
  border-left: 4px solid var(--success);
}

.cashflow-card.out {
  border-left: 4px solid var(--danger);
}

.cashflow-card.net {
  border-left: 4px solid var(--accent);
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
}

.cashflow-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cashflow-icon.in {
  background: var(--success-bg);
  color: var(--success);
}

.cashflow-icon.out {
  background: var(--danger-bg);
  color: var(--danger);
}

.cashflow-icon.net {
  background: #e0f2fe;
  color: #0284c7;
}

.cashflow-info .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--text-muted);
}

.cashflow-info .amount {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--secondary);
  line-height: 1.2;
  margin-top: 2px;
}

.cashflow-info .sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Export Wizard Box */
.export-wizard-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.export-wizard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.export-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
  background: var(--bg-main);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.export-filter-grid label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 6px;
  display: block;
}

.export-filter-grid select,
.export-filter-grid input {
  width: 100%;
  padding: 8px 10px;
  font-size: 0.82rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.col-selection-box {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.col-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.col-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.col-chip:hover {
  background: #e2e8f0;
}

.col-chip input:checked + span {
  color: var(--primary);
}

.export-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.badge-cash-in {
  background: #dcfce7;
  color: #15803d;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-cash-out {
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

tr.row-selected {
  background-color: #f0f9ff !important;
}





