.instruction-page {
    display: grid;
    gap: 24px;
    padding: 24px;
}

.quarterly-filter-panel { padding: 1.25rem; margin-bottom: 1rem; }
.quarterly-filter-form { display: flex; gap: 1rem; align-items: end; flex-wrap: wrap; }
.quarterly-filter-form label { display: grid; gap: .4rem; min-width: 10rem; font-weight: 700; }
.quarterly-filter-form select { min-height: 2.8rem; border: 1px solid var(--ui-border, #c9d5dd); border-radius: .65rem; padding: .55rem .75rem; background: var(--ui-surface, #fff); color: inherit; }
.ui-page-toolbar:has(+ .quarterly-filter-panel) .ui-page-title p { color: #344a57; font-size: .84rem; font-weight: 600; line-height: 1.45; }
.quarterly-report { padding: 1.5rem; }
.quarterly-report-header { display: flex; justify-content: space-between; align-items: start; gap: 2rem; padding-bottom: 1rem; border-bottom: 2px solid var(--ui-border, #d7e0e6); }
.quarterly-report-header h2 { margin: .15rem 0; font-size: 1.65rem; }
.quarterly-report-header p { margin: 0; color: var(--ui-text, #26313c); font-weight: 650; }
.quarterly-report-meta { display: grid; min-width: 13rem; padding: .8rem 1rem; border-radius: .75rem; background: var(--ui-surface-soft, #f2f6f8); text-align: right; }
.quarterly-report-meta span,.quarterly-report-meta small,.quarterly-report-metrics span { color: var(--ui-text, #26313c); font-size: .8rem; font-weight: 600; }
.quarterly-report-meta strong { font-size: 1.3rem; }
.quarterly-report-metrics { display: grid; grid-template-columns: repeat(3, minmax(9rem, 14rem)); gap: .65rem; margin: .85rem 0; }
.quarterly-report-metrics div { display: grid; gap: .15rem; padding: .6rem .8rem; border: 1px solid var(--ui-border, #d7e0e6); border-radius: .65rem; background: var(--ui-surface-soft, #f7fafb); }
.quarterly-report-metrics strong { font-size: 1.1rem; }
.quarterly-table-wrap { overflow-x: auto; border: 1px solid var(--ui-border-strong, #9fb0ba); border-radius: .2rem; background: var(--ui-panel, #fff); }
.quarterly-report-table,.quarterly-summary-table { width: 100%; border-collapse: collapse; }
.quarterly-report-table th,.quarterly-report-table td,.quarterly-summary-table th,.quarterly-summary-table td { padding: .7rem .8rem; border: 1px solid var(--ui-border-strong, #aebcc5); text-align: left; vertical-align: middle; }
.quarterly-report-table thead th,.quarterly-summary-table thead th { background: var(--ui-surface-soft, #e7eef2); color: var(--ui-text, #26313c); font-size: .74rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.quarterly-report-table tbody tr:nth-child(even),.quarterly-summary-table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--ui-surface-soft, #f7fafb) 70%, transparent); }
.quarterly-report-table td small { display: block; margin-top: .15rem; color: var(--ui-text-muted, #607483); }
.quarterly-report-table tfoot th { background: var(--ui-surface-soft, #edf3f6); border-bottom: 0; font-size: .95rem; }
.quarterly-report-table .is-money,.quarterly-summary-table .is-money { text-align: right; white-space: nowrap; }
.quarterly-report-table .is-number,.quarterly-summary-table .is-number { text-align: center; }
.quarterly-matrix-table {
    table-layout: fixed;
}
.quarterly-matrix-table th:first-child,.quarterly-matrix-table td:first-child { border-left: 0; }
.quarterly-matrix-table th:last-child,.quarterly-matrix-table td:last-child { border-right: 0; }
.quarterly-matrix-table thead tr:first-child th { border-top: 0; }
.quarterly-matrix-table tfoot tr:last-child th { border-bottom: 0; }
.quarterly-matrix-table .quarterly-group-row th { height: 3.4rem; padding: .35rem; text-align: center; vertical-align: middle; }
.quarterly-matrix-table .quarterly-group-row .matrix-group span { display: block; max-width: 100%; overflow: hidden; font-size: .68rem; line-height: 1.05; overflow-wrap: anywhere; hyphens: auto; }
.quarterly-matrix-table .matrix-index { width: 2.5rem; min-width: 2.5rem; }
.quarterly-matrix-table .matrix-date { width: 6.5rem; min-width: 6.5rem; }
.quarterly-matrix-table .matrix-total { width: 6.5rem; min-width: 6.5rem; }
.quarterly-matrix-table .matrix-group-events { border-left: 3px solid #667785; border-right: 3px solid #667785; background: #edf1f4; color: #293943; }
.quarterly-matrix-table .matrix-group-activities { border-left: 3px solid #e45d34; border-right: 3px solid #e45d34; background: #fff0ea; color: #8e3218; }
.quarterly-matrix-table .matrix-group-people { border-left: 3px solid #1688b7; border-right: 3px solid #1688b7; background: #e9f6fb; color: #075776; }
.quarterly-matrix-table .vertical-heading { width: 2.7rem; min-width: 2.7rem; max-width: 2.7rem; height: 11.5rem; padding: .35rem .15rem; overflow: hidden; vertical-align: bottom; }
.quarterly-matrix-table .vertical-heading > span { display: inline-flex; max-height: 10.7rem; align-items: center; gap: .25rem; overflow: hidden; writing-mode: vertical-rl; transform: rotate(180deg); line-height: 1.05; text-transform: none; letter-spacing: 0; }
.quarterly-matrix-table .vertical-heading small { color: inherit; font-size: .65rem; font-weight: 600; opacity: .82; }
.quarterly-matrix-table .vertical-heading .activity-base-rate { margin-top: .2rem; padding-top: .2rem; border-top: 1px solid currentColor; font-size: .58rem; font-weight: 500; opacity: .62; }
.quarterly-matrix-table .event-heading { background-color: #f3f6f8; color: #293943; }
.quarterly-matrix-table .event-heading > span {
    height: 10.7rem;
    justify-content: flex-start;
    width: 100%;
}
.quarterly-matrix-table .activity-heading { background-color: #fff7f3; color: #7d301d; }
.quarterly-matrix-table .person-heading { background: #f0f8fb; color: #124e67; }
.quarterly-matrix-table .matrix-mark { width: 2.7rem; min-width: 2.7rem; max-width: 2.7rem; height: 2.9rem; padding: 0; text-align: center; vertical-align: middle; font-size: .95rem; font-weight: 900; }
.quarterly-matrix-table .event-mark { color: #526675; background-color: color-mix(in srgb, #f3f6f8 65%, transparent); }
.quarterly-matrix-table .activity-mark { color: #e45d34; background-color: color-mix(in srgb, #fff7f3 60%, transparent); }
.quarterly-matrix-table .matrix-dot { display: inline-block; width: .58rem; height: .58rem; border-radius: 50%; background: currentColor; vertical-align: middle; }
.quarterly-matrix-table .person-mark { color: #14734a; }
.quarterly-matrix-table tbody tr {
    background: var(--ui-panel, #fff);
    transition: background-color .15s ease;
}
.quarterly-matrix-table tbody tr:nth-child(even) {
    background: color-mix(in srgb, var(--ui-surface-soft, #f3f7f9) 72%, var(--ui-panel, #fff));
}
.quarterly-matrix-table tbody td {
    height: 3.15rem;
    padding-block: .45rem;
    border-top-color: color-mix(in srgb, var(--ui-border-strong, #9fb0ba) 72%, transparent);
    border-bottom-color: color-mix(in srgb, var(--ui-border-strong, #9fb0ba) 72%, transparent);
}
.quarterly-matrix-table tbody td.is-number {
    background: color-mix(in srgb, var(--ui-surface-soft, #edf3f6) 82%, transparent);
    color: var(--ui-text-muted, #607483);
    font-size: .78rem;
    font-weight: 800;
}
.quarterly-matrix-table tbody .matrix-date {
    padding-inline: .7rem;
}
.quarterly-matrix-table tbody .matrix-date strong {
    color: var(--ui-text, #26313c);
    font-size: .85rem;
    line-height: 1.15;
}
.quarterly-matrix-table tbody .matrix-date small {
    font-size: .7rem;
    line-height: 1.1;
}
.quarterly-matrix-table tbody .is-money {
    background: color-mix(in srgb, var(--ui-surface-soft, #edf3f6) 72%, transparent);
    padding-inline: .75rem;
}
.quarterly-matrix-table tbody .is-money strong {
    font-size: .85rem;
}
.quarterly-matrix-table tbody .matrix-dot {
    box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 12%, transparent);
}
.quarterly-matrix-table tbody .person-mark {
    font-size: 1.05rem;
}
.quarterly-matrix-table .matrix-column { border: 1px solid color-mix(in srgb, #607786 38%, transparent); }
.quarterly-matrix-table .matrix-column.is-block-start { border-left-width: 2px; border-left-color: #526b7a; }
.quarterly-matrix-table .matrix-column.is-block-end { border-right: 2px solid #526b7a; }
.quarterly-matrix-table .activity-heading.matrix-column,
.quarterly-matrix-table .activity-mark.matrix-column { border-left-color: color-mix(in srgb, #e45d34 52%, transparent); }
.quarterly-matrix-table .activity-heading.matrix-column.is-block-start,
.quarterly-matrix-table .activity-mark.matrix-column.is-block-start { border-left-color: #d94e25; }
.quarterly-matrix-table .activity-heading.matrix-column.is-block-end,
.quarterly-matrix-table .activity-mark.matrix-column.is-block-end { border-right-color: #d94e25; }
.quarterly-matrix-table .person-heading.matrix-column,
.quarterly-matrix-table .person-mark.matrix-column { border-left-color: color-mix(in srgb, #1688b7 42%, transparent); }
.quarterly-matrix-table .person-heading.matrix-column.is-block-start,
.quarterly-matrix-table .person-mark.matrix-column.is-block-start { border-left-color: #147ca7; }
.quarterly-matrix-table .person-heading.matrix-column.is-block-end,
.quarterly-matrix-table .person-mark.matrix-column.is-block-end { border-right-color: #147ca7; }
.quarterly-matrix-table tbody tr:hover td { background-color: color-mix(in srgb, var(--ui-info, #2787ba) 7%, var(--ui-panel, #fff)); }
.quarterly-person-summary { margin-top: 1.5rem; }
.quarterly-person-summary h3 { margin: 0 0 .7rem; font-size: 1.05rem; }
.quarterly-summary-table { border: 1px solid var(--ui-border, #d7e0e6); }
.quarterly-signatures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 3.5rem; }
.quarterly-signatures div { padding-top: .45rem; border-top: 1px solid currentColor; color: var(--ui-text-muted, #607483); font-size: .75rem; }
:root[data-theme="dark"] .ui-page-toolbar:has(+ .quarterly-filter-panel) .ui-page-title p,
:root[data-theme="dark"] .quarterly-report-header p,
:root[data-theme="dark"] .quarterly-report-meta span,
:root[data-theme="dark"] .quarterly-report-meta small,
:root[data-theme="dark"] .quarterly-report-metrics span,
:root[data-theme="dark"] .quarterly-report-table thead th,
:root[data-theme="dark"] .quarterly-summary-table thead th { color: #e6f0f5; }
:root[data-theme="dark"] .quarterly-matrix-table .matrix-group-events,
:root[data-theme="dark"] .quarterly-matrix-table .event-heading { background-color: #202c34; color: #e2ecf1; }
:root[data-theme="dark"] .quarterly-matrix-table .matrix-group-activities,
:root[data-theme="dark"] .quarterly-matrix-table .activity-heading { background-color: #3a2119; color: #ffd9cc; }
:root[data-theme="dark"] .quarterly-matrix-table .matrix-group-people,
:root[data-theme="dark"] .quarterly-matrix-table .person-heading { background: #122d39; color: #d7f2fc; }
@media (max-width: 760px) { .quarterly-report-header { flex-direction: column; } .quarterly-report-meta { width: 100%; text-align: left; } .quarterly-report-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media print {
    @page { size: 297mm 210mm; margin: 8mm; }
    .sidebar,.topbar,.page-toolbar,.quarterly-filter-panel,.no-print { display: none !important; }
    body,.app-shell,.app-main,.main-content { width: 100% !important; margin: 0 !important; padding: 0 !important; background: #fff !important; color: #111 !important; }
    html,body { height: auto !important; overflow: visible !important; }
    .quarterly-report { width: var(--quarterly-print-width, 100%) !important; max-width: none !important; margin: 0 !important; padding: 0 !important; border: 0 !important; box-shadow: none !important; zoom: var(--quarterly-print-scale, 1); break-inside: avoid; page-break-inside: avoid; page-break-after: avoid; }
    .quarterly-report-meta,.quarterly-report-metrics div { background: #fff !important; }
    .quarterly-table-wrap { width: 100% !important; max-width: none !important; overflow: visible !important; }
    .quarterly-matrix-table { width: 100% !important; min-width: 100% !important; table-layout: fixed; }
    .quarterly-report-table,.quarterly-summary-table { font-size: 8pt; }
    .quarterly-report-table th,.quarterly-report-table td,.quarterly-summary-table th,.quarterly-summary-table td { padding: 4pt 5pt; }
    .quarterly-report-table th,.quarterly-report-table td,.quarterly-summary-table th,.quarterly-summary-table td { border-color: #777 !important; }
    .quarterly-matrix-table thead th { background: #f2f2f2 !important; color: #111 !important; }
    .quarterly-matrix-table .matrix-column { border-left: .35pt solid #9aa7af !important; }
    .quarterly-matrix-table .matrix-column.is-block-start { border-left: 1pt solid #445762 !important; }
    .quarterly-matrix-table .matrix-column.is-block-end { border-right: 1pt solid #445762 !important; }
    .quarterly-matrix-table .event-heading,
    .quarterly-matrix-table .event-mark { background-image: linear-gradient(to right, transparent calc(50% - .25pt), #6f7f89 calc(50% - .25pt), #6f7f89 calc(50% + .25pt), transparent calc(50% + .25pt)) !important; }
    .quarterly-matrix-table .activity-heading,
    .quarterly-matrix-table .activity-mark { background-image: linear-gradient(to right, transparent calc(50% - .25pt), #a95638 calc(50% - .25pt), #a95638 calc(50% + .25pt), transparent calc(50% + .25pt)) !important; }
    .quarterly-report-table tr,.quarterly-summary-table tr { break-inside: avoid; }
    .quarterly-matrix-table .vertical-heading { width: 19pt; min-width: 19pt; height: 105pt; padding: 3pt 2pt; }
    .quarterly-matrix-table .matrix-date { width: 58pt; min-width: 58pt; }
    .quarterly-signatures { margin-top: 18pt; break-inside: avoid; }
    .quarterly-report, .quarterly-report * { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* Strict single-page A4 landscape output for the quarterly matrix. */
@media print {
    @page {
        size: A4 landscape;
        margin: 6mm;
    }

    body:has(.quarterly-print-page) {
        width: 285mm !important;
        height: 198mm !important;
        min-width: 0 !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        background: #fff !important;
    }

    body:has(.quarterly-print-page) * {
        visibility: hidden !important;
    }

    body:has(.quarterly-print-page) .quarterly-report,
    body:has(.quarterly-print-page) .quarterly-report * {
        visibility: visible !important;
    }

    body:has(.quarterly-print-page) .quarterly-report {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: var(--quarterly-print-width, 100%) !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        box-shadow: none !important;
        zoom: 1 !important;
        transform: scale(var(--quarterly-print-scale, 1));
        transform-origin: top left;
        break-inside: avoid !important;
        break-after: avoid !important;
        page-break-inside: avoid !important;
        page-break-after: avoid !important;
    }

    body:has(.quarterly-print-page) .quarterly-table-wrap {
        overflow: hidden !important;
    }

    body:has(.quarterly-print-page) .quarterly-matrix-table {
        width: 100% !important;
        min-width: 100% !important;
    }
}

/* Quartalsmatrix: eigenständige, kompakte A4-Querformat-Druckfassung. */
@media print {
    @page {
        size: A4 landscape;
        margin: 6mm;
    }

    .quarterly-report {
        box-sizing: border-box !important;
        font-size: 7pt !important;
        transform-origin: top left;
    }

    .quarterly-report-header {
        align-items: center;
        gap: 8mm;
        padding-bottom: 3mm;
    }

    .quarterly-report-header h2 {
        font-size: 14pt;
        line-height: 1.05;
        margin: 1mm 0;
    }

    .quarterly-report-header p,
    .quarterly-report-meta strong {
        font-size: 8pt;
    }

    .quarterly-report-meta {
        min-width: 34mm;
        padding: 2mm 3mm;
    }

    .quarterly-report-meta span,
    .quarterly-report-meta small,
    .quarterly-report-metrics span {
        font-size: 6pt;
    }

    .quarterly-report-metrics {
        grid-template-columns: repeat(3, 32mm);
        gap: 2mm;
        margin: 3mm 0;
    }

    .quarterly-report-metrics div {
        gap: 0;
        padding: 1.5mm 2mm;
    }

    .quarterly-report-metrics strong {
        font-size: 9pt;
    }

    .quarterly-table-wrap {
        border-color: #596a74 !important;
        border-radius: 0 !important;
    }

    .quarterly-matrix-table thead {
        display: table-header-group;
    }

    .quarterly-matrix-table tfoot {
        display: table-row-group;
    }

    .quarterly-matrix-table .quarterly-group-row th {
        height: 7mm;
        padding: 1mm;
    }

    .quarterly-matrix-table .vertical-heading {
        height: 34mm;
        min-width: 5mm;
        width: 5mm;
        padding: 1mm .5mm;
    }

    .quarterly-matrix-table .vertical-heading > span,
    .quarterly-matrix-table .event-heading > span {
        font-size: 5.8pt;
        height: 32mm;
        line-height: 1;
        max-height: 32mm;
    }

    .quarterly-matrix-table .vertical-heading small {
        font-size: 4.8pt;
    }

    .quarterly-matrix-table tbody td,
    .quarterly-matrix-table .matrix-mark {
        height: 7mm;
        min-height: 7mm;
        padding-block: .5mm;
    }

    .quarterly-matrix-table tbody .matrix-date,
    .quarterly-matrix-table tbody .is-money {
        padding-inline: 1.5mm;
    }

    .quarterly-matrix-table tbody .matrix-date strong,
    .quarterly-matrix-table tbody .is-money strong {
        font-size: 6.5pt;
    }

    .quarterly-matrix-table tbody .matrix-date small,
    .quarterly-matrix-table tbody td.is-number {
        font-size: 5.5pt;
    }

    .quarterly-matrix-table .matrix-dot {
        box-shadow: none;
        height: 1.7mm;
        width: 1.7mm;
    }

    .quarterly-matrix-table .person-mark {
        font-size: 8pt;
    }

    .quarterly-matrix-table tfoot th {
        font-size: 7pt;
        padding: 1.5mm 2mm;
    }

    .quarterly-signatures {
        gap: 10mm;
        margin-top: 7mm;
    }

    .quarterly-signatures div {
        font-size: 6pt;
        padding-top: 1.5mm;
    }
}

.instruction-panel {
    padding: 28px;
}

.instruction-page-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin: -4px 0 0;
}

.instruction-overview-panel .ui-panel-header {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--ui-border, #dce5e9);
}

.instruction-overview-panel .ui-panel-header h2,
.instruction-list-header h2 {
    margin: 0 0 8px;
    color: var(--ui-text, #26313c);
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    line-height: 1.25;
}

.instruction-overview-panel .ui-panel-header p,
.instruction-list-header p {
    max-width: 72ch;
    margin: 0;
    color: var(--ui-text-muted, #627682);
    line-height: 1.6;
}

.instruction-category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.instruction-category-card {
    display: flex;
    align-items: center;
    min-height: 88px;
    gap: 16px;
    padding: 18px 20px;
    border: 1px solid var(--ui-border, #dce5e9);
    border-radius: 14px;
    background: var(--ui-surface-soft, #f7fafb);
}

.instruction-category-card div {
    display: grid;
    gap: 5px;
}

.instruction-category-card strong {
    font-size: 1rem;
    line-height: 1.35;
}

.instruction-category-card span:not(.instruction-category-icon) {
    color: var(--ui-text-muted, #627682);
    font-size: .86rem;
}

.instruction-category-icon {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 11px;
    background: color-mix(in srgb, var(--accent, #e45d34) 14%, transparent);
    color: var(--accent-dark, #ae3f20);
    font-weight: 800;
}

.instruction-list-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.instruction-count {
    display: grid;
    min-width: 42px;
    height: 42px;
    padding: 0 10px;
    place-items: center;
    border-radius: 12px;
    background: var(--accent, #e45d34);
    color: #fff;
    font-weight: 800;
}

.instruction-list-panel .ui-table-wrapper {
    border: 1px solid var(--ui-border, #dce5e9);
    border-radius: 14px;
    overflow: hidden;
}

.instruction-list-panel .ui-table th,
.instruction-list-panel .ui-table td {
    padding: 15px 16px;
    vertical-align: middle;
}

.instruction-form-section {
    min-width: 0;
    margin: 0;
    padding: 0 0 22px;
    border: 0;
}

.instruction-form-section
    + .instruction-form-section {
    padding-top: 22px;
    border-top: 1px solid #dce5e9;
}

.instruction-form-section legend {
    display: block;
    width: 100%;
    margin: 0 0 4px;
    padding: 0;
    font-size: 17px;
    font-weight: 700;
}

.instruction-section-description {
    margin: 0 0 18px;
    color: var(--ui-text-muted, #627682);
    font-size: 13px;
}

.instruction-form-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 18px 24px;
}

.instruction-content-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.25fr)
        minmax(0, .75fr);
    gap: 18px 24px;
}

.instruction-form-wide {
    grid-column: 1 / -1;
}

.instruction-form-grid > div,
.instruction-content-grid > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 6px;
}

.instruction-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
}

.instruction-form input,
.instruction-form select,
.instruction-form textarea {
    display: block;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.instruction-form input,
.instruction-form select {
    min-height: 40px;
}

.instruction-form textarea {
    min-height: 140px;
    resize: vertical;
}

.instruction-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 18px;
    border-top: 1px solid #dce5e9;
}

.instruction-detail-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 20px 30px;
    margin: 0;
}

.instruction-detail-grid dt {
    margin-bottom: 5px;
    color: #627682;
    font-size: 12px;
    font-weight: 700;
}

.instruction-detail-grid dd {
    margin: 0;
}

.instruction-detail-wide {
    grid-column: 1 / -1;
}

@media (max-width: 760px) {
    .instruction-page {
        gap: 16px;
        padding: 10px;
    }

    .instruction-panel {
        padding: 18px;
    }

    .instruction-category-grid {
        grid-template-columns: 1fr;
    }

    .instruction-form-grid,
    .instruction-content-grid,
    .instruction-detail-grid {
        grid-template-columns: 1fr;
    }

    .instruction-form-wide,
    .instruction-detail-wide {
        grid-column: auto;
    }
}

/* IGNIS_INSTRUCTION_PARTICIPANTS_START */

.instruction-participant-panel {
    margin-top: 16px;
}

.instruction-participant-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.instruction-participant-header h2 {
    margin: 0 0 4px;
}

.instruction-participant-header p {
    margin: 0;
    color: #627682;
}

.instruction-participant-form-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 18px 24px;
}

.instruction-participant-form-wide {
    grid-column: 1 / -1;
}

.instruction-participant-form-grid > div {
    min-width: 0;
}

.instruction-participant-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
}

.instruction-participant-form input,
.instruction-participant-form select,
.instruction-participant-form textarea {
    display: block;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.instruction-participant-form input,
.instruction-participant-form select {
    min-height: 40px;
}

.instruction-participant-form textarea {
    min-height: 100px;
    resize: vertical;
}

.instruction-participant-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.instruction-participant-status.is-planned {
    background: #e7f1f7;
    color: #176789;
}

.instruction-participant-status.is-attended {
    background: #e5f4e9;
    color: #22733b;
}

.instruction-participant-status.is-excused {
    background: #fff4d8;
    color: #8a6200;
}

.instruction-participant-status.is-absent {
    background: #fbe5e5;
    color: #a32424;
}

@media (max-width: 760px) {
    .instruction-participant-header {
        flex-direction: column;
    }

    .instruction-participant-form-grid {
        grid-template-columns: 1fr;
    }

    .instruction-participant-form-wide {
        grid-column: auto;
    }
}

/* IGNIS_INSTRUCTION_PARTICIPANTS_END */
