/* ==========================================================================
   Revolve — design system
   One accent (deep recycling green), soft neutrals, rounded cards, big type.
   Tablet-first: operational controls are ≥ 56px (most are 64–80px).
   ========================================================================== */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../vendor/inter/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("../vendor/inter/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("../vendor/inter/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("../vendor/inter/inter-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 800; font-display: swap; src: url("../vendor/inter/inter-latin-800-normal.woff2") format("woff2"); }

:root {
    --rv-green-950: #052e1a;
    --rv-green-900: #0a3d24;
    --rv-green-800: #0d4f2f;
    --rv-green-700: #10643b;
    --rv-green-600: #137a47;
    --rv-green-500: #1a9a5a;
    --rv-green-200: #bfe8cf;
    --rv-green-100: #dcf3e5;
    --rv-green-50:  #eef9f2;

    --rv-bg:      #f2f4f1;
    --rv-surface: #ffffff;
    --rv-sunken:  #f7f8f6;
    --rv-ink:     #0e1a13;
    --rv-ink-2:   #34423a;
    --rv-muted:   #66736b;
    --rv-line:    #dfe5df;
    --rv-line-2:  #eef1ed;

    --rv-warn-ink: #8a4b00;  --rv-warn-bg: #fff1d6;
    --rv-danger-ink: #a61b1b; --rv-danger-bg: #fde4e4;
    --rv-info-ink: #075985;  --rv-info-bg: #e0f0fb;
    --rv-primary-ink: #0d4f2f; --rv-primary-bg: #dcf3e5;

    --rv-radius-lg: 20px;
    --rv-radius: 16px;
    --rv-radius-sm: 12px;
    --rv-shadow-sm: 0 1px 2px rgba(14, 26, 19, .06);
    --rv-shadow: 0 1px 2px rgba(14, 26, 19, .05), 0 6px 20px rgba(14, 26, 19, .06);
    --rv-shadow-lg: 0 2px 6px rgba(14, 26, 19, .06), 0 18px 40px rgba(14, 26, 19, .10);
    --rv-focus: 0 0 0 4px rgba(26, 154, 90, .28);

    --rv-touch: 64px;
    --rv-sidebar: 264px;

    /* Bootstrap overrides */
    --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --bs-body-color: var(--rv-ink);
    --bs-body-bg: var(--rv-bg);
    --bs-border-color: var(--rv-line);
    --bs-primary: var(--rv-green-700);
    --bs-primary-rgb: 16, 100, 59;
    --bs-link-color: var(--rv-green-700);
    --bs-link-color-rgb: 16, 100, 59;
    --bs-link-hover-color: var(--rv-green-900);
    --bs-border-radius: var(--rv-radius-sm);
    --bs-border-radius-lg: var(--rv-radius);
    --bs-emphasis-color: var(--rv-ink);
    --bs-secondary-color: var(--rv-muted);
}

html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--bs-body-font-family);
    background: var(--rv-bg);
    color: var(--rv-ink);
    font-feature-settings: "cv11", "ss01", "tnum";
    -webkit-font-smoothing: antialiased;
}
.tnum, .table td, .rv-num { font-variant-numeric: tabular-nums; }
h1, h2, h3, h4, .h1, .h2, .h3, .h4 { font-weight: 800; letter-spacing: -.02em; color: var(--rv-ink); }
a { text-decoration: none; }
.text-muted, .rv-muted { color: var(--rv-muted) !important; }
.fw-800 { font-weight: 800; }
:focus-visible { outline: none; box-shadow: var(--rv-focus) !important; }

/* ---------- Buttons ---------- */
.btn { font-weight: 600; border-radius: var(--rv-radius-sm); padding: .6rem 1.1rem; }
.btn-primary {
    --bs-btn-bg: var(--rv-green-700); --bs-btn-border-color: var(--rv-green-700);
    --bs-btn-hover-bg: var(--rv-green-800); --bs-btn-hover-border-color: var(--rv-green-800);
    --bs-btn-active-bg: var(--rv-green-900); --bs-btn-active-border-color: var(--rv-green-900);
    --bs-btn-disabled-bg: #9cb8a8; --bs-btn-disabled-border-color: #9cb8a8;
}
.btn-outline-primary {
    --bs-btn-color: var(--rv-green-700); --bs-btn-border-color: var(--rv-green-700);
    --bs-btn-hover-bg: var(--rv-green-700); --bs-btn-hover-border-color: var(--rv-green-700);
    --bs-btn-active-bg: var(--rv-green-800);
}
.btn-light { --bs-btn-bg: var(--rv-surface); --bs-btn-border-color: var(--rv-line); --bs-btn-hover-bg: var(--rv-sunken); --bs-btn-hover-border-color: var(--rv-line); }
.btn-soft { background: var(--rv-green-50); color: var(--rv-green-800); border: 1px solid var(--rv-green-100); }
.btn-soft:hover { background: var(--rv-green-100); color: var(--rv-green-900); }
.btn-touch { min-height: var(--rv-touch); font-size: 1.15rem; padding: .8rem 1.5rem; border-radius: var(--rv-radius); }
.btn-xl { min-height: 76px; font-size: 1.35rem; font-weight: 700; padding: 1rem 2rem; border-radius: var(--rv-radius); }
.btn-icon { width: 44px; height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }

/* ---------- Forms ---------- */
.form-control, .form-select { border-radius: var(--rv-radius-sm); border-color: var(--rv-line); padding: .6rem .85rem; }
.form-control:focus, .form-select:focus { border-color: var(--rv-green-500); box-shadow: var(--rv-focus); }
.form-label { font-weight: 600; font-size: .9rem; color: var(--rv-ink-2); margin-bottom: .35rem; }
.form-text { color: var(--rv-muted); }
.form-check-input:checked { background-color: var(--rv-green-700); border-color: var(--rv-green-700); }
.form-check-input:focus { box-shadow: var(--rv-focus); border-color: var(--rv-green-500); }
.form-switch .form-check-input { width: 2.6em; height: 1.4em; }
.input-touch { min-height: var(--rv-touch); font-size: 1.2rem; border-radius: var(--rv-radius); padding-left: 1.1rem; }

/* Grid/flex children must be allowed to shrink so wide tables scroll inside .rv-table-wrap
   instead of stretching the page (Bootstrap's .d-grid uses an auto track by default). */
