.home-upload-dropzone {
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.home-upload-dropzone.is-dragover {
    border-color: var(--accent);
    background-color: rgb(var(--sed-accent) / 0.08);
    box-shadow: inset 0 0 0 1px var(--accent);
}

.upload-toast-root {
    position: fixed;
    right: 44px;
    bottom: 44px;
    z-index: 80;
    width: min(560px, calc(100vw - 88px));
    pointer-events: none;
}

.upload-toast-root[hidden] {
    display: none !important;
}

.upload-toast {
    position: relative;
    box-sizing: border-box;
    pointer-events: auto;
    min-height: 88px;
    padding: 18px 48px 18px 20px;
    border-radius: 12px;
    border: 1px solid transparent;
    /*
     * Непрозрачный фон: тонировка накладывается градиентом поверх сплошного
     * цвета панели. Полупрозрачный background делал текст уведомления
     * нечитаемым, потому что сквозь него просвечивала таблица.
     */
    background-color: var(--panel);
    background-image: none;
    box-shadow: var(--sed-shadow-raised);
    font-family: var(--sed-font-sans);
    max-height: min(70vh, 620px);
    overflow-y: auto;
}

.upload-toast-root[data-state="loading"] .upload-toast {
    background-image: linear-gradient(
        rgb(var(--sed-accent) / 0.08),
        rgb(var(--sed-accent) / 0.08)
    );
    border-color: var(--accent);
}

.upload-toast-root[data-state="success"] .upload-toast {
    background-image: linear-gradient(
        rgb(var(--sed-success) / 0.08),
        rgb(var(--sed-success) / 0.08)
    );
    border-color: rgb(var(--sed-success) / 0.55);
}

.upload-toast-root[data-state="error"] .upload-toast {
    background-image: linear-gradient(
        rgb(var(--sed-danger) / 0.1),
        rgb(var(--sed-danger) / 0.1)
    );
    border-color: rgb(var(--sed-danger) / 0.55);
}

.upload-toast__close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent !important;
    background-color: transparent !important;
    color: var(--muted);
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.15s ease;
}

.upload-toast__close:hover,
.upload-toast__close:focus,
.upload-toast__close:focus-visible,
.upload-toast__close:active {
    background: transparent !important;
    background-color: transparent !important;
    border-color: transparent;
    color: var(--muted);
    opacity: 0.55;
    outline: none;
    box-shadow: none;
}

.upload-toast__filename {
    margin: 0 0 10px;
    color: var(--fg);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    word-break: break-word;
}

.upload-toast__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 16px;
}

.upload-toast__status {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
}

.upload-toast-root[data-state="loading"] .upload-toast__status {
    color: var(--accent);
}

.upload-toast-root[data-state="success"] .upload-toast__status {
    color: rgb(var(--sed-success));
}

.upload-toast-root[data-state="error"] .upload-toast__status {
    color: var(--danger);
    font-weight: 600;
}

.upload-toast__errors {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgb(var(--sed-danger) / 0.25);
}

.upload-toast__errors[hidden] {
    display: none !important;
}

.upload-toast__error-group + .upload-toast__error-group {
    margin-top: 12px;
}

.upload-toast__error-title {
    margin: 0 0 5px;
    color: var(--fg);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.upload-toast__error-list {
    margin: 0;
    padding-left: 18px;
    color: var(--fg);
    font-size: 13px;
    line-height: 1.45;
}

.upload-toast__error-list li + li {
    margin-top: 4px;
}

.upload-toast__progress {
    flex: 0 0 132px;
    width: 132px;
}

.upload-toast__progress[hidden] {
    display: none !important;
}

.upload-toast__progress-track {
    height: 6px;
    overflow: hidden;
    border-radius: 3px;
    background: rgb(var(--sed-accent) / 0.22);
}

.upload-toast__progress-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
    transition: width 0.2s linear;
}

.upload-toast__open {
    display: inline-block;
    margin-top: 10px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: underline;
    text-underline-position: from-font;
}

.upload-toast__open[hidden] {
    display: none !important;
}

.upload-toast__open:hover {
    color: var(--accent-dark);
}

.clear-selected-file {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    background-color: transparent;
    color: rgb(var(--sed-placeholder));
    cursor: pointer;
    transition: color 0.15s ease;
}

.clear-selected-file:hover,
.clear-selected-file:focus,
.clear-selected-file:focus-visible,
.clear-selected-file:active {
    background: transparent;
    background-color: transparent;
    border-color: transparent;
    color: var(--muted);
    outline: none;
    box-shadow: none;
}

.create-project-dialog {
    padding: 1rem;
    background: transparent;
    border: 0;
}

.create-project-dialog::backdrop {
    background: rgba(0, 0, 0, 0.3);
}

.create-project-dialog__panel {
    border-radius: 20px;
    border: 1px solid var(--line);
    padding: 2rem 1.75rem;
    overflow: hidden;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--sed-font-sans);
    line-height: 1.5;
}

a {
    color: var(--accent);
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.25rem;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
}

.brand {
    color: var(--fg);
    font-weight: 700;
    text-decoration: none;
}

.site-header nav,
.actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.container {
    width: min(1180px, calc(100% - 2rem));
    margin: 1.5rem auto;
}

.page-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

h1 {
    margin: 0 0 0.5rem;
    font-size: 1.8rem;
}

