/* Daily Site Report (F-OPE-HOU-004a) print layout and entry grid */
.dsr-print {
    font-family: Arial, Helvetica, sans-serif;
    color: #111;
    background: #fff;
    width: 210mm;
    margin: 0 auto;
}

.dsr-print .dsr-page {
    padding: 8mm 8mm 6mm 8mm;
    margin-bottom: 12px;
    background: #fff;
}

.dsr-print .dsr-header {
    display: grid;
    grid-template-columns: 140px 1fr 140px;
    align-items: center;
    border: 1px solid #333;
    padding: 6px 10px;
}

.dsr-print .dsr-header img {
    height: 44px;
}

.dsr-print .dsr-title {
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.dsr-print .dsr-form-no {
    text-align: right;
    font-size: 9px;
    color: #444;
}

.dsr-print .dsr-meta {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 4px 10px;
    padding: 6px 10px;
    font-size: 11px;
    border: 1px solid #333;
    border-top: none;
}

.dsr-print .dsr-section {
    border: 1px solid #333;
    border-top: none;
    padding: 6px 10px;
}

.dsr-print .dsr-section-title {
    font-weight: 700;
    font-size: 11px;
    margin-bottom: 4px;
}

.dsr-print .dsr-personnel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 12px;
    font-size: 11px;
}

.dsr-print .dsr-line {
    border-bottom: 1px solid #ddd;
    padding: 1px 0;
    min-height: 15px;
}

.dsr-print .dsr-two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid #333;
    border-top: none;
}

.dsr-print .dsr-two-cols > div {
    padding: 6px 10px;
    min-height: 120px;
}

.dsr-print .dsr-two-cols > div:first-child {
    border-right: 1px solid #333;
}

.dsr-print .dsr-pre {
    white-space: pre-wrap;
    font-size: 11px;
}

.dsr-print table.dsr-grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px;
}

.dsr-print table.dsr-grid th,
.dsr-print table.dsr-grid td {
    border: 1px solid #333;
    padding: 3px 4px;
    vertical-align: middle;
}

.dsr-print table.dsr-grid th {
    background: #f0f0f0;
    font-weight: 700;
    text-align: center;
}

.dsr-print table.dsr-grid td.num {
    text-align: center;
    width: 48px;
}

.dsr-print table.dsr-grid td.note {
    font-size: 8px;
    color: #555;
}

.dsr-print .dsr-signatures {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 8px 10px;
    font-size: 11px;
    border: 1px solid #333;
    border-top: none;
}

.dsr-print .dsr-signatures .dsr-sig-line {
    border-bottom: 1px solid #333;
    height: 32px;
    margin: 6px 0;
}

.dsr-print .dsr-footer {
    font-size: 9px;
    color: #444;
    text-align: right;
    margin-top: 6px;
}

/* Entry grid */
.dsr-hours-grid {
    overflow-x: auto;
}

.dsr-hours-grid table {
    border-collapse: collapse;
    min-width: 100%;
}

.dsr-hours-grid th,
.dsr-hours-grid td {
    border: 1px solid var(--mud-palette-lines-default);
    padding: 2px 4px;
    white-space: nowrap;
}

.dsr-hours-grid th.group-support { background: rgba(120, 120, 120, 0.12); }
.dsr-hours-grid th.group-principal { background: rgba(255, 193, 7, 0.18); }
.dsr-hours-grid th.group-added { background: rgba(0, 150, 136, 0.15); }
.dsr-hours-grid th.group-callout { background: rgba(63, 81, 181, 0.15); }

.dsr-hours-grid th.sticky,
.dsr-hours-grid td.sticky {
    position: sticky;
    left: 0;
    background: var(--mud-palette-surface);
    z-index: 1;
}

.dsr-hours-grid .hours-input {
    width: 64px;
}

.dsr-hours-grid .hours-input .mud-input {
    font-size: 0.85rem;
}

