:root {
    --emerald-950: #022c22;
    --emerald-900: #064e3b;
    --emerald-850: #054036;
    --emerald-800: #065f46;
    --emerald-700: #047857;
    --emerald-600: #059669;
    --emerald-500: #10b981;
    --emerald-400: #34d399;
    --emerald-200: #a7f3d0;

    --slate-900: #0f172a;
    --slate-700: #334155;
    --slate-500: #64748b;

    --border: #e2e8f0;
    --bg: #f4f7f6;
    --panel: #ffffff;

    --shadow: 0 20px 50px rgba(2, 6, 23, 0.18);
    --topbar-h: 56px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background:
        radial-gradient(circle at 15% 0%, rgba(16,185,129,0.10), transparent 46%),
        radial-gradient(circle at 90% 20%, rgba(52,211,153,0.08), transparent 52%),
        var(--bg);
    color: var(--slate-900);
}

body.detail-open {
    overflow: hidden;
}

/* =========================
   Top bar / navigation
   ========================= */

.top-bar {
    position: sticky;
    top: 0;
    z-index: 1100;
    height: var(--topbar-h);
    background: linear-gradient(135deg, var(--emerald-900), #052e2b 55%, #0b3b33);
    color: #ecfdf5;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(167,243,208,0.22);
}

.top-bar h1 {
    margin: 0;
    font-size: 18px;
    letter-spacing: 0.2px;
}

.topbar-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}



/* Top bar layout (grouped nav + right-aligned view buttons) */
.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.nav-groups {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}


.nav-primary {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
}
.nav-primary,
.nav-secondary {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    align-items: center;
}

.nav-secondary .nav-link {
    opacity: 0.9;
    font-size: 13px;
    padding: 6px 9px;
}

/* Collapsed "More" nav menu for less-used pages */
.nav-more {
    position: relative;
}

.nav-more-summary {
    user-select: none;
}

.nav-more summary::-webkit-details-marker {
    display: none;
}

.nav-more-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    min-width: 160px;
    background: rgba(5, 46, 43, 0.96);
    border: 1px solid rgba(167, 243, 208, 0.28);
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.28);
    z-index: 9999;
}

.nav-more-menu .nav-link {
    display: block;
    width: 100%;
}
button {
    padding: 8px 12px;
    border: 1px solid var(--border);
    background: #f8fafc;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 650;
    color: var(--slate-900);
}

button:hover {
    background: rgba(16,185,129,0.10);
}

.top-bar button {
    background: rgba(236,253,245,0.12);
    border-color: rgba(167,243,208,0.35);
    color: #ecfdf5;
}

.top-bar button:hover {
    background: rgba(236,253,245,0.16);
}

.nav-link {
    color: #ecfdf5;
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(167,243,208,0.25);
    font-size: 14px;
}

.nav-link:hover {
    background: rgba(236,253,245,0.14);
}

.nav-link.active {
    background: rgba(16,185,129,0.22);
    border-color: rgba(167,243,208,0.45);
}

/* =========================
   Layout
   ========================= */

#app-container {
    display: flex;
    height: calc(100vh - var(--topbar-h));
    position: relative;
}



#mapWrap {
    flex: 1;
    position: relative;
    height: 100%;
    min-width: 0; /* prevents flex overflow */
}

#map {
    width: 100%;
    height: 100%;
    min-height: 0; /* allow flex parents to control height */
    flex: 1;
}

.map-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.18);
    backdrop-filter: blur(1px);
    z-index: 5;
    font-weight: 600;
}

.map-loading.hidden {
    display: none;
}

#list-panel {
    width: 360px;
    background: var(--panel);
    border-left: 1px solid var(--border);
    overflow-y: auto;
}

#list-panel.collapsed {
    display: none;
}

#auction-list {
    padding: 6px;
}

