/* ── REKAP KUNJUNGAN ──────────────────────────────────────────────────────────
   His manager's Word table, in the app's own language. Five columns and nothing
   clever: he saw two redesigns of this screen and threw both out.
   Ladder 33 · 27 · 19 · 15 · 13. Nothing here is red — red is late.
   ─────────────────────────────────────────────────────────────────────────── */

/* ── the path ─────────────────────────────────────────────────────────────────
   The app's own trail, so it needs nothing here but the room around it. No Back
   button on purpose: this app replaced the lone Back with the trail. */
.rk-path { margin-bottom: 14px; }

/* ── picking ── */
.rk-pick { max-width: 620px; }
.rk-empty {
  font-size: 13px; color: var(--ink-faint); line-height: 1.6;
  border: 1px dashed var(--rule); border-radius: var(--r-card); padding: 16px 18px; margin-top: 14px;
}
.rk-clist { margin-top: 14px; border-top: 1px solid var(--rule); }
.rk-crow {
  display: flex; align-items: baseline; gap: 12px; width: 100%;
  background: none; border: 0; border-bottom: 1px solid var(--rule-soft);
  padding: 13px 2px; text-align: left; cursor: pointer; font-family: 'Inter', sans-serif;
}
.rk-crow:hover { background: var(--field); }
.rk-crow .nm { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; }
.rk-crow .go { font-size: 13px; color: var(--ink-faint); }

/* ── one customer ── */
.rk-mast { margin-bottom: 4px; }
.rk-mast h2 { font-size: 27px; font-weight: 600; letter-spacing: -.015em; line-height: 1.15; }
.rk-mast .sub { font-size: 13px; color: var(--ink-faint); margin-top: 4px; }
.rk-mlist { margin-top: 16px; border-top: 1px solid var(--rule); }
.rk-mrow {
  display: flex; align-items: center; gap: 14px; width: 100%;
  background: none; border: 0; border-bottom: 1px solid var(--rule-soft);
  padding: 14px 2px; text-align: left; cursor: pointer; font-family: 'Inter', sans-serif;
}
.rk-mrow:hover { background: var(--field); }
.rk-mrow .mk { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; }
.rk-mrow .msn { font-size: 13px; color: var(--ink-faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rk-mrow .mn { font-size: 13px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rk-mrow .ml { font-size: 13px; color: var(--ink-soft); white-space: nowrap; min-width: 128px; text-align: right; }
.rk-mrow .mgo { color: var(--ink-ghost); font-size: 19px; line-height: 1; }

/* ── one machine: the sheet ── */
.rk-sheet { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-panel); padding: 20px 20px 22px; }
.rk-head { border-bottom: 1.5px solid var(--ink); padding-bottom: 10px; }
.rk-t { font-size: 19px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }
.rk-s { font-size: 13px; color: var(--ink-faint); margin-top: 3px; line-height: 1.45; }
.rk-m { font-size: 15px; font-weight: 600; margin-top: 8px; }

.rk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 13px; font-size: 15px; }
.rk-bar b { font-weight: 600; }
.rk-bar .cnt { font-size: 13px; color: var(--ink-faint); }
.rk-bar .sp { flex: 1; min-width: 8px; }

.rk-scroll { overflow-x: auto; margin-top: 13px; border-top: 1px solid var(--ink); }
table.rkt { width: 100%; border-collapse: collapse; min-width: 880px; }
table.rkt th {
  font-size: 13px; font-weight: 600; color: var(--ink-faint); text-align: left;
  padding: 9px 12px 9px 0; border-bottom: 1px solid var(--rule); vertical-align: bottom; white-space: nowrap;
}
table.rkt td {
  font-size: 15px; line-height: 1.45; padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--rule-soft); vertical-align: top;
}
table.rkt td.n { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink-soft); }
table.rkt td.rk-no { text-align: right; padding-right: 16px; }
table.rkt td.rk-none { color: var(--ink-faint); font-size: 13px; padding: 26px 0; text-align: center; }
/* a cell is text you can type into, not a box */
table.rkt td[contenteditable] { outline: none; border-radius: var(--r-control); }
table.rkt td[contenteditable]:hover { background: var(--field); box-shadow: inset 0 0 0 1px var(--rule-soft); }
table.rkt td[contenteditable]:focus { background: var(--surface); box-shadow: inset 0 0 0 2px var(--ink); }
table.rkt td[contenteditable]:empty::after { content: "—"; color: var(--ink-ghost); }
.rk-x {
  width: 28px; height: 28px; border: 0; background: none; color: var(--ink-ghost);
  font-size: 19px; line-height: 1; border-radius: var(--r-control); cursor: pointer;
}
.rk-x:hover { background: var(--field); color: var(--ink); }

