:root {
  --bg: #efe6d6;
  --card: #fffdf8;
  --ink: #1c2418;
  --muted: #6d655b;
  --line: #e4d6c2;
  --sidebar: #13241c;
  --gold: #d7a441;
  --gold-2: #f3e2bc;
  --good: #1c7a45;
  --good-bg: #e5f6ec;
  --warn: #8d5d09;
  --warn-bg: #fff3d6;
  --bad: #9d2432;
  --bad-bg: #fde8ea;
  --info: #1d4e86;
  --info-bg: #e7f0fb;
  --shadow: 0 16px 40px rgba(48, 32, 8, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  background:
    radial-gradient(900px 420px at 100% -10%, rgba(215, 164, 65, 0.18), transparent 50%),
    var(--bg);
  color: var(--ink);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
::selection { background: #efd48a; }

.loader {
  position: fixed; inset: 0 0 auto; height: 3px; z-index: 80; display: none;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
body.is-loading .loader { display: block; }

.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
}
.login-brand {
  padding: 56px 48px;
  color: #f6f1e6;
  background:
    radial-gradient(500px 280px at 20% 0%, rgba(215, 164, 65, 0.28), transparent 55%),
    linear-gradient(165deg, #1b3328, #101c17 70%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}
.mark {
  width: 64px; height: 64px; border-radius: 18px;
  display: grid; place-items: center;
  color: var(--gold);
  border: 1px solid rgba(215, 164, 65, 0.45);
  background: rgba(255, 255, 255, 0.04);
}
.mark svg { width: 34px; height: 34px; }
.login-brand h1 { margin: 0; font-size: 42px; line-height: 1.25; }
.login-brand p { margin: 0; max-width: 460px; color: #d9d0c2; font-size: 18px; line-height: 1.8; }
.flow { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.flow span {
  border: 1px solid rgba(243, 226, 188, 0.25);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--gold-2);
  font-size: 14px;
}
.login-panel {
  display: flex; flex-direction: column; justify-content: center;
  padding: 40px 36px; gap: 18px;
}
.login-panel h2 { margin: 0 0 6px; font-size: 28px; }
.form-error { min-height: 1.4em; color: var(--bad); margin: 0; }
.demo { display: grid; gap: 8px; }
.demo p { margin: 0; color: var(--muted); }
.demo-grid { display: grid; gap: 8px; }
.demo-btn, .nav-link, .chip, .btn, .cover, .icon-btn {
  border: 0; background: transparent;
}
.demo-btn {
  text-align: right; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 10px 12px; display: flex; justify-content: space-between; gap: 8px;
}
.demo-btn:hover { border-color: var(--gold); }
.demo-btn b { display: block; color: var(--ink); }
.demo-btn span { color: var(--muted); font-size: 13px; }

.app { min-height: 100vh; display: flex; flex-direction: column; }
.app-navbar {
  position: fixed; top: 0; right: 0; left: 0; z-index: 70;
  height: 64px; padding: 0 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: linear-gradient(100deg, #14532d 0%, #1c7a45 55%, #34a06a 100%);
  box-shadow: 0 4px 20px rgba(20, 83, 45, 0.22);
  color: #fff;
}
.nav-brand {
  display: flex; align-items: center; gap: 12px;
  background: transparent; border: 0; color: #fff; text-align: right; padding: 0;
  cursor: pointer;
}
.nav-brand .mark {
  width: 42px; height: 42px; border-radius: 12px;
  border-color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.nav-brand .mark svg { width: 22px; height: 22px; }
.nav-brand small { display: block; color: rgba(255,255,255,0.82); font-size: 12px; font-weight: 700; }
.nav-brand b { display: block; font-size: 18px; line-height: 1.3; }
.nav-end { display: flex; align-items: center; gap: 10px; }
.nav-user {
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.28);
  color: #fff;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.nav-logout {
  color: #fff;
  background: rgba(255,255,255,0.18);
  border: 0;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
}
.nav-logout:hover { background: rgba(255,255,255,0.3); }
.nav-menu {
  color: #14532d;
  background: #fff;
  border: 0;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 800;
}
.nav-menu:hover { background: #f3fff7; }
.app-body { display: flex; flex: 1; min-width: 0; min-height: 0; padding-top: 64px; }
.sidebar {
  width: 300px; flex: 0 0 300px; color: #f4efe6;
  background:
    radial-gradient(400px 220px at 100% 0%, rgba(215, 164, 65, 0.16), transparent 50%),
    var(--sidebar);
  padding: 22px 16px; display: flex; flex-direction: column; gap: 14px;
  position: sticky; top: 64px; height: calc(100vh - 64px); overflow: auto;
}
.brand { display: flex; gap: 12px; align-items: center; }
.brand h1 { margin: 0; font-size: 18px; line-height: 1.35; }
.brand small, .muted { color: var(--muted); }
.brand small { color: #cbbfaa; display: block; }
.menu-btn { display: none; margin-right: auto; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-link {
  color: #e7e1d6; text-decoration: none; border-radius: 12px;
  padding: 10px 12px; display: flex; align-items: center; gap: 10px; position: relative;
}
.nav-link svg { width: 20px; height: 20px; flex: 0 0 auto; }
.nav-link.active { background: rgba(215, 164, 65, 0.16); color: #f6e3b4; }
.nav-link.active::before {
  content: ""; position: absolute; right: 0; top: 8px; bottom: 8px; width: 3px;
  border-radius: 3px; background: var(--gold);
}
.nav-badge {
  margin-right: auto; background: var(--gold); color: #2b2108; border-radius: 99px;
  min-width: 22px; height: 22px; display: grid; place-items: center; font-size: 12px; font-weight: 700;
}
.side-cart {
  margin: 4px 0 10px; padding: 12px; border-radius: 16px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(243, 226, 188, 0.18);
}
.side-cart-head, .side-cart .between { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.side-cart-head span { color: var(--gold-2); font-weight: 700; }
.side-cart .field span { color: #cbbfaa; }
.side-cart .field input, .side-cart .field select, .side-cart .field textarea {
  background: #1b2c24; color: #f6f1e6; border-color: rgba(243, 226, 188, 0.22);
}
.side-cart textarea { min-height: 64px; }
.side-cart .empty { color: #cbbfaa; padding: 12px 4px; }
.side-cart .cart-line { grid-template-columns: 48px 1fr auto; color: #f6f1e6; }
.side-cart .sub, .side-cart .line-total { color: #d9d0c2; }
.side-cart .btn-ghost { color: #f3e2bc; border-color: rgba(243, 226, 188, 0.3); }
.side-cart .btn-gold { width: 100%; }
.side-cart-list { max-height: 280px; overflow: auto; margin-bottom: 8px; }
.side-user { margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 8px; }
.side-user strong { display: block; }
.side-user span { color: #cbbfaa; font-size: 13px; }
.main { flex: 1; min-width: 0; padding: 22px 26px 40px; }
.topbar { display: flex; justify-content: space-between; gap: 12px; align-items: end; margin-bottom: 18px; }
.topbar h2 { margin: 0; font-size: 28px; }
.app.sidebar-hidden .sidebar {
  position: absolute !important;
  flex: 0 0 0 !important;
  width: 0 !important;
  min-width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.app.sidebar-hidden .app-body { display: block; }
.app.sidebar-hidden .main { width: 100%; flex: 1 1 100%; }
.menu-backdrop {
  position: fixed; inset: 64px 0 0; z-index: 45; border: 0; padding: 0;
  background: rgba(16, 20, 12, 0.38);
}
.app.menu-open .sidebar {
  position: fixed !important;
  top: 64px; right: 0; bottom: 0;
  width: 300px !important;
  height: calc(100vh - 64px) !important;
  min-height: calc(100vh - 64px) !important;
  padding: 22px 16px !important;
  overflow: auto !important;
  z-index: 50;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  box-shadow: -16px 0 40px rgba(0,0,0,.28);
}
.section-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 22px; margin-bottom: 18px; border-radius: 16px; color: #fff;
  box-shadow: 0 8px 22px rgba(19, 36, 28, 0.16);
}
.section-bar h2 { margin: 4px 0 0; font-size: 26px; color: #fff; }
.section-bar p { margin: 6px 0 0; color: rgba(255,255,255,.88); line-height: 1.6; }
.section-bar small { color: rgba(255,255,255,.82); font-weight: 700; }
.section-bar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.section-search {
  min-width: min(280px, 42vw);
  height: 42px;
  border: 0;
  border-radius: 12px;
  padding: 0 14px;
  background: #fff;
  color: #1c2418;
  font-weight: 700;
}
.section-search::placeholder { color: #8a8176; font-weight: 600; }
.section-add, a.section-add {
  height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  background: #fff;
  color: #14532d;
  font-weight: 800;
  border: 0;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
}
.section-add:hover, a.section-add:hover { background: #f3fff7; }
.section-bar[data-tone="invoices"] { background: linear-gradient(100deg, #163a66 0%, #1d4e86 45%, #3b82c4 100%); }
.section-bar[data-tone="cart"] { background: linear-gradient(100deg, #7a4e08 0%, #b07916 50%, #d7a441 100%); }
.section-bar[data-tone="order"] { background: linear-gradient(100deg, #14532d 0%, #1c7a45 55%, #34a06a 100%); }
.section-bar[data-tone="products"] { background: linear-gradient(100deg, #3f4d2a 0%, #5c6e38 50%, #7d924c 100%); }
.section-bar[data-tone="shops"] { background: linear-gradient(100deg, #4a1d5c 0%, #6d2d86 50%, #9b59b6 100%); }
.section-bar[data-tone="users"] { background: linear-gradient(100deg, #334155 0%, #475569 50%, #64748b 100%); }
.section-bar[data-tone="stats"] { background: linear-gradient(100deg, #0f766e 0%, #0d9488 50%, #2dd4bf 100%); }
.section-bar[data-tone="finance"] { background: linear-gradient(100deg, #7c2d12 0%, #c2410c 50%, #f59e0b 100%); }
.section-bar[data-tone="settings"] { background: linear-gradient(100deg, #101c17 0%, #1b3328 55%, #2d4a3a 100%); }
.stats-tabs {
  display: flex; gap: 8px; margin-bottom: 16px; padding: 8px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
}
.stats-tab {
  flex: 1; text-align: center; padding: 12px 14px; border-radius: 12px;
  font-weight: 800; text-decoration: none; color: var(--muted);
}
.stats-tab.active {
  background: linear-gradient(100deg, #0f766e 0%, #0d9488 50%, #2dd4bf 100%);
  color: #fff;
}
.sys-tabs {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px;
}
.sys-tabs a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 12px;
  background: #fff; border: 1px solid #cde7d6; color: #14532d;
  text-decoration: none; font-weight: 800; font-size: 14px;
}
.sys-tabs a:hover { background: #f0fdf4; }
.sys-tabs a.active {
  background: linear-gradient(100deg, #14532d 0%, #1c7a45 55%, #34a06a 100%);
  border-color: transparent; color: #fff;
  box-shadow: 0 8px 20px rgba(20, 83, 45, 0.28);
}
.sys-warn {
  display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  background: #f59e0b; color: #fff; font-size: 12px;
}
.sys-panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.sys-panel h3 { margin: 0 0 16px; }
.sys-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px 28px;
  align-items: center;
}
.sys-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px 18px;
  max-width: 760px;
}
.sys-fields .field { margin-bottom: 0; }
.sys-save {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 120px;
}
.settings-note { color: var(--muted); font-weight: 600; margin: 0 0 12px; }
.settings-note.otp-note {
  background: #ecfeff; border: 1px solid #67e8f9; border-radius: 12px;
  padding: 12px 14px; color: #155e75;
}
.settings-readonly {
  background: #f8fafc; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; font-weight: 700;
}
.account-role {
  display: flex; align-items: center; justify-content: center;
  min-height: 44px;
  background: #dcfce7; border: 1px solid #22c55e; color: #166534;
  border-radius: 12px; padding: 10px 14px; font-weight: 800;
}
.custom-grid {
  display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: 12px 16px; align-items: center;
}
.custom-save { justify-self: end; }
.signature-status {
  display: flex; align-items: center; gap: 10px; width: fit-content;
  border-radius: 10px; padding: 6px 12px; font-weight: 800; margin-bottom: 14px;
}
.signature-status.is-saved { background: #dcfce7; border: 1px solid #22c55e; color: #166534; }
.signature-status.is-missing { background: #fef9c3; border: 1px solid #eab308; color: #854d0e; }
.signature-layout {
  display: grid;
  grid-template-columns: minmax(240px, 1.3fr) minmax(180px, 0.9fr) auto;
  grid-template-rows: auto 160px auto;
  column-gap: 16px; row-gap: 8px; align-items: center;
}
.signature-draw, .signature-center { display: contents; }
.signature-caption { margin: 0; font-weight: 800; color: #14532d; }
.signature-draw .signature-caption { grid-column: 1; grid-row: 1; }
.signature-pad {
  grid-column: 1; grid-row: 2; border: 1.5px dashed #86efac; border-radius: 14px;
  background: #fff; width: 100%; height: 160px; touch-action: none; cursor: crosshair; display: block;
}
.signature-draw-tools { grid-column: 1; grid-row: 3; }
.signature-center .signature-caption { grid-column: 2; grid-row: 1; text-align: center; }
.signature-show {
  grid-column: 2; grid-row: 2; height: 160px; border: 1px solid var(--line); border-radius: 14px;
  background: #f8fafc; display: flex; align-items: center; justify-content: center; padding: 12px;
}
.signature-show em { color: #94a3b8; font-style: normal; font-weight: 700; }
.signature-show img { max-width: 100%; max-height: 130px; background: #fff; border-radius: 8px; }
.btn-sign-clear { grid-column: 2; grid-row: 3; justify-self: center; }
.signature-save { grid-column: 3; grid-row: 2; display: flex; align-items: center; justify-content: center; }
.btn-pad-clear, .btn-sign-clear {
  border: 0; color: #fff; font-weight: 800; border-radius: 12px; padding: 8px 16px; cursor: pointer;
}
.btn-pad-clear { background: linear-gradient(135deg, #f59e0b, #d97706); }
.btn-sign-clear { background: linear-gradient(135deg, #ef4444, #dc2626); }
.page-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 14px; }
.page-head p, .lead { margin: 6px 0 0; color: var(--muted); line-height: 1.7; }

.stats, .steps, .split, .form-grid, .facts { display: grid; gap: 12px; }
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
.stat, .panel, .cart, .product-card, .invoice-sheet, .modal-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.stat { padding: 16px; }
.stat span { color: var(--muted); display: block; margin-bottom: 6px; }
.stat b { font-size: 26px; }
.steps { grid-template-columns: repeat(3, 1fr); margin-bottom: 16px; }
.steps div { background: #1c3328; color: #f6f1e6; border-radius: 16px; padding: 14px 16px; line-height: 1.6; }
.steps strong { color: var(--gold-2); }
.banner {
  background: var(--warn-bg); color: var(--warn); border-radius: 16px; padding: 14px 16px; margin-bottom: 16px;
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
}
.banner.info { background: var(--info-bg); color: var(--info); }
.banner.bad { background: var(--bad-bg); color: var(--bad); }
.panel { padding: 16px; margin-bottom: 16px; }
.panel h3 { margin: 0 0 12px; }
.split { grid-template-columns: 1.4fr 0.8fr; align-items: start; }
.low-list { display: grid; gap: 10px; }
.low-item, .cart-line { display: grid; grid-template-columns: 54px 1fr auto; gap: 10px; align-items: center; }
.low-item img, .thumb, .cart-line img, img.thumb {
  width: 56px; height: 56px; object-fit: contain; padding: 4px; border-radius: 12px; background: #f3ecdf;
}

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip, .status-chip, .cat-chip {
  border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 7px 12px;
}
.chip.active, .status-chip.active, .cat-chip.active { background: #1c3328; color: #f6e7c2; border-color: #1c3328; }
.search, .field input, .field select, .field textarea, .add-row input, .qty-input {
  width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 12px; outline: none;
}
.search { max-width: 320px; margin-bottom: 12px; }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field span, .req::after { color: var(--muted); }
.req::after { content: " *"; color: var(--bad); }
textarea { min-height: 90px; resize: vertical; }
input[type="number"], input[type="password"], .ltr { direction: ltr; text-align: right; }
.form-grid { grid-template-columns: 1fr 1fr; }

.table-wrap { overflow: auto; }
.check-col { width: 44px; text-align: center; }
.check-col input { width: 18px; height: 18px; accent-color: #1c3328; }
tr.is-selected { background: #f6efe0; }
.table-pager {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 4px 4px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 700;
}
.table-pager strong { color: var(--ink); }
.table-pager p, .table-pager label { margin: 0; display: flex; align-items: center; gap: 6px; }
.pager-nav {
  display: flex; align-items: center; gap: 4px; background: #f6efe4; border: 1px solid var(--line);
  border-radius: 12px; padding: 4px;
}
.pager-nav button {
  min-width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font-weight: 800;
}
.pager-nav button.active { background: #1c3328; color: #f6e7c2; }
.pager-nav button:disabled { opacity: .35; }
.table-pager select { width: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 4px 8px; }
.pager-delete[hidden] { display: none !important; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; text-align: right; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 14px; }
.invoice-row a, .panel td a { color: inherit; font-weight: 700; }
tbody tr:hover { background: #fbf7f0; }
.name-cell b { display: block; }
.name-cell small, .sub { color: var(--muted); }

.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 10px; font-size: 13px; background: #f3ecdf; }
.pill[data-status="pending_manager"] { background: var(--warn-bg); color: var(--warn); }
.pill[data-status="sent_to_warehouse"] { background: var(--info-bg); color: var(--info); }
.pill[data-status="preparing"] { background: #efe7ff; color: #5b3f91; }
.pill[data-status="ready"] { background: var(--good-bg); color: var(--good); }
.pill[data-status="delivered"] { background: #e8f7f4; color: #0f6b62; }
.pill[data-status="cancelled"] { background: var(--bad-bg); color: var(--bad); }
.pill[data-status="rejected"] { background: #3f1d20; color: #fecaca; }

.easy-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0; margin: 0 0 16px; }
.easy-steps.wizard-one { grid-template-columns: 1fr; }
.easy-steps li {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px;
  background: #fff; border: 1px solid var(--line); color: var(--muted); font-weight: 700;
}
.easy-steps li b {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: #efe7da; color: #5b5248;
}
.easy-steps li.current { border-color: #1c7a45; background: #e8f7ee; color: #14532d; }
.easy-steps li.current b { background: #1c7a45; color: #fff; }
.easy-steps li.done { border-color: #d7a441; background: #fff8e8; color: #7a4e08; }
.easy-steps li.done b { background: #d7a441; color: #2c220b; }
.visit-bar { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 14px; align-items: end; margin-bottom: 16px; }
.visit-bar.step-one { grid-template-columns: 1.4fr 1fr; }
.wizard-nav {
  display: flex; justify-content: space-between; gap: 10px; margin-top: 16px;
}
.price-switch { display: grid; gap: 6px; }
.price-switch span { color: var(--muted); font-size: 13px; font-weight: 700; }
.switch { display: flex; background: #f4ece0; border-radius: 12px; padding: 4px; }
.switch button { flex: 1; border: 0; background: transparent; border-radius: 10px; padding: 8px; font-weight: 800; }
.switch button.active { background: #1c3328; color: #f6e7c2; }
.dual-price { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); font-weight: 700; }
.tracker { list-style: none; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; padding: 0; margin: 8px 0 0; }
.tracker li {
  display: grid; justify-items: center; gap: 6px; text-align: center; font-size: 13px; font-weight: 800; color: var(--muted);
}
.tracker .t-num {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: #efe7da; color: #6b6258;
}
.tracker li.done { color: #14532d; }
.tracker li.done .t-num { background: #1c7a45; color: #fff; }
.tracker li.current { color: #7a4e08; }
.tracker li.current .t-num { background: #d7a441; color: #2c220b; }
.tracker li.fail { color: #9d2432; }
.tracker li.fail .t-num { background: #9d2432; color: #fff; }
.tracker.compact { grid-template-columns: repeat(6, 1fr); margin: 8px 0 0; }
.tracker.compact li { font-size: 0; }
.tracker.compact .t-num { width: 18px; height: 18px; font-size: 10px; }
.progress-card { margin-bottom: 16px; }
.banner.reject { background: #fde8ea; border: 1px solid #f0b4bb; }
.banner.lock { background: #fff3d6; }
.money-line { display: flex; justify-content: space-between; color: var(--muted); font-weight: 700; margin-top: -6px; }
.stat.money-full {
  background: linear-gradient(160deg, #dbeafe 0%, #93c5fd 100%);
  border: 1px solid #3b82f6;
}
.stat.money-full span, .stat.money-full b { color: #1d4ed8; }
.stat.money-in {
  background: linear-gradient(160deg, #dcfce7 0%, #86efac 100%);
  border: 1px solid #22c55e;
}
.stat.money-in span, .stat.money-in b { color: #166534; }
.stat.money-rest {
  background: linear-gradient(160deg, #fef9c3 0%, #fde047 100%);
  border: 1px solid #eab308;
}
.stat.money-rest span, .stat.money-rest b { color: #854d0e; }
.stat.money-count {
  background: linear-gradient(160deg, #fee2e2 0%, #fecaca 100%);
  border: 1px solid #f87171;
}
.stat.money-count span, .stat.money-count b { color: #991b1b; }
.stat.stat-wait {
  background: linear-gradient(160deg, #ffedd5 0%, #fdba74 100%);
  border: 1px solid #fb923c;
}
.stat.stat-wait span, .stat.stat-wait b { color: #9a3412; }
.stat.stat-wh {
  background: linear-gradient(160deg, #ccfbf1 0%, #5eead4 100%);
  border: 1px solid #14b8a6;
}
.stat.stat-wh span, .stat.stat-wh b { color: #115e59; }
.stat.stat-month {
  background: linear-gradient(160deg, #ede9fe 0%, #c4b5fd 100%);
  border: 1px solid #8b5cf6;
}
.stat.stat-month span, .stat.stat-month b { color: #5b21b6; }
.tag { font-size: 12px; border-radius: 8px; padding: 2px 6px; background: var(--bad-bg); color: var(--bad); }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { overflow: hidden; display: flex; flex-direction: column; }
.product-card.inactive { opacity: 0.6; }
.cover {
  padding: 0; width: 100%; aspect-ratio: 1 / 1; display: grid; place-items: center;
  background: linear-gradient(180deg, #f7f1e6, #efe4d0);
}
.cover img, img.photo {
  width: 92%; height: 92%; object-fit: contain; background: transparent;
}
.pinfo { padding: 12px 12px 4px; display: grid; gap: 4px; }
.pinfo h3 { margin: 0; font-size: 16px; line-height: 1.45; }
.pack-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pack-chip { background: #1c3328; color: #f6e7c2; border-radius: 999px; padding: 2px 8px; font-size: 12px; }
.price { color: #8a5a10; font-weight: 800; font-size: 17px; }
.stock.low { color: var(--bad); font-weight: 700; }
.add-row { display: flex; gap: 8px; padding: 10px 12px 12px; align-items: center; }
.add-row input { width: 78px; }
.cart-line { padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button, .icon-btn {
  width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--line); background: #fff;
}
.line-total { font-weight: 700; }
.total-row { display: flex; justify-content: space-between; margin: 12px 0; font-size: 18px; font-weight: 800; }
.panel .total-row { padding: 8px 4px 14px; }
.panel .btn-gold { width: auto; }
.empty { padding: 28px 10px; text-align: center; color: var(--muted); }

.btn {
  border-radius: 12px; padding: 10px 14px; border: 1px solid transparent; background: #efe7da; color: var(--ink);
}
.btn-primary { background: #1c3328; color: #f8f1e4; }
.btn-gold { background: var(--gold); color: #2c220b; font-weight: 700; }
.btn-danger { background: var(--bad-bg); color: var(--bad); }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.stepper button[disabled] { opacity: 0.4; cursor: not-allowed; }
.row-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn-small { padding: 6px 10px; border-radius: 10px; }

.invoice-sheet {
  padding: 22px 24px 18px; border-top: 6px solid #14532d;
  display: flex; flex-direction: column; min-height: 760px;
}
.invoice-top, .between { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.inv-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 2px solid #14532d;
}
.inv-brand { display: flex; align-items: center; gap: 12px; }
.inv-brand .mark {
  width: 52px; height: 52px; border-radius: 14px;
  background: #14532d; color: #f6f1e6; display: grid; place-items: center;
}
.inv-brand .mark svg { width: 28px; height: 28px; }
.inv-brand h1 { margin: 0; font-size: 28px; line-height: 1.15; color: #14532d; }
.inv-brand p { margin: 4px 0 0; color: var(--muted); font-weight: 700; font-size: 13px; }
.inv-badge {
  min-width: 150px; text-align: center; padding: 10px 14px; border-radius: 12px;
  background: #14532d; color: #fff;
}
.inv-badge span { display: block; font-size: 12px; opacity: 0.88; font-weight: 800; }
.inv-badge b { display: block; font-size: 20px; margin: 2px 0; letter-spacing: 0.4px; }
.inv-badge small { display: block; font-size: 12px; opacity: 0.9; }
.inv-meta {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 14px;
  margin: 14px 0; padding: 10px 12px; background: #f6f3ea; border-radius: 12px;
}
.inv-meta div { display: grid; gap: 2px; }
.inv-meta span { color: var(--muted); font-size: 12px; font-weight: 700; }
.inv-meta b { font-size: 14px; }
.inv-table { width: 100%; border-collapse: collapse; }
.inv-table thead th {
  background: #14532d; color: #fff; font-size: 13px; padding: 8px 10px;
  border: 0;
}
.inv-table tbody td { padding: 7px 10px; font-size: 13px; border-bottom: 1px solid #eadfcd; }
.inv-table tbody tr:hover { background: #fbf8f1; }
.inv-n { width: 36px; color: var(--muted); font-weight: 800; }
.inv-prod { display: flex; align-items: center; gap: 8px; }
.inv-prod small { display: block; color: var(--muted); font-size: 11px; font-weight: 700; }
.inv-thumb, img.inv-thumb {
  width: 36px; height: 36px; object-fit: contain; padding: 2px;
  border-radius: 8px; background: #f3ecdf; flex: 0 0 36px;
}
.inv-thumb.ph { font-size: 9px; display: grid; place-items: center; color: #9a8d7a; }
.inv-foot { display: grid; grid-template-columns: 1fr 240px; gap: 16px; margin-top: 12px; align-items: start; }
.inv-notes p { margin: 0 0 6px; font-size: 13px; line-height: 1.6; }
.inv-sums { border: 1px solid #d7c7ad; border-radius: 12px; overflow: hidden; }
.inv-sums div { display: flex; justify-content: space-between; padding: 8px 12px; font-weight: 800; }
.inv-sums div + div { border-top: 1px solid #eadfcd; }
.inv-sums .remain { background: #fff7dc; }
.inv-signs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: auto;
  padding-top: 28px;
}
.inv-sign {
  min-height: 92px; border-top: 1px solid #1c2418; padding-top: 8px;
  text-align: center; font-weight: 800; color: var(--muted); font-size: 13px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px;
}
.inv-sign small { color: var(--ink); font-size: 12px; }
.e-sign, img.e-sign {
  height: 56px; max-width: 180px; object-fit: contain; background: transparent; margin: 0 auto 4px;
}
.e-sign-empty {
  height: 56px; width: 100%; display: grid; place-items: center;
  font-size: 11px; color: #9a8d7a; font-weight: 700;
}
.sig-zone { min-height: 180px; }
.e-sign-preview, img.e-sign-preview {
  max-height: 160px; max-width: 100%; object-fit: contain; margin: 0 auto; background: #fff;
}
.account-panel { max-width: 640px; }
.meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; margin: 16px 0; }
.meta div { display: grid; }
.meta span { color: var(--muted); font-size: 13px; }
.timeline { display: grid; gap: 10px; margin-top: 8px; }
.event { display: grid; grid-template-columns: 12px 1fr; gap: 8px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--gold); margin-top: 4px; }
.signs { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 28px; }
.signs div { border-top: 1px solid var(--ink); padding-top: 8px; }

.modal { position: fixed; inset: 0; background: rgba(18, 22, 16, 0.46); display: grid; place-items: center; padding: 18px; z-index: 90; overflow: auto; }
.modal-card { width: min(560px, 100%); padding: 18px; max-height: min(90vh, 860px); overflow: auto; }
.modal-card.wide { width: min(720px, 100%); }
.lightbox-img { width: 100%; height: 380px; object-fit: contain; border-radius: 14px; background: #f4eee3; padding: 16px; }
.dropzone { background: #f7f1e6; }
.facts { grid-template-columns: 1fr 1fr; margin: 10px 0; }
.fact { background: #f7f1e6; border-radius: 12px; padding: 10px; }
.fact span { display: block; color: var(--muted); font-size: 13px; }
.dropzone { position: relative; border: 1.5px dashed #d9c7aa; border-radius: 14px; min-height: 180px; display: grid; place-items: center; overflow: hidden; background: #fbf7f0; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone img { width: 100%; height: 220px; object-fit: contain; background: #f7f1e6; }
.hint { color: var(--muted); text-align: center; padding: 24px; }
details { margin: 8px 0 14px; }
summary { cursor: pointer; color: var(--muted); margin-bottom: 8px; }

#toasts {
  position: fixed;
  top: 78px;
  left: 20px;
  z-index: 1080;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(420px, calc(100vw - 40px));
  pointer-events: none;
}
.app-toast {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px 16px 44px;
  border-radius: 14px;
  color: #fff;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.22);
  overflow: hidden;
  pointer-events: auto;
  opacity: 0;
  transform: translateX(-24px) scale(0.96);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.app-toast.show { opacity: 1; transform: translateX(0) scale(1); }
.app-toast.hide { opacity: 0; transform: translateX(-16px) scale(0.98); }
.app-toast-icon {
  width: 40px; height: 40px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.22);
  display: grid; place-items: center; flex: 0 0 auto;
}
.app-toast-icon svg { width: 22px; height: 22px; }
.app-toast-content { min-width: 0; flex: 1; }
.app-toast-content strong { display: block; font-size: 14px; font-weight: 800; margin-bottom: 2px; }
.app-toast-content p { margin: 0; font-size: 13px; font-weight: 600; line-height: 1.45; opacity: 0.95; }
.app-toast-close {
  position: absolute; top: 10px; left: 10px;
  width: 28px; height: 28px; border: 0; border-radius: 8px;
  background: rgba(255, 255, 255, 0.18); color: #fff;
  display: grid; place-items: center; cursor: pointer; font-size: 16px;
}
.app-toast-close:hover { background: rgba(255, 255, 255, 0.32); }
.app-toast-progress {
  position: absolute; bottom: 0; right: 0; left: 0; height: 3px;
  background: rgba(255, 255, 255, 0.35);
  transform-origin: right center;
  animation: toastProgress 4s linear forwards;
}
@keyframes toastProgress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}
.app-toast-success {
  background: linear-gradient(135deg, #059669 0%, #10b981 55%, #34d399 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.app-toast-error {
  background: linear-gradient(135deg, #b91c1c 0%, #dc2626 55%, #ef4444 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.app-toast-warning {
  background: linear-gradient(135deg, #b45309 0%, #d97706 55%, #f59e0b 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
}
@media (max-width: 600px) {
  #toasts { left: 12px; right: 12px; max-width: none; }
}
.users-card {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(15, 23, 42, 0.08);
  border: 1px solid #e2e8f0;
}
.users-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #0e7490, #0891b2);
  color: #fff;
}
.users-card-head span { font-weight: 800; white-space: nowrap; }
.users-card-head b { font-size: 13px; font-weight: 700; }
.users-search { max-width: 360px; width: 100%; margin-inline-start: auto; }
.users-search input {
  width: 100%; border: none; border-radius: 10px;
  padding: 9px 12px; font-weight: 700; color: #1f2937;
}
.users-table-wrap { overflow-x: auto; }
.users-table { width: 100%; border-collapse: collapse; }
.users-table thead tr { background: linear-gradient(135deg, #0e7490 0%, #0891b2 55%, #06b6d4 100%); }
.users-table thead th {
  padding: 14px; font-size: 13px; font-weight: 800; color: #fff;
  white-space: nowrap; border-bottom: 3px solid #065f73; text-align: right;
}
.users-table tbody td { padding: 12px 14px; font-size: 13.5px; color: #374151; vertical-align: middle; }
.users-table tbody tr { border-bottom: 1px solid #f1f5f9; }
.users-table tbody tr:hover { background: #f0fdfe; }
.users-table tbody tr.row-admin {
  background: linear-gradient(90deg, #fde047 0%, #fef08a 38%, #fffbeb 100%) !important;
  box-shadow: inset -6px 0 0 #b45309;
  border-top: 2px solid #f59e0b;
  border-bottom: 2px solid #f59e0b;
}
.users-num { color: #9ca3af; font-weight: 700; }
.users-name { font-weight: 800; color: #0e7490; }
.users-self {
  display: inline-block; margin-inline-start: 6px;
  background: #f0fdfa; color: #0d9488; border-radius: 999px;
  padding: 2px 8px; font-size: 11px; font-weight: 800;
}
.users-username { font-family: ui-monospace, Consolas, monospace; font-weight: 700; color: #6b7280; }
.users-role, .users-state {
  display: inline-flex; align-items: center; border-radius: 999px;
  padding: 4px 12px; font-size: 12px; font-weight: 800;
}
.role-admin { background: #fef3c7; color: #92400e; border: 1.5px solid #fcd34d; }
.role-rep { background: #dbeafe; color: #1d4ed8; border: 1.5px solid #93c5fd; }
.role-warehouse { background: #ede9fe; color: #6d28d9; border: 1.5px solid #c4b5fd; }
.users-state.is-on { background: #d1fae5; color: #065f46; }
.users-state.is-off { background: #fee2e2; color: #991b1b; }
.users-actions { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.users-act {
  display: inline-flex; align-items: center; height: 30px; padding: 0 10px;
  border-radius: 8px; border: 1.5px solid; background: #fff;
  font-size: 12px; font-weight: 800; cursor: pointer;
}
.act-edit { color: #d97706; border-color: #f59e0b; }
.act-edit:hover { background: #f59e0b; color: #fff; }
.act-freeze { color: #b91c1c; border-color: #ef4444; }
.act-freeze:hover { background: #ef4444; color: #fff; }
.act-on { color: #047857; border-color: #10b981; }
.act-on:hover { background: #10b981; color: #fff; }
.act-del { color: #9f1239; border-color: #fb7185; }
.act-del:hover { background: #e11d48; color: #fff; }
.user-modal {
  width: min(680px, 100%);
  max-height: min(90vh, 820px);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 0;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}
.user-modal-head {
  padding: 20px 22px 16px;
  background: linear-gradient(120deg, #0f766e 0%, #0891b2 48%, #2563eb 100%);
  color: #fff;
}
.user-modal.tone-shops .user-modal-head { background: linear-gradient(120deg, #4a1d5c 0%, #6d2d86 50%, #9b59b6 100%); }
.user-modal.tone-products .user-modal-head { background: linear-gradient(120deg, #3f4d2a 0%, #5c6e38 50%, #7d924c 100%); }
.user-modal.tone-pay .user-modal-head { background: linear-gradient(120deg, #7c2d12 0%, #c2410c 50%, #f59e0b 100%); }
.user-modal.tone-reject .user-modal-head { background: linear-gradient(120deg, #7f1d1d 0%, #b91c1c 50%, #ef4444 100%); }
.user-modal.tone-confirm .user-modal-head { background: linear-gradient(120deg, #14532d 0%, #1c7a45 50%, #34a06a 100%); }
.user-modal-badge {
  display: inline-flex;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 800;
}
.user-modal-head h3 { margin: 10px 0 6px; color: #fff; }
.user-modal-head p { margin: 0; color: rgba(255,255,255,0.9); line-height: 1.65; font-weight: 600; }
.user-modal-body {
  padding: 18px 22px 16px;
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
}
.user-modal-body .row-actions {
  position: sticky;
  bottom: 0;
  background: #fff;
  padding: 12px 0 2px;
  margin: 8px 0 0;
  z-index: 2;
}
.user-modal .form-grid { grid-template-columns: 1fr 1fr; }
.user-modal .field input,
.user-modal .field select,
.user-modal .field textarea {
  border-color: #c7d2fe;
  background: #fff;
}
.user-modal .field input:focus,
.user-modal .field select:focus,
.user-modal .field textarea:focus {
  border-color: #0891b2;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.15);
}
.user-modal .dropzone { min-height: 140px; }
.role-picks { border: 0; margin: 8px 0 16px; padding: 0; }
.role-picks legend { font-weight: 800; margin-bottom: 8px; color: #0f172a; }
.role-pick-grid, .user-modal .role-pick-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.role-pick {
  display: grid; gap: 4px; padding: 12px;
  border: 1.5px solid #d1d5db; border-radius: 16px;
  background: #fff; cursor: pointer;
  min-height: 108px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.role-pick input { position: absolute; opacity: 0; pointer-events: none; }
.role-pick b { font-size: 15px; }
.role-pick small { font-weight: 600; line-height: 1.45; }
.role-pick.pick-rep { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; }
.role-pick.pick-rep small { color: #1e40af; }
.role-pick.pick-warehouse { background: #f5f3ff; border-color: #c4b5fd; color: #6d28d9; }
.role-pick.pick-warehouse small { color: #5b21b6; }
.role-pick.pick-admin { background: #fffbeb; border-color: #fcd34d; color: #b45309; }
.role-pick.pick-admin small { color: #92400e; }
.role-pick:hover { transform: translateY(-2px); }
.role-pick.pick-rep:has(input:checked), .role-pick.pick-rep.is-on {
  background: #2563eb; color: #fff; border-color: #1d4ed8;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
}
.role-pick.pick-warehouse:has(input:checked), .role-pick.pick-warehouse.is-on {
  background: #7c3aed; color: #fff; border-color: #6d28d9;
  box-shadow: 0 10px 22px rgba(124, 58, 237, 0.28);
}
.role-pick.pick-admin:has(input:checked), .role-pick.pick-admin.is-on {
  background: #d97706; color: #fff; border-color: #b45309;
  box-shadow: 0 10px 22px rgba(217, 119, 6, 0.28);
}
.role-pick:has(input:checked) small, .role-pick.is-on small { color: rgba(255,255,255,0.88); }
@media (max-width: 560px) {
  .user-modal .form-grid, .user-modal .role-pick-grid { grid-template-columns: 1fr; }
}
.users-empty { text-align: center; padding: 36px; color: #94a3b8; font-weight: 700; }
@media (max-width: 800px) {
  .users-card-head { grid-template-columns: 1fr; }
  .users-search { max-width: none; }
}

.boot-error, .loading { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 24px; }

:focus-visible { outline: 3px solid rgba(215, 164, 65, 0.7); outline-offset: 2px; }
@media (max-width: 980px) {
  .stats, .steps, .split, .meta, .facts, .form-grid, .easy-steps, .tracker, .visit-bar { grid-template-columns: 1fr 1fr; }
  .easy-steps.wizard-one, .visit-bar.step-one { grid-template-columns: 1fr; }
  .table-pager { justify-content: center; }
  .sys-split, .custom-grid, .sys-fields { grid-template-columns: 1fr; }
  .custom-save, .sys-save { justify-content: flex-start; }
}
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login-brand { padding: 28px 20px; }
  .login-brand h1 { font-size: 32px; }
  .app { display: flex; }
  .app-navbar { height: auto; min-height: 64px; padding: 10px 14px; flex-wrap: wrap; }
  .nav-end { width: 100%; justify-content: flex-start; margin-right: 0; }
  .app-body { display: block; padding-top: 96px; }
  .sidebar { width: auto; height: auto; position: sticky; top: 96px; z-index: 20; }
  .nav, .side-user { display: none; }
  .sidebar.open .nav, .sidebar.open .side-user { display: flex; }
  .menu-btn { display: inline-flex; }
  .main { padding: 16px; }
  .stats, .steps, .split, .meta, .facts, .form-grid, .signs, .easy-steps, .tracker, .visit-bar { grid-template-columns: 1fr; }
  .topbar, .section-bar { flex-direction: column; align-items: start; }
  .page-head, .banner, .between, .invoice-top { flex-direction: column; align-items: stretch; }
  .signature-layout { grid-template-columns: 1fr; grid-template-rows: none; }
  .signature-draw, .signature-center { display: flex; flex-direction: column; gap: 8px; }
  .signature-caption, .signature-pad, .signature-draw-tools, .signature-show, .btn-sign-clear, .signature-save {
    grid-column: auto; grid-row: auto;
  }
}
@media print {
  @page { size: A4 portrait; margin: 8mm; }
  html, body { background: #fff !important; height: auto !important; }
  .sidebar, .topbar, .section-bar, .app-navbar, .no-print, .loader, #toasts, #modal-root, .menu-backdrop { display: none !important; }
  .app, .app-body, .main {
    display: block !important;
    background: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    min-height: 0 !important;
    box-shadow: none !important;
  }
  .invoice-sheet {
    box-shadow: none !important;
    border: 1px solid #cbb896 !important;
    border-radius: 0 !important;
    border-top: 6px solid #14532d !important;
    padding: 8mm 8mm 10mm !important;
    min-height: 271mm;
    display: flex;
    flex-direction: column;
  }
  .inv-head, .inv-meta { grid-template-columns: 1fr 1fr 1fr !important; }
  .inv-head { grid-template-columns: 1fr auto !important; }
  .inv-foot { grid-template-columns: 1fr 55mm !important; }
  .inv-signs { grid-template-columns: 1fr 1fr !important; margin-top: auto; }
  .inv-brand h1 { font-size: 22px; }
  .inv-table thead th, .inv-table tbody td { padding: 5px 7px; font-size: 11.5px; }
  .inv-thumb, img.inv-thumb { width: 22px; height: 22px; }
  .inv-signs { margin-top: auto; }
  .inv-sign { min-height: 72px; }
  .e-sign, img.e-sign { height: 48px; }
  tbody tr:hover { background: transparent; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
