/* ── Fonts & Base ─────────────────────────────────────── */
:root {
    --blue:   #3b82f6;
    --purple: #a855f7;
    --green:  #10b981;
    --cyan:   #06b6d4;
    --red:    #ef4444;
    --amber:  #f59e0b;
    --bg:     #05060b;
    --surface: rgba(13, 17, 26, 0.92);
    --border: rgba(255, 255, 255, 0.08);
}

body {
    background-color: var(--bg) !important;
    color: #e2e8f0 !important;
    font-family: 'Outfit', sans-serif !important;
    scroll-behavior: smooth;
}

/* ── Result Rows ─────────────────────────────────────── */
.result-row {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.18s ease;
    cursor: pointer;
    backdrop-filter: blur(4px);
    user-select: none;
}
.result-row:hover {
    border-color: rgba(59, 130, 246, 0.25);
    background: rgba(15, 23, 42, 0.6);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    transform: translateY(-1px);
}
.result-row.open {
    background: rgba(10, 14, 23, 0.95);
    border-color: rgba(168, 85, 247, 0.35);
    margin-bottom: 14px;
}

.result-grid {
    display: grid;
    grid-template-columns: 2fr 1.5fr 2fr 40px;
    gap: 20px;
    padding: 14px 20px;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
}

.result-col {
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: break-word;
}

.col-source { color: #94a3b8; }
.col-id     { color: var(--blue); font-weight: 700; }
.col-cred   { color: var(--cyan); font-weight: 600; letter-spacing: 0.5px; }

/* ── Expanded Detail Panel ───────────────────────────── */
.details-panel {
    display: none;
    padding: 20px 24px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--border);
}
.result-row.open .details-panel { display: block; animation: fadeIn 0.25s ease; }

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}
.detail-item label {
    display: flex;
    align-items: center;
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}
.detail-item span {
    font-family: 'JetBrains Mono', monospace;
    color: #e2e8f0;
    font-size: 13px;
    word-break: break-all;
}

/* ── Glass Cards ─────────────────────────────────────── */
.glass-card {
    background: rgba(10, 11, 16, 0.92) !important;
    border: 1px solid var(--border) !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    will-change: transform;
}

/* ── Map ─────────────────────────────────────────────── */
#map { height: 480px; width: 100%; border-radius: 12px; }