.auction-group-header {
    margin: 14px 8px 6px 8px;
    padding: 12px 14px;
    background: rgba(2,6,23,0.04);
    border: 1px solid var(--border);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auction-group-title {
    font-weight: 900;
    font-size: 13px;
    color: rgba(2,6,23,0.78);
    letter-spacing: 0.2px;
}

.auction-group-count {
    font-size: 12px;
    font-weight: 800;
    color: rgba(2,6,23,0.55);
    background: rgba(255,255,255,0.85);
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 999px;
}

.group-spacer {
    height: 4px;
}

.auction-card {
    padding: 14px 14px;
    border-bottom: 1px solid var(--border);
    border-radius: 12px;
    margin: 8px;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(2,6,23,0.05);
}

.auction-card:hover {
    background: #f1f5f9;
}

.new-badge {
    display: inline-block;
    background: rgba(16,185,129,0.16);
    color: var(--emerald-900);
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    margin-left: 6px;
    border-radius: 999px;
    border: 1px solid rgba(16,185,129,0.32);
    vertical-align: middle;
}

.fav-indicator {
    display: inline-block;
    margin-left: 6px;
    font-size: 14px;
    color: #0f766e;
    vertical-align: middle;
}

.removed-pill {
    display: inline-block;
    background: rgba(220,38,38,0.12);
    border: 1px solid rgba(220,38,38,0.25);
    color: #7f1d1d;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    margin-left: 6px;
    border-radius: 999px;
    vertical-align: middle;
}

.removed-reason-inline {
    margin: 6px 0 0 0;
    font-size: 12px;
    color: #7f1d1d;
}

details.removed-section {
    margin: 10px 8px 16px 8px;
    background: rgba(2,6,23,0.03);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 8px 8px;
}

details.removed-section > summary {
    cursor: pointer;
    font-weight: 800;
    color: rgba(2,6,23,0.70);
    list-style: none;
}

details.removed-section > summary::-webkit-details-marker {
    display: none;
}

.auction-card.removed {
    background: rgba(220,38,38,0.04);
}

.removed-reason {
    margin-top: 6px;
    font-size: 12px;
    color: #7f1d1d;
}

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

.mini-btn {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #ffffff;
    cursor: pointer;
    font-weight: 700;
    font-size: 12px;
}

.mini-btn:hover {
    background: #f1f5f9;
}

.list-filters {
    padding: 10px 12px 0 12px;
}

.filters-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.filters-block {
    background: rgba(2,6,23,0.03);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px 10px;
}

.filters-title {
    font-weight: 800;
    margin-bottom: 8px;
    color: rgba(2,6,23,0.75);
    font-size: 13px;
}

.filters-inline {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.county-checks {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

@media (min-width: 860px) {
    .filters-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* =========================
   Pin legend
   ========================= */

#pin-legend {
    position: absolute;
    bottom: 18px;
    left: 18px;
    background: rgba(255,255,255,0.94);
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(2,44,34,0.12);
    box-shadow: 0 10px 22px rgba(2,6,23,0.10);
    z-index: 1000;
    font-size: 15px;
    backdrop-filter: blur(8px);
}

#pin-legend hr {
    margin: 8px 0;
    border: none;
    border-top: 1px solid rgba(2,44,34,0.10);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.green { background: #22c55e; }
.yellow { background: #eab308; }
.orange { background: #f97316; }
.red { background: #ef4444; }

.star { font-size: 16px; margin-right: 6px; }
.green-star { color: #22c55e; }
.yellow-star { color: #eab308; }

.orange-star { color: #f97316; }
.red-star { color: #ef4444; }

/* =========================
   Detail panel (Bottom sheet)
   ========================= */

.detail-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
    z-index: 1250;
}

.detail-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.detail-backdrop.hidden {
    display: none;
}

#detail-panel {
    position: fixed;
    left: 50%;
    bottom: 0;
    width: min(920px, 100vw);
    max-height: 92vh;
    transform: translateX(-50%) translateY(110%);
    background: var(--panel);
    border-radius: 18px 18px 0 0;
    border: 1px solid rgba(2,44,34,0.16);
    border-bottom: none;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 1300;
    transition: transform 220ms ease;
}

#detail-panel.open {
    transform: translateX(-50%) translateY(0);
}

#detail-panel.hidden {
    display: none;
}

.sheet-handle {
    width: 58px;
    height: 6px;
    border-radius: 999px;
    background: rgba(6, 95, 70, 0.35);
    margin: 10px auto 6px;
}

#close-detail {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    border: 1px solid rgba(16,185,129,0.35);
    background: rgba(236, 253, 245, 0.92);
    color: var(--emerald-900);
    font-size: 40px;
    line-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

#close-detail:hover {
    background: rgba(236, 253, 245, 1);
}

#detail-content {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 12px 16px 14px;
}

#detail-content h2 {
    margin: 10px 0 8px;
    font-size: 18px;
}

#detail-content p {
    margin: 8px 0;
    color: var(--slate-700);
}

#detail-content strong {
    color: var(--slate-900);
}

#property-image {
    width: 100%;
    border-radius: 14px;
    background: #0b1220;
    max-height: 390px;
    object-fit: contain;
}

textarea {
    width: 100%;
    min-height: 90px;
    margin-top: 6px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid var(--border);
    outline: none;
    font-family: inherit;
}

textarea:focus {
    border-color: rgba(16,185,129,0.55);
    box-shadow: 0 0 0 4px rgba(16,185,129,0.14);
}

.title-search {
    margin-top: 6px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(2,44,34,0.12);
    background: rgba(248,250,252,0.9);
}

.ts-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--slate-900);
}

