/* ====================================================================== */
/* BetterScan — premium dark UI, RTL-aware. Hand-rolled, no framework deps. */
/* ====================================================================== */

:root {
    --bg-0: #05080c;
    --bg-1: #0f1620;
    --bg-2: #1a2330;
    --bg-3: #232d3c;
    --line: rgba(231, 236, 241, 0.08);
    --on-bg: #e7ecf1;
    --on-bg-dim: #8b95a1;
    --on-bg-faint: #5b6573;
    --accent: #4dd0a8;
    --accent-2: #2fa987;
    --accent-on: #06291f;
    --warn: #ffa94d;
    --error: #ff7a59;
    --shadow-sm: 0 4px 16px rgba(0,0,0,.4);
    --shadow-md: 0 12px 40px rgba(0,0,0,.5);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg-0);
    color: var(--on-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Heebo",
                 "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(900px 600px at 50% -10%, rgba(77, 208, 168, .07), transparent 70%),
        var(--bg-0);
    display: flex;
    flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.muted { color: var(--on-bg-dim); }
.small { font-size: 12px; }
.dot { color: var(--on-bg-faint); margin: 0 .5em; }

[dir="ltr"], .num { font-variant-numeric: tabular-nums; }

/* ---- Site chrome ---- */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 28px;
    border-bottom: 1px solid var(--line);
    background: rgba(15, 22, 32, .6);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 10;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
    font-weight: 600;
    font-size: 17px;
    letter-spacing: .02em;
}
.brand:hover { text-decoration: none; }
.site-nav { display: inline-flex; gap: 18px; }
.site-nav a { color: var(--on-bg-dim); font-size: 14px; }
.site-nav a:hover { color: var(--on-bg); text-decoration: none; }

.site-main {
    flex: 1;
    max-width: 1180px;
    margin: 0 auto;
    width: 100%;
    padding: 32px 24px 64px;
}

.site-footer {
    text-align: center;
    color: var(--on-bg-faint);
    font-size: 12px;
    padding: 24px 16px 32px;
    border-top: 1px solid var(--line);
}
.site-footer a { color: var(--on-bg-dim); }

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 18px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .06s ease, background .12s ease;
    text-decoration: none;
    user-select: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.98); }

.btn-primary {
    background: var(--accent);
    color: var(--accent-on);
}
.btn-primary:hover { background: #5fdcb4; }

.btn-secondary {
    background: var(--bg-2);
    color: var(--on-bg);
    border-color: var(--line);
}
.btn-secondary:hover { background: var(--bg-3); }

.btn-link {
    background: transparent;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
}
.btn-link:hover { color: #6fdfba; }

/* ---- Hero / landing ---- */
.hero {
    text-align: start;
    padding: 32px 0 64px;
}
.hero-eyebrow {
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.hero h1 {
    font-size: clamp(28px, 5vw, 44px);
    line-height: 1.15;
    margin: 0 0 14px;
    font-weight: 700;
    max-width: 22ch;
}
.hero-sub {
    color: var(--on-bg-dim);
    font-size: 17px;
    max-width: 60ch;
    margin: 0 0 32px;
}
.hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.hero-card {
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 22px;
}
.hero-card h3 { margin: 8px 0; font-size: 18px; }
.hero-card p { color: var(--on-bg-dim); margin: 0; font-size: 14px; }
.hero-card-num {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: rgba(77, 208, 168, .15);
    color: var(--accent);
    font-weight: 700;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.hero-foot {
    color: var(--on-bg-faint);
    font-size: 14px;
    margin-top: 24px;
}

/* ---- Batch summary ---- */
.batch-summary {
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 22px;
    box-shadow: var(--shadow-sm);
}
.summary-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: space-between;
}
.summary-row > div { min-width: 0; }
.eyebrow {
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.page-count {
    font-size: 56px;
    font-weight: 700;
    line-height: 1;
    margin-top: 6px;
    color: var(--on-bg);
    font-variant-numeric: tabular-nums;
}
.summary-stat .big-number {
    font-size: 28px;
    font-weight: 700;
    margin-top: 4px;
    color: var(--on-bg);
    font-variant-numeric: tabular-nums;
}
.summary-actions { display: inline-flex; gap: 8px; flex-wrap: wrap; }

/* Status banner */
.status-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding: 12px 16px;
    background: rgba(255, 169, 77, .1);
    border: 1px solid rgba(255, 169, 77, .3);
    color: var(--warn);
    border-radius: var(--radius-md);
    font-size: 13px;
}
.spinner {
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255, 169, 77, .3);
    border-top-color: var(--warn);
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Invoice table ---- */
.invoice-table-wrap {
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.invoice-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.invoice-table thead th {
    background: var(--bg-2);
    color: var(--on-bg-dim);
    text-align: start;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}
.invoice-table th.num,
.invoice-table td.num { text-align: end; }
.invoice-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}
.invoice-row {
    cursor: pointer;
    transition: background .12s ease;
}
.invoice-row:hover { background: rgba(255,255,255,.025); }
.invoice-detail td { background: var(--bg-2); padding: 0 !important; }
.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 360px) 1fr;
    gap: 24px;
    padding: 24px;
}
.detail-image img {
    width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: var(--bg-3);
}
.detail-body h4 {
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--on-bg-dim);
    text-transform: uppercase;
    letter-spacing: .08em;
}
.items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 16px;
}
.items-table th {
    background: transparent;
    color: var(--on-bg-faint);
    font-weight: 500;
    text-align: start;
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
}
.items-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
}
.raw-text {
    margin-top: 12px;
    background: var(--bg-3);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 12px;
}
.raw-text summary {
    cursor: pointer;
    color: var(--on-bg-dim);
}
.raw-text pre {
    margin: 8px 0 0;
    white-space: pre-wrap;
    color: var(--on-bg-dim);
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    max-height: 280px;
    overflow: auto;
}

.pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
}
.pill-ok { background: rgba(77, 208, 168, .15); color: var(--accent); }
.pill-pending { background: rgba(255, 169, 77, .15); color: var(--warn); }
.pill-error { background: rgba(255, 122, 89, .15); color: var(--error); }

@media (max-width: 760px) {
    .summary-row { flex-direction: column; align-items: stretch; }
    .summary-actions { width: 100%; }
    .summary-actions .btn { flex: 1 1 auto; }
    .detail-grid { grid-template-columns: 1fr; }
    .invoice-table thead { display: none; }
    .invoice-table tbody td { display: block; padding: 6px 16px; border: none; }
    .invoice-row { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
}

/* ---- Legal pages ---- */
.legal {
    max-width: 760px;
    margin: 0 auto;
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 36px 40px;
}
.legal h1 { font-size: 28px; margin: 0 0 4px; }
.legal h2 { font-size: 18px; margin: 26px 0 8px; color: var(--accent); }
.legal p { color: var(--on-bg-dim); margin: 0 0 12px; line-height: 1.7; }
.legal ul { color: var(--on-bg-dim); padding-inline-start: 22px; }
.legal li { margin-bottom: 6px; }
.lang-switch {
    display: inline-flex;
    background: var(--bg-2);
    padding: 4px;
    border-radius: 999px;
    border: 1px solid var(--line);
    margin-bottom: 24px;
}
.lang-switch button {
    background: transparent;
    border: none;
    color: var(--on-bg-dim);
    padding: 6px 18px;
    cursor: pointer;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}
.lang-switch button.active {
    background: var(--accent);
    color: var(--accent-on);
}

/* RTL/LTR helpers */
[dir="rtl"] .summary-actions { direction: rtl; }

/* ====================================================================== */
/* Site nav CTA                                                             */
/* ====================================================================== */
.nav-cta {
    background: var(--accent);
    color: var(--accent-on) !important;
    padding: 6px 14px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 13px;
}
.nav-cta:hover {
    text-decoration: none;
    background: #5fdcb4;
}

/* ====================================================================== */
/* Big primary button modifier                                              */
/* ====================================================================== */
.btn.big {
    height: 52px;
    padding: 0 26px;
    font-size: 16px;
    border-radius: 14px;
}

/* ====================================================================== */
/* New landing — hero with phone↔laptop visual + features + steps          */
/* ====================================================================== */
.landing { padding-bottom: 24px; }

.hero-2 {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: center;
    background:
        radial-gradient(600px 300px at 100% 0%, rgba(77, 208, 168, .08), transparent 70%),
        var(--bg-1);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 56px 44px;
    margin: 8px 0 32px;
    box-shadow: var(--shadow-md);
}
.hero-2-text h1 {
    font-size: clamp(28px, 4.6vw, 44px);
    line-height: 1.12;
    margin: 12px 0 14px;
    font-weight: 800;
}
.hero-2-sub {
    color: var(--on-bg-dim);
    font-size: 16px;
    max-width: 56ch;
    line-height: 1.7;
    margin: 0 0 24px;
}
.hero-2-sub strong { color: var(--accent); font-weight: 600; }
.hero-2-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}
.hero-2-helper {
    color: var(--on-bg-faint);
    font-size: 13px;
}

