/* ============================================
   VisitorLens Admin — Unified Design System
   Warm palette · Plus Jakarta Sans · Amber accent
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ── Design Tokens ─────────────────────────────────────── */
:root {
    --vsr-bg:           #f8f7f4;
    --vsr-bg2:          #f1ede8;
    --vsr-card:         #ffffff;
    --vsr-border:       #e8e4de;
    --vsr-border2:      #d6d0c9;
    --vsr-text:         #0f172a;
    --vsr-text2:        #64748b;
    --vsr-text3:        #94a3b8;
    --vsr-accent:       #f59e0b;
    --vsr-accent-dark:  #d97706;
    --vsr-accent-light: rgba(245, 158, 11, 0.10);
    --vsr-green:        #22c55e;
    --vsr-green-light:  rgba(34, 197, 94, 0.10);
    --vsr-red:          #ef4444;
    --vsr-red-light:    rgba(239, 68, 68, 0.10);
    --vsr-blue:         #3b82f6;
    --vsr-radius:       12px;
    --vsr-radius-sm:    8px;
    --vsr-shadow:       0 1px 4px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.04);
    --vsr-shadow-md:    0 4px 16px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.05);
    --vsr-font:         'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Hide WP chrome on VisitorLens pages (full-screen app feel) ──
   This stylesheet only ever loads on our own admin screens (see
   VLENS_Admin_Assets::enqueue), so these rules can't leak elsewhere.
   Desktop-only (min-width 783px, matching WP core's own mobile
   breakpoint): below that, the sidebar menu is hidden by default and can
   only be opened via the toggle button that lives inside #wpadminbar, so
   hiding the bar on mobile would strand users with no way to reach the
   dashboard menu. */
@media screen and (min-width: 783px) {
    #wpadminbar { display: none !important; }
    html.wp-toolbar { padding-top: 0 !important; }
}
.notice,
.update-nag,
.fs-notice,
div.updated,
div.error {
    display: none !important;
}

/* ── Base Wrap ─────────────────────────────────────────── */
.vsr-wrap {
    font-family: var(--vsr-font);
    margin: 0;
    padding: 28px 28px 48px;
    background: var(--vsr-bg);
    min-height: calc(100vh - 55px);
    /* negate WP admin wrap margins */
    margin-left: -2px;
}

.vsr-wrap * { box-sizing: border-box; }

/* ── Loading State ─────────────────────────────────────── */
.vsr-loading {
    text-align: center;
    padding: 80px 20px;
    color: var(--vsr-text3);
    font-size: 14px;
    font-family: var(--vsr-font);
}

.vsr-loading::before {
    content: '';
    display: block;
    width: 32px;
    height: 32px;
    border: 3px solid var(--vsr-border);
    border-top-color: var(--vsr-accent);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: vsrSpin 0.8s linear infinite;
}

@keyframes vsrSpin { to { transform: rotate(360deg); } }

/* ── Page Header ───────────────────────────────────────── */
.vsr-settings-header {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--vsr-border);
}

.vsr-settings-header h1 {
    font-family: var(--vsr-font);
    font-size: 24px;
    font-weight: 800;
    font-style: normal;
    letter-spacing: -0.02em;
    color: var(--vsr-text);
    margin: 0 0 5px;
    line-height: 1.25;
}

.vsr-settings-header h1 em {
    color: var(--vsr-accent);
    font-style: normal;
    font-weight: 800;
}

.vsr-subtitle {
    font-size: 13.5px;
    color: var(--vsr-text2);
    margin: 0;
    line-height: 1.5;
}

/* ── Tabs ──────────────────────────────────────────────── */
.vsr-settings-tabs {
    display: flex;
    gap: 0;
    background: var(--vsr-card);
    border: 1px solid var(--vsr-border);
    border-radius: var(--vsr-radius);
    padding: 5px;
    margin-bottom: 24px;
    width: fit-content;
    box-shadow: var(--vsr-shadow);
}

.vsr-tab {
    padding: 8px 20px;
    border-radius: var(--vsr-radius-sm);
    border: none;
    background: transparent;
    color: var(--vsr-text2);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--vsr-font);
    transition: all 0.15s ease;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.vsr-tab:hover { color: var(--vsr-text); background: var(--vsr-bg); }