.muted,
.empty {
    color: var(--muted);
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--sed-radius-surface);
    padding: 1.5rem;
}

.narrow {
    max-width: 520px;
}

form label {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 0.85rem;
}

input,
select,
button,
.button {
    min-height: 2.35rem;
    border-radius: var(--sed-radius-control);
    border: 1px solid var(--line);
    padding: 0.45rem 0.7rem;
    font: inherit;
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    text-decoration: none;
    cursor: pointer;
}

button:hover,
.button:hover {
    background: var(--accent-dark);
}

.sortable-header,
.sortable-header:hover {
    min-height: 0;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    color: inherit;
}

.secondary {
    background: #fff;
    color: var(--accent);
}

.danger {
    color: var(--danger);
}

button.danger,
.button.danger {
    border-color: var(--danger);
}

.inline-form {
    margin: 0;
}

.link-button {
    min-height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--accent);
}

.messages {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.message {
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: var(--sed-radius-control);
    background: #fff;
}

.message.success {
    border-color: rgb(var(--sed-success) / 0.55);
}

.message.error {
    border-color: var(--danger);
}

.filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(140px, 1fr));
    gap: 0.85rem;
    align-items: end;
    margin-bottom: 1rem;
}

.filters fieldset {
    grid-column: 1 / -1;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.8rem;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.4rem 0.8rem;
}

.checkbox-grid label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
}

.table-wrap {
    overflow-x: auto;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--sed-radius-control);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    background: rgb(var(--sed-table-head));
}

.sheet-table-wrap {
    max-height: calc(100vh - 190px);
}

.sheet-table {
    width: max-content;
    min-width: 100%;
    table-layout: fixed;
    font-size: 0.88rem;
}

.sheet-table th {
    position: sticky;
    top: 0;
    z-index: 2;
}

.sheet-table td,
.sheet-table th {
    min-width: 3.5rem;
    max-width: 24rem;
    height: 1.85rem;
    padding: 0.32rem 0.45rem;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.sheet-table td {
    background: var(--panel);
    user-select: text;
}

.sheet-table td.merged {
    background: rgb(var(--sed-page));
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
}

.sheet-table td.empty-cell {
    background: rgb(var(--sed-page) / 0.65);
}

.sheet-table td.formula-cell {
    color: var(--muted);
}

.sheet-table td.editable-cell {
    background: rgb(var(--sed-warning-bg));
}

.sheet-table input {
    width: 100%;
    min-width: 4rem;
    height: 1.8rem;
    min-height: 1.8rem;
    padding: 0.2rem 0.35rem;
}

.row-action-col-template,
.row-number-col-template {
    width: 3rem;
}

.row-action-col,
.row-number-col {
    min-width: 2.25rem !important;
    max-width: 2.75rem !important;
    text-align: center;
    white-space: nowrap !important;
}

.row-action-col {
    position: sticky;
    right: 0;
    z-index: 3;
    background: var(--panel);
}

.row-number-col {
    position: sticky;
    left: 0;
    z-index: 3;
}

.has-actions .row-number-col {
    left: 3rem;
}

td.row-action-col {
    background: var(--panel);
}

.sheet-table tbody .row-number-col {
    background: rgb(var(--sed-table-head));
    color: var(--muted);
    font-weight: 600;
}

.editing-row td,
.editing-row th {
    background: rgb(var(--sed-warning-bg));
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    min-width: 1.35rem;
    height: 1.35rem;
    min-height: 1.35rem;
    padding: 0;
    border-radius: 999px;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    line-height: 1;
    font-size: 0.8rem;
}

.secondary-icon {
    background: var(--accent);
    color: #fff;
}

.icon-button:hover,
.secondary-icon:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
}

.semantic-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.field-pair {
    display: grid;
    gap: 0.2rem;
    padding: 0.75rem;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--sed-radius-control);
}

.field-pair span {
    color: var(--muted);
    font-size: 0.85rem;
}

.field-pair strong {
    font-weight: 600;
}

.field-edit-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
    align-items: center;
}

.field-edit-form[data-autosave-card] {
    grid-template-columns: minmax(0, 1fr);
}

.field-edit-form input,
.field-edit-form select {
    width: 100%;
    min-width: 0;
}

.compact-button {
    min-height: 2.2rem;
    padding: 0.4rem 0.65rem;
    font-size: 0.88rem;
}

.semantic-section {
    margin-top: 1.25rem;
}

.proforma-block {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem 1rem;
    margin: 1rem 0 1.5rem;
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-radius: var(--sed-radius-surface);
    background: var(--panel);
}

.proforma-block > h2 {
    flex: 0 0 100%;
    margin: 0 0 0.85rem;
    font-size: 1.2rem;
}

.proforma-block > .semantic-section {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: min(100%, 420px);
    margin: 0;
}

.hydrobiology-block > .semantic-section {
    flex-basis: 100%;
}

.proforma-block > .eco-position-table-section {
    flex: 0 0 100%;
}

.eco-position-table-section .semantic-table-wrap {
    overflow-x: auto;
}

.proforma-block > .eco-sediment-eh-table-section,
.proforma-block > .eco-sediment-ph-table-section,
.proforma-block > .eco-replication-table-section,
.proforma-block > .eco-column-height-table-section {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: min(100%, 360px);
}

.eco-position-table th:nth-child(1),
.eco-position-table td:nth-child(1) {
    width: 8%;
}

