::selection { background: #f0cd73; color: #2a060b; }
.fade-in { animation: fadeIn .4s ease both; }
.rise { animation: rise .5s cubic-bezier(.2,.7,.2,1) both; }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes rise { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }

.card { background: #fff; border: 1px solid #e7e5e4; border-radius: 1.25rem; }
.lbl-form { display: block; font-size: .78rem; font-weight: 700; color: #57534e; margin-bottom: .35rem; letter-spacing: .01em; }
.inp { width: 100%; border: 1px solid #d6d3d1; background: #fff; border-radius: .75rem; padding: .62rem .85rem; font-size: .925rem;
       transition: border-color .15s, box-shadow .15s; outline: none; }
.inp:focus { border-color: #a8323a; box-shadow: 0 0 0 3px rgba(168,50,58,.18); }
.inp[readonly] { background: #fafaf9; color: #78716c; }
textarea.inp { min-height: 84px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border-radius: 999px; padding: .65rem 1.25rem;
       font-weight: 700; font-size: .9rem; transition: background-color .15s, transform .15s, box-shadow .15s; cursor: pointer; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn-primary { background: #450c13; color: #fff; }
.btn-primary:hover { background: #7a1a22; box-shadow: 0 8px 20px -8px rgba(69,12,19,.6); }
.btn-accent { background: #d99a1e; color: #2a060b; }
.btn-accent:hover { background: #f0cd73; }
.btn-ghost { background: #fff; color: #5e121a; border: 1px solid #d6d3d1; }
.btn-ghost:hover { background: #fbf0f0; }
.btn-danger { background: #fff; color: #b91c1c; border: 1px solid #fecaca; }
.btn-danger:hover { background: #fef2f2; }
.btn-sm { padding: .4rem .85rem; font-size: .8rem; }
.tbl { width: 100%; font-size: .9rem; }
.tbl th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #78716c; padding: .8rem 1rem; background: #fafaf9; border-bottom: 1px solid #e7e5e4; }
.tbl td { padding: .8rem 1rem; border-bottom: 1px solid #f5f5f4; vertical-align: top; }
.tbl tr:hover td { background: #fbf8f6; }
.badge { display: inline-flex; align-items: center; gap: .25rem; padding: .15rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 700; }

/* Formulir terpadu */
.sub-judul { font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: #7a1a22; padding-top: .9rem; margin-top: .3rem; border-top: 1px solid #e7e5e4; }
.pil { display: flex; align-items: center; gap: .5rem; border: 1px solid #e7e5e4; border-radius: .75rem; padding: .55rem .8rem; cursor: pointer; font-size: .85rem; font-weight: 600; }
.pil:has(:checked) { border-color: #a8323a; background: #fbf0f0; color: #450c13; }
.tab-btn { padding: .5rem 1rem; border-radius: 999px; font-weight: 700; font-size: .85rem; color: #57534e; }
.tab-btn.on { background: #450c13; color: #fff; }
.chip-doc { display: inline-flex; align-items: center; gap: .35rem; background: #fbf0f0; color: #5e121a; border: 1px solid #f5dada; border-radius: 999px; padding: .2rem .65rem; font-size: .75rem; font-weight: 700; }

/* Autocomplete */
.ac-list { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin-top: .25rem; background: #fff; border: 1px solid #e7e5e4;
           border-radius: .9rem; box-shadow: 0 20px 40px -20px rgba(0,0,0,.35); max-height: 320px; overflow-y: auto; }
.ac-item { padding: .6rem .9rem; cursor: pointer; border-bottom: 1px solid #f5f5f4; }
.ac-item:hover, .ac-item.on { background: #fbf0f0; }

/* Preview surat */
.preview-stage { background: #e7e5e4; background-image: radial-gradient(#d6d3d1 1px, transparent 1px); background-size: 14px 14px; border-radius: 1.25rem; overflow: hidden; position: relative; }
.preview-scale { transform-origin: top left; }
.preview-loading::after { content: 'Memperbarui pratinjau…'; position: absolute; top: 12px; right: 12px; background: #450c13; color: #fff;
       font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
