body { background: #f5f7fb; }
.card { border: 0; border-radius: 1rem; box-shadow: 0 8px 24px rgba(15, 23, 42, .06); }
.navbar { border-radius: 0 0 1rem 1rem; }
.table td, .table th { vertical-align: middle; }
.form-label { font-weight: 600; }
.required::after { content: " *"; color: #dc3545; }
.tenant-switcher { min-width: 240px; }
.letter-paper { background: white; width: 210mm; min-height: 297mm; margin: 0 auto; padding: 22mm; color: #111827; }
.letter-title { text-align: center; font-weight: 700; text-transform: uppercase; }
@media print {
    body { background: white; }
    .no-print { display: none !important; }
    .letter-paper { box-shadow: none; margin: 0; width: auto; min-height: auto; padding: 18mm; }
}
.kop-logo-preview { max-width: 90px; max-height: 90px; object-fit: contain; display: none; padding: 6px; }
.kop-preview-paper { background:#fff; border:1px dashed #d1d5db; border-radius: .75rem; padding: 18px; min-height: 260px; }
.kop-preview-layout { display:flex; align-items:center; gap:16px; }
.kop-preview-logo { width:86px; min-width:86px; height:86px; display:flex; align-items:center; justify-content:center; }
.kop-preview-logo img { max-width:82px; max-height:82px; object-fit:contain; }
.kop-preview-logo.empty { visibility:hidden; }
.kop-preview-text { flex:1; text-align:center; line-height:1.2; }
.kop-line-1 { font-weight:700; font-size:18px; text-transform:uppercase; }
.kop-line-2 { font-weight:800; font-size:24px; text-transform:uppercase; }
.kop-line-3 { font-weight:600; font-size:15px; text-transform:uppercase; }
.kop-address, .kop-contact { font-size:12px; }
.kop-border-double { border-bottom:4px double #111827; padding-bottom:10px; }
.kop-border-single { border-bottom:2px solid #111827; padding-bottom:10px; }
.kop-border-none { border-bottom:0; padding-bottom:10px; }
.letterhead-layout { display:flex; align-items:center; gap:16px; }
.letterhead-logo { width:92px; min-width:92px; display:flex; align-items:center; justify-content:center; }
.letterhead-logo img { max-width:88px; max-height:88px; object-fit:contain; }
.letterhead-text { flex:1; text-align:center; line-height:1.18; }
.letterhead-line1 { font-size:14px; font-weight:700; text-transform:uppercase; }
.letterhead-line2 { font-size:20px; font-weight:800; text-transform:uppercase; }
.letterhead-line3 { font-size:13px; font-weight:600; text-transform:uppercase; }
.letterhead-address, .letterhead-contact { font-size:11px; }
.letterhead-border-double { border-bottom:4px double #111827; padding-bottom:10px; margin-bottom:24px; }
.letterhead-border-single { border-bottom:2px solid #111827; padding-bottom:10px; margin-bottom:24px; }
.letterhead-border-none { border-bottom:0; padding-bottom:10px; margin-bottom:24px; }
@media print {
    .letterhead-line1 { font-size:13px; }
    .letterhead-line2 { font-size:19px; }
    .letterhead-line3 { font-size:12px; }
}

.public-verify-bg { background: linear-gradient(135deg, #eef4ff 0%, #f8fafc 55%, #eefdf8 100%); min-height: 100vh; }
.public-verify-card { border-radius: 1.25rem; overflow: hidden; }
.verify-icon { width: 56px; height: 56px; border-radius: 999px; background: #e7f7ef; color: #198754; display:flex; align-items:center; justify-content:center; font-size: 28px; font-weight: 800; }
.result-card { border-width: 2px; }

.rich-editor { border: 1px solid #d1d5db; border-radius: .75rem; padding: .5rem; background: #fff; }
.rich-toolbar { flex-wrap: wrap; }
.rich-block-select { width: 120px; }
.rich-area { min-height: 145px; max-height: 360px; overflow: auto; border: 1px solid #e5e7eb; background: #fff; line-height: 1.65; }
.rich-area:focus { box-shadow: 0 0 0 .2rem rgba(13,110,253,.15); border-color: #86b7fe; outline: 0; }
.rich-area:empty::before { content: attr(data-placeholder); color: #9ca3af; }
.rich-area p { margin: 0 0 .65rem; }
.rich-area ul, .rich-area ol { margin-bottom: .65rem; }
.rich-area blockquote { border-left: 4px solid #d1d5db; padding-left: .75rem; color: #4b5563; margin: .5rem 0; }

.letter-rich-content { text-align: justify; line-height: 1.7; }
.letter-rich-content p { margin: 0 0 .8rem; }
.letter-rich-content p:last-child { margin-bottom: 0; }
.letter-rich-content ul, .letter-rich-content ol { margin: 0 0 .8rem 1.5rem; padding-left: 1rem; }
.letter-rich-content blockquote { margin: .6rem 0; padding-left: .8rem; border-left: 3px solid #9ca3af; }
.letter-rich-content h1, .letter-rich-content h2, .letter-rich-content h3, .letter-rich-content h4, .letter-rich-content h5, .letter-rich-content h6 { margin: .75rem 0 .4rem; font-weight: 700; }
.letter-rich-content table { width: 100%; border-collapse: collapse; margin: .75rem 0; }
.letter-rich-content th, .letter-rich-content td { border: 1px solid #9ca3af; padding: 4px 6px; vertical-align: top; }

.rich-toolbar .btn.active { color: #fff; background-color: #6c757d; border-color: #6c757d; }
.rich-toolbar .btn:focus, .rich-block-select:focus { box-shadow: 0 0 0 .15rem rgba(13,110,253,.15); }
.rich-area b, .rich-area strong { font-weight: 700; }
.rich-area h4 { font-size: 1rem; font-weight: 700; margin: .5rem 0; }

/* Cetak Surat: jarak teks dibuat sedang agar formal tetapi tetap hemat ruang */
.print-page .letter-paper {
    font-size: 11.5pt;
    line-height: 1.45;
    padding: 20mm 18mm 18mm 20mm;
}
.print-page .letter-date { margin-bottom: 12px; }
.print-page .letter-meta { width: 100%; margin-bottom: 14px; line-height: 1.42; }
.print-page .letter-meta td { padding: 1px 0; vertical-align: top; }
.print-page .letter-recipient { margin-bottom: 12px; line-height: 1.45; }
.print-page .letter-body-section { margin-bottom: 12px; }
.print-page .letter-event-details { width: 100%; margin: 10px 0 14px 0; line-height: 1.42; }
.print-page .letter-event-details td { padding: 2px 0; vertical-align: top; }
.print-page .letter-closing-section { margin-bottom: 28px; }
.print-page .letter-signature-space { height: 64px; }
.print-page .letter-rich-content { line-height: 1.45; }
.print-page .letter-rich-content p { margin: 0 0 7px; }
.print-page .letter-rich-content p:last-child { margin-bottom: 0; }
.print-page .letter-rich-content ul,
.print-page .letter-rich-content ol { margin: 0 0 7px 18px; padding-left: 12px; }
.print-page .letter-rich-content li { margin-bottom: 2px; }
.print-page .letter-rich-content blockquote { margin: 6px 0; padding-left: 9px; }
.print-page .letter-rich-content h1,
.print-page .letter-rich-content h2,
.print-page .letter-rich-content h3,
.print-page .letter-rich-content h4,
.print-page .letter-rich-content h5,
.print-page .letter-rich-content h6 { margin: 8px 0 5px; line-height: 1.25; }

@media print {
    .print-page .letter-paper {
        padding: 18mm 16mm 16mm 19mm !important;
        font-size: 11.2pt !important;
        line-height: 1.42 !important;
    }
}


.recipient-role-box { max-height: 160px; overflow: auto; }
.signature-scan-img { max-height: 72px; max-width: 180px; object-fit: contain; }
.qr-signature img { width: 86px; height: 86px; object-fit: contain; }

/* Suggestion box untuk Kode Klasifikasi Arsip */
.classification-suggest-box {
    z-index: 1050;
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid rgba(0,0,0,.125);
    border-radius: .5rem;
}
.classification-suggest-box .list-group-item.active,
.classification-suggest-box .list-group-item:active {
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Dashboard cards: ringkasan bisa diklik menuju halaman terkait */
.dashboard-stat-card {
    color: inherit;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.dashboard-stat-card:hover,
.dashboard-stat-card:focus {
    color: inherit;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .10);
}
.dashboard-stat-card .small {
    min-height: 1.2em;
}


/* Editor surat: tabel di dalam Isi Pembuka/Penutup */
.rich-area table { width: 100%; border-collapse: collapse; margin: .65rem 0; }
.rich-area th, .rich-area td { border: 1px solid #9ca3af; padding: 4px 6px; min-width: 48px; vertical-align: top; }
.rich-area th { background: #f3f4f6; font-weight: 700; }
