/* 
   PP DIZWA CSS STYLESHEET
   Desain Premium Modern dengan Tema Emerald-Gold & Glassmorphism
   Dilengkapi tata letak responsif dan media cetak (print-friendly)
*/

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

:root {
  --primary: #0F5132;        /* Hijau Emerald Gelap */
  --primary-light: #198754;  /* Hijau Emerald Terang */
  --primary-rgb: 15, 81, 50;
  --accent: #D4AF37;         /* Emas Pesantren */
  --accent-hover: #B5942B;
  --bg-main: #f0f4f2;        /* Latar belakang abu-abu kehijauan lembut */
  --text-dark: #2d3748;
  --text-light: #ffffff;
  --text-muted: #718096;
  --card-bg: rgba(255, 255, 255, 0.85);
  --border-color: rgba(15, 81, 50, 0.15);
  --shadow-light: 0 8px 32px 0 rgba(0, 0, 0, 0.08);
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --danger: #dc3545;
  --success: #198754;
  --warning: #ffc107;
  --info: #0dcaf0;
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-main);
  background-image: 
    radial-gradient(at 0% 0%, rgba(25, 135, 84, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(212, 175, 55, 0.05) 0px, transparent 50%);
  color: var(--text-dark);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

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

.glass {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-light);
}

.text-center { text-align: center; }
.d-none { display: none !important; }

/* Tombol Premium */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  gap: 8px;
}

.btn-primary {
  background: var(--primary);
  color: var(--text-light);
}
.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 81, 50, 0.2);
}

.btn-accent {
  background: var(--accent);
  color: #1a1a1a;
}
.btn-accent:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

.btn-secondary {
  background: #e2e8f0;
  color: var(--text-dark);
}
.btn-secondary:hover {
  background: #cbd5e0;
}

.btn-danger {
  background: var(--danger);
  color: var(--text-light);
}
.btn-danger:hover {
  background: #bd2130;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
}

.btn-success {
  background: var(--success);
  color: var(--text-light);
}
.btn-success:hover {
  background: #146c43;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(25, 135, 84, 0.2);
}

/* Badges Status */
.badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-calon {
  background: rgba(255, 193, 7, 0.15);
  color: #b58200;
  border: 1px solid rgba(255, 193, 7, 0.3);
}

.badge-aktif {
  background: rgba(25, 135, 84, 0.15);
  color: #0f5132;
  border: 1px solid rgba(25, 135, 84, 0.3);
}

.badge-alumni {
  background: rgba(13, 202, 240, 0.15);
  color: #055160;
  border: 1px solid rgba(13, 202, 240, 0.3);
}

.badge-mutasi {
  background: rgba(220, 53, 69, 0.15);
  color: #842029;
  border: 1px solid rgba(220, 53, 69, 0.3);
}

.badge-gagal {
  background: rgba(220, 53, 69, 0.15);
  color: #dc3545;
  border: 1px solid rgba(220, 53, 69, 0.3);
}

/* Foto Profil rounded premium */
.detail-photo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.detail-photo-frame {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid var(--primary);
  padding: 3px;
  background: #fff;
  box-shadow: var(--shadow-light);
}

.detail-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.badge-lunas {
  background: rgba(25, 135, 84, 0.15);
  color: #0f5132;
  border: 1px solid rgba(25, 135, 84, 0.3);
}

.badge-belum-lunas {
  background: rgba(220, 53, 69, 0.15);
  color: #842029;
  border: 1px solid rgba(220, 53, 69, 0.3);
}

/* -------------------------------------------------------------
   HALAMAN LOGIN (login.html)
   ------------------------------------------------------------- */
.login-body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #09301e 0%, #155737 100%);
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 40px 30px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--text-light);
}

.login-logo {
  text-align: center;
  margin-bottom: 25px;
}

.login-logo img {
  width: 75px;
  height: 75px;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.15));
  margin-bottom: 10px;
  border-radius: 50%;
  object-fit: cover;
}

.login-logo h2 {
  font-size: 20px;
  letter-spacing: 1px;
  color: var(--accent);
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.login-logo p {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.9);
}

/* Modifikasi label untuk dark form di dashboard */
.dashboard-form label {
  color: var(--text-dark);
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  font-size: 14px;
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25);
}