.ts-checkbox input {
    width: 18px;
    height: 18px;
}

.ts-hint {
    margin-top: 6px;
    font-size: 13px;
    color: var(--slate-700);
}

.detail-footer {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(2,44,34,0.12);
    background: rgba(255,255,255,0.98);
}

/* Buttons inside the bottom sheet */
.btn {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(16,185,129,0.30);
    background: rgba(236,253,245,0.85);
    color: var(--emerald-900);
    font-weight: 800;
    cursor: pointer;
    flex: 1 1 170px;
}

.btn:hover {
    background: rgba(236,253,245,1);
}

.btn.primary {
    background: linear-gradient(135deg, var(--emerald-600), var(--emerald-850));
    border-color: rgba(167,243,208,0.45);
    color: #ecfdf5;
}

.btn.primary:hover {
    filter: brightness(1.03);
}

/* =========================
   Image carousel + thumbnails
   ========================= */

.image-controls {
    display: flex;
    justify-content: space-between;
    margin: 8px 0 10px;
    gap: 8px;
}

.image-controls.hidden {
    display: none;
}

.image-controls button {
    flex: 1;
    font-size: 18px;
    font-weight: 900;
    padding: 10px 10px;
    border-radius: 12px;
    border: 1px solid rgba(2,44,34,0.12);
    background: linear-gradient(135deg, #f8fafc, #eef2f7);
    color: var(--slate-900);
}

.image-controls button:hover {
    background: linear-gradient(135deg, #eef2f7, #e2e8f0);
}

.thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 6px;
}

.thumbs::-webkit-scrollbar {
    height: 7px;
}

.thumbs::-webkit-scrollbar-thumb {
    background: rgba(2,44,34,0.18);
    border-radius: 10px;
}

.thumb {
    width: 74px;
    height: 50px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    flex-shrink: 0;
}

.thumb:hover {
    border-color: rgba(6,95,70,0.45);
}

.thumb.active {
    border-color: rgba(6,95,70,0.75);
}

/* =========================
   Links page
   ========================= */

.page-container {
    padding: 16px;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.link-card {
    display: block;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    color: inherit;
    text-decoration: none;
}

.link-card:hover {
    background: #f8fafc;
}

.link-title {
    font-weight: 800;
    margin-bottom: 6px;
}

.link-sub {
    font-size: 13px;
    color: var(--slate-500);
}

/* =========================
   AI Prompt Builder
   ========================= */

.ai-prompt-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    padding: 14px;
}

.ai-prompt-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.ai-prompt-section h2 {
    margin: 6px 0 12px;
    font-size: 16px;
}

.ai-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.ai-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
}

.ai-field span {
    color: var(--slate-700);
    font-weight: 650;
}

.ai-field input,
.ai-field select,
.ai-field textarea {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    font-size: 14px;
}

.ai-field-wide {
    grid-column: 1 / -1;
}

.ai-check {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px;
    background: #fff;
    font-size: 13px;
}

.ai-check input { transform: scale(1.1); }

.ai-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.ai-hint {
    margin: 10px 0 0;
    font-size: 12px;
    color: var(--slate-500);
}

.ai-prompt-output {
    width: 100%;
    min-height: 520px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12.5px;
    line-height: 1.35;
}

/* =========================
   Responsive
   ========================= */

