/* Myu Stock — Staff Admin Portal look.
   Layout, palette, typography, cards, tables and nav come from portal.css,
   which is a copy of the portal stylesheet (salesdata-site/app/public/style.css).
   Rules below are only for stock-app screens (booking, login, badges). */

@import url("/portal.css");

#book-form button[type=submit],
#count-form button[type=submit],
form.card button[type=submit],
.actions > button:not(.secondary),
.btn:not(.secondary) {
  font: inherit;
  font-weight: 900;
  color: #fff;
  background: var(--pk-red-dark);
  border: 0;
  border-radius: 14px;
  padding: 10px 22px;
  min-height: 52px;
  cursor: pointer;
  box-shadow: 0 2px 0 var(--pk-red-deep);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#book-form button[type=submit]:hover,
#count-form button[type=submit]:hover,
form.card button[type=submit]:hover,
.actions > button:not(.secondary):hover,
.btn:not(.secondary):hover {
  background: var(--pk-red-deep);
}
button.secondary, .btn.secondary, #undo, #add-customer {
  font: inherit;
  font-weight: 800;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--line2);
  border-radius: 14px;
  padding: 10px 18px;
  min-height: 48px;
  cursor: pointer;
  box-shadow: 0 2px 0 rgba(0,0,0,.12);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
button.secondary:hover, .btn.secondary:hover, #undo:hover, #add-customer:hover {
  background: var(--pk-yellow-soft);
  border-color: var(--pk-yellow);
}
button:disabled { opacity: .5; cursor: not-allowed; }

label { display: block; font-weight: 800; font-size: 1rem; margin: 0.8rem 0 0.35rem; color: var(--ink); }
input[type=text], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.65rem 0.8rem;
  border: 1.5px solid var(--line2);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
}
#scan {
  font-size: 1.35rem;
  font-weight: 800;
  padding: 0.9rem 1rem;
  border: 2.5px solid var(--pk-black);
  letter-spacing: .02em;
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem 1.2rem; }
@media (max-width: 700px) { .row { grid-template-columns: 1fr; } }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 1rem; }
.qty-input { width: 5.4rem; }
.right { text-align: right; }
.totals { font-size: 1.2rem; font-weight: 900; margin-top: 0.8rem; color: var(--ink); }
.meta { color: var(--muted); font-size: 0.95rem; font-weight: 600; }
.override { margin-top: 0.9rem; padding-top: 0.5rem; }
.override label { font-weight: 700; }

.badge { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.82rem; font-weight: 800; }
.badge.ok { background: #E6F6F4; color: #0F766E; }
.badge.low { background: var(--pk-yellow-soft); color: #5A3B00; border: 1px solid var(--pk-yellow); }
.badge.zero { background: #F1F3F6; color: var(--muted); }
.badge.negative { background: #FDECEA; color: #7A1410; }

.flash, .msg.ok { border-radius: 16px; padding: 14px 18px; font-weight: 700; margin: 0 0 16px; }
.flash.ok, .msg.ok { background: #ECFDF3; color: #166534; border: 2px solid #86EFAC; }
.flash.bad, .msg { background: #FEF2F2; color: #7F1D1D; border: 2px solid #FCA5A5; }

.toast {
  position: fixed; left: 50%; top: 18px; transform: translateX(-50%);
  padding: 0.7rem 1.2rem; border-radius: 999px; color: #fff; font-weight: 800;
  z-index: 80; display: none; max-width: 92vw; box-shadow: var(--shadow);
}
.toast.show { display: block; }
.toast.ok { background: #166534; }
.toast.bad { background: var(--pk-red-dark); }
body.flash-ok { outline: 8px solid rgba(22, 101, 52, .45); outline-offset: -8px; }
body.flash-bad { outline: 8px solid rgba(184, 29, 23, .55); outline-offset: -8px; }

.unknown { background: #FDECEA; color: #7A1410; padding: 0.9rem 1rem; border-radius: 16px; display: none; margin-top: 0.7rem; font-weight: 700; }
.unknown.show { display: block; }
.search-results { list-style: none; margin: 0.4rem 0 0; padding: 0; border: 1.5px solid var(--line2); border-radius: 14px; background: #fff; display: none; box-shadow: var(--shadow); }
.search-results.show { display: block; }
.search-results li { padding: 0.6rem 0.8rem; cursor: pointer; border-bottom: 1px solid var(--line); font-weight: 700; }
.search-results li:last-child { border-bottom: 0; }
.search-results li:hover { background: var(--pk-yellow-soft); }

.login-wrap { max-width: 440px; margin: 0 auto; padding: 12vh 16px 40px; position: relative; z-index: 1; }
body.stock-login {
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(900px 600px at 70% 80%, #FFE16B 0%, rgba(255,225,107,0) 70%), #FFCB05;
  font-family: var(--font);
}
body.stock-login .login-card {
  background: #fff;
  border: 3px solid var(--pk-black);
  border-top: 8px solid var(--pk-red-dark);
  border-radius: 24px;
  box-shadow: 8px 8px 0 rgba(31,19,0,.18);
  padding: 28px 26px 24px;
}
body.stock-login .login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
body.stock-login .login-brand .title { color: var(--ink); font-size: 1.45rem; font-weight: 900; line-height: 1.15; }
body.stock-login .login-brand .title span {
  display: inline-block; margin-left: 6px; font-size: .95rem; font-weight: 900;
  color: #3B2A00; background: var(--pk-yellow); border-radius: 999px; padding: 1px 10px;
  border: 2px solid var(--pk-black);
}
body.stock-login .lens { box-shadow: 0 0 0 3px var(--pk-black), inset -6px -6px 0 rgba(0,0,0,.18); }
body.stock-login .lede { color: #4B5563; font-weight: 700; margin: 0 0 1rem; }
body.stock-login button[type=submit] {
  width: 100%; margin-top: 1rem; font: inherit; font-weight: 900; font-size: 1.15rem;
  color: #fff; background: var(--pk-red-dark); border: 3px solid var(--pk-black);
  border-radius: 16px; min-height: 56px; cursor: pointer; box-shadow: 0 4px 0 var(--pk-black);
}

@media print {
  .side, .menu-scrim, .no-print, .pk-run { display: none !important; }
  body.dash { display: block; background: #fff; }
  .card { box-shadow: none; }
}

.scan-wrap { position: relative; }
.scan-suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40;
  max-height: 360px; overflow: auto; margin: 0; padding: 6px 0;
  list-style: none; background: #fff; border: 1.5px solid var(--line2);
  border-radius: 16px; box-shadow: var(--shadow);
}
.scan-suggest.show { display: block; }
.scan-suggest li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 0.65rem 0.9rem; cursor: pointer; border-bottom: 1px solid var(--line);
  font-weight: 700;
}
.scan-suggest li:last-child { border-bottom: 0; }
.scan-suggest li .sug-main { min-width: 0; }
.scan-suggest li .sug-name { display: block; color: var(--ink); font-weight: 800; }
.scan-suggest li .sug-meta { display: block; color: var(--muted); font-size: 0.9rem; font-weight: 700; }
.scan-suggest li .sug-qty { flex: none; font-weight: 900; color: var(--ink); white-space: nowrap; }
.scan-suggest li.is-active, .scan-suggest li:hover { background: var(--pk-yellow-soft); }
.scan-suggest li.is-empty { cursor: default; color: var(--muted); font-weight: 700; }
