/* T1 Terminal radnog mjesta i T2 Terminal stolarije — ekran na dodir 16:10 (1280×800). Izgled po prototipu terminali.html. */
:root { --t-ink: #1c2230; --t-mute: #5d6778; --t-line: #dfe3e8; --t-card: #fff; --t-acc: #2f6fdb; --t-accbg: #e8f0fd;
        --t-red: #c93a3a; --t-redbg: #fdeaea; --t-grn: #1f8a4c; --t-grnbg: #e6f5ec; --t-amb: #9a6700; --t-ambbg: #fff4d6;
        --t-pur: #6b46c1; --t-purbg: #efe9fb; --t-gold: #c99700; --t-term: #151b26; }
html, body { height: 100%; }
body.term { display: flex; flex-direction: column; background: #eef0f3; color: var(--t-ink); font-size: 17px; overflow: hidden; }
body.term > .p-zag, body.term > .p-demo { flex: none; }
#t-app { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* zaglavlje terminala: radno mjesto i prijavljeni radnici */
.th { background: var(--t-term); color: #fff; display: flex; align-items: center; gap: 14px; padding: 8px 16px; flex: none; min-height: 64px; }
.th .res { min-width: 0; flex: 0 1 auto; }
.th .res b { font-size: 21px; display: block; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 430px; }
.th .res span { font-size: 13px; color: #aab3c2; white-space: nowrap; }
.th .rad { display: flex; gap: 6px; flex: 1; min-width: 0; overflow-x: auto; justify-content: flex-end; }
.th .usr { flex: none; background: #26303f; color: #fff; border: 2px solid #26303f; border-radius: 8px; padding: 6px 12px; min-height: 48px; text-align: left; font-size: 15px; line-height: 1.2; }
.th .usr small { display: block; font-size: 12px; color: #aab3c2; }
.th .usr.on { border-color: #fff; background: #34404f; }
.th .usr .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #8a94a6; margin-right: 6px; vertical-align: 1px; }
.th .usr .dot.r { background: #4cc27a; } .th .usr .dot.p { background: #f2b33d; } .th .usr .dot.z { background: #ff6b6b; }
.th .plus { flex: none; background: #fff; color: var(--t-term); border: none; border-radius: 8px; font-weight: 700; min-height: 48px; padding: 0 16px; }

/* traka ★ prioritet dana */
.pd { background: #fff6d9; color: #5c4600; padding: 7px 16px; font-size: 15px; border-bottom: 1px solid #f0e2b0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: none; }
.pd b { color: var(--t-gold); }
.pd .ok { color: var(--t-grn); font-weight: 700; }
.pd.nema { background: #f4f5f7; color: var(--t-mute); border-bottom-color: var(--t-line); }

/* tijelo: lijevo radnik, desno red čekanja */
.bd { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 12px; padding: 12px 16px; }
.bd.one { grid-template-columns: minmax(0, 1fr); }
.pan { background: var(--t-card); border: 1px solid var(--t-line); border-radius: 10px; padding: 12px 14px; overflow: auto; min-height: 0; display: flex; flex-direction: column; }
.pan > * { flex: none; }
.h1 { font-size: 27px; font-weight: 700; line-height: 1.15; }
.h2 { font-size: 19px; font-weight: 600; line-height: 1.25; }
.mu { color: var(--t-mute); }
.sm { font-size: 14px; }
.xs { font-size: 12px; }
.prompt { border: 3px dashed #b9c3d3; border-radius: 12px; padding: 18px; text-align: center; color: #394355; margin-top: 6px; }
.prompt .h1 { font-size: 28px; }
.btn { display: block; width: 100%; border: none; border-radius: 10px; font: 600 21px/1.1 "Segoe UI", Arial, sans-serif; padding: 16px 14px; min-height: 56px; cursor: pointer;
       margin-top: 10px; color: #fff; background: var(--t-acc); }
.btn.g { background: var(--t-grn); } .btn.r { background: var(--t-red); } .btn.a { background: #d49a00; }
.btn.w { background: #fff; color: var(--t-ink); border: 2px solid var(--t-line); }
.btn.s { font-size: 17px; padding: 11px 12px; min-height: 50px; }
.btn.xl { font-size: 30px; padding: 20px; min-height: 76px; letter-spacing: .5px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row .btn { width: auto; flex: 1; }
.banner { border-radius: 10px; padding: 11px 14px; margin-top: 10px; font-size: 16px; line-height: 1.35; }
.banner.g { background: var(--t-grnbg); color: #145c33; } .banner.r { background: var(--t-redbg); color: #8f1f1f; }
.banner.a { background: var(--t-ambbg); color: #6b4b00; } .banner.b { background: var(--t-accbg); color: #1f3d6d; }
.note { font-size: 12.5px; color: var(--t-mute); margin-top: 8px; line-height: 1.35; }
.st { color: var(--t-gold); font-weight: 700; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 5px; vertical-align: 2px; }
.pill.h { background: var(--t-redbg); color: var(--t-red); } .pill.iz { background: var(--t-purbg); color: var(--t-pur); }
.pill.ok { background: var(--t-grnbg); color: var(--t-grn); } .pill.wt { background: var(--t-ambbg); color: var(--t-amb); }
.pill.b { background: var(--t-accbg); color: var(--t-acc); } .pill.z { background: var(--t-redbg); color: var(--t-red); }
.ok { color: var(--t-grn); font-weight: 700; } .no { color: var(--t-red); font-weight: 700; }

/* kartica posla */
.el { border: 2px solid var(--t-line); border-radius: 10px; padding: 10px 14px; margin-top: 8px; }
.el.on { border-color: var(--t-acc); }
.el .top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.el .top > div:first-child { min-width: 0; }
.big { font-size: 54px; font-weight: 800; letter-spacing: 1px; line-height: 1; white-space: nowrap; }
.el .h1 { font-size: 24px; overflow-wrap: anywhere; }
.el .op { margin-top: 6px; font-size: 16px; }
.el .dl { margin-top: 4px; font-size: 14px; color: var(--t-mute); }
.timer { font-size: 54px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.bar { height: 8px; background: #e7eaef; border-radius: 4px; overflow: hidden; margin-top: 6px; }
.bar div { height: 8px; background: var(--t-grn); }
.bar div.preko { background: #d49a00; }
.rz { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.rz .btn { margin-top: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { border: 2px solid var(--t-line); background: #fff; border-radius: 22px; padding: 8px 14px; min-height: 48px; font-size: 15px; color: var(--t-ink); }
.chip.on { border-color: var(--t-amb); background: var(--t-ambbg); font-weight: 600; }
.chk { list-style: none; margin: 6px 0 0; padding: 0; }
.chk li { padding: 7px 2px; border-bottom: 1px solid var(--t-line); font-size: 15px; }

/* red čekanja */
.tabs { display: flex; gap: 4px; margin-bottom: 6px; }
.tabs button { flex: 1; border: 2px solid var(--t-line); background: #f7f8fa; border-radius: 8px; min-height: 48px; font-size: 15px; color: var(--t-mute); padding: 6px 8px; }
.tabs button.on { background: var(--t-accbg); border-color: var(--t-acc); color: var(--t-acc); font-weight: 700; }
.q { list-style: none; margin: 4px 0 0; padding: 0; }
.q li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 4px; border-bottom: 1px solid var(--t-line); font-size: 15px; cursor: pointer; min-height: 52px; }
.q li.g { box-shadow: inset 4px 0 0 var(--t-acc); padding-left: 10px; }
.q li.sel { background: var(--t-accbg); }
.q li.run { background: #f2fbf5; }
.q li.dis { cursor: default; }
.q .n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: #e9edf2; color: var(--t-mute); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.q .t { flex: 1; min-width: 0; }
.q .t > div:first-child { overflow-wrap: anywhere; }
.q .s { font-size: 13px; color: var(--t-mute); }
.q .x { margin-left: auto; text-align: right; font-size: 13px; color: var(--t-mute); white-space: nowrap; flex: none; }
.rok { font-weight: 700; color: var(--t-ink); white-space: nowrap; }
.rok.prosao { background: var(--t-ambbg); color: var(--t-amb); border-radius: 5px; padding: 0 5px; }
.u { color: var(--t-grn); font-weight: 600; }
.rmlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin-top: 8px; }
.rmlist a { display: block; border: 2px solid var(--t-line); border-radius: 10px; padding: 10px 12px; text-decoration: none; color: var(--t-ink); min-height: 56px; background: #fbfcfd; }
.rmlist a:hover { border-color: var(--t-acc); }
.rmlist a b { display: block; }
.rmlist a span { font-size: 13px; color: var(--t-mute); }
.rmlist h4 { grid-column: 1 / -1; margin: 6px 0 0; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--t-mute); }

/* T2 */
.pcs { border-collapse: collapse; width: 100%; margin-top: 8px; }
.pcs td { padding: 8px 6px; border-bottom: 1px solid var(--t-line); font-size: 15px; vertical-align: middle; }
.pcs tr { cursor: pointer; }
.pcs tr.cur { background: var(--t-ambbg); }
.pcs tr.got td { color: var(--t-mute); }
.n1box { margin-top: 8px; display: flex; justify-content: center; background: #f4f5f7; border-radius: 10px; padding: 10px; overflow: hidden; }
.ser { list-style: none; margin: 4px 0 0; padding: 0; }
.ser li { display: flex; gap: 10px; align-items: center; border: 2px solid var(--t-line); border-radius: 10px; padding: 9px 12px; margin-top: 7px; cursor: pointer; min-height: 56px; }
.ser li.on { border-color: var(--t-acc); background: var(--t-accbg); }
.ser li.nel { background: #f4f5f7; color: var(--t-mute); }
.ser li .t { flex: 1; min-width: 0; }
.ser li .x { text-align: right; font-size: 13px; color: var(--t-mute); white-space: nowrap; }
.ser li .s { font-size: 13px; color: var(--t-mute); margin-top: 2px; }
.gp { font-size: 12px; font-weight: 700; color: var(--t-mute); text-transform: uppercase; letter-spacing: .5px; margin-top: 12px; }

/* T1: polje skeniranja (čitač kao tastatura) i znak upisa u Pantheon (korak 2) */
.sken { margin-top: 10px; }
.sken input { width: 100%; box-sizing: border-box; font-size: 18px; padding: 12px 14px; min-height: 52px; border: 2px dashed #b9c3d3; border-radius: 10px; background: #fbfcfd; color: var(--t-ink); }
.sken input:focus { outline: none; border-style: solid; border-color: var(--t-acc); background: #fff; }
.pnt { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 5px; vertical-align: 1px; white-space: nowrap; }
.pnt.u { background: var(--t-grnbg); color: var(--t-grn); } .pnt.g { background: var(--t-redbg); color: var(--t-red); } .pnt.s { background: #eef0f3; color: var(--t-mute); }
