/* Dashboard CSS - Modern and Professional Design */

:root {
    --primary: #a29bfe;
    /* Modern Purple */
    --primary-dark: #6c5ce7;
    --secondary: #d1d8ff;
    /* Soft Lavender */
    --accent: #ffd166;
    --success: #00d2d3;
    --warning: #feca57;
    --danger: #ff6b6b;
    --dark: #0f172a;
    --gray-900: #0a0a0c;
    --gray-800: #15151e;
    --gray-700: #1c1c27;
    --gray-600: #2d2d3d;
    --gray-500: #64748b;
    --gray-400: #94a3b8;
    --gray-300: #cbd5e1;
    --gray-200: #e2e8f0;
    --gray-100: #f1f5f9;
    --white: #ffffff;
    --accent-glow: rgba(162, 155, 254, 0.3);

    /* Platform Colors */
    --cb-blue: #0088ff;
    --sc-red: #ff4757;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: radial-gradient(circle at top right, rgba(108, 92, 231, 0.15), transparent 40%),
        radial-gradient(circle at bottom left, rgba(162, 155, 254, 0.1), transparent 40%),
        var(--gray-900);
    color: var(--gray-100);
    line-height: 1.6;
    min-height: 100vh;
}

/* ============================================
   LOGIN PAGE (PREMIUM REDESIGN)
   ============================================ */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    background: #0a0a0c;
    margin: 0;
    padding: 0;
    position: relative;
    overflow: hidden;
}

/* Fixed Background Container */
.fixed-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Animated Background Orbs */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    animation: floatOrb 12s infinite ease-in-out alternate;
}

/* Top Right (Light Purple) */
.orb-1 { width: 50vw; height: 50vw; background: rgba(162, 155, 254, 0.45); top: -20vh; right: -15vw; animation-delay: 0s; }
/* Bottom Left (Pink) */
.orb-2 { width: 45vw; height: 45vw; background: rgba(255, 107, 127, 0.35); bottom: -15vh; left: -15vw; animation-delay: -3s; }
/* Top Left (Cyan) */
.orb-3 { width: 40vw; height: 40vw; background: rgba(0, 210, 211, 0.35); top: -10vh; left: -15vw; animation-delay: -6s; }
/* Bottom Right (Deep Purple) */
.orb-4 { width: 50vw; height: 50vw; background: rgba(108, 92, 231, 0.4); bottom: -20vh; right: -15vw; animation-delay: -9s; }

@keyframes floatOrb {
    0% { transform: translateY(0) translateX(0) scale(1); opacity: 0.8; }
    50% { opacity: 1; }
    100% { transform: translateY(-40px) translateX(30px) scale(1.1); opacity: 0.85; }
}

.login-container {
    width: 100%;
    max-width: 440px;
    padding: 20px;
    position: relative;
    z-index: 10;
}

.login-card {
    background: rgba(21, 21, 30, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(20px);
    animation: fadeUpIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeUpIn { to { transform: translateY(0); opacity: 1; } }

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-header h1 {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #fff 0%, #a29bfe 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 10px rgba(162, 155, 254, 0.2);
}

.login-header p {
    color: #94a3b8;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-300);
}

.form-group input {
    padding: 14px 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--white);
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group input:focus {
    outline: none;
    border-color: #a29bfe;
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 4px rgba(162, 155, 254, 0.15);
}

.error-message {
    padding: 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    border-radius: 8px;
    color: var(--danger);
    font-size: 14px;
}

.login-btn-premium {
    padding: 16px 24px;
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    border: none;
    border-radius: 12px;
    color: var(--white);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.login-btn-premium:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -10px rgba(162, 155, 254, 0.5);
    background: linear-gradient(135deg, #7e6ef1 0%, #b2acff 100%);
}

.login-btn-premium:active {
    transform: translateY(-1px);
    box-shadow: 0 8px 15px -5px rgba(162, 155, 254, 0.4);
}

.login-btn-premium:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.login-footer {
    margin-top: 32px;
    text-align: center;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
}

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 270px;
    background: linear-gradient(180deg, var(--gray-900) 0%, var(--gray-800) 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.2);
    z-index: 100;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--gray-700);
}

.sidebar-header h2 {
    font-size: 24px;
    margin-bottom: 4px;
}

.sidebar-header p {
    font-size: 12px;
    color: var(--gray-400);
}

.sidebar-nav {
    flex: 1;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: var(--gray-400);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav-item:hover {
    background: rgba(162, 155, 254, 0.08);
    color: var(--white);
    transform: translateX(4px);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(162, 155, 254, 0.15) 0%, rgba(108, 92, 231, 0.05) 100%);
    color: var(--white);
    box-shadow: inset 0 0 0 1px rgba(162, 155, 254, 0.2);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 60%;
    width: 4px;
    background: var(--primary);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 10px var(--primary);
}

.nav-item .icon {
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--gray-400);
    transition: color 0.3s ease;
}

