/* Lembar — tampilan aplikasi + lembar dokumen (A4) */
:root {
  --bg: #f4f7f6; --card: #ffffff; --ink: #14221f; --muted: #5f6f6b; --line: #e2e9e7; --soft: #e8f2f0; --field: #f8fbfa;
  --brand: #0f766e; --brand-hover: #0c625b; --brand-ink: #ffffff; --accent: #f2b134;
  --ok: #2a9d62; --warn: #d4881a; --bad: #d5455c;
  --shadow: 0 1px 2px rgba(14, 50, 46, .05), 0 10px 30px rgba(14, 50, 46, .07);
  --pane: #e5ece9;
  --s: 1;
  --ui: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1413; --card: #131e1c; --ink: #e8f1ef; --muted: #93a7a2; --line: #22312e; --soft: #183531; --field: #0f1a18;
    --brand: #2bc4b3; --brand-hover: #4ad6c6; --brand-ink: #04201c; --accent: #f2b134;
    --shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 10px 30px rgba(0, 0, 0, .35);
    --pane: #09100f;
  }
}
* { box-sizing: border-box; }
:root { color-scheme: light dark; }   /* kontrol bawaan browser (kalender tanggal, scrollbar) ikut tema, tidak hitam di mode gelap */
input[type=date]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .8; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--ui); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.ic { display: inline-grid; place-items: center; flex: none; line-height: 0; }

/* ---------- header ---------- */
.top { height: 64px; display: flex; align-items: center; gap: 16px; padding: 0 24px; background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mark { width: 38px; height: 38px; border-radius: 11px; display: block; box-shadow: 0 4px 12px rgba(15, 118, 110, .28); }
.brand b { font: 700 20px/1.1 var(--display); letter-spacing: -.02em; display: block; }
.brand small { color: var(--muted); font-size: 12px; display: block; line-height: 1.25; }
.top-mid { flex: 1; display: flex; justify-content: center; min-width: 0; position: relative; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px; background: var(--soft); color: var(--muted); font-size: 13px; white-space: nowrap; }
.chip b { color: var(--ink); }

.btn { border: 1px solid var(--line); background: var(--card); padding: 9px 16px; border-radius: 99px; cursor: pointer; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; transition: transform .08s, box-shadow .15s, background .15s, border-color .15s; white-space: nowrap; }
.btn:hover { box-shadow: 0 4px 14px rgba(14, 70, 64, .12); border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: transparent; box-shadow: 0 4px 14px rgba(15, 118, 110, .28); }
.btn.primary:hover { background: var(--brand-hover); box-shadow: 0 6px 18px rgba(15, 118, 110, .36); border-color: transparent; }
.btn.soft { background: var(--soft); border-color: transparent; color: var(--brand); }
.btn.sm { padding: 6px 12px; font-size: 13px; gap: 6px; }
.btn.lg { padding: 13px 20px; font-size: 15px; }
.btn.danger { color: var(--bad); }
.btn.danger:hover { border-color: var(--bad); }
.group-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.group-head > h3 { margin: 0; font-size: 11.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--soft); box-shadow: none; color: var(--ink); }
.icon-btn { width: 32px; height: 32px; border-radius: 10px; border: 0; background: transparent; cursor: pointer; display: inline-grid; place-items: center; color: var(--muted); transition: background .12s, color .12s; }
.icon-btn:hover { background: var(--soft); color: var(--ink); }
.icon-btn.del:hover { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }
.icon-btn[disabled] { opacity: .28; pointer-events: none; }
.menu-btn { max-width: 100%; background: var(--card); }
.menu-btn > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.menu { position: absolute; top: 48px; min-width: 320px; max-width: 92vw; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 50px rgba(12, 40, 36, .22); padding: 8px; z-index: 30; }
.menu .row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; cursor: pointer; font-size: 14px; }
.menu .row:hover { background: var(--soft); }
.menu .row.cur { background: var(--soft); font-weight: 600; }
.menu .row small { color: var(--muted); margin-left: auto; }
.menu .row.danger { color: var(--bad); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: minmax(420px, 540px) 1fr; height: calc(100vh - 64px); }
.editor { overflow-y: auto; padding: 18px 22px 60px 24px; }
.preview { background: var(--pane); overflow: auto; padding: 30px 24px 70px; border-left: 1px solid var(--line); }
.sheets { display: flex; flex-direction: column; align-items: center; }

