/* Wrapper for all plugin pages - NO GLOBAL IMPORTS */
.livevisi-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    max-width: 100%;
    margin: 0;
}
/* =====================================
   DEVICE / BROWSER ICONS
===================================== */

.livevisi-table img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: middle;
}

/* Icons inside device column */
.livevisi-table td img {
    margin-right: 4px;
}

/* Keep multiple icons aligned nicely */
.livevisi-table td {
    white-space: nowrap;
}

/* Dark mode – improve visibility */
body.livevisi-dark-mode .livevisi-table img {
    filter: brightness(1.1) contrast(1.05);
}


/* Page title wrapper */
.livevisi-page-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 20px;
}

/* Icon */
.livevisi-title-icon {
    font-size: 30px;
    width: 30px;
    height: 30px;
    color: #2563eb; /* blue */
}

/* Optional live pulse effect */
.livevisi-title-icon {
    animation: livevisiPulse 1.6s infinite;
}

/* Pulse animation */
@keyframes livevisiPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===============================
   DARK MODE SUPPORT
================================ */
body.livevisi-dark-mode .livevisi-page-title {
    color: #ffffff;
}

body.livevisi-dark-mode .livevisi-title-icon {
    color: #60a5fa; /* soft blue */
}


.livevisi-live-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.livevisi-live-left h2 {
    margin: 0;
}

.livevisi-dashboard-btn {
    white-space: nowrap;
}

