/* Tanda Tangan Dokumen GA TECH */
:root {
  --bg: #f4f5f9; --surface: #fff; --surface-2: #f8f9fc; --line: #e3e6ee; --ink: #121826; --ink-2: #4b5468; --muted: #7a8296;
  --accent: #5b4fd1; --accent-2: #4a3fb8; --accent-soft: #eeecfd;
  --green: #12805c; --green-bg: #e7f6ef; --red: #c2334a; --red-bg: #fdecef; --amber: #a3600a; --amber-bg: #fdf3e2;
  --radius: 12px; --shadow: 0 1px 2px rgba(16,24,40,.04), 0 6px 20px rgba(16,24,40,.05);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; line-height: 1.2; letter-spacing: -.02em; margin: .2rem 0 .35rem; }
h2 { font-size: 1rem; margin: 0 0 .9rem; }
.muted { color: var(--muted); } .small { font-size: .82rem; } .block { display: block; } .nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
.break { word-break: break-all; } .pre { white-space: pre-wrap; }
.eyebrow { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* header */
.topbar { background: #141119; color: #fff; position: sticky; top: 0; z-index: 20; }
.topbar-in { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none !important; }
.brand img { width: 30px; height: 30px; }
.brand b { display: block; letter-spacing: .14em; font-size: .92rem; }
.brand small { display: block; font-size: .7rem; color: #a9a3ba; letter-spacing: .02em; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { color: #c9c4d8; padding: 7px 12px; border-radius: 8px; font-size: .9rem; text-decoration: none; }
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav a.on { background: rgba(255,255,255,.12); color: #fff; font-weight: 600; }
.who { display: flex; align-items: center; gap: 12px; }
.who a { color: #fff; text-align: right; font-size: .88rem; line-height: 1.2; text-decoration: none; }
.who small { display: block; color: #a9a3ba; font-size: .72rem; }
.who form { margin: 0; }
.who .btn-ghost { color: #c9c4d8; border-color: rgba(255,255,255,.18); background: transparent; }
.main { padding-top: 28px; padding-bottom: 40px; min-height: calc(100vh - 140px); }
.foot { color: var(--muted); font-size: .8rem; padding-bottom: 28px; }

/* layout */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head p { margin: 0; }
.back { font-size: .85rem; color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-bottom: 18px; }
.card.flush { padding: 0; overflow: hidden; }
.narrow { max-width: 440px; } .narrow-lg { max-width: 760px; }
.center-page { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.center-page .card { width: 100%; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stack { display: grid; gap: 12px; } .stack-sm { display: grid; gap: 8px; margin: 0; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; font-size: .9rem; font-weight: 500; cursor: pointer; text-decoration: none !important; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); }
.btn-danger { color: var(--red); border-color: #f2c4cc; }
.btn-danger:hover { background: var(--red-bg); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 5px 10px; font-size: .82rem; }
.btn-block { width: 100%; }
.input { width: 100%; padding: 9px 12px; border: 1px solid #cfd4df; border-radius: 9px; font: inherit; font-size: .92rem; background: #fff; color: var(--ink); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91,79,209,.18); }
textarea.input { resize: vertical; }
.field { display: grid; gap: 5px; margin-bottom: 14px; }
.field > span { font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.form h2 { margin-top: 6px; }
.form-error { color: var(--red); font-size: .88rem; margin: 0 0 10px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; color: var(--ink-2); }
.check input { margin-top: 3px; accent-color: var(--accent); }

.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; border: 1px solid var(--line); background: var(--surface); font-size: .92rem; }
.alert-ok { background: var(--green-bg); border-color: #bfe6d4; color: #0b5a40; }
.alert-error { background: var(--red-bg); border-color: #f4c7cf; color: #8e1d31; }
.alert-warn { background: var(--amber-bg); border-color: #f2d9ad; color: #7a4705; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.badge-green { background: var(--green-bg); color: var(--green); } .badge-red { background: var(--red-bg); color: var(--red); }
.badge-amber { background: var(--amber-bg); color: var(--amber); } .badge-gray { background: #eceef3; color: #5b6275; }

/* list */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs { display: flex; gap: 2px; flex-wrap: wrap; background: #e9ebf2; padding: 3px; border-radius: 10px; }
.tabs a { padding: 6px 12px; border-radius: 8px; color: var(--ink-2); font-size: .85rem; text-decoration: none; }
.tabs a.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.search { margin: 0; width: min(300px, 100%); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 11px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.table td { padding: 12px 14px; border-bottom: 1px solid #eef0f5; vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tr.click { cursor: pointer; } .table tr.click:hover td { background: #fafbff; }
.late { color: var(--red); font-weight: 600; }
.table .col-title { min-width: 220px; overflow-wrap: anywhere; }
.table .col-party { min-width: 110px; max-width: 200px; overflow-wrap: anywhere; }
.table .col-who { min-width: 120px; max-width: 190px; }
.table .col-status { width: 1%; white-space: nowrap; }
.table th { white-space: nowrap; }
.empty { display: grid; gap: 4px; padding: 48px 20px; text-align: center; }
.dl { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; margin: 0; }
.dl dt { font-size: .8rem; color: var(--muted); } .dl dd { margin: 2px 0 0; } .dl .span2 { grid-column: span 2; }
details.menu { position: relative; display: inline-block; }
details.menu summary { list-style: none; } details.menu summary::-webkit-details-marker { display: none; }
.menu-body { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; width: 250px; display: grid; gap: 8px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.menu-body form { margin: 0; }

/* upload & images */
.drop { display: grid; gap: 4px; place-items: center; text-align: center; padding: 28px 16px; margin-bottom: 16px; border: 2px dashed #cdd2e0; border-radius: 12px; background: var(--surface-2); cursor: pointer; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop.ready { border-style: solid; border-color: #9bd3bb; background: var(--green-bg); }
.img-box { height: 120px; border: 1px solid var(--line); border-radius: 10px; display: grid; place-items: center; overflow: hidden; }
.img-box img { max-width: 92%; max-height: 108px; } .img-box em { color: var(--muted); font-size: .85rem; }
.checker { background: repeating-conic-gradient(#f0f1f5 0% 25%, #fff 0% 50%) 0 0 / 16px 16px; }

/* dialog tanda tangan */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(15,13,25,.7); display: flex; padding: 16px; }
.modal-box { margin: auto; width: 100%; max-width: 1080px; height: min(100%, 860px); background: #fff; border-radius: 14px; display: flex; flex-direction: column; overflow: hidden; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.modal-head b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-body { flex: 1; min-height: 0; display: flex; }
.placer { flex: 1; min-width: 0; overflow: auto; padding: 14px; background: #e6e8ef; }
.placer-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; font-size: .88rem; color: var(--ink-2); }
.placer-tools input[type=range] { accent-color: var(--accent); }
.page { position: relative; margin: 0 auto; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.15); touch-action: none; user-select: none; }
.page canvas { display: block; width: 100%; height: 100%; }
.box { position: absolute; border: 2px solid rgba(91,79,209,.85); background: rgba(255,255,255,.35); cursor: move; border-radius: 2px; }
.box.outline { border-style: dashed; background: rgba(91,79,209,.1); }
.box .tag { position: absolute; top: -22px; left: 0; background: var(--accent); color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 4px; white-space: nowrap; pointer-events: none; }
.box .grip { position: absolute; right: -9px; bottom: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: 2px solid #fff; cursor: nwse-resize; }
.box canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.side { width: 300px; flex-shrink: 0; border-left: 1px solid var(--line); background: var(--surface-2); padding: 16px; overflow: auto; display: flex; flex-direction: column; gap: 14px; }
.signer { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-size: .9rem; }
.loading { padding: 80px 0; text-align: center; color: var(--muted); }

/* pratinjau PDF */
.modal[hidden] { display: none; }
.viewer { padding: 0; overflow: hidden; }
.modal-box.viewer .viewer-pages { flex: 1; height: auto; min-height: 0; }
.viewer-bar { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.viewer-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.viewer-tools [data-zoom] { min-width: 3.2em; text-align: center; color: var(--ink-2); }
.seg { display: inline-flex; background: #e9ebf2; padding: 3px; border-radius: 9px; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 7px; font: inherit; font-size: .85rem; color: var(--ink-2); cursor: pointer; }
.seg button[aria-pressed=true] { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.viewer-pages { height: min(78vh, 900px); overflow: auto; background: #e6e8ef; padding: 12px; }
.viewer-page { position: relative; margin: 0 auto 12px; background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.18); }
.viewer-page canvas { display: block; width: 100%; height: 100%; }
.viewer-no { position: absolute; right: 6px; bottom: 6px; background: rgba(18,24,38,.6); color: #fff; font-size: .7rem; padding: 1px 6px; border-radius: 4px; }

/* login */
.login-page { background: #141119; min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 900px; display: grid; grid-template-columns: 1fr 1.1fr; gap: 10px; padding: 10px; background: #2a2535; border-radius: 26px; box-shadow: 0 30px 60px rgba(0,0,0,.45); }
.login-art { position: relative; min-height: 520px; border-radius: 18px; overflow: hidden; }
.login-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.login-art-in { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 22px; color: #fff; }
.brand-light b { color: #fff; }
.login-caption { text-align: center; font-size: 1.45rem; font-weight: 500; line-height: 1.3; margin: 0 0 28px; }
.login-form { padding: 48px 44px; display: flex; flex-direction: column; justify-content: center; }
.login-form h1 { color: #fff; font-size: 2.1rem; font-weight: 500; }
.login-sub { color: #a9a3ba; margin: 4px 0 28px; font-size: .92rem; }
.login-form form { display: grid; gap: 12px; }
.login-input { height: 48px; border-radius: 9px; border: 1px solid transparent; background: #3a3448; color: #fff; padding: 0 15px; font: inherit; }
.login-input::placeholder { color: #8d87a0; }
.login-input:focus { outline: none; border-color: #9a8cf0; background: #403951; }
.login-btn { margin-top: 12px; height: 48px; border: 0; border-radius: 9px; background: #6e5bd6; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.login-btn:hover { background: #7c6ae3; }
.login-error { background: rgba(244,63,94,.12); border: 1px solid rgba(244,63,94,.35); color: #fecdd3; padding: 10px 14px; border-radius: 9px; font-size: .9rem; }
.login-foot { color: #6f6a80; font-size: .78rem; margin-top: 28px; }

/* verifikasi */
.verify-page { background: #eef0f5; min-height: 100vh; padding: 40px 16px; }
.verify-wrap { max-width: 520px; margin: 0 auto; }
.verify-brand { justify-content: center; margin-bottom: 22px; color: var(--ink); }
.verify-brand small { color: var(--muted); }
.verify-card { background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 20px 40px rgba(16,24,40,.08); }
.verify-head { display: flex; gap: 16px; align-items: flex-start; padding: 20px 24px; color: #fff; }
.verify-head.ok { background: linear-gradient(90deg, #059669, #10b981); }
.verify-head.warn { background: linear-gradient(90deg, #d97706, #f59e0b); }
.verify-head.bad { background: linear-gradient(90deg, #e11d48, #f43f5e); }
.verify-icon { flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%; border: 2.5px solid currentColor; display: grid; place-items: center; font-size: 1.3rem; font-weight: 700; }
.verify-icon.bad { color: var(--red); margin: 0 auto 10px; }
.verify-title { font-size: 1.15rem; font-weight: 700; margin: 0; line-height: 1.25; }
.verify-note { margin: 4px 0 0; font-size: .9rem; opacity: .92; }
.verify-rows { margin: 0; padding: 0 24px; }
.verify-rows div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid #f0f1f5; font-size: .9rem; }
.verify-rows dt { color: var(--muted); } .verify-rows dd { margin: 0; text-align: right; }
.verify-sha { padding: 14px 24px; font-size: .8rem; color: var(--muted); }
.verify-sha p { margin: 0 0 4px; } .verify-sha b { color: var(--ink-2); } .verify-sha .mono { color: var(--ink-2); font-size: .72rem; }
.verify-foot { margin: 0; padding: 12px 24px 18px; font-size: .78rem; color: var(--muted); }
.verify-missing { padding: 36px 28px; text-align: center; }
.verify-missing h1 { font-size: 1.3rem; } .verify-missing p { color: var(--ink-2); font-size: .92rem; }
.verify-contact { text-align: center; font-size: .8rem; color: var(--muted); margin-top: 20px; }

@media (max-width: 860px) {
  .detail-grid, .grid2, .dl { grid-template-columns: 1fr; } .dl .span2 { grid-column: auto; }
  .login-card { grid-template-columns: 1fr; } .login-art { min-height: 170px; } .login-caption { display: none; } .login-form { padding: 28px 18px 32px; }
  .modal { padding: 0; } .modal-box { border-radius: 0; height: 100%; } .modal-body { flex-direction: column; } .side { width: auto; border-left: 0; border-top: 1px solid var(--line); }
  .brand small { display: none; } .brand b { white-space: nowrap; }
}
@media (max-width: 760px) {
  /* Daftar menjadi kartu */
  .table thead { display: none; }
  .table tr { display: block; padding: 12px 16px; border-bottom: 1px solid #eef0f5; }
  .table td { display: block; padding: 1px 0; border: 0; overflow-wrap: anywhere; }
  .table td.nowrap { white-space: normal; }
  .table td:empty { display: none; }
  .table td[data-label]::before { content: attr(data-label) ': '; color: var(--muted); font-size: .82rem; }
  .table td[data-label] small.block { display: inline; margin-left: 4px; }
  .table .badge { margin-top: 4px; }
}
@media (max-width: 640px) {
  .topbar-in { flex-wrap: wrap; height: auto; gap: 6px 12px; padding-top: 10px; padding-bottom: 6px; }
  .who { margin-left: auto; } .who a { display: none; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; margin: 0 -6px; }
  .nav a { padding: 6px 10px; white-space: nowrap; }
  .main { padding-top: 20px; }
  h1 { font-size: 1.35rem; }
  .page-head .btn-primary { width: 100%; }
  .viewer-tools { margin-left: 0; width: 100%; }
  .viewer-tools [data-download] { margin-left: auto; }
  .viewer-pages { height: 70vh; padding: 8px; }
}
