/* OLX Hunter dashboard styles */
:root {
    --bg-body: #0b0f19;
    --bg-rail: #0d1220;
    --bg-card: rgba(19, 27, 43, 0.78);
    --bg-card-hover: rgba(25, 36, 58, 0.92);
    --bg-input: #0a0e17;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);

    --text: #f1f5f9;
    --text-2: #b4bfcf;
    --text-3: #8592a6;

    --brand: #10b981;
    --brand-dark: #059669;
    --good: #34d399;
    --good-bg: rgba(16, 185, 129, 0.14);
    --good-border: rgba(16, 185, 129, 0.38);
    --risk: #fb7185;
    --risk-bg: rgba(244, 63, 94, 0.13);
    --risk-border: rgba(244, 63, 94, 0.38);
    --info: #b4bfcf;
    --info-bg: rgba(148, 163, 184, 0.10);
    --info-border: rgba(148, 163, 184, 0.20);
    --warn: #fbbf24;
    --warn-bg: rgba(245, 158, 11, 0.12);
    --warn-border: rgba(245, 158, 11, 0.35);

    /* Type scale: the only font sizes used on the page */
    --fs-xs: 11.5px;
    --fs-sm: 12.5px;
    --fs-base: 13.5px;
    --fs-md: 15px;
    --fs-lg: 18px;
    --fs-xl: 22px;

    --radius: 12px;
    --radius-sm: 8px;
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.25); }

body {
    background-color: var(--bg-body);
    background-image:
        radial-gradient(circle at 10% 15%, rgba(16, 185, 129, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 85%, rgba(56, 189, 248, 0.035) 0%, transparent 40%);
    color: var(--text);
    font-size: var(--fs-base);
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.icon-sm { width: 13px; height: 13px; }
.icon-lg { width: 20px; height: 20px; }
.icon-fill { fill: currentColor; stroke: none; }

button { font-family: inherit; }

/* --- RAIL (narrow sidebar) --- */
.rail {
    width: 84px;
    flex-shrink: 0;
    background: var(--bg-rail);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px 8px;
    gap: 6px;
}

.rail-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--brand);
    margin-bottom: 16px;
    text-align: center;
}

.rail-brand .icon { width: 28px; height: 28px; }

.rail-brand span {
    font-size: var(--fs-xs);
    font-weight: 800;
    color: var(--text);
    line-height: 1.15;
}

.rail-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.nav-btn {
    width: 100%;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-3);
    border-radius: var(--radius);
    padding: 10px 4px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-size: var(--fs-xs);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
}

.nav-btn .icon { width: 20px; height: 20px; }

.nav-btn:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.nav-btn.active {
    color: var(--good);
    background: var(--good-bg);
    border-color: var(--good-border);
}

.rail-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.rail-logout {
    color: var(--text-3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: var(--fs-xs);
    font-weight: 600;
    text-decoration: none;
    padding: 6px;
    border-radius: var(--radius-sm);
}

.rail-logout:hover { color: var(--risk); }

/* --- MAIN --- */
.main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 22px 28px 0;
    overflow: hidden;
}

.view-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.view-title {
    font-size: var(--fs-xl);
    font-weight: 800;
    letter-spacing: -0.3px;
    margin-right: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.view-title .icon { width: 22px; height: 22px; color: var(--brand); }

.pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: var(--fs-xs);
    font-weight: 700;
    color: var(--text-2);
    background: var(--info-bg);
    border: 1px solid var(--info-border);
    padding: 5px 11px;
    border-radius: 99px;
    white-space: nowrap;
}

button.pill { cursor: pointer; }
button.pill:hover { border-color: var(--border-strong); color: var(--text); }

.pill.good { color: var(--good); background: var(--good-bg); border-color: var(--good-border); }
.pill.risk { color: var(--risk); background: var(--risk-bg); border-color: var(--risk-border); }
.pill.warn { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-border); }

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-3);
    flex-shrink: 0;
}

.dot.good { background: var(--brand); box-shadow: 0 0 6px rgba(16, 185, 129, 0.7); animation: livePulse 2s infinite; }
.dot.risk { background: #f43f5e; box-shadow: 0 0 6px rgba(244, 63, 94, 0.6); }
.dot.warn { background: #f59e0b; }

@keyframes livePulse {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: 9px;
    font-size: var(--fs-sm);
    font-weight: 700;
    padding: 9px 14px;
    cursor: pointer;
    white-space: nowrap;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-2);
    transition: all 0.18s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
}

.btn:hover { border-color: var(--border-strong); color: var(--text); background: var(--bg-card-hover); }
.btn:active { transform: scale(0.97); }
.btn.active { color: var(--good); background: var(--good-bg); border-color: var(--good-border); }
.btn.danger:hover { color: var(--risk); background: var(--risk-bg); border-color: var(--risk-border); }

.btn-primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.28);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #16c78e, #0da574);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-primary:disabled {
    background: #1e293b;
    color: var(--text-3);
    box-shadow: none;
    cursor: not-allowed;
}

