:root {
  --brand: #03658C;
  --brand-dark: #0E2431;
  --ink: #1e1b2e;
}

body { background: #f4f5f9; color: var(--ink); }

.topbar { background: linear-gradient(90deg, var(--brand-dark), var(--brand)); }

.sidebar-wrap { width: 240px; border-right: 1px solid #e6e6ef; background: #fff; }
.sidebar { padding: 1rem 0; position: sticky; top: 56px; }
.sidebar .nav-link { display: flex; align-items: center; gap: .6rem; padding: .55rem 1.2rem; color: #4b4b63; font-size: .92rem; border-left: 3px solid transparent; }
.sidebar .nav-link:hover { background: #E6F1F5; color: var(--brand-dark); }
.sidebar .nav-link.active { background: #E6F1F5; color: var(--brand-dark); border-left-color: var(--brand); font-weight: 600; }
.sidebar .nav-section { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: #9a9ab0; padding: 1rem 1.2rem .35rem; }

.main-content { min-height: calc(100vh - 56px); }

.card-stat { border: none; border-radius: 14px; box-shadow: 0 1px 3px rgba(20,20,50,.06); }
.card-stat .stat-icon { width: 46px; height: 46px; border-radius: 12px; display:flex; align-items:center; justify-content:center; font-size: 1.3rem; }

.table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: #7a7a90; border-bottom-width: 1px; }
.card { border: none; border-radius: 14px; box-shadow: 0 1px 3px rgba(20,20,50,.06); }
.badge-status { font-weight: 600; }

.login-wrap { min-height: 100vh; display:flex; align-items:center; justify-content:center; background: linear-gradient(135deg, var(--brand-dark), #1e1b2e); }
.login-card { width: 100%; max-width: 380px; border-radius: 18px; }

.item-row .btn-remove-row { visibility: hidden; }
.item-row:hover .btn-remove-row { visibility: visible; }

/* Print / PDF document style */
.doc-page { background: #fff; max-width: 800px; margin: 0 auto; padding: 40px 48px; font-size: 13px; line-height: 1.5; color: #1a1a1a; }
.doc-page h1, .doc-page h2, .doc-page h3 { color: #1a1a1a; }
.doc-header { display: flex; justify-content: space-between; border-bottom: 3px solid var(--brand); padding-bottom: 8px; margin-bottom: 12px; }
.doc-title { font-size: 1.4rem; font-weight: 700; letter-spacing: .03em; color: var(--brand-dark); }
.doc-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.doc-table th, .doc-table td { border: 1px solid #ddd; padding: 4px 8px; vertical-align: top; }
.doc-table th { background: #E6F1F5; }
.doc-summary td { border: none; padding: 2px 8px; }
.doc-clause { font-size: 11px; line-height: 1.25; margin-bottom: 1px; }
.doc-signblock { display:flex; justify-content: space-between; margin-top: 18px; text-align:center; }
.doc-signblock .sign-col { width: 45%; }
.sign-space { height: 50px; display:flex; align-items:flex-end; justify-content:center; }
.sign-space img { max-height: 50px; max-width: 100%; object-fit: contain; }
/* Pins whatever it wraps (e.g. clauses + signature + footer) to the bottom
   of a .doc-page that has been made a flex column with a fixed min-height,
   so short documents don't leave a big empty gap above the signature. */
.doc-tail { margin-top: auto; }

/* Lampiran (attachment) spec sheet — see utils/format.js renderLampiranHtml() */
.lampiran-grid { display:flex; flex-direction:column; gap:12px; }
.lampiran-card { border:1px solid #d8dee6; border-radius:6px; overflow:hidden; page-break-inside:avoid; break-inside:avoid; }
.lampiran-card-title { background:var(--brand); color:#fff; font-weight:700; font-size:13px; padding:7px 14px; letter-spacing:.02em; }
.lampiran-card-body { display:grid; grid-template-columns: 1fr 1fr; }
.lampiran-row { display:flex; justify-content:space-between; gap:10px; padding:6px 14px; border-bottom:1px solid #eef1f5; font-size:11.5px; }
.lampiran-subheader { grid-column: 1 / -1; background:#eef2f7; color:var(--brand-dark); font-weight:700; font-size:10.5px; text-transform:uppercase; letter-spacing:.04em; padding:5px 14px; border-bottom:1px solid #dde3ea; border-top:1px solid #dde3ea; }
.lampiran-note-row { grid-column: 1 / -1; padding:5px 14px; border-bottom:1px solid #eef1f5; font-size:11px; color:#555; font-style:italic; }
.lampiran-label { color:#6b7280; }
.lampiran-value { font-weight:600; text-align:right; }
.lampiran-card-notes { padding:6px 14px; font-size:11px; color:#555; border-top:1px solid #eef1f5; background:#fcfcfd; }
.lampiran-freetext { white-space:pre-wrap; font-size:12px; line-height:1.5; color:#1a1a1a; }

@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  .doc-page { padding: 0; max-width: 100%; }
}