.d-grid { grid-template-columns: minmax(0, 1fr); }
.row > * { min-width: 0; }

/* ---------- Cards ---------- */
.rv-card {
    background: var(--rv-surface);
    border: 1px solid var(--rv-line);
    border-radius: var(--rv-radius);
    box-shadow: var(--rv-shadow-sm);
}
.rv-card-pad { padding: 1.25rem 1.35rem; }
.rv-card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem 1.35rem; border-bottom: 1px solid var(--rv-line-2); }
.rv-card-head h2, .rv-card-head h3 { font-size: 1.05rem; margin: 0; font-weight: 700; letter-spacing: -.01em; }
.rv-card-body { padding: 1.25rem 1.35rem; }

/* ---------- Badges ---------- */
.rv-badge {
    display: inline-flex; align-items: center; gap: .35em; white-space: nowrap;
    padding: .28em .7em; border-radius: 999px; font-size: .78rem; font-weight: 600; line-height: 1.3;
}
.rv-badge::before { content: ""; width: .5em; height: .5em; border-radius: 50%; background: currentColor; opacity: .85; }
.rv-badge-success { background: var(--rv-green-100); color: var(--rv-green-800); }
.rv-badge-primary { background: #dbe8ff; color: #1d4396; }
.rv-badge-warning { background: var(--rv-warn-bg); color: var(--rv-warn-ink); }
.rv-badge-danger  { background: var(--rv-danger-bg); color: var(--rv-danger-ink); }
.rv-badge-info    { background: var(--rv-info-bg); color: var(--rv-info-ink); }
.rv-badge-muted   { background: #eceeeb; color: #56605a; }

/* ---------- Alerts / flash ---------- */
.rv-flash { border-radius: var(--rv-radius); border: 1px solid; padding: .9rem 1.1rem; display: flex; gap: .75rem; align-items: flex-start; font-weight: 500; }
.rv-flash i { font-size: 1.25rem; line-height: 1; margin-top: .1rem; }
.rv-flash-success { background: var(--rv-green-50); border-color: var(--rv-green-200); color: var(--rv-green-900); }
.rv-flash-error { background: var(--rv-danger-bg); border-color: #f5c2c2; color: var(--rv-danger-ink); }
.rv-flash-warning { background: var(--rv-warn-bg); border-color: #f3d8a4; color: var(--rv-warn-ink); }
.rv-flash-info { background: var(--rv-info-bg); border-color: #bcdcf2; color: var(--rv-info-ink); }

/* ---------- Brand ---------- */
.rv-logo { display: inline-flex; align-items: center; gap: .65rem; color: var(--rv-ink); font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; }
.rv-logo-mark {
    width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
    background: linear-gradient(145deg, var(--rv-green-600), var(--rv-green-900)); color: #fff; font-size: 1.3rem;
    box-shadow: inset 0 -2px 0 rgba(0,0,0,.15);
}
.rv-logo small { display: block; font-size: .72rem; font-weight: 600; color: var(--rv-muted); letter-spacing: .02em; text-transform: uppercase; margin-top: -2px; }

.rv-avatar {
    width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center;
    background: var(--rv-green-100); color: var(--rv-green-800); font-weight: 700; font-size: .95rem;
}
.rv-avatar-lg { width: 56px; height: 56px; font-size: 1.2rem; }

/* ==========================================================================
   Back-office layout
   ========================================================================== */
.rv-app { min-height: 100vh; }
.rv-sidebar-shell { --bs-offcanvas-width: 284px; --bs-offcanvas-bg: var(--rv-green-950); }
.rv-sidebar {
    width: var(--rv-sidebar); height: 100%; background: var(--rv-green-950); color: #cfe3d6;
    display: flex; flex-direction: column;
}
.rv-sidebar-foot { padding: .9rem 1rem; border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: .7rem; }
.rv-sidebar-foot .rv-avatar { background: rgba(255,255,255,.12); color: #fff; }
.rv-sidebar-foot .n { color: #fff; font-weight: 600; font-size: .92rem; line-height: 1.2; }
.rv-sidebar-foot .r { color: #8fb39c; font-size: .78rem; }
.rv-sidebar .rv-logo { color: #fff; }
.rv-sidebar .rv-logo small { color: #8fb39c; }
.rv-sidebar-inner { padding: 1.1rem .85rem 1.5rem; overflow-y: auto; flex: 1; }
.rv-nav-group { margin-top: 1.2rem; }
.rv-nav-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .09em; color: #7fa28b; font-weight: 700; padding: 0 .75rem .4rem; }
.rv-nav a {
    display: flex; align-items: center; gap: .75rem; padding: .62rem .75rem; margin-bottom: 2px;
    color: #d6e8dc; border-radius: 10px; font-weight: 500; font-size: .95rem;
}
.rv-nav a i { font-size: 1.1rem; opacity: .85; width: 1.2rem; text-align: center; }
.rv-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.rv-nav a.active { background: var(--rv-green-700); color: #fff; box-shadow: inset 0 -2px 0 rgba(0,0,0,.18); }
.rv-nav a.active i { opacity: 1; }
.rv-nav .rv-count { margin-left: auto; background: #f59e0b; color: #1f1400; font-size: .72rem; font-weight: 700; border-radius: 999px; padding: .1rem .5rem; }

@media (min-width: 992px) {
    .rv-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 1030; }
    .rv-main { margin-left: var(--rv-sidebar); }
}
@media (max-width: 991.98px) {
    .rv-sidebar { width: 100%; }
}

/* Pagination + confirm modal */
.pagination {
    --bs-pagination-color: var(--rv-green-700); --bs-pagination-hover-color: var(--rv-green-900);
    --bs-pagination-active-bg: var(--rv-green-700); --bs-pagination-active-border-color: var(--rv-green-700);
    --bs-pagination-focus-box-shadow: var(--rv-focus); --bs-pagination-border-color: var(--rv-line);
}
.rv-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: .85rem 1.35rem; border-top: 1px solid var(--rv-line-2); color: var(--rv-muted); font-size: .9rem; }
.rv-confirm-icon { width: 52px; height: 52px; border-radius: 16px; flex: none; display: grid; place-items: center; background: var(--rv-warn-bg); color: var(--rv-warn-ink); font-size: 1.6rem; }
.modal-content { border-radius: var(--rv-radius-lg); }

.rv-topbar {
    position: sticky; top: 0; z-index: 1020; height: 68px;
    display: flex; align-items: center; gap: 1rem; padding: 0 1.5rem;
    background: rgba(242, 244, 241, .88); backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--rv-line);
}
.rv-topbar-title { font-weight: 700; font-size: 1.05rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-content { padding: 1.5rem; max-width: 1400px; }
@media (max-width: 575.98px) { .rv-content { padding: 1rem; } .rv-topbar { padding: 0 1rem; } }

.rv-page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.rv-page-head h1 { font-size: 1.65rem; margin: 0; }
.rv-page-head p { margin: .25rem 0 0; color: var(--rv-muted); }
.rv-page-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* Stat tiles */
.rv-stat { padding: 1.1rem 1.25rem; height: 100%; }
.rv-stat-label { font-size: .82rem; font-weight: 600; color: var(--rv-muted); display: flex; align-items: center; gap: .45rem; }
.rv-stat-label i { color: var(--rv-green-600); }
.rv-stat-value { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; margin-top: .3rem; line-height: 1.15; font-variant-numeric: tabular-nums; }
.rv-stat-sub { font-size: .82rem; color: var(--rv-muted); margin-top: .2rem; }
.rv-stat-accent { border-top: 4px solid var(--rv-green-600); }

/* Tables */
.rv-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rv-table { width: 100%; margin: 0; font-size: .92rem; }
.rv-table th {
    font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--rv-muted); font-weight: 700;
    background: var(--rv-sunken); border-bottom: 1px solid var(--rv-line); padding: .7rem 1rem; white-space: nowrap;
}
.rv-table td { padding: .8rem 1rem; border-bottom: 1px solid var(--rv-line-2); vertical-align: middle; }
.rv-table tbody tr:hover { background: #fafbf9; }
.rv-table tbody tr:last-child td { border-bottom: 0; }
.rv-table .num, .rv-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rv-table a.row-link { color: var(--rv-ink); font-weight: 600; }
.rv-table a.row-link:hover { color: var(--rv-green-700); }
.rv-table tfoot td { font-weight: 700; background: var(--rv-sunken); border-top: 1px solid var(--rv-line); }
.rv-empty { padding: 3rem 1rem; text-align: center; color: var(--rv-muted); }
.rv-empty i { font-size: 2.2rem; display: block; margin-bottom: .5rem; color: #a9b6ad; }

/* Filters */
.rv-filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; padding: 1rem 1.35rem; border-bottom: 1px solid var(--rv-line-2); }
.rv-filters .form-control, .rv-filters .form-select { min-width: 140px; }
.rv-filters .rv-filter-q { min-width: 200px; flex: 1 1 200px; }

/* Definition list */
.rv-dl { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: .55rem 1rem; margin: 0; }
.rv-dl dt { color: var(--rv-muted); font-weight: 500; font-size: .9rem; }
.rv-dl dd { margin: 0; font-weight: 600; word-break: break-word; }

/* Timeline */
.rv-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.rv-timeline li { position: relative; padding: 0 0 1.1rem 2rem; }
.rv-timeline li::before { content: ""; position: absolute; left: 9px; top: 22px; bottom: 0; width: 2px; background: var(--rv-line); }
.rv-timeline li:last-child::before { display: none; }
.rv-timeline .dot { position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--rv-green-600); box-shadow: 0 0 0 4px var(--rv-green-100); }
.rv-timeline .dot.muted { background: #c2cbc5; box-shadow: 0 0 0 4px #eef1ed; }
.rv-timeline strong { display: block; }
.rv-timeline small { color: var(--rv-muted); }

/* Money summary */
.rv-money-rows { display: grid; gap: .5rem; }
.rv-money-row { display: flex; justify-content: space-between; gap: 1rem; font-variant-numeric: tabular-nums; }
.rv-money-row.total { border-top: 1px dashed var(--rv-line); padding-top: .6rem; font-weight: 800; font-size: 1.15rem; }
.rv-money-row .neg { color: var(--rv-danger-ink); }

/* Bar chart (single series, one hue, baseline-anchored 4px rounded data ends, 2px gaps) */
.rv-chart {
    position: relative; height: 200px; display: flex; align-items: flex-end; gap: 2px; padding-top: 1.4rem;
    border-bottom: 1px solid var(--rv-line);
    background-image: linear-gradient(to top, var(--rv-line-2) 1px, transparent 1px);
    background-size: 100% 25%; background-position: bottom;
}
.rv-chart-col { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; cursor: pointer; outline: none; }
.rv-chart-bar { display: block; width: 100%; max-width: 34px; background: var(--rv-green-600); border-radius: 4px 4px 0 0; transition: background .1s ease; }
.rv-chart-col:hover .rv-chart-bar, .rv-chart-col.on .rv-chart-bar, .rv-chart-col:focus-visible .rv-chart-bar { background: var(--rv-green-800); }
.rv-chart-val { position: absolute; top: -1.35rem; font-size: .75rem; font-weight: 700; color: var(--rv-ink-2); white-space: nowrap; }
.rv-chart-col:has(.rv-chart-val) { align-items: flex-end; }
.rv-chart-x { display: flex; gap: 2px; margin-top: .35rem; }
.rv-chart-x span { flex: 1; text-align: center; font-size: .72rem; color: var(--rv-muted); font-variant-numeric: tabular-nums; }
.rv-tip { position: absolute; z-index: 1080; pointer-events: none; background: var(--rv-ink); color: #fff; border-radius: 10px; padding: .5rem .7rem; box-shadow: var(--rv-shadow-lg); font-size: .82rem; min-width: 140px; }
.rv-tip .t { color: #a8c2b1; font-weight: 600; }
.rv-tip .m { font-size: 1rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.rv-tip .s { color: #cfe0d5; }

/* Progress bar (utilisation etc.) */
.rv-bar { height: 8px; background: var(--rv-line-2); border-radius: 99px; overflow: hidden; }
.rv-bar > span { display: block; height: 100%; background: var(--rv-green-600); border-radius: 99px; }
.rv-bar.warn > span { background: #d97706; }
.rv-bar.danger > span { background: #dc2626; }

/* ==========================================================================
   Yard (operator) layout — tablet-first, sunlight-readable
   ========================================================================== */
.rv-ops { background: var(--rv-bg); min-height: 100vh; }
.rv-ops-bar {
    position: sticky; top: 0; z-index: 1020; height: 76px; padding: 0 1.5rem;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    background: var(--rv-surface); border-bottom: 1px solid var(--rv-line);
}
.rv-ops-main { max-width: 1120px; margin: 0 auto; padding: 1.5rem 1.5rem 8rem; }
@media (max-width: 575.98px) { .rv-ops-main { padding: 1rem 1rem 8rem; } .rv-ops-bar { padding: 0 1rem; } }
.rv-ops-user { display: flex; align-items: center; gap: .75rem; }
.rv-ops-user .name { font-weight: 700; line-height: 1.1; }
.rv-ops-user .role { font-size: .8rem; color: var(--rv-muted); }

.rv-hello h1 { font-size: 2rem; margin: 0; }
.rv-hello p { color: var(--rv-muted); font-size: 1.1rem; margin: .25rem 0 0; }

/* Big action tiles on the yard home */
.rv-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
@media (max-width: 900px) {
    /* Tablet portrait: the primary action spans the row, the two queues sit side by side */
    .rv-tiles { grid-template-columns: 1fr 1fr; }
    .rv-tiles .rv-tile:first-child { grid-column: 1 / -1; min-height: 180px; }
}
@media (max-width: 520px) { .rv-tiles { grid-template-columns: 1fr; } }
.rv-tile {
    position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 1.25rem;
    min-height: 220px; padding: 1.5rem; border-radius: var(--rv-radius-lg);
    background: var(--rv-surface); border: 2px solid var(--rv-line); color: var(--rv-ink);
    box-shadow: var(--rv-shadow); transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.rv-tile:hover { transform: translateY(-2px); box-shadow: var(--rv-shadow-lg); border-color: var(--rv-green-500); color: var(--rv-ink); }
.rv-tile:active { transform: translateY(0); }
.rv-tile-icon { width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center; font-size: 2.2rem; }
.rv-tile-title { font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; }
.rv-tile-sub { color: var(--rv-muted); font-size: 1.05rem; font-weight: 500; }
.rv-tile-count {
    position: absolute; top: 1.25rem; right: 1.25rem; min-width: 56px; height: 56px; padding: 0 .9rem; border-radius: 999px;
    display: grid; place-items: center; font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums;
}
.rv-tile.step-1 .rv-tile-icon { background: #e0f0fb; color: #075985; }
.rv-tile.step-2 .rv-tile-icon { background: #fff1d6; color: #8a4b00; }
.rv-tile.step-3 .rv-tile-icon { background: var(--rv-green-100); color: var(--rv-green-800); }
.rv-tile.step-1 .rv-tile-count { background: #e0f0fb; color: #075985; }
.rv-tile.step-2 .rv-tile-count { background: #fff1d6; color: #8a4b00; }
.rv-tile.step-3 .rv-tile-count { background: var(--rv-green-100); color: var(--rv-green-800); }
.rv-tile.is-primary { background: linear-gradient(160deg, var(--rv-green-700), var(--rv-green-900)); border-color: transparent; color: #fff; }
.rv-tile.is-primary .rv-tile-sub { color: #bfe0cb; }
.rv-tile.is-primary .rv-tile-icon { background: rgba(255,255,255,.14); color: #fff; }
.rv-tile.is-primary .rv-tile-count { background: rgba(255,255,255,.16); color: #fff; }
.rv-tile.is-primary:hover { color: #fff; border-color: transparent; }
/* A job of its own, not a step in the load flow: one wide row under the three steps */
.rv-tile-row { flex-direction: row; align-items: center; gap: 1.25rem; min-height: 128px; }
.rv-tile.baling .rv-tile-icon { background: #ede9fe; color: #5b21b6; }
.rv-tile.baling .rv-tile-count { background: #ede9fe; color: #5b21b6; }

.rv-mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
@media (max-width: 820px) { .rv-mini-stats { grid-template-columns: repeat(2, 1fr); } }
.rv-mini-stat { background: var(--rv-surface); border: 1px solid var(--rv-line); border-radius: var(--rv-radius); padding: 1rem 1.1rem; }
.rv-mini-stat .v { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.rv-mini-stat .l { color: var(--rv-muted); font-weight: 600; font-size: .88rem; }

/* Wizard stepper */
.rv-stepper { display: flex; gap: .5rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.rv-stepper li { flex: 1; display: flex; flex-direction: column; gap: .5rem; }
.rv-stepper .bar { height: 8px; border-radius: 99px; background: var(--rv-line); transition: background .2s ease; }
.rv-stepper .lbl { font-size: .9rem; font-weight: 600; color: var(--rv-muted); display: flex; align-items: center; gap: .4rem; }
.rv-stepper .num { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--rv-line); color: var(--rv-ink-2); font-size: .8rem; font-weight: 700; }
.rv-stepper li.done .bar, .rv-stepper li.current .bar { background: var(--rv-green-600); }
.rv-stepper li.done .num { background: var(--rv-green-600); color: #fff; }
.rv-stepper li.current .num { background: var(--rv-ink); color: #fff; }
.rv-stepper li.current .lbl { color: var(--rv-ink); }
@media (max-width: 575.98px) { .rv-stepper .lbl span { display: none; } }

.rv-wizard-title { font-size: 2rem; margin: 0 0 .35rem; }
.rv-wizard-sub { font-size: 1.1rem; color: var(--rv-muted); margin: 0 0 1.25rem; }
.rv-panel[hidden] { display: none !important; }
.rv-panel { animation: rvFadeIn .18s ease; }
@keyframes rvFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Sticky bottom action bar */
.rv-actionbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
    background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-top: 1px solid var(--rv-line);
    padding: .9rem 1.5rem calc(.9rem + env(safe-area-inset-bottom));
}
.rv-actionbar-inner { max-width: 1120px; margin: 0 auto; display: flex; gap: .9rem; }
.rv-actionbar .btn { min-height: 72px; font-size: 1.3rem; font-weight: 700; border-radius: var(--rv-radius); display: inline-flex; align-items: center; justify-content: center; }
.btn-touch, .btn-xl { display: inline-flex; align-items: center; justify-content: center; }
.rv-actionbar .btn-back { flex: 0 0 auto; min-width: 150px; }
.rv-actionbar .btn-next { flex: 1; }

/* Search */
.rv-search { position: relative; margin-bottom: 1.1rem; }
.rv-search i { position: absolute; left: 1.2rem; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--rv-muted); }
.rv-search input { min-height: 68px; font-size: 1.3rem; padding-left: 3.4rem; border-radius: var(--rv-radius); border: 2px solid var(--rv-line); background: var(--rv-surface); }
.rv-search input:focus { border-color: var(--rv-green-500); }

/* Pick cards (vendors, deliveries) */
.rv-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .85rem; }
.rv-pick {
    position: relative; display: flex; align-items: center; gap: 1rem; width: 100%; text-align: left;
    min-height: 92px; padding: 1rem 1.15rem; border-radius: var(--rv-radius);
    background: var(--rv-surface); border: 2px solid var(--rv-line); color: var(--rv-ink);
    box-shadow: var(--rv-shadow-sm); transition: border-color .1s ease, box-shadow .1s ease, transform .1s ease;
    cursor: pointer;
}
.rv-pick:hover { border-color: var(--rv-green-500); color: var(--rv-ink); }
.rv-pick:active { transform: scale(.99); }
.rv-pick.selected { border-color: var(--rv-green-600); background: var(--rv-green-50); box-shadow: 0 0 0 4px rgba(26,154,90,.18); }
.rv-pick.selected::after {
    content: "\F26E"; font-family: "bootstrap-icons"; position: absolute; top: .7rem; right: .8rem;
    width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
    background: var(--rv-green-600); color: #fff; font-size: 1.2rem;
}
.rv-pick-title { font-size: 1.2rem; font-weight: 700; line-height: 1.25; }
.rv-pick-meta { color: var(--rv-muted); font-size: .95rem; margin-top: .15rem; }
.rv-pick-side { margin-left: auto; text-align: right; flex: none; padding-right: .25rem; }
.rv-pick-time { font-weight: 700; font-size: 1.05rem; }
.rv-pick-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .65rem; border-radius: 999px; font-weight: 600; font-size: .9rem; }

/* Material tiles */
.rv-material-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.rv-material {
    position: relative; min-height: 170px; border-radius: var(--rv-radius-lg); padding: 1.25rem; text-align: left;
    background: var(--rv-surface); border: 2px solid var(--rv-line); display: flex; flex-direction: column; justify-content: space-between;
    box-shadow: var(--rv-shadow-sm); cursor: pointer; color: var(--rv-ink); width: 100%;
}
.rv-material .ico { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-size: 2rem; color: #fff; }
.rv-material .nm { font-size: 1.4rem; font-weight: 800; letter-spacing: -.01em; }
.rv-material .ds { color: var(--rv-muted); font-size: .95rem; }
.rv-material:hover { border-color: var(--rv-green-500); }
.rv-material.selected { border-color: var(--rv-green-600); background: var(--rv-green-50); box-shadow: 0 0 0 4px rgba(26,154,90,.18); }
.rv-material.selected::after {
    content: "\F26E"; font-family: "bootstrap-icons"; position: absolute; top: .9rem; right: .9rem;
    width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--rv-green-600); color: #fff; font-size: 1.25rem;
}

/* Photo capture */
.rv-photo-drop {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; text-align: center;
    min-height: 220px; border: 3px dashed var(--rv-line); border-radius: var(--rv-radius-lg); background: var(--rv-surface);
    cursor: pointer; color: var(--rv-muted); font-size: 1.15rem; font-weight: 600; overflow: hidden; position: relative;
}
.rv-photo-drop i { font-size: 3rem; color: var(--rv-green-600); }
.rv-photo-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rv-photo-drop:hover { border-color: var(--rv-green-500); }
.rv-note { min-height: 120px; font-size: 1.15rem; border-radius: var(--rv-radius); border: 2px solid var(--rv-line); }

/* Summary (confirm) */
.rv-summary { background: var(--rv-surface); border: 1px solid var(--rv-line); border-radius: var(--rv-radius-lg); overflow: hidden; box-shadow: var(--rv-shadow); }
.rv-summary-row { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.35rem; border-bottom: 1px solid var(--rv-line-2); }
.rv-summary-row:last-child { border-bottom: 0; }
.rv-summary-row .k { color: var(--rv-muted); font-weight: 600; width: 34%; flex: none; }
.rv-summary-row .v { font-size: 1.25rem; font-weight: 700; }

/* Keypad */
.rv-weigh-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.25rem; align-items: start; }
@media (max-width: 900px) { .rv-weigh-layout { grid-template-columns: 1fr; } }
.rv-display {
    background: var(--rv-green-950); color: #fff; border-radius: var(--rv-radius-lg); padding: 1.1rem 1.4rem;
    display: flex; flex-direction: column; gap: .35rem; box-shadow: var(--rv-shadow);
}
.rv-display .lbl { color: #9fc5ae; font-weight: 600; font-size: 1rem; display: flex; justify-content: space-between; }
.rv-display .val { font-size: 3.4rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; text-align: right; font-variant-numeric: tabular-nums; min-height: 3.6rem; }
.rv-display .val .unit { font-size: 1.4rem; font-weight: 600; color: #9fc5ae; margin-left: .35rem; }
.rv-display .amt { text-align: right; color: #d7f0e0; font-size: 1.1rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.rv-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; margin-top: 1rem; }
.rv-key {
    min-height: 80px; border-radius: var(--rv-radius); border: 1px solid var(--rv-line); background: var(--rv-surface);
    font-size: 2rem; font-weight: 700; color: var(--rv-ink); box-shadow: 0 2px 0 var(--rv-line); user-select: none; touch-action: manipulation;
}
.rv-key:active { transform: translateY(2px); box-shadow: none; background: var(--rv-green-50); }
.rv-key.fn { background: var(--rv-sunken); font-size: 1.5rem; color: var(--rv-ink-2); }
.rv-weigh-side { display: grid; gap: 1rem; }
.rv-grade-line { display: flex; justify-content: space-between; align-items: center; padding: .9rem 1.1rem; border-radius: var(--rv-radius); background: var(--rv-surface); border: 2px solid var(--rv-line); }
.rv-grade-line.active { border-color: var(--rv-green-600); background: var(--rv-green-50); }
.rv-grade-line .g { font-weight: 700; font-size: 1.1rem; }
.rv-grade-line .r { color: var(--rv-muted); font-size: .9rem; }
.rv-grade-line .w { font-weight: 800; font-size: 1.35rem; font-variant-numeric: tabular-nums; text-align: right; }

/* Payout card */
.rv-payout { background: var(--rv-surface); border-radius: var(--rv-radius-lg); border: 1px solid var(--rv-line); box-shadow: var(--rv-shadow); overflow: hidden; }
.rv-payout-head { padding: 1.1rem 1.4rem; background: var(--rv-sunken); border-bottom: 1px solid var(--rv-line); display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.rv-payout-body { padding: 1.2rem 1.4rem; display: grid; gap: .75rem; font-size: 1.15rem; }
.rv-payout-line { display: flex; justify-content: space-between; gap: 1rem; font-variant-numeric: tabular-nums; }
.rv-payout-line .k { color: var(--rv-ink-2); }
.rv-payout-line.deduct .v { color: var(--rv-danger-ink); font-weight: 700; }
.rv-payout-net { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 1.2rem 1.4rem; background: var(--rv-green-50); border-top: 1px solid var(--rv-green-100); }
.rv-payout-net .k { font-weight: 700; font-size: 1.2rem; color: var(--rv-green-900); }
.rv-payout-net .v { font-weight: 800; font-size: 2.6rem; letter-spacing: -.02em; color: var(--rv-green-800); font-variant-numeric: tabular-nums; }
.rv-payout-note { padding: .9rem 1.4rem; border-top: 1px solid var(--rv-line-2); color: var(--rv-ink-2); font-size: .98rem; display: flex; gap: .6rem; }
@media (max-width: 575.98px) { .rv-payout-net .v { font-size: 2rem; } .rv-display .val { font-size: 2.6rem; } }

/* Success */
.rv-success { text-align: center; padding: 2rem 1rem 1rem; }
.rv-check { width: 132px; height: 132px; margin: 0 auto 1.25rem; }
.rv-check circle { fill: var(--rv-green-100); stroke: var(--rv-green-600); stroke-width: 4; stroke-dasharray: 400; stroke-dashoffset: 400; animation: rvStroke .6s ease forwards; }
.rv-check path { fill: none; stroke: var(--rv-green-700); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 100; stroke-dashoffset: 100; animation: rvStroke .35s .45s ease forwards; }
.rv-check svg { animation: rvPop .4s .55s ease both; }
@keyframes rvStroke { to { stroke-dashoffset: 0; } }
@keyframes rvPop { 0% { transform: scale(1); } 50% { transform: scale(1.08); } 100% { transform: scale(1); } }
.rv-success h1 { font-size: 2.3rem; margin-bottom: .35rem; }
.rv-success .lead { color: var(--rv-muted); font-size: 1.2rem; }
.rv-success-card { max-width: 620px; margin: 1.5rem auto 0; text-align: left; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .rv-check circle, .rv-check path { stroke-dashoffset: 0; }
}

/* History list (operator) */
.rv-hist { display: grid; gap: .6rem; }
.rv-hist-item { display: flex; align-items: center; gap: 1rem; padding: .9rem 1.1rem; border-radius: var(--rv-radius); background: var(--rv-surface); border: 1px solid var(--rv-line); }
.rv-hist-item .ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; flex: none; }

/* Login */
.rv-auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
@media (max-width: 900px) { .rv-auth { grid-template-columns: 1fr; } .rv-auth-art { display: none !important; } }
.rv-auth-art {
    background: radial-gradient(1200px 500px at 10% 110%, rgba(26,154,90,.45), transparent 60%), linear-gradient(160deg, var(--rv-green-800), var(--rv-green-950));
    color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
}
.rv-auth-art h2 { color: #fff; font-size: 2.6rem; max-width: 12ch; line-height: 1.08; }
.rv-auth-art p { color: #bfe0cb; font-size: 1.1rem; max-width: 36ch; }
.rv-auth-art .rings { position: absolute; right: -120px; top: -80px; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(255,255,255,.05); }
.rv-auth-form { display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; background: var(--rv-bg); }
.rv-auth-card { width: 100%; max-width: 440px; }
.rv-auth-card .form-control { min-height: 60px; font-size: 1.1rem; }

/* Collapsed technical details ("System details") — hidden until the user expands them */
.rv-tech { margin-top: 1rem; border-top: 1px dashed var(--rv-line); padding-top: .35rem; }
.rv-tech > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; color: var(--rv-muted); font-weight: 600; font-size: .88rem; }
.rv-tech > summary::-webkit-details-marker { display: none; }
.rv-tech > summary::before { content: "\f285"; font-family: "bootstrap-icons"; font-size: .75rem; transition: transform .15s ease; }
.rv-tech[open] > summary::before { transform: rotate(90deg); }
.rv-tech-body { padding: .25rem 0 .5rem; }
.rv-card > .rv-tech { margin: 0; padding: .25rem 1.35rem .5rem; }

/* Small inline labels: special / agreed rate, prepaid order */
.rv-chip { display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 700; background: var(--rv-info-bg); color: var(--rv-info-ink); vertical-align: middle; white-space: nowrap; }
.rv-chip-po { background: var(--rv-warn-bg); color: var(--rv-warn-ink); }

/* Approval categories */
.rv-cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .85rem; }
.rv-cat { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.15rem; min-height: 76px; border-radius: var(--rv-radius); background: var(--rv-surface); border: 2px solid var(--rv-line); color: var(--rv-ink); text-decoration: none; box-shadow: var(--rv-shadow-sm); }
.rv-cat:hover { border-color: var(--rv-green-500); color: var(--rv-ink); }
.rv-cat.active { border-color: var(--rv-green-600); background: var(--rv-green-50); }
.rv-cat-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--rv-green-100); color: var(--rv-green-700); font-size: 1.25rem; flex: none; }
.rv-cat-body { flex: 1; min-width: 0; }
.rv-cat-title { display: block; font-weight: 700; }
.rv-cat-meta { display: block; color: var(--rv-muted); font-size: .88rem; }
.rv-cat-count { min-width: 40px; height: 40px; padding: 0 .6rem; border-radius: 999px; display: grid; place-items: center; font-weight: 800; background: var(--rv-warn-bg); color: var(--rv-warn-ink); flex: none; }
.rv-cat-count.zero { background: var(--rv-sunken); color: var(--rv-muted); }

/* Rate grid inputs */
.rv-grid-input { min-width: 96px; text-align: right; }

/* Roles & permissions picker */
.rv-perm-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; font-weight: 700; padding-bottom: .4rem; border-bottom: 1px solid var(--rv-line); margin-bottom: .6rem; }
.rv-perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .5rem; }
.rv-perm { display: flex; align-items: flex-start; gap: .6rem; padding: .6rem .75rem; min-height: 56px; border: 1px solid var(--rv-line); border-radius: var(--rv-radius); background: var(--rv-surface); cursor: pointer; }
.rv-perm:hover { border-color: var(--rv-green-500); }
.rv-perm input { margin-top: .15rem; flex: none; }
.rv-perm:has(input:checked) { border-color: var(--rv-green-600); background: var(--rv-green-50); }
.rv-disabled { opacity: .5; }
.rv-disabled .rv-perm { cursor: not-allowed; }

/* Bales listed on a shipment */
.rv-bale-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.rv-bale-list span { padding: .3rem .6rem; border-radius: 10px; background: var(--rv-sunken); border: 1px solid var(--rv-line-2); font-size: .85rem; font-weight: 600; }

/* Outcome banners (prepaid reconciliation) */
.rv-outcome { display: flex; gap: .85rem; align-items: flex-start; padding: 1rem 1.2rem; border-radius: var(--rv-radius); font-weight: 600; }
.rv-outcome i { font-size: 1.35rem; line-height: 1.2; }
.rv-outcome .amt { font-size: 1.35rem; font-weight: 800; display: block; }
.rv-outcome-owe { background: var(--rv-warn-bg); color: var(--rv-warn-ink); }
.rv-outcome-pay { background: var(--rv-primary-bg); color: var(--rv-primary-ink); }
.rv-outcome-wait { background: var(--rv-info-bg); color: var(--rv-info-ink); }

/* Print */
@media print {
    .rv-sidebar, .rv-sidebar-shell, .rv-topbar, .rv-page-actions, .rv-filters, .rv-tech, .btn { display: none !important; }
    .rv-main { margin: 0 !important; }
    .rv-card { box-shadow: none; }
    .rv-help-strip, .no-print { display: none !important; }
    .rv-statement-sheet { border: 0; padding: 0; }
}

/* ==========================================================================
   On-screen hints: the page strip, ⓘ marks, tooltips and the ? guide
   ========================================================================== */
.rv-help-strip {
    display: flex; align-items: flex-start; gap: .7rem; margin: -.35rem 0 1.1rem;
    padding: .75rem 1rem; border-radius: var(--rv-radius); background: var(--rv-green-50); border: 1px solid var(--rv-green-100);
    color: var(--rv-green-900); font-size: .95rem; line-height: 1.45;
}
.rv-help-strip > i { color: var(--rv-green-600); font-size: 1.15rem; line-height: 1.3; }
.rv-help-strip > div { flex: 1; min-width: 0; }
.rv-help-hide { flex: none; }
.rv-help-link { background: none; border: 0; padding: 0; color: var(--rv-green-800); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.rv-help-link:hover { color: var(--rv-green-900); }
.rv-ops .rv-help-strip { font-size: 1.05rem; padding: .9rem 1.1rem; }

.rv-hint {
    display: inline-grid; place-items: center; vertical-align: middle; margin-left: .3rem;
    width: 26px; height: 26px; border-radius: 50%; border: 0; padding: 0;
    background: transparent; color: var(--rv-green-700); font-size: 1rem; line-height: 1; cursor: help;
}
.rv-hint:hover, .rv-hint:focus-visible { background: var(--rv-green-100); color: var(--rv-green-900); }
.rv-table th .rv-hint { margin-left: .15rem; width: 22px; height: 22px; font-size: .9rem; text-transform: none; letter-spacing: 0; }
.rv-ops .rv-hint { width: 40px; height: 40px; font-size: 1.35rem; }
.rv-display .rv-hint { color: #9fc5ae; }

.tooltip { --bs-tooltip-bg: var(--rv-ink); --bs-tooltip-opacity: 1; --bs-tooltip-max-width: 280px; --bs-tooltip-font-size: .85rem; --bs-tooltip-padding-x: .7rem; --bs-tooltip-padding-y: .5rem; --bs-tooltip-border-radius: 10px; }
.popover { --bs-popover-border-radius: 14px; --bs-popover-max-width: 320px; --bs-popover-font-size: .95rem; --bs-popover-border-color: var(--rv-line); --bs-popover-header-bg: var(--rv-green-50); --bs-popover-header-color: var(--rv-green-900); box-shadow: var(--rv-shadow-lg); }
.popover-header { font-weight: 700; }

.rv-guide { --bs-offcanvas-width: 440px; }
.rv-guide .offcanvas-header { border-bottom: 1px solid var(--rv-line-2); }
.rv-guide-h { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--rv-muted); font-weight: 700; margin-bottom: .6rem; }
.rv-guide-dl { display: grid; grid-template-columns: minmax(110px, 36%) 1fr; gap: .55rem .9rem; margin: 0; }
.rv-guide-dl dt { font-weight: 700; color: var(--rv-ink); }
.rv-guide-dl dd { margin: 0; color: var(--rv-ink-2); }
.rv-guide-foot { padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--rv-line); background: var(--rv-sunken); }
.rv-guide-foot .btn { min-height: 52px; font-size: 1rem; }
.flex-none { flex: none; }
.rv-ops .rv-guide { font-size: 1.05rem; }
.rv-ops .rv-guide-dl { grid-template-columns: minmax(130px, 34%) 1fr; }
@media (max-width: 575.98px) { .rv-guide { --bs-offcanvas-width: 100%; } .rv-guide-dl { grid-template-columns: 1fr; gap: .15rem .5rem; } .rv-guide-dl dd { margin-bottom: .6rem; } }

/* Dashboard "Coming up" */
.rv-ahead { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .75rem; }
.rv-ahead a, .rv-ahead div.rv-ahead-item { display: block; padding: .9rem 1rem; border-radius: var(--rv-radius); background: var(--rv-sunken); color: var(--rv-ink); border: 1px solid transparent; }
.rv-ahead a:hover { border-color: var(--rv-green-500); color: var(--rv-ink); }
.rv-ahead .l { font-size: .8rem; font-weight: 600; color: var(--rv-muted); display: flex; align-items: center; gap: .4rem; }
.rv-ahead .l i { color: var(--rv-green-600); }
.rv-ahead .v { font-size: 1.35rem; font-weight: 800; margin-top: .2rem; font-variant-numeric: tabular-nums; }
.rv-ahead .s { font-size: .8rem; color: var(--rv-muted); }

/* ==========================================================================
   The public website (the front door at /)
   ========================================================================== */
.rv-site { background: var(--rv-surface); }
.rv-site-bar {
    position: sticky; top: 0; z-index: 1020; height: 72px; padding: 0 clamp(1rem, 4vw, 3rem);
    display: flex; align-items: center; gap: 1.5rem; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--rv-line);
}
.rv-site-nav { display: flex; gap: 1.4rem; margin-left: auto; }
.rv-site-nav a { color: var(--rv-ink-2); font-weight: 600; }
.rv-site-nav a:hover { color: var(--rv-green-800); }
.rv-site-signin { flex: none; }
@media (max-width: 767.98px) { .rv-site-nav { display: none; } .rv-site-signin { margin-left: auto; } }

.rv-hero {
    display: grid; grid-template-columns: 1.15fr 1fr; gap: 2rem; align-items: center;
    padding: clamp(2.5rem, 7vw, 5.5rem) clamp(1rem, 4vw, 3rem);
    background: radial-gradient(900px 420px at 85% 0%, rgba(26,154,90,.16), transparent 60%), linear-gradient(180deg, #f2f8f4, var(--rv-surface));
}
.rv-hero-inner { max-width: 620px; }
.rv-hero-kicker { color: var(--rv-green-700); font-weight: 700; font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; }
.rv-hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.06; margin-bottom: 1rem; }
.rv-hero-sub { font-size: 1.15rem; color: var(--rv-ink-2); max-width: 52ch; }
.rv-hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0; }
.rv-hero-points { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; color: var(--rv-ink-2); font-weight: 500; }
.rv-hero-points i { color: var(--rv-green-600); margin-right: .5rem; }
.rv-hero-art { display: flex; justify-content: center; }
.rv-hero-card { width: 100%; max-width: 380px; background: var(--rv-surface); border: 1px solid var(--rv-line); border-radius: var(--rv-radius-lg); box-shadow: var(--rv-shadow-lg); padding: 1.25rem 1.4rem; display: grid; gap: .8rem; transform: rotate(-2deg); }
.rv-hero-card-head { display: flex; align-items: center; gap: .8rem; padding-bottom: .8rem; border-bottom: 1px solid var(--rv-line-2); }
.rv-hero-card-head .rv-avatar { font-size: 1.2rem; }
.rv-hero-card-head small { display: block; color: var(--rv-muted); }
.rv-hero-card-row { display: flex; justify-content: space-between; gap: 1rem; font-variant-numeric: tabular-nums; }
.rv-hero-card-row.total { border-top: 1px dashed var(--rv-line); padding-top: .8rem; font-size: 1.05rem; }
@media (max-width: 900px) { .rv-hero { grid-template-columns: 1fr; } .rv-hero-art { display: none; } }

.rv-section { padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 4vw, 3rem); max-width: 1180px; margin: 0 auto; }
.rv-section-alt { background: var(--rv-bg); max-width: none; }
.rv-section-alt > * { max-width: 1180px; margin-left: auto; margin-right: auto; }
.rv-section-head { max-width: 640px; margin-bottom: 1.5rem; }
.rv-section-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: .4rem; }
.rv-section-head p { color: var(--rv-muted); font-size: 1.05rem; margin: 0; }
.rv-site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.rv-site-grid-2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.rv-site-tile { display: flex; gap: 1rem; align-items: flex-start; padding: 1.2rem 1.3rem; border: 1px solid var(--rv-line); border-radius: var(--rv-radius-lg); background: var(--rv-surface); box-shadow: var(--rv-shadow-sm); }
.rv-site-tile .ico { width: 56px; height: 56px; border-radius: 16px; flex: none; display: grid; place-items: center; color: #fff; font-size: 1.6rem; }
.rv-site-tile strong { font-size: 1.15rem; display: block; }
.rv-site-rates { display: flex; flex-wrap: wrap; gap: .4rem; }
.rv-site-rates > span { padding: .2rem .6rem; border-radius: 999px; background: var(--rv-green-50); color: var(--rv-green-900); font-size: .85rem; }
.rv-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.rv-steps li { background: var(--rv-surface); border: 1px solid var(--rv-line); border-radius: var(--rv-radius-lg); padding: 1.4rem; display: grid; gap: .4rem; }
.rv-steps .n { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--rv-green-700); color: #fff; font-weight: 800; font-size: 1.2rem; margin-bottom: .4rem; }
.rv-steps strong { font-size: 1.2rem; }
.rv-steps span:not(.n) { color: var(--rv-ink-2); }
.rv-contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.rv-contact-item { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; min-height: 80px; background: var(--rv-surface); border: 1px solid var(--rv-line); border-radius: var(--rv-radius-lg); color: var(--rv-ink); }
.rv-contact-item i { font-size: 1.7rem; color: var(--rv-green-700); }
.rv-contact-item strong { display: block; font-size: .85rem; color: var(--rv-muted); text-transform: uppercase; letter-spacing: .05em; }
a.rv-contact-item:hover { border-color: var(--rv-green-500); color: var(--rv-ink); }
.rv-site-foot { display: flex; justify-content: space-between; gap: 1rem; padding: 1.5rem clamp(1rem, 4vw, 3rem); border-top: 1px solid var(--rv-line); color: var(--rv-muted); font-size: .9rem; }

/* Weigh review: one block per grade with its deduction, reason, bales and payable kilos */
.rv-review-line { padding: .9rem 0; border-bottom: 1px solid var(--rv-line-2); }
.rv-review-line:last-of-type { border-bottom: 0; }
.rv-review-adjust { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; margin-top: .6rem; align-items: end; }
.rv-review-field { display: grid; gap: .25rem; margin: 0; }
.rv-review-field > span { font-size: .85rem; font-weight: 600; color: var(--rv-muted); }
.rv-review-payable strong { font-size: 1.4rem; font-weight: 800; font-variant-numeric: tabular-nums; min-height: var(--rv-touch); display: flex; align-items: center; color: var(--rv-green-800); }