/* Dark mode support */
body.livevisi-dark-mode .livevisi-dashboard-btn {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

/* Card for placeholder pages */
.livevisi-wrap .livevisi-card {
    background: #ffffff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    margin-top: 20px;
    margin-bottom: 20px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.livevisi-wrap .livevisi-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

.livevisi-dashboard {
    padding: 30px;
    background: #f3f4f6;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #374151;
    max-width: 100%;
    margin: 0;
    text-align: left;
}

/* Header */
.livevisi-header {
    background: #ffffff;
    padding: 24px 30px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #e5e7eb;
    transition: box-shadow 0.2s ease;
}

.livevisi-header:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.livevisi-header h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    color: #1f2937;
    letter-spacing: -0.02em;
}

/* Date Filter */
.livevisi-date-filter {
    background: #f3f4f6;
    padding: 4px;
    border-radius: 8px;
    display: flex;
    gap: 4px;
    border: 1px solid #e5e7eb;
}

.livevisi-date-filter a {
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.livevisi-date-filter a:hover {
    color: #1f2937;
    background: rgba(255, 255, 255, 0.6);
}

.livevisi-date-filter a.active {
    background: #ffffff;
    color: #2563eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

/* Stats Grid */
.livevisi-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.livevisi-stat-card {
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.livevisi-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
    border-color: #d1d5db;
}

.livevisi-stat-card h3 {
    margin: 0 0 10px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    font-weight: 700;
}



/* Charts */
.livevisi-charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.livevisi-chart-card {
    background: #ffffff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    position: relative;
    height: 420px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    overflow: hidden;
}

.livevisi-chart-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

.livevisi-chart-wrapper {
    flex: 1;
    position: relative;
    width: 100%;
    min-height: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.livevisi-chart-wrapper canvas {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.livevisi-chart-container {
    flex: 1;
    position: relative;
    width: 100%;
    min-height: 0;
    overflow: hidden;
}

.livevisi-section-title {
    font-size: 16px;
    margin: 0 0 20px;
    color: #1f2937;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.01em;
}

/* Tables */
.livevisi-table-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    margin-bottom: 30px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    width: 100%;
}

.livevisi-table-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

.livevisi-table-card .livevisi-section-title {
    padding: 20px 24px;
    margin: 0;
    border-bottom: 1px solid #f1f5f9;
    background: #ffffff;
}

/* Table Header with Controls */
.livevisi-table-header {
    padding: 18px 20px;
    border-bottom: 2px solid #f3f4f6;
    background: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.livevisi-table-header .livevisi-section-title {
    margin: 0;
}

.livevisi-table-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.livevisi-search-input,
.livevisi-filter-select {
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #374151;
    background: #ffffff;
    transition: all 0.2s ease;
}

.livevisi-search-input {
    min-width: 200px;
}

.livevisi-search-input:focus,
.livevisi-filter-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.livevisi-filter-select {
    min-width: 150px;
    cursor: pointer;
}

table.livevisi-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

table.livevisi-table th {
    background: #f9fafb;
    padding: 14px 20px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #6b7280;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #e5e7eb;
}

table.livevisi-table td {
    padding: 14px 20px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
    color: #374151;
    vertical-align: middle;
}

table.livevisi-table tr:last-child td {
    border-bottom: none;
}

table.livevisi-table tbody tr {
    transition: background-color 0.15s ease;
}

table.livevisi-table tbody tr:hover {
    background: #f9fafb;
}

/* Sortable Table Headers */
table.livevisi-table th[data-sort] {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background-color 0.15s ease;
}

table.livevisi-table th[data-sort]:hover {
    background: #f3f4f6;
}

table.livevisi-table th[data-sort]::after {
    content: '⇅';
    margin-left: 6px;
    opacity: 0.4;
    font-size: 12px;
    transition: opacity 0.2s ease;
}

table.livevisi-table th.sort-asc::after {
    content: '↑';
    opacity: 1;
    color: #2563eb;
}

table.livevisi-table th.sort-desc::after {
    content: '↓';
    opacity: 1;
    color: #2563eb;
}

/* Table Footer with Pagination */
.livevisi-table-footer {
    padding: 16px 20px;
    border-top: 2px solid #f3f4f6;
    background: #f9fafb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
}

.livevisi-table-info {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
    min-width: 200px;
}

.livevisi-pagination {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.livevisi-page-btn {
    padding: 8px 14px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #374151;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    min-width: 36px;
    text-align: center;
    white-space: nowrap;
}

.livevisi-page-btn:hover:not(:disabled) {
    background: #eff6ff;
    border-color: #2563eb;
    color: #2563eb;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.1);
}

.livevisi-page-btn.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.livevisi-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.livevisi-page-dots {
    padding: 0 4px;
    color: #9ca3af;
}

/* Badges & Elements */
.livevisi-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    transition: all 0.2s ease;
}

.livevisi-badge.source-organic {
    background: #d1fae5;
    color: #065f46;
}

.livevisi-badge.source-direct {
    background: #f0f1f3;
    color: #374151;
}

.livevisi-badge.source-social {
    background: #dbeafe;
    color: #0c2d6b;
}

.livevisi-badge.source-referral {
    background: #fee2e2;
    color: #7f1d1d;
}

.livevisi-badge.source-paid {
    background: #fed7aa;
    color: #78350f;
}

/* Date filter dark mode */
body.livevisi-dark-mode .livevisi-date-filter {
    background: #020617;
    border-color: #1e293b;
}

body.livevisi-dark-mode .livevisi-date-filter a {
    color: #cbd5f5;
}

body.livevisi-dark-mode .livevisi-date-filter a:hover {
    background: rgba(37, 99, 235, 0.2);
    color: #60a5fa;
}

.livevisi-badge.source-campaign {
    background: #c7d2fe;
    color: #312e81;
}

.livevisi-badge.source-utm {
    background: #f3e8ff;
    color: #6b21a8;
}

/* Custom source styles for various referrers */
.livevisi-badge.source-chatgpt,
.livevisi-badge.source-openai {
    background: #d1fae5;
    color: #065f46;
}

.livevisi-badge.source-google {
    background: #fef3c7;
    color: #78350f;
}

.livevisi-badge.source-github,
.livevisi-badge.source-gitlab {
    background: #f3f4f6;
    color: #1f2937;
}

.livevisi-badge.source-stackoverflow {
    background: #fed7aa;
    color: #92400e;
}

.livevisi-flag-icon {
    width: 20px;
    height: 15px;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin-right: 8px;
    vertical-align: middle;
    object-fit: cover;
}

.livevisi-visitor-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.livevisi-visitor-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.livevisi-meta-info {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
    font-weight: 500;
}

.livevisi-page-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.livevisi-page-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Responsive Table */
.livevisi-table-responsive {
    overflow-x: auto;
}

/* Mobile Responsive Design */
@media screen and (max-width: 768px) {
    .livevisi-charts-row {
        grid-template-columns: 1fr;
    }

    .livevisi-chart-card {
        height: 300px;
    }

    .livevisi-chart-wrapper {
        flex: 1;
        position: relative;
    }

    .livevisi-table-header {
        flex-direction: column;
        align-items: stretch;
    }

    .livevisi-table-controls {
        flex-direction: column;
    }

    .livevisi-search-input,
    .livevisi-filter-select {
        width: 100%;
    }

    .livevisi-table-footer {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 12px;
    }

    .livevisi-table-info {
        min-width: auto;
        text-align: center;
    }

    .livevisi-pagination {
        justify-content: center;
        gap: 4px;
    }

    /* Stack table cells vertically on mobile */
    table.livevisi-table {
        border: 0;
    }

    table.livevisi-table thead {
        display: none;
    }

    table.livevisi-table tr {
        display: block;
        margin-bottom: 16px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        overflow: hidden;
    }

    table.livevisi-table td {
        display: block;
        text-align: right;
        padding: 12px 16px;
        border-bottom: 1px solid #f3f4f6;
    }

    table.livevisi-table td::before {
        content: attr(data-label);
        float: left;
        font-weight: 700;
        color: #6b7280;
        text-transform: uppercase;
        font-size: 11px;
        letter-spacing: 0.05em;
    }

    table.livevisi-table td:last-child {
        border-bottom: 0;
    }
}


/*Real Time Monitoring*/
.livevisi-status-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 13px;
}

.livevisi-status-icon {
    font-size: 16px;
    line-height: 1;
}

.livevisi-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.livevisi-status-active {
    background-color: #22c55e; /* Green */
}

.livevisi-status-idle {
    background-color: #f59e0b; /* Orange */
}

.livevisi-status-offline {
    background-color: #9ca3af; /* Grey */
}
.livevisi-stat-subline {
    margin-top: 4px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.livevisi-stat-note {
    color: #6b7280;
}
.livevisi-stat-note-small {
    margin-top: 4px;
    font-size: 11px;
    color: #9ca3af;
}
.livevisi-engagement-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-top: 4px;
}
.livevisi-engagement-row .label {
    color: #6b7280;
}
.livevisi-engagement-row .value {
    font-weight: 600;
}
.livevisi-news-card .livevisi-news-list {
    list-style: none;
    margin: 0;
    padding-left: 24px;
}
.livevisi-news-card .livevisi-news-list li {
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 13px;
}
.livevisi-news-card .livevisi-news-list li:last-child {
    border-bottom: none;
}
.livevisi-avatar {
    border-radius: 999px;
}
.livevisi-flag-icon {
    margin-right: 6px;
    vertical-align: middle;
}
.livevisi-meta-info {
    font-size: 11px;
    color: #6b7280;
}
/* ================================
   DATE FILTER TABS
================================ */

/* Wrapper */
.livevisi-date-filter {
    display: inline-flex;
    gap: 6px;
    background: #f8fafc;
    padding: 6px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

/* Base tab */
.livevisi-date-filter a {
    position: relative;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: #6b7280;
    background: transparent;
    border-radius: 8px;
    transition: all 0.15s ease;
}

/* Active tab */
.livevisi-date-filter a.active {
    background: #2563eb;
    color: #ffffff;
}

/* Hover for all tabs */
.livevisi-date-filter a:hover {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.livevisi-date-filter a.active:hover {
    background: #1d4ed8;
    color: #ffffff;
}

/* Pro Feature Date Filter (Locked) */
.livevisi-date-filter-pro {
    position: relative;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #9ca3af;
    background: transparent;
    border-radius: 8px;
    cursor: not-allowed;
    opacity: 0.6;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.livevisi-date-filter-pro.active {
    background: rgba(255, 107, 0, 0.1);
    color: #ff6b00;
    border: 1px solid rgba(255, 107, 0, 0.2);
    opacity: 0.8;
}

.livevisi-pro-badge-small {
    background: linear-gradient(135deg, #ff6b00 0%, #ff8c42 100%);
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(255, 107, 0, 0.3);
    animation: livevisiProPulse 2s infinite;
}

@keyframes livevisiProPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 4px rgba(255, 107, 0, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 2px 8px rgba(255, 107, 0, 0.5);
    }
}

/* Dark mode for Pro date filter */
body.livevisi-dark-mode .livevisi-date-filter-pro {
    color: #64748b;
}

body.livevisi-dark-mode .livevisi-date-filter-pro.active {
    background: rgba(255, 107, 0, 0.15);
    color: #ff8c42;
    border-color: rgba(255, 107, 0, 0.3);
}
/* ===============================
   COLUMN GRID (3 Columns)
================================ */
.livevisi-columns-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 900px) {
    .livevisi-columns-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 520px) {
    .livevisi-columns-grid {
        grid-template-columns: 1fr;
    }
}

/* ===============================
   CHECKBOX CARD STYLE
================================ */
.livevisi-checkbox-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.18s ease;
    font-size: 13px;
    font-weight: 500;
}

/* Hide default checkbox */
.livevisi-checkbox-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Hover */
.livevisi-checkbox-card:hover {
    border-color: #2563eb;
    background: #eef2ff;
}

/* Checked state */
.livevisi-checkbox-card input:checked + .livevisi-checkbox-label {
    color: #2563eb;
    font-weight: 600;
}

.livevisi-checkbox-card input:checked ~ .livevisi-checkbox-label::before {
    content: "✔";
    margin-right: 6px;
    color: #2563eb;
}

/* ===============================
   DARK MODE SUPPORT
================================ */
body.livevisi-dark-mode .livevisi-columns-grid {
    color: #e5e7eb;
}

body.livevisi-dark-mode .livevisi-checkbox-card {
    background: #020617;
    border-color: #1e293b;
    color: #e5e7eb;
}

body.livevisi-dark-mode .livevisi-checkbox-card:hover {
    background: #0f172a;
    border-color: #60a5fa;
}

body.livevisi-dark-mode .livevisi-checkbox-card input:checked + .livevisi-checkbox-label {
    color: #60a5fa;
}

/* ===============================
   DARK MODE – ADMIN NOTICE
================================ */

body.livevisi-dark-mode .notice.livevisi-notice {
    background-color: #1f2937;
    border-left-color: #22c55e;
    color: #e5e7eb;
}

body.livevisi-dark-mode .notice.livevisi-notice p {
    color: #e5e7eb;
}

/* Close (X) button */
body.livevisi-dark-mode .notice.livevisi-notice .notice-dismiss:before {
    color: #e5e7eb;
}

body.livevisi-dark-mode .notice.livevisi-notice .notice-dismiss:hover:before {
    color: #ffffff;
}
/* ===============================
   DARK MODE – SELECT & OPTIONS
================================ */

body.livevisi-dark-mode .livevisi-select {
    background-color: #020617;   /* dark background */
    color: #ffffff;              /* selected text */
    border: 1px solid #334155;
}

/* Dropdown options */
body.livevisi-dark-mode .livevisi-select option {
    background-color: #020617;   /* dropdown background */
    color: #ffffff;              /* option text */
}

/* Hover / active (some browsers support this) */
body.livevisi-dark-mode .livevisi-select option:hover,
body.livevisi-dark-mode .livevisi-select option:checked {
    background-color: #1f2937;
    color: #ffffff;
}

/* ======================================================
   LIVEVISI DASHBOARD – DARK MODE
====================================================== */

/* Full admin background */
body.livevisi-dark-mode,
body.livevisi-dark-mode #wpwrap,
body.livevisi-dark-mode #wpcontent,
body.livevisi-dark-mode #wpbody,
body.livevisi-dark-mode #wpbody-content {
    background-color: #020617 !important;
    color: #e5e7eb;
}

/* Dashboard wrapper */
body.livevisi-dark-mode .livevisi-dashboard,
body.livevisi-dark-mode .livevisi-wrap {
    background: transparent;
    color: #e5e7eb;
}
body.livevisi-dark-mode .livevisi-dashboard .livevisi-header {
    background: #0f172a;
    color: #e5e7eb;
}
/* Headings */
body.livevisi-dark-mode h1,
body.livevisi-dark-mode h2,
body.livevisi-dark-mode h3,{
    color: #ffffff;
/*    background: #0f172a;*/

}
body.livevisi-dark-mode .livevisi-section-title {
    color: #ffffff;
    background: #0f172a;

}

/* Date filter tabs */
body.livevisi-dark-mode .livevisi-date-filter a {
    background: #020617;
    color: #cbd5f5;
    border: 1px solid #1e293b;
}

body.livevisi-dark-mode .livevisi-date-filter a.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

/* Cards */
body.livevisi-dark-mode .livevisi-chart-card,
body.livevisi-dark-mode .livevisi-table-card,
body.livevisi-dark-mode .livevisi-stat-card,
body.livevisi-dark-mode .livevisi-news-card,
body.livevisi-dark-mode .livevisi-card {
    background: #0f172a;
    border: 1px solid #1e293b;
    box-shadow: none;
}

/* Stat numbers */
body.livevisi-dark-mode .livevisi-stat-card .number {
    color: #22c55e;
}

/* Sub text */
body.livevisi-dark-mode .livevisi-stat-note,
body.livevisi-dark-mode .livevisi-stat-note-small,
body.livevisi-dark-mode .livevisi-meta-info {
    color: #94a3b8;
}

/* Tables */
body.livevisi-dark-mode .livevisi-table {
    background: #0f172a;
    border-collapse: collapse;
}

body.livevisi-dark-mode .livevisi-table thead th {
    background: #020617;
    color: #cbd5f5;
    border-bottom: 1px solid #1e293b;
}

body.livevisi-dark-mode .livevisi-table td {
    color: #e5e7eb;
    border-bottom: 1px solid #1e293b;
}

body.livevisi-dark-mode .livevisi-table tbody tr:hover {
    background: #020617;
}

/* Links */
body.livevisi-dark-mode a {
    color: #60a5fa;
}

body.livevisi-dark-mode a:hover {
    color: #93c5fd;
}

/* News list */
body.livevisi-dark-mode .livevisi-news-list li {
    border-bottom: 1px solid #1e293b;
    color: #e5e7eb;
}

/* Chart wrapper */
body.livevisi-dark-mode .livevisi-chart-wrapper {
    background: #0f172a;
}

/* Flags & avatars */
body.livevisi-dark-mode img {
    filter: none;
}

/* Remove leftover WP light panels */
body.livevisi-dark-mode .wrap {
    background: transparent;
}

/* Scrollbar (optional, nice touch) */
body.livevisi-dark-mode ::-webkit-scrollbar {
    width: 10px;
}
body.livevisi-dark-mode ::-webkit-scrollbar-track {
    background: #020617;
}
body.livevisi-dark-mode ::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 6px;
}
body.livevisi-dark-mode ::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

.livevisi-meta { font-size:11px; color:#666; }
.livevisi-live-number { font-size:44px; font-weight:700; margin-top:10px; }
.livevisi-flex { display:flex; align-items:center; }
.tablenav-pages .button.disabled { pointer-events:none; opacity:.5; }
/* Pagination Wrapper */
.tablenav-pages {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 13px;
}

/* Number text */
.tablenav-pages .displaying-num {
    color: #4b5563; /* soft gray */
    font-weight: 500;
}

/* Pagination links */
.tablenav-pages .pagination-links {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Buttons */
.tablenav-pages .button {
    padding: 4px 8px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

/* Hover */
.tablenav-pages .button:hover:not(.disabled) {
    background: #e5e7eb;
    border-color: #a1a1aa;
}

/* Disabled */
.tablenav-pages .button.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* Current Page indicator */
.tablenav-pages .paging-input {
    font-weight: 600;
    margin: 0 6px;
}

/* Total pages inside input */
.tablenav-pages .paging-input .total-pages {
    font-weight: normal;
    color: #6b7280;
}
/* ======================================================
   LIVEVISI DASHBOARD – DARK MODE
====================================================== */

/* Base admin background */
body.livevisi-dark-mode,
body.livevisi-dark-mode #wpwrap,
body.livevisi-dark-mode #wpcontent,
body.livevisi-dark-mode #wpbody,
body.livevisi-dark-mode #wpbody-content {
    background-color: #020617 !important;
    color: #e5e7eb;
}

/* Wrapper */
body.livevisi-dark-mode .livevisi-wrap {
    background: transparent;
    color: #e5e7eb;
}

body.livevisi-dark-mode h1,
body.livevisi-dark-mode .livevisi-live-left h2{
    color: #ffffff;
}


/* Cards */
body.livevisi-dark-mode .livevisi-card,
body.livevisi-dark-mode .livevisi-table-card {
    background: #0f172a;
    border: 1px solid #1e293b;
    box-shadow: none;
}

/* Live number */
body.livevisi-dark-mode .livevisi-live-number {
    color: #22c55e;
}

/* Tables */
body.livevisi-dark-mode .livevisi-table {
    background: #0f172a;
    border-collapse: collapse;
}

body.livevisi-dark-mode .livevisi-table th {
    background: #020617;
    color: #cbd5f5;
    border-bottom: 1px solid #1e293b;
}

body.livevisi-dark-mode .livevisi-table td {
    color: #e5e7eb;
    border-bottom: 1px solid #1e293b;
}

/* Table row hover */
body.livevisi-dark-mode .livevisi-table tbody tr:hover {
    background: #020617;
}

/* Meta text */
body.livevisi-dark-mode .livevisi-meta {
    color: #94a3b8;
}

/* Links */
body.livevisi-dark-mode a {
    color: #60a5fa;
}
body.livevisi-dark-mode a:hover {
    color: #93c5fd;
}

/* Browser & OS icons alignment */
body.livevisi-dark-mode img {
    filter: none;
}

/* Active timer */
body.livevisi-dark-mode .livevisi-active-timer {
    
    font-weight: 600;
}

/* Pagination */
body.livevisi-dark-mode .tablenav-pages {
    color: #e5e7eb;
}

body.livevisi-dark-mode .tablenav-pages .button {
    background: #020617;
    border: 1px solid #1e293b;
    color: #e5e7eb;
}

body.livevisi-dark-mode .tablenav-pages .button:hover:not(.disabled) {
    background: #1e293b;
}

body.livevisi-dark-mode .tablenav-pages .button.disabled {
    opacity: 0.4;
}

/* Pagination text */
body.livevisi-dark-mode .displaying-num,
body.livevisi-dark-mode .paging-input,
body.livevisi-dark-mode .total-pages {
    color: #94a3b8;
}

/* Remove light gray leftovers */
body.livevisi-dark-mode .wrap {
    background: transparent;
}

/* Prevent long URLs from breaking tables */
.livevisi-url-cell {
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Green Signal Animation */
@keyframes livevisiPulseSignal {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.livevisi-green-signal {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #22c55e;
    border-radius: 50%;
    margin-left: 8px;
    animation: livevisiPulseSignal 2s infinite;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
}

.livevisi-yellow-signal {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #fbbf24;
    border-radius: 50%;
    margin-left: 8px;
    animation: livevisiPulseSignal 2s infinite;
    box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.7);
}

/* Pro Lock Icon Styles */
.livevisi-pro-lock-icon {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    transition: all 0.2s ease;
}

.livevisi-pro-lock-icon:hover {
    transform: scale(1.1);
    color: #ff8c42 !important;
}

.livevisi-pro-lock-icon .dashicons {
    width: 14px;
    height: 14px;
    font-size: 14px;
    line-height: 14px;
}

/* Session Replay Pro Column Styles */
.livevisi-session-replay-pro-header {
    transition: all 0.2s ease;
}

.livevisi-session-replay-pro-header:hover {
    background: rgba(255, 107, 0, 0.1);
}

.livevisi-session-replay-pro-cell {
    transition: all 0.2s ease;
}

.livevisi-session-replay-pro-cell:hover {
    background: rgba(255, 107, 0, 0.05);
}

/* PRO Clickable Elements */
.livevisi-pro-clickable {
    transition: all 0.2s ease;
}

.livevisi-pro-clickable:hover {
    opacity: 1 !important;
    background: rgba(255, 107, 0, 0.08);
}

.livevisi-pro-badge-clickable {
    transition: all 0.2s ease;
}

.livevisi-pro-badge-clickable:hover {
    background: #ff8c42 !important;
    transform: scale(1.05);
}

/* Pro Popup Modal */
.livevisi-pro-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: livevisiFadeIn 0.3s ease;
}

@keyframes livevisiFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.livevisi-pro-popup {
    background: #ffffff;
    border-radius: 12px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: livevisiSlideUp 0.3s ease;
}

@keyframes livevisiSlideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.livevisi-pro-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.livevisi-pro-popup-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.livevisi-pro-popup-icon {
    text-align: center;
    margin-bottom: 20px;
}

.livevisi-pro-popup-icon .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
    color: #ff6b00;
}

.livevisi-pro-popup-title {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    text-align: center;
    margin-bottom: 12px;
}

.livevisi-pro-popup-message {
    font-size: 16px;
    color: #6b7280;
    text-align: center;
    line-height: 1.6;
    margin-bottom: 24px;
}

.livevisi-pro-popup-button {
    display: block;
    width: 100%;
    padding: 14px 2px;
    background: linear-gradient(135deg, #ff6b00 0%, #ff8c42 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
}

.livevisi-pro-popup-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.4);
}

/* Dark Mode Support for Popup */
body.livevisi-dark-mode .livevisi-pro-popup {
    background: #0f172a;
    border: 1px solid #1e293b;
}

body.livevisi-dark-mode .livevisi-pro-popup-title {
    color: #ffffff;
}

body.livevisi-dark-mode .livevisi-pro-popup-message {
    color: #cbd5f5;
}

body.livevisi-dark-mode .livevisi-pro-popup-close {
    color: #cbd5f5;
}

body.livevisi-dark-mode .livevisi-pro-popup-close:hover {
    background: #1e293b;
    color: #ffffff;
}

/* URL Track Pro Page */
.livevisi-url-track-pro-page {
    transition: all 0.2s ease;
}

.livevisi-url-track-pro-page:hover {
    opacity: 0.8 !important;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.2);
}

/* Link styling */
.livevisi-url {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

/* Referrer label */
.livevisi-direct {
    color: #6b7280;
    font-style: italic;
}

/* Dark mode compatibility */
body.livevisi-dark-mode .livevisi-url {
    color: #22c55e;
}

body.livevisi-dark-mode .livevisi-direct {
    color: #94a3b8;
}
body.livevisi-dark-mode .section-title {
    color: #fff;
}

/* ===============================
   CREATIVE ADS VISITOR PAGE
================================ */

/* Hero Section */
.livevisi-ads-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 48px 40px;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
}

.livevisi-ads-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: livevisiHeroRotate 20s linear infinite;
}

@keyframes livevisiHeroRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.livevisi-ads-hero-content {
    position: relative;
    z-index: 1;
}

.livevisi-pro-badge-hero {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 50px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: livevisiBadgeFloat 3s ease-in-out infinite;
}

@keyframes livevisiBadgeFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.livevisi-badge-icon {
    font-size: 16px;
    animation: livevisiIconSpin 2s linear infinite;
}

@keyframes livevisiIconSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.livevisi-ads-hero h1 {
    font-size: 42px;
    font-weight: 800;
    color: #ffffff;
    margin: 16px 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    letter-spacing: -1px;
}

.livevisi-ads-hero-description {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.95);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Premium Card */
.livevisi-ads-premium-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 2px solid #e5e7eb;
    overflow: hidden;
    position: relative;
    margin-bottom: 30px;
}

