* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f6f7f9;
    color: #1b1f24;
    line-height: 1.4;
}

.topbar {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 60;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 28px;
    background: #123c55;
    color: white;
}

.topbar nav {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.brand,
.topbar a {
    color: white;
    text-decoration: none;
}

.brand {
    font-weight: 700;
}

.environment-badge {
    flex: 0 0 auto;
    padding: 5px 12px;
    background: #dc2626;
    color: white;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: .04em;
}

.auth-user {
    color: #d8e7ef;
    font-size: 14px;
}

.language-switch {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    color: #d8e7ef;
    font-size: 13px;
    font-weight: 700;
}

.profile-menu {
    position: relative;
}

.profile-menu summary {
    min-height: 34px;
    padding: 6px 28px 6px 10px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    cursor: pointer;
    list-style: none;
}

.profile-menu summary::-webkit-details-marker {
    display: none;
}

.profile-menu summary::after {
    position: absolute;
    right: 10px;
    top: 9px;
    content: "\25BE";
    color: #d8e7ef;
    font-size: 11px;
}

.profile-menu[open] summary::after {
    content: "\25B4";
}

.profile-menu-panel {
    position: absolute;
    right: 0;
    z-index: 30;
    display: grid;
    gap: 4px;
    min-width: 190px;
    margin-top: 6px;
    padding: 8px;
    border: 1px solid #c8d0da;
    border-radius: 6px;
    background: white;
    box-shadow: 0 10px 24px rgba(17, 24, 39, .16);
}

.profile-menu-panel span {
    padding: 6px 8px;
    color: #53606d;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.profile-menu-panel a {
    padding: 7px 8px;
    border-radius: 4px;
    color: #123c55;
}

.profile-menu-panel a:hover {
    background: #eef2f5;
    text-decoration: none;
}

.page-shell {
    max-width: 1600px;
    margin: 0 auto;
    padding: 28px;
}

.page-header {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 18px;
}

h1 {
    margin: 0 0 6px;
    font-size: 28px;
}

p {
    margin: 0;
    color: #53606d;
}

.filter-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

input,
select,
textarea {
    min-width: 140px;
    padding: 8px 10px;
    border: 1px solid #c8d0da;
    border-radius: 4px;
    background: white;
    font: inherit;
}

button {
    min-height: 40px;
    padding: 9px 14px;
    border: 0;
    border-radius: 4px;
    background: #123c55;
    color: white;
    cursor: pointer;
    font-weight: 700;
}

button:disabled,
button[aria-disabled="true"] {
    border: 1px solid #cbd5e1;
    background: #e5e7eb;
    color: #6b7280;
    cursor: not-allowed;
    opacity: 1;
    box-shadow: none;
}

button:disabled:hover,
button[aria-disabled="true"]:hover {
    background: #e5e7eb;
    color: #6b7280;
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 14px;
    border: 1px solid #b8d7e8;
    border-radius: 4px;
    background: #e8f4fb;
    color: #123c55;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
}

.secondary-button:visited {
    color: #123c55;
}

.secondary-button:hover {
    background: #d8ecf8;
    text-decoration: none;
}

.button-link {
    display: inline-block;
    min-height: 40px;
    padding: 9px 14px;
    border-radius: 4px;
    background: #123c55;
    color: white;
    font-weight: 700;
    text-decoration: none;
}

.button-link:hover {
    background: #0d2e42;
}

.button-link.secondary-button {
    border: 1px solid #b8d7e8;
    background: #e8f4fb;
    color: #123c55;
}

.button-helper-text {
    flex-basis: 100%;
    max-width: 620px;
    padding: 6px 8px;
    border-left: 3px solid #b8d7e8;
    background: #f1f7fb;
    color: #374151;
    font-size: 14px;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(17, 24, 39, .46);
}

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

.modal-dialog {
    width: min(560px, 100%);
    padding: 18px;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(17, 24, 39, .28);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.modal-header h2 {
    margin: 0;
    font-size: 22px;
}

.modal-close-button {
    min-height: 32px;
    padding: 4px 10px;
    border: 1px solid #c8d0da;
    background: #fff;
    color: #123c55;
    font-size: 20px;
    line-height: 1;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.help-section-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.help-section-nav a {
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid #c8d0da;
    border-radius: 4px;
    background: white;
    color: #123c55;
    font-weight: 700;
    text-decoration: none;
}

.help-section {
    margin-bottom: 26px;
}

.local-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.local-nav a {
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid #c8d0da;
    border-radius: 4px;
    background: white;
    color: #123c55;
    font-weight: 700;
    text-decoration: none;
}

.help-section-heading {
    margin-bottom: 12px;
}

.help-section-heading h2 {
    margin: 0 0 4px;
    font-size: 22px;
}

.help-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.help-card-grid-compact {
    grid-template-columns: minmax(0, 1fr);
}

.help-card {
    min-width: 0;
    padding: 12px 14px 14px;
    border: 1px solid #d8dee6;
    border-radius: 6px;
    background: white;
}

.help-card h3 {
    margin: 0 0 10px;
    color: #123c55;
    font-size: 16px;
    font-weight: 700;
}

.help-card ul {
    margin: 0;
    padding: 0 0 12px 18px;
}

.help-card li {
    margin-bottom: 7px;
    color: #374151;
}

.help-card .button-link {
    margin: 0;
}

.review-filters {
    display: grid;
    grid-template-columns: minmax(260px, 1.7fr) minmax(130px, .8fr) minmax(210px, 1.1fr) minmax(190px, 1fr) auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 14px;
    padding: 12px;
    background: white;
    border: 1px solid #d8dee6;
    border-radius: 6px;
}

.admin-task-filters {
    grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) minmax(210px, 1.2fr) minmax(180px, 1fr);
}

.admin-task-filters .filter-search {
    grid-column: 1 / 4;
}

.admin-task-filters .filter-actions {
    grid-column: 4;
}

.journal-entry-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.maintenance-filter-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: stretch;
}

.maintenance-filter-row {
    min-width: 0;
}

.maintenance-filter-structured {
    display: grid;
    grid-template-columns:
        minmax(150px, 1fr)
        minmax(240px, 1.7fr)
        minmax(170px, 1fr)
        minmax(170px, 1fr);
    gap: 10px;
    align-items: end;
}

.maintenance-filter-search-row {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.maintenance-filter-card .filter-actions {
    justify-content: center;
    padding-top: 2px;
}

.maintenance-filter-card .filter-search {
    min-width: 0;
}

.maintenance-filter-search-actions {
    justify-content: flex-start;
}

.maintenance-filter-card .maintenance-area-dropdown .checkbox-dropdown-panel {
    width: max(100%, 320px);
    max-width: min(520px, calc(100vw - 48px));
}

.maintenance-filter-card .maintenance-area-dropdown .checkbox-option {
    align-items: center;
    overflow-wrap: normal;
    word-break: normal;
}

.maintenance-filter-card .maintenance-area-dropdown .checkbox-option span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 1199px) {
    .maintenance-filter-structured {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }
}

@media (max-width: 991px) {
    .maintenance-filter-structured,
    .maintenance-filter-search-row {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }
}

.filter-field {
    min-width: 0;
}

.filter-field label,
.form-label {
    display: block;
    margin-bottom: 5px;
    color: #53606d;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.filter-field input,
.filter-field select {
    width: 100%;
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
    flex-wrap: nowrap;
}

.checkbox-dropdown {
    position: relative;
    width: 100%;
}

.checkbox-dropdown summary {
    min-height: 38px;
    padding: 8px 34px 8px 10px;
    border: 1px solid #c8d0da;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    list-style: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.checkbox-dropdown summary::-webkit-details-marker {
    display: none;
}

.checkbox-dropdown summary::after {
    position: absolute;
    right: 11px;
    top: 11px;
    content: "\25BE";
    color: #53606d;
    font-size: 12px;
}

.checkbox-dropdown[open] summary::after {
    content: "\25B4";
}

.checkbox-dropdown-panel {
    position: absolute;
    z-index: 20;
    width: 100%;
    max-height: 280px;
    margin-top: 4px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px;
    border: 1px solid #c8d0da;
    border-radius: 4px;
    background: white;
    box-shadow: 0 10px 24px rgba(17, 24, 39, .16);
}

.checkbox-option {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 7px 6px;
    border-radius: 4px;
    color: #1b1f24;
    cursor: pointer;
    line-height: 1.3;
    overflow-wrap: anywhere;
    width: 100%;
}

.checkbox-option:hover {
    background: #eef2f5;
}

.checkbox-option input {
    flex: 0 0 18px;
    width: 18px;
    min-width: 18px;
    max-width: 18px;
    margin-top: 2px;
}

.checkbox-option span {
    flex: 1 1 auto;
    min-width: 0;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-page {
    display: grid;
    gap: 14px;
}

.dashboard-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-section {
    display: grid;
    gap: 10px;
    margin-bottom: 22px;
}

.dashboard-section h1 {
    margin-bottom: 0;
}

.dashboard-card {
    position: relative;
    display: grid;
    grid-template-rows: auto auto 1fr;
    gap: 8px;
    min-height: 132px;
    padding: 16px 16px 15px 24px;
    border: 1px solid #d8dee6;
    border-radius: 6px;
    background: white;
    color: #1b1f24;
    text-decoration: none;
    overflow: hidden;
}

.dashboard-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 8px;
    content: "";
}

.dashboard-card:hover {
    border-color: #94a3b8;
    box-shadow: 0 8px 22px rgba(17, 24, 39, .10);
}

.dashboard-card:focus-visible,
.whiteboard-card:focus-visible,
.pagination-page:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 3px;
}

.dashboard-card span {
    color: #53606d;
    font-size: 15px;
    font-weight: 700;
}

.dashboard-card small {
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
}

.dashboard-card strong {
    align-self: end;
    font-size: 34px;
    line-height: 1;
}

.dashboard-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    color: #123c55;
    font-style: normal;
    line-height: 1;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.25;
}

