/* Toast notification */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 20px;
    font-size: 13px;
    color: var(--text-primary);
    z-index: 1000;
    animation: toastIn 0.3s ease;
}

.toast.success {
    border-color: var(--success);
    background: rgba(34, 197, 94, 0.1);
}

.toast.error {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ═══════════════════════════════════════════════════════════════
   XP BANNER NOTIFICATION
   ═══════════════════════════════════════════════════════════════ */

.xp-banner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 0;
    animation: xpOverlayIn 0.3s ease;
}

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

.xp-banner {
    width: 100%;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 0;
    position: relative;
    animation: xpBannerSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

/* Subtle gradient accent line at the very top */
.xp-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-ekho);
}

@keyframes xpBannerSlide {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.xp-banner-inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 32px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.xp-banner-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(36, 59, 170, 0.15);
    border: 1px solid rgba(36, 59, 170, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    animation: xpIconPulse 2s ease infinite;
}

.xp-banner-icon svg {
    width: 22px;
    height: 22px;
    color: var(--accent-light);
}

@keyframes xpIconPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(36, 59, 170, 0.2); }
    50% { transform: scale(1.05); box-shadow: 0 0 12px 2px rgba(36, 59, 170, 0.15); }
}

.xp-banner-content {
    flex: 1;
    min-width: 0;
}

.xp-banner-points {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.xp-banner-points span {
    color: var(--accent-light);
}

.xp-banner-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.xp-banner-total {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.xp-banner-dismiss {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 8px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    font-family: var(--font-body);
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.xp-banner-dismiss:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-accent);
}

.xp-banner-dismiss svg {
    width: 14px;
    height: 14px;
}

@media (max-width: 768px) {
    .xp-banner-inner {
        padding: 16px 20px;
        gap: 12px;
    }
    .xp-banner-points {
        font-size: 17px;
    }
    .xp-banner-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }
    .xp-banner-icon svg {
        width: 18px;
        height: 18px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD VIEW
   ═══════════════════════════════════════════════════════════════ */

.dashboard-overview {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px;
    flex: 1;
    overflow-y: auto;
}

.dashboard-header {
    margin-bottom: 8px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.dashboard-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.dashboard-stat-card.accent {
    background: var(--accent-subtle);
    border-color: var(--border-accent);
}

.dashboard-stat-card .stat-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-elevated);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.dashboard-stat-card.accent .stat-icon {
    background: var(--accent);
    color: white;
}

.dashboard-stat-card .stat-details {
    display: flex;
    flex-direction: column;
}

.dashboard-stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.dashboard-stat-card .stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.dashboard-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
}

.dashboard-card .card-header-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.dashboard-card .card-header-row h4 {
    flex: 1;
}

.view-all-btn {
    background: transparent;
    border: none;
    color: var(--accent);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
}

.view-all-btn:hover {
    text-decoration: underline;
}

.recent-activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recent-activity-list .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

.recent-activity-list .empty-state span {
    font-size: 32px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--bg-elevated);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.activity-item:hover {
    background: var(--bg-card-hover);
}

.activity-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-subtle);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.activity-details {
    flex: 1;
}

.activity-details strong {
    display: block;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.activity-details small {
    font-size: 12px;
    color: var(--text-muted);
}

.activity-score {
    font-size: 14px;
    font-weight: 600;
    color: var(--ekho-orange);
}

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    text-align: left;
}

.quick-action-btn:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
}

.quick-action-btn .action-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-subtle);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.quick-action-btn .action-text {
    display: flex;
    flex-direction: column;
}

.quick-action-btn .action-text strong {
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.quick-action-btn .action-text small {
    font-size: 12px;
    color: var(--text-muted);
}

@media (max-width: 1000px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    .dashboard-stat-card {
        padding: 16px;
    }
    .dashboard-stat-card .stat-value {
        font-size: 24px;
    }
}

/* ==========================================
   SALES DASHBOARD SKILL METRICS
   ========================================== */

.sales-dashboard {
    background: #0a0a0a;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.sales-dashboard-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    text-align: center;
    margin-bottom: 24px;
}

/* Skill Progress Chart */
.skill-progress-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.skill-progress-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-align: center;
}

.skill-progress-chart {
    min-height: 340px;
    position: relative;
    background: var(--bg-elevated);
    border-radius: 8px;
    padding: 20px;
}

.skill-progress-chart canvas {
    width: 100% !important;
    height: 100% !important;
}

.chart-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    font-size: 14px;
}

.skill-chart-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.skill-time-toggle {
    display: flex;
    background: var(--bg-card);
    border-radius: 6px;
    padding: 2px;
    gap: 2px;
}

