/* Anpassungen für Tablet und Smartphone; nach den Grundregeln laden. */
@media (max-width: 760px) {
    .manual-layout {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .manual-nav {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 2px 18px;
        padding: 0 0 12px;
        border-right: 0;
        border-bottom: 1px solid #d9e0e7;
    }

    .app-shell.app-shell--public {
        grid-template-rows: auto minmax(min-content, 1fr) auto;
    }

    .app-shell {
        grid-template-rows: auto 1fr;
    }

    .app-header {
        flex-wrap: wrap;
        gap: 0 12px;
        width: 100%;
        min-width: 0;
        max-width: 100vw;
        min-height: 64px;
        padding: 0 14px;
    }

    .app-brand,
    .app-user {
        min-width: 0;
        height: 60px;
    }

    .app-navigation {
        flex: 0 0 100vw;
        flex-wrap: wrap;
        order: 3;
        width: 100vw;
        min-width: 0;
        max-width: 100vw;
        min-height: 44px;
        gap: 0;
        margin: 0 -14px;
        padding: 0 6px;
        overflow: visible;
    }

    .app-navigation > a {
        min-height: 44px;
    }

    .app-navigation__group {
        position: static;
        flex: 0 0 auto;
        height: 44px;
    }

    .app-navigation__group summary {
        padding: 0 10px;
    }

    .app-navigation__submenu {
        top: 100%;
        right: 14px;
        left: 14px;
        width: auto;
        min-width: 0;
    }

    .app-navigation a {
        flex: 0 0 auto;
        padding: 0 10px;
        white-space: nowrap;
    }

    .app-user {
        margin-left: auto;
    }

    .app-user span {
        display: none;
    }

    .login-panel {
        padding: 22px;
    }

    .page {
        width: min(100% - 28px, 1120px);
        padding-top: 28px;
    }

    .page-heading {
        font-size: 26px;
    }

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

    .data-table-wrapper {
        overflow: visible;
        background: transparent;
        border: 0;
    }

    .data-table,
    .data-table tbody,
    .data-table tr,
    .data-table td {
        display: block;
        width: 100%;
    }

    .data-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    .data-table tr {
        margin-bottom: 12px;
        background: #fff;
        border: 1px solid #d9e0e7;
        border-radius: 6px;
    }

    .data-table td {
        display: grid;
        grid-template-columns: minmax(110px, 35%) minmax(0, 1fr);
        gap: 12px;
        padding: 10px 14px;
        text-align: left !important;
    }

    .data-table td::before {
        color: #52606d;
        content: attr(data-label);
        font-size: 12px;
        font-weight: 700;
        text-transform: uppercase;
    }

    .data-table td:first-child {
        display: block;
        padding-top: 14px;
    }

    .data-table td:first-child::before {
        display: none;
    }

    .data-table td:last-child {
        border-bottom: 0;
    }

    .allowance-table .data-table__detail,
    .allowance-table .allowance-save-form {
        grid-column: 2;
    }

    .action-group {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

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

    .department-assignment {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .department-assignment__name {
        padding-top: 0;
    }

    .team-add-form {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .team-add-form__submit {
        grid-column: auto;
        justify-self: start;
    }

    .team-table .data-table {
        min-width: 0;
    }

    .team-member-form {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .team-member-form .button {
        justify-self: start;
    }

    .checkbox-grid--team-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .timesheet-entry-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .timesheet-settings-grid {
        grid-template-columns: 1fr;
    }

    .workflow-actions {
        grid-template-columns: 1fr;
    }

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

    .license-actions {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .timesheet-entry-form__comment {
        grid-column: 1 / -1;
    }

    .timesheet-entry-form__submit {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

@media (max-width: 540px) {
    .app-brand > span:last-child {
        display: none;
    }

    .app-navigation a {
        padding: 0 8px;
    }

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

    .button--header,
    .text-link--header {
        align-self: flex-start;
        margin-top: 0;
    }

    .page-header__actions {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .filter-bar {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .checkbox-grid,
    .checkbox-grid--functions,
    .checkbox-grid--team-row {
        grid-template-columns: 1fr;
    }

    .filter-bar input:not([type="hidden"]),
    .filter-bar select {
        width: 100%;
    }

    .form-panel {
        padding: 18px;
    }

    .license-facts,
    .license-activation-form {
        grid-template-columns: 1fr;
    }

    .license-check-form .button {
        width: 100%;
    }

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

    .organization-colors {
        grid-template-columns: 1fr;
    }

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

    .totp-actions {
        flex-direction: column;
    }

    .app-footer__inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .app-footer__details {
        align-items: flex-start;
        text-align: left;
    }

    .app-footer nav {
        justify-content: flex-start;
    }

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

    .timesheet-summary > div {
        min-height: 70px;
    }

    .timesheet-entry-form {
        grid-template-columns: 1fr;
    }

    .timesheet-entry-form__comment,
    .timesheet-entry-form__submit {
        grid-column: auto;
    }

    .timesheet-submit {
        align-items: stretch;
        flex-direction: column;
    }

    .timesheet-submit .button {
        align-self: stretch;
    }
}