.vsr-tab.active {
    background: var(--vsr-accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(245,158,11,0.30);
}

/* ── Tab Content ───────────────────────────────────────── */
.vsr-tab-content { display: none; }
.vsr-tab-content.active { display: block; }

/* ── Cards ─────────────────────────────────────────────── */
.vsr-card {
    background: var(--vsr-card);
    border: 1px solid var(--vsr-border);
    border-radius: var(--vsr-radius);
    box-shadow: var(--vsr-shadow);
    margin-bottom: 18px;
    overflow: hidden;
}

.vsr-card-header {
    padding: 16px 22px;
    border-bottom: 1px solid var(--vsr-border);
    background: #faf9f7;
    display: flex;
    align-items: center;
}

.vsr-card-title {
    font-family: var(--vsr-font);
    font-size: 14px;
    font-weight: 700;
    font-style: normal;
    color: var(--vsr-text);
    letter-spacing: -0.01em;
}

.vsr-card-body {
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* ── Setting Rows ──────────────────────────────────────── */
.vsr-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0;
    border-bottom: 1px solid var(--vsr-border);
}

.vsr-card-body > .vsr-setting-row:last-child { border-bottom: none; }

.vsr-setting-info { flex: 1; }

.vsr-setting-label {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--vsr-text);
    margin-bottom: 2px;
}

.vsr-setting-desc {
    font-size: 12px;
    color: var(--vsr-text3);
    line-height: 1.45;
}

/* ── Toggle Switch ─────────────────────────────────────── */
.vsr-toggle {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}

.vsr-toggle input { opacity: 0; width: 0; height: 0; }

.vsr-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #d1d5db;
    border-radius: 13px;
    transition: 0.2s ease;
}

.vsr-toggle-slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    left: 2px;
    bottom: 2px;
    background: #fff;
    border-radius: 50%;
    transition: 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.vsr-toggle input:checked + .vsr-toggle-slider {
    background: var(--vsr-accent);
}

.vsr-toggle input:checked + .vsr-toggle-slider::before {
    transform: translateX(20px);
}

/* ── Form Fields ───────────────────────────────────────── */
.vsr-field-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.vsr-field-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--vsr-text);
}

.vsr-field-hint {
    font-size: 12px;
    color: var(--vsr-text3);
    line-height: 1.5;
}

.vsr-input,
.vsr-select {
    width: 100%;
    max-width: 320px;
    padding: 9px 13px;
    border: 1.5px solid var(--vsr-border);
    border-radius: var(--vsr-radius-sm);
    font-family: var(--vsr-font);
    font-size: 13px;
    color: var(--vsr-text);
    background: var(--vsr-card);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
    appearance: none;
}

.vsr-input:focus,
.vsr-select:focus {
    border-color: var(--vsr-accent);
    box-shadow: 0 0 0 3px rgba(245,158,11,0.12);
}

.vsr-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.vsr-textarea {
    width: 100%;
    min-height: 80px;
    border: 1.5px solid var(--vsr-border);
    border-radius: var(--vsr-radius-sm);
    padding: 10px 13px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 12px;
    color: var(--vsr-text);
    resize: vertical;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    background: var(--vsr-card);
}

.vsr-textarea:focus {
    border-color: var(--vsr-accent);
    box-shadow: 0 0 0 3px rgba(245,158,11,0.12);
}

/* ── Buttons ───────────────────────────────────────────── */
.vsr-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: var(--vsr-radius-sm);
    border: 1.5px solid var(--vsr-border);
    background: var(--vsr-card);
    color: var(--vsr-text2);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--vsr-font);
    transition: all 0.15s ease;
    white-space: nowrap;
    text-decoration: none;
    line-height: 1;
}

.vsr-btn:hover {
    background: var(--vsr-bg);
    color: var(--vsr-text);
    border-color: var(--vsr-border2);
}

.vsr-btn-primary {
    background: var(--vsr-accent);
    color: #fff;
    border-color: var(--vsr-accent);
    box-shadow: 0 2px 8px rgba(245,158,11,0.25);
}

.vsr-btn-primary:hover {
    background: var(--vsr-accent-dark);
    border-color: var(--vsr-accent-dark);
    box-shadow: 0 3px 12px rgba(245,158,11,0.35);
}

.vsr-btn-danger {
    color: var(--vsr-red);
    border-color: rgba(239,68,68,0.25);
    background: var(--vsr-red-light);
}

.vsr-btn-danger:hover {
    background: rgba(239,68,68,0.12);
    border-color: var(--vsr-red);
}

.vsr-btn-small {
    padding: 7px 14px;
    font-size: 12px;
    border-radius: 6px;
    background: var(--vsr-accent);
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-family: var(--vsr-font);
    white-space: nowrap;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 6px rgba(245,158,11,0.22);
}

.vsr-btn-small:hover {
    background: var(--vsr-accent-dark);
    box-shadow: 0 3px 10px rgba(245,158,11,0.32);
}

