/* Outside Repair / ORSOW: gaya bersama aplikasi utama dan /scm/ (assets/js/orsow.js, orsow-main.js, scm.js).
   Kelas berawalan .orsow- / .ors- agar tidak bentrok dengan modul lain. Warna hanya dari token :root main.css.
   Dimuat sesudah pnr.css karena chip status meminjam .pnr-st. */

/* Status ORSOW: Draft=Diajukan, Submitted=Divalidasi, Acknowledged=Disetujui, Approved=Terpasang, Cancelled */
.orsow-st-draft     { background: var(--bl-diajukan-bg);   color: var(--bl-diajukan); }
.orsow-st-submitted { background: var(--bl-divalidasi-bg); color: var(--bl-divalidasi); }
.orsow-st-known     { background: var(--bl-disetujui-bg);  color: var(--bl-disetujui); }
.orsow-st-approved  { background: var(--bl-terpasang-bg);  color: var(--bl-terpasang); }
.orsow-st-cancelled { background: var(--bl-dibatalkan-bg); color: var(--bl-dibatalkan); }
.pnr-tag.svc { background: var(--bl-line-pr-bg); color: var(--bl-line-pr); }

/* Detail */
.orsow-detail .pnr-kv { margin-bottom: 4px; }
.orsow-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.orsow-photo { position: relative; width: 92px; height: 92px; padding: 0; border: 1px solid var(--border-color); border-radius: 6px; overflow: hidden; background: var(--bg-input); cursor: pointer; }
.orsow-photo:hover, .orsow-photo:focus-visible { border-color: var(--primary); outline: none; }
.orsow-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.orsow-photo span { position: absolute; left: 4px; bottom: 4px; background: var(--L-bg-a-6-13-10-8, rgba(6, 13, 10, .8)); color: var(--text-main); font: 700 10px 'JetBrains Mono', monospace; padding: 1px 6px; border-radius: 8px; }
.orsow-bigphoto { text-align: center; }
.orsow-bigphoto img { max-width: 100%; max-height: 70vh; border-radius: 6px; border: 1px solid var(--border-color); }
.orsow-mini { padding: 5px 10px !important; font-size: 11px !important; }
tr.orsow-chosen td { background: var(--L-bg-a-16-185-129-08, rgba(16, 185, 129, .08)); }
.orsow-lt { display: flex; flex-wrap: wrap; gap: 8px; }
.orsow-lt .s { background: var(--bg-input); border: 1px solid var(--border-color); border-radius: 6px; padding: 6px 10px; min-width: 96px; }
.orsow-lt .s.anomaly { border-color: var(--L-bd-a-245-158-11-6, rgba(245, 158, 11, .6)); }
.orsow-lt .l { font-size: 10px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--text-muted); }
.orsow-lt .d { font: 700 14px 'JetBrains Mono', monospace; }
.orsow-frame { height: 70vh; }

/* Keputusan Plant */
.orsow-opt { display: flex; align-items: flex-start; gap: 10px; background: var(--bg-input); border: 1px solid var(--border-color); border-radius: 6px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; font-size: 13px; }
.orsow-opt.on { border-color: var(--primary); background: var(--L-bg-a-16-185-129-1, rgba(16, 185, 129, .1)); }
.orsow-opt input { margin-top: 3px; }
.orsow-cmp-row { background: var(--bg-input); border: 1px solid var(--border-color); border-radius: 6px; padding: 8px 12px; margin-bottom: 6px; font-size: 13px; }
.pnr-seg button:disabled { opacity: .4; cursor: not-allowed; }

/* Submit Backlog: form Outside Repair (aplikasi utama) */
.ors-box { border: 1px solid var(--border-color); border-left: 3px solid var(--primary); border-radius: 8px; padding: 14px 16px; margin: 12px 0; background: var(--bg-card); }
.ors-box-title { font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--primary); margin-bottom: 6px; }
.ors-auto { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12px; margin: 8px 0 10px; }
.ors-auto i { font-style: normal; color: var(--text-muted); text-transform: uppercase; font-size: 10px; font-weight: 800; letter-spacing: .4px; margin-right: 4px; }
.ors-auto em { color: var(--text-muted); }
.ors-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.ors-thumbs:empty { display: none; }
.ors-thumb { position: relative; width: 84px; height: 84px; border: 1px solid var(--border-color); border-radius: 6px; overflow: hidden; background: var(--bg-input); }
.ors-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ors-thumb.up img { opacity: .4; }
.ors-thumb .st { position: absolute; inset: auto 0 0 0; background: var(--L-bg-a-6-13-10-85, rgba(6, 13, 10, .85)); font-size: 10px; font-weight: 700; text-align: center; padding: 2px 0; }
.ors-thumb button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: none; background: var(--L-bg-a-6-13-10-85, rgba(6, 13, 10, .85)); color: var(--text-main); font-size: 14px; line-height: 1; cursor: pointer; }
.ors-thumb button:hover { background: var(--danger); }
.ors-stock { font-size: 12px; color: var(--L-fg-fcd34d, #fcd34d); margin-top: 3px; }

/* Kartu papan dan tabel */
.bl-card-orsow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0 6px; }
.ors-type { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; padding: 2px 8px; border-radius: 10px; background: var(--bl-line-pr-bg); color: var(--bl-line-pr); }
.ors-chip { font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; border-bottom: 1px dashed var(--L-bd-a-16-185-129-55, rgba(16, 185, 129, .55)); cursor: pointer; }
.ors-chip:hover, .ors-chip:focus-visible { color: var(--success); border-bottom-style: solid; outline: none; }
.ors-stage { font-size: 11px; font-weight: 700; color: var(--text-muted); }
/* Header laci MO Repair: chip ORSOW, tombol salin, status */
.bl-drawer-orsow { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ors-stage.on { color: var(--text-main); }

/* Laci backlog: panel Outside Repair */
.ors-panel { border: 1px solid var(--border-color); border-left: 3px solid var(--primary); border-radius: 8px; padding: 12px 14px; margin: 14px 0; background: var(--bg-card); }
.ors-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 8px; }
.ors-title { font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--primary); }
.ors-kv { display: flex; gap: 10px; font-size: 13px; padding: 2px 0; }
.ors-kv .k { flex: 0 0 104px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); padding-top: 2px; }
.ors-kv .v { min-width: 0; overflow-wrap: anywhere; }
.ors-panel .ors-photos { margin: 8px 0; }
.ors-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ors-sub { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); margin: 10px 0 6px; }
.ors-code-row { display: grid; grid-template-columns: 1fr minmax(120px, 160px) auto; gap: 8px; align-items: center; margin-bottom: 6px; }
@media (max-width: 640px) { .ors-code-row { grid-template-columns: 1fr; } .ors-kv { flex-direction: column; gap: 0; } }

/* /scm/: antrean Repair */
body.scm-app .scm-repair-stage { font-size: 12px; font-weight: 700; }
body.scm-app .scm-repair-age { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-muted); }

/* Filter papan: dua kolom tambahan ikut grid filterbar */
.bl-f-repair { display: contents; }
.bl-f-repair[hidden] { display: none; }
.pnr-field label.orsow-opt { display: flex; text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; color: var(--text-main); margin-bottom: 8px; }
.pnr-field label.orsow-opt b { font-weight: 800; }
.orsow-opt input { flex: none; width: 16px; height: 16px; }
body.scm-app .scm-strip .v b { margin-left: 6px; }
