/**
 * CEO Dashboard Styles
 * Premium executive dashboard styling
 */

/* CEO Dashboard Container */
.ceo-dashboard {
    padding: 0;
    max-width: 100%;
    margin: 0;
}

/* View Toggle */
.ceo-view-toggle {
    display: flex;
    gap: 8px;
    padding: 0 24px 24px;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 24px;
}

.ceo-view-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid var(--gray-200);
    background: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s;
}

.ceo-view-btn:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

.ceo-view-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.ceo-view-btn i {
    font-size: 16px;
}

.ceo-content-wrapper {
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.ceo-fade-in {
    animation: ceoFadeIn 0.3s ease-out;
}

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

/* CEO Content */
.ceo-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CEO Sections */
.ceo-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.ceo-section h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ceo-section h2 i {
    color: var(--primary);
    font-size: 18px;
}

/* CEO Cards Grid */
.ceo-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.ceo-cards-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 1200px) {
    .ceo-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ceo-cards-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .ceo-cards {
        grid-template-columns: 1fr;
    }
}

.ceo-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--gray-200);
}

.ceo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.ceo-card.large {
    flex-direction: column;
    text-align: center;
    padding: 30px 20px;
}

.ceo-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
}

.ceo-card-icon.blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.ceo-card-icon.green {
    background: linear-gradient(135deg, #10b981, #059669);
}

.ceo-card-icon.purple {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.ceo-card-icon.orange {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.ceo-card-icon.teal {
    background: linear-gradient(135deg, #14b8a6, #0d9488);
}

.ceo-card-icon.pink {
    background: linear-gradient(135deg, #ec4899, #db2777);
}

.ceo-card-icon.gold {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.ceo-card-content {
    flex: 1;
}

.ceo-card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
}

.ceo-card-value.large {
    font-size: 36px;
    margin-bottom: 8px;
}

.ceo-card-label {
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 500;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ceo-card-sub {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 4px;
}

/* Pipeline Stages */
.ceo-pipeline-stages {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Pipeline Summary Bars */
.ceo-pipeline-summary {
    padding: 8px 0;
}

.ceo-pipeline-bars {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ceo-pipeline-bar-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ceo-pipeline-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ceo-pipeline-bar-label {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 14px;
}

.ceo-pipeline-bar-count {
    font-size: 14px;
    color: var(--gray-500);
    font-weight: 500;
}

.ceo-pipeline-bar-track {
    height: 12px;
    background: var(--gray-100);
    border-radius: 6px;
    overflow: hidden;
}

.ceo-pipeline-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.5s ease;
    min-width: 4px;
}

.ceo-pipeline-total {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
    text-align: center;
    color: var(--gray-500);
    font-size: 14px;
}

.ceo-pipeline-total strong {
    color: var(--gray-900);
    font-size: 18px;
}

/* Recent Activity */
.ceo-recent-activity {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ceo-recent-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--gray-50);
    border-radius: 10px;
    transition: background 0.2s, transform 0.2s;
}

.ceo-recent-item:hover {
    background: var(--gray-100);
    transform: translateX(4px);
}

.ceo-recent-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
}

.ceo-recent-icon.blue { background: #3b82f6; }
.ceo-recent-icon.green { background: #10b981; }
.ceo-recent-icon.purple { background: #8b5cf6; }
.ceo-recent-icon.gold { background: #fbbf24; color: #92400e; }
.ceo-recent-icon.teal { background: #14b8a6; }
.ceo-recent-icon.pink { background: #ec4899; }
.ceo-recent-icon.gray { background: var(--gray-400); }

.ceo-recent-content {
    flex: 1;
}

.ceo-recent-text {
    font-size: 14px;
    color: var(--gray-800);
    font-weight: 500;
}

.ceo-recent-time {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 2px;
}

.ceo-stage-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--gray-50);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.ceo-stage-bar::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--stage-color, var(--gray-400));
}

.ceo-stage-label {
    font-weight: 600;
    color: var(--gray-700);
    min-width: 120px;
}

.ceo-stage-count {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
    margin-left: auto;
}

.ceo-stage-bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: var(--stage-color, var(--gray-400));
    opacity: 0.1;
    transition: width 0.5s ease;
}

/* Activity Section */
.ceo-activity-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Activity Filters */
.ceo-filters {
    display: flex;
    gap: 20px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--gray-200);
    align-items: flex-end;
    flex-wrap: wrap;
}

.ceo-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ceo-filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ceo-filter-group select {
    padding: 10px 36px 10px 14px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    background: white;
    font-size: 14px;
    color: var(--gray-700);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    min-width: 140px;
}

.ceo-filter-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.ceo-export-btn {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.2s;
}

.ceo-export-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Activity List */
.ceo-activity-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-height: 600px;
    overflow-y: auto;
}

.ceo-activity-day {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ceo-activity-date-header {
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 12px;
    background: var(--gray-100);
    border-radius: 6px;
    display: inline-block;
    width: fit-content;
}

.ceo-activity-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ceo-activity-item-detailed {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--gray-50);
    border-radius: 10px;
    transition: all 0.2s;
}

.ceo-activity-item-detailed:hover {
    background: var(--gray-100);
    transform: translateX(4px);
}

.ceo-activity-time-badge {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-400);
    min-width: 50px;
    padding-top: 4px;
}

.ceo-activity-meta {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.ceo-meta-item {
    font-size: 12px;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 4px;
}

.ceo-meta-item i {
    font-size: 10px;
}

.ceo-meta-comment {
    font-style: italic;
    color: var(--gray-600);
    background: var(--gray-100);
    padding: 4px 10px;
    border-radius: 4px;
}

/* Empty State for Activity */
.ceo-empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--gray-500);
}

.ceo-empty-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.ceo-empty-icon i {
    font-size: 40px;
    color: #3b82f6;
}

.ceo-empty-state p {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.ceo-empty-state span {
    font-size: 14px;
    display: block;
    margin-bottom: 20px;
}

.ceo-empty-hint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--gray-100);
    border-radius: 8px;
    font-size: 13px;
    color: var(--gray-600);
}

.ceo-empty-hint i {
    color: #f59e0b;
}

/* Empty States - Small */
.ceo-empty-pipeline,
.ceo-empty-recent {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-500);
}

.ceo-empty-icon-small {
    width: 64px;
    height: 64px;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.ceo-empty-icon-small i {
    font-size: 24px;
    color: var(--gray-400);
}

.ceo-empty-pipeline p,
.ceo-empty-recent p {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 4px;
}

.ceo-empty-pipeline span,
.ceo-empty-recent span {
    font-size: 13px;
}

/* Activity Log (Legacy) */
.ceo-activity-log {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ceo-activity-day {
    border-left: 2px solid var(--gray-200);
    padding-left: 20px;
    margin-left: 8px;
}

.ceo-activity-date {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 12px;
    margin-left: -28px;
    background: white;
    padding: 4px 12px;
    border-radius: 20px;
    border: 2px solid var(--gray-200);
    display: inline-block;
}

.ceo-activities {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ceo-activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--gray-50);
    border-radius: 10px;
    transition: background 0.2s;
}

.ceo-activity-item:hover {
    background: var(--gray-100);
}

.ceo-activity-time {
    font-size: 12px;
    color: var(--gray-400);
    min-width: 60px;
    font-weight: 500;
}

.ceo-activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
}

.ceo-activity-icon.blue {
    background: #3b82f6;
}

.ceo-activity-icon.green {
    background: #10b981;
}

.ceo-activity-icon.gold {
    background: #fbbf24;
    color: #92400e;
}

.ceo-activity-icon.purple {
    background: #8b5cf6;
}

.ceo-activity-icon.teal {
    background: #14b8a6;
}

.ceo-activity-icon.pink {
    background: #ec4899;
}

.ceo-activity-icon.gray {
    background: var(--gray-400);
}

.ceo-activity-content {
    flex: 1;
}

.ceo-activity-text {
    font-size: 14px;
    color: var(--gray-800);
    line-height: 1.5;
}

.ceo-activity-preview {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 4px;
    font-style: italic;
}

/* Chart */
.ceo-chart {
    padding: 20px 0;
}

.ceo-chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 200px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--gray-200);
}

