:root {
    --bg: #f0fdf4;
    --panel: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --primary: #16a34a;
    --primary-dark: #15803d;
    --primary-light: #dcfce7;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
    --shadow: 0 4px 6px rgba(0,0,0,.06), 0 2px 4px rgba(0,0,0,.04);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.6;
}

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

/* ── Topbar ─────────────────────────────────────────────── */
.topbar {
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #fff;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.4px;
}

.brand svg { flex-shrink: 0; }
.brand:hover { text-decoration: none; opacity: 0.9; }

nav { display: flex; align-items: center; gap: 4px; }
nav form { margin: 0; }

nav a {
    color: rgba(255,255,255,.85);
    font-size: 14px;
    font-weight: 500;
    padding: 7px 13px;
    border-radius: 7px;
    transition: background .15s;
}

nav a:hover {
    background: rgba(255,255,255,.15);
    color: #fff;
    text-decoration: none;
}

nav button[type="submit"] {
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 7px;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    padding: 7px 14px;
    transition: background .15s;
}

nav button[type="submit"]:hover { background: rgba(255,255,255,.25); }

/* ── Layout ─────────────────────────────────────────────── */
.container {
    margin: 0 auto;
    max-width: 1120px;
    padding: 36px 32px;
}

.page-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.compact { margin-bottom: 16px; }

h1, h2 { margin-top: 0; letter-spacing: -0.3px; }
h1 { font-size: 24px; font-weight: 800; }
h2 { font-size: 17px; font-weight: 700; }
p { margin-top: 0; color: var(--muted); }

/* ── Panels ─────────────────────────────────────────────── */
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 28px;
    box-shadow: var(--shadow-sm);
}

.narrow { max-width: 500px; }

/* ── Forms ──────────────────────────────────────────────── */
.form p { display: grid; gap: 6px; }

label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.upload-box {
    background: #f0fdf4;
    border: 2px dashed #86efac;
    border-radius: 10px;
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
    padding: 32px 24px;
    text-align: center;
}

.upload-hint {
    color: var(--muted);
    font-size: 13px;
    margin: 0;
}

input, textarea, select {
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
    padding: 10px 14px;
    transition: border-color .15s, box-shadow .15s;
    width: 100%;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(22,163,74,.12);
    outline: none;
}

/* ── Buttons ────────────────────────────────────────────── */
button, .button {
    align-items: center;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    gap: 6px;
    padding: 9px 16px;
    text-decoration: none;
    transition: background .15s, border-color .15s, box-shadow .15s;
    white-space: nowrap;
}

button:hover, .button:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

.danger {
    background: var(--danger-light);
    border-color: #fca5a5;
    color: var(--danger);
}

.danger:hover {
    background: #fee2e2;
    border-color: var(--danger);
    color: var(--danger);
    box-shadow: none;
}

/* ── Table ──────────────────────────────────────────────── */
.table { display: grid; gap: 4px; }

.table-row {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--text);
    display: grid;
    gap: 16px;
    grid-template-columns: 72px 1fr 1.4fr 160px;
    padding: 14px 18px;
    align-items: center;
    transition: box-shadow .15s, border-color .15s;
}

a.table-row:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    text-decoration: none;
}

.table-head {
    background: #f8fafc;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

/* ── Detail ─────────────────────────────────────────────── */
.detail-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
}

.location-panel { margin-top: 24px; }

.collector-action-panel {
    margin-top: 24px;
    border-left: 4px solid var(--primary);
    background: linear-gradient(180deg, var(--primary-light) 0%, #fff 72px);
}

.form-grid {
    display: grid;
    gap: 0 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.request-image {
    border-radius: 10px;
    max-height: 520px;
    object-fit: contain;
    width: 100%;
}

/* ── Metrics ────────────────────────────────────────────── */
.metric-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 24px;
}

.metric {
    background: var(--primary-light);
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}

.metric strong {
    display: block;
    font-size: 34px;
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1.1;
}

.metric span {
    color: #166534;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* ── Definition list ────────────────────────────────────── */
dl { margin: 0; }

dt {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    margin-top: 18px;
    margin-bottom: 3px;
}

dt:first-child { margin-top: 0; }
dd { margin: 0; color: var(--text); font-size: 14px; }

/* ── Status pills ───────────────────────────────────────── */
.status-pill {
    border: 1px solid transparent;
    border-radius: 999px;
    display: inline-flex;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    padding: 3px 10px;
    text-transform: uppercase;
    /* default */
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.status-pill.status--submitted    { background: #eff6ff; border-color: #bfdbfe;  color: #1d4ed8; }
.status-pill.status--accepted     { background: #dcfce7; border-color: #86efac;  color: #15803d; }
.status-pill.status--in_progress  { background: #fffbeb; border-color: #fde68a;  color: #92400e; }
.status-pill.status--collected    { background: #f0fdfa; border-color: #99f6e4;  color: #0f766e; }
.status-pill.status--rejected     { background: #fef2f2; border-color: #fca5a5;  color: #b91c1c; }

.status-pill.status--needs_location    { background: #fff7ed; border-color: #fed7aa; color: #c2410c; }
.status-pill.status--auto_detected     { background: #dcfce7; border-color: #86efac; color: #15803d; }
.status-pill.status--manually_provided { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }

.status-pill.warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }

/* ── Flash messages ─────────────────────────────────────── */
.messages { margin-bottom: 24px; }

.messages p {
    border-radius: 9px;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 8px;
    padding: 12px 16px;
    /* default = info/success */
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #15803d;
}

.messages p.warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.messages p.error   { background: #fef2f2; border-color: #fca5a5; color: #b91c1c; }

/* ── Inline warning ─────────────────────────────────────── */
.inline-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    color: #92400e;
    font-size: 13px;
    margin-bottom: 0;
    padding: 10px 14px;
}

/* ── Collector cards ────────────────────────────────────── */
.request-cards { display: grid; gap: 16px; }

.request-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    display: grid;
    gap: 20px;
    grid-template-columns: 190px 1fr;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .15s;
}

.request-card:hover { box-shadow: var(--shadow); }

.request-card img {
    border-radius: 8px;
    height: 148px;
    object-fit: cover;
    width: 100%;
}

.card-meta { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.card-items { font-size: 13px; font-weight: 600; color: var(--primary-dark); margin-bottom: 0; }

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

/* ── Auth pages ─────────────────────────────────────────── */
.auth-wrap {
    display: flex;
    justify-content: center;
    padding-top: 20px;
}

.auth-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 40px 36px;
    width: 100%;
    max-width: 440px;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.4px;
    margin-bottom: 6px;
}

.auth-tagline {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 28px;
}

.auth-footer {
    margin-top: 20px;
    font-size: 13px;
    text-align: center;
}

/* ── Empty state ────────────────────────────────────────── */
.empty-state {
    padding: 40px 0;
    text-align: center;
}

.empty-state p { font-size: 15px; }

/* ── Stats grid ─────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    padding: 20px 18px;
    text-align: center;
}

.stat-card strong {
    display: block;
    font-size: 30px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.15;
    letter-spacing: -0.5px;
}

.stat-card span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.stat-card--green { background: var(--primary-light); border-color: #86efac; }
.stat-card--green strong { color: var(--primary-dark); }

.stat-card--pending { background: #fffbeb; border-color: #fde68a; }
.stat-card--pending strong { color: #92400e; }

.stat-card--eco { background: #f0fdf4; border-color: #6ee7b7; }
.stat-card--eco strong { color: #065f46; }

/* ── Items breakdown table ──────────────────────────────── */
.items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.items-table th {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    padding: 0 16px 10px 0;
    text-align: left;
    text-transform: uppercase;
}

.items-table td {
    padding: 10px 16px 10px 0;
    border-top: 1px solid var(--line);
}

.text-green { color: var(--primary-dark); font-weight: 600; }
.muted { color: var(--muted); }

/* ── Status sections ────────────────────────────────────── */
.status-section { margin-bottom: 28px; }

.status-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

/* ── View toggle ────────────────────────────────────────── */
/* Segmented control on the light page header. Both labels must stay legible;
   the active one gets a raised white pill. (Previously styled white-on-white
   for a dark header that no longer exists, so idle labels were invisible.) */
.view-toggle {
    background: #eef2f6;
    border: 1px solid var(--line);
    border-radius: 9px;
    display: flex;
    gap: 2px;
    padding: 3px;
}

.view-btn {
    background: transparent;
    border: none;
    border-radius: 7px;
    color: #334155;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 16px;
    transition: background .15s, color .15s;
    box-shadow: none;
}

.view-btn:hover {
    background: rgba(15,23,42,.05);
    color: var(--text);
    box-shadow: none;
}

.view-btn.active {
    background: var(--panel);
    color: var(--primary-dark);
    box-shadow: var(--shadow-sm);
}

/* ── Collector map ──────────────────────────────────────── */
#collector-map {
    border-radius: 12px;
    border: 1px solid var(--line);
    /* Cap by viewport so the map never swallows the whole screen on phones. */
    height: min(580px, 72vh);
    min-height: 320px;
    width: 100%;
}

/* ── Refund badge ───────────────────────────────────────── */
.card-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.refund-badge {
    background: var(--primary-light);
    border: 1px solid #86efac;
    border-radius: 999px;
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
}

/* ── Info page ──────────────────────────────────────────── */
.info-hero {
    background: linear-gradient(135deg, #166534 0%, #15803d 60%, #16a34a 100%);
    border-radius: 16px;
    color: #fff;
    margin-bottom: 40px;
    padding: 48px 40px;
}

.info-hero h1 { color: #fff; font-size: 30px; margin-bottom: 12px; }
.info-hero p  { color: rgba(255,255,255,.88); font-size: 16px; max-width: 680px; margin: 0; }

.info-section { margin-bottom: 44px; }

.info-section-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 6px;
}

.info-section-sub {
    color: var(--muted);
    font-size: 14px;
    max-width: 760px;
    margin-bottom: 24px;
}

/* How it works steps */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.step-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    padding: 24px 20px;
    position: relative;
}

.step-number {
    background: var(--primary);
    border-radius: 999px;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    height: 28px;
    line-height: 28px;
    margin-bottom: 14px;
    text-align: center;
    width: 28px;
}

.step-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.step-card p  { font-size: 13px; margin: 0; }

/* Canada stats */
.canada-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.canada-stat-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    padding: 28px 24px;
}

.canada-stat-icon { font-size: 28px; margin-bottom: 8px; }

.canada-stat-number {
    font-size: 52px;
    font-weight: 900;
    color: var(--primary-dark);
    line-height: 1;
    letter-spacing: -2px;
    margin-bottom: 4px;
}

.canada-stat-unit {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0;
}

.canada-stat-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.canada-stat-detail {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 12px;
}

.canada-stat-source {
    font-size: 11px;
    color: #94a3b8;
    border-top: 1px solid var(--line);
    padding-top: 10px;
}

.canada-stat-source a { color: #64748b; }
.canada-stat-source a:hover { color: var(--primary-dark); }

/* Rates table */
.info-rates-table th,
.info-rates-table td { padding: 14px 20px; }
.info-rates-table thead th:first-child { border-radius: 0; }

/* Goals */
.goals-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.goal-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    padding: 24px 20px;
}

.goal-year {
    font-size: 32px;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: -1px;
    margin-bottom: 10px;
}

.goal-card p { font-size: 13px; margin: 0; }

/* Sources */
.sources-list {
    margin: 0;
    padding-left: 20px;
    display: grid;
    gap: 14px;
}

.sources-list li { font-size: 13px; color: var(--text); }
.sources-list em { color: var(--muted); }

.info-disclaimer {
    color: #94a3b8;
    font-size: 12px;
    margin-top: 12px;
}

/* ── Pending confirmation ───────────────────────────────── */
.pending-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    max-width: 480px;
    padding: 48px 40px;
    text-align: center;
    width: 100%;
}

.pending-icon {
    background: var(--primary-light);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 72px;
    width: 72px;
    margin-bottom: 20px;
}

.pending-card h1 { font-size: 22px; margin-bottom: 10px; }

.pending-lead { font-size: 15px; color: var(--text); margin-bottom: 28px; }
.pending-lead strong { color: var(--primary-dark); }

.pending-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 28px;
}

.pending-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    min-width: 90px;
}

.pending-step-line {
    flex: 1;
    height: 2px;
    background: var(--line);
    min-width: 28px;
    margin-bottom: 20px;
}

.pending-step-dot {
    background: var(--line);
    border-radius: 999px;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    height: 32px;
    width: 32px;
}

.pending-step-dot--done   { background: var(--primary); color: #fff; }
.pending-step-dot--active { background: #fffbeb; border: 2px solid #fde68a; color: #92400e; }

.pending-note {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 24px;
    line-height: 1.6;
}

/* ── Profile page ───────────────────────────────────────── */
.nav-profile {
    background: rgba(255,255,255,.15);
    border-radius: 7px;
    border: 1px solid rgba(255,255,255,.25);
    font-weight: 600 !important;
    padding: 6px 12px !important;
}

.nav-profile:hover {
    background: rgba(255,255,255,.28) !important;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.profile-section-header { margin-bottom: 12px; }
.profile-section-header h2 { margin-bottom: 2px; }
.profile-section-header p  { margin: 0; font-size: 13px; }

.profile-role-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.profile-role-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--muted);
}

.field-error {
    color: #b91c1c;
    font-size: 12px;
    margin-top: 3px;
    display: block;
}

.field-hint {
    color: var(--muted);
    font-size: 12px;
    margin-top: 3px;
    display: block;
    line-height: 1.4;
}

.consent-group { margin: 18px 0 4px; }
.consent-row { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0; }
.consent-row input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; width: 16px; height: 16px; }
.consent-row label { font-size: 13px; line-height: 1.5; color: var(--ink-soft, var(--muted)); }
.consent-row label a { color: var(--green-deep, #0B7A3B); text-decoration: underline; }

/* ── Nav admin button ───────────────────────────────────── */
/* Active page in the topbar nav — applied via Django template URL-name matching. */
nav a.nav-active {
    background: rgba(255,255,255,.22);
    color: #fff !important;
    font-weight: 600;
}

/* ── Admin portal ───────────────────────────────────────── */
.portal-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--line);
    margin-bottom: 24px;
}

.portal-tab {
    align-items: center;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    display: inline-flex;
    font-size: 14px;
    font-weight: 600;
    gap: 8px;
    margin-bottom: -2px;
    padding: 10px 16px;
    text-decoration: none;
    transition: color .15s, border-color .15s;
}

.portal-tab:hover { color: var(--text); text-decoration: none; }

.portal-tab--active {
    border-bottom-color: var(--primary);
    color: var(--primary-dark);
}

.portal-tab-badge {
    background: #fde68a;
    border-radius: 999px;
    color: #92400e;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    padding: 3px 7px;
}

/* Access request cards */
.access-request-list { display: grid; gap: 16px; }

.access-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    padding: 24px;
}

.access-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.access-card-username {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin-right: 8px;
}

.access-card-fullname {
    color: var(--muted);
    font-size: 14px;
}

.access-card-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    font-size: 13px;
    flex-shrink: 0;
}

.access-card-reason {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 16px;
    padding: 14px 16px;
}

.access-card-reason-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
}