/* ---------- langkah (stepper) ---------- */
.stepper { display: flex; gap: 4px; padding: 5px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); position: sticky; top: 0; z-index: 6; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.stepper::-webkit-scrollbar { display: none; }
.stp { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 10px; border: 0; background: transparent; border-radius: 13px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 13.5px; white-space: nowrap; transition: background .15s, color .15s; }
.stp:hover { background: var(--soft); color: var(--ink); }
.stp .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--soft); color: var(--muted); flex: none; }
.stp.ok .n { background: var(--ok); color: #fff; }
.stp.warn .n { background: var(--warn); color: #fff; }
.stp.bad .n { background: var(--bad); color: #fff; }
.stp.on { background: var(--brand); color: var(--brand-ink); box-shadow: 0 4px 12px rgba(15, 118, 110, .28); }
.stp.on .n { background: rgba(255, 255, 255, .24); color: #fff; }

/* ---------- panel ---------- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: 28px 26px 24px; box-shadow: var(--shadow); transition: border-color .15s, background .15s; }
.panel.over { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 5%, var(--card)); }
.panel-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 22px; }
.panel-head h2 { margin: 0; font: 700 27px/1.15 var(--display); letter-spacing: -.025em; }
.panel-head p { margin: 7px 0 0; color: var(--muted); font-size: 14.2px; line-height: 1.5; }
.panel-head .right { margin-left: auto; flex: none; }
.panel-head p b { color: var(--ink); font-weight: 600; }
.group { margin-top: 22px; }
.group > h3 { margin: 0 0 12px; font-size: 11.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.callout { display: flex; gap: 11px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--soft); color: var(--muted); font-size: 13.3px; line-height: 1.5; margin-top: 18px; }
.callout .ic { color: var(--brand); margin-top: 1px; }
.callout b { color: var(--ink); font-weight: 600; }
.nav-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.seg { display: inline-flex; background: var(--soft); border-radius: 99px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 4px 12px; border-radius: 99px; cursor: pointer; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .14); }

/* ---------- form ---------- */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 14px; }
.grid .w2 { grid-column: span 2; }
.fld label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 6px 2px; }
.fld input, .modal textarea, .modal input[type=text], .modal select, .modal input[type=number] {
  width: 100%; padding: 11px 14px; border-radius: 13px; border: 1px solid var(--line); background: var(--field); outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
.fld input::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.fld input:hover { border-color: color-mix(in srgb, var(--brand) 25%, var(--line)); }
.fld input:focus, .modal textarea:focus, .modal input:focus, .modal select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); background: var(--card); }
.fld small { display: block; color: var(--muted); font-size: 12.2px; margin: 5px 3px 0; line-height: 1.4; }
.fld.req label::after { content: " *"; color: var(--bad); }
details.more { margin-top: 20px; font-size: 14px; }
details.more summary { cursor: pointer; color: var(--muted); font-weight: 600; padding: 6px 2px; list-style: none; display: flex; align-items: center; gap: 6px; }
details.more summary::-webkit-details-marker { display: none; }
details.more[open] summary .ic { transform: rotate(180deg); }
details.more .grid { margin-top: 10px; }

/* ---------- area drop & daftar ---------- */
.drop { border: 1.6px dashed color-mix(in srgb, var(--brand) 38%, var(--line)); border-radius: 22px; padding: 28px 20px 24px; text-align: center; background: color-mix(in srgb, var(--brand) 3.5%, transparent); transition: background .15s, border-color .15s; }
.panel.over .drop { background: color-mix(in srgb, var(--brand) 10%, transparent); border-color: var(--brand); }
.drop .ico { width: 56px; height: 56px; border-radius: 19px; background: var(--soft); color: var(--brand); display: grid; place-items: center; margin: 0 auto 14px; }
.drop h4 { margin: 0 0 5px; font-size: 16.5px; font-weight: 650; }
.drop p { margin: 0 auto 18px; color: var(--muted); font-size: 13.6px; max-width: 34ch; }
.drop .btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.drop.compact { padding: 16px 16px 14px; }
.drop.compact .ico, .drop.compact p { display: none; }
.drop.compact h4 { margin: 0 0 10px; font-size: 14.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.chips:empty { display: none; }
.chipbtn { border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 5px 13px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink); transition: background .12s, border-color .12s, color .12s; }
.chipbtn:hover { border-color: var(--brand); color: var(--brand); }
.chipbtn.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
kbd { font: 600 12px var(--ui); background: var(--card); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 7px; padding: 1px 7px; }
.items { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.item { display: flex; gap: 14px; align-items: center; padding: 11px 12px 11px 11px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); transition: box-shadow .15s, border-color .15s; }
.item:hover { box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 22%, var(--line)); }
.item .thumb { width: 88px; height: 62px; border-radius: 12px; background: #fff; border: 1px solid var(--line); overflow: hidden; flex: none; display: grid; place-items: center; }
.item .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.item .thumb pre { margin: 0; padding: 7px 8px; font: 8px/1.4 var(--mono); color: #334240; width: 100%; height: 100%; overflow: hidden; background: #fff; text-align: left; }
.item .info { flex: 1; min-width: 0; }
.item .info b { display: block; font-weight: 650; font-size: 14.2px; }
.item .info > span { color: var(--muted); font-size: 12.8px; }
.item .acts { display: flex; align-items: center; gap: 1px; }
.range { display: flex; align-items: center; gap: 10px; margin-top: 5px; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.range input { width: 130px; accent-color: var(--brand); }
.empty { text-align: center; color: var(--muted); font-size: 13.4px; padding: 6px 0 0; }

/* ---------- blok logika ---------- */
.blk { border: 1px solid var(--line); border-radius: 22px; background: var(--card); padding: 16px; margin-top: 16px; box-shadow: 0 1px 2px rgba(14, 50, 46, .04); }
.blk-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.blk-no { font-weight: 700; font-size: 13px; color: var(--brand); background: var(--soft); border-radius: 99px; padding: 3px 12px; }
.blk-head .sp { flex: 1; }
.codebox { position: relative; border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.codebox:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); box-shadow: 0 4px 14px rgba(14, 70, 64, .09); }
.codebox pre { margin: 0; padding: 12px 14px; font: 12px/1.55 var(--mono); max-height: 124px; overflow: hidden; color: #24312f; white-space: pre; }
.codebox .edit { position: absolute; right: 9px; top: 9px; }
.codebox.empty { padding: 22px; text-align: center; color: var(--muted); background: transparent; border-style: dashed; font-size: 13.5px; display: flex; gap: 8px; align-items: center; justify-content: center; }
.codebox img { display: block; width: 100%; max-height: 200px; object-fit: contain; background: #fff; }
.blk-meta { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.tools { display: flex; gap: 6px; align-items: center; margin: 12px 0 8px; }
.tools .tb { min-width: 32px; height: 30px; border-radius: 9px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-weight: 700; transition: background .12s; }
.tools .tb:hover { background: var(--soft); }
.tools .sp { flex: 1; }
.rich { min-height: 100px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--field); outline: none; font: 16px/1.7 "Times New Roman", Tinos, "Liberation Serif", serif; text-align: justify; transition: border-color .15s, box-shadow .15s, background .15s; }
.rich:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); background: var(--card); }
.rich p { margin: 0 0 8px; text-indent: 1.1cm; }
.rich:empty::before, .rich[data-empty="1"]::before { content: attr(data-ph); color: var(--muted); font: 14px/1.5 var(--ui); text-indent: 0; display: block; }
.rich b { font-weight: 700; }
.orig { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 8px 8px 12px; border-radius: 12px; font-size: 13px; line-height: 1.45; }
.orig[hidden] { display: none; }
.orig span { flex: 1; }
.orig.warn { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.orig.ok { background: color-mix(in srgb, var(--ok) 13%, transparent); color: var(--ok); }
.orig-list { margin-top: 8px; padding: 10px 14px; border: 1px dashed var(--line); border-radius: 12px; font-size: 13.5px; line-height: 1.55; }
.orig-list p { margin: 6px 0; }
.orig-list mark.sama { background: color-mix(in srgb, var(--warn) 34%, transparent); color: inherit; border-radius: 4px; padding: 1px 3px; }
.orig-list mark.mirip { background: color-mix(in srgb, var(--warn) 16%, transparent); color: inherit; border-radius: 4px; padding: 1px 3px; }
.tools-row { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 6px; }
.opts { display: grid; gap: 10px; margin-top: 4px; }
.opt { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; transition: border-color .12s, background .12s; }
.opt:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.opt:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); }
.opt input { accent-color: var(--brand); width: 18px; height: 18px; }
.opt b { display: block; font-weight: 650; }
.opt small { color: var(--muted); font-size: 12.8px; }
.spin { width: 34px; height: 34px; margin: 18px auto 6px; border-radius: 50%; border: 3px solid var(--soft); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.add-blk { display: flex; justify-content: center; margin-top: 18px; }

/* ---------- cek akhir ---------- */
.checks { display: flex; flex-direction: column; gap: 8px; margin: 0 0 18px; }
.check { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--field); border: 1px solid transparent; font-size: 14px; cursor: pointer; transition: border-color .12s, background .12s; }
.check:hover { border-color: var(--line); background: var(--soft); }
.check .dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; }
.check.ok .dot { background: var(--ok); } .check.warn .dot { background: var(--warn); } .check.bad .dot { background: var(--bad); }
.check .go { margin-left: auto; color: var(--muted); }
.auto { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.auto .chip { background: color-mix(in srgb, var(--ok) 11%, transparent); color: var(--ok); font-weight: 600; font-size: 12.5px; gap: 5px; padding: 4px 11px 4px 8px; }
.bigbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bigbtns .btn { justify-content: center; }
.fine { color: var(--muted); font-size: 12.6px; margin: 14px 2px 0; line-height: 1.5; }

/* ---------- modal & toast ---------- */
.overlay { position: fixed; inset: 0; background: rgba(8, 22, 20, .55); backdrop-filter: blur(4px); z-index: 50; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(740px, 100%); max-height: 92vh; overflow: auto; background: var(--card); border-radius: 26px; padding: 26px; box-shadow: 0 30px 80px rgba(4, 16, 14, .5); }
.modal h3 { margin: 0 0 4px; font: 700 22px/1.2 var(--display); letter-spacing: -.02em; }
.modal .sub { margin: 0 0 16px; color: var(--muted); font-size: 13.8px; }
.modal textarea { font: 13px/1.55 var(--mono); min-height: 240px; resize: vertical; white-space: pre; tab-size: 4; }
.modal .row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 14px 0; }
.modal .row label { font-size: 13.2px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.modal .row select, .modal .row input[type=number] { width: auto; padding: 7px 11px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.modal .pv { margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; max-height: 230px; overflow-y: auto; }
.modal .pv img { display: block; width: 100%; }
.modal .note { margin: 8px 12px; color: #6a6784; font-size: 12.5px; }
#toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 80; align-items: center; pointer-events: none; }
.toast { background: #1d1b2e; color: #fff; padding: 11px 20px; border-radius: 16px; text-align: center; font-size: 14px; box-shadow: 0 12px 34px rgba(0, 0, 0, .3); opacity: 0; transform: translateY(8px); transition: .25s; max-width: 90vw; }
.toast.in { opacity: 1; transform: none; } .toast.err { background: var(--bad); } .toast.ok { background: var(--ok); }

.mtabs { display: none; }

/* ---------- LEMBAR A4 (pratinjau = hasil cetak) ---------- */
#measure { position: absolute; left: -20000px; top: 0; width: 14cm; visibility: hidden; pointer-events: none; }
#measure, .sheet { font-family: "Times New Roman", Tinos, "Liberation Serif", Times, serif; font-size: 12pt; color: #000;
  font-kerning: none; font-variant-ligatures: none; font-feature-settings: "kern" 0, "liga" 0, "clig" 0; text-rendering: geometricPrecision; hyphens: none; }  /* sama seperti bawaan Word: tanpa kerning & ligatur */
.sheet-wrap { position: relative; width: calc(21cm * var(--s)); height: calc(29.7cm * var(--s)); margin: 0 0 34px; flex: none; }
.sheet-label { position: absolute; top: -22px; left: 2px; font: 600 11.5px var(--ui); color: var(--muted); letter-spacing: .3px; }
.sheet { position: absolute; left: 0; top: 0; width: 21cm; height: 29.7cm; background: #fff; padding: 4cm 3cm 3cm 4cm; transform: scale(var(--s)); transform-origin: 0 0; box-shadow: 0 2px 6px rgba(12, 40, 36, .10), 0 22px 56px rgba(12, 40, 36, .16); overflow: hidden; border-radius: 2px; }
.sheet-body { width: 14cm; height: 22.7cm; }
.slice { overflow: hidden; }

.doc-p { margin: 0; text-align: justify; text-indent: 1.27cm; font-size: 12pt; line-height: 20.7pt; word-wrap: break-word; }
.doc-p b { font-weight: 700; }
.doc-h { margin: 0 0 14pt; text-align: left; font-size: 14pt; line-height: 24.13pt; font-weight: 700; }   /* 14pt x 1,149 (Times New Roman) x 1,5 = 24,13pt, sama dengan Word */
.doc-img { margin: 0; line-height: 0; font-size: 0; }
.doc-img img { display: block; margin: 0; }

.doc-cover { font-size: 12pt; line-height: 13.8pt; display: flex; flex-direction: column; min-height: 22.7cm; }
.c-bottom { margin-top: auto; }
.c-title { text-align: center; font-weight: 700; font-size: 16pt; line-height: 18.4pt; margin-bottom: 24pt; }
.c-row { display: grid; grid-template-columns: 4.6cm 0.4cm 1fr; margin-bottom: 13.8pt; }
.c-row .l, .c-row .c { font-weight: 700; }
.c-row .v { min-height: 13.8pt; }
.c-row .v.miss { border-bottom: 1px dashed #d1435b; min-width: 5cm; width: 5cm; justify-self: start; height: 13.8pt; }
.c-logo { text-align: center; margin: 0 0 18pt; line-height: 0; }
.c-logo img { width: 4cm; height: 3.934cm; }
.c-foot div { text-align: center; font-weight: 700; font-size: 16pt; line-height: 27.6pt; }

/* ---------- responsif ---------- */
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; height: calc(100vh - 64px - 58px); }
  .preview { display: none; border: 0; padding: 26px 12px 70px; }
  body[data-tab="preview"] .editor { display: none; }
  body[data-tab="preview"] .preview { display: block; }
  .editor { padding: 14px 14px 60px; }
  .mtabs { display: flex; position: fixed; bottom: 0; left: 0; right: 0; height: 58px; background: var(--card); border-top: 1px solid var(--line); z-index: 25; }
  .mtabs button { flex: 1; border: 0; background: transparent; font-weight: 600; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 8px; }
  body[data-tab="edit"] .mtabs [data-t="edit"], body[data-tab="preview"] .mtabs [data-t="preview"] { color: var(--brand); box-shadow: inset 0 -3px 0 var(--brand); }
  .brand small, .chip.hide-m { display: none; }
  .top { padding: 0 12px; gap: 8px; }
  .top-actions .btn span.t { display: none; }
  .top-actions .btn { padding: 9px 11px; }
  .grid { grid-template-columns: 1fr; } .grid .w2 { grid-column: auto; }
  .bigbtns { grid-template-columns: 1fr; }
  .panel { padding: 22px 18px 20px; border-radius: 22px; }
  .panel-head h2 { margin: 0; font: 700 27px/1.15 var(--display); letter-spacing: -.025em; }
  .stp .lbl { display: none; } .stp.on .lbl { display: inline; }
  #toasts { bottom: 74px; width: calc(100vw - 32px); }
}

/* ---------- cetak → PDF ---------- */
@media print {
  @page { size: A4; margin: 0; }
  html, body { height: auto !important; background: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .top, .editor, .mtabs, #toasts, #modalRoot, .sheet-label { display: none !important; }
  .layout { display: block !important; height: auto !important; }
  .preview { display: block !important; overflow: visible !important; padding: 0 !important; background: none !important; border: 0 !important; height: auto !important; }
  .sheets { display: block !important; }
  .sheet-wrap { width: 210mm !important; height: 296mm !important; margin: 0 !important; break-after: page; page-break-after: always; overflow: hidden; }
  .sheet-wrap:last-child { break-after: auto; page-break-after: auto; }
  .sheet { transform: none !important; box-shadow: none !important; height: 296mm !important; border-radius: 0; }
  .c-row .v.miss { border: 0 !important; }
}