.eco-position-table th:nth-child(2),
.eco-position-table td:nth-child(2) {
    width: 9%;
}

.eco-position-table th:nth-child(3),
.eco-position-table td:nth-child(3),
.eco-position-table th:nth-child(4),
.eco-position-table td:nth-child(4) {
    width: 32%;
    min-width: 20rem;
}

.eco-position-table th:nth-child(5),
.eco-position-table td:nth-child(5) {
    width: 19%;
}

.eco-position-table {
    min-width: 78rem;
}

.eco-position-table .coordinate-inputs {
    gap: 0.18rem;
    width: max-content;
    min-width: max-content;
}

.eco-position-table .coordinate-inputs input {
    box-sizing: border-box;
    text-align: center;
}

.eco-position-table .coordinate-inputs input[data-coordinate-part="degrees"] {
    width: 5.25rem !important;
    min-width: 5.25rem;
}

.eco-position-table .coordinate-inputs input[data-coordinate-part="minutes"] {
    width: 4.75rem !important;
    min-width: 4.75rem;
}

.eco-position-table .coordinate-inputs input[data-coordinate-part="seconds"] {
    width: 7rem !important;
    min-width: 7rem;
}

.eco-position-table .coordinate-inputs input::-webkit-outer-spin-button,
.eco-position-table .coordinate-inputs input::-webkit-inner-spin-button {
    margin: 0;
    appearance: none;
}

.eco-position-table .coordinate-inputs input[type="number"] {
    appearance: textfield;
}

.compact-fields {
    flex: 0 0 100%;
    margin-bottom: 0;
}

.semantic-section h2 {
    margin: 0 0 0.65rem;
    font-size: 1.15rem;
}

.semantic-section h3 {
    margin: 0 0 0.55rem;
    font-size: 1rem;
}

.table-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0 0 0.75rem;
}

.table-stat {
    display: inline-flex;
    align-items: baseline;
    gap: 0.45rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--line);
    border-radius: var(--sed-radius-control);
    background: rgb(var(--sed-table-head) / 0.6);
}

.table-stat span {
    color: var(--muted);
    font-size: 0.9rem;
}

.table-stat strong {
    font-size: 1rem;
}

.semantic-table-wrap {
    margin-bottom: 1rem;
    overflow-x: visible;
}

.semantic-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.semantic-table th,
.semantic-table td {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}

.semantic-table td.cell-with-action {
    position: relative;
    padding-right: 2.7rem;
}

.row-action-buttons {
    position: absolute;
    top: 50%;
    right: 0.45rem;
    transform: translateY(-50%);
    display: inline-flex;
    gap: 0.25rem;
    align-items: center;
}

.row-action-buttons form {
    display: inline-flex;
    gap: 0.25rem;
    align-items: center;
}

.semantic-table input,
.semantic-table select {
    width: 100%;
    min-width: 0;
}

.structured-input {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: nowrap;
    width: 100%;
}

.structured-input input {
    min-width: 0;
}

.structured-input span {
    color: var(--muted);
    font-size: 0.85rem;
}

.date-inputs,
.time-inputs {
    width: max-content;
    min-width: max-content;
}