/* ----- phone↔laptop visual ----- */
.hero-2-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 240px;
}
.visual-phone, .visual-laptop {
    background: var(--bg-3);
    border: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(77,208,168,.06);
}
.visual-phone {
    width: 110px;
    height: 200px;
    border-radius: 22px;
    padding: 8px;
    flex-shrink: 0;
}
.visual-phone-screen {
    width: 100%;
    height: 100%;
    background: var(--bg-0);
    border-radius: 16px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.visual-phone-bar {
    height: 6px;
    background: var(--line);
    border-radius: 3px;
}
.visual-phone-doc {
    flex: 1;
    background: linear-gradient(180deg, #ffffff10 0%, #ffffff05 60%);
    border: 1px solid var(--line);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}
.visual-phone-doc::before,
.visual-phone-doc::after {
    content: "";
    position: absolute;
    left: 6px;
    right: 6px;
    height: 2px;
    background: var(--on-bg-faint);
    border-radius: 2px;
}
.visual-phone-doc::before { top: 16px; }
.visual-phone-doc::after { top: 24px; right: 18px; }
.visual-phone-doc.dim { opacity: .25; height: 22px; flex: 0 0 22px; }

.visual-link {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 14px;
    overflow: hidden;
}
.visual-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    opacity: .25;
    animation: link-flow 1.4s linear infinite;
}
.visual-dot:nth-child(1) { animation-delay: 0.0s; }
.visual-dot:nth-child(2) { animation-delay: 0.35s; }
.visual-dot:nth-child(3) { animation-delay: 0.70s; }
.visual-dot:nth-child(4) { animation-delay: 1.05s; }
@keyframes link-flow {
    0%, 100% { opacity: .15; transform: scale(.6); }
    50%      { opacity: 1;   transform: scale(1); }
}

.visual-laptop {
    flex: 0 0 230px;
    border-radius: 10px 10px 4px 4px;
    padding: 8px;
}
.visual-laptop-screen {
    background: var(--bg-0);
    border-radius: 6px;
    padding: 8px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.visual-laptop-base {
    height: 6px;
    background: var(--bg-3);
    margin: 4px -16px -8px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 0 rgba(0,0,0,.4);
}
.visual-thumb {
    aspect-ratio: 0.74;
    background: linear-gradient(180deg, #ffffff15 0%, #ffffff05 60%);
    border-radius: 4px;
    border: 1px solid var(--line);
    position: relative;
}
.visual-thumb::before, .visual-thumb::after {
    content: "";
    position: absolute;
    left: 4px; right: 4px; height: 1.5px;
    background: var(--on-bg-faint);
    border-radius: 2px;
}
.visual-thumb::before { top: 8px; }
.visual-thumb::after  { top: 14px; right: 16px; }
.visual-thumb.fresh {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(77,208,168,.4);
    animation: thumb-fresh 2.2s ease-out infinite;
}
@keyframes thumb-fresh {
    0%   { box-shadow: 0 0 0 2px rgba(77,208,168,.0); transform: scale(.96); }
    20%  { box-shadow: 0 0 0 2px rgba(77,208,168,.55); transform: scale(1); }
    100% { box-shadow: 0 0 0 2px rgba(77,208,168,.0); transform: scale(1); }
}
.visual-thumb.empty { opacity: .35; background: none; border-style: dashed; }

@media (max-width: 820px) {
    .hero-2 { grid-template-columns: 1fr; padding: 36px 24px; }
    .hero-2-visual { min-height: 200px; }
}

/* ----- feature grid ----- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 40px;
}
.feature-card {
    position: relative;
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 22px;
    transition: transform .12s ease, border-color .12s ease;
}
.feature-card:hover { transform: translateY(-2px); border-color: rgba(77,208,168,.25); }
.feature-card.highlight {
    border-color: rgba(77,208,168,.32);
    background:
        radial-gradient(280px 200px at 100% 0%, rgba(77,208,168,.07), transparent),
        var(--bg-1);
}
.feature-num {
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    margin-bottom: 6px;
}
.feature-card h3 { font-size: 17px; margin: 6px 0 8px; }
.feature-card p { color: var(--on-bg-dim); font-size: 14px; margin: 0; line-height: 1.6; }
.feature-badge {
    position: absolute;
    inset-block-start: 16px;
    inset-inline-end: 16px;
    background: var(--accent);
    color: var(--accent-on);
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

/* ----- how it works ----- */
.how-it-works {
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 28px 32px 22px;
    margin-bottom: 40px;
}
.how-it-works h2 {
    margin: 0 0 18px;
    font-size: 22px;
}
.steps {
    list-style: none;
    counter-reset: step;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.steps li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px;
    background: var(--bg-2);
    border-radius: 12px;
}
.step-num {
    flex: 0 0 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(77,208,168,.15);
    color: var(--accent);
    font-weight: 800;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.steps h4 { margin: 0 0 4px; font-size: 15px; }
.steps p { color: var(--on-bg-dim); font-size: 14px; margin: 0; line-height: 1.6; }
.steps em { color: var(--on-bg); font-style: normal; font-weight: 600; }


.link-page {
    max-width: 760px;
    margin: 0 auto;
    padding-top: 24px;
}
.link-card {
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 36px 36px 32px;
    text-align: center;
    box-shadow: var(--shadow-md);
}
.link-eyebrow {
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.link-card h1 {
    font-size: 26px;
    margin: 12px 0 6px;
    font-weight: 700;
}
.link-card .muted {
    max-width: 50ch;
    margin: 0 auto 24px;
}
.qr-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 12px 0 24px;
}
.qr-frame {
    position: relative;
    width: 256px;
    height: 256px;
    padding: 16px;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 30px rgba(77, 208, 168, .25);
    margin-bottom: 14px;
}
.qr-frame img {
    width: 100%;
    height: 100%;
    display: block;
}
.qr-progress {
    position: absolute;
    inset: auto 0 0 0;
    height: 3px;
    background: var(--accent);
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
    transform-origin: 0 50%;
    animation: qr-progress 5000ms linear forwards;
}
@keyframes qr-progress {
    0%   { transform: scaleX(0); }
    100% { transform: scaleX(1); }
}
.qr-status {
    color: var(--on-bg-dim);
    font-size: 13px;
}
.link-help {
    margin-top: 28px;
    text-align: start;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 18px 22px;
}
.link-help ol {
    margin: 0;
    padding-inline-start: 22px;
    color: var(--on-bg-dim);
    line-height: 1.9;
    font-size: 14px;
}
.link-help strong { color: var(--on-bg); }

/* ====================================================================== */
/* Live view                                                                */
/* ====================================================================== */
.live-view {
    max-width: 1180px;
    margin: 0 auto;
}
.live-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    margin-bottom: 22px;
}
.live-header h1 {
    font-size: 28px;
    margin: 4px 0 4px;
    font-weight: 700;
}
.live-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-2);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    color: var(--on-bg-dim);
}
.dot-live {
    width: 9px;
    height: 9px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(77, 208, 168, .6);
    animation: pulse 1.6s ease-out infinite;
}
.dot-live.done { background: var(--accent); animation: none; }
.dot-live.ended { background: var(--on-bg-faint); animation: none; }
.dot-live.error { background: var(--error); animation: none; }
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(77, 208, 168, .6); }
    100% { box-shadow: 0 0 0 14px rgba(77, 208, 168, 0); }
}