.nav-item:hover .icon, .nav-item.active .icon {
    color: var(--primary);
}

.sidebar-footer {
    padding: 24px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.15);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--gray-300);
}

.btn-logout {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    color: var(--danger);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ff8a8a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

/* Main Content */
.main-content {
    flex: 1;
    background: var(--gray-900);
    overflow-y: auto;
}

.dashboard-header {
    padding: 24px 32px;
    background: var(--gray-800);
    border-bottom: 1px solid var(--gray-700);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-header h1 {
    font-size: 28px;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.btn-icon {
    padding: 8px 12px;
    background: var(--gray-700);
    border: 1px solid var(--gray-600);
    border-radius: 6px;
    color: var(--gray-300);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--gray-600);
    color: var(--white);
}

/* Pages */
.page {
    display: none;
    padding: 32px;
}

.page.active {
    display: block;
}

#helpPage.active {
    display: flex !important;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--gray-800);
    border: 1px solid var(--gray-700);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    font-size: 36px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-700);
    border-radius: 12px;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--gray-400);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--white);
}

/* Section */
.section {
    background: var(--gray-800);
    border: 1px solid var(--gray-700);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.section h2 {
    font-size: 20px;
    margin-bottom: 20px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

/* Models List */
.models-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.model-card {
    background: var(--gray-700);
    border: 1px solid var(--gray-600);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    transition: all 0.2s;
}

.model-card.unread-card {
    border-left: 4px solid var(--warning) !important;
    background: rgba(245, 158, 11, 0.08) !important;
}

.notification-dot {
    width: 10px;
    height: 10px;
    background: var(--danger);
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 10px var(--danger);
}

.model-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.model-status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--success);
}

.model-status.offline {
    background: var(--gray-500);
}

.model-status.private {
    background: var(--warning);
}

.model-name {
    font-size: 16px;
    font-weight: 600;
}

.model-stats {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: var(--gray-400);
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--gray-500);
}

/* Avatar Selection Gallery */
.super-scroll::-webkit-scrollbar {
    display: none;
}

