/* Import Google Fonts for UI */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-primary: #0b0f19;
  --bg-secondary: rgba(17, 24, 39, 0.7);
  --border-color: rgba(255, 255, 255, 0.08);
  --accent-color: #6366f1;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --accent-hover: #4f46e5;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.15);
  --danger: #ef4444;
  
  --font-ui: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  
  /* Document print variables */
  --doc-width: 210mm;
  --doc-height: 297mm;
  --doc-bg: #ffffff;
  --doc-text: #111111;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-ui);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Background Ambient Glows */
body::before {
  content: "";
  position: absolute;
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

body::after {
  content: "";
  position: absolute;
  bottom: -10%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

/* App Header */
.app-header {
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 2rem;
  background: rgba(11, 15, 25, 0.8);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 2.25rem;
  height: 2.25rem;
  background: linear-gradient(135deg, var(--accent-color), #8b5cf6);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px var(--accent-glow);
  font-weight: 800;
  font-size: 1.25rem;
  color: #fff;
  font-family: var(--font-heading);
}

.app-title-wrapper h1 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  background: linear-gradient(to right, #ffffff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.app-title-wrapper p {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Layout Grid */
.app-container {
  display: grid;
  grid-template-columns: 350px 1fr;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Sidebar Dashboard Panel */
.sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow-y: auto;
  backdrop-filter: blur(12px);
}

.card {
  background: rgba(30, 41, 59, 0.35);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* File Upload Area */
.upload-zone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: 0.75rem;
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(30, 41, 59, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--accent-color);
  background: rgba(99, 102, 241, 0.04);
}

.upload-icon {
  font-size: 1.75rem;
  color: var(--text-secondary);
  transition: transform 0.3s ease;
}

.upload-zone:hover .upload-icon {
  transform: translateY(-4px);
  color: var(--accent-color);
}

.upload-zone p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.upload-zone span {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.btn-secondary-outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.btn-secondary-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Dropdown Selector */
.select-wrapper {
  position: relative;
}

.form-select {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.65rem 0.875rem;
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  cursor: pointer;
  appearance: none;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.select-wrapper::after {
  content: "▼";
  font-size: 0.7rem;
  color: var(--text-secondary);
  position: absolute;
  right: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* School Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.info-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.info-value {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  word-break: break-word;
}

.allocation-badge {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 0.6rem;
  border-radius: 0.5rem;
  text-align: center;
  font-weight: 700;
  font-size: 1.125rem;
  color: #a5b4fc;
  font-family: var(--font-heading);
  letter-spacing: 0.02em;
}

/* Navigation List (Tabs) */
.nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  padding: 0.65rem 0.875rem;
  text-align: left;
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

.nav-btn.active {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  font-weight: 600;
}

.nav-btn-icon {
  font-size: 0.75rem;
  opacity: 0.5;
}

.nav-btn.active .nav-btn-icon {
  opacity: 1;
}

.print-single-btn {
  font-size: 1.1rem;
  opacity: 0.65;
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.print-single-btn:hover {
  opacity: 1;
  background: rgba(99, 102, 241, 0.25);
  border-color: rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
}

/* Action Button */
.btn-primary {
  background: linear-gradient(135deg, var(--accent-color), #8b5cf6);
  border: none;
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25);
  width: 100%;
  margin-top: auto;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
  background: linear-gradient(135deg, var(--accent-hover), #7c3aed);
}

.btn-primary:disabled {
  background: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* Right Content Area */
.preview-area {
  background-color: #1e293b;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  position: relative;
  scroll-behavior: smooth;
}

/* Document Sheet Wrapper (Paper feel) */
.paper-wrapper {
  background: var(--doc-bg);
  color: var(--doc-text);
  width: var(--doc-width);
  min-height: var(--doc-height);
  padding: 20mm 20mm;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border-radius: 0.125rem;
  position: relative;
  overflow: hidden;
  font-family: Arial, Helvetica, sans-serif;
  margin-bottom: 2rem;
  display: none; /* Controlled by active class */
  transform-origin: top center;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.paper-wrapper.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

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

/* Blank State Uploader screen */
.blank-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  height: 100%;
  padding: 2rem;
  text-align: center;
}

.blank-state-card {
  max-width: 480px;
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid var(--border-color);
  padding: 2.5rem 2rem;
  border-radius: 1rem;
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.blank-state-icon {
  width: 4rem;
  height: 4rem;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--accent-color);
  margin-bottom: 0.25rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
  70% { box-shadow: 0 0 0 15px rgba(99, 102, 241, 0); }
  100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

.blank-state h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
}

.blank-state p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* ==========================================================================
   MODAL DIALOG STYLES (DATA MANAGER OVERLAY)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.25s ease;
}

.modal-content {
  background: #0f172a;
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  width: 95%;
  max-width: 1100px;
  height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  animation: modalScaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalScaleUp {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.6);
}

.modal-header h2 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  background: linear-gradient(to right, #ffffff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.modal-close-x {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.75rem;
  cursor: pointer;
  transition: color 0.2s ease;
  line-height: 1;
}

.modal-close-x:hover {
  color: var(--text-primary);
}

/* Modal Body Layout */
.modal-body-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  flex: 1;
  overflow: hidden;
}

/* Left Panel: School Table List */
.modal-list-panel {
  border-right: 1px solid var(--border-color);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.3);
}

.table-container {
  flex: 1;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  background: rgba(30, 41, 59, 0.15);
}

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

.modal-table th, .modal-table td {
  padding: 0.6rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.modal-table th {
  background: rgba(15, 23, 42, 0.8);
  font-weight: 600;
  color: var(--text-primary);
  position: sticky;
  top: 0;
  z-index: 10;
}

.modal-table tbody tr {
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.modal-table tbody tr.active {
  background: rgba(99, 102, 241, 0.1);
  border-left: 3px solid var(--accent-color);
}

.modal-table tbody tr.active td {
  color: #a5b4fc;
}

.action-btn-danger {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.action-btn-danger:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.12);
}

/* Right Panel: Form Editor */
.modal-form-panel {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.4);
}

/* Segmented Tab Headers for Forms */
.form-tabs {
  display: flex;
  background: rgba(15, 23, 42, 0.8);
  padding: 0.25rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  margin-bottom: 1rem;
}

.form-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.4rem;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-tab-btn.active {
  background: var(--accent-color);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.form-tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

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

/* Structured Inputs styling */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.form-group label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  outline: none;
  transition: all 0.2s ease;
  width: 100%;
}

.form-group textarea {
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* Form Calculation Box */
.calc-preview {
  background: rgba(30, 41, 59, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.875rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.calc-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.calc-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.calc-val {
  font-size: 1rem;
  font-weight: 700;
  color: #a5b4fc;
}

.calc-val-terbilang {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.4;
}

/* Exam volumes inputs */
.vol-section-container {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.volume-item-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(30, 41, 59, 0.25);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  transition: border-color 0.2s ease;
}

.volume-item-row:hover {
  border-color: rgba(99, 102, 241, 0.2);
}

.vol-num {
  width: 1.25rem;
  height: 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.vol-name {
  flex: 1;
  font-size: 0.75rem;
  color: var(--text-primary);
  font-weight: 500;
}

.vol-price {
  color: var(--text-muted);
  font-size: 0.7rem;
  margin-left: 0.25rem;
}

.vol-input {
  width: 70px !important;
  text-align: center;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  padding: 0.25rem;
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  outline: none;
}

.vol-input:focus {
  border-color: var(--accent-color);
}

/* ==========================================================================
   RESPONSIVE DESIGN MEDIA QUERIES (FIX HORIZONTAL OVERFLOW & SCREEN CUT-OFFS)
   ========================================================================== */

/* 1. Scale down split screen container if screen width is limited */
@media (max-width: 1280px) {
  .app-container {
    grid-template-columns: 300px 1fr; /* narrower sidebar */
  }
}

@media (max-width: 1024px) {
  /* Stack the layout vertically on tablets and small laptops */
  .app-container {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }
  
  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    max-height: 500px;
  }
  
  .preview-area {
    padding: 1.5rem;
    overflow: visible;
    height: auto;
  }
  
  /* Modal Editor stacked view */
  .modal-body-grid {
    grid-template-columns: 1fr;
  }
  
  .modal-list-panel {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    max-height: 200px;
    height: 200px;
  }
  
  .modal-content {
    height: 95vh;
    width: 95%;
  }
}

@media (max-width: 640px) {
  .app-header {
    padding: 1rem;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .preview-area {
    padding: 1rem 0.5rem;
  }
}

.btn-danger-solid {
  background: var(--danger);
  color: #ffffff;
  border: none;
  border-radius: 0.375rem;
  padding: 0.5rem 1rem;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.btn-danger-solid:hover {
  background: #dc2626;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

/* ==========================================================================
   PRINT STYLING (FOR BOTH BROWSER CTRL+P & HTML2PDF EXPORT)
   ========================================================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  
  .app-header, .sidebar, .preview-area h2, .preview-area p, .toast, .modal-overlay {
    display: none !important;
  }
  
  .app-container {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
  }
  
  .preview-area {
    padding: 0 !important;
    background: transparent !important;
    overflow: visible !important;
    display: block !important;
  }
  
  .paper-wrapper {
    display: block !important; /* Force all to print */
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 0 20mm 0 !important;
    box-shadow: none !important;
    transform: none !important; /* Never scale during prints */
    page-break-inside: avoid;
  }
  
  .paper-wrapper:last-child {
    margin-bottom: 0 !important;
  }
}

/* ==========================================================================
   DOCUMENT STYLING CLASSES (OFFICIAL A4 GOVERNMENT SPJ SHEETS)
   ========================================================================== */
.doc-header {
  display: flex;
  align-items: center;
  border-bottom: 3.5px double #111111;
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
  width: 100%;
}

.doc-logo {
  width: 95px !important;
  height: auto !important;
  margin-right: 1.5rem;
  flex-shrink: 0;
}

.doc-header-text {
  text-align: center;
  flex: 1;
}

.doc-header-text h3 {
  font-size: 10.5pt;
  font-weight: normal;
  margin: 0;
  line-height: 1.3;
  color: #111111;
}

.doc-header-text h2 {
  font-size: 12pt;
  font-weight: bold;
  margin: 1px 0;
  line-height: 1.3;
  color: #111111;
}

.doc-header-text h1 {
  font-size: 14pt;
  font-weight: 800;
  margin: 1px 0;
  line-height: 1.3;
  color: #111111;
  background: none !important;
  -webkit-text-fill-color: initial !important;
}

.doc-header-text p {
  font-size: 8.5pt;
  margin: 0;
  line-height: 1.3;
  color: #222222;
}

.kuitansi-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 9.5pt;
  line-height: 1.4;
  margin-bottom: 1rem;
  width: 100%;
  color: #111111;
}

.doc-content-lead, .doc-content-p {
  font-size: 9.5pt;
  line-height: 1.5;
  text-align: justify;
  margin-bottom: 1rem;
  color: #111111;
}

.doc-content-lead {
  text-indent: 10mm;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9.5pt;
  margin: 1rem 0;
  color: #111111;
}

.doc-table th, .doc-table td {
  border: 1px solid #111111 !important;
  padding: 6px 8px;
  vertical-align: middle;
}

.doc-table th {
  background-color: #f2f2f2 !important;
  font-weight: bold;
  text-align: center;
}

.doc-table td.text-center {
  text-align: center;
}

.doc-table td.text-right {
  text-align: right;
}

.signature-block {
  width: 100%;
  border-collapse: collapse;
  font-size: 9.5pt;
  margin-top: 1.5rem;
  color: #111111;
}

.signature-block td {
  border: none !important;
  vertical-align: top;
  padding: 0.5rem;
}

.signature-spacing {
  height: 16mm;
}

.kuitansi-title {
  text-align: center;
  font-size: 13pt;
  font-weight: bold;
  text-decoration: underline;
  margin-bottom: 1.5rem;
  color: #111111;
}

.kuitansi-row {
  display: flex;
  margin-bottom: 0.75rem;
  font-size: 9.5pt;
  line-height: 1.4;
  align-items: flex-start;
  color: #111111;
}

.kuitansi-label {
  width: 140px;
  flex-shrink: 0;
}

.kuitansi-colon {
  width: 20px;
  flex-shrink: 0;
  text-align: center;
}

.kuitansi-value {
  flex: 1;
}

.kuitansi-value.amount {
  font-weight: bold;
  background-color: #e2e8f0 !important;
  padding: 0.35rem 0.75rem;
  border: 1px solid #111111 !important;
  font-size: 11pt;
  display: inline-block;
}

.kuitansi-value.terbilang {
  font-style: italic;
  font-weight: bold;
}

.doc-title-section {
  text-align: center;
  margin-bottom: 1.25rem;
}

.doc-title {
  font-size: 12.5pt;
  font-weight: bold;
  text-decoration: underline;
  margin-bottom: 2px;
  color: #111111 !important;
  background: none !important;
  -webkit-text-fill-color: initial !important;
}

.doc-number {
  font-size: 9.5pt;
  color: #111111;
}

.doc-meta-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9.5pt;
  margin-bottom: 1.25rem;
  color: #111111;
}

.doc-meta-table td {
  border: none !important;
  padding: 3px 5px;
  vertical-align: top;
}

.no-border, .no-border td {
  border: none !important;
  padding: 2px 4px;
}

.font-bold {
  font-weight: bold;
}

.page-break {
  page-break-after: always;
  break-after: page;
}

#print-container {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

#print-container .paper-wrapper {
  display: block !important;
  box-shadow: none !important;
  margin: 0 !important;
  transform: none !important;
  height: 295mm !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

#print-container .paper-wrapper:not(:last-child) {
  page-break-after: always !important;
  break-after: page !important;
}

/* Custom Searchable Select Dropdown */
.searchable-select {
  position: relative;
  width: 100%;
}
.searchable-select .dropdown-arrow {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform 0.25s ease;
}
.searchable-select.open .dropdown-arrow {
  transform: translateY(-50%) rotate(180deg);
}
.search-dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  max-height: 250px;
  overflow-y: auto;
  background: #1e293b;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  margin-top: 0.25rem;
  z-index: 1000;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.15s ease;
}
.search-dropdown-item {
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  font-size: 0.825rem;
  color: var(--text-secondary);
  transition: all 0.15s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}
.search-dropdown-item:last-child {
  border-bottom: none;
}
.search-dropdown-item:hover {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
}
.search-dropdown-item.active {
  background: var(--accent-color);
  color: #ffffff;
}
.search-dropdown-no-results {
  padding: 0.75rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-style: italic;
}