.dashboard-card-icon-warning path:first-child {
    fill: none;
}

.dashboard-section-divider {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    margin: 0 0 2px;
    color: #6b7280;
}

.dashboard-section-divider span {
    height: 2px;
    border-top: 2px solid #94a3b8;
}

.dashboard-section-divider i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #d8dee6;
    border-radius: 50%;
    background: #f1f3f6;
    font-style: normal;
    line-height: 1;
}

.dashboard-hint {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 12px;
    align-items: start;
    padding: 10px 14px;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    background: #eff6ff;
    color: #1b1f24;
}

.dashboard-hint strong {
    color: #123c55;
}

.dashboard-hint span {
    min-width: 0;
    color: #374151;
}

.dashboard-page .dashboard-section {
    gap: 8px;
    margin-bottom: 0;
}

.dashboard-page .dashboard-section h1 {
    font-size: 26px;
}

.dashboard-page .dashboard-card {
    gap: 6px;
    min-height: 118px;
    padding: 13px 14px 12px 22px;
}

.dashboard-page .dashboard-card strong {
    font-size: 32px;
}

.dashboard-page .dashboard-card small {
    font-size: 13px;
}

.dashboard-page .dashboard-section-divider {
    gap: 10px;
    margin: 0;
}

.dashboard-page .dashboard-section-divider i {
    width: 30px;
    height: 30px;
}

