/* SGK Αποθήκη — staff page. PC first; works on tablet/phone; prints the picking list. */
:root {
	--ink: #111827;
	--soft: #4b5563;
	--line: #e5e7eb;
	--bg: #f3f4f6;
	--card: #ffffff;
	--green: #2f6b3f;
	--green-bg: #e7f3ea;
	--red: #b42318;
	--red-bg: #fdecea;
	--blue: #2563eb;
	--teal: #0d9488;
	--purple: #7c3aed;
	--amber: #b45309;
	--radius: 10px;
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 var(--font); }
a { color: var(--green); }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
kbd { display: inline-block; min-width: 1.6em; padding: 1px 6px; border: 1px solid #cbd5e1; border-bottom-width: 2px; border-radius: 5px; background: #fff; font: 600 12px/1.5 var(--font); text-align: center; }
[hidden] { display: none !important; }

.st-logo { font-size: 20px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.st-logo span { color: var(--green); }
.st-logo em { margin-left: 6px; padding: 2px 8px; border-radius: 6px; background: var(--ink); color: #fff; font-size: 12px; font-style: normal; font-weight: 700; vertical-align: 3px; }

/* Buttons */
.st-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border: 2px solid transparent; border-radius: var(--radius); font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.st-btn--primary { background: var(--green); color: #fff; }
.st-btn--primary:hover { background: #24522f; }
.st-btn--primary:disabled { background: #9ca3af; cursor: not-allowed; }
.st-btn--ghost { border-color: #cbd5e1; background: #fff; color: var(--ink); }
.st-btn--ghost:hover { border-color: var(--green); }
.st-btn--small { min-height: 40px; padding: 0 12px; font-size: 14px; border-color: var(--green); background: #fff; color: var(--green); }
.st-btn--small:hover { background: var(--green); color: #fff; }

/* Header + tabs */
.st-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line); }
.st-tabs { display: flex; gap: 6px; flex: 1; overflow-x: auto; }
.st-tab { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 12px; border: 2px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--soft); font-weight: 700; font-size: 15px; cursor: pointer; white-space: nowrap; }
.st-tab b { min-width: 28px; padding: 2px 8px; border-radius: 999px; background: var(--bg); color: var(--ink); font-size: 14px; text-align: center; }
.st-tab[aria-selected="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.st-tab[aria-selected="true"] b { background: #fff; }
.st-tab--check b { box-shadow: inset 0 0 0 2px var(--blue); }
.st-tab--ready b { box-shadow: inset 0 0 0 2px var(--teal); }
.st-tab--shipped b { box-shadow: inset 0 0 0 2px var(--purple); }
.st-tab--bank b { box-shadow: inset 0 0 0 2px var(--amber); }
.st-user { display: flex; align-items: center; gap: 12px; color: var(--soft); font-size: 14px; white-space: nowrap; }
@media (max-width: 1360px) { .st-user span { display: none; } }

.st-main { max-width: 1180px; margin: 0 auto; padding: 18px 20px 80px; }
.st-bar { position: sticky; top: 67px; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 14px; padding: 10px 0; background: var(--bg); }
.st-bar [data-finish], .st-bar [data-ship] { margin-left: auto; }
.st-bar__hint { color: var(--soft); font-size: 13px; }
.st-empty { padding: 40px 20px; border: 2px dashed #d1d5db; border-radius: var(--radius); background: #fff; color: var(--soft); font-size: 18px; text-align: center; }
.st-note { margin: 0 0 14px; color: var(--soft); }

/* Orders */
.st-order { margin: 0 0 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.st-order.has-missing { border-color: #f5b5ae; box-shadow: inset 4px 0 0 var(--red); }
.st-order__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; width: 100%; padding: 12px 16px; border: 0; background: #fafafa; text-align: left; cursor: pointer; }
.st-order__head:hover { background: #f1f5f9; }
.st-order__no { font-size: 18px; font-weight: 800; }
.st-order__who { font-weight: 700; }
.st-order__date, .st-order__city { color: var(--soft); font-size: 14px; }
.st-order--row { display: flex; align-items: center; gap: 12px; padding-left: 14px; }
.st-order--row .st-order__head { background: none; padding-left: 0; }
.st-order__main { flex: 1; min-width: 0; }
.st-order__sum { padding: 0 16px 12px 0; color: var(--soft); font-size: 14px; }
.st-check { width: 24px; height: 24px; flex: none; accent-color: var(--green); cursor: pointer; }

.st-tag { display: inline-block; padding: 3px 9px; border-radius: 6px; background: var(--bg); color: var(--ink); font-size: 13px; font-weight: 700; }
.st-tag--geniki { background: #e0f2fe; color: #075985; }
.st-tag--elta { background: #fef3c7; color: #92400e; }
.st-tag--shop { background: var(--green-bg); color: var(--green); }
.st-tag--other { background: #ede9fe; color: #5b21b6; }
.st-tag--cod { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }
.st-tag--missing { background: var(--red); color: #fff; }

/* Items (stock check) */
.st-items { margin: 0; padding: 0; list-style: none; }
.st-item { display: grid; grid-template-columns: 56px minmax(0, 1fr) 90px 54px auto; align-items: center; gap: 14px; padding: 10px 16px; border-top: 1px solid var(--line); outline: none; }
.st-item:focus { background: #eff6ff; box-shadow: inset 4px 0 0 var(--blue); }
.st-item[data-pick="found"] { background: var(--green-bg); }
.st-item[data-pick="missing"] { background: var(--red-bg); }
.st-item.is-saving { opacity: .6; }
.st-item img, .st-noimg { width: 56px; height: 56px; border-radius: 8px; border: 1px solid var(--line); object-fit: cover; background: #fff; }
.st-item__name { display: flex; flex-direction: column; min-width: 0; }
.st-item__name strong { font-size: 15px; }
.st-item__name small { color: var(--soft); font-size: 13px; }
.st-item__size { font-size: 16px; }
.st-item__size strong { font-size: 22px; }
.st-item__qty { font-size: 20px; font-weight: 800; text-align: center; }
.st-pick { display: flex; gap: 8px; }
.st-pick button { min-width: 108px; min-height: 48px; border: 2px solid var(--line); border-radius: var(--radius); background: #fff; font-weight: 800; font-size: 15px; cursor: pointer; }
.st-pick__found { color: var(--green); }
.st-pick__missing { color: var(--red); }
.st-pick__found:hover, .st-pick__found[aria-pressed="true"] { border-color: var(--green); background: var(--green); color: #fff; }
.st-pick__missing:hover, .st-pick__missing[aria-pressed="true"] { border-color: var(--red); background: var(--red); color: #fff; }

/* Ready: chips + select all */
.st-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.st-chip { min-height: 44px; padding: 0 16px; border: 2px solid var(--line); border-radius: 999px; background: #fff; font-weight: 700; cursor: pointer; }
.st-chip b { margin-left: 4px; }
.st-chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.st-chip--geniki[aria-pressed="false"] { border-color: #7dd3fc; }
.st-chip--elta[aria-pressed="false"] { border-color: #fcd34d; }
.st-selectall { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 10px; font-weight: 700; cursor: pointer; }
.st-selectall input { width: 22px; height: 22px; accent-color: var(--green); }

/* Drawer */
.st-drawer { position: fixed; inset: 0; z-index: 50; }
.st-drawer__backdrop { position: absolute; inset: 0; background: rgba(17, 24, 39, .45); }
.st-drawer__box { position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 100%); overflow-y: auto; padding: 0 22px 30px; background: #fff; box-shadow: -10px 0 40px rgba(0, 0, 0, .2); }
.st-drawer__head { position: sticky; top: 0; display: flex; align-items: center; gap: 12px; padding: 16px 0; background: #fff; border-bottom: 1px solid var(--line); }
.st-drawer__head h2 { margin: 0; font-size: 24px; }
.st-drawer__x { margin-left: auto; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--bg); font-size: 18px; cursor: pointer; }
.st-dl { display: grid; grid-template-columns: 120px 1fr; gap: 10px 14px; margin: 18px 0; }
.st-dl dt { color: var(--soft); font-weight: 700; }
.st-dl dd { margin: 0; }
.st-cod { color: #9a3412; }
.st-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.st-table th, .st-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.st-table img { border-radius: 6px; }
.st-table .st-total td { font-weight: 800; font-size: 17px; }
.st-loading { padding: 30px 0; color: var(--soft); }

/* Toast */
.st-toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 14px 20px; border-radius: var(--radius); background: var(--ink); color: #fff; font-weight: 700; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.st-toast.is-bad { background: var(--red); }

/* Login */
.st-login { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.st-login__box { width: min(400px, 100%); padding: 32px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, .06); }
.st-login__box h1 { margin: 22px 0 14px; font-size: 22px; }
.st-login__msg { margin: 22px 0; }
.st-login__box p { margin: 0 0 14px; }
.st-login__box label { display: block; margin-bottom: 6px; font-weight: 700; }
.st-login__box input[type="text"], .st-login__box input[type="password"] { width: 100%; min-height: 48px; padding: 0 12px; border: 2px solid #cbd5e1; border-radius: var(--radius); font-size: 16px; }
.st-login__box input[type="checkbox"] { width: 20px; height: 20px; vertical-align: -4px; accent-color: var(--green); }
.st-login__box .login-remember label { display: inline; font-weight: 400; }
.st-login__box input[type="submit"] { width: 100%; min-height: 50px; border: 0; border-radius: var(--radius); background: var(--green); color: #fff; font-size: 17px; font-weight: 800; cursor: pointer; }

/* Picking list (screen + print) */
.st-picking { background: #fff; }
.st-picking__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 24px; border-bottom: 2px solid var(--ink); }
.st-picking__head h1 { margin: 0; font-size: 26px; }
.st-picking__head p { margin: 4px 0 0; color: var(--soft); }
.st-picking__head > div:last-child { display: flex; gap: 10px; }
.st-picking .st-empty { margin: 24px; }
.st-pick-table { width: calc(100% - 48px); margin: 12px 24px 40px; border-collapse: collapse; font-size: 15px; }
.st-pick-table th, .st-pick-table td { padding: 8px; border-bottom: 1px solid #d1d5db; text-align: left; vertical-align: middle; }
.st-pick-table thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--soft); border-bottom: 2px solid var(--ink); }
.st-pick-brand th { padding-top: 18px; font-size: 18px; border-bottom: 2px solid var(--ink); }
.st-pick-table .c-ok { width: 36px; }
.st-box { display: inline-block; width: 22px; height: 22px; border: 2px solid var(--ink); border-radius: 4px; }
.st-pick-table .c-img { width: 66px; }
.st-pick-table img { display: block; border-radius: 6px; }
.st-pick-table .c-size { width: 70px; font-size: 24px; font-weight: 800; }
.st-pick-table .c-qty { width: 70px; font-size: 24px; font-weight: 800; }
.st-pick-table .c-orders { color: var(--soft); font-size: 13px; }
.st-sku { color: var(--soft); font-size: 13px; }
.st-flag { padding: 1px 6px; border-radius: 4px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; }

@media print {
	@page { size: A4; margin: 12mm; }
	body { background: #fff; font-size: 12pt; }
	.st-noprint { display: none !important; }
	.st-picking__head { padding: 0 0 8px; }
	.st-pick-table { width: 100%; margin: 8px 0 0; }
	.st-pick-table tr { break-inside: avoid; }
	.st-pick-table thead { display: table-header-group; }
	.st-pick-brand th { break-after: avoid; }
	.st-flag { border: 1px solid #000; background: none; color: #000; }
	/* Compact rows: ~28 lines per A4, size + quantity stay large. */
	@page { size: A4; margin: 9mm 10mm; }
	body { font-size: 10pt; }
	.st-picking__head h1 { font-size: 16pt; }
	.st-picking__head p { font-size: 9pt; }
	.st-pick-table { font-size: 9.5pt; }
	.st-pick-table th, .st-pick-table td { padding: 2px 5px; line-height: 1.2; }
	.st-pick-table .c-img { width: 34px; }
	.st-pick-table img { width: 30px; height: 30px; }
	.st-pick-table .c-size, .st-pick-table .c-qty { width: 48px; font-size: 15pt; }
	.st-pick-table .c-orders { font-size: 8pt; }
	.st-sku { font-size: 8pt; }
	.st-pick-table br { display: none; }
	.st-pick-table .st-sku { margin-left: 6px; }
	.st-box { width: 14px; height: 14px; border-width: 1.5px; }
	.st-pick-brand th { padding-top: 8px; font-size: 12pt; }
}

/* Tablet / phone */
@media (max-width: 900px) {
	.st-top { flex-wrap: wrap; gap: 10px; padding: 10px 12px; }
	.st-tabs { order: 3; flex-basis: 100%; }
	.st-user { margin-left: auto; }
	.st-bar { position: static; }
	.st-main { padding: 12px 12px 80px; }
	.st-item { grid-template-columns: 48px minmax(0, 1fr) auto; grid-template-areas: "img name name" "img size qty" "pick pick pick"; gap: 6px 10px; }
	.st-item img, .st-item .st-noimg { grid-area: img; width: 48px; height: 48px; }
	.st-item__name { grid-area: name; }
	.st-item__size { grid-area: size; }
	.st-item__qty { grid-area: qty; text-align: right; }
	.st-pick { grid-area: pick; }
	.st-pick button { flex: 1; }
	.st-bar__hint { display: none; }
	.st-dl { grid-template-columns: 1fr; gap: 2px; }
	.st-dl dd { margin-bottom: 10px; }
}

/* 1…N order numbers + tickable picking list. */
.st-serial { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 30px; padding: 0 7px; border-radius: 7px; background: var(--ink); color: #fff; font-size: 17px; font-weight: 800; }
.st-serial--sm { min-width: 24px; height: 22px; padding: 0 5px; margin-right: 2px; border-radius: 5px; font-size: 13px; }
.st-pick-table .c-orders small { margin-right: 8px; color: var(--soft); }
.st-tickrow { cursor: pointer; }
.st-tickrow:hover td, .st-ordercell.st-tickrow:hover { background: #f8fafc; }
.st-tickrow:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }
.st-pick-table .c-ok { width: 52px; }
.st-pick-table .st-box { width: 30px; height: 30px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; }
.st-tickrow.is-ticked .st-box { background: var(--green); border-color: var(--green); }
.st-tickrow.is-ticked .st-box::after { content: "✓"; color: #fff; font-size: 20px; font-weight: 900; line-height: 1; }
.st-pick-table .st-tickrow.is-ticked td { background: #f0fdf4; }
.st-pick-table .st-tickrow.is-ticked td:not(.c-ok) { opacity: .55; }
.st-ordergrid-wrap { margin: 0 24px 40px; }
.st-ordergrid-wrap h2 { margin: 0 0 10px; font-size: 20px; border-bottom: 2px solid var(--ink); padding-bottom: 6px; }
.st-ordergrid-wrap h2 small { font-size: 13px; font-weight: 400; color: var(--soft); }
.st-ordergrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.st-ordercell { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.st-ordercell .st-box { width: 26px; height: 26px; flex: none; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; }
.st-ordercell.is-ticked { background: #f0fdf4; border-color: #86efac; }
.st-ordercell.is-ticked .st-ordercell__txt { text-decoration: line-through; color: var(--soft); }
.st-ordercell__txt { font-size: 14px; }
@media print {
	.st-pick-table .c-ok { width: 24px; }
	.st-pick-table .st-box, .st-ordercell .st-box { width: 14px; height: 14px; border-radius: 3px; }
	.st-tickrow.is-ticked .st-box { background: none; border-color: #000; }
	.st-tickrow.is-ticked .st-box::after { color: #000; font-size: 11px; }
	.st-pick-table .st-tickrow.is-ticked td { background: none; }
	.st-serial { min-width: 22px; height: 18px; font-size: 10pt; border: 1px solid #000; background: none; color: #000; }
	.st-serial--sm { min-width: 16px; height: 14px; font-size: 8pt; }
	.st-ordergrid-wrap { margin: 10px 0 0; break-before: avoid; }
	.st-ordergrid-wrap h2 { font-size: 12pt; }
	.st-ordergrid { grid-template-columns: repeat(4, 1fr); gap: 3px; }
	.st-ordercell { min-height: 0; padding: 2px 5px; gap: 5px; border-color: #999; break-inside: avoid; }
	.st-ordercell__txt { font-size: 8pt; }
}
@media (max-width: 900px) {
	.st-ordergrid-wrap { margin: 0 12px 30px; }
	.st-pick-table { width: calc(100% - 24px); margin: 12px; }
}

/* Our own confirmation box (assets/ask.js) — browsers can't block it. */
.st-ask { width: min(420px, calc(100% - 32px)); padding: 22px; border: 0; border-radius: 14px; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); font: 16px/1.45 var(--font); color: var(--ink); }
.st-ask::backdrop { background: rgba(17, 24, 39, .5); }
.st-ask__msg { margin: 0 0 18px; font-size: 17px; font-weight: 700; }
.st-ask__btns { display: flex; justify-content: flex-end; gap: 10px; }
@media print { .st-ask { display: none; } }

/* An order leaving «Έλεγχος» when all its products are found + undo in the toast. */
.st-order.is-leaving { opacity: 0; transform: translateX(24px); transition: opacity .25s, transform .25s; }
@media (prefers-reduced-motion: reduce) { .st-order.is-leaving { transition: none; } }
.st-toast { display: flex; align-items: center; gap: 14px; }
.st-toast__btn { min-height: 36px; padding: 0 14px; border: 2px solid #fff; border-radius: 8px; background: none; color: #fff; font-weight: 800; cursor: pointer; }
.st-toast__btn:hover { background: #fff; color: var(--ink); }
.st-login__err { margin: 0 0 14px; padding: 10px 12px; border-radius: 8px; background: var(--red-bg); color: var(--red); font-weight: 700; }