/* ── Admin Panel ─────────────────────────────────────── */
.admin-stat-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 20px;
    text-align: center;
}
.admin-stat-card .stat-val  { font-size: 28px; font-weight: 900; font-family: 'JetBrains Mono', monospace; }
.admin-stat-card .stat-label { font-size: 12px; color: #64748b; text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; }

.user-row {
    display: grid;
    grid-template-columns: 160px 90px 90px 80px 110px 120px auto;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    transition: background 0.15s;
}
.user-row:hover  { background: rgba(255,255,255,0.03); }
.user-row.banned { opacity: 0.5; }
.user-row-header { color: #64748b; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; border-bottom: 1px solid rgba(255,255,255,0.06); padding: 8px 16px; display: grid; grid-template-columns: 160px 90px 90px 80px 110px 120px auto; }

/* ── Account / Profile Modal ─────────────────────────── */
.profile-stat {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.profile-stat .ps-label { font-size: 12px; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; }
.profile-stat .ps-val   { font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 700; }

.credit-bar-wrap { background: rgba(255,255,255,0.06); border-radius: 4px; height: 6px; overflow: hidden; margin-top: 6px; }
.credit-bar-fill { height: 100%; border-radius: 4px; transition: width 0.4s ease; }

/* ── Misc Utilities ──────────────────────────────────── */
.mono { font-family: 'JetBrains Mono', monospace; }
.hint-text { font-size: 12px; color: #64748b; font-family: 'JetBrains Mono', monospace; margin-top: 8px; }
.hint-text strong { color: var(--purple); }

.admin-trigger {
    position: fixed; bottom: 10px; right: 10px;
    opacity: 0.04; cursor: pointer; z-index: 1000;
    padding: 10px; transition: opacity 0.3s;
}
.admin-trigger:hover { opacity: 1; color: var(--cyan); }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.fade-in { animation: fadeIn 0.35s ease-out forwards; }
.spin-icon { animation: spin 0.8s linear infinite; display: inline-flex; }

/* Larger tap targets for icon buttons */
.v-btn.v-btn--icon.v-size--x-small {
    min-width: 24px !important;
    min-height: 24px !important;
}

/* OSINT card header min-height so single-line cards don't look squished */
.osint-card-header { min-height: 44px; }

/* ── OSINT Cards ─────────────────────────────────────── */
.osint-card { transition: all 0.18s ease; }
.osint-card:hover {
    border-color: rgba(34, 211, 238, 0.2) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
.osint-card.hit  { border-color: rgba(16,185,129,0.3) !important; box-shadow: 0 0 0 1px rgba(16,185,129,0.08) inset; }
.osint-card.error { border-color: rgba(239,68,68,0.2) !important; opacity: 0.85; }
.osint-card.ratelimit { border-color: rgba(245,158,11,0.2) !important; }
.osint-card.empty { opacity: 0.5; }
.osint-card.expanded { border-color: rgba(34,211,238,0.18) !important; }
.osint-card-header { transition: background 0.15s; min-height: 44px; user-select: none; }
.osint-card-body::-webkit-scrollbar { width: 4px; }
.osint-card-body::-webkit-scrollbar-thumb { background: #334155; border-radius: 2px; }

/* Admin user list scrollbar */
.admin-user-scroll::-webkit-scrollbar { width: 4px; }
.admin-user-scroll::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 2px; }

/* Larger, more readable label text on OSINT cards */
.osint-label-text {
    font-size: 13px !important;
    color: #94a3b8 !important;
    font-family: 'JetBrains Mono', monospace;
    flex-shrink: 0;
}

/* ── Generic KV renderer ── */
.osint-kv { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; align-items: flex-start; }
.osint-kv-key {
    font-size: 11px; color: #475569; flex-shrink: 0;
    min-width: 110px; font-family: 'JetBrains Mono', monospace;
}
.osint-kv-val {
    font-size: 12px; color: #cbd5e1; flex: 1;
    word-break: break-all; font-family: 'JetBrains Mono', monospace; line-height: 1.5;
}
.osint-arr-item { margin-left: 12px; border-left: 1px solid var(--border); padding-left: 10px; margin-bottom: 4px; }

/* ── SEON Profile ── */
.seon-profile { font-family: 'Outfit', sans-serif; }

.seon-accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 8px;
}

.seon-detail-panel {
    background: rgba(15,23,42,.8);
    border: 1px solid #1e293b;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.9;
    min-width: 180px;
    flex-shrink: 0;
}
.seon-detail-panel .seon-detail-title {
    color: #94a3b8; font-weight: 700; font-size: 13px; margin-bottom: 6px;
}

.seon-rule-item {
    background: rgba(245,158,11,.05);
    border: 1px solid rgba(245,158,11,.15);
    border-radius: 6px; padding: 7px 12px;
    font-size: 12px; display: flex; align-items: center; gap: 10px; margin-bottom: 4px;
}
.seon-rule-id { color: #fbbf24; font-weight: 700; font-family: 'JetBrains Mono', monospace; flex-shrink: 0; font-size: 12px; }
.seon-rule-name { color: #94a3b8; flex: 1; font-size: 12px; }
.seon-rule-score { color: #64748b; font-family: 'JetBrains Mono', monospace; flex-shrink: 0; font-size: 12px; }

.seon-breach-tag {
    font-size: 11px; padding: 3px 10px; border-radius: 4px;
    background: rgba(127,29,29,.25); border: 1px solid rgba(239,68,68,.2);
    color: #fca5a5; display: inline-flex; align-items: center; gap: 5px; margin: 2px;
}
.seon-breach-year { color: #7f1d1d; font-size: 10px; font-weight: 600; }

.seon-section-title {
    font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase;
    letter-spacing: 0.8px; display: flex; align-items: center; gap: 6px;
    margin-bottom: 12px;
}

/* ── Stats bar ── */
.osint-stats-bar {
    font-size: 12px; color: #64748b;
    font-family: 'JetBrains Mono', monospace; letter-spacing: 0.4px;
}

/* ── Mobile responsive ── */
@media (max-width: 768px) {
    .result-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px; padding: 12px 14px;
    }
    .result-col:nth-child(3),
    .result-col:nth-child(4) { display: none; }

    .user-row, .user-row-header {
        grid-template-columns: 1fr 70px 70px auto;
        font-size: 11px; padding: 8px 10px;
    }
    .user-row > :nth-child(4),
    .user-row > :nth-child(5),
    .user-row-header > :nth-child(4),
    .user-row-header > :nth-child(5) { display: none; }

    .seon-accounts-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .seon-detail-panel  { min-width: unset; width: 100%; }
    .osint-label-text   { font-size: 11px !important; }
    .admin-stat-card    { padding: 12px; }
    .admin-stat-card .stat-val { font-size: 22px; }

    /* OSINT card header: let chips wrap and label truncate */
    .osint-card-header {
        flex-wrap: wrap !important;
        min-height: unset !important;
        padding: 10px 12px !important;
        gap: 6px;
    }
    .osint-card-header .d-flex.align-center.flex-grow-1 {
        flex-wrap: wrap !important;
        gap: 4px;
    }
    .osint-label-text {
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* OSINT card body: horizontal scroll for wide JSON data */
    .osint-card-body {
        max-height: 500px !important;
        overflow-x: auto !important;
    }

    /* SEON profile: stack identity + detail panel vertically */
    .seon-profile .d-flex.align-start.justify-space-between {
        flex-direction: column !important;
    }

    /* KV row: allow more wrapping */
    .osint-kv-key { min-width: 80px; }

    /* Stats bar */
    .osint-stats-bar { font-size: 11px; }

    /* Rate limit banner buttons */
    .seon-accounts-grid { gap: 6px; }
}

@media (max-width: 480px) {
    .result-grid {
        grid-template-columns: 1fr; gap: 4px;
    }
    .seon-accounts-grid { grid-template-columns: 1fr 1fr; }

    /* OSINT search input: full width, scan button on new line */
    .osint-search-row {
        flex-direction: column !important;
        gap: 8px !important;
    }
    .osint-search-row .v-btn {
        width: 100% !important;
    }

    .osint-label-text {
        font-size: 10px !important;
        max-width: 100px;
    }
    .osint-card-header {
        padding: 8px 10px !important;
    }
}