/* ============================================
   EDIT MODE - TIMELINE & COMPACT GRID
   ============================================ */

/* --- Timeline Circles (Original Style) --- */
.timeline-wrapper {
    position: relative;
    padding: 1rem 0;
    margin-bottom: 2rem;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.timeline-track {
    display: flex;
    align-items: flex-start;
    padding: 0 1rem;
    min-width: max-content;
}

.timeline-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 60px;
    /* Reduced slightly for compact fit */
    flex-shrink: 0;
    cursor: pointer;
    z-index: 10;
}

/* Connector Line */
.step-connector {
    position: absolute;
    top: 15px;
    /* Center with circle */
    left: -50%;
    width: 100%;
    height: 2px;
    background: #e2e8f0;
    z-index: -1;
}

.timeline-step:first-child .step-connector {
    display: none;
}

/* Circle */
.step-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Label */
.step-label {
    margin-top: 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    color: #94a3b8;
    text-align: center;
    line-height: 1.2;
    transition: all 0.3s ease;
}

/* --- STATES --- */

/* Active (Current) */
.timeline-step.active .step-circle {
    background: #6366f1;
    /* Brand */
    border-color: #6366f1;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.timeline-step.active .step-label {
    color: #6366f1;
    font-weight: 700;
}

.timeline-step.active .step-connector {
    background: #6366f1;
}

/* Completed */
.timeline-step.completed .step-circle {
    background: #10b981;
    /* Green */
    border-color: #10b981;
    color: white;
}

.timeline-step.completed .step-label {
    color: #10b981;
}

.timeline-step.completed .step-connector {
    background: #10b981;
}

/* Hover for Future/Default */
.timeline-step:not(.active):not(.completed):hover .step-circle {
    border-color: #94a3b8;
    color: #64748b;
    background: #f8fafc;
}


/* --- Compact Form Layout --- */

.edit-modal-content {
    background: #f8fafc;
    /* Very light slate bg */
}

/* Clean Header Section */
.compact-header {
    background: white;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Grid System */
.compact-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
    /* Tighter gap */
    padding: 1.5rem;
}

/* Sections - Minimalist grouping without heavy cards */
.compact-section {
    margin-bottom: 0.5rem;
}

.compact-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.compact-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

/* Field Styles - "Header -> Data" Vertical Flow */
.compact-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 0.75rem;
}

.compact-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.02em;
}

.compact-input {
    width: 100%;
    background: transparent;
    border: 1px solid transparent;
    /* Hide border by default */
    border-bottom: 1px solid #cbd5e1;
    /* Only bottom border for minimal look */
    border-radius: 4px;
    /* Slight rounded for hover state */
    padding: 4px 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1e293b;
    transition: all 0.2s;
}

.compact-input:hover {
    background: white;
    border-color: #cbd5e1;
}

.compact-input:focus {
    background: white;
    border-color: #6366f1;
    /* Brand color */
    outline: none;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.compact-input::placeholder {
    color: #cbd5e1;
    font-weight: 400;
}

/* Readonly fields styling - NEW ADDITION */
.compact-input[readonly] {
    background-color: rgba(255, 228, 230, 0.3);
    /* Rose-100 very transparent */
    border-bottom: 1px solid #fda4af;
    /* Rose-300 */
    color: #be123c;
    /* Rose-700 */
    font-weight: 600;
    cursor: not-allowed;
    border-radius: 4px;
}

.compact-input[readonly]:hover {
    background-color: rgba(255, 228, 230, 0.5);
    border-color: #fb7185;
    /* Rose-400 */
}

/* Financial Inputs - Monospace for numbers */
.compact-input-money {
    font-family: 'Roboto Mono', monospace;
    font-weight: 600;
}

/* Textareas */
.compact-textarea {
    resize: none;
    border: 1px solid #cbd5e1;
    /* Full border for textareas */
    background: white;
}

/* Layout Utilities */
.col-span-12 {
    grid-column: span 12;
}

.col-span-6 {
    grid-column: span 6;
}

.col-span-4 {
    grid-column: span 4;
}

.col-span-3 {
    grid-column: span 3;
}

/* Responsive */
@media (max-width: 768px) {
    .compact-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .col-span-12,
    .col-span-6,
    .col-span-4,
    .col-span-3 {
        grid-column: span 1;
    }

    .timeline-wrapper {
        margin: 0 -1rem 1rem -1rem;
        /* Flush with edges on mobile */
        padding: 0.5rem 1rem;
        background: white;
        border-bottom: 1px solid #e2e8f0;
    }
}