.super-scroll {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.model-avatar-card {
    opacity: 0.6;
    transform: scale(0.95);
}

.model-avatar-card:hover {
    opacity: 0.8 !important;
    background: rgba(162, 155, 254, 0.05) !important;
    transform: scale(1);
}

.model-avatar-card.active {
    opacity: 1 !important;
    transform: scale(1.05);
    border-color: #a29bfe !important;
    background: linear-gradient(180deg, rgba(162, 155, 254, 0.1) 0%, rgba(162, 155, 254, 0) 100%) !important;
    box-shadow: 0 4px 15px rgba(162, 155, 254, 0.15);
}

/* Period Selector */
.period-selector {
    display: flex;
    gap: 8px;
}

.period-btn {
    padding: 8px 16px;
    background: var(--gray-700);
    border: 1px solid var(--gray-600);
    border-radius: 6px;
    color: var(--gray-300);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.period-btn:hover {
    background: var(--gray-600);
}

.period-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

/* Analytics */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.analytics-card {
    background: var(--gray-700);
    border: 1px solid var(--gray-600);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.analytics-card h3 {
    font-size: 14px;
    color: var(--gray-400);
    margin-bottom: 12px;
}

.big-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary);
}

.sub-text {
    font-size: 14px;
    color: var(--gray-500);
}

/* Performers List */
.performers-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.performer-item {
    background: var(--gray-700);
    border: 1px solid var(--gray-600);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.performer-rank {
    font-size: 24px;
    margin-right: 16px;
}

.performer-name {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
}

.performer-tokens {
    font-size: 18px;
    color: var(--primary);
    font-weight: 600;
}

/* Licenses */
.filter-buttons {
    display: flex;
    gap: 8px;
}

.filter-btn {
    padding: 6px 12px;
    background: var(--gray-700);
    border: 1px solid var(--gray-600);
    border-radius: 6px;
    color: var(--gray-300);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: var(--gray-600);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.licenses-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.license-card {
    background: var(--gray-700);
    border: 1px solid var(--gray-600);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.license-info {
    flex: 1;
}

.license-key {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: var(--gray-300);
    margin-bottom: 4px;
}

.license-meta {
    font-size: 12px;
    color: var(--gray-500);
}

.license-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.license-status.active {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.license-status.revoked {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

/* Analytics Controls */
.analytics-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.date-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--gray-400);
}

.date-input {
    padding: 8px;
    background: var(--gray-700);
    border: 1px solid var(--gray-600);
    border-radius: 6px;
    color: var(--white);
    font-size: 14px;
}

.btn-secondary {
    padding: 8px 16px;
    background: var(--gray-700);
    border: 1px solid var(--gray-600);
    border-radius: 6px;
    color: var(--gray-300);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.btn-secondary:hover {
    background: var(--gray-600);
    color: var(--white);
}

.btn-primary {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    border: none;
    border-radius: 8px;
    color: var(--white);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(162, 155, 254, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(162, 155, 254, 0.4);
    background: linear-gradient(135deg, #7e6ef1, #b2acff);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(162, 155, 254, 0.3);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    /* Higher priority */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(2, 6, 23, 0.85);
    /* Deeper dark background */
    backdrop-filter: blur(12px);
    /* High-end blur */
    overflow-y: auto;
    /* ENABLE MAIN SCROLL HERE */
    padding: 20px 0;
}

.modal-content {
    background-color: #0f172a;
    /* Solid deep navy */
    margin: 2% auto;
    /* Lower margin */
    padding: 0;
    /* Remove padding here to allow header/body separation */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    width: 95%;
    max-width: 1200px;
    /* Wider for full visibility */
    overflow: visible;
    /* DISABLE NESTED SCROLL */
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(99, 102, 241, 0.2);
    position: relative;
}

/* Custom Thin Scrollbar for a premium feel */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.close-modal {
    position: absolute;
    right: 24px;
    top: 24px;
    color: var(--gray-400);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    z-index: 9999 !important;
}

.close-modal:hover {
    color: var(--white);
}

.modal h2 {
    font-size: 24px;
    margin-bottom: 24px;
    color: var(--white);
    border-bottom: 1px solid var(--gray-700);
    padding-bottom: 16px;
}

.modal-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.stat-item {
    background: var(--gray-700);
    padding: 16px;
    border-radius: 8px;
    text-align: center;
}

.stat-item .label {
    font-size: 12px;
    color: var(--gray-400);
    margin-bottom: 4px;
}

.stat-item .value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.modal h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--gray-300);
}

/* Table */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--gray-700);
}

.data-table th {
    color: var(--gray-400);
    font-weight: 500;
}

.data-table td {
    color: var(--gray-200);
}

.data-table tbody tr:hover {
    background: var(--gray-700);
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--gray-700);
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .analytics-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .date-inputs {
        flex-direction: column;
    }

    .modal-stats {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   EXECUTIVE DASHBOARD V2 (PREMIUM & VIBRANT)
   ============================================ */

#sessionDetailModal .modal-content {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(99, 102, 241, 0.1);
    width: 95vw !important;
    height: 95vh !important;
    max-width: 1400px !important;
    margin: 2.5vh auto !important;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
}

.executive-header-v2 {
    background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
    padding: 30px 40px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.executive-header-v2::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    z-index: 0;
}

.kpi-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.kpi-card-v2 {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.kpi-card-v2:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.kpi-card-v2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-color, #6366f1);
    opacity: 0.5;
}

.kpi-value-v2 {
    display: block;
    font-size: 2.2em;
    font-weight: 800;
    color: var(--white);
    margin-top: 5px;
    letter-spacing: -1px;
}

.kpi-label-v2 {
    font-size: 0.8em;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.v2-funnel-step {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.v2-funnel-step:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: scale(1.02);
}

.v2-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
}

/* ============================================
   GROWTH INDICATORS (STRIPE STYLE)
   ============================================ */

.growth-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 700;
    margin-left: 10px;
    vertical-align: middle;
}

.growth-up {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.growth-down {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.stat-label-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* PHASE 6: INTELLIGENCE HUB & CUBES */
.intel-cube-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.intel-cube {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 18px;
    border-radius: 12px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 110px;
    position: relative;
    overflow: hidden;
}

.intel-cube:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.5);
}

.intel-cube::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--cube-accent, #6366f1);
    opacity: 0.6;
}

.intel-cube-label {
    font-size: 0.65em;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: 1.2px;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.intel-cube-value {
    font-size: 1.8em;
    font-weight: 800;
    color: #f8fafc;
    line-height: 1;
    margin-bottom: 6px;
}

.intel-cube-sub {
    font-size: 0.75em;
    color: #64748b;
    margin-top: auto;
}

#sdSemaforoBar div {
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   9-PILLAR ANALYTICS SYSTEM STYLES
   ============================================ */

.glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.glass:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--gray-400) !important;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
}