/* ── Settings Footer ───────────────────────────────────── */
.vsr-settings-footer {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 0 0;
    border-top: 1px solid var(--vsr-border);
    margin-top: 8px;
}

.vsr-save-status {
    font-size: 13px;
    color: var(--vsr-green);
    font-weight: 500;
}

/* ── Tags UI ───────────────────────────────────────────── */
.vsr-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
    min-height: 28px;
}

.vsr-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--vsr-bg2);
    border: 1px solid var(--vsr-border);
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    color: var(--vsr-text);
}

.vsr-tag-remove {
    cursor: pointer;
    color: var(--vsr-text3);
    font-size: 14px;
    line-height: 1;
    border: none;
    background: none;
    padding: 0;
    font-family: inherit;
    transition: color 0.15s;
}

.vsr-tag-remove:hover { color: var(--vsr-red); }

.vsr-tags-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ── Storage Bars (settings / data tab) ────────────────── */
.vsr-storage-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.vsr-storage-bar-label {
    width: 130px;
    font-size: 12.5px;
    color: var(--vsr-text2);
    flex-shrink: 0;
}

.vsr-storage-bar-track {
    flex: 1;
    height: 7px;
    background: var(--vsr-bg2);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--vsr-border);
}

.vsr-storage-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--vsr-accent), #f97316);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.vsr-storage-bar-val {
    width: 52px;
    text-align: right;
    font-size: 11.5px;
    color: var(--vsr-text3);
    flex-shrink: 0;
}

/* ── Alerts Table ──────────────────────────────────────── */
.vsr-alerts-table,
.vsr-team-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.vsr-alerts-table th,
.vsr-team-table th {
    text-align: left;
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 700;
    color: var(--vsr-text3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--vsr-border);
    background: #faf9f7;
}

.vsr-alerts-table td,
.vsr-team-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--vsr-border);
    color: var(--vsr-text2);
    vertical-align: middle;
}

.vsr-alerts-table tr:last-child td,
.vsr-team-table tr:last-child td { border-bottom: none; }

.vsr-alerts-table tr:hover td,
.vsr-team-table tr:hover td { background: var(--vsr-bg); }

.vsr-alerts-empty {
    text-align: center;
    padding: 32px;
    color: var(--vsr-text3);
    font-style: italic;
}

/* ── Modal ─────────────────────────────────────────────── */
.vsr-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.45);
    backdrop-filter: blur(4px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vsr-modal-box {
    background: var(--vsr-card);
    border-radius: 16px;
    padding: 28px 32px;
    width: 460px;
    max-width: calc(100vw - 40px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.1);
    border: 1px solid var(--vsr-border);
    position: relative;
}

.vsr-modal-box h3 {
    font-family: var(--vsr-font);
    font-size: 19px;
    font-style: normal;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--vsr-text);
    margin: 0 0 20px;
}

.vsr-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 28px;
    height: 28px;
    border: none;
    background: var(--vsr-bg2);
    border-radius: 6px;
    color: var(--vsr-text3);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.15s;
}

.vsr-modal-close:hover { background: var(--vsr-border); color: var(--vsr-text); }

.vsr-modal-role-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--vsr-text);
}

.vsr-modal-role-row select {
    flex: 1;
    padding: 8px 12px;
    border: 1.5px solid var(--vsr-border);
    border-radius: var(--vsr-radius-sm);
    font-size: 13px;
    font-family: var(--vsr-font);
    color: var(--vsr-text);
    background: var(--vsr-card);
    outline: none;
}

.vsr-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--vsr-border);
}

.vsr-btn-cancel {
    padding: 9px 18px;
    border-radius: var(--vsr-radius-sm);
    border: 1.5px solid var(--vsr-border);
    background: var(--vsr-card);
    color: var(--vsr-text2);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--vsr-font);
    transition: all 0.15s;
}

.vsr-btn-cancel:hover { background: var(--vsr-bg); color: var(--vsr-text); }

/* ── User Search (Team modal) ──────────────────────────── */
.vsr-user-search-wrap { position: relative; margin-bottom: 16px; }

.vsr-user-search-wrap input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--vsr-border);
    border-radius: var(--vsr-radius-sm);
    font-family: var(--vsr-font);
    font-size: 13px;
    color: var(--vsr-text);
    background: var(--vsr-card);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.vsr-user-search-wrap input:focus {
    border-color: var(--vsr-accent);
    box-shadow: 0 0 0 3px rgba(245,158,11,0.12);
}

.vsr-user-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: var(--vsr-card);
    border: 1px solid var(--vsr-border);
    border-radius: var(--vsr-radius-sm);
    box-shadow: var(--vsr-shadow-md);
    z-index: 200;
    max-height: 200px;
    overflow-y: auto;
}

