/* 
 * BERLIAN - Bantu Evaluasi Revisi dan Laporan Isian Anggaran
 * Aplikasi Simulasi Revisi & Optimalisasi Anggaran (POK/DIPA)
 * Pengelola Anggaran Instansi Peradilan / Satker Kemenkeu
 */

:root {
  --primary-navy: #1a365d;
  --primary-navy-dark: #0f2442;
  --secondary-navy: #2b6cb0;
  --ma-gold: #c59b27;
  --ma-gold-light: #fef9e7;
  --success-emerald: #198754;
  --bg-light: #f4f6f9;
  --card-border: #e2e8f0;
}

body {
  background-color: var(--bg-light);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #2d3748;
}

/* Header & Navbar */
.navbar-custom {
  background: linear-gradient(135deg, var(--primary-navy-dark) 0%, var(--primary-navy) 100%);
  border-bottom: 3px solid var(--ma-gold);
}

.brand-title {
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand-subtitle {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
}

/* Navbar Nav Links - Single Line Compact */
.navbar-custom .navbar-nav {
  flex-wrap: nowrap !important;
}

.navbar-custom .nav-link {
  white-space: nowrap !important;
  font-size: 0.82rem;
  padding: 0.35rem 0.55rem !important;
  display: inline-flex !important;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.15s ease-in-out;
}

.navbar-custom .nav-link i {
  font-size: 0.85rem;
}

@media (max-width: 1400px) {
  .navbar-custom .nav-link {
    font-size: 0.77rem !important;
    padding: 0.3rem 0.45rem !important;
  }
  .navbar-custom .brand-subtitle {
    display: none !important;
  }
}

/* Card Styling */
.card-custom {
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  background: #ffffff;
  transition: all 0.2s ease-in-out;
}

.card-custom:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

.card-header-navy {
  background: linear-gradient(to right, #1a365d, #2b6cb0);
  color: white;
  font-weight: 600;
  border-top-left-radius: 11px !important;
  border-top-right-radius: 11px !important;
  padding: 12px 20px;
}

/* KPI Summary Cards */
.kpi-card {
  border-radius: 10px;
  padding: 15px;
  background: #ffffff;
  border-left: 4px solid var(--secondary-navy);
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.kpi-card.kpi-target {
  border-left-color: #dc3545;
}

.kpi-card.kpi-sisa {
  border-left-color: #198754;
}

.kpi-card.kpi-pagu {
  border-left-color: var(--ma-gold);
}

.kpi-value {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
}

.kpi-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #718096;
}

/* Dropzone Import PDF */
.pdf-dropzone {
  border: 2px dashed #93c5fd;
  border-radius: 12px;
  background-color: #f8fafc;
  padding: 24px;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.pdf-dropzone:hover, .pdf-dropzone.dragover {
  border-color: #2563eb;
  background-color: #eff6ff;
  transform: scale(1.005);
}

.pdf-dropzone-icon {
  font-size: 2.8rem;
  color: #dc2626;
  margin-bottom: 10px;
}

/* Modal Table FA Detail */
.table-fa-modal thead th {
  position: sticky;
  top: 0;
  background-color: #f1f5f9;
  z-index: 10;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.table-fa-modal tr.selected-row {
  background-color: #e0f2fe !important;
}

.badge-sisa-positive {
  background-color: #dcfce7;
  color: #166534;
  font-weight: 700;
  border: 1px solid #bbf7d0;
}

.badge-sisa-zero {
  background-color: #f1f5f9;
  color: #64748b;
}

/* Dynamic Table */
.table-custom thead th {
  background-color: #edf2f7;
  color: #2d3748;
  font-size: 0.83rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  vertical-align: middle;
  border-bottom: 2px solid #cbd5e0;
}

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

.table-custom tbody tr.priority-row {
  background-color: #fffdf5;
}

.table-custom tbody tr.priority-row td:first-child {
  border-left: 3px solid var(--ma-gold);
}

.input-rp-group .input-group-text {
  background-color: #f1f5f9;
  font-weight: 600;
  font-size: 0.85rem;
  color: #475569;
}

.form-control:focus, .form-select:focus {
  border-color: #2b6cb0;
  box-shadow: 0 0 0 0.2rem rgba(43, 108, 176, 0.15);
}

/* Checkbox Priority */
.form-check-priority .form-check-input:checked {
  background-color: var(--ma-gold);
  border-color: var(--ma-gold);
}

/* Result Scenario Cards */
.scenario-tab .nav-link {
  color: #4a5568;
  font-weight: 600;
  border-radius: 8px 8px 0 0;
  padding: 12px 20px;
}

.scenario-tab .nav-link.active {
  background-color: #ffffff;
  color: var(--primary-navy);
  border-top: 3px solid var(--primary-navy);
  border-color: var(--card-border) var(--card-border) #ffffff;
}

.badge-exact {
  background-color: #d1e7dd;
  color: #0f5132;
  border: 1px solid #a3cfbb;
  font-weight: 700;
  padding: 6px 12px;
  font-size: 0.85rem;
}

.badge-approx {
  background-color: #fff3cd;
  color: #664d03;
  border: 1px solid #ffe69c;
  font-weight: 700;
  padding: 6px 12px;
  font-size: 0.85rem;
}

.badge-priority {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  font-weight: 600;
}

.change-pill {
  font-size: 0.8rem;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
  font-weight: 600;
}

.change-pill.reduced {
  background-color: #fee2e2;
  color: #991b1b;
}

.change-pill.unchanged {
  background-color: #f1f5f9;
  color: #475569;
}

.progress-custom {
  height: 8px;
  border-radius: 4px;
  background-color: #e2e8f0;
}

/* Floating Action / Shortcuts */
.btn-calculate {
  background: linear-gradient(135deg, #198754 0%, #157347 100%);
  border: none;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 12px 28px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(25, 135, 84, 0.25);
  transition: all 0.2s ease;
}

.btn-calculate:hover {
  background: linear-gradient(135deg, #157347 0%, #115c38 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 10px rgba(25, 135, 84, 0.35);
}

/* Print Stylesheet for Formal Government POK Report */
@media print {
  body {
    background-color: #ffffff;
    font-size: 11pt;
    color: #000000;
  }

  .no-print, .btn, .navbar, .input-section, .alert, .nav-tabs, footer, .modal {
    display: none !important;
  }

  .card-custom {
    border: none !important;
    box-shadow: none !important;
  }

  .print-only {
    display: block !important;
  }

  .table {
    border: 1px solid #000000 !important;
  }

  .table th, .table td {
    border: 1px solid #000000 !important;
    padding: 4px 6px !important;
  }

  .table-custom thead th {
    background-color: #eaeaea !important;
    color: #000000 !important;
  }

  .print-header {
    text-align: center;
    border-bottom: 2px solid #000000;
    padding-bottom: 10px;
    margin-bottom: 20px;
  }

  .print-signature-box {
    margin-top: 40px;
    page-break-inside: avoid;
  }
}

.print-only {
  display: none;
}

/* Mode & Role Styling for Pergeseran & Tambahan Pagu */
.row-role-donor td:first-child {
  border-left: 3px solid #dc3545;
}
.row-role-penerima td:first-child {
  border-left: 3px solid #198754;
}
.role-badge-donor {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 4px;
}
.role-badge-penerima {
  background-color: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 4px;
}
.btn-calculate-pergeseran {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
}
.btn-calculate-tambahan {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
}

