/* ── Field Worker Portal — Mobile-First ────────────────────────── */
:root {
    --bg:        #0d0d0f;
    --panel:     #1a1a1d;
    --panel2:    #242428;
    --accent:    #ffcc00;
    --accent-dk: #c9a000;
    --text:      #f2f2f2;
    --muted:     #999;
    --border:    rgba(255,255,255,0.08);
    --success:   #44ff88;
    --danger:    #ff4444;
    --radius:    14px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
}

/* ── Screens ─────────────────────────────────────────────────── */
.screen {
    position: fixed;
    inset: 0;
    display: none;
    flex-direction: column;
    overflow-y: auto;
}
.screen.active {
    display: flex;
    animation: screenIn 0.2s ease;
}
@keyframes screenIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Header Bar ──────────────────────────────────────────────── */
.field-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.field-header .logo-mark {
    width: 38px;
    height: 38px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 14px;
    color: #000;
    flex-shrink: 0;
}

.field-header h1 {
    font-size: 18px;
    font-weight: 800;
    flex: 1;
}

.field-header .painter-tag {
    background: var(--panel2);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 13px;
    color: var(--muted);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: color 0.15s, background 0.15s;
}
.btn-icon:active { background: var(--panel2); color: var(--text); }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 64px;
    border: none;
    border-radius: var(--radius);
    font-size: 19px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.15s;
    text-decoration: none;
    -webkit-user-select: none;
    user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; pointer-events: none; }

.btn-primary {
    background: var(--accent);
    color: #000;
}
.btn-primary:hover { background: #ffe44d; }

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-danger {
    background: transparent;
    color: var(--danger);
    border: 2px solid rgba(255,68,68,0.3);
}

.btn-success {
    background: var(--success);
    color: #000;
}

.btn-secondary {
    background: var(--panel2);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* Anchors styled as buttons must not inherit the default link color */
a.btn { color: inherit; text-decoration: none; }
a.btn-primary { color: #000; }

.btn-photo {
    background: var(--panel2);
    color: var(--text);
    border: 2px dashed var(--border);
    min-height: 100px;
    flex-direction: column;
    gap: 8px;
    font-size: 16px;
    border-radius: var(--radius);
}
.btn-photo .photo-icon { font-size: 36px; }
.btn-photo:active { border-color: var(--accent); }

/* ── Login Screen ────────────────────────────────────────────── */
#screen-login {
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px 28px;
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo .logo-img {
    width: 84px;
    height: 84px;
    object-fit: contain;
    margin: 0 auto 14px;
    display: block;
}

.login-logo .big-mark {
    width: 72px;
    height: 72px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 26px;
    color: #000;
    margin: 0 auto 14px;
}

.login-logo h2 {
    font-size: 26px;
    font-weight: 800;
}

.login-logo p {
    font-size: 14px;
    color: var(--muted);
    margin-top: 4px;
}

.login-link {
    display: block;
    width: 100%;
    margin-top: 16px;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    padding: 10px;
}
.login-link:active { color: var(--accent); }

.field-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--muted);
    margin-bottom: 8px;
}

.field-input {
    width: 100%;
    background: var(--panel2);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 18px;
    padding: 16px 18px;
    outline: none;
    transition: border-color 0.2s;
    margin-bottom: 20px;
    font-family: inherit;
}
.field-input:focus { border-color: var(--accent); }
.field-input::placeholder { color: var(--muted); }

.error-msg {
    background: rgba(255,68,68,0.12);
    border: 1px solid rgba(255,68,68,0.3);
    border-radius: 10px;
    padding: 12px 16px;
    color: #ff8080;
    font-size: 14px;
    margin-bottom: 16px;
    display: none;
}
.error-msg.visible { display: block; }

/* ── Job List Screen ─────────────────────────────────────────── */
#screen-jobs {
    overflow-y: auto;
}

.jobs-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--muted);
    margin-bottom: 4px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}
.empty-state .empty-icon { font-size: 52px; margin-bottom: 12px; }
.empty-state p { font-size: 16px; }