.dashboard-form .form-input {
  background: #ffffff;
  color: var(--text-dark);
  border: 1px solid #cbd5e0;
}
.dashboard-form .form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 81, 50, 0.15);
}

.login-btn {
  width: 100%;
  padding: 14px;
  margin-top: 10px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.login-footer {
  text-align: center;
  margin-top: 25px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

/* -------------------------------------------------------------
   LAYOUT DASHBOARD UTAMA
   ------------------------------------------------------------- */
.dashboard-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

/* Sidebar Navigasi */
aside.sidebar {
  background: linear-gradient(180deg, #09301e 0%, #0F5132 100%);
  color: var(--text-light);
  padding: 30px 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.sidebar-brand h1 {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.5px;
}

.sidebar-brand p {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
}

/* Nav links */
.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.menu-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.menu-item a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-light);
}

.menu-item.active a {
  background: var(--accent);
  color: #1a1a1a;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.25);
}

/* Profile Admin Info di Sidebar */
.sidebar-profile {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-avatar-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: #1a1a1a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.admin-name-role h4 {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.admin-name-role p {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
}

.btn-logout {
  width: 100%;
  padding: 8px 12px;
  font-size: 12px;
  background: rgba(220, 53, 69, 0.15);
  color: #ff8585;
  border: 1px solid rgba(220, 53, 69, 0.3);
}

.btn-logout:hover {
  background: var(--danger);
  color: var(--text-light);
}

/* Konten Utama */
main.main-content {
  padding: 30px 40px;
  overflow-y: auto;
  max-height: 100vh;
}

.header-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.welcome-msg h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
}

.welcome-msg p {
  font-size: 14px;
  color: var(--text-muted);
}

/* -------------------------------------------------------------
   SECTION: DASHBOARD OVERVIEW
   ------------------------------------------------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-info h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.stat-info p.stat-number {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
}

.stat-icon {
  width: 50px;
  height: 50px;
  background: rgba(15, 81, 50, 0.08);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.stat-card:nth-child(2) .stat-icon {
  background: rgba(212, 175, 55, 0.15);
  color: var(--accent-hover);
}

/* -------------------------------------------------------------
   KONTEN UTAMA: TABEL DAN TAB
   ------------------------------------------------------------- */
.content-section {
  animation: fadeIn 0.4s ease-out;
}

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

.section-card {
  padding: 30px;
  margin-bottom: 30px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  border-bottom: 2px solid var(--bg-main);
  padding-bottom: 15px;
}

.section-header h3 {
  font-size: 18px;
  color: var(--primary);
  font-weight: 700;
}

/* Tab filter status santri */
.status-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid #e2e8f0;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn:hover {
  background: rgba(15, 81, 50, 0.05);
  color: var(--primary);
}

.tab-btn.active {
  background: var(--primary);
  color: var(--text-light);
  border-color: var(--primary);
}

/* Tabel Data */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
}

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

table.data-table th {
  background: #f7fafc;
  padding: 14px 18px;
  font-weight: 700;
  color: var(--text-dark);
  border-bottom: 2px solid #e2e8f0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

table.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid #e2e8f0;
  color: var(--text-dark);
  vertical-align: middle;
}

table.data-table tr:hover td {
  background: rgba(15, 81, 50, 0.02);
}

.action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 11px;
  border-radius: var(--radius-sm);
}

/* -------------------------------------------------------------
   MODAL DIALOG (Tambah data, cetak, dll)
   ------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(9, 48, 30, 0.4);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 30px;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  border-bottom: 1.5px solid var(--border-color);
  padding-bottom: 15px;
}

.modal-header h3 {
  font-size: 20px;
  color: var(--primary);
  font-weight: 700;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--danger);
}

/* -------------------------------------------------------------
   MULTISTEP FORM DESIGN
   ------------------------------------------------------------- */
.step-indicator {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
  position: relative;
  max-width: 450px;
  margin-left: auto;
  margin-right: auto;
}

.step-indicator::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 10%;
  width: 80%;
  height: 2.5px;
  background: #cbd5e0;
  z-index: 1;
}

.step-line-fill {
  position: absolute;
  top: 18px;
  left: 10%;
  width: 0%;
  height: 2.5px;
  background: var(--primary);
  z-index: 2;
  transition: var(--transition);
}

