/* T4 Linija pakovanja — kontrola prije linije i kraj linije (terminal 1280×800, ekran na dodir). Prati prototip terminali.html (tab T4). */
:root { --t4-pur: #6b46c1; --t4-purbg: #efe9fb; --t4-okbg: #e6f5ec; --t4-errbg: #fdeaea; --t4-ambbg: #fff4d6; --t4-amb: #8a5d00;
        --t4-info: #1f5fbf; --t4-infobg: #e8f0fd; --t4-term: #1d1b18; --t4-soft: #f6f4f0; }
body.t4 { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
body.t4 .p-zag { padding: 6px 14px; gap: 10px; }
body.t4 .p-pod { font-size: .85em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
body.t4 .p-demo { padding: 3px 14px; }

/* zaglavlje: prekidač ekrana i prijavljeni radnik */
.t4-sw { display: inline-flex; background: #3a3631; border-radius: 8px; padding: 3px; gap: 2px; flex: none; }
.t4-sw a { padding: 6px 12px; font-size: 14px; color: #cfc8bc; border-radius: 6px; cursor: pointer; white-space: nowrap; text-decoration: none; user-select: none; }
.t4-sw a.on { background: #fff; color: #1d1b18; font-weight: 700; }
.t4-usr { background: #3a3631; color: #fff; border: 0; border-radius: 6px; padding: 5px 10px; font-size: 14px; white-space: nowrap; max-width: 230px; overflow: hidden; text-overflow: ellipsis; }
.t4-usr.nije { color: #ffcc80; }

/* traka prioriteta dana */
.t4-pd { background: #fff6d9; color: #5c4600; padding: 5px 16px; font-size: 14px; border-bottom: 1px solid #f0e2b0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: none; }
.t4-pd b { color: #b07d00; }

/* tijelo: dva panela */
.t4-bd { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.48fr) minmax(0, 1fr); gap: 12px; padding: 10px 14px 12px; }
.t4-bd.k { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.t4-pan { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; overflow: auto; min-height: 0; }
.t4-h1 { font-size: 26px; font-weight: 700; line-height: 1.15; }
.t4-h2 { font-size: 19px; font-weight: 650; line-height: 1.25; }
.t4-sm { font-size: 14px; }
.t4-xs { font-size: 12px; color: var(--muted); }
.t4-mu { color: var(--muted); }
.t4-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.t4-row > .t4-btn { flex: 1; width: auto; }
.t4-sp { justify-content: space-between; flex-wrap: nowrap; }
.t4-note { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.35; }
.t4-ok { color: var(--ok); font-weight: 700; }
.t4-no { color: var(--err); font-weight: 700; }
.t4-wa { color: var(--t4-amb); font-weight: 700; }

/* dugmad za dodir */
.t4-btn { display: block; width: 100%; border: 0; border-radius: 10px; font: 600 19px/1.1 "Segoe UI", system-ui, sans-serif; padding: 15px 12px; margin-top: 8px;
          cursor: pointer; color: #fff; background: var(--t4-info); text-align: center; }
.t4-btn.g { background: var(--ok); }
.t4-btn.r { background: var(--err); }
.t4-btn.a { background: #c98a00; }
.t4-btn.w { background: #fff; color: var(--fg); border: 2px solid var(--line); }
.t4-btn.s { font-size: 16px; padding: 12px 10px; }
.t4-btn.xl { font-size: 23px; padding: 18px 12px; }
.t4-btn small { display: block; font-size: 12px; font-weight: 400; opacity: .85; margin-top: 3px; }
.t4-btn:disabled { opacity: .4; cursor: default; }
.t4-lnk { white-space: nowrap; flex: none; background: none; border: 0; padding: 0; color: var(--t4-info); text-decoration: underline; cursor: pointer; font-size: 13px; }

.t4-pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 5px; white-space: nowrap; vertical-align: middle; }
.t4-pill.iz { background: var(--t4-purbg); color: var(--t4-pur); }
.t4-pill.ok { background: var(--t4-okbg); color: var(--ok); }
.t4-pill.wt { background: var(--t4-ambbg); color: var(--t4-amb); }
.t4-pill.no { background: var(--t4-errbg); color: var(--err); }
.t4-pill.mu { background: #eeebe5; color: var(--muted); }
.t4-pill.in { background: var(--t4-infobg); color: var(--t4-info); }
.t4-rp { display: inline-block; background: var(--t4-term); color: #fff; font-size: 13px; font-weight: 800; border-radius: 5px; padding: 2px 7px; white-space: nowrap; }
.t4-st { color: #c99700; font-weight: 700; }

.t4-ban { border-radius: 10px; padding: 9px 12px; margin-top: 8px; font-size: 15px; line-height: 1.35; }
.t4-ban.g { background: var(--t4-okbg); color: #145c33; }
.t4-ban.r { background: var(--t4-errbg); color: #8f1f1f; }
.t4-ban.a { background: var(--t4-ambbg); color: #6b4b00; }
.t4-ban.b { background: var(--t4-infobg); color: #1f3d6d; }

/* kontrola prije linije */
.t4-prompt { border: 3px dashed #c9c1b3; border-radius: 12px; padding: 14px; text-align: center; color: #3d3830; margin-top: 8px; }
.t4-prompt .t4-h1 { font-size: 27px; }
.t4-sken { display: flex; gap: 8px; margin-top: 10px; }
.t4-sken input { flex: 1; font-size: 20px; padding: 10px 12px; min-width: 0; }
.t4-sken button { font-size: 17px; padding: 10px 16px; }
.t4-el { border: 2px solid var(--line); border-radius: 10px; padding: 9px 12px; margin-top: 8px; }
.t4-el.on { border-color: var(--acc); }
.t4-big { font-size: 46px; font-weight: 800; line-height: 1; letter-spacing: .5px; white-space: nowrap; }
.t4-chk { list-style: none; margin: 6px 0 0; padding: 0; }
.t4-chk li { padding: 5px 2px; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.3; }
.t4-chk li:last-child { border-bottom: 0; }
.t4-kol { border: 1px solid var(--line); border-radius: 10px; padding: 7px 11px; margin-top: 7px; background: #fff; }
.t4-kol.cur { border-color: var(--acc); box-shadow: inset 4px 0 0 var(--acc); }
.t4-kol.done { background: var(--t4-soft); }
.t4-kol .t4-chk li { padding: 3px 2px; font-size: 14.5px; border: 0; }
.t4-it { cursor: pointer; border-radius: 6px; }
.t4-it:hover { background: var(--t4-infobg); }
.t4-it .t4-tap { float: right; font-size: 12px; color: var(--t4-info); font-weight: 600; }
.t4-q { list-style: none; margin: 6px 0 0; padding: 0; }
.t4-q li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 4px; border-bottom: 1px solid var(--line); font-size: 14.5px; line-height: 1.3; }
.t4-q li.klik { cursor: pointer; }
.t4-q li.klik:hover { background: var(--t4-soft); }
.t4-q li.hl { background: var(--t4-okbg); box-shadow: inset 4px 0 0 var(--ok); padding-left: 8px; }
.t4-q li.mut { color: var(--muted); }
.t4-q .t4-qt { flex: 1; min-width: 0; }
.t4-q .t4-qs { font-size: 12.5px; color: var(--muted); }
.t4-q .t4-qx { margin-left: auto; text-align: right; font-size: 12.5px; color: var(--muted); white-space: nowrap; align-self: center; }
.t4-n { flex: none; min-width: 24px; height: 24px; border-radius: 12px; background: #ece8e1; color: var(--muted); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 6px; }
.t4-tg { font-size: 12px; font-weight: 700; color: var(--t4-pur); margin-top: 1px; }
.t4-kam { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.t4-kam button { padding: 6px 10px; font-size: 13.5px; border-radius: 8px; line-height: 1.2; text-align: left; }
.t4-kam button small { display: block; font-size: 11px; color: var(--muted); }
.t4-kam button.on { border-color: var(--acc); background: #fff3e0; font-weight: 700; }
.t4-gh { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-top: 10px; }
.t4-kh { font-size: 13.5px; font-weight: 700; margin-top: 10px; }
.t4-tgl { display: flex; gap: 12px; align-items: center; padding: 10px; border: 2px solid var(--line); border-radius: 10px; margin-top: 7px; cursor: pointer; font-size: 17px; user-select: none; }
.t4-tgl.on { border-color: var(--ok); background: var(--t4-okbg); }
.t4-tgl .bx { width: 30px; height: 30px; border-radius: 6px; border: 2px solid #aab2bf; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; flex: none; }
.t4-tgl.on .bx { background: var(--ok); border-color: var(--ok); }

/* kraj linije */
.t4-ps { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 14px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--t4-soft); }
.t4-ps b { font-size: 15px; }
.t4-ps.man { background: var(--t4-ambbg); border-color: #ecd28b; }
.t4-cur { display: flex; gap: 14px; border: 2px solid var(--acc); border-radius: 12px; padding: 10px 12px; margin-top: 8px; background: #fff; }
.t4-cur.dk { border-color: var(--t4-pur); }
.t4-ci { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.t4-cap { font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--acc-d); }
.t4-cur.dk .t4-cap { color: var(--t4-pur); }
.t4-kl { font-size: 34px; font-weight: 800; line-height: 1.05; margin-top: 2px; }
.t4-cur.dk .t4-kl { font-size: 25px; color: var(--t4-pur); }
.t4-ramp { margin-top: auto; background: var(--t4-term); color: #fff; border-radius: 10px; padding: 6px 14px 8px; font-size: 50px; font-weight: 800; line-height: 1.05; letter-spacing: .5px; white-space: nowrap; }
.t4-ramp small { display: block; font-size: 13px; font-weight: 600; letter-spacing: 0; color: #cfc8bc; white-space: normal; }
.t4-lw { position: relative; flex: none; width: 204px; height: 306px; overflow: hidden; border-radius: 4px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.t4-lw .t4-lin { transform-origin: 0 0; }
.t4-lw.busy .t4-lin { opacity: .3; }
.t4-lw.busy:after { content: "štampa se…"; position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); background: var(--t4-term); color: #fff; font: 700 15px "Segoe UI", Arial;
                    padding: 7px 12px; border-radius: 8px; white-space: nowrap; }
.t4-seq { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-top: 8px; }
.t4-seq div { border: 1px solid var(--line); border-radius: 8px; padding: 5px 9px; font-size: 13.5px; line-height: 1.3; background: #fff; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.t4-seq small { display: block; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 700; }
.t4-seq .now { border-color: var(--acc); background: #fff3e0; }
.t4-seq .stop { border-color: #e0b84a; background: var(--t4-ambbg); }
.t4-stop { background: var(--t4-ambbg); border: 2px solid #e0b84a; color: #5c4100; border-radius: 10px; padding: 7px 12px; margin-top: 8px; font-size: 15.5px; }
.t4-stop b.s1 { font-size: 19px; }
.t4-rg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; }
.t4-rt { border: 2px solid var(--line); border-radius: 10px; padding: 6px 10px; min-height: 92px; display: flex; flex-direction: column; background: #f1efeb; color: var(--muted); }
.t4-rt .rn { display: flex; justify-content: space-between; align-items: center; gap: 4px; }
.t4-rt .rn b { font-size: 28px; line-height: 1; color: #8a847a; }
.t4-rt .rd { font-size: 12.5px; line-height: 1.3; margin-top: 3px; }
.t4-rt.free { border-color: var(--ok); background: var(--t4-okbg); color: #145c33; cursor: pointer; }
.t4-rt.free .rn b { color: #145c33; }
.t4-rt .go { margin-top: auto; align-self: flex-end; background: var(--ok); color: #fff; font-weight: 800; font-size: 13px; border-radius: 6px; padding: 3px 10px; }
.t4-rs { font-size: 11.5px; font-weight: 700; padding: 1px 6px; border-radius: 5px; white-space: nowrap; }
.t4-rs.free { background: #fff; color: var(--ok); }
.t4-rs.load { background: var(--t4-infobg); color: var(--t4-info); }
.t4-rs.ready { background: var(--t4-purbg); color: var(--t4-pur); }
.t4-rs.pack { background: var(--t4-ambbg); color: var(--t4-amb); }
.t4-pk .t4-btn { text-align: left; font-size: 16px; padding: 10px 14px; margin-top: 6px; }
.t4-pk .t4-btn span { display: block; font-size: 13px; font-weight: 400; color: var(--muted); margin-top: 3px; }
.t4-cn { display: flex; gap: 14px; align-items: flex-start; border-top: 2px solid var(--line); margin-top: 8px; padding-top: 8px; }
.t4-cnt { font-size: 46px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.t4-tr { margin-bottom: 7px; }
.t4-bar { height: 7px; background: #e7e3dc; border-radius: 4px; overflow: hidden; margin-top: 3px; }
.t4-bar div { height: 7px; background: var(--ok); }
.t4-prazno { border: 3px dashed #c9c1b3; border-radius: 12px; padding: 26px 16px; text-align: center; margin-top: 10px; color: #3d3830; }
