:root {
  --ink: #17201e;
  --muted: #6f7b77;
  --line: #e5e9e7;
  --panel: #ffffff;
  --canvas: #f4f6f4;
  --nav: #17201e;
  --nav-soft: #25302d;
  --green: #2f6b57;
  --green-2: #dcebe5;
  --lime: #d9ec75;
  --amber: #e79032;
  --amber-soft: #fff1db;
  --red: #cf5a4b;
  --red-soft: #feeae7;
  --blue: #5377c7;
  --blue-soft: #e9effc;
  --shadow: 0 12px 36px rgba(26, 39, 34, 0.07);
  --radius: 18px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "DM Sans", "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button { cursor: pointer; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 236px minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 236px; height: 100vh; height: 100dvh; padding: 24px 16px; background: var(--nav); color: #eef2ef; display: flex; flex-direction: column; overflow: hidden; z-index: 20; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 24px; }
.brand-mark { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--lime); color: var(--nav); font-weight: 800; }
.brand strong { display: block; font-size: 16px; letter-spacing: -.3px; }
.brand small { color: #87958f; font-size: 11px; }
.sidebar nav { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #52605b transparent; padding-right: 4px; }
.sidebar nav::-webkit-scrollbar { width: 5px; }
.sidebar nav::-webkit-scrollbar-track { background: transparent; }
.sidebar nav::-webkit-scrollbar-thumb { background: #52605b; border-radius: 999px; }
.nav-caption { padding: 13px 12px 7px; color: #6f7e78; font-size: 10px; font-weight: 700; letter-spacing: .13em; }
.nav-item { width: 100%; border: 0; background: transparent; color: #aeb8b4; display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 11px; margin: 2px 0; text-align: left; font-size: 13px; transition: .2s ease; }
.nav-item:hover { color: #fff; background: #202b28; }
.nav-item.active { color: #17201e; background: var(--lime); font-weight: 700; }
.nav-icon { width: 19px; height: 19px; display: inline-grid; place-items: center; font-size: 16px; }
.nav-badge { margin-left: auto; min-width: 20px; padding: 2px 6px; border-radius: 999px; background: #35413d; color: #d6deda; text-align: center; font-size: 10px; }
.nav-item.active .nav-badge { background: rgba(23,32,30,.12); color: var(--ink); }
.sidebar-foot { flex: 0 0 auto; padding: 14px 10px 2px; border-top: 1px solid #2d3834; }
.warehouse-mini { font-size: 12px; line-height: 1.45; }
.warehouse-mini span { color: #82908a; font-size: 10px; }
.online { display: inline-block; width: 7px; height: 7px; background: #79d7a7; border-radius: 50%; margin-right: 6px; box-shadow: 0 0 0 4px rgba(121,215,167,.1); }

.main { grid-column: 2; min-width: 0; }
.topbar { height: 74px; padding: 0 32px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 18px; background: rgba(244,246,244,.88); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 15; }
.mobile-menu { display: none; }
.search { flex: 1; max-width: 490px; position: relative; }
.search input { width: 100%; height: 40px; padding: 0 16px 0 39px; border: 1px solid var(--line); border-radius: 12px; background: #fff; outline: none; transition: .2s; }
.search input:focus { border-color: #9caf9f; box-shadow: 0 0 0 3px rgba(47,107,87,.08); }
.search::before { content: "⌕"; position: absolute; left: 14px; top: 7px; color: #82908a; font-size: 22px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.select-control { height: 39px; border: 1px solid var(--line); border-radius: 11px; padding: 0 31px 0 12px; color: var(--ink); background: #fff; }
.icon-btn { width: 39px; height: 39px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); }
.avatar { width: 39px; height: 39px; border-radius: 12px; display: grid; place-items: center; background: var(--green); color: #fff; font-weight: 700; font-size: 12px; }

.content { padding: 28px 32px 48px; max-width: 1580px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.eyebrow { margin: 0 0 5px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 0; font-size: 27px; line-height: 1.2; letter-spacing: -.8px; }
.page-sub { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.head-actions { display: flex; gap: 9px; }
.btn { border: 1px solid var(--line); border-radius: 11px; min-height: 39px; padding: 0 15px; color: var(--ink); background: #fff; font-weight: 600; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.btn:hover { border-color: #b8c4bf; }
.btn.primary { border-color: var(--green); color: #fff; background: var(--green); }
.btn.primary:hover { background: #275a4a; }
.btn.dark { border-color: var(--ink); color: #fff; background: var(--ink); }
.btn.danger { border-color: #efc6c0; color: var(--red); background: #fff; }
.btn.small { min-height: 32px; padding: 0 11px; font-size: 11px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.grid { display: grid; gap: 16px; }
.kpi-grid { grid-template-columns: repeat(4, 1fr); margin-bottom: 16px; }
.kpi { padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 4px 20px rgba(28,42,36,.03); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; }
.kpi-icon { width: 33px; height: 33px; border-radius: 10px; display: grid; place-items: center; background: var(--green-2); color: var(--green); }
.kpi-value { margin-top: 15px; font-size: 27px; font-weight: 700; letter-spacing: -.6px; }
.kpi-foot { margin-top: 7px; color: var(--muted); font-size: 11px; }
.delta { color: var(--green); font-weight: 700; }
.delta.warn { color: var(--amber); }

.dash-grid { grid-template-columns: minmax(0, 1.55fr) minmax(300px, .85fr); align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 5px 24px rgba(28,42,36,.035); overflow: hidden; }
.panel-head { padding: 18px 20px 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #edf0ee; }
.panel-title { font-size: 14px; font-weight: 700; }
.panel-sub { margin-top: 3px; color: var(--muted); font-size: 10px; }
.panel-body { padding: 18px 20px; }

.flow-board { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.flow-card { padding: 13px 10px; min-height: 94px; border: 1px solid var(--line); border-radius: 13px; background: #fbfcfb; position: relative; }
.flow-card:not(:last-child)::after { content: "›"; position: absolute; right: -8px; top: 34px; z-index: 2; width: 15px; height: 22px; display: grid; place-items: center; color: #aeb8b4; background: #fff; }
.flow-label { color: var(--muted); font-size: 10px; }
.flow-num { margin-top: 10px; font-size: 22px; font-weight: 700; }
.flow-time { margin-top: 4px; color: #93a09b; font-size: 9px; }

.chart-wrap { height: 214px; display: flex; align-items: end; gap: 14px; padding: 18px 6px 3px; border-bottom: 1px solid var(--line); }
.bar-col { flex: 1; height: 100%; display: flex; align-items: center; justify-content: end; flex-direction: column; gap: 8px; }
.bar { width: min(34px, 70%); min-height: 3px; border-radius: 7px 7px 2px 2px; background: var(--green); transition: .3s; }
.bar.today { background: var(--lime); }
.bar-value { font-size: 9px; color: var(--muted); }
.bar-label { font-size: 9px; color: #8c9893; }
.legend-row { padding-top: 13px; color: var(--muted); font-size: 10px; display: flex; justify-content: space-between; }

.alert-list { display: grid; gap: 10px; }
.alert-row { padding: 12px; display: grid; grid-template-columns: 34px 1fr auto; gap: 11px; align-items: center; background: #f8faf8; border-radius: 12px; }
.alert-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--amber-soft); color: var(--amber); }
.alert-row.red .alert-icon { background: var(--red-soft); color: var(--red); }
.alert-main strong { display: block; font-size: 11px; }
.alert-main span { color: var(--muted); font-size: 9px; }
.alert-count { font-size: 16px; font-weight: 700; }

.recent { margin-top: 16px; }
.table-tools { padding: 14px 18px; display: flex; gap: 9px; align-items: center; border-bottom: 1px solid var(--line); background: #fbfcfb; }
.filter-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.filter-tab { padding: 7px 11px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font-size: 11px; }
.filter-tab.active { background: var(--ink); color: #fff; }
.table-search { margin-left: auto; width: 210px; height: 33px; border: 1px solid var(--line); border-radius: 9px; padding: 0 11px; outline: none; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 820px; }
th { padding: 11px 15px; text-align: left; color: #84908b; background: #fbfcfb; border-bottom: 1px solid var(--line); font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
td { padding: 13px 15px; border-bottom: 1px solid #edf0ee; font-size: 11px; vertical-align: middle; }
tbody tr:hover { background: #fafcfa; }
tbody tr:last-child td { border-bottom: 0; }
.order-ref { font-weight: 700; font-size: 11px; }
.order-sub { color: var(--muted); font-size: 9px; margin-top: 3px; }
.sku-stack { display: flex; align-items: center; gap: 7px; }
.sku-thumb { width: 29px; height: 29px; border-radius: 8px; display: grid; place-items: center; background: #e9eeeb; color: #65716c; font-size: 9px; font-weight: 700; }
.status { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 5px 8px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status.pending { color: #a56518; background: var(--amber-soft); }
.status.progress { color: var(--blue); background: var(--blue-soft); }
.status.success { color: var(--green); background: var(--green-2); }
.status.danger { color: var(--red); background: var(--red-soft); }
.status.neutral { color: #65716c; background: #e9eeeb; }
.link-btn { border: 0; padding: 0; background: transparent; color: var(--green); font-size: 11px; font-weight: 700; }

.module-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.store-grid { grid-template-columns: repeat(3, 1fr); margin-bottom: 16px; }
.channel-ribbon { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.channel-pill { min-width: 132px; padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--line); border-radius: 11px; background: #fff; font-size: 10px; font-weight: 700; }
.channel-pill b { color: var(--muted); font-size: 8px; }
.channel-pill.connected { border-color: #bcd7cc; background: var(--green-2); color: var(--green); }
.channel-pill.connected b { color: var(--green); }
.platform-mark { min-width: 35px; height: 35px; padding: 0 8px; border-radius: 10px; display: grid; place-items: center; background: var(--ink); color: var(--lime); font-size: 9px; font-weight: 800; }
.summary-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 15px; overflow: hidden; margin-bottom: 16px; }
.summary-item { padding: 16px 18px; background: #fff; }
.summary-item span { color: var(--muted); font-size: 10px; }
.summary-item strong { display: block; margin-top: 5px; font-size: 20px; }
.inventory-num { font-variant-numeric: tabular-nums; }
.stock-bar { width: 92px; height: 5px; border-radius: 5px; background: #edf0ee; overflow: hidden; margin-top: 5px; }
.stock-bar > i { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.stock-bar.low > i { background: var(--red); }
.warehouse-switch { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin-bottom: 16px; }
.warehouse-card { padding: 14px 15px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); text-align: left; }
.warehouse-card:hover { border-color: #aebdb7; }
.warehouse-card.active { border-color: var(--green); background: var(--green-2); box-shadow: inset 0 0 0 1px var(--green); }
.warehouse-card span, .warehouse-card strong, .warehouse-card small { display: block; }
.warehouse-card span { color: var(--green); font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.warehouse-card strong { margin-top: 5px; font-size: 13px; }
.warehouse-card small { margin-top: 5px; color: var(--muted); font-size: 9px; }
.warehouse-name { color: var(--green); font-weight: 700; }
.route-arrow { margin-top: 5px; color: var(--green); font-size: 10px; font-weight: 700; }
.inline-actions { display: flex; gap: 6px; flex-wrap: wrap; min-width: 110px; }
.storage-engine { margin-bottom: 16px; }
.storage-summary { display: grid; grid-template-columns: repeat(4,1fr); border-bottom: 1px solid var(--line); }
.storage-summary > div { padding: 17px 20px; border-right: 1px solid var(--line); }
.storage-summary > div:last-child { border-right: 0; }
.storage-summary span, .storage-summary strong { display: block; }
.storage-summary span { color: var(--muted); font-size: 9px; }
.storage-summary strong { margin-top: 6px; font-size: 17px; }
.rate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; background: #fbfcfb; }
.rate-card { padding: 13px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.rate-card span, .rate-card strong, .rate-card small { display: block; }
.rate-card span { color: var(--green); font-size: 9px; font-weight: 700; }
.rate-card strong { margin-top: 4px; font-size: 12px; }
.rate-card small { margin-top: 4px; color: var(--muted); font-size: 8px; }

.task-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.task-col { min-height: 410px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #f8faf8; }
.task-col-head { display: flex; align-items: center; justify-content: space-between; padding: 3px 2px 12px; font-size: 11px; font-weight: 700; }
.task-col-head span { min-width: 21px; padding: 3px 6px; border-radius: 999px; background: #e4eae6; text-align: center; font-size: 9px; }
.task-card { padding: 13px; margin-bottom: 9px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 3px 12px rgba(35,48,43,.04); }
.task-card strong { display: block; font-size: 11px; }
.task-meta { display: flex; justify-content: space-between; margin-top: 9px; color: var(--muted); font-size: 9px; }
.task-skus { margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--line); color: #52605b; font-size: 9px; line-height: 1.6; }

.empty { padding: 50px 20px; text-align: center; color: var(--muted); }
.empty-icon { width: 50px; height: 50px; margin: 0 auto 12px; border-radius: 16px; display: grid; place-items: center; background: #edf1ee; font-size: 22px; }
.empty strong { display: block; color: var(--ink); margin-bottom: 5px; }

.drawer-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(15,23,20,.35); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: .2s; }
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 51; width: min(640px, 94vw); background: #fff; box-shadow: -20px 0 60px rgba(12,22,18,.18); transform: translateX(105%); transition: .28s ease; display: flex; flex-direction: column; }
.drawer.open { transform: translateX(0); }
.drawer-head { padding: 22px 24px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: start; justify-content: space-between; }
.drawer-head h2 { margin: 3px 0 0; font-size: 19px; letter-spacing: -.4px; }
.drawer-close { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 24px 100px; }
.drawer-actions { position: absolute; left: 0; right: 0; bottom: 0; padding: 15px 24px; display: flex; justify-content: flex-end; gap: 8px; background: rgba(255,255,255,.94); border-top: 1px solid var(--line); backdrop-filter: blur(8px); }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.detail-cell { padding: 13px 15px; border-bottom: 1px solid var(--line); }
.detail-cell:nth-child(odd) { border-right: 1px solid var(--line); }
.detail-cell span { display: block; color: var(--muted); font-size: 9px; margin-bottom: 4px; }
.detail-cell strong { font-size: 11px; }
.detail-section { margin-top: 22px; }
.detail-section h3 { margin: 0 0 12px; font-size: 12px; }
.timeline { position: relative; padding-left: 21px; }
.timeline::before { content: ""; position: absolute; top: 7px; bottom: 7px; left: 6px; width: 1px; background: #dce3df; }
.timeline-item { position: relative; padding: 0 0 17px 13px; }
.timeline-item::before { content: ""; position: absolute; left: -19px; top: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-2); }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-title { font-size: 11px; font-weight: 700; }
.timeline-desc { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.timeline-time { color: #9aa49f; font-size: 8px; margin-top: 3px; }
.fee-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 10px; }
.fee-row.total { border: 0; padding-top: 13px; font-size: 12px; font-weight: 700; }

.inbound-item { display: grid; grid-template-columns: 1fr auto; gap: 9px 16px; align-items: center; padding: 13px 14px; margin-bottom: 9px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfb; }
.inbound-item strong, .inbound-item span { display: block; }
.inbound-item span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.inbound-item > .order-sub { grid-column: 1 / -1; margin-top: 0; }
.quality-numbers { display: grid; grid-template-columns: auto auto auto auto; align-items: baseline; gap: 4px 7px; }
.quality-numbers b { color: var(--green); font-size: 15px; }
.quality-numbers span { margin: 0; }
.danger-text { color: var(--red) !important; }
.linked-strip { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 14px; border-radius: 12px; background: var(--green-2); font-size: 10px; }
.linked-strip span { color: var(--muted); }
.form-note { margin-top: 14px; padding: 12px; border-radius: 10px; background: var(--green-2); color: #365c4e; font-size: 10px; line-height: 1.6; }
.quality-form-head { margin-bottom: 10px; color: var(--muted); font-size: 10px; }
.quality-form-row { display: grid; grid-template-columns: minmax(130px,1fr) 100px 100px; align-items: end; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.quality-form-row > div:first-child { align-self: center; }
.quality-form-row b, .quality-form-row span { display: block; font-size: 10px; }
.quality-form-row span { margin-top: 4px; color: var(--muted); font-size: 9px; }

.scan-hero { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 24px; margin-bottom: 16px; border-radius: 18px; background: var(--ink); color: #fff; }
.scan-label { display: block; margin-bottom: 8px; color: #aeb8b4; font-size: 10px; font-weight: 700; letter-spacing: .06em; }
.scan-input-row { display: flex; max-width: 660px; gap: 9px; }
.scan-input-row input { flex: 1; height: 50px; padding: 0 16px; border: 2px solid transparent; border-radius: 12px; outline: none; font-size: 15px; }
.scan-input-row input:focus { border-color: var(--lime); }
.scan-input-row .btn { min-height: 50px; border-color: var(--lime); background: var(--lime); color: var(--ink); }
.scan-hero p { margin: 9px 0 0; color: #8f9b96; font-size: 9px; }
.scan-count { min-width: 118px; padding-left: 24px; border-left: 1px solid #34403c; text-align: center; }
.scan-count strong, .scan-count span { display: block; }
.scan-count strong { color: var(--lime); font-size: 34px; }
.scan-count span { color: #9ca8a3; font-size: 9px; }
.pda-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.pda-list { padding: 12px; display: grid; gap: 10px; }
.pda-card { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfb; }
.pda-action { grid-column: 1 / -1; min-height: 50px; padding: 0 16px; border: 0; border-radius: 12px; display: flex; justify-content: space-between; align-items: center; background: var(--green); color: #fff; font-weight: 700; text-align: left; }
.pda-action b { font-size: 20px; }

.toast-wrap { position: fixed; right: 24px; top: 90px; z-index: 80; display: grid; gap: 9px; }
.toast { min-width: 280px; max-width: 370px; padding: 13px 15px; border-radius: 12px; color: #fff; background: var(--ink); box-shadow: var(--shadow); animation: toast-in .25s ease; font-size: 11px; }
.toast strong { display: block; margin-bottom: 2px; }
.toast span { color: #bec8c4; font-size: 9px; }
@keyframes toast-in { from { transform: translateY(-8px); opacity: 0; } }

.employee-identity { display: grid; text-align: right; white-space: nowrap; }
.employee-identity strong { font-size: 11px; }
.employee-identity span { margin-top: 2px; color: var(--muted); font-size: 8px; }

.login-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 1.05fr) minmax(420px, .95fr); background: #f6f8f5; }
.login-brand { position: relative; overflow: hidden; padding: clamp(46px,7vw,100px); display: flex; flex-direction: column; justify-content: center; color: #fff; background: radial-gradient(circle at 72% 22%, rgba(220,239,124,.2), transparent 30%), linear-gradient(145deg,#111b18,#243b32); }
.login-brand::after { content:""; position:absolute; width:440px; height:440px; right:-170px; bottom:-190px; border:1px solid rgba(220,239,124,.22); border-radius:50%; box-shadow:0 0 0 70px rgba(220,239,124,.035),0 0 0 140px rgba(220,239,124,.025); }
.login-mark { width:48px; height:48px; display:grid; place-items:center; border-radius:14px; color:#18211e; background:var(--lime); font-size:20px; font-weight:800; }
.login-brand p { margin:32px 0 12px; color:var(--lime); font-size:10px; font-weight:700; letter-spacing:.16em; }
.login-brand h1 { max-width:620px; margin:0; font-size:clamp(38px,5vw,72px); line-height:1.08; letter-spacing:-.05em; }
.login-brand > span { max-width:500px; margin-top:28px; color:#aebbb6; font-size:13px; line-height:1.8; }
.login-panel { padding:40px; display:grid; place-items:center; }
.login-card { width:min(390px,100%); padding:38px; border:1px solid var(--line); border-radius:24px; background:#fff; box-shadow:0 28px 80px rgba(24,34,30,.1); }
.login-logo { margin-bottom:36px; color:var(--ink); }
.login-card h2 { margin:0 0 8px; font-size:25px; }
.login-card > p { margin:0 0 25px; color:var(--muted); font-size:11px; }
.login-card label { display:grid; gap:7px; margin-top:15px; color:#4d5b56; font-size:10px; font-weight:700; }
.login-card input { height:46px; padding:0 13px; border:1px solid var(--line); border-radius:11px; outline:none; font-size:13px; }
.login-card input:focus { border-color:var(--green); box-shadow:0 0 0 3px rgba(29,92,69,.08); }
.login-submit { width:100%; min-height:47px; margin-top:22px; }
.login-error { padding:11px 12px; border-radius:10px; color:#8b342d; background:#fff0ed; font-size:10px; }
.login-security { margin-top:18px; color:#8b9893; font-size:8px; line-height:1.6; text-align:center; }

.modal-backdrop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(15,23,20,.42); }
.modal { width: min(540px, 96vw); max-height: calc(100vh - 32px); overflow-y: auto; background: #fff; border-radius: 18px; box-shadow: 0 30px 80px rgba(15,23,20,.28); }
.modal-head { padding: 20px 22px 15px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal-head h3 { margin: 0; font-size: 15px; }
.modal-body { padding: 18px 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 10px; color: var(--muted); font-weight: 600; }
.field input, .field select { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0 11px; outline: none; }
.field input:focus, .field select:focus { border-color: var(--green); }
.modal-foot { padding: 14px 22px 20px; display: flex; justify-content: flex-end; gap: 8px; }

.rule-list { display: grid; gap: 11px; }
.rule { padding: 14px; display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 13px; }
.rule-num { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: var(--green-2); color: var(--green); font-size: 12px; font-weight: 800; }
.rule strong { display: block; font-size: 11px; }
.rule p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.rule-state { color: var(--green); font-size: 9px; font-weight: 700; }

@media (max-width: 1120px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .flow-board { grid-template-columns: repeat(3, 1fr); }
  .flow-card:nth-child(3)::after { display: none; }
  .task-board { grid-template-columns: repeat(2, 1fr); }
  .store-grid { grid-template-columns: repeat(2, 1fr); }
  .warehouse-switch { grid-template-columns: 1fr 1fr; }
  .storage-summary { grid-template-columns: repeat(2,1fr); }
  .storage-summary > div:nth-child(2) { border-right: 0; }
  .pda-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .login-screen { grid-template-columns:1fr; }
  .login-brand { display:none; }
  .login-panel { padding:20px; }
  .login-card { padding:27px 22px; }
  .shell { display: block; }
  .sidebar { transform: translateX(-105%); transition: .25s; }
  .sidebar.open { transform: translateX(0); }
  .main { width: 100%; }
  .mobile-menu { display: block; }
  .topbar { padding: 0 15px; }
  .top-actions .select-control { display: none; }
  .employee-identity { display:none; }
  .content { padding: 22px 15px 40px; }
  .page-head { align-items: start; flex-direction: column; }
  .kpi-grid, .summary-strip { grid-template-columns: repeat(2, 1fr); }
  .flow-board { grid-template-columns: repeat(2, 1fr); }
  .flow-card:nth-child(2n)::after { display: none; }
  .task-board { grid-template-columns: 1fr; }
  .store-grid { grid-template-columns: 1fr; }
  .warehouse-switch { grid-template-columns: 1fr; }
  .rate-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .scan-hero { grid-template-columns: 1fr; }
  .scan-count { display: none; }
  .scan-input-row { flex-direction: column; }
  .quality-form-row { grid-template-columns: 1fr 1fr; }
  .quality-form-row > div:first-child { grid-column: 1 / -1; }
}