.ceo-chart-bar-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.ceo-chart-bar {
    width: 100%;
    background: linear-gradient(to top, var(--primary), var(--primary-light));
    border-radius: 4px 4px 0 0;
    min-height: 4px;
    transition: height 0.5s ease;
}

.ceo-chart-label {
    font-size: 11px;
    color: var(--gray-500);
    margin-top: 8px;
}

.ceo-chart-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-800);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    margin-bottom: 8px;
}

.ceo-chart-bar-wrapper:hover .ceo-chart-tooltip {
    opacity: 1;
    visibility: visible;
}

.ceo-chart-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 20px;
}

.ceo-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gray-600);
}

.ceo-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.ceo-legend-dot.blue {
    background: #3b82f6;
}

.ceo-legend-dot.green {
    background: #10b981;
}

.ceo-legend-dot.purple {
    background: #8b5cf6;
}

.ceo-legend-dot.orange {
    background: #f59e0b;
}

/* Loading State */
.ceo-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: var(--gray-500);
    gap: 16px;
}

.ceo-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Empty State */
.ceo-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-500);
}

.ceo-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.ceo-empty p {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}

.ceo-empty span {
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .ceo-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .ceo-tabs {
        flex-wrap: wrap;
        justify-content: center;
    }

    .ceo-cards {
        grid-template-columns: 1fr;
    }

    .ceo-chart-bars {
        height: 150px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .ceo-section {
        background: var(--gray-800);
    }

    .ceo-card {
        background: linear-gradient(135deg, var(--gray-700) 0%, var(--gray-800) 100%);
        border-color: var(--gray-600);
    }

    .ceo-card-value,
    .ceo-section h2 {
        color: white;
    }

    .ceo-activity-item,
    .ceo-stage-bar {
        background: var(--gray-700);
    }

    .ceo-activity-text {
        color: var(--gray-200);
    }
}