/* Additions of the warehouse app on top of admin2.css (copied from the e-shop's new administration). */

[hidden] { display: none !important; }

/* login */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login { width: min(360px, 100%); padding: 24px; display: grid; gap: 14px; }
.login .brand { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; color: var(--text); }
.login .brand small { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.login .flash { margin: 0; }
.login .btn { justify-content: center; padding: 9px 13px; }
.login .hint { margin: 0; }

/* home */
.quick-start { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px; }
.quick-start .btn { padding: 10px 16px; font-size: 14px; }

/* product detail */
.product-detail { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 14px; align-items: start; }
.facts { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 12px; margin: 0; font-size: 13.5px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.chip { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--bg); font-size: 12.5px; font-variant-numeric: tabular-nums; }

@media (max-width: 1100px) {
  .product-detail { grid-template-columns: minmax(0, 1fr); }
}

/* stock list */
.products td.r, .products td.money { white-space: nowrap; }

/* goods form (stock-in, edit) */
.field-row.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.field-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.codes { display: flex; flex-wrap: wrap; gap: 8px; }
.codes input { flex: 1 1 160px; font-variant-numeric: tabular-nums; }
.seg-radio { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-radio label { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; font-weight: 600; cursor: pointer; background: #fff; }
.seg-radio label:has(:checked) { border-color: var(--orange); background: var(--orange-soft); color: var(--orange); }
.seg-radio input { width: auto; margin: 0; accent-color: var(--orange); }
.stock-in-head { grid-template-columns: minmax(0, 1fr) 140px auto; align-items: end; }
.stock-in-head h2 { align-self: center; font-size: 18px; }
.stock-in-head .pieces input { font-size: 20px; font-weight: 700; text-align: center; padding: 8px; }
.btn.big { padding: 11px 18px; font-size: 15px; justify-content: center; }
.product-form .form-foot { border-radius: var(--radius); gap: 8px; }
.pf-side .mini td { padding: 6px 4px; font-size: 13px; }
.pf-side .link { font-size: 13px; }
.toolbar .filter-search.wide { flex: 1 1 320px; }

@media (max-width: 860px) {
  .field-row.two, .field-row.three, .stock-in-head { grid-template-columns: minmax(0, 1fr); }
}

/* cash desk */
.cash-desk { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; position: relative; }
.cd-main { display: grid; gap: 14px; min-width: 0; }
.cd-scan { display: flex; gap: 10px; padding: 12px; align-items: stretch; }
.cd-scan label { display: flex; align-items: center; gap: 8px; border: 2px solid var(--line); border-radius: 10px; padding: 0 12px; background: #fff; color: var(--muted); }
.cd-scan label:focus-within { border-color: var(--teal); }
.cd-scan input { border: 0; outline: none; background: none; min-width: 0; font-size: 22px; font-weight: 700; padding: 10px 0; color: var(--text); }
.cd-pieces { flex: 0 0 110px; }
.cd-pieces input { width: 100%; text-align: center; }
.cd-barcode { flex: 1; }
.cd-barcode input { flex: 1; width: 100%; letter-spacing: .03em; }
.cd-barcode .icon { width: 24px; height: 24px; }
.cd-items .empty { justify-content: center; padding: 26px; }
.cd-items .products > tbody td { font-size: 14px; }
.cd-items .who b { font-size: 15px; }
.cd-items .who span { display: block; color: var(--muted); font-size: 12px; }
.cd-edit { border: 1px solid var(--line); border-radius: 7px; padding: 5px 7px; background: #fff; }
.cd-edit.qty { width: 64px; text-align: right; }
.cd-edit.price { width: 90px; text-align: right; font-weight: 700; }
.who .cd-edit { width: 100%; font-weight: 700; }
tr.cd-incomplete td { background: var(--yellow-soft) !important; }
tr.cd-incomplete .cd-edit:placeholder-shown { border-color: var(--orange); }
.cd-side { display: grid; gap: 12px; position: sticky; top: calc(var(--top-h) + 14px); }
.cd-total { padding: 16px 18px; display: grid; gap: 2px; }
.cd-total .label, .cd-done .label { color: var(--muted); font-size: 13px; font-weight: 600; }
.cd-total .value { font-size: 40px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.cd-total .note, .cd-done .note { color: var(--muted); font-size: 13px; }
.cd-options { padding: 12px 16px; display: grid; gap: 8px; }
.cd-pay { justify-content: center; padding: 16px; font-size: 18px; }
.cd-pay[disabled] { opacity: .45; cursor: not-allowed; }
.cd-pay kbd, .cd-done kbd { font: 600 11px 'Open Sans', Arial, sans-serif; border: 1px solid rgba(255,255,255,.5); border-radius: 5px; padding: 0 5px; opacity: .85; }
.cd-clear { justify-content: center; }
.cd-status { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--yellow-soft); color: var(--yellow); font-weight: 600; font-size: 13px; }
.cd-status.error { background: var(--red-soft); color: var(--red); }
.cash-desk.is-deduct .cd-total { box-shadow: inset 0 0 0 2px var(--violet); }
.cash-desk.is-deduct .cd-pay { background: var(--violet); border-color: var(--violet); }
.cd-done { position: absolute; inset: 0 0 auto auto; width: 300px; padding: 18px; display: grid; gap: 4px; box-shadow: 0 0 0 2px var(--green), var(--shadow); z-index: 5; }
.cd-done .value { font-size: 40px; font-weight: 800; color: var(--green); }
.cd-done-actions { display: grid; gap: 8px; margin-top: 10px; }
.cd-done-actions .btn { justify-content: center; padding: 11px; }
.cash-desk.is-done .cd-side { visibility: hidden; }
.cash-desk.is-done .cd-items { opacity: .5; }
.print-frame { position: absolute; width: 0; height: 0; border: 0; visibility: hidden; }

@media (max-width: 1150px) {
  .cash-desk { grid-template-columns: minmax(0, 1fr); }
  .cd-side { position: static; }
  .cd-done { position: static; width: auto; }
  .cash-desk.is-done .cd-side { display: none; }
}

/* sales of a day */
.day-pick { display: flex; align-items: center; gap: 6px; }
.day-pick input { border: 1px solid var(--line); border-radius: 9px; padding: 6px 10px; background: #fff; }
.day-pick .btn { padding: 6px 11px; }
.sales .who > span { display: block; color: var(--text); font-size: 13px; }
.sales .who > span .muted { display: inline; font-size: 12px; }
.sales tr.is-storno .who { text-decoration: line-through; }
.c-actions { white-space: nowrap; text-align: right; }
.c-actions form { display: inline-flex; gap: 6px; }
.btn.small-btn { padding: 4px 9px; font-size: 12px; }
.btn.small-btn .icon { width: 15px; height: 15px; }
.btn.danger { color: var(--red); }
.btn.danger:hover { border-color: var(--red); }

/* takings */
.panel-h .muted b { color: var(--text); }
.takings th.group { text-align: center; border-left: 1px solid var(--line); }
.takings .muted-money { font-weight: 400; color: var(--muted); }
.takings tfoot th { padding: 10px 12px; border-top: 2px solid var(--line); text-align: right; font-size: 13px; }
.takings tfoot th:first-child { text-align: left; }
.takings .bar-col { width: 22%; min-width: 60px; }
.takings .bar { display: block; height: 8px; border-radius: 4px; background: var(--teal); min-width: 2px; }
.takings-grid { margin-top: 14px; display: grid; gap: 14px; }
.table-scroll { overflow-x: auto; }
.toolbar .select input[type=month] { border: 0; background: none; padding: 6px 8px 6px 0; outline: none; }
.preview td, .preview th { font-size: 12px; white-space: nowrap; }
.preview .picked { background: var(--orange-soft) !important; }
.page > .hint { margin: -4px 0 14px; }

/* labels */
.labels-top { margin-bottom: 0; }
.labels-top .toolbar { margin-bottom: 14px; }
.labels .code { font-variant-numeric: tabular-nums; letter-spacing: .03em; }
.labels tr.fresh td { background: var(--green-soft) !important; }
.qty-input { width: 72px; border: 1px solid var(--line); border-radius: 7px; padding: 5px 7px; text-align: right; }
.labels-foot { position: sticky; bottom: 0; display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding: 12px 0; background: linear-gradient(transparent, var(--bg) 30%); }

.eshop-sync { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 13px; }

/* cash desk: connection, settings */
.cd-net { display: flex; align-items: flex-start; gap: 8px; padding: 9px 12px; border-radius: 10px; background: var(--card); box-shadow: var(--shadow); font-size: 12.5px; font-weight: 600; }
.cd-net .dot { flex: none; width: 10px; height: 10px; margin-top: 4px; border-radius: 50%; background: var(--muted); }
.cd-net[data-state=online] .dot { background: var(--green); }
.cd-net[data-state=offline] { background: var(--yellow-soft); color: var(--yellow); }
.cd-net[data-state=offline] .dot { background: var(--orange); }
.cd-net[data-state=login] { background: var(--red-soft); color: var(--red); }
.cd-net[data-state=login] .dot { background: var(--red); }
.cd-net a { text-decoration: underline; }
.cd-settings { font-size: 13px; }
.cd-settings summary { cursor: pointer; color: var(--muted); }
.cd-settings[open] { display: grid; gap: 8px; }
.cd-settings .field input { max-width: 90px; }