.date-inputs input[data-date-part="day"],
.date-inputs input[data-date-part="month"],
.time-inputs input[data-time-part="hour"],
.time-inputs input[data-time-part="minute"] {
    flex: 0 0 calc(2ch + 1.2rem);
    width: calc(2ch + 1.2rem) !important;
    inline-size: calc(2ch + 1.2rem);
    min-inline-size: calc(2ch + 1.2rem);
    max-inline-size: calc(2ch + 1.2rem);
    box-sizing: content-box;
    padding-inline: 0.25rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.date-inputs input[data-date-part="year"] {
    flex: 0 0 calc(4ch + 1.2rem);
    width: calc(4ch + 1.2rem) !important;
    inline-size: calc(4ch + 1.2rem);
    min-inline-size: calc(4ch + 1.2rem);
    max-inline-size: calc(4ch + 1.2rem);
    box-sizing: content-box;
    padding-inline: 0.25rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.meteo-observation-table {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.meteo-observation-table th,
.meteo-observation-table td {
    padding-left: 0.45rem;
    padding-right: 0.45rem;
}

.meteo-observation-table .meteo-date-col {
    width: 12.5%;
}

.meteo-observation-table .meteo-time-col {
    width: 8%;
}

.meteo-observation-table .meteo-station-col {
    width: 9%;
}

.meteo-observation-table .meteo-speed-col,
.meteo-observation-table .meteo-temperature-col,
.meteo-observation-table .meteo-direction-col,
.meteo-observation-table .meteo-wave-height-col,
.meteo-observation-table .meteo-wave-direction-col,
.meteo-observation-table .meteo-cloud-col,
.meteo-observation-table .meteo-pressure-col,
.meteo-observation-table .meteo-humidity-col {
    width: 8.8%;
}

.meteo-observation-table .date-cell {
    padding-right: 0.65rem;
}

.meteo-observation-table .time-cell {
    padding-left: 0.65rem;
}

.meteo-observation-table .date-inputs,
.meteo-observation-table .time-inputs {
    gap: 0.12rem;
    width: auto;
    min-width: 0;
}

.meteo-observation-table .date-inputs input[data-date-part="day"],
.meteo-observation-table .date-inputs input[data-date-part="month"],
.meteo-observation-table .time-inputs input[data-time-part="hour"],
.meteo-observation-table .time-inputs input[data-time-part="minute"] {
    flex: 0 0 2.2rem;
    width: 2.2rem !important;
    min-width: 2.2rem;
    max-width: 2.2rem;
    padding-left: 0.2rem;
    padding-right: 0.2rem;
    box-sizing: border-box;
}

.meteo-observation-table .date-inputs input[data-date-part="year"] {
    flex: 0 0 3.55rem;
    width: 3.55rem !important;
    min-width: 3.55rem;
    max-width: 3.55rem;
    padding-left: 0.2rem;
    padding-right: 0.2rem;
    box-sizing: border-box;
}

.coordinate-inputs input[data-coordinate-part="degrees"],
.coordinate-inputs input[data-coordinate-part="minutes"] {
    width: 3.75rem;
}

.coordinate-inputs input[data-coordinate-part="seconds"] {
    width: 5rem;
}

.semantic-table .summary-row td {
    background: rgb(var(--sed-warning-bg));
    font-weight: 700;
}

.semantic-table .summary-row .row-action-col {
    background: rgb(var(--sed-warning-bg));
}

.semantic-table td.invalid-reference-cell {
    background: rgb(var(--sed-danger-bg));
    color: var(--danger);
    font-weight: 700;
}

.semantic-table td.invalid-reference-cell input,
.semantic-table td.invalid-reference-cell select {
    border-color: var(--danger);
    color: var(--danger);
}

.report-table-section {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-radius: var(--sed-radius-surface);
    background: var(--panel);
}

.report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.report-table-title {
    margin: 0 0 0.6rem;
    color: var(--fg);
    font-size: 1.15rem;
    font-weight: 600;
}

.report-source-note {
    margin: 0 0 0.5rem;
}

.report-table-wrap {
    overflow: auto;
    max-height: calc(100vh - 220px);
    margin-top: 1rem;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--sed-radius-control);
}

.report-table-wrap:focus-visible,
.semantic-table-wrap:focus-visible,
.matrix-table-wrap:focus-visible,
.sheet-table-wrap:focus-visible,
.labels-scroll:focus-visible,
.labels-matrix-scroll:focus-visible,
.protocol-table-scroll:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.report-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-family: var(--sed-font-sans);
    font-size: 0.8rem;
    line-height: 1.35;
}

.report-table th,
.report-table td {
    min-width: 2.15rem;
    height: 2.25rem;
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--line);
    color: var(--fg);
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.report-table th {
    background: rgb(var(--sed-table-head));
    color: var(--muted);
    font-weight: 600;
}

.report-table tbody tr:hover td {
    background: rgb(var(--sed-table-head) / 0.6);
}

.report-table .station-col {
    min-width: 9.5rem;
    text-align: left;
}

.report-table .date-col {
    min-width: 6.5rem;
}

.report-table .coordinate-col {
    min-width: 10.5rem;
}

.report-table .description-col {
    min-width: 18rem;
    max-width: 36rem;
    white-space: normal;
    text-align: left;
}

.report-table th.station-col {
    text-align: center;
}

.report-table .vessel-row {
    background: rgb(var(--sed-table-head));
    text-align: center;
    font-weight: 600;
}

.report-table .empty-table-row {
    height: 3rem;
    color: var(--muted);
    text-align: center;
}

.matrix-table-wrap {
    overflow: auto;
    max-height: calc(100vh - 280px);
    border: 1px solid var(--line);
    border-radius: 0.5rem;
    background: var(--panel);
}

.matrix-table {
    width: max-content;
    min-width: 100%;
}

.matrix-table th,
.matrix-table td {
    min-width: 7rem;
    text-align: center;
    white-space: nowrap;
}

.matrix-table .matrix-station-col {
    position: sticky;
    left: 0;
    z-index: 2;
    min-width: 12rem;
    background: var(--panel);
    text-align: left;
}

.matrix-table th.matrix-station-col {
    z-index: 3;
    background: rgb(var(--sed-table-head));
    text-align: center;
}

.matrix-value-input {
    min-width: 5.5rem;
    width: 100%;
    padding: 0.35rem 0.45rem;
    text-align: center;
}

.matrix-station-input {
    min-width: 11rem;
}

@media (max-width: 760px) {
    .page-title,
    .filters {
        display: grid;
        grid-template-columns: 1fr;
    }

    .proforma-block > .semantic-section {
        flex-basis: 100%;
    }
}

/* Этикетки: таблицы скроллятся внутри блоков, страница остаётся компактной */
.labels-scroll {
    overflow: auto;
    max-height: 65vh;
    border: 1px solid var(--line);
    border-radius: 10px;
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: var(--accent) var(--line);
}

.labels-scroll::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.labels-scroll::-webkit-scrollbar-track {
    background: var(--line);
    border-radius: 6px;
}

.labels-scroll::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 6px;
}

.labels-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--accent-dark);
}

.labels-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 20;
}

/* A modal window owns the viewport: the page behind it must not scroll. */
html:has(.edit-modal-overlay:not([hidden])),
html:has(dialog[open]) {
    overflow: hidden;
}

/* Режим редактирования: модальное подтверждение действий */
.edit-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgb(var(--sed-overlay) / 0.45);
}