.step-node {
  position: relative;
  z-index: 3;
  text-align: center;
}

.step-number {
  width: 38px;
  height: 38px;
  background: #ffffff;
  border: 2px solid #cbd5e0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 6px;
  transition: var(--transition);
  margin-left: auto;
  margin-right: auto;
}

.step-node.active .step-number {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--text-light);
  box-shadow: 0 0 10px rgba(15, 81, 50, 0.25);
}

.step-node.completed .step-number {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--text-light);
}

.step-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.step-node.active .step-label {
  color: var(--primary);
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(15px); }
  to { opacity: 1; transform: translateX(0); }
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.form-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  border-left: 4px solid var(--accent);
  padding-left: 10px;
  margin: 25px 0 15px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-buttons-row {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #cbd5e0;
}

/* -------------------------------------------------------------
   KOTAK FILTER & KHUSUS KEUANGAN
   ------------------------------------------------------------- */
.finance-split-options {
  background: #f7fafc;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-color);
  margin-bottom: 20px;
}

.checkbox-student-list {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #cbd5e0;
  border-radius: var(--radius-md);
  padding: 12px;
  background: #ffffff;
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}

.checkbox-item input {
  cursor: pointer;
}

/* -------------------------------------------------------------
   STYLING PRINT / CETAK SURAT RESMI & KUITANSI
   ------------------------------------------------------------- */
.document-preview-container {
  padding: 10px;
  background: #f0f4f2;
  border-radius: var(--radius-md);
  max-height: 70vh;
  overflow-y: auto;
}

/* Area Utama Lembar Kertas yang bisa dicetak */
.print-paper {
  background: #ffffff;
  width: 100%;
  max-width: 790px; /* Lebar standar kertas F4/A4 */
  margin: 0 auto;
  padding: 40px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  font-family: Arial, Helvetica, sans-serif;
  color: #000000;
  border: 1px solid #e2e8f0;
  line-height: 1.6;
}

/* Kop Surat Resmi */
.kop-surat {
  display: flex;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 3.5px double #000000;
  margin-bottom: 20px;
  font-family: 'Inter', 'Times New Roman', serif;
}

.kop-logo {
  width: 100px;
  height: 100px;
  margin-right: 25px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
}

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

.kop-details h2 {
  font-size: 19px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.kop-details p {
  font-size: 11px;
  color: #333333;
  margin: 2px 0;
}

/* Judul Surat Resmi */
.doc-title-section {
  text-align: center;
  margin-bottom: 25px;
}

.doc-title {
  font-size: 15px;
  font-weight: bold;
  text-decoration: underline;
  text-transform: uppercase;
}

.doc-number {
  font-size: 12px;
  margin-top: 2px;
  font-weight: normal;
}

/* Konten Surat Resmi */
.doc-content {
  font-size: 13.5px;
  text-align: justify;
  margin-bottom: 20px;
  white-space: pre-line; /* Biarkan line break tersimpan */
}

/* Kaki Surat / Tanda Tangan */
.doc-footer-signature {
  display: flex;
  justify-content: flex-end;
  font-size: 13px;
  margin-top: 15px;
}

.signature-box {
  width: 250px;
  text-align: center;
}

.signature-date {
  margin-bottom: 8px;
}

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

.signature-title {
  font-size: 12px;
  color: #333333;
}

/* Khusus Kuitansi Pembayaran */
.kuitansi-title-section {
  text-align: center;
  margin: 15px 0 25px 0;
  position: relative;
}

.kuitansi-title {
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 2px;
  border-bottom: 1.5px solid #000;
  display: inline-block;
  padding-bottom: 3px;
}

.kuitansi-meta {
  margin-bottom: 25px;
  width: 100%;
}

.kuitansi-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 25px;
}

.kuitansi-table td {
  padding: 8px 12px;
  vertical-align: top;
  font-size: 13.5px;
  border-bottom: 1px dashed #e2e8f0;
}

.kuitansi-table td.label-col {
  width: 180px;
  font-weight: bold;
}

.kuitansi-table td.val-col {
  font-weight: normal;
}

.kuitansi-amount-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  background: #f7fafc;
  padding: 15px 25px;
  border: 1px solid #cbd5e0;
  border-radius: var(--radius-sm);
}

