:root {
  --bg: #f9fafb;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --surface: #ffffff;
  --soft: #f3f4f6;
  --accent: #386641;
  --accent-dark: #204e2b;
  --accent-soft: #eef7ef;
  --danger: #dc2626;
  --warning: #b45309;
  --blue: #2563eb;
  --shadow: rgba(17, 24, 39, 0.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 34rem), var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: geometricPrecision;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  opacity: 0.08;
  background-image: linear-gradient(rgba(17,24,39,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(17,24,39,.035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, black, transparent 56%);
}
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { transition: background-color 220ms cubic-bezier(.16,1,.3,1), border-color 220ms cubic-bezier(.16,1,.3,1), color 220ms cubic-bezier(.16,1,.3,1), box-shadow 220ms cubic-bezier(.16,1,.3,1), transform 220ms cubic-bezier(.16,1,.3,1); }
button:active { transform: translateY(1px) scale(.99); }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.app-shell { min-height: 100vh; padding-bottom: 40px; }
.container { max-width: 1440px; margin: 0 auto; padding: 24px 16px; }
.soft-enter { animation: soft-enter 520ms cubic-bezier(.16,1,.3,1) both; }
@keyframes soft-enter { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.header { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.92); box-shadow: 0 1px 2px rgba(17,24,39,.04); backdrop-filter: blur(18px); }
.header-inner { max-width: 1440px; min-height: 70px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; }
.logo { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--accent); color: white; font-weight: 900; box-shadow: 0 8px 18px rgba(56,102,65,.18); }
.brand-title { font-size: 15px; font-weight: 900; letter-spacing: .18em; }
.brand-subtitle { margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 600; }
.nav { display: flex; align-items: center; gap: 10px; }
.nav-btn, .pill-btn { min-height: 38px; border: 1px solid var(--line); border-radius: 999px; background: white; padding: 8px 14px; color: #4b5563; cursor: pointer; font-size: 12px; font-weight: 800; }
.nav-btn.active, .pill-btn.active { border-color: rgba(56,102,65,.2); background: var(--accent-soft); color: var(--accent-dark); }
.nav-note { border: 1px solid var(--line); border-radius: 999px; background: #f9fafb; padding: 8px 12px; color: var(--muted); font-size: 12px; font-weight: 700; }
.mobile-nav { display: none; max-width: 1440px; margin: 0 auto; gap: 8px; overflow-x: auto; padding: 0 16px 12px; }
.btn { min-height: 44px; border: 1px solid var(--line); border-radius: 12px; background: white; padding: 10px 16px; color: #374151; cursor: pointer; font-weight: 850; }
.btn:hover { border-color: #9ca3af; background: #f9fafb; }
.btn.success { border-color: var(--accent); background: var(--accent); color: white; box-shadow: 0 8px 18px rgba(56,102,65,.18); }
.btn.success:hover { background: var(--accent-dark); }
.btn.danger { border-color: #fecaca; color: #b91c1c; }
.btn.danger:hover { background: #fef2f2; border-color: #fca5a5; }
.btn.warning { border-color: #fde68a; color: #92400e; }
.btn.warning:hover { background: #fffbeb; }
.btn.small { min-height: 32px; border-radius: 9px; padding: 6px 10px; font-size: 11px; }
.btn:disabled { cursor: not-allowed; opacity: .55; }
.hero { position: relative; overflow: hidden; border: 1px solid rgba(255,255,255,.65); border-radius: 34px; background: #10291e; color: white; padding: 28px 32px; box-shadow: 0 28px 80px rgba(24,54,39,.22); }
.hero::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 110px; background: radial-gradient(circle at 20% 0%, rgba(191,228,201,.24), transparent 24rem); pointer-events: none; }
.hero-content { position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 24px; align-items: end; }
.eyebrow { display: inline-flex; border: 1px solid rgba(255,255,255,.12); border-radius: 999px; background: rgba(255,255,255,.08); padding: 7px 12px; color: #d8f3df; font-size: 11px; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
.hero h1 { max-width: 780px; margin: 12px 0 0; font-size: clamp(30px, 4vw, 52px); line-height: 1.02; letter-spacing: -.055em; }
.hero p { max-width: 700px; margin: 14px 0 0; color: rgba(255,255,255,.65); font-weight: 600; line-height: 1.6; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 96px); gap: 8px; text-align: right; }
.hero-stat { border: 1px solid rgba(255,255,255,.1); border-radius: 18px; background: rgba(255,255,255,.08); padding: 12px; backdrop-filter: blur(10px); }
.hero-stat strong { display: block; font-size: 24px; font-weight: 950; }
.hero-stat span { display: block; margin-top: 4px; color: rgba(255,255,255,.48); font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.hero-stat.highlight { border-color: rgba(191,228,201,.25); background: rgba(191,228,201,.12); }
.notice { margin: 18px 0; border: 1px solid var(--line); border-radius: 14px; background: white; padding: 12px 16px; color: var(--muted); box-shadow: 0 1px 2px rgba(17,24,39,.04); font-size: 13px; font-weight: 700; }
.notice.success { border-color: rgba(56,102,65,.2); background: var(--accent-soft); color: var(--accent-dark); }
.notice.error { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.sync-panel { margin: 18px 0; border-radius: 16px; border: 1px solid var(--line); background: white; padding: 12px 16px; font-weight: 800; }
.sync-panel.syncing { border-color: #bfdbfe; background: #eff6ff; color: #1d4ed8; }
.sync-panel.synced { border-color: #bfe4c9; background: var(--accent-soft); color: var(--accent-dark); }
.sync-panel.failed { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.layout-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(390px,.85fr); gap: 20px; align-items: start; }
.stack { display: grid; gap: 20px; }
.sticky-col { position: sticky; top: 96px; }
.card, .surface-card { position: relative; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); padding: 20px; box-shadow: 0 10px 24px var(--shadow); }
.card-title { margin: 0 0 18px; font-size: 18px; font-weight: 950; letter-spacing: -.035em; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-heading .card-title { margin-bottom: 4px; }
.section-heading p { margin: 0; max-width: 640px; color: var(--muted); font-size: 13px; font-weight: 700; line-height: 1.55; }
.schema-badge { display: inline-flex; white-space: nowrap; border: 1px solid rgba(56,102,65,.18); border-radius: 999px; background: var(--accent-soft); padding: 7px 10px; color: var(--accent-dark); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 11px; font-weight: 900; }
.section-help { margin: 0 0 16px; border: 1px solid #e2e8e1; border-radius: 16px; background: #f4f7f2; padding: 14px; }
.section-help strong { display: block; color: #65716b; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.section-help p { margin: 4px 0 0; color: #65716b; font-size: 13px; font-weight: 600; line-height: 1.55; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.form-grid.four { grid-template-columns: repeat(4, minmax(0,1fr)); }
.span-2 { grid-column: span 2; }
.field { display: block; position: relative; }
.field-label { display: block; margin-bottom: 8px; color: #506158; font-size: 11px; font-weight: 900; letter-spacing: .075em; text-transform: uppercase; }
.input, .select, .textarea { width: 100%; min-height: 44px; border: 1px solid #d1d5db; border-radius: 12px; background: white; padding: 10px 14px; color: var(--ink); outline: none; font-size: 15px; font-weight: 650; }
.textarea { min-height: 86px; resize: vertical; }
.input:hover, .select:hover, .textarea:hover { border-color: #9ca3af; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(56,102,65,.1); }
.readonly { background: #f9fafb; color: #374151; font-weight: 800; }
.suggestions { position: absolute; z-index: 60; left: 0; right: 0; top: 76px; overflow: hidden; border: 1px solid #dfe7de; border-radius: 18px; background: white; box-shadow: 0 22px 60px rgba(32,56,45,.16); }
.suggestions-head { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid #edf1ec; background: #fbfdf9; padding: 8px 12px; color: #65716b; font-size: 12px; font-weight: 900; }
.suggestion-list { max-height: 320px; overflow-y: auto; padding: 8px; }
.suggestion-item { width: 100%; border: 0; border-radius: 13px; background: transparent; padding: 10px 12px; cursor: pointer; text-align: left; }
.suggestion-item:hover { background: #f6f8f3; }
.suggestion-item strong { display: block; color: #1f2f27; font-weight: 950; }
.suggestion-item span { display: block; margin-top: 3px; color: #65716b; font-size: 12px; font-weight: 700; }
.inline-match { border: 1px solid #bfe4c9; border-radius: 16px; background: var(--accent-soft); padding: 12px 14px; color: #235f41; cursor: pointer; text-align: left; font-size: 13px; font-weight: 850; }
.nhanh-meta { margin-top: -8px; border-radius: 18px; background: #f6f8f3; padding: 12px 16px; color: #65716b; font-size: 12px; font-weight: 750; line-height: 1.8; }
.nhanh-meta strong { color: #104d35; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-weight: 950; }
.block-good { display: block; color: #235f41; font-weight: 900; }
.address-palette { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.address-chip { border: 1px solid #e2e8e1; border-radius: 14px; background: #fbfdf9; padding: 10px 12px; cursor: pointer; text-align: left; }
.address-chip:hover, .address-chip.active { border-color: rgba(56,102,65,.28); background: var(--accent-soft); }
.address-chip strong { display: block; color: #1f2f27; font-size: 13px; font-weight: 950; }
.address-chip span { display: block; margin-top: 3px; color: #65716b; font-size: 11px; font-weight: 750; line-height: 1.4; }
.meta-panel { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; border: 1px solid #dfe7de; border-radius: 18px; background: linear-gradient(135deg, #fbfdf9, #eef7ef); padding: 10px; }
.meta-panel div { min-width: 0; border-radius: 12px; background: rgba(255,255,255,.76); padding: 9px; }
.meta-panel span { display: block; color: #65716b; font-size: 9px; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.meta-panel strong { display: block; margin-top: 4px; overflow: hidden; color: #104d35; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 11px; font-weight: 950; text-overflow: ellipsis; white-space: nowrap; }
.warehouse-box { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; border: 1px solid #d8dfd8; border-radius: 16px; background: #fbfdf9; padding: 14px; }
.warehouse-box strong { display: block; font-size: 15px; }
.warehouse-box span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 700; }
.product-ledger { overflow: visible; }
.product-control-grid { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(180px,.6fr) minmax(180px,.6fr); gap: 14px; align-items: end; }
.check-tile { min-height: 44px; display: flex; align-items: center; gap: 9px; border: 1px solid #dfe7de; border-radius: 14px; background: #fbfdf9; padding: 10px 12px; color: #405047; font-size: 13px; font-weight: 850; }
.check-tile input { width: 16px; height: 16px; accent-color: var(--accent); }
.warehouse-rich { margin-top: 14px; background: linear-gradient(135deg, #fbfdf9, #eef7ef); }
.warehouse-codes { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.warehouse-codes span { border-radius: 999px; background: white; padding: 6px 9px; color: #104d35; font-size: 11px; font-weight: 950; }
.product-search { position: relative; }
.command-search { margin-top: 18px; }
.product-suggestions .suggestion-list { max-height: 390px; }
.product-suggestion { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 12px; align-items: center; }
.product-suggestion em { justify-self: end; border-radius: 999px; background: var(--accent-soft); padding: 7px 10px; color: var(--accent-dark); font-style: normal; font-size: 12px; font-weight: 950; }
.ledger-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 22px; border-top: 1px solid #edf1ec; padding-top: 16px; }
.ledger-head h3 { margin: 0; color: #1f2f27; font-size: 17px; letter-spacing: -.035em; }
.ledger-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.product-row { display: grid; grid-template-columns: 44px minmax(280px,1.45fr) 92px 130px 118px 132px 36px; gap: 10px; align-items: end; border-top: 1px solid #edf1ec; padding: 14px 0; }
.product-head { color: var(--muted); font-size: 10px; font-weight: 950; letter-spacing: .1em; text-transform: uppercase; }
.product-icon { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid #d7c7aa; border-radius: 13px; background: #f7efe1; font-size: 24px; box-shadow: 0 8px 18px rgba(139,85,40,.12); }
.small-icon { width: 38px; height: 38px; font-size: 20px; }
.product-meta { margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.product-meta span { display: inline-flex; margin-right: 7px; border-radius: 999px; background: #f6f8f3; padding: 3px 7px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 10px; font-weight: 850; }
.note-field { margin-top: 8px; }
.note-field .input { min-height: 36px; padding-block: 7px; font-size: 13px; }
.stock-cell { display: grid; gap: 5px; align-self: stretch; align-content: center; }
.stock-cell > span:not(.stock-pill) { color: var(--muted); font-size: 11px; font-weight: 800; }
.stock-cell strong { color: var(--accent-dark); font-size: 14px; font-weight: 950; text-align: right; }
.stock-pill { display: inline-flex; justify-content: center; border-radius: 999px; padding: 5px 8px; font-size: 11px; font-weight: 950; }
.stock-pill.ok { background: var(--accent-soft); color: var(--accent-dark); }
.stock-pill.muted { background: #f3f4f6; color: #4b5563; }
.stock-pill.danger { background: #fef2f2; color: #b91c1c; }
.product-total-strip { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin-top: 14px; }
.product-total-strip div { border: 1px solid #dfe7de; border-radius: 16px; background: #fbfdf9; padding: 13px 15px; }
.product-total-strip span { display: block; color: #65716b; font-size: 10px; font-weight: 950; letter-spacing: .12em; text-transform: uppercase; }
.product-total-strip strong { display: block; margin-top: 4px; color: #104d35; font-size: 20px; font-weight: 950; letter-spacing: -.04em; }
.product-section { display: grid; gap: 20px; }
.old-product-controls { grid-template-columns: minmax(150px,1fr) minmax(150px,1fr) minmax(260px,2fr); }
.old-check { grid-column: 1 / -1; justify-self: start; }
.warning-text { margin: 8px 0 0; color: #b45309; font-size: 12px; font-weight: 850; }
.warehouse-old { border: 1px solid var(--line); border-radius: 14px; background: white; padding: 14px 16px; color: #374151; font-size: 14px; font-weight: 650; line-height: 1.6; box-shadow: 0 1px 2px rgba(17,24,39,.04); }
.product-table-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: 0 10px 24px rgba(17,24,39,.05); }
.product-table-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 14px 18px; }
.product-table-head h3, .mobile-product-head h3 { margin: 0; color: #1f2f27; font-size: 16px; font-weight: 800; letter-spacing: -.03em; }
.product-table { width: 100%; min-width: 940px; border-collapse: collapse; font-size: 14px; }
.product-table th { background: #f3f4f6; padding: 12px 16px; color: var(--muted); text-align: left; font-size: 11px; font-weight: 950; letter-spacing: .12em; text-transform: uppercase; }
.product-table td { border-top: 1px solid #edf1ec; padding: 12px 16px; vertical-align: middle; }
.product-table tr:hover { background: #fbfdf9; }
.center { text-align: center !important; }
.table-product { display: flex; align-items: center; gap: 12px; }
.table-product strong { max-width: 230px; color: #1f2f27; font-size: 14px; font-weight: 950; line-height: 1.35; }
.sku-pill { display: inline-flex; min-height: 34px; align-items: center; border-radius: 999px; background: #f6f8f3; padding: 0 12px; color: #405047; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 12px; font-weight: 750; }
.table-input { width: 96px; min-height: 36px; border-radius: 999px; text-align: center; font-weight: 900; }
.table-money { width: 112px; min-height: 36px; border-radius: 999px; text-align: right; font-weight: 800; }
.amount-cell { color: #235f41; font-weight: 950; font-variant-numeric: tabular-nums; }
.goods-total { display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid var(--line); border-radius: 20px; background: white; padding: 16px 20px; box-shadow: 0 1px 2px rgba(17,24,39,.04); }
.goods-total span { color: #7a877f; font-size: 11px; font-weight: 950; letter-spacing: .16em; text-transform: uppercase; }
.goods-total p { margin: 4px 0 0; color: #65716b; font-size: 13px; font-weight: 700; }
.goods-total strong { border-radius: 999px; background: var(--accent-soft); padding: 10px 20px; color: #104d35; font-size: 24px; font-weight: 950; letter-spacing: -.04em; }
.mobile-product-list { display: none; }
.mobile-product-head { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 18px; background: white; padding: 12px 14px; box-shadow: 0 1px 2px rgba(17,24,39,.04); }
.mobile-product-card { border: 1px solid var(--line); border-radius: 20px; background: white; padding: 16px; box-shadow: 0 1px 2px rgba(17,24,39,.04); }
.mobile-product-title { display: flex; gap: 12px; }
.mobile-product-title strong { display: block; color: #1f2f27; font-size: 14px; font-weight: 950; }
.mobile-product-title p { margin: 4px 0 0; color: var(--muted); font-size: 12px; font-weight: 750; }
.mobile-product-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin-top: 14px; }
.mobile-price-box { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-top: 14px; border-radius: 18px; background: #f6f8f3; padding: 12px; }
.mobile-price-box > div { flex: 1; }
.mobile-price-box strong { display: block; margin-top: 4px; color: #235f41; font-weight: 950; }
.mini-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.mini-box { min-width: 0; border: 1px solid var(--line); border-radius: 13px; background: white; padding: 9px; }
.mini-box.green { border-color: rgba(56,102,65,.2); background: var(--accent-soft); }
.mini-box.red { border-color: #fee2e2; background: #fef2f2; }
.mini-label { color: var(--muted); font-size: 9px; font-weight: 950; letter-spacing: .04em; text-transform: uppercase; }
.mini-value { margin-top: 4px; overflow-wrap: anywhere; color: var(--ink); font-size: 13px; font-weight: 950; }
.mini-box.green .mini-label, .mini-box.green .mini-value { color: var(--accent-dark); }
.mini-box.red .mini-label, .mini-box.red .mini-value { color: #991b1b; }
.bottom-bar { margin-top: 24px; border: 1px solid var(--line); border-radius: 20px; background: white; padding: 16px; box-shadow: 0 10px 24px var(--shadow); }
.bottom-inner { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.bottom-summary { display: grid; grid-template-columns: 220px 1fr 1fr; gap: 12px; width: min(720px, 100%); }
.total-box { border: 1px solid rgba(56,102,65,.2); border-radius: 14px; background: var(--accent-soft); padding: 12px 16px; }
.debt-box { border: 1px solid var(--line); border-radius: 14px; background: #f9fafb; padding: 12px 16px; }
.total-box span, .debt-box span { display: block; color: var(--muted); font-size: 10px; font-weight: 950; letter-spacing: .14em; text-transform: uppercase; }
.total-box strong, .debt-box strong { display: block; margin-top: 3px; font-size: 24px; font-weight: 950; letter-spacing: -.04em; }
.total-box strong { color: var(--accent-dark); }
.message { border: 1px solid var(--line); border-radius: 12px; background: #f9fafb; padding: 10px 14px; color: #374151; font-size: 13px; font-weight: 900; white-space: pre-line; }
.message.good { border-color: rgba(56,102,65,.2); background: var(--accent-soft); color: var(--accent-dark); }
.dashboard-hero { overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: white; padding: 24px; box-shadow: 0 10px 24px rgba(17,24,39,.05); }
.dashboard-head { display: flex; justify-content: space-between; gap: 18px; align-items: end; }
.dashboard-head h1 { margin: 10px 0 0; font-size: 30px; line-height: 1.1; letter-spacing: -.035em; }
.dashboard-head p { max-width: 720px; margin: 12px 0 0; color: var(--muted); font-weight: 650; line-height: 1.55; }
.label-chip { display: inline-flex; border: 1px solid rgba(56,102,65,.2); border-radius: 999px; background: var(--accent-soft); padding: 7px 12px; color: var(--accent-dark); font-size: 11px; font-weight: 950; letter-spacing: .14em; text-transform: uppercase; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-top: 20px; }
.stat-card { border: 1px solid var(--line); border-radius: 18px; background: white; padding: 16px; box-shadow: 0 10px 24px var(--shadow); }
.stat-card.green { border-color: rgba(56,102,65,.2); background: var(--accent-soft); }
.stat-card.amber { border-color: #fde68a; background: #fffbeb; }
.stat-card.red { border-color: #fecaca; background: #fef2f2; }
.stat-label { color: var(--muted); font-size: 11px; font-weight: 950; letter-spacing: .12em; text-transform: uppercase; }
.stat-value { margin-top: 8px; font-size: 32px; font-weight: 950; letter-spacing: -.05em; }
.filter-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; margin: 18px 0; border: 1px solid var(--line); border-radius: 18px; background: white; padding: 12px; box-shadow: 0 1px 2px rgba(17,24,39,.04); }
.orders-table-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: 0 10px 24px rgba(17,24,39,.05); }
.table-scroll { overflow-x: auto; }
.orders-table { width: 100%; min-width: 1060px; border-collapse: collapse; font-size: 14px; }
.orders-table th { background: #f3f4f6; padding: 14px 18px; color: var(--muted); text-align: left; font-size: 11px; font-weight: 950; letter-spacing: .12em; text-transform: uppercase; }
.orders-table td { border-top: 1px solid #f1f5f9; padding: 14px 18px; vertical-align: top; }
.orders-table tr:hover { background: #f9fafb; }
.right { text-align: right !important; }
.status { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 950; }
.dot { width: 8px; height: 8px; border-radius: 999px; }
.status.pending { border-color: #fde68a; background: #fffbeb; color: #92400e; }
.status.syncing { border-color: #bfdbfe; background: #eff6ff; color: #1d4ed8; }
.status.synced { border-color: rgba(56,102,65,.2); background: var(--accent-soft); color: var(--accent-dark); }
.status.failed { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.dot.pending { background: #f59e0b; }
.dot.syncing { background: #3b82f6; }
.dot.synced { background: #2f7d55; }
.dot.failed { background: #ef4444; }
.order-actions { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.mobile-orders { display: none; }
.order-card { border: 1px solid var(--line); border-radius: 18px; background: white; padding: 16px; box-shadow: 0 1px 2px rgba(17,24,39,.04); }
.order-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.login-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(0,1.05fr) minmax(420px,.95fr); gap: 0; background: #edf2ee; padding: 20px; }
.login-art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; border-radius: 32px; background: #14231d; color: white; padding: 32px; box-shadow: 0 30px 90px rgba(20,35,29,.25); }
.login-art h1 { max-width: 820px; margin: 40px 0 0; font-size: clamp(42px, 6vw, 76px); line-height: .92; letter-spacing: -.07em; }
.login-art p { max-width: 620px; color: rgba(255,255,255,.62); line-height: 1.7; font-weight: 600; }
.login-kpis { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.login-kpi { border: 1px solid rgba(255,255,255,.1); border-radius: 24px; background: rgba(255,255,255,.07); padding: 18px; backdrop-filter: blur(10px); }
.login-kpi strong { display: block; font-size: 34px; }
.login-kpi span { display: block; margin-top: 8px; color: rgba(255,255,255,.45); font-size: 12px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.login-form-wrap { display: grid; place-items: center; padding: 40px 28px; }
.login-form { width: 100%; max-width: 430px; border: 1px solid #d8dfd8; border-radius: 28px; background: rgba(251,252,248,.88); padding: 32px; box-shadow: 0 28px 90px rgba(32,56,45,.12); backdrop-filter: blur(14px); }
.login-form h1 { margin: 14px 0 8px; font-size: 38px; letter-spacing: -.055em; }
.login-form p { color: #65716b; font-size: 14px; line-height: 1.6; font-weight: 650; }
.demo-note { margin-top: 18px; border-radius: 16px; background: #f1f5ef; padding: 12px; color: #65716b; font-size: 12px; font-weight: 800; }
.edit-banner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; border: 1px solid #d8dfd8; border-radius: 18px; background: white; padding: 16px; margin-bottom: 18px; box-shadow: 0 1px 2px rgba(17,24,39,.04); }
.empty-state { border: 1px solid var(--line); border-radius: 20px; background: white; padding: 48px 20px; text-align: center; }
.empty-state strong { display: block; font-size: 20px; letter-spacing: -.03em; }
.empty-state p { color: var(--muted); font-weight: 700; }

@media (max-width: 1100px) {
  .layout-grid { grid-template-columns: 1fr; }
  .sticky-col { position: static; }
  .hero-content, .dashboard-head, .bottom-inner { align-items: stretch; flex-direction: column; }
  .hero-stats { width: 100%; grid-template-columns: repeat(3,1fr); text-align: left; }
  .bottom-summary { grid-template-columns: 1fr; }
  .product-control-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .nav { display: none; }
  .mobile-nav { display: flex; }
  .container { padding: 18px 12px; }
  .hero { border-radius: 26px; padding: 18px; }
  .hero p, .hero-stats { display: none; }
  .card, .surface-card { padding: 16px; }
  .form-grid, .form-grid.four { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .product-head { display: none; }
  .section-heading { flex-direction: column; }
  .address-palette, .meta-panel { grid-template-columns: 1fr; }
  .product-row { grid-template-columns: 40px 1fr; align-items: start; }
  .product-row > *:nth-child(n+3) { grid-column: 2; }
  .rich-product-row { gap: 12px; border: 1px solid #edf1ec; border-radius: 18px; margin-top: 10px; padding: 14px; }
  .product-suggestion { grid-template-columns: 38px 1fr; }
  .product-suggestion em { grid-column: 2; justify-self: start; }
  .product-total-strip { grid-template-columns: 1fr; }
  .old-product-controls { grid-template-columns: 1fr; }
  .product-table-wrap { display: none; }
  .mobile-product-list { display: grid; gap: 12px; }
  .goods-total { align-items: stretch; flex-direction: column; }
  .goods-total strong { text-align: center; }
  .mini-summary, .stats-grid { grid-template-columns: repeat(2,1fr); }
  .orders-table-wrap { display: none; }
  .mobile-orders { display: grid; gap: 12px; }
  .login-screen { grid-template-columns: 1fr; padding: 12px; }
  .login-art { display: none; }
  .login-form-wrap { padding: 30px 8px; }
}
@media (max-width: 520px) {
  .header-inner { min-height: 62px; }
  .brand-subtitle { display: none; }
  .hero h1 { font-size: 28px; }
  .mini-summary, .stats-grid { grid-template-columns: 1fr; }
  .filter-bar { align-items: stretch; flex-direction: column; }
  .order-actions { justify-content: stretch; }
  .order-actions .btn { flex: 1; }
}