.dashboard-page .dashboard-hint {
    padding: 8px 12px;
}

.detail-header {
    min-width: 0;
}

.detail-header h1 {
    overflow-wrap: anywhere;
}


.project-detail-actions {
    align-items: stretch;
    width: 100%;
}

.project-action-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.overdue-card {
    border-color: #fecaca;
    background: #fff5f5;
}

.overdue-card::before {
    background: #dc2626;
}

.overdue-card .dashboard-card-icon {
    color: #dc2626;
}

.due-card {
    border-color: #fde68a;
    background: #fffbeb;
}

.due-card::before {
    background: #d97706;
}

.due-card .dashboard-card-icon {
    color: #d97706;
}

.upcoming-card {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.upcoming-card::before {
    background: #16a34a;
}

.upcoming-card .dashboard-card-icon {
    color: #16a34a;
}

.feedback-card {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.feedback-card::before {
    background: #2563eb;
}

.feedback-card .dashboard-card-icon {
    color: #2563eb;
}

.summary-grid div {
    background: white;
    border: 1px solid #d8dee6;
    border-radius: 6px;
    padding: 14px;
}

.summary-grid a {
    display: block;
    background: white;
    border: 1px solid #d8dee6;
    border-radius: 6px;
    padding: 14px;
    color: inherit;
    text-decoration: none;
}

.summary-grid strong {
    display: block;
    font-size: 24px;
}

.summary-grid span {
    color: #53606d;
}

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: white;
    border: 1px solid #d8dee6;
    border-radius: 6px;
}

.admin-table-wrap {
    max-height: 70vh;
    overflow: auto;
}

.maintenance-overview-table-wrap {
    max-height: calc(100vh - 380px);
    min-height: 260px;
    overflow: auto;
}

.maintenance-overview-table-wrap th,
.admin-maintenance-table-wrap th {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #eef2f5;
    box-shadow: 0 1px 0 #d8dee6;
}

.admin-table-wrap th {
    min-width: 96px;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: auto;
}

.admin-table-wrap .col-id,
.admin-table-wrap .col-status {
    min-width: 82px;
}

.admin-table-wrap .col-actions {
    min-width: 124px;
    white-space: nowrap;
}

.admin-table-wrap th,
.admin-table-wrap td {
    padding: 5px 7px;
    overflow-wrap: normal;
    word-break: normal;
}

.admin-table-wrap td {
    overflow-wrap: anywhere;
}

.admin-table-wrap .task-link {
    white-space: nowrap;
}

.sortable-header {
    align-items: center;
    color: inherit;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    min-height: 38px;
    min-width: 44px;
    padding: 6px 8px;
    margin: -6px -8px;
    border-radius: 6px;
    text-decoration: none;
    touch-action: manipulation;
}

.sortable-header:hover,
.sortable-header:focus {
    background: rgba(18, 60, 85, .08);
    text-decoration: underline;
}

.sortable-header span {
    display: inline-flex;
    gap: 2px;
    min-width: 2.2ch;
    color: #7b8794;
    font-size: 0;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

.sortable-header span::before {
    content: "↑";
    font-size: 13px;
}

.sortable-header span::after {
    content: "↓";
    font-size: 13px;
}

th[aria-sort="ascending"] .sortable-header span::before,
th[aria-sort="descending"] .sortable-header span::after {
    color: #123c55;
    font-weight: 700;
    transform: scale(1.25);
}

th[aria-sort="ascending"] .sortable-header span::after,
th[aria-sort="descending"] .sortable-header span::before {
    color: #9aa4b2;
    font-weight: 600;
    transform: none;
}

.sortable-header.is-sorted {
    color: #123c55;
    font-weight: 700;
}

.admin-maintenance-table {
    min-width: 980px;
}

.maintenance-overview-table {
    min-width: 960px;
}

.admin-maintenance-table .col-id {
    min-width: 48px;
    width: 48px;
}

.admin-maintenance-table .col-status {
    min-width: 86px;
    width: 86px;
}

.admin-maintenance-table .col-building {
    min-width: 150px;
}

.admin-maintenance-table .col-location {
    min-width: 150px;
}

.admin-maintenance-table .col-maintenance-object {
    min-width: 220px;
}

.admin-maintenance-table .col-priority {
    min-width: 98px;
    width: 98px;
}

.admin-maintenance-table .col-date {
    min-width: 118px;
}

.admin-maintenance-table .col-actions {
    min-width: 104px;
    width: 104px;
}

.admin-maintenance-table .col-active-status {
    min-width: 76px;
    width: 76px;
}

.admin-users-table {
    min-width: 1120px;
}

.admin-users-table th,
.admin-users-table td {
    overflow-wrap: normal;
    word-break: normal;
}

.admin-users-table .col-username {
    min-width: 132px;
}

.admin-users-table .col-display-name {
    min-width: 180px;
}

.admin-users-table .col-role,
.admin-users-table .col-active {
    min-width: 104px;
}

.admin-users-table .col-date {
    min-width: 150px;
}

.admin-users-table .col-password-required {
    min-width: 170px;
}

.admin-users-table .col-actions {
    min-width: 112px;
    width: 112px;
}

.project-table {
    min-width: 920px;
}

.project-table-wrap th {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #eef2f5;
    box-shadow: 0 1px 0 #d8dee6;
}

.project-status {
    background: #eef2f5;
    color: #123c55;
}

.deleted-row {
    color: #6b7280;
    text-decoration: line-through;
}

table {
    width: 100%;
    min-width: 960px;
    border-collapse: collapse;
    table-layout: auto;
}

th,
td {
    padding: 10px 12px;
    border-bottom: 1px solid #e6e9ee;
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

th {
    background: #eef2f5;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .02em;
    overflow-wrap: normal;
    white-space: nowrap;
    word-break: keep-all;
    hyphens: none;
}

.empty-table-message {
    padding: 22px;
    color: #53606d;
    font-weight: 700;
    text-align: center;
}

.col-id {
    min-width: 74px;
}

.col-status {
    min-width: 96px;
}

.col-priority {
    min-width: 96px;
}

.col-date {
    min-width: 138px;
}

.col-days {
    min-width: 142px;
}

.col-actions {
    min-width: 118px;
}

small {
    display: block;
    max-width: 420px;
    margin-top: 4px;
    color: #53606d;
}

.description {
    max-width: 360px;
    margin-top: 0;
}

.keyword-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

.keyword-tag {
    display: inline-flex;
    max-width: 100%;
    padding: 2px 7px;
    border: 1px solid #c8d0da;
    border-radius: 999px;
    background: #f8fafc;
    color: #374151;
    font-size: 12px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.task-link {
    color: #123c55;
    text-decoration: none;
}

.task-link:hover,
.back-link:hover {
    text-decoration: underline;
}

.details-pill {
    display: inline-block;
    padding: 5px 11px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #e8f4fb;
    color: #123c55;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.details-pill:hover {
    background: #d8ecf8;
}

.project-journal-actions {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

.danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 14px;
    border: 1px solid #fecaca;
    border-radius: 4px;
    background: #fee2e2;
    color: #991b1b;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}

.danger-button:hover {
    background: #fecaca;
    text-decoration: none;
}

.back-link {
    display: inline-block;
    margin-bottom: 18px;
    color: #123c55;
    font-weight: 700;
    text-decoration: none;
}

.detail-header {
    align-items: center;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.project-detail-header {
    align-items: stretch;
    flex-wrap: wrap;
}

.project-detail-header > div:first-child {
    flex: 1 1 100%;
    min-width: 0;
}

.project-detail-header .project-detail-actions {
    flex: 1 1 100%;
}

.success-message {
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid #a8d8b8;
    border-radius: 6px;
    background: #e7f7ec;
    color: #146b2e;
    font-weight: 700;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.detail-panel {
    margin-bottom: 20px;
}

.detail-panel h2 {
    margin: 0 0 12px;
    font-size: 20px;
}

.field {
    min-width: 0;
    padding: 14px;
    background: white;
    border: 1px solid #d8dee6;
    border-radius: 6px;
}

.field-wide {
    grid-column: 1 / -1;
}

.field-label {
    display: block;
    margin-bottom: 6px;
    color: #53606d;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.field-value {
    display: block;
    overflow-wrap: anywhere;
    line-height: 1.45;
}

.long-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.completion-form {
    display: grid;
    gap: 14px;
    padding: 18px;
    background: white;
    border: 1px solid #d8dee6;
    border-radius: 6px;
}

.auth-form {
    max-width: 460px;
    display: grid;
    gap: 14px;
    padding: 18px;
    background: white;
    border: 1px solid #d8dee6;
    border-radius: 6px;
}

.auth-links {
    max-width: 460px;
    margin-top: 12px;
    text-align: center;
}

.auth-links a {
    color: #315d72;
    font-size: 14px;
    font-weight: 700;
}

.legal-notice {
    display: grid;
    gap: 18px;
    max-width: 820px;
    padding: 22px;
    border: 1px solid #d8dee6;
    border-radius: 6px;
    background: white;
}

.legal-notice h2 {
    margin: 0 0 6px;
    font-size: 18px;
}

.legal-notice p {
    line-height: 1.65;
}

.legal-notice a {
    overflow-wrap: anywhere;
}

.task-admin-form {
    display: grid;
    gap: 14px;
    padding: 18px;
    background: white;
    border: 1px solid #d8dee6;
    border-radius: 6px;
}

.project-form-top {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.project-form-content {
    grid-column: 1 / -1;
}

.project-journal-form .form-section {
    background: #fbfdff;
}

.journal-meta-fields {
    grid-template-columns: minmax(130px, .7fr) minmax(180px, 1fr);
}

.readonly-field {
    display: grid;
    gap: 6px;
    padding: 10px;
    border: 1px solid #d8dee6;
    border-radius: 4px;
    background: white;
}

.schedule-form-row {
    display: grid;
    grid-template-columns: minmax(96px, .6fr) minmax(140px, .9fr) minmax(170px, 1fr) minmax(140px, .9fr);
    gap: 12px;
}

.checkbox-field {
    display: flex;
    gap: 8px;
    align-items: center;
    color: #53606d;
}

.checkbox-field input,
.radio-field input {
    min-width: auto;
}

.radio-field {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin-right: 18px;
    color: #1b1f24;
    font-weight: 700;
}

.mode-fieldset {
    margin: 0;
    padding: 12px;
    border: 1px solid #d8dee6;
    border-radius: 6px;
}

.mode-fieldset legend {
    padding: 0 4px;
    color: #53606d;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.form-section {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid #d8dee6;
    border-radius: 6px;
    background: #f8fafc;
}

.form-section h2 {
    margin: 0;
    font-size: 18px;
}

.form-field {
    display: grid;
    gap: 6px;
}

.form-field[data-planner-feedback-source-group][hidden] {
    display: none;
}

.form-field label {
    color: #53606d;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #c8d0da;
    border-radius: 4px;
    font-family: inherit;
}

.form-field select {
    width: 100%;
}

.inline-field-group {
    display: grid;
    grid-template-columns: minmax(90px, .7fr) minmax(130px, 1fr);
    gap: 8px;
}

.inline-action-form {
    margin-top: 10px;
}

.feedback-actions .inline-action-form {
    margin-top: 0;
}

.inline-action-form.no-margin {
    margin-top: 0;
}

.form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.form-actions a {
    display: inline-block;
    min-height: 40px;
    padding: 9px 14px;
    border: 1px solid #b8d7e8;
    border-radius: 4px;
    background: #e8f4fb;
    color: #123c55;
    font-weight: 700;
    text-decoration: none;
}

.form-actions a:hover {
    background: #d8ecf8;
}

.advanced-section {
    padding: 12px;
    border: 1px solid #d8dee6;
    border-radius: 6px;
    background: #f8fafc;
}

.advanced-section summary {
    cursor: pointer;
    color: #123c55;
    font-weight: 700;
}

.advanced-section p {
    margin: 8px 0 12px;
}

.validation-summary,
.validation-message {
    color: #a62920;
    font-weight: 700;
}

.sensitive-panel {
    padding: 18px;
    background: white;
    border: 1px solid #d8dee6;
    border-radius: 6px;
}

.attachments-panel {
    margin-bottom: 20px;
    padding: 18px;
    background: white;
    border: 1px solid #d8dee6;
    border-radius: 6px;
}

.events-panel {
    margin-bottom: 20px;
    padding: 18px;
    background: white;
    border: 1px solid #d8dee6;
    border-radius: 6px;
}

.events-panel h2,
.attachments-panel h2 {
    margin: 0 0 12px;
    font-size: 20px;
}

.events-panel summary {
    cursor: pointer;
    color: #123c55;
    font-size: 18px;
    font-weight: 700;
}

.compact-table {
    border: 0;
}

.compact-table table {
    min-width: 680px;
}

.journal-entry-line {
    min-width: 0;
}

.journal-field-label {
    font-weight: 700;
}

@media (min-width: 1200px) {
    .admin-table-wrap th {
        white-space: nowrap;
    }

    .admin-table-wrap td:last-child,
    .project-table td:last-child,
    .maintenance-overview-table td:last-child,
    .appointment-history-table td:last-child {
        white-space: nowrap;
    }

    .project-list-table th:nth-child(1),
    .project-list-table td:nth-child(1) {
        min-width: 220px;
    }

    .project-list-table th:nth-child(3),
    .project-list-table td:nth-child(3),
    .project-journal-table th:nth-child(3),
    .project-journal-table td:nth-child(3),
    .appointment-history-table th:nth-child(5),
    .appointment-history-table td:nth-child(5) {
        min-width: 320px;
    }

    .project-history-table th:nth-child(1),
    .project-history-table td:nth-child(1) {
        min-width: 220px;
    }
}

.print-body {
    background: white;
    color: #111827;
}

.print-report {
    max-width: none;
    padding: 18px;
}

.print-header {
    margin-bottom: 14px;
}

.print-header h1 {
    margin: 0 0 4px;
}

.print-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-bottom: 14px;
}

.print-actions a {
    text-decoration: none;
}

.print-table {
    min-width: 0;
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 11px;
}

.print-table th,
.print-table td {
    padding: 5px 6px;
    border: 1px solid #cbd5e1;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.print-table th {
    background: #eef2f5;
    font-size: 9.5px;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: keep-all;
}

.print-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
}

.print-col-id {
    width: 5%;
}

.print-col-building {
    width: 14%;
}

.print-col-location {
    width: 14%;
}

.print-col-area {
    width: 16%;
}

.print-col-description {
    width: 36%;
}

.print-col-date {
    width: 10%;
}

.print-col-done {
    width: 5%;
}

.print-done-marker {
    text-align: center;
    font-size: 14px;
    line-height: 1;
}

.individual-print-preview {
    padding: 18px;
}

.individual-preview-toolbar {
    max-width: 780px;
    margin: 0 auto 14px;
}

.preview-page-indicator {
    margin-bottom: 10px;
    font-weight: 700;
    text-align: center;
}

.maintenance-sheet-stack {
    display: block;
}

.maintenance-sheet:not(.is-active) {
    display: none;
}

.individual-print-preview.is-measuring .maintenance-sheet {
    position: absolute;
    left: -10000px;
    top: 0;
    display: flex !important;
    visibility: hidden;
}

.print-empty-state {
    max-width: 760px;
    margin: 48px auto;
    padding: 24px;
    border: 1px solid #d8dee6;
    border-radius: 6px;
    background: #fff;
}

.maintenance-work-sheet {
    page: maintenance-work-sheet;
    display: flex;
    flex-direction: column;
    width: min(186mm, 100%);
    min-height: 273mm;
    height: 273mm;
    margin: 0 auto 24px;
    padding: 8mm;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #111827;
    break-after: page;
    page-break-after: always;
    box-sizing: border-box;
    font-size: 15px;
    overflow: visible;
}

.maintenance-work-sheet.worksheet-layout-overflow {
    height: auto;
}

.maintenance-work-sheet:last-child {
    break-after: auto;
    page-break-after: auto;
}

.work-sheet-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    flex: 0 0 auto;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #111827;
}

.work-sheet-header h1 {
    margin: 0 0 6px;
    font-size: 28px;
}

.work-sheet-header p {
    margin: 0;
    color: #374151;
}

.work-sheet-id {
    min-width: 120px;
    padding: 10px 14px;
    border: 2px solid #111827;
    text-align: center;
}

.work-sheet-id span {
    display: block;
    color: #374151;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.work-sheet-id strong {
    font-size: 32px;
}

.work-sheet-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    flex: 0 0 auto;
    margin-bottom: 14px;
}

.work-sheet-field {
    padding: 10px;
    border: 1px solid #9ca3af;
}

.work-sheet-field span,
.handwriting-line span,
.handwriting-area span {
    display: block;
    margin-bottom: 5px;
    color: #374151;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.work-sheet-field strong {
    font-size: 17px;
    overflow-wrap: anywhere;
}

.work-sheet-section h2 {
    margin: 0 0 8px;
    font-size: 18px;
}

.work-sheet-section {
    flex: 0 0 auto;
}

.work-sheet-instruction {
    padding: 12px;
    border: 1px solid #111827;
    font-size: 16px;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.work-sheet-completion {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    flex: 1 1 auto;
    min-height: 0;
    margin-top: 14px;
}

.handwriting-line div,
.handwriting-area div {
    border: 1px solid #111827;
    background:
        repeating-linear-gradient(
            to bottom,
            transparent 0,
            transparent 31px,
            #d1d5db 32px
        );
}

.handwriting-line div {
    height: 46px;
}

.handwriting-area {
    grid-column: span 2;
}

.handwriting-area div {
    height: 55mm;
}

.worksheet-layout-compact .work-sheet-header {
    margin-bottom: 9px;
    padding-bottom: 7px;
}

.worksheet-layout-compact .work-sheet-grid {
    gap: 7px;
    margin-bottom: 9px;
}

.worksheet-layout-compact .work-sheet-field {
    padding: 7px;
}

.worksheet-layout-compact .work-sheet-instruction {
    padding: 9px;
}

.worksheet-layout-compact .work-sheet-completion {
    gap: 9px;
    margin-top: 9px;
}

.worksheet-layout-compact .handwriting-area div {
    height: 34mm;
}

.worksheet-layout-very-compact .work-sheet-header {
    margin-bottom: 6px;
    padding-bottom: 5px;
}

.worksheet-layout-very-compact .work-sheet-header h1 {
    font-size: 24px;
}

.worksheet-layout-very-compact .work-sheet-grid {
    gap: 5px;
    margin-bottom: 6px;
}

.worksheet-layout-very-compact .work-sheet-field {
    padding: 5px;
}

.worksheet-layout-very-compact .work-sheet-field strong {
    font-size: 15px;
}

.worksheet-layout-very-compact .work-sheet-section h2 {
    margin-bottom: 5px;
    font-size: 16px;
}

.worksheet-layout-very-compact .work-sheet-instruction {
    padding: 7px;
    font-size: 13.5px;
    line-height: 1.32;
}

.worksheet-layout-very-compact .work-sheet-completion {
    gap: 6px;
    margin-top: 6px;
}

.worksheet-layout-very-compact .handwriting-line div {
    height: 34px;
}

.worksheet-layout-very-compact .handwriting-area div {
    height: 22mm;
}

.attachment-list {
    display: grid;
    gap: 10px;
}

.attachment-item {
    display: grid;
    grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
    border: 1px solid #e6e9ee;
    border-radius: 6px;
}

.attachment-meta {
    display: grid;
    gap: 4px;
    color: #53606d;
    font-size: 13px;
}

.attachment-meta strong {
    color: #1b1f24;
}

.attachment-target {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.attachment-target a {
    color: #123c55;
}

.attachment-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.attachment-actions .button-link,
.attachment-actions button {
    flex: 0 0 auto;
}

.attachment-actions .button-link,
.attachment-actions .button-link:visited,
.attachment-actions .button-link:hover,
.attachment-actions .button-link:focus {
    color: #fff;
}

.attachment-unavailable {
    color: #53606d;
    font-weight: 700;
}

.feedback-warning {
    border-color: #fca5a5;
    background: #fff5f5;
}

.feedback-reviewed {
    border-color: #86efac;
    background: #f0fdf4;
}

.feedback-warning-text {
    color: #a62920;
    font-weight: 700;
}

.feedback-reviewed .feedback-warning-text {
    color: #166534;
}

.copy-feedback-message {
    color: #a62920;
    font-weight: 700;
}

.delete-warning-panel {
    padding: 18px;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    background: #fff5f5;
}

.delete-warning-panel p + p {
    margin-top: 8px;
}

.warning-note {
    color: #a62920;
    font-weight: 700;
}

.validation-popover-field {
    position: relative;
}

.field-validation-popover {
    position: absolute;
    z-index: 20;
    left: 0;
    top: calc(100% + 6px);
    max-width: min(320px, calc(100vw - 32px));
    padding: 8px 10px;
    border: 1px solid #fecaca;
    border-radius: 6px;
    background: #fff5f5;
    box-shadow: 0 8px 20px rgba(17, 24, 39, .14);
    color: #a62920;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.field-validation-popover::before {
    position: absolute;
    left: 14px;
    top: -6px;
    width: 10px;
    height: 10px;
    border-left: 1px solid #fecaca;
    border-top: 1px solid #fecaca;
    background: #fff5f5;
    content: "";
    transform: rotate(45deg);
}

.whiteboard-sections {
    display: grid;
    gap: 20px;
}

.whiteboard-section h2 {
    margin: 0 0 10px;
    font-size: 21px;
}

.whiteboard-card-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.whiteboard-card {
    min-width: 0;
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid #d8dee6;
    border-radius: 6px;
    background: white;
    color: inherit;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.whiteboard-card:hover {
    border-color: #94a3b8;
    box-shadow: 0 8px 20px rgba(17, 24, 39, .10);
    text-decoration: none;
    transform: translateY(-1px);
}

.whiteboard-card-overdue {
    border-color: #fca5a5;
    background: #fff5f5;
}

.whiteboard-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #53606d;
    font-size: 13px;
    font-weight: 700;
}

.whiteboard-card h3 {
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 18px;
}

.empty-section-message {
    padding: 12px;
    border: 1px solid #d8dee6;
    border-radius: 6px;
    background: white;
    color: #53606d;
    font-weight: 700;
}

.whiteboard-history-filters {
    grid-template-columns: minmax(130px, .8fr) minmax(150px, .9fr) minmax(150px, .9fr) minmax(130px, .7fr) auto;
}

.project-history-filters {
    grid-template-columns: minmax(150px, .8fr) minmax(150px, .8fr) minmax(260px, 1.6fr) minmax(130px, .6fr) auto;
}

.pagination-nav {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    padding: 12px;
    border: 1px solid #d8dee6;
    border-radius: 6px;
    background: white;
}

.history-pagination-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 14px;
}

.history-page-size-form {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.history-pagination-row .pagination-nav {
    flex: 1;
    margin-top: 0;
    padding: 0;
    border: 0;
    background: transparent;
    justify-content: flex-end;
}

.pagination-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid #c8d0da;
    border-radius: 4px;
    background: white;
    color: #123c55;
    font-weight: 700;
    text-decoration: none;
}

.pagination-page:hover {
    background: #eef2f5;
    text-decoration: none;
}

.pagination-page-current {
    border-color: #123c55;
    background: #123c55;
    color: white;
}

@media (max-width: 991px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.sensitive-panel h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.sensitive-note {
    margin-bottom: 16px;
    color: #6c5b18;
}

.status {
    display: inline-block;
    min-width: 74px;
    padding: 4px 8px;
    border-radius: 999px;
    text-align: center;
    font-weight: 700;
    font-size: 12px;
}

.status.ok {
    background: #dff4e5;
    color: #146b2e;
}

.status.duenow {
    background: #fff3c4;
    color: #7b5a00;
}

.status.overdue {
    background: #ffe0df;
    color: #a62920;
}

.status.invalid {
    background: #e4e8ee;
    color: #4b5563;
}

@media (max-width: 760px) {
    .topbar {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
        padding: 14px 18px;
    }

    .topbar nav {
        justify-content: flex-start;
    }

    .brand {
        overflow-wrap: anywhere;
    }

    .environment-badge {
        align-self: flex-start;
    }

    .page-shell {
        padding: 18px;
    }

    .page-header {
        align-items: stretch;
        flex-direction: column;
    }

    .summary-grid {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }

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

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

    .whiteboard-history-filters,
    .project-history-filters {
        grid-template-columns: 1fr;
    }

    .pagination-nav {
        align-items: stretch;
        flex-direction: column;
    }

    .history-pagination-row {
        align-items: stretch;
        flex-direction: column;
    }

    .history-page-size-form {
        white-space: normal;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .review-filters {
        grid-template-columns: 1fr;
    }

    .admin-task-filters .filter-search,
    .admin-task-filters .filter-actions {
        grid-column: auto;
    }

    .maintenance-filter-structured {
        grid-template-columns: 1fr;
    }

    .maintenance-filter-search-row {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        justify-content: flex-start;
    }

    .maintenance-filter-card .filter-actions {
        justify-content: flex-start;
    }

    .checkbox-dropdown-panel {
        position: static;
        box-shadow: none;
    }

    .maintenance-filter-card .maintenance-area-dropdown .checkbox-dropdown-panel {
        width: 100%;
        max-width: none;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .header-actions {
        justify-content: flex-start;
    }

    .project-action-row {
        align-items: stretch;
        flex-direction: column;
        justify-content: flex-start;
    }

    .project-action-row .button-link,
    .project-action-row .secondary-button {
        width: 100%;
    }

    .attachment-item {
        grid-template-columns: 1fr;
    }

    .task-admin-form {
        grid-template-columns: 1fr;
    }

    .project-form-top {
        grid-template-columns: 1fr;
    }

    .schedule-form-row {
        grid-template-columns: 1fr;
    }

    .auth-form,
    .completion-form,
    .task-admin-form {
        padding: 14px;
    }

    input,
    select,
    textarea,
    button,
    .button-link {
        min-height: 44px;
    }

    input,
    select,
    textarea {
        min-width: 0;
        width: 100%;
    }

    .form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .form-actions button,
    .form-actions .button-link,
    .form-actions .secondary-button {
        width: 100%;
    }

    .profile-menu-panel {
        left: 0;
        right: auto;
    }

    .table-wrap {
        margin-left: -2px;
        margin-right: -2px;
    }

    .maintenance-overview-table-wrap {
        max-height: 54vh;
        min-height: 240px;
    }

    table {
        min-width: 760px;
    }

    .compact-table table {
        min-width: 620px;
    }
}

@page {
    size: A4 landscape;
    margin: 10mm;
}

@page maintenance-work-sheet {
    size: A4 portrait;
    margin: 12mm;
}

@media print {
    body {
        background: white;
    }

    .topbar {
        position: static;
    }

    .maintenance-overview-table-wrap,
    .admin-maintenance-table-wrap {
        max-height: none;
        overflow: visible;
    }

    .maintenance-overview-table-wrap th,
    .admin-maintenance-table-wrap th {
        position: static;
        box-shadow: none;
    }

    .print-actions,
    .individual-preview-toolbar {
        display: none;
    }

    .print-report {
        padding: 0;
    }

    .individual-print-preview {
        padding: 0;
    }

    .maintenance-sheet {
        display: block;
    }

    [data-print-mode="current"] .maintenance-sheet {
        display: none !important;
    }

    [data-print-mode="current"] .maintenance-sheet.is-active {
        display: block !important;
    }

    [data-print-mode="all"] .maintenance-sheet {
        display: block !important;
    }

    .maintenance-work-sheet {
        width: 186mm;
        min-height: 273mm;
        height: 273mm;
        margin: 0;
        padding: 8mm;
        border: 0;
        box-shadow: none;
    }

    .maintenance-work-sheet.worksheet-layout-overflow {
        height: auto;
    }

    .maintenance-work-sheet:not(:last-child) {
        break-after: page;
        page-break-after: always;
    }

    .maintenance-work-sheet:last-child {
        break-after: auto;
        page-break-after: auto;
    }

    .print-table {
        font-size: 11px;
    }
}

@media (max-width: 420px) {
    .page-shell {
        padding: 14px;
    }

    h1 {
        font-size: 24px;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .field,
    .attachments-panel,
    .events-panel,
    .sensitive-panel {
        padding: 12px;
    }
}

.translation-control {
    align-items: center;
    background: #eef6ff;
    border: 1px solid #cfe3ff;
    border-radius: 8px;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin: 0 0 16px;
    padding: 12px 14px;
}

.translation-control p {
    margin: 0;
}

.translation-notice {
    color: #1f3b57;
}

.translation-notice span {
    display: block;
    margin-top: 4px;
}

.translation-actions {
    flex: 0 0 auto;
}

body.is-busy {
    cursor: progress;
}

body.is-busy a,
body.is-busy button,
body.is-busy input,
body.is-busy select,
body.is-busy textarea {
    cursor: progress;
}

.button-link.is-disabled {
    opacity: .65;
    pointer-events: none;
}

.translation-action.is-disabled::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 8px;
    border: 2px solid rgba(255, 255, 255, .55);
    border-top-color: #fff;
    border-radius: 50%;
    vertical-align: -2px;
    animation: translation-spin .8s linear infinite;
}

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

@media (max-width: 700px) {
    .translation-control {
        align-items: stretch;
        flex-direction: column;
    }
}

@media print {
    .translation-control {
        display: none !important;
    }

    .translation-actions {
        display: none;
    }
}
