: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; }

.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 ────────────────────────────────────────── */
.view-toggle {
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 9px;
    display: flex;
    gap: 2px;
    padding: 3px;
}

.view-btn {
    background: transparent;
    border: none;
    border-radius: 7px;
    color: rgba(255,255,255,.8);
    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(255,255,255,.15);
    color: #fff;
    box-shadow: none;
}

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

/* ── Collector map ──────────────────────────────────────── */
#collector-map {
    border-radius: 12px;
    border: 1px solid var(--line);
    height: 580px;
    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;
}

/* ── 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; }

.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; }

/* ── 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: 2px 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; }

/* ── 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; }

/* ── 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 ──────────── */
.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;
}