.skill-time-btn {
    padding: 4px 12px;
    border: none;
    border-radius: 4px;
    background: transparent;
    font-size: 11px;
    cursor: pointer;
    color: var(--text-muted);
    font-family: inherit;
    transition: all 0.2s;
}

.skill-time-btn:hover {
    color: var(--text-primary);
}

.skill-time-btn.active {
    background: var(--accent-primary, #00d4ff);
    color: #000;
    font-weight: 600;
}

.skill-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    justify-content: center;
    margin-top: 8px;
}

.skill-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--text-secondary);
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.2s;
}

.skill-legend-item.hidden {
    opacity: 0.35;
}

.skill-legend-dot {
    width: 10px;
    height: 3px;
    border-radius: 2px;
}

/* Skill Metric Cards Grid */
.skill-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.skill-metric-card {
    background: linear-gradient(135deg, #1a2d5a 0%, #162347 100%);
    border: 1px solid #243baa;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.skill-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(36, 59, 170, 0.25);
}

.skill-metric-name {
    font-size: 13px;
    font-weight: 500;
    color: #00d4ff;
    margin-bottom: 8px;
    text-transform: capitalize;
}

.skill-metric-value {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
}

.skill-metric-card.low .skill-metric-value {
    color: #ef4444; /* Red for scores 0-40% */
}

.skill-metric-card.medium .skill-metric-value {
    color: #f59e0b; /* Amber/yellow for scores 40-70% */
}

.skill-metric-card.high .skill-metric-value {
    color: #22c55e; /* Green for scores 70%+ */
}

/* Development Areas & Videos Section */
.dashboard-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.development-areas-card,
.suggested-videos-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.development-list {
    list-style: decimal;
    padding-left: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.development-list li {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.development-list.empty-state {
    list-style: none;
    padding: 0;
    text-align: center;
    color: var(--text-muted);
}

/* Video Placeholders */
.video-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.video-list .video-item.hidden-video {
    display: none;
}

.video-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    margin-top: 4px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.video-toggle-btn:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

/* Video library admin tagging styles */
.video-tag-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.video-tag-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-elevated);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.video-tag-row .vt-thumb {
    width: 60px;
    height: 38px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-card);
}

.video-tag-row .vt-info {
    flex: 1;
    min-width: 0;
}

.video-tag-row .vt-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-tag-row .vt-duration {
    font-size: 11px;
    color: var(--text-muted);
}

.video-tag-row .vt-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.skill-chip {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid var(--border);
    color: var(--text-muted);
    background: transparent;
    user-select: none;
}

.skill-chip.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.skill-chip:hover {
    border-color: var(--accent);
}

.video-tag-summary {
    font-size: 13px;
    color: var(--text-secondary);
}

.video-tag-summary .tag-stat {
    display: inline-block;
    margin-right: 12px;
    padding: 4px 10px;
    background: var(--bg-elevated);
    border-radius: 6px;
    font-size: 12px;
}

.video-tag-summary .tag-stat strong {
    color: var(--text-primary);
}

.video-tag-row .vt-summary-input {
    width: 100%;
    margin-top: 6px;
    padding: 6px 8px;
    font-size: 12px;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-card);
    color: var(--text-primary);
    resize: vertical;
    min-height: 36px;
    max-height: 80px;
}

.vt-summary-input:focus {
    outline: none;
    border-color: var(--accent);
}

.vt-summary-input::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

.vt-word-count {
    font-size: 10px;
    color: var(--text-muted);
    text-align: right;
    margin-top: 2px;
}

.vt-word-count.over-limit {
    color: #dc3545;
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE PROFILE CARD  (visible only ≤768px)
   ═══════════════════════════════════════════════════════════════ */

.mobile-profile-card {
    display: none;                        /* hidden on desktop */
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px 20px 20px;
}

.mpc-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--ekho-purple));
    border: 3px solid rgba(99, 102, 241, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.25);
    cursor: pointer;
    transition: all 0.3s ease;
}

.mpc-avatar:hover {
    border-color: rgba(99, 102, 241, 0.8);
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.35);
    transform: scale(1.04);
}

.mpc-avatar-initial {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    line-height: 1;
}

.mpc-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.mpc-avatar-img:not(.hidden) ~ .mpc-avatar-initial {
    display: none;
}

.mpc-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.mpc-name {
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
}

.mpc-role-badge {
    display: inline-block;
    padding: 2px 12px;
    background: var(--accent-subtle);
    border: 1px solid var(--accent);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-light);
    margin-bottom: 4px;
}

.mpc-detail {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--text-muted);
}

.mpc-detail svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Show the mobile card when sidebar avatar is hidden */
@media (max-width: 768px) {
    .mobile-profile-card {
        display: flex;
    }
}