.job-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.1s;
    display: flex;
    align-items: center;
    gap: 16px;
    -webkit-user-select: none;
    user-select: none;
}
.job-card:active {
    border-color: var(--accent);
    transform: scale(0.99);
}

.job-card-date {
    background: var(--panel2);
    border-radius: 10px;
    padding: 10px 12px;
    text-align: center;
    min-width: 52px;
    flex-shrink: 0;
}
.job-card-date .month { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--accent); }
.job-card-date .day   { font-size: 26px; font-weight: 900; line-height: 1; }

.job-card-info { flex: 1; min-width: 0; }
.job-card-info .address {
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.job-card-info .customer {
    font-size: 14px;
    color: var(--muted);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.job-card-info .tags {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}
.tag {
    background: var(--panel2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.tag.accent { background: rgba(255,204,0,0.12); border-color: rgba(255,204,0,0.3); color: var(--accent); }

.btn-delete-job {
    background: none;
    border: 1px solid rgba(255,68,68,0.25);
    border-radius: 10px;
    color: var(--danger);
    font-size: 20px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
}
.btn-delete-job:active {
    background: rgba(255,68,68,0.12);
    border-color: var(--danger);
}

/* ── Job Detail Screen ───────────────────────────────────────── */
#screen-detail {
    overflow-y: auto;
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.detail-header .job-title {
    flex: 1;
    min-width: 0;
}
.detail-header .job-title .addr {
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.detail-header .job-title .cust {
    font-size: 12px;
    color: var(--muted);
}

/* Progress bar */
.progress-bar {
    display: flex;
    gap: 6px;
    padding: 14px 20px;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.progress-step {
    flex: 1;
    height: 5px;
    background: var(--panel2);
    border-radius: 3px;
    transition: background 0.3s;
}
.progress-step.done   { background: var(--accent); }
.progress-step.active { background: rgba(255,204,0,0.5); }

/* Steps */
.step {
    display: none;
    flex-direction: column;
    padding: 24px 20px;
    flex: 1;
    gap: 16px;
}
.step.active { display: flex; }

.step-heading {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 4px;
}
.step-subtext {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.5;
}

/* Photo preview */
.photo-preview-wrap {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--panel2);
    aspect-ratio: 4/3;
    display: none;
}
.photo-preview-wrap.visible { display: block; }
.photo-preview-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.photo-retake {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

/* Checklist */
.checklist {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--panel);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 16px 18px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    -webkit-user-select: none;
    user-select: none;
}
.checklist-item.checked {
    border-color: var(--success);
    background: rgba(68,255,136,0.06);
}
.checklist-item:active { transform: scale(0.99); }

.check-box {
    width: 28px;
    height: 28px;
    border: 2px solid var(--border);
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: border-color 0.15s, background 0.15s;
}
.checklist-item.checked .check-box {
    background: var(--success);
    border-color: var(--success);
    color: #000;
}

.check-label {
    font-size: 16px;
    font-weight: 600;
    flex: 1;
}
.check-value {
    font-size: 14px;
    color: var(--muted);
    margin-top: 2px;
}

/* Review step */
.review-section {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.review-section-header {
    padding: 14px 18px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--muted);
    background: var(--panel2);
    border-bottom: 1px solid var(--border);
}
.review-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    gap: 12px;
}
.review-row:last-child { border-bottom: none; }
.review-row .review-key { font-size: 14px; color: var(--muted); }
.review-row .review-val { font-size: 15px; font-weight: 700; text-align: right; max-width: 60%; }

.review-photos {
    display: flex;
    gap: 10px;
    padding: 14px 18px;
}
.review-photo {
    flex: 1;
    aspect-ratio: 4/3;
    border-radius: 10px;
    overflow: hidden;
    background: var(--panel2);
    position: relative;
}
.review-photo img { width: 100%; height: 100%; object-fit: cover; }
.review-photo .photo-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.6);
    padding: 5px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--muted);
}

.total-box {
    background: var(--panel2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.total-box .total-label { font-size: 16px; font-weight: 700; }
.total-box .total-amount { font-size: 30px; font-weight: 900; color: var(--accent); }

/* ── Success Screen ──────────────────────────────────────────── */
#screen-success {
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    text-align: center;
}

.success-icon {
    width: 90px;
    height: 90px;
    background: rgba(68,255,136,0.12);
    border: 3px solid var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 28px;
    animation: pop 0.4s ease;
}

@keyframes pop {
    0%   { transform: scale(0.5); opacity: 0; }
    70%  { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.success-card {
    width: 100%;
    max-width: 400px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px 28px;
}

.success-card h2 { font-size: 28px; font-weight: 900; margin-bottom: 10px; }
.success-card p  { font-size: 15px; color: var(--muted); line-height: 1.6; margin-bottom: 6px; }
.invoice-badge {
    display: inline-block;
    background: rgba(255,204,0,0.12);
    border: 1px solid rgba(255,204,0,0.3);
    color: var(--accent);
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 700;
    margin: 16px 0 28px;
}

/* ── Loading Overlay ─────────────────────────────────────────── */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(13,13,15,0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    gap: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
.loading-overlay.visible { opacity: 1; pointer-events: all; }

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--panel2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay p { font-size: 16px; color: var(--muted); }

/* ── Upload fallback button ──────────────────────────────────── */
.btn-upload-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 18px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s, color 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.btn-upload-fallback:active {
    border-color: var(--accent);
    color: var(--accent);
}

/* ── Utilities ───────────────────────────────────────────────── */
.spacer { flex: 1; }
.mt-auto { margin-top: auto; }
.pb-safe { padding-bottom: max(20px, env(safe-area-inset-bottom)); }

/* ── Territory tracker ──────────────────────────────────────── */
.terr-filter {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 16px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.terr-filter.active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(255,204,0,0.08);
}
.territory-card {
    background: var(--bg-panel, #111);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: border-color 0.15s;
}
.territory-card:hover { border-color: var(--accent); }
.territory-card .terr-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.territory-card .terr-meta { font-size: 12px; color: var(--muted); }
.territory-card .terr-notes { font-size: 13px; color: var(--text-light, #ddd); margin-top: 6px; line-height: 1.5; }
.terr-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 8px;
}
.terr-badge--reserved  { background: rgba(240,255,32,0.15);  color: #f0ff20; }
.terr-badge--completed { background: rgba(0,255,102,0.15);   color: #00ff66; }

/* ── Territory map screen ─────────────────────────────────────────── */
#screen-territories { overflow: hidden; }

.terr-filter-strip {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    padding: 10px 14px;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.terr-filter-strip::-webkit-scrollbar { display: none; }

.terr-add-btn {
    font-size: 28px !important;
    line-height: 1;
    color: var(--accent) !important;
}

#terr-map {
    flex: 1;
    min-height: 0;
}

/* Painter legend — floated inside map area */
.terr-legend {
    position: absolute;
    bottom: 52px;
    left: 12px;
    z-index: 500;
    background: rgba(13,13,15,0.88);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 11px;
    color: var(--text);
    pointer-events: none;
    backdrop-filter: blur(4px);
}
.terr-legend-title {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--muted);
    margin-bottom: 6px;
}

/* Open routes — bottom-of-map overlay listing unclaimed routes */
#open-routes-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 499;
    background: rgba(13,13,15,0.96);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(8px);
    max-height: 38vh;
    overflow-y: auto;
}
.open-routes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 16px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    background: rgba(13,13,15,0.98);
}
.open-routes-count {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    text-transform: none;
    letter-spacing: 0;
}
.open-route-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.open-route-item:last-child { border-bottom: none; }
.open-route-info { flex: 1; min-width: 0; }
.open-route-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.open-route-meta {
    font-size: 11px;
    color: var(--muted);
    margin-top: 1px;
}

/* Suggested next banner — sits at bottom of screen over map */
.terr-suggestion {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 500;
    background: rgba(13,13,15,0.92);
    border-top: 1px solid rgba(255,204,0,0.25);
    padding: 10px 16px max(10px, env(safe-area-inset-bottom));
    font-size: 13px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(6px);
}
.terr-suggest-star {
    color: var(--accent);
    font-size: 16px;
    flex-shrink: 0;
}

/* Leaflet suggestion pin */
.terr-suggest-pin {
    width: 34px;
    height: 34px;
    background: rgba(255,204,0,0.15);
    border: 2px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--accent);
    animation: terrPulse 1.8s ease-in-out infinite;
}
@keyframes terrPulse {
    0%, 100% { transform: scale(1);    box-shadow: 0 0 0   0 rgba(255,204,0,0.4); }
    50%       { transform: scale(1.12); box-shadow: 0 0 0 10px rgba(255,204,0,0);   }
}

/* Leaflet tooltip override */
.terr-tooltip {
    background: var(--panel);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 13px;
    border-radius: 8px;
    padding: 6px 10px;
    box-shadow: none;
}
.terr-tooltip::before { display: none; }

/* ── Territory modal (bottom sheet) ──────────────────────────────── */
#territory-modal { overflow: hidden; }

.terr-modal-sheet {
    background: var(--panel);
    border-top: 1px solid var(--border);
    border-radius: 20px 20px 0 0;
    padding: 12px 24px max(24px, env(safe-area-inset-bottom));
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: sheetUp 0.22s ease;
}
@keyframes sheetUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0);    }
}
.terr-modal-handle {
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 0 auto 20px;
}

/* Form controls inside territory modal */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--muted);
    margin-bottom: 7px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: var(--panel2);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 16px;
    padding: 13px 14px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    resize: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--accent); }