/* the sentences he retypes — a menu, not a new field */
.rk-menus { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 16px; border-top: 1px solid var(--rule-soft); padding-top: 14px; }
.rk-menus > div { flex: 1; min-width: 270px; }
.rk-menus .mlbl { display: block; font-size: 13px; color: var(--ink-faint); margin-bottom: 8px; line-height: 1.45; }
.rk-menus .mbtn {
  font-family: 'Inter', sans-serif; font-size: 13px; min-height: 36px; padding: 7px 12px; margin: 0 6px 6px 0;
  /* a pill: the shape IS the meaning, so 999 rather than a number that happens to
     be half the height today and wrong the moment the padding changes */
  border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); color: var(--ink-soft); cursor: pointer;
}
.rk-menus .mbtn:hover { border-color: var(--ink); color: var(--ink); }

/* ── the three signatures ── */
.rk-sign { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 26px; }
.rk-sign > div { flex: 1; min-width: 160px; padding-bottom: 26px; }
.rk-sign .k { font-size: 13px; color: var(--ink-faint); }
.rk-sign .sline {
  height: 76px; border-bottom: 1px solid var(--ink); margin-top: 8px;
  display: flex; align-items: flex-end; position: relative; padding-bottom: 3px;
}
.rk-sign .sline img { max-height: 68px; max-width: 100%; display: block; margin-right: auto; }
.rk-sign .sline .nm {
  position: absolute; left: 0; bottom: -22px; font-size: 15px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.rk-sign .sline .at { position: absolute; right: 0; bottom: -22px; font-size: 13px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.rk-sign .sline .kosong { font-size: 13px; color: var(--ink-ghost); margin-bottom: 4px; }
.rk-sact { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; border-top: 1px solid var(--rule-soft); padding-top: 13px; }

/* ── drawing one ── */
/* ⚠ THE OVERLAY AND THE CARD ARE THE APP'S — .ov and .modal. Only the width and
   the padding are this dialog's own; everything else (the veil, the blur, the
   stacking order, the shadow, dark mode) comes from them. */
.rk-card { max-width: 460px; padding: 20px; }
.rk-ct { font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.rk-cn { font-size: 13px; color: var(--ink-soft); line-height: 1.55; margin-top: 6px; }
.rk-crow2 { display: flex; gap: 11px; margin-top: 14px; }
.rk-crow2 > div { flex: 1; min-width: 0; }
.rk-pad { position: relative; border: 1px solid var(--rule); border-radius: var(--r-card); overflow: hidden; margin-top: 14px; background: var(--surface); }
.rk-pad canvas { display: block; width: 100%; height: 170px; touch-action: none; cursor: crosshair; }
.rk-padline { position: absolute; left: 18px; right: 18px; bottom: 34px; border-top: 1px solid var(--rule); pointer-events: none; }
.rk-padhint { position: absolute; left: 18px; bottom: 12px; font-size: 13px; color: var(--ink-faint); pointer-events: none; }
.rk-cact { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.rk-cact .sp { flex: 1; }
/* the new pop-up (21 Oct 2026): the buttons sit in the fixed foot, which has its own spacing */
.dlg-ft.rk-cact { margin-top: 0; }

/* ── the page's own top ───────────────────────────────────────────────────────
   It had none: a back link, a black button floating alone, then the paper. The
   page now says what it is, and the one action sits in that line. */
.rk-top {
  display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap;
  padding-bottom: 16px; border-bottom: 1px solid var(--ink); margin-bottom: 20px;
}
.rk-top-l { flex: 1; min-width: 260px; }
.rk-top-l .eyebrow { font-size: 13px; color: var(--ink-faint); font-weight: 500; }
.rk-top-l h2 { font-size: 27px; font-weight: 600; letter-spacing: -.018em; line-height: 1.1; margin-top: 5px; }
.rk-top-l .sub { font-size: 15px; color: var(--ink-soft); margin-top: 5px; }

/* ── the paper ────────────────────────────────────────────────────────────────
   ⚠ ONE ORDER, TOP TO BOTTOM, and nothing shares a size with its neighbour:
        letterhead 13  →  customer 33  →  machine 19  →  how much 13  →  table
   The machine used to be 13px grey in the far corner, which is the one thing a
   rekap is about. Ladder held: 33 · 27 · 19 · 15 · 13. */
.rk-paper { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-card); padding: 30px 30px 32px; max-width: 900px; }
.pp-h {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid var(--rule); padding-bottom: 8px;
}
.pp-w { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.pp-kind { font-size: 13px; color: var(--ink-faint); }
.pp-t { font-size: 33px; font-weight: 600; margin-top: 22px; line-height: 1.05; letter-spacing: -.022em; }
.pp-s { font-size: 13px; color: var(--ink-faint); margin-top: 6px; line-height: 1.45; max-width: 62ch; }
.pp-mach { font-size: 19px; font-weight: 600; margin-top: 18px; line-height: 1.25; letter-spacing: -.01em; }
.pp-mach .sn {
  font-weight: 400; color: var(--ink-soft); font-variant-numeric: tabular-nums;
  letter-spacing: .03em; margin-left: 10px;
}
.pp-p { font-size: 13px; color: var(--ink-faint); margin-top: 6px; }
table.rkt.print { min-width: 0; margin-top: 22px; border-top: 1.5px solid var(--ink); }
table.rkt.print td { font-size: 13px; padding: 8px 10px 8px 0; }

/* ⚠ PRINTING. Only the sheet goes on paper — not the rail, not the top bar, not
   the buttons. body.rk-printing is set while that page is open. */
/* ⚠⚠ THERE ARE NO PRINT RULES HERE, AND THAT IS DELIBERATE.
   Printing in place is impossible in this app: the shell is a fixed-height box
   (body and .app are overflow:hidden at screen height, with an inner scroller), so
   the printable document is one screen tall and a long report loses everything
   below the fold — silently. rkPrint() in rekap.js copies the sheet into a frame of
   its own and prints that, carrying its own page rules with it. */

@media (max-width: 820px) {
  .rk-mrow .ml { display: none; }
  .rk-crow2 { flex-direction: column; gap: 9px; }
  .rk-sheet, .rk-paper { padding: 14px; }
}

/* ⚠ WHICH ONE IS IT. Eight identical cutters in one pabrik, serials never typed in,
   give eight rows reading exactly the same — the machine's own number breaks the tie. */
.rk-mrow .mid {
  display: block; font-size: 13px; font-weight: 400; color: var(--ink-faint);
  font-variant-numeric: tabular-nums; margin-top: 2px;
}

/* ── the period ───────────────────────────────────────────────────────────────
   A rekap is always for a stretch of time — his own file says "(Oktober 2024 –
   Agustus 2026)" across the top. Empty at both ends means everything. */
.rk-period { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 13px; }
.rk-period .lbl { font-size: 13px; color: var(--ink-faint); font-weight: 600; }
.rk-period .to { font-size: 13px; color: var(--ink-faint); }
.rk-period .inp { width: auto; min-width: 150px; }
.rk-fromjob { color: var(--ink-ghost); font-size: 15px; cursor: default; }