.vsr-selected-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--vsr-accent-light);
    border: 1px solid rgba(245,158,11,0.2);
    border-radius: var(--vsr-radius-sm);
    margin-bottom: 14px;
    font-size: 13px;
    color: var(--vsr-text);
}

.vsr-selected-user .name { font-weight: 600; }
.vsr-selected-user .email { font-size: 12px; color: var(--vsr-text3); }

.vsr-role-hints {
    font-size: 12px;
    color: var(--vsr-text3);
    background: var(--vsr-bg);
    border-radius: var(--vsr-radius-sm);
    padding: 10px 14px;
    line-height: 1.7;
    border: 1px solid var(--vsr-border);
    margin-bottom: 4px;
}

.vsr-role-hints b { color: var(--vsr-text2); }

body[class*="page_visitorlens"] #wpcontent{
  padding-left: 0px;
}
/* ── Spacer below nav ──────────────────────────────────── */
.vsr-nav-spacer { height: 20px; }

/* ============================================
   VSR Top Navigation Bar
   ============================================ */

.vsr-top-nav {
    position: sticky;
    z-index: 900;
    background: #ffffff;
    border-bottom: 1px solid #e8e4de;
    border-top: 3px solid var(--vsr-accent);
    box-shadow: 0 2px 16px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.04);
    font-family: var(--vsr-font);
    /* margin: -10px -20px 0 -2px; */
}

.vsr-top-nav-inner {
    display: flex;
    align-items: center;
    padding: 0 24px;
    height: 52px;
    max-width: 1600px;
}

/* Brand */
.vsr-nav-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    padding-right: 24px;
    border-right: 1px solid #e8e4de;
    margin-right: 8px;
    flex-shrink: 0;
}

.vsr-nav-brand:hover { text-decoration: none; }

.vsr-nav-brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    border-radius: 8px;
    color: #fff;
    box-shadow: 0 2px 8px rgba(245,158,11,0.35);
    flex-shrink: 0;
}

.vsr-nav-brand-name {
    font-family: var(--vsr-font);
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1;
}

.vsr-nav-brand-name em {
    font-style: normal;
    font-weight: 800;
    color: var(--vsr-accent);
}

.vsr-nav-premium-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    border-radius: 4px;
    font-family: var(--vsr-font);
}

/* Nav links */
.vsr-nav-links {
    display: flex;
    align-items: stretch;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
    gap: 2px;
    /* min-width:0 lets this flex item shrink below its content's natural
       width (the default `auto` would refuse to, since children use
       white-space:nowrap) — required so admin.js's overflow-nav script
       can compare scrollWidth vs clientWidth to detect when items no
       longer fit and move them into the "More" dropdown. overflow:hidden
       clips anything not yet collapsed, as a visual safety net. */
    min-width: 0;
    overflow: hidden;
}

.vsr-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 15px;
    height: 52px;
    text-decoration: none;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--vsr-font);
    letter-spacing: 0.01em;
    transition: color 0.15s ease, background 0.15s ease;
    border-bottom: 2.5px solid transparent;
    white-space: nowrap;
}

.vsr-nav-link:hover { color: #0f172a; background: #faf9f7; text-decoration: none; }

.vsr-nav-link.is-active {
    color: var(--vsr-accent);
    font-weight: 600;
    border-bottom-color: var(--vsr-accent);
    background: linear-gradient(to bottom, transparent 0%, rgba(245,158,11,0.05) 100%);
}

.vsr-nav-link.is-active:hover {
    background: linear-gradient(to bottom, transparent 0%, rgba(245,158,11,0.08) 100%);
}

.vsr-nav-link-icon {
    display: flex;
    align-items: center;
    opacity: 0.6;
    transition: opacity 0.15s;
}

.vsr-nav-link:hover .vsr-nav-link-icon,
.vsr-nav-link.is-active .vsr-nav-link-icon { opacity: 1; }

.vsr-nav-link.is-active .vsr-nav-link-icon { color: var(--vsr-accent); }

.vsr-nav-link-pip {
    position: absolute;
    bottom: -2.5px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--vsr-accent);
    display: none;
}

.vsr-nav-link.is-active .vsr-nav-link-pip { display: block; }

/* ── "More" overflow dropdown ──────────────────────────────────
   Populated by admin.js: as the bar runs out of room, collapsible
   items (Ad Lens / Orders Lens / Incomplete Orders) move into
   #vsrNavMoreDropdown one at a time, and this <li> un-hides. ── */