.edit-modal-overlay[hidden] {
    display: none;
}

.edit-modal {
    box-sizing: border-box;
    width: min(440px, 100%);
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--sed-radius-surface);
    background: var(--panel);
    box-shadow: var(--sed-shadow-raised);
}

.edit-modal-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--fg);
}

.edit-modal-message {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--muted);
}

.edit-modal-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

.edit-mode-hint {
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--muted);
}

/* Этикетки: матрица с всегда видимым горизонтальным скроллом */
.labels-matrix-scroll {
    position: relative;
    overflow: auto;
    max-height: 65vh;
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: var(--accent) var(--line);
}

.labels-matrix-scroll::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.labels-matrix-scroll::-webkit-scrollbar-track {
    background: var(--line);
    border-radius: 6px;
}

.labels-matrix-scroll::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 6px;
}

.labels-matrix-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--accent-dark);
}

.matrix-top-scrollbar {
    position: sticky;
    top: 0;
    left: 0;
    z-index: 30;
    height: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    background: var(--line);
    border-bottom: 1px solid var(--line);
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: var(--accent) var(--line);
}

.matrix-top-scrollbar::-webkit-scrollbar {
    height: 10px;
}

.matrix-top-scrollbar::-webkit-scrollbar-track {
    background: var(--line);
}

.matrix-top-scrollbar::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 6px;
}

.matrix-top-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--accent-dark);
}

.matrix-top-scrollbar-inner {
    height: 1px;
}

.labels-matrix-scroll thead th {
    position: sticky;
    top: 12px;
    z-index: 20;
}

.labels-pager {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    font-size: 13px;
    color: var(--muted);
}

.labels-pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    color: var(--accent-dark);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.labels-pager-btn:hover:not(:disabled) {
    background: rgb(var(--sed-accent) / 0.07);
    border-color: var(--accent);
}

.labels-pager-btn:disabled {
    opacity: 0.45;
    cursor: default;
}

