/* Iris WMS handheld UI — Honeywell CT60 (Scalefusion kiosk WebView) + phones.
   Rules carried over from /photos and Themis: inputs never below 16px so
   Android doesn't zoom, tap targets at least 48px, dark for battery + glare. */
* { box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
       margin: 0; min-height: 100vh; background: #16181f; color: #eee; }
a { color: #4aa8ff; }

.env-banner { background: #ffd24d; color: #1a1400; font-weight: 700; font-size: 13px;
              text-align: center; padding: 5px 8px; letter-spacing: 0.3px; }

.hh-header { display: flex; justify-content: space-between; align-items: center;
             padding: 10px 14px; background: #1d2029; border-bottom: 1px solid #2a2e3a;
             border-top: 3px solid;
             border-image: linear-gradient(90deg, #ff5e7e, #ff9d5c, #ffd24d, #4fd17a, #4aa8ff, #7a5cff) 1; }
.hh-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: #eee; }
.hh-brand img { height: 30px; width: auto; display: block; }
.hh-brand span { font-weight: 700; font-size: 16px; letter-spacing: 1px; color: #9aa0ae; }
.hh-right { display: flex; align-items: center; gap: 10px; }
.lang-switch { display: flex; border: 1px solid #3a3f4d; border-radius: 8px; overflow: hidden; margin: 0; }
.lang-switch button { min-width: 44px; min-height: 40px; border: 0; background: transparent;
                      color: #9aa0ae; font-size: 15px; font-weight: 700; cursor: pointer; }
.lang-switch button.on { background: #4aa8ff; color: #0b1220; }
.hh-signout { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px;
              border-radius: 8px; background: #3a1d22; color: #ff9daa; text-decoration: none;
              font-weight: 600; font-size: 15px; border: 1px solid #7c3040; }
.hh-who { padding: 8px 14px; color: #9aa0ae; font-size: 14px; border-bottom: 1px solid #22252f; }

.hh-main { max-width: 520px; margin: 0 auto; padding: 16px; }
h1 { font-size: 20px; margin: 4px 0 14px; }

/* menu */
.menu { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.menu a, .menu .tile { display: flex; flex-direction: column; justify-content: center; gap: 6px;
                       min-height: 92px; padding: 12px; border-radius: 10px; background: #232733;
                       border: 1px solid #3a3f4d; color: #eee; text-decoration: none;
                       font-size: 16px; font-weight: 600; }
.menu a:active { transform: scale(0.98); background: #2b3040; }
.menu .icon { font-size: 24px; }
.menu .tile.off { opacity: 0.45; }
.menu .soon { font-size: 12px; font-weight: 400; color: #9aa0ae; }
.menu .wide { grid-column: 1 / -1; min-height: 60px; flex-direction: row; align-items: center; }

/* forms */
label { display: block; color: #9aa0ae; font-size: 14px; margin: 14px 0 6px; }
input, select { width: 100%; font-size: 18px; padding: 14px 12px; border-radius: 8px;
                border: 1px solid #3a3f4d; background: #232733; color: #fff; min-height: 52px; }
input:focus, select:focus { outline: 2px solid #4aa8ff; border-color: transparent; }
button.primary { width: 100%; min-height: 52px; font-size: 18px; font-weight: 600;
                 margin-top: 22px; border: 0; border-radius: 8px; background: #4aa8ff;
                 color: #0b1220; cursor: pointer; }
button.primary:active { transform: scale(0.98); }
.btn-secondary { display: flex; align-items: center; justify-content: center; gap: 10px;
                 width: 100%; min-height: 52px; margin-top: 12px; border-radius: 8px;
                 border: 1px solid #3a3f4d; background: #232733; color: #eee;
                 font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer; }

.error { background: #3a1d22; border: 1px solid #7c3040; color: #ff9daa;
         border-radius: 8px; padding: 12px; margin-bottom: 10px; font-size: 15px; }
.hint { color: #6b7280; font-size: 13px; text-align: center; margin-top: 22px; line-height: 1.5; }
.divider { display: flex; align-items: center; gap: 12px; color: #6b7280;
           font-size: 13px; margin: 22px 0 2px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: #2a2e3a; }
.ms-logo { width: 18px; height: 18px; flex-shrink: 0; }

/* accepted-scan feedback (used by the scan screens) */
.scan-ok { animation: scanflash 0.5s ease-out; }
@keyframes scanflash { from { background: #1f5f3a; } to { background: #232733; } }

/* scan screens */
.hh-back { display: inline-block; color: #9aa0ae; text-decoration: none; font-size: 15px;
           padding: 6px 0; min-height: 36px; }
.ok-chip { background: #16361f; border: 1px solid #2f7a45; color: #8ff0ae; border-radius: 8px;
           padding: 12px; margin-bottom: 10px; font-size: 16px; font-weight: 600;
           animation: scanflash 0.6s ease-out; }
.ok-chip .muted { color: #6fbf88; font-weight: 400; font-size: 13px; }
.note { background: #3a3218; border: 1px solid #7a6a2f; color: #ffe08a; border-radius: 8px;
        padding: 10px 12px; margin-bottom: 10px; font-size: 14px; }
button.primary.warn { background: #ffb13b; }
input.short { width: 110px; }
.seg { display: flex; gap: 8px; }
.seg-opt { flex: 1; margin: 0; }
.seg-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.seg-opt span { display: flex; flex-direction: column; align-items: center; justify-content: center;
                min-height: 60px; border-radius: 8px; border: 1px solid #3a3f4d; background: #232733;
                color: #eee; font-size: 18px; font-weight: 700; cursor: pointer; }
.seg-opt span small { font-size: 11px; font-weight: 400; color: #9aa0ae; margin-top: 2px; }
.seg-opt input:checked + span { background: #4aa8ff; border-color: #4aa8ff; color: #0b1220; }
.seg-opt input:checked + span small { color: #0b1220; }
.seg-opt input:focus-visible + span { outline: 2px solid #fff; }

/* header site chip */
.hh-who { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.site-chip { color: #cfd6e4; text-decoration: none; font-size: 14px; padding: 6px 10px;
             border: 1px solid #3a3f4d; border-radius: 16px; min-height: 32px; }

/* scan bar on result screens */
.scanbar { display: flex; gap: 8px; margin-bottom: 14px; }
.scanbar input { flex: 1; }
.scanbar button { min-width: 64px; min-height: 52px; border: 0; border-radius: 8px;
                  background: #4aa8ff; color: #0b1220; font-size: 20px; font-weight: 700; }

/* item + bin results */
.item-card { display: flex; gap: 12px; align-items: flex-start; background: #1d2029;
             border: 1px solid #2a2e3a; border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.item-photo { width: 120px; height: 120px; flex-shrink: 0; border-radius: 8px; background: #fff;
              object-fit: contain; }
.item-photo.none { display: flex; align-items: center; justify-content: center; background: #232733;
                   color: #6b7280; font-size: 13px; text-align: center; }
.item-sku { font-size: 20px; font-weight: 700; word-break: break-word; }
.item-name { color: #cfd6e4; font-size: 15px; margin-top: 4px; }
.item-meta { color: #9aa0ae; font-size: 13px; margin-top: 6px; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 10px;
       background: #3a1d22; color: #ff9daa; margin-top: 6px; }
.tag.info { background: #1d2a3a; color: #9ccaff; }
h2 { font-size: 16px; margin: 16px 0 8px; color: #cfd6e4; }
table.qty { width: 100%; border-collapse: collapse; font-size: 16px; }
table.qty th { text-align: left; font-size: 12px; color: #9aa0ae; font-weight: 600; padding: 6px 4px;
               border-bottom: 1px solid #2a2e3a; }
table.qty td { padding: 10px 4px; border-bottom: 1px solid #22252f; }
table.qty td.num, table.qty th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.qty tr.total td { font-weight: 700; border-bottom: 0; }
table.qty a { color: #eee; text-decoration: none; }
.list a.row-link { display: flex; gap: 10px; align-items: center; padding: 10px; margin-bottom: 8px;
                   border-radius: 8px; background: #232733; border: 1px solid #3a3f4d; color: #eee;
                   text-decoration: none; min-height: 56px; }
.list .thumb { width: 44px; height: 44px; border-radius: 6px; background: #fff; object-fit: contain; flex-shrink: 0; }
.list .thumb.none { background: #2b3040; }
.list .grow { flex: 1; min-width: 0; }
.list .sub { color: #9aa0ae; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .qtys { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.list .qtys small { display: block; color: #9aa0ae; font-weight: 400; font-size: 12px; }
.muted { color: #9aa0ae; font-size: 13px; }
.asof { color: #6b7280; font-size: 12px; margin-top: 10px; }
.menu button.tile { font: inherit; font-size: 16px; font-weight: 600; width: 100%; }
.menu .tile.on { border-color: #4aa8ff; background: #1d2a3a; }
.label-row { display: flex; gap: 8px; margin: 0 0 12px; }
.label-row input { width: 80px; flex-shrink: 0; }
.label-row button.primary { margin-top: 0; flex: 1; }