.kuitansi-amount {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}

.kuitansi-status-lunas {
  font-size: 22px;
  font-weight: 900;
  color: var(--success);
  border: 3px double var(--success);
  padding: 4px 16px;
  transform: rotate(-3deg);
  letter-spacing: 1.5px;
  border-radius: 4px;
}

/* -------------------------------------------------------------
   MEDIA CETAK: CSS KHUSUS PRINT
   ------------------------------------------------------------- */
@media print {
  /* Sembunyikan seluruh isi body kecuali print modal */
  body > *:not(#modal-print),
  .no-print {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Tampilkan print modal di paling atas dengan ukuran penuh */
  #modal-print {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: auto !important;
    background: #ffffff !important;
    backdrop-filter: none !important;
    display: block !important;
    z-index: 9999 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .modal-container {
    max-width: 100% !important;
    max-height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    transform: none !important;
    box-shadow: none !important;
    background: #ffffff !important;
    overflow: visible !important;
  }

  .document-preview-container {
    padding: 0 !important;
    background: transparent !important;
    max-height: none !important;
    overflow: visible !important;
  }

  /* Optimasi lembar kertas saat dicetak */
  @page {
    size: A4;
    margin: 1cm 1.2cm; /* Lebih sempit untuk memaksimalkan area halaman pertama */
  }

  .print-paper {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    line-height: 1.45 !important;
  }

  .kop-surat {
    margin-bottom: 12px !important;
    padding-bottom: 8px !important;
  }

  .doc-title-section {
    margin-bottom: 12px !important;
  }

  .kop-details h2 {
    color: #000000 !important;
  }

  .doc-footer-signature {
    page-break-inside: avoid !important;
  }
}

/* -------------------------------------------------------------
   RESPONSIVE DESIGN (DESKTOP KE TABLET/MOBILE)
   ------------------------------------------------------------- */
/* Hamburger Button - sembunyikan di desktop */
.hamburger-btn {
  display: none;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  width: 40px;
  height: 40px;
  font-size: 18px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}
.hamburger-btn:hover {
  background: var(--primary-light);
}

/* Overlay gelap di belakang sidebar saat mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

@media (max-width: 992px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
  
  /* Sidebar jadi overlay mobile */
  aside.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    z-index: 999;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0;
  }
  aside.sidebar.active {
    transform: translateX(0);
  }
  
  /* Tampilkan hamburger di mobile */
  .hamburger-btn {
    display: flex;
  }
  
  /* Header title bar responsive */
  .header-title-bar {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 12px;
  }
  
  .header-title-bar .actions {
    width: 100%;
  }
  .header-title-bar .actions .btn {
    width: 100%;
  }
}

@media (max-width: 768px) {
  /* Dashboard stats grid — 2 kolom di tablet, 1 kolom di HP kecil */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }
  
  /* Dashboard navigasi cepat — stack */
  .content-section > div[style*="grid-template-columns: 2fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  .content-section div[style*="repeat(3, 1fr)"] {
    grid-template-columns: 1fr 1fr !important;
  }
  
  /* Semester settings grid — stack */
  .form-row[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  
  /* Table responsive */
  .data-table {
    font-size: 12px;
  }
  .data-table th, .data-table td {
    padding: 8px 6px;
  }
  
  /* Kurangi padding di mobile */
  .main-content {
    padding: 15px !important;
  }
  .section-card {
    padding: 15px !important;
  }
  
  /* Filter bar stack di mobile */
  .section-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start !important;
  }
  
  /* Search/filter bar stack */
  div[style*="max-width: 600px"] {
    max-width: 100% !important;
    flex-direction: column !important;
  }
  
  /* Modal container full width di mobile */
  .modal-container {
    width: 95% !important;
    max-width: 95% !important;
    max-height: 90vh;
    margin: 5vh auto;
  }
  
  /* Step indicator kecilkan */
  .step-indicator {
    max-width: 100% !important;
  }
  .step-label {
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr !important;
  }
  
  .sidebar-brand h1 {
    font-size: 16px;
  }
  
  .header-title-bar h2 {
    font-size: 18px;
  }
  
  .action-buttons {
    flex-direction: column;
    gap: 4px !important;
  }
  .action-buttons .btn {
    width: 100%;
    font-size: 11px;
  }
}