.livevisi-ads-lock-overlay {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 60px 40px;
    text-align: center;
    border-bottom: 2px dashed #cbd5e1;
    position: relative;
}

.livevisi-ads-lock-overlay::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #cbd5e1, transparent);
}

.livevisi-ads-lock-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    color: #ff6b00;
    animation: livevisiLockShake 2s ease-in-out infinite;
}

@keyframes livevisiLockShake {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    25% { transform: translateX(-5px) rotate(-5deg); }
    75% { transform: translateX(5px) rotate(5deg); }
}

.livevisi-ads-lock-overlay h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 16px;
}

.livevisi-ads-lock-overlay p {
    font-size: 16px;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

/* Features List */
.livevisi-ads-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 500px;
    margin: 0 auto 32px;
}

.livevisi-ads-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.livevisi-ads-feature-item:hover {
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #ff6b00;
}

.livevisi-feature-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.livevisi-ads-feature-item span:last-child {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

/* Upgrade Button */
.livevisi-upgrade-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #ff6b00 0%, #ff8c42 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.livevisi-upgrade-btn:hover {
    opacity: 0.8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.4);
}

.livevisi-btn-icon {
    font-size: 20px;
    animation: livevisiRocketPulse 1.5s ease-in-out infinite;
}

@keyframes livevisiRocketPulse {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
}

