/* Dynamic specification editor */
.parameter-editor-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}

.parameter-editor-heading h2 { margin-bottom: 4px; }
.parameter-rows { display: grid; gap: 12px; margin-top: 14px; }
.parameter-empty {
    margin-top: 14px;
    padding: 18px;
    border: 1px dashed #475569;
    border-radius: 10px;
    color: var(--muted);
    text-align: center;
    background: #0b1220;
}
.parameter-empty[hidden] { display: none; }

.parameter-row {
    padding: 14px;
    border: 1px solid var(--border-soft);
    border-radius: 11px;
    background: #0b1220;
}

.parameter-row-proposed {
    border-color: #c56a16;
    background: #29180b;
    box-shadow: inset 3px 0 0 #f59e0b;
}

.parameter-row-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.parameter-identity { min-width: 0; flex: 1; }
.parameter-title { font-size: 16px; font-weight: 750; color: var(--text); }
.parameter-machine { margin-top: 3px; color: var(--muted); font-size: 12px; }
.parameter-display-input { font-weight: 750; }
.parameter-machine-input { margin-top: 7px; font-size: 12px; }

.parameter-badges {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    flex-wrap: wrap;
}

.parameter-proposed-badge,
.parameter-ai-badge,
.parameter-saved-badge {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.parameter-proposed-badge { background: #9a3412; color: #ffedd5; }
.parameter-ai-badge { background: #1e3a8a; color: #dbeafe; }
.parameter-saved-badge { background: #14532d; color: #dcfce7; }

.parameter-remove {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    border: 1px solid #c2410c;
    border-radius: 8px;
    background: #7c2d12;
    color: #fff7ed;
    font-size: 21px;
    line-height: 1;
    cursor: pointer;
}
.parameter-remove:hover { background: #9a3412; }

.parameter-controls {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) minmax(130px, 0.8fr) minmax(150px, 0.9fr) minmax(170px, 1fr);
    gap: 10px;
    align-items: end;
}

.parameter-row:not(.parameter-row-proposed) .parameter-controls {
    grid-template-columns: minmax(240px, 2fr) minmax(150px, 0.9fr) minmax(170px, 1fr);
}

.parameter-control { min-width: 0; }
.parameter-control > label {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.parameter-value-field { position: relative; }
.parameter-unit {
    display: inline-block;
    margin-top: 5px;
    color: var(--muted-2);
    font-size: 12px;
}
.parameter-readonly-meta > div {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 10px 11px;
    border: 1px solid var(--border-soft);
    border-radius: 9px;
    color: var(--muted-2);
    background: #111827;
}

.parameter-reason {
    margin-top: 10px;
    color: #fed7aa;
    font-size: 12px;
    line-height: 1.45;
}
.parameter-row:not(.parameter-row-proposed) .parameter-reason { color: var(--muted); }

input[type="date"] {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #475569;
    border-radius: 9px;
    background: #0b1220;
    color: var(--text);
    outline: none;
    color-scheme: dark;
}

@media (max-width: 980px) {
    .parameter-controls,
    .parameter-row:not(.parameter-row-proposed) .parameter-controls {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .parameter-editor-heading,
    .parameter-row-top {
        flex-direction: column;
        align-items: stretch;
    }

    .parameter-badges { justify-content: flex-start; }
    .parameter-controls,
    .parameter-row:not(.parameter-row-proposed) .parameter-controls {
        grid-template-columns: 1fr;
    }
}

