/* Sterlingz Versand – Admin. Farben und Schriften laut Brandbook (Onyx, Paper, Sand, Tuerkis als Akzent;
   Inter fuer UI, Playfair Display fuer Seitentitel). */
:root {
  --ink: #121316;
  --ink-2: #34353a;
  --muted: #66676c;
  --faint: #9c9ca0;
  --line: #e6e3db;
  --line-2: #d5d1c6;
  --bg: #f4f2ec;
  --panel: #fff;
  --soft: #f0ede5;
  --hover: #faf9f5;
  --sand: #e7e1d0;
  --turq: #4db6ae;
  --pool: #65bcb4;
  --green: #17693f; --green-bg: #e6f3eb;
  --amber: #8a5300; --amber-bg: #fcf0d9;
  --red: #b3261e; --red-bg: #fcebea;
  --blue: #1d4ed8; --blue-bg: #e9eefc;
  --violet: #6424c9; --violet-bg: #f0e9fd;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 24px rgba(0,0,0,.05);
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Playfair Display', Palatino, Georgia, serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); font-size: 14px; line-height: 1.45; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; }
svg { width: 16px; height: 16px; flex: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.mono { font-family: var(--mono); font-size: .92em; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side { background: #121316; color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { padding: 26px 22px 24px; }
.brand b { display: block; font-size: 19px; letter-spacing: 5px; font-weight: 700; }
.brand span { display: block; font-size: 9.5px; letter-spacing: 3.4px; color: #9a9a9a; margin-top: 6px; }
.nav { display: flex; flex-direction: column; padding: 4px 10px; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 6px; color: #cfcfcf; text-decoration: none; font-weight: 500; }
.nav a:hover { background: #1b1b1b; color: #fff; }
.nav a.active { background: #fff; color: #000; }
.nav a svg { width: 18px; height: 18px; flex: none; opacity: .9; }
.nav .count { margin-left: auto; font-size: 11.5px; background: #262626; color: #fff; border-radius: 99px; padding: 1px 8px; font-weight: 600; }
.nav a.active .count { background: #000; }
.side-foot { margin-top: auto; padding: 16px 18px 20px; border-top: 1px solid #1f1f1f; font-size: 12.5px; color: #a3a3a3; }
.side-foot .mode { display: inline-flex; align-items: center; gap: 6px; background: #1f1f1f; color: #f5c46b; border-radius: 99px; padding: 3px 10px; font-weight: 600; font-size: 11.5px; margin-bottom: 10px; }
.side-foot .mode.live { color: #7fd6a4; }
.side-foot button { background: none; border: 0; color: #d4d4d4; padding: 0; cursor: pointer; text-decoration: underline; }
.main { min-width: 0; padding: 28px 32px 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--serif); font-size: 30px; font-weight: 500; letter-spacing: -.2px; margin: 0; }
.qty-hl { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 24px; padding: 0 8px; border-radius: 5px; background: var(--ink); color: #fff; font-weight: 700; font-size: 14px; box-shadow: 0 0 0 3px rgba(77,182,174,.35); }
.qty-one { display: inline-flex; min-width: 34px; justify-content: flex-end; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.pitem .qty-flag { position: absolute; bottom: 70px; right: 14px; background: var(--ink); color: #fff; font-weight: 800; font-size: 22px; padding: 4px 12px; border-radius: 8px; box-shadow: 0 0 0 4px rgba(77,182,174,.45); }
.price { font-weight: 600; }
.price.est { color: var(--muted); font-weight: 500; }
.progress.turq i { background: var(--turq); }
.dropzone { border: 1.5px dashed var(--line-2); border-radius: 10px; padding: 22px; text-align: center; background: var(--hover); cursor: pointer; display: block; }
.dropzone:hover { border-color: var(--ink); }
.logo-preview { display: flex; gap: 14px; align-items: center; }
.logo-preview div { width: 96px; height: 96px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); }
.logo-preview img { max-width: 70px; max-height: 70px; }
.rate-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rate-table th, .rate-table td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.rate-table input.input { width: 92px; height: 30px; padding: 0 8px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

/* ---------- Bausteine ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.card.pad { padding: 18px 20px; }
.card h2, .section-title { font-size: 12px; letter-spacing: 1.1px; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 0 0 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 15px; border-radius: 6px; border: 1px solid #121316; background: #121316; color: #fff; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none; font-size: 13.5px; transition: background .12s, border-color .12s; }
.btn:hover { background: #2b2b2b; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.secondary { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn.secondary:hover { background: var(--hover); border-color: #bdbdb9; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--soft); }
.btn.danger { background: #fff; color: var(--red); border-color: #efc2bf; }
.btn.danger:hover { background: var(--red-bg); }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12.5px; }
.btn.lg { height: 46px; padding: 0 22px; font-size: 15px; }
.btn svg { width: 16px; height: 16px; }
.iconbtn { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 6px; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--ink-2); }
.iconbtn:hover { background: var(--soft); }
.iconbtn svg { width: 17px; height: 17px; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--soft); color: var(--ink-2); white-space: nowrap; line-height: 1.5; }
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.amber { background: var(--amber-bg); color: var(--amber); }
.badge.red { background: var(--red-bg); color: var(--red); }
.badge.blue { background: var(--blue-bg); color: var(--blue); }
.badge.violet { background: var(--violet-bg); color: var(--violet); }
.badge.dark { background: #121316; color: #fff; }
.badge.outline { background: #fff; border: 1px solid var(--line-2); }
.badge svg { width: 12px; height: 12px; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 14px; cursor: pointer; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; }
.tabs button:hover { color: var(--ink); }
.tabs button.active { color: var(--ink); border-bottom-color: var(--ink); }
.tabs .n { font-size: 11.5px; background: var(--soft); border-radius: 99px; padding: 0 7px; color: var(--ink-2); }
.tabs button.active .n { background: #121316; color: #fff; }

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field small { color: var(--muted); font-size: 12px; }
.input, select.input, textarea.input { height: 36px; border: 1px solid var(--line-2); border-radius: 6px; padding: 0 11px; background: #fff; width: 100%; min-width: 0; }
textarea.input { height: auto; padding: 9px 11px; min-height: 80px; resize: vertical; line-height: 1.5; }
.input:focus { outline: none; border-color: #121316; box-shadow: 0 0 0 3px rgba(0,0,0,.07); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.check input { width: 16px; height: 16px; accent-color: #121316; }
.toggle { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; }
.toggle i { width: 36px; height: 21px; border-radius: 99px; background: #cfcfcb; position: relative; transition: background .15s; flex: none; }
.toggle i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.toggle input:checked + i { background: #121316; }
.toggle input:checked + i::after { transform: translateX(15px); }
.toggle input:focus-visible + i { outline: 2px solid #121316; outline-offset: 2px; }

.search { position: relative; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); }
.search .input { padding-left: 32px; width: 260px; }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 7px; background: var(--soft); font-size: 13.5px; }
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert.amber { background: var(--amber-bg); color: #5c3700; }
.alert.red { background: var(--red-bg); color: #7a1a14; }
.alert.green { background: var(--green-bg); color: #0f4a2c; }
.alert.blue { background: var(--blue-bg); color: #16357f; }
.alert .grow b { font-weight: 600; }

/* ---------- Tabellen ---------- */
.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
.t th { text-align: left; font-size: 11.5px; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fcfcfb; white-space: nowrap; position: sticky; top: 0; }
.t td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr { cursor: pointer; }
.t tbody tr:hover td { background: var(--hover); }
.t tr.sel td { background: #f7f7f2; }
.t td.cb, .t th.cb { width: 38px; padding-right: 0; }
.thumb { width: 38px; height: 46px; object-fit: cover; border-radius: 4px; background: var(--soft); flex: none; }
.thumb.lg { width: 64px; height: 80px; }
.cell-title { font-weight: 600; }
.cell-sub { color: var(--muted); font-size: 12.5px; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty svg { width: 34px; height: 34px; color: var(--faint); margin-bottom: 8px; }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }

.bulkbar { position: sticky; bottom: 16px; margin-top: 14px; background: #121316; color: #fff; border-radius: 10px; padding: 10px 12px 10px 18px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; box-shadow: 0 10px 30px rgba(0,0,0,.25); z-index: 5; }
.bulkbar .btn.secondary { background: #1e1e1e; color: #fff; border-color: #333; }
.bulkbar .btn.secondary:hover { background: #2b2b2b; }
.bulkbar .btn { height: 32px; }

/* ---------- Drawer / Modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(10,10,10,.32); z-index: 40; animation: fade .12s ease-out; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100vw); background: var(--bg); z-index: 41; display: flex; flex-direction: column; box-shadow: -10px 0 40px rgba(0,0,0,.18); animation: slide .16s ease-out; }
.drawer-head { background: #fff; border-bottom: 1px solid var(--line); padding: 16px 20px; display: flex; align-items: flex-start; gap: 12px; }
.drawer-head h2 { margin: 0; font-size: 20px; letter-spacing: -.3px; font-weight: 600; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px 40px; display: flex; flex-direction: column; gap: 14px; }
.drawer-foot { background: #fff; border-top: 1px solid var(--line); padding: 12px 20px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.modal { position: fixed; left: 50%; top: 7vh; transform: translateX(-50%); width: min(720px, calc(100vw - 32px)); max-height: 86vh; background: #fff; border-radius: 12px; z-index: 51; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.25); animation: pop .14s ease-out; }
.modal.sm { width: min(460px, calc(100vw - 32px)); }
.modal-head { padding: 18px 22px 12px; display: flex; align-items: center; gap: 10px; }
.modal-head h2 { margin: 0; font-size: 18px; font-weight: 600; flex: 1; }
.modal-body { padding: 4px 22px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }
.overlay.top { z-index: 50; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(24px); opacity: .6; } }
@keyframes pop { from { transform: translateX(-50%) scale(.98); opacity: 0; } }

.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #121316; color: #fff; padding: 10px 16px; border-radius: 8px; font-weight: 500; box-shadow: 0 8px 30px rgba(0,0,0,.25); max-width: 560px; animation: pop2 .15s ease-out; }
.toast.error { background: var(--red); }
.toast.ok { background: #13573a; }
@keyframes pop2 { from { transform: translateY(8px); opacity: 0; } }

.spinner { width: 18px; height: 18px; border: 2px solid rgba(0,0,0,.15); border-top-color: #121316; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
.btn .spinner { border-color: rgba(255,255,255,.3); border-top-color: #fff; width: 15px; height: 15px; }
.btn.secondary .spinner { border-color: rgba(0,0,0,.15); border-top-color: #121316; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: grid; place-items: center; padding: 60px; }

/* ---------- Dashboard ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; text-decoration: none; display: block; transition: border-color .12s; }
a.kpi:hover { border-color: #b9b9b5; }
.kpi .label { font-size: 12.5px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.kpi .value { font-size: 32px; font-weight: 600; letter-spacing: -1px; margin-top: 6px; line-height: 1.05; }
.kpi .sub { font-size: 12.5px; color: var(--muted); margin-top: 6px; min-height: 18px; }
.kpi.dark { background: #121316; border-color: #121316; color: #fff; }
.kpi.dark .label, .kpi.dark .sub { color: #b0b0b0; }
.dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 10px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; min-width: 0; position: relative; }
.bars .bar i { display: block; border-radius: 3px 3px 0 0; }
.bars .bar .dhl { background: #121316; }
.bars .bar .ups { background: #a8a8a3; border-radius: 0; }
.bars .bar:hover::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: #121316; color: #fff; font-size: 11.5px; padding: 3px 7px; border-radius: 4px; white-space: nowrap; margin-bottom: 4px; }
.bar-labels { display: flex; gap: 6px; margin-top: 6px; }
.bar-labels span { flex: 1; text-align: center; font-size: 10.5px; color: var(--faint); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.hbar { display: grid; grid-template-columns: 110px 1fr 36px; gap: 10px; align-items: center; font-size: 13px; padding: 4px 0; }
.hbar div { height: 8px; background: var(--soft); border-radius: 99px; overflow: hidden; }
.hbar div i { display: block; height: 100%; background: #121316; border-radius: 99px; }
.feed { display: flex; flex-direction: column; }
.feed .ev { display: grid; grid-template-columns: 58px 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.feed .ev:first-child { border-top: 0; }
.feed .ev time { color: var(--faint); font-size: 12px; }
.feed .ev.error { color: var(--red); }
.feed .ev.warn { color: var(--amber); }
.status-list { display: flex; flex-direction: column; gap: 9px; font-size: 13.5px; }
.status-list .row { justify-content: space-between; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--faint); }
.dot.green { background: #22a164; }
.dot.amber { background: #e59e0b; }
.dot.red { background: #dc3b30; }

/* ---------- Detail ---------- */
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.items { display: flex; flex-direction: column; }
.item-row { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.item-row:first-child { border-top: 0; }
.item-row .qty { font-weight: 700; font-size: 15px; min-width: 34px; text-align: right; }
.order-group { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .4px; text-transform: uppercase; padding: 10px 0 2px; }
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline .ev { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 7px 0; font-size: 13px; border-top: 1px solid var(--line); }
.timeline .ev:first-child { border-top: 0; }
.timeline time { color: var(--muted); font-size: 12px; }
.addr { font-size: 14px; line-height: 1.55; }
.services { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }

/* ---------- Regeln ---------- */
.rule { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.rule:last-child { border-bottom: 0; }
.rule .pos { display: flex; flex-direction: column; gap: 2px; }
.rule .pos .iconbtn { width: 24px; height: 20px; }
.rule .name { font-weight: 600; }
.rule .sentence { color: var(--muted); font-size: 13px; margin-top: 3px; }
.rule .sentence b { color: var(--ink); font-weight: 600; }
.rule.off { opacity: .55; }
.cond-row { display: grid; grid-template-columns: 1.3fr 1fr 1.3fr 32px; gap: 8px; align-items: center; }
.act-row { display: grid; grid-template-columns: 1.1fr 1.2fr 1.2fr 32px; gap: 8px; align-items: center; }
.box { border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #fcfcfb; }
.box > .head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 600; }

/* ---------- Einstellungen ---------- */
.settings { display: grid; grid-template-columns: 210px 1fr; gap: 18px; align-items: start; }
.settings nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 20px; }
.settings nav button { text-align: left; background: none; border: 0; padding: 8px 12px; border-radius: 6px; cursor: pointer; font-weight: 500; color: var(--ink-2); }
.settings nav button:hover { background: var(--soft); }
.settings nav button.active { background: #121316; color: #fff; }
.settings .panel { display: flex; flex-direction: column; gap: 14px; }
.help { font-size: 13px; color: var(--muted); line-height: 1.55; }
.help code, .code { font-family: var(--mono); background: var(--soft); padding: 1px 5px; border-radius: 4px; font-size: 12px; color: var(--ink); }
pre.code { display: block; padding: 12px 14px; overflow-x: auto; white-space: pre; line-height: 1.5; }
.mail-preview { width: 100%; height: 640px; border: 1px solid var(--line); border-radius: 8px; background: #f5f5f5; }
.savebar { display: flex; justify-content: flex-end; gap: 8px; }
.pkg-row { display: grid; grid-template-columns: 1.4fr repeat(4, .7fr) 70px 32px; gap: 8px; align-items: center; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.login .art { background: #121316; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.login .art b { font-size: 28px; letter-spacing: 8px; font-weight: 700; }
.login .art span { display: block; font-size: 11px; letter-spacing: 4px; color: #9a9a9a; margin-top: 8px; }
.login .art p { color: #bdbdbd; max-width: 380px; line-height: 1.6; }
/* align-self: sonst zieht die Flex-Spalte das Monogramm auf volle Breite */
.login .art .mark { height: 88px; width: auto; align-self: flex-start; }
.login form { align-self: center; justify-self: center; width: min(360px, 90vw); display: flex; flex-direction: column; gap: 14px; }
.pass-wrap { position: relative; }
.pass-wrap .input { padding-right: 88px; }
.pass-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; font: inherit; font-size: 12px; color: var(--muted, #5e5f63); cursor: pointer; padding: 6px 8px; }
.login h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -.4px; font-weight: 600; }

/* ---------- Pack & Go ---------- */
.pack { display: flex; flex-direction: column; gap: 14px; }
.pack-top { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.scanbox { position: relative; flex: 1; min-width: 280px; }
.scanbox svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; color: var(--muted); }
.scanbox input { width: 100%; height: 58px; border: 2px solid #121316; border-radius: 10px; padding: 0 16px 0 52px; font-size: 20px; font-weight: 500; background: #fff; }
.scanbox input:focus { outline: none; box-shadow: 0 0 0 4px rgba(0,0,0,.08); }
.scanbox.flash-ok input { border-color: #22a164; box-shadow: 0 0 0 5px rgba(34,161,100,.2); }
.scanbox.flash-err input { border-color: #dc3b30; box-shadow: 0 0 0 5px rgba(220,59,48,.2); animation: shake .25s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line-2); border-radius: 8px; padding: 3px; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 6px; cursor: pointer; font-weight: 600; color: var(--muted); }
.seg button.active { background: #121316; color: #fff; }
.pack-stats { display: flex; gap: 18px; font-size: 13px; color: var(--muted); }
.pack-stats b { color: var(--ink); font-size: 16px; }
.pack-grid { display: grid; grid-template-columns: 1fr 380px; gap: 14px; align-items: start; }
.pack-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.pitem { background: #fff; border: 2px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; position: relative; transition: border-color .15s, transform .15s; }
.pitem img, .pitem .ph { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 6px; background: var(--soft); }
.pitem .t { font-weight: 600; font-size: 14px; line-height: 1.25; }
.pitem .size { font-size: 22px; font-weight: 700; letter-spacing: -.3px; }
.pitem .meta { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.pitem .prog { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pitem .prog b { font-size: 18px; }
.pitem.done { border-color: #22a164; }
.pitem.done::after { content: '✓'; position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; background: #22a164; color: #fff; display: grid; place-items: center; font-size: 22px; font-weight: 700; box-shadow: 0 4px 14px rgba(34,161,100,.4); }
.pitem.pulse { transform: scale(1.03); border-color: #22a164; }
.pitem .order-tag { position: absolute; top: 14px; left: 14px; background: rgba(10,10,10,.85); color: #fff; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 99px; }
.pack-side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 16px; }
.pkg-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pkg-buttons button { border: 1px solid var(--line-2); background: #fff; border-radius: 7px; padding: 8px 10px; text-align: left; cursor: pointer; font-size: 13px; }
.pkg-buttons button kbd { float: right; color: var(--faint); font-family: var(--mono); font-size: 11px; }
.pkg-buttons button.active { border-color: #121316; background: #121316; color: #fff; }
.progress { height: 8px; background: var(--soft); border-radius: 99px; overflow: hidden; }
.progress i { display: block; height: 100%; background: #121316; transition: width .2s; }
.progress.done i { background: #22a164; }
.pack-idle { background: #fff; border: 1px dashed var(--line-2); border-radius: 12px; padding: 56px 24px; text-align: center; }
.pack-idle svg { width: 58px; height: 58px; color: var(--ink); }
.pack-idle h2 { font-size: 22px; margin: 12px 0 6px; font-weight: 600; letter-spacing: -.3px; }
.pack-done { background: #0f5132; color: #fff; border-radius: 12px; padding: 26px 26px; display: flex; gap: 18px; align-items: center; }
.pack-done .big { font-size: 42px; width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,.15); display: grid; place-items: center; flex: none; }
.pack-done h2 { margin: 0 0 4px; font-size: 22px; }
.pack-msg { font-weight: 600; min-height: 22px; }
.pack-msg.ok { color: var(--green); }
.pack-msg.err { color: var(--red); }
kbd { font-family: var(--mono); font-size: 11px; background: var(--soft); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .dash-grid, .pack-grid { grid-template-columns: 1fr; }
  .pack-side { position: static; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { min-width: 0; }
  .side { position: static; height: auto; }
  .brand { padding: 16px 16px 8px; }
  .nav { flex-direction: row; overflow-x: auto; padding: 4px 10px 10px; }
  .nav a { white-space: nowrap; }
  .side-foot { display: none; }
  .main { padding: 18px 16px 60px; }
  .settings { grid-template-columns: 1fr; }
  .settings nav { flex-direction: row; overflow-x: auto; position: static; }
  .settings nav button { white-space: nowrap; }
  .grid2, .grid3, .services { grid-template-columns: 1fr; }
  .search .input { width: 100%; }
  .login { grid-template-columns: 1fr; }
  .login .art { padding: 28px; min-height: 180px; }
  .login .art .mark { height: 56px; margin-bottom: 18px; }
  .cond-row, .act-row, .pkg-row { grid-template-columns: 1fr; }
}
@media print { .side, .bulkbar { display: none; } }