.vsr-nav-more-btn {
    background: none;
    border: none;
    border-bottom: 2.5px solid transparent;
    font: inherit;
    cursor: pointer;
}

.vsr-nav-more-chevron { opacity: 0.55; transition: transform 0.15s, opacity 0.15s; }
.vsr-nav-more-btn:hover .vsr-nav-more-chevron { opacity: 1; }
.vsr-nav-more-btn[aria-expanded="true"] .vsr-nav-more-chevron { transform: rotate(180deg); opacity: 1; }

/* Small accent dot shown when the current page is one of the items
   currently tucked away in the dropdown, so context isn't lost. */
.vsr-nav-more-btn.has-active { color: var(--vsr-accent); font-weight: 600; }
.vsr-nav-more-btn.has-active::after {
    content: '';
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--vsr-accent);
    margin-left: -2px;
}

.vsr-nav-more-dropdown {
    display: none;
    flex-direction: column;
    gap: 2px;
    list-style: none;
    /* position:fixed (not absolute): this element lives as a top-level
       sibling of <nav>, not inside it — admin.js sets top/left inline
       from #vsrNavMoreBtn's live getBoundingClientRect() every time it
       opens or the layout shifts, so no static top/right here. */
    position: fixed;
    min-width: 190px;
    margin: 0;
    padding: 6px;
    background: #ffffff;
    border: 1px solid #e8e4de;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
    z-index: 950;
}

.vsr-nav-more-dropdown.open { display: flex; }

.vsr-nav-more-dropdown .vsr-nav-link {
    height: auto;
    padding: 9px 10px;
    border-bottom: none;
    border-radius: 6px;
    background: none;
}
.vsr-nav-more-dropdown .vsr-nav-link:hover { background: #faf9f7; }
.vsr-nav-more-dropdown .vsr-nav-link.is-active { background: rgba(245,158,11,0.08); }
.vsr-nav-more-dropdown .vsr-nav-link-pip { display: none; }

/* Right side */
.vsr-nav-end {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 16px;
}

.vsr-nav-upgrade-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    background: linear-gradient(135deg, rgba(245,158,11,.14), rgba(249,115,22,.12));
    border: 1px solid rgba(245,158,11,.35);
    border-radius: 7px;
    color: #f59e0b;
    font-size: 11.5px;
    font-weight: 700;
    font-family: var(--vsr-font);
    cursor: pointer;
    letter-spacing: 0.01em;
    transition: background .15s, border-color .15s, transform .1s;
    white-space: nowrap;
}
.vsr-nav-upgrade-btn:hover {
    background: linear-gradient(135deg, rgba(245,158,11,.22), rgba(249,115,22,.18));
    border-color: rgba(245,158,11,.55);
    transform: translateY(-1px);
}

.vsr-nav-version {
    font-size: 10.5px;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.04em;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    background: #f1ede8;
    border: 1px solid #e8e4de;
    border-radius: 5px;
    padding: 3px 8px;
}

/* Responsive */
@media (max-width: 900px) {
    /* Icon-only in the main bar; the dropdown stays vertical with plenty
       of room, so its item labels stay put — icon-only there would just
       be a column of ambiguous glyphs. Equal specificity, so the second
       rule (later in source) wins for labels inside the dropdown. */
    .vsr-nav-links .vsr-nav-link-label { display: none; }
    .vsr-nav-more-dropdown .vsr-nav-link-label { display: inline; }
    .vsr-nav-link { padding: 0 12px; }
    .vsr-nav-brand-name { display: none; }
    .vsr-top-nav-inner { padding: 0 14px; }
}

/* ── Insights Dashboard Widget ─────────────────────────── */
.vsr-insights-widget { margin-top: 20px; }

.vsr-insights-widget-header {
    padding: 14px 22px;
    border-bottom: 1px solid var(--vsr-border);
    background: #faf9f7;
}

.vsr-insights-widget-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--vsr-accent);
    text-decoration: none;
}

.vsr-insights-widget-link:hover { color: var(--vsr-accent-dark); }

.vsr-insights-widget-body { padding: 12px 22px 16px; }

.vsr-insights-widget-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--vsr-border);
}

.vsr-insights-widget-row:last-child { border-bottom: none; }
.vsr-insights-widget-icon { font-size: 13px; line-height: 1.4; flex-shrink: 0; }

.vsr-insights-widget-text {
    font-size: 13px;
    color: var(--vsr-text);
    line-height: 1.4;
}

.vsr-insights-widget-empty {
    text-align: center;
    padding: 20px 0;
    font-size: 13px;
    color: var(--vsr-text2);
    font-style: italic;
}
