/* Dashboard Styles - Premium Neon/Glassmorphism Theme */
:root {
    --glass-bg: rgba(16, 20, 28, 0.95);
    --card-bg: rgba(30, 41, 59, 0.4);
    --border-color: rgba(255, 255, 255, 0.1);
    --neon-gold: #d4af37;
    --neon-blue: #3b82f6;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;

    /* Status Colors */
    --status-created: #3B82F6;
    --status-docs: #8B5CF6;
    --status-analysis: #F59E0B;
    --status-client: #EF4444;
    --status-pending: #EC4899;
    --status-approved: #10B981;
    --status-active: #059669;
    --status-rejected: #DC2626;
}

.dashboard-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    overflow-y: auto;
    backdrop-filter: blur(8px);
}

.dashboard-modal.active {
    display: block;
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.dashboard-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
}

/* Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.dashboard-header h2 {
    color: var(--neon-gold);
    font-size: 2.2rem;
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

.last-update {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.dash-select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
}

.dash-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.dash-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--neon-gold);
    border-color: var(--neon-gold);
}

/* Big Numbers Grid */
.big-numbers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.big-number-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s;
    backdrop-filter: blur(10px);
}

.big-number-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--neon-gold), transparent);
    opacity: 0.5;
}

.big-number-card:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.big-number-title {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.big-number-value {
    color: #fff;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.big-number-trend {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.trend-up {
    color: #10B981;
}

.trend-down {
    color: #EF4444;
}

.trend-neutral {
    color: var(--text-secondary);
}

/* Dashboard Layout */
.dashboard-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.dashboard-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(5px);
}

.half-width {
    flex: 1;
    min-width: 400px;
}

.full-width {
    flex: 100%;
    width: 100%;
}

.dashboard-card h3 {
    color: var(--text-primary);
    margin: 0 0 1.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.dashboard-card h3::before {
    content: '';
    display: block;
    width: 4px;
    height: 1.2rem;
    background: var(--neon-gold);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--neon-gold);
}

/* Charts */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Bottlenecks */
.bottlenecks-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bottleneck-item {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bottleneck-info h4 {
    margin: 0 0 0.2rem 0;
    color: #EF4444;
    font-size: 1rem;
}

.bottleneck-info p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.bottleneck-time {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

/* Tables */
.table-responsive-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.dashboard-table th {
    text-align: left;
    padding: 1rem;
    color: var(--text-secondary);
    font-weight: 600;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.dashboard-table td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

.dashboard-table tr:hover td {
    background: rgba(255, 255, 255, 0.05);
}

.dash-search {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    width: 250px;
}

/* Timeline Modal */
.timeline-modal-content {
    background: #0f172a;
    /* Solid dark background */
    width: 90%;
    max-width: 800px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 2rem;
    border: 1px solid var(--neon-gold);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    border-radius: 12px;
    margin: 5vh auto;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.timeline-vertical {
    position: relative;
    padding-left: 2rem;
}

.timeline-vertical::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-marker {
    position: absolute;
    left: -2.4rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 2px solid var(--neon-gold);
    z-index: 1;
}

.timeline-content {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.timeline-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
}

.timeline-detail {
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* Badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.created {
    background: rgba(59, 130, 246, 0.2);
    color: #60A5FA;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.status-badge.docs {
    background: rgba(139, 92, 246, 0.2);
    color: #A78BFA;
    border: 1px solid rgba(139, 92, 246, 0.4);
}

.status-badge.analysis {
    background: rgba(245, 158, 11, 0.2);
    color: #FBBF24;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.status-badge.approved {
    background: rgba(16, 185, 129, 0.2);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.status-badge.rejected {
    background: rgba(220, 38, 38, 0.2);
    color: #F87171;
    border: 1px solid rgba(220, 38, 38, 0.4);
}

/* Responsive */
@media (max-width: 1024px) {
    .dashboard-row {
        flex-direction: column;
    }

    .half-width {
        min-width: 100%;
    }
}

@media (max-width: 768px) {
    .big-numbers-grid {
        grid-template-columns: 1fr 1fr;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .card-header-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .dash-search {
        width: 100%;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
    z-index: 10;
}

.close-modal:hover {
    color: var(--neon-gold);
}