.tab-btn.active {
    background: rgba(162, 155, 254, 0.1);
    color: var(--primary) !important;
    text-shadow: 0 0 10px var(--accent-glow);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ranking-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.ranking-item .name {
    font-weight: 600;
    color: var(--gray-200);
}

.ranking-item .value {
    color: var(--primary);
    font-family: monospace;
}

.ai-box {
    position: relative;
    overflow: hidden;
}

.ai-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, var(--primary), transparent 30%);
    animation: rotate 4s linear infinite;
    opacity: 0.2;
    z-index: 0;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.ai-box>* {
    position: relative;
    z-index: 1;
}

.traffic-light-summary {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.traffic-light-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
}

.traffic-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
}

.dot-super-active {
    background: #00d2d3;
    box-shadow: 0 0 10px #00d2d3;
}

.dot-active {
    background: #a29bfe;
    box-shadow: 0 0 10px #a29bfe;
}

.dot-slow {
    background: #feca57;
    box-shadow: 0 0 10px #feca57;
}

.dot-dead {
    background: #ff6b6b;
    box-shadow: 0 0 10px #ff6b6b;
}

/* ============================================
   9-PILLAR ANALYTICS DASHBOARD
   ============================================ */

/* KPI Cards Grid */
.analytics-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.akpi-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: transform 0.2s, border-color 0.2s;
}

.akpi-card:hover {
    transform: translateY(-2px);
    border-color: rgba(162, 155, 254, 0.2);
}

.akpi-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em;
    flex-shrink: 0;
}

.akpi-label {
    font-size: 0.72em;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 2px;
}

.akpi-value {
    font-size: 1.5em;
    font-weight: 700;
    color: white;
    line-height: 1.1;
}

.akpi-sub {
    font-size: 0.72em;
    color: #64748b;
    margin-top: 2px;
}

/* AI Interpretation Card */
.interp-card {
    background: linear-gradient(135deg, rgba(162, 155, 254, 0.05), rgba(99, 102, 241, 0.05));
    border: 1px solid rgba(162, 155, 254, 0.15);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.interp-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.interp-header h3 {
    margin: 0;
    font-size: 1.1em;
    color: white;
    flex: 1;
}

.interp-rating {
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1.1em;
    letter-spacing: 1px;
}

.interp-summary {
    font-size: 0.9em;
    color: #cbd5e1;
    line-height: 1.7;
    margin-bottom: 12px;
}

.interp-tips {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 16px 20px;
    margin-top: 12px;
}

.interp-tips h4 {
    margin: 0 0 10px 0;
    font-size: 0.9em;
    color: #a29bfe;
}

.interp-tips ul {
    margin: 0;
    padding-left: 20px;
    font-size: 0.85em;
    color: #94a3b8;
    line-height: 1.8;
}

/* Tabs */
.analytics-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.analytics-tab-btn {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #64748b;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
}

.analytics-tab-btn:hover {
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.03);
}

.analytics-tab-btn.active {
    background: rgba(162, 155, 254, 0.12);
    color: #a29bfe;
    box-shadow: 0 2px 8px rgba(162, 155, 254, 0.1);
}

.analytics-tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.analytics-tab-pane.active {
    display: block;
}

/* Chart Cards Grid */
.analytics-charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.achart-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.achart-card:hover {
    border-color: rgba(162, 155, 254, 0.15);
}

.achart-title {
    margin: 0;
    padding: 14px 18px;
    font-size: 0.85em;
    font-weight: 600;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.01);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.achart-body {
    padding: 16px;
    position: relative;
}

/* Heatmap Grid */
.heatmap-grid {
    display: grid;
    grid-template-columns: 40px repeat(24, 1fr);
    gap: 2px;
    padding: 4px;
}

.hm-corner {
    min-width: 40px;
}