.access-card-reason p {
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.access-card-actions {
    display: flex;
    gap: 8px;
}

/* Users table */
.users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.users-table th {
    background: #f8fafc;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    padding: 12px 16px;
    text-align: left;
    text-transform: uppercase;
}

.users-table td {
    border-bottom: 1px solid var(--line);
    padding: 14px 16px;
    vertical-align: middle;
}

.users-table tr:last-child td { border-bottom: none; }

.users-table-current td { background: #f0fdf4; }

.users-table-username { font-weight: 600; display: block; }

.users-table-name {
    color: var(--muted);
    font-size: 12px;
    display: block;
}

.users-table-actions { text-align: right; white-space: nowrap; }

/* Delete disclosure in a user row — two-step so it's never a one-click action. */
.user-delete-menu { position: relative; display: inline-block; }
.user-delete-summary { list-style: none; cursor: pointer; }
.user-delete-summary::-webkit-details-marker { display: none; }
.user-delete-menu[open] > .user-delete-summary { outline: 2px solid var(--danger); outline-offset: 1px; }
.user-delete-pop {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 20;
    width: 232px;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
    white-space: normal;
}
.user-delete-pop .button { width: 100%; justify-content: center; }
.user-delete-hint { margin: 2px 0 0; font-size: 11px; line-height: 1.45; color: var(--muted); }

.portal-role-pill {
    border-radius: 999px;
    border: 1px solid transparent;
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    padding: 3px 10px;
    text-transform: uppercase;
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: var(--muted);
}

.portal-role--collector { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.portal-role--admin     { background: #fdf4ff; border-color: #e9d5ff; color: #7e22ce; }

.status-pill.status--approved { background: #dcfce7; border-color: #86efac; color: #15803d; }
.status-pill.status--pending  { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.status-pill.status--blocked  { background: #fef2f2; border-color: #fca5a5; color: #b91c1c; }
.status-pill.status--rejected { background: #f1f5f9; border-color: #e2e8f0; color: var(--muted); }

/* ── Rankings ────────────────────────────────────────────── */
.podium-wrap {
    display: grid;
    grid-template-columns: 1fr 1.15fr 1fr;
    gap: 16px;
    align-items: end;
    margin-bottom: 28px;
}

.podium-card {
    border-radius: 14px;
    border: 2px solid transparent;
    padding: 24px 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.podium-gold   { background: #fffbeb; border-color: #fcd34d; }
.podium-silver { background: #f8fafc; border-color: #cbd5e1; }
.podium-bronze { background: #fff7ed; border-color: #fed7aa; }
.podium-current { box-shadow: 0 0 0 3px rgba(22,163,74,.35), var(--shadow); }

.podium-medal  { font-size: 36px; margin-bottom: 6px; }
.podium-rank   { font-size: 13px; font-weight: 800; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; }
.podium-name   { font-size: 17px; font-weight: 800; color: var(--text); margin-bottom: 4px; word-break: break-word; }
.podium-you    { display: inline-block; background: var(--primary); border-radius: 999px; color: #fff; font-size: 11px; font-weight: 700; padding: 2px 10px; margin-bottom: 10px; }
.podium-stats  { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); margin-top: 12px; }
.podium-stats strong { color: var(--text); }

/* Full ranking table */
.ranking-table { display: grid; gap: 0; }

.ranking-row {
    display: grid;
    grid-template-columns: 52px 1fr 80px 80px 120px 140px 120px 110px 110px;
    align-items: center;
    gap: 8px;
    padding: 13px 20px;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    transition: background .12s;
}

.ranking-row:last-child { border-bottom: none; }
.ranking-row:not(.ranking-head):hover { background: #f8fafc; }

.ranking-head {
    background: #f8fafc;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.ranking-row--current { background: #f0fdf4 !important; }
.ranking-row--current:hover { background: #dcfce7 !important; }

.rank-badge { font-size: 18px; text-align: center; }
.rank-badge--1, .rank-badge--2, .rank-badge--3 { font-size: 20px; }

.ranking-username { font-weight: 600; }

.you-tag {
    background: var(--primary);
    border-radius: 999px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    margin-left: 6px;
    padding: 2px 7px;
    vertical-align: middle;
}

/* Collection rate bar */
.rate-bar-wrap {
    display: inline-block;
    background: var(--line);
    border-radius: 999px;
    height: 6px;
    width: 60px;
    vertical-align: middle;
    margin-right: 6px;
    overflow: hidden;
}

.rate-bar {
    display: block;
    background: var(--primary);
    height: 100%;
    border-radius: 999px;
    min-width: 2px;
}

.rate-label { font-size: 12px; font-weight: 600; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 760px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .steps-grid, .goals-grid { grid-template-columns: 1fr; }
    .canada-stats-grid { grid-template-columns: 1fr; }
    .info-hero { padding: 32px 24px; }
    .canada-stat-number { font-size: 40px; }
    .podium-wrap { grid-template-columns: 1fr; align-items: stretch; }
    .ranking-row { grid-template-columns: 40px 1fr 60px 60px; }
    .ranking-row > span:nth-child(n+5) { display: none; }
    .profile-grid { grid-template-columns: 1fr; }
    .topbar { padding: 0 20px; }

    .page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .header-actions { flex-direction: column; align-items: stretch; }
    nav { flex-wrap: wrap; }
    .container { padding: 20px; }

    .table-row {
        grid-template-columns: 1fr 1fr;
    }

    .detail-grid,
    .request-card,
    .metric-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Notification bell ──────────────────────────────────── */
.nav-notif {
    position: relative;
    padding: 7px 10px !important;
    font-size: 16px;
}

.notif-badge {
    background: #ef4444;
    border-radius: 999px;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    min-width: 16px;
    padding: 2px 4px;
    position: absolute;
    top: 4px;
    right: 4px;
    text-align: center;
}

/* ── Notification list ──────────────────────────────────── */
.notif-list { display: grid; gap: 10px; }

.notif-item {
    background: var(--panel);
    border: 1px solid var(--line);
    border-left: 4px solid var(--line);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    box-shadow: var(--shadow-sm);
}

.notif--accepted    { border-left-color: #16a34a; }
.notif--in_progress { border-left-color: #f59e0b; }
.notif--collected,
.notif--confirmed   { border-left-color: #0f766e; }
.notif--rejected    { border-left-color: #ef4444; }
.notif--stale       { border-left-color: #f59e0b; }
.notif--message     { border-left-color: #3b82f6; }
.notif--approved    { border-left-color: #16a34a; }
.notif--rated       { border-left-color: #7e22ce; }

.notif-body p    { margin: 0; font-size: 14px; }
.notif-time      { font-size: 12px; display: block; margin-top: 4px; }

/* ── Queue filters ──────────────────────────────────────── */
.queue-filters { padding: 16px 20px !important; }

.queue-filter-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.queue-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
}

.queue-filter-group label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--muted);
}

.queue-filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: auto;
}

/* ── Message thread ─────────────────────────────────────── */
.message-thread {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
    max-height: 340px;
    overflow-y: auto;
    padding-right: 4px;
}

.msg { max-width: 75%; }
.msg--mine   { margin-left: auto; }
.msg--theirs { margin-right: auto; }

.msg-header {
    display: flex;
    gap: 8px;
    align-items: baseline;
    margin-bottom: 4px;
    font-size: 12px;
}

.msg-body {
    background: #f1f5f9;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
    padding: 10px 14px;
}

.msg--mine .msg-body {
    background: var(--primary-light);
    color: #14532d;
}

/* ── Star rating ────────────────────────────────────────── */
.rating-stars {
    display: flex;
    gap: 6px;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.star-label {
    cursor: pointer;
    font-size: 26px;
    color: #d1d5db;
    transition: color .1s;
}

.star-label:hover,
.star-label:hover ~ .star-label,
.rating-stars input:checked ~ label {
    color: #f59e0b;
}

.star-label input { display: none; }

/* ── Stale card ─────────────────────────────────────────── */
.request-card--stale { border-color: #fde68a; background: #fffbeb; }

/* ── Collector queue in_progress highlight ──────────────── */
.request-card--inprogress { border-color: #86efac; background: #f0fdf4; }

/* ── Request type selector ──────────────────────────────── */
.form-step { margin-bottom: 24px; }

.form-step-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Full reset of browser button defaults so only the inner card shows. */
.type-selector .type-option {
    all: unset;
    box-sizing: border-box;
    cursor: pointer;
    display: block;
    width: 100%;
    -webkit-tap-highlight-color: transparent;
}

.type-option-card {
    background: var(--panel);
    border: 2px solid var(--line);
    border-radius: 12px;
    display: grid;
    gap: 6px;
    padding: 24px 18px;
    text-align: center;
    transition: border-color .15s, box-shadow .15s, background .15s;
}

.type-option:hover .type-option-card,
.type-option:focus-visible .type-option-card {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.type-option:active .type-option-card {
    background: var(--primary-light);
}

.type-option-icon  { font-size: 32px; line-height: 1; }
.type-option-title { font-size: 16px; font-weight: 700; color: var(--text); }
.type-option-desc  { font-size: 13px; color: var(--muted); line-height: 1.4; }

/* Signup variant: three tiles, and a sticky selected state (the request form's
   tiles act immediately, but here the choice must stay visibly picked). */
.type-selector--3 { grid-template-columns: 1fr 1fr 1fr; }
.type-option.selected .type-option-card {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: var(--shadow-sm);
}

/* ── FAQ accordion ───────────────────────────────────────── */
.faq-list { max-width: 780px; margin-left: auto; margin-right: auto; }
.faq-item {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    margin-bottom: 12px;
    overflow: hidden;
}
.faq-item summary {
    cursor: pointer;
    padding: 18px 20px;
    font-weight: 700;
    font-size: 15.5px;
    list-style: none;
    position: relative;
    padding-right: 44px;
    -webkit-tap-highlight-color: transparent;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "+";
    position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
    font-size: 20px; font-weight: 600; color: var(--primary);
    transition: transform .2s;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item summary:hover { background: var(--primary-light); }
.faq-body { padding: 0 20px 18px; font-size: 14.5px; line-height: 1.65; color: var(--text); }
.faq-body p { margin: 0 0 12px; }
.faq-body p:last-child { margin-bottom: 0; }
.faq-body ul, .faq-body ol { margin: 0 0 12px; padding-left: 22px; }
.faq-body li { margin-bottom: 6px; }

/* ── Type pills ─────────────────────────────────────────── */
.type-pill--home   { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.type-pill--street { background: #f0fdf4; border-color: #86efac; color: #15803d; }

/* ── Count correction panel ─────────────────────────────── */
.count-correction-panel {
    border-left: 4px solid #f59e0b;
    background: #fffbeb;
    border-top-color: #fde68a;
    border-right-color: #fde68a;
    border-bottom-color: #fde68a;
}

/* ── Saved address list ─────────────────────────────────── */
.saved-addr-list { display: grid; gap: 10px; }

.saved-addr-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
}

.saved-addr-info { display: grid; gap: 2px; flex: 1; }

.saved-addr-label { font-size: 15px; font-weight: 700; }

.saved-addr-detail { font-size: 13px; }

/* ── Saved address editing state ────────────────────────── */
.saved-addr-card--editing {
    border-color: var(--primary);
    background: var(--primary-light);
}

/* ── Header pills wrapper ───────────────────────────────── */
.header-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 4px;
}

.header-pills .status-pill { margin: 0; }

/* ── Impact hero (requester home) ───────────────────────── */
.impact-hero {
    background: linear-gradient(135deg, #166534 0%, #15803d 60%, #16a34a 100%);
    border-radius: 16px;
    color: #fff;
    margin-bottom: 28px;
    padding: 36px 36px 32px;
    box-shadow: var(--shadow);
}

.impact-hero-main { margin-bottom: 24px; }

.impact-hero-co2 {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.impact-hero-co2-value {
    font-size: 64px;
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1;
}

.impact-hero-co2-unit {
    font-size: 22px;
    font-weight: 700;
    opacity: 0.85;
}

.impact-hero-label {
    color: rgba(255,255,255,.85);
    font-size: 15px;
    margin: 6px 0 0;
}

.impact-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    border-top: 1px solid rgba(255,255,255,.18);
    padding-top: 20px;
}

.impact-hero-stats > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.impact-hero-stats strong {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1;
}

.impact-hero-stats span {
    color: rgba(255,255,255,.78);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* ── Notification list with icons ───────────────────────── */
.notif-item {
    grid-template-columns: 44px 1fr auto;
    display: grid;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
}

.notif-icon {
    background: var(--primary-light);
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    height: 40px;
    width: 40px;
}

.notif--rejected .notif-icon { background: #fef2f2; }
.notif--stale    .notif-icon { background: #fffbeb; }
.notif--message  .notif-icon { background: #eff6ff; }
.notif--rated    .notif-icon { background: #fdf4ff; }

/* ── Request list table ─────────────────────────────────── */
.request-list-row {
    grid-template-columns: 60px 110px 90px 1.5fr 1.6fr;
}

/* ── Card type badge ────────────────────────────────────── */
.request-card--mine {
    border-color: var(--primary);
    background: #f0fdf4;
}

/* ── Mobile responsiveness ──────────────────────────────── */
@media (max-width: 720px) {
    .topbar {
        padding: 0 16px;
        height: auto;
        min-height: 60px;
        flex-wrap: wrap;
    }
    nav { gap: 2px; }
    nav a { padding: 6px 10px; font-size: 13px; }
    nav button[type="submit"] { padding: 6px 10px; font-size: 13px; }

    .container { padding: 24px 16px; }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-actions { width: 100%; }
    .header-actions form { flex: 1; }
    .header-actions form button { width: 100%; }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .impact-hero {
        padding: 28px 22px 24px;
    }

    .impact-hero-co2-value {
        font-size: 48px;
    }

    .impact-hero-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .impact-hero-stats strong { font-size: 22px; }

    .request-card {
        grid-template-columns: 1fr;
    }

    .request-card img {
        height: 200px;
    }

    .type-selector {
        grid-template-columns: 1fr;
    }

    .queue-filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .queue-filter-actions {
        margin-left: 0;
    }

    .request-list-row {
        grid-template-columns: 50px 1fr 1fr;
        font-size: 13px;
    }
    .request-list-row > *:nth-child(3),
    .request-list-row > *:nth-child(5) { display: none; }

    .table-row { grid-template-columns: 60px 1fr 1fr; }
    .table-row > *:nth-child(4) { display: none; }

    .profile-grid {
        grid-template-columns: 1fr;
    }

    .users-table { font-size: 12px; }
    .users-table th, .users-table td { padding: 8px 10px; }

    h1 { font-size: 20px; }
    h2 { font-size: 16px; }

    .portal-tabs { overflow-x: auto; }
    .portal-tab { white-space: nowrap; }
}

/* ── Use small refund badge ─────────────────────────────── */
.refund-badge { font-size: 11px; }

/* ── Status pill spacing improvements ───────────────────── */
.card-title-row .status-pill { font-size: 10px; }

/* ── Annotation editor ──────────────────────────────────── */
.annotate-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
    align-items: start;
}

.annotate-main {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    padding: 16px;
}

.annotate-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.annotate-hint {
    font-size: 12px;
    color: var(--muted);
}

.annotate-canvas-wrap { position: relative; }

.annotate-canvas {
    position: relative;
    background: #0f172a;
    border-radius: 10px;
    overflow: hidden;
    user-select: none;
    line-height: 0;
    cursor: crosshair;
}

#ann-image {
    display: block;
    max-width: 100%;
    height: auto;
    user-select: none;
    pointer-events: auto;
}

.bbox {
    position: absolute;
    border: 1px solid #ef4444;
    background: rgba(239, 68, 68, 0.13);
    box-sizing: border-box;
    cursor: pointer;
    transition: box-shadow .1s;
}

.bbox:hover { box-shadow: 0 0 0 2px rgba(255,255,255,.4); }
.bbox--selected { box-shadow: 0 0 0 3px #fff; }
.bbox--drawing  { pointer-events: none; border-style: dashed; }

.bbox-tag {
    position: absolute;
    top: -1px;
    left: -1px;
    transform: translateY(-100%);
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .03em;
    padding: 3px 6px;
    border-radius: 4px 4px 4px 0;
    white-space: nowrap;
}

.annotate-side {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.box-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }

.box-list-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    cursor: pointer;
}

.box-list-item:hover { border-color: #cbd5e1; }
.box-list-item--selected { background: #f0fdf4; border-color: var(--primary); }

.box-list-item select {
    flex: 1;
    padding: 4px 6px;
    font-size: 12px;
}

.box-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .annotate-layout { grid-template-columns: 1fr; }
    .annotate-side   { position: static; max-height: none; }
}

kbd {
    background: #f1f5f9;
    border: 1px solid var(--line);
    border-bottom-width: 2px;
    border-radius: 4px;
    padding: 1px 6px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
}

/* ── Annotation editor: resize handles ──────────────────── */
.bbox--selected { cursor: move; }
.bbox:not(.bbox--selected):not(.bbox--drawing) { cursor: pointer; }

.bbox-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #fff;
    border: 2px solid #0f172a;
    border-radius: 2px;
    box-sizing: border-box;
}

.bbox-handle--nw { top:  -6px; left:  -6px; cursor: nw-resize; }
.bbox-handle--n  { top:  -6px; left: 50%; transform: translateX(-50%); cursor: n-resize;  }
.bbox-handle--ne { top:  -6px; right: -6px; cursor: ne-resize; }
.bbox-handle--w  { top: 50%; left:  -6px; transform: translateY(-50%); cursor: w-resize;  }
.bbox-handle--e  { top: 50%; right: -6px; transform: translateY(-50%); cursor: e-resize;  }
.bbox-handle--sw { bottom: -6px; left:  -6px; cursor: sw-resize; }
.bbox-handle--s  { bottom: -6px; left: 50%; transform: translateX(-50%); cursor: s-resize;  }
.bbox-handle--se { bottom: -6px; right: -6px; cursor: se-resize; }

/* ── Advanced annotation canvas: zoom / pan / rotate ─────── */
.annotate-viewport {
    position: relative;
    width: 100%;
    height: 68vh;
    min-height: 380px;
    background: #0b1220;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    cursor: crosshair;
    user-select: none;
    touch-action: none;
}
.annotate-viewport.can-pan { cursor: grab; }
.annotate-viewport.panning { cursor: grabbing; }

.ann-img {
    position: absolute;
    top: 0; left: 0;
    max-width: none;
    transform-origin: 0 0;
    -webkit-user-drag: none;
    user-select: none;
}
.ann-box-layer { position: absolute; inset: 0; pointer-events: none; }
.ann-box-layer .bbox { pointer-events: auto; }

.ann-zoom {
    position: absolute; right: 12px; bottom: 12px; z-index: 5;
    display: flex; align-items: center; gap: 6px;
    padding: 6px; border-radius: 10px;
    background: rgba(15, 23, 42, .72);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.ann-zoom button {
    width: 30px; height: 30px; line-height: 1;
    border-radius: 8px; border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .10); color: #fff; font-size: 16px; cursor: pointer;
}
.ann-zoom button:hover { background: rgba(255, 255, 255, .22); }
.ann-zoom span { color: #fff; font-size: 12px; min-width: 42px; text-align: center; }

.bbox-rot-line {
    position: absolute; left: 50%; top: -22px;
    width: 2px; height: 22px; margin-left: -1px;
    background: #fff; opacity: .85; pointer-events: none;
}
.bbox-rot-handle {
    position: absolute; left: 50%; top: -28px;
    width: 12px; height: 12px; margin-left: -6px;
    border-radius: 50%; background: #fff; border: 2px solid var(--primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .5); cursor: grab; box-sizing: border-box;
}
.bbox-angle-badge { font-size: 11px; color: var(--muted); }

/* ── Dataset export dropdown ─────────────────────────────── */
.export-menu { position: relative; display: inline-block; }
.export-menu > summary { list-style: none; cursor: pointer; }
.export-menu > summary::-webkit-details-marker { display: none; }
.export-menu-pop {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 30;
    width: 260px; padding: 6px;
    background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .16);
    display: flex; flex-direction: column;
}
.export-menu-pop a {
    display: block; padding: 9px 12px; border-radius: 8px; text-decoration: none; color: var(--text);
}
.export-menu-pop a:hover { background: #f8fafc; text-decoration: none; }
.export-menu-pop a strong { display: block; font-size: 13.5px; }
.export-menu-pop a span { display: block; font-size: 12px; color: var(--muted); }

/* ── Annotation tool: modes, polygon, marquee, bulk edit ── */
.ann-shortcuts { font-size: 12.5px; color: var(--muted); line-height: 1.9; }
.ann-shortcuts kbd { margin: 0 1px; }

.tool-group { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.tool-btn {
    background: var(--panel); border: none; border-right: 1px solid var(--line);
    padding: 7px 12px; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer;
}
.tool-btn:last-child { border-right: none; }
.tool-btn:hover { background: #f1f5f9; }
.tool-btn--active { background: var(--primary); color: #fff; }
.tool-label { display: flex; gap: 6px; align-items: center; margin: 0; font-size: 13px; }

/* Cursor per tool; polygon disables box hit-testing so every click adds a point. */
.annotate-viewport.tool-box     { cursor: crosshair; }
.annotate-viewport.tool-polygon { cursor: crosshair; }
.annotate-viewport.tool-select  { cursor: default; }
.annotate-viewport.tool-polygon .bbox { pointer-events: none; }

.ann-poly { position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: visible; }

.ann-marquee {
    position: absolute; z-index: 4; pointer-events: none;
    border: 1.5px dashed #2563eb; background: rgba(37, 99, 235, .12); border-radius: 2px;
}

.ann-poly-hint {
    position: absolute; left: 12px; top: 12px; z-index: 5; pointer-events: none;
    background: rgba(15, 23, 42, .78); color: #fff; font-size: 12px;
    padding: 7px 11px; border-radius: 9px; max-width: 60%;
}
.ann-poly-hint kbd { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.25); color: #fff; }

.ann-bulk {
    position: absolute; left: 12px; bottom: 12px; z-index: 6;
    display: flex; align-items: center; gap: 8px;
    background: #fff; border: 1px solid var(--line); border-radius: 12px;
    padding: 8px 10px; box-shadow: 0 10px 26px -10px rgba(15, 23, 42, .35);
}
.ann-bulk strong { font-size: 13px; }
.ann-bulk select { font-size: 12.5px; padding: 5px 8px; }
.ann-bulk .button { padding: 5px 12px; font-size: 12.5px; }

@media (max-width: 720px) {
    .annotate-toolbar { flex-wrap: wrap; }
    .ann-poly-hint { max-width: none; right: 12px; }
}

/* ── Verification badges ────────────────────────────────── */
.verify-pill--ai        { background: #f1f5f9; border-color: #cbd5e1; color: #475569; }
.verify-pill--user      { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.verify-pill--admin     { background: #fdf4ff; border-color: #e9d5ff; color: #7e22ce; }
.verify-pill--collected { background: #f0fdfa; border-color: #99f6e4; color: #0f766e; }
.verify-pill--flagged   { background: #fffbeb; border-color: #fde68a; color: #92400e; }

/* Keep checkboxes/radios their natural size (global input rule sets width:100%) */
input[type="checkbox"], input[type="radio"] { width: auto; }

/* ── Donation preference options ────────────────────────── */
.donation-options { display: grid; gap: 8px; }
.donation-option {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px; border: 1.5px solid var(--line-warm); border-radius: 10px;
    cursor: pointer; font-weight: 600; font-size: 14px; transition: border-color .12s, background .12s;
}
.donation-option:hover { border-color: #86efac; }
.donation-option:has(input:checked) { border-color: var(--primary); background: var(--green-soft); }
.donation-option input { margin: 0; flex-shrink: 0; }

/* ── Donate strip (requester home) ──────────────────────── */
.donate-strip {
    display: flex; align-items: center; gap: 10px;
    background: #fff; border: 1px solid var(--line-warm); border-radius: 14px;
    padding: 13px 16px; margin-bottom: 14px; text-decoration: none; color: var(--ink);
    font-size: 14px; transition: border-color .12s, box-shadow .12s;
}
.donate-strip:hover { border-color: #86efac; box-shadow: 0 4px 12px -6px rgba(15,42,30,.12); text-decoration: none; color: var(--ink); }
.donate-strip--on { background: var(--green-soft); border-color: #86efac; }
.donate-strip > span:nth-child(2) { flex: 1; line-height: 1.4; }
.donate-strip svg { flex-shrink: 0; }
.donate-strip-cta { color: var(--green-deep); font-weight: 700; font-size: 13px; white-space: nowrap; flex-shrink: 0; }

/* ── Refund value panel (requester home) ────────────────── */
.refund-value-panel { margin-bottom: 28px; }
.refund-value-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.refund-value-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted-warm); }
.refund-value-total { font-family: var(--font-display); font-size: 40px; font-weight: 800; letter-spacing: -1.5px; color: var(--ink); line-height: 1.1; }
.refund-value-pending { text-align: right; }
.refund-value-pending strong { display: block; font-family: var(--font-display); font-size: 20px; font-weight: 800; color: var(--ink-soft); }
.refund-value-pending span { font-size: 11px; font-weight: 600; color: var(--muted-warm); }
.refund-value-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.refund-value-cell { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line-warm); border-radius: 14px; padding: 14px 16px; }
.refund-value-cell-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; }
.refund-value-cell strong { display: block; font-family: var(--font-display); font-size: 20px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.refund-value-cell span { font-size: 12px; color: var(--muted-warm); font-weight: 600; }
.refund-value-prompt { display: inline-flex; align-items: center; gap: 7px; margin-top: 16px; font-size: 13.5px; font-weight: 700; color: var(--green-deep); text-decoration: none; }
.refund-value-prompt:hover { text-decoration: underline; }
@media (max-width: 560px) { .refund-value-split { grid-template-columns: 1fr; } }

/* ── Community donation bar (you vs. everyone) ──────────── */
.community-bar { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.community-bar-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
    font-size: 13.5px; margin-bottom: 8px; flex-wrap: wrap;
}
.community-bar-you { font-size: 12px; font-weight: 700; color: var(--green-deep); white-space: nowrap; }
.community-bar-track {
    height: 12px; border-radius: 999px; background: #e6f4ea; overflow: hidden;
    border: 1px solid #c9e8d3;
}
.community-bar-fill {
    height: 100%; min-width: 4px; border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    transition: width .6s cubic-bezier(.2, .8, .3, 1);
}
.community-bar-sub { margin-top: 7px; font-size: 12px; color: var(--muted); }

/* ── Request tracking cards (mobile-first rows) ─────────── */
.req-cards { display: grid; gap: 8px; }
.req-card {
    display: flex; align-items: center; gap: 12px;
    background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
    padding: 10px 12px; text-decoration: none; color: var(--text);
    transition: border-color .12s, box-shadow .12s;
}
.req-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); text-decoration: none; }
.req-card-thumb {
    width: 56px; height: 56px; border-radius: 9px; object-fit: cover; flex-shrink: 0;
    background: #f1f5f9;
}
.req-card-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.req-card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.req-card-live {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 700; color: #b45309;
    background: #fffbeb; border: 1px solid #fde68a; border-radius: 999px; padding: 2px 8px;
}
.req-card-live--accepted { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }
.req-card-items { font-size: 13.5px; font-weight: 600; }
.req-card-meta  { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.req-card-chev  { flex-shrink: 0; }
.req-card--history { opacity: .88; }
.req-tracking { margin-bottom: 4px; }

.items-details > summary { cursor: pointer; list-style: none; }
.items-details > summary::-webkit-details-marker { display: none; }
.items-details > summary::after { content: " ▾"; color: var(--muted); font-size: 13px; }
.items-details[open] > summary::after { content: " ▴"; }

/* ── Pinned "my active pickup" banner ───────────────────── */
.myjob {
    background: linear-gradient(135deg, #0f2a1e 0%, #14532d 100%);
    color: #fff; border-radius: 14px; padding: 14px 16px; margin-bottom: 14px;
    box-shadow: 0 10px 24px -12px rgba(15, 42, 30, .55);
}
.myjob--live { outline: 2px solid #f59e0b; outline-offset: 2px; }
.myjob-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.myjob-pill {
    font-size: 10.5px; font-weight: 800; letter-spacing: .07em;
    color: #fde68a;
}
.myjob--live .myjob-pill { animation: myjob-pulse 1.6s ease-in-out infinite; }
@keyframes myjob-pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .myjob--live .myjob-pill { animation: none; } }
.myjob-refund { font-weight: 800; font-size: 15px; color: #bbf7d0; white-space: nowrap; }
.myjob-body { font-size: 13.5px; color: rgba(255,255,255,.92); margin-bottom: 12px; }
.myjob-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.myjob-actions .button { border-color: rgba(255,255,255,.28); color: #fff; background: rgba(255,255,255,.08); }
.myjob-actions .button:hover { background: rgba(255,255,255,.18); color: #fff; }
.myjob-actions .button.primary { background: var(--primary); border-color: var(--primary); }
.myjob-nav { display: inline-flex; align-items: center; gap: 6px; }

/* ── Quick filter chips + bottom sheet ───────────────────── */
.queue-chips {
    display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: none;
}
.queue-chips::-webkit-scrollbar { display: none; }
.queue-chip {
    flex-shrink: 0; padding: 8px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
    background: var(--panel); border: 1px solid var(--line); color: var(--text); cursor: pointer;
    transition: border-color .12s, background .12s;
}
.queue-chip:hover { border-color: var(--primary); }
.queue-chip--on { background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark); }
.queue-chip--more { margin-left: auto; }

.queue-sheet-handle { display: none; }
.queue-sheet-scrim {
    display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 998;
}
.queue-sheet-scrim.scrim-on { display: block; }

/* Desktop: filters stay an inline panel; chips act as shortcuts. */
@media (min-width: 721px) {
    .queue-sheet-scrim.scrim-on { display: none; }
}

/* Mobile: the full filter form becomes a bottom action sheet. */
@media (max-width: 720px) {
    form.queue-filters {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 999;
        margin: 0; border-radius: 18px 18px 0 0;
        transform: translateY(110%); transition: transform .28s cubic-bezier(.2, .9, .3, 1);
        max-height: 80vh; overflow-y: auto;
        padding-bottom: calc(18px + env(safe-area-inset-bottom));
        box-shadow: 0 -12px 40px rgba(15, 23, 42, .3);
    }
    form.queue-filters.sheet-open { transform: translateY(0); }
    .queue-sheet-handle {
        display: block; width: 44px; height: 4px; border-radius: 999px;
        background: #d6d3d1; margin: 2px auto 14px;
    }
    @media (prefers-reduced-motion: reduce) { form.queue-filters { transition: none; } }
}

/* ── Queue card photo thumbnail ─────────────────────────── */
.queue-card-thumb {
    width: 74px; align-self: stretch; object-fit: cover; flex-shrink: 0;
    background: #f1f5f9; border-right: 1px solid var(--line-warm);
}
@media (max-width: 640px) {
    .queue-card-thumb { display: none; }   /* metrics + refund win the space */
}

/* ── Map bottom action card (touch) ─────────────────────── */
.map-job-card {
    position: fixed; left: 12px; right: 12px;
    bottom: calc(76px + env(safe-area-inset-bottom));   /* clears the mobile nav */
    z-index: 950;
    background: #fff; border: 1px solid var(--line); border-radius: 16px;
    padding: 14px 40px 14px 14px;
    box-shadow: 0 18px 44px -12px rgba(15, 23, 42, .35);
}
@media (min-width: 721px) {
    .map-job-card { left: auto; right: 24px; bottom: 24px; width: 340px; }
}
.map-job-close {
    position: absolute; top: 6px; right: 8px;
    background: none; border: none; font-size: 22px; line-height: 1;
    color: var(--muted); cursor: pointer; padding: 4px;
}
.map-job-main { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.map-job-refund {
    background: #f4f9f1; color: var(--primary-dark); font-weight: 800; font-size: 18px;
    border-radius: 10px; padding: 12px 10px; white-space: nowrap;
}
.map-job-title { font-weight: 700; font-size: 14.5px; }
.map-job-sub   { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.map-job-actions { display: flex; gap: 8px; }

/* ── Collector weekly chart ─────────────────────────────── */
.week-chart-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.week-chart { display: block; height: 88px; }
.week-chart-axis {
    display: flex; justify-content: space-between;
    font-size: 11px; color: var(--muted); margin-top: 4px;
}

/* ── Donor rank chip ────────────────────────────────────── */
.donor-rank-chip {
    display: inline-block; margin-left: 8px; vertical-align: 1px;
    font-size: 11px; font-weight: 800; letter-spacing: .02em;
    color: #15803d; background: #dcfce7; border: 1px solid #86efac;
    border-radius: 999px; padding: 2px 9px; white-space: nowrap;
}

/* ── Collector lifetime earnings strip ──────────────────── */
.earn-strip {
    display: flex; align-items: center; gap: 24px;
    background: var(--ink); color: #fff; border-radius: 14px;
    padding: 14px 20px; margin-bottom: 20px; text-decoration: none;
    transition: box-shadow .15s, transform .1s;
}
.earn-strip:hover { text-decoration: none; color: #fff; box-shadow: 0 8px 20px -8px rgba(15,42,30,.4); }
.earn-strip-cell { display: flex; flex-direction: column; }
.earn-strip-cell strong { font-family: var(--font-display); font-size: 22px; font-weight: 800; letter-spacing: -.5px; line-height: 1.1; }
.earn-strip-cell span { font-size: 11px; font-weight: 600; color: rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: .04em; }
.earn-strip-cta { margin-left: auto; color: #7CF0A6; font-weight: 700; font-size: 13.5px; white-space: nowrap; }
@media (max-width: 560px) {
    .earn-strip { gap: 14px 18px; padding: 12px 16px; flex-wrap: wrap; }
    .earn-strip-cell strong { font-size: 18px; }
    /* Today/week matter most on the go — the donated cell yields on tiny screens. */
    .earn-strip-cell--donated { display: none; }
}

/* ── Notification icons for new types ───────────────────── */
.notif--needs_review   { border-left-color: #f59e0b; }
.notif--needs_review   .notif-icon { background: #fffbeb; }
.notif--admin_verified { border-left-color: #7e22ce; }
.notif--admin_verified .notif-icon { background: #fdf4ff; }

/* ── Live bbox overlay on request detail photo ──────────── */
/* ── Request detail redesign (handoff spec) ─────────────────
   Spec tokens mapped to existing ones: green-600→--primary,
   slate-200→--line, slate-500→--muted, slate-900→--text,
   purple family→the stepper hexes already used in this file. */
.req-detail { max-width: 760px; margin: 0 auto; }

.req-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.req-head-btn {
    width: 38px; height: 38px; border-radius: 999px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--panel); border: 1px solid var(--line); color: var(--text);
    font-size: 22px; line-height: 1; text-decoration: none; cursor: pointer;
}
.req-head-btn:hover { border-color: var(--primary); color: var(--primary-dark); text-decoration: none; }
.req-head-title {
    flex: 1; margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.3px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (min-width: 720px) { .req-head-title { font-size: 22px; } }

.req-menu { position: relative; }
.req-menu > summary { list-style: none; }
.req-menu > summary::-webkit-details-marker { display: none; }
.req-menu-pop {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 30;
    min-width: 200px; padding: 6px;
    background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .16);
    display: flex; flex-direction: column;
}
.req-menu-pop a, .req-menu-pop button {
    display: block; width: 100%; text-align: left; background: none; border: none;
    padding: 9px 12px; border-radius: 8px; font-size: 13.5px; font-weight: 600;
    color: var(--text); text-decoration: none; cursor: pointer;
}
.req-menu-pop a:hover, .req-menu-pop button:hover { background: #f8fafc; text-decoration: none; }
.req-menu-danger { color: #b91c1c !important; }

.req-helper { font-size: 13px; color: var(--muted); margin: 8px 0 16px; }

/* Counts / impact strip */
.impact-strip {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    padding: 10px 14px; margin-bottom: 14px;
}
.impact-eyebrow {
    display: block; font-size: 11px; font-weight: 700; letter-spacing: .05em;
    text-transform: uppercase; color: var(--muted);
}
.impact-num { font-size: 22px; font-weight: 800; letter-spacing: -.5px; color: var(--text); line-height: 1.15; }
.impact-num--green { color: var(--primary); }
.impact-num em { font-style: normal; font-size: 13px; font-weight: 700; color: var(--primary-dark); }
.impact-strip-div { width: 1px; align-self: stretch; background: var(--line); }
.impact-strip-chips {
    margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end;
}
.item-chip {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 13px; font-weight: 700; padding: 4px 10px;
    border-radius: 999px; border: 1px solid; white-space: nowrap;
}
.item-chip--can     { background: #fef2f2; border-color: #fca5a5; color: #b91c1c; }
.item-chip--glass   { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.item-chip--plastic { background: #f0fdf4; border-color: #86efac; color: #15803d; }

/* Photo card: full-bleed image, chips overlaid, footer row */
.photo-card { padding: 0; overflow: hidden; margin-bottom: 14px; }
.photo-card .bbox-overlay-wrap .request-image { border-radius: 0; }
.photo-card .review-cta { margin: 12px 14px; }
.photo-card > h2 { margin: 16px 14px 8px; font-size: 15px; }
.photo-card > img.request-image { width: calc(100% - 28px); margin: 0 14px 14px; border-radius: 10px; }
.photo-chip {
    position: absolute; top: 10px; z-index: 5;
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12.5px; font-weight: 700; line-height: 1;
    padding: 6px 10px; border-radius: 999px; white-space: nowrap;
}
.photo-chip--counts { left: 10px; background: rgba(15, 23, 42, .72); color: #fff; }
.photo-chip--verified {
    right: 10px; background: rgba(253, 244, 255, .94);
    border: 1px solid #e9d5ff; color: #7e22ce;
}
.photo-chip-swatch { width: 9px; height: 9px; border-radius: 2px; flex-shrink: 0; }
.photo-card-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 14px; font-size: 13px; color: var(--muted);
    border-top: 1px solid var(--line);
}
.photo-card-foot a { font-weight: 700; color: var(--primary); text-decoration: none; }
.photo-card-foot a:hover { text-decoration: underline; }

/* Pickup location card */
.loc-card { margin-bottom: 14px; }
.loc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.loc-line1 { font-size: 15px; font-weight: 700; margin-top: 8px; }
.loc-line2 { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.loc-maps { display: inline-block; margin-top: 10px; font-size: 13.5px; font-weight: 700; color: var(--primary); text-decoration: none; }
.loc-maps:hover { text-decoration: underline; }
.loc-extra { margin: 6px 0 0; }
.loc-extra:empty { display: none; }
.loc-extra dt {
    font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
    color: var(--muted); margin-top: 14px;
}
.loc-extra dd { margin: 3px 0 0; font-size: 13.5px; }

/* Detection details disclosure */
.det-details { padding: 0; margin-bottom: 14px; }
.det-details > summary {
    list-style: none; cursor: pointer;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 14px;
}
.det-details > summary::-webkit-details-marker { display: none; }
.det-title { display: block; font-size: 14.5px; font-weight: 700; }
.det-sub   { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.det-chev  { font-size: 20px; color: var(--muted); transition: transform .15s; }
.det-details[open] .det-chev { transform: rotate(90deg); }
.det-body { padding: 0 14px 14px; border-top: 1px solid var(--line); }
.det-history { margin-top: 16px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.copy-btn {
    margin-left: 8px; padding: 2px 10px; font-size: 11.5px; font-weight: 700;
    background: #f8fafc; border: 1px solid var(--line); border-radius: 999px;
    color: var(--text); cursor: pointer;
}
.copy-btn:hover { border-color: var(--primary); color: var(--primary-dark); }

/* Quiet bottom delete */
.req-delete-quiet-wrap { text-align: center; margin: 26px 0 8px; }
.req-delete-quiet {
    background: none; border: none; cursor: pointer;
    font-size: 13.5px; font-weight: 700; color: #b91c1c;
}
.req-delete-quiet:hover { text-decoration: underline; }

.bbox-overlay-wrap {
    position: relative;
    display: inline-block;
    max-width: 100%;
    line-height: 0;
    vertical-align: top;
}

.bbox-overlay-wrap img {
    display: block;
    max-width: 100%;
    max-height: 520px;
    width: auto;
    height: auto;
    border-radius: 10px;
}

.bbox-overlay-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.bbox-display {
    position: absolute;
    border: 2px solid #ef4444;
    background: rgba(239, 68, 68, 0.13);
    box-sizing: border-box;
    border-radius: 2px;
    pointer-events: none;
}

.bbox-display--ai     { border-style: dashed; }
.bbox-display--admin  { border-style: solid; box-shadow: 0 0 0 1px rgba(255,255,255,.3); }

/* ── Submitting overlay ─────────────────────────────────── */
.form-submitting-state {
    padding: 24px;
    text-align: center;
    background: var(--primary-light);
    border: 1px solid #86efac;
    border-radius: 10px;
    margin-top: 18px;
}

.form-submitting-state strong { color: var(--primary-dark); font-size: 16px; }

/* ── Modal (used for address picker) ────────────────────── */
.rn-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: rn-modal-fade .15s ease-out;
}

.rn-modal--open { display: flex; }

.rn-modal-content {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    max-width: 440px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0,0,0,.35);
}

.rn-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

@keyframes rn-modal-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Address option (radio cards inside modal) ──────────── */
.addr-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .12s, background .12s;
}

.addr-option:hover { border-color: #86efac; }

.addr-option:has(input[type="radio"]:checked) {
    border-color: var(--primary);
    background: var(--primary-light);
}

.addr-option input[type="radio"] {
    width: auto;
    margin: 4px 0 0 0;
    flex-shrink: 0;
}

.addr-option-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.addr-option-text strong { font-size: 15px; }
.addr-option-text .muted { font-size: 13px; color: var(--muted); }

/* ── Visually hidden helper ─────────────────────────────── */
/* Hides element from sight + AT but keeps it in the layout/interaction tree.
   Safe to use on hidden form inputs that JS triggers via .click().
   display:none breaks .click() on iOS Safari in some versions. */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
}

/* ── Spinner (used in submitting state) ─────────────────── */
.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    border: 3px solid rgba(22, 163, 74, .2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spinner-rot 0.8s linear infinite;
}

@keyframes spinner-rot {
    to { transform: rotate(360deg); }
}

/* ── Upload progress bar (in submitting state) ──────────── */
.upload-progress-track {
    background: rgba(22, 163, 74, .15);
    border-radius: 999px;
    height: 8px;
    margin: 0 auto;
    max-width: 320px;
    overflow: hidden;
}

.upload-progress-bar {
    background: var(--primary);
    height: 100%;
    width: 0;
    transition: width .15s ease-out;
}

.form-submitting-state .error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 9px;
    color: #b91c1c;
    font-size: 13px;
    padding: 10px 14px;
    text-align: center;
}

/* ── Collector queue KPIs ───────────────────────────────── */
.queue-kpis {
    display: grid;
    gap: 12px;
    margin: 20px 0 24px;
}

.queue-kpi-row {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, 1fr);
}

.queue-kpi-row--primary { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 880px) {
    .queue-kpi-row,
    .queue-kpi-row--primary { grid-template-columns: repeat(2, 1fr); }
}

.queue-kpi {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 18px;
}

.queue-kpi-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.queue-kpi-value {
    color: var(--text);
    font-size: 24px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.4px;
}

.queue-kpi-value--green { color: var(--primary-dark); }
.queue-kpi-value--warn  { color: #c2410c; }

.queue-kpi-sub {
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 600;
    margin-top: 2px;
}

/* per-item rows: icon + content side by side */
.queue-kpi--item {
    align-items: center;
    flex-direction: row;
    gap: 14px;
}

.queue-kpi--item > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.queue-kpi-icon {
    background: var(--primary-light);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.queue-kpi-row:not(.queue-kpi-row--primary) { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 880px) {
    .queue-kpi-row:not(.queue-kpi-row--primary) { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════════
   Phase 1 — Redesign foundations
   Additive tokens + utilities; existing vars left alone so
   un-redesigned screens keep their current look.
   ══════════════════════════════════════════════════════════ */

:root {
    --font-display: 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

    --ink:        #0F2A1E;   /* warmer near-black for the redesign */
    --ink-soft:   #425B4E;
    --muted-warm: #6B8377;
    --canvas:     #EEF4EB;   /* warmer page bg, slight green */
    --green:      #16A34A;   /* base brand green — landing.css buttons/icons */
    --green-deep: #0B7A3B;
    --green-soft: #DCFCE7;
    --line-warm:  #E4EDE1;

    --cans-color:    #EF4444;
    --glass-color:   #3B82F6;
    --plastic-color: #16A34A;
}

/* Opt-in display typeface — apply where you want the brand voice. */
.display { font-family: var(--font-display); letter-spacing: -0.4px; }
.display-xl { font-family: var(--font-display); font-size: 32px; font-weight: 800; letter-spacing: -0.8px; line-height: 1.05; }
.display-lg { font-family: var(--font-display); font-size: 24px; font-weight: 800; letter-spacing: -0.5px; line-height: 1.1; }
.display-md { font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -0.3px; }
.display-sm { font-family: var(--font-display); font-size: 15px; font-weight: 700; }

/* ── Verification stepper ────────────────────────────────────
   Drop-in replacement for the verification-status pill.
   Stages: ai → user → admin → collected
   ────────────────────────────────────────────────────────── */
.vstepper {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin: 12px 0;
    max-width: 420px;
}

.vstep {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 56px;
    flex-shrink: 0;
}

.vstep-dot {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #EFF2EF;
    color: #9CB0A4;
    border: 1px solid var(--line-warm);
    font-size: 15px;
    font-weight: 700;
    transition: background .15s, color .15s, box-shadow .15s;
}

.vstep--done .vstep-dot {
    background: var(--green-soft);
    color: var(--green-deep);
    border-color: transparent;
}

.vstep--active .vstep-dot {
    background: var(--primary);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(22,163,74,.35);
}

.vstep-label {
    font-size: 11px;
    font-weight: 600;
    color: #9CB0A4;
    letter-spacing: 0.01em;
    text-align: center;
    white-space: nowrap;
}

.vstep--done .vstep-label { color: var(--ink); }
.vstep--active .vstep-label { color: var(--ink); font-weight: 800; }

.vstep-line {
    flex: 1;
    height: 2.5px;
    border-radius: 2px;
    background: var(--line-warm);
    margin-top: 15px;     /* aligns with vertical center of dot */
}

.vstep-line--done { background: var(--primary); }

/* ── "Looks right?" CTA card  ──────────────────────────────── */
.review-cta {
    background: #fff;
    border: 1px solid var(--line-warm);
    border-radius: 16px;
    padding: 16px 18px;
    margin-top: 14px;
    box-shadow: 0 1px 2px rgba(15,42,30,.04);
}

.review-cta-question {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 12px;
}

.review-cta-actions {
    display: flex;
    gap: 10px;
}

.review-cta-actions .button.primary {
    flex: 1;
    justify-content: center;
    background: var(--primary);
    border-color: var(--primary);
    font-weight: 700;
    box-shadow: 0 8px 16px -7px rgba(22,163,74,.55);
}

.review-cta-actions .button {
    border-color: var(--line-warm);
    font-weight: 600;
}

.review-cta-hint {
    color: var(--muted-warm);
    font-size: 12px;
    margin: 12px 0 0;
    line-height: 1.5;
}

/* ════════════════════════════════════════════════════════════
   Phase 2 — Request detail as scan result
   ══════════════════════════════════════════════════════════ */

/* ── Box scale-in animation on photo load ───────────────── */
/* Rotation is folded into the keyframes via a custom property (rather than
   set separately as an inline transform) because animation-fill-mode:forwards
   would otherwise let the "to" keyframe's transform permanently overwrite any
   transform set outside the animation — silently dropping rotated boxes back
   to 0deg once the pop-in finished. */
@keyframes bboxIn {
    from { opacity: 0; transform: rotate(var(--bbox-rot, 0deg)) scale(0.82); }
    to   { opacity: 1; transform: rotate(var(--bbox-rot, 0deg)) scale(1); }
}

/* ── Scan-result headline (right panel) ─────────────────── */
.scan-result-headline {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line-warm);
    margin-bottom: 18px;
}

.scan-result-label {
    color: var(--green-deep);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.scan-result-numbers {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.scan-result-total {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.scan-result-total-num {
    font-family: var(--font-display);
    font-size: 56px;
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1;
    color: var(--ink);
}

.scan-result-total-unit {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--ink-soft);
}

.scan-result-incentive {
    text-align: right;
}

.scan-result-incentive-num {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 800;
    color: var(--green-deep);
    letter-spacing: -0.5px;
    line-height: 1.05;
    display: block;
}

.scan-result-incentive-label {
    color: var(--muted-warm);
    font-size: 11.5px;
    font-weight: 600;
    margin-top: 2px;
    display: block;
}

/* ── Per-class chips ────────────────────────────────────── */
.scan-chips {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.scan-chip {
    background: #fff;
    border: 1px solid var(--line-warm);
    border-radius: 14px;
    padding: 12px 10px 11px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: border-color .15s, transform .15s;
}

.scan-chip-icon {
    font-size: 22px;
    line-height: 1.1;
    margin-bottom: 2px;
}

.scan-chip-num {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.5px;
    line-height: 1;
}

.scan-chip-label {
    color: var(--muted-warm);
    font-size: 11px;
    font-weight: 600;
    margin-top: 3px;
}

.scan-chip--cans    { border-color: rgba(239, 68, 68, .25); }
.scan-chip--glass   { border-color: rgba(59, 130, 246, .25); }
.scan-chip--plastic { border-color: rgba(22, 163, 74, .25); }

/* ── Detection history (collapsed audit trail) ──────────── */
.scan-audit {
    margin-top: 18px;
    border-top: 1px solid var(--line-warm);
    padding-top: 16px;
}

.scan-audit > summary {
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted-warm);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}

.scan-audit > summary::-webkit-details-marker { display: none; }

.scan-audit > summary::before {
    content: "›";
    display: inline-block;
    font-size: 16px;
    line-height: 1;
    transition: transform .15s;
}

.scan-audit[open] > summary::before { transform: rotate(90deg); }

.scan-audit-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line-warm);
    font-size: 13px;
}

.scan-audit-row:last-child { border-bottom: none; }

.scan-audit-tag {
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.03em;
    padding: 3px 8px;
    text-transform: uppercase;
    min-width: 70px;
    text-align: center;
}

.scan-audit-counts {
    color: var(--ink-soft);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* ── Tighten the metadata <dl> in the scan-result panel ─── */
.scan-meta {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--line-warm);
}

.scan-meta dt {
    margin-top: 14px;
    color: var(--muted-warm);
}

.scan-meta dt:first-child { margin-top: 0; }

/* ════════════════════════════════════════════════════════════
   Phase 3 — Collector queue: decision-first cards
   ══════════════════════════════════════════════════════════ */
.queue-cards {
    display: grid;
    gap: 14px;
}

.queue-card {
    background: #fff;
    border: 1px solid var(--line-warm);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(15, 42, 30, .05);
    transition: box-shadow .15s, border-color .15s, transform .15s;
}

/* Pickup-type coding: colored left edge + pill (color AND icon, so it reads
   at a glance and stays colorblind-safe). Blue = home, green = street —
   matching the type pills used across the app. */
.queue-card--home   { border-left: 5px solid #3b82f6; }
.queue-card--street { border-left: 5px solid #16a34a; }
.queue-chip--type-home.queue-chip--on   { background: #eff6ff; border-color: #3b82f6; color: #1d4ed8; }
.queue-chip--type-street.queue-chip--on { background: #f0fdf4; border-color: #16a34a; color: #15803d; }

.queue-card:hover {
    box-shadow: 0 8px 24px -8px rgba(15, 42, 30, .15);
    border-color: #cbd5cb;
}

.queue-card--stale { border-color: #F3D9A0; }
.queue-card--mine  { border-color: var(--primary); background: #f9fdf9; }
.queue-card--top   { border-color: rgba(11, 122, 59, .35); box-shadow: 0 4px 14px -4px rgba(11, 122, 59, .25); }

/* Decision row: refund + metrics, side by side. */
.queue-card-decision {
    display: flex;
    align-items: stretch;
}

/* The refund column on the left. */
.queue-card-refund {
    width: 130px;
    flex-shrink: 0;
    background: #F4F9F1;
    color: var(--ink);
    padding: 18px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    border-right: 1px solid var(--line-warm);
    text-decoration: none;
    transition: background .15s;
}

.queue-card-refund:hover { background: #ECF5E6; text-decoration: none; }

.queue-card-refund--top {
    background: linear-gradient(160deg, var(--green-deep) 0%, #15994A 60%, #1FB257 100%);
    color: #fff;
    border-right-color: var(--green-deep);
}

.queue-card-refund--top:hover { background: linear-gradient(160deg, #0A6932 0%, #138442 60%, #1AA04E 100%); }

.queue-card-tag {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #BBF7D0;
    margin-bottom: 2px;
}

.queue-card-refund-num {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1;
    color: inherit;
}

.queue-card-refund-label {
    font-size: 11px;
    font-weight: 600;
    opacity: .75;
    margin-top: 2px;
}

/* Metrics column on the right of the decision row. */
.queue-card-metrics {
    flex: 1;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.queue-card-metric-row {
    display: flex;
    gap: 18px;
}

.queue-card-metric {
    display: flex;
    align-items: center;
    gap: 8px;
}

.queue-card-metric-icon { font-size: 17px; }

.queue-card-metric > div { display: flex; flex-direction: column; gap: 1px; line-height: 1.15; }

.queue-card-metric-big {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 800;
    color: var(--ink);
}

.queue-card-metric-small {
    font-size: 11.5px;
    color: var(--muted-warm);
    font-weight: 600;
}

.queue-card-meta-line {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 12px;
}

.queue-card-fresh {
    color: var(--muted-warm);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.queue-card-fresh--stale {
    color: #B4730B;
    font-weight: 700;
}

.queue-card-donate {
    color: #15803d;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.queue-card-donate svg { vertical-align: -2px; }

.queue-card-verify {
    font-size: 10px !important;
    margin-left: auto;
}

/* Actions row: Details + dominant CTA. */
.queue-card-actions {
    display: flex;
    gap: 10px;
    padding: 0 14px 14px;
}

.queue-card-cta-form { flex: 1; display: flex; }

.queue-card-cta {
    flex: 1;
    justify-content: center;
    padding: 12px 16px !important;
    font-family: var(--font-display);
    font-size: 14.5px !important;
    font-weight: 800 !important;
    box-shadow: 0 6px 14px -5px rgba(22, 163, 74, .5);
}

.queue-card-warn {
    color: #B4730B;
    font-size: 12.5px;
    font-weight: 600;
    background: #FEF6E7;
    border: 1px solid #F3D9A0;
    border-radius: 10px;
    padding: 8px 12px;
}

@media (max-width: 640px) {
    .queue-card-decision { flex-direction: column; }
    .queue-card-refund {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--line-warm);
        flex-direction: row;
        justify-content: space-between;
        padding: 14px 16px;
    }
    .queue-card-refund-num { font-size: 26px; }
    .queue-card-metric-row { flex-direction: column; gap: 10px; }
}

/* ════════════════════════════════════════════════════════════
   Phase 4 — Requester home impact hero v2
   ══════════════════════════════════════════════════════════ */

/* ── Hero panel ─────────────────────────────────────────── */
.impact2 {
    background: linear-gradient(150deg, #0B7A3B 0%, #15994A 55%, #1FB257 100%);
    border-radius: 26px;
    color: #fff;
    padding: 24px 26px 22px;
    margin-bottom: 14px;
    box-shadow: 0 16px 30px -12px rgba(11, 122, 59, .55);
    position: relative;
    overflow: hidden;
}

.impact2::before {
    content: "";
    position: absolute;
    right: -34px;
    top: -34px;
    width: 150px;
    height: 150px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    pointer-events: none;
}

.impact2-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    gap: 10px;
    flex-wrap: wrap;
}

.impact2-eyebrow {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .82);
}

.impact2-streak {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, .16);
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
}

.impact2-headline {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 8px;
    position: relative;
    font-family: var(--font-display);
}

.impact2-value {
    font-size: 64px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -2.2px;
}

.impact2-unit {
    font-size: 22px;
    font-weight: 700;
    opacity: .9;
}

/* ── Equivalents row ────────────────────────────────────── */
.impact2-equivalents {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    position: relative;
}

.impact2-eq {
    flex: 1;
    background: rgba(255, 255, 255, .13);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 11px;
}

.impact2-eq-icon { font-size: 22px; }

.impact2-eq > div { line-height: 1.15; }

.impact2-eq-big {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 800;
}

.impact2-eq-label {
    font-size: 11.5px;
    color: rgba(255, 255, 255, .82);
}

/* ── Momentum row ───────────────────────────────────────── */
.impact2-momentum {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
    position: relative;
    flex-wrap: wrap;
}

.impact2-momentum-headline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 700;
    color: rgba(255, 255, 255, .9);
}

.impact2-momentum-sub {
    font-size: 11px;
    color: rgba(255, 255, 255, .6);
    margin-top: 3px;
}

.impact2-sparkline { display: block; }

/* ── Quick stats row (below the hero) ───────────────────── */
.impact2-quick {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 28px;
}

.impact2-quick-cell {
    background: #fff;
    border: 1px solid var(--line-warm);
    border-radius: 16px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.impact2-quick-cell strong {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.1;
    letter-spacing: -0.4px;
}

.impact2-quick-cell span {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--muted-warm);
}

@media (max-width: 640px) {
    .impact2 { padding: 22px 20px 20px; }
    .impact2-value { font-size: 50px; }
    .impact2-equivalents { flex-direction: column; }
    .impact2-quick { grid-template-columns: 1fr; }
}

/* ── "Needs your OK" section ────────────────────────────── */
.needs-ok-section {
    background: #FEF6E7;
    border: 1px solid #F3D9A0;
    border-radius: 18px;
    padding: 18px 20px 20px;
    margin-bottom: 24px;
}

.needs-ok-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.needs-ok-icon {
    font-size: 24px;
    flex-shrink: 0;
    line-height: 1.2;
}

.needs-ok-title {
    margin: 0 0 2px;
    color: #92400e;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 800;
}

.needs-ok-sub {
    margin: 0;
    color: #B4730B;
    font-size: 13px;
    font-weight: 600;
}

.needs-ok-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.needs-ok-card {
    background: #fff;
    border: 1px solid var(--line-warm);
    border-radius: 14px;
    padding: 12px;
    display: flex;
    gap: 12px;
    text-decoration: none;
    color: var(--ink);
    transition: box-shadow .15s, transform .15s, border-color .15s;
}

.needs-ok-card:hover {
    box-shadow: 0 6px 16px -6px rgba(15, 42, 30, .15);
    border-color: var(--primary);
    text-decoration: none;
}

.needs-ok-thumb {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.needs-ok-body { flex: 1; min-width: 0; }

.needs-ok-card-title {
    font-family: var(--font-display);
    font-size: 14.5px;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 2px;
}

.needs-ok-counts {
    font-size: 12px;
    color: var(--muted-warm);
    margin-bottom: 6px;
}

.needs-ok-cta {
    font-size: 12px;
    color: var(--primary-dark);
    font-weight: 700;
    margin-top: 4px;
}

/* Stepper shrinks visually inside the needs-ok card */
.needs-ok-card .vstepper {
    max-width: 240px;
    margin: 4px 0 0;
}
.needs-ok-card .vstep { width: 44px; }
.needs-ok-card .vstep-dot { width: 22px; height: 22px; font-size: 11px; }
.needs-ok-card .vstep-label { font-size: 9.5px; }
.needs-ok-card .vstep-line { margin-top: 10px; }

/* ════════════════════════════════════════════════════════════
   Phase 5 — Icon alignment polish
   ══════════════════════════════════════════════════════════ */
.queue-card-fresh svg { vertical-align: -2px; margin-right: 4px; }
.queue-card-metric-icon svg { display: block; }
.impact2-streak svg,
.impact2-momentum-headline svg { vertical-align: -2px; }
.needs-ok-icon svg { display: block; margin-top: 2px; }

/* ════════════════════════════════════════════════════════════
   Phase 6 — Mobile thumb-first bottom nav
   ══════════════════════════════════════════════════════════ */

/* Default: hidden on desktop. Shows only on small screens. */
.mnav { display: none; }

@media (max-width: 720px) {
    /* Hide everything in the topbar nav except the brand on mobile. */
    .topbar nav { display: none; }

    /* Pad bottom of <main> so content isn't covered by the bottom nav. */
    .container { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px) + 16px); }

    .mnav {
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 200;
        display: flex;
        align-items: center;
        justify-content: space-around;
        padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, .96);
        border-top: 1px solid var(--line-warm);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        box-shadow: 0 -2px 12px rgba(15, 42, 30, .04);
    }
}

.mnav-item {
    flex: 1;
    max-width: 84px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: #9CB0A4;
    text-decoration: none;
    padding: 6px 4px;
    border-radius: 12px;
    position: relative;
    transition: color .15s, background .15s;
}

.mnav-item:hover { text-decoration: none; }

.mnav-item span {
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

.mnav-item--active {
    color: var(--primary);
}

.mnav-item--active svg { stroke-width: 2.4 !important; }
.mnav-item--active span { font-weight: 800; }

/* Raised camera FAB — requester-only */
.mnav-fab {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    margin-top: -28px;
    border: 4px solid var(--canvas);
    background: var(--primary);
    display: grid;
    place-items: center;
    text-decoration: none;
    box-shadow: 0 10px 22px -6px rgba(22, 163, 74, .6);
    flex-shrink: 0;
    transition: transform .12s, box-shadow .12s, background .15s;
}

.mnav-fab:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px -6px rgba(22, 163, 74, .65);
    text-decoration: none;
}

.mnav-fab:active { transform: translateY(0); }

/* Notification badge inside mobile nav. */
.mnav-notif-wrap { position: relative; }

.mnav-badge {
    position: absolute;
    top: 0;
    right: 18px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    min-width: 16px;
    padding: 2px 4px;
    border-radius: 999px;
    border: 2px solid #fff;
    text-align: center;
}

/* ════════════════════════════════════════════════════════════
   Gap fixes — scan CTA, confidence badge
   ══════════════════════════════════════════════════════════ */

/* ── Scan CTA (requester home, below the hero) ──────────── */
.scan-cta {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    background: var(--ink);
    color: #fff;
    border-radius: 18px;
    padding: 15px 20px;
    margin-bottom: 14px;
    text-decoration: none;
    box-shadow: 0 10px 22px -10px rgba(15, 42, 30, .7);
    transition: transform .12s, box-shadow .15s;
}

.scan-cta:hover {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 14px 26px -10px rgba(15, 42, 30, .75);
    color: #fff;
}

.scan-cta-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--primary);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.scan-cta-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
    text-align: left;
}

.scan-cta-text strong {
    font-family: var(--font-display);
    font-size: 16.5px;
    font-weight: 800;
}

.scan-cta-text small {
    font-size: 12.5px;
    color: rgba(255, 255, 255, .65);
}

/* ── Public news feed ───────────────────────────────────── */
.news-list { max-width: 720px; margin-left: auto; margin-right: auto; }
.news-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 22px;
}
.news-card-photo {
    width: 100%; max-height: 420px;
    object-fit: cover; display: block;
}
.news-card-body { padding: 20px 22px; }
.news-card-date {
    font-size: 12px; font-weight: 700; letter-spacing: .05em;
    text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
.news-card-title {
    font-family: var(--font-display);
    font-size: 21px; font-weight: 800; margin: 0 0 10px;
}
.news-card-text { font-size: 14.5px; line-height: 1.65; }
.news-card-text p { margin: 0 0 12px; }
.news-card-text p:last-child { margin-bottom: 0; }

/* ── Admin business dashboard (KPIs) ────────────────────── */
.range-toggle {
    display: inline-flex; gap: 4px; margin-bottom: 20px;
    background: var(--panel); border: 1px solid var(--line);
    border-radius: 999px; padding: 4px;
}
.range-toggle-btn {
    padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
    color: var(--muted); text-decoration: none; white-space: nowrap;
}
.range-toggle-btn:hover { color: var(--text); text-decoration: none; }
.range-toggle-btn.is-active { background: var(--primary); color: #fff; }

.kpi-grid {
    display: grid; gap: 12px; margin-bottom: 24px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.kpi-tile {
    background: var(--panel); border: 1px solid var(--line);
    border-radius: 14px; padding: 16px 18px;
}
.kpi-tile--impact { background: var(--green-soft); border-color: #86efac; }
.kpi-eyebrow {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11.5px; font-weight: 700; letter-spacing: .03em;
    text-transform: uppercase; color: var(--muted); margin-bottom: 8px;
}
.kpi-value {
    font-family: var(--font-display);
    font-size: 30px; font-weight: 800; line-height: 1.05; color: var(--text);
}
.kpi-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.kpi-trend {
    font-size: 13px; font-weight: 700; margin-left: 4px;
    font-family: var(--font-body);
}
.kpi-trend--up   { color: #15803d; }
.kpi-trend--down { color: #dc2626; }

.mh-grid {
    display: grid; gap: 16px; margin-top: 14px;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.mh-cell {}
.mh-value { font-size: 26px; font-weight: 800; color: var(--text); font-family: var(--font-display); }
.mh-value--warn { color: #b45309; }
.mh-label { font-size: 12.5px; color: var(--text); margin-top: 2px; }

/* ── Charity delivery-goal bar (admin portal) ───────────── */
.goal-bar-track {
    height: 8px; border-radius: 999px; background: var(--line);
    margin: 5px 0 3px; overflow: hidden;
}
.goal-bar-fill {
    height: 100%; border-radius: 999px; background: var(--primary);
    transition: width .3s;
}
.goal-bar-fill--reached { background: #f59e0b; }

/* ── Admin: user detail page ────────────────────────────── */
.ud-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.ud-panel-title {
    font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
    color: var(--muted); margin: 0 0 14px;
}
.ud-dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 0; }
.ud-dl dt { font-size: 13px; color: var(--muted); font-weight: 600; }
.ud-dl dd { margin: 0; font-size: 14px; font-weight: 600; color: var(--text); }
.ud-reason {
    margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
}
.ud-reason-label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ud-reason p { margin: 6px 0 0; font-size: 14px; line-height: 1.55; }
@media (max-width: 700px) { .ud-grid { grid-template-columns: 1fr; } }

/* ── Admin: remove-request moderation panel ─────────────── */
.mod-remove-panel {
    margin-top: 22px;
    border-color: #fecaca;
    background: #fef2f2;
}
.mod-remove-summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    color: #b91c1c;
    display: flex;
    align-items: center;
    gap: 7px;
    list-style: none;
}
.mod-remove-summary::-webkit-details-marker { display: none; }
.mod-remove-body { margin-top: 14px; }
.mod-remove-body label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.mod-remove-body select,
.mod-remove-body textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
    background: var(--panel);
}

/* ── Impact teaser (home → My Impact page) ──────────────── */
.impact-teaser {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 20px;
    width: 100%;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px 20px;
    margin-top: 22px;
    text-decoration: none;
    color: var(--text);
    transition: border-color .15s, box-shadow .15s, transform .12s;
}
.impact-teaser:hover {
    text-decoration: none;
    color: var(--text);
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}
.impact-teaser-main { display: flex; flex-direction: column; gap: 2px; }
.impact-teaser-eyebrow {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
    text-transform: uppercase; color: #15803d;
}
.impact-teaser-value {
    font-family: var(--font-display);
    font-size: 22px; font-weight: 800; color: var(--text);
}
.impact-teaser-value small { font-size: 13px; font-weight: 600; color: var(--muted); }
.impact-teaser-quick {
    display: flex; gap: 18px; margin-left: auto;
    font-size: 13px; color: var(--muted);
}
.impact-teaser-quick strong { color: var(--text); font-weight: 700; }
.impact-teaser-cta {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 13px; font-weight: 700; color: var(--primary);
    width: 100%; justify-content: flex-end;
}
@media (max-width: 560px) {
    .impact-teaser-quick { margin-left: 0; width: 100%; }
}

/* ── AI confidence badge (over the detail photo) ────────── */
.confidence-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(11, 16, 20, .62);
    color: #fff;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    pointer-events: none;
}