@media (max-width: 900px) {
    .ai-prompt-grid {
        grid-template-columns: 1fr;
    }

    .ai-prompt-output {
        min-height: 360px;
    }

    #app-container {
        flex-direction: column;
        height: calc(100vh - var(--topbar-h));
    }

    #map {
        height: 60vh;
        flex: none;
    }

    #list-panel {
        width: 100%;
        height: 40vh;
        border-left: none;
        border-top: 1px solid var(--border);
    }

    #pin-legend {
        display: none;
    }

    #detail-panel {
        left: 0;
        width: 100vw;
        transform: translateY(110%);
        border-radius: 18px 18px 0 0;
    }

    #detail-panel.open {
        transform: translateY(0);
    }
}

@media (max-width: 520px) {
    .top-bar {
        gap: 10px;
        flex-wrap: wrap;
        height: auto;
        padding-bottom: 12px;
    }

    

    .topbar-left {
        width: 100%;
    }

    .nav-groups {
        width: 100%;
    }

    .topbar-right {
        width: 100%;
        justify-content: flex-end;
    }

    #app-container {
        height: calc(100vh - 96px);
    }

    .thumb {
        width: 66px;
        height: 44px;
    }

    .detail-footer {
        gap: 8px;
        padding: 10px;
    }

    .btn {
        flex: 1 1 140px;
        padding: 10px;
    }
}


/* Legal description block */
.legal-desc {
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.35;
  margin: 6px 0 10px 0;
}


/* =========================
   OSCN docs panel
   ========================= */

.oscn-docs {
    margin: 6px 0 10px 0;
    padding: 10px;
    border: 1px solid rgba(2,44,34,0.10);
    border-radius: 14px;
    background: rgba(248,250,252,0.7);
}

.oscn-docs-status {
    color: var(--slate-700);
    font-size: 12px;
}


.oscn-debug-btn {
    margin-left: 8px;
    padding: 4px 10px;
    border-radius: 10px;
    border: 1px solid rgba(2,44,34,0.18);
    background: rgba(255,255,255,0.85);
    cursor: pointer;
    font-size: 12px;
}

.oscn-debug-pre {
    margin-top: 8px;
    padding: 10px;
    border-radius: 12px;
    border: 1px dashed rgba(2,44,34,0.18);
    background: rgba(255,255,255,0.55);
    font-size: 11px;
    line-height: 1.35;
    max-height: 240px;
    overflow: auto;
    white-space: pre-wrap;
}
.oscn-key-docs {
    margin-bottom: 8px;
}

.oscn-rowhead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.oscn-title {
    font-weight: 800;
    color: var(--slate-900);
    font-size: 12px;
}

.oscn-docs a.doc-btn {
    text-decoration: none;
    display: inline-block;
}

.doc-btn {
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(16,185,129,0.30);
    background: rgba(236,253,245,0.85);
    color: var(--emerald-900);
    font-weight: 800;
    cursor: pointer;
    font-size: 12px;
    text-decoration: none;
    flex: 0 0 auto;
    white-space: nowrap;
}

.doc-btn:hover {
    background: rgba(236,253,245,1);
}

.oscn-all summary {
    cursor: pointer;
    font-weight: 800;
    color: var(--slate-900);
    padding: 6px 2px;
    user-select: none;
}

.oscn-all-list {
    margin-top: 8px;
    max-height: 260px;
    overflow: auto;
    padding-right: 6px;
}

.oscn-row {
    padding: 8px 0;
    border-top: 1px dashed rgba(2,44,34,0.14);
}

.doc-link {
    padding: 6px 8px;
    border-radius: 10px;
    border: 1px solid rgba(2,44,34,0.10);
    background: linear-gradient(135deg, #f8fafc, #eef2f7);
    color: var(--slate-900);
    cursor: pointer;
    font-weight: 800;
    font-size: 12px;
    text-align: left;
    width: 100%;
}

.doc-link:hover {
    filter: brightness(0.99);
}

.oscn-rowtext {
    margin-top: 6px;
    color: var(--slate-700);
    font-size: 11px;
    line-height: 1.25;
}



/* =========================
   OSCN Credit Bid Estimate
   ========================= */

.credit-bid-box{
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 12px;
  padding: 10px;
  margin-top: 6px;
  background: rgba(255,255,255,0.65);
}

.credit-bid-status{
  font-size: 15px;
  opacity: 0.85;
  margin-bottom: 8px;
}

.credit-bid-head{
  font-size: 13px;
  margin-bottom: 8px;
}

.credit-bid-sub{
  font-size: 12px;
  opacity: 0.85;
  margin-top: 4px;
}

.credit-bid-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 6px;
}