.hm-hour-label {
    font-size: 0.6em;
    color: #64748b;
    text-align: center;
    padding: 2px;
}

.hm-day-label {
    font-size: 0.7em;
    color: #94a3b8;
    display: flex;
    align-items: center;
    padding-right: 6px;
    font-weight: 600;
}

.hm-cell {
    aspect-ratio: 1;
    border-radius: 3px;
    min-width: 8px;
    cursor: default;
    transition: transform 0.15s;
}

.hm-cell:hover {
    transform: scale(1.3);
    z-index: 1;
}

/* Performance Summary Grid */
.perf-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.perf-stat {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 14px 16px;
    text-align: center;
}

.perf-label {
    display: block;
    font-size: 0.7em;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.perf-value {
    display: block;
    font-size: 1.2em;
    font-weight: 700;
    color: white;
}

/* Timeline Items */
.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}

.timeline-time {
    font-size: 0.75em;
    color: #64748b;
    font-weight: 600;
}

.timeline-detail {
    font-size: 0.85em;
    color: #94a3b8;
    line-height: 1.4;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .analytics-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .analytics-charts-grid {
        grid-template-columns: 1fr;
    }

    .analytics-tabs {
        flex-wrap: wrap;
    }

    .perf-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Platform Badges */
.platform-badge {
    font-size: 0.7em;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: bold;
    color: white;
    display: inline-block;
}

.platform-badge.cb,
.platform-badge.chaturbate {
    background: var(--cb-blue);
}

.platform-badge.sc,
.platform-badge.stripchat {
    background: var(--sc-red);
}

.platform-badge.unknown {
    background: var(--gray-500);
}

/* --- Phase 7.5: Glassmorphism Premium Dashboard Styling --- */
.glass-panel {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.glass-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.8));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(139, 92, 246, 0.3); /* Subtle purple glow on hover */
}

/* Custom Scrollbar for the Live Feed */
.custom-scroll::-webkit-scrollbar {
    width: 6px;
}
.custom-scroll::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}
.custom-scroll::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 4px;
}
.custom-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.6);
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 200%; }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.model-card-premium:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    transform: translateX(5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}@keyframes epicPulse { 0% { transform: scale(1); box-shadow: 0 0 5px rgba(168, 85, 247, 0.2); } 50% { transform: scale(1.02); box-shadow: 0 0 20px rgba(168, 85, 247, 0.5); } 100% { transform: scale(1); box-shadow: 0 0 5px rgba(168, 85, 247, 0.2); } } .analytics-grid { grid-template-columns: repeat(3, 1fr) !important; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }

/* --- Tips Carousel Styles (Rework Visual) --- */
.tips-carousel-container {
    margin-top: 10px;
    padding: 22px 28px 36px 28px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.7), rgba(30, 41, 59, 0.5));
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    min-height: 130px;
    display: flex;
    align-items: center;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255,255,255,0.05);
    transition: box-shadow 0.3s ease;
}

.tips-carousel-container:hover {
    box-shadow: 0 6px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255,255,255,0.05);
}

/* Subtle animated shimmer on the top border */
.tips-carousel-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.4), transparent);
    animation: carouselShimmer 4s ease-in-out infinite;
}

@keyframes carouselShimmer {
    0%   { left: -60%; }
    100% { left: 160%; }
}

.tip-slide {
    display: none;
    width: 100%;
    animation: tipFadeSlide 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.tip-slide.active {
    display: flex;
    align-items: center;
    gap: 22px;
}

@keyframes tipFadeSlide {
    0%   { opacity: 0; transform: translateY(10px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.tip-icon-wrapper {
    width: 64px;
    height: 64px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2em;
    flex-shrink: 0;
    border: 1px solid rgba(139, 92, 246, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tips-carousel-container:hover .tip-icon-wrapper {
    transform: scale(1.05);
}

.tip-content-wrapper h4 {
    margin: 0 0 6px 0;
    color: #e2e8f0;
    font-size: 0.95em;
    font-weight: 700;
}

.tip-content-wrapper p {
    margin: 0;
    color: #94a3b8;
    font-size: 0.88em;
    line-height: 1.65;
    max-width: 800px;
}

.carousel-dots {
    position: absolute;
    bottom: 13px;
    right: auto;
    left: 28px;
    display: flex;
    gap: 5px;
}

.carousel-dot {
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: default;
}

.carousel-dot.active {
    width: 18px;
    border-radius: 3px;
}