.live-empty {
    background: var(--bg-1);
    border: 1px dashed var(--line);
    border-radius: var(--radius-lg);
    padding: 64px 24px;
    text-align: center;
    margin-bottom: 22px;
}
.live-empty .empty-illustration {
    font-size: 48px;
    margin-bottom: 12px;
}
.live-empty h2 {
    margin: 0 0 6px;
    font-size: 20px;
    color: var(--on-bg);
}

.live-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}
.live-thumb {
    position: relative;
    display: block;
    aspect-ratio: 0.72;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-2);
    border: 1px solid var(--line);
    transition: transform .12s ease, box-shadow .12s ease;
}
.live-thumb:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}
.live-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.live-thumb .thumb-num {
    position: absolute;
    inset-block-start: 8px;
    inset-inline-start: 8px;
    background: rgba(0,0,0,.6);
    color: #fff;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    z-index: 2;
}
.live-thumb.new {
    animation: thumb-in .55s cubic-bezier(.2, 1.2, .3, 1);
    box-shadow: 0 0 0 3px rgba(77, 208, 168, .9);
}
@keyframes thumb-in {
    0%   { opacity: 0; transform: translateY(20px) scale(.94); }
    100% { opacity: 1; transform: translateY(0)   scale(1); }
}

/* ====================================================================== */
/* Live results table                                                      */
/* ====================================================================== */
.live-results {
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.results-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
}
.results-toolbar h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
}
.results-totals {
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.live-invoice-table .row-thumb {
    display: block;
    width: 56px;
    height: 76px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--bg-2);
}
.live-invoice-table .row-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.live-invoice-table tbody tr {
    transition: background .25s ease, box-shadow .25s ease;
}
.invoice-row-fresh {
    background: rgba(77, 208, 168, .07);
    box-shadow: inset 4px 0 0 var(--accent);
}
.just-extracted {
    background: rgba(77, 208, 168, .12) !important;
    animation: extract-flash 1.2s ease-out;
}
@keyframes extract-flash {
    0%   { background: rgba(77, 208, 168, .35); }
    100% { background: rgba(77, 208, 168, .04); }
}