/* Form Preview */
.livevisi-ads-form-preview {
    padding: 40px;
    background: #f9fafb;
    opacity: 0.6;
    pointer-events: none;
}

.livevisi-ads-form-preview h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.livevisi-ads-form-preview h3::before {
    content: '👁️';
    font-size: 24px;
}

.livevisi-checkbox-label-disabled {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: not-allowed;
    opacity: 0.5;
}

.livevisi-select-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    min-width: 200px;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
}

/* Dark Mode Support */
body.livevisi-dark-mode .livevisi-ads-hero {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

body.livevisi-dark-mode .livevisi-ads-premium-card {
    background: #0f172a;
    border-color: #1e293b;
}

body.livevisi-dark-mode .livevisi-ads-lock-overlay {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

body.livevisi-dark-mode .livevisi-ads-lock-overlay h2 {
    color: #ffffff;
}

body.livevisi-dark-mode .livevisi-ads-lock-overlay p {
    color: #cbd5e1;
}

body.livevisi-dark-mode .livevisi-ads-feature-item {
    background: #1e293b;
    border-color: #334155;
}

body.livevisi-dark-mode .livevisi-ads-feature-item span:last-child {
    color: #e5e7eb;
}

body.livevisi-dark-mode .livevisi-ads-form-preview {
    background: #020617;
}

body.livevisi-dark-mode .livevisi-ads-form-preview h3 {
    color: #ffffff;
}

/* Responsive */
@media (max-width: 768px) {
    .livevisi-ads-hero {
        padding: 32px 24px;
    }
    
    .livevisi-ads-hero h1 {
        font-size: 32px;
    }
    
    .livevisi-ads-lock-overlay {
        padding: 40px 24px;
    }
    
    .livevisi-ads-form-preview {
        padding: 24px;
    }
}