.credit-bid-table td{
  padding: 6px 4px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.credit-bid-table td.num{
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.credit-bid-table tr.total td{
  border-top: 2px solid rgba(0,0,0,0.14);
  font-weight: 700;
}

.credit-bid-notes{
  margin: 8px 0 0 16px;
  padding: 0;
  font-size: 12px;
  opacity: 0.85;
}

.credit-bid-warn{
  margin-top: 8px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,245,200,0.65);
  font-size: 12px;
}

.credit-bid-actions{
  margin-top: 8px;
}

.badge{
  display: inline-block;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid rgba(0,0,0,0.14);
  margin-left: 6px;
}

.badge.muted{
  opacity: 0.7;
}

/* County Clerk section */
.clerk-data {
  margin: 6px 0 12px 0;
  padding: 10px;
  border: 1px solid rgba(2,44,34,0.10);
  border-radius: 14px;
  background: rgba(248,250,252,0.7);
}

.clerk-data-status {
  color: var(--slate-700);
  font-size: 12px;
}

.clerk-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  font-size: 12px;
}

.clerk-label {
  min-width: 90px;
  color: var(--slate-700);
  font-weight: 600;
}

.clerk-val {
  flex: 1 1 auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clerk-row a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.clerk-row a:hover {
  text-decoration: underline;
}




/* =========================
   GPT Picks / Favorites toolbars
   ========================= */
.page-toolbar {
    padding: 12px 16px 2px;
    border-bottom: 1px solid var(--border);
    background: rgba(248,250,252,0.92);
}

.toolbar-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.toolbar-row input[type="text"] {
    flex: 1 1 520px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(2,44,34,0.14);
    outline: none;
    background: #ffffff;
}

.toolbar-row input[type="text"]:focus {
    border-color: rgba(16,185,129,0.55);
    box-shadow: 0 0 0 4px rgba(16,185,129,0.14);
}

.toolbar-row input[type="file"] {
    flex: 1 1 260px;
}

.filters-row .chk {
    font-weight: 800;
    color: var(--slate-900);
}

.filters-row select {
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(2,44,34,0.14);
    background: #ffffff;
    margin-left: 8px;
}

.btn.danger {
    background: rgba(239,68,68,0.10);
    border-color: rgba(239,68,68,0.30);
    color: rgba(127,29,29,0.95);
}

.btn.danger:hover {
    background: rgba(239,68,68,0.16);
}

/* =========================
   Detail pane helpers (new pages)
   ========================= */
.kv-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 10px 0 8px;
}

.kv-grid > div {
    padding: 10px 10px;
    border: 1px solid rgba(2,44,34,0.12);
    border-radius: 14px;
    background: rgba(255,255,255,0.92);
}

.kv-grid strong {
    display: block;
    font-size: 12px;
    opacity: 0.85;
    margin-bottom: 4px;
}


.value-box-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin: 10px 0 12px;
}

.value-box {
    padding: 10px 10px;
    border: 1px solid rgba(2,44,34,0.12);
    border-radius: 14px;
    background: rgba(255,255,255,0.92);
}

.value-box-label {
    font-size: 12px;
    opacity: 0.85;
    margin-bottom: 4px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.value-box-value {
    font-size: 14px;
    font-weight: 650;
    word-break: break-word;
}
@media (max-width: 850px) {
    .kv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.badge-mshell {
    display: inline-block;
    background: rgba(14,165,233,0.14);
    border: 1px solid rgba(14,165,233,0.30);
    color: rgba(7,89,133,0.95);
    font-size: 11px;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 999px;
    vertical-align: middle;
}

.raw-json {
    margin-top: 12px;
}

.json-pre {
    white-space: pre-wrap;
    word-break: break-word;
    background: rgba(2,44,34,0.06);
    border: 1px solid rgba(2,44,34,0.12);
    border-radius: 14px;
    padding: 10px;
    overflow: auto;
}


@media (max-width: 720px) {
    .topbar-left { flex-wrap: wrap; }
    .nav-groups { flex-wrap: wrap; }
    .nav-primary { flex-wrap: wrap; }
    .nav-secondary { flex-wrap: wrap; }
}
