/* Gaya tambahan untuk demo statis (dari view aplikasi asli) */
.demo-banner { position: sticky; top: 0; z-index: 1060; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; background: #FEF3C7; color: #713F12; padding: .45rem 1rem; font-size: .82rem; border-bottom: 1px solid #FDE68A; }
.demo-banner .btn-xs { min-height: 28px; }
.demo-banner + .app-shell .sidebar { top: 42px; }
.demo-banner + .app-shell .topbar { top: 42px; }
@media (max-width: 575.98px) { .demo-banner + .app-shell .sidebar, .demo-banner + .app-shell .topbar { top: 64px; } }

/* Daftar servis */
.status-tab { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .8rem; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--text); font-weight: 600; font-size: .82rem; white-space: nowrap; min-height: 38px; }
.status-tab .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dot, #94A3B8); }
.status-tab .n { background: #F1F5F9; border-radius: 999px; padding: 0 .45rem; font-size: .75rem; }
.status-tab.active { border-color: var(--dot, var(--accent)); background: var(--dot-bg, var(--accent-soft)); }
tr.late td:first-child { box-shadow: inset 3px 0 0 #DC2626; }

/* Kanban */
.kanban { display: flex; gap: .9rem; overflow-x: auto; padding-bottom: 1rem; align-items: flex-start; }
.k-col { flex: 0 0 272px; background: #F1F5F9; border-radius: 14px; display: flex; flex-direction: column; max-height: calc(100vh - 230px); }
.k-head { padding: .75rem .9rem; font-weight: 700; display: flex; align-items: center; gap: .5rem; border-top: 4px solid var(--c); border-radius: 14px 14px 0 0; }
.k-head .n { margin-left: auto; background: #fff; border-radius: 999px; padding: 0 .5rem; font-size: .78rem; }
.k-body { padding: 0 .6rem .6rem; overflow-y: auto; min-height: 80px; display: flex; flex-direction: column; gap: .5rem; }
.k-body.drop { outline: 2px dashed var(--accent); outline-offset: -4px; border-radius: 10px; }
.k-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: .65rem .75rem; cursor: grab; color: inherit; display: block; }
.k-card.dragging { opacity: .5; }
.k-card.late { border-left: 3px solid #DC2626; }

/* Terima servis */
.type-chip input { position: absolute; opacity: 0; }
.type-chip label { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; min-width: 84px; min-height: 64px; padding: .5rem .75rem; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; font-weight: 600; font-size: .85rem; background: #fff; }
.type-chip label i { font-size: 1.35rem; color: var(--muted); }
.type-chip input:checked + label { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-hover); }
.damage-chip { border: 1px dashed #CBD5E1; background: #fff; border-radius: 999px; padding: .35rem .8rem; font-size: .82rem; font-weight: 600; min-height: 36px; }
.damage-chip.on { border-style: solid; border-color: var(--accent); background: var(--accent-soft); color: var(--accent-hover); }
.damage-chip small { color: var(--muted); font-weight: 500; }
.cust-results, .part-results { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 30px rgba(15,23,42,.12); display: none; overflow: hidden; max-height: 280px; overflow-y: auto; }
.cust-results.show, .part-results.show { display: block; }
.cust-results button { display: block; width: 100%; text-align: left; border: 0; background: #fff; padding: .6rem .9rem; }
.part-results button { display: flex; justify-content: space-between; gap: .5rem; width: 100%; border: 0; background: #fff; padding: .55rem .8rem; text-align: left; }
.cust-results button:hover, .part-results button:hover { background: var(--accent-soft); }
.photo-previews { display: flex; flex-wrap: wrap; gap: .5rem; }
.photo-previews .ph { position: relative; width: 92px; height: 92px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.photo-previews img { width: 100%; height: 100%; object-fit: cover; }
.photo-previews button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(15,23,42,.75); color: #fff; display: grid; place-items: center; padding: 0; }
.save-bar { position: sticky; bottom: 0; z-index: 20; background: rgba(248,250,252,.96); border-top: 1px solid var(--border); padding: .75rem 0; margin-top: 1rem; }
.pattern-wrap { display: flex; gap: 1.25rem; align-items: flex-start; flex-wrap: wrap; }
.pattern-pad { position: relative; width: 210px; height: 210px; border-radius: 14px; background: #0F172A; touch-action: none; user-select: none; flex: none; }
.pattern-pad svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.pattern-dot { position: absolute; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; display: grid; place-items: center; }
.pattern-dot span { width: 16px; height: 16px; border-radius: 50%; background: #475569; }
.pattern-dot.on span { background: #38BDF8; transform: scale(1.35); }
.pattern-dot em { position: absolute; top: -2px; right: -2px; font-style: normal; font-size: .7rem; font-weight: 800; color: #38BDF8; }

/* Detail servis */
.detail-grid dt { font-size: .75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.detail-grid dd { margin-bottom: .8rem; }
.chip { display: inline-flex; align-items: center; gap: .25rem; padding: .2rem .6rem; border-radius: 999px; background: #F1F5F9; font-size: .8rem; font-weight: 600; margin: 0 .25rem .25rem 0; }
.chip.warn { background: #FEF3C7; color: #92400E; }
.chip.miss { background: #FEE2E2; color: #B91C1C; text-decoration: line-through; }
.action-card { border-color: var(--accent); }
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.timeline li { position: relative; padding: 0 0 1rem 2.1rem; }
.timeline .tl-dot { position: absolute; left: 4px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid #CBD5E1; }
.timeline .tl-dot.has-status { border-color: var(--c, var(--accent)); background: var(--c, var(--accent)); }
.timeline .tl-note { font-size: .88rem; }
.timeline .tl-meta { font-size: .75rem; color: var(--muted); }
.timeline li.internal .tl-note { color: #475569; font-style: italic; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .5rem; }
.photo-grid a { display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; }
.sum-row.total { font-size: 1.1rem; font-weight: 800; border-top: 1px solid var(--border); margin-top: .3rem; padding-top: .6rem; }

/* Kasir */
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: .6rem; }
.pos-item { border: 1px solid var(--border); border-radius: 12px; background: #fff; padding: .7rem; text-align: left; min-height: 104px; display: flex; flex-direction: column; justify-content: space-between; }
.pos-item:hover { border-color: var(--accent); }
.pos-item:disabled { opacity: .45; }
.pos-item .nm { font-weight: 600; font-size: .86rem; line-height: 1.25; }
.pos-item .pr { font-weight: 800; color: var(--accent); }
.cart { position: sticky; top: calc(var(--topbar-h) + 3.5rem); }
.cart-line { display: flex; gap: .5rem; align-items: center; padding: .55rem 0; border-bottom: 1px solid var(--border); }
.qty-btn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: #fff; display: grid; place-items: center; padding: 0; }
.grand { font-size: 1.6rem; font-weight: 800; }

/* Cetak */
.print-body { background: #F1F5F9; }
.print-toolbar { position: fixed; top: 8px; right: 8px; display: flex; gap: 6px; z-index: 5; }
.thermal { width: var(--w, 58mm); margin: 50px auto 30px; background: #fff; padding: 4mm; box-shadow: 0 4px 16px rgba(0,0,0,.12); font-family: "Courier New", ui-monospace, monospace; font-size: 11px; line-height: 1.35; color: #000; }
.thermal .c { text-align: center; } .thermal .r { text-align: right; } .thermal .b { font-weight: bold; }
.thermal .big { font-size: 1.45em; font-weight: bold; text-align: center; }
.thermal .sm { font-size: .88em; }
.thermal .hr { border-top: 1px dashed #000; margin: 5px 0; }
.thermal table { width: 100%; border-collapse: collapse; }
.thermal td { padding: 1px 0; vertical-align: top; }
.thermal td.k { width: 36%; }
.thermal .qr { width: 30mm; image-rendering: pixelated; }
.thermal .sign { display: flex; justify-content: space-between; gap: 4mm; margin-top: 4mm; text-align: center; }
.thermal .sign div { flex: 1; }
.thermal .sign .line { margin-top: 12mm; border-top: 1px solid #000; }
.label-sticker { width: 50mm; height: 30mm; margin: 60px auto; background: #fff; padding: 1.5mm 2mm; display: flex; gap: 1.5mm; align-items: center; font-family: Arial, sans-serif; font-size: 7.5pt; line-height: 1.2; box-shadow: 0 2px 10px rgba(0,0,0,.15); overflow: hidden; }
.label-sticker img { width: 17mm; height: 17mm; image-rendering: pixelated; flex: none; }
.label-sticker > div { min-width: 0; }
.label-sticker .code { font-size: 10pt; font-weight: 800; }
@media print {
  @page { margin: 0; }
  .print-body { background: #fff; }
  .thermal { margin: 0 auto; box-shadow: none; }
  .label-sticker { margin: 0; box-shadow: none; }
  .demo-banner { display: none !important; }
}
