/* Plán zakázek: náhled štítku v dialogu tisku (poměr 190 : 138 mm jako PDF, černobílý papír i v tmavém režimu). */

.order-label-preview {
    aspect-ratio: 190 / 138;
    width: 100%;
    max-width: 520px;
    padding: 10px;
    border: 1px solid #8a8a8a;
    border-radius: var(--ss-radius-xs, 6px);
    background: #fff;
    color: #000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-size: 11px;
}

.order-label-preview__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding-bottom: 4px;
    border-bottom: 1.5px solid #000;
}

.order-label-preview__customer {
    font-size: 15px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-label-preview__company {
    font-weight: 700;
    white-space: nowrap;
}

.order-label-preview__title {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 6px;
}

.order-label-preview__caption,
.order-label-preview__field > span {
    flex: 0 0 64px;
    color: #5a5a5a;
    font-weight: 600;
    font-size: 9px;
}

.order-label-preview__number {
    font-size: 19px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-label-preview__name {
    margin-left: 72px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-label-preview__body {
    flex: 1;
    display: flex;
    gap: 10px;
    min-height: 0;
    margin-top: 6px;
}

.order-label-preview__fields {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.order-label-preview__field {
    display: flex;
    gap: 8px;
    align-items: baseline;
}

.order-label-preview__field > b {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-label-preview__quantity {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 3px 6px;
    border: 1px solid #000;
    background: #ebebeb;
}

.order-label-preview__quantity > b {
    font-size: 20px;
}

.order-label-preview__counter {
    margin-top: auto;
    align-self: flex-end;
    font-size: 17px;
    font-weight: 700;
}

.order-label-preview__image {
    flex: 1;
    min-width: 0;
    max-height: 100%;
    object-fit: contain;
    border: 1px solid #d7e4e9;
    border-radius: var(--ss-radius-xs, 8px);
    padding: 4px;
}

/* Problémové operace: záhlaví pracoviště rozbaluje / sbaluje tabulku. */
.problem-workplace-head {
    width: 100%;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.problem-workplace-head:hover {
    background: var(--mud-palette-action-default-hover);
}

/* Kalendář výroby: měsíc den po dni (řádek závodu + pracoviště), první sloupec drží při vodorovném posunu. */
.pc-month-scroll { overflow-x: auto; border: 1px solid var(--mud-palette-lines-default); border-radius: var(--mud-default-borderradius); }
.pc-month { border-collapse: collapse; font-size: 0.75rem; font-variant-numeric: tabular-nums; width: 100%; }
.pc-month th, .pc-month td { padding: 4px 3px; text-align: center; border-bottom: 1px solid var(--mud-palette-lines-default); min-width: 30px; white-space: nowrap; }
.pc-month th { font-weight: 500; color: var(--mud-palette-text-secondary); background: var(--mud-palette-surface); }
.pc-month th small { display: block; font-size: 0.65rem; }
.pc-month .pc-month__name { position: sticky; left: 0; z-index: 1; text-align: left; min-width: 160px; padding-left: 8px; background: var(--mud-palette-surface); }
.pc-month .pc-month__total { text-align: right; padding-right: 8px; min-width: 80px; }
.pc-month__plant td { font-weight: 600; border-bottom-width: 2px; }
.pc-month__weekend { background: var(--mud-palette-background-gray) !important; }
.pc-month__today { color: var(--mud-palette-primary) !important; font-weight: 700 !important; }
.pc-cell--pattern { background: color-mix(in srgb, var(--mud-palette-success) 10%, transparent); }
.pc-cell--closed { color: var(--mud-palette-text-disabled); background: var(--mud-palette-background-gray); }
.pc-cell--holiday { color: var(--mud-palette-error); background: color-mix(in srgb, var(--mud-palette-error) 8%, transparent); }
.pc-cell--plant { box-shadow: inset 0 -3px 0 var(--mud-palette-warning); background: color-mix(in srgb, var(--mud-palette-warning) 14%, transparent); }
.pc-cell--own { box-shadow: inset 0 -3px 0 var(--mud-palette-info); background: color-mix(in srgb, var(--mud-palette-info) 14%, transparent); }
.pc-cell--clickable { cursor: pointer; }
.pc-cell--clickable:hover { outline: 2px solid var(--mud-palette-primary); outline-offset: -2px; }
.pc-legend { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -2px; border: 1px solid var(--mud-palette-lines-default); }
.pc-legend.pc-cell--closed { background: var(--mud-palette-background-gray); }

/* Plán konstrukce: dny kalendáře konstruktéra (vyšší specificita než .mc .mc-day v MonthCalendaru 2ndSide). */
.mc .mc-day.cp-day--absence { background: color-mix(in srgb, var(--mud-palette-warning) 18%, var(--mud-palette-surface)); }
.mc .mc-day.cp-day--off { background: var(--mud-palette-background-gray); }
.mc .mc-day.cp-day--full { background: color-mix(in srgb, var(--mud-palette-primary) 14%, var(--mud-palette-surface)); }
.mc .mc-day.cp-day--part { background: color-mix(in srgb, var(--mud-palette-primary) 6%, var(--mud-palette-surface)); }
.cp-day-badge { font-size: 0.65rem; color: var(--mud-palette-text-secondary); white-space: nowrap; }
.cp-tooltip { max-width: 320px; font-size: 0.8rem; display: grid; gap: 2px; }
.cp-tooltip img { max-width: 100%; max-height: 160px; object-fit: contain; background: #fff; border-radius: 4px; margin-bottom: 4px; }

/* Detail zakázky: náhled dílu vedle názvu. */
.order-detail-thumb { width: 56px; height: 56px; object-fit: contain; border-radius: var(--ss-radius-xs, 8px); border: 1px solid var(--mud-palette-lines-default); background: var(--mud-palette-surface); }
