/* management production report ("Resoconto produzione"): layout only, controls are Telerik components */

.pr-page h2 {
    margin-bottom: 0.75rem;
}

.pr-filters,
.pr-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem 1rem;
    margin-bottom: 0.75rem;
}

.pr-filter {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pr-filter label {
    font-size: 0.8rem;
    color: #5f6b7a;
}

.pr-filter--grow {
    flex: 1 1 320px;
    min-width: 260px;
}

.pr-filter--button {
    justify-content: flex-end;
}

.pr-tabs {
    margin-top: 0.5rem;
}

.pr-muted {
    color: #6c757d;
}

.pr-small {
    font-size: 0.8rem;
}

.pr-clickable {
    cursor: pointer;
}

.pr-warning-text {
    color: #b35c00;
}

.pr-section-title {
    margin: 1.25rem 0 0.5rem;
    font-size: 1.1rem;
}

.pr-subtitle {
    margin: 0.75rem 0 0.35rem;
    font-size: 0.95rem;
}

.pr-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 0.75rem;
    margin: 0.5rem 0 0.75rem;
}

.pr-order-card--selected {
    outline: 2px solid #1c7ed6;
}

.pr-order-number {
    font-weight: 600;
}

.pr-order-description {
    margin-bottom: 0.4rem;
}

.pr-chip-row,
.pr-semaphores,
.pr-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.35rem 0;
    align-items: center;
}

.pr-facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.15rem 0.75rem;
    margin: 0.35rem 0;
}

.pr-facts dt {
    font-weight: normal;
    color: #5f6b7a;
}

.pr-facts dd {
    margin: 0;
}

.pr-facts--wide {
    grid-template-columns: minmax(160px, max-content) 1fr;
}

.pr-kpi {
    display: grid;
    grid-template-columns: 1fr max-content;
    gap: 0.2rem 0.75rem;
    margin: 0 0 0.5rem;
}

.pr-kpi dt {
    font-weight: normal;
    color: #5f6b7a;
}

.pr-kpi dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
}

.pr-tiles {
    margin: 0.5rem 0 1rem;
}

.pr-big-number {
    font-size: 1.4rem;
    font-weight: 600;
}

.pr-reasons,
.pr-notes,
.pr-issues {
    margin: 0.35rem 0 0.5rem;
    padding-left: 1.2rem;
}

.pr-issues li {
    color: #b35c00;
}

.pr-note {
    white-space: pre-wrap;
    word-break: break-word;
    background: #f8f9fa;
    border-left: 3px solid #ced4da;
    padding: 0.25rem 0.5rem;
    margin: 0.25rem 0;
    font-size: 0.85rem;
}

.pr-panel-header {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.pr-panel-content {
    padding: 0.5rem 1rem 0.75rem;
}

.pr-search-item {
    line-height: 1.25;
    padding: 0.15rem 0;
}

.pr-compare-orders {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 0.75rem;
}

.pr-compare-tag {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.pr-paths {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0.5rem 0;
}

.pr-anomaly-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pr-anomaly__head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    margin-bottom: 0.25rem;
}

.pr-anomaly--red {
    border-left: 4px solid #e03131;
}

.pr-anomaly--yellow {
    border-left: 4px solid #f59f00;
}

.pr-chart-caption {
    margin-bottom: 0.5rem;
}

/* execution timeline (custom: no Telerik control covers it) */

.pr-statebar {
    display: flex;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    margin: 0.35rem 0 0.6rem;
    background: #e9ecef;
}

.pr-statebar__segment {
    display: block;
    height: 100%;
}

.pr-timeline {
    list-style: none;
    margin: 0;
    padding: 0 0 0 0.25rem;
    border-left: 2px solid #dee2e6;
}

.pr-timeline__item {
    position: relative;
    padding: 0 0 0.6rem 1rem;
}

.pr-timeline__dot {
    position: absolute;
    left: -7px;
    top: 0.3rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #adb5bd;
    border: 2px solid #fff;
}

.pr-timeline--compact .pr-timeline__item {
    padding-bottom: 0.35rem;
}

.pr-state-label {
    display: inline-block;
    padding: 0 0.4rem;
    border-radius: 0.6rem;
    font-size: 0.8rem;
    color: #fff;
    background: #868e96;
    margin: 0 0.25rem;
}

.pr-state--active .pr-timeline__dot,
.pr-statebar__segment.pr-state--active,
.pr-state-label.pr-state--active {
    background: #2f9e44;
}

.pr-state--pause .pr-timeline__dot,
.pr-statebar__segment.pr-state--pause,
.pr-state-label.pr-state--pause {
    background: #1c7ed6;
}

.pr-state--downtime .pr-timeline__dot,
.pr-statebar__segment.pr-state--downtime,
.pr-state-label.pr-state--downtime {
    background: #e8590c;
}

.pr-state--end .pr-timeline__dot,
.pr-state-label.pr-state--end {
    background: #495057;
}

.pr-state--undefined .pr-timeline__dot,
.pr-statebar__segment.pr-state--undefined {
    background: #adb5bd;
}

@media (max-width: 768px) {
    .pr-facts,
    .pr-facts--wide {
        grid-template-columns: 1fr;
    }

    .pr-card-grid {
        grid-template-columns: 1fr;
    }
}
