/* ──────────────────────────────────────────────────────────────────────────
   EQP — warehouse receiving stations. Touch-first, big targets, high contrast.
   Fortune-500 dimensional palette (navy #071426 · blue #1565BE · ground #EEF3F8),
   sized for a glove-and-tablet operator standing at a dock. One stylesheet for
   the ScanField component (.eqp-scan*) + the station shell (.eqp-station*).
   ────────────────────────────────────────────────────────────────────────── */

.eqp-station {
    --eqp-navy: #071426;
    --eqp-blue: #1565BE;
    --eqp-ground: #EEF3F8;
    --eqp-ok: #1B7F3B;
    --eqp-stop: #C0392B;
    --eqp-warn: #B9770A;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 64px);
    background: var(--eqp-ground);
    font-family: 'DM Sans', system-ui, sans-serif;
}

/* ── header band ── */
.eqp-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 28px;
    background: linear-gradient(180deg, #0a1c33 0%, var(--eqp-navy) 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(7, 20, 38, .25);
}
.eqp-head__title { display: flex; align-items: baseline; gap: 14px; font-size: 26px; font-weight: 700; }
.eqp-head__step {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--eqp-blue); font-size: 24px; align-self: center;
}
.eqp-head__sub { font-size: 15px; font-weight: 400; color: #9db8d6; }
.eqp-head__op { text-align: right; line-height: 1.25; }
.eqp-head__oplabel { display: block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #7f9bbd; }
.eqp-head__opname { font-size: 18px; font-weight: 600; }

/* ── body / card ── */
.eqp-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 40px 24px 64px;
}
.eqp-card {
    width: 100%;
    max-width: 640px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #d7e2ef;
    border-top: 6px solid var(--eqp-blue);
    box-shadow: 0 12px 36px rgba(7, 20, 38, .12);
    padding: 36px 36px 40px;
    text-align: center;
}
.eqp-card--warn   { border-top-color: var(--eqp-warn); }
.eqp-card--confirm { border-top-color: var(--eqp-blue); }
.eqp-card--ok     { border-top-color: var(--eqp-ok); }
.eqp-card--stop   { border-top-color: var(--eqp-stop); }

.eqp-prompt { font-size: 28px; font-weight: 700; color: var(--eqp-navy); margin: 0 0 8px; line-height: 1.25; }
.eqp-prompt strong { color: var(--eqp-blue); }
.eqp-hint { font-size: 16px; color: #5d7088; margin: 0 0 22px; }

.eqp-banner { border-radius: 10px; padding: 14px 16px; font-size: 17px; font-weight: 600; margin-bottom: 22px; }
.eqp-banner--warn { background: #fdf3e2; color: var(--eqp-warn); border: 1px solid #f1d8a8; }

/* ── ScanField ── */
.eqp-scan { text-align: left; margin-top: 6px; }
.eqp-scan__label { display: block; font-size: 14px; font-weight: 600; color: var(--eqp-navy); margin-bottom: 8px; letter-spacing: .02em; }
.eqp-scan__row { display: flex; gap: 10px; align-items: stretch; }
.eqp-scan__input {
    flex: 1; min-width: 0;
    font-size: 24px; font-weight: 600; letter-spacing: .04em;
    padding: 16px 18px; border: 2px solid #c4d2e4; border-radius: 12px;
    color: var(--eqp-navy); background: #fbfdff; outline: none;
    transition: border-color .12s, box-shadow .12s;
}
.eqp-scan__input:focus { border-color: var(--eqp-blue); box-shadow: 0 0 0 4px rgba(21, 101, 190, .15); }
.eqp-scan__input:disabled { background: #eef1f5; color: #9aa7b6; }
.eqp-scan__go {
    flex: 0 0 auto; padding: 0 24px; min-width: 120px;
    font-size: 18px; font-weight: 700; color: #fff; background: var(--eqp-blue);
    border: none; border-radius: 12px; cursor: pointer; transition: background .12s, transform .05s;
}
.eqp-scan__go:hover:not(:disabled) { background: #0f4f99; }
.eqp-scan__go:active:not(:disabled) { transform: translateY(1px); }
.eqp-scan__go:disabled { background: #aebfd4; cursor: default; }
.eqp-scan__cam {
    flex: 0 0 auto; width: 60px; font-size: 26px; background: #fff;
    border: 2px solid #c4d2e4; border-radius: 12px; cursor: pointer; transition: border-color .12s, background .12s;
}
.eqp-scan__cam:hover:not(:disabled) { border-color: var(--eqp-blue); }
.eqp-scan__cam.is-on { background: var(--eqp-blue); border-color: var(--eqp-blue); }
.eqp-scan__camwrap { position: relative; margin-top: 14px; border-radius: 12px; overflow: hidden; background: #000; }
.eqp-scan__video { width: 100%; max-height: 320px; display: block; object-fit: cover; }
.eqp-scan__camclose {
    position: absolute; top: 8px; right: 8px; width: 40px; height: 40px;
    border: none; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; font-size: 20px; cursor: pointer;
}
.eqp-scan__camerr { margin-top: 12px; font-size: 15px; color: var(--eqp-stop); font-weight: 600; }

/* ── confirm phase ── */
.eqp-confirm__po { font-size: 15px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #5d7088; margin-bottom: 10px; }
.eqp-cod { margin: 22px auto 4px; max-width: 320px; text-align: left; }
.eqp-cod__label { display: block; font-size: 15px; font-weight: 700; color: var(--eqp-warn); margin-bottom: 8px; }
.eqp-cod__row { display: flex; align-items: stretch; border: 2px solid #f1d8a8; border-radius: 10px; overflow: hidden; }
.eqp-cod__cur { display: flex; align-items: center; padding: 0 14px; background: #fdf3e2; font-size: 22px; font-weight: 700; color: var(--eqp-warn); }
.eqp-cod__input { flex: 1; min-width: 0; border: none; outline: none; font-size: 22px; font-weight: 600; padding: 14px; color: var(--eqp-navy); }

/* ── action buttons ── */
.eqp-actions { display: flex; flex-direction: column; gap: 14px; margin-top: 28px; }
.eqp-btn {
    font-size: 22px; font-weight: 700; padding: 20px 24px; border: none; border-radius: 14px;
    cursor: pointer; transition: background .12s, transform .05s, box-shadow .12s; color: #fff;
}
.eqp-btn:active:not(:disabled) { transform: translateY(1px); }
.eqp-btn:disabled { opacity: .55; cursor: default; }
.eqp-btn--ok   { background: var(--eqp-ok); box-shadow: 0 6px 16px rgba(27, 127, 59, .28); }
.eqp-btn--ok:hover:not(:disabled) { background: #166b32; }
.eqp-btn--stop { background: var(--eqp-stop); box-shadow: 0 6px 16px rgba(192, 57, 43, .26); }
.eqp-btn--stop:hover:not(:disabled) { background: #a5301f; }
.eqp-btn--next { background: var(--eqp-navy); margin-top: 28px; width: 100%; }
.eqp-btn--next:hover:not(:disabled) { background: #0d2542; }
.eqp-btn--ghost { background: transparent; color: #5d7088; font-size: 16px; padding: 12px; margin-top: 18px; }
.eqp-btn--ghost:hover:not(:disabled) { color: var(--eqp-navy); }

/* ── result phase ── */
.eqp-result__icon { font-size: 64px; line-height: 1; margin-bottom: 10px; }
.eqp-result__verb { font-size: 30px; font-weight: 800; letter-spacing: .02em; margin-bottom: 12px; }
.eqp-card--ok .eqp-result__verb { color: var(--eqp-ok); }
.eqp-card--stop .eqp-result__verb { color: var(--eqp-stop); }
.eqp-result__msg { font-size: 19px; color: var(--eqp-navy); line-height: 1.4; margin: 0 0 8px; }

/* ── dock photo ── */
.eqp-photo { margin-top: 24px; padding-top: 22px; border-top: 1px dashed #d7e2ef; }
.eqp-photo__cta {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
    font-size: 17px; font-weight: 600; color: var(--eqp-blue);
    padding: 12px 20px; border: 2px dashed #b6cae3; border-radius: 12px; background: #f6f9fd;
}
.eqp-photo__cta:hover { border-color: var(--eqp-blue); }
.eqp-photo__input { display: none; }
.eqp-photo__count { display: block; margin-top: 10px; font-size: 15px; color: var(--eqp-ok); font-weight: 600; }
.eqp-photo__err { display: block; margin-top: 10px; font-size: 15px; color: var(--eqp-stop); font-weight: 600; }

/* ── busy ── */
.eqp-busy { display: flex; align-items: center; gap: 10px; margin-top: 26px; font-size: 16px; font-weight: 600; color: #5d7088; }
.eqp-busy__spin {
    width: 20px; height: 20px; border-radius: 50%;
    border: 3px solid #c4d2e4; border-top-color: var(--eqp-blue); animation: eqp-spin .7s linear infinite;
}
@keyframes eqp-spin { to { transform: rotate(360deg); } }

/* ── access denied ── */
.eqp-deny { align-items: center; justify-content: center; }
.eqp-deny__card { background: #fff; border-radius: 16px; padding: 48px; text-align: center; box-shadow: 0 12px 36px rgba(7, 20, 38, .12); max-width: 480px; }
.eqp-deny__icon { font-size: 56px; margin-bottom: 12px; }
.eqp-deny__card h2 { font-size: 24px; color: var(--eqp-navy); margin: 0 0 10px; }
.eqp-deny__card p { font-size: 16px; color: #5d7088; margin: 0; }

/* ── Box to Bin: line grid + bin scan + not-empty overlay ── */
.eqp-card--bin { text-align: left; max-width: 760px; }
.eqp-binline__instr { font-size: 14px; color: #5d7088; margin: 4px 0 14px; }

.eqp-linegrid { border: 1px solid #d7e2ef; border-radius: 10px; overflow: hidden; margin-bottom: 18px; }
.eqp-linegrid__head, .eqp-linegrid__row {
    display: grid; grid-template-columns: 60px 1fr 64px 80px 96px 60px; gap: 8px; align-items: center;
    padding: 10px 14px;
}
.eqp-linegrid__head {
    background: #f1f6fc; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    color: #5d7088; border-bottom: 1px solid #d7e2ef;
}
.eqp-linegrid__row {
    width: 100%; border: 0; border-bottom: 1px solid #eef3f8; background: #fff; cursor: pointer;
    font-size: 15px; color: var(--eqp-navy); text-align: left; font-family: inherit;
    transition: background .1s;
}
.eqp-linegrid__row:last-child { border-bottom: 0; }
.eqp-linegrid__row:hover { background: #f6f9fd; }
.eqp-linegrid__row.is-sel { background: #e3effb; box-shadow: inset 4px 0 0 var(--eqp-blue); }
.eqp-linegrid__part { font-weight: 700; }
.eqp-rohs {
    justify-self: start; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px;
    background: #e7ecf2; color: #5d7088;
}
.eqp-rohs.is-rohs { background: #1B7F3B; color: #fff; }

.eqp-binline__scan { background: #f6f9fd; border: 1px solid #d7e2ef; border-radius: 12px; padding: 16px 18px; }
.eqp-binline__need { font-size: 18px; font-weight: 600; color: var(--eqp-navy); margin-bottom: 10px; }
.eqp-binline__need strong { color: var(--eqp-blue); }
.eqp-binline__need strong.is-rohs { color: var(--eqp-ok); }
.eqp-binline__status { margin-top: 14px; padding: 12px 14px; border-radius: 10px; font-size: 16px; font-weight: 600; white-space: pre-line; }
.eqp-binline__status.is-ok  { background: #eaf6ee; color: var(--eqp-ok); border: 1px solid #b9e0c5; }
.eqp-binline__status.is-bad { background: #fdecea; color: var(--eqp-stop); border: 1px solid #f3c4bd; }

.eqp-overlay {
    position: fixed; inset: 0; background: rgba(7,20,38,.55); z-index: 5000;
    display: flex; align-items: center; justify-content: center; padding: 24px;
}
.eqp-overlay__card {
    background: #fff; border-radius: 16px; border-top: 6px solid var(--eqp-warn);
    padding: 32px 36px 36px; max-width: 480px; width: 100%; text-align: center;
    box-shadow: 0 20px 50px rgba(7,20,38,.35);
}

/* ── QI1: part-detail confirm form + quality questions ── */
.eqp-card--detail { text-align: left; max-width: 720px; }
.eqp-card--q { text-align: left; max-width: 640px; }

.eqp-form__grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin: 18px 0 24px;
}
.eqp-field { display: flex; flex-direction: column; gap: 5px; }
.eqp-field--wide { grid-column: 1 / -1; }
.eqp-field label { font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #5d7088; }
.eqp-field input, .eqp-field select {
    font-size: 17px; padding: 11px 12px; border: 2px solid #c4d2e4; border-radius: 9px;
    color: var(--eqp-navy); background: #fbfdff; outline: none; width: 100%;
    font-family: inherit; transition: border-color .12s, box-shadow .12s;
}
.eqp-field input:focus, .eqp-field select:focus { border-color: var(--eqp-blue); box-shadow: 0 0 0 4px rgba(21,101,190,.15); }
.eqp-field--ro { background: #eef3f8 !important; color: #5d7088 !important; }

.eqp-q__count { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #5d7088; margin-bottom: 8px; }
.eqp-q__text { font-size: 24px; font-weight: 700; color: var(--eqp-navy); margin: 0 0 18px; line-height: 1.3; }
.eqp-q__btns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-top: 6px; }
.eqp-btn--obs { background: var(--eqp-warn); }
.eqp-btn--obs:hover:not(:disabled) { background: #9c6408; }

/* ── QI2 camera-gallery shot-list ── */
.eqp-shotlist {
    margin: 4px 0 18px; padding: 14px 18px 14px 34px; list-style: none;
    background: #f6f9fd; border: 1px solid #d7e2ef; border-radius: 12px;
}
.eqp-shotlist li {
    position: relative; font-size: 15px; color: var(--eqp-navy); padding: 5px 0; line-height: 1.35;
}
.eqp-shotlist li::before {
    content: "▸"; position: absolute; left: -18px; color: var(--eqp-blue); font-weight: 700;
}

/* ── Bag & Tag: shipping tags ── */
.eqp-tags { display: flex; flex-wrap: wrap; gap: 16px; margin: 8px 0 22px; }
.eqp-tag {
    flex: 0 0 260px; border: 2px solid var(--eqp-navy); border-radius: 10px; padding: 14px 16px;
    background: #fff; font-family: 'DM Sans', system-ui, sans-serif;
}
.eqp-tag__row { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 1px dotted #d7e2ef; }
.eqp-tag__row:last-child { border-bottom: 0; }
.eqp-tag__k { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #5d7088; }
.eqp-tag__v { font-size: 14px; font-weight: 600; color: var(--eqp-navy); text-align: right; }
.eqp-tag__ref { font-family: 'DM Mono', ui-monospace, monospace; font-size: 22px; font-weight: 700; color: var(--eqp-navy); letter-spacing: .08em; }

/* Print isolation — only the tags print (hide the app chrome + station UI). */
@media print {
    body * { visibility: hidden; }
    .eqp-tags, .eqp-tags * { visibility: visible; }
    .eqp-tags { position: absolute; top: 0; left: 0; gap: 0; }
    .eqp-tag { page-break-after: always; border-width: 1px; box-shadow: none; }
}

/* ── responsive ── */
@media (max-width: 560px) {
    .eqp-head { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 18px; }
    .eqp-head__op { text-align: left; }
    .eqp-body { padding: 24px 14px 48px; }
    .eqp-card { padding: 26px 20px 30px; }
    .eqp-prompt { font-size: 24px; }
    .eqp-scan__row { flex-wrap: wrap; }
    .eqp-scan__go { flex: 1 0 100%; padding: 14px; }
}
