/* RXERPTECH — admin theme */
:root {
    --brand: #0f766e;
    --brand-600: #0d6660;
    --brand-50: #e6f4f2;
    --side-bg: #0f2a2e;
    --side-fg: #b8cfcd;
    --side-active: #14b8a6;
    --ink: #1e293b;
    --muted: #64748b;
    --line: #e2e8f0;
    --bg: #f4f7f8;
    --side-w: 250px;
    --side-w-mini: 76px;
    --bs-primary: #0f766e;
    --bs-primary-rgb: 15, 118, 110;
    --bs-link-color: #0f766e;
    --bs-link-color-rgb: 15, 118, 110;
    --bs-link-hover-color: #0d6660;
}

* { box-sizing: border-box; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--ink); font-size: .9rem; }
a { color: var(--brand); }

.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand-600); --bs-btn-hover-border-color: var(--brand-600); --bs-btn-active-bg: var(--brand-600); --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand); }
.btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); --bs-btn-active-bg: var(--brand); }
.text-bg-primary { background-color: var(--brand) !important; }
.form-control:focus, .form-select:focus { border-color: #5eb8ae; box-shadow: 0 0 0 .2rem rgba(15, 118, 110, .15); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-label { font-weight: 500; font-size: .82rem; color: #334155; margin-bottom: .3rem; }
.form-label .req { color: #dc2626; }

/* ---------- shell ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--side-w); background: var(--side-bg); color: var(--side-fg); position: fixed; inset: 0 auto 0 0; z-index: 1030; display: flex; flex-direction: column; transition: width .2s ease, transform .2s ease; }
.sidebar-brand { height: 62px; display: flex; align-items: center; gap: .65rem; padding: 0 1.15rem; color: #fff; font-weight: 700; font-size: 1.05rem; border-bottom: 1px solid rgba(255,255,255,.06); white-space: nowrap; overflow: hidden; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--side-active); display: grid; place-items: center; flex: 0 0 36px; font-size: 1.15rem; }
.sidebar-nav { overflow-y: auto; padding: .75rem .6rem 1.5rem; flex: 1; }
.sidebar-nav .nav-section { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: #6f8e8b; padding: 1rem .75rem .35rem; white-space: nowrap; }
.sidebar-nav .nav-link { display: flex; align-items: center; gap: .75rem; color: var(--side-fg); padding: .55rem .75rem; border-radius: 8px; margin-bottom: 2px; white-space: nowrap; font-weight: 500; }
.sidebar-nav .nav-link i { font-size: 1.1rem; width: 24px; text-align: center; flex: 0 0 24px; }
.sidebar-nav .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-nav .nav-link.active { background: rgba(20,184,166,.16); color: #fff; box-shadow: inset 3px 0 0 var(--side-active); }
.sidebar-nav .nav-link .badge { margin-left: auto; }
/* collapsible menu groups */
.nav-group { margin-bottom: 2px; }
.nav-group-toggle { display: flex; align-items: center; gap: .75rem; width: 100%; background: none; border: 0; color: var(--side-fg); padding: .55rem .75rem; border-radius: 8px; font-weight: 600; font-size: .9rem; text-align: left; white-space: nowrap; }
.nav-group-toggle > i:first-child { font-size: 1.1rem; width: 24px; text-align: center; flex: 0 0 24px; }
.nav-group-toggle:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-group-toggle:focus-visible { outline: 2px solid var(--side-active); outline-offset: -2px; }
.nav-group-toggle .caret { font-size: .75rem; transition: transform .2s ease; opacity: .7; }
.nav-group-toggle:not(.collapsed) { color: #fff; }
.nav-group-toggle:not(.collapsed) .caret { transform: rotate(180deg); }
.nav-group.is-open > .nav-group-toggle { background: rgba(255,255,255,.04); }
.nav-group-items { padding: 2px 0 6px 14px; margin-left: .95rem; border-left: 1px solid rgba(255,255,255,.08); }
.nav-group-items .nav-link { padding: .45rem .65rem; font-size: .88rem; }
.nav-group-items .nav-link i { font-size: 1rem; }

.main { flex: 1; margin-left: var(--side-w); display: flex; flex-direction: column; min-width: 0; transition: margin .2s ease; }
.topbar { height: 62px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: .75rem; padding: 0 1.25rem; position: sticky; top: 0; z-index: 1020; }
.page-title { font-size: 1.1rem; font-weight: 600; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-icon { width: 38px; height: 38px; border-radius: 8px; display: grid; place-items: center; font-size: 1.3rem; color: var(--ink); }
.btn-icon:hover { background: var(--bg); }
.user-chip { display: flex; align-items: center; gap: .5rem; border: 1px solid var(--line); border-radius: 30px; padding: .25rem .75rem .25rem .3rem; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: .85rem; }
.content { padding: 1.25rem; flex: 1; }
.app-footer { padding: .9rem 1.25rem; color: var(--muted); font-size: .78rem; border-top: 1px solid var(--line); background: #fff; }
.impersonate-bar { background: #b45309; color: #fff; padding: .45rem 1.25rem; font-size: .85rem; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }

/* collapsed (desktop) */
.app-shell.collapsed .sidebar { width: var(--side-w-mini); }
.app-shell.collapsed .main { margin-left: var(--side-w-mini); }
.app-shell.collapsed .brand-text, .app-shell.collapsed .sidebar-nav span, .app-shell.collapsed .nav-section { display: none; }
.app-shell.collapsed .sidebar-nav .nav-link { justify-content: center; }
.app-shell.collapsed .nav-group-toggle { display: none; }
.app-shell.collapsed .nav-group > .collapse { display: block !important; height: auto !important; }
.app-shell.collapsed .nav-group-items { padding: 4px 0; margin: 0; border-left: 0; border-top: 1px solid rgba(255,255,255,.08); }
.app-shell.collapsed .sidebar-nav .badge { display: none; }

@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .main { margin-left: 0 !important; }
    .app-shell.mobile-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.3); }
    .content { padding: 1rem; }
}

/* ---------- panels ---------- */
.card-panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 1.25rem; }
.card-panel > .panel-head { display: flex; align-items: center; gap: .75rem; padding: .9rem 1.15rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-panel > .panel-head h2 { font-size: .98rem; font-weight: 600; margin: 0; }
.card-panel > .panel-body { padding: 1.15rem; }
.panel-head .actions { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem; display: flex; gap: .9rem; align-items: center; height: 100%; color: inherit; text-decoration: none; transition: border-color .15s; }
a.stat-card:hover { border-color: #9fd3cd; }
.stat-icon { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; font-size: 1.3rem; flex: 0 0 44px; background: var(--brand-50); color: var(--brand); }
.stat-icon.amber { background: #fef3c7; color: #b45309; }
.stat-icon.red { background: #fee2e2; color: #b91c1c; }
.stat-icon.blue { background: #dbeafe; color: #1d4ed8; }
.stat-icon.violet { background: #ede9fe; color: #6d28d9; }
.stat-label { color: var(--muted); font-size: .78rem; font-weight: 500; }
.stat-value { font-size: 1.35rem; font-weight: 700; line-height: 1.2; }

/* ---------- tables ---------- */
.table { --bs-table-hover-bg: #f6fbfa; margin-bottom: 0; }
.table > thead th { background: #f1f5f6; color: #334155; font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .02em; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { vertical-align: middle; }
.table-actions { white-space: nowrap; }
.table-actions .btn { padding: .2rem .45rem; }
.table-actions form { display: inline; }
div.dataTables_wrapper div.dataTables_filter input { margin-left: .4rem; }
.pagination { --bs-pagination-color: var(--brand); --bs-pagination-hover-color: var(--brand-600); --bs-pagination-active-bg: var(--brand); --bs-pagination-active-border-color: var(--brand); --bs-pagination-focus-box-shadow: 0 0 0 .2rem rgba(15,118,110,.15); }
div.dataTables_wrapper .row:first-child { margin-bottom: .6rem; }
div.dataTables_wrapper .row:last-child { margin-top: .6rem; }

/* ---------- misc ---------- */
.muted { color: var(--muted); }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: .45rem .75rem; font-size: .88rem; }
.kv dt { color: var(--muted); font-weight: 500; }
.kv dd { margin: 0; }
.limit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.limit-box { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .75rem; }
.limit-box .lbl { font-size: .75rem; color: var(--muted); }
.limit-box .val { font-weight: 700; font-size: 1.05rem; }
.limit-box .progress { height: 5px; margin-top: .35rem; }
.nav-tabs .nav-link { color: var(--muted); font-weight: 500; }
.nav-tabs .nav-link.active { color: var(--brand); font-weight: 600; }
.pill-group { display: flex; flex-wrap: wrap; gap: .45rem; }
.pill-group .btn-check + .btn { border-radius: 30px; padding: .3rem .9rem; font-size: .85rem; }
.ticket-msg { border: 1px solid var(--line); border-radius: 10px; padding: .75rem 1rem; margin-bottom: .75rem; background: #fff; }
.ticket-msg.from-admin { background: var(--brand-50); border-color: #bfe1dc; }
.ticket-msg .meta { font-size: .75rem; color: var(--muted); margin-bottom: .25rem; }
.empty-state { text-align: center; padding: 2rem 1rem; color: var(--muted); }
.empty-state i { font-size: 2rem; display: block; margin-bottom: .4rem; }
.alert-plan { border-radius: 12px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .5rem; }
.perm-grid .form-check { border: 1px solid var(--line); border-radius: 8px; padding: .55rem .75rem .55rem 2.2rem; }

/* ---------- auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { background: linear-gradient(150deg, #0b3345 0%, #0d4f7a 55%, #138a3e 100%); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; }
.auth-art h1 { font-size: 2rem; font-weight: 700; max-width: 420px; }
.auth-art .chain { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.auth-art .chain span { background: rgba(255,255,255,.12); border-radius: 30px; padding: .35rem .85rem; font-size: .82rem; }
.auth-form { display: grid; place-items: center; padding: 2rem; background: #fff; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card .brand-mark { margin-bottom: 1rem; width: 44px; height: 44px; color: #fff; }
@media (max-width: 860px) { .auth-wrap { grid-template-columns: 1fr; } .auth-art { display: none; } }

/* ---------- billing ---------- */
.ac-wrap { position: relative; }
.ac-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 1060; background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-top: 4px; max-height: 360px; overflow-y: auto; }
.ac-item { padding: .55rem .8rem; cursor: pointer; border-bottom: 1px solid #f1f5f6; }
.ac-item:last-child { border-bottom: 0; }
.ac-item.active, .ac-item:hover { background: var(--brand-50); }
.ac-empty { padding: .7rem .9rem; color: var(--muted); font-size: .85rem; }
.bill-grid td { vertical-align: middle; }
.bill-grid.pin-first th:first-child, .bill-grid.pin-first td:first-child { position: sticky; left: 0; z-index: 2; background: #fff; box-shadow: 1px 0 0 var(--line); }
.bill-grid.pin-first th:first-child { background: #f1f5f6; }
.bill-grid .form-control-sm, .bill-grid .form-select-sm { min-width: 60px; }
.totals dl { display: grid; grid-template-columns: 1fr auto; gap: .35rem 1rem; margin: 0; font-variant-numeric: tabular-nums; }
.totals dt { color: var(--muted); font-weight: 500; }
.totals dd { margin: 0; text-align: right; }
.totals .grand { font-size: 1.5rem; font-weight: 700; color: var(--brand); }
.party-chosen { background: var(--brand-50); border: 1px solid #bfe1dc; border-radius: 10px; padding: .55rem .8rem; display: flex; gap: .75rem; align-items: center; }
.kbd { font-family: ui-monospace, monospace; font-size: .72rem; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 .3rem; background: #fff; color: var(--muted); }
.lock-banner { border-radius: 12px; }
.outlet-switch .btn { display: flex; align-items: center; gap: .4rem; }
.tabular { font-variant-numeric: tabular-nums; }
.notif-menu { width: 340px; max-height: 440px; overflow-y: auto; }
.notif-item { border-bottom: 1px solid #f1f5f6; padding: .55rem .9rem; white-space: normal; }
.notif-item.unread { background: var(--brand-50); }
.notif-count { font-size: .62rem; }
.tiny { font-size: .7rem; }
.sidebar-nav .nav-link .badge { font-size: .65rem; }
.order-steps { display: flex; flex-wrap: wrap; gap: .4rem; }
.order-steps .step { font-size: .78rem; padding: .25rem .7rem; border-radius: 30px; background: #eef2f3; color: var(--muted); }
.order-steps .step.done { background: var(--brand-50); color: var(--brand); font-weight: 600; }
.order-steps .step.now { background: var(--brand); color: #fff; font-weight: 600; }
.line-removed td { text-decoration: line-through; color: var(--muted); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 .9rem 1.2rem; border-left: 2px solid var(--line); margin-left: .35rem; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.seller-card { border: 1px solid var(--line); border-radius: 12px; padding: 1rem; height: 100%; display: flex; flex-direction: column; gap: .5rem; background: #fff; }
.seller-card .meta { font-size: .8rem; color: var(--muted); }
.stock-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .35rem; }
.stock-dot.in { background: #16a34a; } .stock-dot.out { background: #dc2626; }

@media print {
    .sidebar, .topbar, .app-footer, .no-print, .toast-container, .impersonate-bar { display: none !important; }
    .main { margin: 0 !important; }
    .content { padding: 0; }
    .card-panel { border: none; }
    body { background: #fff; }
}

/* ---------- Staff & HR ---------- */
.att-cell { display: inline-block; min-width: 24px; padding: 1px 3px; border-radius: 5px; font-size: .72rem; font-weight: 600; text-align: center; text-decoration: none; color: #334155; background: #f1f5f9; }
.att-cell.present { background: #dcfce7; color: #166534; }
.att-cell.half_day { background: #dbeafe; color: #1e40af; }
.att-cell.absent { background: #fee2e2; color: #b91c1c; }
.att-cell.leave { background: #fef3c7; color: #92400e; }
.att-cell.holiday { background: #e2e8f0; color: #334155; }
.att-cell.week_off { background: #f8fafc; color: #64748b; border: 1px solid #e2e8f0; }
.att-cell.nj, .att-cell.future { background: transparent; color: #cbd5e1; }
.att-register th, .att-register td { font-size: .78rem; }
.att-register th .dow { font-weight: 400; color: var(--muted); text-transform: none; }
.att-register th.hol { background: #e2e8f0; }
.att-register .sticky-col { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 150px; }
.att-register thead .sticky-col { background: #f1f5f6; }
.att-calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; max-width: 560px; }
.att-calendar .dow { font-size: .72rem; color: var(--muted); text-align: center; font-weight: 600; }
.att-calendar .day { border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; min-height: 48px; display: flex; flex-direction: column; justify-content: space-between; background: #fff; }
.att-calendar .day .num { font-size: .72rem; color: var(--muted); }
.att-calendar .day .code { font-weight: 700; font-size: .85rem; align-self: flex-end; }
.att-calendar .day.present { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.att-calendar .day.half_day { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.att-calendar .day.absent { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.att-calendar .day.leave { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.att-calendar .day.holiday, .att-calendar .day.week_off { background: #f8fafc; color: #64748b; }
.nav-pills .nav-link.active { background: var(--brand); }
.nav-pills .nav-link { color: #334155; }

/* ---------- Dispatch & tracking ---------- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 .25rem; }
.timeline li { position: relative; display: flex; gap: .75rem; padding-bottom: 1rem; }
.timeline li:not(:last-child)::before { content: ''; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.timeline .tl-dot { flex: 0 0 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .85rem; background: #f1f5f9; color: #475569; }
.timeline .tl-primary .tl-dot { background: #dbeafe; color: #1d4ed8; }
.timeline .tl-info .tl-dot { background: #cffafe; color: #0e7490; }
.timeline .tl-warning .tl-dot { background: #fef3c7; color: #b45309; }
.timeline .tl-success .tl-dot { background: #dcfce7; color: #166534; }
.timeline .tl-danger .tl-dot { background: #fee2e2; color: #b91c1c; }
.timeline .tl-dark .tl-dot { background: #e2e8f0; color: #0f172a; }
.ship-track { border-top: 1px dashed var(--line); padding-top: .75rem; }
.status-form .btn-group .btn { flex: 1 1 auto; }

/* ---------- Month / year picker (purchase expiry) ---------- */
.mmyy-wrap { position: relative; width: 96px; }
.mmyy-wrap .mmyy { padding-right: 26px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.mmyy-btn { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: #64748b; padding: 2px 5px; line-height: 1; border-radius: 4px; }
.mmyy-btn:hover { color: var(--brand); background: #f0fdfa; }
.mmyy-pop { position: absolute; z-index: 1080; width: 220px; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 8px; }
.mmyy-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.mmyy-head button { border: 0; background: #f1f5f9; width: 28px; height: 28px; border-radius: 6px; font-size: 1.1rem; line-height: 1; }
.mmyy-head button:hover { background: #ccfbf1; }
.mmyy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.mmyy-grid button { border: 1px solid #e2e8f0; background: #fff; border-radius: 6px; padding: 6px 0; font-size: .85rem; }
.mmyy-grid button:hover { border-color: var(--brand); color: var(--brand); }
.mmyy-grid button.sel { background: var(--brand); border-color: var(--brand); color: #fff; }
.mmyy-grid button.past { color: #cbd5e1; text-decoration: line-through; }

/* Reports & GST pages */
.report-jump { display: flex; flex-wrap: wrap; gap: 6px; }
.report-jump .btn { font-size: .78rem; }
.report-scroll { max-height: 460px; overflow: auto; }
.report-scroll > .table > thead th { position: sticky; top: 0; z-index: 1; }
.report-scroll > .table > tfoot td { position: sticky; bottom: 0; background: #f8fafb; border-top: 1px solid var(--line); }
.report-table { scroll-margin-top: 80px; }
/* B2B billing: discount limit hint under the Disc % box */
.bill-grid .disc-hint { font-size: .72rem; line-height: 1.1; margin-top: 2px; white-space: nowrap; }

/* Sale screen: totals in one row under the full-width item grid */
.totals-strip { display: flex; flex-wrap: wrap; gap: .5rem 2rem; align-items: flex-end; padding-bottom: .9rem; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.totals-strip > div { display: flex; flex-direction: column; min-width: 96px; }
.totals-strip span { color: var(--muted); font-size: .8rem; font-weight: 500; }
.totals-strip b { font-weight: 600; }
.totals-strip .ts-grand { margin-left: auto; text-align: right; }
.totals-strip .ts-grand b { line-height: 1.1; }
@media (max-width: 575.98px) { .totals-strip { gap: .5rem 1.25rem; } .totals-strip .ts-grand { margin-left: 0; width: 100%; text-align: left; } .pay-panel #saveSale { width: 100%; } }

/* Brand logos (assets/img/brand) */
.sidebar-brand .brand-logo { height: 40px; width: auto; max-width: 200px; object-fit: contain; }
.sidebar-brand .brand-icon { display: none; height: 30px; width: auto; }
.app-shell.collapsed .sidebar-brand { justify-content: center; padding: 0; }
.app-shell.collapsed .sidebar-brand .brand-logo { display: none; }
.app-shell.collapsed .sidebar-brand .brand-icon { display: block; }
.auth-logo { height: 64px; width: auto; }
.auth-card-logo { height: 52px; width: auto; margin-bottom: 1.25rem; }
.doc-logo { height: 46px; width: auto; margin-bottom: .5rem; display: block; }

/* Sale screen: party history, bill discounts, free lines */
.party-history { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; background: #fbfcfd; font-size: .84rem; }
.party-history .ph-stats { display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; }
.party-history .ph-stats b { font-size: .95rem; }
.party-history table { margin: .4rem 0 0; }
.party-history td { padding: .15rem .4rem; }
.bill-disc-box { border-top: 1px dashed var(--line); padding-top: .9rem; }
.bill-disc-row .form-select, .bill-disc-row .form-control { max-width: 190px; }
tr.free-row { background: #f2fbf4; }
tr.free-row td { border-top: 1px dashed #b9e3c3; }
.free-tag { background: #d7f5df; color: #166534; border-radius: 999px; padding: 0 .5rem; font-size: .72rem; font-weight: 700; }

/* ---------- field salesman (phone first) ---------- */
.field-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; margin-bottom: 1rem; }
.field-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; min-height: 92px; padding: .75rem; border-radius: 12px;
    background: #fff; border: 1px solid var(--line); color: inherit; text-decoration: none; font-weight: 600; text-align: center; }
.field-btn i { font-size: 1.6rem; color: var(--bs-primary, #0f766e); }
.field-btn:hover, .field-btn:focus-visible { border-color: #9fd3cd; }
.field-btn.primary { background: var(--bs-primary, #0f766e); border-color: transparent; color: #fff; }
.field-btn.primary i { color: #fff; }
@media (max-width: 575.98px) { .field-actions { grid-template-columns: repeat(2, 1fr); } .field-btn { min-height: 84px; } }
.buyer-cards { display: grid; gap: .6rem; padding: .75rem; }
.buyer-card { border: 1px solid var(--line); border-radius: 12px; padding: .75rem .85rem; background: #fff; }
.reorder-link { white-space: nowrap; font-size: .8rem; }
@media (max-width: 767.98px) {
    .bill-grid { min-width: 820px; }         /* phone: keep columns readable, scroll sideways */
    .bill-grid td:first-child { min-width: 190px; }
    .party-history table td { white-space: nowrap; }
}