/* Daily progress calendar (GitHub-style) */
.dpc { font-size: 0.7rem; }
.dpc-title { font-weight: 600; margin-bottom: 4px; }
.dpc-scroll { overflow-x: auto; }
.dpc-table { border-collapse: separate; border-spacing: 3px; }
.dpc-table th.dpc-month { font-weight: 400; text-align: left; white-space: nowrap; color: var(--mud-palette-text-secondary); height: 14px; }
.dpc-weekday { color: var(--mud-palette-text-secondary); padding-right: 4px; white-space: nowrap; }
.dpc-cell {
    width: 14px;
    height: 14px;
    border-radius: 2px;
    background: var(--mud-palette-background-gray, #ebedf0);
    display: flex;
    flex-direction: column-reverse;
    overflow: hidden;
    box-sizing: border-box;
}
.dpc-cell.dpc-outside { background: transparent; }
.dpc-cell.dpc-empty { background: var(--mud-palette-background-gray, #ebedf0); }
.dpc-cell.dpc-defect { outline: 2px solid #d32f2f; outline-offset: -2px; }
.dpc-cell.dpc-clickable { cursor: pointer; }
.dpc-fill { display: block; width: 100%; }
.dpc-pr { background: #ffb300; }
.dpc-add { background: #4caf50; }
.dpc-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; color: var(--mud-palette-text-secondary); align-items: center; }
.dpc-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 2px; vertical-align: middle; margin-right: 4px; background: var(--mud-palette-background-gray, #ebedf0); }
.dpc-scale { margin-left: auto; }

/* Coverage tape (one row per rig, one column per day, one block per person) */
.tape { position: relative; font-size: 0.7rem; }
.tape-scroll { overflow-x: auto; padding-bottom: 4px; }
.tape-grid { display: grid; gap: 1px; align-items: end; min-width: 100%; }
.tape-corner { position: sticky; left: 0; background: var(--mud-palette-surface); z-index: 2; }
.tape-month { border-left: 1px solid var(--mud-palette-lines-default); padding: 0 0 4px 4px; white-space: nowrap; overflow: hidden; color: var(--mud-palette-text-secondary); letter-spacing: 0.04em; }
.tape-name { position: sticky; left: 0; background: var(--mud-palette-surface); z-index: 2; padding-right: 8px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; align-self: center; }
.tape-cell { display: flex; flex-direction: column-reverse; gap: 1px; background: var(--mud-palette-background-gray, #ebedf0); border-radius: 1px; box-sizing: border-box; }
.tape-cell.tape-clickable { cursor: pointer; }
.tape-cell.tape-defect { outline: 2px solid #d32f2f; outline-offset: -2px; }
.tape-block { display: block; height: 6px; width: 100%; border-radius: 1px; }
.tape-principal { background: #ffb300; }
.tape-additional { background: #26a69a; }
.tape-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 2px; vertical-align: middle; margin-right: 4px; background: var(--mud-palette-background-gray, #ebedf0); }
.tape-swatch.tape-principal { background: #ffb300; }
.tape-swatch.tape-additional { background: #26a69a; }
.tape-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; color: var(--mud-palette-text-secondary); align-items: center; }
.tape-hint { margin-left: auto; }
.tape-tip { position: fixed; z-index: 1400; background: #0f1a1c; color: #e8f1f2; border: 1px solid #2a3d40; border-radius: 4px; padding: 8px 10px; min-width: 220px; max-width: 320px; box-shadow: 0 6px 18px rgba(0,0,0,.35); pointer-events: none; font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 0.72rem; }
.tape-tip-head { color: #ffb300; font-weight: 700; letter-spacing: 0.06em; margin-bottom: 6px; }
.tape-tip-row { display: flex; justify-content: space-between; gap: 16px; line-height: 1.5; }
.tape-tip-principal span { color: #ffb300; }
.tape-tip-foot { margin-top: 6px; color: #9fb3b6; }
