/* Theme for every screen. Use these tokens. Do not add new hex colors.
   Sidebar navy, actions darker teal, page off-white, cards white, headings slate.
   Status: --ok delivered, --wait in transit, --bad delayed. Icons: <x-icon name="..." /> */
:root {
    --bg: #f8fafc;
    --card: #ffffff;
    --ink: #334155;
    --heading: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --navy: #163a5f;
    --teal: #14b8a6;
    --teal-dark: #0f766e;
    --teal-soft: #e7f8f5;
    --teal-light: #99f6e4;
    --ok: #16a34a;
    --ok-soft: #dcfce7;
    --wait: #f59e0b;
    --wait-soft: #fef3c7;
    --bad: #dc2626;
    --bad-soft: #fee2e2;
    --teal-darker: #115e59;
    --shadow: 0 8px 24px rgba(22, 58, 95, .06);
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.5 "Segoe UI", system-ui, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--teal-dark); text-decoration: none; }
.table-wrap a:not(.icon-act),
.facts a { font-weight: 600; border-radius: 4px; transition: background .16s ease, color .16s ease; }
.table-wrap a:not(.icon-act):hover,
.facts a:hover { background: var(--teal-soft); color: var(--navy); }
button, input, select, textarea { font: inherit; color: inherit; }
.shell { min-height: 100vh; display: flex; }
.side { width: 168px; flex: none; background: var(--navy); padding: 8px 6px; display: flex; flex-direction: column; gap: 2px; transition: width .16s ease, padding .16s ease; }
.side-brand { display: block; margin: 0 2px 6px; padding: 4px; border-radius: 8px; background: var(--card); text-decoration: none; }
.side-brand img { display: block; width: 100%; height: auto; }
.qa-link { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 2px 2px 4px; padding: 5px 8px; border-radius: 8px; background: var(--teal-dark); color: #fff; text-decoration: none; font-size: 12px; font-weight: 700; transition: background .16s ease, transform .16s ease; }
.qa-link:hover { background: var(--teal-darker); color: #fff; }
.side nav { display: grid; gap: 1px; }
.side nav a { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 8px; color: rgba(255, 255, 255, .86); text-decoration: none; font-size: 12.5px; font-weight: 600; transition: background .16s ease, color .16s ease; }
.side .icon { width: 15px; height: 15px; }
.side nav a.active, .side nav a:hover { background: color-mix(in srgb, var(--teal) 28%, transparent); color: var(--teal-light); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 16px; min-height: 40px; padding: 4px 16px; background: rgba(255, 255, 255, .9); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top-nav { display: flex; align-items: center; gap: 8px; }
.top-nav .drop-btn { display: inline-flex; align-items: center; gap: 6px; padding: 4px 14px; }
.top-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.top select { border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; background: #fff; max-width: 180px; }
.drop { position: relative; }
.drop-btn { border: 0; background: transparent; border-radius: 8px; padding: 3px 8px; cursor: pointer; font-weight: 700; color: var(--navy); transition: background .16s ease, color .16s ease; }
.drop-btn:hover, .drop.open > .drop-btn { background: var(--teal-soft); color: var(--teal-dark); }
.user-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font-size: 11px; font-weight: 700; }
.caret { display: inline-block; width: 0; height: 0; margin-left: 2px; border-top: 5px solid currentColor; border-right: 4px solid transparent; border-left: 4px solid transparent; }
.drop-panel { display: none; position: absolute; top: calc(100% + 8px); left: 0; min-width: 220px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); z-index: 30; }
.drop-panel.blank { min-height: 36px; }
.user-drop .drop-panel { left: auto; right: 0; min-width: 160px; }
.drop.open > .drop-panel { display: block; animation: rise .16s ease; }
.drop-panel a, .drop-panel button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; text-decoration: none; color: var(--navy); background: transparent; border: 0; border-radius: 10px; padding: 9px 12px; cursor: pointer; transition: background .16s ease, color .16s ease; }
.drop-panel a:hover, .drop-panel button:hover, .drop-panel a.active { background: var(--teal-soft); color: var(--teal-dark); }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .22s ease; }
.btn, .act { display: inline-flex; align-items: center; gap: 8px; }
.empty { display: flex; }
.side nav a:hover .icon, .drop-panel a:hover .icon, .act:hover .icon { transform: translateX(3px); }
.qa-link:hover .icon, .btn:hover .icon { transform: translateY(-1px) scale(1.08); }
.card-link:hover .icon { transform: translateY(-2px); }
.qa-btn { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; flex: none; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--navy); cursor: pointer; }
.qa-btn:hover { background: var(--teal-soft); color: var(--teal-dark); }
.qa-btn .icon { width: 15px; height: 15px; }
.shade { display: none; }
.page-title { margin: 0 0 2px; font-size: 14px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; color: var(--heading); }
.content { padding: 6px 8px 8px; }
.lead { margin-top: 0; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.card-link { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease; }
.card-link:hover { border-color: color-mix(in srgb, var(--teal) 45%, white); transform: translateY(-2px); }
.card-ico { width: 36px; height: 36px; margin-bottom: 12px; border-radius: 10px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal-dark); }
.card-link strong { display: block; font-size: 28px; letter-spacing: -.03em; color: var(--heading); }
.card-link span { color: var(--muted); }
.toolbar { display: flex; gap: 6px; justify-content: space-between; align-items: center; margin-bottom: 4px; flex-wrap: wrap; }
.search { display: flex; gap: 6px; flex: 1; min-width: 180px; align-items: center; }
.search-box { display: flex; align-items: center; gap: 6px; flex: 1; max-width: 280px; padding: 0 8px; border: 1px solid #dbe3ee; border-radius: 6px; background: #fff; color: var(--muted); }
.search-box input { border: 0; padding: 2px 0; background: transparent; box-shadow: none; }
.search-box:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 28%, transparent); color: var(--teal-dark); }
.btn { border: 0; border-radius: 6px; padding: 2px 8px; min-height: 24px; font-size: 12px; gap: 4px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; background: var(--teal-dark); color: #fff; font-weight: 700; transition: background .16s ease, color .16s ease; }
.btn .icon { width: 13px; height: 13px; }
.btn:hover { background: var(--teal-darker); color: #fff; }
.btn.ghost { background: #fff; color: var(--navy); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--teal-soft); color: var(--teal-dark); }
.field input, .field select, .field textarea, .search input { width: 100%; border: 1px solid #dbe3ee; border-radius: 8px; padding: 5px 8px; background: #fff; }
.search input { max-width: none; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus, .top select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 28%, transparent); }
.search-box input:focus { outline: none; border: 0; box-shadow: none; }
.field textarea { min-height: 52px; resize: vertical; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 0 0 2px; }
.table-wrap { overflow: hidden; }
.table-wrap table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 12.5px; line-height: 1.25; }
.table-wrap th, .table-wrap td:not(.empty) { overflow: hidden; max-width: 0; }
th, td { text-align: left; padding: 2px 6px; border-bottom: 1px solid #eef2f7; vertical-align: middle; overflow-wrap: anywhere; white-space: normal; }
.sheet col.acts { width: 124px; }
.table-wrap td.row-actions { width: 124px; max-width: none; padding: 1px 2px; overflow: visible; }
th { color: var(--muted); font-size: 11px; letter-spacing: .02em; text-transform: uppercase; font-weight: 700; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; align-items: center; white-space: nowrap; max-width: none; }
.row-actions form { margin: 0; }
.mail-picks { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.mail-picks button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 10px; cursor: pointer; }
.token-list { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 8px; padding: 0; color: var(--muted); font-size: 12px; }
.token-list code { color: var(--navy); }
.icon-act { width: 22px; height: 22px; border: 0; border-radius: 6px; background: var(--teal-soft); color: var(--teal-dark); display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; text-decoration: none; }
.row-actions .icon { width: 14px; height: 14px; }
.icon-act.edit { background: color-mix(in srgb, var(--navy) 12%, white); color: var(--navy); }
.icon-act.delete, .row-actions button.icon-act.delete { background: var(--bad-soft); color: var(--bad); }
.icon-act:hover .icon { transform: translateY(-1px) scale(1.08); }
.empty { color: var(--muted); text-align: center; padding: 28px; justify-content: center; }
.badge { border-radius: 999px; padding: 3px 8px; font-size: 12px; font-weight: 700; }
.badge.on { background: var(--ok-soft); color: var(--ok); }
.badge.wait { background: var(--wait-soft); color: #92400e; border: 1px solid var(--wait); }
.badge.off { background: var(--bad-soft); color: var(--bad); }
.pager { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 4px 6px; font-size: 12px; color: var(--muted); }
.page-size { display: flex; align-items: center; gap: 4px; margin: 0; }
.page-size select { border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; background: var(--card); font-size: 12px; color: var(--ink); }
.page-links { display: flex; gap: 4px; align-items: center; }
.page-links a, .page-links .num { min-width: 22px; height: 22px; padding: 0 4px; display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; text-decoration: none; }
.page-links .num.on { background: var(--teal-dark); color: #fff; }
.page-links a:hover { background: var(--teal-soft); color: var(--teal-dark); }
.pager .off { color: #9aa; }
.flash { padding: 12px 14px; border-radius: 12px; margin-bottom: 12px; }
.flash.ok { background: var(--ok-soft); color: var(--ok); }
.flash.wait { background: var(--wait-soft); color: #92400e; }
.flash.bad { background: var(--bad-soft); color: var(--bad); }
.form { padding: 8px 10px 10px; }
.grid { display: grid; gap: 8px; margin-bottom: 6px; }
h2 { font-size: 12px; margin: 6px 0 2px; color: var(--heading); }
.field { display: grid; gap: 2px; }
.field span { font-size: 13px; color: var(--muted); font-weight: 600; }
.field i { color: var(--bad); font-style: normal; }
.field small { color: var(--bad); }
.choices, .checks { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.choices label, .checks label { display: flex; gap: 6px; align-items: center; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; }
input[type="checkbox"] { accent-color: var(--teal-dark); }
.form-actions { display: flex; gap: 8px; margin-top: 16px; }
.file-link { font-size: 13px; }
.login-body { min-height: 100vh; margin: 0; background: radial-gradient(720px 360px at 100% 0%, color-mix(in srgb, var(--teal) 16%, white), transparent 60%), var(--bg); }
.login-split { min-height: 100vh; display: grid; grid-template-columns: 1.15fr .85fr; }
.login-poster { min-height: 100vh; background: var(--navy); display: flex; align-items: center; justify-content: center; padding: 28px; }
.login-poster img { width: 100%; height: auto; max-height: calc(100vh - 56px); object-fit: contain; border-radius: 16px; display: block; }
.login-pane { display: flex; align-items: center; justify-content: center; padding: 32px 24px; }
.login-card { width: min(420px, 100%); margin: 0; background: color-mix(in srgb, var(--card) 92%, transparent); border: 1px solid var(--line); border-radius: 22px; padding: 32px 28px; display: grid; gap: 14px; box-shadow: var(--shadow); animation: rise .4s ease; }
.login-hello { text-align: center; }
.login-hello img { width: 72px; height: 72px; object-fit: contain; margin: 0 auto 8px; display: block; }
.login-card h1 { margin: 0; font-size: 30px; letter-spacing: -.03em; color: var(--heading); }
.login-card .lead { margin: 4px 0 6px; }
.login-card .field span { display: flex; align-items: center; gap: 6px; }
.login-card .field .icon { width: 14px; height: 14px; color: var(--teal-dark); }
.login-card .field input, .login-card .field select { min-height: 42px; border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.login-card .btn { width: 100%; margin-top: 4px; min-height: 44px; border-radius: 12px; padding: 10px 12px; font-size: 15px; }
.brand-mark { margin: 0; color: var(--heading); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; font-size: 13px; }
.powered { margin: 6px 0 0; text-align: center; color: var(--muted); font-size: 12px; }
.powered strong { color: var(--navy); }
.year-pill { border: 1px solid var(--line); background: var(--teal-soft); color: var(--teal-dark); border-radius: 999px; padding: 2px 8px; font-weight: 700; font-size: 12px; white-space: nowrap; }
@media (min-width: 960px) {
    html.qa-off .side { width: 0; padding: 0; gap: 0; overflow: hidden; }
}
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media (min-width: 960px) {
    .grid-2 { grid-template-columns: 1fr 1fr; }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .span-2 { grid-column: span 2; }
    .year-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
}
@media (max-width: 959px) {
    .side { position: fixed; inset: 0 auto 0 0; z-index: 25; transform: translateX(-105%); transition: transform .2s ease; box-shadow: var(--shadow); }
    .side.open { transform: none; }
    .shade.open { display: block; position: fixed; inset: 0; background: rgba(20, 32, 54, .28); z-index: 24; }
    .hide-sm { display: none; }
    .login-split { grid-template-columns: 1fr; }
    .login-poster { min-height: 0; padding: 16px 16px 0; }
    .login-poster img { max-height: 240px; }
    .login-pane { align-items: flex-start; padding: 12px 16px 20px; }
    .login-hello img { width: 56px; height: 56px; }
    .login-card { padding: 18px 16px 20px; gap: 10px; }
    .login-card h1 { font-size: 24px; }
    .top { flex-wrap: wrap; row-gap: 4px; padding: 4px 10px; gap: 8px; }
    .top-nav { gap: 4px; }
    .top-nav .drop-btn { padding: 4px 10px; }
    .top-tools { gap: 6px; }
    .top select { max-width: 128px; }
    .user-name { display: none; }
    .user-btn { gap: 0; padding: 2px; }
    .hide-sm { display: none; }
    .sheet col.hide-sm { width: 0 !important; visibility: collapse; }
    .sheet col.lr-no { width: 24% !important; }
    .sheet col.route-col { width: 34% !important; }
    .sheet col.status-col { width: 24% !important; }
    .sheet col.acts { width: 18% !important; }
    .table-wrap table.sheet { width: 100%; table-layout: fixed; }
    .table-wrap table.sheet th, .table-wrap table.sheet td:not(.empty) { max-width: none; }
    .table-wrap table.sheet td.row-actions { width: auto; }
}
.settings { display: grid; gap: 14px; }
.year-grid { display: grid; gap: 8px; }
.year-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.year-list li { display: flex; flex-wrap: wrap; gap: 6px 14px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: var(--card); }
.year-list strong { color: var(--heading); }
.year-list span { color: var(--muted); }
.color-grid { display: grid; gap: 10px; }
.color-row { display: grid; grid-template-columns: minmax(140px, 1fr) 44px 92px; gap: 10px; align-items: center; }
.color-row span { font-weight: 600; color: var(--heading); }
.color-row input[type="color"] { width: 44px; height: 36px; padding: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; }
.color-row input[type="text"] { font-family: Consolas, ui-monospace, monospace; text-transform: uppercase; }
.sort-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sort-list li { display: flex; align-items: center; gap: 6px; }
.sort-list label { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: var(--card); cursor: pointer; }
.sort-list small { margin-left: auto; color: var(--muted); font-weight: 600; }
.icon-btn { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--navy); display: grid; place-items: center; cursor: pointer; padding: 0; }
.icon-btn:hover { background: var(--teal-soft); color: var(--teal-dark); }
.icon-btn:hover .icon { transform: translateY(-1px); }
@media (min-width: 960px) {
    .settings { grid-template-columns: 1.05fr .95fr; align-items: start; }
}
.perm { width: 100%; }
.perm th, .perm td { text-align: center; }
.perm td:first-child, .perm th:first-child { text-align: left; }
.perm input { width: 16px; height: 16px; }
.toolbar select { border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; background: var(--card); font-size: 12px; }
.chips { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 3px; border-radius: 999px; padding: 1px 6px 1px 4px; font-size: 11px; font-weight: 700; background: var(--wait-soft); color: #92400e; }
.chip .icon { width: 12px; height: 12px; }
.chip.pending .icon { animation: pulse 1.6s ease-in-out infinite; }
.chip.received { background: var(--ok-soft); color: var(--ok); }
.chip.cancelled, .chip.closed { background: var(--bad-soft); color: var(--bad); }
.chip.billed, .chip.lhc, .chip.dummy { background: var(--teal-soft); color: var(--teal-dark); }
.chip.icon-only { width: 26px; height: 26px; justify-content: center; padding: 0; }
.chip.icon-only .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@keyframes pulse { 50% { opacity: .35; } }
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.stat { display: flex; align-items: center; gap: 8px; min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.stat-ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--teal-soft); color: var(--teal-dark); }
.stat-ico .icon { width: 16px; height: 16px; }
.stat-ico.ok { background: var(--ok-soft); color: var(--ok); }
.stat-ico.wait { background: var(--wait-soft); color: #92400e; }
.stat-ico.bad { background: var(--bad-soft); color: var(--bad); }
.stat strong { display: block; color: var(--heading); font-size: 15px; line-height: 1.15; overflow-wrap: anywhere; }
.stat small { color: var(--muted); font-size: 11px; }
.detail-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.detail-tabs { display: flex; flex-wrap: wrap; gap: 0 2px; min-width: 0; }
.detail-tabs a { padding: 6px 10px; text-decoration: none; color: var(--muted); font-weight: 700; font-size: 13px; border-bottom: 2px solid transparent; }
.detail-tabs a.active { color: var(--navy); border-bottom-color: var(--teal-dark); }
.detail-actions { display: flex; gap: 6px; align-items: center; padding-bottom: 4px; }
.detail-search { padding: 6px 8px 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px 14px; margin: 0; padding: 8px 10px 10px; }
.facts dt { font-size: 11px; color: var(--muted); font-weight: 700; }
.facts dd { margin: 0; color: var(--heading); overflow-wrap: anywhere; }
.lr-format a, .lr-format a:hover { color: inherit; text-decoration: none; background: none; font-weight: inherit; }
.lr-format a:hover { color: var(--teal-dark); }
@media (max-width: 959px) {
    .stat-row { grid-template-columns: 1fr 1fr; }
}
.route { display: inline-flex; flex-wrap: wrap; align-items: center; column-gap: 4px; row-gap: 1px; max-width: 100%; white-space: normal; }
.route span { min-width: 0; overflow-wrap: anywhere; }
.route i { width: 16px; height: 2px; flex: none; border-radius: 2px; background: var(--teal); position: relative; }
.route i::after { content: ""; position: absolute; right: -1px; top: -3px; border: 4px solid transparent; border-left-color: var(--teal); }
.stack { display: block; }
.stack.muted { color: var(--muted); font-size: 12px; }
.form .chips { margin-bottom: 8px; }
.lr-6, .lr-3, .lr-2 { display: grid; gap: 6px; margin-bottom: 8px; }
.party-box { border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; background: var(--bg); }
.party-box h2 { margin: 0 0 4px; color: var(--navy); }
.party-box input[readonly], .party-box textarea[readonly] { background: var(--card); }
.mini-lines { display: grid; gap: 6px; margin-top: 8px; }
.mini-line { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: end; }
.mini-line.goods { grid-template-columns: 72px 1fr auto; }
.lr-top, .lr-mid { display: grid; gap: 6px; margin-bottom: 8px; }
.head-preview { display: block; height: 42px; width: auto; max-width: 100%; object-fit: contain; margin-top: 4px; }
@media (min-width: 960px) {
    .lr-6, .lr-mid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .lr-top { grid-template-columns: 1.4fr 1.1fr .8fr 1fr 1fr 1fr; }
    .lr-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lr-2 { grid-template-columns: 1fr 1fr; }
}
.copy-body { background: var(--bg); padding: 16px; }
.copy-bar { width: min(1100px, 100%); margin: 0 auto 10px; display: flex; gap: 8px; align-items: center; }
.print-head { min-height: 78px; margin: 0 0 6px; display: flex; align-items: center; justify-content: center; }
.print-head img { display: block; width: 100%; max-height: 96px; object-fit: contain; object-position: center; }
.print-brand { display: flex; gap: 10px; align-items: center; width: 100%; }
.print-brand img { width: 72px; height: 72px; object-fit: contain; }
.print-brand strong { display: block; font-size: 18px; color: var(--navy); }
.print-brand span { display: block; color: var(--muted); font-size: 11px; font-weight: 600; }
.lr-sheet { width: min(1100px, 100%); margin: 0 auto; background: var(--card); color: var(--heading); font-size: 11px; font-weight: 700; padding: 8px; }
.lr-line { display: flex; align-items: stretch; }
.lr-line > div { padding: 3px 5px; min-width: 0; }
.lr-sheet .box { border: 1px solid var(--heading); }
.lr-sheet .sheet-side { border-left: 1px solid var(--heading); }
.lr-sheet .sheet-side.end { border-bottom: 1px solid var(--heading); }
.lr-sheet .sheet-mark { text-align: center; font-size: 13px; border-bottom: 2px solid var(--heading); align-self: center; }
.lr-sheet .warn { color: var(--bad); }
.lr-sheet .small { font-size: 9px; font-weight: 600; }
.lr-sheet .center { text-align: center; }
.lr-sheet .right { text-align: right; }
.lr-line.foot { border-top: 1px solid var(--heading); margin-top: 2px; }
.stamp { display: block; margin-left: auto; height: 70px; width: auto; max-width: 140px; object-fit: contain; }
.lr-goods { display: grid; grid-template-columns: 10% 40% 10% 10% 10% 20%; }
.lr-goods > div { border: 1px solid var(--heading); padding: 3px 5px; min-height: 22px; text-align: center; }
.lr-goods .span2 { grid-column: span 2; }
.lhc-top, .lhc-split, .lhc-papers, .lhc-band, .pay-split, .lhc-rate, .lhc-exp { display: grid; gap: 6px; }
.lhc-top, .lhc-split, .lhc-band, .bill-top { margin-bottom: 8px; }
.bill-top { display: grid; gap: 6px; }
.lhc-sheet { width: 100%; border-collapse: collapse; }
.lhc-sheet th { color: var(--muted); font-size: 11px; letter-spacing: .02em; text-transform: uppercase; text-align: left; padding: 2px 4px; }
.lhc-sheet td { padding: 2px 4px; vertical-align: middle; }
.lhc-sheet input, .charge input, .charge select { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; background: var(--card); }
.lhc-sheet .acts { width: 52px; white-space: nowrap; }
.lhc-sheet tfoot td { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.charge { display: grid; grid-template-columns: 1.4fr .8fr; gap: 4px; margin-top: 4px; }
.mode-row { display: grid; gap: 6px; margin-top: 6px; align-items: end; }
.check { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--navy); min-height: 28px; }
.field-error { color: var(--bad); display: block; margin: 0 0 8px; }
.lhc-goods { grid-template-columns: 22% 46% 16% 16%; }
.bill-goods { grid-template-columns: 22% 46% 16% 16%; }
@media (min-width: 960px) {
    .lhc-top { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .bill-top { grid-template-columns: 1fr 1.4fr 1fr; }
    .lhc-split { grid-template-columns: 1fr 1fr; align-items: start; }
    .lhc-papers { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .lhc-band { grid-template-columns: 1fr 1fr 2fr; align-items: start; }
    .lhc-rate { grid-template-columns: 2fr 1fr; }
    .pay-split { grid-template-columns: 1fr 1fr 1fr; }
    .mr-pay { grid-template-columns: 1fr 1.15fr 1.3fr .9fr; align-items: start; }
    .lhc-exp { grid-template-columns: 1fr 120px 28px; align-items: end; }
    .lhc-exp-box { width: 50%; }
    .mode-row { grid-template-columns: 88px 1fr 1fr; }
}
@media (max-width: 959px) {
    .lhc-sheet thead { display: none; }
    .lhc-sheet, .lhc-sheet tbody, .lhc-sheet tr, .lhc-sheet td { display: block; width: 100%; }
    .lhc-sheet td.acts { display: flex; gap: 4px; width: auto; }
    .lhc-sheet td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 700; color: var(--muted); }
    .lhc-sheet tfoot tr { display: grid; grid-template-columns: 1fr 1fr; }
    .lhc-sheet tfoot td[colspan] { display: none; }
}
.lr-goods .tall { grid-row: span 5; display: flex; align-items: center; justify-content: center; }
.lr-pdf { width: min(1120px, 100%); min-height: 198mm; margin: 0 auto; box-sizing: border-box; display: flex; flex-direction: column; background: var(--card); color: var(--heading); font-size: 10px; font-weight: 600; padding: 6px; font-family: Arial, Helvetica, sans-serif; }
.lr-letter { margin: 0 0 2px; color: var(--heading); line-height: 1.15; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.lr-letter-top { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: start; gap: 8px; font-size: 12px; font-weight: 700; }
.lr-letter-top .pray { text-align: center; font-size: 11px; font-weight: 600; }
.lr-letter-top .phones { text-align: right; white-space: nowrap; }
.lr-letter-mid { position: relative; min-height: 76px; display: flex; align-items: center; justify-content: center; text-align: center; margin-top: 1px; }
.lr-letter-mid img { position: absolute; left: 0; top: 50%; width: 70px; max-height: 74px; height: auto; object-fit: contain; transform: translateY(-50%); }
.lr-letter-mid strong { display: block; color: #e60192; font-size: 46px; font-weight: 800; letter-spacing: -.02em; line-height: .95; white-space: nowrap; }
.lr-letter-mid em { display: block; color: #e60192; font-size: 23px; font-weight: 700; font-style: italic; margin-top: 2px; }
.lr-letter-addr { text-align: center; font-size: 11px; font-weight: 700; margin-top: 4px; }
.lr-box { flex: 1; display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--heading); }
.lr-row { flex: 1; display: grid; grid-template-columns: 82% 18%; width: 100%; min-height: 0; }
.lr-maincol, .lr-rail { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.lr-rail { border-left: 1px solid var(--heading); font-size: 10px; font-weight: 650; }
.lr-rail .f { flex: 1 1 0; border-bottom: 1px solid var(--heading); padding: 5px 6px; min-height: 0; }
.lr-rail .remark, .lr-rail .f:last-child { flex: 0 0 auto; }
.lr-rail .remark { display: flex; flex-direction: column; padding: 3px 6px 2px; }
.lr-rail .remark .tag { text-align: left; font-weight: 650; }
.lr-rail .remark .pay { text-align: center; font-weight: 800; line-height: 1.15; padding-top: 1px; }
.lr-rail .f:last-child { border-bottom: 0; }
.lr-rail .f b, .lr-rail .f span { display: block; font-weight: 800; }
.lr-rail .big { font-size: 12px; }
.lr-rail .tall { min-height: 36px; }
.lr-maincol table { width: 100%; border-collapse: collapse; border-spacing: 0; table-layout: fixed; }
.lr-maincol th, .lr-maincol td { border: 0; border-right: 1px solid var(--heading); border-bottom: 1px solid var(--heading); padding: 4px 6px; vertical-align: top; color: var(--heading); text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 10px; line-height: 1.35; text-align: left; overflow-wrap: normal; word-break: normal; }
.lr-maincol tr > :last-child { border-right: 0; }
.lr-items tr:last-child > * { border-bottom: 0; }
.lr-items tr:nth-child(3) > td[rowspan] { border-bottom: 0; }
.lr-band { display: grid; grid-template-columns: 24% 40% 36%; align-items: stretch; border-bottom: 1px solid var(--heading); }
.lr-band .demur-col, .lr-band .mid-col { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--heading); }
.lr-band .demur { border-bottom: 1px solid var(--heading); padding: 0 0 3px; font-size: 9px; line-height: 1.25; }
.lr-band .demur .h { text-align: center; font-weight: 800; white-space: nowrap; font-size: 8px; border-bottom: 1px solid var(--heading); padding: 2px 4px; }
.lr-band .demur > div:not(.h) { padding: 1px 5px 0; }
.lr-band .notice-box { flex: 1; padding: 3px 5px 4px; font-size: 8px; line-height: 1.25; color: var(--bad); }
.lr-band .notice-title { text-align: center; font-weight: 800; margin-bottom: 2px; }
.lr-band .lr-copy { text-align: center; font-weight: 800; color: var(--bad); white-space: nowrap; padding: 1px 4px 2px; border-bottom: 1px solid var(--heading); }
.lr-band .risk-head { text-align: center; font-weight: 800; padding: 3px 4px 2px; line-height: 1.25; border-bottom: 1px solid var(--heading); }
.lr-band .insure { text-align: center; font-weight: 800; padding: 2px 4px 1px; }
.lr-band .risk-box { margin: 2px 6px 0; border: 1px solid var(--heading); padding: 3px 6px 4px; }
.lr-band .iba { margin-top: auto; text-align: center; font-weight: 800; padding: 4px 4px 3px; }
.lr-band .caution { display: flex; flex-direction: column; padding: 2px 6px 0; min-width: 0; }
.lr-band .caution-rule { margin: 4px -6px 3px; border-top: 1px solid var(--heading); }
.lr-band .h, .lr-band .cn, .lr-band .cn-no { text-align: center; font-weight: 800; }
.lr-band .cn-box { margin: auto -6px 0; border-top: 1px solid var(--heading); text-align: center; padding: 3px 6px 4px; }
.lr-band .cn { font-size: 11px; }
.lr-band .cn-no b { font-size: 18px; margin-left: 6px; color: var(--bad); }
.lr-band .line { display: flex; align-items: flex-end; gap: 6px; margin-top: 2px; }
.lr-band .line i { flex: 1; min-height: 12px; }
.lr-band .line i.short { flex: 0.55; }
.lr-parties .who b, .lr-parties .dots { display: block; }
.lr-parties .dots { min-height: 22px; margin-top: 4px; }
.lr-parties .trip { vertical-align: middle; }
.lr-items { flex: 1; display: table; height: 100%; }
.lr-items tr:last-child { height: 100%; }
.lr-items th { text-align: center; font-weight: 800; white-space: nowrap; font-size: 9px; vertical-align: middle; }
.lr-items td { text-align: center; vertical-align: middle; }
.lr-items .desc { position: relative; height: 100%; text-align: center; vertical-align: middle; padding: 8px 8px 6px; }
.lr-items .desc-in { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; height: 100%; }
.lr-items .goods { font-weight: 700; text-align: center; }
.lr-items .endorse { position: absolute; left: 50%; top: 22%; z-index: 0; width: 74%; margin: 0; transform: translate(-50%, -50%) rotate(-16deg); font-size: 8px; font-weight: 600; line-height: 1.3; text-align: center; color: rgba(15, 23, 42, .28); pointer-events: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.lr-items .veh { position: absolute; left: 8px; right: 8px; bottom: 4px; z-index: 1; margin: 0; padding: 0; text-align: left; font-weight: 700; }
.lr-items .rate-stack, .lr-items .amt-stack { padding: 0; height: 1px; }
.lr-items .stack-in { display: flex; flex-direction: column; height: 100%; }
.lr-items .rate-main { flex: 1; display: flex; flex-direction: column; justify-content: space-between; min-height: 0; padding: 6px 6px 4px; border-bottom: 1px solid var(--heading); }
.lr-items .rate-gap { flex: 0.18 0 0; min-height: 22px; }
.lr-items .mazdoor, .lr-items .ch { text-align: left; line-height: 1.15; font-weight: 700; }
.lr-items .rate-main > .mid { margin-top: auto; margin-bottom: 10px; text-align: center; font-weight: 700; }
.lr-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0; padding: 2px 0 0; font-size: 10px; font-weight: 700; line-height: 1.2; }
.lr-foot .for { margin-left: auto; text-align: right; color: var(--bad); white-space: nowrap; }
.lr-thanks { margin: 0; padding: 0; font-size: 10px; font-weight: 800; line-height: 1.2; }
.lhc-phones { text-align: right; font-size: 11px; font-weight: 700; }
.lhc-brand { display: grid; grid-template-columns: 58px 1fr; gap: 8px; align-items: center; margin: 0 0 4px; }
.lhc-brand img { width: 58px; height: auto; max-height: none; object-fit: contain; }
.lhc-brand strong { display: block; text-align: center; color: #e60192; font-size: 22px; font-weight: 800; line-height: 1; letter-spacing: -.01em; }
.lhc-brand div div { text-align: center; font-size: 11px; font-weight: 700; line-height: 1.2; }
body.lhcp-page .copy-bar { width: min(190mm, 100%); }
.lhcp { width: min(190mm, 100%); min-height: 270mm; margin: 0 auto; box-sizing: border-box; display: flex; flex-direction: column; background: #fff; color: var(--heading); font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-weight: 650; padding: 4px 6px 6px; page: lhc-page; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.lhcp-phones { text-align: right; font-size: 11px; font-weight: 700; white-space: nowrap; }
.lhcp-brand { display: grid; grid-template-columns: 68px 1fr; gap: 6px; align-items: center; margin: 0 0 4px; }
.lhcp-brand img { width: 64px; height: auto; object-fit: contain; }
.lhcp-brand strong { display: block; text-align: center; color: #e60192; font-size: 22px; font-weight: 800; line-height: 1; letter-spacing: -.01em; white-space: nowrap; }
.lhcp-brand div div { text-align: center; font-size: 11px; font-weight: 700; line-height: 1.25; }
.lhcp-challan { display: grid; grid-template-columns: 1.5fr .9fr 1fr; gap: 16px; align-items: flex-end; padding: 1px 2px 3px; }
.lhcp-challan span { display: flex; align-items: flex-end; gap: 6px; white-space: nowrap; }
.lhcp-challan b { flex: 1; min-height: 14px;  font-weight: 800; }
.lhcp-box { flex: 1; display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--heading); }
.lhcp table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.lhcp th, .lhcp td { border: 0; border-right: 1px solid #111; padding: 3px 5px; vertical-align: middle; color: var(--heading); text-transform: none; letter-spacing: 0; font-weight: 650; font-size: 11px; line-height: 1.2; text-align: left; overflow-wrap: normal; word-break: normal; background-color: #fff; background-image: linear-gradient(#111, #111); background-size: 100% 1px; background-repeat: no-repeat; background-position: left bottom; background-origin: border-box; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.lhcp tr > :last-child { border-right: 0; }
.lhcp-meta td b, .lhcp-pay b { font-weight: 800; }
.lhcp-meta td { white-space: nowrap; height: 24px; padding: 3px 2px; overflow: hidden; }
.lhcp-goods { flex: 1; height: 100%; border-collapse: separate; border-spacing: 0; }
.lhcp-goods th, .lhcp-goods td { border: 0; padding: 0; position: relative; vertical-align: top; background-image: linear-gradient(#111, #111); background-size: 100% 1px; background-repeat: no-repeat; background-position: left bottom; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.lhcp-goods .g { box-sizing: border-box; min-height: 22px; padding: 4px 3px; border-right: 1px solid #111; border-bottom: 0; background-image: linear-gradient(#111, #111); background-size: 100% 1px; background-repeat: no-repeat; background-position: left bottom; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.lhcp-goods tr > :last-child .g { border-right: 0; }
.lhcp-goods th { height: 1px; }
.lhcp-goods th .g { display: flex; align-items: center; justify-content: center; height: 100%; text-align: center; font-size: 9px; font-weight: 800; line-height: 1.15; white-space: normal; }
.lhcp-goods td .g { text-align: center; }
.lhcp-goods tr.fill { height: 100%; }
.lhcp-goods tr.fill td { height: 100%; }
.lhcp-goods tr.fill .g { position: absolute; inset: 0; height: auto; }
.lhcp-goods td.contents .g { text-align: left; }
.lhcp-lower > tbody > tr > td { vertical-align: top; padding: 0; height: 1px; background-image: none; }
.lhcp-lower tr:last-child > td { border-bottom: 0; background-image: none; }
.lhcp-pay table { height: auto; }
.lhcp-pay td { height: auto; min-height: 22px; overflow: hidden; vertical-align: middle; border-bottom: 1px solid #111; background-image: none; }
.lhcp-pay tr.sum td { padding: 5px 4px; line-height: 1.2; white-space: normal; }
.lhcp-pay .paid { height: auto; padding: 4px 6px 6px; line-height: 1.45; overflow: visible; }
.lhcp-pay .paid { height: auto; padding: 4px 6px 6px; line-height: 1.45; }
.lhcp-pay .paid div + div { margin-top: 2px; }
.lhcp-pay .rs { white-space: nowrap; }
.lhcp-pay .dots, .lhcp-side .dots { display: inline-block; min-width: 36px; border-bottom: 0; padding: 0 4px; font-weight: 800; line-height: 1; }
.lhcp-pay .wide { min-width: 70%; }
.lhcp-sign { text-align: center; vertical-align: middle; }
.lhcp-sign .sig { width: 72px; height: 64px; margin: 4px auto 2px; border: 1px solid var(--heading); display: flex; align-items: center; justify-content: center; }
.lhcp-sign img { display: block; max-width: 66px; max-height: 58px; object-fit: contain; }
.lhcp-sign span { display: block; font-weight: 800; }
.lhcp-side { display: flex; flex-direction: column; height: 100%; box-sizing: border-box; padding: 4px 6px 0; font-size: 11px; line-height: 1.35; }
.lhcp-side .pan, .lhcp-side .hindi { display: flex; align-items: flex-end; gap: 6px; min-height: 20px; margin-bottom: 3px; }
.lhcp-side .pan span, .lhcp-side .hindi span { white-space: nowrap; }
.lhcp-side .dots { flex: 1; min-height: 14px; }
.lhcp-side .hindi i { display: inline-block; min-width: 28px; margin: 0 4px; border-bottom: 1px solid var(--heading); text-align: center; font-style: normal; font-weight: 800; }
.lhcp-side .late { font-weight: 800; margin: 0 0 4px; }
.lhcp-terms { flex: 1; margin: 2px -6px 0; border-top: 1px solid var(--heading); padding: 4px 6px 14px; }
.lhcp-terms div { margin: 0 0 4px; }
.lhcp-terms div:last-child { margin-top: 6px; margin-bottom: 2px; }
.lhcp-terms .lead { display: flex; align-items: flex-end; }
.lhcp-terms .lead i { flex: 1; min-width: 16px; border-bottom: 0; margin-left: 4px; }
.lhcp-foot { display: grid; grid-template-columns: 1.15fr 1fr 1.2fr .9fr; padding: 6px 4px 0; font-size: 12px; font-weight: 800; }
.mr-pay { display: grid; gap: 8px; }
.charge.three { grid-template-columns: 1.2fr .5fr .7fr; }
.mr-sheet { width: min(210mm, 100%); margin: 0 auto; background: var(--card); color: var(--heading); border: 0; font-size: 10px; font-weight: 700; }
.mr-sheet table { width: 100%; border-collapse: collapse; border-spacing: 0; }
.mr-sheet td, .mr-sheet th { border: 0; border-top: 1px solid var(--heading); border-left: 1px solid var(--heading); padding: 3px 4px; color: var(--heading); text-transform: none; letter-spacing: 0; text-align: center; }
.mr-sheet tr > :last-child { border-right: 1px solid var(--heading); }
.mr-sheet table > :last-child > tr:last-child > * { border-bottom: 1px solid var(--heading); }
.mr-sheet table + table tr:first-child > * { border-top: 0; }
.mr-sheet .party, .mr-sheet .label { text-align: left; }
.mr-sheet .right { text-align: right; }
.mr-sheet .center { text-align: center; }
.mr-sheet .sign { text-align: right; min-height: 70px; }
.mr-sheet .print-head, .mr-sheet .lhc-letter { margin: 0; border: 1px solid var(--heading); border-bottom: 0; }
.mr-sheet .lhc-letter { padding: 4px 8px 2px; }
.tax-bill { width: min(210mm, 100%); margin: 0 auto; background: var(--card); color: var(--heading); border: 0; font-size: 8px; font-weight: 700; }
.tax-bill .print-head, .tax-bill .lhc-letter { margin: 0; border: 1px solid var(--heading); border-bottom: 0; min-height: 92px; }
.tax-bill .lhc-letter { padding: 4px 8px 2px; }
.tax-bill .print-head img { max-height: 120px; }
.tax-bill table { width: 100%; border-collapse: collapse; border-spacing: 0; }
.tax-bill td, .tax-bill th { border: 0; border-top: 1px solid var(--heading); border-left: 1px solid var(--heading); padding: 3px 4px; vertical-align: top; font-weight: 700; color: var(--heading); text-transform: none; letter-spacing: 0; }
.tax-bill tr > :last-child { border-right: 1px solid var(--heading); }
.tax-bill table > :last-child > tr:last-child > * { border-bottom: 1px solid var(--heading); }
.tax-bill table + table > thead:first-child > tr:first-child > *,
.tax-bill table + table > tbody:first-child > tr:first-child > * { border-top: 0; }
.tax-bill .party td:first-child { width: 68%; }
.tax-bill .party td:last-child div { display: grid; grid-template-columns: 92px 1fr; gap: 8px; padding: 1px 0; }
.tax-bill .name { font-size: 11px; margin: 2px 0; }
.tax-bill .gst { margin-top: 8px; }
.tax-bill .party th { text-align: center; font-size: 12px; letter-spacing: .02em; padding: 4px; }
.tax-bill .notes { table-layout: fixed; }
.tax-bill .notes th { text-align: center; font-size: 11px; font-weight: 800; line-height: 1.15; vertical-align: middle; padding: 4px 3px; }
.tax-bill .notes .part-head { font-size: 13px; letter-spacing: .04em; }
.tax-bill .notes td { height: auto; font-size: 11px; font-weight: 700; line-height: 1.35; vertical-align: middle; }
.tax-bill .notes tr.fill td { height: 58mm; }
.tax-bill .notes tr.fill .story { height: 100%; min-height: 0; }
.tax-bill .notes .cn, .tax-bill .notes .mid, .tax-bill .notes .amt { text-align: center; vertical-align: top; padding-top: 8mm; }
.tax-bill .notes .story { position: relative; text-align: left; vertical-align: top; }
.tax-bill .notes .story-copy { position: relative; z-index: 1; }
.tax-bill .notes .route { font-weight: 800; }
.tax-bill .notes .gst-mark { position: absolute; left: 50%; top: 68%; z-index: 0; width: 94%; margin: 0; transform: translate(-50%, -50%) rotate(-14deg); font-size: 11px; font-weight: 700; line-height: 1.45; letter-spacing: .03em; text-align: center; color: rgba(15, 23, 42, .28); pointer-events: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.tax-bill .notes .gst-mark div { margin: 0; }
.tax-bill .notes .grand td { height: auto; vertical-align: middle; }
.tax-bill .notes .words { text-align: left; font-weight: 800; }
.tax-bill .center { text-align: center; }
.tax-bill .right { text-align: right; }
.tax-bill .settle td:last-child { width: 34%; }
.tax-bill .settle td:last-child span { float: left; }
.tax-bill .settle td:last-child b { float: right; }
.tax-bill .sign { line-height: 1.35; border-bottom: 1px solid var(--heading); }
.tax-bill .sign div { margin: 0 0 2px; }
.tax-bill .signatory { display: table-cell; text-align: right; vertical-align: top; min-height: 78px; border-top: 0; padding-top: 6px; }
.tax-bill .signatory .stamp { display: block; margin: 0 0 4px auto; height: auto; max-height: 84px; }
.tax-bill .role { margin-top: 18px; }
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; padding: 10px; }
.report-card { display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--heading); text-decoration: none; background: var(--bg); }
.report-card:hover { border-color: var(--teal-dark); }
.report-card span { color: var(--muted); font-size: 12px; }
.report-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; padding: 10px; align-items: end; margin-bottom: 10px; }
.report-actions { display: flex; gap: 8px; align-items: center; }
.report-wrap { overflow-x: auto; }
.report-wrap h2 { padding: 10px 12px 0; }
.report-table { table-layout: auto; min-width: 720px; }
.report-table th, .report-table td { white-space: nowrap; }
.report-table .num { text-align: right; }
.report-banner td { background: var(--teal-soft); font-weight: 650; }
.report-total td { font-weight: 650; }
.panel > .lead { padding: 10px 12px 0; }
@media print {
    .copy-bar { display: none; }
    .copy-body { padding: 0; background: #fff; }
    .lr-sheet, .lr-pdf, .lhcp, .tax-bill, .mr-sheet { width: 100%; }
    .lhcp, .lhcp-box, .lhcp-side { display: block !important; }
    .lhcp-side, .lhcp-terms { height: auto !important; overflow: visible !important; }
    .lhcp { min-height: 0; padding: 0; }
    .lhcp-box { border: 0 !important; overflow: visible !important; }
    .lhcp table { border-collapse: separate !important; border-spacing: 0 !important; }
    .lhcp th, .lhcp td, .lhcp .g {
        background-image: none !important;
        box-shadow: none !important;
    }
    .lhcp th, .lhcp td {
        border: 0 !important;
        border-right: 1px solid #000 !important;
        border-bottom: 1px solid #000 !important;
        overflow: visible !important;
    }
    .lhcp tr > :last-child { border-right: 0 !important; }
    .lhcp-meta tr:first-child > * { border-top: 1px solid #000 !important; }
    .lhcp-meta td:first-child,
    .lhcp-goods tr > :first-child,
    .lhcp-pay table td:first-child { border-left: 1px solid #000 !important; }
    .lhcp-meta tr > :last-child,
    .lhcp-goods tr > :last-child { border-right: 1px solid #000 !important; }
    .lhcp .g, .lhcp-goods .g {
        position: static !important;
        inset: auto !important;
        height: auto !important;
        border: 0 !important;
        background-image: none !important;
    }
    .lhcp-goods { display: table !important; height: auto !important; flex: none !important; }
    .lhcp-goods thead { display: table-row-group !important; }
    .lhcp-goods th, .lhcp-goods th .g { height: auto !important; }
    .lhcp-goods th .g { display: block !important; }
    .lhcp-goods tr.fill, .lhcp-goods tr.fill td { height: auto !important; position: static !important; }
    .lhcp-goods tr.fill .g { min-height: 78mm; }
    .lhcp-lower > tbody > tr > td { height: auto !important; border: 0 !important; padding: 0 !important; }
    .lhcp-lower > tbody > tr > td:first-child { border-right: 1px solid #000 !important; border-bottom: 1px solid #000 !important; }
    .lhcp-lower > tbody > tr > td:last-child { border-right: 1px solid #000 !important; border-bottom: 1px solid #000 !important; }
    .lhcp-pay table tr > :last-child { border-right: 0 !important; }
    .lhcp-pay tr:not(:last-child) > td { border-bottom: 1px solid #000 !important; }
    .lhcp-pay tr:last-child > td { border-bottom: 0 !important; }
    .lr-pdf { padding: 0; }
    @page { margin: 8mm; }
    @page lhc-page { size: A4 portrait; margin: 6mm; }
}