.icon-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-btn.danger:hover { color: var(--risk); background: var(--risk-bg); border-color: var(--risk-border); }

/* --- FORMS --- */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 16px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.add-panel { display: none; }
.add-panel.show { display: block; }

.form-row {
    display: flex;
    gap: 14px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 140px;
}

.field-grow { flex: 1; min-width: 200px; }

.field label {
    font-size: var(--fs-xs);
    color: var(--text-3);
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

select, input[type="number"], input[type="text"], input[type="password"] {
    background-color: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 9px 12px;
    border-radius: 9px;
    font-size: var(--fs-base);
    font-weight: 600;
    outline: none;
    min-height: 40px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input[type="number"] { font-family: var(--font-mono); }

select option { background-color: #0d131f; color: var(--text); }

/* Keep browser autofill from painting inputs white */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text);
    -webkit-box-shadow: 0 0 0 1000px var(--bg-input) inset;
    caret-color: var(--text);
    transition: background-color 9999s ease-out;
}

select:focus, input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.options-grid {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px 14px;
    align-items: end;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--border);
}

.options-grid.show { display: grid; }

.check-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--fs-sm);
    color: var(--text-2);
    font-weight: 600;
    cursor: pointer;
    min-height: 40px;
}

.check-line input {
    width: 16px;
    height: 16px;
    accent-color: var(--brand);
}

.hint {
    font-size: var(--fs-xs);
    color: var(--text-3);
}

.options-grid .hint { grid-column: 1 / -1; }

/* --- ALERT BANNER --- */
.alert-banner {
    display: none;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: var(--fs-sm);
    font-weight: 600;
    line-height: 1.45;
    background: var(--risk-bg);
    border: 1px solid var(--risk-border);
    color: var(--risk);
}

.alert-banner.show { display: flex; }
.alert-banner.warn { background: var(--warn-bg); border-color: var(--warn-border); color: var(--warn); }
.alert-banner .icon { margin-top: 2px; }

