/* Ore Organizer: gaya portal calon pengantin dan tab workspace. Dimuat sesudah <style> di index.html. */

/* ---- tab masuk sebagai ---- */
.auth .ptabs { display: flex; gap: 4px; background: var(--soft); padding: 4px; border-radius: 10px; margin-bottom: 18px; }
.auth .ptabs button { flex: 1; width: auto; margin: 0; padding: 8px 6px; font-size: .88rem; background: transparent; color: var(--muted); border: 0; border-radius: 8px; }
.auth .ptabs button:hover { background: rgba(15, 31, 61, .06); }
.auth .ptabs button.on { background: var(--navy); color: #fff; }
.auth .reg-link { margin: 14px 0 0; text-align: center; }
.auth .reg-link a { color: var(--navy2); font-weight: 600; }
.auth button.ghost { margin-top: 10px; }

/* ---- tampilan klien: tanpa pencarian global dan tombol project baru ---- */
body.is-client .sbox, body.is-client #newproject { display: none; }

/* ---- workspace ---- */
.ws-card { margin-bottom: 16px; }
.ws-card h3 { margin: 0 0 10px; font-size: 1.35rem; }
.ws-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.ws-two > .ws-card { margin-bottom: 0; }
.ws-savebar { display: flex; gap: 12px; align-items: center; margin-top: 16px; }
.ws-status { min-height: 1.2em; }
.ws-closed { padding: 10px 14px; background: var(--warn-bg); color: var(--warn); border-radius: 8px; }
.ws-none { margin: 8px 0; }
.ws-note textarea { min-height: 84px; }
.ws-note textarea:disabled { background: var(--soft); }
.ws-files { margin-top: 12px; }
.ws-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 10px; }
.ws-thumb { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.ws-thumb a { display: block; }
.ws-thumb img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.ws-thumb figcaption { padding: 6px 8px 2px; font-size: .8rem; color: var(--muted); word-break: break-word; }
.ws-pdf { display: grid; place-items: center; aspect-ratio: 1; background: var(--soft); font-weight: 700; color: var(--navy2); }
.ws-tools { display: flex; gap: 6px; padding: 4px 8px 8px; flex-wrap: wrap; }
.ws-table tbody tr, .ws-table tbody tr:hover { cursor: default; background: none; }
.ws-table td.ws-wrap { white-space: normal; min-width: 160px; }
.ws-table tr.total td { font-weight: 700; border-top: 2px solid var(--navy); }
.ws-check { display: flex; align-items: center; gap: 8px; }
.ws-check input { width: 18px; height: 18px; padding: 0; accent-color: var(--navy); }

/* ---- timeline ---- */
.ws-month { margin-bottom: 14px; overflow: hidden; }
.ws-mhead { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--soft); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ws-mhead b { font: 600 1.25rem var(--serif); }
.ws-roman { display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 6px; border-radius: 8px; background: var(--navy); color: #fff; font: 600 1rem var(--serif); }
.ws-titem { display: flex; gap: 12px; align-items: flex-start; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.ws-titem:last-child { border-bottom: 0; }
.ws-titem input[type=checkbox] { width: 18px; height: 18px; margin-top: 3px; padding: 0; flex: none; accent-color: var(--navy); }
.ws-titem .grow { flex: 1; min-width: 0; }
.ws-titem.done b { text-decoration: line-through; color: var(--muted); }
.ws-month > .ws-none { padding: 0 16px 8px; }

/* ---- budgeting ---- */
.ws-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.ws-sum > div { display: flex; flex-direction: column; gap: 4px; }
.ws-sum b { font: 600 1.6rem/1.2 var(--serif); }

/* ---- dialog kode ---- */
.ws-code { font: 700 2rem/1.2 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .12em; text-align: center; padding: 14px; background: var(--soft); border-radius: 10px; margin-bottom: 10px; }

/* ---- guest list ---- */
.ws-steps { margin: 0 0 12px; padding-left: 20px; }
.ws-steps li { margin-bottom: 6px; }
.ws-upload { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ws-upload input[type=file], .ws-upload input:not([type]) { flex: 1; min-width: 220px; }
.ws-report { margin-top: 12px; padding: 12px 14px; border-radius: 8px; background: var(--warn-bg); color: var(--warn); }
.ws-report ul { margin: 8px 0; padding-left: 20px; max-height: 240px; overflow: auto; }
.ws-flash { padding: 10px 14px; border-radius: 8px; background: #e3f3ea; color: #1f7a4d; }
.ws-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.ws-filters input { flex: 1; min-width: 180px; }
.ws-code-box { font: .8rem/1.4 ui-monospace, Menlo, Consolas, monospace; width: 100%; }
.ws-card input[readonly] { width: 100%; }

/* ---- tab project: turun ke baris berikutnya, tidak ada yang terpotong ---- */
.tabs { flex-wrap: wrap; overflow-x: visible; }

/* ---- riwayat perubahan di Beranda ---- */
.act-feed { margin-top: 24px; }
.act-feed .sec { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.act-feed h3 { margin: 0; }
.act-row { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.act-row:last-child { border-bottom: 0; }
.act-dot { flex: none; width: 8px; height: 8px; margin-top: 8px; border-radius: 50%; background: var(--line); }
.act-row.fresh .act-dot { background: var(--navy); }
.act-body { min-width: 0; word-break: break-word; }
.act-body .badge { margin-left: 6px; }
.act-body a { color: var(--navy2); }

/* ---- halaman cetak (Export PDF) ---- */
#print-root { display: none; }
@media print {
  @page { size: A4; margin: 16mm; }
  body.printing { background: #fff; color: #000; font-size: 11pt; }
  body.printing > *:not(#print-root) { display: none !important; }
  body.printing #print-root { display: block; font-family: var(--sans); }
  #print-root h1, #print-root h2, #print-root h3 { font-family: var(--serif); color: #0f1f3d; break-after: avoid; }
  #print-root h1 { font-size: 30pt; margin: 6px 0; }
  #print-root h2 { font-size: 18pt; border-bottom: 2px solid #0f1f3d; padding-bottom: 4px; margin: 0 0 10px; }
  #print-root h3 { font-size: 13pt; margin: 12px 0 6px; }
  .pr-cover { padding: 20mm 0 10mm; border-bottom: 2px solid #0f1f3d; margin-bottom: 8mm; }
  .pr-brand { font: 600 14pt var(--serif); color: #8c95a3; }
  .pr-sec { margin-bottom: 8mm; }
  .pr-sec + .pr-sec { break-before: auto; }
  .pr-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10mm; }
  .pr-dl { margin: 0; }
  .pr-dl > div { display: flex; gap: 8px; padding: 3px 0; border-bottom: 1px solid #e3e6eb; break-inside: avoid; }
  .pr-dl dt { width: 38%; color: #5b6678; flex: none; }
  .pr-dl dd { margin: 0; white-space: pre-wrap; }
  #print-root table { width: 100%; border-collapse: collapse; font-size: 10pt; margin-bottom: 6px; }
  #print-root th, #print-root td { white-space: normal; padding: 5px 8px; border-bottom: 1px solid #ccd1d9; text-align: left; vertical-align: top; }
  #print-root th { background: #eef0f4; }
  #print-root td.num, #print-root th.num { text-align: right; }
  #print-root tr { break-inside: avoid; }
  #print-root tr.total td { font-weight: 700; border-top: 2px solid #0f1f3d; }
  .pr-chk { width: 28px; font-family: ui-monospace, Menlo, monospace; }
  .pr-text { white-space: pre-wrap; margin: 4px 0 8px; }
  .pr-block { break-inside: avoid-page; margin-bottom: 6px; }
  .pr-imgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; align-items: start; }
  .pr-imgs figure { margin: 0; break-inside: avoid; }
  /* Foto tampil dengan rasio aslinya (tidak dipotong jadi persegi); yang sangat tinggi diperkecil, bukan dipotong */
  .pr-imgs img { display: block; width: 100%; height: auto; max-height: 120mm; object-fit: contain; object-position: left top; border-radius: 4px; }
  .pr-imgs figcaption { font-size: 8.5pt; color: #5b6678; }
  .pr-foot { margin-top: 10mm; font-size: 9pt; color: #8c95a3; text-align: center; }
}
