/* ==========================================================================
   CV & Dokumen Builder — gaya antarmuka
   ========================================================================== */
:root {
  --brand: #2348d6;
  --brand-dark: #1a37a8;
  --brand-soft: #eef2ff;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --bg: #f5f7fb;
  --card: #ffffff;
  --ok: #15803d;
  --ok-soft: #dcfce7;
  --warn: #b45309;
  --warn-soft: #fef3c7;
  --err: #b91c1c;
  --err-soft: #fee2e2;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .06);
  --topbar: 60px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; }
h2, .h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.xsmall { font-size: .78rem; }
.center { text-align: center; }
.mt { margin-top: 1.4rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.opt { color: var(--muted); font-weight: 400; font-size: .82em; }
.warn { color: var(--warn); }

/* ---------- tombol ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; border: 1px solid transparent; border-radius: var(--radius-sm); padding: .6em 1.1em; font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; background: #fff; color: var(--ink); text-decoration: none !important; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn:focus-visible, .icon-btn:focus-visible, .tab:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(35, 72, 214, .35); outline-offset: 1px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-dark); }
.btn-ghost { border-color: var(--line-2); background: #fff; }
.btn-ghost:hover:not(:disabled) { background: #f8fafc; border-color: #94a3b8; }
.btn-danger-ghost { border-color: #fecaca; color: var(--err); background: #fff; }
.btn-danger-ghost:hover { background: var(--err-soft); }
.btn-sm { padding: .38em .75em; font-size: .84rem; }
.btn-lg { padding: .8em 1.4em; font-size: 1rem; }
.btn-block { width: 100%; }
.icon-btn { border: 0; background: transparent; color: var(--muted); width: 28px; height: 28px; border-radius: 6px; cursor: pointer; font-size: .8rem; flex: none; }
.icon-btn:hover { background: #f1f5f9; color: var(--ink); }
.icon-btn.danger:hover, .icon-btn[data-del]:hover { background: var(--err-soft); color: var(--err); }
.tag { display: inline-block; background: #f1f5f9; color: var(--ink-2); border-radius: 99px; padding: .05em .6em; font-size: .78rem; font-weight: 600; }

/* ---------- form ---------- */
label { display: block; font-size: .86rem; font-weight: 600; color: var(--ink-2); }
.label-text { display: block; font-size: .86rem; font-weight: 600; color: var(--ink-2); margin-bottom: .3rem; }
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), select, textarea {
  display: block; width: 100%; margin-top: .3rem; padding: .55em .7em; font: inherit; font-size: .93rem; color: var(--ink);
  background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius-sm); transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(35, 72, 214, .12); outline: none; }