/* --- TARGET CARDS --- */
.section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.section-title {
    font-size: var(--fs-xs);
    color: var(--text-3);
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

/* One row of targets; scroll sideways (wheel, drag or swipe) to keep the feed in view */
.targets {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    margin-bottom: 18px;
    padding-bottom: 6px;
    cursor: grab;
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
}
.targets.dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.targets.dragging .target-card { pointer-events: none; }
.targets > .target-card { flex: 0 0 270px; scroll-snap-align: start; }
.targets::-webkit-scrollbar { height: 6px; }
.targets::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

.targets-empty {
    color: var(--text-3);
    font-size: var(--fs-sm);
    padding: 4px 2px;
}

.target-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.target-card:hover { border-color: var(--border-strong); background: var(--bg-card-hover); }
.target-card.selected { border-color: var(--good-border); box-shadow: inset 0 0 0 1px var(--good-border); }
.target-card.paused { opacity: 0.62; }
.target-card.error { border-color: var(--risk-border); }

.tc-head {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.tc-title {
    font-size: var(--fs-md);
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tc-actions {
    margin-left: auto;
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.tc-sub {
    font-size: var(--fs-sm);
    color: var(--text-2);
    font-weight: 600;
}

.tc-sub .mono { font-family: var(--font-mono); color: var(--text); }

.tc-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.tc-stat {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.tc-stat span {
    font-size: var(--fs-xs);
    color: var(--text-3);
    font-weight: 600;
}

.tc-stat b {
    font-size: var(--fs-sm);
    font-family: var(--font-mono);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tc-stat b.good { color: var(--good); }

.tc-foot {
    font-size: var(--fs-xs);
    color: var(--text-3);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.tc-foot .text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tc-foot.risk { color: var(--risk); }

/* --- FEED TOOLBAR --- */
.feed-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.chips {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    margin-right: auto;
    max-width: 100%;
}

.chips::-webkit-scrollbar { display: none; }

.chip {
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--text-2);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: 6px 12px;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.chip .count { color: var(--text-3); font-family: var(--font-mono); font-weight: 600; }
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.active { color: var(--good); background: var(--good-bg); border-color: var(--good-border); }
.chip.active .count { color: var(--good); }

.toolbar-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.toolbar-actions select { min-height: 36px; padding: 6px 10px; font-size: var(--fs-sm); }
.toolbar-actions .btn { padding: 7px 11px; }

/* --- RESULTS --- */
.results {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 6px 24px 0;
}

.results.hide-viewed .item-row.is-viewed { display: none !important; }

.placeholder {
    color: var(--text-3);
    text-align: center;
    margin: 40px 0;
    font-size: var(--fs-base);
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    background: rgba(18, 25, 39, 0.35);
    border: 1px dashed var(--border);
    border-radius: 14px;
    padding: 44px 24px;
}

.placeholder .icon { width: 30px; height: 30px; color: var(--brand); animation: livePulse 2.5s infinite; }
.placeholder.risk { color: var(--risk); }
.placeholder.risk .icon { color: var(--risk); animation: none; }

/* Listing card */
.item-row {
    display: grid;
    grid-template-columns: 36px 56px minmax(0, 1fr) 150px 150px 92px;
    grid-template-areas:
        "check thumb main price meta action"
        "check thumb seller price meta action";
    column-gap: 14px;
    row-gap: 6px;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    transition: border-color 0.18s ease, background-color 0.18s ease, opacity 0.18s ease;
    position: relative;
}

.item-row:hover { border-color: var(--border-strong); background: var(--bg-card-hover); }

/* Good deals stand out at a glance */
.item-row.is-deal {
    border-color: var(--good-border);
    box-shadow: inset 3px 0 0 var(--brand);
}

.item-row.is-hot {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.10), var(--bg-card) 45%);
}

.item-row.is-viewed { opacity: 0.42; filter: grayscale(0.7); }
.item-row.is-viewed:hover { opacity: 0.7; filter: grayscale(0.3); }

.c-check {
    grid-area: check;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.c-check:hover { color: var(--good); border-color: var(--good-border); }
.is-viewed .c-check { color: var(--good); background: var(--good-bg); border-color: var(--good-border); }

.c-thumb {
    grid-area: thumb;
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-3);
}

.c-main {
    grid-area: main;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    align-self: end;
}

.c-title {
    font-size: var(--fs-base);
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.c-title:hover { color: var(--good); }

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tags:empty { display: none; }

.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--fs-xs);
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    white-space: nowrap;
    line-height: 1.35;
    border: 1px solid var(--info-border);
    color: var(--info);
    background: var(--info-bg);
}

.tag .icon { width: 12px; height: 12px; }
.tag.good { color: var(--good); background: var(--good-bg); border-color: var(--good-border); }
.tag.risk { color: var(--risk); background: var(--risk-bg); border-color: var(--risk-border); }
.tag.target { color: var(--text); border-color: var(--border-strong); background: rgba(255, 255, 255, 0.05); }

.c-seller {
    grid-area: seller;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 12px;
    font-size: var(--fs-xs);
    color: var(--text-3);
    font-weight: 600;
    min-width: 0;
    align-self: start;
}

.c-seller > span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.c-seller .name {
    color: var(--text-2);
    font-weight: 700;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.c-seller .rating { color: var(--text-2); }
.c-seller .rating .icon { color: var(--warn); }

.c-price {
    grid-area: price;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.c-price .old {
    font-size: var(--fs-xs);
    color: var(--text-3);
    text-decoration: line-through;
    font-family: var(--font-mono);
    font-weight: 600;
}

.c-price .now {
    font-family: var(--font-mono);
    font-size: var(--fs-lg);
    font-weight: 700;
    letter-spacing: -0.3px;
    white-space: nowrap;
}

.is-deal .c-price .now { color: var(--good); }

.deal {
    font-size: var(--fs-xs);
    font-weight: 800;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-3);
}

.deal.good {
    color: var(--good);
    background: var(--good-bg);
    border: 1px solid var(--good-border);
    border-radius: 6px;
    padding: 2px 7px;
}

.c-meta {
    grid-area: meta;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: var(--fs-xs);
    color: var(--text-3);
    font-weight: 600;
    min-width: 0;
}

.c-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.c-meta .city { color: var(--text-2); }

.c-action {
    grid-area: action;
    display: flex;
    justify-content: flex-end;
}

.btn-olx {
    width: 100%;
    height: 36px;
    color: var(--good);
    background: var(--good-bg);
    border-color: var(--good-border);
}

.btn-olx:hover {
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff;
    border-color: transparent;
}

/* --- MANUAL SEARCH: stats & price strip --- */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.stat-title {
    font-size: var(--fs-xs);
    font-weight: 700;
    color: var(--text-3);
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.stat-val {
    font-size: var(--fs-lg);
    font-weight: 700;
    font-family: var(--font-mono);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-val.good { color: var(--good); }

.stat-sub {
    font-size: var(--fs-xs);
    color: var(--text-3);
    font-weight: 600;
}

.price-strip {
    display: none;
    padding: 12px 16px 10px;
}

.price-strip.show { display: block; }

.strip-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: var(--fs-xs);
    color: var(--text-3);
    font-weight: 700;
    margin-bottom: 6px;
}

.strip-head .median-label { color: var(--warn); }
.strip-foot { margin: 4px 0 0; font-family: var(--font-mono); }

.strip-track {
    position: relative;
    height: 30px;
    margin: 0 8px;
}

.strip-track::before {
    content: '';
    position: absolute;
    left: -8px;
    right: -8px;
    top: 14px;
    height: 2px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
}

.strip-dot {
    position: absolute;
    top: 9px;
    width: 12px;
    height: 12px;
    margin-left: -6px;
    border-radius: 50%;
    background: #94a3b8;
    opacity: 0.85;
    border: 2px solid var(--bg-body);
    cursor: default;
}

.strip-dot.good { background: var(--brand); opacity: 1; }

.strip-median {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 0;
    border-left: 2px dashed var(--warn);
}

/* --- Medium screens --- */
@media (max-width: 1250px) and (min-width: 769px) {
    .main { padding: 18px 18px 0; }
    .item-row {
        grid-template-columns: 36px 52px minmax(0, 1fr) 132px 84px;
        grid-template-areas:
            "check thumb main price action"
            "check thumb seller meta action";
    }
    .c-thumb { width: 52px; height: 52px; }
    .c-meta { align-items: flex-end; text-align: right; }
}

/* --- Mobile --- */
@media (max-width: 768px) {
    body {
        height: auto;
        min-height: 100dvh;
        overflow-x: hidden;
        overflow-y: auto;
        flex-direction: column;
    }

    .rail {
        width: 100%;
        flex-direction: row;
        padding: max(8px, env(safe-area-inset-top)) 10px 8px;
        border-right: none;
        border-bottom: 1px solid var(--border);
        position: sticky;
        top: 0;
        z-index: 100;
        background: rgba(13, 18, 32, 0.95);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        gap: 8px;
    }

    .rail-brand { flex-direction: row; margin: 0 4px 0 0; }
    .rail-brand .icon { width: 24px; height: 24px; }
    .rail-brand span { display: none; }

    .rail-nav { flex-direction: row; gap: 4px; flex: 1; }
    .nav-btn { flex-direction: row; justify-content: center; padding: 8px 6px; gap: 6px; }
    .nav-btn .icon { width: 16px; height: 16px; }

    .rail-footer { margin: 0; flex-direction: row; }
    .rail-logout span { display: none; }

    .main { padding: 14px 12px 0; overflow: visible; }
    .view-header { gap: 8px; margin-bottom: 12px; }
    .view-title { font-size: var(--fs-lg); width: 100%; }
    .view-header .pill { flex: 0 1 auto; }
    .view-header .btn-primary { margin-left: auto; }

    .panel { padding: 12px; border-radius: var(--radius); }
    .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .field, .field-grow { min-width: 0; }
    .field-full, .form-row .btn { grid-column: 1 / -1; }
    /* Hunter form: type + price share the first row, model below */
    .add-panel .field-full { order: 2; }
    .add-panel .form-row .btn { order: 3; }
    /* Manual form: model first, then price + search side by side */
    #view-manual .form-row .btn { grid-column: auto; align-self: end; min-height: 40px; }
    .options-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .check-line { min-height: 32px; font-size: var(--fs-xs); }

    /* Targets scroll sideways so the feed starts on the first screen */
    .targets {
        scroll-snap-type: x mandatory;
        gap: 8px;
        margin: 0 -12px 14px;
        padding: 0 12px 4px;
        scrollbar-width: none;
    }
    .targets::-webkit-scrollbar { display: none; }
    .targets > .target-card { flex: 0 0 82%; }

    .feed-toolbar { gap: 6px; }
    .chips { width: 100%; margin-right: 0; }
    .toolbar-actions { width: 100%; }
    .toolbar-actions select { flex: 1; }
    .toolbar-actions .btn .label { display: none; }

    .results { overflow: visible; padding-right: 0; }

    .item-row {
        grid-template-columns: 48px minmax(0, 1fr) auto;
        grid-template-areas:
            "thumb main main"
            "seller seller seller"
            "price price action"
            "meta meta check";
        column-gap: 10px;
        row-gap: 8px;
        padding: 11px 12px;
    }

    .c-thumb { width: 48px; height: 48px; align-self: start; }
    .c-main { align-self: start; }
    .c-seller { padding-top: 8px; border-top: 1px solid var(--border); }
    .c-price { align-items: flex-start; text-align: left; flex-direction: row; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
    .c-meta { flex-direction: row; gap: 12px; }
    .c-action { width: 96px; }
    .c-check { justify-self: end; }

    .stats { grid-template-columns: 1fr 1fr; gap: 8px; }
    .stat-val { font-size: var(--fs-md); }
}