/* ── HOA Door-to-Door Progress Tracker ──────────────────────────── */
.hoa-order-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.1s;
    -webkit-user-select: none;
    user-select: none;
}
.hoa-order-card:active { border-color: var(--accent); transform: scale(0.99); }
.hoa-order-card .order-name { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.hoa-order-card .order-meta { font-size: 13px; color: var(--muted); }
.hoa-order-mini-bar {
    height: 4px;
    background: var(--panel2);
    border-radius: 2px;
    margin-top: 12px;
    overflow: hidden;
}
.hoa-order-mini-fill {
    height: 100%;
    background: var(--success);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Canvass progress strip */
.canvass-progress {
    padding: 14px 20px 12px;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.canvass-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 8px;
}
.canvass-progress-bar {
    height: 6px;
    background: var(--panel2);
    border-radius: 3px;
    overflow: hidden;
}
.canvass-progress-fill {
    height: 100%;
    background: var(--success);
    border-radius: 3px;
    transition: width 0.4s ease;
}

/* Street group header */
.canvass-street-header {
    padding: 14px 4px 6px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}

/* Individual address row */
.canvass-addr {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: border-color 0.15s, opacity 0.2s, background 0.15s;
    -webkit-user-select: none;
    user-select: none;
}
.canvass-addr:active { transform: scale(0.99); }
.canvass-addr.status-complete {
    opacity: 0.5;
    border-color: rgba(68,255,136,0.2);
    background: rgba(68,255,136,0.04);
}
.canvass-addr.status-in_progress {
    border-color: rgba(255,140,0,0.35);
    background: rgba(255,140,0,0.05);
}

.canvass-num {
    font-size: 24px;
    font-weight: 900;
    min-width: 60px;
    line-height: 1;
    color: var(--text);
}
.canvass-addr.status-complete .canvass-num { color: var(--muted); }

.canvass-street {
    flex: 1;
    font-size: 14px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.canvass-icon {
    font-size: 20px;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
    line-height: 1;
}

/* Status action sheet (iOS-style bottom sheet) */
.canvass-sheet {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0,0,0,0.65);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    animation: sheetIn 0.2s ease;
}
@keyframes sheetIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.canvass-sheet-inner {
    background: var(--panel);
    border-top: 1px solid var(--border);
    border-radius: 20px 20px 0 0;
    padding: 20px 20px max(20px, env(safe-area-inset-bottom));
    animation: sheetSlide 0.22s ease;
}
@keyframes sheetSlide {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}
.canvass-sheet-addr {
    font-size: 17px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 18px;
}
.canvass-sheet-btn {
    display: block;
    width: 100%;
    padding: 18px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    margin-bottom: 10px;
    transition: opacity 0.15s;
    text-align: center;
}
.canvass-sheet-btn:active { opacity: 0.7; }
.canvass-sheet-btn.s-complete   { background: rgba(68,255,136,0.12); color: var(--success);  border-color: rgba(68,255,136,0.3); }
.canvass-sheet-btn.s-inprogress { background: rgba(255,140,0,0.10);  color: #ff8c00;          border-color: rgba(255,140,0,0.25); }
.canvass-sheet-btn.s-pending    { background: rgba(255,255,255,0.05); color: var(--text);      border-color: var(--border); }
.canvass-sheet-btn.s-cancel     { background: transparent;            color: var(--muted);     border-color: var(--border); margin-bottom: 0; }

/* ═══════════════════════════════════════════════════════════
   CANVASS & ROUTES MERGE — v1.8
═══════════════════════════════════════════════════════════ */

/* ── Territory map panel (fills screen below header + filter strip) ── */
#screen-territories #terr-map {
    flex: 1;
    min-height: 0;
}

/* ── Route cards (flyer route list) ──────────────────────── */
.route-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 16px;
    margin-bottom: 12px;
    min-height: 80px;
}
.route-card-info { flex: 1; min-width: 0; }
.route-card-name {
    font-weight: 700;
    font-size: 17px;
    color: var(--text);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.route-card-meta  { font-size: 13px; color: var(--muted); }
.route-card-actions { display: flex; gap: 8px; flex-shrink: 0; }
.route-card-actions .btn {
    min-height: 52px !important;
    font-size: 15px !important;
    width: auto !important;
    padding: 0 20px !important;
}
.flyer-loading {
    color: var(--muted);
    font-size: 13px;
    text-align: center;
    padding: 40px 0;
}

/* ── Flyer pin icons on live map ─────────────────────────── */
.flyer-pin {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 26px;
    border: 2px solid rgba(255,255,255,0.45);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    font-family: system-ui, sans-serif;
    padding: 0 5px;
    white-space: nowrap;
    box-shadow: 0 1px 6px rgba(0,0,0,0.6);
    cursor: pointer;
    user-select: none;
    transform: translate(-50%, -50%);
}
.flyer-pin-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff3d3d;
    color: #fff;
    font-size: 9px;
    font-weight: 900;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 1px solid rgba(255,255,255,0.8);
}

/* ── Route setup — full-screen map, all controls in top overlay ── */
#screen-route-setup { overflow: hidden; }

/* Map wrapper fills everything below the header */
.route-map-wrap {
    flex: 1;
    min-height: 0;
    position: relative;
}

/* Map sits behind everything, fills the full wrapper */
#route-setup-map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Single overlay panel — frosted glass anchored to top of map */
.route-overlay {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 1100;
    background: rgba(10, 10, 13, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px 12px;
}
.route-overlay-top {
    top: 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Row 1: name + assign side by side */
.route-overlay-inputs {
    display: flex;
    gap: 8px;
}

/* Shared glass input style */
.route-ov-input {
    flex: 1;
    min-width: 0;
    height: 36px;
    background: rgba(255,255,255,0.09);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 7px;
    color: #f0f0f0;
    font-size: 14px;
    padding: 0 11px;
    font-family: var(--font, system-ui, sans-serif);
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}
.route-ov-input:focus {
    border-color: var(--accent);
    background: rgba(255,255,255,0.13);
}
.route-ov-input::placeholder { color: rgba(255,255,255,0.32); }

/* Row 3: address input + add button */
.route-addr-row {
    display: flex;
    gap: 6px;
}
.route-addr-add-btn {
    height: 36px;
    flex-shrink: 0;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font, system-ui, sans-serif);
    border-radius: 7px;
    border: 1px solid rgba(255,255,255,0.22);
    background: rgba(255,255,255,0.08);
    color: #f0f0f0;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
}
.route-addr-add-btn:hover { background: rgba(255,255,255,0.15); border-color: var(--accent); color: var(--accent); }

/* Address list (scrollable) */
.route-addr-list {
    max-height: 96px;
    overflow-y: auto;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 7px;
    background: rgba(255,255,255,0.04);
    font-size: 13px;
}

/* Save button — primary action, but not oversized */
.route-save-btn {
    width: 100%;
    height: 40px;
    font-size: 14px;
    font-weight: 800;
    font-family: var(--font, system-ui, sans-serif);
    border-radius: 8px;
    border: 2px solid var(--accent);
    background: rgba(240,255,32,0.12);
    color: var(--accent);
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: background 0.15s, color 0.15s;
}
.route-save-btn:hover { background: var(--accent); color: #000; }

/* ── Shared context menu (territory areas + property pins) ─── */
.ctx-menu {
    position: fixed;
    z-index: 9000;
    flex-direction: column;
    gap: 3px;
    min-width: 186px;
    background: rgba(10, 10, 13, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    padding: 8px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.7), 0 2px 8px rgba(0,0,0,0.4);
}
.ctx-menu-name {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.38);
    padding: 3px 10px 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}
.ctx-btn {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: none;
    color: #e8e8e8;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font, system-ui, sans-serif);
    text-align: left;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
    white-space: nowrap;
}
.ctx-btn:hover { background: rgba(255,255,255,0.1); }
/* Area status colors on hover */
.ctx-btn[data-status="reserved"]:hover  { color: #f0ff20; }
.ctx-btn[data-status="completed"]:hover { color: #00ff66; }
/* Pin status colors on hover */
.ctx-btn[data-status="flyered"]:hover   { color: #00c8ff; }
.ctx-btn[data-status="declined"]:hover  { color: #ff5050; }
.ctx-btn[data-status="queued"]:hover    { color: #aaa; }
.ctx-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 4px 0;
}
.ctx-btn-muted  { color: rgba(255,255,255,0.45); font-size: 13px; font-weight: 600; }
.ctx-btn-muted:hover  { color: #fff; }
.ctx-btn-danger { color: #ff5050; font-size: 13px; }
.ctx-btn-danger:hover { background: rgba(255,80,80,0.12); }

/* ── Property pin marker ─────────────────────────────────── */
/* Highlight ring drawn over the okc.gov house symbol — colored by status.
   Hollow center so the house icon underneath stays visible. */
.prop-pin {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: transparent;
    border: 3px solid var(--pin-color, #fff);
    box-shadow: 0 0 0 1.5px rgba(255,255,255,0.9),
                0 0 10px 2px var(--pin-color, #fff);
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
}
.prop-pin:hover {
    transform: scale(1.18);
}
.prop-pin--selected {
    transform: scale(1.25);
    border-color: #fff;
    box-shadow: 0 0 0 2px var(--pin-color, #fff),
                0 0 14px 3px rgba(255,255,255,0.9);
}

/* ── Schedule job modal ──────────────────────────────────── */
.sch-overlay {
    position: fixed;
    inset: 0;
    z-index: 9500;
    background: rgba(0,0,0,0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}
.sch-card {
    width: 100%;
    max-width: 520px;
    background: #111114;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px 20px 0 0;
    padding: 20px 20px max(20px, env(safe-area-inset-bottom));
    max-height: 92vh;
    overflow-y: auto;
}
.sch-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.sch-header h2 {
    font-size: 18px;
    font-weight: 900;
    color: var(--accent, #f0ff20);
    margin: 0;
}
.sch-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: rgba(255,255,255,0.45);
    margin: 12px 0 5px;
}
.sch-input {
    width: 100%;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 9px;
    color: #f0f0f0;
    font-size: 15px;
    padding: 10px 13px;
    font-family: var(--font, system-ui, sans-serif);
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s, background 0.15s;
    resize: none;
}
.sch-input:focus {
    border-color: var(--accent, #f0ff20);
    background: rgba(255,255,255,0.1);
}
.sch-input::placeholder { color: rgba(255,255,255,0.28); }
.sch-row {
    display: flex;
    gap: 10px;
}
.sch-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}
.sch-actions .btn { flex: 1; min-height: 46px; font-size: 15px; }

/* ── Route live (canvass) screen ─────────────────────────── */
#screen-route-live { overflow: hidden; }
#route-live-topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    padding-top: max(10px, env(safe-area-inset-top));
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
#route-live-map {
    height: 42vh;
    flex-shrink: 0;
}
.route-live-legend {
    position: absolute;
    bottom: 60px;
    left: 12px;
    background: rgba(13,13,15,0.88);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12px;
    color: var(--text);
    backdrop-filter: blur(8px);
    max-width: 160px;
    pointer-events: none;
    z-index: 500;
}
.legend-item,
.legend-unclaimed {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 5px;
}
.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.legend-dot-unclaimed {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(13,13,15,0.92);
    border: 1.5px solid rgba(255,255,255,0.45);
    flex-shrink: 0;
}

/* ── Route live address list ─────────────────────────────── */
.route-addr-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
}
.route-addr-card:active { background: rgba(255,255,255,0.04); }
.route-addr-card.visited { background: rgba(68,255,136,0.05); }
.route-addr-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}
.route-addr-dot.unvisited {
    background: transparent;
    border: 2px solid var(--border);
}
.route-addr-text { flex: 1; font-size: 14px; color: var(--text); }
.route-addr-who  { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* ── Route draw tool controls ────────────────────────────── */
.route-draw-controls {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
}
.route-draw-btn {
    flex: 1;
    height: 34px;
    font-size: 12px !important;
    padding: 0 6px !important;
    min-height: unset !important;
    white-space: nowrap;
    background: rgba(255,255,255,0.07) !important;
    border-color: rgba(255,255,255,0.2) !important;
    color: #e0e0e0 !important;
    border-radius: 7px !important;
}
.route-draw-btn-sm {
    flex: 0 0 auto !important;
    height: 34px !important;
    padding: 0 14px !important;
    min-height: unset !important;
    font-size: 14px !important;
    border-radius: 7px !important;
}
.route-draw-btn.drawing-active {
    background: var(--accent) !important;
    color: #000 !important;
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(240,255,32,0.25);
}
.route-draw-hint {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    text-align: center;
    padding: 6px 0 2px;
    min-height: 18px;
}

/* ── Dashboard ─────────────────────────────────────────────────── */
.dash-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 16px calc(env(safe-area-inset-bottom) + 32px);
    display: flex;
    flex-direction: column;
    gap: 14px;
    -webkit-overflow-scrolling: touch;
}

/* Earnings hero */
.dash-earn-hero {
    background: linear-gradient(135deg, var(--accent), var(--accent-dk));
    color: #1a1400;
    border-radius: var(--radius);
    padding: 20px 22px;
    text-align: center;
    box-shadow: 0 6px 22px rgba(255,204,0,0.18);
}
.dash-earn-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.8;
}
.dash-earn-big {
    font-size: 44px;
    font-weight: 900;
    line-height: 1.05;
    margin: 4px 0 6px;
    letter-spacing: -0.02em;
}
.dash-earn-sub { font-size: 13px; font-weight: 700; opacity: 0.85; }

.dash-earn-row { display: flex; gap: 12px; }
.dash-earn-card {
    flex: 1;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    text-align: center;
}
.dash-mini-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.dash-mini-val   { font-size: 22px; font-weight: 800; margin-top: 4px; }

/* Generic card */
.dash-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}
.dash-card-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}

/* Referral / QR */
.dash-ref-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.dash-ref-code {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 0.12em;
    color: var(--accent);
}
.dash-chip-btn {
    background: var(--panel2);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    padding: 9px 14px;
    border-radius: 20px;
    cursor: pointer;
    min-height: 40px;
    white-space: nowrap;
}
.dash-chip-btn:active { background: var(--accent); color: #000; }
.dash-qr-wrap {
    display: flex;
    justify-content: center;
    margin: 14px 0 8px;
}
.dash-qr {
    width: 180px;
    height: 180px;
    border-radius: 12px;
    background: #fff;
    padding: 8px;
}
.dash-ref-hint { font-size: 12px; color: var(--muted); text-align: center; margin: 4px 0 12px; }
.dash-share-btn { min-height: 50px; font-size: 16px; }

/* Sections */
.dash-section { display: flex; flex-direction: column; gap: 10px; }
.dash-section-title {
    font-size: 15px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dash-count { font-size: 13px; color: var(--accent); font-weight: 700; }
.dash-section-add {
    margin-left: auto;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 800;
    padding: 7px 14px;
    min-height: 36px;
    cursor: pointer;
}
.dash-section-add:active { transform: scale(0.96); }
.dash-empty { font-size: 13px; color: var(--muted); padding: 6px 2px; margin: 0; }

/* Challenge card */
.dash-challenge {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
}
.dash-challenge.earned { border-color: var(--success); }
.dash-ch-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.dash-ch-title { font-size: 15px; font-weight: 800; }
.dash-ch-bonus { font-size: 14px; font-weight: 800; color: var(--success); white-space: nowrap; }
.dash-ch-desc  { font-size: 12px; color: var(--muted); margin: 4px 0 10px; }
.dash-ch-bar {
    height: 9px;
    background: var(--panel2);
    border-radius: 6px;
    overflow: hidden;
    margin-top: 8px;
}
.dash-ch-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-dk), var(--accent));
    border-radius: 6px;
    transition: width 0.4s ease;
}
.dash-ch-meta { font-size: 12px; color: var(--muted); margin-top: 6px; font-weight: 600; }

/* Available route row */
.dash-route {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
}
.dash-route-name { font-size: 15px; font-weight: 700; }
.dash-route-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.dash-route-accept {
    width: auto;
    min-height: 44px;
    padding: 0 20px;
    font-size: 15px;
    flex-shrink: 0;
}

/* Offers */
.dash-offer {
    background: var(--panel);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
}
.dash-offer-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dash-offer-title { font-size: 14px; font-weight: 800; }
.dash-offer-code {
    font-size: 12px;
    font-weight: 800;
    color: var(--accent);
    background: rgba(255,204,0,0.12);
    padding: 3px 9px;
    border-radius: 6px;
    letter-spacing: 0.05em;
}
.dash-offer-desc { font-size: 12px; color: var(--muted); margin-top: 5px; }

/* Payouts */
.dash-pay-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    text-align: center;
    margin-bottom: 14px;
}
.dash-pay-val { font-size: 20px; font-weight: 800; margin-top: 3px; }
.dash-pay-val.accent { color: var(--accent); }
.dash-pay-active {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--success);
}

/* Onboarding */
.dash-onboarding { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.dash-onb-hint { font-size: 13px; color: var(--muted); margin: -4px 0 12px; }
.onb-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
    border-top: 1px solid var(--border);
}
.onb-row:first-child { border-top: none; }
.onb-icon { font-size: 20px; width: 24px; text-align: center; }
.onb-label { flex: 1; font-size: 15px; font-weight: 600; }
.onb-row.done .onb-label { color: var(--muted); }
.onb-status { font-size: 13px; font-weight: 700; color: var(--success); }
.onb-up-btn {
    background: var(--accent);
    color: #000;
    border: none;
    font-size: 14px;
    font-weight: 800;
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    min-height: 40px;
}
.onb-up-btn:active { transform: scale(0.96); }

/* Territory header "New Route" button */
.terr-route-btn {
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 800;
    padding: 8px 14px;
    min-height: 40px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}
.terr-route-btn:active { transform: scale(0.96); }

/* Route projections + status */
.route-proj {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}
.route-proj-item {
    font-size: 13px;
    font-weight: 700;
    background: var(--panel2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 4px 10px;
}
.route-proj-earn { color: var(--success); }
.route-proj-rev  { color: var(--accent); }
.dash-route-proj, .route-card-proj {
    font-size: 12px;
    font-weight: 700;
    color: var(--success);
    margin-top: 4px;
}
.route-status {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 7px;
    border-radius: 6px;
    vertical-align: middle;
}
.route-status-unassigned { background: rgba(255,204,0,0.16); color: var(--accent); }
.route-status-assigned   { background: rgba(68,255,136,0.14); color: var(--success); }

/* Nav buttons */
.dash-nav-btn { margin-top: 2px; }

/* Slightly larger layout for tablets */
@media (min-width: 640px) {
    .dash-content { max-width: 560px; margin: 0 auto; width: 100%; }
    .dash-qr { width: 220px; height: 220px; }
}