.labels-pager-info {
    min-width: 140px;
    text-align: center;
}
/* Browser presentation is independent of the retained scientific DOCX layout. */
.protocol-page { min-width: 0; max-width: 1600px; }
.protocol-selection-card { padding: 0; overflow: hidden; }
.protocol-selection-heading { padding: 22px 24px 18px; border-bottom: 1px solid var(--line); background: rgb(var(--sed-table-head) / 0.55); }
.protocol-selection-heading h2 { margin: 2px 0 0; color: var(--fg); font-size: 18px; font-weight: 600; }
.protocol-selection-heading > p:last-child { max-width: 720px; margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.protocol-eyebrow { margin: 0; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.protocol-selectors { display: grid; grid-template-columns: repeat(3, minmax(150px, 1fr)) auto; gap: 12px; align-items: end; padding: 20px 24px 24px; }
.protocol-selectors > div { min-width: 0; }
.protocol-selectors label { margin-bottom: 6px; }
.protocol-selectors .btn-primary { white-space: nowrap; }
.protocol-station-picker { position: relative; }
.protocol-station-control { position: relative; }
.protocol-station-input { display: none; }
.protocol-station-picker.is-enhanced .protocol-station-input { display: block; }
.protocol-station-picker.is-enhanced .protocol-station-fallback { display: none; }
.protocol-station-toggle { display: none; }
.protocol-station-picker.is-enhanced .protocol-station-toggle { display: inline-flex; align-items: center; justify-content: center; position: absolute; top: 4px; right: 4px; width: 36px; height: 36px; border: 0; border-radius: var(--sed-radius-control); background: transparent; color: var(--muted); cursor: pointer; }
.protocol-station-toggle svg { width: 18px; height: 18px; transition: transform 140ms ease; }
.protocol-station-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.protocol-station-picker.is-enhanced .protocol-station-toggle:hover { background: rgb(var(--sed-accent) / 0.07); color: var(--accent-dark); }
.protocol-station-picker.is-enhanced .protocol-station-toggle:disabled { cursor: default; opacity: 0.5; }
.protocol-station-picker.is-enhanced .protocol-station-input { padding-right: 46px; }
.protocol-station-input::-webkit-search-cancel-button { display: none; }
.protocol-station-picker > .protocol-search-hint { position: absolute; top: calc(100% + 4px); left: 0; right: 0; min-height: 18px; margin: 0; }
.protocol-station-options { min-width: min(320px, calc(100vw - 24px)); }
.protocol-station-option { display: block; width: 100%; border: 0; background: transparent; text-align: left; }
.protocol-intro { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin: 24px 0 16px; }
.protocol-intro h2 { margin: 0; font-size: 22px; font-weight: 600; }
.protocol-intro p, .protocol-meta { margin-top: 6px; font-size: 14px; color: var(--muted); }
.protocol-empty-state { background: rgb(var(--sed-table-head) / 0.2); }
.workflow-step.is-current { border-color: rgb(var(--sed-accent) / 0.45); background: rgb(var(--sed-accent) / 0.07); }
.workflow-step.is-complete .workflow-step-number { background: rgb(var(--sed-success)); }
.protocol-help { margin-bottom: 20px; border: 1px solid var(--line); border-radius: var(--sed-radius-surface); background: var(--panel); }
.protocol-help summary { padding: 14px 18px; color: var(--accent-dark); font-size: 14px; font-weight: 600; cursor: pointer; }
.protocol-help-content { padding: 0 18px 16px; font-size: 14px; color: var(--muted); line-height: 1.65; }
.protocol-help-content p { margin: 8px 0; }
.protocol-section-nav { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0; }
.protocol-section-nav a { padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--sed-radius-control); background: white; color: var(--accent-dark); font-size: 14px; text-decoration: none; }
.protocol-section-nav a:hover { background: rgb(var(--sed-accent) / 0.07); border-color: var(--accent); }
.protocol-section { margin-top: 20px; scroll-margin-top: 112px; overflow: hidden; }
.protocol-section-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.protocol-section-toolbar h2 { margin: 0; font-size: 18px; font-weight: 600; color: var(--fg); }
.protocol-row-count { font-size: 13px; color: var(--muted); }
.protocol-add, .protocol-label-toggle { margin-left: auto; flex-shrink: 0; }
.protocol-table-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.protocol-table-actions .protocol-add { margin-left: 0; }
.protocol-table-help { margin: 8px 0 16px; color: var(--muted); font-size: 14px; }
.protocol-table-scroll { overflow: auto; width: 100%; border: 1px solid var(--line); border-radius: var(--sed-radius-control); scrollbar-color: rgb(var(--sed-muted) / 0.75) rgb(var(--sed-table-head)); scrollbar-width: auto; }
.protocol-table-scroll::-webkit-scrollbar { width: 12px; height: 12px; }
.protocol-table-scroll::-webkit-scrollbar-track { background: rgb(var(--sed-table-head)); }
.protocol-table-scroll::-webkit-scrollbar-thumb { background: rgb(var(--sed-muted) / 0.75); border: 3px solid rgb(var(--sed-table-head)); border-radius: var(--sed-radius-control); }
.protocol-scroll-hint { margin: 10px 0 0; color: var(--accent-dark); font-size: 13px; }
.protocol-scroll-hint[hidden], .protocol-options[hidden], .protocol-table-empty[hidden], .reference-synonyms [hidden] { display: none; }
.protocol-table-empty { display: grid; min-height: 150px; place-items: center; border: 1px dashed var(--line); border-radius: var(--sed-radius-control); background: rgb(var(--sed-table-head) / 0.35); padding: 28px; text-align: center; }
.protocol-table-empty strong { display: block; color: var(--fg); font-size: 14px; font-weight: 600; }
.protocol-table-empty span { display: block; max-width: 460px; margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.protocol-grid { width: 100%; min-width: 100%; table-layout: fixed; border-collapse: collapse; }
.protocol-grid th, .protocol-grid td { min-width: 0; padding: 12px; vertical-align: top; white-space: normal; overflow-wrap: anywhere; border: 1px solid var(--line); font-size: 14px; }
.protocol-grid thead th { background: rgb(var(--sed-table-head)); color: var(--muted); font-size: 13px; font-weight: 600; line-height: 1.45; text-align: left; }
.protocol-grid .field-input { min-width: 0; height: 44px; font-size: 14px; }
.protocol-grid-header { min-width: 820px; }
.protocol-grid-header .protocol-col-number { width: 56px; }
.protocol-grid-header tbody .protocol-static-cell { background: rgb(var(--sed-page)); color: var(--muted); line-height: 1.5; }
.protocol-grid-header .protocol-column-numbers th { padding: 4px 12px; color: var(--muted); font-size: 12px; font-weight: 400; background: rgb(var(--sed-border) / 0.7); }
.protocol-label-full, .protocol-full-labels .protocol-label-short { display: none; }
.protocol-full-labels .protocol-label-full { display: inline; }
.protocol-grid-body { width: max-content; }
.protocol-grid-body .protocol-col-number { width: 52px; }
.protocol-grid-body .protocol-col-group { width: 216px; }
.protocol-grid-body .protocol-col-species { width: 280px; }
.protocol-grid-body .protocol-col-value { width: 132px; }
.protocol-grid-body .protocol-col-actions { width: 106px; }
.protocol-grid-body th:first-child, .protocol-grid-body td:first-child { position: sticky; left: 0; z-index: 1; }
.protocol-grid-body thead th:first-child { z-index: 2; }
.protocol-grid-body .protocol-row-number { background: rgb(var(--sed-page)); color: var(--muted); text-align: center; font-weight: 500; }
.protocol-combobox { min-width: 0; }
.protocol-options { position: fixed; z-index: 60; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: var(--sed-radius-control); background: white; box-shadow: var(--sed-shadow-raised); padding: 4px; }
.protocol-option { min-height: 48px; padding: 10px 12px; border-radius: calc(var(--sed-radius-control) - 2px); cursor: pointer; white-space: normal; overflow-wrap: anywhere; line-height: 1.5; }
.protocol-option[aria-selected="true"], .protocol-option:hover { background: rgb(var(--sed-accent) / 0.07); box-shadow: inset 3px 0 var(--accent); }
.protocol-option-title { display: block; font-size: 15px; font-weight: 600; color: var(--fg); }
.protocol-option-group { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }
.protocol-option-synonym { display: block; margin-top: 6px; padding: 6px 8px; border-radius: calc(var(--sed-radius-control) - 2px); background: rgb(var(--sed-table-head)); color: var(--fg); font-size: 14px; }
.protocol-search-hint { font-size: 13px; color: var(--muted); line-height: 1.5; margin-top: 7px; }
.protocol-selected-group { padding: 6px 8px; margin-bottom: 8px; border-radius: calc(var(--sed-radius-control) - 2px); background: rgb(var(--sed-accent) / 0.07); color: var(--accent-dark); font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.protocol-clear { margin-top: 10px; font-size: 14px; text-decoration: none; background: white; color: var(--fg); border: 1px solid var(--line); }
.protocol-clear:hover { background: rgb(var(--sed-table-head)); color: var(--fg); }
.protocol-clear:disabled { background: rgb(var(--sed-page)); color: var(--muted); opacity: 1; cursor: default; }
.protocol-remove { padding: 0 10px; font-size: 13px; }
.protocol-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; padding: 16px 0; }
.reference-synonyms { min-width: 300px; max-width: 600px; }
.reference-synonym-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.reference-synonym-item { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; padding: 6px 8px 6px 12px; border: 1px solid rgb(var(--sed-accent) / 0.25); border-radius: var(--sed-radius-control); background: rgb(var(--sed-accent) / 0.07); color: var(--accent-dark); font-size: 14px; }
.reference-synonym-text { overflow-wrap: anywhere; white-space: normal; }
.reference-synonym-remove { flex-shrink: 0; min-height: 30px; height: 30px; padding: 0 10px; border: 1px solid rgb(var(--sed-danger) / 0.4); border-radius: var(--sed-radius-control); background: white; color: var(--danger); font-size: 13px; font-weight: 500; line-height: 1; }
.reference-synonym-remove:hover { border-color: var(--danger); background: rgb(var(--sed-danger) / 0.07); color: var(--danger); }
.reference-synonym-entry { display: block; }
.reference-synonym-entry-actions { display: flex; align-items: start; gap: 8px; }
.reference-synonym-entry .reference-synonym-input { flex: 1; min-width: 0; height: 44px; }
.reference-synonym-add { flex-shrink: 0; height: 44px; }
.reference-synonym-help, .reference-synonym-status, .reference-synonym-empty { margin: 8px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.reference-synonyms textarea { min-height: 100px; height: auto; resize: vertical; }
@media (max-width: 900px) {
    .protocol-selectors { grid-template-columns: 1fr; }
    .protocol-intro { display: block; }
    .protocol-section { padding: 16px; }
    .protocol-add, .protocol-label-toggle { margin-left: 0; }
}

/* Site directory and seasonal report use the shared SED surfaces and controls. */
.site-directory-grid { display: grid; grid-template-columns: minmax(420px, .9fr) minmax(520px, 1.1fr); gap: 20px; align-items: start; }
.site-row-selected { background: rgb(var(--sed-accent) / .07); box-shadow: inset 3px 0 var(--accent); }
.site-row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.btn-icon { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: var(--sed-radius-control); background: white; color: var(--accent-dark); font-weight: 700; cursor: pointer; }
.btn-icon:hover { border-color: var(--accent); background: rgb(var(--sed-accent) / .07); }
.site-readonly-value { display: inline-flex; min-height: 40px; align-items: center; color: var(--fg); }
.site-station-picker { width: min(640px, calc(100vw - 32px)); }
.station-choice-list { max-height: 360px; overflow: auto; margin-top: 10px; padding: 6px; border: 1px solid var(--line); border-radius: var(--sed-radius-control); background: rgb(var(--sed-page)); }
.station-choice { display: flex; min-height: 42px; align-items: center; gap: 9px; padding: 8px 10px; border-radius: var(--sed-radius-control); cursor: pointer; }
.station-choice:hover { background: white; box-shadow: inset 3px 0 var(--accent); }
.station-choice[hidden] { display: none; }
.status-warning { display: inline-flex; padding: 2px 7px; border-radius: 999px; background: rgb(var(--sed-warning) / .12); color: #815900; font-size: 12px; font-weight: 600; }

.seasonal-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(190px, 1fr)); gap: 14px; align-items: end; }
.seasonal-site-selector { position: relative; }
.seasonal-site-menu { position: absolute; z-index: 45; top: calc(100% + 6px); right: 0; width: max(100%, 300px); max-height: 360px; overflow: auto; padding: 10px; border: 1px solid var(--line); border-radius: var(--sed-radius-control); background: white; box-shadow: var(--sed-shadow-raised); }
.seasonal-site-option { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: var(--sed-radius-control); cursor: pointer; }
.seasonal-site-option:hover { background: rgb(var(--sed-accent) / .07); }
.seasonal-workspace { min-width: 0; }
.seasonal-table-shell { max-height: calc(100vh - 280px); overflow: auto; scrollbar-gutter: stable; }
.seasonal-table { width: max-content; min-width: 100%; }
.seasonal-table th, .seasonal-table td { min-width: 118px; padding: 7px; text-align: center; vertical-align: middle; white-space: normal; }
.seasonal-optional-header::after { content: " (опц.)"; color: var(--muted); font-size: 10px; font-weight: 400; white-space: nowrap; }
.seasonal-table .station-col { position: sticky; left: 0; z-index: 2; min-width: 210px; text-align: left; background: white; }
.seasonal-table thead .station-col { z-index: 4; background: rgb(var(--sed-table-head)); }
.seasonal-table .horizon-col { min-width: 130px; }
.seasonal-table .seasonal-number-col { min-width: 58px; width: 58px; }
.seasonal-table .seasonal-species-name { min-width: 230px; text-align: left; }
.seasonal-species-band { background: rgb(var(--sed-accent) / .12) !important; }
.seasonal-species-row-group th, .seasonal-species-row-group td { background: rgb(var(--sed-accent) / .08); font-weight: 700; }
.seasonal-species-group { text-align: left !important; color: var(--accent-dark); }
.seasonal-species-row-total th, .seasonal-species-row-total td { background: rgb(var(--sed-table-head) / .72); font-weight: 700; }
.seasonal-site-row th { position: sticky; left: 0; z-index: 3; min-width: 100%; background: rgb(var(--sed-accent) / .10); color: var(--accent-dark); text-align: left; }
.seasonal-site-name { font-size: 15px; font-weight: 700; }
.seasonal-site-meta { margin-left: 12px; color: var(--muted); font-size: 12px; font-weight: 400; }
.seasonal-cell { width: 100%; min-width: 104px; height: 36px; border: 1px solid var(--line); border-radius: 5px; padding: 5px 7px; background: white; text-align: center; }
.seasonal-cell:focus { outline: 2px solid rgb(var(--sed-accent) / .35); border-color: var(--accent); }
.seasonal-cell-invalid { border-color: var(--danger) !important; background: rgb(var(--sed-danger) / .07) !important; }
.seasonal-sum { font-weight: 600; }
.seasonal-row-action, .seasonal-remove-row { margin-left: 8px; border: 0; background: transparent; color: var(--accent-dark); font-size: 12px; font-weight: 600; cursor: pointer; }
.seasonal-remove-row { color: var(--danger); font-size: 18px; }
.seasonal-add-row td { padding: 6px 10px; background: rgb(var(--sed-page)); text-align: left; }
.seasonal-total-row th, .seasonal-total-row td { background: rgb(var(--sed-table-head) / .72); font-weight: 600; }
.seasonal-total-row .station-col { background: rgb(var(--sed-table-head)); }
.seasonal-total-dirty { opacity: .55; }
.seasonal-total-note { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 400; }
.seasonal-limit-row th, .seasonal-limit-row td { border-top: 2px solid var(--accent); background: rgb(var(--sed-success) / .06); }
.seasonal-report-modal { width: min(560px, calc(100vw - 32px)); }
.seasonal-report-form { display: grid; gap: 14px; }
.seasonal-rule-option { display: inline-flex; align-items: center; gap: 6px; margin: 4px 14px 4px 0; font-size: 14px; font-weight: 500; }
.seasonal-management-modal { width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; }
.seasonal-management-list { display: grid; gap: 14px; }
.seasonal-management-item { display: grid; grid-template-columns: minmax(220px, 1.2fr) minmax(220px, .8fr); gap: 12px 18px; padding: 16px; border: 1px solid var(--line); border-radius: var(--sed-radius-control); background: rgb(var(--sed-page)); }
.seasonal-management-wide { grid-column: 1 / -1; }

@media (max-width: 1100px) {
    .site-directory-grid { grid-template-columns: 1fr; }
    .seasonal-filter-grid { grid-template-columns: repeat(2, minmax(190px, 1fr)); }
}
@media (max-width: 720px) {
    .seasonal-filter-grid, .seasonal-management-item { grid-template-columns: 1fr; }
    .site-directory-grid { display: block; }
    .site-directory-grid > .card + .card { margin-top: 16px; }
}

/* Итоговая таблица: загрузчик и пагинация */
.summary-loader {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgb(var(--sed-overlay) / 0.45);
}

.summary-loader[hidden] {
    display: none !important;
}

.summary-loader__card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 24px;
    border: 1px solid var(--line);
    border-radius: var(--sed-radius-surface);
    background: var(--panel);
    color: var(--fg);
    box-shadow: var(--sed-shadow-raised);
    font-family: var(--sed-font-sans);
    font-size: 14px;
    font-weight: 500;
}

.summary-spinner {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border: 3px solid rgb(var(--sed-accent) / 0.25);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: summary-spin 0.8s linear infinite;
}

@keyframes summary-spin {
    to { transform: rotate(360deg); }
}

.summary-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 16px;
}

.summary-pager[hidden] {
    display: none !important;
}

.summary-pager-info {
    min-width: 180px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.summary-page-size {
    width: auto;
    min-width: 72px;
}

.summary-project-picker {
    position: relative;
}

.summary-search-results {
    position: absolute;
    z-index: 40;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 240px;
    overflow-y: auto;
    margin: 0;
    padding: 4px;
    list-style: none;
    border: 1px solid var(--line);
    border-radius: var(--sed-radius-surface);
    background: var(--panel);
    box-shadow: var(--sed-shadow-raised);
}

.summary-search-results[hidden] {
    display: none;
}

.summary-search-result {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--fg);
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}

.summary-search-result:hover,
.summary-search-result.is-active {
    background: var(--line);
}

.summary-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 6px 5px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel);
    color: var(--fg);
    font-size: 13px;
}

.summary-pill__name {
    line-height: 1.4;
}

.summary-pill__remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.summary-pill__remove:hover {
    background: var(--line);
    color: var(--fg);
}

.summary-group-row td {
    padding: 8px 10px;
    background: var(--sed-table-head, rgba(0, 0, 0, 0.04));
    color: var(--fg);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
}
