.project-timeline-frontend {
    --timeline-primary: var(--global-palette1, #2563eb);
    --timeline-secondary: var(--global-palette4, #3b82f6);
    --timeline-success: var(--global-palette5, #10b981);
    --timeline-warning: var(--global-palette6, #f59e0b);
    --timeline-danger: var(--global-palette7, #ef4444);
    --timeline-info: #06b6d4;
    --timeline-bg: var(--global-palette9, #f8fafc);
    --timeline-border: var(--global-palette3, #e2e8f0);
    --timeline-not-contracted: #94a3b8;

    max-width: 100%;
    margin: 2rem auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Timeline Header */
.timeline-header {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.date-item {
    font-size: 0.95rem;
    color: #fff;
}

.date-item strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
}

.date-item span {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Phase Styling */
.phase {
    margin-bottom: 4rem;
}

.phase-title {
    color: var(--timeline-primary);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

/* Step Styling */
.step {
    margin-bottom: 2.5rem;
}

.step-title {
    color: #475569;
    font-size: 1.125rem;
    margin-bottom: 1.25rem;
    font-weight: 600;
    padding-left: 1rem;
    border-left: 3px solid var(--timeline-border);
}

.step-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Timeline Items */
.timeline-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    padding: 1.25rem;
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--timeline-border);
    transition: all 0.2s ease;
    position: relative;
}

.timeline-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: var(--timeline-secondary);
    transform: translateX(4px);
}

.item-marker {
    display: flex;
    align-items: flex-start;
    padding-top: 2px;
}

.item-marker input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: not-allowed;
    accent-color: var(--timeline-success);
    border-radius: 4px;
}

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

/* Item Heading (CLIENT/WDW) */
.item-heading {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--timeline-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

/* Item Title */
.item-title {
    display: inline-block;
    font-weight: 600;
    font-size: 1rem;
    color: var(--timeline-primary);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    line-height: 1;
    margin-left: 0.5rem;
}

.status-not-contracted .status-badge {
    background: #f1f5f9;
    color: var(--timeline-not-contracted);
    border: 1px solid #cbd5e1;
}

.status-not-started .status-badge {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #cbd5e1;
}

.status-scheduled .status-badge {
    background: #e0e7ff;
    color: #4338ca;
    border: 1px solid #a5b4fc;
}

.status-in-progress .status-badge {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde047;
}

.status-in-review .status-badge {
    background: #cffafe;
    color: #164e63;
    border: 1px solid var(--timeline-info);
}

.status-waiting-review .status-badge {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid var(--timeline-danger);
}

.status-completed .status-badge {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid var(--timeline-success);
}

/* Item Dates */
.item-dates {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: #64748b;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.date-est,
.date-actual {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.date-est::before {
    content: "📅";
    font-size: 0.875em;
}

.date-actual::before {
    content: "✓";
    font-size: 0.875em;
    color: var(--timeline-success);
}

/* Item Link Button */
.item-link-button {
    margin-top: 0.75rem;
}

/* Hidden timeline message */
.project-timeline-hidden {
    padding: 3rem 2rem;
    text-align: center;
    background: var(--timeline-bg);
    border-radius: 12px;
    border: 2px dashed var(--timeline-border);
}

.project-timeline-hidden p {
    color: #64748b;
    font-size: 1.125rem;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .timeline-header {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1.5rem;
    }

    .phase-title {
        font-size: 1.5rem;
    }

    .step-title {
        font-size: 1rem;
    }

    .timeline-item {
        grid-template-columns: auto 1fr;
        padding: 1rem;
    }

    .timeline-item:hover {
        transform: none;
    }

    .item-dates {
        flex-direction: column;
        gap: 0.5rem;
    }
}