/* ekplabz tag page (tag.php) = one drawer of the PARTS BIN. Bed, belt, cards and pager come from ekp-unit.css. */
.stage.tagpage { padding: 26px clamp(16px, 4vw, 48px) 56px; overflow: clip; }

/* a slow gear behind the drawer */
.tg-gears { position: absolute; z-index: 0; right: -140px; top: 30px; width: 460px; height: 460px; pointer-events: none; }
.tg-gears g { fill: none; stroke: rgba(60, 72, 96, .16); stroke-width: 2.5; transform-box: fill-box; transform-origin: center; animation: spin 90s linear infinite; }


.tg-hero { position: relative; margin-top: 6px; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: stretch; }

/* ───────── drawer front ───────── */
.drawer {
  position: relative; padding: 22px 34px 34px;
  clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .35) 0 1px, transparent 1px 4px),
    linear-gradient(180deg, #f4f6f9 0%, #d8dee6 55%, #c3cad5 100%);
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px #8b95a6, inset 0 -4px 0 rgba(0, 0, 0, .12);
}
.drawer::after { /* neon edge in the colour of the unit this drawer holds most of */
  content: ""; position: absolute; left: 18px; right: 0; top: 0; height: 3px; background: var(--acc); box-shadow: 0 0 10px var(--acc);
}
.screw { /* slotted screws in the corners */
  position: absolute; width: 14px; height: 14px; border-radius: 50%;
  background: linear-gradient(45deg, transparent 44%, #4a5263 44% 56%, transparent 56%), radial-gradient(circle at 35% 30%, #fff, #c3cad5 55%, #6b7487);
  box-shadow: 0 0 0 1px #4a5263, 0 1px 0 #fff;
}
.screw.s1 { left: 22px; top: 14px; } .screw.s2 { right: 12px; top: 14px; }
.screw.s3 { left: 12px; bottom: 12px; transform: rotate(70deg); } .screw.s4 { right: 22px; bottom: 12px; transform: rotate(20deg); }
.tg-code { display: flex; align-items: center; gap: 10px; margin: 0 0 12px 22px; font-family: var(--mono); font-size: 11px; letter-spacing: .16em; color: var(--steel-700); }
.tg-code b { color: var(--ink); }
.tg-code span { margin-left: auto; padding: 1px 8px; font-weight: 700; color: #0b1022; background: var(--acc); box-shadow: 0 0 8px var(--acc); }

/* label holder: a pressed metal frame with the paper label slid in */
.holder {
  padding: 8px; border-radius: 4px;
  background: linear-gradient(180deg, #8b95a6, #5b6475 50%, #3a4150);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 2px 0 #fff, 0 3px 6px rgba(0, 0, 0, .25);
}
.label {
  position: relative; padding: 16px 20px 12px 24px;
  background: linear-gradient(rgba(29, 61, 156, .06) 1px, transparent 1px) 0 0 / 100% 22px, linear-gradient(#ffffff, #f2f4f7);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .25);
}
.label::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--acc); box-shadow: 0 0 8px var(--acc); }
.ekp-tagpage .label h1 { margin: 0; padding: 0; font-size: clamp(24px, 3.4vw, 36px); font-weight: 700; line-height: 1.3; color: var(--ink); letter-spacing: .02em; background: none; border: 0; }
.ekp-tagpage .label h1::before, .ekp-tagpage .label h1::after { content: none; }
.label .hash { margin-right: 4px; font-family: var(--tech); color: var(--acc); text-shadow: 0 0 1px #0b1022, 0 0 10px var(--acc); }
.label p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.7; color: var(--ink-soft); }
.barcode { /* decorative part barcode */
  height: 18px; margin-top: 12px; max-width: 220px; opacity: .8;
  background: repeating-linear-gradient(90deg, #141c30 0 2px, transparent 2px 3px, #141c30 3px 4px, transparent 4px 7px, #141c30 7px 10px, transparent 10px 11px, #141c30 11px 12px, transparent 12px 15px);
}

/* engraved plates along the bottom of the drawer front */
.stamps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.stamps span {
  display: inline-flex; align-items: baseline; gap: 8px; padding: 4px 10px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; color: var(--steel-700);
  background: linear-gradient(#d3d9e1, #e6eaef); border-radius: 2px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35), 0 1px 0 #fff;
}
.stamps b { font-size: 12px; letter-spacing: .06em; color: var(--ink); text-shadow: 0 1px 0 rgba(255, 255, 255, .7); }

/* ───────── inventory meter ───────── */
.inventory {
  color: #dfe6f3; padding: 16px 16px 12px;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 3px), linear-gradient(180deg, #474f60, #2a2f3a 40%, #1b1f28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}
.ekp-tagpage .inventory h4 { margin: 0 0 10px; padding: 0; display: flex; align-items: center; gap: 8px; font-family: var(--tech); font-size: 15px; letter-spacing: .16em; color: #fff; background: none; border: 0; }
.inventory h4::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 8px var(--acc); }
.inventory .qty { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; padding: 4px 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: #9aa6bd; background: #0b0e14; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .9); }
.inventory .qty b { font-family: var(--mono); font-size: 30px; line-height: 1.2; color: var(--acc); text-shadow: 0 0 10px var(--acc); }
.inventory ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.inventory li { display: grid; grid-template-columns: 132px 1fr 22px; align-items: center; gap: 8px; font-size: 12px; }
.inventory li.-zero { opacity: .38; }
.inventory .nm { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.inventory .nm b { margin-right: 6px; font-family: var(--mono); font-size: 10.5px; color: var(--c); }
.inventory .bar { height: 8px; background: #0b0e14; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .9); }
.inventory .bar i { /* segmented LED bar */
  display: block; height: 100%; min-width: 0;
  background: repeating-linear-gradient(90deg, var(--c) 0 5px, transparent 5px 7px); filter: drop-shadow(0 0 3px var(--c));
}
.inventory .ct { text-align: right; font-family: var(--mono); font-size: 12px; color: #fff; }

.ekp-tagpage .ekp-gl-card { position: relative; margin-top: 22px; }
.tg-near { position: relative; margin-top: 36px; }
.tg-near .bin {
  padding: 16px; clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 3px), linear-gradient(180deg, #474f60, #2a2f3a 40%, #1b1f28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}
.ekp-tagpage .tagcloud a { text-decoration: none; }
.ekp-tagpage .out, .ekp-tagpage .labnotes { position: relative; }

@media (max-width: 900px) {
  .tg-hero { grid-template-columns: 1fr; }
  .tg-gears { width: 320px; height: 320px; right: -120px; }
}
@media (max-width: 520px) {
  .drawer { padding: 18px 16px 30px; }
  .tg-code { margin-left: 26px; }
  .label { padding: 12px 14px 10px 18px; }
}
