@media (max-width: 640px) {
    html {
        -webkit-text-size-adjust: 100%;
    }

    body {
        overflow-x: hidden;
    }

    #app > div.h-full.flex.flex-col > header {
        padding: 0.875rem 1rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    #app > div.h-full.flex.flex-col > header > div:first-child {
        align-items: center;
    }

    #app > div.h-full.flex.flex-col > header > div:last-child {
        width: 100%;
        align-items: stretch;
    }

    #app > div.h-full.flex.flex-col > header > div:last-child > div:first-child {
        width: 100%;
        justify-content: space-between;
    }

    #app > div.h-full.flex.flex-col > header > div:last-child > div:last-child {
        width: 100%;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    #app > div.h-full.flex.flex-col > header button {
        flex: 1 1 0;
        justify-content: center;
        min-width: 0;
    }

    #app > div.h-full.flex.flex-col > div.bg-white.border-b.border-gray-200.px-6 {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    #app > div.h-full.flex.flex-col > div.bg-white.border-b.border-gray-200.px-6 nav {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.5rem;
        width: 100%;
    }

    #app > div.h-full.flex.flex-col > div.bg-white.border-b.border-gray-200.px-6 nav button {
        flex-direction: column;
        justify-content: center;
        gap: 0.25rem;
        padding: 0.7rem 0.25rem;
        min-width: 0;
        white-space: normal;
        font-size: 0.75rem;
        line-height: 1.1;
        text-align: center;
    }

    #app > div.h-full.flex.flex-col > div.flex-1.overflow-auto.p-6 {
        padding: 1rem;
    }

    #app > div.h-full.flex.flex-col > div.flex-1.overflow-auto.p-6 .max-w-3xl {
        max-width: none;
    }

    #app > div.h-full.flex.flex-col > div.flex-1.overflow-auto.p-6 .flex.items-center.justify-between.mb-4 {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    #app > div.h-full.flex.flex-col > div.flex-1.overflow-auto.p-6 .flex.items-center.gap-6.mb-5 {
        flex-wrap: wrap;
        gap: 0.5rem 1rem;
    }

    #app > div.h-full.flex.flex-col > div.flex-1.overflow-auto.p-6 .flex.items-center.justify-between.mb-4 > div:first-child {
        flex-wrap: wrap;
    }

    #app > div.h-full.flex.flex-col > div.flex-1.overflow-auto.p-6 .flex.items-center.justify-between.cursor-pointer {
        align-items: flex-start;
        gap: 0.75rem;
    }

    #app > div.h-full.flex.flex-col > div.flex-1.overflow-auto.p-6 .flex.items-center.justify-between.cursor-pointer > div:last-child {
        text-align: right;
    }

    #app > div.h-full.flex.flex-col > div.flex-1.overflow-auto.p-6 table {
        font-size: 0.8125rem;
    }

    #app > div.h-full.flex.flex-col > div.flex-1.overflow-auto.p-6 th,
    #app > div.h-full.flex.flex-col > div.flex-1.overflow-auto.p-6 td {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}