input:disabled { background: #f1f5f9; color: var(--muted); }
textarea { resize: vertical; min-height: 4.5em; line-height: 1.45; }
input[type=range] { width: 100%; margin-top: .6rem; accent-color: var(--brand); }
label.check { display: flex; align-items: center; gap: .5em; font-weight: 500; }
label.check input { width: 17px; height: 17px; accent-color: var(--brand); }
.hint { display: block; font-size: .8rem; color: var(--muted); font-weight: 400; margin: .25rem 0 .7rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem 1rem; }
.span-2 { grid-column: span 2; }
.form-stack { display: grid; gap: .9rem; }

/* ---------- topbar ---------- */
.topbar { position: sticky; top: 0; z-index: 30; height: var(--topbar); display: flex; align-items: center; gap: 1.2rem; padding: 0 1.25rem; background: #fff; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .55rem; color: var(--ink); font-weight: 750; font-size: 1.02rem; text-decoration: none !important; }
.brand-mark { color: var(--brand); display: flex; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: .9rem; }
.nav-link { color: var(--ink-2); font-weight: 600; font-size: .9rem; }
.nav-link.muted { color: var(--muted); }
.user-chip { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: .88rem; }
.stepper { display: flex; align-items: center; gap: .35rem; margin-left: 1rem; }
.step { display: flex; align-items: center; gap: .45rem; padding: .35rem .7rem; border-radius: 99px; color: var(--muted); font-weight: 600; font-size: .88rem; text-decoration: none !important; }
.step b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #e2e8f0; color: var(--ink-2); font-size: .75rem; }
.step.is-active { background: var(--brand-soft); color: var(--brand); }
.step.is-active b { background: var(--brand); color: #fff; }
.step.is-done b { background: var(--ok); color: #fff; }
.step-sep { color: var(--line-2); }

.flash { margin: .8rem auto 0; max-width: 1160px; padding: .7rem 1rem; border-radius: var(--radius-sm); font-weight: 500; }
.flash-success { background: var(--ok-soft); color: #14532d; }
.flash-info { background: var(--brand-soft); color: #1e3a8a; }
.flash-error { background: var(--err-soft); color: #7f1d1d; }
.alert { padding: .7rem .9rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: .9rem; }
.alert-error { background: var(--err-soft); color: #7f1d1d; }

.main { max-width: 1160px; margin: 0 auto; padding: 1.8rem 1.25rem 3rem; }
.main-wide { padding: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.2rem; flex-wrap: wrap; margin-bottom: 1.3rem; }
.page-head p { margin: 0; }
.page-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.8rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 100; max-width: min(92vw, 560px); padding: .75rem 1.1rem; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 500; font-size: .92rem; box-shadow: 0 10px 30px rgba(0,0,0,.2); transition: .2s; }
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.toast-success { background: #14532d; }
.toast-error { background: #7f1d1d; }
.toast-warn { background: #78350f; }

/* ---------- auth ---------- */
.page-auth .main { display: grid; place-items: center; min-height: calc(100vh - var(--topbar)); padding-top: 2rem; }
.auth-card { width: min(420px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 2rem; }
.auth-switch { margin: 1.2rem 0 0; text-align: center; font-size: .9rem; color: var(--muted); }

/* ---------- landing ---------- */
.page-landing .main-wide { max-width: 1160px; margin: 0 auto; padding: 0 1.25rem 2rem; }
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; padding: 4rem 0 3rem; }
.eyebrow { display: inline-block; font-weight: 700; font-size: .8rem; color: var(--brand); background: var(--brand-soft); padding: .3rem .7rem; border-radius: 99px; margin-bottom: 1rem; }
.hero h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.025em; }
.lead { font-size: 1.1rem; color: var(--ink-2); max-width: 36em; }
.hero-cta { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.6rem; }
.hero-visual { display: grid; place-items: center; }
.stack { position: relative; width: 300px; height: 380px; }
.sheet { position: absolute; width: 250px; height: 340px; background: #fff; border-radius: 6px; box-shadow: 0 10px 30px rgba(15,23,42,.12); border: 1px solid var(--line); }
.sheet span { position: absolute; bottom: 14px; left: 16px; font-size: .78rem; font-weight: 700; color: var(--muted); }
.sheet-3 { transform: rotate(8deg) translate(40px, 18px); background: #f8fafc; }
.sheet-2 { transform: rotate(4deg) translate(22px, 8px); background: #fbfcfe; }
.sheet-1 { padding: 26px 22px; }
.mock-name { height: 16px; width: 60%; background: var(--brand); border-radius: 3px; }
.mock-sub { height: 8px; width: 45%; background: #cbd5e1; border-radius: 3px; margin: 9px 0 16px; }
.mock-rule { height: 2px; background: var(--brand); opacity: .5; margin: 14px 0; }
.mock-line { height: 7px; background: #e2e8f0; border-radius: 3px; margin: 8px 0; }
.w90 { width: 90%; } .w85 { width: 85%; } .w75 { width: 75%; } .w70 { width: 70%; } .w60 { width: 60%; }
.merge-badge { position: absolute; right: -6px; bottom: 6px; background: var(--ink); color: #fff; font-weight: 700; font-size: .85rem; padding: .5rem .8rem; border-radius: 10px; box-shadow: var(--shadow); }
.flow { padding: 2rem 0; }
.flow h2 { font-size: 1.5rem; text-align: center; margin-bottom: 1.5rem; }
.flow-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.flow-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.flow-num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; margin-bottom: .8rem; }
.flow-card p { color: var(--ink-2); margin: 0; font-size: .93rem; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; padding: 1.5rem 0 3rem; }
.feature { border-top: 3px solid var(--brand); padding-top: .9rem; }
.feature p { color: var(--ink-2); font-size: .9rem; margin: 0; }
.site-footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 2rem 0 1rem; border-top: 1px solid var(--line); }

/* ---------- dashboard ---------- */
.inline-create { display: flex; gap: .6rem; min-width: min(520px, 100%); }
.inline-create input { margin: 0 !important; }
.stat-row { display: flex; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.2rem; display: flex; align-items: baseline; gap: .6rem; color: var(--ink); text-decoration: none !important; }
.stat b { font-size: 1.5rem; }
.stat span { color: var(--muted); font-size: .9rem; }
.stat-link:hover { border-color: var(--brand); }
.empty { background: #fff; border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 3rem 2rem; text-align: center; color: var(--ink-2); }
.empty p { max-width: 34em; margin: 0 auto; }
.empty-mini { padding: 1.2rem; border: 1px dashed var(--line-2); border-radius: var(--radius-sm); color: var(--muted); font-size: .9rem; text-align: center; background: #fbfcfe; }
.resume-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 1.1rem; }
.resume-card { display: flex; gap: 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.resume-card:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.resume-thumb { flex: none; width: 92px; height: 130px; border: 1px solid var(--line); border-radius: 4px; background: #fff; overflow: hidden; }
.resume-thumb > div { height: 100%; padding: 10px 9px; position: relative; }
.resume-thumb i { display: block; height: 4px; background: #e2e8f0; border-radius: 2px; margin: 5px 0; }
.resume-thumb .rt-name { height: 7px; width: 70%; background: var(--accent); }
.resume-thumb .rt-sub { width: 50%; margin-bottom: 9px; }
.resume-thumb .s { width: 70%; }
.rt-modern_split { padding-left: 38px !important; background: linear-gradient(90deg, var(--accent) 0 30px, #fff 30px); }
.rt-modern_split .rt-name { position: absolute; left: 5px; top: 10px; width: 20px; background: #fff; }
.rt-creative { padding-top: 34px !important; background: linear-gradient(180deg, var(--accent) 0 26px, #fff 26px); }
.rt-creative .rt-name { position: absolute; top: 9px; background: #fff; }
.resume-body { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.resume-body p { margin: .1rem 0 .3rem; }
.rename-input { margin: 0 !important; padding: .2em .35em !important; font-weight: 700 !important; font-size: 1rem !important; border-color: transparent !important; margin-left: -.35em !important; background: transparent !important; }
.rename-input:hover { border-color: var(--line) !important; }
.rename-input:focus { border-color: var(--brand) !important; background: #fff !important; }
.meta .tag { margin-right: .3rem; }
.card-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; padding-top: .6rem; }
.card-actions form { display: contents; }

/* ---------- split screen (editor & assembler) ---------- */
.split { display: grid; grid-template-columns: minmax(380px, 46%) 1fr; height: calc(100vh - var(--topbar)); }
.panel { min-height: 0; display: flex; flex-direction: column; }
.panel-left { background: #fff; border-right: 1px solid var(--line); overflow-y: auto; }
.panel-right { background: #e9edf4; }
.panel-head { position: sticky; top: 0; z-index: 5; background: #fff; display: flex; align-items: center; gap: .8rem; padding: 1rem 1.3rem .8rem; border-bottom: 1px solid var(--line); }
.panel-head.column { flex-direction: column; align-items: flex-start; gap: .2rem; position: static; }
.panel-head.column p { margin: 0; }
.title-input { margin: 0 !important; font-weight: 700 !important; font-size: 1.08rem !important; border-color: transparent !important; padding: .3em .45em !important; }
.title-input:hover { border-color: var(--line) !important; }
.save-state { flex: none; font-size: .8rem; font-weight: 600; color: var(--muted); padding: .2rem .6rem; border-radius: 99px; background: #f1f5f9; }
.save-state.is-ok { color: var(--ok); background: var(--ok-soft); }
.save-state.is-busy, .save-state.is-pending { color: var(--warn); background: var(--warn-soft); }
.save-state.is-err { color: var(--err); background: var(--err-soft); }
.panel-foot { position: sticky; bottom: 0; margin-top: auto; display: flex; justify-content: space-between; gap: .8rem; padding: .9rem 1.3rem; background: rgba(255,255,255,.96); border-top: 1px solid var(--line); backdrop-filter: blur(6px); }

.tabs { display: flex; gap: .3rem; padding: .7rem 1.3rem 0; border-bottom: 1px solid var(--line); }
.tab { border: 0; background: none; font: inherit; font-weight: 650; color: var(--muted); padding: .55rem .9rem; border-bottom: 2.5px solid transparent; cursor: pointer; margin-bottom: -1px; }
.tab.is-active { color: var(--brand); border-bottom-color: var(--brand); }
.tab-pane { display: none; padding: 1.1rem 1.3rem 1.4rem; }
.tab-pane.is-active { display: block; }
.pane-title { font-size: 1.02rem; margin-bottom: .3rem; }

.substeps { list-style: none; display: flex; gap: .35rem; padding: 0; margin: 0 0 1.2rem; overflow-x: auto; }
.substeps button { display: flex; align-items: center; gap: .4rem; border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: .3rem .75rem .3rem .35rem; font: inherit; font-size: .84rem; font-weight: 600; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.substeps b { width: 22px; height: 22px; border-radius: 50%; background: #f1f5f9; display: grid; place-items: center; font-size: .74rem; }
.substeps button.is-active { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.substeps button.is-active b { background: var(--brand); color: #fff; }
.step-pane { display: none; }
.step-pane.is-active { display: block; }
.step-nav { display: flex; justify-content: space-between; margin-top: 1.4rem; }

/* repeater */
.repeater { display: grid; gap: .6rem; margin: .4rem 0 .8rem; }
.rep-card { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.rep-card.is-open { border-color: #c7d2fe; box-shadow: 0 0 0 3px #eef2ff; }
.rep-head { display: flex; align-items: center; gap: .2rem; padding: .35rem .45rem; }
.rep-toggle { flex: 1; min-width: 0; text-align: left; border: 0; background: none; font: inherit; cursor: pointer; padding: .3rem .4rem; display: flex; flex-direction: column; }
.rep-toggle b { font-size: .93rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-toggle small { color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-body { display: none; padding: .4rem .9rem 1rem; border-top: 1px solid var(--line); }
.rep-card.is-open .rep-body { display: block; padding-top: .9rem; }
.rep-row { display: grid; grid-template-columns: auto 1fr 130px 110px auto; gap: .4rem; align-items: center; }
.rep-row input, .rep-row select { margin: 0 !important; padding: .45em .55em !important; font-size: .88rem !important; }
.handle { cursor: grab; color: #94a3b8; font-size: 1.15rem; line-height: 1; padding: .3rem .35rem; border-radius: 6px; user-select: none; touch-action: none; }
.handle:hover { background: #f1f5f9; color: var(--ink); }
.is-sorting .handle { cursor: grabbing; }
.is-dragging { opacity: .85; box-shadow: 0 8px 24px rgba(15,23,42,.18) !important; position: relative; z-index: 2; background: #fff; }
.add-btn { margin-bottom: .4rem; }
.no-select { user-select: none; -webkit-user-select: none; }

/* tampilan */
.tpl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; margin-top: .6rem; }
.tpl { border: 1.5px solid var(--line); background: #fff; border-radius: var(--radius-sm); padding: .7rem; text-align: left; cursor: pointer; font: inherit; display: flex; flex-direction: column; gap: .15rem; }
.tpl:hover { border-color: var(--line-2); }
.tpl.is-active { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.tpl b { font-size: .9rem; }
.tpl small { color: var(--muted); font-size: .76rem; line-height: 1.35; }
.tpl-mini { display: block; height: 82px; border: 1px solid var(--line); border-radius: 4px; margin-bottom: .45rem; padding: 8px; position: relative; overflow: hidden; --a: var(--cv-accent, #1E293B); }
.tpl-mini i { display: block; height: 4px; border-radius: 2px; background: #e2e8f0; margin: 5px 0; }
.tpl-mini i:first-child { height: 7px; width: 55%; background: var(--a); }
.tm-modern { padding-left: 34%; background: linear-gradient(90deg, var(--a) 0 28%, #fff 28%); }
.tm-creative { padding-top: 30px; background: linear-gradient(180deg, var(--a) 0 22px, #fff 22px); }
.tm-creative i:first-child { position: absolute; top: 8px; width: 45%; background: #fff; }
.swatches { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; align-items: center; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; background: var(--c); box-shadow: 0 0 0 1px var(--line-2); cursor: pointer; }
.swatch.is-active { box-shadow: 0 0 0 2.5px var(--ink); }
.swatch-custom { display: flex; align-items: center; gap: .35rem; font-weight: 600; font-size: .82rem; color: var(--muted); cursor: pointer; }
.swatch-custom input { width: 34px; height: 34px; border: 0; padding: 0; background: none; cursor: pointer; }
.segmented { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--radius-sm); overflow: hidden; }
.segmented button { border: 0; background: #fff; font: inherit; font-size: .88rem; font-weight: 600; padding: .45rem 1rem; cursor: pointer; color: var(--ink-2); }
.segmented button + button { border-left: 1px solid var(--line-2); }
.segmented button.is-active { background: var(--brand); color: #fff; }
.sort-list { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .4rem; }
.sort-item { display: flex; align-items: center; gap: .4rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .3rem .45rem; font-weight: 600; font-size: .92rem; }
.grow { flex: 1; }

/* pratinjau */
.preview-bar { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .7rem 1.2rem; background: #fff; border-bottom: 1px solid var(--line); font-size: .92rem; }
.preview-scroll { flex: 1; overflow: auto; padding: 1.4rem 1rem 3rem; }
.preview-pages { max-width: 760px; margin: 0 auto; display: grid; justify-items: center; gap: 1.2rem; }
.pdf-page { margin: 0; display: grid; justify-items: center; gap: .35rem; }
.pdf-page canvas { background: #fff; box-shadow: 0 2px 6px rgba(15,23,42,.1), 0 10px 30px rgba(15,23,42,.08); border-radius: 2px; }
.pdf-page figcaption { font-size: .78rem; color: var(--muted); font-weight: 600; }
.preview-loading { padding: 4rem 1rem; text-align: center; color: var(--muted); font-weight: 500; }
.preview-loading.error { color: var(--err); }
.fab-preview { display: none; }

/* ---------- gudang dokumen ---------- */
.vault { max-width: 1060px; margin: 0 auto; padding: 1.8rem 1.25rem 3rem; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: 2.2rem 1rem; border: 2px dashed #a5b4fc; border-radius: var(--radius); background: #f8f9ff; color: var(--brand); cursor: pointer; text-align: center; font-weight: 500; transition: .15s; }
.dropzone strong { color: var(--ink); font-size: 1.02rem; }
.dropzone:hover, .dropzone.is-over, .dropzone:focus-visible { background: var(--brand-soft); border-color: var(--brand); outline: none; }
.upload-queue { display: grid; gap: .4rem; margin-top: .8rem; }
.q-item { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; padding: .55rem .8rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: .88rem; }
.q-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-status { color: var(--muted); }
.q-bar { grid-column: span 2; height: 4px; background: #f1f5f9; border-radius: 2px; overflow: hidden; }
.q-bar i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }
.q-item.is-done .q-status { color: var(--ok); } .q-item.is-done .q-bar i { background: var(--ok); }
.q-item.is-fail { border-color: #fecaca; background: #fff7f7; } .q-item.is-fail .q-status { color: var(--err); } .q-item.is-fail .q-bar { display: none; }
.doc-list-head { margin: 1.8rem 0 .7rem; }
.doc-list { display: grid; gap: .55rem; }
.doc-row { display: grid; grid-template-columns: 64px 1fr 210px auto; gap: 1rem; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .6rem .8rem; transition: background .3s; }
.doc-row.flash-ok { background: #f0fdf4; }
.doc-thumb { position: relative; width: 64px; height: 76px; border: 1px solid var(--line); border-radius: 4px; background: #f8fafc; padding: 0; overflow: hidden; cursor: zoom-in; display: grid; place-items: center; }
.doc-thumb img, .doc-thumb canvas { max-width: 100%; max-height: 100%; object-fit: contain; }
.thumb-fallback { color: var(--muted); font-weight: 700; font-size: .8rem; }
.ftype { position: absolute; left: 3px; bottom: 3px; font-size: .62rem; font-weight: 800; padding: 0 .3rem; border-radius: 3px; color: #fff; background: #64748b; }
.ft-pdf { background: #dc2626; } .ft-jpg { background: #0891b2; } .ft-png { background: #7c3aed; }
.doc-main { min-width: 0; }
.doc-label { margin: 0 !important; font-weight: 650 !important; border-color: transparent !important; padding: .3em .4em !important; margin-left: -.4em !important; }
.doc-label:hover { border-color: var(--line) !important; }
.doc-meta { padding-left: .05em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-type select { margin: 0 !important; }
.doc-actions { display: flex; gap: .4rem; }
dialog.viewer { width: min(960px, 94vw); height: min(90vh, 1100px); padding: 0; border: 0; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog.viewer[open] { display: flex; flex-direction: column; }
dialog.viewer::backdrop { background: rgba(15,23,42,.55); }
.viewer-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
.viewer-head div { display: flex; gap: .4rem; }
.viewer-body { flex: 1; min-height: 0; background: #e9edf4; display: grid; place-items: center; overflow: auto; }
.viewer-body iframe { width: 100%; height: 100%; border: 0; }
.viewer-body img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ---------- studio susun ---------- */
.bundle-list { list-style: none; margin: 0; padding: .9rem 1.3rem .4rem; display: grid; gap: .5rem; }
.b-card { display: flex; align-items: center; gap: .4rem; padding: .55rem .5rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.b-card.is-cv { border-left: 3px solid var(--brand); }
.b-card.is-off { background: #f8fafc; }
.b-card.is-off .b-body b { color: var(--muted); text-decoration: line-through; text-decoration-color: #cbd5e1; }
.b-check input { width: 18px; height: 18px; accent-color: var(--brand); margin: 0 .2rem; cursor: pointer; }
.b-num { font-weight: 700; color: var(--muted); font-size: .88rem; min-width: 1.6em; text-align: right; }
.b-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.b-body b { font-size: .93rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-body small { color: var(--muted); font-size: .8rem; display: flex; flex-wrap: wrap; gap: .1rem .5rem; align-items: center; }
.b-body em { color: var(--muted); }
.b-range { color: var(--brand); font-weight: 600; }
.bundle-tools { display: flex; gap: .5rem; flex-wrap: wrap; padding: .3rem 1.3rem .8rem; }
.compress { margin: .3rem 1.3rem 0; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .6rem .9rem .8rem; }
.compress legend { font-weight: 700; font-size: .88rem; padding: 0 .3rem; }
.radio { display: flex; gap: .55rem; align-items: flex-start; font-weight: 500; padding: .35rem 0; cursor: pointer; }
.radio input { accent-color: var(--brand); margin-top: .25rem; }
.radio small { display: block; line-height: 1.35; }
.summary { margin: .9rem 1.3rem 1rem; padding: .7rem .9rem; background: #f8fafc; border-radius: var(--radius-sm); font-size: .9rem; display: grid; gap: .2rem; }

/* ---------- responsif ---------- */
@media (max-width: 1100px) {
  .stepper .step span { display: none; }
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; height: auto; min-height: calc(100vh - var(--topbar)); }
  .panel-left { overflow: visible; border-right: 0; }
  .panel-right { display: none; }
  .split.show-preview .panel-left { display: none; }
  .split.show-preview .panel-right { display: flex; min-height: calc(100vh - var(--topbar)); }
  .fab-preview { display: block; position: fixed; right: 16px; bottom: 82px; z-index: 40; border: 0; border-radius: 99px; padding: .75rem 1.1rem; background: var(--ink); color: #fff; font: inherit; font-weight: 700; box-shadow: 0 8px 24px rgba(0,0,0,.25); cursor: pointer; }
  .split.show-preview .fab-preview { bottom: 20px; }
  .hero { grid-template-columns: 1fr; padding-top: 2.5rem; }
  .hero-visual { display: none; }
  .flow-grid { grid-template-columns: 1fr; }
  .doc-row { grid-template-columns: 56px 1fr; }
  .doc-type, .doc-actions { grid-column: 2; }
  .topbar .nav-link:not(.muted) { display: none; }
  .stepper { margin-left: auto; }
  .topbar-right { margin-left: .5rem; }
  .brand-name { display: none; }
}
@media (max-width: 560px) {
  .grid-2 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .tpl-grid { grid-template-columns: 1fr 1fr; }
  .rep-row { grid-template-columns: auto 1fr auto; }
  .rep-row select, .rep-row input[data-f="proficiency_level"] { grid-column: 2; }
  .inline-create { flex-direction: column; min-width: 0; width: 100%; }
  .features { grid-template-columns: 1fr; }
  .resume-card { flex-direction: column; }
  .resume-thumb { display: none; }
  .page-foot { flex-direction: column-reverse; align-items: stretch; }
}
@media print { .topbar, .toast { display: none; } }
